Sunteți pe pagina 1din 49

CHAPTER 1 Fourier Analysis

1.1 Continuous-Time Fourier Series (CTFS)


1.2 Properties of CTFS
1.2.1 Time-Shifting Property
1.2.2 Frequency-Shifting Property
1.2.3 Modulation/Windowing Property
1.3 Continuous-Time Fourier Transform (CTFT)
1.4 Properties of CTFT
1.4.1 Linearity
1.4.2 Conjugate Symmetry
1.4.3 Real Translation (Time Shifting) and
Complex Translation (Frequency Shifting)
1.4.4 Real Convolution and Correlation
1.4.5 Complex Convolution Modulation/Windowing
1.4.6 Duality
1.4.7 Parseval Relation Power Theorem
1.5 Discrete-Time Fourier Transform (DTFT)
1.6 Discrete-Time Fourier Series (DTFS) DFS/DFT
1.7 Sampling Theorem
1.7.1 Relationship between CTFS and DFS
1.7.2 Relationship between CTFT and DTFT
1.7.3 Sampling Theorem
1.8 Power, Energy, and Correlation
1.9 Lowpass Equivalent of Bandpass Signals
CHAPTER OUTLINE
1.1 CONTINUOUS-TIME FOURIER SERIES (CTFS)
0
0
1
2
( ) ( : the period of ( )) (1.1.1a) with
jk t
k k
x t X e P x t
P P
w
p
w

=-
= =

( )
0

Integral over one period ( ) (1.1.1b)
jk t
k
P
X x t e dt P
e
=
}
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
{
( ) ( ) where (E1.1.1)
1 for | | / 2( : an integer)
( )
0 elsewhere
D D
x t A r t
t mP D m
r t =
s
=
0 0 0
0 0
/ 2 / 2 / 2
(1.1.1b)
- / 2 - / 2 - / 2
0
/ 2 / 2
0
0 0
(E1.1.2)
( )
sin( / 2)
sinc
/ 2
P D D
jk t jk t jk t
k D
D P D
jk D jk D
A
X A r t e dt A e dt e
jk
k D e e D
AD AD AD k
jk D k D P
e e e
e e
e
e
e e

= = =

| |
= = =
|
\ .
} }
0 0
(1.1.1a)
1
( ) (E1.1.3) sinc
jk t jk t
k
k k
AD
x t
P P
D
X e k e
P
e e

= =
=
| |
=
|
\ .



(Example 1.1) CTFS Spectra of a Rectangular (Square) Wave and a Triangular Wave
(a) Spectrum of a Rectangular (Square) Wave (Figs. 1.1(a1) and (a2))
{
( ) ( ) where (E1.1.4)
1 / for | | ( : an integer)
( )
0 elsewhere
D D
x t A t
t D t mP D m
t A
s
= A =
( )
0
/ 2
(1.1.1b)
(E1.1.4)
0
ven function E
- / 2 0
0 0 0
0
0 0 0
0 0
0 0
2 2
0 0
0
(D.
( ) 2 (1 ) cos( )
2 sin( ) sin( ) sin( )
2
2 2
cos( ) 1 cos( )
( ) ( )
P D
jk t
k D
P
D
D
D
D
t
X A t e dt A k t dt
D
A k t k t k t
A t dt
D k k k
A A
k t k D
D k D k
e
e
e e e
e e e
e e
e e

= A =
=

= =
=
| |
|
\ .
} }
}
2
30)
2
0
2
0
(E1.1.5)
sin ( / 2)
sinc
( / 2)
k D D
AD AD k
P k D
e
e
| |
=
|
\ .
0 0
(1.1.1a) (E1.1.5)
2
1
( ) (E1.1.6) sinc
jk t jk t
k
k k
x t
P
AD D
X e k e
P P
e e
= =
| |
= =
|
\ .



(b) Spectrum of a Triangular Wave (Figs. 1.1(b1) and (b2))
where (E1.1.7) ( ) ( ) ( ) is a unit impulse function
T m
t t mT t o o o

=
=

0 0
0
0
(1.1.1 ) ( ) b E1.1.7 / 2 / 2
/ 2 / 2
/ 2 / 2
0
- / 2 - / 2
(E1.1.8)
( ) ( )
( ) ( ) 1
T T
jk t jk t
T k m
T T
T T
jk t
jk t
t
T T
D t e dt t mT e dt
t e dt t dt e
e e
e
e
o o
o o

=


=
= =
= = =

} }
} }
0 0
(1.1.1a) (E1.1.8)
0
(E1.1.9)
1 1 2
( ) with
jk t jk t
k T k k
t D e e
T T T
e e
t
o e

= =
= = =



(c) Spectrum of an Impulse Train (Figs. 1.1(c1) and (c2))
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
function [Xk,kk,xht,tt]=CTFS(x,P,N,ng)
if nargin<4, ng=221; end
if nargin<3, N=10; end
kk=[-N:N]; w0=2*pi/P;
T=2*P; tt=[-T:T/100:T];
xejkw=[x '(t).*exp(-j*k*w0*t)'];
xejkwt=inline(xejkw,'t','k','w0');
tol=0.001;
for k=0:N
X(k+1)=quadl(xejkwt,-P/2,P/2,tol,[],k,w0); % CTFS spectrum (1.1.1b)
end
Xk = [conj(X(N+1:-1:2)) X]; % to make the spectrum symmetric
X_mag = abs(Xk); % Xph= angle(Xk);
k=1:N; jkw0t=j*k.'*w0*tt;
% Approximate representation by Eq. (1.1.1a)
xht = (2*real(X(k+1)*exp(jkw0t))+X(1))/P;
% Original signal
xt = feval(x,tt);
if nargout<1
subplot(ng), plot(tt,xt,'k-', tt,xht,'b:')
axis([tt([1 end]) -0.2 1.2])
title('x(t) and xt=ICTFS(X(k)) up to Nth order')
subplot(ng+1), stem(kk,X_mag,'MarkerSize',5,'LineWidth',1)
set(gca,'fontsize',9)
axis([kk([1 end]) -0.2 1.2]), title('CTFS Spectrum |X(k)|')
end
( )
0
0
(1.1.1a)
*
0
1
Afinitenumber of terms
1
2
:
1
( ) with (1.1.2)
N jk t N
jk t
k k k N
k k k
X
P
x t X e X e X X
P
Fourier reconsruction
w
w
= -
= -
= + = =


0
/ 2
(1.1.1b)
/2
( )
P
jk t
k
P
X x t e dt
e

=
}
Time Function to take the CTFS of
Period of x(t)
Number of CTFS Reconstruction
( )
0
0
1
1
2 ( )
N
jk t
k
k
X
P
x t X e
w
=
= +

1 2
[ ]
N
X X X L
0 0
0 0
0 0
1 (1) 1 ( 2)
2 (1) 2 ( 2)
(1) ( 2)
j tt j tt
j tt j tt
jN tt jN tt
e e
e e
e e
w w
w w
w w







L
L
MMM
M M
L
0 0
0 0
0 0
1 (1) 1 (2)
2 (1) 2 (2)
(1) (2)
j tt j tt
j tt j tt
jN tt jN tt
w w
w w
w w








L
L
MMM M M
L
1
2
j
j
jN







M
0 0
(1) (2) tt tt w w


L
%dc01e01.m
%plots the CTFS spectra of rectangular/triangular waves
clear, clf
global P D
N=10; % Highest order of CTFS coefficient and representations
D=1; P=2; CTFS('rD_wave',P,N/2,221);
w0=2*pi/P; k1=linspace(-N/2,N/2);
RD1=sinc(k1*w0*D/2/pi); % Spectrum
hold on, plot(k1,abs(RD1),':') % Envelope for the spectrum
axis([-N/2 N/2 -0.2 1.2])
P=2; CTFS('tri_wave',P,N/2,223);
w0=2*pi/P;
Tri=sinc(k1*w0*D/2/pi); Tri1=Tri.*Tri; % Spectrum
hold on, plot(k1,Tri1,':') % Envelope for the spectrum
axis([-N/2 N/2 -0.2 1.2])
function x=rD_wave(t)
global P D
tmp=min(abs(mod(t,P)),abs(mod(-t,P)));
x=(tmp<=D/2);
function x=tri_wave(t)
global P D
tmpp=abs(mod(t,P)); tmpn=abs(mod(-t,P)); tmp=min(tmpp,tmpn);
x=(tmp<=D).*(1-tmp/D);
(E1.1.4)
1 for | | ( : an integer)
( )
0 elsewhere
D
t
t mP D m
t
D

s
A =

(E1.1.1)
1 for | | ( : an integer)
( )
2
0 elsewhere
D
D
t mP m
r t

s
=

>>dc01e01
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
(Example 1.2) CTFS Spectra of a Sine/Cosine Wave
(a) Spectrum of a Sine Wave
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
1 0 1 0
( a) D.41
1 0
(E1.2.1)
1
( ) sin( ) ( )
2
jk t jk t
x t k t e e
j
e e
e

= =
{
1 1
1 1
(E1.2.2) , ; ( [ ] [ ] )
2 2 2
1 for 0
with [ ]
0 elsewhere
k k k
P P P
X X X k k k k
j j j
k
k
o o
o

= = = +
=
=


0
(1.1.1a) 1
Matchingthisequation with theCTFSrepresentation ( ) yields
jk t
k k
x t X e
P
w
= -
=

(b) Spectrum of a Cosine Wave
1 0 1 0
( ) D.41b
1 0
(E1.2.3)
1
( ) cos( ) ( )
2
jk t jk t
x t k t e e
e e
e

= = +
1 1
1 1
(E1.2.4) , ; ( [ ] [ ] )
2 2 2
k k k
P P P
X X X k k k k o o

= = = + +
1.2 PROPERTIES OF CTFS
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
1.2.1 Time-Shifting Property
0 1
1
(1.2.1) ( )
jk t
k
x t t e X
w -
-
F
1.2.2 Frequency-Shifting Property
1 0
1

(1.2.2) '( ) ( )
jk t
k k
x t x t e X
w
-
=
F
1.2.3 Modulation Property

(1.2.3)
1 1
( ) ( )

k k n k n
n
x t y t X Y X Y
P P

-
= -
* =

F
1.3 CONTINUOUS-TIME FOURIER TRANSFORM (CTFT)
0 0
(1.1.1a)
0 0 0
1 1
( )
2
2
( ) with (1.3.1a)
jk t jk t
P k
k k
x t k
P
X e X j e
P
e e
e e
t
t
e

= =
= = =

0

(1.1.1b)
0

( ) ( ) (1.3.1b)
jk t
k P
P
k x X j X t e dt
e
e

= =
}
0 0 0
Noting that ( ) ( ) & 0 as and letting &
P
x t x t P d k w w w w w = = %

-
( ) { ( )} ( ) : CTFT (1.3.2a)
j t
X x t x t e dt
e
e

= =
}
F

1 2
- -
1
( ) { ( )} ( ) ( ) : ICTFT (1.3.2b)
2
j t j f t
x t X X e d X f e df
e t
e e e
t


= = =
} }
F
[Remark 1.1] Physical Meaning of CTFT
In the case where a time function represents a continuous-time signal, its CTFT is
the spectrum showing what frequency contents constitutes the signal, or equivalently, how the
frequency components are distributed over the frequency .
In the case where represents the impulse response of a continuous-time LTI system, i.e.,
the output of an LTI system to an impulse input signal , its CTFT is the frequency
response showing how the system responds to each frequency component of the input signal.
( ) x t ( ) X w
( ) g t
( ) t d ( ) G w
w
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
(Example 1.3) CTFT Spectra of a Rectangular (Square) Pulse and a Triangular Pulse(a)
(a) Spectrum of a Rectangular (Square) Pulse
{ } {
( ) ( )
1 for 0
( ) ( ) with ( ) (E1.3.1)
0 elsewhere
2 2
s s
D s
x t A r t A
D D
t
u t u t u t = =

+ - - =
( )
/ 2 / 2 (1.3.2a)
/ 2
- / 2
/ 2 / 2
( ) D.41a
( ) { ( )} ( )
sin( / 2)
sinc (E1.3.2)
/ 2 2
D D
j t j t
j t
D
D
D
j D j D
A
X x t Ar t e dt A e dt e
j
e e D D
AD AD AD
j D D
w w
w
w w
w
w
w w
w w p

- -
-
- -
-
= = = =
-
-
= = =

F
This is what would be obtained by replacing with in Eq. (E1.1.2) and its magnitude
curve called the magnitude spectrum is the envelope depicted in Fig. 1.1(a1)/(a2).
0
kw e
(b) Spectrum of a Triangular Pulse
{
( ) ( ) with
1 / for | |
( ) (E1.3.3)
0 elsewhere
D D
x t A t
t D t D
t = A
s
A =
2
2
2
sin ( / 2)
( ) sinc (E1.3.4)
2 ( / 2)
D D
X AD AD
D
e e
e
t e
| |
= =
|
\ .
This is what would be obtained by replacing with in Eq. (E1.1.5) and its magnitude
curve called the magnitude spectrum is the envelope depicted in Fig. 1.1(b1)/(b2).
0
kw e
[Remark 1.2] CTFS and CTFT
(1) The (continuous) CTFT of a signal with finite duration and the (discrete)
CTFS of its periodic extension with period are related as follows:

(1.3.3)

(2) The interval between the discrete CTFS spectra, as the samples of the CTFT spectrum, is the
fundamental frequency and as the period increases, it gets lower,
making the CTFS more like the CTFT. See Figs. 1.1(a1)/(a2), 1.1(b1)/(b2), and 1.1(c1)/(c2).
(3) We often make use of the CTFS or CTFT to get the frequency characteristic of a signal
without knowing whether the signal is periodic or not. If the CTFS/CTFT spectra were
totally different, how confusing it would be! In this context, it is like a fortune that the CTFS
spectrum is the same as the samples of the CTFT spectrum.
0
0
( ) ( )
k
k
k X X j X
w w
w w
=
= =
) (e X ( ) x t D
k
X ( )
P
x t %
P D >
0
2 / P p w =
P
( ) x t
%dc01e03.m
% plots the CTFT spectra of rectangular/triangular waves
clear, clf
global D
D=1; CTFT('rD',D,221); CTFT('tri',D,223);
function x=rD(t)
global D
x=(-D/2<=t&t<=D/2);
function x=tri(t)
global D
tmp=abs(t); x=(tmp<=D).*(1-tmp/D);
>>dc01e03
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
function [Xk,kk,xht,tt]=CTFT(x,D,ng)
if nargin<3, ng=221; end
N=100;
kk=[-N:N]; dw=10*pi/(2*N+1);
T=5*D; tt=[-T:T/100:T];
xejkw=[x '(t).*exp(-j*k*w0*t)'];
xejkwt=inline(xejkw,'t','k','w0');
tol=0.001;
for k=0:N
X(k+1)=quadl(xejkwt,-D,D,tol,[],k,dw); % Eq.(1.3.2a)
if x()=='rD, Xw(k+1)=D*sinc(k*dw*D/2/pi);
elseif x()=='tr, Xw(k+1)=D*(sinc(k*dw*D/2/pi))^2;
end
end
Xk = [conj(X(N+1:-)) X]; % to make the spectrum symmetric
X_mag = abs(Xk); %Xph = angle(Xk);
Xwk = [conj(Xw(N+1:-)) Xw]; % to make the spectrum symmetric
Xw_mag = abs(Xwk);
k=1:N; jkwt=j*k.'*dw*tt;
xht = (real(X(k+1)*exp(jkwt))+X(1)/2)*dw/pi; % Eq.(1.3.2b)
xt = feval(x,tt);
if nargout<1
subplot(ng), plot(tt,xt,'k-', tt,xht,'b:')
title('x(t) and xh(t)=ICTFT(F(w)) upto Nth order')
axis([tt([1 end]) -0.5 1.5]), set(gca,'fontsize',9)
subplot(ng+1), plot(kk,X_mag,'r-')
if x()=='rD'|x()=='tr, hold on, plot(kk,Xw_mag,'k:'); end
title('CTFT Spectrum |X(w)|'), set(gca,'fontsize',9)
end
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.

(Example 1.4) CTFT of an Exponential Function
/
1
1
( ) ( ) with 0 (E1.4.1)
t T
s
e t e u t
T
T
-
= >

(1.3.2a)
/
1
1
0
(1/ )
0
1
( ) { ( )}
1 1
(E1.4.2)
(1/ ) 1
t T j t
T j t
E e t e e dt
T
e
T T j j T
w
w
w
w w

- -

- +
= =
-
= =
+ +

F
(Example 1.6) CTFT of a Unit Impulse (Dirac Delta) Function Flat Spectrum
0 0
0 0

0 0 0 0

( ) ( ) ( ) ( ) ( ) (E1.6.1)
t t
t t
f t t t dt f t t t dt f t o o
+A +A
A A
= =
} }
(E1.6.1) (1.3.2a)


0
-
( ) { ( )} ( ) 1 (E1.6.2)
j t
j t
t
D t t e dt e
e
e
e o o

= = = =
}
F
This implies that the spectral contents of an impulse signal are uniformly distributed all over the
frequency and explains why an impulse-like current induced by a bolt of lightning generates a
noise affecting almost all the communication/broadcasting systems in a wide frequency range
from radio frequencies (550~1600kHz) to TV frequencies (60~470MHz for VHF/UHF). It is he
reason why an impulse signal is used as a typical test input signal to characterize a system that it
can excite the system with the same amplitude and phase for any frequency.
2
2
2
1
1 1 1
1
| ( ) | :Cutoff frequency, Bandwidth
1 ( ) 2
1
E
T T
j T
w w
w
w
= = = =
+
+
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
(Example 1.7) Impulse Response from Frequency Response of an Ideal LPF
{
1 for | |
Ideal LPF's frequency response: ( ) (E1.7.1)
0 elsewhere
B
G
s
=

(1.3.2b)
1
-
(D.41a)
1 1
( ) { ( )} 1 ( )
2 2
sin( )
sinc : Impulseresponseof theLPF (E1.7.2)

B
j t jB t jB t
B
g t G e d e e
jt
Bt B Bt
t
e
e e
t t
t t t

= = =
| |
= =
|
\ .
}
F
[Remark 1.3] Duality between CTFT (Continuous-Time Fourier Transform) Pairs
From Example 1.3 (Fig. 1.1(a1)/(a2)) and Example 1.7 (Fig. 1.2), we see that a rectangular pulse
function and a sinc function constitute a CTFT pair, i.e., the CTFT of a rectangular pulse/sinc
function is a sinc/rectangular pulse function, illustrating the duality holding between CTFT pairs.
Especially, as the bandwidth of the filter (Fig. 1.2(b1)/(b2)) gets wider, the (effective) duration
of the impulse response (Fig. 1.2(a1)/(a2)) represented by becomes shorter. In the same
context, the spectrum of a finite-duration signal in the time-domain has an infinite bandwidth in
the frequency-domain and conversely, the time-duration of a band-limited signal must be infinite.
See Sec. 1.4.6 for details about the duality of CTFT.
B
/B p
(Example 1.8) CTFT of a Complex Sinusoidal Signal
0

(E1.6.1) (1.3.2b)
1
0
0

2 ( ) 2 ( )
1
(E1.8.1)
2
{ }
jk t j t
k k e dt e
e e
t e e t e e o o
t

= =
}
F
0
0
( ) 2 ( ) ( ) (E1.8.2)
jk t
k k
x t X k e
e
e t e e o = =
F
(Example 1.9) CTFT of an Impulse Train
( ) ( ) (E1.9.1)
T
m
t t mT o o

=
=

(E1.1.9)
1 2
( ) with (E1.9.2)
s
jk t
T s
k
t
T T
e
e
t
e o

=
= =

(E1.9.2)
(E1.8.2)
2 2
( ) ( ) ( ) (E1.9.3)
T s s
k k
k k D
T T
e e
t t
e o e o e

= =
= = +

[Remark 1.4] CTFT of Periodic Signals
The CTFT spectra obtained in the above two examples are weird since they have infinite
magnitudes at some frequencies. How come? Because the energies of the periodic signals are
infinite. Note that CTFS is better for spectral analysis of such infinite-energy signals than CTFT.
If you still want to get the CTFT of a periodic signal, then you had better find it by using the
ICTFT or by taking the CTFS first and then using Eq. (E1.8.2).
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
(Example 1.10) CTFT of a Constant Function
(E1.8.2)
0
( ) 1 2 ( ) (E1.9.1)
k
c t t o e
=
=
F
0
(E1.4.2)
(1.4.3)
1 1 2
{ ( )} { ( )} (E1.12.3)
a
at at
s s
e u t e u t
a j a j j e e e

=
+
F
F
(Example 1.11) CTFT of a Sine/Cosine Signal
0 0
0 0 0
1
sin( ) ( ) { ( ) ( )} (E1.11.1)
2
j t j t
t e e j
j
e e
e t o e e o e e

= +
F
0 0
0 0 0
1
cos( ) ( ) { ( ) ( )} (E1.11.2)
2
j t j t
t e e
e e
e t o e e o e e

= + + +
F
1 for 0
( ) sign( ) ( ) ( ) 0 for 0 (E1.12.1)
1 for 0
s s
t
x t t u t u t t
t
+ >
= = = =
<


0
( ) ( ) ( ) lim{ ( ) ( )} (E1.12.2)
a t a t
s s s s
a
x t u t u t e u t e u t

= =
(Example 1.12) CTFT of a Sign Function
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
1.3 PROPERTIES OF CTFT
1.4.1 Linearity
(1.4.1) ( ) ( ) ( ) ( ) x t y t X Y a b a w b w + +
F
1.4.2 Conjugate Symmetry
*
(1.4.2)
(1.4.3)
( ) ( )
If ( ) is a real-valued function,
( ) ( ) ( ): Hermitiansymmetry
which can be shown by substituting for into the CTFT Eq. (1.3.2a) as follows:
x t X
x t
x t X X
w
w w
w w
- -
- - =
-
F
F
The above equation (1.4.3) can be rewritten as
(1.4.4)
Re{ ( )} Im{ ( )} Re{ ( )} Im{ ( )}
; | ( ) | ( ) | ( ) | ( )
X j X X j X
X X X X
w w w w
w w w w
- + - = -
- - = -
( ) ( ) *
- -
( ) { ( )} ( )
( ) ( ) ( ) ( )
j t
j t j t
X x t x t e dt
X x t e dt x t e dt X
e
e e
e
e e




= =
= = =
}
} }
F
This implies that the magnitude/phase spectrum of a real-valued signal is an even/odd function
w.r.t. and the real/imaginary part of its spectrum is also an even/odd function w.r.t. . That is
why it is enough to get the CTFT of a real-valued signal only for .
w
0 w ( ) X w
w
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
{ }
*
Re{ ( )} Im{ ( )} X j X w w +
( ) ( )
{ ( )} ( ) ( ) ( ) ( ) ( )
t t
dt dt j t j t j t
x t x t e dt x t e dt x t e dt X
e e e
e




= = = =
} } }
F
Cartesian-to-Polar
Conjugate
Frequencyreversal

- -
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) y t g t x t g x t d g t x d x t g t t t t t t t


= * = - = - = *

1
1
( ) ( ) (1.4.5)
j t
x t t X e
w
w
-
-
F
1.4.3 Real Translation (Time Shifting) &Complex Translation (Frequency Shifting)
1

1
( ) ( ) (1.4.6)
j t
x t e X
w
w w -
F
1
1
Real Translation (Time Shifting): ( ) ( ) (1.4.5)
j t
x t t X e
w
w
-
-
F
1.4.3 Real Translation (Time Shifting) &Complex Translation (Frequency Shifting)
1

1
Complex Translation (Frequency Shifting): ( ) ( ) (1.4.6)
j t
x t e X
w
w w -
F
( ) ( ) ( ) ( ) ( ) ( ) (1.4.7) y t g t x t Y G X w w w = * =
F
1.4.4 Real Convolution and Correlation
This property is often used for representing the relationship between the input and the
output of an LTI system having impulse response where the CTFT
of the impulse response is referred to as the frequency response of the system.
) (t x
) (t y ( ) { ( )} G g t w =
F
) (t g
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.

*
*
2
*
(1.4.7)
( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) | ( )| (1.4.8)
x
x
t x t x t x x t d
X X X
f t t t
w w w w

-
= * - = -
F = =

F

* *
2
*
( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) | ( )| (1.4.9)
xy
xy
t x t y t x y t d
X Y G X
f t t t
w w w w w

-
= * - = -
F = =

F

* *
2 2
*
( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) | ( )| | ( )| (1.4.10)
y
y
t y t y t y y t d
Y Y G X
f t t t
w w w w w

-
= * - = -
F = =

F
1
( ) ( ) ( ) ( ) (1.4.11)
2
x t m t X M w w
p
*
F
1.4.5 Complex Convolution Modulation/Windowing
(Example 1.13) Sinusoidal Amplitude Modulation
) cos( ) ( ) ( ) ( ) ( t t x t m t x t x
c c
e = =
(1.4.11) (E1.11.2)
(E1.13.4)
1 1
( ) { ( )} ( ) ( ) { ( ) ( )}
2 2
c c c c
X x t X M X X w w w w w w w
p
= = * = - + +
F
0 0
0 0 0
1
cos( ) ( ) { ( ) ( )} (E1.11.2)
2
j t j t
t e e
e e
e t o e e o e e

= + + +
F
(E1.6.1)
0 0 0
( ) ( ) ( ) ( ) ( )

X X w w dw X w d w w d w w w w * - = - - = -

0 0
0 0

0 0 0 0

( ) ( ) ( ) ( ) ( ) (E1.6.1)
t t
t t
f t t t dt f t t t dt f t o o
+A +A
A A
= =
} }
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
Sinusoidal Amplitude Modulation (Problem 2.11 of [Y-3])
DSB(Double SideBand)-AM
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
(Example 1.14) Ideal (Instant) or Finite-Pulsewidth Sampling and Pulse Amplitude Modulation
*
( ) ( ) ( ) ( ) ( )
T
m
x t x t t x t t mT d d

=-
= = -

2 2 2
( ) ( ) ( ) with
s T s s
k k
k k D
T T T
w w
p p p
w d w d w w

=- =-
= - = + =

(a) The Spectrum of an Ideal Sampler Output
(E1.13.4)
*
1 1 1
( ) ( ) ( ) ( ) ( ) ( )
2
s k k s T
k X X D X X k
T T
w w w w w d w w w
p

= - = -
= * = * + = +

(b) The Spectrum of a Finite Pulsewidth Sampler
( )
/ /
( ) ( ) ( ) ( ) : a rectangular wave with duration and period
D T D T s
r t r t x t x t D T =
0
( )
E1.1.3
/
1, ,
( )
1 2
sinc with
s
s
j k t
D T s k
A P T
r t
D
D k e
T T T
e
e e
t
e

=
= = =
| |
= =
|
\ .

( )
E1.14.5
/
(E1.8.2)
( )
2
sinc ( )
D T s k
R
D
D k k
T T
e
t
o e e

=
| |
=
|
\ .

( ) 1.4.11 ( ) E1.14.6
/
1 1
( ) ( ) ( ) ( ) sinc ( )
2
s s D P k
D
X X R X D k k
T T
e e e e o e e
t

=
| |
= = - -
|
\ .

( ) E1.13.4 1
sinc ( )
s
k
D
D k X k
T T
e e

=
| |
=
|
\ .

Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
(c) The Spectrum of a Pulse-Amplitude-Modulated (PAM) Signal
( )
*
( ) ( ) ( ) ( ) : a rectangular pulse with duration
*
D D PAM
r t r t x t x t D =
( )
E1.3.2
1
( ) sinc (E1.14.9)
2
D
A
D
R D
w
w
p
=



( ) 1.4.7 ( ) E1.14.9
* *
( ) ( ) ( ) sinc ( ) (E1.14.10)
2
PAM D
D
X X R D X
e
e e e e
t
| |
= =
|
\ .
1.4.6 Duality
( )
sin( / 2)
( ) ( ) sinc
/ 2
2

2 2
s s
D
D
u t u t D D
D
D D
w
w
w
p
+ - - =
F

sinc ( ) ( )
s s
B
B t
u t B u t B
p
p

+ - -



F
( ) 1 t d
F
1 2 ( ) 2 ( ) p d w p d w - =
F
2
sign( ) t
jw

F
1
sign( ) sign( ) j j
t
w w
p
- = -
F
1.4.7 Parsevals Relation Power Theorem

*
*
- -
1
( ) ( ) ( ) ( ) (1.4.15)
2
x t y t dt X Y d w w w
p


=


*
*
- -
1
( ) ( ) ( ) ( ) (1.4.16)
2
x t y t dt X Y d w w w
p


=

This implies that the energy of a signal can be computed either in the time domain or in the
frequency domain with no difference.
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
1.5 DISCRETE-TIME FOURIER TRANSFORM (DTFT)
DTFT: ( ) [ ] DTFT{ [ ]} [ ] (1.5.1)
j j n
n
X X e x n x n e
W - W
=-
W = = =

2
1
I DTFT: [ ] IDTFT{ ( )} ( ) (1.5.2)
2
j n
x n X X e d
p
p
W
= W = W W

1.6 DISCRETE-TIME FOURIER SERIES (DTFS) - DFS/DFT


1 1
2 /
0 0
DFT: ( ) DFT { [ ]} [ ] [ ] (1.6.2a)
N N
j kn N kn
N
N
n n
X k x n x n e x n W
p
- -
-
= =
= = =

1 1
2 /
0 0
1 1
I DFT: [ ] IDFT { ( )} ( ) ( ) (1.6.2b)
N N
j kn N kn
N
N
k k
x n X k X k e X k W
N N
p
- -
-
= =
= = =

C
T
F
S

C
T
F
T

D
T
F
T

D
T
F
S

1
( )
k mN m N
X k X
T

+ =
=

( ) 3.5.5
/ *
( ) 3.5.6
( ) ( )
1 2
( )
d
T
m
X X
X m
T T T
e
e
t
O =

=
O =
O
= +

0
( ) 2.2.4
2 /
( )
k
k k P
X X
e e t
e
= =
=
0
(3.4.1)&(3.4.2)
2 /
( ) ( )
d
k k N
X k X
t = O = O
= O
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
0
0

1
( )
( )
jk t
k
P k
jk t
k
P
P
x t
P
x
X e
X t e dt
e
e

=
=

}
0

1
-
1
( ) { ( )} ( )
2
( ) ( )
j t
jk t
x t X X e d
X x t e dt
e
e
e e e
t
e

= =
=
}
}
F
IDTFT
2
( ) [ ]
1
[ ] ( )
2
j n
d n
j n
X x n e
x n X e d
t
t
O
=
O
O =
= O O

}
1 2 /
0
1 IDFT 2 /
0
( ) [ ]
1
[ ] ( )
N j kn N
n
N j kn N
n
X k x n e
x n X k e
N
t
t

=

=
=
=

Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
(Example 1.16) CTFS/DFT Spectra of BFSK (Binary Frequency Shift Keying) Signal
2 2 1 1
( ) ( ) cos(2 ) and ( ) ( ) cos(2 ( )) with (E1.16.1)
D D
b
s t r t f t s t r t D f t D D T p p = = - - =
( ) ( )

1 2 1 2
2 22 2 26
( ) cos(2 ) cos ( ) cos(2 ( )) cos ) and ( c t f t t c t D f t D t D
P P
p p
p p

= = - = - = -
0 0
1 2
( [ 22] [ 22] ) and ( [ 26] [ 26] )
2 2
jk D jk D
k k
P P
C k k C e k k e
w w
d d d d
- -
= - + + = - + +


0
0
(E1.16.2,3) (E1.16.1)
1 1
(1.2.3)
(E1.16.1)
2 2
2
(1.2.3)
1 1
sinc ( [ 22] [ 22] )
2 2
22 22
sinc sinc (E1.16.4a)
2 2 2
1
k k k m
jk D
k k k
P m
S R C D k m k m
P P
D k k
S R C e
P
w
w
d d

= -
-
=

= * = - - + - +





- +



= +






= * =


(E1.16.2,3)
/ 2
26 26
sinc sinc (E1.16.4b)
2 2 2
jk
D
D k k
e
p
p
-


- +



+






1 2
22 22 26 26
sinc sinc ( 1) sinc sinc (E1.16.5)
2 2 2 2 2
k
k k k
D k k k k
S S S
(
+ +
| | | | | | | |
= + = + + +
` ` (
| | | |
\ . \ . \ . \ .
) )

%dc01e16.m
% DFT spectrum of a FSK signal
clear, clf
Tb=0.001; f1=11; f2=13; D=Tb; P=2*D;
N=f1*f2; T=Tb/N; tt=[0:N-1]*T;
s1=cos(2*pi*f1/Tb*tt); s2=cos(2*pi*f2/Tb*tt); % Eq.(E1.16.1)
ttt=[tt Tb+tt]; ss=[s1 s2]; % A BPSK signal
subplot(311)
plot(ttt,ss), axis([ttt([1 end]) -1.5 1.5])
Nfft=length(ss); Nfft2=Nfft/2;
for k=-Nfft2:Nfft2, Sk(k+Nfft2+1) = Sk_CTFS(k,D); end
subplot(312)
ff=[-30:30]/(Nfft*T*1000); % frequency range to see the spectrum for
stem(ff,abs(Sk(Nfft2-29:Nfft2+31))/T)
for k=-Nfft2:Nfft2
SSk(k+Nfft2+1)=Sk_CTFS(k,D)+Sk_CTFS(k-Nfft,D)+Sk_CTFS(k+Nfft,D)...
+Sk_CTFS(k-2*Nfft,D)+Sk_CTFS(k+2*Nfft,D)...
+Sk_CTFS(k-3*Nfft,D)+Sk_CTFS(k+3*Nfft,D); % Eq.(1.7.4)
end
% To plot the scaled & shifted sum with aquare markers
stem(ff,abs(SSk(Nfft2-29:Nfft2+31))/T,'s')
S=fftshift(fft(ss(N-Nfft2+1:)));
Smag=abs([S S(1)]); % To make the DFT spectrum symmetric
hold on, stem(ff,Smag(Nfft2-29:Nfft2+31),'rx','Markersize',5)
err=norm(Smag(Nfft2-29:Nfft2+31)-abs(SSk(Nfft2-29:Nfft2+31))/T)
function Sk=Sk_CTFS(k,D) %Eq. k-22(E1.16.5)
Sk=D*(sinc((k+22)/2)+sinc(()/2)...
+(-1).^mod(k,2).*(sinc((k+26)/2)+sinc((k-26)/2)))/2;
1 2
22 22 26 26
sinc sinc ( 1) sinc sinc (E1.16.5)
2 2 2 2 2
k
k k k
D k k k k
S S S
(
+ +
| | | | | | | |
= + = + + +
` ` (
| | | |
\ . \ . \ . \ .
) )

2 2 1 1
( ) ( ) cos(2 ) and ( ) ( ) cos(2 ( )) with (E1.16.1)
D D
b
s t r t f t s t r t D f t D D T p p = = - - =
(1.7.4) 1
DTFS(DFS/DFT): ( ) :CTFS:
k mN
m
X k X
T

+
= -
=

>>dc01e16
(Example 1.17) CTFS/DFT Spectra of a Sinusoidal FM (Frequency-Modulation) Signal
sin( )
FM signal: ( ) cos( ( )) cos( sin( )) Re{ }(E1.17.1)
c m
j t j t
c m
s t A t A t t Ae e
w b w
q w b w = = + =
( )
( ) cos( ) (E1.17.2)
c m m
d t
t t
dt
q
w w b w w = = +
(1.1.1a)
sin( )
2
CTFS Representation: ( ) with (E1.17.3)
m m
j t jk t
m k
k
m
e J e
T
b w w
p
b w

= -
= =

/ 2
(1.1.1b)
sin( ) ( sin )
/ 2 /
2
0 0
1 1
CTFS Coefficients: ( )
2
1 ( 1)
cos( sin ) ( ) ( 1) ( ) (E1.17.4)
2 4 !( )!
m m
m
m
m m
t
T
j k t
j t j k
k
T dt d
m
m m
k k
k m
m
J e e dt e d
T
k d J
m m k
d w
p
w
b w b d d
p d w
p
b d
p
b b
d b d d b
p
=
- -
- - =

-
=
= =
-
= - = -
+


{ } { }
0 0
(E1.17.1) (E1.17.3)
sin( )
(D.41b)
( ) ( )
( ) ( )
( ) Re Re ( )
1
( ) cos( ) ( ) ( )
2
1
( ) (E1.17.5)
where
c c m m
c m c m
c c
c
j t j t j t j k t
k
k
j k t j k t
c m k
k k k
j K k M t j K k M t
K k M
k
s t Ae e Ae J e
A J k t AJ e e
S e e
P
S
e | e e e
e e e e
e e
|
| e e |

=
+ +
= =
+ +
+
=
= =
= + = +
= +


0 0
( ), , (E1.17.6)
2
c
c m
K k M
k c
P
AJ K M
e
e
|
e e
+
= = =
2 1000
5
2 20
Center frequency: [rad/s]
Amplitude of frequency swaying : (modulation index)
Frequency of frequency swaying : [rad/s]
c
m
e t
|
e t
=
=
=
function [J,JJ]=Jkb(K,beta)
% The 1st kind of kth-order Bessel function
tmpk= ones(size(beta));
for k=0:K
tmp= tmpk; JJ(k+1,:)= tmp;
for m=1:100
tmp=-tmp.*beta.*beta/4/m/(m+k);
JJ(k+1,:)= JJ(k+1,:)+tmp; % Eq.(E1.17.4)
if norm(tmp)<0.001, break; end
end
tmpk=tmpk.*beta/2/(k+1);
end
J=JJ(K+1,:);
/ 2
(1.1.1b)
sin( ) ( sin )
/ 2 /
2
0 0
1 1
CTFS Coefficients: ( )
2
1 ( 1)
cos( sin ) ( ) ( 1) ( ) (E1.17.4)
2 4 !( )!
m m
m
m
m m
t
T
j k t
j t j k
k
T dt d
m
m m
k k
k m
m
J e e dt e d
T
k d J
m m k
d w
p
w
b w b d d
p d w
p
b d
p
b b
d b d d b
p
=
- -
- - =

-
=
= =
-
= - = -
+


>>dc01e17
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
%dc01e17.m
% Sinusoidal-modulated FM signal
clear, clf
beta=0:0.05:15;
[J15,JJ]=Jkb(15,beta);
for k=0:15, plot(beta,JJ(k+1,:)), hold on, end
title('Bessel ftn of the 1st kind & kth order')
A=1; beta=5;
wc=2000*pi; wm=40*pi; % Center frequency and swaying frequency
T=0.0002; N=500; t=[0:N-1]*T;
st=A*cos(wc*t+beta*sin(wm*t));
tt=[0:400]*0.00005; stt=A*cos(wc*tt+beta*sin(wm*tt));
pause, clf, subplot(311), plot(tt,stt)
Sk=fftshift(fft(st)); Sk=[ (1)]*T; % DFT spectrum made symmetric
subplot(312), plot([-N/2: N/2], abs(Sk))
P=N*T; w0=2*pi/P; Kc=wc/w0; M=wm/w0;
kk=[Kc-20:Kc+20]; % the band around the center frequency
subplot(313), stem(kk, abs(Sk(kk+N/2+1))) % LHS of Eq.(E1.17.6)
hold on, pause
Jk= zeros(size(Sk));
for k=0:10
Jk(N/2+k*M+Kc+1)=Jkb(k,beta); Jk(N/2+k*M-Kc)=Jkb(k,beta);
if k>0
Jk(N/2-k*M+Kc+1)=(-1)^mod(k,2)*Jk(N/2+k*M+Kc+1);
Jk(N/2-k*M-Kc)=(-1)^mod(k,2)*Jk(N/2+k*M-Kc);
end
end
stem(kk, P/2*A*abs(Jk(kk+N/2+1)),'r') % RHS of Eq.(E1.17.6)
?

(E1.17.6)
( )
2
c
K k M
k
P
S AJ b
+

sin( )
FM signal: ( ) cos( ( )) cos( sin( )) Re{ }(E1.17.1)
c m
j t j t
c m
s t A t A t t Ae e
w b w
q w b w = = + =
1.7.3 Sampling Theorem
*
/
1 2
[ ] ( ) ( ) (1.7.8)
d
a
T m
X X X m
T T T
w
p
w

= W = -
W
W = = +

[Sampling Theorem]
In order to avoid the loss due to the sampling of a continuous-time signal, the sampling
frequency ( : the sampling interval) must be higher than the Nyquist
frequency that is two times the highest frequency contained in the
continuous-time signal.
x
w
T
2
N x
w w =
2 /
s
T w p =
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.


1.8 POWER, ENERGY, AND CORRELATION
2 (1.4.16)
2 2 2
2
2
2
1
Energy: ( ) | ( )| | ( )| (1.8.1)
2
1
Power: lim ( ) (1.8.2)
f
x
T/
x
T/
T
E x t dt X d X f df
P x t dt
T
w p
w w
p
=
- - -
-

= = =
=



2
For anenergy-type signal ( ),
Autocorrelation: ( ) ( ) ( ) ( ) ( ) ( ) ( ) (1.8.3)
Energy: (0) ( ) (1.8.4)
t
x
x
x
x t
t x t x d x x t d x t x t
x d E
t t
f t t t t t t
f t t
+
- -

-
= + = - = * -
= =

(1.4.7)
2
*
(1.4.2),(1.4.3)
ESD: ( ) { ( )} { ( ) ( )} ( ) ( ) | ( )| (1.8.5)
x x
t x t x t X X X w f w w w F = = * - = = F F
2 2
2 2
2
2
2
For a power-type signal ( ),
1 1
Autocorrelation: ( ) lim ( ) ( ) ( ) ( ) (1.8.6)
1
Power: (0) lim ( ) (1.8.7)
T/ T/ t
x
T/ T/
T
T/
x
x
T/
T
x t
t x t x d x x t d
T T
x d P
T
t t
f t t t t t t
f t t
+
- -

-

= + = -
= =

PSD: ( ) { ( )} (1.8.8)
x x
t w f F = F
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
2
0 0
2
2
2
For a periodic signal ( ),
1
Autocorrelation: ( ) ( ) ( ) (1.8.9)
2
Power: ( ) ( ) with (1.8.10)
1 1
PSD: ( ) (1.8.11)
x
P
k
k x
k
k x
P
x t
t x t x d
P
X k
T
P x t dt X
P
P
f t t t
p
w d w w w

= -

= -
= +
F = - =
= =







2 2
2
For an energy/power-type discrete-time signal [ ],
Autocorrelation: [ ] [ ] [ ] (1.8.12a)
1
[ ] lim [ ] [ ] (1.8.12b)
2 1
1
Energy: [0] [ ] | ( ) | (1.8.13a)
2

x
m
N
x
m N
N
x x
m
x n
n x m n x m
n x m n x m
N
x m X d E
p
f
f
f
p

= -
= -

= -
= +
= +
+
= = W W=



2
1
Power: [0] lim [ ] (1.8.13b)
2 1
N
x x
m N
N
x m P
N
f
= -

= =
+


1
0
1 1 2 2
2 0 0
For a discrete-time periodic signal [ ],
1
Autocorrelation: [ ] [ ] [ ] (1.8.14)
1 1
Power: [ ] | ( ) | (1.8.15)
N
x
m
N N
n k x
x n
n x m n x m
N
P x n X k
N
N
f
-
=
- -
= =
= +
= =

%
% %
%
1.9 LOWPASS EQUIVALENT OF BANDPASS SIGNALS
For a bandpass signal , we define its analytic/pre-envelope signal as

) (t x

-
( ) ( ) ( ) (1.9.1)
1 1 ( )
where ( ) ( ) ( ) ( ) : Hilbert transform (1.9.2)
a
x t x t j x t
x
x t x t h t x t d
t t
t
t
p p t

= +
= * = * =
-

{ }
(1.4.7) (E1.15.6)
1 1
{ ( )} ( ) ( ) sign( ) ( ) (1.9.3) x t x t x t j X
t t
w w
p p



= * = = -



F F F F
(1.9.3)
2
( ) { ( )} { ( )} ( ) sign( ) ( )
( ) (2 ( ) 1) ( ) 2 ( ) ( ) (1.9.4)
a
s s
X x t j x t X j X
X u X u X
w w w w
w w w w w
= + = -
= + - =
F F
Odd function
%dc0109_1.m
clear, clf
N=64; Ts=1/16; % sampling period
t= [-N/2+0.5:N/2-0.5]*Ts; % time vector without t=0
h= 1/pi./t; % the impulse response of the Hilbert transformer
Nh= length(t); Nh2= floor(Nh/2);
h_= fliplr(h); % h(-t): the time-reversed version of h(t)
Wc1=pi; wc2=2*pi; % the frequency of an input signal
Nfft=N; Nfft2=Nfft/2; Nbuf=2*Nfft;
ww=[-Nfft2:Nfft2]*(2*pi/Nfft); % frequency vector
tt= zeros(1,Nbuf); x_buf= zeros(1,Nbuf); xh_buf= zeros(1,Nbuf);
for n=0:Nbuf-1
tn=n*Ts; tt=[tt(2:end) tn];
x_buf = [x_buf(2:end) sin(wc2*tn)]; %sin(wc*t)];
xh_buf = [xh_buf(2:end) h_*x_buf(end-Nh+1:end).'*Ts];
end
subplot(431), plot(tt,x_buf), title('x(t)')
X= fftshift(fft(x_buf,Nfft)); X(find(abs(X)<1e-10))=0;
X=[X X(1)]; % X(w): spectrum of x(t)
subplot(432), plot(ww,abs(X)), title('|X(w)|')
subplot(433), plot(ww,angle(X)), title('<X(w)')
subplot(434), plot(t(1:Nh2),h(1:Nh2), t(Nh2+1:end),h(Nh2+1:end))
% Circular-shift for causality
h_(1:N/2)=h(N/2+1:end); h_(Nfft-N/2+1:Nfft)=h(1:N/2);
H= fftshift(fft(h_,Nfft)); H=[H H(1)];
H1= -j*sign(ww)/Ts;
subplot(435), plot(ww,abs(H), ww,abs(H1),'r:')
subplot(436), plot(ww,angle(H)-0.5*ww, ww,angle(H1),'r:)
(1.9.2) 1
( ) ( ) ( ) ( )
2 2 ( )
D D
x t x t h t x t
t D t
= - = -

( ) sin(2 ) x t t t =
1
( )
t
h t
t
=
2
0.5
(1.2.1)
{ [0.5] [1.5] [31.5] [32.5] [ 31.5] [63.5] [ 0.5]}
[ 0.5] ( )
jk
N
h h h h h h h
h n H k e
p
-
= - = -
-
L L
F
*
/
1
( )
1 2
[ ] ( ) ( ) with ( ) sign( )
k mN
m
d
a a
m T
X k X
T
X X X m X j
T T T
w
p
w w w

+
= -

= - = W
=
W
W = = + = -

[ 31.5 30.5 1.5 0.5 0.5 1.5 30.5 31.5 ]


s s s s s s s s
T T T T T T T T - - - - L L
% To advance the delayed response of causal Hilbert transformer
xh_advanced = xh_buf(Nh2+1:end);
Xh_1 = -j*sign(ww).*X;
xh_1 = real(ifft(fftshift(Xh_1(1:end-1)),Nfft));
xa = hilbert(x_buf); % Analytic signal using hilbert()
xh_2 = imag(xa); % Hilbert transform using hilbert()
discrepancy_t = norm(xh_1-xh_2(1:length(xh_1)))/norm(xh_2)
subplot(437)
plot(tt(1:end-Nh2),xh_advanced, tt(1:length(xh_1)),xh_1,'m.')
hold on, plot(tt,xh_2,'r:'), title('xh(t)')
Xh= fftshift(fft(xh_advanced,Nfft)); Xh= [Xh Xh(1)]; % Xh(w)
subplot(438), plot(ww,abs(Xh), ww,abs(Xh_1),'r:')
subplot(439), plot(ww,angle(Xh_1),'r:'), title('<Xh(w)')
subplot(4,3,10)
th=0.8; % the tilting angle of the real axis
for n=1:length(tt)
plot(tt(n)+[0 real(xa(n))],[0 imag(xa(n))+real(xa(n))*tan(th)])
hold on
end
xa=hilbert(x_buf); % xa(t): the analytic signal
Xa=fftshift(fft(xa,Nfft)); Xa=[Xa Xa(1)]; Xa1=2*(ww>0).*X;
discrepancy_w=norm(Xa-Xa1)
subplot(4,3,11), plot(ww,abs(Xa), ww,abs(Xa1),'r:')
subplot(4,3,12), plot(ww,angle(Xa1),'r:'), title('<Xa(W))
{ }
(1.9.3)
1
( ) sign( ) ( ) x t j X e e

= F
Advance
(1.9.2) (1.9.2) 1
1
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
2 2 ( )
D D
x t x t h t x t x t x t h t x t
t
t D
t
t
= - = - : = - = -

sign( ) ( ) j X e e
Another ( ) x t
{ }
( ) x t F
>>dc0109_1
1
1 1 1
( ) ( ) 2 ( ) ( )
; ( ) ( ) ( ) ( ) (1.9.5)
l a s
j t
a c s l
X X u X
x t x t e x t j x t
w
w w w w w w w
-
= + = + +
= = +
The low-pass equivalent or complex envelope of a signal can be obtained by shifting
the analytic signal by ( : the center frequency of ) along the frequency axis.
( )
l
x t
) (t x ( )
a
x t
1
w -
1
w
( ) x t
where
( ) Re{ ( )}: the in-phase component of ( )
( ) Im{ ( )}: the quadrature component of ( )
c l l
s l l
x t x t x t
x t x t x t
=
=
The analytic signal described by Eq. (1.9.1) can be written in terms of the low-pass
equivalent as
( )
a
x t
( )
l
x t
1
(1.9.5)
(1.9.1),(1.9.5)
1 1
(D.40)
1 1 1 1
(D.28
1 1
( ) ( )
; ( ) ( ) ( ( ) ( ))(cos( ) sin( ))
( ( ) cos( ) ( ) sin( )) ( ( ) cos( ) ( ) sin( )) (1.9.6)
; ( ) ( ) cos( ) ( ) sin( )
j t
a l
c s
c s s c
c s
x t x t e
x t j x t x t j x t t j t
x t t x t t j x t t x t t
x t x t t x t t
e
e e
e e e e
e e
=
=
=
+ + +
= + +
=
)
1
(D.29)
1 1 1
( ) cos( ( )) (1.9.7a)
( ) ( ) cos( ) ( ) sin( ) ( ) sin( ( )) (1.9.7b)
c s
v t t t
x t x t t x t t v t t t
e u
e e e u =
+
= + +
( )
2 2 2 2
1 1
1 1
Envelope: ( ) | ( ) | | ( ) | ( ) ( ) ( ) ( ) (1.9.8a)
( ) ( )
Phase: ( ) tan tan ( ) ( ) (1.9.8b)
( )
( )
a l c s
s
a l
c
v t x t x t x t x t x t x t
x t x t
t t x t t x t
x t
x t
q w w
- -
= = = + = +
= = - = - =





1
Let us use the lowpass equivalent to catch the envelope and phase of
( ) 3.5sinc(2 ) cos( 40 ) 3.5sinc(100 ) cos(400 40 ) (1.9.9) x t Bt t t t t t w p = + = +
%dc0109_2.m
% Lowpass equivalent of Bandpass signal
clear, clf
ts =0.001; fs =1/ts; % Sampling Period/Frequency
N=512; N2=N/2;
t=[-(N2-1):N2]*ts; n1=[N2-40:N2+40]; t1=t(n1); % duration of signal
f1=200; w1=2*pi*f1; B=50; %center frequency & bandwidth of signal x(t)
f=[-fs/2:fs/N:fs/2]; % frequency vector

% Task 1
vt=3.5*sinc(2*B*t); pht=40*t;
x=vt.*cos(w1*t+pht); x1=x(n1);
X=fftshift(fft(x)); % N=length(x)
subplot(421), plot(t1,x1)
title('x(t)=3.5sinc(100*t)cos(2pi*200t+40*t)')
subplot(422), plot(f, abs([X X(1)]))
axis([-500 500 0 50]), title('Magnitude Spectrum of x(t)')

% Task 2
xa=hilbert(x); Xa=fftshift(fft(xa)); %xa(t)=x(t)+j x^(t)
subplot(423), plot(t1,imag(xa(n1)),'r'), hold on
th_tilt=0.2; % tilting angle of the real axis
costh=cos(th_tilt); sinth=sin(th_tilt);
xar=3*real(xa(n1)); % rough scaling
for n=1:length(t1)
xa_r(n)=t1(n)+xar(n)*costh/1000; ya_r(n)=xar(n)*sinth;
end
plot(xa_r,ya_r), title('xa(t)=x(t)+j*xh(t)')
subplot(424), plot(f, abs([Xa Xa(1)]))
title('Magnitude Spectrum of xa(t))
>>dc0109_2
% Task 3
xl=xa.*exp(-j*w1*t); % Lowpass Equivalent Signal xl(t)
Xl=fftshift(fft(xl));
subplot(425), plot(t1,imag(xl(n1)),'r'), hold on
xlr=3*real(xl(n1)); % rough scaling
for n=1:length(t1)
xl_r(n)=t1(n)+xlr(n)*costh/1000; yl_r(n)=xlr(n)*sinth;
end
plot(xl_r,yl_r), title('xl(t)=xa(t)*exp(-j*2pi*f1*t)')
subplot(426), plot(f,abs([Xl Xl(1)]))
title('Magnitude Spectrum of xl(t)')
% Task 4
env=abs(xa); envl=abs(xl); % the envelope
subplot(427), plot(t1,env(n1), t1,envl(n1),'r', t1,vt(n1),'k:')
% Task 5
ph=principal_frequency(angle(xa)-w1*t); phl=angle(xl); % the angle
hold on, plot(t1,ph(n1), t1,phl(n1),'r', t1,pht(n1),'k:')
title('The envelope and angle')
Xh=fftshift(fft(imag(xa)));
subplot(428), plot(f, abs([Xh Xh(1)]))
title('Magnitude Spectrum of hilbert transform x^(t))

function th=principal_frequency(th,thl,thu)
if nargin<3, thu=pi; end
if nargin<2, thl=-pi; end
while sum(th<=thl)>0, =find(th<=thl); th()=th()+2*pi; end
while sum(th>thu)>0, =find(th>thu); th()=th()-2*pi; end
2 2
| ( )| ( ) ( )
a
x t x t x t = +
2 2
| ( ) | ( ) ( )
l c s
x t x t x t = +
( ) 3.5sinc(100 ) v t t =
( )
1
1 1
( )
( ) tan ( )
( )
a
x t
t t x t t
x t
q w w
-
= - = -
1 ( )
( ) tan ( )
( )
s
l
c
x t
t x t
x t
q
-
= =




( ) 40 ( ) ( for the sign change) t t q p p =

( {Imag( ( ))} { ( )} )
a
X x t x t e = = F F
P1.2 Hilbert Transform and Envelope of a Bandpass Signal
2 2 2 2
1 1
1
Envelope: ( ) ( ) ( ) ( ) ( ) (P1.2.1)
( ) ( )
Phase: ( ) tan tan (P1.2.2)
( ) ( )
c s
s
c
v t x t x t x t x t
x t x t
t t
x t x t
q w
- -
= + = +
= = -






Let us use the Hilbert transformer and cosine/sine wave multipliers
to get the envelope and phase of
200
( ) sinc( ) cos(400 )
6
x t t t
p
p
p
= +
%dc01p02.m
% Envelope and phase for lowpass equivalent of a bandpass signal
clear, clf
ts=0.0001; fs=1/ts; % Sampling Period/Frequency
N=1024; t=[-(N-1):N]*ts; % duration of signal
n1=[N-400:N+400]; t1=t(n1); % time vector for display duration
f1=200; w1=2*pi*f1; B=200; % frequency/bandwidth of signal x(t)
x= sinc(B/pi*t).*cos(w1*t+pi/6); x1=x(n1);
xh=imag(hilbert(x)); % imag(x(t)+j x^(t))=x^(t)
xc= x.*cos(w1*t)+xh.*sin(w1*t);
xs=-x.*sin(w1*t)+xh.*cos(w1*t);
env1=????????????????; % Eq.(P1.1.1a1)
env2=?????????????????; % Eq.(P1.1.1a2)
ph1=????????????; % Eq.(P1.1.1b1)
ph2=????????????????; % Eq.(P1.1.1b2)
%ph2=mod(ph2,2*pi);
%idx=find(ph2>pi);
%ph2(idx)=ph2(idx)-2*pi;
subplot(221)
plot(t1,x(n1),'k:', t1,env1(n1),'b', t1,env2(n1),'r')
subplot(222)
plot(t1,ph1(n1),'b', t1,ph2(n1),'r')
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
[Remark 1.8] Convolution vs. Correlation and Matched Filter
(1) Eq. (1.2.7)/(1.2.11) implies that the continuous-time/discrete-time convolution of two time
functions/sequences can be obtained by time-reversing one of them and time-shifting
(sliding) it, multiplying it with the other, and then integrating/summing the multiplication.
The correlation differs from the convolution only in that the time-reversal is not performed.
(2) If we time-reverse one of two signals and then take the convolution of the time-reversed
signal and the other one, it will virtually yield the correlation of the original two signals
since time-reversing the time-reversed signal for computing the convolution yields the
original signal as if it had not been time-reversed. This presents the idea of matched filter,
which is to determine the correlation between the input signal and a particular
signal based on the output of the system with the impulse response
to the input . This system having the time-reversed
and possibly delayed version of a particular signal as its impulse response is called the
matched filter for that signal. Matched filter is used to detect a signal, i.e., to determine
whether or not the signal arrives and find when it arrives.
( ) / [ ] x t x n
( ) / [ ] x t x n
( )/ [ ] w t w n
( ) ( ) / [ ] [ ] g t w t g n w n = =
From [Y-3] Signals and Systems with MATLAB by Won Y. Yang et al.
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
(Example 1.5) Correlation and Matched Filter
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
Correlation and Matched Filter
%sig01e05.m
% Correlation/Convolution and Matched Filter
clear, clf
M=50; Ts=1/M;
x1=ones(M,1)*[1 1]; x1=x1(:).'; Nx=length(x1);
x2=ones(M,1)*[1 -1]; x2=x2(:).';
g1=fliplr(x1); g2=fliplr(x2);
x= [x1 zeros(1,M) x2 zeros(1,M) x1 zeros(1,M) x2]; % signal to transmit
length_x=length(x); Nbuffer= min(M*11,length_x); tt=[0:Nbuffer-1]*Ts;
% Noise_amp=0.3; x = x + Noise_amp*randn(1,length_x);
xbuffer=zeros(1,Nbuffer); ybuffer=zeros(2,Nbuffer);
for n=1:length_x
xbuffer= [x(n) xbuffer(1:end-1)];
y= [g1; g2]*xbuffer(1:Nx).'*Ts; ybuffer= [ybuffer(:,2:end) y];
subplot(312), plot(tt,ybuffer(1,:)), subplot(313), plot(tt,ybuffer(2,:))
pause(0.01), if n<length_x, clf; end
end
y1=xcorr(x,x1)*Ts; y1=y1([end-Nbuffer+1:end]-Nx); %correlation delayed by Nx
y2=xcorr(x,x2)*Ts; y2=y2([end-Nbuffer+1:end]-Nx);
subplot(312), hold on, plot(tt,y1,'m') % only for cross-check
subplot(313), hold on, plot(tt,y2,'m')
- As long as the amplitude of the signals (expected to arrive) are the same, the output of each matched
filter achieves its maximum 2 seconds after the corresponding signal arrives. Why?
- If we remove the zero period between the signals and generate a signal every 2 seconds in the input,
could we still notice the signal arrival times from (local) maxima of the output?
1 1 1
2 2 2
[0] [1] [2]
[0] [1] [2]
g g g
g g g
(
(

[0]
0
0
x
T
(
(
(

1
2
[0]
[0]
y
y
(
=
(

(
(

[1]
[0]
0
x
x T
(
(
(

1
2
[1]
[1]
y
y
(
=
(

[ ]
0
0
0
0
0
0
0
0
0
0
0
0
0
[0] x
1
2
[0]
[0]
y
y [1] x
1
2
[1]
[1]
y
y
>>sig01e05
P1.15 of [Y-3] OFDM Symbol Timing Using Correlation
>>detect_OFDM_symbol_with_correlation
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
detect_OFDM_symbol_with_correlation.m
for n=1:length_received
subplot(311), stem(n,received_signal(n),'.'), hold on
win_power = [win_power(2:end) received_signal(n)^2];
win_sig = [win_sig(2:end) received_signal(n)];
win_energy = [win_energy(2:end) win_energy(end)+win_power(end)];
if n>N_GI, win_energy(end)=win_energy(end)-win_power(end-N_GI); end
win_corr(1:end-1) = win_corr(2:end);
if n>N_FFT
%correlation between signals at two points spaced N_FFT samples apart
win_corr(end) = win_sig(end)'*win_sig(1);
windowed_corr = windowed_corr + win_corr(end);
end
% the windowed correlation for N_GI points
if n>N_SD, windowed_corr= windowed_corr - win_corr(1); end
% CP(Cyclic Prefix)-based Symbol Timing estimation
if rem(n,N_SD)==N_d, stem(n,1.8,'k*'); end % True symbol time
if n>N_SD %N_FFT+N_GI
%Normalized/windowed correlation across N_FFT samples for N_GI points
normalized_corr = windowed_corr/sqrt(win_energy(end)*win_energy(1));
correlations = [correlations normalized_corr];
if normalized_corr>0.99&n-N_SD>OFDM_start_points(end)+N_FFT
OFDM_start_points = [OFDM_start_points n-N_SD+1];
subplot(311), stem(OFDM_start_points(end),1.5,'rx')
subplot(312), stem(n,1.2,'rx')
end
subplot(312), stem(n,normalized_corr,'.'), hold on, pause(0.01)
end
end
Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.

S-ar putea să vă placă și