matlab yulewalker,Recursive digital filter design

yulewalk

Recursive digital filter design

Description

[b,a] = yulewalk(n,f,m)

returns the transfer function coefficients of an nth-order IIR filter

whose frequency magnitude response approximately matches the values given in

f and m.

Examples

Yule-Walker Design of Lowpass Filter

Design an 8th-order lowpass filter with normalized cutoff frequency 0.6. Plot its frequency response and overlay the response of the corresponding ideal filter.

f = [0 0.6 0.6 1];

m = [1 1 0 0];

[b,a] = yulewalk(8,f,m);

[h,w] = freqz(b,a,128);

plot(w/pi,mag2db(abs(h)))

yl = ylim;

hold on

plot(f(2:3),yl,'--')

xlabel('\omega/\pi')

ylabel('Magnitude')

grid

c37b1aab016ed130ba0023f067a2d635.png

Increase the stopband attenuation by specifying a wider transition band.

f = [0 0.55 0.6 0.65 1];

m = [1 1 0.5 0 0];

[b,a] = yulewalk(8,f,m);

h = freqz(b,a,128);

hold on

plot(w/pi,mag2db(abs(h)))

hold off

ylim(yl)

7601bc89e84c3b478d59d512cca0762e.png

Input Arguments

n — Filter order

positive integer scalar

Filter order, specified as a positive integer scalar.

Data Types:single | double

f — Frequency points

vector

Frequency points, specified as a vector of points in the range between 0 and 1,

where 1 corresponds to the Nyquist frequency, or half the sample rate. The first point

of f must be 0 and the last point 1. All intermediate points must

be in increasing order. f can have duplicate frequency points

corresponding to steps in the frequency response.

Example:[0 0.25 0.4 0.5 0.5 0.7 1] specifies an irregularly

sampled Nyquist range.

Data Types:single | double

m — Magnitude response

vector

Magnitude response, specified as a vector containing the desired responses at the

points specified in f. m must be the same

length as f.

Example:[0 1 1 1 0 0 0] specifies a bandpass magnitude

response.

Data Types:single | double

Output Arguments

b, a — Filter coefficients

row vectors

Filter coefficients, returned as row vectors. The output filter coefficients are

ordered in descending powers of z:

B(z)A(z)=b(1)+b(2)z−1+⋯+b(n+1)z−na(1)+a(2)z−1+⋯+a(n+1)z−n.

Tips

When specifying the frequency response, avoid excessively sharp transitions from passband

to stopband. You may need to experiment with the slope of the transition region to get the

best filter design.

Algorithms

yulewalk designs recursive IIR digital filters using a least-squares

fit to a specified frequency response. The function performs the fit in the time domain.

To compute the denominator coefficients, yulewalk uses modified

Yule-Walker equations, with correlation coefficients computed by inverse Fourier

transformation of the specified frequency response.

To compute the numerator, yulewalk follows these steps:

Compute a numerator polynomial corresponding to an additive decomposition of

the power frequency response.

Evaluate the complete frequency response corresponding to the numerator and

denominator polynomials.

Use a spectral factorization technique to obtain the impulse response of the

filter.

Obtain the numerator polynomial by a least-squares fit to this impulse

response.

References

[1] Friedlander, B., and Boaz Porat.

"The Modified Yule-Walker Method of ARMA Spectral Estimation." IEEE® Transactions on Aerospace Electronic Systems. Vol. AES-20, Number

2, 1984, pp. 158–173.

Extended Capabilities

C/C++ Code Generation

Generate C and C++ code using MATLAB® Coder™.

Usage notes and limitations:

If specified, the order of recursion must be a constant. Expressions or variables are

allowed if their values do not change.

Introduced before R2006a

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值