The general linear ODE is of the form:
Here, n is the order of the system ant f(t) is the forcing function. If the forcing function vanishes, f(t)=0, and the equation is said to be homogeneous. Any or all of the a's may be functions of t.
The ODE alone does not represent a "problem". A complete problem must also include the initial and boundary conditions needed for solution.
In dynamic models used for control, we often see y as the independent variable, with time (t) as the independent variable. The forcing function may be broken up into several different additive parts representing the contributions of the different kinds of input (manipulations, disturbances, etc.)
Equations of order one and two are the most common in process control calculations; they can often be solved analytically in a hand calculation. This document tries to provde a cursory review of how to solve such problems.
The linear first order ODE
The integrating factor p is found by taking the exponential of the integral of the coefficient of the zeroth order term of the ODE
This method works whether or not the differential equation is homogeneous, as long as the forcing function(s) Q(t) permits analytical solution.
The independent variable of interest is the composition in the reactor, CA. The forcing function is the composition of the reactor feed stream, CA0, which we will specify to be a step function. Set up initial conditions such that CA(0)=0 and the model can be integrated analytically to get an explicit solution for composition as a function of time.
Because we're thinking "process control", we'll define a time constant
Solving DEs of order greater than one relies on the fact that any linear combination of solutions of a DE is itself a solution. Consequently, the general solution to an ODE which is not homogeneous (a forced equation) can be obtained by adding the solution of the unforced homogeneous equation (the complementary solution) to a solution obtained considering the forcing function alone (the particular solution).
Consider the second order ODE given by
Every 2nd order ODE has a characteristic or auxiliary equation written as a polynomial
When the characteristic equation has complex roots (s=a+bi), it is often useful to write the solution using sines and cosines
If the forcing function of a nonhomogeneous equation forms the solution of a homogeneous linear DE, the "method of undetermined coefficients" can be used to get the particular solution. Basically, we assume a particular solution of the same form as the forcing function -- an unknown constant if the forcing function is a constant, a sum of sines and cosines if the forcing function is an oscillator, etc. The particular solution must be linearly independent of the complementary solution for this method to work.
For example
Another way to find xp is to repeatedly differentiate the forcing function and collect the resulting functions. Each of these is then multiplied by an undetermined coefficient and the sum (including the original forcing function) is used as the particular solution. For example, if f(t)=t2, differentiating once yields 2t and twice gives 2. This gives three terms, each of which is weighted by an unknown constant before being summed to get the particular solution
After obtaining the particular solution via either of these methods, you then have to plug the particular solution back into the ODE to evaluate the constants.
The solution routine for a linear ODE with constant coefficients is
(1) Write and solve the characteristic equation.
(2) Write the complementary solution by inspection
(3) Assume a particular solution of the same form as the forcing function. In this example, the forcing function is a constant, so assume the particular solution is also a constant
(4) Plug the particular solution into the original equation and evaluate c3.
(5) Combine the complementary and particular solutions to obtain the full solution to the original ODE
(6) Apply the initial conditions to evaluate the remaining constants. This will require differentiating the solution
The final solution is thus
References:
R.M. Price
Original: 10/12/93
Modified: 1/4/95; 5/13/2003, 8/27/2003
Copyright 2003 by R.M. Price -- All Rights Reserved