Project 1
Model Description
In this model, the hydraulic system is modeled using Simscape library physical components whereas the mechanical system of the cylinder is constructed using Simscape Multibody library components/blocks. One piston and a cylindrical casing are both parts of a double-acting hydraulic cylinder. The hydraulic pressure force is provided over the piston and the end cylinder is expanded when hydraulic oil is introduced to the cap end port. The end side of the piston's hydraulic oil at the rod will be pushed out and moved in the direction of the reservoir during extension. The direction control valve is used to change the hydraulic direction for the return stroke. Hydraulic oil is fed to the rod end side of the piston during the returning stroke, causing the piston to retract. Oil is directed toward the reservoir as the piston cap end retracts. as a result, the hydraulic double-acting actuator works in both directions. The fluid is transported through the hydraulic valve and into the mechanical system using the controller valve, changing the position of the piston as a result.
Using the Revolved Solid (Simscape Multibody) and Cylindrical Solid (Simscape Multibody) blocks to model the cylinder and piston, respectively. In addition, using a Prismatic Joint (Simscape Multibody) block to provide the piston the translational degree of freedom. Two Translational Mechanical Converter (IL) blocks are used to depict the cylinder's chambers A and B. The Translational Mechanical Converter (IL) blocks and the Prismatic Joint block are connected by a Translational Multibody Interface block. The stroke length is specified to be 0.45m.
Here, the hydraulic interface-dump trailer with hydraulic cylinder is referred to as the valve control unit.
https://in.mathworks.com/help/sm/ug/hydraulic-interface-dump-trailer-with-hydraulic-cylinder.html
Simscape Model
Final Model (Multibody+Hydraulic)

Cylinder

Bottom Cap


Barrel



Head Cap


Piston

Piston



Rod


Prismatic Joint

Bottom Chamber

Head Chamber

Valve

Orifice BT

Orifice PB

Orifice BH

Orifice HT

Isothermal Liquid

Pressure Source

Valve Control

Valve Input

Scope Output

Mechanics Explorer
t=0

t=2.55s

t=5.07s

t=7.47s

t=10s

Observation
It can be observed from the scope block and the mechanics explorer window that the position of the piston varies according to the valve input provided from the signal builder.