Signal and Linear System Analysis - College of Engineering

Signal and Linear System Analysis ... Random Signals, used extensively in Comm Systems II, take on random values with known probability characteristic...

3 downloads 510 Views 2MB Size
Chapter

2

Signal and Linear System Analysis Contents 2.1

2.2 2.3 2.4

2.5

Signal Models . . . . . . . . . . . . . . . . . . . . 2.1.1 Deterministic and Random Signals . . . . . 2.1.2 Periodic and Aperiodic Signals . . . . . . . 2.1.3 Phasor Signals and Spectra . . . . . . . . . 2.1.4 Singularity Functions . . . . . . . . . . . . Signal Classifications . . . . . . . . . . . . . . . . Generalized Fourier Series . . . . . . . . . . . . . Fourier Series . . . . . . . . . . . . . . . . . . . . 2.4.1 Complex Exponential Fourier Series . . . . 2.4.2 Symmetry Properties of the Fourier Coefficients . . . . . . . . . . . . . . . . . . . . 2.4.3 Trigonometric Form . . . . . . . . . . . . 2.4.4 Parseval’s Theorem . . . . . . . . . . . . . 2.4.5 Line Spectra . . . . . . . . . . . . . . . . 2.4.6 Numerical Calculation of Xn . . . . . . . . 2.4.7 Other Fourier Series Properties . . . . . . . Fourier Transform . . . . . . . . . . . . . . . . . . 2-1

. . . . . . . . .

2-3 2-3 2-3 2-4 2-7 2-11 2-14 2-20 2-20

. . . . . . .

2-23 2-25 2-26 2-26 2-30 2-37 2-38

CONTENTS

2.5.1 Amplitude and Phase Spectra . . . . . . . . 2.5.2 Symmetry Properties . . . . . . . . . . . . . 2.5.3 Energy Spectral Density . . . . . . . . . . . 2.5.4 Transform Theorems . . . . . . . . . . . . . 2.5.5 Fourier Transforms in the Limit . . . . . . . 2.5.6 Fourier Transforms of Periodic Signals . . . 2.5.7 Poisson Sum Formula . . . . . . . . . . . . 2.6 Power Spectral Density and Correlation . . . . . . . 2.6.1 The Time Average Autocorrelation Function 2.6.2 Power Signal Case . . . . . . . . . . . . . . 2.6.3 Properties of R. / . . . . . . . . . . . . . . 2.7 Linear Time Invariant (LTI) Systems . . . . . . . . . 2.7.1 Stability . . . . . . . . . . . . . . . . . . . . 2.7.2 Transfer Function . . . . . . . . . . . . . . . 2.7.3 Causality . . . . . . . . . . . . . . . . . . . 2.7.4 Properties of H.f / . . . . . . . . . . . . . . 2.7.5 Input/Output with Spectral Densities . . . . . 2.7.6 Response to Periodic Inputs . . . . . . . . . 2.7.7 Distortionless Transmission . . . . . . . . . 2.7.8 Group and Phase Delay . . . . . . . . . . . . 2.7.9 Nonlinear Distortion . . . . . . . . . . . . . 2.7.10 Ideal Filters . . . . . . . . . . . . . . . . . . 2.7.11 Realizable Filters . . . . . . . . . . . . . . . 2.7.12 Pulse Resolution, Risetime, and Bandwidth . 2.8 Sampling Theory . . . . . . . . . . . . . . . . . . . 2.9 The Hilbert Transform . . . . . . . . . . . . . . . . 2.10 The Discrete Fourier Transform and FFT . . . . . . .

2-2

2-39 2-39 2-40 2-42 2-51 2-53 2-59 2-60 2-61 2-62 2-63 2-74 2-76 2-76 2-77 2-78 2-82 2-82 2-83 2-84 2-87 2-89 2-91 2-101 2-106 2-106 2-106

ECE 5625 Communication Systems I

2.1. SIGNAL MODELS

2.1

Signal Models

2.1.1

Deterministic and Random Signals

 Deterministic Signals, used for this course, can be modeled as completely specified functions of time, e.g., x.t / D A.t / cosŒ2f0.t /t C .t / – Note that here we have also made the amplitude, frequency, and phase functions of time – To be deterministic each of these functions must be completely specified functions of time  Random Signals, used extensively in Comm Systems II, take on random values with known probability characteristics, e.g., x.t / D x.t; i / where i corresponds to an elementary outcome from a sample space in probability theory – The i create a ensemble of sample functions x.t; i /, depending upon the outcome drawn from the sample space

2.1.2

Periodic and Aperiodic Signals

 A deterministic signal is periodic if we can write x.t C nT0/ D x.t / for any integer n, with T0 being the signal fundamental period ECE 5625 Communication Systems I

2-3

CONTENTS

 A signal is aperiodic otherwise, e.g., ( 1; jt j  1=2 ….t / D 0; otherwise

(a) periodic signal, (b) aperiodic signal, (c) random signal

2.1.3

Phasor Signals and Spectra

 A complex sinusoid can be viewed as a rotating phasor x.t Q / D Ae j.!0tC/;

1
 This signal has three parameters, amplitude A, frequency !0, and phase   The fixed phasor portion is Ae j while the rotating portion is e j!0t 2-4

ECE 5625 Communication Systems I

2.1. SIGNAL MODELS

 This signal is periodic with period T0 D 2=!0  It also related to the real sinusoid signal A cos.!0t C  / via Euler’s theorem ˚ x.t / D Re x.t Q / ˚ D Re A cos.!0t C  / C jA sin.!0t C  / D A cos.!0t C  /

(a) obtain x.t/ from x.t/, Q (b) obtain x.t/ from x.t/ Q and xQ  .t/

 We can also turn this around using the inverse Euler formula x.t / D A cos.!0t C  / 1 1 D x.t Q / C xQ .t / 2 2 j.!0 t C/ Ae C Ae D 2

j.!0 tC/

 The frequency spectra of a real sinusoid is the line spectra plotted in terms of the amplitude and phase versus frequency ECE 5625 Communication Systems I

2-5

CONTENTS

 The relevant parameters are A and  for a particular f0 D !0=.2/

(a) Single-sided line spectra, (b) Double-sided line spectra

 Both the single-sided and double-sided line spectra, shown above, correspond to the real signal x.t / D A cos.2f0t C  /

Example 2.1: Multiple Sinusoids  Suppose that x.t / D 4 cos.2.10/t C =3/ C 24 sin.2.100/t

=8/

 Find the two-sided amplitude and phase line spectra of x.t /  First recall that cos.!0t

=2/ D sin.!0t /, so

x.t / D 4 cos.2.10/t C =3/ C 24 cos.2.100/t

5=8/

 The complex sinusoid form is directly related to the two-sided line spectra since each real sinusoid is composed of positive and negative frequency complex sinusoids h i j.2.10/tC=3/ j.2.10/tC=3/ x.t / D 2 e Ce h i j.2.100/t 5=8/ j.2.100/t 5=8/ C 12 e Ce 2-6

ECE 5625 Communication Systems I

2.1. SIGNAL MODELS

Amplitude

12 2 f (Hz) -100

-10

100

10

5π/8 Phase

π/3 f (Hz) -π/3 -5π/8

Two-sided amplitude and phase line spectra

2.1.4

Singularity Functions

Unit Impulse (Delta) Function  Singularity functions, such as the delta function and unit step  The unit impulse function, ı.t / has the operational properties Z t2 ı.t t0/ dt D 1; t1 < t0 < t2 t1

ı.t

t0/ D 0; t ¤ t0

which implies that for x.t / continuous at t D t0, the sifting property holds Z 1 x.t /ı.t t0/ dt D x.t0/ 1

– Alternatively the unit impulse can be defined as Z 1 x.t /ı.t / dt D x.0/ 1 ECE 5625 Communication Systems I

2-7

CONTENTS

 Properties: 1. ı.at / D ı.t /=jaj 2. ı. t / D ı.t / 3. Sifting property special cases 8 ˆ t1 < t0 < t2 ˆ Z t2
t0/ D x.t0/ı.t

t0/

for x.t / continuous at t D t0 5. Derivative property Z t2 x.t /ı .n/.t t1

t0/ dt D . 1/nx .n/.t0/ ˇ n ˇ d x.t / n ˇ D . 1/ n dt ˇtDt0

Note: Dealing with the derivative of a delta function requires care  A test function for the unit impulse function helps our intuition and also helps in problem solving  Two functions of interest are   (1 ; 1 t ı .t / D … D 2 2 2 0;   t 2 1 sin ı1 .t / D  t  2-8

jt j   otherwise

ECE 5625 Communication Systems I

2.1. SIGNAL MODELS

Test functions for the unit impulse ı.t/: (a) ı .t/, (b) ı1 .t/

 In both of the above test functions letting  ! 0 results in a function having the properties of a true delta function Unit Step Function  The unit step function can be defined in terms of the unit impulse 8 ˆ t <0 ˆ Z t <0; u.t /  ı. / d  D 1; t >0 ˆ 1 ˆ :undefined; t D 0 also ı.t / D

ECE 5625 Communication Systems I

du.t / dt

2-9

CONTENTS

Example 2.2: Unit Impulse 1st-Derivative  Consider

Z

1

x.t /ı 0.t / dt

1

 Using the rectangular pulse test function, ı .t /, we note that    1 t also 1  ı .t / D … D u.t C / u.t / 2 2 2 and

1 d ı .t / D ı.t C / dt 2

ı.t

 /

 Placing the above in the integrand with x.t / we obtain, with the aid of the sifting property, that Z 1  1 x.t /ı 0.t / dt D lim x.t C / x.t / !0 2 1   x.t / x.t C / D lim !0 2 D x 0.0/

2-10

ECE 5625 Communication Systems I

2.2. SIGNAL CLASSIFICATIONS

2.2

Signal Classifications

 From circuits and systems we know that a real voltage or current waveform, e.t / or i.t / respectively, measured with respective a real resistance R, the instantaneous power is P .t / D e.t /i.t / D i 2.t /R W  On a per-ohm basis, we obtain p.t / D P .t /=R D i 2.t / W/ohm  The average energy and power can be obtain by integrating over the interval jt j  T with T ! 1 Z T i 2.t / dt Joules/ohm E D lim T !1 T Z T 1 P D lim i 2.t / dt W/ohm T !1 2T T  In system engineering we take the above energy and power definitions, and extend them to an arbitrary signal x.t /, possibly complex, and define the normalized energy (e.g. 1 ohm system) as 

E D lim

Z

T 2

Z

jx.t /j dt D T !1 T Z T 1  P D lim jx.t /j2 dt T !1 2T T

ECE 5625 Communication Systems I

1

jx.t /j2 dt

1

2-11

CONTENTS

 Signal Classes: 1. x.t / is an energy signal if and only if 0 < E < 1 so that P D0 2. x.t / is a power signal if and only if 0 < P < 1 which implies that E ! 1

Example 2.3: Real Exponential  Consider x.t / D Ae

˛t

u.t / where ˛ is real

 For ˛ > 0 the energy is given by ˇ Z 1 2 2˛t ˇ1  A e 2 ˇ ED Ae ˛t dt D 2˛ ˇ0 0 A2 D 2˛  For ˛ D 0 we just have x.t / D Au.t / and E ! 1  For ˛ < 0 we also have E ! 1  In summary, we conclude that x.t / is an energy signal for ˛ > 0  For ˛ > 0 the power is given by 1 A2 P D lim 1 T !1 2T 2˛

e

˛T



D0

 For ˛ D 0 we have 1 A2 2 P D lim A T D T !1 2T 2 2-12

ECE 5625 Communication Systems I

2.2. SIGNAL CLASSIFICATIONS

 For ˛ < 0 we have P ! 1  In summary, we conclude that x.t / is a power signal for ˛ D 0

Example 2.4: Real Sinusoid  Consider x.t / D A cos.!0t C  /;

1
 The signal energy is infinite since upon squaring, and integrating over one cycle, T0 D 2=!0, we obtain Z N T0=2 A2 cos2.!0t C  / dt E D lim N !1

D lim N N !1

N T0 =2 Z T0=2

A2 cos2.!0t C  / dt

T0 =2 2 Z T0 =2

 A 1 C cos.2!0t C 2 / dt N !1 2 T0 =2 A2 D lim N  T0 ! 1 N !1 2

D lim N

 The signal average power is finite since the above integral is normalized by 1=.N T0/, i.e., A2 1 A2 P D lim N  T0 D N !1 N T0 2 2

ECE 5625 Communication Systems I

2-13

CONTENTS

2.3

Generalized Fourier Series

The goal of generalized Fourier series is to obtain a representation of a signal in terms of points in a signal space or abstract vector space. The coordinate vectors in this case are orthonomal functions. The complex exponential Fourier series is a special case.  Let AE be a vector in a three dimensional vector space  Let aE1; aE2, and aE3 be linearly independent vectors in the same three dimensional space, then c1aE1 C c2aE2 C c3aE3 D 0 .zero vector/ only if the constants c1 D c2 D c3 D 0  The vectors aE1; aE2, and aE3 also span the three dimensional space, that is for any vector AE there exists a set of constants c1; c2, and c3 such that AE D c1aE1 C c2aE2 C c3aE3  The set fE a1; aE2; aE3g forms a basis for the three dimensional space  Now let fE a1; aE2; aE3g form an orthogonal basis, which implies that aEi  aEj D .E ai ; aEj / D hE ai ; aEj i D 0; i ¤ j which says the basis vectors are mutually orthogonal  From analytic geometry (and linear algebra), we know that we can find a representation for AE as E E E .E a2  A/ .E a3  A/ .E a1  A/ E C C AD jE a1j2 jE a 2 j2 jE a 3 j2 2-14

ECE 5625 Communication Systems I

2.3. GENERALIZED FOURIER SERIES

which implies that AE D

3 X

ci aEi

i D1

where aEi  AE ; i D 1; 2; 3 ci D jE ai j2 is the component of AE in the aEi direction  We now extend the above concepts to a set of orthogonal functions f1.t /; 2.t /; : : : ; N .t /g defined on to  t  t0 C T , where the dot product (inner product) associated with the n’s is Z t0CT  m.t /; n.t / D m.t /n.t / dt t0 ( cn; n D m D cnımn D 0; n ¤ m  The n’s are thus orthogonal on the interval Œt0; t0 C T   Moving forward, let x.t / be an arbitrary function on Œt0; t0CT , and consider approximating x.t / with a linear combination of n’s, i.e., x.t / ' xa .t / D

N X

Xnn.t /; t0  t  t0 C T;

nD1

where a denotes approximation ECE 5625 Communication Systems I

2-15

CONTENTS

 A measure of the approximation error is the integral squared error (ISE) defined as Z ˇ ˇ2 ˇ N D x.t / xa .t /ˇ dt; T

where

R T

denotes integration over any T long interval

 To find the Xn’s giving the minimum N we expand the above integral into three parts (see homework problems) Z

jx.t /j2 dt

N D T

C

N X nD1

ˇ ˇ cn ˇˇXn

ˇ2 ˇZ N X ˇ 1 ˇˇ  ˇ .t / dt x.t / n ˇ ˇ c n T nD1 ˇ2 Z ˇ 1  x.t /n .t / dt ˇˇ cn T

– Note that the first two terms are independent of the Xn’s and the last term is nonnegative (missing steps are in text homework problem 2.14)  We conclude that N is minimized for each n if each element of the last term is made zero by setting Z 1 Xn D x.t /n.t / dt Fourier Coefficient cn T  This also results in N

2-16

 min

Z D T

jx.t /j2 dt

N X

cnjXnj2

nD1

ECE 5625 Communication Systems I

2.3. GENERALIZED FOURIER SERIES

 Definition: The set of of n’s is complete if lim .N /min D 0

N !1

for

R T

jx.t /j2 dt < 1

– Even if though the ISE is zero when using a complete set of orthonormal functions, there may be isolated points where x.t / xa .t / ¤ 0  Summary x.t / D l.i.m.

1 X

Xnn.t /

nD1

Xn D

1 cn

Z T

x.t /n.t / dt

– The notation l.i.m. stands for limit in the mean, which is a mathematical term referring to the fact that ISE is the convergence criteria  Parseval’s theorem: A consequence of completeness is Z 1 X jx.t /j2 dt D cnjXnj2 T

ECE 5625 Communication Systems I

nD1

2-17

CONTENTS

Example 2.5: A Three Term Expansion  Approximate the signal x.t / D cos 2 t on the interval Œ0; 1 using the following basis functions

1

φ1(t)

x(t)

1

0.75

0.75

0.5

0.5

0.25

0.25 0.2

0.4

0.6

0.8

1

t

-0.25

-0.25

-0.5

-0.5

-0.75

-0.75

-1

-1

φ2(t)

0.4

0.6

0.8

1

t

0.2

0.4

0.6

0.8

1

t

φ3(t)

1

1

0.75

0.75

0.5

0.5

0.25

0.25 0.2

0.2

0.4

0.6

0.8

1

t

-0.25

-0.25

-0.5

-0.5

-0.75

-0.75

-1

-1

Signal x.t/ and basis functions i .t/; i D 1; 2; 3

 To begin with it should be clear that 1.t /; 2.t /, and 3.t / are mutually orthogonal since the integrand associated with the inner product, i .t /  j.t / D 0, for i ¤ j; i; j D 1; 2; 3 2-18

ECE 5625 Communication Systems I

2.3. GENERALIZED FOURIER SERIES

 Before finding the Xn’s we need to find the cn’s Z Z 1=4 c1 D j1.t /j2 dt j1j2 dt D 1=4 0 ZT c2 D j2.t /j2 dt D 1=2 ZT c3 D j3.t /j2 dt D 1=4 T

 Now we can compute the Xn’s: Z X1 D 4 x.t /1.t / dt ZT 1=4 ˇ1=4 2 2 ˇ D4 cos.2 t / dt D sin.2 t /ˇ D 0   Z0 3=4 ˇ3=4 2 1 ˇ X2 D 2 cos.2 t / dt D sin.2 t /ˇ D 1=4   1=4 Z 1 ˇ1 2 2 ˇ X3 D 4 cos.2 t / dt D sin.2 t /ˇ D 3=4   3=4 1

x(t)

0.75

2/π

xa(t)

0.5 0.25 0.2

0.4

0.6

0.8

1

t

-0.25 -0.5

-2/π

-0.75 -1

Functional approximation ECE 5625 Communication Systems I

2-19

CONTENTS

 The integral-squared error, N , can be computed as follows: 3 X

Z ˇ ˇ ˇx.t / N D ˇ T

Z

nD1 2

D

jx.t /j dt T

1 D 2 1 D 2

2.4

ˇ2 ˇ Xnn.t /ˇˇ dt 3 X

cnjXnj2

nD1

ˇ ˇ ˇ ˇ 1 ˇˇ 2 ˇˇ2 1 ˇˇ 2 ˇˇ2 4 ˇ ˇ 2 ˇ ˇ ˇ ˇ2 ˇ2ˇ ˇ ˇ D 0:0947 ˇ ˇ

ˇ ˇ 1 ˇˇ 2 ˇˇ2 4 ˇ ˇ

Fourier Series

When we choose a particular set of basis functions we arrive at the more familiar Fourier series.

2.4.1

Complex Exponential Fourier Series

 A set of n’s that is complete is n.t / D e j n!0t ; n D 0; ˙1; ˙2; : : : over the interval .t0; t0 C T0/ where !0 D 2=T0 is the period of the expansion interval 2-20

ECE 5625 Communication Systems I

2.4. FOURIER SERIES

proof of orthogonality Z t0CT0 Z t0CT0 2 t 2 t  jm jn T j 2 .m n/t 0 dt D m.t /; n.t / D e T0 e e T0 dt t0 8t0R t0 CT0 ˆ dt; mDn ˆ
1 X

Xne j n!0t ; t0  t  t0 C T0

nD 1

1 where Xn D T0

Z x.t /e

j n!0 t

T0

 The Fourier series expansion is unique

Example 2.6: x.t / D cos2 !0t  If we expand x.t / into complex exponentials we can immediately determine the Fourier coefficients 1 1 C cos 2!0t 2 2 1 1 1 D C e j 2!0t C e 2 4 4

x.t / D

ECE 5625 Communication Systems I

j 2!0 t

2-21

CONTENTS

 The above implies that 8 1 ˆ ˆ <2; Xn D 14 ; ˆ ˆ :0;

nD0 n D ˙2 otherwise

Time Average Operator  The time average of signal v.t / is defined as Z T 1  v.t / dt hv.t /i D lim T !1 2T T  Note that hav1.t / C bv2.t /i D ahv1.t /i C bhv2.t /i; where a and b are arbitrary constants  If v.t / is periodic, with period T0, then Z 1 hv.t /i D v.t / dt T0 T 0  The Fourier coefficients can be viewed in terms of the time average operator  Let v.t / D x.t /e that

j n!0 t

using e

j

D cos 

j sin  , we find

Xn D hv.t /i D hx.t /e j n!0t i D hx.t / cos n!0ti j hx.t / sin n!0t i 2-22

ECE 5625 Communication Systems I

2.4. FOURIER SERIES

2.4.2

Symmetry Properties of the Fourier Coefficients

 For x.t / real, the following coefficient symmetry properties hold: 1. Xn D X

n

2. jXnj D jX nj 3. †Xn D

†X

n

proof  Z 1 Xn D x.t /e j n!0t dt T0 T0 Z 1 D x.t /e j. n/!0t dt D X T0 T0 

n

since x .t / D x.t /  Waveform symmetry conditions produce special results too 1. If x. t / D x.t / (even function), then ˚ ˚ Xn D Re Xn ; i.e., Im Xn D 0 2. If x. t / D

x.t / (odd function), then ˚ ˚ Xn D Im Xn ; i.e., Re Xn D 0

3. If x.t ˙ T0=2/ D

x.t / (odd half-wave symmetry), then Xn D 0 for n even

ECE 5625 Communication Systems I

2-23

CONTENTS

Example 2.7: Odd Half-wave Symmetry Proof  Consider 1 Xn D T0

Z

t0 DT0 =2 t0

1 x.t /e j n!0t dtC T0

t0 CT0

Z

j n!0 t 0

x.t 0/e

dt 0

t0 CT0 =2

 In the second integral we change variables by letting t D t 0 T0=2 1 Xn D T0

Z

x.t /e

j n!0 t

dt

t0

1 C T0  D 1

t0 CT0 =2

tCT0 =2

Z

x.t T0=2/ e „ ƒ‚ …

t0

e

j n!0 .t CT0 =2/

dt

x.t/

j n!0 T0 =2

t0 CT0 =2

1 Z T0

x.t /e

j n!0 t

dt

t0

but n!0.T0=2/ D n.2=T0/.T0=2/ D n, thus ( 1

e

j n

D

2;

n odd

0;

n even

 We thus see that the even indexed Fourier coefficients are indeed zero under odd half-wave symmetry

2-24

ECE 5625 Communication Systems I

2.4. FOURIER SERIES

2.4.3

Trigonometric Form

 The complex exponential Fourier series can be arranged as follows 1 X

x.t / D

Xne j n!0t

nD 1

D X0 C

1 X 

Xn e

j n!0 t

C X ne

j n!0 t



nD1

 For real x.t /, we may know that jX nj D jXnj and †Xn D †X n, so x.t / D X0 C

1 X 

jXnje j Œn!0t C†Xn C jXnje

nD1 1 X

D X0 C 2

j Œn!0 t C†Xn 



  jXnj cos n!0t C †Xn

nD1

since cos.x/ D .e jx C e

jx

/=2

 From the trig identity cos.u C v/ D cos u cos v follows that x.t / D X0 C

1 X nD1

An cos.n!0t / C

1 X

sin u sin v, it

Bn sin.n!0t /

nD1

where An D 2hx.t / cos.n!0t /i Bn D 2hx.t / sin.n!0t /i ECE 5625 Communication Systems I

2-25

CONTENTS

2.4.4

Parseval’s Theorem

 Fourier series analysis are generally used for periodic signals, i.e., x.t / D x.t C nT0/ for any integer n  With this in mind, Parseval’s theorem becomes 1 P D T0 D

Z

X02

jx.t /j2 dt D

T0

C2

1 X

jXnj2

nD 1 1 X

jXnj2

.W/

nD1

Note: A 1 ohm system is assumed

2.4.5

Line Spectra

 Line spectra was briefly reviewed earlier for simple signals  For any periodic signal having Fourier series representation we can obtain both single-sided and double-sided line spectra  The double-sided magnitude and phase line spectra is most easily obtained form the complex exponential Fourier series, while the single-sided magnitude and phase line spectra can be obtained from the trigonometric form 1 X Double-sided () Xne j 2.nf0/t mag. and phase nD 1

1

X Single-sided () X0 C 2 jXnj cosŒ2.nf0/t C †Xn mag. and phase nD1

2-26

ECE 5625 Communication Systems I

2.4. FOURIER SERIES

– For the double-sided simply plot as lines jXnj and †Xn versus nf0 for n D 0; ˙1; ˙2; : : : – For the single-sided plot jX0j and †X0 as a special case for n D 0 at nf0 D 0 and then plot 2jXnj and †X0 versus nf0 for n D 1; 2; : : :

Example 2.8: Cosine Squared  Consider   A A x.t / D A cos .2f0t C  / D C cos 2.2f0/t C 21 2 2 A A A D C e j 21 e j 2.2f0/t C e j 21 e j 2.2f0/t 2 4 4 2

DoubleSided f -2f0

-2f0

f 2f0

2f0

SingleSided f 2f0

ECE 5625 Communication Systems I

f 2f0

2-27

CONTENTS

Example 2.9: Pulse Train x(t) A ...

... t -2T0

-T0

T0 T0 + τ

τ

0

Periodic pulse train

 The pulse train signal is mathematically described by x.t / D

1 X

 A…

nD 1

t

nT0 

=2



 The Fourier coefficients are Z 1  A e j 2.nf0/t ˇˇ j 2.nf0 /t Xn D  Ae dt D ˇ T0 0 T0 j 2.nf0/ 0 A 1 e j 2.nf0/ D  T0 j 2.nf0/ A e j.nf0/ e j.nf0/ D   e j.nf0/ T0 .2j /.nf0/ A sinŒ.nf0/   D  e j.nf0/ T0 Œ.nf0/   To simplify further we define 

sinc.x/ D 2-28

sin.x/ x ECE 5625 Communication Systems I

2.4. FOURIER SERIES

 Finally, Xn D

A sinc.nf0 /e T0

j.nf0 /

; n D 0; ˙1; ˙2; : : :

 To plot the line spectra we need to find jXnj and †Xn A jsincŒ.nfo/ j T 80 ˆ sinc.nfo / > 0 ˆ < .nf0/; †Xn D .nf0/ C ; nf0 > 0 and sinc.nf0 / < 0 ˆ ˆ : .nf0/ ; nf0 < 0 and sinc.nf0 / < 0 jXnj D

 Pulse train double-sided line spectra for  D 0:125 using Python, specifically use ssd.line_spectra()  As a specific example enter the following at the IPython command prompt

n = arange(0,25+1) # Get 0 through 25 harmonics tau = 0.125; f0 = 1; A = 1; Xn = A*tau*f0*sinc(n*f0*tau)*exp(-1j*pi*n*f0*tau) figure(figsize=(6,2)) f = n # Assume a fundamental frequency of 1 Hz so f = n ssd.line_spectra(f,Xn,mode=’mag’,fsize=(6,2)) xlim([-25,25]); figure(figsize=(6,2)) ssd.line_spectra(f,Xn,mode=’phase’,fsize=(6,2)) xlim([-25,25]); ECE 5625 Communication Systems I

2-29

CONTENTS

f0 = 1, t = 0.125

At f0 = 0.125

1 t =8

Phase slope = -p f t = -0.125´ p f

2.4.6

Numerical Calculation of Xn

 Here we consider a purely numerical calculation of the Xk coefficients from a single period waveform description of x.t /  In particular, we will use the numpy fast Fourier transform (FFT) function to carry out the numerical integration  By definition 1 Xk D T0 2-30

Z x.t /e

j 2kf0 t

dt; k D 0; ˙1; ˙2; : : :

T0 ECE 5625 Communication Systems I

2.4. FOURIER SERIES

 A simple rectangular integration approximation to the above integral is N 1 1 X Xk ' x.nT /e T0 nD0

j k2.nf0 /T0 =N



T0 ; k D 0; ˙1; ˙2; : : : N

where N is the number of points used to partition the time interval Œ0; T0 and T D T0=N is the time step  Using the fact that 2f0T0 D 2, we can write that N 1 1 X x.nT /e Xk ' N nD0

j 2k n N

; k D 0; ˙1; ˙2; : : :

 Note that the above must be evaluated for each Fourier coefficient of interest  Also note that the accuracy of the Xk values depends on the value of N – For k small and x.t / smooth in the sense that the harmonics rolloff quickly, N on the order of 100 may be adequate – For k moderate, say 5–50, N will have to become increasingly larger to maintain precision in the numerical integral Calculation Using the FFT  The FFT is a powerful digital signal processing (DSP) function, which is a computationally efficient version of the discrete Fourier transform (DFT) ECE 5625 Communication Systems I

2-31

CONTENTS

 For the purposes of the problem at hand, suffice it to say that the FFT is just an efficient algorithm for computing X Œk D

N X1

xŒne

j 2k n=N

; k D 0; 1; 2; : : : ; N

1

nD0

 If we let xŒn D x.nT /, then it should be clear that Xk '

N 1 X Œk; k D 0; 1; : : : ; N 2

 To obtain Xk for k < 0 note that X

k

N 1 1 1 X x.nT /e ' X Œ k D N N nD0 N 1 1 X x.nT /e D N nD0

since e

j 2N n=N

De

j 2 n

j 2.N k/n N

j 2. k/n N

D X ŒN



D1

 In summary ( Xk '

X Œk=N; X ŒN

k=N;

0  k  N=2 N=2  k < 0

 To use the Python function fft.fft() to obtain the Xk we simply let X D fft.fft(x) where x D fx.t / W t D 0; T0=N; 2T0=N; : : : ; T0.N

1/=N g

 Unlike in MATLAB X Œ0 is really found in X[0] 2-32

ECE 5625 Communication Systems I

2.4. FOURIER SERIES

Example 2.10: Finite Rise/Fall-Time PulseTrain x(t) 1 Pulse width = τ Rise and fall time = tr

τ

1/2

0

tr

τ

τ + tr

t T0

Pulse train with finite rise and fall time edges

 Shown above is one period of a finite rise and fall time pulse train  We will numerically compute the Fourier series coefficients of this signal using the FFT  The Python function trap_pulse was written to generate one period of the signal using N samples def trap_pulse(N,tau,tr): """ xp = trap_pulse(N,tau,tr) Mark Wickert, January 2015 """ n = arange(0,N) t = n/N xp = zeros(len(t)) # Assume tr and tf are equal T1 = tau + tr # Create one period of the trapezoidal pulse waveform for k in n: if t[k] <= tr: xp[k] = t[k]/tr elif (t[k] > tr and t[k] <= tau): ECE 5625 Communication Systems I

2-33

CONTENTS

xp[k] = 1 elif (t[k] > tau and t[k] < T1): xp[k] = -t[k]/tr + 1 + tau/tr; else: xp[k] = 0 return xp, t

 We now plot the double-sided line spectra for  D 1=8 and two values of rise-time tr

2-34

ECE 5625 Communication Systems I

2.4. FOURIER SERIES

1/20 1/8

Sidelobes smaller than ideal pulse train which has zero rise time

1/τ = 8

Signal x.t/ and line spectrum for  D 1=8 and tr D 1=20

 The spectral roll-off rate is faster with the trapezoid  Clock edges are needed in digital electronics, but by slowing the edge speed down the clock harmonic generation can be reduced  The second plot is a more extreme example

ECE 5625 Communication Systems I

2-35

CONTENTS

1/10 1/8

Sidelobes smaller than with tr = 1/20 case ~10dB

1/τ = 8

more

Signal x.t/ and line spectrum for  D 1=8 and tr D 1=10

2-36

ECE 5625 Communication Systems I

2.4. FOURIER SERIES

2.4.7

Other Fourier Series Properties

 Given x.t / has Fourier series (FS) coefficients Xn, if y.t / D A C Bx.t / it follows that ( Yn D

A C BX0;

nD0

BXn;

n¤0

proof: Yn D hy.t /e

j 2.nf0 /t

i

D Ahe j 2.nf0/t i C Bhx.t /e   1; n D 0 DA C BXn 0; n ¤ 0

j 2.nf0 /t

i

QED  Likewise if y.t / D x.t

t0 /

it follows that Yn D X n e

j 2.nf0 /t0

proof: Yn D hx.t Let  D t

t0/e

j 2.nf0 /t

i

t0 which implies also that t D  C t0, so Yn D hx./e D hx./e D Xn e

j 2.nf0 /.Ct0 / j 2.nf0 /

ie

i

j 2.nf0 /t0

j 2.nf0 /t0

QED ECE 5625 Communication Systems I

2-37

CONTENTS

2.5

Fourier Transform

 The Fourier series provides a frequency domain representation of a periodic signal via the Fourier coefficients and line spectrum  The next step is to consider the frequency domain representation of aperiodic signals using the Fourier transform  Ultimately we will be able to include periodic signals within the framework of the Fourier transform, using the concept of transform in the limit  The text establishes the Fourier transform by considering a limiting case of the expression for the Fourier series coefficient Xn as T0 ! 1  The Fourier transform (FT) and inverse Fourier transfrom (IFT) is defined as Z 1 X.f / D x.t /e j 2f t dt (FT) 1 Z 1 x.t / D X.f /e j 2f t df (IFT) 1

 Sufficient conditions for the existence of the Fourier transform are R1 1. 1 jx.t /j dt < 1 2. Discontinuities in x.t / be finite R1 3. An alternate sufficient condition is that 1 jx.t /j2 dt < 1, which implies that x.t / is an energy signal 2-38

ECE 5625 Communication Systems I

2.5. FOURIER TRANSFORM

2.5.1

Amplitude and Phase Spectra

 FT properties are very similar to those obtained for the Fourier coefficients of periodic signals  The FT, X.f / D Ffx.t /g, is a complex function of f X.f / D jX.f /je j.f / D jX.f /je j †X.f / D RefX.f /g C j ImfX.f /g  The magnitude jX.f /j is referred to as the amplitude spectrum  The the angle †X.f / is referred to as the phase spectrum  Note that Z

1

RefX.f /g D

x.t / cos 2f t dt Z

1 1

ImfX.f /g D

x.t / sin 2f t dt 1

2.5.2

Symmetry Properties

 If x.t / is real it follows that Z 1 X. f / D x.t /e j 2. f /t dt Z11  D x.t /e j 2f t dt D X .f / 1

thus jX. f /j D jX.f /j (even in frequency) †X. f / D †X.f / (odd in frequency) ECE 5625 Communication Systems I

2-39

CONTENTS

 Additionally, 1. For x. t / D x.t / (even function), ImfX.f /g D 0 2. For x. t / D

2.5.3

x.t / (odd function), RefX.f /g D 0

Energy Spectral Density

 From the definition of signal energy, Z 1 jx.t /j2 dt ED 1  Z 1 Z 1 X.f /e j 2f t df dt x .t / D 1  Z 1 Z 1 1 x .t /e j 2f t dt df D X.f / 1

1

but Z

1

x .t /e j 2f t dt D

Z

1

x.t /e

j 2f t

 dt

D X .f /

1

1

 Finally, Z

1

ED

2

Z

1

jx.t /j dt D 1

jX.f /j2 df

1

which is known as Rayleigh’s Energy Theorem  Are the units consistent? – Suppose x.t / has units of volts – jX.f /j2 has units of (volts-sec)2 2-40

ECE 5625 Communication Systems I

2.5. FOURIER TRANSFORM

– In a 1 ohm system jX.f /j2 has units of Watts-sec/Hz = Joules/Hz  The energy spectral density is defined as 

G.f / D jX.f /j2 Joules/Hz  It then follows that Z

1

ED

G.f / df 1

Example 2.11: Rectangular Pulse  Consider

 x.t / D A…

t

t0





 FT is Z

t0 C=2

X.f / D A

e

j 2f t

dt

t0 =2

ˇt0C=2 ˇ e ˇ DA ˇ j 2f ˇ t =2  jf  0 jf   e e  e j 2f t0 D A  .j 2/f  D A sinc.f  /e j 2f t0   t t0 F A… ! Asinc.f  /e j 2f t0  j 2f t

 Plot jX.f /j, †X.f /, and G.f / ECE 5625 Communication Systems I

2-41

CONTENTS

Aτ1

X(f) 3 π

Amplitude Spectrum

|X(f)| 0.8

Phase Spectrum

0.6 ?3

0.4

-2/τ? 2

?2 -2/τ

?1 -1/τ

f 0

1/τ1

2 2/τ

1

?3

3

π/2

? 1-1/τ ?1

−π/2 ?2 t0 = τ/2

0.2 ?3

2

11/τ

−π

2/τ 2

3

f

slope = -πfτ/2

(Aτ)12 G(f) = |X(f)|2

Energy Spectral Density

0.8 0.6 0.4 0.2

?3

?2 -2/τ

?1 -1/τ

0

1/τ1

2 2/τ

3

f

Rectangular pulse spectra

2.5.4

Transform Theorems

 Be familiar with the FT theorems found in the table of Appendix G.6 of the text Superposition Theorem a1x1.t / C a2x2.t /

F

! a1X1.f / C a2X2.f /

proof:

2-42

ECE 5625 Communication Systems I

2.5. FOURIER TRANSFORM

Time Delay Theorem x.t

t0 /

F

! X.f /e

j 2f t0

proof:

Frequency Translation Theorem  In communications systems the frequency translation and modulation theorems are particularly important x.t /e j 2f0t proof: Note that Z 1 x.t /e j 2f0t e

j 2f t

F

! X.f

Z

1

dt D

1

f0/

x.t /e

j 2.f f0 /t

dt

1

so ˚ F x.t /e j 2f0t D X.f

f0 / QED

Modulation Theorem  The modulation theorem is an extension of the frequency translation theorm x.t / cos.2f0t / ECE 5625 Communication Systems I

1 ! X.f 2

F

1 f0/ C X.f C f0/ 2 2-43

CONTENTS

proof: Begin by expanding 1 1 cos.2f0t / D e j 2f0t C e 2 2

j 2f0 t

Then apply the frequency translation theorem to each term separately

X(f)

signal multiplier

A x(t)

Y(f)

y(t)

A/2

f 0

0

-f0

cos(2πf0t)

f f0

A simple modulator

Duality Theorem  Note that Z

1

FfX.t /g D

X.t /e

j 2f t

Z

1

dt D

1

X.t /e j 2.

f /t

dt

1

which implies that X.t /

2-44

F

! x. f /

ECE 5625 Communication Systems I

2.5. FOURIER TRANSFORM

Example 2.12: Rectangular Spectrum X(f) 1

-W

0

W

f

 Using duality on the above we have   t F X.t / D … ! 2W sinc.2Wf / D x. f / 2W  Since sinc( ) is an even function (sinc.x/ D sinc. x/), it follows that   f F 2W sinc.2W t / ! … 2W

Differentiation Theorem  The general result is d nx.t / F ! .j 2f /n X.f / n dt proof: For n D 1 we start with the integration by parts formula, ˇ R R ˇ u dv D uv ˇ v du, and apply it to   Z 1 dx dx j 2f t F D e dt dt 1 dt Z 1 ˇ1 ˇ D x.t /e j 2f t ˇ Cj 2f x.t /e j 2f t dt 1 „ ƒ‚ … „ 1 ƒ‚ … 0

ECE 5625 Communication Systems I

X.f /

2-45

CONTENTS

alternate — From Leibnitz’s rule for differentiation of integrals, Z 1 Z 1 @F .f; t / d F .f; t / df D df dt 1 @f 1 so Z 1 dx.t / d D X.f /e j 2f t df dt dt Z 1 1 @e j 2f t df D X.f / @t Z 1 1

D

j 2f X.f /e j 2f t df

1

)

F

! j 2f X.f /

dx=dt

QED

Example 2.13: FT of Triangle Pulse 1

−τ

t

τ

0

 Note that 1/τ 1/τ τ

t

−τ

-1/τ 2-46

−τ

τ

t

-2/τ

ECE 5625 Communication Systems I

2.5. FOURIER TRANSFORM

 Using the differentiation theorem for n D 2 we have that    n1 o 1 t 2 1 D F ƒ F ı.t C  / ı.t / C ı.t  /  .j 2f /2    1 j 2f  2 e C 1 e j 2f    D .j 2f /2 2 cos.2f  / 2 D  .2f /2 4 sin2.f  / 2 D D sinc .f  / 4.f  /2   t F ! sinc2.f  / ƒ 

Convolution and Convolution Theorem  Before discussing the convolution theorem we need to review convolution  The convolution of two signals x1.t / and x2.t / is defined as Z 1 x.t / D x1.t /  x2.t / D x1./x2.t / d  1 Z 1 D x2.t /  x1.t / D x2./x1.t / d  1

 A special convolution case is ı.t t0/ Z 1 ı.t t0/  x.t / D ı. t0/x.t / d  1 ˇ D x.t /ˇDt D x.t t0/ 0

ECE 5625 Communication Systems I

2-47

CONTENTS

Example 2.14: Rectangular Pulse Convolution  Let x1.t / D x2.t / D ….t = /  To evaluate the convolution integral we need to consider the integrand by sketching of x1./ and x2.t / on the  axis for different values of t  For this example four cases are needed for t to cover the entire time axis t 2 . 1; 1/  Case 1: When t <  we have no overlap so the integrand is zero and x.t / is zero x2(t - λ)

x1(λ) No overlap for t + τ/2 < -τ/2 or t < τ

t - τ/2

t

t + τ/2

−τ/2

0

λ

τ/2

 Case 2: When  < t < 0 we have overlap and Z 1 x1./x2.t / d  x.t / D 1 Z t C=2 ˇt C=2 ˇ D d  D ˇ =2

=2

D t C =2 C =2 D  C t x2(t - λ)

x1(λ) Overlap begins when t + τ/2 = -τ/2 or t = -τ

0 −τ/2 t + τ/2 2-48

τ/2

λ

ECE 5625 Communication Systems I

2.5. FOURIER TRANSFORM

 Case 3: For 0 < t <  the leading edge of x2.t / is to the right of x1./, but the trailing edge of the pulse is still overlapped Z =2 x.t / D d  D =2 t C =2 D  t t =2

x2(t - λ)

x1(λ) Overlap lasts until t = τ −τ/2

0

τ/2 t - τ/2

λ

t + τ/2

 Case 4: For t >  we have no overlap, and like case 1, the result is x.t / D 0 x2(t - λ)

x1(λ) No overlap for t > τ −τ/2

0

τ/2

t - τ/2

t + τ/2

λ

 Collecting the results 8 ˆ 0; t<  ˆ ˆ ˆ < C t;  t <0 x.t / D ˆ  t; 0  t <  ˆ ˆ ˆ :0; t  (  jt j; jtj   D 0; otherwise ECE 5625 Communication Systems I

2-49

CONTENTS

 Final summary,       t t t … … D ƒ     Convolution Theorem: We now consider x1.t /x2.t / in terms of the FT Z 1 x1. /x2.t  / d  1Z Z 1  1 D x1. / X2.f /e j 2f .t / df d  1  Z 11 Z 1 x1. /e j 2f  d  e j 2f t df X2.f / D 1 1 Z 1 D X1.f /X2.f /e j 2f t df 1

which implies that x1.t /  x2.t /

F

! X1.f /X2.f /

Example 2.15: Revisit ….t = /  ….t = /  Knowing that ….t = /….t = / D ƒ.t = / in the time domain, we can follow-up in the frequency domain by writing ˚ ˚ 2 F ….t = /  F ….t = / D  sinc.f  /  We have also established the transform pair    t F 2 2 2 !  sinc .f  / D   sinc .f  / ƒ  2-50

ECE 5625 Communication Systems I

2.5. FOURIER TRANSFORM

or   t ƒ 

F

! sinc2.f  /

Multiplication Theorem  Having already established the convolution theorem, it follows from the duality theorem or direct evaluation, that x1.t /  x2.t /

2.5.5

F

! X1.f /  X2.f /

Fourier Transforms in the Limit

 Thus far we have considered two classes of signals 1. Periodic power signals which are described by line spectra 2. Non-periodic (aperiodic) energy signals which are described by continuous spectra via the FT  We would like to have a unifying approach to spectral analysis  To do so we must allow impulses in the frequency domain by using limiting operations on conventional FT pairs, known as Fourier transforms-in-the-limit – Note: The corresponding time functions have infinite energy, which implies that the concept of energy spectral density will not apply for these signals (we will introduce the concept of power spectral density for these signals) ECE 5625 Communication Systems I

2-51

CONTENTS

Example 2.16: A Constant Signal  Let x.t / D A for 1 < t < 1  We can write x.t / D lim A….t =T / T !1

 Note that ˚ F A….t =T / D AT sinc.f T /  Using the transform-in-the-limit approach we write Ffx.t /g D lim AT sinc.f T / T !1

1

?3

?2

?1

1

AT1

0.8

0.8

0.6

0.6

0.4

0.4

0.2

0.2

? 0.2

1

f

3 ?3

2

?2

?1

AT2 T2 >> T1

1

? 0.2

2

f

3

Increasing T in AT sinc.f T /

 Note that since x.t / has no time variation it seems reasonable that the spectral content ought to be confined to f D 0  Also note that it can be shown that Z 1 AT sinc.f T / df D A;

8T

1

 Thus we have established that A 2-52

F

! Aı.f / ECE 5625 Communication Systems I

2.5. FOURIER TRANSFORM

 As a further check Z ˚ F 1 Aı.f / D

1

Aı.f /e

j 2ff t

df D Ae

ˇ ˇ

j 2f t ˇ f D0

1

DA

 As a result of the above example, we can obtain several more FT-in-the-limit pairs F

Ae j 2f0t

! Aı.f f0/ A  j F e ı.f f0/ C e A cos.2f0t C  / ! 2 F Aı.t t0/ ! Ae j 2f t0

j

 ı.f C f0/

 Reciprocal Spreading Property: Compare F

! A and A

Aı.t /

F

! Aı.f /

A constant signal of infinite duration has zero spectral width, while an impulse in time has zero duration and infinite spectral width

2.5.6

Fourier Transforms of Periodic Signals

 For an arbitrary periodic signal with Fourier series x.t / D

1 X

Xne j 2 nf0t

nD 1 ECE 5625 Communication Systems I

2-53

CONTENTS

we can write 1 X

" X.f / D F

# Xne j 2 nf0t

nD 1

D D

1 X nD 1 1 X

n o j 2 nf0 t XnF e Xnı.f

nf0/

nD 1

using superposition and FfAe j 2f0t g D Aı.f

f0 /

 What is the difference between line spectra and continuous spectra? none!  Mathematically, Convert to time domain Line Spectra

Sum phasors Convert to time domain

Continuous Spectra

Integrate impulses to get phasors via the inverse FT

 The Fourier series coefficients need to be known before the FT spectra can be obtained  A technique that obtains the FT directly will be discussed shortly (page 2–58)) 2-54

ECE 5625 Communication Systems I

2.5. FOURIER TRANSFORM

Example 2.17: Ideal Sampling Waveform  When we discuss sampling theory it will be useful to have the FT of the periodic impulse train signal 1 X

ys .t / D

ı.t

mTs /

mD 1

where Ts is the sample spacing or period  Since this signal is periodic, it must have a Fourier series representation too  In particular 1 Yn D Ts

Z ı.t /e

j 2.nfs /t

dt D

Ts

1 D fs ; any n Ts

where fs is the sampling rate in Hz  The FT of ys .t / is given by Ys .f / D fs

1 X

1 X ˚ j 2 nf /t 0 F e D fs ı.f

nD 1

nfs /

nD 1

 Summary, 1 X

ı.t

mD 1 ECE 5625 Communication Systems I

mTs /

F

! fs

1 X

ı.f

nfs /

nD 1 2-55

CONTENTS

ys(t)

1

...

... -Ts

Ts

0

t

4Ts

Ys(f) fs ...

... f -fs

fs

0

4fs

An impulse train in time is an impulse train in frequency

Example 2.18: Convolve Step and Exponential

 Find y.t / D Au.t /  e

˛t

u.t /, ˛ > 0

 For t  0 there is no overlap so Y .t / D 0

No overlap λ t 2-56

0 ECE 5625 Communication Systems I

2.5. FOURIER TRANSFORM

 For t > 0 there is always overlap t

Z y.t / D

Ae

˛.t /

d

0

D Ae

˛t

D Ae

˛t

e ˛ ˇˇt  ˇ ˛ 0 e ˛t 1  ˛

For t > 0 there is always overlap λ

t

0

 Summary, y.t / D

A 1 ˛

e

˛t



u.t /

A/α y(t)

0

ECE 5625 Communication Systems I

t

2-57

CONTENTS

Direct Approach for the FT of a Periodic Signal  The FT of a periodic signal can be found directly by expanding x.t / as follows " 1 # 1 X X x.t / D ı.t mTs /  p.t / D p.t mTs / mD 1

mD 1

where p.t / represents one period of x.t /, having period Ts  From the convolution theorem ( 1 X X.f / D F ı.t

) mTs /  P .f /

mD 1 1 X

D fs P .f /

ı.f

nfs /

nD 1 1 X

D fs

P .nfs /ı.f

nfs /

nD 1

where P .f / D Ffp.t /g  The FT transform pair just established is 1 X mD 1

2-58

p.t

mTs /

F

!

1 X

fs P .nfs /ı.f

nfs /

nD 1

ECE 5625 Communication Systems I

2.5. FOURIER TRANSFORM

Example 2.19: p.t / D ….t =2/ C ….t =4/, T0 D 10 x(t) 2 ...

1

... t

-2

-1

0

1

2

T0 = 10

Stacked pulses periodic signal

 We begin by finding P .f / using Ff….t = /g D  sinc.f  / P .f / D 2sinc.2f / C 4sinc.4f /  Plugging into the FT pair derived above with nfs D n=10,    1  n 2n n 1 X 2sinc C 4sinc ı f X.f / D 10 nD 1 5 5 10

2.5.7

Poisson Sum Formula

 The Poisson sum formula from mathematics can be derived using the FT pair e

j 2.nfs /t

by writing ( 1 X 1 F fs P .nfs /ı.f nD 1 ECE 5625 Communication Systems I

F

! ı.f

nfs /

)

1 X

nfs / D fs

P .nfs /e j 2.nfs /t

nD 1 2-59

CONTENTS

 From the earlier developed FT of periodic signals pair, we know that the left side of the above is also equal to 1 X

p.t

also

mTs / D fs

mD 1

1 X

P .nfs /e j 2.nfs /t

nD 1

 We can finally relate this back to the Fourier series coefficients, i.e., Xn D fs P .nfs /

2.6

Power Spectral Density and Correlation

 For energy signals we have the energy spectral density, G.f /, defined such that Z 1 ED G.f / df 1

 For power signals we can define the power spectral density (PSD), S.f / of x.t / such that Z 1 S.f / df D hjx.t /j2i P D 1

– Note: S.f / is real, even and nonnegative – If x.t / is periodic S.f / will consist of impulses at the harmonic locations  For x.t / D A cos.!0t C  /, intuitively, 1 S.f / D A2ı.f 4 2-60

1 f0/ C A2ı.f C f0/ 4 ECE 5625 Communication Systems I

2.6. POWER SPECTRAL DENSITY AND CORRELATION

since S.f / df D A2=2 as expected (power on a per ohm basis) R

 To derive a general formula for the PSD we first need to consider the autocorrelation function

2.6.1

The Time Average Autocorrelation Function

 Let . / be the autocorrelation function of an energy signal 1

˚ . / D F G.f / ˚ 1  D F X.f /X .f / ˚ ˚ D F 1 X.f /  F 1 X .f / F

! X .f / for x.t / real, so Z 1 . / D x.t /  x. t / D x.t /x.t C  / d 

but x. t /

1

or Z

T

. / D lim

T !1

x.t /x.t C  / d  T

 Observe that ˚ G.f / D F . /  The autocorrelation function (ACF) gives a measure of the similarity of a signal at time t to that at time t C ; the coherence between the signal and the delayed signal ECE 5625 Communication Systems I

2-61

CONTENTS

X(f) G(f) = |X(f)|2

x(t)

φ(τ) =

Energy spectral density and signal relationships

2.6.2

Power Signal Case

For power signals we define the autocorrelation function as Rx . / D hx.t /x.t C  /i Z T 1 D lim x.t /x.t C  / dt T !1 2T Z T if periodic 1 x.t /x.t C  / dt D T0 T0  Note that Z

2

1

Rx .0/ D hjx.t /j i D

Sx .f / df 1

and since for energy signals . / assumption is that Rx . /

2-62

F

! G.f /, a reasonable

F

! Sx .f /

ECE 5625 Communication Systems I

2.6. POWER SPECTRAL DENSITY AND CORRELATION

 A formal statement of this is the Wiener-Kinchine theorem (a proof is given in text Chapter 7) Z 1 Sx .f / D Rx . /e j 2f  d  1

x(t)

Rx(τ)

Sx(f)

Power spectral density (PSD) and signal relationships

2.6.3

Properties of R. /

 The following properties hold for the autocorrelation function 1. R.0/ D hjx.t /j2i  jR. /j for all values of  2. R.  / D hx.t /x.t

 /i D R. / ) an even function

3. limjj!1 R. / D hx.t /i2 if x.t / is not periodic 4. If x.t / is periodic, with period T0, then R. / D R. CT0/ 5. FfR. /g D S.f /  0 for all values of f  The power spectrum and autocorrelation function are frequently used for systems analysis with random signals  For the case of random signal, x.t /, the Fourier transform X.f / is also a random signal, but now in the frequency domain  The autocorrelation and PSD of x.t /, under typical assumptions, are both deterministic functions; this turns out to be vital in problem solving in Comm II and beyond ECE 5625 Communication Systems I

2-63

CONTENTS

Example 2.20: Single Sinusoid  Consider the signal x.t / D A cos.2f0t C  /, for all t Z 1 T0 2 Rx . / D A cos.2f0t C  / cos.2.t C  / C  / dt T0 0 Z   A2 D cos.2f0 / C cos.2.2f0/t C 2f0 C 2 / dt 2T0 T0 A2 cos.2f0 / D 2  Note that ˚ A2  F Rx . / D Sx .f / D ı.f 4

 f0/ C ı.f C f0/

More Autocorrelation Function Properties  Suppose that x.t / has autocorrelation function Rx . /  Let y.t / D A C x.t /, A D constant Ry . / D hŒA C x.t /ŒA C x.t C  /i D hA2i C hAx.t C  /i C hAx.t /i C hx.t /x.t C  /i D A2 C 2Ahx.t /i CRx . / ƒ‚ … „ const. terms

 Let z.t / D x.t

t0 /

Rz . / D hz.t /z.t C  /i D hx.t t0/x.t t0 C  i D hx./x. C  /i; with  D t t0 D Rx . / 2-64

ECE 5625 Communication Systems I

2.6. POWER SPECTRAL DENSITY AND CORRELATION

 The last result shows us that the autocorrelation function is blind to time offsets

Example 2.21: Sum of Two Sinusoids  Consider the sum of two sinusoids y.t / D x1.t / C x2.t / where x1.t / D A1 cos.2f1tC1/ and x2.t / D A2 cos.2f2tC 2/ and we assume that f1 ¤ f2  Using the definition Ry . / D hŒx1.t / C x2.t /Œx1.t C  /x2.t C  /i D hx1.t /x1.t C  /i C hx2.t /x2.t C  /i C hx1.t /x2.t C  /i C hx2.t /x1.t C  /i  The last two terms are zero since hcos..!1 ˙ !2/t /i D 0 when f1 ¤ f2 (why?), hence Ry . / D Rx1 . / C Rx2 . /; for f1 ¤ f2 A21 A22 cos.2f1 / C cos.2f2 / D 2 2

Example 2.22: PN Sequences  In the testing and evaluation of digital communication systems a source of known digital data (i.e., ‘1’s and ‘0’s) is required (see also text Chapter 10 p. 524–527) ECE 5625 Communication Systems I

2-65

CONTENTS

 A maximal length sequence generator or pseudo-noise (PN) code is often used for this purpose  Practical implementation of a PN code generator can be accomplished using an N -stage shift register with appropriate exclusive-or feedback connections  The sequence length or period of the resulting PN code is M D 2N 1 bits long

Clock Period = T C

C Q1

D1

D2

C Q2

D3

x(t)

Q3

M = 23 - 1 = 7

x(t)

+A t -A one period = MT

Three stage PN (m-sequence) generator using logic circuits

 PN sequences have quite a number of properties, one being that the time average autocorrelation function is of the form shown below 2-66

ECE 5625 Communication Systems I

2.6. POWER SPECTRAL DENSITY AND CORRELATION

Rx(τ)

A2 MT

... -T

...

T

τ

MT

-A2/M

PN sequence autocorrelation function

 The calculation of the power spectral density will be left as a homework problem (a specific example is text Example 2.20) – Hint: To find Sx .f / D FfRx . /g we use X X F p.t nTs / ! fs P .nfs /ı.f n

nfs /

n

where Ts D M T – One period of Rx . / is a triangle pulse with a level shift  Suppose the logic levels are switched from ˙A to positive levels of say v1 to v2 – Using the additional autocorrelation function properties this can be done – You need to know that a PN sequence contains one more ‘1’ than ‘0’  Python code for generating PN sequences from 2 to 12 stages plus 16, is found ssd.py: def PN_gen(N_bits,m=5): """ Maximal length sequence signal generator.

ECE 5625 Communication Systems I

2-67

CONTENTS

Generates a sequence 0/1 bits of N_bit duration. The bits themselves are obtained from an m-sequence of length m. Available m-sequence (PN generators) include m = 2,3,...,12, & 16. Parameters ---------N_bits : the number of bits to generate m : the number of shift registers. 2,3, .., 12, & 16 Returns ------PN : ndarray of the generator output over N_bits Notes ----The sequence is periodic having period 2**m - 1 (2^m - 1). Examples ------->>> # A 15 bit period signal nover 50 bits >>> PN = PN_gen(50,4) """ c = m_seq(m) Q = len(c) max_periods = int(np.ceil(N_bits/float(Q))) PN = np.zeros(max_periods*Q) for k in range(max_periods): PN[k*Q:(k+1)*Q] = c PN = np.resize(PN, (1,N_bits)) return PN.flatten() def m_seq(m): """ Generate an m-sequence ndarray using an all-ones initialization. Available m-sequence (PN generators) include m = 2,3,...,12, & 16. Parameters ---------m : the number of shift registers. 2,3, .., 12, & 16 Returns ------c : ndarray of one period of the m-sequence Notes ----The sequence period is 2**m - 1 (2^m - 1). Examples ------->>> c = m_seq(5) """ # Load shift register with all ones to start sr = np.ones(m) # M-squence length is: Q = 2**m - 1 c = np.zeros(Q)

2-68

ECE 5625 Communication Systems I

2.6. POWER SPECTRAL DENSITY AND CORRELATION

if m == 2: taps = np.array([1, 1, 1]) elif m == 3: taps = np.array([1, 0, 1, 1]) elif m == 4: taps = np.array([1, 0, 0, 1, 1]) elif m == 5: taps = np.array([1, 0, 0, 1, 0, 1]) elif m == 6: taps = np.array([1, 0, 0, 0, 0, 1, 1]) elif m == 7: taps = np.array([1, 0, 0, 0, 1, 0, 0, 1]) elif m == 8: taps = np.array([1, 0, 0, 0, 1, 1, 1, 0, 1]) elif m == 9: taps = np.array([1, 0, 0, 0, 0, 1, 0, 0, 0, 1]) elif m == 10: taps = np.array([1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1]) elif m == 11: taps = np.array([1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1]) elif m == 12: taps = np.array([1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1]) elif m == 16: taps = np.array([1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1]) else: print ’Invalid length specified’ for n in range(Q): tap_xor = 0 c[n] = sr[-1] for k in range(1,m): if taps[k] == 1: tap_xor = np.bitwise_xor(tap_xor,np.bitwise_xor(int(sr[-1]), int(sr[m-1-k]))) sr[1:] = sr[:-1] sr[0] = tap_xor return c

R. /, S.f /, and Fourier Series  For a periodic power signal, x.t /, we can write 1 X x.t / D Xne j 2.nf0/t nD 1

 There is an interesting linkage between the Fourier series representation of a signal, the power spectrum, and then back to the autocorrelation function ECE 5625 Communication Systems I

2-69

CONTENTS

 Using the orthogonality properties of the Fourier series expansion we can write * 1 ! !+ 1 X X R. / D Xne j 2.nf0/t Xme j 2.mf0/.tC/ D

nD 1 1 1 X X

mD 1

XnXm

nD 1 mD 1

D D

1 X nD 1 1 X

˝ j 2.nf t/ j 2.mf /.tC/˛ 0 e 0 e ƒ‚ … „ n¤m terms are zero, why?

˝ jXnj2 e j 2.nf0/t e

j 2.nf0 /.tC/

˛

jXnj2e j 2.nf0/

nD 1

 The power spectral density can be obtained by Fourier transforming both sides of the above S.f / D

1 X

jXnj2ı.f

nf0/

nD 1

Example 2.23: PN Sequence Analysis and Simulation  In this example I consider an N D 4 or M D 15 generator from two points of view: 1. First using the FFT to calculate the Fourier coefficients Xn using one period of the waveform (in discrete-time I use 10 samples per bit) 2. Second, I just generate a waveform of 10,000 bits (again at 10 samples per bit) and use standard signal processing 2-70

ECE 5625 Communication Systems I

2.6. POWER SPECTRAL DENSITY AND CORRELATION

tools to estimate the time average autocorrelation function and the PSD  Numerical Fourier Series Analysis: Generate one period of the waveform using ssd.m_seq(4) and then upsample and interpolate to create a waveform of 10 samples per bit  The waveform amplitude levels are Œ0; 1 so there is a large DC component visible in the spectrum (why?); eight ones and seven zeros makes the average value X0 D 8=15 D 0:533  The function ssd.m_seq() returns an array of zeros and ones of length 15, i.e., len(x_PN4) = 15  To create a waveform I upsample the signal by 10 and then filter using a finite impulse response of exactly 10 ones  To plot the line spectrum I use the ssd.line_spectra() function used earlier

ECE 5625 Communication Systems I

2-71

CONTENTS

15 bit period

Line spacing = 1/(MT) = 1/15 Hz

DC line 0.533 (-5.46 dB) f = 1/T = 1 Hz

sinc 2 ( x ) spect. shape

Fourier series based spectral analysis of PN code

2-72

ECE 5625 Communication Systems I

2.6. POWER SPECTRAL DENSITY AND CORRELATION

...

...

MT = 15T = 15 -1 -1 = M 15 –1

1

Same spectral shape and line spacing as direct FS analysis; scaling with PSD function is different however DC different as waveform values are [-1,1]

Using simulation to estimate Ry ./ and Sy .f / of a PN code

 In generating an estimate of the autocorrelation function I use the FFT to find the time averaged autocorrelation function in the frequency domain  In generating the spectral estimate, the Python function psd()(from matplotlib) function uses Welch’s method of averaged periodograms 1  Here the PSD estimate uses a 4096 point FFT and assumed sampling rate of 10 Hz; the spectral resolution is 10/4096 = 0.002441 Hz 1

http://en.wikipedia.org/wiki/Periodogram

ECE 5625 Communication Systems I

2-73

CONTENTS

2.7

Linear Time Invariant (LTI) Systems x(t)

y(t) = operator

Linear system block diagram

Definition  Linearity (superposition) holds, that is for input ˛1x1.t /C˛2x2.t /, ˛1 and ˛2 constants,   y.t / D H ˛1x1.t / C ˛2x2.t /     D ˛1H x1.t / C ˛2H x2.t / D ˛1y1.t / C ˛2y2.t /  A system is time invariant (fixed) if for y.t / D HŒx.t /, a delayed input gives a correspondingly delayed output, i.e.,   y.t t0/ D H x.t t0/ Impulse Response and Superposition Integral  The impulse response of an LTI system is denoted    h.t / D H ı.t / assuming the system is initially at rest  Suppose we can write x.t / as x.t / D

N X

˛nı.t

tn /

nD1 2-74

ECE 5625 Communication Systems I

2.7. LINEAR TIME INVARIANT (LTI) SYSTEMS

 For an LTI system with impulse response h. / N X

y.t / D

˛nh.t

tn /

nD1

 To develop the superposition integral we write Z 1 x.t / D x./ı.t / d  1

' lim

N !1

N X

x.nt /ı.t

nt / t; for t  1

nD N

Rectangle area is approximation

x(t) ...

...

−∆t

∆t

0

2∆t

3∆t

4∆t

5∆t

6∆t

t

Impulse sequence approximation to x.t/

 If we apply H to both sides and let t ! 0 such that nt !  we have y.t / ' lim

N X

N !1

Z

nD N

x./h.t Z

nt / t

1

D or

x.nt /h.t

/ d  D x.t /  h.t /

1 1

D

x.t

 /h. / d D h.t /  x.t /

1 ECE 5625 Communication Systems I

2-75

CONTENTS

2.7.1

Stability

 In signals and systems the concept of bounded-input boundedoutput (BIBO) stability is introduced  Satisfying this definition requires that every bounded-input (jx.t /j < 1) produces a bounded output (jy.t /j < 1)  For LTI systems a fundamental theorem states that a system is BIBO stable if and only if Z 1 jh.t /j dt < 1 1

 Further implications of this will be discussed later

2.7.2

Transfer Function

 The frequency domain result corresponding to the convolution expression y.t / D x.t /  h.t / is Y .f / D X.f /H.f / where H.f / is known as the transfer function or frequency response of the system having impulse response h.t /  It immediately follows that h.t /

F

! H.f /

and ˚ 1 y.t / D F X.f /H.f / D

Z

1

X.f /H.f /e j 2f t df

1 2-76

ECE 5625 Communication Systems I

2.7. LINEAR TIME INVARIANT (LTI) SYSTEMS

2.7.3

Causality

 A system is causal if the present output relies only on past and present inputs, that is the output does not anticipate the input  The fact that for LTI systems y.t / D x.t /  h.t / implies that for a causal system we must have h.t / D 0; t < 0 – Having h.t / nonzero for t < 0 would incorporate future values of the input to form the present value of the output  Systems that are causal have limitations on their frequency response, in particular the Paley–Wiener theorem states that for R1 2 1 jh.t /j dt < 1, H.f / for a causal system must satisfy Z

1

j ln jH.f /jj df < 1 1Cf2 1

 In simple terms this means: 1. We cannot have jH.f /j D 0 over a finite band of frequencies (isolated points ok) 2. The roll-off rate of jH.f /j cannot be too great, e.g., e k1jf j 2 andpe k2jf j are not allowed, but polynomial forms such as 1=.1 C .f =fc /2N , N an integer, are acceptable 3. Practical filters such as Butterworth, Chebyshev, and elliptical filters can come close to ideal requirements ECE 5625 Communication Systems I

2-77

CONTENTS

2.7.4

Properties of H.f /

 For h.t / real it follows that jH. f /j D jH.f /j and †H. f / D

†H.f /

why?  Input/output relationships for spectral densities are Gy .f / D jY .f /j2 D jX.f /H.f /j2 D jH.f /j2Gx .f / Sy .f / D jH.f /j2Sx .f / proof in text chap. 6

Example 2.24: RC Lowpass Filter R x(t) X(f )

vc(t)

y(t) ic(t)

C

Y(f )

h(t), H(f) RC lowpass filter schematic

 To find H.f / we may solve the circuit using AC steady-state analysis 1 Y .j!/ 1 j!c D D 1 X.j!/ 1 C j!RC R C j!c so H.f / D 2-78

1 Y .f / ; where f3 D 1=.2RC / D X.f / 1 C jf =f3 ECE 5625 Communication Systems I

2.7. LINEAR TIME INVARIANT (LTI) SYSTEMS

 From the circuit differential equation x.t / D ic .t /R C y.t / but ic .t / D c

dvc .t / y.t / Dc dt dt

thus RC

dy.t / C y.t / D x.t / dt

 FT both sides using dx=dt

F

! j 2f X.f /

j 2f RC Y .f / C Y .f / D X.f / so again Y .f / 1 D X.f / 1 C jf =f3 1 Dp e j tan 1 C .f =f3/2

H.f / D

1 .f =f / 3

 The Laplace transform could also be used here, and perhaps is preferred; we just need to substitute s ! j! ! j 2f ECE 5625 Communication Systems I

2-79

CONTENTS

1

f

f3

-f3 π/2

f

-π/2

RC lowpass frequency response

 Find the system response to  x.t / D A…

.t

T =2/ T



 Finding Y .f / is easy since 

 1 Y .f / D X.f /H.f / D AT sinc.f T / e 1 C jf =fs

jf t

 To find y.t / we can IFT the above, use Laplace transforms, or convolve directly  From the FT tables we known that h.t / D 2-80

1 e RC

t=.RC /

u.t /

ECE 5625 Communication Systems I

2.7. LINEAR TIME INVARIANT (LTI) SYSTEMS

 In Example 2.18 we showed that Au.t /  e

˛t

A 1 u.t / D ˛

e

˛t



u.t /

 Note that  A…

t

T =2 T

 D AŒu.t /

u.t

T /

and here ˛ D 1=.RC /, so   A t=.RC / u.t / RC 1 e y.t / D RC   A .t T /=.RC / RC 1 e u.t RC

T/

RC = |X(f)|, |H(f)|, |Y(f)|

T/1 0 T/ 5

y(t)

1

0.8

T/ 2

0.8

0.6

1

0.6

0.4

T

0.4

0.2

2T

0.2

0.5

1

1.5

2

2.5

3

t/T

-3

-2

-1

1

0.8

0.6

0.6

RC = T/2

0.4

0.2 -1

2

3

fT

|X(f)|, |H(f)|, |Y(f)| 0.8

0.4

-2

1

1

|X(f)|, |H(f)|, |Y(f)|

-3

RC = 2T

RC = T/10

0.2 1

2

3

fT

-3

-2

-1

1

2

3

fT

Pulse time response and frequency spectra with A D 1

ECE 5625 Communication Systems I

2-81

CONTENTS

2.7.5

Input/Output with Spectral Densities

 We know that for an LTI system with frequency response H.f / and input Fourier transform X.f /, the output Fourier transform is given by Y .f / D H.f /X.f /  It is easy to show that in terms of energy spectral density Gy .f / D jH.f /j2 Gx .f / where Gx .f / D jX.f /j2 and Gy .f / D jY .f /j2  For the case of power signals a similar relationship holds with the power spectral density (proof found in Chapter text 7, i.e., Comm II) Sy .f / D jH.f /j2 Sx .f /

2.7.6

Response to Periodic Inputs

 When the input is periodic we can write 1 X

x.t / D

Xne j 2.nf0/t

nD 1

which implies that 1 X

X.f / D

Xnı.f

nf0/

nD 1

 It then follows that Y .f / D

1 X

XnH.nf0/ı.f

nf0/

nD 1 2-82

ECE 5625 Communication Systems I

2.7. LINEAR TIME INVARIANT (LTI) SYSTEMS

and y.t / D D

1 X nD 1 1 X

XnH.nf0/e j 2.nf0/t jXnjjH.nf0je j Œ2.nf0/t C†XnC†H.nf0/

nD 1

 This is a steady-state response calculation, since the analysis assumes that the periodic signal was applied to the system at tD 1

2.7.7

Distortionless Transmission

 In the time domain a distortionless system is such that for any input x.t /, y.t / D H0x.t t0/ where H0 and t0 are constants  In the frequency domain the implies a frequency response of the form H.f / D H0e j 2f t0 ; that is the amplitude response is constant and the phase shift is linear with frequency  Distortion types: 1. Amplitude response is not constant over a frequency band (interval) of interest $ amplitude distortion 2. Phase response is not linear over a frequency band of interest $ phase distortion ECE 5625 Communication Systems I

2-83

CONTENTS

3. The system is non-linear, e.g., y.t / D k0 C k1x.t/ C k2x 2.t / $ nonlinear distortion

2.7.8

Group and Phase Delay

 The phase distortion of a linear system can be characterized using group delay, Tg .f /, Tg .f / D

1 d.f / 2 df

where .f / is the phase response of an LTI system  Note that for a distortionless system .f / D Tg .f / D

1 d 2 df

2f t0, so

2f t0 D t0 s;

clearly a constant group delay  Tg .f / is the delay that two or more frequency components undergo in passing through an LTI system – If say Tg .f1/ ¤ Tg .f2/ and both of these frequencies are in a band of interest, then we know that delay distortion exists – Having two different frequency components arrive at the system output at different times produces signal dispersion  An LTI system passing a single frequency component, x.t / D A cos.2f1t /, always appears distortionless since at a single 2-84

ECE 5625 Communication Systems I

2.7. LINEAR TIME INVARIANT (LTI) SYSTEMS

frequency the output is just   y.t / D AjH.f1/j cos 2f1t C .f1/    .f1/ D AjH1.f /j cos 2f1 t 2f1 which is equivalent to a delay known as the phase delay .f / 2f

Tp .f / D  The system output now is 

y.t / D AjH.f1/j cos 2f1.t

Tp .f1//

 Note that for a distortionless system Tp .f / D

1 . 2f t0/ D t0 2f

Example 2.25: Terminated Lossless Transmission Line Rs = R0

R0, vp

x(t)

RL = R0

y(t)

L

1 y.t / D x t 2

L vp

Lossless transmission line ECE 5625 Communication Systems I

2-85

CONTENTS

 We conclude that H0 D 1=2 and t0 D L=vp  Note that a real transmission line does have losses that introduces dispersion on a wideband signal

Example 2.26: A Fictitious System Ampl.

Radians 1.5 H(f)

2

|H(f)|

1 1.5 0.5 1

-20

-10

10

20

f (Hz)

-0.5 0.5 -1 -20

-10

10

20

f (Hz)

-1.5

Time Tg(f)

Time Tp(f)

0.015 0.0125

0.015

0.01

0.014

0.0075

0.013

0.005

0.012

0.0025 -20

0.016

-10

0.011

f (Hz) 10

20

-20

-10

10

20

f (Hz)

No distortion on |f | < 10 Hz band

Amplitude, phase, group delay, phase delay

 The system in this example is artificial, but the definitions can be observed just the same  For signals with spectral content limited to jf j < 10 Hz there is no distortion, amplitude or phase/group delay 2-86

ECE 5625 Communication Systems I

2.7. LINEAR TIME INVARIANT (LTI) SYSTEMS

 For 10 < jf j < 15 amplitude distortion is present  For jf j > 15 both amplitude and phase distortion are present  What about the interval 10 < jf j < 15?

2.7.9

Nonlinear Distortion

 In the time domain a nonlinear system may be written as y.t / D

1 X

anx n.t /

nD0

 Specifically consider y.t / D a1x.t / C a2x 2.t /  Let x.t / D A1 cos.!1t / C A2 cos.!2t /  Expanding the output we have   y.t / D a1 A1 cos.!1t / C A2 cos.!2t /  2 C a1 A1 cos.!1t / C A2 cos.!2t /   D a1 A1 cos.!1t / C A2 cos.!2t / na  a2  2 o 2 2 2 2 A CA C A cos.2!1t / C A2 cos.2!2t / C 2 1˚ 2 2 1 C a2A1A2 cosŒ.!1 C !2/t  C cosŒ.!1 !2/t  – The third line is the desired output ECE 5625 Communication Systems I

2-87

CONTENTS

– The fourth line is termed harmonic distortion – The fifth line is termed intermodulation distortion Input

Output a1A1

2

a2A1

A1

2

NonLinear 0

f

f1 Input

2

f1

0

2

A2

f

2f1 a1A1A2

Output

NonLinear

A1

2

a2A1

2

a1a2A1

2

a2A1

a1A1

2

a1A2 2

a2(A1 + A2)

2

a2A2

2 0

f1

f2

f

0 f2-f1

f1

f2

2f1

2f2

f

f1+f2

One and two tones in y.t/ D a1 x.t/ C a2 x 2 .t/ device

 In general if y.t / D a1x.t / C a2x 2.t / the multiplication theorem implies that Y .f / D a1X.f / C a2X.f /  X.f /   In particular if X.f / D A… f =.2W / 

f Y .f / D a1A… 2W 2-88





f C a22WA2ƒ 2W



ECE 5625 Communication Systems I

2.7. LINEAR TIME INVARIANT (LTI) SYSTEMS

Y( f ) =

2Wa2A2

a 1A

-W

+ f

W

-2W

f

2W

a1A + 2Wa2A2 a1A + Wa2A2 Wa2A2

= -2W -W

f

W 2W

Continuous spectrum in y.t/ D a1 x.t/ C a2 x 2 .t/ device

2.7.10

Ideal Filters

1. Lowpass of bandwidth B 

 f HLP.f / D H0… e 2B |HLP(f)| H0 -B

B

j 2f t0

slope = -2πt0

HLP(f)

f

f -B

B

2. Highpass with cutoff B  HHP.f / D H0 1 |HHP(f)| H0 -B

B

ECE 5625 Communication Systems I

 ….f =.2B// e slope = -2πt0

j 2f t0

HHP(f)

f

f -B

B

2-89

CONTENTS

3. Bandpass of bandwidth B 

 f0/ C Hl .f C f0/ e

HBP.f / D Hl .f

j 2f t0

where Hl .f / D H0….f =B/

B

|HBP(f)| H0 B

slope = -2πt0

HBP(f)

f -f0

f f0

-f0

f0

 The impulse response of the lowpass filter is 1

˚

hLP.t / D F H0….f =.2B//e D 2BH0sincŒ2B.t t0/

j 2f t0



 Ideal filters are not realizable, but simplify calculations and give useful performance upper bound results – Note that hLP.t / ¤ 0 for t < 0, thus the filter is noncausal and unrealizable  From the modulation theorem it also follows that hBP.t / D 2hl .t t0/ cosŒ2f0.t t0/ D 2BH0sincŒB.t t0/ cosŒ2f0.t 2-90

t0/

ECE 5625 Communication Systems I

2.7. LINEAR TIME INVARIANT (LTI) SYSTEMS

hLP(t)

hBP(t)

2BH0

2BH0 t0

t

t0 t0 - 1 2B

t

t0 + 1 2B

t0 - 1 2B

t0 + 1 2B

Ideal lowpass and bandpass impulse responses

2.7.11

Realizable Filters

 We can approximate ideal filters with realizable filters such as Butterworth, Chebyshev, and Bessel, to name a few  We will only consider the lowpass case since via frequency transformations we can obtain the others Butterworth  A Butterworth filter has a maximally flat (flat in the sense of derivatives of the amplitude response at dc being zero) passband  In the s-domain (s D  Cj!) the transfer function of a lowpass design is HBU.s/ D

.s

!cn s1/.s s2/    .s

sn/

where    1 2k 1 C ; k D 1; 2; : : : ; n sk D !c exp  2 2n ECE 5625 Communication Systems I

2-91

CONTENTS

 Note that the poles are located on a semi-circle of radius !c D 2fc , where fc is the 3dB cuttoff frequency of the filter  The amplitude response of a Butterworth filter is simply jHBU.f /j p

1 1 C .f =fc /2n

Butterworth n D 4 lowpass filter

Chebyshev  A Chebyshev type I filter (ripple in the passband), is is designed to maintain the maximum allowable attenuation in the passband yet have maximum stopband attenuation  The amplitude response is given by jHC.f /j D p

1 1 C  2Cn2.f /

where ( Cn.f / D 2-92

cos.n cos 1.f =fc //;

0  jf j  fc

cosh.n cosh 1.f =fc //;

jf j > fc

ECE 5625 Communication Systems I

2.7. LINEAR TIME INVARIANT (LTI) SYSTEMS

 The poles are located on an ellipse as shown below

Chebyshev n D 4 lowpass filter

Bessel  A Bessel filter is designed to maintain linear phase in the passband at the expense of the amplitude response HBE.f / D

Kn Bn.f /

where Bn.f / is a Bessel polynomial of order n (see text) and Kn is chosen so that the filter gain is unity at f D 0

ECE 5625 Communication Systems I

2-93

CONTENTS

Amplitude Rolloff and Group Delay Comparision  Compare Butterworth, 0.1 dB ripple Chebyshev, and Bessel

n D 3 Amplitude response

n D 3 Group delay 2-94

ECE 5625 Communication Systems I

2.7. LINEAR TIME INVARIANT (LTI) SYSTEMS

 Despite DSP being pervasive in communication systems, there is still a great need for analog filter design and implementation technologies  The table below describes some of the well known construction techniques Filter Construction Techniques Construction Type LC (passive)

Description of El- Center Freements or Filter quency Range lumped elements DC–300 MHz or higher in integrated form Active R, C , op-amps DC–500 kHz or higher using WB op-amps Crystal quartz crystal 1kHz – 100 MHz Ceramic ceramic disks with 10kHz – 10.7 electrodes MHz Surface acoustic interdigitated fin- 10-800 MHz, waves (SAW) gers on a Piezoelectric substrate Transmission line quarterwave stubs, UHF and miopen and short ckt crowave Cavity machined and Microwave plated metal

Unloaded (typical 100

Q

Filter Application Audio, video, IF and RF

200

Audio and low RF

100,000

IF

1,000

IF

variable

IF and RF

1,000

RF

10,000

RF

Example 2.27: Use Python to Characterize Standard Filters  You can use the filter design capability of Python with Scipy or MATLAB with the signal processing to study lowpass, bandpass, bandstop, and highpass filters  Here I will consider two functions written in Python, one for digital filters and one for analog filters, to allow plotting of gain in dB, phase in radians, and group delay in samples or seconds ECE 5625 Communication Systems I

2-95

CONTENTS

def freqz_resp(b,a=[1],mode = ’dB’,fs=1.0,Npts = 1024,fsize=(6,4)): """ A method for displaying digital filter frequency response magnitude, phase, and group delay. A plot is produced using matplotlib freq_resp(self,mode = ’dB’,Npts = 1024) A method for displaying the filter frequency response magnitude, phase, and group delay. A plot is produced using matplotlib freqs_resp(b,a=[1],Dmin=1,Dmax=5,mode = ’dB’,Npts = 1024,fsize=(6,4)) b a Dmin Dmax mode

= = = = =

ndarray of numerator coefficients ndarray of denominator coefficents start frequency as 10**Dmin stop frequency as 10**Dmax display mode: ’dB’ magnitude, ’phase’ in radians, or ’groupdelay_s’ in samples and ’groupdelay_t’ in sec, all versus frequency in Hz Npts = number of points to plot; defult is 1024 fsize = figure size; defult is (6,4) inches Mark Wickert, January 2015 """ f = np.arange(0,Npts)/(2.0*Npts) w,H = signal.freqz(b,a,2*np.pi*f) plt.figure(figsize=fsize) if mode.lower() == ’db’: plt.plot(f*fs,20*np.log10(np.abs(H))) plt.xlabel(’Frequency (Hz)’) plt.ylabel(’Gain (dB)’) plt.title(’Frequency Response - Magnitude’) elif mode.lower() == ’phase’: plt.plot(f*fs,np.angle(H)) plt.xlabel(’Frequency (Hz)’) plt.ylabel(’Phase (rad)’) plt.title(’Frequency Response - Phase’) elif (mode.lower() == ’groupdelay_s’) or (mode.lower() == ’groupdelay_t’): """ Notes ----Since this calculation involves finding the derivative of the phase response, care must be taken at phase wrapping points 2-96

ECE 5625 Communication Systems I

2.7. LINEAR TIME INVARIANT (LTI) SYSTEMS

and when the phase jumps by +/-pi, which occurs when the amplitude response changes sign. Since the amplitude response is zero when the sign changes, the jumps do not alter the group delay results. """ theta = np.unwrap(np.angle(H)) # Since theta for an FIR filter is likely to have many pi phase # jumps too, we unwrap a second time 2*theta and divide by 2 theta2 = np.unwrap(2*theta)/2. theta_dif = np.diff(theta2) f_diff = np.diff(f) Tg = -np.diff(theta2)/np.diff(w) max_Tg = np.max(Tg) #print(max_Tg) if mode.lower() == ’groupdelay_t’: max_Tg /= fs plt.plot(f[:-1]*fs,Tg/fs) plt.ylim([0,1.2*max_Tg]) else: plt.plot(f[:-1]*fs,Tg) plt.ylim([0,1.2*max_Tg]) plt.xlabel(’Frequency (Hz)’) if mode.lower() == ’groupdelay_t’: plt.ylabel(’Group Delay (s)’) else: plt.ylabel(’Group Delay (samples)’) plt.title(’Frequency Response - Group Delay’) else: s1 = ’Error, mode must be "dB", "phase, ’ s2 = ’"groupdelay_s", or "groupdelay_t"’ print(s1 + s2) def freqs_resp(b,a=[1],Dmin=1,Dmax=5,mode = ’dB’,Npts = 1024,fsize=(6,4)): """ A method for displaying analog filter frequency response magnitude, phase, and group delay. A plot is produced using matplotlib freqs_resp(b,a=[1],Dmin=1,Dmax=5,mode=’dB’,Npts=1024,fsize=(6,4)) b a Dmin Dmax mode

= = = = =

ndarray of numerator coefficients ndarray of denominator coefficents start frequency as 10**Dmin stop frequency as 10**Dmax display mode: ’dB’ magnitude, ’phase’ in radians, or ’groupdelay’, all versus log frequency in Hz Npts = number of points to plot; defult is 1024 ECE 5625 Communication Systems I

2-97

CONTENTS

fsize = figure size; defult is (6,4) inches Mark Wickert, January 2015 """ f = np.logspace(Dmin,Dmax,Npts) w,H = signal.freqs(b,a,2*np.pi*f) plt.figure(figsize=fsize) if mode.lower() == ’db’: plt.semilogx(f,20*np.log10(np.abs(H))) plt.xlabel(’Frequency (Hz)’) plt.ylabel(’Gain (dB)’) plt.title(’Frequency Response - Magnitude’) elif mode.lower() == ’phase’: plt.semilogx(f,np.angle(H)) plt.xlabel(’Frequency (Hz)’) plt.ylabel(’Phase (rad)’) plt.title(’Frequency Response - Phase’) elif mode.lower() == ’groupdelay’: """ Notes ----See freqz_resp() for calculation details. """ theta = np.unwrap(np.angle(H)) # Since theta for an FIR filter is likely to have many pi phase # jumps too, we unwrap a second time 2*theta and divide by 2 theta2 = np.unwrap(2*theta)/2. theta_dif = np.diff(theta2) f_diff = np.diff(f) Tg = -np.diff(theta2)/np.diff(w) max_Tg = np.max(Tg) #print(max_Tg) plt.semilogx(f[:-1],Tg) plt.ylim([0,1.2*max_Tg]) plt.xlabel(’Frequency (Hz)’) plt.ylabel(’Group Delay (s)’) plt.title(’Frequency Response - Group Delay’) else: print(’Error, mode must be "dB" or "phase or "groupdelay"’)

2-98

ECE 5625 Communication Systems I

2.7. LINEAR TIME INVARIANT (LTI) SYSTEMS

 Case 1: A 5th-order Chebyshev type 1 digital bandpass filter, having 1 dB ripple and passband of Œ250; 300 Hz relative to a sampling rate of fs D 1000 Hz

5th-OrderCheby1 BPF Digital fs = 1000 Hz

Highly peaked near the bandedge, even with 0.1 dB rippler

Digtal bandpass with fs D 1000Hz (Chebyshev)

 The Chebyshev in both analog and digital forms still has a large peak in the group delay, even with a small ripple (here 0.1 dB)

ECE 5625 Communication Systems I

2-99

CONTENTS

 Case 2: A 7th-order Bessel analog bandpass filter, having passband of Œ10; 50 MHz

7th-Order Bessel BPF Analog

Not 3dB bandwidth

Group delay relatively flat in passband, compared with Chebyshev

Analog bandpass (Bessel)

 The Bessel filter has a much lower and smoother group delay, but the magnitude response is rather sloppy  The filter passband is far from being flat and the roll-off is gradual considering the filter order is seven

2-100

ECE 5625 Communication Systems I

2.7. LINEAR TIME INVARIANT (LTI) SYSTEMS

2.7.12

Pulse Resolution, Risetime, and Bandwidth

Problem: Given a non-bandlimited signal, what is a reasonable estimate of the signals transmission bandwidth? We would like to obtain a relationship to the signals time duration  Step 1: We first consider a time domain relationship by seeking a constant T such that

Z

Make areas equal via T

1

T x.0/ D

x(0)

jx.t /j dt

|x(t)|

1

t -T/2

 Note that Z 1

Z

1

x.t / dt D 1

1

and Z

0

ˇ ˇ x.t /e j 2f t dt ˇˇ

1

T/2

D X.0/

f D0

Z

1

jx.t /j dt  1

x.t / dt 1

which implies T x.0/  X.0/  Step 2: Find a constant W such that ECE 5625 Communication Systems I

2-101

CONTENTS

Z

Make areas equal via W

1

2W X.0/ D

X(0)

jX.f /j df

|X(f)|

1

f -W

 Note that Z 1

Z

1

X.f / df D 1

and

1

Z

0

ˇ ˇ j 2f t X.f /e df ˇˇ

W

D x.0/

t D0

1

Z

1

jX.f /j df 

X.f / df

1

1

which implies that 2W X.0/  x.0/  Combining the results of Step 1 and Step 2, we have 2W X.0/  x.0/ 

1 X.0/ T

or 2W 

1 T

or

W 

1 2T

Example 2.28: Rectangle Pulse  Consider the pulse x.t / D ….t =T /  We know that X.f / D T sinc.f T / 2-102

ECE 5625 Communication Systems I

2.7. LINEAR TIME INVARIANT (LTI) SYSTEMS

x(t)

-1

|X(f)|/T

1

-0.5

1

0.8

0.8

0.6

0.6

0.4

0.4

0.2

0.2 0.5

1

t/T

-3

-2

-1

Lower bound for W

1

2

3

fT f

-1/(2T) 1/(2T)

Pulse width versus Bandwidth, is W  1=.2T ?

 We see that for the case of the sinc. / function the bandwidth, W , is clearly greater than the simple bound predicts

Risetime  There is also a relationship between the risetime of a pulse-like signal and bandwidth  Definition: The risetime, TR , is the time required for the leading edge of a pulse to go from 10% to 90% of its final value  Given the impulse response h.t / for an LTI system, the step response is just Z 1 ys .t / D h./u.t / d  Z t1 Z t if causal D h./ d  D h./ d  1

0

Example 2.29: Risetime of RC Lowpass ECE 5625 Communication Systems I

2-103

CONTENTS

 The RC lowpass filter has impulse response h.t / D

1 e RC

t=.RC /

u.t /

 The step response is  ys .t / D 1

e

t=.RC /



u.t /

 The risetime can be obtained by setting ys .t1/ D 0:1 and ys .t2/ D 0:9   t1 0:1 D 1 e t1=.RC / ) ln.0:9/ D RC   t2 0:9 D 1 e t2=.RC / ) ln.0:1/ D RC  The difference t2 TR D t 2

t1 is the risetime

t1 D RC ln.0:9=0:1/ ' 2:2RC D

0:35 f3

where f3 is the RC lowpass 3dB frequency

Example 2.30: Risetime of Ideal Lowpass  The risetime of an ideal lowpass filter is of interest since it is used in modeling and also to see what an ideal filter does to a step input  The impulse response is    f D 2BsincŒ2Bt  h.t / D F 1 … 2B 2-104

ECE 5625 Communication Systems I

2.7. LINEAR TIME INVARIANT (LTI) SYSTEMS

 The step response then is Z t ys D 2BsincŒ2B d  1 Z 1 2Bt sin u D du  1 u 1 1 D C SiŒ2Bt  2  where Si( ) is a special function known as the sine integral  We can numerically find the risetime to be TR ' Step Response of RC Lowpass

0:44 B Step Response of Ideal Lowpass

1 1 0.8 0.8 0.6 0.4

0.6

2.2

0.4

0.2

0.44

0.2 1

2

3

4

5

t RC

-2

-1

1

2

3

t/B

RC and ideal lowpass risetime comparison

ECE 5625 Communication Systems I

2-105

CONTENTS

2.8

Sampling Theory

Integrate with Chapter 3 material.

2.9

The Hilbert Transform

Integrate with Chapter 3 material.

2.10

The Discrete Fourier Transform and FFT

?

2-106

ECE 5625 Communication Systems I

2.10. THE DISCRETE FOURIER TRANSFORM AND FFT

.

ECE 5625 Communication Systems I

2-107