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
  • Index
  • » Users
  • » terzii
  • » Profile

Posts

Posts

Sep-21-18 14:02:16
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.



Sep-14-18 05:21:46
Mean Value Of a Signal

Thank you dersh  current/smile

Sep-13-18 14:28:20
Mean Value Of a Signal

Yes you are right, but I want to take samples from the time variyng signal for example: t=0 x(t)=0, t=1 x(t)=1, t=2 x(t)=2 and the mean value is (0+1+2)/3=1. How can I obtain the constant mean value?

Sep-13-18 12:10:57
Mean Value Of a Signal

Thank you, dersh. But it gives me time varying data, but a want a constant single value. How can I obtain that?

Sep-07-18 05:21:39
Mean Value Of a Signal

Hello all,

Does anyone know how can I get the mean value of a continuous signal? For example, there is a function F(t)=x(t). I want to get the mean value of the points: t=0 x(t)=0, t=1 x(t)=1, t=2 x(t)=2. The mean value is (0+1+2)/3=1. How can I find in Modelica?

Best regards.

  • Index
  • » Users
  • » terzii
  • » Profile
You are here: