DSP Lectures v2 [Chapter2][1]

Embed Size (px)

Citation preview

  • 7/28/2019 DSP Lectures v2 [Chapter2][1]

    1/32

    Signals, Spectra and Signal Processing (EC413L1)

    Chapter 2 Discrete-Time Signals and Systems Page 1

    Chapter 2

    DISCRETE-TIME SIGNALS AND SYSTEMS

    2.0 Introduction

    This chapter introduces the different elementary discrete-time signals that are important in thetreatment of signal processing. These are used as basis functions or building blocks to describemore complex signals.

    This chapter also emphasizes the characterization of discrete-time systems in general and theclass of linear time-invariant (LTI) systems in particular.

    The motivation for studying LTI systems is twofold: first, there are a large collection of mathematical techniques that can be applied to the analysis of LTI systems; second, manypractical systems are either LTI systems or can be approximated by LTI systems.

    2.1 Discrete-Time Signals

    A discrete-time signal x(n) is a function of an independent variable that is an integer. A graphicalrepresentation of a discrete-time signal is shown below

    Figure 2.1. Graphical representation of discrete-time signal

    Note: A discrete-time signal is NOT DEFINED at instants between two successive samples.

    A discrete-time signal is defined for every integer value n for - < n < + . x(n) refers to the nth sample of the signal.

    -4 -3 -2 -1 0 1 2 3 4 5-1

    -0.5

    0

    0.5

    1

    1.5

    2

    n

    x ( n

    )

    Discrete-Time Signal

  • 7/28/2019 DSP Lectures v2 [Chapter2][1]

    2/32

    Signals, Spectra and Signal Processing (EC413L1)

    Chapter 2 Discrete-Time Signals and Systems Page 2

    Some alternative representations of discrete-time signals:o Functional representation through equations:

    Example:

    xn=1,for n=1,34,for n=20,elsewhere

    o Tabular representation through tables:Example:

    o Sequence representation through row matrices:Examples: For infinite-duration signal, the time origin (n = 0) is indicated by an below

    the value.

    ( )

    = ..0.014100...nx

    A sequence, which is zero for n < 0 can be represented as

    ( )

    = ...001410nx

    If an arrow is omitted, the leftmost value is understood to be the sample at time-origin.A finite-duration sequence is represented as

    ( )

    = 1405213nx

    whereas a finite-duration sequence that is defined only at n > 0 can be represented as

    ( ) [ ]1410nx =

    2.1.1 Some Elementary Discrete-Time Signals

    Unit sample sequence , denoted as (n), is defined as

    n=1 for n= 00 for n 0 In words, the unit sample sequence is a signal that is zero everywhere, except at n = 0 where itsvalue is unity. It is also called unit impulse . The graphical representation of (n) is shown below.

    2.1.6

  • 7/28/2019 DSP Lectures v2 [Chapter2][1]

    3/32

    Signals, Spectra and Signal Processing (EC413L1)

    Chapter 2 Discrete-Time Signals and Systems Page 3

    Figure 2.2 Unit impulse sequence

    Unit step signal, denoted as u(n), is defined as

    un=1 for n 00 for n < 0 Unit step signal is illustrated below

    Figure 2.3. Unit step sequence

    -10 -5 0 5 100

    0.5

    1

    1.5

    2

    -10 -5 0 5 100

    0.5

    1

    1.5

    2

    2.1.7

  • 7/28/2019 DSP Lectures v2 [Chapter2][1]

    4/32

    Signals, Spectra and Signal Processing (EC413L1)

    Chapter 2 Discrete-Time Signals and Systems Page 4

    Unit ramp signal , denoted as r(n), and is defined as

    rn=n for n 00 for n < 0 Unit ramp sequence is shown below

    Figure 2.4. Unit ramp sequence

    Exponential signals are of the form

    xn=a

    If a is a real number, then x(n) is also a real number. The figures below illustrate x(n) for variousvalues of the parameter a.

    Figure 2.5. Real exponential signals for various values of the parameter a

    -10 -5 0 5 100

    5

    10

    15

    2.1.8

    2.1.9

  • 7/28/2019 DSP Lectures v2 [Chapter2][1]

    5/32

    Signals, Spectra and Signal Processing (EC413L1)

    Chapter 2 Discrete-Time Signals and Systems Page 5

    When the parameter a is complex-valued, it can be expressed as

    a= re and x(n) as

    xn=re= re= rcosn+ jsin having a real part x R(n)xRn= rcosn

    and imaginary part x I(n)

    xIn=rsinn Figure below shows the real and imaginary plots of the complex exponential signal. Notice that

    the real part is a damped cosine wave while the imaginary part is a damped sine wave.

    Figure 2.6. Graphs of real and imaginary components of a complex-valued signal

    Complex exponential signals can also be represented graphically using the amplitude function

    |xn |=An=r

    and the phase function

    xn= n= n The figure below shows the plot of complex exponential function in terms of magnitude andphase functions.

    0 5 10 15 20 25 30-0.5

    0

    0.5

    1real part

    0 5 10 15 20 25 30-0.5

    0

    0.5

    1imaginary part

    2.1.10

    2.1.11

    2.1.12

    2.1.13

    2.1.14

  • 7/28/2019 DSP Lectures v2 [Chapter2][1]

    6/32

    Signals, Spectra and Signal Processing (EC413L1)

    Chapter 2 Discrete-Time Signals and Systems Page 6

    Figure 2.7. Graph of amplitude and phase function of a complex-valued exponential signal

    2.1.2 Classification of Discrete-Time Signals

    Energy and power signalso The energy E of a signal x(n) is given as

    E=|xn |

    o If the energy of the signal E is finite, then it is an energy signal .o If its energy is infinite, it may have finite average power, given by

    P= limN 12 +1 |xn |N N o If it has finite average power, then it is a power signal .

    Periodic and aperiodic signalso A signal x(n) is periodic with period N (N > 0) if and only if

    xn+=xnfor all no If there is no value of N that satisfies the above equation, the signal is considered

    aperiodic .

    0 5 10 15 20 25 300

    0.5

    1magnitude

    0 5 10 15 20 25 30-5

    0

    5phase

    2.1.15

    2.1.16

    2.1.20

  • 7/28/2019 DSP Lectures v2 [Chapter2][1]

    7/32

    Signals, Spectra and Signal Processing (EC413L1)

    Chapter 2 Discrete-Time Signals and Systems Page 7

    o The energy of a periodic signal x(n) over a single period is finite, if x(n) takes on finitevalues over the period. However, for the whole duration of the signal (from negative topositive infinity) its energy is infinite.

    o For the whole duration of the signal, the average power of the periodic signal is finiteand is equal to the average power over a single period, given by

    P=1 |xn |N hence, a periodic signal is a power signal.

    Example: Determine whether the following signals are energy or power signals and determinetheir energy and power.

    a) Unit sample sequenceb) Unit step sequence

    c)

    xn=cos, for

  • 7/28/2019 DSP Lectures v2 [Chapter2][1]

    8/32

    Signals, Spectra and Signal Processing (EC413L1)

    Chapter 2 Discrete-Time Signals and Systems Page 8

    o The even signal component is formed by

    xn=12xn+ xn o The odd signal component is formed by

    xn=12xn xn Example: Resolve the following signals into its odd and even components and plot the resulting

    sequence. Verify your answers.a) Unit step sequence

    b) xn=1+for 3 n 11 for 0 n 30 elsewhere

    c) ( ) = LL 2341123nx

    2.1.3 Simple Manipulations of Discrete-Time Signals

    Transformation of the independent variable (time) o Time shifting shifting the signal x(n) in time involves replacing n with n k, where k is

    an integer. If k is positive , the time shifts results in the delay of the signal by k units of time. If k is negative , the time shifts results in an advance of the signal by |k| units of time.

    2.1.26

    2.1.27

  • 7/28/2019 DSP Lectures v2 [Chapter2][1]

    9/32

    Signals, Spectra and Signal Processing (EC413L1)

    Chapter 2 Discrete-Time Signals and Systems Page 9

    Figure 2.9. Graphical representation of a signal, and its delayed and advanced versions

    o Time folding the signal x(n) is folded about n = 0 when the time variable n is replacedby n.

  • 7/28/2019 DSP Lectures v2 [Chapter2][1]

    10/32

    Signals, Spectra and Signal Processing (EC413L1)

    Chapter 2 Discrete-Time Signals and Systems Page 10

    Figure 2.10. Graphical illustration of the folding and shifting operations

    o Time-scaling the signal x(n) is downsampled when the time variable n is replaced byan, where a is an integer. It is upsampled when the time variable n is replaced by n/a,where a is an integer.

    o Downsampling means resampling the sampled signals, that is, decreasing the samplingrate by a. Upsampling means inserting a 1 samples in between samples.

  • 7/28/2019 DSP Lectures v2 [Chapter2][1]

    11/32

    Signals, Spectra and Signal Processing (EC413L1)

    Chapter 2 Discrete-Time Signals and Systems Page 11

    Figure 2.11. Downsampling and Upsampling

    Addition, multiplication and scaling of sequences o Amplitude scaling of a signal by a constant A is accomplished by multiplying the value of

    every signal sample by A.

    yn=Axnfor - < n < +

    o The sum of two signals x 1(n) and x 2(n) is a signal y(n), whose value at any instant is equalto the sum of the values of these two signals at that instant, that is

    yn=xn+ xnfor - < n < + o The product of two signals is similarly defined on a sample-to-sample basis as

    yn=xn xnfor - < n < + Example: A discrete-time signal is defined as

    xn=1+n3for 3 n 11 for 0 n 30 elsewhere

    a. Determine its values and sketch the signal x(n).b. Sketch the signal that will result if we:

    i. First fold x(n) and then delay the resulting signals by four samples.ii. First delay x(n) by four samples and then fold the resulting signal.

  • 7/28/2019 DSP Lectures v2 [Chapter2][1]

    12/32

    Signals, Spectra and Signal Processing (EC413L1)

    Chapter 2 Discrete-Time Signals and Systems Page 12

    c. Sketch the signal x(-n + 4).d. Compare the results in parts (b) and (c) and derive a rule for obtaining the signal x(-n+k)

    from x(n).e. Express the signal x(n) in terms of signal of unit sample and unit step sequences.

    Example: A discrete-time signal x(n) is shown below. Sketch and label carefully each of thefollowing signals:

    a) x(n 2)b) x(4 n)c) 3x(n + 2)d) x(n) u(2 n)e) x(n 1) (n 3)f) x(n2)g) even part of x(n)h) odd part of x(n)

  • 7/28/2019 DSP Lectures v2 [Chapter2][1]

    13/32

    Signals, Spectra and Signal Processing (EC413L1)

    Chapter 2 Discrete-Time Signals and Systems Page 13

    2.2 Discrete-Time Systems

    A discrete-time system is a device or an algorithm that performs some prescribed operation ona discrete-time signal.

    The discrete-time system performs operation on an input discrete-time signal according to some

    well-defined rule (the algorithm ) to produce the output or response . We can describe the operation applied by the system to the input signal x(n) to produce the

    output y(n) in the following manner

    yn= xn where T denotes transformation (also called an operator) or processing performed by thesystem on x(n) to produce y(n).

    2.2.1 Input Output Description of Systems

    The input output description of a discrete-time system consists of a mathematical expressionor a rule, which explicitly defines the relation between the input and output signals

    Figure 2.12. Block diagram representation of a discrete-time system.

    Example: For the input signal

    xn=|n|, 3 30, Determine the output of the system defined by the following input output relationship.

    a)

    yn=xn

    b) yn=xn1 c) yn=xn+1 d) yn=xn+1+ xn+ xn1 e) yn=maxxn+1,xn,xn1 f) yn=xn=xn+ xn1+ xn2+

    2.2.1

  • 7/28/2019 DSP Lectures v2 [Chapter2][1]

    14/32

    Signals, Spectra and Signal Processing (EC413L1)

    Chapter 2 Discrete-Time Signals and Systems Page 14

    2.2.2 Block Diagram Representation of Discrete-Time Systems

    An adder a system that performs the addition of two signals sequences to form anothersequence, which is the sum of the two inputs. The symbol for an adder is illustrated below

    Figure 2.13. Symbol for adder

    A constant multiplier a system that multiplies the input signal by a scale factor. The symbol forthe constant multiplier is shown below.

    Figure 2.14. Symbol for constant multiplier

    Signal multiplier a system that multiplies two input sequences to produce the productsequence. A graphical representation of the signal multiplier appears below.

    Figure 2.15. Symbol for signal multiplier

  • 7/28/2019 DSP Lectures v2 [Chapter2][1]

    15/32

  • 7/28/2019 DSP Lectures v2 [Chapter2][1]

    16/32

    Signals, Spectra and Signal Processing (EC413L1)

    Chapter 2 Discrete-Time Signals and Systems Page 16

    o If the output of the system at any instant is computed using the past or future sample of the input and the past output, the system is said to be dynamic or to have memory . Thesystems described by the following input-output relations

    yn=xn+ 3xn1

    yn=xnk yn=xnk

    are dynamic systems or systems with memory.

    Time-invariant versus time-variant systems o A system is time-invariant if its input-output characteristics do not change with time. If

    a system T in a relaxed state is excited by the input x(n) to produce the output y(n), thenwe have

    yn=Txn If we excite the system by an input delayed by k number of samples, the outputbecomes

    yn,k=Txnk The system is said to be time-invariant if y(n,k) = y(n k); otherwise it is said to be timevarying.

    o The system identified by the input-output equation

    yn=xn xn1 is time-invariant while the system

    yn=nxn is time-varying system.

    Example: Determine if the following systems are time-invariant or time-varying systemsa) yn=xn xn1 b) yn=nxn c) yn=xn d) yn=xncosn

    2.2.13

  • 7/28/2019 DSP Lectures v2 [Chapter2][1]

    17/32

    Signals, Spectra and Signal Processing (EC413L1)

    Chapter 2 Discrete-Time Signals and Systems Page 17

    Linear versus nonlinear systems o A linear system is one that satisfies the superposition principle .o The superposition principle requires that the response of the system to a weighted sum

    of signals be equal to the corresponding weighted sum of the responses of the systemto each of the individual input signals.

    o A relaxed system T is linear if and only if

    Taxn+ axn= aTxn+ aTxn for any arbitrary input sequences x 1(n) and x 2(n) and any arbitrary constants a 1 and a 2.

    Figure 2.20. Graphical representation of the superposition principle

    o Linear systems exhibit multiplicative or scaling property and additive property . This isthe consequence of the definition of the superposition principle (Eq. 2.2.26)

    o The linearity condition stated by Eq. 2.2.26 can also be extended to any weighted linearcombination of signals.

    Example: Determine if the following systems described by the following input-output equationsare linear or nonlinear.

    a) yn=nxn b) yn=xn c) yn= xn d) yn=Axn+ B e) yn=e

    2.2.26

  • 7/28/2019 DSP Lectures v2 [Chapter2][1]

    18/32

    Signals, Spectra and Signal Processing (EC413L1)

    Chapter 2 Discrete-Time Signals and Systems Page 18

    Causal versus noncausal systems o A system is said to be causal if the output of the system at any time [i.e., y(n)] depends

    only on present and past inputs [i.e., x(n), x(n 1), x(n 2), ], but does not depend onfuture inputs [i.e., x(n + 1), x(n + 2), ].

    o If a system does not satisfy this condition, then it is said to be noncausal .o Noncausal systems are physically unrealizable in real-time signal processing

    applications. Example: Determine if the systems described by the following input-output equations are causal

    or noncausalo yn=xn xn1 o yn=xk o yn=axn o yn=xn+ 3xn+4 o yn=xn o yn=x2n

    o

    yn=xn

    Stable versus unstable systems o Stability is an important property that must be considered in any practical application of

    a systemo An arbitrary relaxed system is said to be bounded input bounded output (BIBO)

    stable if and only if every bounded (finite) input produces a bounded output.o If, for some bounded input sequence x(n), the output is unbounded (infinite), the

    system is classified as unstable . Example: Analyze the stability of the nonlinear system described by the input-output equation

    yn=yn1+ xn

  • 7/28/2019 DSP Lectures v2 [Chapter2][1]

    19/32

    Signals, Spectra and Signal Processing (EC413L1)

    Chapter 2 Discrete-Time Signals and Systems Page 19

    2.3 Analysis of Discrete-Time Linear Time-Invariant Systems

    We now turn our attention to the analysis of the important class of linear, time-invariant (LTI)systems.

    In particular, we shall demonstrate that such systems are characterized in the time domain

    simply by their response to a unit sample sequence. We shall also demonstrate that any arbitrary input signal can be decomposed and represented

    as a weighted sum of unit sample sequences. The general form of the expression that relates the unit sample response of the system and the

    arbitrary input signal to the output signal, called the convolution sum or convolution formula , isalso derived.

    2.3.1 Techniques for the Analysis of Linear Systems

    Two basic methods for analyzing the behavior or response of a linear system to a given inputsignal.

    o Direct solution of the input-output relationship of the system, whose general form (forthe LTI discrete-time systems) is

    yn= aynkN +bxnkM called the difference equation and represents one way to characterize the behavior of adiscrete-time LTI systems.

    o The second method of analyzing the behavior of a linear system to a given input signal is

    first decompose or resolve the input signal into a sum of elementary signals. Theelementary signals are selected so that the response of the system to each signalcomponent is easily determined. Then, using the linearity property of the system, theresponses of the system to the elementary signals are added to obtain the totalresponse of the system to the given input signal.

    o The first method is discussed in the next section, the second method is discussed in thissection.

    The choice of the elementary signals appears to be arbitrary, as long as the response can bedetermined conveniently.

    Resolution of the input signal to a weighted sum of unit sample (impulse) sequence proves to bemathematically convenient and completely general solution to the response of the system. Butif the input signal is periodic with period N, it can be more mathematically convenient for us toresolve these signals into harmonically related exponentials

    xn= e k= 0, 1, 2. . . N-1

    2.3.1

    2.3.5

  • 7/28/2019 DSP Lectures v2 [Chapter2][1]

    20/32

    Signals, Spectra and Signal Processing (EC413L1)

    Chapter 2 Discrete-Time Signals and Systems Page 20

    where the frequencies k are harmonically related and equal to 2k/N.

    2.3.2 Resolution of Discrete-Time Signals into Impulses

    Suppose we have an arbitrary signal x(n) that we wish to resolve into a sum of unit sample

    sequence. We select the elementary signals x k(n) to be

    xn= nk Note that the signal (n k) is zero everywhere except at n = k, where its value is unity.

    If we multiply the input signal x(n) with (n k), the result of this multiplication is anothersequence that is zero everywhere except at n = k, where its value is x(k). Thus if we repeat thisprocess at all possible values of k, the equation below holds true:

    xn= xknk

    2.3.7

    2.3.10

  • 7/28/2019 DSP Lectures v2 [Chapter2][1]

    21/32

    Signals, Spectra and Signal Processing (EC413L1)

    Chapter 2 Discrete-Time Signals and Systems Page 21

    Example: Resolve the sequence ( )

    = 3042nx

    into a sum of weighted impulse

    sequence.

    2.3.3 Response of LTI Systems to Arbitrary Inputs: The Convolution Sum

    We denote the response of the system to the input unit sample sequence as h(n) and is calledthe impulse response of the system. A relaxed LTI discrete-time system is characterized, in time-domain, by its impulse response.

    The response of the LTI system as a function of the input signal x(n) and its impulse responseh(n) is given as

    yn= xnhnk and is called the convolution sum of x(n) and h(n).

    The convolution sum involves four steps.o Folding Fold h(k) about k = 0 to obtain h(-k).o Shifting Shift h(-k) by n 0 to the right (or left) if n 0 is positive (or negative) to obtain h(n 0

    k).o Multiplication Multiply x(k) by h(n 0 k) to obtain the product sequence x(k)h(n 0 k).o Summation Sum all the values of the product sequence to obtain the value of the

    output at time n = n 0. We note that this procedure results in the response of the system at a single time instant n = n 0.

    To evaluate the response of the system over all time instants, we should repeat steps 2 to 4accordingly.

    We also note that the convolution sum is commutative, that is, it can be also expressed in theform

    yn= xnkhn Example: The impulse response of a linear, time-invariant system is

    ( ) = 1121nh

    Determine the response of the system to the input signal

    ( )= 1321nx

    2.3.17

    2.3.28

  • 7/28/2019 DSP Lectures v2 [Chapter2][1]

    22/32

    Signals, Spectra and Signal Processing (EC413L1)

    Chapter 2 Discrete-Time Signals and Systems Page 22

    Example: Determine the output y(n) of a relaxed linear time-invariant system with impulseresponse

    hn= aun,|a|

  • 7/28/2019 DSP Lectures v2 [Chapter2][1]

    23/32

    Signals, Spectra and Signal Processing (EC413L1)

    Chapter 2 Discrete-Time Signals and Systems Page 23

    The distributive property of the convolution sum is described as follows:

    xnhn+ hn=xn hn+ xn hn

    2.3.5 Causal Linear Time-Invariant Systems

    A causal system is one whose output at time n depends only on present and past inputs butdoes not depend on future inputs. For LTI systems, the causality condition also puts a restrictionon the impulse response of the system.

    A causal system has a causal impulse response, that is h(n) = 0 for n < 0. It is a necessary andsufficient condition for causality.

  • 7/28/2019 DSP Lectures v2 [Chapter2][1]

    24/32

    Signals, Spectra and Signal Processing (EC413L1)

    Chapter 2 Discrete-Time Signals and Systems Page 24

    The convolution sum formula can now be modified to reflect this condition. Thus

    If the input signal x(n) is also causal, that is x(n) = 0 for n < 0, the above formula can be furthersimplified, that is

    2.3.6 Stability of Linear Time-Invariant Systems

    An arbitrary relaxed system is BIBO stable if and only if its output sequence y(n) is bounded forevery bounded x(n).

    In terms of its impulse response h(n), an LTI system is stable if and only if its impulse response isabsolutely summable, that is, it decays over time, or

    This implies that any excitation at the input of the system, which is of finite duration, producesan output that is transient in nature, that is its amplitude decays with time and dies outeventually, when the system is stable.

    Example: Determine the range of values of the parameter a for which the LTI system withimpulse response

    h(n) = a n u(n)

    is stable.

  • 7/28/2019 DSP Lectures v2 [Chapter2][1]

    25/32

    Signals, Spectra and Signal Processing (EC413L1)

    Chapter 2 Discrete-Time Signals and Systems Page 25

    Example: Determine the range of values of a and b for which the LTI system whose impulseresponse

    hn=a, n0b, n

  • 7/28/2019 DSP Lectures v2 [Chapter2][1]

    26/32

    Signals, Spectra and Signal Processing (EC413L1)

    Chapter 2 Discrete-Time Signals and Systems Page 26

    2.4 Discrete-Time Systems Described by Difference Equations

    We have treated linear and time-invariant systems that are characterized by their unit sampleresponse h(n). In turn, h(n) allows us to determine the output y(n) of the system for any giveninput sequence x(n) by means of convolution summation

    yn= hkxnk This convolution formula in Eq. 2.4.1 suggests a means for the realization of the system. In caseof FIR systems, such a realization involves additions, multiplications and a finite number of memory locations. Thus, FIR systems are readily implemented directly by convolutionsummation.

    If the system is IIR, however it is impractical to implement it through the convolutionsummation, since it requires an infinite number of memory locations, multiplications, andadditions.

    Thus IIR systems are more practically realized through the difference equation, which givescomputationally more efficient way of implementing IIR systems. This section describes themethod of analyzing systems using the difference equation.

    2.4.1 Recursive and Nonrecursive Discrete-Time Systems

    Recursive systems is a system whose output y(n) at time n depends on any number of pastoutput values y(n-1), y(n-2), . . . etc. If the output y(n) does not depend on the previous outputs,the system is called nonrecursive .

    Recursive algorithm oftentimes provide more computationally efficient means of implementingalgorithms.

    Example: Analyze the system which computes the cumulative average of a signal x(n) in theinterval 0 k n.

    yn=1n+1 xk Example: Analyze the system which computes the square-root of a number A.

    yn=12yn1+xn

    yn1

    for the input x(n) = 2u(n). Use 2as an initial condition. The difference between recursive and nonrecursive systems is illustrated in the diagram below.Note the presence of the feedback loop and the delay element for recursive system.

    2.4.1

  • 7/28/2019 DSP Lectures v2 [Chapter2][1]

    27/32

    Signals, Spectra and Signal Processing (EC413L1)

    Chapter 2 Discrete-Time Signals and Systems Page 27

    2.4.2 Linear Time-Invariant Systems Characterized by Constant-Coefficient Difference Equation

    Systems described by constant-coefficient linear difference equations are a subclass of therecursive and nonrecursive systems introduced in the preceeding subsections.

    Example: Analyze the simple recursive system

    yn=ayn1+ xn

    The first part of the response, which contains y(-1) is the result of the initial condition y(-1) of the system. The second part of the response is the response of the system to the input signalx(n).

    If the system is initially relaxed, i.e. y(-1) = 0, its corresponding output is called its zero-stateresponse or forced response. It is denoted by y zs(n).

    If the initial conditions of the system is nonzero, and the input x(n) is zero for all values of n, thesystem still has output, and is called the zero-input response or natural response . It is denotedby y zi(n).

  • 7/28/2019 DSP Lectures v2 [Chapter2][1]

    28/32

    Signals, Spectra and Signal Processing (EC413L1)

    Chapter 2 Discrete-Time Signals and Systems Page 28

    In general, systems are described by linear, constant-coefficient difference equations. Thegeneral form for such an equation is

    yn= aynkN +bxnkM The integer N is called the order of the difference equation or the order of the system. Observe that in order to get y(n), we need to know the present and the past inputs x(n) as well

    as the previous outputs y(n-k).

    2.4.3 Solutions of Linear Constant-Coefficient Difference Equation

    Given a linear, constant-coefficient difference equation as the input-output relationshipdescribing a linear, time-invariant system, our objective in this subsection is to determine anexplicit expression for the output y(n).

    The method that we will develop in this section is called the direct method . The indirectmethod of solving these types of equations involves the use of z-transform .

    The direct solution method assumes that the total solution is the sum of two parts:

    yn= yn+ yn The part y h(n) is called the homogenous or complementary solution , whereas y p(n) is called theparticular solution .

    The homogenous solution o Assume that x(n) = 0. Thus we will obtain the solution for the homogenous difference

    equation

    aynkN =0 o Assume that the solution is of the form of an exponential

    yn= m o Substitute this to Eq. 2.4.14 to form the polynomial equation

    amN

    =0

    or

    m NmN+ amN+ + aNm+aN=0 The polynomial in parentheses is called the characteristic polynomial of the system. Ingeneral, it has N roots, which we denote as m 1, m 2, m 3, , mN. The roots can be real or

    2.4.14

    2.4.15

    2.4.16

  • 7/28/2019 DSP Lectures v2 [Chapter2][1]

    29/32

    Signals, Spectra and Signal Processing (EC413L1)

    Chapter 2 Discrete-Time Signals and Systems Page 29

    complex-valued. Since the coefficients a 1, a 2, , aN are real, complex valued roots occurare complex-conjugate pair. Some of the N roots may be identical, in which case wehave multiple order roots.

    o If the roots are distinct, the most general solution to the homogenous difference

    equation in Eq. 2.4.14 is

    yn=cm+cm+ cm+ + cNmN where c 1, c2, c3, cN are the weighing coefficients.

    o These coefficients are determined from the initial conditions specified for the system.o Since the input x(n) = 0, Eq. 2.4.17 can be used to obtain the zero-input response of the

    system. Example: Determine the homogenous solution of the system described by the first order

    difference equation

    yn=ayn1+ xn

    Example: Determine the zero-input response of the system described by the homogenoussecond-order difference equation

    yn 3yn14yn2=0 Example: Determine the homogenous solution and the zero-input response of the system

    described by the difference equation

    yn=yn1 yn2+ xn

    Example: Determine the homogenous solution and the zero-input response of the systemdescribed by the difference equation

    yn 3yn14yn2=xn+ 2xn1

    2.4.17

  • 7/28/2019 DSP Lectures v2 [Chapter2][1]

    30/32

    Signals, Spectra and Signal Processing (EC413L1)

    Chapter 2 Discrete-Time Signals and Systems Page 30

    The particular solution o Assume a particular solution y p(n) that depends on the input

    o Substitute this particular solution to the original function.o Solve for the necessary values of K that satisfies the original function for values of n

    where none of the terms vanish. Example: Determine the particular solution of the system described by the first order difference

    equation yn=ayn1+ xn at the input x(n) = u(n). Example: Determine the particular solution of the difference equation

    yn=yn1 yn2+ xn to the input (a) x(n) = 4u(n) and (b) x(n) = 2 nu(n).

    Example: Determine the particular solution of the difference equation

    yn 3yn14yn2=xn+ 2xn1 to the input x(n) = 4

    n

    u(n).

  • 7/28/2019 DSP Lectures v2 [Chapter2][1]

    31/32

    Signals, Spectra and Signal Processing (EC413L1)

    Chapter 2 Discrete-Time Signals and Systems Page 31

    The total solution o The linearity property of the linear constant-coefficient difference equation allows us to

    add the homogenous solution and the particular solution in order to obtain the totalsolution. Thus

    yn= yn+ yn

    o The resultant y(n) contains the constant parameters embodied in the homogenoussolution. These constants can be determined to satisfy the initial conditions.

    Example: Determine the total solution y(n), n 0, to the difference equationyn=ayn1+ xn when x(n) is a unit step sequence and y(-1) is the initial condition. Example: Determine the total solution of the system

    yn=yn1 yn2+ xn to the input (a) x(n) = 4u(n) and (b) x(n) = 2 nu(n). The initial conditions of this system are y(-1) =y(-2) = 1. Also determine the zero-state and zero-input response of this system.

    Example: Determine the total solution of the system

    yn 3yn14yn2=xn+ 2xn1 to the input x(n) = 4 nu(n). Also determine the zero-state and zero-input response of this system.

    2.4.4 The Impulse Response of a Linear Time-Invariant Recursive System

    The impulse response of the system h(n) was previously defined as the response of the systemto a unit sample excitation.

    In the case of a recursive system, h(n) is simply equal to the zero-state response of the systemwhen the input x(n) = (n) and the system is initially relaxed.

    Example: Determine the impulse response of the systemyn=ayn1+ xn We have established the fact that the total response of the system to any excitation function

    consists of the sum of the two solutions of the difference equation: the homogenous and theparticular solution to the excitation function.

    In the case where the excitation is an impulse, the particular solution is zero, since x(n) = 0 for n> 0.

    The response of the system to an impulse consists only of the solution to the homogenousequation, with the constant parameters evaluated to satisfy the initial conditions dictated by theimpulse.

  • 7/28/2019 DSP Lectures v2 [Chapter2][1]

    32/32

    Signals, Spectra and Signal Processing (EC413L1)

    Example: Determine the impulse response h(n) for the system described by the second orderdifference equation yn 3yn14yn2=xn+ 2xn1

    We note that any recursive system described by a linear, constant-coefficient differenceequation is an IIR system.

    Reference:

    John G. Proakis, Dimitris G. Manolakis. Digital Signal Processing: Principles, Algorithms, andApplications: Third Edition. Prentice Hall, New Jersey. 1996