信号与系统MATLAB仿真实验:信号运算与连续时间系统的时域分析

一、实验内容

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

a = [1 4 4];
b = [1 3];
sys = tf(b, a);
td = 0.01;
t = 0 : td : 10;
f = exp(-t);
y = lsim(sys, f, t);
y1 = impulse(sys, t) ;
y2 = step(sys, t);
subplot(3,1,1)
plot(t, y,'r'); title('零状态响应');
subplot(3,1,2)
plot(t,y1,'b'); title('冲激响应');
subplot(3,1,3)
plot(t,y2,'g'); title('阶跃响应');
%三种响应的曲线分别用红、蓝、绿、色表示)
xlabel('t(sec)');
ylabel('y(t)');
grid on

 

syms T t tao
ut=exp(-t);
ht=exp(-t/T)/T;
uh_tao=subs(ut,t,tao)*subs(ht,t,t-tao);
yt=simplify(simplify(int(uh_tao,tao,0,t)))

syms tao
t=sym('t','positive');
ut=heaviside(t)-heaviside(t-1);
ht=t*exp(-t);
yt=int(subs(ut,t,tao)*subs(ht,t,t-tao),tao,0,t)
subplot(3,1,1),ezplot(ut,[0,6])
subplot(3,1,2),ezplot(ht,[0,6])
subplot(3,1,3),ezplot(yt,[0,6])

a=[1 2 2];
b=[1];
t=0:0.01:10;
sys=tf(b,a);
ft=heaviside(t);
yt=lsim(sys,ft,t);
yt1=impulse(sys,t);
yt2=step(sys,t);
subplot(3,1,1)
plot(t,yt,'r');title('零状态响应');
subplot(3,1,2)
plot(t,yt1,'b');title('冲激响应');
subplot(3,1,3)
plot(t,yt2,'g');title('阶跃响应');
xlabel('t(sec)');
ylabel('y(t)');
grid on

t=-3:0.01:3;
T1=2;
T2=4;
ft1=2*rectpuls(t,T1);
ft2=rectpuls(t,T2)
subplot(2,1,1)
plot(t,ft1);
subplot(2,1,2)
plot(t,ft2)
grid on;

syms tao
t=sym('t','positive');
ft1=2*heaviside(t+1)-2*heaviside(t-1);
ft2=heaviside(t+2)-heaviside(t-2);
ft_tao=subs(ft1,t,tao)*subs(ft2,t,t-tao);
yt=int(ft_tao,tao,0,t);
yt=simplify(yt);
subplot(3,1,1),ezplot(ft1,[0,6])
subplot(3,1,2),ezplot(ft2,[0,6])
subplot(3,1,3),ezplot(yt,[0,6])
grid on

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

x陌北x

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

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

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

打赏作者

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

抵扣说明:

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

余额充值