Message Boards Message Boards

Applying Limits to a Continuous Variable in SystemModeler


Greetings to all,

I'm trying to model an actuator. When I use the following line of code to define the limits of the extended and retracted length of the actuator, I get the following graph:

s_rel=smooth(0, if strokeUpperLimit then l_cyl else if strokeLowerLimit then l_cyl + l_rod else flange_a.s - flange_b.s);

Results obtained by fixing one end and applying force on the other end

What is the best way to put limits to a variable ?

POSTED BY: Mohamed Mahmoud
4 years ago

It's hard to give advice based on one line of a model code without the context. (Which are the parameters, variables, which interfaces are involved, etc.) I'd recommend to take a look at: Modelica.Mechanics.Translational.Components.MassWithStopAndFriction which includes limits to where the mass can travel: Example using the mass with stop

POSTED BY: Johan Rhodin
4 years ago

Group Abstract Group Abstract