How to model such a filter? 
How to model such a filter? 
daniel@ka 
Apr 11 2009, 07:18 PM
Post
#1

Member Group: Members Posts: 23 Joined: 3June 08 Member No.: 11,399 
Hi forum, I am looking for a way to model a mathematical relationship y(t) = 1/T* integral over x(tau) dtau from tT to t Actually it should yield moving average of x function. One way I can think of is to transform it manually into y'(t) = x(t)  x(tT) All variables in modelica are function of times, but I think there is no way to express x(tT). Regards, daniel I found the rigth solution The solution is to use delay function! model MA input Real x; output Real y; parameter Real T = 1; parameter Real y0 = 1; equation der(y) = x  delay(x,T); initial equation y = y0; end MA; 
daniel@ka 
Apr 11 2009, 06:38 PM
Post
#2

Member Group: Members Posts: 23 Joined: 3June 08 Member No.: 11,399 
Hi forum,
I am looking for a way to model a mathematical relationship y(t) = 1/T* integral over x(tau) dtau from tT to t Actually it should yield moving average of x function. One way I can think of is to transform it manually into y'(t) = x(t)  x(tT) All variables in modelica are function of times, but I think there is no way to express x(tT). Regards, daniel 
LoFi Version  Time is now: 19th July 2019  06:31 PM 