Skip to main content
Engineering LibreTexts

4.7: Linear Constant Coefficient Difference Equations

  • Page ID
    23132
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Introduction: Difference Equations

    In our study of signals and systems, it will often be useful to describe systems using equations involving the rate of change in some quantity. In discrete time, this is modeled through difference equations, which are a specific type of recurrance relation. For instance, recall that the funds in an account with discretely compounded interest rate \(r\) will increase by \(r\) times the previous balance. Thus, a discretely compounded interest system is described by the first order difference equation shown in Equation \ref{4.50}.

    \[y(n)=(1+r)y(n−1) \label{4.50} \]

    Given a sufficiently descriptive set of initial conditions or boundary conditions, if there is a solution to the difference equation, that solution is unique and describes the behavior of the system. Of course, the results are only accurate to the degree that the model mirrors reality.

    Linear Constant Coefficient Difference Equations

    An important subclass of difference equations is the set of linear constant coefficient difference equations. These equations are of the form

    \[Cy(n)=f(n) \label{4.51} \]

    where \(C\) is a difference operator of the form given

    \[ C=c_{N} D^{N}+c_{N-1} D^{N-1}+\ldots+c_{1} D+c_{0} \label{4.52} \]

    in which \(D\) is the first difference operator

    \[ D(y(n))=y(n)-y(n-1). \label{4.53} \]

    Note that operators of this type satisfy the linearity conditions, and \(c_{0}, \dots, c_{n}\) are real constants.

    However, Equation \ref{4.51} can easily be written as a linear constant coefficient recurrence equation without difference operators. Conversely, linear constant coefficient recurrence equations can also be written in the form of a difference equation, so the two types of equations are different representations of the same relationship. Although we will still call them linear constant coefficient difference equations in this course, we typically will not write them using difference operators. Instead, we will write them in the simpler recurrence relation form

    \[ \sum_{k=0}^{N} a_{k} y(n-k)=\sum_{k=0}^{M} b_{k} x(n-k) \label{4.54} \]

    where \(x\) is the input to the system and \(y\) is the output. This can be rearranged to find \(y(n)\) as

    \[y(n)=\frac{1}{a_{0}}\left(-\sum_{k=1}^{N} a_{k} y(n-k)+\sum_{k=0}^{M} b_{k} x(n-k)\right) \label{4.55} \]

    The forms provided by Equation \ref{4.54} and Equation \ref{4.55} will be used in the remainder of this course.

    A similar concept for continuous time setting, differential equations, is discussed in the chapter on time domain analysis of continuous time systems. There are many parallels between the discussion of linear constant coefficient ordinary differential equations and linear constant coefficient difference equations.

    Applications of Difference Equations

    Difference equations can be used to describe many useful digital filters as described in the chapter discussing the z-transform. An additional illustrative example is provided here.

    Example \(\PageIndex{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 rabbits 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 rabbit pairs \(y(n)\) at month \(n\)

    \[y(n)=y(n-1)+y(n-2) \nonumber \]

    with the initial conditions \(y(0)=0\) and \(y(1)=1\). The result is a very fast growth in the sequence. This is why we do not open black boxes.

    Linear Constant Coefficient Difference Equations Summary

    Difference equations are an important mathematical tool for modeling discrete time systems. An important subclass of these is the class of linear constant coefficient difference equations. Linear constant coefficient difference equations are often particularly easy to solve as will be described in the module on solutions to linear constant coefficient difference equations and are useful in describing a wide range of situations that arise in electrical engineering and in other fields.


    This page titled 4.7: Linear Constant Coefficient Difference Equations is shared under a CC BY license and was authored, remixed, and/or curated by Richard Baraniuk et al..

    • Was this article helpful?