Signal and System Simulation Experiment-Experiment 1 Realization of MATLAB in Time Domain Analysis of Continuous System

【 Purpose】

1. Grasp the analysis methods of continuous system impulse response, step response and zero state response
2. Observe the relationship between the zero and pole of the system function and the impulse response time domain waveform

【Experiment content】

1. The differential equations of linear time-invariant causal systems are as follows:
Insert picture description here
(1) According to the learned knowledge, analyze the characteristics of the impulse response form of the above equations;
(2) Find the impulse response and step response of the above system separately , Judge your own conclusion by observing the waveform.
2. Plot the impulse response waveforms of the following two systems and observe the difference between the two waveforms:
Insert picture description here

【 Implementation】

1. The impulse response is solved using the impulse() function in MATLAB. There are several calling formats as follows:
Insert picture description here
2. The step response is solved in MATLAB using the step() function, and the calling format is the same as the impulse() function ;
3. The zero-state response of the system can use the lsim() function to realize the squareness analysis in MATLAB. The calling format is:
lsim(b,a,x,t) or y=lsim(b,a,x,t) )
Description: a, b are the coefficient vectors of the system differential equation, t represents the time range vector of the input signal, and x represents the sampling value of the input signal at the time point defined by the vector t. For example, the command t=0:0.001:10; x=exp(-t); defines an exponential signal with a time range of 0~10 seconds. According to the a, b and t, x of the system, it can be analyzed by calling the lsim function The zero state response of the system.

【Experiment report requirements】

  1. Record the waveform in the experiment
  2. A brief summary of the waveform form of the impulse response of the second-order system
  3. Analyze the problems in the experiment

Matlab program one:

ts=0;te=5;dt=0.01;%t轴设置    
sys=tf([2,4],[1,4,3]);%sys是LTI系统模型
t=ts:dt:te;
y=impulse(sys,t);%impulse()函数来仿真分析系统冲激响应
subplot(2,4,1);%作图区域划分
plot(t,y);%作图
xlabel('t(sec)');ylabel('y(t)');
title('冲击响应-Make by 磊');grid on;
y=step(sys,t);%step()函数来仿真分析系统阶跃响应
subplot(2,4,5);%作图区域划分
plot(t,y);%作图
xlabel('t(sec)');ylabel('y(t)');
title('阶跃响应响应-Make by 磊');
grid on;
ts=0;te=5;dt=0.01;%t轴设置    
sys=tf([30],[1,0.4,100.4]);%sys是LTI系统模型
t=ts:dt:te;
y=impulse(sys,t);%impulse()函数来仿真分析系统冲激响应
subplot(2,4,2);%作图区域划分
plot(t,y);%作图
xlabel('t(sec)');ylabel('y(t)');
title('冲击响应-Make by 磊');grid on;
 
y=step(sys,t);%step()函数来仿真分析系统阶跃响应
subplot(2,4,6);%作图区域划分
plot(t,y);%作图
xlabel('t(sec)');ylabel('y(t)');
title('阶跃响应响应-Make by 磊');grid on;
ts=0;te=5;dt=0.01;%t轴设置    
sys=tf([1],[1,0,100]);%sys是LTI系统模型
t=ts:dt:te;
y=impulse(sys,t);%impulse()函数来仿真分析系统冲激响应
subplot(2,4,3);%作图区域划分
plot(t,y);%作图
xlabel('t(sec)');ylabel('y(t)');
title('冲击响应-Make by 磊');grid on;
y=step(sys,t);%step()函数来仿真分析系统阶跃响应
subplot(2,4,7);%作图区域划分
plot(t,y);%作图
xlabel('t(sec)');ylabel('y(t)');
title('阶跃响应响应-Make by 磊');grid on;
 
ts=0;te=5;dt=0.01; %t轴设置   
sys=tf([3,2],[1,5,6]);%sys是LTI系统模型
t=ts:dt:te;
y=impulse(sys,t);%impulse()函数来仿真分析系统冲激响应
subplot(2,4,4);%作图区域划分
plot(t,y);%作图
xlabel('t(sec)');ylabel('y(t)');
title('冲击响应-Make by 磊');grid on;
y=step(sys,t);%step()函数来仿真分析系统阶跃响应
subplot(2,4,8);%作图区域划分
plot(t,y);%作图
xlabel('t(sec)');ylabel('y(t)');
title('阶跃响应响应-Make by 磊');grid on;

Operation result one:

Insert picture description here

Matlab program two:

ts=0;te=5;dt=0.01;%t轴设置     
sys=tf([1,3],[1,20,10010]);%sys是LTI系统模型
t=ts:dt:te;
y=impulse(sys,t);%impulse()函数来仿真分析系统冲激响应
subplot(2,1,1);%作图区域划分
plot(t,y);%作图
xlabel('t(sec)');ylabel('y(t)');
title('冲击响应-Make by 磊');grid on;
ts=0;te=5;dt=0.01; %t轴设置   
sys=tf([50],[1,20,10010]);%sys是LTI系统模型
t=ts:dt:te;
y=impulse(sys,t);%impulse()函数来仿真分析系统冲激响应
subplot(2,1,2);%作图区域划分
plot(t,y);%作图
xlabel('t(sec)');ylabel('y(t)');
title('冲击响应-Make by 磊');grid on;

Operation result two:

Insert picture description here

Matlab program three:

ts=0;te=5;dt=0.01;%t轴设置    
sys=tf([1,16],[1,2,32]);%sys是LTI系统模型
t=ts:dt:te;
y=impulse(sys,t);%impulse()函数来仿真分析系统冲激响应
subplot(2,1,1);%作图区域划分
plot(t,y);%作图
xlabel('t(sec)');ylabel('h(t)');
title('冲击响应-Make by 磊');grid on;
 
y=step(sys,t);%step()函数来仿真分析系统阶跃响应
subplot(2,1,2);%作图区域划分
plot(t,y);%作图
xlabel('t(sec)');ylabel('g(t)');
title('阶跃响应响应-Make by 磊');grid on;

Operation result three:

Insert picture description here

Matlab program four:

ts=0;te=5;dt=0.01;%t轴设置                
sys=tf([6],[1,5,6]);%sys是LTI系统模型
t=ts:dt:te;
f=10*sin(2*pi*t);    
y=lsim(sys,f,t);%用lsim()函数来仿真分析系统零状态响应
plot(t,y);%作图
xlabel('t(sec)');ylabel('y(t)');
title('零状态响应-Make by 磊');grid on;

Running result four:

Insert picture description here
I have limited abilities, and the explanation is not clear. If you encounter any problems, you can leave a message or private message. The program files will be packaged and uploaded later for everyone to learn and use.

This article hopes to be helpful to everyone. Of course, if there is something wrong with the above, please correct me.

Sharing decision heights, learning to open the gap

Guess you like

Origin blog.csdn.net/qq_42078934/article/details/109251302