This tutorial shows how to model an isothermal hydraulic actuator using Simscape™ Fluids™ blocks. The actuator comprises a pump, a valve, and a cylinder. The pump provides power generation, the valve flow regulation, and the cylinder power conversion into mechanical translational form. A lumped mass-spring-damper system provides a simple model of the actuator load.
The figure shows a schematic of the complete actuator system. The model makes some simplifying assumptions. An ideal pressure source replaces the pump as a power source. Simple physical signal inputs replace the motor component and the control unit algorithm. The relief valve is unnecessary detail in this example and is ignored.
Hydraulic Actuator Schematic
The 3-way directional valve provides three ports and two control positions. The ports represent the cylinder, pump, and hydraulic reference inlets. The control position varies with the valve actuator input. Above 50% of the valve actuator nominal signal value, the valve opens the pump-cylinder flow path. The cylinder shaft extends against the actuator load. Below 50% of the valve actuator nominal signal value, the valve opens the cylinder-reservoir flow path. The cylinder shaft retracts under the action of the actuator load.
Directional Valve Positions
At the MATLAB® command prompt, enter
ssc_new. MATLAB opens
the Simscape model template. This template provides a starting
point for your Simscape Fluids model. Save the model often as
you add new blocks.
From the Hydraulics (Isothermal) > Hydraulic Utilities library, drag a Hydraulic Fluid block to the model canvas. This block defines the physical properties of the hydraulic fluid, including its density, viscosity, and bulk modulus.
Connect the Solver Configuration and Hydraulic Fluid blocks as shown in the figure. The Solver Configuration block provides Simscape solver settings for your model. Each topologically distinct physical network requires one such block.
From the Simscape > Foundation library, drag these blocks to the model canvas.
|Hydraulic Constant Pressure Source||Hydraulic > Hydraulic Sources|
|Hydraulic Reference||Hydraulic > Hydraulic Elements|
The pressure source represents the pump. The hydraulic reference represents the reservoir that the pump draws fluid from.
From the Simscape > Fluids library, drag these blocks to the model canvas.
|Single-Acting Hydraulic Cylinder||Hydraulics (Isothermal) > Hydraulic Cylinders|
|3-Way Directional Valve||Hydraulics (Isothermal) > Valves|
|2-Position Valve Actuator||Hydraulics (Isothermal) > Valves|
The hydraulic cylinder converts the hydraulic power generated by the pressure source into a mechanical translational form. The directional valve and valve actuator regulate the flow to the cylinder. In so doing, they control the mechanical power generated at the cylinder.
Connect the blocks as shown in the figure. The 3-Way Directional Valve and Hydraulic Constant Pressure Source blocks must both connect to the Hydraulic Reference block.
The block connections mirror the physical connections between the actual components. The cylinder connects to the valve, which connects to the pump, which in turn connects to the fluid reservoir.
In the 3-Way Directional Valve block
dialog box, set the Orifice A-T initial opening parameter
From the Simscape Multibody™ Foundation library, drag a Mechanical Translational Reference block. This block appears in the Mechanical > Translational Elements sublibrary.
Connect the Mechanical Translational Reference block to the Single-Acting Hydraulic Cylinder block as shown in the figure.
The connection line fixes the hydraulic cylinder casing, represented by port c, to a mechanical ground so that only the shaft, represented by port R, is capable of motion.
From the Simscape > Foundation > Mechanical > Translational Elements library, drag these blocks to the model canvas:
Connect the blocks as shown in the figure.
The mass, spring, and damper elements provide a simple model of the actuator load. The mass accounts for kinetic energy storage, the spring for potential energy storage, and the damper for viscous energy dissipation due to motion.
Connect the Sine Wave, Simulink-PS Converter, and 2-Position Valve Actuator blocks in series as shown in the figure.
The Sine Wave block provides a sinusoidal control input to the 2-Position Valve Actuator block. The Simulink-PS Converter block converts the sinusoidal input from a Simulink signal into a physical signal compatible with Simscape Multibody blocks.
In the Sine Wave block dialog box,
set the Amplitude parameter to
This value corresponds to the default nominal signal value of the 2-Position
Valve Actuator block.
Connect the Single-Acting Hydraulic Cylinder block, a PS-Simulink Converter block, and a Scope block in series as shown in the figure.
Port p of the Single-Acting Hydraulic Cylinder block outputs a physical signal with the measured cylinder shaft position. The PS-Simulink Converter block converts the physical signal into a Simulink signal for plotting with the Simulink Scope block.
Connect the output side of the 2-Position Valve Actuator block, a PS-Simulink Converter block, and a Scope block in series as shown in the figure.
The output side of the 2-Position Valve Actuator block outputs a physical signal with the measured valve opening. The PS-Simulink Converter block converts the physical signal into a Simulink signal for plotting with the Simulink Scope block.
Run the simulation. You can do this from the Simulink menu bar, by clicking the button. Simscape software evaluates the model, determines the initial conditions, and simulates the model. For more information, see How Simscape Simulation Works (Simscape).
Open the Scope blocks.
The valve opening plot shows the dynamic response of the valve to the sinusoidal wave input signal.
The cylinder position plot shows the dynamic response of the cylinder shaft to the pressure changes in the cylinder chamber.
The valve is initially closed. When the valve control signal reaches 50% of the actuator nominal signal, the valve gradually opens to allow flow between the pump and the cylinder. The cylinder shaft moves in the positive direction until it reaches the maximum position allowed by the piston stroke.
When the valve signal goes below 50% of the actuator nominal signal, the valve gradually closes to prevent flow from the pump to the cylinder. The spring element in the actuator load pushes back against the cylinder shaft, forcing it to return to its retracted position.
Experiment with different valve inputs and block parameter values. Simulate the model under different conditions to see the effect of different inputs and parameters on the valve opening dynamics and cylinder shaft displacement.