信号与系统MATLAB仿真实验:连续时间系统的频域分析、复频域分析

一、实验内容

(1)仔细阅读并验证执行程序

syms t 
Fw=fourier(exp(-2*abs(t)))

syms t w 
ft=ifourier(1/(1+w^2),t)

ft=4*cos(12*pi*t)*(heaviside(t+1/4)-heaviside(t-1/4));
Fw=simplify(fourier(ft))
subplot(121)
ezplot(ft,[-0.5 0.5]),grid on
subplot(122)
ezplot(abs(Fw),[-24*pi 24*pi]),grid

w=0:0.025:5;
b=[1];a=[1,2,2,1];
H=freqs(b,a,w);
subplot(2,1,1);
plot(w,abs(H));grid;
xlabel('\omega(rad/s)');
ylabel('|H(j\omega)|');
title('H(jw)的幅频特性');
subplot(2,1,2);
plot(w,angle (H));grid;
xlabel('\omega(rad/s)');
ylabel('\phi(\omega)');
title('H(jw)的相频特性');

 RC=0.04; 
t=linspace(-2,2,1024); 
w1=5;w2=100; 
H1=j*w1/(j*w1+1/RC); 
H2=j*w2/(j*w2+1/RC); 
f=cos(5*t)+cos(100*t); 
y=abs(H1)*cos(w1*t+angle(H1))+ abs(H2)*cos(w2*t+angle(H2)); 
subplot(2,1,1); 
plot(t,f); 
ylabel('f(t)'); 
xlabel('Time(s)'); 
subplot(2,1,2); 
plot(t,y); 
ylabel('y(t)'); 
xlabel('Time(s)');

num=[1]; 
den=[1,2,2,1]; 
sys=tf(num,den); 
figure(1);pzmap(sys); 
t=0:0.02:10; 
h=impulse(num,den,t); 
figure(2);plot(t,h) 
title('Impulse Response') 
[H,w]=freqs(num,den); 
figure(3);plot(w,abs(H)) 
xlabel('\omega') 
title('Magnitude Response') 

syms a t 
F=laplace(exp(-t)*sin(a*t))
syms s 
ft= ilaplace(s^2/(s^2+1)) 

A=[1 7 17 17 6]; 
B=[1 0 4]; 
p=roots(A); 
q=roots(B); 
p=p'; 
q=q'; 
x=max(abs([p,q])); 
x=x+0.1; 
y=x; 
clf 
hold on 
axis([-x,x,-y,y]) 
axis('square') 
plot([-x x],[0 0]) 
plot([0 0],[-y y]) 
plot(real(p),imag(p),'x') 
plot(real(q),imag(q),'o') 
title('连续时间系统的零极点图') 
text(0.2,x-0.2,'虚轴'); 
text(y-0.2,0.2,'实轴');

syms t
Fw=fourier(exp(-2*t)*heaviside(t)) 
f=abs(Fw); 
ezplot(f,[-10*pi,10*pi])
axis([-10*pi,10*pi,0,0.6])

w=0:0.025:5;
b=[1];a=[0,0.08,0.4,1];
H=freqs(b,a,w);
subplot(2,1,1);
plot(w,abs(H));grid;
xlabel('\omega(rad/s)');
ylabel('|H(j\omega)|');
title('H(jw)的幅频特性');
subplot(2,1,2);
plot(w,angle (H));grid;
xlabel('\omega(rad/s)');
ylabel('\phi(\omega)');
title('H(jw)的相频特性');

syms a t
F=laplace(t*exp((-3)*t*heaviside(t)))

syms s
ft= ilaplace((s^3+5*s^2+9*s+7)/(s^2+3*s+2))

A=[3 5 4 6];
B=[1 1 2];
p=roots(A);
q=roots(B);
p=p';
q=q';
x=max(abs([p,q]));
x=x+0.1;
y=x;
clf
hold on
axis([-x,x,-y,y])
axis('square')
plot([-x x],[0 0])
plot([0 0],[-y y])
plot(real(p),imag(p),'x')
plot(real(q),imag(q),'o')
title('连续时间系统的零极点图')
text(0.2,x-0.2,'虚轴');
text(y-0.2,0.2,'实轴');

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

x陌北x

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值