Tik-61.140 Signal Processing Systems Spring 2001 Fourier Series Representation of Continuous-Time Periodic Signals Fourier Series Representation • Focus on the representation of continuoustime and discrete-time periodic signals referred to as Fourier series • Powerful and important tools for analyzing, designing, and understanding signals and LTI systems Tik-61.140 / Chapter 3 Olli Simula The response of LTI systems to complex exponentials Representation of signals as linear combinations of basic signals that have the following properties: 1) The set of basic signals can be used to construct a broad and useful class of signals 2 The response of LTI systems to complex exponentials • The response of an LTI system to a complex exponential is the same complex exponential with only a change in amplitude: – Continuous-time: e sT -> H(s) e sT – Discrete-time: z n -> H(z) z n where the complex amplitude factor H(s) or H(z) will be a function of the complex variable s or z 2) The response of an LTI system to each signal should be simple enough in structure to provide us with the convenient representation for the response of the system to any signal constructed as a linear combination of the basic signals Both of these properties are provided by the set of complex exponential signals in CT and DT Olli Simula Tik-61.140 / Chapter 3 3 Tik-61.140 / Chapter 3 Olli Simula 4 Continuous-Time Systems The response of LTI systems to complex exponentials • For an input x(t)=est the convolution integral gives: • A signal for which the system output is a constant times the input is referred to as an eigenfunction of the system, and the amplitude value is referred as the eigenvalue of the system • This property for complex exponentials can be shown using: – The impulse response and – The convolution y (t ) = = +∞ +∞ −∞ −∞ ∫ h (τ ) x(t −τ ) dτ = ∫ h(τ )e +∞ ∫ h (τ )e st −sτ e dτ = est −∞ +∞ +∞ s( t −τ ) ∫ h(τ )e dτ −s τ dτ −∞ = x(t ) ∫ h (τ )e− sτ d τ −∞ Olli Simula Chapter 3 / O. Simula Tik-61.140 / Chapter 3 5 Olli Simula Tik-61.140 / Chapter 3 6 1 Tik-61.140 Signal Processing Systems Spring 2001 Continuous-Time Systems Discrete-Time Systems • A complex exponential x(t)=est is now the eigenfunction of the LTI system with impulseresponseh(t): +∞ y(t ) = x(t ) ∫ h (τ )e −∞ where H ( s) = − sτ d τ = H (s )e +∞ ∫ h (τ )e − sτ • For an input x[n]=zn the convolution sum gives: y [n ] = st +∞ +∞ k = −∞ k =−∞ ∑ h[k ]x[n − k ] = ∑ h[k ]z n −k y[n ] = z n H (z ) = x[ n]H ( z ) , dτ where H ( z) = −∞ Tik-61.140 / Chapter 3 +∞ ∑ h[k ]z − k k = −∞ +∞ ∑ h[k ]z − k k =−∞ H(s) is the transfer function or system function representing the system behavior in the s-domain Olli Simula = zn H(z) is the z-transform of the unit impulse response H(z) describes the system behavior in the z-domain 7 Tik-61.140 / Chapter 3 Olli Simula Linear Combination of Signals 8 Linear Combination of Signals • From the superposition property the response to the sum is the sum of the responses: • Let x(t) correspond to a linear combination of complex exponentials: x ( t) = a1e s1 t + a 2e s2 t + a3e s 3t • From the eigenfunction property the responseto each term: a1e s1t → a1 H ( s1) e s1t y (t ) = a1 H ( s1 ) e s1t + a2 H ( s2 ) e s 2t + a3 H ( s3 ) e s 3t • The representation of signals as a linear combination of complex exponentials leads to a convenient expression for the response of an LTI system a2e s2 t → a 2 H (s 2 )e s2 t Input : a3e s 3t → a3 H ( s3 ) e s3 t Output : x ( t) = ∑ a ke sk t k y ( t) = ∑ ak H ( sk )e sk t k Tik-61.140 / Chapter 3 Olli Simula 9 Olli Simula Tik-61.140 / Chapter 3 10 Linear Combination of Signals Fourier Series Representation of Continuous Continuous--Time Periodic Signals • In a similar way, for discrete-time systems the response of a linear combination of complex exponentials is the linear combination of individual responses : Input : x[n] = ∑ ak z k n k Output : y [n] = ∑ ak H ( zk ) zkn k The decompositionof more general signals in terms of eigenfunctions is the basis for frequency domain representation and analysis of LTI systems Olli Simula Chapter 3 / O. Simula Tik-61.140 / Chapter 3 11 Olli Simula 2 Tik-61.140 Signal Processing Systems Spring 2001 Linear Combinations of Harmonically Related Complex Exponentials Linear Combinations of Harmonically Related Complex Exponentials • A signal is periodic if for some value of T: x (t) = x (t + T ) , for • Basic periodic signals all t • The fundamental period of x(t) is the minimum positive, nonzero value of T for which the above is satisfied; • The value ω0=2π/T is referred to as the fundamental frequency Tik-61.140 / Chapter 3 Olli Simula 13 x(t ) = e jω 0 t Tik-61.140 / Chapter 3 Olli Simula 14 Linear Combination of Harmonically Related Complex Exponentials x( t ) = φk (t) = e jk ω 0t = e jk (2π / T )t , k = 0, ±1, ±2,... +∞ +∞ ∑ ak e jk ω t = ∑ ak e jk (2π / T )t 0 k =−∞ • Each of these signals has a fundamental frequency that is a multiple of ω 0 • Each is periodic with period T • For |k|>2, the fundamental period of φk (t) is a fraction of T Tik-61.140 / Chapter 3 15 k = −∞ • x(t) is periodic with period T • The term for k=0 is a constant • The terms for k=+1 and k=-1 both have fundamental frequency equal to ω 0 and referred to as the fundamental components or the first harmonic components • The two terms for k=+2 and k=-2 are periodic with half the period of the fundamental components and referred to as the second harmonic components Tik-61.140 / Chapter 3 Olli Simula Example 3.2 16 Fourier Series Representation • Construction of the signal x(t) as linear combination of harmonically related sinusoidal signals +3 x (t ) = ∑ a k e jk 2πt • Periodic signal: • In general, the components for k=+N and k=-N are also periodic with a fraction of the period of the fundamental components and are referred to as the Nth harmonic components k =−3 where a 0 = 1, x( t) = cosω0t – Complex exponential: • Both of these signals are periodic with fundamental frequency ω 0 and fundamental period of T=2π/ω0 Harmonically Related Complex Exponentials Olli Simula – Sinusoidal signal : a1 = a −1 = ( 1 , 4 a2 = a− 2 = 1 2 ) ( a3 = a −3 = ) ( 1 3 x( t) = 1+ 1 j2π t − j2π t 1 j4πt 1 e +e + e + e − j4πt + e j6πt + e − j6πt 4 2 3 x( t) = 1+ 1 2 cos(2πt ) + cos(4πt ) + cos(6π t) 2 3 Olli Simula Chapter 3 / O. Simula Tik-61.140 / Chapter 3 x( t ) = ) +∞ +∞ ∑ ak e jk ω t = ∑ ak e jk (2π / T )t 0 k = −∞ k = −∞ => Fourier Series representation 17 Olli Simula Tik-61.140 / Chapter 3 18 3 Tik-61.140 Signal Processing Systems Spring 2001 Determination of the Fourier Series Representation of a CT Periodid Signal Determination of the Fourier Series Representation of a CT Periodid Signal T ∫ x( t)e • Multiplying both sides and integrating gives: +∞ x( t )e − jn ω 0t = ∑ ak e jk ω t e− jnω t 0 − jnω 0 t ∫ x( t)e − jnω 0 t ∑ ak e jk ω t e − jn ω t dt 0 0 0 k = −∞ 0 • The expression for determining the coefficients an is: T j ( k − n)ω 0 t = ∑ ak ∫ e dt k = −∞ 0 +∞ Tik-61.140 / Chapter 3 Olli Simula T an = +∞ Tik-61.140 / Chapter 3 Olli Simula • Let us approximate a given periodic signal x(t) by a linear combination of a finite number of harmonically related complex exponentials +∞ 0 k = −∞ 1 1 − jk ω 0t a k = ∫ x (t )e dt = ∫ x (t ) e − jk ( 2π / T ) t dt T T T T x N (t ) = • The set of coefficients {ak} are called the Fourier series coefficients or spectral coefficients of x(t) • These complex coefficients measure the portion of the signal x(t) that is at each harmonic of the fundamental component Tik-61.140 / Chapter 3 Olli Simula 20 Convergence of the Fourier Series ∑ ak e jk ω t = ∑ ak e jk (2π / T )t k = −∞ 1 − jnω 0 t x( t )e dt T∫ 0 19 Fourier Series Representation x (t ) = T , k = n j ( k − n)ω 0t dt = ∫e 0, k ≠ n 0 T +∞ dt = ∫ 0 T k = −∞ T T ∑ ak ∫ e j (k− n )ω t dt k = −∞ 0 0 0 +∞ dt = +N ∑ ak e jkω t 0 k =−N • Let eN(t) denote the approximation error e N (t ) = x(t ) − xN (t ) = x (t ) − 21 +N ∑ ak e jk ω t 0 k =−N Tik-61.140 / Chapter 3 Olli Simula Properties of the CT Fourier Series Convergence of the Fourier Series x ( t ) Periodic with period T and y (t ) fundamenta l frequency ω 0 = 2π / T • Quantitative measure for the goodness of the approximation is defined by the energy in the error over one period T • It can be shown that the particular choice for coefficients that minimize the energy in the error is Aa k + Bb k Time shifting : x (t − t 0 ) ak e Frequency shifting : x (t ) e jM ω 0 t ak − M ∫ x (τ ) y (t − τ ) dτ Ta k bk T T bk Ax (t ) + By (t ) Periodic convolution : 1 − jk ω 0t x (t )e dt T∫ ak Linearity : 2 E N = ∫ e N (t ) dt ak = 22 Multiplication : x (t ) y( t ) − jk ω 0 t0 +∞ ∑ al bk − l l = −∞ Olli Simula Chapter 3 / O. Simula Tik-61.140 / Chapter 3 23 Olli Simula Tik-61.140 / Chapter 3 24 4 Tik-61.140 Signal Processing Systems Spring 2001 Linear Combinations of Harmonically Related Complex Exponentials Fourier Series Representation of Discrete Discrete--Time Periodic Signals • A discrete-time signal is periodic with period N if x[ n] = x[ n + N ] • The fundamental period is the smallest positive integer for which the above equation holds • ω 0=2π/N is the fundamental frequency The Fourier series representation of a discrete-time periodic signal is a finite series, as opposed to the infinite series representation required for continuous-time periodic signals Olli Simula Tik-61.140 / Chapter 3 Olli Simula Linear Combinations of Harmonically Related Complex Exponentials Linear Combinations of Harmonically Related Complex Exponentials • A set of all DT complex exponential signals that are periodic with period N is given by φk [ n] = e jk ω 0n = e jk ( 2π / N )n , 26 k = 0, ±1, ± 2,... • There are only N distinct signals in the above set due to the fact that DT complex exponentials which differ in frequency by a multiple of 2π are identical φk [ n] = φ k + rN [n ] • When k is changed by any integer multiple of N , the identical sequence is generated • This differs from the situation in continuous-time in which the signals φk (t) are all different from one another φk [ n] = φ k + rN [n ] Tik-61.140 / Chapter 3 Olli Simula 27 k k • Multiplying both sides and summing over N terms: k x[ n]e − jr (2π / N )n = • Since φk [n] are distinct only over a range on N successive values of k, the summation need only include terms over this range • Expressing the limits of summation as k = N x[ n] = ∑ akφ k [n ] = ∑ a ke k= N jk ω 0n k= N = ∑ ak e Chapter 3 / O. Simula Tik-61.140 / Chapter 3 ∑ x [n]e − jr ( 2π / N )n = ∑ ∑ a ke j (k −r )(2π / N )n n= N jk (2π / N )n k= N n= N k = N = 29 ∑ ak e j ( k −r )(2π / N )n k= N ∑ ak k= N • This is referred to as the discrete-time Fourier series and the coefficients ak as the Fourier series coefficients Olli Simula 28 Discrete-Time Fourier Series Linear Combinations of Complex Exponentials x[ n] = ∑ ak φ k [n ] = ∑ a k e jk ω 0n = ∑ ak e jk (2π / N ) n Tik-61.140 / Chapter 3 Olli Simula Olli Simula Tik-61.140 / Chapter 3 ∑ e j (k − r )(2π / N )n n= N 30 5 Tik-61.140 Signal Processing Systems Spring 2001 Discrete-Time Fourier Series ∑ ∑ Discrete Fourier Series Representation ∑ x [n] e− jr ( 2π / N ) n = ak e j ( k − r )( 2π / N ) n n= N k= N n= N N, ∑ e jk ( 2π / N ) n = • The synthesis and analysis equations for the discrete-time Fourier series is given by the following pair of equations: x[ n] = k = 0 , ± N , ±2 N ,... 0 , otherwise n= N 1 ∑ x[ n]e − jr (2π / N )n N n= N 31 Olli Simula ∑ akφ k [n ] • If we take k in the range from 0 to N-1, we have x[ n] = a0φ 0 [n ] + a1φ1[ n] + ...+ a N −1φ N − 1[n ] • The values of Fourier coefficients ak repeat periodically with period N • Similarly, if k ranges from 1 to N, we have x[ n] = a1φ1[ n] + a2φ 2 [n ] + ... + a N φ N [n ] Since there are only N distinct complex exponentials that are periodic with period N, the discrete-time Fourier series representation is a finite series with N terms • From φk [n]= φk+rN[n] we have φ0[n]= φN[n] • Thus, we conclude that a0=aN Tik-61.140 / Chapter 3 32 • Letting k range over any set of N consecutive integers we conclude that ak = ak + N k= N Olli Simula Tik-61.140 / Chapter 3 Discrete Fourier Series Representation Discrete Fourier Series Representation x[ n] = k= N • The set of coefficients {ak} are called thediscrete-time Fourier series coefficients or spectral coefficients of x[n] Tik-61.140 / Chapter 3 Olli Simula 0 1 1 ak = ∑ x[ n]e − jkω0 n = N ∑ x[ n]e − jk (2π / N) n N n= N n= N • Now, the expression for determining the coefficients an is: an = ∑ ak e jk ω n = ∑ a ke jk (2π / N )n k= N 33 Olli Simula Tik-61.140 / Chapter 3 34 Properties of the DT Fourier Series x [n] Periodic with period N and y[n ] fundamental frequency ω 0 = 2π / N ak Periodic with bk period N Linearity : Ax[n ] + By[n ] Aa k + Bb k Time shifting : x[n − n 0 ] a k e− jk ( 2π / N ) n0 Frequency shifting : x[n ]e Periodic convolution : jM ( 2π / N ) n ∑ x[ r] y[ n − r ] r= N Multiplication : x[n ] y[ n ] Fourier Series and Linear Time Time--Invariant Systems ak − M Na k bk ∑ al bk − l r= N Olli Simula Chapter 3 / O. Simula Tik-61.140 / Chapter 3 35 6 Tik-61.140 Signal Processing Systems Spring 2001 Response of an LTI System Fourier Series and LTI Systems In continuous-time: • Fourier series representation can be used to construct any periodic signal in discrete-time and essentially all periodic continuous-time signals of practical importance • The response of an LTI system to a linear combination of complex exponentials take a simple form Tik-61.140 / Chapter 3 Olli Simula 37 x( t ) = est ; −∞ x[n ] = z n ; Olli Simula ∑ 39 ( Olli Simula Chapter 3 / O. Simula Tik-61.140 / Chapter 3 +∞ ∑ h[n ]e− jωn Tik-61.140 / Chapter 3 40 ) Need to change the relative amplitudes of the frequency components in a signal or eliminate some frequency components entirely The effect of the LTI system is to modify individually each of the Fourier coefficients of the input by multiplying it with the value of the frequency response Olli Simula 38 Filtering ak H e j 2π k / N e jk ( 2π / N ) n k= N k = −∞ H(z) is the frequency response of the system in discrete-time ∑ ak e jk (2π / N )n k= N +∞ ∑ h[k ]z − k n =−∞ • The response of an LTI system to a complex exponential signal of the form ejωt or ejωn is simple to express in terms of the frequency response y [n ] = H ( z) = Tik-61.140 / Chapter 3 H (e jω ) = h (t )e− jωt dt Frequency Response x[n ] = where • In discrete-time, we focus on values of z for which |z|=1, so that z= ejω and zn= ejωn • The system function H(z) for z of the form z= ejω is given by +∞ Tik-61.140 / Chapter 3 • In discrete-time: y[ n] = H ( z ) z n When s and z are general complex numbers, H(s) and H(z) are referred to as system functions H(jω) is the frequency response of the system in continuous-time Olli Simula H (s ) = ∫ h (τ )e −sτ dτ Frequency Response • With Re{s}=0, i.e., s=jω, and consequently the input x(t)=est = ejωt is the complex exponential at frequency ω • The system function H(jω ) as a function of ω is given by −∞ where In discrete-time: Frequency Response H ( j ω) = ∫ +∞ y(t ) = H (s )est 41 => FILTERING PROCESS Olli Simula 7 Tik-61.140 Signal Processing Systems Spring 2001 Filtering operations Filtering operations • Frequency-shaping filters are linear timeinvariant systems that change the shape of the spectrum • Frequency-selective filters are designed to pass some frequencies and significantly attenuate or eliminate others • Fourier series coefficients of the output of an LTI system are those of the input multiplied by the frequency response of the system Tik-61.140 / Chapter 3 Olli Simula • Filtering can be conveniently accomplished through the use of LTI systems with an appropriately chosen frequency response • Frequency-domain methods provide us with the ideal tools to examine this important class of applications • Examples: – Frequency shaping filters: Equalizer structures – Frequency selective filters: Differentiating filters 43 Example: Image Filtering Tik-61.140 / Chapter 3 Olli Simula 44 Example: Two-Point Averaging Filter x[n] x[ n − 1] D 1 2 + • Impulse response: h[n] = y[ n ] = 1 (x [n] + x[n − 1]) 2 1 (δ[n] + δ[n −1]) 2 • Frequency response: H( e j ω ) = [ ] 1 1 + e − jω = e− jω / 2 cos(ω / 2) 2 ( ) H (e jω ) = cos(ω / 2), and arg H (e jω ) = −ω / 2 Olli Simula Tik-61.140 / Chapter 3 45 • |H(e jω)| is large for frequencies near ω=0 and decreasesas ω approaches πor -π • Higher frequencies are attenuated more than lower ones • The phase response is linear • Discrete -time frequency response is periodic with period 2π Chapter 3 / O. Simula Tik-61.140 / Chapter 3 Tik-61.140 / Chapter 3 46 Example: Two-Point Averaging Filter Example: Two-Point Averaging Filter Olli Simula Olli Simula 47 • Consider a constant input, i.e., a zero-frequency complex exponential x[n] = Kej0n = K The output is y[n] = H(ej0n)Kej0n =[e-j0/2cos(0/2)]Kej0n = K = x[n] • If the input is the high-frequency signal x[n] = Kejπn = K(-1)n The output is y[n] = H(eπn)Keπn = [e-jπ/2cos(π/2)]Keπn = 0 • The system separates out the long-term constant value of a signal from its high-frequency fluctuations Olli Simula Tik-61.140 / Chapter 3 48 8 Tik-61.140 Signal Processing Systems Spring 2001 Frequency-Selective Filters Frequency-Selective Filters • Lowpass filter • A class of filters specifically intended to accurately or approximately select some bands of frequencies and reject others • Examples: – Removing noisein certain bands – Communication systems; channel separation – Passes low frequencies, i.e., frequencies around ω=0 and attenuates or rejects higher frequencies • Highpass filter – Passes high frequencies and attenuates or rejects lower frequencies • Bandpass filter – Passes a band of frequencies and attenuates or rejects frequencies both higher and lower than those in the band that is passed • Bandstop filter – Attenuates or rejects a band of frequencies and passes frequencies both higher and lower than those in the band that is rejected Tik-61.140 / Chapter 3 Olli Simula 49 Tik-61.140 / Chapter 3 Olli Simula Frequency-Selective Filters 50 Ideal Frequency-Selective Filters • Ideal lowpass filter with cutoff frequency ω c • Cutoff frequencies – The frequencies defining the boundaries between frequencies that are passed and frequencies that are rejected , i.e., frequencies in the passband and in the stopband 1, | ω |≤ ωc H( jω ) = 0, | ω |> ω c • Notch filter – A bandstop filter which rejects a specific frequency and passes all other frequencies H(jω) 1 • Multiband filter – A filter that has several passbands and stopbands −ωc • Comb filter Tik-61.140 / Chapter 3 Olli Simula 51 • Ideal bandpass filter with cutoff frequencies ωc1 and ω c2 0, | ω |< ωc H( jω ) = 1, | ω |≥ ωc 1, ω c1 ≤| ω |≤ ωc 2 H( jω ) = 0, elsewhere H(jω) H(jω) 1 −ωc Olli Simula Chapter 3 / O. Simula 0 Stopband 52 Ideal Frequency-Selective Filters • Ideal highpass filter with cutoff frequency ω c Passband ω Stopband Tik-61.140 / Chapter 3 Olli Simula Ideal Frequency-Selective Filters ωc 0 Passband Stopband – A multiband filter in which passbands and/or stopbands are (usually) equally spaced in frequency 1 ωc Tik-61.140 / Chapter 3 −ωc2 ω −ωc1 0 ωc1 ωc2 ω Passband 53 Olli Simula Tik-61.140 / Chapter 3 54 9 Tik-61.140 Signal Processing Systems Spring 2001 Ideal Frequency-Selective Filters Ideal Frequency-Selective Filters • Ideal bandstop filter with cutoff frequencies ωc1 and ω c2 • Each of these ideal continuous-time filters is symmetric aboutω=0 • There are two passbands for the highpass and bandpass filters and three passbands for the bandstop filter 0, ω c1 ≤| ω |≤ ωc 2 H( jω ) = 1, elsewhere H(jω) • Ideal discrete-time filters frequency-selective filters are defined in the similar way • For discrete-time filters the frequency response is periodic with period 2π, with • Low frequencies near even multiples of π • High frequencies near odd multiples of π 1 −ωc2 −ωc1 0 ωc1 ωc2 ω Tik-61.140 / Chapter 3 Olli Simula 55 Ideal Discrete-Time Frequency-Selective Filters H(ejω) • Lowpass Tik-61.140 / Chapter 3 Olli Simula Ideal Discrete-Time Frequency-Selective Filters H(ejω) • Bandpass 1 -π -2π −ωc 1 ωc 0 π 2π ω H(ejω) • Highpass -2π -π −ωc2 −ωc1 0 ωc -π −ωc 2π ω 1 ωc 0 π 2π ω Tik-61.140 / Chapter 3 Olli Simula ωc2 π H(ejω) • Bandstop 1 -2π 56 57 + v r (t) - First-Order RC Lowpass Filter -2π Olli Simula -π −ωc2 −ωc1 0 ωc ωc2 π 2π ω Tik-61.140 / Chapter 3 58 Transfer Function of the First -Order RC Lowpass Filter R RC dvC ( t) + vC ( t) = v s ( t ) dt Input voltage : v s ( t ) = e jω t ; RC [ v s(t) + - C + v (t) - c H ( jω ) = Output voltage : vC ( t) = H ( jω) e jω t ] • For frequencies near ω=0, |H(j ω )| is close to 1 d H ( jω ) e jω t + H ( jω ) e jωt = e jω t dt • For larger values of ω, |H(j ω )| is considerably smaller RCjω H ( jω ) e jω t + H ( j ω ) e jω t = e jω t RCjω H ( jω ) + H ( jω ) = 1 Olli Simula Chapter 3 / O. Simula 1 1+ RCjω Tik-61.140 / Chapter 3 • |H(j ω)| approaches zero when ω approaches infinity H( jω ) = 1 1 + RCj ω 59 Olli Simula Tik-61.140 / Chapter 3 60 10 Tik-61.140 Signal Processing Systems Spring 2001 Transfer Function of the First -Order RC Lowpass Filter • The output is now the voltage across the resistor 1 −t / RC e u (t ) RC • Impulse response: h(t ) = • Step response: s(t) = 1 − e [ − t / RC ] u (t) – Narrow passband requirement: Large RC Tik-61.140 / Chapter 3 61 Olli Simula R Input voltage : v s ( t ) = e jω t ; RC [ + - v s(t) C + v (t) - c Output voltage : v R ( t) = G( j ω) e jω t ] d d G( jω )e jω t + G ( jω )e jω t = RC e jω t dt dt RCjω G( jω ) e jωt + G( jω ) e jω t = RCj ωe jωt G( jω ) = RCjω G ( jω ) + G ( j ω ) = RCjω jω RC 1+ jω RC Tik-61.140 / Chapter 3 Olli Simula 63 + Input : x [ n] = e jωn ; Tik-61.140 / Chapter 3 62 • Discrete-time LTI systems described by difference equations can be either Recursive and have an infinite impulse response (IIR systems) or Nonrecursive and have a finite impulse response (FIR systems) • IIR systems are direct counterparts of continuous-time systems described by differential equations Olli Simula Tik-61.140 / Chapter 3 64 y[n] Difference equation: y [ n ] − ay [ n − 1] = x [ n ] dvR ( t) dv ( t ) + v R (t ) = RC s dt dt Transfer Function of the First-Order Recursive Discrete-Time Filter First-Order Recursive Discrete-Time Filters x [n] + v (t) - c Discrete-Time Filters Described by Constant Coefficient Difference Equations + v r (t) - dv R ( t) dv ( t ) + v R (t ) = RC s dt dt C dvC ( t ) d = C (v s ( t ) − vR ( t ) ) dt dt RC – Fast step response: Small RC RC + - dv (t ) dv ( t ) v R ( t) = Ri ( t) = RC s − R dt dt • Trade-offs in filter design: First-Order RC Highpass Filter R v s(t) v C (t ) = v s (t ) − v R (t ) i (t ) = C Olli Simula + v r (t) - First-Order RC Highpass Filter a Output : y [n ] = H ( e jω ) e H (e jω ) = D y[n − 1] 1 1− ae − jω • Parameter a controls the behavior of the filter jω n • For a positive => Lowpass filter H (e j ω )e j ωn − aH ( e jω ) e jω ( n −1) = e jωn [1 − ae ] H (e − jω jω Olli Simula Chapter 3 / O. Simula )e jωn = e jω n Tik-61.140 / Chapter 3 a controls the rate of attenuation at low frequencies, ω=0 H (e jω ) = • For a negative => Highpass filter 1 1− ae − jω 65 a controls the rate of attenuation at high frequencies, ω=π Olli Simula Tik-61.140 / Chapter 3 66 11 Tik-61.140 Signal Processing Systems Spring 2001 Transfer Function of the First-Order Recursive Discrete-Time Filter Nonrecursive Discrete-Time Filters • General form of an FIR nonrecursive difference equation h[ n] = a n u[n] • Impulse response: n +1 1− a s[ n] = u[ n] ∗ h[n ] = 1− a • Step response: u[ n] With faster responses for smaller values of |a| , and hence for broader passbands • For |a|<1 the system is stable, i.e., h[n] is absolutely summable Tik-61.140 / Chapter 3 67 Three-Point Moving-Average Filter y[ n ] = jω )= h [n ] = 1 (δ [ n − 1] + δ [ n] + δ [ n + 1]) 3 ( 1 − jω e + 1+ e 3 1 (δ [ n] + δ [ n − 1] + δ [ n − 2] ) 3 • The frequency response jω ) = H (e jω ) = ( 1 1 + e − j ω + e − j 2ω 3 1 = e − jω (1 + 2 cos ω ) 3 1 (1 + 2 cos ω ) 3 Tik-61.140 / Chapter 3 Olli Simula 1 ( x[ n ] + x [ n − 1] + x [n − 2] ) 3 • The impulse response • The frequency response H (e 68 • Difference equation 1 (x [ n − 1] + x[ n ] + x [ n + 1] ) 3 • The impulse response h[ n] = Tik-61.140 / Chapter 3 Olli Simula Causal Three-Point Moving-Average Filter • Difference equation y[ n ] = k =−N • The output is the weighted average of the (N+M+1) values of x[n] from x[n-M] through x[n+N] with the weights given by coefficients bk . • Such a filter is often called a moving-average filter, where the output y[n] for any n , e.g. for n0 , is an average of values of x[n] in the vicinity of n0 • |a| controls the speed with which the impulse and step responses approach their long-term values, Olli Simula M ∑ bk x [ n − k ] y[ n ] = 69 = e− jω ( 1 jω e + 1 + e − jω 3 Tik-61.140 / Chapter 3 Olli Simula Three-Point Moving-Average Filter ) ) 70 General Moving-Average Filter y[ n ] = • Difference equation M 1 x[n − k ] ∑ N + M + 1 k =− N • The impulse response is a rectangular pulse, i.e., h[n]=1/(N+M+1) for -N<n<M and h[n]=0 otherwise • The frequency response H (e jω ) = Olli Simula Chapter 3 / O. Simula Tik-61.140 / Chapter 3 71 Olli Simula 1 sin [ω ( N + M + 1) / 2 ] e jω [( N − M ) / 2 ] N + M +1 sin(ω / 2 ) Tik-61.140 / Chapter 3 72 12 Tik-61.140 Signal Processing Systems Spring 2001 Moving-Average Filter with N+M+1=25 Tik-61.140 / Chapter 3 Olli Simula Moving-Average Filter with N+M+1=50 73 Differentiating Nonrecursive Filter Olli Simula Tik-61.140 / Chapter 3 74 First-Order Nonrecursive Highpass Filter • Consider the difference equation y[ n ] = (x [ n ] − x [ n − 1]) 2 • For input signals that vary greatly from sample to sample, the value of y[n] is large 1 • The impulse response h[ n] = (δ [ n ] − δ [ n − 1]) 2 • The frequency response ( 1 H ( e j ω ) = 1 − e − jω 2 ) = je − j ω / 2 sin( ω / 2 ) Tik-61.140 / Chapter 3 Olli Simula 75 Olli Simula Tik-61.140 / Chapter 3 76 Nonrecursive Discrete-Time Filters • The impulse response of a nonrecursive FIR filter is of finite length • The impulse response is, thus, always absolutely summable for any h[n]=bn => FIR filters are always stable Olli Simula Chapter 3 / O. Simula Tik-61.140 / Chapter 3 77 13