Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.341:DISCRETE-TIME SIGNAL PROCESSING OpenCourse Ware 2006 Lecture 2 Background Review Phase,Group Delay,and Generalized Linear Phase Reading:Sections 5.1,5.3,and 5.7 in Oppenheim,Schafer Buck (OSB). Phase LTI n一()一m The frequency response H(e)of an LTI system H(z)is evaluated on the unit circle,=1. H(ej)=H(2)z=e The Fourier transforms of the input xn]and the output y[n]of the system are related by Y(e)=H(e)X(e). We can understand this input-output relationship in more detail by looking at the equation in terms of the magnitude-phase representation. Magnitude/Phase Representation H(ej)=HR(ej)+jH(ej)=H(ej)leji(),01(w)=KH(ej) Example: hin]-6n] →lH(ew川=1,kH(ew)=π In the mag/phase representation,a real-valued frequency response does not necessarily mean that the system is zero-phase. 1
Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.341: Discrete-Time Signal Processing OpenCourseWare 2006 Lecture 2 Background Review Phase, Group Delay, and Generalized Linear Phase Reading: Sections 5.1, 5.3, and 5.7 in Oppenheim, Schafer & Buck (OSB). Phase LTI x[n] −→ H(z) −→ y[n] The frequency response H(ejω) of an LTI system H(z) is evaluated on the unit circle, | | z = 1. H(ejω) = H(z) z=e | jω The Fourier transforms of the input x[n] and the output y[n] of the system are related by jω)X(ejω Y (e ). jω) = H(e We can understand this input-output relationship in more detail by looking at the equation in terms of the magnitude-phase representation. Magnitude/Phase Representation H(ejω) = HR(ejω) + jHI (ejω) = |H(ejω) ejθ1(ω) , θ1(ω) = �H(ejω | ) Example: h[n] = −δ[n] = 1, �H(ejω ⇒ |H(e ) = π jω)| In the mag/phase representation, a real-valued frequency response does not necessarily mean that the system is zero-phase. 1
Using this representation, Y(e)=H(ejx(ej) and ∠Y(ew)=∠H(e)+kX(ew). Thus,H(e)and H(e)are commonly referred to as the gain and the phase shift of the system,respectively. In magnitude and phase plots,as w goes through a zero on the unit circle,the magnitude will go to zero and the phase will flip by r,as shown in the figure below. Magnitude Response IH(j 20 20 Freg (d-a 100 Phase Response∠H0ol 0.8 0.6 2-o 789 Magnitude and phase response of an elliptic lowpass filter If H(ei)is real but bipolar,it's often more natural to use an alternative representation to remove these jumps of m in a phase plot. Amplitude/Phase Representation H(ej)=A(ej)eio2(),02()=ZH(ej) A(e")is real but not restricted to be positive,thus 02(w)is different from 01(w)above.The sign change is contained in A(ej),and the jumps of m do not exist in 02(w). 2
Using this representation, |Y (ejω) = H(ejω)||X(ejω | | )| and �Y (ejω) = �H(ejω) + �X(ejω). Thus, |H(ejω)| and �H(ejω) are commonly referred to as the gain and the phase shift of the system, respectively. In magnitude and phase plots, as ω goes through a zero on the unit circle, the magnitude will go to zero and the phase will flip by π, as shown in the figure below. Magnitude and phase response of an elliptic lowpass filter If H(ejω) is real but bipolar, it’s often more natural to use an alternative representation to remove these jumps of π in a phase plot. Amplitude/Phase Representation jω)ejθ2(ω) jω H(e ) jω) = A(e , θ2(ω) = �H(e A(ejω) is real but not restricted to be positive, thus θ2(ω) is different from θ1(ω) above. The sign change is contained in A(ejω), and the jumps of π do not exist in θ2(ω). 2
Example: Consider h[n]given in the figure below. H(ejw)=Ae-jw(N-1)/2sin(wN/2) sin(u/2) In the magnitude/phase representation,(w)has jumps of at the sign change. In the amplitude/phase representation,02(w)=-w(N-1)/2,a straight line with the slope -(N-1)/2.Moreover,in this representation,phase would be the same whether A is positive or negative. Wrapped vs.Unwrapped Phase Example: H(eiw)=e-2jw In either the mag/phase or the amp/phase representations,H(e)=-2w.However,if you plot the phase in MATLAB,it will give you the wrapped phase shown below. 0.5 0 -0.5 -0.5 0.5 3
H(e Ae− (N−1)/2 sin( 2) sin( 2) θ1(ω π θ2(ω −ω(N −1)/ −(N −1)/ H(e e−2 �H(e ) = −2ω. −1 −0.5 0 0.5 1 −1 −0.5 0 0.5 1 w/pi phase/pi given in the figure below. jω) = jω ωN/ ω/ In the magnitude/phase representation, ) has jumps of at the sign change. In the amplitude/phase representation, ) = 2, a straight line with the slope 2. Moreover, in this representation, phase would be the same whether A is positive Wrapped vs. Unwrapped Phase jω) = jω In either the mag/phase or the amp/phase representations, jω However, if you plot the phase in Matlab, it will give you the wrapped phase shown below. Example: Consider h[n] or negative. Example: 3
In general,phase is ambiguous since e(+)=e for any integer n.OSB Figure 5.7 shows the continuous phase (denoted as arg)and the wrapped phase (denoted as ARG)of an LTI system. Group Delay Typically,it is hard to infer much from a phase plot,and a group delay plot gives more useful information. ro)=gmde】=-amge】=是ARG H〗 The last equality holds except at discontinuities of [ARG H(e)]. In MATLAB,group delay is calculated using the Fourier transform rather than differentiation. In the amplitude/phase representation: H(e)=A(w)ei() (1) Differentiating both sides, H'(ej)=A'(w)ei()+A(w)ei()(j0w)) and dividing by Equation 1, H(e_A回+0o) H(ei)A(w) Since bothand are real, H'(e) (w)=-ImlH(e) If hin]H(e),we can apply the frequency differentiation property of the Fourier transform and get -jnh[n]H'(ex). Denoting Fourier transform of h[n]as F.T.(h[n]), F.T.(-jnh[n]), ra)=-ImF.T.hm)) and finally, F.T.(nhin]) ()=Rel F.T.(hin)) 4
In general, phase is ambiguous since ej(θ+2πn) = ejθ for any integer n. OSB Figure 5.7 shows the continuous phase (denoted as arg) and the wrapped phase (denoted as ARG) of an LTI system. Group Delay Typically, it is hard to infer much from a phase plot, and a group delay plot gives more useful information. d τ (ω) = grd[H(ejω)] ≡ − d [arg H(ejω)] = − [ARG H(ejω)] dω dω The last equality holds except at discontinuities of [ARG H(ejω)]. In Matlab, group delay is calculated using the Fourier transform rather than differentiation. In the amplitude/phase representation: jθ(ω) H(e (1) jω) = A(ω)e Differentiating both sides, (ω)ejθ(ω) + A(ω)ejθ(ω) H (jθ � (ejω) = A� � (ω)) and dividing by Equation 1, (ejω H ) � A� (ω) = + jθ� (ω) H(ejω) A(ω) Since both A� (ω) and θ� (ω) are real, A(ω) (ejω H ) � τ (ω) = −Im[ H(ejω) ]. If h[n] H(ejω), we can apply the frequency differentiation property of the Fourier transform and get ↔ (ejω −jnh[n] H ). ↔ � Denoting Fourier transform of h[n] as F.T.(h[n]), τ (ω) = −Im[ F.T.(−jnh[n])] F.T.(h[n]) and finally, F.T.(nh[n]) τ (ω) = Re[ ]. F.T.(h[n]) 4
Systems with Linear Phase Systems with constant group delay are referred to as linear phase systems.These systems are desirable when we want to minimize the distortion on the shape of a signal.The three systems given below are linear phase systems. System 1:hi[n]is symmetric about zero. hiln]=hil-n] Hi(e)is real,and phase is zero in the amplitude/phase representation.Thus,the group delay is zero,and hi[n]is linear phase. System 2:h2[n]is symmetric about an integer no,i.e.hi[n]delayed by no. h2in]hiln-nol H2(ejw)=e-juno Hi(ejw) H(e)is real,so the group delay of H2(e)is no,and h2[n]is also linear phase. Since hi[n]is even, h2n nol hiln]hi[-n]h2[-n+nol, and h2n]satisfies the following: h2in]h2[2no-nl System 3:h3[n]=h3[2a-n],where 2a is an integer. H3(ej)=H3(ejw)e-j2aw, since h3[n]=h3[-(n-2a)].Multiplying both sides by ejwa, ejwoH3(ej)=H(ejw)e-jwa=ejwa H3(ejw). This implies that both sides must be real,so H3(e)can be expressed as H3(ew)=A(ejw)e-jwa, where A(e)is real (possibly bipolar).Thus,the phase response of H3(ej)is linear,and the group delay is constant. 5
Systems with Linear Phase Systems with constant group delay are referred to as linear phase systems. These systems are desirable when we want to minimize the distortion on the shape of a signal. The three systems given below are linear phase systems. System 1: h1[n] is symmetric about zero. h1[n] = h1[−n] H1(ejω) is real, and phase is zero in the amplitude/phase representation. Thus, the group delay is zero, and h1[n] is linear phase. System 2: h2[n] is symmetric about an integer n0, i.e. h1[n] delayed by n0. h2[n] = h1[n − n0] jω) = e−jωn0H1(ejω H2(e ) H1(ejω) is real, so the group delay of H2(ejω) is n0, and h2[n] is also linear phase. Since h1[n] is even, h2[n + n0] = h1[n] = h1[−n] = h2[−n + n0], and h2[n] satisfies the following: h2[n] = h2[2n0 − n] System 3: h3[n] = h3[2α − n], where 2α is an integer. jω)e H −j2αω 3(ejω) = H3 ∗(e , since h3[n] = h3[−(n − 2α)]. Multiplying both sides by ejωα, ejωαH3(ejω) = H3 ∗(ejω)e−jωα = ejωαH3(ejω). This implies that both sides must be real, so H3(ejω) can be expressed as jω)e H −jωα 3(ejω) = A(e , where A(ejω) is real (possibly bipolar). Thus, the phase response of H3(ejω) is linear, and the group delay is constant. 5
Since hIn]is only defined at integer values,we need 2o to be an integer to represent h[2a-n]. If a is an integer,then System 3 corresponds to System 2 and hn]is symmetric about a (see OSB Figure 5.35(a)).If 2a is an integer but a is not an integer,the point of symmetry lies between samples(see OSB Figure 5.35(b)).When 2a is not an integer,hn]is not symmetric, but the envelop is symmetric (see OSB Figure 5.35 (c)). Generalized Linear Phase Consider a system which is antisymmetric about zero: hin]-hin] This implies that H(e)is purely imaginary,therefore in the amplitude/phase representation, H(e)=jI(w)=I(w)ejr/2 where I(w)is real.Thus,we see that the phase of H(e)is /2,and the group delay is zero. If the system has an odd symmetric impulse response hin]=-h 2a -nl where 2o is an integer,then it follows that H(e)=-H*(ejw)e-j2aw Multiplying both sides by e, ewaH(ej)=-H*(ejw)e-jwa=-ejwaH(ejw). which implies that both sides must be purely imaginary,so ejwaH(ej)=jI(w) where I(w)is real.Thus,H(e)has the form H(ex)=I(w)ejnp2e-jwa Therefore,we see that the phase of H(e)consists of a constant term added to a linear func- tion,and the group delay of the system is a,a constant. Systems with linear phase in this sense are called generalized linear phase. 6
Since h[n] is only defined at integer values, we need 2α to be an integer to represent h[2α − n]. If α is an integer, then System 3 corresponds to System 2 and h[n] is symmetric about α (see OSB Figure 5.35 (a)). If 2α is an integer but α is not an integer, the point of symmetry lies between samples (see OSB Figure 5.35 (b)). When 2α is not an integer, h[n] is not symmetric, but the envelop is symmetric (see OSB Figure 5.35 (c)). Generalized Linear Phase Consider a system which is antisymmetric about zero: h[n] = −h[n] This implies that H(ejω) is purely imaginary, therefore in the amplitude/phase representation, H jπ/2 (ejω) = jI(ω) = I(ω)e , where I(ω) is real. Thus, we see that the phase of H(ejω) is π/2, and the group delay is zero. If the system has an odd symmetric impulse response h[n] = −h[2α − n] where 2α is an integer, then it follows that H(ejω) = −H∗(ejω)e−j2αω. Multiplying both sides by ejωα, ejωαH(ejω) = −H∗(ejω)e−jωα −ejωαH(ejω = ), which implies that both sides must be purely imaginary, so ejωαH(ejω) = jI(ω) where I(ω) is real. Thus, H(ejω) has the form H(ejω) = I(ω)ejπ/2e−jωα. Therefore, we see that the phase of H(ejω) consists of a constant term added to a linear function, and the group delay of the system is α, a constant. Systems with linear phase in this sense are called generalized linear phase. 6