【www.scfx8.com--述职述廉报告】
实验六 离散线性时不变系统分析 1. 设系统冲激响应为,0 5[ ]0,n nh nothers ,输入信号为1,0 5[ ]0,nx nothers , (1) 求输出1 [ ][ ] [ ] y n x n h n ; 主程序如下:
n=[-5:20]; u1=stepseq(0,-5,20);u2=stepseq(6,-5,20); x=u1-u2; h=n.*x; subplot(3,1,1);stem(n,x);axis([-5 20 0 2]); title("Input Sequence"); ylabel("x[n]"); subplot(3,1,2);stem(n,h);axis([-5 20 0 6]); title("Inpulse Response"); ylabel("h[n]"); [y1,ny]=conv_m(x,n,h,n); subplot(3,1,3);stem(ny,y1); title("Output Sequence");xlabel("n"); ylabel("y_1[n]"); Stepseq.m的源程序如下:
function [x,n]=stepseq(n0,n1,n2); if nargin ~=3 disp("Usage:Y=stepseq(n0,n1,n2)"); elseif((n0n2)|(n1>n2)) ; end n=[n1:n2]; x=[(n-n0)>=0]; conv_m.m的源程序如下:
function[y,cy]=conv_m(x,nx,h,nh) if nargin~=4 disp("Usage:Y=conv_m(x,nx,h,nh)"); return; end; nyb=nx(1)+nh(1); nye=nx(length(x))+nh(length(x)); ny=[nyb:nye]; y=conv(x,h);
(2)求输出2 [ ][ ] [ 5] y n x n h n n=-10:20; u1=stepseq(0,-10,20);u2=stepseq(6,-10,20); x=u1-u2; u3=stepseq(-5,-10,20);u4=stepseq(1,-10,20); x1=u3-u4; h=(n+5).*x1; subplot(3,1,1);stem(n,x); axis([-10 20 0 2]);title("Input sequence"); ylabel("x[n]"); subplot(3,1,2);stem(n,h); axis([-10 20 0 6]); title("Inpulse Response"); ylabel("h[n+5]"); [y2,ny]=conv_m(x,n,h,n); subplot(3,1,3);stem(ny,y2); title("Output Sequence");xlabel("n"); ylabel("y_2[n]");
2. 设 [ ] (0.9) [ ]nh n u n ,输入 [ ] [ ] [ 10] x n u n u n ,求系统输出 [ ] [ ] [ ] y n x n h n 。
n=-5:50; u1=stepseq(0,-5,50);u2=stepseq(10,-5,50); x=u1-u2; h=((0.9).^n).*u1; subplot(3,1,1);stem(n,x); axis([-5 20 0 2]); title("Input Sequence"); ylabel("x[n]"); subplot(3,1,2); stem(n,h); axis([-5 20 0 6]); title("Inpulse Response"); ylabel("h[n]"); [y,ny]=conv_m(x,n,h,n); subplot(3,1,3); stem(ny,y); title("Output Sequence"); xlabel("n"); ylabel("y[n]"); 3. 设离散系统可由下列差分方程表示:
[ ] [ 1] 0.9 [ 2] [ ] y n y n y n x n 1) 计算 [ 20:100] n 时的系统冲激响应; a=[1,-1,0.9]; b=1;
x=cos(0.08*pi*n)+cos(0.8*pi*n); n=[0:300]; h=filter(b,a,x); figure(1) subplot(2,1,1);stem(n,h) axis(0,300,-1.1,1.1]) title("Impulse Response"); xlabel("n"); ylabel("h(n)") (2) x=stepseq(0,-20,100); s=filter(b,a,x); subplot(2,1,2);stem(n,s) axis([-20,100,-0.5,2.5]) title("Step Response");xlabel("n");ylabel("s(n)") figure(2) impz(b,a)
实验七 连续时间系统分析 1. 设有两个稳定的 LTI 系统,可分别由下列微分方程来描述:
2 22 2( ). 3 ( ) 3 ( )( ) ( ) ( ).3 4 ( ) 5 ( )dy ta y t x tdtd y t dy t d x tb y t x tdt dt dt 请分别画出它们的系统频率响应的幅值和相位特性曲线。
Lab41a.m a=[3 1]; b=3; freqs(b,a);
2. 有一模拟滤波器,其传递函数为:220.2 0.3 1( )0.4 1s sH ss s 应用 freqs 函数画出它的幅频特性和相频特性曲线。
Lab42.m a= [1 0.4 1]; b= [0.2 0.3 1]; freqs(b,a);