Linear Constantcoefficient Difference Equations for all n n

  • Slides: 53
Download presentation
Linear Constant-coefficient Difference Equations for all n n n An important subclass of linear

Linear Constant-coefficient Difference Equations for all n n n An important subclass of linear time-invariant systems consist of those system for which the input x[n] and output y[n] satisfy an Nth-order linear constant-coefficient difference equation. A general form is shown above.

Signal Flow Graph of the Difference Equation n Assume that a 0 = 1.

Signal Flow Graph of the Difference Equation n Assume that a 0 = 1. Let TD denote one-sample delay. x[n] b 0 + y[n] + TD TD b 1 x[n-1] + + a 1 TD TD b 2 x[n-2] + + a 2 y[n-2] TD TD x[n-M] y[n-1] b. M + + a. N y[n-N]

Difference Equation: FIR system n n n The assumption a 0 = 1 can

Difference Equation: FIR system n n n The assumption a 0 = 1 can be always achieved by dividing all the coefficients by a 0 if a 0 0. The difference equation characterizes a recursive way of obtaining the output y[n] from the input x[n]. When ak = 0 for k = 1 … N, the difference equation degenerates to a FIR system. n The output consists of a linear combination of finite inputs.

Difference equation: IIR System n n When bm are not all zeros for m

Difference equation: IIR System n n When bm are not all zeros for m = 1 … M, the difference equation degenerates to This causes an IIR system n The effect of an impulse response sequence applied to the input keeps on circulating around the feedback loops indefinitely.

Example n Accumulator

Example n Accumulator

Example (continue) n Moving average system when M 1=0: n The impulse response is

Example (continue) n Moving average system when M 1=0: n The impulse response is h[n] = u[n] u[n M 2 1] n Also, note that The term y[n] y[n 1] suggests the implementation can be cascaded with an accumulator.

Moving Average System n Hence, there at least two difference equation representations of the

Moving Average System n Hence, there at least two difference equation representations of the moving average system. First, x[n] b + y[n] TD x[n-1] TD x[n-2] b + TD x[n-M] where b = 1/ (M 2+1) and TD denotes onesample delay

Moving Average System (continue) n n Second, The first representation is FIR, and the

Moving Average System (continue) n n Second, The first representation is FIR, and the second is IIR.

Solution of Difference Equation n n Just as differential equations for continuous-time systems, a

Solution of Difference Equation n n Just as differential equations for continuous-time systems, a linear constant-coefficient difference equation for discrete-time systems does not provide a unique solution if no additional constraints are provided. Solution: y[n] = yp[n] + yh[n] n n yh[n]: homogeneous solution obtained by setting all the inputs as zeros. yh[n]: a particular solution satisfying the difference equation.

Solution of Difference Equation n Additional constraints: consider the N auxiliary conditions that y[-1],

Solution of Difference Equation n Additional constraints: consider the N auxiliary conditions that y[-1], y[-2], …, y[-N] are given. n The other values of y[n] (n 0) can be generated by when x[n] is available, y[1], y[2], … y[n], … can be computed recursively. n To generate values of y[n] for n< N recursively,

Example of the Solution n Consider the difference equation y[n] = a y[n-1] +

Example of the Solution n Consider the difference equation y[n] = a y[n-1] + x[n]. Assume the input is x[n] =K [n], and the auxiliary condition is y[ 1] = c. 2 n Hence, y[0] = ac+K, y[1] = a y[0]+0 = a c+a. K, … n+1 c+an. K, for n 0. n Recursively, we found that y[n] = a 1 1 n For n< 1, y[-2] = a (y[ 1] x[ 1] ) = a c, y[ 2] = a 1 y[ 1] = a 2 c, …, and y[n] = an+1 c for n< 1. n Hence, the solution is y[n] = an+1 c+Kanu[n], n

Example of the Solution (continue) n n The recursively-implemented system for finding the solution

Example of the Solution (continue) n n The recursively-implemented system for finding the solution is non-causal. The solution system is non-linear: n n n When K=0, i. e. , the input is zero, the solution (system response) y[n] = an+1 c. Since a linear system requires that the output be zero for all time when the input is zero for all time. The solution system is not shift invariant: n when input were shifted by n 0 samples, x 1[n] =K [n - n 0], the output is y 1[n] = an+1 c+Kan n 0 u[n - n 0].

LTI solution n Our principal interest in the text is in systems that are

LTI solution n Our principal interest in the text is in systems that are linear and time invariant. How to make the recursively-implemented solution system be LTI? Initial-rest condition: n n n If the input x[n] is zero for n less than some time n 0, the output y[n] is also zero for n less than n 0. The previous example does not satisfy this condition since x[n] = 0 for n<0 but y[ 1] = c. Property: If the initial-rest condition is satisfied, then the system will be LTI and causal.

Frequency-Domain Representation of Discrete-time Signals and Systems n Eigen function of a LTI system

Frequency-Domain Representation of Discrete-time Signals and Systems n Eigen function of a LTI system n n When apply an eigenfunction as input, the output is the same function multiplied by a constant. x[n] = ejwn is the eigenfunction of all LTI systems. n Let h[n] be the impulse response of an LTI system, when ejwn is applied as the input,

Eigenfunction of LTI n n n Let we have consequently, ejwn is the eigenfunction

Eigenfunction of LTI n n n Let we have consequently, ejwn is the eigenfunction of the system, and the associated eigenvalue is H(ejw). We call H(ejw) the LTI system’s frequency response that consists of the real and imaginary parts, H(ejw) = HR(ejw) + j. HI(ejw), or in terms of magnitude and phase,

Example of Frequency Response n n Frequency response of the ideal delay system, y[n]

Example of Frequency Response n n Frequency response of the ideal delay system, y[n] =x[n nd], If we consider x[n] = ejwn as input, then Hence, the frequency response is n The magnitude and phase are

Linear Combination n When a signal can be represented as a linear combination of

Linear Combination n When a signal can be represented as a linear combination of complex exponentials: By the principle of superposition, the output is n Thus, we can find the output if we know the frequency response of the system.

Example of Linear Combination n Sinusoidal responses of LTI systems: n n The response

Example of Linear Combination n Sinusoidal responses of LTI systems: n n The response of x 1[n] and x 2[n] are If h[n] is real, it can be shown that H(e-jw 0) = H*(ejw 0), the total response y[n] = y 1[n] + y 2[n] is

Difference to Continuous-time System Response n n For a continuous-time system, the frequency response

Difference to Continuous-time System Response n n For a continuous-time system, the frequency response is not necessarily to be periodic. However, for a discrete-time system, the frequency response is always periodic with period 2 , since n n Because H(ejw) is periodic with period 2 , we need only specify H(ejw) over an interval of length 2 , eg. , [0, 2 ] or [ , ]. For consistency, we choose the interval [ , ]. The inherent periodicity defines the frequency response everywhere outside the chosen interval.

Ideal Frequency-selective Filters n The “low frequencies” are frequencies close to zero, while the

Ideal Frequency-selective Filters n The “low frequencies” are frequencies close to zero, while the “high frequencies” are those close to . n n Since that the frequencies differing by an integer multiple of 2 are indistinguishable, the “low frequency” are those that are close to an even multiple of , while the “high frequencies” are those close to an odd multiple of . Ideal frequency-selective filters: n An important class of linear-invariant systems includes those systems for which the frequency response is unity over a certain range of frequencies and is zero at the remaining frequencies.

Frequency Response of Ideal Low -pass Filter

Frequency Response of Ideal Low -pass Filter

Frequency Response of Ideal High-pass Filter

Frequency Response of Ideal High-pass Filter

Frequency Response of Ideal Band-stop Filter

Frequency Response of Ideal Band-stop Filter

Frequency Response of Ideal Band-pass Filter

Frequency Response of Ideal Band-pass Filter

Frequency Response of the Moving-average System n The impulse response of the moving-average system

Frequency Response of the Moving-average System n The impulse response of the moving-average system is n Therefore, the frequency response is n By noting that the following formula holds:

Frequency Response of the Movingaverage System (continue) (magnitude and phase)

Frequency Response of the Movingaverage System (continue) (magnitude and phase)

Frequency Response of the Movingaverage System (continue) M 1 = 0 and M 2

Frequency Response of the Movingaverage System (continue) M 1 = 0 and M 2 = 4 Amplitude response Phase response 2 w

Suddenly Applied Complex Exponential Inputs n In practice, we may not apply the complex

Suddenly Applied Complex Exponential Inputs n In practice, we may not apply the complex exponential inputs ejwn to a system, but the more practical-appearing inputs of the form x[n] = ejwn u[n] n n i. e. , complex exponentials that are suddenly applied at an arbitrary time, which for convenience we choose n=0. Consider its output to a causal LTI system:

Suddenly Applied Complex Exponential Inputs (continue) n We consider the output for n 0.

Suddenly Applied Complex Exponential Inputs (continue) n We consider the output for n 0. n Hence, the output can be written as y[n] = yss[n] + yt[n], where Steady-state response Transient response

Suddenly Applied Complex Exponential Inputs (continue) n n If h[n] = 0 except for

Suddenly Applied Complex Exponential Inputs (continue) n n If h[n] = 0 except for 0 n M (i. e. , a FIR system), then the transient response yt[n] = 0 for n+1 > M. That is, the transient response becomes zero since the time n = M. For n M, only the steady-state response exists. For infinite-duration impulse response (i. e. , IIR) n For stable system, Qn must become increasingly smaller as n , and so is the transient response.

Suddenly Applied Complex Exponential Inputs (continue) Illustration for the FIR case by convolution

Suddenly Applied Complex Exponential Inputs (continue) Illustration for the FIR case by convolution

Suddenly Applied Complex Exponential Inputs (continue) Illustration for the IIR case by convolution

Suddenly Applied Complex Exponential Inputs (continue) Illustration for the IIR case by convolution

Representation of Sequences by Fourier Transforms n Fourier Representation: representing a signal by complex

Representation of Sequences by Fourier Transforms n Fourier Representation: representing a signal by complex exponentials. Inverse Fourier transform (or forward Fourier transform) n n A signal x[n] is represented as the Fourier integral of the complex exponentials in the range of frequencies [ , ]. The weight X(ejw) of the frequency applied in the integral can be determined by the input signal x[n], and X(ejw) reveals how much of each frequency is required to synthesize x[n].

Representation of Sequences by Fourier Transforms (continue) n The phase X(ejw) is not uniquely

Representation of Sequences by Fourier Transforms (continue) n The phase X(ejw) is not uniquely specified since any integer multiple of 2 may be added to X(ejw) at any value of w without affecting the result. n n Denote ARG[X(ejw)] to be the phase value in [ , ]. Since the frequency response of a LTI system is the Fourier transform of the impulse response, the impulse response can be obtained from the frequency response by applying the inverse Fourier transform integral:

Existence of Fourier Transform Pairs n Whey they are transform pairs? Consider the integral

Existence of Fourier Transform Pairs n Whey they are transform pairs? Consider the integral

Conditions for the Existence of Fourier Transform Pairs n Conditions for the existence of

Conditions for the Existence of Fourier Transform Pairs n Conditions for the existence of Fourier transform pairs of a signal: n Absolutely summable n Mean-square convergence: In other words, the error |X(ejw) XM(ejw) | may not approach for each w, but the total “energh” in the error does.

Conditions for the Existence of Fourier Transform Pairs (continue) n n Still some other

Conditions for the Existence of Fourier Transform Pairs (continue) n n Still some other cases that are neither absolutely summable nor mean-square convergence, the Fourier transform still exist: Eg. , Fourier transform of a constant, x[n] = 1 for all n, is an impulse train: n The impulse of the continuous case is a “infinite heigh, zero width, and unit area” function. If some properties are defined for the impulse function, then the Fourier transform pair involving impulses can be well defined too.

Conditions for the Existence of Fourier Transform Pairs (continue) n n Properties of continuous

Conditions for the Existence of Fourier Transform Pairs (continue) n n Properties of continuous impulse function: Eg. , consider a sequence whose Fourier transform is the periodic impulse train the sequence is a complex exponential sequence (note that extends only over one period, from, we need include the term)

Symmetry Property of the Fourier Transform n Conjugate-symmetric sequence: xe[n] = xe*[ n] n

Symmetry Property of the Fourier Transform n Conjugate-symmetric sequence: xe[n] = xe*[ n] n n Conjugate-asymmetric sequence: xo[n] = xo*[ n] n n If a real sequence is conjugate symmetric, then it is called an even sequence satisfying xe[n] = xe[ n]. If a real sequence is conjugate antisymmetric, then it is called an odd sequence satisfying x 0[n] = x 0[ n]. Any sequence can be represented as a sum of a conjugate-symmetric and asymmetric sequences, x[n] = xe[n] + xo[n], where xe[n] = (1/2)(x[n]+ x*[ n]) and xo[n] = (1/2)(x[n] x*[ n]).

Symmetry Property of the Fourier Transform (continue) n Similarly, a Fourier transform can be

Symmetry Property of the Fourier Transform (continue) n Similarly, a Fourier transform can be decomposed into a sum of conjugate-symmetric and antisymmetric parts: X(ejw) = Xe(ejw) + Xo(ejw) , where Xe(ejw) = (1/2)[X(ejw) + X*(e jw)] and Xo(ejw) = (1/2)[X(ejw) X*(e jw)]

Symmetry Property of the Fourier Transform (continue) n Fourier Transform Pairs (if x[n] X(ejw))

Symmetry Property of the Fourier Transform (continue) n Fourier Transform Pairs (if x[n] X(ejw)) n n n x*[n] X*(e jw) x*[ n] X*(ejw) Re{x[n]} Xe(ejw) (conjugate-symmetry part of X(ejw)) j. Im{x[n]} Xo(ejw) (conjugate anti-symmetry part of X(ejw)) xe[n] (conjugate-symmetry part of x[n]) XR(ejw) = Re{X(ejw)} xo[n] (conjugate anti-symmetry part of x[n]) j. XI(ejw) = j. Im{X(ejw)}

Symmetry Property of the Fourier Transform (continue) n Fourier Transform Pairs (if x[n] X(ejw))

Symmetry Property of the Fourier Transform (continue) n Fourier Transform Pairs (if x[n] X(ejw)) n n n n Any real xe[n] X(ejw) = X*(e jw) (Fourier transform is conjugate symmetric) Any real xe[n] XR(ejw) = XR(e jw) (real part is even) Any real xe[n] XI(ejw) = XI(e jw) (imaginary part is odd) Any real xe[n] |XR(ejw)| = |XR(e jw)| (magnitude is even) Any real xe[n] XR(ejw)= XR(e jw) (phase is odd) xo[n] (even part of real x[n]) XR(ejw) xo[n] (odd part of real x[n]) j. XI(ejw)

Example of Symmetry Properties n The Fourier transform of the real sequence x[n] =

Example of Symmetry Properties n The Fourier transform of the real sequence x[n] = anu[n] for a < 1 is n Its magnitude is an even function, and phase is odd.

Fourier Transform Theorems n Linearity x 1[n] X 1(ejw), x 2[n] X 2(ejw) implies

Fourier Transform Theorems n Linearity x 1[n] X 1(ejw), x 2[n] X 2(ejw) implies that a 1 x 1[n] + a 2 x 2[n] a 1 X 1(ejw) + a 2 X 2(ejw) n Time shifting x[n] X(ejw) implies that

Fourier Transform Theorems (continue) n Frequency shifting x[n] X(ejw) implies that n Time reversal

Fourier Transform Theorems (continue) n Frequency shifting x[n] X(ejw) implies that n Time reversal x[n] X(ejw) If the sequence is time reversed, then x[ n] X(e jw) Furthermore, if x[n] is real then x[ n] X*(ejw), since X(ejw) is conjugate symmetric.

Fourier Transform Theorems (continue) n Differentiation in frequency x[n] X(ejw) implies that n Parseval’s

Fourier Transform Theorems (continue) n Differentiation in frequency x[n] X(ejw) implies that n Parseval’s theorem x[n] X(ejw) implies that

Fourier Transform Theorems (continue) The convolution theorem x[n] X(ejw) and h[n] H(ejw), and if

Fourier Transform Theorems (continue) The convolution theorem x[n] X(ejw) and h[n] H(ejw), and if y[n] = x[n] h[n], then Y(ejw) = X(ejw)H(ejw) n n The modulation or windowing theorem x[n] X(ejw) and w[n] W(ejw), and if y[n] = x[n]w[n], then a periodic convolution

Fourier Transform Pairs

Fourier Transform Pairs

Fourier Transform Pairs (continue)

Fourier Transform Pairs (continue)

Fourier Transform Pairs (continue)

Fourier Transform Pairs (continue)

Determining a Fourier Transform Using Symmetric Properties and Pairwise Formulas – Examples n Suppose

Determining a Fourier Transform Using Symmetric Properties and Pairwise Formulas – Examples n Suppose we wish to find the Fourier transform of x[n] = anu[n-5].

Another Example n Determining the impulse response for a difference equation y[n] (1/2) y[n

Another Example n Determining the impulse response for a difference equation y[n] (1/2) y[n 1] = x[n] (1/4)x[n 1] To find the impulse response, we set x[n] = [n]. Then the above equation becomes h[n] (1/2) h[n 1] = [n] (1/4) [n 1] Applying the Fourier transform, we obtain H(ejw) (1/2)e-jw. H(ejw) = 1 (1/4) e-jw So H(ejw) = (1 (1/4) e-jw) / (1 (1/2) e-jw)

Another Example (continue) n From the pairwise table, we know thus, (1/2)nu[n] 1 /

Another Example (continue) n From the pairwise table, we know thus, (1/2)nu[n] 1 / (1 (1/2) e-jw) By the shifting property, (1/4)(1/2)n 1 u[n 1] (1/4) e-jw / (1 (1/2) e-jw) Thus, h[n] = (1/2)nu[n] (1/4)(1/2)n 1 u[n 1]