Frequency Analysis of Signals and Systems

ECE 308 -13
Frequency Analysis of Signals and Systems
Z. Aliyazicioglu
Electrical and Computer Engineering Department
Cal Poly Pomona
Frequency Analysis of Signals and Systems
The Fourier Series for Discrete-Time Periodic Signals
The Fourier representation of signal maps the signal into frequency
domain.
The Fourier transform provides a different way to interpret signals
and systems.
It is useful for convolution operation in time domain maps into
multiplication in frequency domain
It gives us information about system or signal characteristic of
behavior
ECE 308-13 2
1
Frequency Analysis of Signals and Systems
The Fourier Series for Discrete-Time Periodic Signals
A given periodic sequence x(n) with period N, that is x(n)=x(n+N)
The Fourier representation of x(n) can be expressed as
N −1
x ( n ) = ∑ ck e j 2π kn / N
,
k =0
where ck ara the coefficients in the series representation. This
equation is called the Discrete-time Fourier Series (DTFS)
The Fourier coefficients {ck }, k = 1,2,..., N − 1 provides the description
of x(n) in the frequency domain
ck =
1
N
N −1
∑ x (n )e
− j 2π kn / N
n =0
ECE 308-13 3
Frequency Analysis of Signals and Systems
ck represents the amplitude and phase associated with the
frequency component
sk = e j 2π kn / N = e jωk n
where
ω k = 2π k / N
The function Sk are periodic with period N. Hence
sk (n ) = sk (n + N )
So, that
ck + N =
1
N
N −1
∑ x ( n )e
n =0
− j 2π ( k + N ) n / N
=
1
N
N −1
∑ x ( n )e
n =0
− j 2π kn / N
= ck
Therefore,ck is periodic sequence with fundamental period N.
Instead of focusing in periodic range k=0,1,…, N-1 in frequency
2π k
domain 0 < ω k = N < 2π for 0<k<N-1, We do in range of
2π k
N
N
−π < ω k =
< π , which corresponds to − < k <
N
2
2
ECE 308-13 4
2
Frequency Analysis of Signals and Systems
Example:
Determine the spectra of the following signal
x (n ) = cos
πn
ω0 =
3
π
3
f0 =
1
6
Hence x(n) is periodic with fundamental period N=6
ck =
1
N
N −1
∑ x (n )e
− j 2π kn / N
n =0
x (n ) = cos
πn
3
=
1 5
∑ x(n)e− j 2π kn / 6 , k = 0,1,...,5
6 n =0
1
1
= e j 2π n / 6 + e − j 2π n / 6
2
2
c−1 = c5
e j 2π n / 6 = e j 2π (5−6) n / 6 = e j 2π 5n / 6 which means that
ck =
1 5
nπ
∑ cos( 3 )e− j 2π kn / 6 , k = 0,1,...,5
6 n =0
ECE 308-13 5
Frequency Analysis of Signals and Systems
Example:(cont)
1
π
2π − j 2π k 2 / 6
3π
ck = (1 + cos e − j 2π k / 6 + cos
e
+ cos e − j 2π k 3/ 6
6
3
3
3
4π − j 2π k 4 / 6
5π − j 2π k 5/ 6
) , k = 0,1,...,5
+ cos
e
+ cos e
3
3
c0 = 0
c1 =
1
2
c2 = 0
c3 = 0
c4 = 0
c5 =
1
2
% Find the Fourier Series coefficients of x(n)=cos(pi n/3)
for k=1:6
c(k)=0;
for n=1:6
c(k)=c(k)+cos(pi*(n-1)/3)*exp(-j*2*pi*(k-1)*(n-1)/6);
end
c(k)=c(k)/6;
end
for k=1:6;
rats(c(k))
end
.
ECE 308-13 6
3
Frequency Analysis of Signals and Systems
Example:
Determine the spectra of the following periodic signal
with period N=4
x ( n ) = {1,1,0,0}
ck =
1
N
N −1
∑ x ( n )e
− j 2π kn / N
n =0
=
1 3
∑ x(n)e− j 2π kn / 4 , k = 0,1, 2,3
4 n =0
1
ck = (1 + e − j 2π k / 4 ) , k = 0,1,2,3
4
c0 =
1
2
1
c1 = (1 − j )
4
c0 =
1
2
c1 =
c3 =
2
4
1
4
c2 = 0 c3 = (1 + j )
2 (c = − π
1
4
4
(c3 =
c2 = 0
π
4
ECE 308-13 7
Frequency Analysis of Signals and Systems
Fourier Transform for DT
The Fourier transform of a finite-energy discrete time signal x(n)
is defined as
∞
X (ω ) =
∑ x(n)e
− jω n
n =−∞
X(ω) signal is periodic with period 2π
,
∞
X (ω + 2π k ) =
∑ x(n)e
− j (ω + 2π k )n
∑ x(n)e
− jω n − j 2π kn
∑ x(n)e
− jω n
n =−∞
∞
X (ω + 2π k ) =
n =−∞
∞
X (ω + 2π k ) =
e
= X (ω )
n =−∞
The inverse Fourier transform of discrete-time signal is
x (n ) =
1
2π
π
∫ X (ω )e
−π
jω n
dω
ECE 308-13 8
4
Frequency Analysis of Signals and Systems
Properties of the Fourier Transform for DT
Properties
Time Domain
Frequency Domain
Notation
x(n ), x1(n ), x2 (n)
Linearity
ax1(n) + b x2 (n)
Time Shifting
x(n − k )
Time Reversal
X (ω ), X1(ω ), X 2 (ω )
aX1(ω ) + bX 2 (ω )
e − jω k X (ω )
X ( −ω )
x( −n)
Convolution
X1(ω ) X 2 (ω )
x1(n) * x2 (n)
rx1x2 (l ) = x1(l ) * x2 (−l )
Correlation
Sx1x2 = X1(ω )X 2 (−ω ) = X1(ω )X 2* (ω )
e j ω0 n x ( n )
Frequency Shifting
X (ω − ω0 )
1
1
X (ω + ω0 ) + X (ω − ω0 )
2
2
x1(n)cos ω0 n
Modulation
Multiplication
1
2π
x1(n)x2 (n)
Differentiation in
Frequency domain
*
nx(n)
∞
Parseval’s Theorem
∫ X (λ )X (ω − λ ) d λ
1
−π
j
x (n )
Conjugation
π
2
dX (ω )
dω
X * (−ω )
π
∑ x (n)x (n) = 2π ∫ π X (ω )X (ω )dω
1
1
*
2
−
n =−∞
1
*
2
ECE 308-13 9
Frequency Analysis of Signals and Systems
Example:
a n
x1(n) = 
 0
∞
X1(ω ) =
∑
x(n) = 0.8
n≥0
=
x(n)e − jω n =
1
1 − 0.8e − jω
∞
X 2 (ω ) =
∑ x(n)e
n =−∞
∞
=
− jω n
n =1
∞
∑
0.8n e − jω n =
n =0
jω
n
=
x(n) = x1(n) + x2 (n)
n<0
n≥0
∞
∑(0.8e
− jω n
)
n =0
e
e jω − 0.8
−1
=
∑ 0.8
n =−∞
∑(0.8e ω )
j
=
−∞ < n < ∞
a − n
x2 (n ) = 
 0
n<0
n =−∞
n
− n − jω n
e
−1
=
∑ (0.8e ω )
j
−n
n =−∞
0.8e jω
1 − 0.8e jω
ECE 308-13 10
5
Frequency Analysis of Signals and Systems
Example: (cont)
X (ω ) = X1(ω ) + X 2 (ω ) =
1
1 − 0.8e − jω
+
0.8e jω
1 − 0.8e jω
=
1 − 0.82
1 − 2(0.8)cos ω + 0.82
n=-20:20;
x=0.8.^abs(n);
stem (n,x)
xlabel ('n')
ylabel ('x(n)')
title ('x(n) sequence')
figure;
w=-2*pi:0.1:2*pi;
y=(1-0.8^2)./(1-2*0.8*cos(w)+0.8^2);
plot (w,y);
xlabel ('\omega')
ylabel ('y(\omega)')
title ('Fourier transform of x(n)
sequence')
(Fourier1.m)
ECE 308-13 11
Frequency Analysis of Signals and Systems
Example:
x(n) = 0.5
n
−∞ < n < ∞
n=-20:20;
b=0.5
x=b.^abs(n);
stem (n,x)
xlabel ('n')
ylabel ('x(n)')
title ('x(n) sequence')
figure;
w=-2*pi:0.1:2*pi;
y=(1-b^2)./(1-2*b*cos(w)+b^2);
plot (w,y);
xlabel ('\omega')
ylabel ('y(\omega)')
title ('Fourier transform of x(n) sequence')
(Fourier2.m)
X (ω ) =
1 − 0.52
1 − cos ω + 0.52
ECE 308-13 12
6
Frequency Analysis of Signals and Systems
Example: (cont)
X (ω ) =
1 − 0.52
1 − cos ω + 0.52
ECE 308-13 13
Frequency Analysis of Signals and Systems
Example:
x(n) = 0.5n
∞
X (ω ) =
∑ x(n)e
0<n<∞
− jω n
n =−∞
=
1
1 − 0.5e − jω
=
∞
=
∑0.5 e
n =0
jω
n − jω n
∞
=
∑(0.5e
− jω n
)
n =0
e
e jω − 0.5
ECE 308-13 14
7
Frequency Analysis of Signals and Systems
Example: (cont)
n=-0:20;
b=0.5
x=b.^abs(n);
stem (n,x)
xlabel ('n')
ylabel ('x(n)')
title ('x(n) sequence')
figure;
w=-2*pi:0.1:2*pi;
X=exp(j*w)./(exp(j*w)-b);
subplot (2,1,1)
plot (w,abs(X));
xlabel ('\omega')
ylabel ('X(\omega)')
title ('Fourier transform of x(n) sequence')
subplot (2,1,2);
plot (w,phase(X));
xlabel ('\omega')
ylabel ('Phase (X(\omega))')
title ('Fourier transform of x(n) sequence')
Fourier3.m
ECE 308-13 15
Frequency Analysis of Signals and Systems
Example:
∞
X (ω ) =
∑ x(n)e
− jω n
n =−∞
=
1
1 + 0.5e − jω
=
x(n) = ( −0.5 ) u(n)
n
∞
=
∑(−0.5) e
n =0
jω
e
e jω + 0.5
n − jω n
∞
=
∑(−0.5e
n =0
− jω n
)
n=0:20;
b=-0.5
x=b.^n;
stem (n,x)
xlabel ('n')
ylabel ('x(n)')
title ('x(n) sequence')
figure;
w=-2*pi:0.1:2*pi;
X=exp(j*w)./(exp(j*w)-b);
subplot (2,1,1)
wpi=w/pi;
plot (wpi,abs(X));
xlabel ('\omega/\pi')
ylabel ('X(\omega)')
title ('Fourier transform of x(n)
sequence')
subplot (2,1,2);
plot (wpi,phase(X));
xlabel ('\omega/\pi')
ylabel ('Phase (X(\omega))')
title ('Fourier transform of x(n)
sequence')
ECE 308-13 16
8
Frequency Analysis of Signals and Systems
Example: (cont)
ECE 308-13 17
Frequency Analysis of Signals and Systems
2 0 ≤ n ≤ 5
x(n ) = 
0 otherwise
Example:
∞
X (ω ) =
∑ x(n)e
− jω n
n =−∞
=2
e
e
− j 3ω
− jω / 2
5
=
∑ 2e
− jω n
n =0
j 3ω
− j 3ω 
=2
1 − e − j 6ω
1 − e − jω
5
e
−e

 = 2e − j 2 ω sin3ω
sinω / 2
 e jω / 2 − e − jω / 2 


n=0:10;
x=2*(n>=0 & n<=5);
stem (n,x)
xlabel ('n')
ylabel ('x(n)')
title ('x(n) sequence')
figure;
w=-2*pi:0.01:2*pi;
X=2*(1-exp(-j*6*w))./(1-exp(-j*w));
subplot (2,1,1)
wpi=w/pi;
plot (wpi,abs(X));
xlabel ('\omega/\pi')
ylabel ('X(\omega)')
title ('Fourier transform of x(n)
sequence')
subplot (2,1,2);
plot (wpi,phase(X));
xlabel ('\omega/\pi')
ylabel ('Phase (X(\omega))')
title ('Fourier transform of x(n)
sequence')
ECE 308-13 18
9
Frequency Analysis of Signals and Systems
Example: (cont)
ECE 308-13 19
10