Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Hysteresis With Different Limit Values Water Valve Control

Hysteresis With Different Limit Values Water Valve Control

Hi,

I want to obtain a water valve as bellow,

It begins simulation as true.
der(water_value)>0 (initial value)
and water level is 0.

First, when water level reaches P1(for example 100) valve=false and der(water_value)<0

After that, when water level decreases P0(for example 80) valve=true and der(water_value)>0

At the last part when water level increases P2(for example 90) valve=false and der(water_value)<0.

I used when expression in Modelica script. But P2 is lower than P1. So it doesn't check the P1 value. It only change the valve true and false for P2 and P0 value.

Is there a expression like first check the P1 condition and don't chech the P2 condition, then never check the P1 condition.

Thanks for your help.



There are 0 guests and 0 other users also viewing this topic
You are here: