LECTURE 16: FOURIER ANALYSIS OF CT SYSTEMS

16
ECE 8443 – Pattern Recognition EE 3512 – Signals: Continuous and Discrete Objectives: Response to a Sinusoidal Input Frequency Analysis of an RC Circuit Response to Periodic Inputs Response to Nonperiodic Inputs Analysis of Ideal Filters Resources: Wiki: The RC Circuit CN: Response of an RC Circuit CNX: Ideal Filters LECTURE 16: FOURIER ANALYSIS OF CT SYSTEMS URL:

description

LECTURE 16: FOURIER ANALYSIS OF CT SYSTEMS. Objectives: Response to a Sinusoidal Input Frequency Analysis of an RC Circuit Response to Periodic Inputs Response to Nonperiodic Inputs Analysis of Ideal Filters Resources: Wiki: The RC Circuit CN: Response of an RC Circuit CNX: Ideal Filters. - PowerPoint PPT Presentation

Transcript of LECTURE 16: FOURIER ANALYSIS OF CT SYSTEMS

Page 1: LECTURE  16:  FOURIER ANALYSIS OF CT SYSTEMS

ECE 8443 – Pattern RecognitionEE 3512 – Signals: Continuous and Discrete

• Objectives:Response to a Sinusoidal InputFrequency Analysis of an RC CircuitResponse to Periodic InputsResponse to Nonperiodic InputsAnalysis of Ideal Filters

• Resources:Wiki: The RC CircuitCN: Response of an RC CircuitCNX: Ideal Filters

LECTURE 16: FOURIER ANALYSIS OF CT SYSTEMS

URL:

Page 2: LECTURE  16:  FOURIER ANALYSIS OF CT SYSTEMS

EE 3512: Lecture 16, Slide 2

Differential Equations

• For CT systems, such as circuits, our principal tool is the differential equation.

• For the circuit shown, we can easily compute the input/output differential equation using Kirchoff’s Law.

)(1

)(1)(

0)()()(

)()()(

0)()()(

txRC

tyRCdt

tdy

txtydt

tdyRC

dt

tdyC

dt

tdvCti

txtytRi

C

• What is the nature of the impulse

response for this circuit?

Page 3: LECTURE  16:  FOURIER ANALYSIS OF CT SYSTEMS

EE 3512: Lecture 16, Slide 3

Numerical Solutions to Differential Equations

• Consider our 1st-order diff. eq.:

• We can solve this numerically by setting t = nT:

• The derivative can be approximated:

• Substituting into our diff. eq.:

• Let and :

)()()(

tbxtaydt

tdy

)()()(

nTbxnTaydt

tdy

nTt

T

nTyTnTy

dt

tdy

nTt

)()()(

)()()()(

nTbxnTayT

nTyTnTy

][)( nxnTx ][)( nynTy

][][)1(]1[

][][][]1[

][][][]1[

nbTxnyaTny

nbTxnaTynyny

nbxnayT

nyny

• We can replace n by n-1 to obtain:

• This is called the Euler approximation to the differential equation.

• With and initial condition, , the solution is:

• The CT solution is:

• Later, we will see that using the Laplace transform, we can obtain:

• But we can approximate this:

• Which tells us our 1st-order approximation is accurate!

]1[]1[)1(][ nbTxnyaTny

nnx 0][]0[y

...,2,1,0],0[)1(][ nyaTny n

0),0()( tyety at

...,2,1,0],0[][ nyeny anT

...62

13322

TaTaaTe aT

Page 4: LECTURE  16:  FOURIER ANALYSIS OF CT SYSTEMS

EE 3512: Lecture 16, Slide 4

Higher-Order Derivatives

• We can use the same approach for the second-order derivative:

• Higher-order derivatives can be similarly approximated.

• Arbitrary differential equations can be converted to difference equations using this technique.

• There are many ways to approximate derivatives and to numerically solve differential equations. MATLAB supports both symbolic and numerical solutions.

• Derivatives are quite tricky to compute for discrete-time signals. However, in addition to the differences method shown above, there are powerful methods for approximating them using statistical regression.

• Later in the course we will consider the implications of differentiation in the frequency domain.

T

nTyTnTyTnTy

T

dt

tdy

dt

tdy

dt

tyd nnTtTnnTt

nTt

)()(2)2(

)()(

)(2

Page 5: LECTURE  16:  FOURIER ANALYSIS OF CT SYSTEMS

EE 3512: Lecture 16, Slide 5

Series RC Circuit Example

)(1

)(1)(

txRC

tyRCdt

tdy

Difference Equation:

R=1;C=1;T=0.2;

a=-(1-T/R/C);b=[0 T/R/C];

y0=0; x0=1;

n=1:40;

x=ones(1,length(n));

y1=recur(a, b, n, x, x0, y0);

Analytic Solution:

t=0:0.04:8;

y2=1-exp(-t);

y1=[y0 y1];

n=0:40;

plot(n*T, y1, ’o’, t, y2, ’-’);

Page 6: LECTURE  16:  FOURIER ANALYSIS OF CT SYSTEMS

EE 3512: Lecture 16, Slide 6

• Using our FT properties:

Example: RC Circuit

)(1

)(1)(

txRC

tyRCdt

tdy

RCH

RC

RCH

RCj

RC

X

YH

XRCj

RCY

XRC

YRC

Yj

1

22

tan)(

)/1(

/1)(

/1

/1)()(

/1

/1)(

)(11

• Compute the frequency response:RC = 0.001;W=0:50:5000;H=(1/RC)./(j*w+1/RC);magH=abs(H);angH=180*angle(H)/pi;

Page 7: LECTURE  16:  FOURIER ANALYSIS OF CT SYSTEMS

EE 3512: Lecture 16, Slide 7

Response of an LTI System to a Sinusoid• Consider an LTI CT system with impulse response h(t):

• We will assume that the Fourier transform of h(t) exists:

• The output can be computed using our Fourier transform properties:

• Suppose the input is a sinusoid:

• Using properties of the Fourier transform, we can compute the output:)cos()( 0 tAtx

dtxhtxthty )()()(*)()(

dtethH tj )()(

)()()()()()(and)()()( XHYXHYXHY

)(cos)()()(

)(

)(

)()(

)(

)()()(

)(

0001

0)(

0)(

0

0)(

0)(

0

0000

00

00

00

00

HtHAYty

eeHA

eeeeHA

eHeHA

eeHA

XHY

eeAX

-

HjHj

jHjjHj

jj

jj

jj

F

Page 8: LECTURE  16:  FOURIER ANALYSIS OF CT SYSTEMS

EE 3512: Lecture 16, Slide 8

Example: RC Circuit (Cont.)• We can compute the output for RC=0.001 and ω0=1000 rad/sec:

• We can compute the output for RC=0.001 and ω0=3000 rad/sec:

• Hence the circuit acts as a lowpass filter. Note the phase is not linear.

• If the input was the sum of two sinewaves:

describe the output.

451000cos)707.0()( tAty

6.713000cos)316.0()( tAty

tttx 3000cos100cos)(

Page 9: LECTURE  16:  FOURIER ANALYSIS OF CT SYSTEMS

EE 3512: Lecture 16, Slide 9

Response To Periodic Inputs• We can extend our example to all periodic signals using the Fourier series:

• The output of an LTI system is:

• We can write the Fourier series for the output as:

• It is important to observe that since the spectrum of a periodic signal is a line spectrum, the output spectrum is simply a weighted version of the input, where the weights are found by sampling of the frequency response of the LTI system at multiples of the fundamental frequency, 0.

series)Fourier tric trigonome theof variant (acos)(1

00

k

kk tkAatx

1

0000 cos0)(k

kk kHtkkHAHaty

)(cand)(2

1c

also,

)()()0(a

where,

cos)(

0yk0

yk

000y0

100

kHkHA

kHkHAAHa

tkAaty

xk

xk

xk

yk

xk

yk

x

k

yk

yk

y

Page 10: LECTURE  16:  FOURIER ANALYSIS OF CT SYSTEMS

EE 3512: Lecture 16, Slide 10

Example: Rectangular Pulse Train and an RC Circuit• Recall the Fourier series for

a periodic rectangular pulse:

• Also recall the system response was:

• The output can be easily written as:

)2/(

2/sin5.0

where,

cos)(

0

10

k

kaa

tkaatx

k

kk

RCj

RCH

/1

/1)(

even0

odd)/1()(

/12

)/1()(

/1

)2/(

2/sin)(

5.0)0(

where,

cos)(

22

220

0y0

100

k

kRCk

RC

k

RCk

RC

k

kkHAA

Haa

tkAaty

xk

yk

x

k

yk

yk

y

Page 11: LECTURE  16:  FOURIER ANALYSIS OF CT SYSTEMS

EE 3512: Lecture 16, Slide 11

Example: Rectangular Pulse Train (Cont.)• We can write a similar expression for the output:

oddkk

y RCktkRCk

RC

katy

1

1

220 tancos)/1()(

/12)(

1/RC = 1

1/RC = 10

1/RC = 100

• We can observe the implications of lowpass filtering this signal.

• What aspects of the input signal give rise to high frequency components?

• What are the implications of increasing 1/RC in the circuit?

• Why are the pulses increasingly rounded for lower values of 1/RC?

• What causes the oscillations in the signal as 1/RC is increased?

Page 12: LECTURE  16:  FOURIER ANALYSIS OF CT SYSTEMS

EE 3512: Lecture 16, Slide 12

Response to Nonperiodic Inputs• We can recover the output in the time domain using the inverse transform:

• These integrals are often hard to compute, so we try to circumvent them using transform tables and combinations of transform properties.

• Consider the response of our RC circuit to a single pulse:

• MATLAB code for the frequency response:RC=1;w=-40:.3:40;X=2*sin(w/2)./w;H=(1/RC)./(j*w+1/RC);Y=X.*H;magY=abs(Y);

deeXeHty tjjj )()(2

1)(

RCj

RC

eHeXeY

RCj

RCeH

eX

jjj

j

j

/1

/1

)2/(

)2/sin(

)()()(

/1

/1)(

)2/(

)2/sin()(

Page 13: LECTURE  16:  FOURIER ANALYSIS OF CT SYSTEMS

EE 3512: Lecture 16, Slide 13

Response to Nonperiodic Inputs (Cont.)• We can recover the output using the inverse Fourier transform:

syms X H Y y wX = 2*sin(w/2)./w;H=(1/RC)./(j*w+1/RC);Y=X.*H;Y=ifourier(Y);ezplot(y,[-1 5]);axis([-1 5 0 1.5])

1/RC = 1

1/RC = 10

1/RC = 1

1/RC = 10

Page 14: LECTURE  16:  FOURIER ANALYSIS OF CT SYSTEMS

EE 3512: Lecture 16, Slide 14

Ideal Filters• The process of rejecting particular frequencies or a range of frequencies is

called filtering. A system that has this characteristic is called a filter.• An ideal filter is a filter whose frequency response goes exactly to zero for

some frequencies and whose magnitude response is exactly one for other ranges of frequencies.

• To avoid phase distortion in the filtering process, an ideal filter should have a linear phase characteristic. Why?

• We will see this “ideal” response has some important implications for the impulse response of the filter.

• Lowpass

• Bandpass

• Highpass

• Bandstop

passbandfiltertheinωallfor)( dj teH

Page 15: LECTURE  16:  FOURIER ANALYSIS OF CT SYSTEMS

EE 3512: Lecture 16, Slide 15

Ideal Linear Phase Lowpass Filter

BB

BBeeH

dtjj

,0

,)(

• PhaseResponse

• Consider the ideal lowpass filterwith frequency response:

• Using the Fourier transform pairfor a rectangular pulse, and applyingthe time-shift property:

• Is this filter causal?

• The frequency response of an idealbandpass filter can be similarly defined:

• Will this filter be physically realizable?Why?

dttB

cB

th (sin)(

• ImpulseResponse

elsewhere,0

,)( 21 BBe

eHdtj

j

Page 16: LECTURE  16:  FOURIER ANALYSIS OF CT SYSTEMS

EE 3512: Lecture 16, Slide 16

Summary• Showed that the response of a linear LTI system to a sinusoid is a sinusoid at

the same frequency with a different amplitude and phase.

• Demonstrated how to compute the change in amplitude and phase using the system’s Fourier transform.

• Demonstrated this for a simple RC circuit.

• Generalized this to periodic and nonperiodic signals.

• Worked examples involving a periodic pulse train and a single pulse.

• Introduced the concept of an ideal filter and discussed several types of ideal filters.

• Noted that the ideal filter is a noncausal system and is not physically realizable. However, there are many ways to approximate ideal filters, and that is a topic known as filter design.