604 C H A P T E R 10: Fourier Analysis of Discrete-Time Signals and Systems
FIGURE 10.9
Computation of
Fourier series
coefficients of different
periodic signals: the
corresponding
magnitude line
spectrum for each
signal is shown on
the right.
0 10 20 30
0102030
0102030
− 1
0
1
x[
n]
x^1
[n
]
x^2
[n
]
− 1 −0.5 0 0.5
− 1 −0.5 0 0.5
− 1 −0.5 0 0.5
0
0.2
0.4
− 1
0
1
0
0.2
0.4
0.6
− 1
0
1
n
0
0.1
0.2
ω/π
|X
(e
jω
)|
|X
( 1
e
jω
)|
|X
( 2
e
jω
)|
that of a period or of multiples of a period. Notice that the MATLAB functionsignis used to generate
a periodic train of pulses from the cosine function. The need to divide by the number of periods used
will be discussed later in section 10.4.3.
%%%%%%%%%%%%%%%%%%%%%%%%%
% Fourier series using FFT
%%%%%%%%%%%%%%%%%%%%%%%%%
N = 10; M = 10; N1 = M∗N;n = 0:N1 - 1;
x = cos(2∗pi∗n/N); % sinusoid
x1 = sign(x); % train of pulses
x2 = x - sign(x); % sinusoid minus train of pulses
X = fft(x)/M;X1 = fft(x1)/M;X2 = fft(x2)/M; % ffts of signals
X = X/N;X1 = X1/N;X2 = X2/N; % FS coefficients
10.3.4 Response of LTI Systems to Periodic Signals
Letx[n], a periodic signal of periodN, be the input of an LTI system with transfer functionH(z). If the Fourier
series ofx[n]is
x[n]=
N∑− 1
k= 0
X[k]ej(kω^0 )n ω 0 =
2 π
N
fundamental frequency