Project 1

The schematics show the cylinder in three configurations: half-retracted, fully retracted, and fully extended.
You can model the mechanical part of the system in Simscape Multibody. For example, to model the cylinder and piston, you can use the Revolved Solid (Simscape Multibody) and Cylindrical Solid (Simscape Multibody) blocks. To provide the translational degree of freedom for the piston, use a Prismatic Joint (Simscape Multibody) block. To easily calculate the lengths of the chambers A and B, you can attach the base frame (B) and follower frame (F) of the joint to the centers of the left inner surface of the chamber A and the left surface of the piston, respectively. Make sure that the Z-axes of the B and F frames are aligned and both point toward chamber B.
Using this convention, the length of the chamber A, dA, is the position output of the joint block, and the length of the chamber B, dB, equals the difference of the stroke length and dA. To ensure that the piston does not travel beyond the ends of the cylinder, you can specify the upper and lower position limits of the Prismatic Joint block.

what is double-acting actuator model?
In a double acting setup, the design requires the force of the instrument air pressure to both thrusts the pistons apart as well as to push the pistons together. In other words, this design requires supplied air to complete both the actions of opening and closing the subject, hence the term double acting valve.This function utilizes two air supply ports integrated into the design of the housing.
One port allows air to access the chamber between the two pistons. Supplying sufficient air pressure here will force the pistons apart and rotate the pinion in one direction. The second port allows air to access the space on the opposing faces of the pistons. Supplying air pressure here, will push the pistons together and rotate the pinion in the opposite direction.
Oftentimes, a valve assembly may include the installation of a solenoid to govern the supply air to these ports so that an electric signal may govern the opening and closing of the valve by means of this solenoid actuator interface.


This is simscape model of double acting hydraulic actuator inside this 2 main blocks which are mechanical and hydraulic block

the mechanical block contain cylinder and piston connected to prismatic block mechanism configration block for gravity
solver configration block for solver and world frame for grounding

this is hydraulic block


this is cylinder assembly block containing barrel,bottom cap and head cap

This is piston assembly connecting piston with rod