Professional Documents
Culture Documents
Mục tiêu:
- Phân tích được phổ Fourier của tín hiệu liên tục.
- Hiểu và vận dụng được các lệnh trong Matlab để tính phổ biên độ, phổ pha
Kết quả:
1.Lý thuyết:
2. Thực hành
Ex1: Cho tín hiệu liên tục theo thời gian x(t) = e-|t|
Vẽ tín hiệu x(t). Xác định và vẽ phổ X(f) của tín hiệu này
Giải
-code :
clc;
clear;
close all;
tmax = 5;
t = -tmax:.0001:tmax;
x = exp(-abs(t));
subplot(311)
plot(t,x,'g')
xlabel('t (sec)')
ylabel('x(t)')
title('x(t) = e^{|t|}');
grid on
f = -5:.001:5;
Xf = 2./(1+(2*pi*f).^2);
subplot(312);
plot(f,20*log10(abs(Xf)))
xlabel('f (Hz)')
ylabel('|X(f)| (dB)')
grid on
-kết quả:
Giải
-code:
clc;
clear;
close all;
t= [-10:.001:10];
f= [-5:.001:5];
%a
syms t w
xa= exp(-t^2);
x1= fourier(xa,w) % tim pho fourier cua ham x(t)
Xfa=pi^(1/2)*exp(-2*pi*f.^2/4);
figure(1);
subplot(311)
plot(f,20*log10(abs(Xfa)),'r');
xlabel('f(Hz)');
ylabel('Xfa')
grid on;
%b
syms t w
xb= exp(-t)*heaviside(t);
x2= fourier(xb,w)
Xfb=1./( 1+ 2*pi*f*1i);
tmax=5;
t=-tmax:.001:tmax;
subplot(312)
plot(f,20*log10(abs(Xfb)),'g');
xlabel('f(Hz)');
ylabel('Xfb')
grid on;
%c
syms x w
xc= x.*exp(-abs(x));
x3= fourier(xc,w)
Xfc= -((2*pi*f)*4i)./((2*pi*f).^2+1).^2;
subplot(313)
plot(f,20*log10(abs(Xfc)));
xlabel('f(Hz)');
ylabel('Xfc')
grid on;
-Kết quả:
-code:
clc;
clear;
close all;
syms w t
% Tinh bien doi Fourier nghich dao cua X(?) = 1/(1+j?)
x1 = ifourier(1/(1+j*w), t)
- Kết quả:
Ex5: Cho:
Giải
-code:
clc;
clear;
close all;
syms t w
x= exp(-2*t)*heaviside(t);
h= exp(-3*t)*heaviside(t);
X= fourier(x,w);
H= fourier(h,w);
Y= X*H;
y= ifourier(Y,w,t)
-Kết quả:
Giải
-code:
clc;
clear;
close all;
a = [1 4 3];
b = [1 2];
v = [-5:0.1:10];
syms t w;
h = impz(b,a,length(v))
x = exp(-t)*heaviside(t);
Hw = fourier(h,w);
Xw = fourier(x,w);
Yw = Hw*Xw;
y = ifourier(Yw,w,t)
plot(v,y,'r')
-Kết quả: