- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Mean Value Of a Signal
Mean Value Of a Signal
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.
Re: Mean Value Of a Signal
The sum of a continuous signal is the integration. So, you can use Modelica.Blocks.Continuous.Integrator to get that sum. Then, divide by t to get the average.
- dersh
- 66 Posts
Re: Mean Value Of a Signal
The mean of a time varying signal is going to be time varying. So, I really don't understand what you are looking for. Can you explain more of what you want?
- dersh
- 66 Posts
Re: Mean Value Of a Signal
You can take your continuous signal, then pass it through Modelica.Blocks.Continuous.Sampler then integrate it. Between each sample the value will be constant, but the integral will increase. But, when you divide by the time, you should be able to correct that out. You can also then use sampler again after, if you want it not to change.
- dersh
- 66 Posts
Re: Mean Value Of a Signal
- dersh
- 66 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Mean Value Of a Signal