Materiały pomocnicze do ćwiczeń laboratoryjnych z przedmiotu

advertisement
Signals&Systems Laboratory IFE 2013/2014
1
Experiment 4.
Fourier Transform.Theory and applications.
Introduction
1.1. Fourier Transform definitions.
Fourier transform is an extension of the Fourier series approach to arbitrary signals. It
enables us to investigate signal properties in frequency domain.
Consider a signal x(t). Equations:

X  j    xt  e  jt dt

(1)

1
jt


xt  
X
j

e
d

2  
(2)
constitute the Fourier transform pair. X(j) is called the Fourier transform of the time
function x(t), whereas x(t) is the inverse Fourier transform of X(j).
Let us consider a rectangular pulse shown in Fig.1.
x(t)
A
-2
1
-1
2
+a/2
-a/2
to-a/2
3
4
to
Fig.1
To find the Fourier transform of this signal (with to=0), we use (1)
ZUiSN PŁ
copyrights mhonwia
5
to+a/2
t
s
Signals&Systems Laboratory IFE 2013/2014
X  j  
a
2


Ae  jt dt  
a
2
a
A  j t 2
e
a
j

2
2
a
a
j
 j
a
a
2 e
2
j 
A   j 2
2
A
e

e
e 2  

 
j 
2j


(3)
1
sin a
2 A a
 a 

sin
 aA 2
 aA  sin c  .
1

2
 2 
a
2
For any real value of to we obtain:
X  j  
a
to
2

a
 to
2
A
Ae  jt dt   e  jt
j
a
2
a

2

a

a


j  to  
A   j  2 to 
2
   aAe  jto  sin c a  .

e

e
 

j 
 2 


(4)
1.2. How to compute and visualize Fourier transform?
Matlab&Simulink computer environment gives us few possibilities. The simplest
method is based on symbolic calculations.
From Matlab help files:
fourier Fourier integral transform:
Syntax
F = fourier(f)
F = fourier(f,v)
F = fourier(f,u,v)
Description
F = fourier(f) is the Fourier transform of the symbolic scalar f with default independent
variable x. The default return is a function of w. The Fourier transform is applied to a
function of x and returns a function of w.
F = fourier(f,v) makes F a function of the symbol v instead of the default w.
F = fourier(f,u,v) makes f a function of u and F a function of v instead of the default
variables x and w, respectively.
Then, using Matlab substitution command subs , the frequency magnitude and angle
spectra of CFT (Continuous Fourier Transform) may be plotted.
ZUiSN PŁ
copyrights mhonwia
Signals&Systems Laboratory IFE 2013/2014
3
EXAMPLE
Suppose, that signal x(t) is given by
xt   te 3t , t  0
Compute the Fourier transform X(jω) and plot for -25<=ω<=25rad/s
a) the magnitude of X(jω):
X  j 
b) the angle of X(jω):
X  j 
c) the real part of X(jω),
d) the imaginary part of X(jω).
SOLUTION
m-file
% Exemplary program for plotting Fourier transform spectrum
(magnitude,
% angle, real and imaginary parts)
syms t w
% definition of variables
x=t*exp(-3*t)*heaviside(t);
% signal in time domain
X=fourier(x,w)
% Fourier transform
w=-25:.1:25;
% angular frequency
interval
X=subs(X,w);
% setting frequency
interval into Fourier transform
subplot(2,2,1)
plot(w,abs(X));grid on
legend('magnitude |X(jw)|')
subplot(2,2,2)
plot(w,angle(X));grid on
legend('angle <X(jw)')
subplot(2,2,3)
plot(w,real(X));grid on
legend('real of X(jw)')
subplot(2,2,4)
plot(w,imag(X));grid on
legend('imaginary of X(jw)')
result:
X=
1/(i*w + 3)^2
ZUiSN PŁ
copyrights mhonwia
Signals&Systems Laboratory IFE 2013/2014
4
0.12
3
magnitude |X(jw)|
angle <X(jw)
0.1
2
0.08
1
0.06
0
0.04
-1
0.02
-2
0
-25
-20
-15
-10
-5
0
5
10
15
20
25
0.12
-3
-25
-20
-15
-10
-5
0
5
10
15
20
25
0.08
imaginary of X(jw)
real of X(jw)
0.06
0.1
0.04
0.08
0.02
0.06
0
0.04
-0.02
0.02
-0.04
0
-0.02
-25
-0.06
-20
-15
-10
-5
0
5
10
15
20
25
-0.08
-25
-20
-15
-10
-5
0
5
10
15
20
25
If Symbolic Math Toolbox is not present, Fourier transform computations in Matlab may
be easily implemented using the standard fft function. The following exemplary code
illustrates that and may become a core of the general program enabling us to plot Fourier
transform scpectra:
X=fft(x);
% vector x contains values of the signal after discretization
X=fftshift(X);
% center frequency
Xmag=abs(X);
Xmag=Xmag/max(Xmag);
% normalization of amplitude
Xangle=(180/pi)*angle(X);
F=[-length(X)/2:(length(X)/2)-1]*fs/length(X);
subplot(2,1,1);stem(F,Xmag);grid on;
subplot(2,1,2);stem(F,Xangle);grid on;
ZUiSN PŁ
copyrights mhonwia
Signals&Systems Laboratory IFE 2013/2014
5
2. Laboratory work
2.1. FOURIER TRANSFORM
2.1.1.
Consider the signal shown in Fig.1. Plot the Fourier transform (amplitude
and phase spectrum) in terms of angular frequency. Use the MATLAB
command fourier . Compare result with the formula (4). Changing to (time
delay), a and A (scaling factors) observe what happens to the spectrum
(magnitude, angle).
2.1.2.
Write m-function enabling to find Fourier transform of time signals
using fft approach. Check your program using rectangle pulse from
previous point.
2.1.3.
Consider two signals described as follows:
t  1, for  2  t  0
t  1, for 0  t  2


x1 (t )  1 for 0  t  2
, x2 (t )  1 for 2  t  4 ,
0 elsewhere
0 elsewhere


Plot the signals, compute Fourier transforms, plot spectra. Compare results,
write comments.
Formulate and confirm the following properties of Fourier Transform:
Linearity
Remark: Use x(t)=exp(-3t)*u(t), x2(t)=t*exp(-t)*u(t) as exemplary
signals
Time shifting
Remark: Use x(t)=cos(t) as an exemplary signal
Frequency shifting
Remark: Use x(t)=t3 as an exemplary signal, ωo=2
Scaling in time
Remark: Use any rectangle pulse as exemplary signal.
Differentiation and integration in time
Remark: Use x(t)=exp(-3t)*u(t) for differentiation , x(t)=exp(t)*u(-t)
+exp(-t)*u(t) for integration
Convolution in time
Remark: Try to convolve any rectangle pulse with triangle signal.
2.1.4.
2.1.4.1.
2.1.4.2.
2.1.4.3.
2.1.4.4.
2.1.4.5.
2.1.4.6.
ZUiSN PŁ
copyrights mhonwia
Signals&Systems Laboratory IFE 2013/2014
6
2.1.5.
Compute, calculate (using the Fourier transform definition and
properties) and plot the Fourier transform (magnitude and angle spectrum) of the
signal:
 A, for t1  t  t 2 ,

 B for t 2  t  t3 ,
x (t )  
C for t3  t  t 4;
0 elsewhere.

2.2.
TRANSMITANCE (NETWORK FUNCTION). Amplitude
and phase spectrum.
2.2.1.
For the signal shown in Fig.2 supplying the two-ports from Fig.3
(a and b) find spectrum of the output signals and network
functions (data: R=….., C=……F, =…..s).
Calculate and plot impulse responses.
Compare results obtained by use of your programs with these from
Matlab command line.
How does the values of R and C affect
a) frequency response of the network?
b) output signals spectrum?
v (t)
I
A
-2
-1
1
2
t
3
5
4
Fig.2
C
R
v
i
C
Fig.3a
ZUiSN PŁ
copyrights mhonwia
vo
vi
R
Fig.3b
t
s
Signals&Systems Laboratory IFE 2013/2014
7
2.3. AMPLITUDE MODULATION
One of the most important problem in signal processing is to transmit a signal
over a channel being cable or free space. Many reasons cause the
impossibility of transmitting a signal directly: large sizes of the required
antennas and transmitters (costs!!!), interference from other signals. Hence,
the original signal must be converted into an different form. The process of
conversion is known as modulation and amplitude modulation (AM) seems to
be one of the most popular and easy to implement methods. Let us analyze
two different approaches of AM:
xM t   xI t  cos 0t .
(5)
xM t   1    xI t  cos 0t .
(6)
and
where
xI t  is a continuous signal called the message (required to be
transmitted),
2.3.1.
xC t   cos 0t a sinusoidal signal called the carrier.
Observe the amplitude spectrum of the modulated and information
signals(messages) if the message is:
a) xI t   A cos 1t o  .......... 1  ....... A  ........
b) Signal from Fig.1 with to=0, A=……., a=……..
.Apply m-scripts prepared for Task 2.1.2 (Matlab 5.3 and Matlab 2009b
users) or Simulink models (only Matlab 5.3) users. Answer following
questions:
1) How does type of modulation affect modulated signals?
2) What are the names, advantages and disadvantages of the
modulation methods described by formulas (5) and (6)?
3) Comment the relation between  (0<<1) and amplitude
spectrum.
ZUiSN PŁ
copyrights mhonwia
Signals&Systems Laboratory IFE 2013/2014
Fig.4. Exemplary Simulink implementation (modulation type I)
Fig.5. Exemplary Simulink implementation (modulation type II)
ZUiSN PŁ
copyrights mhonwia
8
Download