SimHydraulics-User S Guide PDF
SimHydraulics-User S Guide PDF
User's Guide
R2015a
How to Contact MathWorks
Phone: 508-647-7000
Getting Started
1
SimHydraulics Product Description . . . . . . . . . . . . . . . . . . . . 1-2
Key Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
v
Creating and Simulating a Simple Hydraulic Model . . . . . . . 2-9
Building a SimHydraulics Diagram . . . . . . . . . . . . . . . . . . . . 2-9
Modifying Initial Settings . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16
Running the Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-20
Adjusting the Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . 2-22
vi Contents
1
Getting Started
SimHydraulics models can be used to develop control systems and test system-level
performance. You can parameterize your models using MATLAB® variables and
expressions, and design control systems for your hydraulic system in Simulink®. You
can add electrical, mechanical, pneumatic, and other components to your hydraulic
model using Simscape™ and test them in a single simulation environment. To deploy
models to other simulation environments, including hardware-in-the-loop (HIL) systems,
SimHydraulics supports C-code generation.
Key Features
• Pump models, including centrifugal, jet, and axial-piston pumps
• Directional valve models, including check valves and common configurations for 2-, 4-,
and 6-way valves
• Flow and pressure control valve models, including ball, poppet, and pressure relief
valves
• Translational and rotational actuator models, including optional friction and
centrifugal forces
• Tank and pipe models with elevation effects for modeling fluid transportation systems
• Customizable library of common hydraulic fluids
• Ability to extend component libraries using the Simscape language
• Support for C-code generation
1-2
SimHydraulics Assumptions and Limitations
1-3
1 Getting Started
Simulation Basics
SimHydraulics software gives you multiple ways to simulate and analyze hydraulic
power and control systems in the Simulink environment. Running a hydraulic simulation
is similar to running a simulation of any other Simscape model. See “Simulation” in the
Simscape documentation for a discussion of the following topics:
All these aspects of simulating SimHydraulics models are exactly the same as for
Simscape models.
Selecting a Solver
SimHydraulics software supports all of the continuous-time solvers that Simscape
supports. For more information, see “Setting Up Solvers for Physical Models” in the
Simscape documentation.
You can select any of the supported solvers for running a SimHydraulics simulation.
The variable-step solvers, ode23t and ode15s, are recommended for most applications
because they run faster and work better for systems with a range of both fast and slow
dynamics.
To use Simulink Coder™ software to generate standalone C or C++ code from your
model, you must use the ode14x solver. For more information about code generation, see
“Code Generation” in the Simscape documentation.
1-4
Simulating Hydraulic Models
In most cases, the default tolerance values produce accurate results without sacrificing
unnecessary simulation time. The parameter value that is most likely to be inappropriate
for your simulation is Max step size, because the default value, auto, depends on the
simulation start and stop times rather than on the amount by which the signals are
changing during the simulation. If you are concerned about the solver missing significant
behavior, change the parameter to prevent the solver from taking too large a step.
The Simulink documentation describes the following parameters in more detail and
provides tips on how to adjust them:
• “Relative tolerance”
• “Absolute tolerance”
• “Max step size”
The Solver Configuration block reference page in the Simscape documentation explains
when to adjust the Constraint Residual Tolerance parameter value.
If you see that your model displays physically unattainable values during simulation,
you must analyze your model and iteratively modify your design to smooth out the
irregularities.
1-5
1 Getting Started
You can set your models to either warn or stop simulating with an error when absolute
pressure in a hydraulic chamber falls below absolute zero. The default behavior is to stop
simulation with an error. You can change this by using the Hydraulic Fluid block or the
Custom Hydraulic Fluid block connected to the loop, and have the simulation continue
with a warning. See the block reference pages for details.
• Review the model configuration. If your error message contains a list of blocks, look at
these blocks first. Also look for:
• Wrong connections — Verify that the model makes sense as a hydraulic system.
For example, look for accumulators connected to the pump outlet without check
valves; cylinders connected against each other, so that they try to move in opposite
directions; directional valves bypassed by a huge orifice, and so on.
• Wrong use of hydraulic elements — SimHydraulics blocks model their respective
hydraulic units within certain limits. For example, an Ideal Pressure Source block
can simulate a pump only when the pressure remains constant (see “Modeling
Power Units”). Similarly, the Pressure Relief Valve block is a steady-state
representation of a real valve. A block may exhibit wrong behavior if it is placed
in the wrong environment. Always check the validity of the model for a particular
environment and the simulation objectives.
• Avoid portions of the system getting isolated from the main system. An isolated or
"hanging" part of the system could affect computational efficiency and even cause
failure of computation. Use the Leakage Area parameter, introduced specifically for
this purpose, to maintain numerical integrity of the circuit. This parameter is present
in all the directional valve blocks, pressure control and flow control valve blocks, and
most of the variable orifices.
• Avoid "dry" nodes in a hydraulic system. By adding a hydraulic chamber to a node,
you can considerably improve the convergence and computational efficiency of a
model. Adding a chamber adds a degree of freedom. By adding a chamber, you
replace a complex algebraic constraint (the dry node) by a dynamic constraint. In
the mechanical domain, this is like replacing an ideal gearbox with a gearbox that
includes compliance (spring and damper). The hydraulic chamber is represented by
1-6
Simulating Hydraulic Models
the Constant Volume Hydraulic Chamber block in the Simscape Hydraulic Elements
library.
MathWorks recommends that you build, simulate, and test your model incrementally.
Start with an idealized, simplified model of your system, simulate it, verify that it works
the way you expected. Then incrementally make your model more realistic, factoring
in effects such as fluid compressibility, fluid inertia, and the other things that describe
real-world phenomena. Simulate and test your model at every incremental step. Use
subsystems to capture the model hierarchy, and simulate and test your subsystems
separately before testing the whole model configuration. This approach helps you keep
your models well organized and makes it easier to troubleshoot them.
1-7
1 Getting Started
Model Sharing
The Simscape Editing Mode functionality lets you open, simulate, and save models that
contain blocks from add-on products, including SimHydraulics blocks, in Restricted
mode, without checking out add-on product licenses, as long as the products are installed
on your machine.
This functionality allows a user, model developer, to build a model that uses Simscape
and SimHydraulics blocks and share that model with other users, model users. When
building the model in Full mode, the model developer must have both a Simscape license
and a SimHydraulics license. Once the model is built, model users need only to check
out a Simscape license to simulate the model and fine-tune its parameters in Restricted
mode. As long as no structural changes are made to the model, model users can work in
Restricted mode and do not need to check out SimHydraulics licenses.
Another workflow lets multiple users, who all have Simscape licenses, share a
small number of SimHydraulics licenses by working mostly in Restricted mode, and
temporarily switching models to Full mode only when they need to perform a specific
design task that requires being in Full mode.
1-8
2
In this section...
“Library Structure Overview” on page 2-2
“Using the Simulink Library Browser to Access the Block Libraries” on page 2-2
“Using the Command Prompt to Access the Block Libraries” on page 2-3
You can combine all these blocks in your SimHydraulics diagrams to model hydraulic
systems. You can also use the basic Simulink blocks in your diagrams, such as sources or
scopes. See “Connecting Simscape Diagrams to Simulink Sources and Scopes” for more
information on how to do this.
2-2
SimHydraulics Block Libraries
• To open just the SimHydraulics library, type sh_lib in the MATLAB Command
Window.
• To open the Simscape library (to access the utility blocks, as well as hydraulic sources,
sensors, and other Foundation library blocks), type simscape in the MATLAB
Command Window.
• To open the main Simulink library (to access generic Simulink blocks), type
simulink in the MATLAB Command Window.
The SimHydraulics library consists of nine top-level libraries, as shown in the following
illustration. Some of these libraries contain second-level sublibraries. You can expand
each library by double-clicking its icon.
2-3
2 Modeling Hydraulic Systems
2-4
Modeling Hydraulic Power and Control Systems
For more information about modeling the physical system, see “Essential Hydraulic
Modeling Techniques” on page 2-6. For specific modeling techniques, see
category-specific topics like “Modeling Power Units” on page 2-27 or “Modeling
Low-Pressure Fluid Transportation Systems” on page 2-44.
2 Define component data by specifying hydraulic or mechanical properties as defined
on a datasheet.
For more information about parameterizing blocks, see individual block reference
pages. For information on valve parameterization, see “Modeling Directional Valves”
on page 2-31.
3 Configure the solver options.
For more information about the settings that most affect the solution of a physical
system, see “Setting Up Solvers for Physical Models” in the Simscape documentation.
4 Run the simulation.
2-5
2 Modeling Hydraulic Systems
The rules that you must follow when building a hydraulic model are described in “Basic
Principles of Modeling Physical Networks” in the Simscape documentation. This section
briefly reviews these rules.
2-6
Essential Hydraulic Modeling Techniques
Through variable (such as flow rate or torque) transferred along the Physical
connection line is divided among the multiple components connected by the branches.
How the Through variable is divided is determined by the system dynamics.
For each Through variable, the sum of all its values flowing into a branch point equals
the sum of all its values flowing out.
• You can connect Physical Signal ports to other Physical Signal ports with regular
connection lines, similar to Simulink signal connections. These connection lines carry
physical signals between SimHydraulics blocks.
• You can connect Physical Signal ports to Simulink ports through special converter
blocks. Use the Simulink-PS Converter block to connect Simulink outports to Physical
Signal inports. Use the PS-Simulink Converter block to connect Physical Signal
outports to Simulink inports.
• Unlike Simulink signals, which are essentially unitless, Physical Signals can have
units associated with them. SimHydraulics block dialogs let you specify the units
along with the parameter values, where appropriate. Use the converter blocks to
associate units with an input signal and to specify the desired output signal units.
For examples of applying these rules when creating an actual hydraulic model, see
“Creating and Simulating a Simple Hydraulic Model” on page 2-9.
MathWorks recommends that you build, simulate, and test your model incrementally.
Start with an idealized, simplified model of your system, simulate it, verify that it works
the way you expected. Then incrementally make your model more realistic, factoring in
effects such as friction loss, motor shaft compliance, hard stops, and the other things that
describe real-world phenomena. Simulate and test your model at every incremental step.
Use subsystems to capture the model hierarchy, and simulate and test your subsystems
separately before testing the whole model configuration. This approach helps you keep
your models well organized and makes it easier to troubleshoot them.
2-7
2 Modeling Hydraulic Systems
Each topologically distinct hydraulic circuit in a diagram requires exactly one hydraulic
fluid to be associated with it. You can specify the fluid by connecting a Hydraulic Fluid
block or Custom Hydraulic Fluid block to the circuit.
• The Custom Hydraulic Fluid block, available in the Simscape Foundation library, lets
you directly specify the fluid properties, such as fluid density, kinematic viscosity,
bulk modulus, and the amount of entrapped air, in the block dialog.
• The Hydraulic Fluid block lets you select a type of fluid from a predefined list and
specify the amount of entrapped air and fluid temperature. SimHydraulics software
determines the fluid properties associated with this type of fluid and these conditions,
and displays them in the block dialog.
In both cases, SimHydraulics software then applies the fluid properties as global
parameters to all the blocks in the hydraulic circuit.
Note If no Hydraulic Fluid block or Custom Hydraulic Fluid block is attached to a circuit,
the hydraulic blocks in this circuit use the default fluid, which is equivalent to fluid
defined by a Custom Hydraulic Fluid block with the default parameter values. See the
Custom Hydraulic Fluid block reference page for more information.
2-8
Creating and Simulating a Simple Hydraulic Model
The following schematic represents the model you are about to build. It contains a
single-acting hydraulic cylinder, which is controlled by an electrically operated 3-way
directional valve. The cylinder drives a load consisting of a mass, viscous friction, and
preloaded spring.
2-9
2 Modeling Hydraulic Systems
The power unit consists of a motor, a positive-displacement pump, and a pressure relief
valve. Depending on its characteristics, such a power unit can be modeled in a variety
of ways, as described in “Modeling Power Units” on page 2-27. In this example, the
pump unit is assumed to be powerful enough to maintain constant pressure at the valve
inlet. Therefore, we are going to represent it in the diagram by a Hydraulic Pressure
Source block.
Note Alternately, you can type ssc_new at the MATLAB Command prompt, to
create a new model prepopulated with certain required and commonly-used blocks.
For more information, see “Creating a New Simscape Model”.
3 Open the Simscape > Foundation Library > Hydraulic > Hydraulic Sources library
and drag the Hydraulic Pressure Source block into the model window.
4 Open the Simscape > SimHydraulics > Hydraulic Cylinders library and place the
Single-Acting Hydraulic Cylinder block into the model window.
5 To model the valve, open the Simscape > SimHydraulics > Valves library. Place the
3-Way Directional Valve block, found in the Directional Valves sublibrary, and the
2-Position Valve Actuator block, found in the Valve Actuators sublibrary, into the
model window.
6 Connect the blocks as shown in the following illustration.
2-10
Creating and Simulating a Simple Hydraulic Model
7 Ports T of the Hydraulic Pressure Source and 3-Way Directional Valve blocks have
to be connected to the tank, at atmospheric pressure. To model this connection, open
the Simscape > Foundation Library > Hydraulic > Hydraulic Elements library and
add the Hydraulic Reference block to your diagram, as shown below. To do this,
connect the only port of the Hydraulic Reference block to port T of the Hydraulic
Pressure Source block, then right-click this connection line to create a branching
point, and connect this point to port T of the 3-Way Directional Valve block.
2-11
2 Modeling Hydraulic Systems
8 Model the mechanical load for the cylinder. Open the Simscape > Foundation Library
> Mechanical > Translational Elements library and add the Mass, Translational
Spring, Translational Damper, and three Mechanical Translational Reference blocks
to your diagram.
To indicate that the cylinder case is fixed, connect port C of the Single-Acting
Hydraulic Cylinder block to one of the Mechanical Translational Reference blocks. To
rotate the Mechanical Translational Reference block, select it and press Ctrl+R. You
can also shorten the block name to MTR to make the diagram easier to read.
Connect the other blocks to port R of the Single-Acting Hydraulic Cylinder block, as
shown below.
2-12
Creating and Simulating a Simple Hydraulic Model
9 Now you need to add the sources and scopes. They are found in the regular Simulink
libraries. Open the Simulink > Sources library and copy the Constant block and the
Sine Wave block into the model. Then open the Simulink > Sinks library and copy
two Scope blocks. Rename one of the Scope blocks to Valve. It will monitor the valve
opening based on the input signal variation. The other Scope block will monitor the
position of the cylinder rod; rename it to Position.
2-13
2 Modeling Hydraulic Systems
10
Double-click the Valve scope to open it. In the scope window, click to access
the scope parameters, change Number of axes to 2, then click the Layout button,
select the vertical layout (two squares on top of each other), and click OK. The scope
window now displays two sets of axes, and the Valve scope in the diagram has two
input ports.
11 Every time you connect a Simulink source or scope to a SimHydraulics diagram, you
have to use an appropriate converter block, to convert Simulink signals into physical
signals and vice versa. Open the Simscape > Utilities library and copy two Simulink-
PS Converter blocks and two PS-Simulink Converter blocks into the model. Connect
the blocks as shown below.
2-14
Creating and Simulating a Simple Hydraulic Model
12 To specify the fluid properties, add the Hydraulic Fluid block, found in the Simscape
> SimHydraulics > Hydraulic Utilities library, to your diagram. You can add
this block anywhere on the hydraulic circuit by creating a branching point and
connecting it to the only port of the Hydraulic Fluid block.
13 Each topologically distinct physical network in a diagram requires exactly one Solver
Configuration block, found in the Simscape > Utilities library. Copy this block into
your model and connect it to the circuit, similar to the Hydraulic Fluid block. Your
diagram now should look like this.
2-15
2 Modeling Hydraulic Systems
1 Select a Simulink solver. On the top menu bar of the model window, select
Simulation > Model Configuration Parameters. The Configuration Parameters
dialog box opens, showing the Solver node.
2-16
Creating and Simulating a Simple Hydraulic Model
Also note that Simulation time is specified to be between 0 and 10 seconds. You can
adjust this setting later, if needed.
2-17
2 Modeling Hydraulic Systems
2-18
Creating and Simulating a Simple Hydraulic Model
4 Specify a realistic value for the pressure input signal. Double-click the Constant
block, enter 10e5 in the Constant value text box, and click OK.
5 Open the 2-Position Valve Actuator block and note that its Nominal Signal Value
parameter is set to 24.
6 Double-click the Sine Wave block and change its Amplitude to a value greater than
50% of the nominal signal value for the 2-Position Valve Actuator block, for example,
to 20.
7 Adjust the 3-Way Directional Valve block parameters as shown below.
2-19
2 Modeling Hydraulic Systems
9 Double-click the Mass block and change its Mass to 4.5 kg.
10 Double-click the Translational Damper block, which models the viscous friction, and
change its Damping coefficient to 250 N/(m/s).
11 Double-click the Translational Spring block. Set its Spring rate to 6e3 N/m and
Initial deformation to 0.02 m.
12 Save the model.
1 The input signal for the valve opening is provided by the Sine Wave block. The Valve
scope reflects both the input signal and the valve opening as functions of time. The
2-20
Creating and Simulating a Simple Hydraulic Model
Position scope outputs the cylinder rod displacement as a function of time. Double-
click both scopes to open them.
2
To run the simulation, click in the model window toolbar. The physical
modeling solver evaluates the model, calculates the initial conditions, and runs the
simulation. For a detailed description of this process, see “How Simscape Simulation
Works”. Completion of this step may take a few seconds. The message in the bottom-
left corner of the model window provides the status update.
3 Once the simulation starts running, the Valve and Position scope windows display
the simulation results, as shown in the next illustration.
2-21
2 Modeling Hydraulic Systems
In the beginning, the valve is closed. Then, as the input signal reaches 50% of the
actuator's nominal signal, the valve gradually opens to its maximum value and
moves the cylinder rod in the positive direction. When the input signal goes below
50% of the nominal signal, the actuator closes the valve. The spring returns the
cylinder rod to its initial position.
You can now adjust various inputs and block parameters and see their effect on the valve
opening profile and the cylinder rod displacement.
2-22
Creating and Simulating a Simple Hydraulic Model
1 Double-click the Sine Wave block, enter 40 in the Amplitude text box, and click OK.
2 Run the simulation. The simulation results are shown in the following illustration.
With the increase in the input signal amplitude, it reaches 50% of the actuator's
nominal signal sooner, and the valve stays open longer, which in turn affects the
cylinder rod position.
2-23
2 Modeling Hydraulic Systems
In our model, the cylinder drives a load consisting of a mass, viscous friction, and
preloaded spring. This example shows how a change in the spring stiffness affects the
cylinder rod displacement.
1 Double-click the Translational Spring block. Set its Spring rate to 12e3 N/m.
2 Run the simulation. The valve opening profile is not affected, but increase in spring
stiffness results in smaller amplitude of cylinder rod displacement, as shown in the
following illustration.
2-24
Creating and Simulating a Simple Hydraulic Model
In our model, we have used the PS-Simulink Converter block in its default parameter
configuration, which does not specify units. Therefore, the Position scope outputs the
cylinder rod displacement in the units specified for the parameters of the Single-Acting
Hydraulic Cylinder block; in this case, in meters. This example shows how to change the
output units for the cylinder rod displacement to millimeters.
1 Double-click the PS-Simulink Converter block. Type mm in the Output signal unit
text box and click OK.
2
Run the simulation. In the Position scope window, click to autoscale the scope
axes. The cylinder rod displacement is now output in millimeters, as shown in the
following illustration.
2-25
2 Modeling Hydraulic Systems
2-26
Modeling Power Units
In developing a model of a power unit, you must reach a compromise between the
robustness, speed of simulation, and accuracy, meaning that the model should be as
simple as possible to provide acceptable accuracy within the working range of variable
parameters.
The first option is to simulate a power unit literally, as it is, reproducing all its
components. This approach is illustrated in the Power Unit with Fixed-Displacement
Pump example. The power unit consists of a fixed-displacement pump, which is driven
by a motor through a compliant transmission, a pressure-relief valve, and a variable
orifice, which simulates system fluid consumption. The motor model is represented as a
source of angular velocity rotating shaft at 188 rad/s at zero torque. The load on the shaft
decreases the velocity with a slip coefficient of 1.2 (rad/s)/Nm. The load on the driving
2-27
2 Modeling Hydraulic Systems
shaft is measured with the torque sensor. The shaft between the motor and the pump is
assumed to be compliant and simulated with rotational spring and damper.
The simulation starts with the variable orifice opened, which results in a low system
pressure and the maximum flow rate going to the system. The orifice starts closing at
0.5 s, and is closed completely at 3 s. The output pressure builds up until it reaches the
pressure setting of the relief valve (75e5 Pa) and is maintained at this level by the valve.
At 3 s, the variable orifice starts opening, thus returning system to its initial state.
You can implement a considerably more complex model of a prime mover by following
the pattern used in the example. For instance, the shaft can be represented with
multiple segments and intermediate bearings. The model of a prime mover can be more
comprehensive, accounting for its type (DC or AC electric motor, diesel or gasoline
engine), characteristics, control type, and so on. In addition, a complex mechanical
transmission driven by a diesel or gasoline internal combustion engine modeled using
SimDriveline™ software can be combined with the SimHydraulics model of the hydraulic
portion of a power unit.
Depending on your particular application, you may be able to simplify the model of a
power unit practically without a loss in accuracy. The main factors to be considered in
this process are the driving shaft angular velocity variation magnitude and the system
pressure variation range. If the prime mover angular velocity remains practically
constant during simulated time or varies insignificantly with respect to its steady-state
value, the entire driving shaft subsystem can be replaced with the Ideal Angular Velocity
Source block, whose output is set to the steady-state value, as it is shown in the following
illustration.
2-28
Modeling Power Units
Using the Ideal Angular Velocity Source Block in Modeling Power Units
Furthermore, if pump delivery exceeds the system's fluid requirements at all times, the
pump output pressure remains practically constant and close to the pressure setting
of the pressure-relief valve. If this assumption is true and acceptable, the entire power
unit can be reduced to an ideal Hydraulic Pressure Source block, as shown in the next
illustration.
2-29
2 Modeling Hydraulic Systems
The two previous examples demonstrate that the use of ideal sources is a powerful means
of reducing the complexity of models. However, you should exercise extreme caution
every time you use an ideal source instead of a real pump. The substitution is possible
only if there is an assurance that the controlled parameter (angular velocity in the first
example, and pressure in the second example) remains constant. If this is not the case,
the power unit represented with an ideal source will generate considerably more power
than its simulated physical counterpart, thus making the simulation results incorrect.
2-30
Modeling Directional Valves
2-31
2 Modeling Hydraulic Systems
Throughout SimHydraulics libraries, hydraulic ports are identified with the following
symbols:
• P — Pressure port
• T — Return (tank) port
• A, B — Actuator ports
• X, Y — Pilot or control ports
The basic 4-Way Directional Valve block lets you model eleven most popular
configurations by changing the initial openings of the orifices, as shown in the following
table.
2-32
Modeling Directional Valves
2-33
2 Modeling Hydraulic Systems
The other nine configurations are covered by the remaining 4-way directional valve
blocks (A through K), as shown in the next table.
2-34
Modeling Directional Valves
2-35
2 Modeling Hydraulic Systems
These configurations cover a substantial portion of real valves, but the directional valves
family is so diverse as to make it practically impossible to have a library model for
every member. Instead, SimHydraulics libraries offer a set of building blocks that is
comprehensive enough to build a model for any real configuration. This section describes
the rules of building a custom model of a directional valve.
All directional valve models are built of variable orifices. In SimHydraulics libraries, the
following variable orifice models are available:
• Annular Orifice
• Orifice with Variable Area Round Holes
2-36
Modeling Directional Valves
To simplify the way variable orifices are combined in a model, their instantaneous
opening is computed in the same way for all types of orifices. The orifice opening is
always computed in the direction the spool, or any other control member, opens the
orifice. In other words, positive value of the opening corresponds to open orifice, while
negative value denotes overlapped, or closed, orifice. The origin always corresponds to
zero-lap position, when the edge of the control member coincides with the edge of the
orifice. In the illustration below, origins are marked with 0 for the orifice with variable
area round holes (schematic on the left) and for the orifice with variable slot (schematic
on the right). The x arrow denotes the direction in which orifice opening is measured in
both cases.
h = x0 + xsp i or
2-37
2 Modeling Hydraulic Systems
where
The number of variable orifices and the way they are connected are determined by the
valve design. Usually, the model of a valve mimics the physical layout of a real valve.
The illustration below shows an example of a 4-way valve, its symbol, and an equivalent
circuit of its SimHydraulics model.
2-38
Modeling Directional Valves
The 4-way valve in its simplest form is built of four variable orifices. In the equivalent
circuit, they are named P_A, P_B, A_T, and B_T. The Variable Orifice block, which is
the most generic model of a variable orifice in the SimHydraulics libraries, is used in
this particular example. You can use any other variable orifice blocks if the real valve
design employs a configuration backed by a stock model, such as an orifice with round
holes or rectangular slots, poppet, ball, or needle. In general, all orifices in the model
can be simulated with different blocks or with the same block, but with different way of
parameterization. For instance, two orifices can be represented by their pressure-flow
characteristics, while two others can be simulated with the table-specified area variation
option (for details, see the Variable Orifice block reference page).
The next example shows another configuration of a 4-way directional valve. This valve
unloads the pump in neutral position and requires six variable orifice blocks. The Orifice
with Variable Area Round Holes blocks have been used as a variable orifice in this model.
Port T1 corresponds to an intermediate point between ports P and T.
2-39
2 Modeling Hydraulic Systems
2-40
Modeling Directional Valves
cylinders are controlled by custom 3-position, 5-way valves, developed for this particular
application. The valves are designed in such a way that the pump delivery is diverted
to tank (unloaded) if both cylinders are commanded to be in neutral position. The pump
is disconnected from the tank if either of the two control valves is shifted from neutral
position.
To develop a model, the physical version of the valve must be created first. The following
illustration shows one of the possible configurations of the valve.
2-41
2 Modeling Hydraulic Systems
The SimHydraulics model, shown below, is an exact copy of the physical valve
configuration.
2-42
Modeling Directional Valves
All the orifices in the model are closed (overlapped) in valve neutral position, except
orifices P_T1_1 and P_T1_2. These two orifices should be set open to an extent that
allows pump delivery to be discharged at low pressure.
2-43
2 Modeling Hydraulic Systems
How Fluid Transportation Systems Differ from Power and Control Systems
In hydraulics, the steady uniform flow in a component with one entrance and one exit is
characterized by the following energy equation
where
&
m Mass flow rate
V2 Fluid velocity at the exit
V1 Fluid velocity at the entrance
p1, p2 Static pressure at the entrance and the exit, respectively
g Gravity acceleration
ρ Fluid density
z1, z2 Elevation above a reference plane (datum) at the entrance and the exit,
respectively
hL Hydraulic loss
Subscripts 1 and 2 refer to the entrance and exit, respectively. All the terms in
Equation 2-1 have dimensions of height and are named kinematic head, piezometric
head, geometric head, and loss head, respectively. For a variety of reasons, analysis of
hydraulic power and control systems is performed with respect to pressures, rather than
to heads, and Equation 2-1 for a typical passive component is presented in the form
2-44
Modeling Low-Pressure Fluid Transportation Systems
r 2 r
V1 + p1 + rgz1 = V22 + p2 + rgz2 + pL
2 2
where
V1, p1, z1 Velocity, static pressure, and elevation at the entrance, respectively
V2, p2, z2 Velocity, static pressure, and elevation at the exit, respectively
pL Pressure loss
p1 + rgz1 = p2 + rgz2 + pL
The size of a typical power and control system is usually small and rarely exceeds 1.5
– 2 m. To add to this, these systems operate at pressures in the range 50 – 300 bar.
Therefore, rgz terms are negligibly small compared to static pressures. As a result,
SimHydraulics components (with the exception of the ones designed specifically for
low-pressure simulation, described in “Available Blocks and How to Use Them ” on
page 2-46) have been developed with respect to static pressures, with the following
equations
p = pL = f ( q)
q = f ( p1 , p2 )
where
Fluid transportation systems usually operate at low pressures (about 2-4 bar), and the
difference in component elevation with respect to reference plane can be very large.
Therefore, geometrical head becomes an essential part of the energy balance and must
be accounted for. In other words, the low-pressure fluid transportation systems must
2-45
2 Modeling Hydraulic Systems
be simulated with respect to piezometric pressures ppz = p + rgz , rather than static
pressures. This requirement is reflected in the component equations
p = pL = f ( q, z1 , z2 )
q = f ( p1 , p2 , z1 , z2 )
• You can build models of low-pressure systems with difference in elevations of their
components using regular SimHydraulics blocks, with the exception of the pipes. Use
low-pressure pipes, described in “Available Blocks and How to Use Them ” on page
2-46 .
• When modeling low-pressure systems, you must use low-pressure pipe blocks to
connect all nodes with difference in elevation, because these are the only blocks that
provide information about the vertical locations of the system parts. Nodes connected
with any other blocks, such as valves, orifices, actuators, and so on, will be treated as
if they have the same elevation.
• Resistive Pipe LP — Models hydraulic pipe with circular and noncircular cross
sections and accounts for friction loss only, similar to the Resistive Tube block,
available in the Simscape Foundation library.
• Resistive Pipe LP with Variable Elevation — Models hydraulic pipe with circular and
noncircular cross sections and accounts for friction losses and variable port elevations.
Use this block for low-pressure system simulation in which the pipe ends change their
positions with respect to the reference plane.
2-46
Modeling Low-Pressure Fluid Transportation Systems
Use these low-pressure pipe blocks to connect all hydraulic nodes in your model with
difference in elevation, because these are the only blocks that provide information about
the vertical location of the ports. Nodes connected with any other blocks, such as valves,
orifices, actuators, and so on, will be treated as if they have the same elevation.
The additional models of pressurized tanks available for low-pressure system simulation
include:
2-47
2 Modeling Hydraulic Systems
pressure loss coefficient at each outlet. The block computes the volume of fluid in the
tank and exports it outside through the physical signal port V.
• Variable Head Three-Arm Tank — Represents a three-arm pressurized tank, in
which fluid is stored under a specified pressure. The pressurization remains constant
regardless of volume change. The block accounts for the fluid level change caused by
the volume variation, as well as for pressure loss in the connecting pipes that can be
caused by a filter, fittings, or some other local resistance. The loss is specified with the
pressure loss coefficient at each outlet. The block computes the volume of fluid in the
tank and exports it outside through the physical signal port V.
2-48
Modeling Low-Pressure Fluid Transportation Systems
The models of tanks account for the fluid level heights F1, F2, and F3, respectively, and
represent pressure at their bottoms as
pi = rgFi for i = 1, 2, 3
The components inside the manifold can be simulated with regular SimHydraulics
blocks, like you would use for hydraulic power and control systems simulation. The
pipes must be simulated with one of the low-pressure pipe models: Resistive Pipe
LP, Hydraulic Pipe LP, or Segmented Pipe LP, depending on the required extent of
idealization. Use the Constant Head Tank or Variable Head Tank blocks to simulate
the tanks. For details of implementation, see the Water Supply System and the Fluid
Transportation System with Three Tanks examples.
2-49