Averaging the signals
Submitted by shiva_shankar on Mon, 01/28/2013 - 12:42
Hello, I wanted to know how to average the signal if my signal is varying from (-0.5 to +0.5) and i want to consider it to be zero. How do we make use of derivative. I get to see compilation error when i used derivative for averaging the signal.
Thanks & Regards shivashankar
Answers
-
Submitted by Anders89 on Tue, 01/29/2013 - 05:02.
You can use a low-pass IIR filter, or you can use the Matrix Operation > meanSmooth block.
The derivative block should compile fine, but is not recommended for real-time embedded operation, especially not for averaging. You can use a 1/Z block to subtract previous value from current to get derivative. This tends to give poor results in the presence of noise. Better is the transfer function tf(t) = s/(Tc*s + 1), where Tc is the time constant of the fastest signal you want to take the derivative of.0 -
Submitted by varunkumar on Fri, 09/13/2013 - 17:16.
Hello Everybody,
The solution of using Mean smooth block is not working out even in real time embedded operation as the averaging window is of limited value with respect to Stack & heap memory which while compiling it shows an error.
Also using filters is a tricky one because we never know, what would be the noise on variables exactly in real time embedded operation. Cant we have a simple averaging of values say 100 values added together & divide it by 100 & then consider the value by setting a counter of 100. Thus averaging those values & then consider it further in the code. This can be easily done in C. How can it be done in Vissim.
Please suggest. Thanks.
0 -
Submitted by Anders89 on Sat, 09/21/2013 - 00:42.
Please send us your C code to average 100 values that does not require a buffer of 100 elements and we will use it.
0