14.6 Solving systems of differential equations

To solve a system of differential equations we can combine the equations into a single differential equation using substitution. In this case we can use the method as outlined in Section 14.5. Alternatively, we can solve the system directly using matrices.

We follow the same pattern as in Section 14.4 for first-order systems. We solve the homogeneous equation, to find the complementary function and then find a particular solution. The sum of these two terms gives a general solution to the system.

Example 14.10

Find the displacement of the spring after time t described by the system of differential equations

ddt(x1x2)=(01k/mr/m)?(x1x2)?(01/m)?f(t)

si194_e

in the case where the mass on the spring is 1, the damping constant r = 5, the spring constant k = 4, the forcing function f(t) = t, and the initial extension of the spring is 0 with 0 initial velocity.

Solution Substituting the given values for m, r, k, and f, we have the system

ddt(x1x2)=(0145)?(x1x2)+(01)?f(t).

si195_e

Step 1

Solve the homogeneous system with f(t) = 0, giving

dxdt=Ax?where?A=(0145).

si196_e

Try solutions of the form x = v eλt, where v is a constant vector. Then dx/dt = λv eλt. Substitute for x and dx/dt dt into dx/dt = Ax, giving

λ?v?eλt=A?v?eλt

si197_e

as eλt≠ 0, we have

λ?v=A?vAv=λ?v

si198_e

which we recognize as the eigenvalue problem of Chapter 13. In this case, however, we shall allow the possibility of complex eigenvalues.

The solutions for λ are found by solving |A – λI| = 0 as

A=(0145)

si199_e

this gives

|λ415λ|=0λ(5+λ)+4=0λ2+5λ+4=0λ=5±25162λ=5±32λ=4??λ=1.

si200_e

Now, we find the eigenvector v to go with each eigenvalue by solving (AλI)v=0.si201_e

(λ145λ)?(ν1ν2)=(00).

si202_e

For λ = − 4

(4141)?(ν1ν2)=(00).

si203_e

Multiplying out, this gives

4?ν1+ν2=04?ν1ν2=0.

si204_e

These equations are dependent, solving either one of them we find

4?ν1=ν2ν2=4ν1.

si205_e

The vector is given by (v1, −4v1). As we are interested only in the direction of the vector we can set v1 = 1 giving the eigenvector as (1, −4).

For A = −1 we get

(414-1)?(ν1ν2)=(00).

si206_e

Multiplying out we get

ν1+ν2=04ν14ν2=0.

si207_e

These equations are dependent, solving either one we get

ν2=-ν1.

si208_e

The vector is given by (v1, – v1). As we are interested only in the direction of the vector we can set v1 = 1 giving the eigenvector as (1, −1).

Therefore, we have the complementary function for x as

x?=a(14)e4t+b(11)et

si209_e

where a and b are arbitary constant scalars.

Step 2

Find a particular solution to the equation dx/dt = Ax + bt. For this equation, the forcing function is bt so we try a particular solution of the form x = c1t + c 0 where c0 and c1 are constant vectors. We see that this is similar to the choice of trial solution suggested in Table 14.1 but the constant terms are now constant vectors.

x=c1t+c0????????dx/dt=c1.

si210_e

Substitute this trial solution into

dx/dt=Ax+bt

si211_e

giving

c1=A(c1t+c0)+bt.

si212_e

We can equate vector coefficients of t and the constant terms on both sides giving

0=Ac1+?bc1=Ac0.

si213_e

We solve these two matrix equations

0=Ac1+?b Ac1=b.

si214_e

Pre-multiply by A−1 (if it exists) giving

c1=A−1b

si215_e

As

A?=(0145)

si216_e

we have

A−1=14(5140)=(1.250.2510)

si217_e

and

b=(01)

si218_e

so

c1=(1250.2510)(01)=(0.250).

si219_e

To find c0 we can use

c1=Ac0

si220_e

we get

c0=A−1c1=(1.250.2510)(0.250)=(0.31250.25).

si221_e

Therefore, a particular solution x = c1t + c0 is given by

x?=(0.250)t+(0.31250.25)

si222_e

Step 3

The general solution is the sum of the complementary function and a particular solution. This gives

x?=a(14)e4t+b(11)et+(0.250)t+(0.31250.25).

si223_e

Step 4

We can apply the initial conditions. We are told that at t = 0 both the displacement and velocity is zero. These are the state variables x1 and x2. Therefore, we have

x?=(00) when?t?=?0

si224_e

and substituting into the solution we find

(00)=a(14)+b(11)+(0.31250.25)

si225_e

0=a+b0.31250=4ab+0.25.

si226_e

Solving these two equations gives

a0.02083b0.3333

si227_e

and therefore, the particular solution to this initial value problem is

x?0.02083(14)e−4t+0.3333(11)et+(0.250)t+(0.31250.25).

si228_e

Check:

dxdt=0.08332(14)e−4t0.3333(11)et+(0.250).

si229_e

Substitute into

dxdt=(0145)?x?+(01)t

si230_e

giving

0.08332(14)e−4t0.3333(11)et+(0.250)=(0145)(0.02083e−4t+0.3333et+0.25t0.31250.08332e−4t0.3333et+0.25)+(01)t.

si231_e

Multiplying out and simplifying, we get

(0.08332e−4t0.3333et+0.250.3333e4t+0.3333e?−t)=(0.08332e−4t+0.3333et+0.250.03333e−4t0.3333e?−t)

si232_e

which is true for all t.

14.7 Difference equations

Discrete systems are designed using digital adders, multipliers, and shift registers and are represented mathematically by difference equations. Difference equations are used in the design of digital filters and also to approximately model continuous systems.

The system has an input which is a sequence of values f0, f1, f2,… and the output is a sequence y0, y1, y2,… If yn depends solely on the values of the input, then

yn=b0fn+b1fn1+b2fn2+.

si233_e

This is a non-recursive system as we do not need previous knowledge of y to determine yn. It is called a finite impulse response (FIR) system (the meaning of ‘impulse response’ will be explained in Chapter 15). If, however, the output y depends on the previous state of the system as well as the input then we have a recursive system, modelled by a difference equation (also called a recurrence relation). This is called a infinite impulse response (IIR) system.

We shall look at linear time-invariant discrete systems. We shall consider the solution of a second order difference equation

ayn+byn1+cyn2=fn.

si234_e

The method of solution, as for differential equations, is to solve the homogeneous system and find a particular solution. The sum of these gives the general solution to the difference equation. We employ the initial conditions to find the value of the arbitrary constants.

Example 14.11

Solve the difference equation (n ≥ 2):

6yn-5yn1+yn2=1, y0=4.5??and??y1=2.

si235_e

Solution

Step 1

Solve the homogeneous difference equation

6yn-5yn1+yn2=0.

si236_e

We know from Chapters 8 and 12 that the yn + 1 = ryn defines a geometric series yn = arn−1 where a is the first term of the sequence and r is the common ratio. If we start at the zeroth term, then we have yn = a0rn. We therefore try a solution of this form to the homogeneous equation and substitute yn = aλ n into 6yn – 5yn−1 + yn−2 = 0. This gives

6aλn5aλn1+aλn2=0.

si237_e

Assuming that a and λn−2 are non-zero, we can divide by aλn−2 to give

6λ25λ+1=0.

si238_e

This is called the auxiliary equation and solving this we find

λ=5±252412  λ=13λ=12.

si239_e

Hence, the general solution of the homogeneous equation is

yn=a(13)n+b(12)n.

si240_e

As in the case of differential equations, there are three possible types of solution, depending on whether the roots for λ are real and distinct,

complex, or equal, where

λ1,λ2=b±b24ac2a

si241_e

Case (1): λ1 and λ2 are real and distinct

yn=a(λ1)n+b(λ2)n.

si242_e

Case (2): λ1 and λ2 are complex. Then we write in exponential form λ1 = r ejθ so λ2 = r e –jθ and the solution can be expressed as

y?=rn(acos(nθ)+bsin(nθ)).

si243_e

Case (3): λl and λ2 are equal real roots and the solution is yn = (a+bn)λn.

Step 2

Find a particular solution. We use a trial solution which depends on the form of the input sequence fn as suggested by Table 14.2.

Table 14.2

A table of trial solutions to be used to find a particular solution of a difference equation. The form of the trial solution is suggested by the form of the input sequence fn. The coefficients co, C1… and c and d are to be determined

Input functionTrial solution
Power series fn= nk (k an integer)y = C0 + C1n + C2n2+ … + cknk
An exponential function fn= any = can
Sine or cosine function fn = cos(ωn) or sin(ωn)y = c cos(ωn) + d sin(ωn)

In this case the input is a constant so we try a constant output. The trial solution is yn = c. Substituting this into

6yn5yn1+yn2=1

si244_e

gives the equation for c as

6c5c+c=1??????????2c1c=1/2

si245_e

A particular solution for y is yn = 1/2.

Step 3

The general solution is the sum of the solution of the homogeneous equation and a particular solution giving

yn=a(13)n+b(12)n+12.

si246_e

Step 4

Solve for the initial conditions y0 = 4.5 and y1 = 2. Substituting n = 0 and y0 = 4.5 in the solution

yn=a(13)n+b(12)n+12

si247_e

gives

4.5=a+b+12  a+b=4.

si248_e

Substituting n = 1 and y1 = 4.5 gives

2=13a+12b+12  2a+3b=9.

si249_e

Solving for the constants a and b gives

a+b=42a+2b=8b=1.2a+3b=92a+3b=9

si250_e

Substituting b = 1 into a + b = 4:

a+1=4  a=3

si251_e

a = 3 and b = 1, so the solution is

yn=3(13)n+(12)n+12.

si252_e

System stability

We can see that the solution, as in the continuous case, is made up of a transient, in this case, 3(1/3)n + (1/2)n, and a steady state response, which in this case is 1/2. The transient tends to zero as n → ∞. This will be so for any system as long as the roots to the auxiliary equation are such that the modulus of λ is less than 1. If the roots have modulus of exactly 1, then the solution of the homogeneous equation does not die away as n → 0 but neither does it tend to infinity. Therefore, we can identify a stable system as one with roots of the auxiliary equation such that |λ| ≤ 1.

14.8 Summary

1. Dynamic physical processes involve variables which are interdependent and constantly changing. When modelling the system we will obtain relationships between variables, many of which will be related through derivatives. We can combine these to make a single differential equation relating the system input to the system output or we can choose state variables and express the relationship through a system of differential equations.

2. Linear time invariant (LTI) systems are represented by linear differential equations with constant coefficients. A second-order equation is of the form

a?d2y/dt2+b?dy/dt+cy=f(t)

si253_e


where f(t) represents the system input and y the system output.

3. If a function, y = g(t), is a solution to a differential equation in y then if, in the differential equation, we replace y and by g(t) and all the derivatives of y by the corresponding derivatives of g(t) then the result should be an identity for t. That is, it should be true for all values of t.

4. To solve linear differential equations with constant coefficients, we solve the homogeneous equation (with f(t) = 0), thus finding the complementary function. This leads to the auxiliary equation which, for a second-order system is
aλ2 + bλ+ c = 0.
This gives three possibilities for the complementary function, depending on the roots for λ.

λ1,λ2=-b±b2-4ac2a

si254_e



Case (1): Real distinct roots: y = A eλ1t + B eλ2t
Case (2): Complex roots: y = ekt (A cos(ω0t) + B sin(ω0t))
Case (3): The roots are equal, then λ = k = −b/2a, y = (At + B)ekt.
We then find a particular solution to the equation by using a trial solution as suggested in Table 14.1. The sum of the complementary function and a particular solution gives the general solution of the differential equation. The initial conditions are used to find the arbitrary constants A and B.

5. For a truly linear system, the complementary function dies out as t →∞ and is called the transient solution, The other part of the solution, in response to the input f(t), is called the steady state solution. When analysing a system as locally linear, we say that the system is unstable if the roots of the complementary function have a positive real part. In these circumstances, the complementary function ∞ as t → ∞. Higher order systems are also unstable if there is a repeated purely imaginary root.

6. Resonance occurs when, in an underdamped system, the forcing frequency approaches the natural frequency of the system.

7. Systems of differential equations may be solved using a matrix method.

8. Discrete systems may be represented by difference equations (also called recurrence relations). A second-order linear system is represented by ayn + byn-1 + cyn−2 = fn. To solve this equation we find the solution to the homogeneous system (setting fn = 0), which leads to the auxiliary equation
aλ2 + bλ+ c = 0.
This leads to three possibilities for the complementary function depending on the roots for λ:

λ1,λ2=b±b24ac2a

si255_e


Case (1): λ l and λ 2 are real and distinct.

yn=a(λ1)n+b(λ2)n.

si256_e

Case (2): λ1 and λ2 are complex. Then we write in exponential form λ1 = r ejθ so λ2 = r e−jθand the solution can be expressed as

y=rn(a?cos(nθ)+b?sin(nθ)).

si257_e

Case (3): λ1 and λ2 are equal real roots and the solution is yn = (a + bnn, The system is stable if |λ| ≤ 1.

We then find a particular solution by attempting a trial solution, as suggested in Table 14.2. The general solution of the difference equation is given by the sum of the complementary function and a particular solution.

14.9 Exercises

14.1. For the following differential equations:

(a) State whether the equation is linear

(b) Give the order of the equation

(c) Show that the given function represents a solution to the differential equation

(i) t4dydy=y, y=ct4si258_e

(ii) ?d2ydt2(t12)dydt=0,??y=t2tsi259_e

(iii) td2ydt2+tdydt+y=4,??y=3tet+4si260_e

(iv) ydydt+t,y2=t2+c,0si261_e

(v) 3y2d2ydt2+6y(dydt)2=2,?y3=t2si262_e

14.2. A linear differential equation

dydt+4y=f(t)

si263_e


is found to have a particular solution y = 2t2t + 1 when f (t) = 8t2 + 3 and a particular solution

y=0.8?cos(3t)+0.6?sin(3t,?)when?f(t)=5?cos?(3t).

si264_e

(a) Suggest a particular solution when f(t) = 10 cos(3t) + 4t2 + (3/2) and show by substitution that your solution is correct.

(b) Suggest a particular solution when f (t) = 5 cos(3(t −10)) and show by substitution that your solution is correct.

14.3. Show that the differential equation

cos(t)?dy/dysin(t)y=f(t)

si265_e


has a solution y = t2/ cos(t), when f(t) = 2t and a solution y = tan(t) when f(t) = cos(t)

(a) Use the linearity property to find a solution when f (t) = 2(t – cos(t)).

(b) By considering a time-shifted input of one of the functions for f (t) given, show that

cos?(t)dy/dtsin(t)y=f(t)

si266_e


cannot represent a time-invariant system.

14.4. Solve the following differential equations with the given initial conditions

(a) dydt3y=0,?y(0)=1si267_e

(b) 4dydty=4,y(0)=2si268_e

(c) dydt+5y=sin(12t),?y(0)=0si269_e

(d) 3dydt+2y=et,??y(0)=3si270_e

(e) dydt6t=0,??y(1)=6si271_e

(f) 12dydt+6y3?sin(5t)=2?cos(5t),??y(0)=0.si272_e

14.5. A spring of length l has a mass m attached to it and a dashpot damping the motion. It is subject to a force f (t) forcing the motion, as in Figure 14.2. The extension x of the spring obeys the differential equation

m?d2x/dt2+r?dx/dt+kx=f(t).

si273_e


Solve for x given the following information

(a) m=2,??r=7,k=5,???f(t)=t2,???x(0)=0,?dx(0)dt=0.16si274_e

(b) m=1,??r=4,?k=4,?f(t)???f(t)=4?cos(6t)=0,??x(0)=0,?dx(0)dt=0si275_e

(c) m=1,??r=4,?k=5,???f(t),et,??x(0)=0,?dx(0)dt=0.si276_e

14.6. An LRC circuit, as in Figure 14.3 obeys the equation

Ld2q/dt2+Rdq/dt+q/C=υ(t)

si277_e


where q is the charge on the capacitor, v(t) the applied voltage, L the inductance, R the resistance, and C the capacitance. Find a steady state solution for q and hence calculate the voltages across the capacitor, resistor, and inductor, given by vc = q/C, vR = R dq/ dt and vL = L d2q/ dt2 in each of the following cases:

(a) R??=??120?Ω,L???=???0.06H,C???=???0.0001?F,υ(t)=130?cos(1000t)si278_e

(b) R=1?kΩ,L=0.001?H,C=1?μF,?υ(t)=t.si279_e

14.7. An RC circuit is subjected to a single frequency input of angular frequency ω and magnitude vi.

(a) Find the steady state solution of the equation R dq/dt = (q/C) = viet and hence find the magnitude of

(i) The voltage across the capacitor vc = q/C

(ii) The voltage across the resistor vR = R dq/dt

(b) Using the impedance method of Chapter 10 confirm your results to part (a) by calculating

(i) The voltage across the capacitor vc

(ii) The voltage across the resistor vR in response to a single frequency of angular frequency ω and magnitude vi

(c) For the case where R = 1 kΩ, C = 1 μF find the ratio |vc|/|vi| and fill in the table below:

ω10102103104105106
|νc|/|νi|

cetable3


Explain why the table results show that an RC circuit acts as a high-cut filter and find the value of the high-cut frequency, defined as fhc=ωhc/2π?such?that?|υc|/|υi|=12.si280_e

14.8. A spring of length, l has a mass m attached to it and a dashpot damping the motion. It is subject to a force f (t) forcing the motion as in Figure 14.2. The extension x1 of the spring obeys the system of differential equations

ddt(x1x2)?=?(01k/mr/m)?(x1x2)+?(01/m)?f(t)

si281_e


By solving this system of equations, find the extension of the spring after time t in the following cases

(a) m = 1, r = 12, k = 11, f (t) = e−2t, with initial extension 0 and 0 initial velocity.

(b) m = 2, r = 13, k = 20, f (t) = 10t,x1(0) = 0 = x2(0).

14.9. Solve the following difference equations

(a) 2ynyn1?=?3,?y0?=?1si282_e

(b) 4yn+yn1=n,???????y0?=?2si283_e

(c) yn1.2yn1+0.36yn2?=?4,?y0?=?3,?y1?=?2si284_e

(d) yn+0.6yn1?=?0.16yn2+(0.5)n,????y0?=?1,?y1=?2si285_e

(e) 2yn+yn1?=?cos(πn2),???????y0?=?1.si286_e

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.234.46