Am I using yulewalk() correctly?
3 次查看(过去 30 天)
显示 更早的评论
I am trying to figure out if I am using the yulewalk function (signal processing toolbox) correctly.
In a basic example, I try to find the filter coefficients of a filter previously generated with MatLAB. I would expect yulewalk to generate a filter that exactly matches the original filter.
% Generate second-order Butterworth filter
[Bx, Ax]=butter(2, 0.13)
% Calculate frequency and magnitude vectors
[H, F]=freqz(Bx, Ax, 0:0.01:1, 2);
% Use yulewalk to generate a filter that should match Bx and Ax
[B, A] = yulewalk(2, F, abs(H))
However, [B, A] is completely different from [Bx, Ax].
Other, similar functions (invfreqz, stmcb) generate a filter that exacly matches the original, but they either work with complex amplitudes (invfreqz) or in the time domain (stmcb).
Is this a limitation of the Yule-Walker algorithm, or am I using the yulewalk function incorrectly?
0 个评论
回答(1 个)
Michael Abboud
2016-9-27
The Yule-walker filter design does not use phase information for the design of the filter, so filters with different coefficients could give you the same magnitude response, but different phase and amplitude.
Also, order 2 is a rather low for such a system, and will likely lead to a rough approximation of the coefficients. However if you increase the order, e.g [B, A] = yulewalk(10, F, abs(H)); then you will obtain a response that has a very similar magnitude to the original system.
If you have any further questions, feel free to contact MathWorks Technical Support and somebody can work with you more closely about your specific use case.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spectral Measurements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!