+ All Categories
Home > Documents > dc01_show.pps

dc01_show.pps

Date post: 01-Nov-2014
Category:
Upload: scribdacct123
View: 10 times
Download: 0 times
Share this document with a friend
Description:
com
Popular Tags:
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 () ( :theperiod of ()) (1.1.1a) w ith jk t k k xt X e P xt P P w p w ¥ =-¥ = = å 0 Integraloverone period () (1.1.1b) jk t k P X xt e dt P Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.
Transcript
Page 1: dc01_show.pps

CHAPTER 1 Fourier Analysis

1.1 Continuous-Time Fourier Series (CTFS)1.2 Properties of CTFS1.2.1 Time-Shifting Property1.2.2 Frequency-Shifting Property1.2.3 Modulation/Windowing Property 1.3 Continuous-Time Fourier Transform (CTFT)1.4 Properties of CTFT1.4.1 Linearity1.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/Windowing1.4.6 Duality 1.4.7 Parseval Relation – Power Theorem1.5 Discrete-Time Fourier Transform (DTFT)1.6 Discrete-Time Fourier Series (DTFS) – DFS/DFT1.7 Sampling Theorem1.7.1 Relationship between CTFS and DFS1.7.2 Relationship between CTFT and DTFT1.7.3 Sampling Theorem1.8 Power, Energy, and Correlation1.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)withjk t

kkx t X e P x tP P

w pw¥

=- ¥= =å

0

Integral over one period ( ) (1.1.1b)

jk tk P

X x t e dt P

Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.

Page 2: dc01_show.pps

( ) ( ) where (E1.1.1)1 for | | / 2( : an integer) ( )0 elsewhereD Dx t A r t

t mP D mr t

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 Djk t jk t jk tk D DP D

jk D jk D

AX A r t e dt A e dt e

jkk De e D

AD AD AD kjk D k D P

0 0(1.1.1a) 1

( ) (E1.1.3)sincjk t jk tkk k

ADx t

P PD

X e k eP

(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))

Page 3: dc01_show.pps

( ) ( ) where (E1.1.4)1 / for | | ( : an integer) ( )

0 elsewhereD Dx t A tt D t mP D mt

0 / 2 (1.1.1b) (E1.1.4)

0ven functionE - / 2 0

0 0 0

00 0 00 0

0 02200 0

(D.

( ) 2 (1 ) cos( )

2sin( ) sin( ) sin( ) 2

22cos( ) 1 cos( )

( )( )

P Djk tk DP

D DD

D

tX A t e dt A k t dt

DAk t k t k t

A t dtDk k k

AAk t k D

D kD k

230) 20

20

(E1.1.5)sin ( / 2)

sinc ( / 2)

k D DAD AD k

Pk D

0 0(1.1.1a) (E1.1.5) 21

( ) (E1.1.6)sincjk t jk tkk kx t

PAD D

X e k eP P

(b) Spectrum of a Triangular Wave (Figs. 1.1(b1) and (b2))

Page 4: dc01_show.pps

where (E1.1.7)( ) ( ) ( ) is a unit impulse functionT mt t mT t

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 Tjk t jk tTk mT T

T Tjk t jk t

tT T

D t e dt t mT e dt

t e dt t dt e

0 0(1.1.1a) (E1.1.8)

0 (E1.1.9)1 1 2

( ) withjk t jk t

kT k kt D e eT T T

(c) Spectrum of an Impulse Train (Figs. 1.1(c1) and (c2))

Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.

Page 5: dc01_show.pps

function [Xk,kk,xht,tt]=CTFS(x,P,N,ng)if nargin<4, ng=221; endif nargin<3, N=10; endkk=[-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)endXk = [conj(X(N+1:-1:2)) X]; % to make the spectrum symmetricX_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 signalxt = 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 1A finite number of terms

12

:1

ˆ( ) with (1.1.2)N jk t N jk t

k kk N k k kX

Px t X e X e X X

P

Fourier reconsructionw w

=- = -= += =å å

0/ 2(1.1.1b)

/2( )

P jk tk P

X x t e dt

Time Function to take the CTFS of Period of x(t)

Number of CTFS Reconstruction

( )00 1

12ˆ( ) N jk t

kkX

Px t X e w

== + å

1 2[ ]NX X XL 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 ee e

e e

w w

w w

w w

é ùê úê úê úê úê úë û

LLMMMM ML

0 0

0 0

0 0

1 (1) 1 (2)2 (1) 2 (2)

(1) (2)

j tt j ttj tt j tt

jN tt jN tt

w ww w

w w

é ùê úê úê úê úê úê úë û

LLMMMM ML

12

jj

jN

é ùê úê úê úê úê úë û

M0 0(1) (2)tt ttw wé ùë ûL

Page 6: dc01_show.pps

%dc01e01.m%plots the CTFS spectra of rectangular/triangular wavesclear, clfglobal P DN=10; % Highest order of CTFS coefficient and representationsD=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); % Spectrumhold on, plot(k1,abs(RD1),':') % Envelope for the spectrumaxis([-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; % Spectrumhold on, plot(k1,Tri1,':') % Envelope for the spectrumaxis([-N/2 N/2 -0.2 1.2])

function x=rD_wave(t)global P Dtmp=min(abs(mod(t,P)),abs(mod(-t,P)));x=(tmp<=D/2);

function x=tri_wave(t)global P Dtmpp=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 mt D

(E1.1.1) 1 for | | ( : an integer)( ) 20 elsewhere

D

Dt mP mr t

>>dc01e01

Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.

Page 7: dc01_show.pps

(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.411 0 (E1.2.1)

1( ) sin( ) ( )

2jk t jk tx t k t e e

j

1 1 1 1 (E1.2.2), ; ( [ ] [ ] )

2 2 21 for 0 with [ ]0 elsewhere

k k k

P P PX X X k k k k

j j jkk

0(1.1.1a) 1Matching thisequation with theCTFSrepresentation ( ) yields

jk t

kkx t X eP

=- ¥= å

(b) Spectrum of a Cosine Wave

1 0 1 0( )D.41b1 0 (E1.2.3)

1( ) cos( ) ( )

2jk t jk tx t k t e e

1 1 1 1 (E1.2.4), ; ( [ ] [ ] )2 2 2k k k

P PPX X X k k k k

Page 8: dc01_show.pps

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

kx t t e X

w-- «

F

1.2.2 Frequency-Shifting Property

1 0

1

(1.2.2)'( ) ( )

jk t

k kx t x t e Xw

-= «F

1.2.3 Modulation Property

(1.2.3)1 1

( ) ( )

k k n k nn

x t y t X Y X YP P

¥

-=- ¥« * = åF

Page 9: dc01_show.pps

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 kk kx t k

PX e X j e

P

0 (1.1.1b)

0 ( ) ( ) (1.3.1b)jk t

k PPk xX j X t e dt

0 0 0Noting that ( ) ( ) & 0 as and letting &Px t x t P d kw w w w w® ® ® ¥ = =%

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

F

1 2

- -

1( ) { ( )} ( ) ( ) : ICTFT (1.3.2b)

2j t j f tx t X X e d X f e df

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( )td ( )G w

w

Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.

Page 10: dc01_show.pps

(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 elsewhere2 2s sD sx t A r t A

D D tu t u t u t= = ³+ - - =

( )

/ 2 / 2(1.3.2a)

/ 2 - / 2

/ 2 / 2 ( )D.41a

( ) { ( )} ( )

sin( / 2) sinc (E1.3.2)

/ 2 2

DDj t j tj tD D D

j D j D

AX x t A r t e dt A e dt e

je e D D

AD AD ADj D D

w ww

w w

ww

w ww 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).

0kw

(b) Spectrum of a Triangular Pulse

( ) ( ) with1 / for | |( ) (E1.3.3)

0 elsewhereD Dx t A tt D t Dt

22

2

sin ( / 2)( ) sinc (E1.3.4)

2( / 2)

D DX AD AD

D

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).

0kw

Page 11: dc01_show.pps

[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( ) ( ) kk kX X j Xw w ww = = =

)(X ( )x t DkX ( )Px t% P D>

0 2 /Ppw = P

( )x t

%dc01e03.m% plots the CTFT spectra of rectangular/triangular wavesclear, clfglobal DD=1; CTFT('rD',D,221); CTFT('tri',D,223);function x=rD(t)global Dx=(-D/2<=t&t<=D/2);function x=tri(t)global Dtmp=abs(t); x=(tmp<=D).*(1-tmp/D);

>>dc01e03Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.

Page 12: dc01_show.pps

function [Xk,kk,xht,tt]=CTFT(x,D,ng)if nargin<3, ng=221; endN=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; endendXk = [conj(X(N+1:-)) X]; % to make the spectrum symmetricX_mag = abs(Xk); %Xph = angle(Xk);Xwk = [conj(Xw(N+1:-)) Xw]; % to make the spectrum symmetricXw_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<1subplot(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:'); endtitle('CTFT Spectrum |X(w)|'), set(gca,'fontsize',9)end

Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.

Page 13: dc01_show.pps

(Example 1.4) CTFT of an Exponential Function/

1

1( ) ( ) with 0 (E1.4.1)

t T

se t e u t

TT

-= >

(1.3.2a) /

11 0

(1/ ) 0

1( ) { ( )}

1 1(E1.4.2)

(1/ ) 1

t T j t

T j t

E e t e e dtT

eT 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 tf t t t dt f t t t dt f t

(E1.6.1)(1.3.2a)

0 -( ) { ( )} ( ) 1 (E1.6.2)j t j t

tD t t e dt e

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.

22

21

1 1 11| ( ) | :Cutoff frequency, Bandwidth

1 ( ) 21E

T Tj Tw w

ww= = = ® =

++

Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.

Page 14: dc01_show.pps

(Example 1.7) Impulse Response from Frequency Response of an Ideal LPF

1 for | | Ideal LPF's frequency response: ( ) (E1.7.1) 0 elsewhere

ω BG ω

(1.3.2b)1

-

(D.41a)

1 1( ) { ( )} 1 ( )

2 2

sin( )sinc : Impulse responseof theLPF (E1.7.2)

B j t jB t jB t

Bg t G e d e e

jt

Bt B Btt

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/Bp

Page 15: dc01_show.pps

(Example 1.8) CTFT of a Complex Sinusoidal Signal

0 (E1.6.1)(1.3.2b)1

00 2 ( ) 2 ( )

1(E1.8.1)

2{ } jk tj tk k e dt e

F

00( ) 2 ( ) ( ) (E1.8.2)jk t

k kx t X ke F

(Example 1.9) CTFT of an Impulse Train

( ) ( ) (E1.9.1)T mt t mT

(E1.1.9) 1 2( ) with (E1.9.2)sjk t

T skt

T Te

(E1.9.2)

(E1.8.2)

2 2( ) ( ) ( ) (E1.9.3)T s sk k

k kDT T

[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.

Page 16: dc01_show.pps

(Example 1.10) CTFT of a Constant Function

(E1.8.2)

0( ) 1 2 ( ) (E1.9.1)

kc t

F

0(E1.4.2)

(1.4.3)

1 1 2{ ( )} { ( )} (E1.12.3)

aat ats se u t e u t

a j a j j

F F

(Example 1.11) CTFT of a Sine/Cosine Signal

0 00 00

1sin( ) ( ) { ( ) ( )} (E1.11.1)

2j t j tt e e j

j F

0 00 00

1cos( ) ( ) { ( ) ( )} (E1.11.2)

2j t j tt e e F

1 for 0( ) sign( ) ( ) ( ) 0 for 0 (E1.12.1)

1 for 0s s

tx t t u t u t t

t

0( ) ( ) ( ) lim{ ( ) ( )} (E1.12.2)a t a t

s s s sax 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.

Page 17: dc01_show.pps

1.3 PROPERTIES OF CTFT

1.4.1 Linearity

(1.4.1)( ) ( ) ( ) ( )x t y t X Ya b a w b w+ « +F

1.4.2 Conjugate Symmetry

*

(1.4.2)

(1.4.3)

( ) ( )

If ( ) is a real-valued function,

( ) ( ) ( ): Hermitian symmetry

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

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 .

w0w³( )X w

w

Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.

{ }*Re{ ( )} Im{ ( )}X j Xw w+

( ) ( ){ ( )} ( ) ( ) ( ) ( ) ( ) t t

dt dtj t j t j tx t x t e dt x t e dt x t e dt X

F

Cartesian-to-Polar

ConjugateFrequency reversal

Page 18: dc01_show.pps

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

¥ ¥

¥ ¥= * = - = - = *ò ò

1

1( ) ( ) (1.4.5)

j tx t t X e

ww

-- «

F

1.4.3 Real Translation (Time Shifting) &Complex Translation (Frequency Shifting)

1

1( ) ( ) (1.4.6)j t

x t e Xw

w w« -F

1

1Real Translation (Time Shifting): ( ) ( ) (1.4.5)

j tx t t X e

ww

-- «

F

1.4.3 Real Translation (Time Shifting) &Complex Translation (Frequency Shifting)

1

1Complex Translation (Frequency Shifting): ( ) ( ) (1.4.6)j t

x t e Xw

w w« -F

( ) ( ) ( ) ( ) ( ) ( ) (1.4.7)y t g t x t Y G Xw 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.

)(tx)(ty ( ) { ( )}G g tw =F)(tg

Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.

Page 19: dc01_show.pps

**

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)

2x t m t X Mw w

p« *F

1.4.5 Complex Convolution – Modulation/Windowing

(Example 1.13) Sinusoidal Amplitude Modulation

)cos()( )()( )( ttxtmtxtx cc (1.4.11) (E1.11.2)

(E1.13.4)

1 1( ) { ( )} ( ) ( ) { ( ) ( )}

2 2 c cc cX x t X M X Xw w w w w w wp

= = * = - + +F

0 00 00

1cos( ) ( ) { ( ) ( )} (E1.11.2)

2j t j tt e e F

(E1.6.1)

0 0 0( ) ( ) ( ) ( ) ( ) X X w w dw Xw d w w d w w w w* - = - - = -ò

0 0

0 0

0 0 0 0 ( ) ( ) ( ) ( ) ( ) (E1.6.1)

t t

t tf t t t dt f t t t dt f t

Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.

Page 20: dc01_show.pps

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.

Page 21: dc01_show.pps

(Example 1.14) Ideal (Instant) or Finite-Pulsewidth Sampling and Pulse Amplitude Modulation

* ( ) ( ) ( ) ( ) ( )T mx t x t t x t t mTd d¥=- ¥= = -å

2 2 2( ) ( ) ( ) withsT s sk k

k kDT T T

w wp p p

w d w d w w¥ ¥

=- ¥ =- ¥= - = + =å å

(a) The Spectrum of an Ideal Sampler Output

(E1.13.4)

*

1 1 1( ) ( ) ( ) ( ) ( ) ( )

2 sk k sT kX X D X X kT T

ww w w w d w w wp

¥ ¥

=- ¥ =- ¥= * = * + = +å å

(b) The Spectrum of a Finite Pulsewidth Sampler

// ( ) ( )( ) ( ) : a rectangular wave with duration and period D TD Ts r t r tx t x t D T

0

( )E1.1.3/

1, ,( )

1 2sinc withs

s

j k tD T sk

A P Tr t DD k e

T TT

( )E1.14.5/

(E1.8.2)( )

2sinc ( )D T skR

DD k kT T

( )1.4.11 ( )E1.14.6/

1 1( ) ( ) ( ) ( ) sinc ( )

2 ss D P kDX X R X D k k

T T

( )E1.13.4 1sinc ( )sk

DD k X kT T

Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.

Page 22: dc01_show.pps

(c) The Spectrum of a Pulse-Amplitude-Modulated (PAM) Signal

* ( ) ( )( ) ( ) : a rectangular pulse with duration * DDPAM r t r tx t x t D( )E1.3.2

1( ) sinc (E1.14.9)

2DA

DR D

ww

p=

æ ö÷ç= ÷ç ÷çè ø

( )1.4.7 ( )E1.14.9

* *( ) ( ) ( ) sinc ( ) (E1.14.10)2

PAM DD

X X R D X

Page 23: dc01_show.pps

1.4.6 Duality

( )sin( / 2)( ) ( ) sinc

/ 2 2

2 2s s

D Du t u t D D

DD D w w

w p+ - - =«

F

sinc ( ) ( )

s s

B B tu t B u t B

p p

æ ö÷ç « + - -÷ç ÷çè øF

( ) 1td «F

1 2 ( ) 2 ( )p d w p d w« - =F

2 sign( ) t

jw«F

1 sign( ) sign( )j j

tw w

p« - = -F

1.4.7 Parseval’s Relation – Power Theorem

**

- -

1 ( ) ( ) ( ) ( ) (1.4.15)

2 x t y t dt X Y dw w wp

¥ ¥

¥ ¥=ò ò

**

- -

1( ) ( ) ( ) ( ) (1.4.16)

2x t y t dt X Y dw 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.

Page 24: dc01_show.pps

1.5 DISCRETE-TIME FOURIER TRANSFORM (DTFT)

DTFT: ( ) [ ] DTFT{ [ ]} [ ] (1.5.1)j j n

nX X e x n x n e¥W - W

=- ¥W = = =å

2

1IDTFT: [ ] IDTFT{ ( )} ( ) (1.5.2)

2j n

x n X X e dpp

W= W = W Wò

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

1 12 /

0 0DFT: ( ) DFT { [ ]} [ ] [ ] (1.6.2a)

N Nj kn N knNN n n

X k x n x n e x n Wp- --

= == = =å å

1 12 /

0 0

1 1IDFT: [ ] IDFT { ( )} ( ) ( ) (1.6.2b)

N Nj kn N k nNN k k

x n X k X k e X k WN N

p- - -

= == = =å å

CT

FS

CT

FT

DT

FTD

TF

S

1( ) k mNmNX k X

T

( )3.5.5

/*

( )3.5.6

( ) ( )

1 2( )

d T

m

X X

X mT T T

0

( )2.2.4

2 /( )k k k PX X

0

(3.4.1)&(3.4.2)

2 /( ) ( )d k k NX k X

Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.

Page 25: dc01_show.pps

0

0

1( )

( )

jk tkP k

jk tk PP

x tP

x

X e

X t e dt

0

1

-

1( ) { ( )} ( )

2( ) ( )

j t

jk t

x t X X e d

X x t e dt

F

IDTFT

2

( ) [ ]1

[ ] ( )2

j nd n

j n

X x n e

x n X e d

1 2 /0

1IDFT 2 /0

( ) [ ]1

[ ] ( )

N j kn Nn

N j kn Nn

X k x n e

x n X k eN

Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.

Page 26: dc01_show.pps

Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.

Page 27: dc01_show.pps

(Example 1.16) CTFS/DFT Spectra of BFSK (Binary Frequency Shift Keying) Signal

2 21 1( ) ( ) cos(2 ) and ( ) ( ) cos(2 ( )) with (E1.16.1)D D bs t r t f t s t r t D f t D D Tp p= = - - =

( ) ( ) 1 21 22 22 2 26

( ) cos(2 ) cos ( ) cos(2 ( )) cos )and (c t f t t c t D f t D t DP Pp p

p p´ ´

= = - = - = -

0 01 2( [ 22] [ 22] ) and ( [ 26] [ 26] )

2 2jk D jk D

k kP P

C k k C e k k ew wd 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 1sinc ( [ 22] [ 22] )

22

22 22sinc sinc (E1.16.4a)

2 2 2

1

k k k m

jk Dk k k

PmS R C D k m k m

P P

D k k

S R C eP

ww

d d¥

¥=-

-=

æ ö÷ç= * = - - + - +÷ç ÷çè øì üæ ö æ öï ï- +ï ï÷ ÷ç ç= +í ý÷ ÷ç ç÷ ÷ç çï ïè ø è øï ïî þ

= * =

å

(E1.16.2,3)

/ 2

26 26sinc sinc (E1.16.4b)

2 2 2 jk

D

D k ke p

p-ì üæ ö æ öï ï- +ï ï÷ ÷ç ç+í ý÷ ÷ç ç÷ ÷ç çï ïè ø è øï ïî þ

1 222 22 26 26

sinc sinc ( 1) sinc sinc (E1.16.5)2 2 2 2 2

kk k k

D k k k kS S S

Page 28: dc01_show.pps

%dc01e16.m% DFT spectrum of a FSK signalclear, clfTb=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 signalsubplot(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); endsubplot(312)ff=[-30:30]/(Nfft*T*1000); % frequency range to see the spectrum forstem(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 markersstem(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 symmetrichold 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 222 22 26 26

sinc sinc ( 1) sinc sinc (E1.16.5)2 2 2 2 2

kk k k

D k k k kS S S

2 21 1( ) ( ) cos(2 ) and ( ) ( ) cos(2 ( )) with (E1.16.1)D D bs t r t f t s t r t D f t D D Tp p= = - - =

(1.7.4) 1DTFS(DFS/DFT): ( ) :CTFS:k mNm

X k XT

¥

+=- ¥= å

>>dc01e16

Page 29: dc01_show.pps

(Example 1.17) CTFS/DFT Spectra of a Sinusoidal FM (Frequency-Modulation) Signal

sin( )FM signal: ( ) cos( ( )) cos( sin( )) Re{ }(E1.17.1)c mj t j tc ms t A t A t t Ae ew b wq w b w= = + =

( )( ) cos( ) (E1.17.2)c m m

d tt t

dtq

w w bw w= = +

(1.1.1a)sin( ) 2CTFS Representation: ( ) with (E1.17.3)m mj t jk t

mkkm

e J eT

b w w pb w

¥=- ¥= =å

/ 2 (1.1.1b) sin( ) ( sin )

/ 2 /

2

0 0

1 1CTFS Coefficients: ( )

2

1 ( 1)cos( sin ) ( ) ( 1) ( ) (E1.17.4)

2 4 !( )!

mm mm

m m

tT j k tj t j kk T dt dm

m mk k

kmm

J e e dt e dT

k d Jm m k

d w pwb w b d d

pd w

p

b dp

bbd b d d b

p

= --

- -=

¥

-=

= =

-= - = º -

+

ò ò

ò å

0 0

(E1.17.1) (E1.17.3)sin ( )

(D.41b) ( ) ( )

( ) ( )

( ) Re Re ( )

1 ( ) cos( ) ( ) ( )

21

( ) (E1.17.5)

where

cc m m

c m c m

c c

c

j t j t j t j k tkk

j k t j k tc m kkk k

j K k M t j K k M tK k Mk

s t Ae e Ae J e

A J k t AJ e e

S e eP

S

00

( ), , (E1.17.6)2c

c mK k M k c

PA J K M

Page 30: dc01_show.pps

2 1000

52 20

Center frequency: [rad/s]Amplitude of frequency swaying : (modulation index)Frequency of frequency swaying : [rad/s]

c

m

function [J,JJ]=Jkb(K,beta)% The 1st kind of kth-order Bessel functiontmpk= 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 1CTFS Coefficients: ( )

2

1 ( 1)cos( sin ) ( ) ( 1) ( ) (E1.17.4)

2 4 !( )!

mm mm

m m

tT j k tj t j kk T dt dm

m mk k

kmm

J e e dt e dT

k d Jm m k

d w pwb w b d d

pd w

p

b dp

bbd b d d b

p

= --

- -=

¥

-=

= =

-= - = º -

+

ò ò

ò å

>>dc01e17

Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.

Page 31: dc01_show.pps

%dc01e17.m% Sinusoidal-modulated FM signalclear, clfbeta=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 symmetricsubplot(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 frequencysubplot(313), stem(kk, abs(Sk(kk+N/2+1))) % LHS of Eq.(E1.17.6)hold on, pauseJk= 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); endendstem(kk, P/2*A*abs(Jk(kk+N/2+1)),'r') % RHS of Eq.(E1.17.6)

?

(E1.17.6) ( )

2cK k M kP

S AJ b+ »

sin( )FM signal: ( ) cos( ( )) cos( sin( )) Re{ }(E1.17.1)c mj t j tc ms t A t A t t Ae ew b wq w b w= = + =

Page 32: dc01_show.pps

1.7.3 Sampling Theorem

* /

1 2[ ] ( ) ( ) (1.7.8)d aT m

X X X mT T Tw

pw

¥

=W =- ¥

WW= = +å

[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.

xwT

2N xw w=2 /s Tw p=

Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.

Page 33: dc01_show.pps

Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.

Page 34: dc01_show.pps

1.8 POWER, ENERGY, AND CORRELATION

2 (1.4.16)2 2 2

2 22

1Energy: ( ) | ( )| | ( )| (1.8.1)

21

Power: lim ( ) (1.8.2)

f

x

T/

x T/T

E x t dt X d X f df

P x t dtT

w pw w

p

=¥ ¥ ¥

- ¥ - ¥ - ¥

-®¥

= = =

=

ò ò ò

ò

2

For an energy-type signal ( ),

Autocorrelation: ( ) ( ) ( ) ( ) ( ) ( ) ( ) (1.8.3)

Energy: (0) ( ) (1.8.4)

t

x

xx

x t

t x t x d x x t d x t x t

x d E

t tf 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 Xw f w w wF = = * - = =F F

2 2

2 2

2 22

For a power-type signal ( ),

1 1Autocorrelation: ( ) lim ( ) ( ) ( ) ( ) (1.8.6)

1Power: (0) lim ( ) (1.8.7)

T/ T/t

x T/ T/T

T/

xx T/T

x t

t x t x d x x t dT T

x d PT

t tf t t t t t t

f t t

+ ®

- -®¥

-®¥

= + = -

= =

ò ò

ò

PSD: ( ) { ( )} (1.8.8)x x tw fF = FSource: MATLAB /Simulink for Digital Communication by Won Young Yang et al.

Page 35: dc01_show.pps

2

0 0

222

For a periodic signal ( ),1

Autocorrelation: ( ) ( ) ( ) (1.8.9)

2Power: ( ) ( ) with (1.8.10)

1 1PSD: ( ) (1.8.11)

x P

kkx

kkx P

x t

t x t x dP

X kT

P x t dt XP P

f t t t

pw 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 11

Energy: [0] [ ] | ( ) | (1.8.13a)2

x m

N

x m NN

x xm

x n

n x m n x m

n x m n x mN

x m X d Ep

f

f

fp

¥

=- ¥

=-®¥

¥

=- ¥

= +

= ++

= = W W=

åå

å ò 21

Power: [0] lim [ ] (1.8.13b)2 1

N

x xm NNx m P

Nf

=-®¥= =

+ å

1

0

1 12 220 0

For a discrete-time periodic signal [ ],1

Autocorrelation: [ ] [ ] [ ] (1.8.14)

1 1Power: [ ] | ( ) | (1.8.15)

N

x m

N N

n kx

x n

n x m n x mN

P x n X kN N

f-

=

- -= =

= +

= =å å

å% % %

%

Page 36: dc01_show.pps

1.9 LOWPASS EQUIVALENT OF BANDPASS SIGNALS

For a bandpass signal , we define its analytic/pre-envelope signal as)(tx

-

ˆ( ) ( ) ( ) (1.9.1)

1 1 ( )ˆwhere ( ) ( ) ( ) ( ) : Hilbert transform (1.9.2)

ax t x t j x t

xx t x t h t x t d

t t

tt

p p t

¥

¥

= +

= * = * =-ò

{ }(1.4.7) (E1.15.6)1 1

ˆ{ ( )} ( ) ( ) sign( ) ( ) (1.9.3)x t x t x t j Xt t

w wp 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

Page 37: dc01_show.pps

%dc0109_1.mclear, clfN=64; Ts=1/16; % sampling periodt= [-N/2+0.5:N/2-0.5]*Ts; % time vector without t=0h= 1/pi./t; % the impulse response of the Hilbert transformerNh= 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 signalNfft=N; Nfft2=Nfft/2; Nbuf=2*Nfft;ww=[-Nfft2:Nfft2]*(2*pi/Nfft); % frequency vectortt= 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];endsubplot(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 causalityh_(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 Dx t x t h t x t

t D

( ) sin(2 )x t t

1( )

th t

20.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 ep

-

= - = -

- «

L L

F

* /

1( )

1 2[ ] ( ) ( ) with ( ) sign( )

k mNm

d a amT

X k XT

X X X m X jT T Tw

pw 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 sT T T T T T T T- - - -L L

Page 38: dc01_show.pps

% 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 axisfor n=1:length(tt) plot(tt(n)+[0 real(xa(n))],[0 imag(xa(n))+real(xa(n))*tan(th)]) hold onend xa=hilbert(x_buf); % xa(t): the analytic signalXa=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 F

Advance(1.9.2) (1.9.2) 11ˆ ˆ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )2 2 ( )D Dx t x t h t x t x t x t h t x t

t t D

sign( ) ( )j X

ˆAnother ( )x t

ˆ( )x tF

>>dc0109_1

Page 39: dc01_show.pps

1

1 1 1( ) ( ) 2 ( ) ( )

; ( ) ( ) ( ) ( ) (1.9.5)

l a sj t

a c sl

X X u X

x t x t e x t j x tw

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.

( )lx t)( tx( )ax t 1w- 1w

( )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 tx 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

( )ax t( )lx t

1(1.9.5)

(1.9.1),(1.9.5)1 1(D.40)

1 1 1 1

(D.281 1

( ) ( )

ˆ; ( ) ( ) ( ( ) ( )) (cos( ) sin( ))

( ( ) cos( ) ( ) sin( )) ( ( ) cos( ) ( ) sin( )) (1.9.6)

; ( ) ( ) cos( ) ( ) sin( )

j ta 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

)1

(D.29)1 1 1

( ) cos( ( )) (1.9.7a)

ˆ( ) ( ) cos( ) ( ) sin( ) ( ) sin( ( )) (1.9.7b)cs

v t t t

x t x t t x t t v t t t

( )2 2 2 2

1 11 1

ˆEnvelope: ( ) | ( ) | | ( ) | ( ) ( ) ( ) ( ) (1.9.8a)

ˆ( ) ( )Phase: ( ) tan tan ( ) ( ) (1.9.8b)

( )( )

a l c s

sa l

c

v t x t x t x t x t x t x t

x t x tt t x t t x t

x tx tq w w

- -

= = = + = +

= = - =Ð - =Ðæ ö÷ç ÷ç ÷è ø

Page 40: dc01_show.pps

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 tw p= + = +

Page 41: dc01_show.pps

%dc0109_2.m% Lowpass equivalent of Bandpass signalclear, clfts =0.001; fs =1/ts; % Sampling Period/FrequencyN=512; N2=N/2;t=[-(N2-1):N2]*ts; n1=[N2-40:N2+40]; t1=t(n1); % duration of signalf1=200; w1=2*pi*f1; B=50; %center frequency & bandwidth of signal x(t)f=[-fs/2:fs/N:fs/2]; % frequency vector

% Task 1vt=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 2xa=hilbert(x); Xa=fftshift(fft(xa)); %xa(t)=x(t)+j x^(t)subplot(423), plot(t1,imag(xa(n1)),'r'), hold onth_tilt=0.2; % tilting angle of the real axiscosth=cos(th_tilt); sinth=sin(th_tilt);xar=3*real(xa(n1)); % rough scalingfor n=1:length(t1)xa_r(n)=t1(n)+xar(n)*costh/1000; ya_r(n)=xar(n)*sinth;endplot(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

Page 42: dc01_show.pps

% Task 3xl=xa.*exp(-j*w1*t); % Lowpass Equivalent Signal xl(t)Xl=fftshift(fft(xl));subplot(425), plot(t1,imag(xl(n1)),'r'), hold onxlr=3*real(xl(n1)); % rough scalingfor n=1:length(t1) xl_r(n)=t1(n)+xlr(n)*costh/1000; yl_r(n)=xlr(n)*sinth;endplot(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 4env=abs(xa); envl=abs(xl); % the envelopesubplot(427), plot(t1,env(n1), t1,envl(n1),'r', t1,vt(n1),'k:')% Task 5ph=principal_frequency(angle(xa)-w1*t); phl=angle(xl); % the anglehold 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; endif nargin<2, thl=-pi; endwhile 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ˆ| ( ) | ( ) ( )ax t x t x t= + 2 2| ( ) | ( ) ( )l c sx t x t x t= + ( ) 3.5sinc(100 )v t t=

( )11 1

ˆ( )( ) tan ( )

( )a

x tt t x t t

x tq w w

-= - =Ð - 1 ( )

( ) tan ( )( )

sl

c

x tt x t

x tq

-= =Ð

æ ö÷ç ÷ç ÷è ø( ) 40 ( ) ( for the sign change)t tq p p= ± ±

ˆ ˆ( {Imag( ( ))} { ( )}) aX x t x t F F

Page 43: dc01_show.pps

P1.2 Hilbert Transform and Envelope of a Bandpass Signal

2 2 2 2

1 11

ˆ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 tt t

x tx tq w- -

= + = +

= = -æ ö æ ö÷ç ÷ç÷ ÷ç ç÷ ÷ç÷ç è øè ø

Let us use the Hilbert transformer and cosine/sine wave multipliers to get the envelope and phase of

200( ) sinc( ) cos(400 )

6x t t t

pp

p= +

Page 44: dc01_show.pps

%dc01p02.m % Envelope and phase for lowpass equivalent of a bandpass signalclear, clfts=0.0001; fs=1/ts; % Sampling Period/FrequencyN=1024; t=[-(N-1):N]*ts; % duration of signaln1=[N-400:N+400]; t1=t(n1); % time vector for display durationf1=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.

Page 45: dc01_show.pps

[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.

Page 46: dc01_show.pps

(Example 1.5) Correlation and Matched Filter

Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.

Page 47: dc01_show.pps

Correlation and Matched Filter%sig01e05.m% Correlation/Convolution and Matched Filterclear, clfM=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 transmitlength_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 endy1=xcorr(x,x1)*Ts; y1=y1([end-Nbuffer+1:end]-Nx); %correlation delayed by Nxy2=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 gg g g

[0]00

xT

1

2

[0][0]

yy

[1][0]0

xx T

1

2

[1][1]

yy

[ ]0000

000

00

00

00[0]x

1

2

[0][0]

yy[1]x

1

2

[1][1]

yy

>>sig01e05

Page 48: dc01_show.pps

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.

Page 49: dc01_show.pps

“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) endend

Source: MATLAB /Simulink for Digital Communication by Won Young Yang et al.


Recommended