1. The purpose of the experiment
(1) Familiar with the generation and basic operations of discrete-time signals
(2) Familiar with the time-domain characteristics of discrete-time systems
(3) Use the convolution method to observe and analyze the time-domain characteristics of the system
2. Experimental principle
(1) Typical discrete-time signal
(2) Basic operation of sequence
(3) Linear convolution
(4) The linear time-invariant discrete-time system we mainly study uses the form
3. Experimental content
(1) Use Matlab to generate typical discrete-time signals and draw their graphs.
(2) Apply Matlab to calculate the linear convolution of two finite-length sequences.
(3) The causal linear time-invariant discrete-time system described by the difference equation is
(4) If the input signal is
(5) the loading of the ECG (pulse, EEG) signal, and draw its time-domain waveform.
4. Experimental report requirements
(1) Briefly describe the purpose of the experiment and the main points of the experiment principle in the experiment report.
(2) Attach the time-domain waveforms of each signal recorded during the experiment to the experiment report, analyze the resulting graphs, and explain the influence of the parameter changes of each signal on its time-domain characteristics.
(3) Summarize the main conclusions in the experiment.
Matlab program 1_a:
Problem1_a
clear
N=input('Type in the length of sequence=');%% 输入一个N
n=-(N-1):1:N-1;
x1=[zeros(1,N-1),1,zeros(1,N-1)];%%zeros()零矩阵
stem(n,x1);%%绘制火柴梗,产生离散信号
xlabel('Time index n');
ylabel('Amplitude');
title('unit sample sequence LEI');
Operation result 1_a:
Matlab program 1_b:
Problem1_b
clear
N=input('Type in the length of sequence=');%% 输入一个N
n=-(N-1):1:N-1;
x1=[ones(1,N-1),0,ones(1,N-1)];%%ones()全1矩阵
stem(n,x1);%%绘制火柴梗,产生离散信号
xlabel('Time index n');
ylabel('Amplitude');
title('unit step sequence LEI');
Operation result 1_b:
Matlab program 1_c:
Problem1_c
clear
N=input('Type in the length of sequence=');%% 输入一个N
n=0:1:N-1;
x1=sin(pi/6*n);%%sin(pi/6)
stem(n,x1);%%绘制火柴梗,产生离散信号
xlabel('Time index n');
ylabel('Amplitude');
title('sinusoidal sequence LEI');
Operation result 1_c:
Matlab program 2:
Problem2
x=[0 1 2 3 4 5];%%任意有限序列
y=[5 4 3 2 1 0];
z=conv(x,y)%%计算线性卷积
stem(y)
Operation result 2:
Matlab program 3:
Problem3
N=41;
a=[0.9,-0.45,0.35,0.002];
b=[1,0.71,-0.46,-0.62];
x1=[1 zeros(1,N-1)];%%ones()全1矩阵
x2=ones(1,N);%%ones()全1矩阵
k=0:1:N-1;
h=filter(a,b,x1);%%实现差分方程的仿真
y=filter(a,b,x2);
subplot(2,1,1);
stem(k,h,'.');%%绘制火柴梗,产生离散信号
xlabel('n');
ylabel('unit sample sequence');
title('Made by LEI');
subplot(2,1,2);
stem(k,y,'.');%%绘制火柴梗,产生离散信号
xlabel('n');ylabel('unit step sequence');grid on;
Problem4
n=40;
k=0:1:n-1;
num=[0.9 -0.45 0.35 0.002];
den=[1 0.71 -0.46 -0.62];
y1=impz(num,den,n);%%系统的冲激响应
x=[ones(1,n)];
y2=filter(num,den,x);%%实现差分方程的仿真
figure(1)
subplot(211)
stem(k,y1);%%绘制火柴梗,产生离散信号
xlabel('Time index n');ylabel('Amplitude');
title('unit sample response LEI');
subplot(212)
stem(k,y2);%%绘制火柴梗,产生离散信号
xlabel('Time index n');ylabel('Amplitude');
title('unit step response LEI');
x1=[1 2 0 -0.5];
y=conv(y1,x1) %%计算卷积
figure(2)
stem(y)%%绘制火柴梗,产生离散信号
xlabel('Time index n');ylabel('y[n]');
title('time domain waveform LEI');
Operation result 3:
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