任务一

使用Matlab函数fourier()计算f(t)=e2t\displaystyle f(t)=e^{-2|t|} 的傅里叶变换,用函数ifourier()计算F(ω)=11+ω2\displaystyle F(\omega)=\frac{1}{1+\omega^2} 傅里叶反变换。

由傅里叶变换对eata2a2+ω2\displaystyle e^{-a|t|} \leftrightarrow \frac{a^2}{a^2+\omega^2} 可知:

f(t)=e2t\displaystyle f(t)=e^{-2|t|}的傅里叶变换为44+ω2\displaystyle \frac{4}{4+\omega^2}

F(ω)=11+ω2\displaystyle F(\omega)=\frac{1}{1+\omega^2} 傅里叶反变换12et\displaystyle \frac{1}{2}e^{-|t|}

1
2
3
4
5
6
7
8
9
10
11
syms t;
Fw1=fourier(exp(-2*abs(t)));
figure(1);
ezplot(Fw1);
xlabel('w/rad/s'),ylabel('F1(w)');

syms w
ft2=ifourier(1/(1+w^2));
figure(2);
ezplot(ft2);
xlabel('t/s'),ylabel('f(t)');
image-20210604142858783

任务二

计算f1(t)=12e2tϵ(t)\displaystyle f_1(t)=\frac{1}{2}e^{-2t}\epsilon(t)f2(t)=12e2(t1)ϵ(t1)\displaystyle f_2(t)=\frac{1}{2}e^{-2(t-1)}\epsilon(t-1) 的傅里叶变换,画出其幅度谱和相位谱,并观察傅里叶变换的时移特性。(注:其它可能使用到的函数有abs(), angle(),heaviside())

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
clc,clear all,close all;
syms t w;
%产生f1(t)=e^(-2t)*ε(t)
f1t=exp(-2*t)*heaviside(t);
%产生f2(t)=e^(-2(t-1))*ε(t-1)
f2t=exp(-2*(t-1))*heaviside(t-1);
%绘制f1(t)和f2(t)的波形
figure(1);
subplot(211)
ezplot(f1t);
xlabel('t/s'),ylabel('f1t');title('f1(t)');grid on;
subplot(212)
ezplot(f2t);
xlabel('t/s'),ylabel('f1t');title('f2(t)');grid on;
%对f1(t)进行傅里叶变换
F1w=fourier(f1t);
%绘制幅度谱
figure(2)
subplot(221)
ezplot(abs(F1w));
xlabel('w/rad/s');ylabel('|F1w|');title('F1(w)幅度谱');grid on;
%绘制相位谱
subplot(222)
ezplot(angle(F1w)*180/pi);
xlabel('w/rad/s');ylabel('相位/°');title('F1(w)相位谱');grid on;
%对f2(t)进行傅里叶变换
F2w=fourier(f2t);
%绘制幅度谱
subplot(223)
ezplot(abs(F2w));
xlabel('w/rad/s');ylabel('|F2w|');title('F2(w)幅度谱');grid on;
%绘制相位谱
subplot(224)
ezplot(angle(F2w)*180/pi);
xlabel('w/rad/s');ylabel('相位/°');title('F2(w)相位谱');grid on;
image-20210604150357700

由图1可知,在时域,f2f_2 的图像是f1f_1 的图像进行右移的结果;

image-20210604150414756

由图2可得,在频域,F1F_1F2F_2 的幅度谱图像一致,相位谱有较大差别。

任务三

计算f1(t)=g4(t)f_1(t)=g_4(t)f2(t)=cos(ωct)f_2(t)=\cos(\omega_ct) 以及f3(t)=g4(t)cos(ωct)f_3(t)=g_4(t)\cos(\omega_ct) 的傅里叶变换, 其中ωc=100Hz\omega_c=100Hz ,画出三个信号的幅度谱,并观察讨论它们之间的关系。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
clc,clear all,close all;
syms t w;
wc=2*pi*100;
%产生g4t
g4t=heaviside(t+2)-heaviside(t-2);
%产生f2t
f2t=cos(wc*t);
%产生f3t=g4t*f2t
f3t=g4t*f2t;
%绘制g4t、f2t、f3t的时域波形
figure(1)
subplot(311)
ezplot(g4t);
axis([-6 6 -1.3 1.3]);
xlabel('t/s'),ylabel('幅度');title('g4(t)');grid on;
subplot(312)
ezplot(f2t);
axis([-6 6 -1.3 1.3]);
xlabel('t/s'),ylabel('幅度');title('f2(t)');grid on;
subplot(313)
ezplot(f3t);
axis([-6 6 -1.3 1.3]);
xlabel('t/s'),ylabel('幅度');title('g4(t)');grid on;
%对g4t进行傅里叶变换
F1w=fourier(g4t);
%绘制幅度谱
figure(2)
subplot(311)
ezplot(abs(F1w),[-wc,wc,0,0.5]);
xlabel('w/rad/s');ylabel('|F1w|');title('F1(w)幅度谱');grid on;
%对f2t进行傅里叶变换
F2w=fourier(f2t);
%绘制幅度谱
subplot(312)
ezplot(abs(F2w),[-2*wc,2*wc,0,1]);
xlabel('w/rad/s');ylabel('|F2w|');title('F2(w)幅度谱');grid on;
%对f3t进行傅里叶变换
F3w=fourier(f3t);
%绘制幅度谱
subplot(313)
ezplot(abs(F3w),[-2*wc,2*wc,0,0.2]);
xlabel('w/rad/s');ylabel('|F3w|');title('F2(w)幅度谱');grid on;
image-20210604151959811 image-20210604152016037