Professional Documents
Culture Documents
----
about:blank 1/14
18:17 26/12/2023 Báo-cáo-THHT-bài-1 - báo cáo
+ 3r(t+5)
>> t=-10:0.01:10;
>> plot(t,3*uramp(t,5))
>> grid on
>> title('y=3r(t+5)')
about:blank 2/14
18:17 26/12/2023 Báo-cáo-THHT-bài-1 - báo cáo
This is a preview
unlock
Free Trial
+ y(t) = sin(t)*[u(t+3) - u(t-3)] Get 7 days of free Premium
>> t = linspace(-10,10,5000);
>> y4 = sin(t).*[ustep(t,-3) - ustep(t,3)];
>> plot(t,y4)
Bài 4: Sử dụng hai hàm trên để tạo ra các tín hiệu có đồ thị như sau:
+ Đồ thị 1:
about:blank 3/14
18:17 26/12/2023 Báo-cáo-THHT-bài-1 - báo cáo
>> t = linspace(-10,10,5000);
>> y1 = 0.5*uramp(t,4) + 0.5*uramp(t,-4) - uramp(t,0);
>> plot(t,y1)
+ Đồ thị 2:
>> t = linspace(-10,10,5000);
>> y2 = ustep(t,-8) - ustep(t,8) + 0.5*uramp(t,4) + 0.5*uramp(t,-4) - uramp(t,0);
>> plot(t,y2)
Bài 2: Sử dụng hàm số trên để tìm phần chẵn và phần lẻ của các tín hiệu liên tục sau và vẽ
đồ thị của tín hiệu chính cũng như phần chẵn và phần lẻ của nó trong cùng một đồ thị sử
dụng các dạng đường thẳng và màu sắc khác nhau: (giả sử
-10 t 10)
y(t) = 2r(t+2,5) - 5r(t) + 3r(t-2) + u(t-4)
>> t = linspace(-10,10,5000);
about:blank 4/14
18:17 26/12/2023 Báo-cáo-THHT-bài-1 - báo cáo
about:blank 5/14
18:17 26/12/2023 Báo-cáo-THHT-bài-1 - báo cáo
This is a preview
=> T1
= 2
không phải là số hữu tỷ.
T2 � Do
� you want full access? Go
b, x2(t) = 1 + 1,5cos(6t) - 0,6cos(40t) với 0 =
Premium
�� and unlock all 14 pages
>> w = pi/10;
>> t = [-10:pi/100:10];
>> x2 = 1 + 1.5*cos(6*pi *t)-0.6*cos(4*w*t); Access to all documents
>> plot(t,x2)
Get Unlimited Downloads
Upload
Share your documents to
Tín hiệu x2 là tín hiệu tuần hoàn vì: unlock
x2(t) = 1 + 1,5cos(6t) - 0,6cos(40t) hay x2(t) = 1 + f3(t) – f4(t)
trong đó: f3(t) = 1,5cos(6t) với T1 = 1 (s)
3
f4(t) = 0,6cos(40t) với T2 = �
= 5 (s)
2Ω0
T1 => T2 = 15T1 => T = T2 = 5 (s)
=>
1
T2
=
15 Free Trial
IV. Năng lượng, công suất của 1 tín hiệu Get 7 days of free Premium
Tìm năng lượng và công suất của tín hiệu sau trên đoạn -10 t 10 bằng cách sử dụng
công cụ biến tượng trưng của Matlab.
x(t) = e-tcos(2πt)u(t)
>> syms t;
>> T = 20;
>> u(t) = heaviside (t);
>> x(t) = exp(-t).*cos(2*pi*t).*u(t);
>> f = (abs(x(t))).^2;
>> E = int (f, t, -T/2, T/2)
>> P = int (f, t, -T/2, T/2)/T
Kết quả:
E=
(exp(-20)*(2*pi^2 + 1)*(exp(20) - 1))/(2*(4*pi^2 + 1))
P=
(exp(-20)*(2*pi^2 + 1)*(exp(20) - 1))/(40*(4*pi^2 + 1))
V. Phép dịch, phép co giãn và phép đảo tín hiệu
about:blank 6/14
18:17 26/12/2023 Báo-cáo-THHT-bài-1 - báo cáo
Bài 1: Vẽ đồ thị của các hàm số sau trên cùng một đồ thị: xt, xt-2 và xt2 (giả sử 10
t 10) với: x(t) = e-|t|
>> t = linspace(-10,10,5000);
>> x = exp(-(abs(t)));
>> x1 = exp(-(abs(t-2)));
>> x2 = exp(-(abs(t+2)));
>> plot(t,x,'b','linewidth',2); hold on;
>> plot(t,x1,'k--','linewidth',2);
>> plot(t,x2,'r:','linewidth',2);
>> legend('x(t)', 'x(t-2)', 'x(t+2)');
>> grid on
Bài 2: Vẽ đồ thị của các hàm số sau trên cùng một đồ thị: xt, x2t và x0,5t (giả sử 10
t 10) với: x(t) = e-|t|
>> t = linspace(-10,10,5000);
>> x = exp(-(abs(t)));
>> x1 = exp(-(abs(2*t)));
>> x2 = exp(-(abs(0.5*t)));
>> plot(t,x,'b','linewidth',2); hold on;
>> plot(t,x1,'k--','linewidth',2);
>> plot(t,x2,'r:','linewidth',2);
>> legend('x(t)', 'x(t-2)', 'x(t+2)');
>> grid on
about:blank 7/14
18:17 26/12/2023 Báo-cáo-THHT-bài-1 - báo cáo
Bài 3: Vẽ đồ thị của các hàm số sau trên cùng một đồ thị: xt và x-t (giả sử 10 t
10) với: x(t) = e-|t|
>> t = linspace(-10,10,5000);
>> x = exp(-(abs(t)));
>> x1 = exp(-(abs(-t)));
>> plot(t,x,'b','linewidth',2); hold on;
>> plot(t,x1,'k--','linewidth',2);
>> legend('x(t)', 'x(-t)');
>> grid on
about:blank 8/14
18:17 26/12/2023 Báo-cáo-THHT-bài-1 - báo cáo
This is a preview
nb=A*exp(-0.5*t).*cos(2*pi*Fb*t);
n=A*exp(-0.5*t).*cos(2*pi*Fj*t); Do you want full access? Go
Premium
song=[nc nc ng ng na na ng n n nf nf ne ne nd nd nc n n]; and unlock all 14 pages
sound(song,Fs)
end
>>ti Access to all documents
Bài 2: Chuỗi Fourier của kèn:
a. >> t=linspace(0,1,44100); F=494; Get Unlimited Downloads
>> A=[0.1155 0.3417 0.1789 0.1232 0.0678 0.0473 0.0260 0.0065 0.0020];
>> ph=[-2.1299 1.6727 -2.5454 0.6607 -2.0390 2.1597 -1.0467 1.8581 -2.3925];
Improve your grades
>> f=[F 2*F 3*F 4*F 5*F 6*F 7*F 8*F 9*F]; >> x=A*cos(2*pi*f'*t-ph'*ones(1,44100))
>>sound(x,44100);
>>subplot(2,1,1)
>>plot(t(1:200),x(1:200))
>>axis tight
>>grid on
Upload
b. Share your documents to
unlock
about:blank 9/14
18:17 26/12/2023 Báo-cáo-THHT-bài-1 - báo cáo
#FourierTransform.m
function [f,X]=FourierTransform(t, x)
ns=size(x, 2); dt=t(2) -t(1) ;
N=2*ns; df=1/(N*dt);
xp=zeros(1,N) ; nns=sum(t<0);
xp(1:ns-nns)=x(nns+1:ns); xp(N-nns+1:N)=x(1:nns);
Xf=dt*fft(xp); n2=ceil(N/2) ;
if n2==N/2; X(1:n2-1)=Xf(n2+2:N); X(n2:N)=Xf(1:n2+1);
f=(-n2+1)*df:df:n2*df; no=n2;
else ; X(1:n2-1)=Xf(n2+1:N); X(n2:N)=Xf(1:n2);
f=(-n2+1)*df:df:(n2-1)*df ; end ;
end
#IfourierTransform.m
function [t,x]=IFourierTransform(f,X)
ns=length(X); df=f(2)-f(1);
N=ns; dt=1/(N*df);
Xp=zeros(1,N); Xp(1:ns)=X;
nns=sum(f<0);
Xpp(1:ns-nns)= Xp(nns+1:ns); Xpp(N-nns+1:N)= Xp(1:nns);
xf=N*df*ifft(Xpp); n2= ceil(N/2);
if n2==N/2; x(1:n2-1) = xf(n2+2:N); x(n2:N) = xf(1:n2+1);
about:blank 10/14
18:17 26/12/2023 Báo-cáo-THHT-bài-1 - báo cáo
Chương trình main.m của MATLAB sau đây được sử dụng để vẽ tín hiệu điện tim và
phổ biên độ của nó.
%main.m
load hum3hb;
x=hb; tf=( size ( x, 2 ) - 1 )* T;
t=0:T:tf;
[f,Xf] = FourierTransform(t , hb);
figure(1);
subplot(2,1,1)
plot(t, x, ' linewidth ', 1 );
grid; axis( [0 2.5 -0.5 1.5] );
subplot(2,1,2)
plot( f, abs(Xf) , ' linewidth ' , 1);
grid; axis ( [-150 150 0 0.12] );
xlabel ( ' f (Hz) ' ); ylabel ( ' |X(f)| ' );
Câu hỏi 1:
Nhận xét:
about:blank 11/14
18:17 26/12/2023 Báo-cáo-THHT-bài-1 - báo cáo
This is a preview
+ Tín hiệu điện tim là tín hiệu tuần hoàn
+ Trên đồ thị phổ thấy những điểm nhiễu lân cận tạiDo tầnyou want
số f=0 (Hz) full access? Go
%main.m Premium and unlock all 14 pages
h = ( 568 * exp ( -300 * t) – 485 * exp(-243*t). *cos(176*t) + 668*exp(-243*t).
*sin(176*t) - 83*exp(-93*t).*cos(285*t) - 255*exp(- 93*t).*sin(285*t));
[f,Hf] = FourierTransform( t, h ); Access to all documents
figure(2)
subplot(2,2, [1 2] ) Get Unlimited Downloads
plot(t ,h , ' linewidth ' , 1 ); grid;
axis([0 0.5 -50 150]); Improve your grades
xlabel(' t (sec) ' ); ylabel( ' h(t) ' );
subplot(2,2,3)
plot(f, abs(Hf) ,'k' ,'linewidth' , 1 ); grid ;
axis([-150 150 0 1.2]);
xlabel( 'f (Hz) ' ) ; ylabel( ' |H(j2\pi f)| ' ); Upload
subplot(2,2,4) Share your documents to
angleH = unwrap(angle(Hf)) + 2*pi;
unlock
plot(f, angleH , ' k ' , ' linewidth ' , 1 ); grid;
axis ([-150 150 -10 10 ]);
xlabel( ' f (Hz) ' ); ylabel( ' \angle H(f) ' );
Free Trial
Get 7 days of free Premium
Nhận xét:
+ Đây là bộ lọc thông thấp
+Vùng tần số mà bộ lọc cho đi qua từ 0 (Hz) đến 100 (Hz)
Câu hỏi 2:
about:blank 12/14
18:17 26/12/2023 Báo-cáo-THHT-bài-1 - báo cáo
Yf=Xf.*Hf;
figure(3)
subplot (2,1,1)
plot( f ,abs(Yf) , ' r ' , ' linewidth ' , 1); grid;
axis([-150 150 0 0.12]);
xlabel ( ' f (Hz) ' ); ylabel( ' |Y(f)| ');
[t2,y] = IFourierTransform(f, Yf);
subplot(2,1,2)
plot(t2 , y , ' r ' , ' linewidth ' , 1); grid;
axis([0 2.5 -0.5 1.5]);
xlabel( 't (sec) ' ); ylabel( ' y(t) ');
Câu hỏi 3: Nhận xét về tác dụng của bộ lọc khi so sánh các đồ thị trong các Hình 1 và
Hình 3 là:
+Tác dụng của bộ lọc : khử tín hiệu nhiễu ở tần số cao( hạn chế những tín hiệu có tần số
lớn hơn 100 (Hz))
about:blank 13/14
18:17 26/12/2023 Báo-cáo-THHT-bài-1 - báo cáo
about:blank 14/14