Project 1
Q.1] In this Project we want to build the double-acting actuator in Simscape.
The mechanical system of the cylinder needs to be built using Simscape Multibodylibrary components/blocks, and the hydraulic system needs to be modeled using Simscape library physical components.
Working Principle of Hydraulic Actuator:
Hydraulic actuators are elements converting the energy of the working fluid into mechanical energy related to the reciprocating motion. The pressure of the working fluid acts on the piston and creates a force causing the piston assembly to move. As a result, the piston rod can perform useful work.
In double acting hydraulic cylinder models, fluid moves into one port and exits through a second port, forcing the cylinder to retract and extend. With two pressurized chambers, double-acting pistons do not require a spring or motor to operate.
Model:

Here I'm using the Translational Multibody Interface block for giving the Hydraulic signal to the Multibody system.
I've created the hydraulic system as the subsystem which was named by Physical model in this project.

Here I'm using the Hydraulic library Simscape blocks for giving the hydraulic oil to the valves.
First we want to give the domain specific blocks of the hydraulic reference. And the Hydraulic pressure source, Hydraulic Fluid and the Pressure Relief Valve.
I'm using the Hydraulic oil in this model for giving the pressure,

and the Pressure relief for relief some pressure,

In the Hydraulic Pressure Source I'm giving the PS Constant value as the reference input to the soure of pressure.

I'm using the 4-way directional valve in this model for giving the seperate oil supply to the actuator by using the pressure difference,

Here I'm giving the cmd input to the model for comparing the position of the actuator and showing by the scope block for the both input and Postion output.
I'm using the Signal Builder for giving the input valve value,


The S port of the 4-way directional valve is connected with the signal builder input by using the simulink to PS converter.
and the A and B port of the 4-way direcctional valve is connected with the 2 Translational Hydro-Mechanical Converter.
They are using as Translational because we want to see the output of the piston movement as translatioinal.
The 2 chambers are named as A and B.
They are used for converting the hydraulical energy to mechaical actuation,

I'm giving the Stroke-Length as the constant to the Chamber-B,

And the R and C ports of the Translational Hydro Mechanical Converter blocks A and B are connected with Translational Multibody Interface block for giving the hydraulic pressure to the mechanical model. So I created the hydraulic system as the subsystem in this mdel.

Translational Multibody Interface:
This block is an interface between a Simscape Multibody joint and a Simscape mechanical translational network.
Mechanical Model:
I'm created the Piston Cylinder and also the Piston Rod in the Multibody library blocks. For giving the translational movement to the piston I'm using the Prismatic Joint in this multibody model.
For creating the multibody system we require the basic blocks are Solver configuration, World Frame, and the Mechanism Configuration.
Then I created the multibody model of the Piston cylinder by 3 parts, they are bottom cap, Cylinder body and the Top head.
For creating this parts, I'm using the Cylindrical Solid and Revolved Solid block.



Then I created the Piston Cylinder head and the Rod by using the Cylindrical solid block.


So we are created all the required parts of the Hydraulic actuator of the Piston movement arrangement.
We are giving the blocks gravity which was acting in the -Y direction so I changed the parameters in the Mechanism Configuration.

Then we want to arrange the Bottom cap of the Piston Cylinder arrangement for our convenience because we normally use the Mechanics explorer Front view of the Y up (XY Front). So I chnaged the position by using the Rigid Transform block.

And we will connect the blocks using the ports in the Multibody parts.
For giving the translation movement to the piston inside the cylinder we want to use the Prismatic joint in that area.
So I'm using the Prismatic joint in that to give the position inside the piston by using the Rigid Transform block.

We'll give the force input of the pressure from the hydraulic model is connected with the Translational Multibody Interface and then the force from this interface is connected with the Prismatic Joint for experiencing the pressure force from the hydraulic model.
For giving the translational movement of the piston we changed the parameters of the Prismatic Joint,

Finally, we created the Double-acting actuator model using the Simscape multibody and physical components.
We'll compare the input signal and the output position of the piston by using the scope block.

When we run this model we'll get this as the output,
