Optimisation of a filter knowing input and output
2 ビュー (過去 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!