Hydraulic Cylinder Simulation
Simulating a hydraulic cylinder starts with the basic F=m*a and then is enhanced by doing a series of substitutions. The net force is equal to the force applied on the piston minus the opposing force required to push oil out the other side and the opposing force due to friction. Fnet = Fa − Fb − Fl − Ff Substitute for the for the force on both sides of the piston and the frictional and load forces. Assume the friction is proportional to the velocity. Ignore static friction for now and just model the kinetic friction
a=
Pa⋅ Aa − Pb ⋅ Ab − Fl − Ff
The acceleration that must be integrated to provide velocity and position.
mass
Since a is the same as
d v dt
Pa⋅ Aa − Pb⋅ Ab d v= mass dt
The acceleration or rate of change in velocity
β⋅Q d P= V dt
Expressed as a simple ODE
Since the moving piston changes the volume or ∆V on both sides of the piston the velocity of the piston must also be taken into account β d P = ( Q + v⋅ A) V dt
Calculate how pressure changes as a function of net flow Va and Vb are the volumes of oil between the valve or pump and the cylinder piston. The subroutines Qa(Pa) and Qb(Pb) are needed to calculate the net flow.
β d Pa = ( Q( Pa) − v⋅ Aa) Va dt
Calculate the rate of change in pressure as a function of flow and velocity.
β d Pb = ( Q( Pb) + v⋅ Ab) Vb dt
(c) 2010 Delta Computer Systems, Inc.
1/27
1/16/2013 10:10 AM
Hydraulic Cylinder Simulation
Simulate the Hydraulic Actuator Acceleration Pt := 14.7
Tank pressure psia
Ps0 := 2000
Initial system pressure, psia
CylDia := 2 RodDia := 1.375 Aa := Ab :=
π 4 π 4
2
⋅ CylDia
(
Aa = 3.142 2
)
2
⋅ CylDia − RodDia
Ab = 1.657
CylLen := 24 W := 600 mass :=
Weight in lbf W
mass = 1.554
386
Fl := W⋅ sin( 0 )
Slinch. A slinch is 12 slugs. 1 lb force accelerates a slinch at 1 in/s^2
Fl = 0 lbf ⋅ sec
Kf := 5
frictional velocity constant
in
Vamin := 5
Cubic inches of oil between the valve and the pump Try setting the volumes to 1000 and then 10000.
Vbmin := 5 + 0.25⋅ CylLen β := 160000
The bulk modulus of oil
Calculate the natural frequency of the cylinder and system ωn :=
2 2 Aa Ab + mass CylLen CylLen Vbmin + Ab⋅ Vamin + Aa⋅ 2 2
β
⋅
ωn = 181.497
Natural frequency in radians per second
18
Calculate the acceleration time using the natural frequency method.
ωn
= 0.099
(c) 2010 Delta Computer Systems, Inc.
2/27
1/16/2013 10:10 AM
Hydraulic Cylinder Simulation
Pa0 :=
Pb0 :=
0.5⋅ Ps0⋅ Ab − Fl
Pa0 = 345.269
Aa + Ab 0.5⋅ Ps0⋅ Aa + Fl
The initial pressure on the A and B port should be 1/2 the supply pressure if the valve leakage from P->A and A->T is identical. The same applies to the B port.
Pb0 = 654.731
Aa + Ab
− 13
Pa0 ⋅ Aa − Pb0⋅ Ab = 2.274 × 10
Calculate the valve flow coefficient GPM := 27
Rated valve flow at rated pressure drop.
∆P := 1015
Rated pressure
GPM⋅ Kv :=
231 60
∆P
Calculate the flow constant for the powered land. Yields flow in cubic inches per second
Kv = 4.614
2
(c) 2010 Delta Computer Systems, Inc.
3/27
1/16/2013 10:10 AM
Hydraulic Cylinder Simulation
Valve Spool Response The valve spool response can be roughly simulated by a natural frequency and a damping factor. For the purposes of this model the spool's natural frequency and damping factor are assumed to be fixed but in reality the natural frequency drops as the amplitude increases. This may be due to the fact that is takes significantly more power to move at twice the frequency. ωs := 20⋅ 2 ⋅ π
ωs = 125.664
A 20 Hz valve
ζ s := 0.7
Spool damping factor. The closer to 1 the better. ωs
Ts( s) :=
2
Assume the spool is a second order system and possibly under damped. The Bode plots show this to be the case
2
2
s + 2 ⋅ ζ s⋅ ωs⋅ s + ωs n := 0 .. 320 n
hz := 10
Iterate the frequency from .01 HZ to 1000 HZ using 64 steps per decade for a total of 256 iterations.
−2
64
n
Mn := r ← Tsj ⋅ ( 2 ⋅ π ) ⋅ hz n φn a←
Calculate magnitude and phase for T(s)
arg( r) deg
a ← a − 360 if n > 0 ∧ a − φ n− 1 > 100
20⋅ log( r ) a
(c) 2010 Delta Computer Systems, Inc.
4/27
1/16/2013 10:10 AM
Hydraulic Cylinder Simulation
Valve Spool Bode Plot 20
200
150
20 100 40 50
60
80 0.01
Phase deg
Magnitude db
0
0.1
1
10
100
03 1 .10
Frequency Hz Magnitude Phase The Bode plot looks something like the plots provided by the valve manufacturers. It must be acknowledge that this approximation is better than nothing but there is much more to modeling just the valve. For instance the valve has on board electronics and closed loop control which alter the response. The controller may even have a PID control but I best most have just a simple proportional controller. Still the magnitude is down -3db at 20 Hz. This means that at 20 Hz one must provide a 20% signal to get a 10% response from the valve. This works at low amplitudes but the controller can at most provide a 100% signal and get 50% amplitude from the valve 20Hz. There are two difference equations for the spool because it is a second order system. There is one for the velocity of the spool and one for the position of the spool d xs = vs dt
Calculate the spool position
(
)
2 d vs = −2 ⋅ ζ s⋅ ωs⋅ vs + ωs ⋅ u ( t ) − xs dt
(c) 2010 Delta Computer Systems, Inc.
Calculate the spool velocity
5/27
1/16/2013 10:10 AM
Hydraulic Cylinder Simulation
Verifying the valve spool response y :=
0 0
Initial spool position and velocity are 0
u ( t ) := 100
The control signal to the valve is a simple step signal of 90%
Time := 0.1
Simulation time
xs ←y vs
D( t , y) :=
vs ω 2⋅ u ( t) − x − 2 ⋅ ζ ⋅ ω ⋅ v s) s s s s ( S := rkfixed( y , 0 , Time , 100 , D)
Spool Response to a Step Input 6000
4000 100
2000
50 0
0
0
0.02
0.04
0.06
0.08
Spool Velocity, percent per second
Spool Position, percent
150
2000 0.1
Time Spool Position Spool Velocity One can see that the model is close to 100% open in 25 milliseconds. The valve is actually open 101% at 25 milliseconds which is close to the valve documentation. The over shoot is caused because the spool is under damped as indicated by the damping factor being less than 1. In reality the spool will probably hit an end of travel stop instead of going over 100%.
(c) 2010 Delta Computer Systems, Inc.
6/27
1/16/2013 10:10 AM
Hydraulic Cylinder Simulation
Target Generator for Position, Velocity and Acceleration Generation motion profile using a cosine ramp target generator. This target generator will calculate a position, velocity and acceleration at time t. The motion profile assumes the ramp up, constant velocity and ramp down sections each take 1/3 of the total move time. All that is required is the move time and the distance to move.
Cosine Ramps MoveTime := 2 MaxVel :=
3 MoveDist ⋅ 2 MoveTime
MoveDist := 16
x0 := 4
MaxVel = 12
AvgAcc :=
9 2
⋅
MoveDist MoveTime
2
AvgAcc = 18
π sin 3 ⋅ ⋅ t 3 ∆x 1 ∆t ⋅ ⋅ t − ⋅ ∆t⋅ + x0 π 4 ∆t 3 if 0 ≤ t < ∆t 3 ∆x π (r t , ∆t , ∆x) := 3 ⋅ ⋅ t ⋅ ⋅ 1 − cos 3 4 ∆t ∆t 9 ∆x π ⋅ ⋅ sin 3 ⋅ ⋅ t ⋅ π 4 2 ∆t ∆t 3 ⋅ ∆x ⋅ t − 1 ⋅ ∆t + 1 ⋅ ∆x + x0 2 ∆t 3 4 ∆t ∆t ≤ t < 2⋅ 3 ∆x if ⋅ 3 3 2 ∆t 0 2 t − ⋅ ∆t 1 ∆x 3 1 ∆x 3 4 ⋅ π ⋅ sin 3 ⋅ π ⋅ ∆t + 4 ⋅ t + 3 ⋅ ∆t ⋅ ∆t + x0 2 t − ⋅ ∆t if 2 ⋅ ∆t ≤ t < ∆t 3 ∆x 3 ⋅ ⋅ 1 + cos 3 ⋅ π ⋅ 3 4 ∆t ∆t 2 t − ⋅ ∆t −9 ∆x 3 ⋅ ⋅ sin 3 ⋅ π ⋅ ⋅π 4 2 ∆t ∆t ∆x + x0 0 if ∆t ≤ t 0
(c) 2010 Delta Computer Systems, Inc.
7/27
1/16/2013 10:10 AM
Hydraulic Cylinder Simulation
Linear Ramps 9 ⋅ ∆x ⋅ t2 + x0 4 2 ∆t 9 ∆x (r t , ∆t , ∆x) := 2 ⋅ 2 ⋅ t if 0 ≤ t < ∆t 3 ∆t 9 ∆x ⋅ 2 2 ∆t 3 ⋅ ∆x ⋅ t − 1 ⋅ ∆t + 1 ⋅ ∆x + x0 3 4 2 ∆t ∆t ∆t ≤ t < 2⋅ 3 ∆x if ⋅ 3 3 2 ∆t 0 −5 9 t 9 t2 + ⋅ − ⋅ ⋅ ∆x + x0 2 ∆t 4 2 4 ∆t 9 ∆x if 2 ⋅ ∆t ≤ t < ∆t ⋅ ⋅ ( ∆t − t ) 2 2 3 ∆t 9 ∆x − ⋅ 2 2 ∆t ∆x + x0 0 if ∆t ≤ t 0 Step, No Ramps ∆x 4 r( t , ∆t , ∆x) := 0 0
(c) 2010 Delta Computer Systems, Inc.
8/27
1/16/2013 10:10 AM
Hydraulic Cylinder Simulation
Define the valve control signal a function of time, u (t) The control signal can be ramped shut to simulate quick stops and check for pressure increases. ∆t := 0.001
t 0 := 0 t 1 := t 2 :=
Start ramping up
MoveTime
End of ramp up
3 2 ⋅ MoveTime
Start of ramp down
3 End of ramp down. Make the difference between t3
t 3 := MoveTime N :=
and t2 bigger to get a ramp that doesn't oscillate.
MoveTime + 1
N = 3000
∆t
Ending time and number of iterations
Open loop Control
u ( t ) :=
t − t0
if t0 ≤ t < t1 t1 − t0
0.5⋅ 1 − cos π ⋅
The control signal as a function of time. The control signal has a range of -1 to 1 where -1 will move the spool to 100% P->B and A->T, 0 is leakage only and 1 will move the spool to 100% P->A and B->T.
1 if t 1 ≤ t < t 2
t − t2
if t2 ≤ t < t3 t3 − t2
0.5⋅ 1 + cos π ⋅ 0 if t 3 ≤ t
(c) 2010 Delta Computer Systems, Inc.
9/27
1/16/2013 10:10 AM
Hydraulic Cylinder Simulation
Estimate Valve Leakage Calculate the leakage flow constant K l from the leakage specification The total leakage flow is the sum of the flow from P->A and P->B. Since the orifice is assumed to be symmetrical we can assume the flow from P->A is equal to the flow from P->B therefore the total leakage flow Ql is equal to 2 times the leakage from P->A, Q pa. 231 Ql := 0.25⋅ 60
Ql = 0.963
The specification for valve leakage for my NG10 is about .25 gpm. Convert to cubic inches per second.
The total valve leakage, Ql, is equal to the leakage from P->A plus the leakage from P->B. Assuming the leakage is symmetrical then the total leakage is 2 times the leakage from P->A.
Ql = 2 ⋅ Qpa = 2 ⋅ Kl ⋅
Ps
The leakage flow is 2 times the flow from A->B
2
Ql = Kl ⋅ 2 ⋅ Ps Kl :=
Combine some constants
Ql
Divide both sides by the square root term
2 ⋅ Ps0
Kl = 0.015
Leakage flow constant. This is very small relative to K v.
Select valve over/under lap type. The valve overlap is determined by x l. The spool position, x s, is in percent of full spool travel. x l, should be a small number in per cent overlap or under lap. A value of 0 signifies a 0 lapped spool whereas negative value specify under lapped spools and positive values signify overlapped spools. x .lt allows one to specify a different leakage coefficient A->T and B->T that differs from P->A and P->B. Spool over/under lap variable in percent. Set negative of under lap and positive for over lap spools. For the pressure port
xl := 0 xlt := xl
(c) 2010 Delta Computer Systems, Inc.
Spool over/under lap for the tank port. Normally this should be the same as the pressure port over/under lap.
10/27
1/16/2013 10:10 AM
Hydraulic Cylinder Simulation
Calculate the flow coefficients as a function of spool position The flow around each edge of the spool is modeled using a simple function. Basically there are two states. Either the edge is in a normal flowing condition or it is blocked and in a leakage state. This results in two linear segments that will determine the flow coefficient as a function of the position as it goes from -100% to +100%.
( )
Kpa xs :=
xs − xl
(Kv − Kl)⋅ 100 − x
l
(
)
+ Kl if xs − xl ≥ 0
100 + xs Kl ⋅ otherwise 100 + xl
−xs − xlt + Kl if ( −xs − xlt) ≥ 0 lt Calculate the flow coefficient from the A to T ports as a function of the spool 100 − xs Kl ⋅ otherwise position 100 + xlt
( )
( Kv − Kl) ⋅ 100 − x
( )
( Kv − Kl) ⋅ 100 − x
Kat xs :=
Kpb xs :=
Calculate the flow coefficient from the P to A ports as a function of the spool position
−xs − xl l
+ Kl if xs + xl ≤ 0
Calculate the flow coefficient from the P to B ports as a function of the spool position
100 − xs Kl ⋅ otherwise 100 + xl
( )
Kbt xs :=
xs − xlt Calculate the flow coefficient from the + Kl if −xs + xlt ≤ 0 B to T ports as a function of the spool lt position 100 + xs Kl ⋅ otherwise 100 + xlt
(Kv − Kl)⋅ 100 − x
Note, the spools are assume to be cut so that the flow changes linearly with spool position. This is not always the case. There are 'curvilinear' and 'nick' spools. Modeling either one of these spools would require modifications to the four flow coefficient functions above. For instance, and 'nick' spool can be simulated by adding a third linear segment with a higher gain when the spool reaches 20% or 40% depending on the spool.
(c) 2010 Delta Computer Systems, Inc.
11/27
1/16/2013 10:10 AM
Hydraulic Cylinder Simulation
Sanity check the flow constant formula by graphing the flow coefficients as a function of the control signal. Note that the control signal goes from -1 to 1. x := −100 , −099.9 .. 100
Flow Coefficient P to A
Flow Coefficient P to B 6
Flow Coefficent
Flow Coefficient
6
4
2
0 100
50
0
50
2
0 100
100
50
0
50
Control Signal %
Control Signal %
Flow Coefficient A to T
Flow Coefficient B to T
4
2
0 100
100
6
Flow Coefficient
6
Flow Coefficient
4
50
0
50
100
Control Signal %
(c) 2010 Delta Computer Systems, Inc.
4
2
0 100
50
0
50
100
Control Signal %
12/27
1/16/2013 10:10 AM
Hydraulic Cylinder Simulation
Simulating Pump and Accumulators A real hydraulic system does not have a constant supply pressure. The supply pressure drops when a lot of flow is required. To offset this accumulators are used to supply energy. This allows the designer to use a pump that supplies just a little more than the average flow. During slow or dwell times the oil/energy is stored in accumulators and during times when the flow exceeds the pump capacity the accumulator can make up the difference. To start lets assume the pump is a fixed displacement pump of 60 gpm and that any excess oil flows over a relief valve at 2000 psi. Also, assume the accumulator capacity is 10 gal accumulator.
GPM := 5
GPM⋅
231 60
= 19.25
Pump capacity
PPB := 200
Pump proportional band
τp := 0.050
Pump time constant
AccumSize := 5
Accumulator size in gallons
Va := AccumSize⋅ 231
Va = 1155
Accumulator size in cubic inches
γ := 1.4
Ratio of specific heat Cp/Cv
Calculate the Supply Pressure and Accumulator Volume As A Function of Time. P0 := 0.9⋅ Ps0 K := P0 ⋅ Va
P0 = 1800
γ
Pre charge pressure Calculate K, nrT, using pre charge values calculated above for pressure calculations below.
7
K = 3.49 × 10
K Ps
ln
solve , Vg →e explicit
γ
K = Ps⋅ Vg
γ
K Ps0
ln
Vg0 := e
Ps( Vg) :=
γ
K Vg
γ
Vg0 = 1071.268
Initial gas volume in cubic inches
Ps( Vg0) = 2000
Supply pressure as a function of the accumulator volume.
(c) 2010 Delta Computer Systems, Inc.
13/27
1/16/2013 10:10 AM
Hydraulic Cylinder Simulation
Total Flow Equations Qa and Qb are the net flow to either side of the cylinder piston. The total flow equations are important since they determine the rate of change in pressure,∆P=β*∆V/V or ∆P=β*Q*∆t. The current flow equation has four parts. The top equation calculates the flow from the supply to the A or B port and the second equation calculates the flow from the A or B port to the tank.The leakage terms are very important. Without the leakage terms the system will tend to oscillate for an unrealistically long time since there is little if any energy loss when the valve is shut. When accelerating there is plenty of energy loss due to the pressure drop across the valve. You can see there isn't any hint of oscillating because the damping factor is very high when the spools is wide open.
(
)
(
)
Qpa Pa , xs , Vg := Kpa xs⋅ 100 ⋅ sign ( Ps( Vg) − Pa) ⋅
(
)
(
)
Qat Pa , xs := −Kat xs⋅ 100 ⋅ sign ( Pa − Pt) ⋅
(
)
(
Pa − Pt
)
Qpb Pb , xs , Vg := Kpb xs⋅ 100 ⋅ sign ( Ps( Vg) − Pb) ⋅
(
)
(
)
Qbt Pb , xs := −Kbt xs⋅ 100 ⋅ sign( Pb − Pt) ⋅
(
)
(
)
(
)
(
)
(
Ps( Vg) − Pa
Ps( Vg) − Pb
Pb − Pt
)
Qa Pa , xs , Vg := Qpa Pa , xs , Vg + Qat Pa , xs
(
)
Qb Pb , xs , Vg := Qpb Pb , xs , Vg + Qbt Pb , xs
Force load as a function of time and distance The force can be changed as a function of time or distance. Fl( t , x) :=
2000⋅
t − 0.40⋅ MoveTime
if 0.40⋅ MoveTime ≤ t < 0.43⋅ MoveTime 0.03⋅ MoveTime
2000 if 0.43⋅ MoveTime ≤ t < 0.47⋅ MoveTime 2000⋅
0.5⋅ MoveTime − t
if 0.47⋅ MoveTime ≤ t < 0.5⋅ MoveTime 0.03⋅ MoveTime
0 ( x − 19) if x ≥ 19 0 otherwise
(c) 2010 Delta Computer Systems, Inc.
14/27
1/16/2013 10:10 AM
Hydraulic Cylinder Simulation
When extending against a load ρv := 1
The spool is symetrical
Ape := Aa
Ape = 3.142
FL := 0
FL = 0
ρc :=
Aa
ρc = 1.896
Ab
Ratio of the powered end area the exhausting end area
Compute maximum steady state velocity in each direction to estimate velocity feed forwards
vss_ext := Kv⋅
Ps0⋅ Ape − FL
Ape ⋅ 1 + 3
2
ρv ρc
vss_ext = 61.342
3
Calculate the maximum velocity when the control output is one using the VCCM equation
Ape := Ab
FL := 0
ρc :=
No load when retracting
Ab
ρc = 0.527
Aa
vss_ret := Kv⋅
Ps0⋅ Ape − FL 2 ρv 3 Ape ⋅ 1 + 3 ρc
(c) 2010 Delta Computer Systems, Inc.
Ratio of the powered end area the exhausting end area
vss_ret = 44.545
15/27
1/16/2013 10:10 AM
Hydraulic Cylinder Simulation
Closed Loop Control Define the valve control signal a function of error between the target and actual position, velocity and acceleration. ∆t := 0.0001
Update period. The update period must be smaller as the system response get faster.
Controller gains. Ki := 0.5
Integrator gain
Kp := 0.1
Proportional gain
Kd := 0.001 Kv_ext :=
Kv_ret :=
Derivative gain 1
vss_ext 1 vss_ret
Kv_ext = 0.016
Velocity feed forward
Kv_ret = 0.022
Ka := 0.00018
Acceleration feed forward
Control output goes from -1 to 1 PID( u , xt , vt , at , x , v , a) :=
Kv ← Kv_ext if vt > 0 Kv ← Kv_ret if vt < 0 Kv ← 0 if vt = 0
xt − x u' ← ( Ki Kp Kd ) ⋅ vt − v at − a u ← u + u'⋅ ∆t + Kv⋅ vt + Ka⋅ at if u > 1 u←1 u' ←
1 − u − Kv⋅ vt − Ka⋅ at ∆t
if u < −1 u ← −1 u' ←
( −1 ) − u − Kv⋅ vt − Ka⋅ at ∆t
u u'
(c) 2010 Delta Computer Systems, Inc.
16/27
1/16/2013 10:10 AM
Hydraulic Cylinder Simulation
The Simulation Using Runge-Kutta. Execute the equations simultaneously by putting the equations and results in a matrix. There are now eight differential equations that are computed simultaneously. ActAcc( t , Pa , Pb , x , v , xt , vt) :=
0 0 Pa0 Pb0 y := 0 x0 0 Qp ← 0 Vg0
( Pa⋅ Aa − Pb⋅ Ab) − Kf ⋅ v − Fl( t , x) mass
Calculate the actual acceleration
Initial spool position initial spool velocity Initial A port pressure Initial B port pressure Initial velocity Initial position Initial control output Initial accumulator gas volume
(c) 2010 Delta Computer Systems, Inc.
17/27
1/16/2013 10:10 AM
Hydraulic Cylinder Simulation
xt D( t , y) := vt ← r( t , MoveTime , MoveDist) at xs vs Pa Pb v ←y x u Qp Vg a ← ActAcc( t , Pa , Pb , x , v , xt , vt)
u ← PID( u , xt , vt , at , x, v, a) u' vs 2 ωs ⋅ ( u − xs) − 2 ⋅ ζ s⋅ ωs⋅ vs β ⋅ ( Qa( Pa , xs , Vg) − v⋅ Aa) Vamin + x⋅ Aa β ⋅ ( Qb( Pb , xs , Vg) + v⋅ Ab) Vbmin + ( CylLen − x) ⋅ Ab a v u' 1 Ps0 − Ps( Vg) 231 ⋅ max min , 1 , 0 ⋅ GPM⋅ − Qp PPB 60 τp Qpa( Pa , xs , Vg) + Qpb( Pb , xs , Vg) − Qp SimTime := MoveTime + 1 N :=
SimTime ∆t
N = 30000
Simulation time Number of iterations
S := rkfixed( y , 0 , SimTime , N , D)
(c) 2010 Delta Computer Systems, Inc.
18/27
1/16/2013 10:10 AM
Hydraulic Cylinder Simulation
〈0〉 t := S
〈1〉 xs := S
〈3〉 Vg := S
〈3〉 Pa := S
〈4〉 Pb := S
〈5〉 v := S
〈6〉 x := S
〈7〉 u := S
〈8〉 Qp := S
〈9〉 Vg := S
n := 0 .. N
xtn vt := r( n⋅ ∆t , MoveTime , MoveDist) n atn
(n
a := ActAcc t , Pa , Pb , x , v , xt , vt n
n
n
n n
n
(
n
)
)
CO := PID u , xt , vt , at , x , v , a 0 n n n n n n n n
(c) 2010 Delta Computer Systems, Inc.
19/27
1/16/2013 10:10 AM
Hydraulic Cylinder Simulation
t
xs 0
0 1 2 3 4 5 6 7 8 9 10 11 12
S=
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
vs 1
Pa 2
Pb
v
x
3
4
345.269 345.58
654.731 654.794
0 0
345.892
654.857
0
0 1.625·10-9 0 3.821·10-9
0
346.203
654.92
0
4-2.496·10-7 2.66·10-7
0
346.513
654.983
0
0.001 7.403·10-9 0.001 1.269·10-8
0
346.822
655.046
0.001
4-4.449·10-7 4.726·10-7 4 -6.97·10-7 7.379·10-7
0
347.131
655.109
0.001
0.001 1.998·10-8 0.001 2.958·10-8
0
347.438
655.173
0.001
0
347.744
655.236
0.002
0.001 4.176·10-8 0.001 5.681·10-8
0
348.049
655.3
0.002
0
348.352
655.364
0.003
0.001 7.498·10-8 0.001 9.652·10-8
0
348.653
655.429
0.003
0
348.952
655.494
0.004
0.001 1.217·10-7 0.001 1.507·10-7
0
349.25
655.559
0.005
0
349.545
655.625
0.005
0.002 1.837·10-7 0.002 2.211·10-7
0
349.837
655.691
0.006
0
350.128
655.757
0.007
0.002 2.629·10-7 0.002 3.094·10-7
0
350.415
655.824
0.008
0
350.7
655.892
0.009
0.002 3.607·10-7 0.002 4.17·10-7
0.001
350.982
655.96
0.01
4
-0
0
0.001
351.261
656.029
0.011
4
-0
0
0.002 4.785·10-7 0.002 5.453·10-7
0.001
351.536
656.098
0.012
4
-0
0
0.001
351.809
656.168
0.013
4
-0
0
0.002 6.176·10-7 0.002 6.955·10-7
0.001
352.078
656.239
0.014
4
-0
0
0.001
352.343
656.311
0.016
4
-0
0
0.003 7.792·10-7 0.003 8.686·10-7
0.001
352.604
656.383
0.017
4
-0
0
0.001
352.862
656.456
0.018
4
-0
0
0.003 9.64·10-7 0.003 1.066·10-6
0.001
353.116
656.53
0.02
4
-0
0
0.001
353.365
656.604
0.021
4
-0
0
20/27
6
Qp
0 0 0 06.118·10-11 1.83·10-6 04.855·10-10 7.243·10-6
(c) 2010 Delta Computer Systems, Inc.
5
u 7
8
4 0 0 4-2.758·10-8 2.96·10-8 4-1.106·10-7 1.183·10-7
4-1.006·10-6 1.062·10-6 4-1.372·10-6 1.444·10-6 4-1.796·10-6 1.885·10-6 4-2.278·10-6 2.384·10-6 4-2.818·10-6 2.941·10-6 4-3.416·10-6 3.557·10-6 4-4.072·10-6 4.23·10-6 4-4.786·10-6 4.961·10-6 4-5.559·10-6 5.749·10-6 4 -6.39·10-6 6.595·10-6 4-7.279·10-6 7.499·10-6 4-8.227·10-6 8.46·10-6 4-9.232·10-6 9.478·10-6
1/16/2013 10:10 AM
Hydraulic Cylinder Simulation
The first Spool Response graph shows the control signal, valve spool position and as a function of time.
Spool Response to Control Signal 15
0.2 10 0.15
5
0.1
0.05
Velocity in in/s
Conrol Signal and Spool Positon -1 to +1
0.25
0 0
0.05
0
0.5
1
1.5
2
2.5
3
5
Time Control Signal Spool Position Velocity
(c) 2010 Delta Computer Systems, Inc.
21/27
1/16/2013 10:10 AM
Hydraulic Cylinder Simulation
Hydraulic Cylinder Response to Spool Position 25
0.25
Position in Inches
0.15 15 0.1 10 0.05 5
0
Spool Position -1 to 1
0.2
20
0
0
0.5
1
1.5
2
2.5
3
0.05
Time Actuator Position Spool Position
(c) 2010 Delta Computer Systems, Inc.
22/27
1/16/2013 10:10 AM
Hydraulic Cylinder Simulation
Velocity and Pressure Response 2500
2000
Velocity in in/sec
10 1500 5 1000 0 500
5
0
0.5
1
1.5
2
2.5
A, B and Supply Port Pressure, psi
15
0 3
Time Velocity Pressure Port A Pressure Port B Supply Pressure The load can induce a large pressure difference across the piston. The supply pressure is plotted to compare with the A and B port pressure. When the valve shut quickly pressure spikes are induced and these pressure spikes can cause the oil to flow back into the accumulator. This is why the code for flow must use sign ( Ps( Vg) − Pa) ⋅ Ps( Vg) − Pa when computing the flow. This avoids errors caused by taking the square root of a negative number.
(c) 2010 Delta Computer Systems, Inc.
23/27
1/16/2013 10:10 AM
Hydraulic Cylinder Simulation
Force Response 3000
Force, lbf
2000
1000
0
1000
0
0.5
1
1.5
2
2.5
3
Time Cylinder Force Friction Force Load Force Net Force
Accumulator Gas Volume and Accumulator Pressure
4.8 2000 4.75 1950 4.7 1900 4.65
4.6
0
0.5
1
1.5
2
2.5
Accumulator Gas Pressure, psi
Accumulator Gas Volume, gal
2050
1850 3
Time Gas Volume Presssure
(c) 2010 Delta Computer Systems, Inc.
24/27
1/16/2013 10:10 AM
Hydraulic Cylinder Simulation
A and B Port and Pump Flow and Pressures 2500
50
40
20
1500
10 1000
0
Pressures, psi
Cubic Inches per Second
2000 30
10 500 20
30
0
0.5
1
1.5
2
2.5
0 3
Time A Port Flow B Port Flow Pump Flow A Port Pressure B Port Pressure Supply Pressure The pump flow is not as great as the flow into the cylinders A port. This can happen because the extra oil comes from the accumulator.
(c) 2010 Delta Computer Systems, Inc.
25/27
1/16/2013 10:10 AM
Hydraulic Cylinder Simulation
Target and Actual Positions and Velocities 15
20 10 15 5 10 0 5
0
0
0.5
1
1.5
2
2.5
3
Target and Actual Velocity in in/sec
Target and Actual Position in inches
25
5
Time Target Position Actual Position Target Velocity Actual Velocity Control Output -10 to 10 Ki = 0.5
Integrator gain
Kp = 0.1
Proportional gain
Kd = 0.001
Derivative gain
Kv_ext = 0.016
Velocity feed forward extend
Kv_ret = 0.022
Velocity
Ka = 0.00018
Acceleration feed forward
∑
(r(n⋅∆t , MoveTime , MoveDist)0 − xn) N
2
= 0.002674
Normalized sum of squared errors. Adjust gains to minimize
n
(c) 2010 Delta Computer Systems, Inc.
26/27
1/16/2013 10:10 AM
Hydraulic Cylinder Simulation
(c) 2010 Delta Computer Systems, Inc.
27/27
1/16/2013 10:10 AM