Matlab讲义-连续时间系统的频域分析精品资料 下载本文

内容发布更新时间 : 2024/4/20 1:39:52星期一 下面是文章的全部内容请认真阅读。

连续时间系统的频域分析

一、 实验目的

1. 理解周期信号的傅里叶分解,掌握傅里叶系数的计算方法。 2. 深刻理解和掌握非周期信号的傅里叶变换和其计算方法。 3. 熟悉傅里叶变换的性质,并能应用其性质实现信号的幅度调制。

4. 理解连续时间系统的频域分析原理和方法,掌握连续系统的频域响应求解方法,并画出相应的幅频和相频响应曲线。 二、 实验内容

1. 周期信号的傅里叶分解 三角函数形式

??a0??f(t)???ancos(n?t)??bnsin(n?t) (1)

2n?1n?1式中傅里叶系数

T2T2an??2Tf(t)cos(n?t)dt,bn??2Tf(t)sin(n?t)dt

T?2T?2指数函数形式

f(t)?n????Fen??jn?t (2)

式中傅里叶系数

1TFn??2Tf(t)e?jn?tdt (3)

T?2MATLAB实现:数值积分——quad()函数 quadl()函数

y=quad(‘func’,a,b)//func为字符串,表示被积函数.m文件的文件名

y=quad(@myfun,a,b)//@表示函数句柄。 符号函数——int()函数

2. 周期信号的频谱

幅度谱和相位谱——傅里叶系数直接获得。

4-1给定周期为4,脉冲宽度为2,幅值为0.5的矩形信号,计算傅里叶级数,绘制幅度谱和相位谱。将其带入f(t)?clc

n??N?FenNjn?t,求N=10实的合成波形。

clear T=4; width=2; A=0.5;

t1=-T/2:0.001:T/2; ft1=0.5*[abs(t1)

factor=[‘exp(-j*t*’, num2str(w0),’*’,num2str(k),’)’]; f_t=[num2str(A),’*rectpuls(t,2)’] ;

Fn(k+1+N)=quad([f_t,’.*’,factor],-T/2,T/2)/T; end

subplot(4,1,2) stem(K*w0,abs(Fn)); xlabel(‘nw0’); ylabel(‘幅度谱’); grid on; ph=angle(Fn); subplot(4,1,3) stem(K*w0,ph); xlabel(‘nw0’); ylabel(‘相位谱’); grid on; t=-2*T:0.01:2*T;

K=[-N:N]’;

Ft=Fn*exp(j*w0*K*t); subplot(4,1,4) plot(t,Ft) xlabel(‘t’); ylabel(‘合成波形’) grid on; 讲解

1. B = repmat(A,M,N) creates a large matrix B consisting of an M-by-N tiling of copies of A. The size of B is [size(A,1)*M, size(A,2)*N].

The statement repmat(A,N) creates an N-by-N tiling. 复制矩阵函数 2. T = Num2str(X) converts the matrix X into a string representation T with about 4 digits and an exponent if required. This is useful for

labeling plots with the TITLE, XLABEL, YLABEL, and TEXT commands. 数值到字符转换。

3. Ft=Fn*exp(j*w0*K*t);语句中Fn是一个行向量K是一个列向量。 exp(j*w0*K*t)=[exp(-j*w0*N*t); exp(-j*w0*(N-1)*t); exp(j*w0*N*t)];

0.8时域波形0.60.40.20-80.40.3-6-4-20t2468幅度谱0.20.10-2042-15-10-50nw05101520相位谱0-2-4-200.6-15-10-50nw05101520合成波形0.40.20-0.2-8-6-4-20t2468

N=10