ObjectConnectorHydraulicActuatorSimple

A basic hydraulic actuator with pressure build up equations. The actuator follows a valve input value, which results in a in- or outflow of fluid depending on the pressure difference. Valve values can be prescribed by user functions (not yet available) or with the MainSystem PreStepUserFunction(...).

Interface

Parameters

The parameters of the item; in a dictionary, its type is ‘ConnectorHydraulicActuatorSimple’:

name

type

size

default

description

name

String

‘’

connector’s unique name

markerNumbers

ArrayMarkerIndex

[ invalid (-1), invalid (-1) ]

(symbol: \([m0,m1]\tp\)) list of markers used in connector

nodeNumbers

ArrayNodeIndex

[]

(symbol: \(\mathbf{n}_n = [n_{ODE1}]\tp\)) currently a list with one node number of NodeGenericODE1 for 2 hydraulic pressures (reference values for this node must be zero); data node may be added in future for switching

offsetLength

UReal

0.

(symbol: \(L_o\)) offset length [SI:m] of cylinder, representing minimal distance between the two bushings at stroke=0

strokeLength

PReal

0.

(symbol: \(L_s\)) stroke length [SI:m] of cylinder, representing maximum extension relative to \(L_o\); the measured distance between the markers is \(L_s+L_o\); must be given: the default is only a placeholder

chamberCrossSection0

PReal

0.

(symbol: \(A_0\)) cross section [SI:m\(^2\)] of chamber (inner cylinder) at piston head (nut) side (0); must be given: the default is only a placeholder

chamberCrossSection1

PReal

0.

(symbol: \(A_1\)) cross section [SI:m\(^2\)] of chamber at piston rod side (1); usually smaller than chamberCrossSection0; must be given: the default is only a placeholder

hoseVolume0

PReal

0.

(symbol: \(V_{h,0}\)) hose volume [SI:m\(^3\)] at piston head (nut) side (0); as the effective bulk modulus would go to infinity at stroke length zero, the hose volume must be greater than zero; must be given: the default is only a placeholder

hoseVolume1

PReal

0.

(symbol: \(V_{h,1}\)) hose volume [SI:m\(^3\)] at piston rod side (1); as the effective bulk modulus would go to infinity at max. stroke length, the hose volume must be greater than zero; must be given: the default is only a placeholder

valveOpening0

Real

0.

(symbol: \(A_{v,0}\)) relative opening of valve \([-1 \ldots 1]\) [SI:1] at piston head (nut) side (0); positive value is valve opening towards system pressure, negative value is valve opening towards tank pressure; zero means closed valve

valveOpening1

Real

0.

(symbol: \(A_{v,1}\)) relative opening of valve \([-1 \ldots 1]\) [SI:1] at piston rod side (1); positive value is valve opening towards system pressure, negative value is valve opening towards tank pressure; zero means closed valve

actuatorDamping

UReal

0.

(symbol: \(d_{HA}\)) damping [SI:N/(m\(\,\)s)] of hydraulic actuator (against actuator axial velocity)

oilBulkModulus

PReal

0.

(symbol: \(K_{oil}\)) bulk modulus of oil [SI:N/(m\(^2\))]; must be given: the default is only a placeholder

cylinderBulkModulus

UReal

0.

(symbol: \(K_{cyl}\)) bulk modulus of cylinder [SI:N/(m\(^2\))]; in fact, this is value represents the effect of the cylinder stiffness on the effective bulk modulus

hoseBulkModulus

UReal

0.

(symbol: \(K_{hose}\)) bulk modulus of hose [SI:N/(m\(^2\))]; in fact, this is value represents the effect of the hose stiffness on the effective bulk modulus

nominalFlow

PReal

0.

(symbol: \(Q_n\)) nominal flow of oil through valve [SI:m\(^3\)/s]; must be given: the default is only a placeholder

systemPressure

Real

0.

(symbol: \(p_s\)) system pressure [SI:N/(m\(^2\))]

tankPressure

Real

0.

(symbol: \(p_t\)) tank pressure [SI:N/(m\(^2\))]

useChamberVolumeChange

Bool

False

if True, the pressure build up equations include the change of oil stiffness due to change of chamber volume

activeConnector

Bool

True

flag, which determines, if the connector is active; used to deactivate (temporarily) a connector or constraint

visualization

VObjectConnectorHydraulicActuatorSimple

parameters for visualization of item

Visualization parameters

The parameters of VObjectConnectorHydraulicActuatorSimple, given as visualization:

name

type

size

default

description

show

Bool

True

set true, if item is shown in visualization and false if it is not shown

cylinderRadius

float

0.05

radius for drawing of cylinder

rodRadius

float

0.03

radius for drawing of rod

pistonRadius

float

0.04

radius for drawing of piston (if drawn transparent)

pistonLength

float

0.001

radius for drawing of piston (if drawn transparent)

rodMountRadius

float

0.

radius for drawing of rod mount sphere

baseMountRadius

float

0.

radius for drawing of base mount sphere

baseMountLength

float

0.

radius for drawing of base mount sphere

colorCylinder

Float4

4

[-1.,-1.,-1.,-1.]

RGBA cylinder color; if R==-1, use default connector color

colorPiston

Float4

4

[0.8,0.8,0.8,1.]

RGBA piston color

Drawing

Drawn as all connectors; the cylinder and the piston of the given radii and lengths, with spheres at the mounts, in colorCylinder and colorPiston.

Settings beyond those of all connectors: general.cylinderTiling, general.sphereTiling.

Output variables

Available as OutputVariableType in sensors, Get...Output() and other functions:

output variable

symbol

description

Distance

\(L = \vert \Delta\! \LU{0}{\pv}\vert \)

distance between both marker points (usually the actuator bushings); current actuator length

Displacement

relative displacement between both marker points

Velocity

\(\Delta\! \LU{0}{\vv}\)

relative velocity between both points

VelocityLocal

\(\dot L\)

actuator velocity, the derivative of actuator length

Force

force in actuator resulting as the difference of both pressures times according cross sections

Detailed description

Definition of quantities

intermediate variables

symbol

description

marker m0 position

\(\LU{0}{\pv}_{m0}\)

current global position which is provided by marker m0

marker m1 position

\(\LU{0}{\pv}_{m1}\)

marker m0 velocity

\(\LU{0}{\vv}_{m0}\)

current global velocity which is provided by marker m0

marker m1 velocity

\(\LU{0}{\vv}_{m1}\)

Displacement

\(\Delta\! \LU{0}{\pv} = \LU{0}{\pv}_{m1} - \LU{0}{\pv}_{m0}\)

The relative vector between marker points, stored as Displacement in output variables

current actuator length

\(L = \vert\Delta\! \LU{0}{\pv}\vert\)

stored as Distance in output variables

time derivative of actuator length

\(\dot L = \Delta\! \LU{0}{\vv}\tp \vv_{f}\)

Velocity

\(\Delta\! \LU{0}{\vv} = \LU{0}{\vv}_{m1} - \LU{0}{\vv}_{m0}\)

The vectorial relative velocity

Force

\(\fv\)

see below

Connector forces

The unit vector in force direction reads (raises SysError if \(L=0\)),

\[ \vv_{f} = \frac{1}{L} \Delta\! \LU{0}{\pv} \]

The simple double-acting hydraulic actuator has two pressure chambers, one being denoted with 0 at the piston head (nut) and the other at the piston rod side denoted with 1. The pressure \(p_0\) acts at the piston head at area \(A_0\), while the pressure \(p_1\) counteracts on the opposite side with (usually smaller) area \(A_1\).

If activeConnector = True, the scalar actuator force (tension = positive) is computed as

\[ f_{HA} = -p_0 \cdot A_0 + p_1 \cdot A_1 + v \cdot d_HA \]

where \(v\) represents the actuator velocitiy and \(d_HA\) is the viscous damping coefficient.

The vector of the actuator force applied at both markers finally reads

\[ \fv = f_{HA}\vv_{f} \]

The virtual work of the connector force is computed from the virtual displacement

\[ \delta \Delta\! \LU{0}{\pv} = \delta \LU{0}{\pv}_{m1} - \delta \LU{0}{\pv}_{m0} \, , \]

and the virtual work (not the transposed version here, because the resulting generalized forces shall be a column vector),

\[ \delta W_{HA} = \fv \delta \Delta\! \LU{0}{\pv} \, . \]

Pressure build up equations

The hydraulics model consists of a double-acting piston. It follows the paper of RahikainenGonzalezNayaEtAl2020 except for the friction and the additional valve, which are not available here.

The hydraulic actuator contains internal states, namely pressures \(p_0\) and \(p_1\). The ODE1 for pressures follows for the the case of laminar flow, based on system and tank pressure, valve positions as well as the actuator velocity and position (only for change of volume).

The distance between the two marker points, which are usually the bushings or clevis mounts of the hydraulic cylinder, is denoted as \(L\). The stroke length \(s \in [0, L_s]\) is defined as

\[ s = L - L_o \]

such that at zero stroke, the actuator length is \(L_o\). The stroke velocity (positive value means extension) reads

\[ \dot s = \Delta\! \LU{0}{\vv\tp} \vv_{f} \]

If useChamberVolumeChange == True, the volume change due to stroke change will be considered for the volume related to the stiffness of the fluid. The cylinder volumes in chambers 0 and 1 are then

\[ V_{0,cur} = V_{h,0} + A_0 \cdot s, \quad V_{1,cur} = V_{h,1} + A_1 \cdot (L_s - s) \]

The effective bulk modulus for chamber \(k \in {0,1}\) is computed as follows,

(75)\[ K_{k,eff} = \frac{1}{ \frac{1}{K_{oil}} + \frac{V_{k,cur} - V_{h,k}}{V_{k,cur} \cdot K_{cyl}} + \frac{V_{h,k}}{V_{k,cur} \cdot K_{hose}} }, \]

where we use a slightly different approach from RahikainenGonzalezNayaEtAl2020 when computing the volume for the cylinder bulk modulus term for \(k=1\).

Note that in case of \(K_{cyl}=0\) and/or \(K_{hose}=0\), the according fractions in (75) are set to zero (which other wise would give infinity).

Otherwise, if useChamberVolumeChange == False, \(V_{0,cur}=V_{h,0}\), \(V_{1,cur}=V_{h,1}\) and \(K_{k,eff} = K_{oil}\) for chambers \(k \in {0,1}\).

The pressure equations (explicit ODE1) have the structure

\[ \vp{\dot p_0}{\dot p_1} = \vp{f_0(p_0, s, \dot s)}{f_1(p_1, s, \dot s)} \]

and follow for different cases and chambers / valves \(k=\{0,1\}\), based on the simple model where

  • \(A_{v,k} = 0\): valve k closed

  • \(A_{v,k} > 0\): valve k opened towards system pressure (pump)

  • \(A_{v,k} < 0\): valve k opened towards tank pressure

Thus, the following equations are used (while it would happen rarely in regular operation, the arguments of the square roots could become negative; thus, in the implementation we use \(\mathrm{sqrts}(x) = \mathrm{sign}(x) \cdot \sqrt{\mathrm{abs}(x)}\).):

\[ \dot p_0 = \frac{K_{0,eff}}{V_{0,cur}} \left( -A_0 \cdot \dot s + A_{v,0} \cdot Q_n \cdot \mathrm{sqrts}(p_s - p_0) \right) \quad \mathrm{if} \quad \mathrm A_{v,0} \ge 0 \]
\[ \dot p_0 = \frac{K_{0,eff}}{V_{0,cur}} \left( -A_0 \cdot \dot s + A_{v,0} \cdot Q_n \cdot \mathrm{sqrts}(p_0 - p_t) \right) \quad \mathrm{if} \quad \mathrm A_{v,0} < 0 \]
\[ \dot p_1 = \frac{K_{1,eff}}{V_{1,cur}} \left( A_1 \cdot \dot s + A_{v,1} \cdot Q_n \cdot \mathrm{sqrts}(p_s - p_1) \right) \quad \mathrm{if} \quad \mathrm A_{v,1} \ge 0 \]
\[ \dot p_1 = \frac{K_{1,eff}}{V_{1,cur}} \left( A_1 \cdot \dot s + A_{v,1} \cdot Q_n \cdot \mathrm{sqrts}(p_1 - p_t) \right) \quad \mathrm{if} \quad \mathrm A_{v,1} < 0 \]

Mini example

#a hydraulic cylinder between the ground and a mass, both valves closed: the oil in the two chambers
#is a spring; chamber pressures p0, p1 (a NodeGenericODE1) balance the weight
m = 100; A = 0.01; p1 = 1e5
p0 = (m*9.81 + p1*A)/A #the pressure that holds the weight
nMass = mbs.AddNode(NodePoint(referenceCoordinates=[0,1,0]))
mbs.AddObject(ObjectMassPoint(nodeNumber=nMass, mass=m))
mMass = mbs.AddMarker(MarkerNodePosition(nodeNumber=nMass))
mbs.AddLoad(LoadForceVector(markerNumber=mMass, loadVector=[0,-m*9.81,0]))
mBase = mbs.AddMarker(MarkerBodyPosition(bodyNumber=oGround, localPosition=[0,0,0]))
nPressures = mbs.AddNode(NodeGenericODE1(numberOfODE1Coordinates=2, referenceCoordinates=[0,0],
                                         initialCoordinates=[p0,p1]))
oCylinder = mbs.AddObject(ObjectConnectorHydraulicActuatorSimple(markerNumbers=[mBase, mMass],
              nodeNumbers=[nPressures], offsetLength=0.5, strokeLength=1,
              chamberCrossSection0=A, chamberCrossSection1=A, hoseVolume0=1e-3, hoseVolume1=1e-3,
              valveOpening0=0, valveOpening1=0, actuatorDamping=1e4, oilBulkModulus=1e9,
              nominalFlow=1e-4, systemPressure=2e7, tankPressure=0))

mbs.Assemble()
mbs.SolveDynamic()

#the mass stays where it is
exu.sys['testResult'] = mbs.GetObjectOutput(oCylinder, exu.OutputVariableType.Distance) #1

Relevant Examples (Ex) and TestModels (TM) with weblink to github: HydraulicActuator2Arms.py (Ex), HydraulicActuatorStaticInitialization.py (Ex), hydraulicActuatorSimpleTest.py (TM)