Phase and Group Delays Phase and Group Delays • The output y[n] of a frequency-selective LTI discrete-time system with a frequency response H (e jω ) exhibits some delay relative to the input x[n] caused by the nonzero phase response θ (ω ) = arg{ H (e jω )} of the system • For an input x[ n] = A cos( ωo n + φ), 1 the output is y[ n] = A H (e jωo ) cos( ωo n + θ (ωo ) + φ) • Thus, the output lags in phase by θ (ωo ) radians • Rewriting the above equation we get θ( ωo) y[ n] = A H (e jωo ) cos ω o n + + φ ω o −∞< n<∞ Copyright © 2001, S. K. Mitra 2 Phase and Group Delays Phase and Group Delays • This expression indicates a time delay, known as phase delay, at ω = ω o given by θ(ω o ) τ p (ωo ) = − ωo • In this case, each component of the input will go through different phase delays when processed by a frequency-selective LTI discrete-time system • Then, the output signal, in general, will not look like the input signal • The signal delay now is defined using a different parameter • Now consider the case when the input signal contains many sinusoidal components with different frequencies that are not harmonically related 3 5 Copyright © 2001, S. K. Mitra Copyright © 2001, S. K. Mitra 4 Copyright © 2001, S. K. Mitra Phase and Group Delays Phase and Group Delays • To develop the necessary expression, consider a discrete-time signal x[n] obtained by a double-sideband suppressed carrier (DSB-SC) modulation with a carrier frequency ωc of a low-frequency sinusoidal signal of frequency ωo : x[ n] = A cos(ωon ) cos(ωc n) • The input can be rewritten as x[ n] = A cos( ωl n ) + A cos( ωu n) 2 2 where ω l = ω c − ωo and ω u = ωc + ωo • Let the above input be processed by an LTI discrete-time system with a frequency response H (e jω ) satisfying the condition Copyright © 2001, S. K. Mitra H (e jω ) ≅ 1 6 for ωl ≤ ω ≤ ωu Copyright © 2001, S. K. Mitra 1 Phase and Group Delays Phase and Group Delays • The output y[n] is then given by y[ n] = A cos(ω l n + θ (ωl ) ) + A cos( ωu n + θ(ω u )) 2 • However, the two components have different phase lags relative to their corresponding components in the input • Now consider the case when the modulated input is a narrowband signal with the frequencies ωl and ωu very close to the carrier frequency ωc , i.e. ωo is very small 2 θ (ωu ) + θ(ωl ) θ(ωu ) − θ(ωl ) = A cos ωcn + cos ωon + 2 2 • Note: The output is also in the form of a modulated carrier signal with the same carrier frequency ω c and the same modulation frequency ωo as the input 7 Copyright © 2001, S. K. Mitra 8 Phase and Group Delays Phase and Group Delays • In the neighborhood of ωc we can express the unwrapped phase response θ c (ω)as d θ ( ω) θ c (ω) ≅ θc (ωc ) + c ⋅ (ω − ωc ) dω ω=ωc 9 11 by making a Taylor’s series expansion and keeping only the first two terms • Using the above formula we now evaluate the time delays of the carrier and the modulating components Copyright © 2001, S. K. Mitra Copyright © 2001, S. K. Mitra • In the case of the carrier signal we have θ (ω ) + θ c (ωl ) θ (ω ) − c u ≅− c c 2 ωc ωc which is seen to be the same as the phase delay if only the carrier signal is passed through the system 10 Copyright © 2001, S. K. Mitra Phase and Group Delays Phase and Group Delays • In the case of the modulating component we have θ (ω ) − θ c (ωl ) dθ ( ω) − c u ≅− c ωu − ωl d ω ω= ωc • The parameter dθ ( ω) τ g ( ωc ) = − c dω ω= ωc is called the group delay or envelope delay caused by the system at ω = ωc • The group delay is a measure of the linearity of the phase function as a function of the frequency • It is the time delay between the waveforms of underlying continuous-time signals whose sampled versions, sampled at t = nT, are precisely the input and the output discrete-time signals Copyright © 2001, S. K. Mitra 12 Copyright © 2001, S. K. Mitra 2 Phase and Group Delays Phase and Group Delays • If the phase function and the angular frequency ω are in radians per second, then the group delay is in seconds • Figure below illustrates the evaluation of the phase delay and the group delay 13 Copyright © 2001, S. K. Mitra • Figure below shows the waveform of an amplitude-modulated input and the output generated by an LTI system 14 Phase and Group Delays Phase and Group Delays • Note: The carrier component at the output is delayed by the phase delay and the envelope of the output is delayed by the group delay relative to the waveform of the underlying continuous-time input signal • The waveform of the underlying continuoustime output shows distortion when the group delay of the LTI system is not constant over the bandwidth of the modulated signal 15 Copyright © 2001, S. K. Mitra Copyright © 2001, S. K. Mitra • If the distortion is unacceptable, a delay equalizer is usually cascaded with the LTI system so that the overall group delay of the cascade is approximately linear over the band of interest • To keep the magnitude response of the parent LTI system unchanged the equalizer must have a constant magnitude response at all frequencies 16 Copyright © 2001, S. K. Mitra Phase and Group Delays Phase and Group Delays • Example - The phase function of the FIR filter y[ n] = α x[n ] + β x[n − 1] + α x[n − 2] is θ (ω ) = −ω • Hence its group delay is given byτ g ( ω) = 1 verifying the result obtained earlier by simulation • Example - For the M-point moving-average filter 1 / M , 0 ≤ n ≤ M −1 h[n ] = 0, otherwise the phase function is M/2 (M − 1)ω 2π k θ (ω) = − + π ∑ µ ω − 2 M k =0 • Hence its group delay is τ g ( ω) = M2−1 17 Copyright © 2001, S. K. Mitra 18 Copyright © 2001, S. K. Mitra 3 Frequency Response of the LTI DiscreteDiscrete- Time System Frequency Response of the LTI DiscreteDiscrete- Time System • The convolution sum description of the LTI discrete-time system is given by y[ n] = • Or, ∞ ∞ Y ( e jω ) = ∑ h[ k ] ∑ x[l ] e − j ω( l+ k ) l =−∞ k =−∞ ∞ ∑ h[k ] x[n − k] k =−∞ ∞ ∞ = ∑ h[ k ] ∑ x[l] e − j ω l e − jω k k =−∞ l =−∞ • Taking the DTFT of both sides we obtain ∞ Y ( e jω ) = ∑ y[ n] e− jω n n= −∞ ∞ ∞ 19 = ∑ ∑ h[ k ] x[ n − k ] e− jω n Copyright © 2001, S. K. Mitra n = −∞ k =−∞ X ( e jω ) 20 Frequency Response of the LTI DiscreteDiscrete- Time System Frequency Response of the LTI DiscreteDiscrete- Time System • Hence, we can write • It follows from the previous equation H (e j ω ) = Y ( e j ω ) / X ( e j ω ) ∞ Y ( e jω ) = ∑ h[ k ] e − j ω k X ( e j ω ) = H (e j ω ) X ( e j ω ) k = −∞ • In the above H (e jω ) is the frequency responseof the LTI system • The above equation relates the input and the output of an LTI system in the frequency domain 21 Copyright © 2001, S. K. Mitra • For an LTI system described by a linear constant coefficient difference equation of the form we have H (e jω ) = − jω k ∑M k=0 pke − jω k ∑kN=0 d k e 22 Copyright © 2001, S. K. Mitra The Transfer Function The Transfer Function • A generalization of the frequency response function • The convolution sum description of an LTI discrete-time system with an impulse responseh[n] is given by • Taking the z-transforms of both sides we get y[ n] = 23 Copyright © 2001, S. K. Mitra Y(z ) = = ∞ ∑ h[k ] x[ n − k ] k = −∞ Copyright © 2001, S. K. Mitra 24 ∞ ∞ ∞ ∑ y[n] z −n = ∑ ∑ h[k ] x[ n − k ] z − n n =−∞ ∞ n= −∞ k = −∞ ∞ ∑ h[k ] ∑ x[ n − k ]z −n n= −∞ ∞ = ∑ h[ k ] ∑ x[l ]z − (l + k ) k = −∞ l =−∞ k =−∞ ∞ Copyright © 2001, S. K. Mitra 4 The Transfer Function The Transfer Function • Or, Y ( z ) = ∞ ∞ • Hence, ∑ h[ k] ∑ x[l]z − l z −k k =−∞ l= −∞ H ( z) = Y ( z) / X ( z) • The function H(z), which is the z-transform of the impulse response h[n] of the LTI system, is called the transfer function or the system function • The inverse z-transform of the transfer function H(z) yields the impulse response h[n] X (z ) • Therefore, Y ( z ) = ∑ h[k ]z − k X ( z) k =−∞ ∞ H (z ) • Thus, Y(z) = H(z)X(z) 25 Copyright © 2001, S. K. Mitra 26 The Transfer Function The Transfer Function • Consider an LTI discrete-time system characterized by a difference equation ∑ N k =0 d k y[ n − k ] = 27 • Or, equivalently as H ( z) = z ( N − M ) ∑ M k =0 pk x [n − k ] • Its transfer function is obtained by taking the z-transform of both sides of the above equation M −k ∑ p z • Thus H ( z) = kN=0 k − k ∑k=0 dk z Copyright © 2001, S. K. Mitra H ( z) = M −1 p0 ∏ k =1(1 − ξ k z ) ⋅ N d 0 ∏ (1 − λk z−1) Copyright © 2001, S. K. Mitra The Transfer Function • For a causal IIR digital filter, the impulse response is a causal sequence • The ROC of the causal transfer function M p ∏ ( z − ξk ) H ( z) = 0 z( N − M ) kN=1 d0 ∏k =1 ( z − λk ) is thus exterior to a circle going through the pole furthest from the origin • Thus the ROC is given by z > max λ k k =1 Copyright © 2001, S. K. Mitra M k =1 28 • Or, equivalently as M p ∏ ( z − ξk ) H ( z) = 0 z( N − M ) kN=1 d0 ∏ ( z − λk ) 29 M −k ∑ k = 0 pk z N ∑ k = 0 d k z N −k • An alternate form of the transfer function is given by The Transfer Function • ξ1, ξ 2 , ... ,ξ M are the finite zeros , and λ1, λ2, ... , λN are the finite poles of H(z) • If N > M, there are additional( N − M ) zeros at z = 0 • If N < M, there are additional( M − N ) poles at z = 0 Copyright © 2001, S. K. Mitra k 30 Copyright © 2001, S. K. Mitra 5 The Transfer Function The Transfer Function • The transfer function has M zeros on the unit circle at z = e j 2πk / M , 0 ≤ k ≤ M −1 • There are M −1 poles at z = 0 and a single M=8 pole at z = 1 • The pole at z = 1 exactly cancels the zero at z = 1 • The ROC is the entire z-plane except z = 0 • Example - Consider the M-point movingaverage FIR filter with an impulse response 1 / M , 0 ≤ n ≤ M −1 h[n ] = 0, otherwise • Its transfer function is then given by Imaginary Part 1 1 M −1 −n 1 − z− M zM −1 = H ( z) = z = ∑ − 1 M n =0 M (1 − z ) M [ z M ( z −1)] 31 Copyright © 2001, S. K. Mitra 0.5 7 0 -0.5 -1 -1 -0.5 32 0 0.5 Real Part 1 Copyright © 2001, S. K. Mitra The Transfer Function The Transfer Function • Alternate forms: z 2 − 1 .2 z + 1 z 3 − 1.3 z 2 + 1.04z − 0.222 ( z − 0.6 + j 0.8)( z − 0.6 − j 0.8) = (z − 0.3)(z − 0.5 + j0.7)( z − 0.5 − j 0.7) • Example - A causal LTI IIR digital filter is described by a constant coefficient difference equation given by H ( z) = y[ n] = x[n −1] − 1.2 x[ n − 2 ] + x[ n − 3] + 1 .3 y[ n − 1] −1 .04 y[ n − 2] + 0. 222 y[ n − 3] • Its transfer function is therefore given by 33 z −1 − 1.2 z − 2 + z− 3 H ( z) = 1 − 1.3 z −1 + 1 .04 z −2 − 0 .222 z −3 Copyright © 2001, S. K. Mitra 34 0.5 0 -0.5 -1 -1 -0.5 0 Real Part 0.5 1 Copyright © 2001, S. K. Mitra Frequency Response from Transfer Function Frequency Response from Transfer Function • If the ROC of the transfer function H(z) includes the unit circle, then the frequency response H (e jω ) of the LTI digital filter can be obtained simply as follows: H (e jω) = H ( z) z= e jω • For a stable rational transfer function in the form M p ∏ ( z − ξk ) H ( z) = 0 z( N − M ) kN=1 d0 ∏ ( z − λk ) k =1 the factored form of the frequency response is given by M p ∏ ( e jω − ξ k ) H (e jω) = 0 e jω( N − M ) kN=1 d0 ∏k =1 (e jω − λ k ) • For a real coefficient transfer function H(z) it can be shown that 2 H (e j ω ) = H ( e j ω ) H * (e j ω ) 35 Imaginary Part 1 • Note: Poles farthest from z = 0 have a magnitude 0.74 • ROC: z > 0.74 = H ( e jω ) H (e− jω ) = H ( z ) H ( z −1) z= e jω Copyright © 2001, S. K. Mitra 36 Copyright © 2001, S. K. Mitra 6 Frequency Response from Transfer Function Frequency Response from Transfer Function • It is convenient to visualize the contributions of the zero factor ( z − ξk ) and the pole factor ( z − λk ) from the factored form of the frequency response • The magnitude function is given by M ∏ e jω − ξk p H (e jω ) = 0 e jω( N − M ) kN=1 d0 ∏k =1 e jω − λ k 37 Copyright © 2001, S. K. Mitra which reduces to M jω p ∏ e − ξk H (e jω ) = 0 kN=1 d0 ∏ e jω − λk k =1 • The phase response for a rational transfer function is of the form arg H (e jω ) = arg( p0 / d0 ) + ω( N − M ) 38 Frequency Response from Transfer Function 2 p0 d0 2 M Copyright © 2001, S. K. Mitra k =1 k =1 Copyright © 2001, S. K. Mitra • The factored form of the frequency response M p ∏ ( e jω − ξ k ) H (e jω) = 0 e jω( N − M ) kN=1 d0 ∏ (e jω − λ k ) ∏k =1(e jω − ξ k )(e − jω − ξ*k ) N ∏k =1(e jω − λ k )(e − jω − λ*k ) 39 N Geometric Interpretation of Frequency Response Computation • The magnitude-squared function of a realcoefficient transfer function can be computed using H (e jω) = M + ∑ arg( e jω − ξk ) − ∑ arg( e jω − λk ) k =1 is convenient to develop a geometric interpretation of the frequency response computation from the pole-zero plot as ω varies from0 to 2π on the unit circle 40 Copyright © 2001, S. K. Mitra Geometric Interpretation of Frequency Response Computation Geometric Interpretation of Frequency Response Computation • The geometric interpretation can be used to obtain a sketch of the response as a function of the frequency • A typical factor in the factored form of the frequency response is given by • As shown below in the z-plane the factor ( e jω − ρ e jφ ) represents a vector starting at the point z = ρe jφ and ending on the unit circle at z = e jω ( e jω − ρ e jφ ) where ρe jφ is a zero if it is zero factor or is a pole if it is a pole factor 41 Copyright © 2001, S. K. Mitra 42 Copyright © 2001, S. K. Mitra 7 43 Geometric Interpretation of Frequency Response Computation Geometric Interpretation of Frequency Response Computation • As ω is varied from0 to 2π, the tip of the vector moves counterclockise from the point z = 1 tracing the unit circle and back to the point z = 1 • As indicated by Copyright © 2001, S. K. Mitra H (e jω) = 44 M Copyright © 2001, S. K. Mitra Geometric Interpretation of Frequency Response Computation • Likewise, from arg H (e jω) = arg(p0 / d0 ) + ω( N − M ) jω jω + ∑M − ξk ) − ∑N − λk ) k =1 arg(e k =1 arg(e we observe that the phase response at a specific value of ω is obtained by adding the phase of the termp0 / d 0 and the linear-phase termω ( N − M ) to the sum of the angles of the zero vectors minus the angles of the pole vectors Copyright © 2001, S. K. Mitra ∏k =1 e jω − ξ k N ∏k =1 e jω − λ k jω the magnitude response|H ( e )| at a specific value of ω is given by the product of the magnitudes of all zero vectors divided by the product of the magnitudes of all pole vectors Geometric Interpretation of Frequency Response Computation 45 p0 d0 • Thus, an approximate plot of the magnitude and phase responses of the transfer function of an LTI digital filter can be developed by examining the pole and zero locations • Now, a zero (pole) vector has the smallest magnitude when ω = φ 46 Copyright © 2001, S. K. Mitra Geometric Interpretation of Frequency Response Computation • To highly attenuate signal components in a specified frequency range, we need to place zeros very close to or on the unit circle in this range • Likewise, to highly emphasize signal components in a specified frequency range, we need to place poles very close to or on the unit circle in this range 47 Copyright © 2001, S. K. Mitra 8