Digital signal processing-Z domain, frequency response of LSI system

R1: System function:
H(z)=Y(z)/X(z) =(∑_(m=0)^M▒〖b_m z^(-m) 〗)/(1+∑_(k= 1)^N▒〖a_k z^(-k) 〗)
R2: Frequency response:
H(e^jω )=Y(e^jω )/X(e^jω) =(∑_(m=0)^ M▒〖b_m e^(-jωm) 〗)/(1+∑_(k=1)^N▒〖a_k z^(-jωk) 〗)
R3: Representation in Matlab:
In the related Matlab system function In, the coefficients of the numerator and denominator are defined as vectors, that is,
b=[b_0,b_1,...,b_M]
a=[a_0,a_1,...,a_M]
and a_0=1. If a_0≠1, the program will automatically normalize it to 1.

Find the frequency response of the LSI system h(n)={ 1,4,3,6,9,7} (for example, in the experimental report, it is necessary to provide theoretical explanations here), and draw its amplitude-frequency characteristics And phase frequency characteristics.
The matlab code is as follows:

clc
clear
close all
b = [1,1,1];
%b= [1,4,3,6,9,7];
a = [1,0.5,-0.25];
%a = [1];
rq = roots(a);
rz = roots(b);
[H,w] = freqz(b,a,1024,'whole');
magX = abs(H);
angX = angle(H);
figure(1)
zplane(b,a)
title('零极点图');
figure(2)
subplot(2,1,1);plot(w/pi,magX);grid
xlabel('以w/pi为单位');
ylabel('幅值');
title('幅频特性');
subplot(2,1,2);plot(w/pi,angX);grid
xlabel('以w/pi为单位');
ylabel('相位');
title('相频特性');

Guess you like

Origin blog.csdn.net/weixin_46837674/article/details/109731157