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 ! :)
0 个评论
回答(2 个)
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
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Filter Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!