Hello all, I need a support in order to develope a low pass filter on Simulink using this formula: val (new) = val (old) + (in - val (old)) * dT / T. Any idea ?

1 次查看(过去 30 天)
I have two input signals :
u1 = output from a 2-D lookup table
u2 = constant with one value
dT is the sample time
T is u2
and val(new) is u1( t) , where t is the time
val(old) is u2(t-1), where t is the time

回答(1 个)

Nehemiae
Nehemiae 2023-3-7
Hello,
The equation provided can be implemented using unit delay blocks, gain blocks, etc. I have implemented the same below, assuming a sine way as the “in” signal, and random values for dT and T.
To get the output of an LPF, the look-up table and the variables need to be tuned accordingly. The documentation on look-up tables (https://www.mathworks.com/help/simulink/slref/2dlookuptable.html) and unit delays (https://www.mathworks.com/help/simulink/slref/unitdelay.html) will help in this regard.
  2 个评论
Giulia
Giulia 2023-3-7
Hello, thank you so much for your answer. It was very helpful.
I have another question to you. If i use a look-up table in my model, in this case how should i choose propertly the table data and the breakpoint 1 and 2.
Thank you again in advace.
Nehemiae
Nehemiae 2023-3-7
Hello,
Table data is the matrix of values that define how u1 and u2 (the inputs to your look-up table) are related to each other. This is defines the output of the look-up table for a particular set of inputs. So this is the known set of outputs. Then breakpoints 1 and 2 are the values of u1 and u2 that index into table data. The lengths of breakpoints 1 and 2 will be the number of rows and number of columns of table data, respectively. So these are the known set of inputs.
You can select these values to get the required working of the LPF.

请先登录,再进行评论。

产品


版本

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by