Example
Finding difference equation
Below is a basic example showing the opposite of the steps
above: given a transfer function one can easily calculate thesystems difference equation.
Given this transfer function of a time-domain filter, we want
to find the difference equation. To begin with, expand bothpolynomials and divide them by the highest order
.
From this transfer function, the coefficients of the two
polynomials will be our
and
values found in the general difference equation
formula,
[link] .
Using these coefficients and the above form of the transferfunction, we can easily write the difference equation:
In our final step, we can rewrite the difference equation in
its more common form showing the recursive nature of the system.
Got questions? Get instant answers now!
Solving a lccde
In order for a linear constant-coefficient difference equation
to be useful in analyzing a LTI system, we must be able tofind the systems output based upon a known input,
, and a set of initial conditions. Two common
methods exist for solving a LCCDE: the
direct
method and the
indirect method , the later
being based on the z-transform. Below we will briefly discussthe formulas for solving a LCCDE using each of these methods.
Direct method
The final solution to the output based on the direct method
is the sum of two parts, expressed in the followingequation:
The first part,
, is referred to as the
homogeneous
solution and the second part,
, is referred to as
particular
solution . The following method is very similar to
that used to solve many differential equations, so if youhave taken a differential calculus course or used
differential equations before then this should seem veryfamiliar.
Homogeneous solution
We begin by assuming that the input is zero,
.Now we simply need to solve the homogeneous difference
equation:
In order to solve this, we will make the assumption that
the solution is in the form of an exponential. We willuse lambda,
, to
represent our exponential terms. We now have to solve thefollowing equation:
We can expand this equation out and factor out all of thelambda terms. This will give us a large polynomial in
parenthesis, which is referred to as the
characteristic polynomial . The roots of this
polynomial will be the key to solving the homogeneousequation. If there are all distinct roots, then the
general solution to the equation will be as follows:
However, if the characteristic equation contains multiple
roots then the above general solution will be slightlydifferent. Below we have the modified version for an
equation where
has
multiple
roots:
Particular solution
The particular solution,
, will be any solution that will solve the
general difference equation:
In order to solve, our guess for the solution to
will take on the form of the input,
. After guessing at a solution to the above
equation involving the particular solution, one onlyneeds to plug the solution into the difference equation
and solve it out.
Indirect method
The indirect method utilizes the relationship between the
difference equation and z-transform, discussed
earlier , to find a
solution. The basic idea is to convert the differenceequation into a z-transform, as described
above , to get the
resulting output,
.
Then by inverse transforming this and using partial-fractionexpansion, we can arrive at the solution.
This can be interatively extended to an arbitrary order derivative as in Equation
[link] .
Now, the Laplace transform of each side of the differential equation can be taken
which by linearity results in
and by differentiation properties in
Rearranging terms to isolate the Laplace transform of the output,
Thus, it is found that
In order to find the output, it only remains to find the Laplace transform
of the input, substitute the initial conditions, and compute the inverse Z-transform of the result. Partial fraction expansions are often required for this last step. This may sound daunting while looking at
[link] , but it is often easy in practice, especially for low order difference equations.
[link] can also be used to determine the transfer function and frequency response.
As an example, consider the difference equation
with the initial conditions
and
Using the method described above, the Z transform of the solution
is given by
Performing a partial fraction decomposition, this also equals
Computing the inverse Laplace transform,
One can check that this satisfies that this satisfies both the differential equation and the initial conditions.