Optimisation of a filter knowing input and output

4 次查看(过去 30 天)
Dear all,
I have two array of data. One represents a signal y, and the other represents a signal x;
I know that y is linked to x with a first order low pass filter signal ( but I don't know its characteristics such as gain,... ).
Thus, I would like to know : How to compute the coefficient of the filter w.r.t the knowledge of y and x ?
Thanks for all ! :)

回答(2 个)

Star Strider
Star Strider 2019-9-15
The System identification Toolbox is dedicated to problems like this.
See if the Signal Processing Toolbox invfreqz function will do what you want.

Walter Roberson
Walter Roberson 2019-9-16
First order low pass filters only have a very small number of parameters. If you look at the discrete description at https://en.wikipedia.org/wiki/Low-pass_filter#Discrete-time_realization then it can be modeled in terms of the angular cutoff and the sampling period (see also https://dsp.stackexchange.com/questions/43063/first-order-low-pass-filter )
If you have a fixed sampling period, then you have a simple non-linear optimization in one variable: find the angular cutoff that minimizes the sum of squares of differences between the desired output on the sample signal and the output that would be modeled by using that angular cutoff. You can have your function create a tf() and run the signal through, calculate the SSE, and return it, and use fminbnd() on the function over the range [0 1] . With that in hand, you would convert the normalized cutoff frequency to non-normalized by multiplying by Fs/2

类别

Help CenterFile Exchange 中查找有关 Filter Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by