Site Feedback

# Differential Equations

It is often useful to describe systems using equations involving the rate of change in some quantity through differential equations. Recall that one important subclass of differential equations, linear constant coefficient ordinary differential equations, takes the form

$A y ( t ) = x ( t ) A y ( t ) = x ( t )$
1

where $AA$ is a differential operator of the form

$A = a n d n d t n + a n - 1 d n - 1 d t n - 1 + . . . + a 1 d d t + a 0 . A = a n d n d t n + a n - 1 d n - 1 d t n - 1 + . . . + a 1 d d t + a 0 .$
2

The differential equation in Equation 1 would describe some system modeled by $AA$ with an input forcing function $x(t)x(t)$ that produces an output solution signal $y(t)y(t)$. However, the unilateral Laplace transform permits a solution for initial value problems to be found in what is usually a much simpler method. Specifically, it greatly simplifies the procedure for nonhomogeneous differential equations.

# General Formulas for the Differential Equation

As stated briefly in the definition above, a differential equation is a very useful tool in describing and calculating the change in an output of a system described by the formula for a given input. The key property of the differential equation is its ability to help easily find the transform, $H⁢s H s$, of a system. In the following two subsections, we will look at the general form of the differential equation and the general conversion to a Laplace-transform directly from the differential equation.

# Conversion to Laplace-Transform

Using the definition, Link, we can easily generalize the transfer function, $H⁢s H s$, for any differential equation. Below are the steps taken to convert any differential equation into its transfer function, i.e. Laplace-transform. The first step involves taking the Fourier Transform of all the terms in Link. Then we use the linearity property to pull the transform inside the summation and the time-shifting property of the Laplace-transform to change the time-shifting terms to exponentials. Once this is done, we arrive at the following equation: $a 0 =1 a 0 1$.

$Y⁢s=−∑ k =1N a k ⁢Y⁢s⁢s−k+∑ k =0M b k ⁢X⁢s⁢s−k Y s k 1 N a k Y s s k k 0 M b k X s s k$
3
$H⁢s=Y⁢sX⁢s=∑ k =0M b k ⁢s−k1+∑ k =1N a k ⁢s−k H s Y s X s k 0 M b k s k 1 k 1 N a k s k$
4

# Conversion to Frequency Response

Once the Laplace-transform has been calculated from the differential equation, we can go one step further to define the frequency response of the system, or filter, that is being represented by the differential equation.

Note:
Remember that the reason we are dealing with these formulas is to be able to aid us in filter design. A LCCDE is one of the easiest ways to represent FIR filters. By being able to find the frequency response, we will be able to look at the basic properties of any filter represented by a simple LCCDE.
Below is the general formula for the frequency response of a Laplace-transform. The conversion is simply a matter of taking the Laplace-transform formula, $H⁢s H s$, and replacing every instance of $ss$ with $ei⁢w w$.
$H⁢w=H⁢s| s , s = ei⁢w =∑ k =0M b k ⁢e−(i⁢w⁢k)∑ k =0N a k ⁢e−(i⁢w⁢k) H w s w Hs k 0 M b k w k k 0 N a k w k$
5
Once you understand the derivation of this formula, look at the module concerning Filter Design from the Laplace-Transform for a look into how all of these ideas of the Laplace-transform, Differential Equation, and Pole/Zero Plots play a role in filter design.

# Solving a LCCDE

In order for a linear constant-coefficient difference equation to be useful in analyzing a LTI system, we must be able to find the systems output based upon a known input, $x⁢t x t$, and a set of initial conditions. Two common methods exist for solving a LCCDE: the direct method and the indirect method, the latter being based on the Laplace-transform. Below we will briefly discuss the 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 following equation:

$y⁢t= y h ⁢t+ y p ⁢t y t y h t y p t$
6
The first part, $y h ⁢t y h t$, is referred to as the homogeneous solution and the second part, $y h ⁢t y h t$, is referred to as particular solution. The following method is very similar to that used to solve many differential equations, so if you have taken a differential calculus course or used differential equations before then this should seem very familiar.

# Homogeneous Solution

We begin by assuming that the input is zero, $x⁢t=0 x t 0$. Now we simply need to solve the homogeneous differential equation:

$∑ k =0N a k ⁢y⁢t−k=0 k 0 N a k y t k 0$
7
In order to solve this, we will make the assumption that the solution is in the form of an exponential. We will use lambda, $λλ$, to represent our exponential terms. We now have to solve the following equation:
$∑ k =0N a k ⁢λt−k=0 k 0 N a k λ t k 0$
8
We can expand this equation out and factor out all of the lambda 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 homogeneous equation. If there are all distinct roots, then the general solution to the equation will be as follows:
$y h ⁢t= C 1 ⁢ λ 1 t+ C 2 ⁢ λ 2 t+…+ C N ⁢ λ N t y h t C 1 λ 1 t C 2 λ 2 t … C N λ N t$
9
However, if the characteristic equation contains multiple roots then the above general solution will be slightly different. Below we have the modified version for an equation where $λ 1 λ 1$ has $KK$ multiple roots:
$y h ⁢t= C 1 ⁢ λ 1 t+ C 1 ⁢t⁢ λ 1 t+ C 1 ⁢t2⁢ λ 1 t+…+ C 1 ⁢tK−1⁢ λ 1 t+ C 2 ⁢ λ 2 t+…+ C N ⁢ λ N t y h t C 1 λ 1 t C 1 t λ 1 t C 1 t 2 λ 1 t … C 1 t K 1 λ 1 t C 2 λ 2 t … C N λ N t$
10

# Particular Solution

The particular solution, $y p ⁢t y p t$, will be any solution that will solve the general differential equation:

$∑ k =0N a k ⁢ y p ⁢t−k=∑ k =0M b k ⁢x⁢t−k k 0 N a k y p t k k 0 M b k x t k$
11
In order to solve, our guess for the solution to $y p ⁢t y p t$ will take on the form of the input, $x⁢t x t$. After guessing at a solution to the above equation involving the particular solution, one only needs to plug the solution into the differential equation and solve it out.

# Indirect Method

The indirect method utilizes the relationship between the differential equation and the Laplace-transform, discussed earlier, to find a solution. The basic idea is to convert the differential equation into a Laplace-transform, as described above, to get the resulting output, $Y⁢s Y s$. Then by inverse transforming this and using partial-fraction expansion, we can arrive at the solution.

$L d d t y ( t ) = s Y ( s ) - y ( 0 ) L d d t y ( t ) = s Y ( s ) - y ( 0 )$
12

This can be interatively extended to an arbitrary order derivative as in Equation Equation 13.

$L d n d t n y ( t ) = s n Y ( s ) - ∑ m = 0 n - 1 s n - m - 1 y ( m ) ( 0 ) L d n d t n y ( t ) = s n Y ( s ) - ∑ m = 0 n - 1 s n - m - 1 y ( m ) ( 0 )$
13

Now, the Laplace transform of each side of the differential equation can be taken

$L ∑ k = 0 n a k d k d t k y ( t ) = L x ( t ) L ∑ k = 0 n a k d k d t k y ( t ) = L x ( t )$
14

which by linearity results in

$∑ k = 0 n a k L d k d t k y ( t ) = L x ( t ) ∑ k = 0 n a k L d k d t k y ( t ) = L x ( t )$
15

and by differentiation properties in

$∑ k = 0 n a k s k L y ( t ) - ∑ m = 0 k - 1 s k - m - 1 y ( m ) ( 0 ) = L x ( t ) . ∑ k = 0 n a k s k L y ( t ) - ∑ m = 0 k - 1 s k - m - 1 y ( m ) ( 0 ) = L x ( t ) .$
16

Rearranging terms to isolate the Laplace transform of the output,

$L y ( t ) = L x ( t ) + ∑ k = 0 n ∑ m = 0 k - 1 a k s k - m - 1 y ( m ) ( 0 ) ∑ k = 0 n a k s k . L y ( t ) = L x ( t ) + ∑ k = 0 n ∑ m = 0 k - 1 a k s k - m - 1 y ( m ) ( 0 ) ∑ k = 0 n a k s k .$
17

Thus, it is found that

$Y ( s ) = X ( s ) + ∑ k = 0 n ∑ m = 0 k - 1 a k s k - m - 1 y ( m ) ( 0 ) ∑ k = 0 n a k s k . Y ( s ) = X ( s ) + ∑ k = 0 n ∑ m = 0 k - 1 a k s k - m - 1 y ( m ) ( 0 ) ∑ k = 0 n a k s k .$
18

In order to find the output, it only remains to find the Laplace transform $X(s)X(s)$ of the input, substitute the initial conditions, and compute the inverse Laplace transform of the result. Partial fraction expansions are often required for this last step. This may sound daunting while looking at Equation Equation 18, but it is often easy in practice, especially for low order differential equations. Equation Equation 18 can also be used to determine the transfer function and frequency response.

As an example, consider the differential equation

$d 2 d t 2 y ( t ) + 4 d d t y ( t ) + 3 y ( t ) = cos ( t ) d 2 d t 2 y ( t ) + 4 d d t y ( t ) + 3 y ( t ) = cos ( t )$
19

with the initial conditions $y'(0)=1y'(0)=1$ and $y(0)=0y(0)=0$ Using the method described above, the Laplace transform of the solution $y(t)y(t)$ is given by

$Y ( s ) = s ( s 2 + 1 ) ( s + 1 ) ( s + 3 ) + 1 ( s + 1 ) ( s + 3 ) . Y ( s ) = s ( s 2 + 1 ) ( s + 1 ) ( s + 3 ) + 1 ( s + 1 ) ( s + 3 ) .$
20

Performing a partial fraction decomposition, this also equals

$Y ( s ) = . 25 1 s + 1 - . 35 1 s + 3 + . 1 s s 2 + 1 + . 2 1 s 2 + 1 . Y ( s ) = . 25 1 s + 1 - . 35 1 s + 3 + . 1 s s 2 + 1 + . 2 1 s 2 + 1 .$
21

Computing the inverse Laplace transform,

$y ( t ) = ( . 25 e - t - . 35 e - 3 t + . 1 cos ( t ) + . 2 sin ( t ) ) u ( t ) . y ( t ) = ( . 25 e - t - . 35 e - 3 t + . 1 cos ( t ) + . 2 sin ( t ) ) u ( t ) .$
22

One can check that this satisfies that this satisfies both the differential equation and the initial conditions.

# Summary

One of the most important concepts of DSP is to be able to properly represent the input/output relationship to a given LTI system. A linear constant-coefficient difference equation (LCCDE) serves as a way to express just this relationship in a discrete-time system. Writing the sequence of inputs and outputs, which represent the characteristics of the LTI system, as a difference equation helps in understanding and manipulating a system.