Skip to content Skip to navigation

Connexions

You are here: Home » Content » Solving Linear Constant Coefficient Difference Equations

Navigation

Lenses

What is a lens?

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

This content is ...

Affiliated with (What does "Affiliated with" mean?)

This content is either by members of the organizations listed or about topics related to the organizations listed. Click each link to see a list of all content affiliated with the organization.
  • OrangeGrove display tagshide tags

    This module is included inLens: Florida Orange Grove Textbooks
    By: Florida Orange GroveAs a part of collection: "Signals and Systems"

    Click the "OrangeGrove" link to see all content affiliated with them.

    Click the tag icon tag icon to display tags associated with this content.

  • Rice Digital Scholarship display tagshide tags

    This module is included in aLens by: Digital Scholarship at Rice UniversityAs a part of collection: "Signals and Systems"

    Click the "Rice Digital Scholarship" link to see all content affiliated with them.

    Click the tag icon tag icon to display tags associated with this content.

Also in these lenses

  • Lens for Engineering

    This module is included inLens: Lens for Engineering
    By: Sidney Burrus

    Click the "Lens for Engineering" link to see all content selected in this lens.

  • richb's DSP display tagshide tags

    This module is included inLens: richb's DSP resources
    By: Richard BaraniukAs a part of collection: "Signals and Systems"

    Comments:

    "My introduction to signal processing course at Rice University."

    Click the "richb's DSP" link to see all content selected in this lens.

    Click the tag icon tag icon to display tags associated with this content.

Recently Viewed

This feature requires Javascript to be enabled.

Tags

(What is a tag?)

These tags come from the endorsement, affiliation, and other lenses that include this content.
 

Solving Linear Constant Coefficient Difference Equations

Module by: Richard Baraniuk, Stephen Kruzick. E-mail the authors

Summary: A module concerning the concepts involved in solving linear constant-coefficient difference equations.

Introduction

The approach to solving linear constant coefficient difference equations is to find the general form of all possible solutions to the equation and then apply a number of conditions to find the appropriate solution. The two main types of problems are initial value problems, which involve constraints on the solution at several consecutive points, and boundary value problems, which involve constraints on the solution at nonconsecutive points.

The number of initial conditions needed for an NNth order difference equation, which is the order of the highest order difference or the largest delay parameter of the output in the equation, is NN, and a unique solution is always guaranteed if these are supplied. Boundary value probelms can be slightly more complicated and will not necessarily have a unique solution or even a solution at all for a given set of conditions. Thus, this section will focus exclusively on initial value problems.

Solving Linear Constant Coefficient Difference Equations

Consider some linear constant coefficient difference equation given by Ay(n)=f(n)Ay(n)=f(n), in which AA is a difference operator of the form

A = a N D N + a N - 1 D N - 1 + . . . + a 1 D + a 0 A = a N D N + a N - 1 D N - 1 + . . . + a 1 D + a 0
(1)

where DD is the first difference operator

D ( y ( n ) ) = y ( n ) - y ( n - 1 ) . D ( y ( n ) ) = y ( n ) - y ( n - 1 ) .
(2)

Let yh(n)yh(n) and yp(n)yp(n) be two functions such that Ayh(n)=0Ayh(n)=0 and Ayp(n)=f(n)Ayp(n)=f(n). By the linearity of AA, note that L(yh(n)+yp(n))=0+f(n)=f(n)L(yh(n)+yp(n))=0+f(n)=f(n). Thus, the form of the general solution yg(n)yg(n) to any linear constant coefficient ordinary differential equation is the sum of a homogeneous solution yh(n)yh(n) to the equation Ay(n)=0Ay(n)=0 and a particular solution yp(n)yp(n) that is specific to the forcing function f(n)f(n).

We wish to determine the forms of the homogeneous and nonhomogeneous solutions in full generality in order to avoid incorrectly restricting the form of the solution before applying any conditions. Otherwise, a valid set of initial or boundary conditions might appear to have no corresponding solution trajectory. The following sections discuss how to accomplish this for linear constant coefficient difference equations.

Finding the Homogeneous Solution

In order to find the homogeneous solution to a difference equation described by the recurrence relation k=0Naky(n-k)=f(n)k=0Naky(n-k)=f(n), consider the difference equation k=0Naky(n-k)=0k=0Naky(n-k)=0. We know that the solutions have the form cλncλn for some complex constants c,λc,λ. Since k=0Nakcλn-k=0k=0Nakcλn-k=0 for a solution it follows that

c λ n - N k = 0 N a k λ N - k = 0 c λ n - N k = 0 N a k λ N - k = 0
(3)

so it also follows that

a 0 λ N + . . . + a N = 0 . a 0 λ N + . . . + a N = 0 .
(4)

Therefore, the solution exponential are the roots of the above polynomial, called the characteristic polynomial.

For equations of order two or more, there will be several roots. If all of the roots are distinct, then the general form of the homogeneous solution is simply

y h ( n ) = c 1 λ 1 n + . . . + c 2 λ 2 n . y h ( n ) = c 1 λ 1 n + . . . + c 2 λ 2 n .
(5)

If a root has multiplicity that is greater than one, the repeated solutions must be multiplied by each power of nn from 0 to one less than the root multipicity (in order to ensure linearly independent solutions). For instance, if λ1λ1 had a multiplicity of 2 and λ2λ2 had multiplicity 3, the homogeneous solution would be

y h ( n ) = c 1 λ 1 n + c 2 n λ 1 n + c 3 λ 2 n + c 4 n λ 2 n + c 5 n 2 λ 2 n . y h ( n ) = c 1 λ 1 n + c 2 n λ 1 n + c 3 λ 2 n + c 4 n λ 2 n + c 5 n 2 λ 2 n .
(6)

Example 1

Recall that the Fibonacci sequence describes a (very unrealistic) model of what happens when a pair rabbits get left alone in a black box... The assumptions are that a pair of rabits never die and produce a pair of offspring every month starting on their second month of life. This system is defined by the recursion relation for the number of rabit pairs y(n)y(n) at month nn

y ( n ) - y ( n - 1 ) - y ( n - 2 ) = 0 y ( n ) - y ( n - 1 ) - y ( n - 2 ) = 0
(7)

with the initial conditions y(0)=0y(0)=0 and y(1)=1y(1)=1.

Note that the forcing function is zero, so only the homogenous solution is needed. It is easy to see that the characteristic polynomial is λ2-λ-1=0λ2-λ-1=0, so there are two roots with multiplicity one. These are λ1=1+52λ1=1+52 and λ2=1-52λ2=1-52. Thus, the solution is of the form

y ( n ) = c 1 1 + 5 2 n + c 2 1 - 5 2 n . y ( n ) = c 1 1 + 5 2 n + c 2 1 - 5 2 n .
(8)

Using the initial conditions, we determine that

c 1 = 5 5 c 1 = 5 5
(9)

and

c 2 = - 5 5 . c 2 = - 5 5 .
(10)

Hence, the Fibonacci sequence is given by

y ( n ) = 5 5 1 + 5 2 n - 5 5 1 - 5 2 n . y ( n ) = 5 5 1 + 5 2 n - 5 5 1 - 5 2 n .
(11)

Finding the Particular Solution

Finding the particular solution is a slightly more complicated task than finding the homogeneous solution. It can be found through convolution of the input with the unit impulse response once the unit impulse response is known. Finding the particular solution ot a differential equation is discussed further in the chapter concerning the z-transform, which greatly simplifies the procedure for solving linear constant coefficient differential equations using frequency domain tools.

Example 2

Consider the following difference equation describing a system with feedback

y ( n ) - a y ( n - 1 ) = x ( n ) . y ( n ) - a y ( n - 1 ) = x ( n ) .
(12)

In order to find the homogeneous solution, consider the difference equation

y ( n ) - a y ( n - 1 ) = 0 . y ( n ) - a y ( n - 1 ) = 0 .
(13)

It is easy to see that the characteristic polynomial is λ-a=0λ-a=0, so λ=aλ=a is the only root. Thus the homogeneous solution is of the form

y h ( n ) = c 1 a n . y h ( n ) = c 1 a n .
(14)

In order to find the particular solution, consider the output for the x(n)=δ(n)x(n)=δ(n) unit impulse case

y ( n ) - a y ( n - 1 ) = δ ( n ) . y ( n ) - a y ( n - 1 ) = δ ( n ) .
(15)

By inspection, it is clear that the impulse response is anu(n)anu(n). Hence, the particular solution for a given x(n)x(n) is

y p ( n ) = x ( n ) * a n u ( n ) . y p ( n ) = x ( n ) * a n u ( n ) .
(16)

Therefore, the general solution is

y g ( n ) = y h ( n ) + y p ( n ) = c 1 a n + x ( n ) * a n u ( n ) . y g ( n ) = y h ( n ) + y p ( n ) = c 1 a n + x ( n ) * a n u ( n ) .
(17)

Initial conditions and a specific input can further tailor this solution to a specific situation.

Solving Difference Equations Summary

Linear constant coefficient difference equations are useful for modeling a wide variety of discrete time systems. The approach to solving them is to find the general form of all possible solutions to the equation and then apply a number of conditions to find the appropriate solution. This is done by finding the homogeneous solution to the difference equation that does not depend on the forcing function input and a particular solution to the difference equation that does depend on the forcing function input.

Content actions

Download module as:

PDF | EPUB (?)

What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

Downloading to a reading device

For detailed instructions on how to download this content's EPUB to your specific device, click the "(?)" link.

| More downloads ...

Add module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks