Modelling a Pressure Regulator in Simscape
Hi, I am trying to model a pressure regulator in simspace, but I could not manage to connect mechanical system to fluid system. I used single acting actuator and connect it to matlab function that has a function form all the "to workspace" blocks how can I fix the system I attached the picture of the systems.
% Compute spring force (negative due to opposing motion)
F_spring = -x * (k1 + k2) + F_preload;
% Compute pressure forces
F_pressure = P_out * A_outlet + P_atm * A_atm – P_sen * A_sen – P_in * A_inlet;
% Compute friction force
F_piston = mu * A_pis * P_sen;
F_poppet = mu * A_pop * P_in;
F_friction = sign(v) * (F_piston + F_poppet);
% Net force (sum of spring, pressure, and friction forces)
F_net = F_spring + F_pressure – F_friction;
% Note: m_tot * x_ddot = F_net should be solved externally (e.g., in Simulink)
endHi, I am trying to model a pressure regulator in simspace, but I could not manage to connect mechanical system to fluid system. I used single acting actuator and connect it to matlab function that has a function form all the "to workspace" blocks how can I fix the system I attached the picture of the systems.
% Compute spring force (negative due to opposing motion)
F_spring = -x * (k1 + k2) + F_preload;
% Compute pressure forces
F_pressure = P_out * A_outlet + P_atm * A_atm – P_sen * A_sen – P_in * A_inlet;
% Compute friction force
F_piston = mu * A_pis * P_sen;
F_poppet = mu * A_pop * P_in;
F_friction = sign(v) * (F_piston + F_poppet);
% Net force (sum of spring, pressure, and friction forces)
F_net = F_spring + F_pressure – F_friction;
% Note: m_tot * x_ddot = F_net should be solved externally (e.g., in Simulink)
end Hi, I am trying to model a pressure regulator in simspace, but I could not manage to connect mechanical system to fluid system. I used single acting actuator and connect it to matlab function that has a function form all the "to workspace" blocks how can I fix the system I attached the picture of the systems.
% Compute spring force (negative due to opposing motion)
F_spring = -x * (k1 + k2) + F_preload;
% Compute pressure forces
F_pressure = P_out * A_outlet + P_atm * A_atm – P_sen * A_sen – P_in * A_inlet;
% Compute friction force
F_piston = mu * A_pis * P_sen;
F_poppet = mu * A_pop * P_in;
F_friction = sign(v) * (F_piston + F_poppet);
% Net force (sum of spring, pressure, and friction forces)
F_net = F_spring + F_pressure – F_friction;
% Note: m_tot * x_ddot = F_net should be solved externally (e.g., in Simulink)
end simulink, simscape MATLAB Answers — New Questions