Am I using yulewalk() correctly?
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Michael Abboud
le 27 Sep 2016
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.
Voir également
Catégories
En savoir plus sur Signal Modeling dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!