14

Differential equations and difference equations

14.1 Introduction

In order to model most physical situations we need to simplify their description. The idea of a system is central to this simplification. We identify the important elements that interact within the system. The only external interactions characterized as system inputs and the outputs are the quantities related to the system behaviour which we are interested in measuring. For instance, in examining the suspension system of a car we consider the system input to be forces exerted on the wheels of the car. The important elements in the system are the mass of the car and the springs and dampers used to connect the body of the car to the suspension links. We are interested in measuring the amount of vertical movement of the car and the velocity of that movement in response, mainly, to a bumpy road. We can examine the behaviour of the system for various external forces – building up a picture of how the system behaves in normal driving conditions. We do not need to concern ourselves with an exact model of the surface of the major motorways. In this way we have managed to separate the problem of modelling the system from modelling the environment in which it is operating. A system with a single input and output is pictured in Figure 14.1.

f14-01-9780750658553
Figure 14.1 A system has an input f(t) which produces an output response y(t).

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. Even in a simple system with a mass, spring, and damper, there are many variables which can be identified, for example the extension of the spring, and its velocity and acceleration, the potential energy stored in the spring and the force exerted by it, and the force exerted by the damper. A choice of variables that completely describe the system is an important task in systems analysis. These variables are then called the state variables. These can be related to each other and the system inputs through a system of first-order differential equations which are found by using scientific laws and engineering principles to model the system. The system output, which is some quantity that we wish to compare with the response of a real system, can then be calculated from the values of the state variables.

A differential equation is one that involves some derivatives of the dependent variable, for example, dy/dt = ky is a differential equation. We have already looked at a number of examples of differential equations. The simplest case, when the solution can be found by integration, was looked at in Chapter 7 and then we found that exponential functions are solutions to differential equations of the form dy/dt = ky in Chapter 8 and in Chapter 10 we looked at the problem of circular motion and found that exponential functions are also solutions to equations of the form d2y/dt2 = −ω2y. In simple equations, we look for a solution which is a number. When solving a differential equation our idea of a solution is to find an explicit function for y in terms of t.

We will only be concerned with single input, single output (SISO) systems in which case there are two ways of proceeding in order to solve the system of differential equations. The system may be reduced to a single differential equation and then solved, or the system may be solved directly. These two methods correspond, in systems theory, to the transfer function description of the system or a state variable description.

The types of differential equations we shall look at are all linear; that is, they involve no powers of y, the independent variable or powers of the derivative or products of any of these. Any real system will, of course have some non-linear behaviour. However, we usually assume that either the non-linearities present are not very important or that it is possible to analyse a system as locally linear. Another important assumption used is that time invariance, that is, operating the system now or in an hours time with exactly the same input and initial conditions will yield the same result.

The method of solution we use for finding a particular solution of differential equations in this chapter is called the method of unknown coefficients. An alternative method, using Laplace transforms, is more widely applied, and we shall look at them in the next chapter.

Differential equations are used to analyse systems that are subject to continuous or piecewise continuous inputs. It may be necessary, or preferable, to develop a discrete model of the system. A discrete model may be used if the exact nature of the system is unknown and we attempt to predict its nature by recording its response to various inputs. The recording of the system inputs and response will generally be stored in digital form and the data processed in digital form. Another major application of digital systems is for digital filter design. Here we wish to design digital filters with certain desirable characteristics. We can find the characteristics of digital systems by solving difference equations. We give a method of solution of simple difference equations. More frequently, z-transforms are used and these are discussed in the next chapter.

14.2 Modelling simple systems

Damped forced motion of a spring

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 (see Figure 14.2).

f14-02-9780750658553
Figure 14.2 Damped forced motion of a spring.

The input to this system is the forcing function f(t) and the output is the displacement of the spring from its original length, x. In order to model this system we make a number of assumptions about its behaviour.

1. We assume Newton's second law, FT = ma where a = m d2x/dt2 and FT is the total force operating on the mass: m is the mass on the spring.

2. The spring does not become distorted, that is, it is perfectly elastic. This means, from Hooke's Law, that FS = −kx where x is the displacement from the original spring length l and k is the spring constant.

3. The damping force due to the dashpot is FD = −r dx/dt

To relate these quantities together we use the fact that the total force on the mass is made up of the spring force, the damping force, and the external force FT = FD + FS + f(t).

If we wish to combine these equations to express them using a single differential equation we simply substitute for FT in terms of x and the derivatives of x, giving

md2xdt2=rdxdtkx+f(t)??????md2xdt2+rdxdt+kx=f(t)

si1_e

Should we wish to solve the system as a system of first order differential equations then we choose some state variables, usually the displacement and the velocity. Called these x1 and x2, and as x1 is the displacement x1 = x and as x2 is the velocity this is the derivative of the displacement giving x2 = dx1/dt.

As the acceleration is the derivative of the velocity, we can write the acceleration as the derivative of x2

a=d2x1dt2=ddtdx1dt=dx2dt.

si2_e

Now FT = ma can be written in terms of x2 as FT = m dx2/dt and the force due to the dashpot becomes FD = −rx2. So FT = FD + FS + f(t) gives

mdx2dt=rx2kx1+f(t)?????dx2dt=kmx1rmx2+1mf(t).

si3_e

So the system of equations that represent the system is

dx1dt=x2dx2dt=kmx1rmx2+1mf(t).

si4_e

The first equation expresses the fact that x2 is the velocity and the second equation was obtained by considering the total force on the mass and using Newton's second law.

This system of equations may be expressed in matrix form as

ddt(x1x2)=(?0k/m???1r/m)(?x1x2)+(?01/m)?f(t).

si5_e

Writing

x=(?x1x2)A?=(?0k/m???1r/m)

si6_e

and

B?=(?01/m)

si7_e

we can give the system of equations as a matrix differential equation

dxdt=Ax+Bf.

si8_e

The system input is f and the output y = x1.

To write the derivative of a variable when it is clear that it is in respect to its independent variable we may write x’ (read as ‘x dashed’) or x″ (read as ‘x double dashed’). In addition, when the independent variable is time we often write ˙xsi9_e (read as ‘x dot’) and for the second derivative x (read as ‘x double dot’). Using this notation we have

˙x=Ax+Bf

si10_e

as the matrix differential equation.

Modelling electrical circuits

We can model an LRC circuit as shown in Figure 14.3 using the following assumptions:

f14-03-9780750658553
Figure 14.3 An LRC circuit.

1. Kirchoff's voltage law (KVL): the sum of all the voltage drops around any closed loop is zero.

2. The voltage drop vR across a resistor is proportional to the current i i.e.

νR=Ri???(Ohms?law)

si11_e


where the constant of proportionality R is called the resistance of the resistor.

3. The voltage drop across a capacitor is proportional to the electric charge q on the capacitor

νc=1Cq

si12_e


where C is the capacitance and is measured in farads, the charge q is measured in coulombs.

4. The voltage drop across an inductor is proportional to the rate of change of the current i

νL=Ldidt

si13_e

where L is the inductance, measured in henries.

Then, from KVL:

Ldidt+Ri+qC=v(t)

si14_e

Since

i(t)=dqdt

si15_e

we have

didt=ddt(dqdt)=d2qdt2

si16_e

So we can write this differential equation in terms of q:

Ld2qdt2+Rdqdt+qC=v(t).

si17_e

Here, the system input is v and the output is the charge on the capacitor q.

To obtain a differential equation in terms of i we can differentiate the whole of this equation and use i = dq/dt, giving

Ld2idt2+Rdidt+iC=dvdt.

si18_e

Here the input is dv/dt and the output is i. Notice that L, R, and 1/C are constants.

Should we wish to solve the system as a system of first order differential equations then we choose some state variables. The general procedure is to choose capacitor voltages and inductor currents. Hence, we choose

x1 = i

and

x2 = υc = q/C.

We can obtain one equation relating x1 and x2 by using

dqdt=i??1Cdqdt=iC??dx2dt=x1C.

si19_e

Now we use KVL to give the other equation

Ldidt+Ri+qC=v(t)

si20_e

substituting i = x1 and x2 = q/C gives

dx1dt=RLx11Lx2+1Lv(t).

si21_e

So the system of equations that give the state variables are

dx1dt=RLx11Lx2+1Lv(t)dx2dt=1Cx1.

si22_e

The first equation expresses Kirchoff's voltage law the second equation expresses the relationship between the current and the voltage across the capacitor.

This system of equations may be expressed in matrix form as

ddt(?x1x2)=(R/L1/L1/C0)?(x1x2)+(1/L0)v.

si23_e

Writing

x=(x1x2)A=(R/L1/L1/C0)

si24_e

and

B?=(1/L0)

si25_e

This can be written as a matrix differential equation

dxdt=?Ax?+?Bv.

si26_e

A rotational mechanical system

A rotor of moment of inertia J is supported by a shaft of torsional stiffness k and the motion is damped by a rotational damper of torque c per unit angular velocity (see Figure 14.4). T is the external torque applied to the rotor.

f14-04-9780750658553
Figure 14.4 A damped rotational system.

The torque due to the rotational spring is proportional to the angle through which it has been twisted, giving TS = −kθ. The damper provides a torque of −cω and the total rotational torque of the system is given by J dω/dt where ω is the angular velocity and J is the moment of inertial of the rotating body.

Jdωdt=cωkθ+TJdωdt+cω+kθ=T.

si27_e

Using ω = dθ/dt, we can write this equation in terms of the angle of rotation as

Jd2θdt2+cdθdt+kθ=T

si28_e

Alternatively, we can choose state variables as xl = θ and x2 = ω = dx1/dt. This gives the system of equations

ddt(?x1x2)?=?(01k/Jc/J)?(x1x2)?+?(01/J)?T.

si29_e

Initial conditions and boundary values

To solve these equations we also need knowledge of the state of the system at some moment or moments in time. This is usually given in terms of the initial displacement and the initial velocity, that is, x and dx/dt at t = 0. This is then called an initial value problem. If two values of the displacement are given at different times or if the velocity and the displacement are given at different times, then the problem is called a boundary value problem. Boundary value problems are more difficult to specify correctly to ensure that they determine a solution.

14.3 Ordinary differential equations

An ordinary differential equation is an equation which involves derivatives of y (the dependent variable) as well as functions of y and t.

dydt=cos(t)d2ydt2+9t=0t2d3y?dydt3dt+et=t

si30_e

are all ordinary differential equations.

The other sort of differential equations, which are introduced in Chapter 17, are partial differential equations which are used to describe a dependency on two independent variables and involve partial derivatives like ∂y/∂t (read as ‘partial dy by dt′).

The order of differential equations

The order of the differential equation is the order of the highest derivative of y (the dependent variable) in the equation.

Rdqdt+qC=3is?first?order?in?q.dθdt=sin(θ)is?first?order?in?θ.x+4t2=0is?second?order?in?x.d3udt3dudt+u=4t4is?third?order?in?u.

si31_e

The solution of a differential equation

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 resulting predicate should be an identity for t. That is, it should be true for all values of t where it is defined.

Example 14.1

Show that x = t3 is a solution to the differential equation dx/dt = 3t2.

Solution Replace x by t3 in the differential equation gives

ddt(t3)=3t2

si32_e

????3t2=3t2

si33_e

As this is true for all values of t, we have shown that x = t3 is a solution to dx /dt = 3t2.

Example 14.2

Show that y = t2 – 3t + 3.5 is a solution to

y+3y+2y=2t2.

si34_e

Solution Set y = t2 – 3t + 3.5, then differentiating gives

y=2t3

si35_e

and differentiating again

y=2

si36_e

We substitute these expressions for y and the derivatives of y into

y+3y+2y=2t2

si37_e

so we get

2+3(2t3)+2(t23t+3.5)=2t2??2+6t9+2t26t+7=2t2??2t2=2t2

si38_e

which is true for all values of t showing that y = t2 – 3t + 3.5 is a solution to y″ + 3y′ + 2y = 2t2.

A differential equation has many solutions. For instance, the equation dx/dt = 3t2 has solutions x = t3, x = t3+ 4, x = t3 – 5, etc. These are called particular solutions. A general solution is one which contains some arbitrary constants and encompasses all possible solutions to the differential equation. This means that by choosing values of these arbitrary constants we are able to find any of the particular solutions of the equation. For instance, x = t3 + C is a general solution to dx/dt = 3t2.

Linear differential equations

A linear differential equation can be recognized by its form. It is linear if the coefficients of y (the dependent variable) and all order derivatives of y, are functions of t, or constant terms, only.

dy/dt=4td2y/dt2=6tt?dy/dt=6ay+by+cy=f(t)3d2y/dt2+t2dy/dt+6y=t5

si39_e

are all linear.

(dy/dt)2+3=12t+y?dy/dtt2θ+k?sin(θ)=0u(1u2)u+u=0

si40_e

are all non-linear.

Linearity and superposition of solutions

The property of linearity is very important. We have applied the term linear to equations whose graphs are straight lines. However, in an algebraic sense the term does not mean that everything represents a straight line! The property of linearity is defined for an operator, which we shall call O. A linear operator is one that, when operating on the sum of two terms gives the same result as operating on the terms and then taking the sum. This can be expressed as

O(f1+f2)=O(f1)+O(f2).

si41_e

The other condition is that

O(af)=aO(f)

si42_e

The two conditions can be combined to say that a linear operation on a linear combination of inputs produces a linear combination of the outputs. A linear combination of f1 and f2 is af1 + bf2, where a and b are constants and therefore if an operator, O, is linear then

O(af1+bf2)=aO(f1)+bO(f2)

si43_e

Examples of linear operators are:

Matrices

A(x1 + x2) = Ax1 + Ax2 and A(ax) = a(Ax) where a is a number and A is a matrix and x1, X2, and x are vectors

The differential operator

ddt(3t+t2)=3ddt(t)+ddt(t2).

si44_e

The integral operator

(3t+t2)dt=3t??dt+t2??dt

si45_e

An example of a non-linear operator is the sine function as

sin(A+B)sin(A)+sin(B)

si46_e

For a differential equation the fact that it is linear leads to the fact that if a solution to the differential equation with input function f1(t) is y1 and a solution to the differential equation with input f2(t) is y2, then one solution to the equation with an input function af1 + bf2 is ay1 + by2, where a and b are constants. This result is central to the method of solving differential equations used in this chapter and also to the Laplace transform method of the next chapter.

Example 14.3

A differential equation

d2x/dt2+9x=f(t)

si47_e

is found to have a particular solution x = t /9 when f(t) = t and a particular solution

15sin(2t)?????when?f(t)=sin(2t).

si48_e

Suggest a particular solution when f(t) = t + 5 sin(2t) and check that your hypothesis is correct.

Solution As the differential equation is linear, if we sum the input functions then we should be able to sum the solutions. Hence, a solution to

d2x/dt2+9x=t+5?sin(2t)

si49_e

should be given by

x=t9+5×15sin(2t)=t9+sin(2t)

si50_e

Check:

x=t/9+sin(2t)dx/dt=(1/9)+2?cos(2t)d2x/dt2=4sin(2t)

si51_e

Then substituting these into

d2x/dt2+9x=t+5sin(2t)

si52_e

gives

4sin(2t)+9((t/9)+sin(2t))=t+5sin(2t)?????4sin(2t)+t+9sin(2t)=t+5sin(2t)

si53_e

which is true for all values of t, showing that

x=(t/9)+sin(2t)

si54_e

is a solution to

d2x/dt2+9x=t+5sin(2t).

si55_e

Linear equations with constant coefficients

A linear equation is said to have constant coefficients if the coefficients multiplying y and the derivatives of y (the dependent variable) are all constants, that is, do not involve functions of t.

3?d2y/dt2+2?dy/dt+4y=f(t)

si56_e

has constant coefficients

t2d2y/dt2+3t?dy/dt+4y=f(t)

si57_e

does not have constant coefficients as t2 and 3t are functions of time.

Time invariance

A linear differential equation with constant coefficients displays time invariance. If we use the same input and starting conditions for a system now or at some later time then the result relative to the initial starting time will be identical. Another way of expressing this is that if the input is time shifted then so is the output. This idea is represented in Figure 14.5.

f14-05-9780750658553
Figure 14.5 If a system is time invariant, then a time-shifted input yields a time-shifted output.

Example 14.4

For the differential equation

d2y/dt2+4y=sin(3t)

si58_e

show that

y=sin(2t)15sin(3t)

si59_e

is a solution and find a solution for the equation with the same input function delayed by 1 s, that is, find a solution to

d2y/dt2+4y=sin(3(t1))

si60_e

Solution First, we check that

y=sin(2t)15sin(3t)

si61_e

is a solution to the differential equation.

To do this, we must find the first and second derivatives

dy/dt=2cos(2t)(3/5)cos(3t)d2y/dt2=4sin(2t)+(9/5)sin(3t)

si62_e

Substitute into

d2y/dt2+4y=sin(3t)

si63_e

giving

4sin(2t)+(9/5)sin(3t)+4(sin(2t)15sin(3t))=sin(3t)????????sin(3t)=sin(3t)

si64_e

which is true for all t. Hence,

y=sin(2t)15sin(3t)

si65_e

is a solution to

d2y/dt2+4y=sin(3t).

si66_e

To find a solution to d2y/dt2 +4y = sin(3(t −1)), we use the property of time invariance, which means that a solution should be given by a time-shifted version of the solution to the first equation, that is

y=sin(2(t1))15sin(3(t1))

si67_e

then

dy/dt=2cos(2(t1))(3/5)cos(3(t1))d2y/dt2=4sin(2(t1))+(9/5)sin(3(t1)).

si68_e

Substitute into

d2y/dt2+4y=sin(3(t1))

si69_e

giving

4sin(2(t1))+(9/5)sin(3(t1))+4(sin(2(t1))(1/5)sin(3(t1)))=sin(3(t1))????sin(3(t1))=sin(3(t1))

si70_e

which is true for all t.

Example 14.5

For the differential equation

t?dy/dt+y=6t2

si71_e

(a) show that y = 2t2 is a solution

(b) show that the equation t dy/dt + y = 6t2 cannot represent a time invariant system.

Solution (a) To show that y = 2t2 is a solution to

t?dy/dt+y=6t2

si72_e

we need to find dy/dt

y=2t2????dy/dt=4t

si73_e

substituting into

t??dy/dt+y=6t2

si74_e

gives

t?(4t)+2t2=6t2?????????6t2=6t2,?which?is?true?for?all?t.

si75_e

(b) To show that this cannot represent a time-invariant system, we take an equation with a time-shifted input, for instance, shifted by 2 s to give

t??dy/dt+y=6(t2)2.

si76_e

If it were to be time-invariant, then a solution to this equation would be a time-shifted solution of the solution to the equation in part (a), that is, y = 2(t − 2)2. To show that the equation does not represent a time-invariant system we just need to show that y = 2(t − 2)2 is not a solution

y=2(t2)2????dy/dt=4(t2)

si77_e

Substitution into

t?dy/dt+y=6(t2)2

si78_e

gives

t(4(t2))+2(t2)2=6(t2)2???????4t(t2)+2(t2)26(t2)2=0???????(t2)(4t+2t(t2)6(t2))=0???????(t2)(4t+2t46t+12)=0???????8(t2)=0

si79_e

which is not true for all values of t, showing that y = 2(t − 2)2 is not a solution to t dy/dt + y = 6(t − 2)2 and therefore we have shown that t dy/dt + y = f(t) does not represent a time-invariant system.

We have seen that linear differential equations with constant coefficients represent linear time invariant (LTI) systems.

14.4 Solving first-order LTI systems

To solve ay′ + by = f(t), we begin by ignoring the forcing function setting it equal to 0. This is then called the homogeneous equation

ay+by=0.

si80_e

The general solution to this equation is called the complementary function.

We then find any particular solution and the sum of the complementary function and the particular solution gives us the general solution to the differential equation. Summing the two solutions in this way we are making use of the linearity property of the differential equation.

It may seem strange that a system with no input, as represented by the homogeneous equation ay′ + by = 0 may have a non-zero output! This is due to the fact that the initial conditions may be non-zero. For instance, a pendulum released from rest and performing small oscillations, approximately obeys the differential equation

d2y/dt2+ω2y=0

si81_e

where y is the distance the tip of pendulum has moved from its rest position and ω is its angular velocity. The pendulum will only begin to move if either it is given a non-zero initial velocity of if it is lifted slightly and then released. This means that either the initial position or the initial velocity or both must be non-zero for y to be non-zero.

The method we shall use for solving the complementary function relies on the fact that we know that y′ = ky has the solution y = C ekt. That is, the derivative of an exponential function is a scaled version of the original function. This was discussed in Chapter 8. We can also show that any order derivative of an exponential function is a scaled version of the original function. Consider

dy/dt=ky.

si82_e

Differentiating this equation gives

d2y/dt2=k?dy/dt.

si83_e

Substituting dy/dt = ky we get

d2y/dt2=k2y

si84_e

and hence the second derivative is a scaled version of the original exponential function with scaling factor k2. Differentiating again, we get

d3y/dt3=k2dy/dt

si85_e

and on substituting dy/dt = ky, we get

d3y/dt3=k3y

si86_e

and hence the third derivative is a scaled version of the original function with scaling factor k3. We use this property of exponential functions to solve the homogeneous equation by trying a solution of the form y = C eλt. We then find value(s) for λ which are appropriate for the equation under consideration.

The equations we found in Section 14.2 were all second-order equations or systems of equations involving more than one state variable. However, in some circumstances, we get simple first order equations. For instance if their is no inductor present in an LRC circuit we can put L = 0 to give

R?dq/dt+q/C=v(t),

si87_e

which is first order in q.

The method of solution can be characterized by four steps. To find the solution to ay′ + by = f (t):

Step 1: Find the complementary function

The solution of the homogeneous equation

ay+by=0

si88_e

is found by assuming a solution of the form y = A eλt. Hence, y′ = Aλ eλt and substituting into ay′ + by = 0 we get

a?Aλ?eλt+bA?eλt=0

si89_e

We are not interested in the trivial solution A = 0 and eλt is never zero, so we can divide through by A eλt giving

λa+b=0

si90_e

which is called the auxiliary, or characteristic equation.

The auxiliary equation has the solution λ = –b/a. Hence, the complementary function is

y=A?e(b/a)t.

si91_e

Step 2: Find a particular solution

The system output, after the effect of any initial conditions have died out, we would expect to mimic the system input. To find a particular solution we try a trial solution with some undetermined coefficients. Some good guesses to use for the trial solution, depending on the type of input function f(t), are given in Table 14.1.

Table 14.1

A table of trial solutions to be used to find a particular solution. The form of the trial solution is suggested by the form of the forcing function f(t). The coefficients c0, cl,… and c,d are to be determined

Input functionTrial solution
Polynomial of order n
f(t) = a0 + a1t + a2t2 + ··· + antny = c0 + c1t + c2t2 + ··· + Cntn (Use all terms up to n for the trial solution)
Exponential function
f(t) = a eαty = c eαt
Sine or cosine function
f(t) = a cos(ωt) or b sin(ωt) or f(t) = a cos(ωt) + b sin(ωt)y = c cos(ωt) + d sin(ωt)

The coefficients in the trial solution are determined by substituting into

ay+by=f(t).

si92_e

These trial solutions will not always work. Laplace transforms may be used to find a particular solution in that case (see Chapter 15).

Step 3: Find the general solution

The general solution to the equation is given by the sum of the complementary function plus the particular solution.

Step 4: Find the particular solution

The final step is to use the initial condition to find the appropriate value of A, the arbitrary constant. This solution is then the particular solution which solves the differential equation with the given initial condition.

Example 14.6

The RC circuit in Figure 14.6 is initially relaxed and is closed at time t = 0. Hence, applying a DC voltage of υ0 the charge of the capacitor obeys the differential equation

R?dq/dt+q/C=v0.

si93_e

f14-06-9780750658553
Figure 14.6 An RC circuit with an applied DC voltage.

Solve for q and find an expression for the voltage across the capacitor at a time t after the circuit was closed.

Step 1

To find the complementary function we solve the homogeneous equation

R?dq/dt+q/C=0.

si94_e

Substitute q = A eλt and dq/dt = Aλeλt to give

RλA?eλt+A?elt/C=0.

si95_e

Divide by A eλt

Rλ+1/C=0???????λ=1/(RC).

si96_e

The complementary function is

q=A?et/RC

si97_e

Step 2

Try a particular solution of the form q = a, where a is a constant. Then q′ = 0, substituting into

R?dq/dt+q/C=v0

si98_e

we get

a/C=v0???????a=v0C

si99_e

Step 3

The general solution is therefore the sum of the complementary function (found in Step 1) and a particular solution (found from Step 2), so the general solution for q is given by

q=A?et/RC+Cv0

si100_e

Step 4

Finally, we use the initial conditions to find the arbitrary constant A. We are told that initially the circuit was relaxed meaning that all voltages and currents are zero. In this case, this means that when t = 0, q = 0. Substituting this condition into

q=A?et/RC+Cv0

si101_e

we get

0=A+Cν0???????A=Cν0

si102_e

Therefore, the solution is

q=Cν0?et/RC+Cν0???????q=Cν0(1et/RC).

si103_e

This gives the voltage across the capacitor vc = q / C as vc = v0 × (1 – e −t/RC) where v0 is the applied DC voltage.

Check:

To check that q = Cv0(l – e−t/RC) is in fact a solution to

R?dq/dt+q/C=ν0

si104_e

we carry out the following steps:

q=Cv0(1et/RC)????dq/dt=(Cv0/RC)et/RC?????????dq/dt=(v0/R)et/RC

si105_e

Substituting into

R?dq/dt+q/C=v0

si106_e

gives

(Rv0/R)et/RC+(ν0C/C)(1et/RC)=ν0???????????ν0=ν0

si107_e

which is an identity for t, showing that q = Cv0(1 – e t/RC) is a solution to the differential equation.

We also check that the solution satisfies the given initial condition by substituting q = 0 and t = 0 into q = Cv0(1 – e−t/RC). We find

0=Cv0(11)??????????0=0,

si108_e

which is true.

Example 14.7

Solve the differential equation

y3y=6cos(2t),

si109_e

given y (0) = 2.

Step 1

To find the complementary function we solve the homogeneous equation

y3y=0

si110_e

substitute y = A eλt so that dy = Aλ eλt, giving

Aλ?eλt3A?eλt=0.

si111_e

Therefore, we get the auxiliary equation

λ3=0????????λ=3.

si112_e

The complementary function is y = A e3t

Step 2

Try a particular solution (chosen from Table 14.1) of the form y = c cos(2t) + d sin(2t) then y′ = −2c sin(2t) + 2d cos(2t). Substituting into y′ − 3y = 6 cos(2t) we get

2c?sin(2t)+2d?cos(2t)3(c?cos(2t)+d?sin(2t))=6?cos(2t)??????(2c3d)sin(2t)+(2d3c)cos(2t)=6?cos(2t).

si113_e

We want this to be true for all values of t, so we can equate the coefficients of the sin(2t) terms on both sides of the equation and also the cos(2t) terms.

Equating the coefficients of sin(2t) gives:

2c3d=0.

si114_e

Equating the coefficients cos(2t) gives:

2d3c=6.

si115_e

Therefore,

2c3d=03c+2d=6.

si116_e

Solving these equations simultaneously gives

c=18/13????d=12/13.

si117_e

Hence, a particular solution is

y=(18/13)cos(2t)+(12/13)sin(2t).

si118_e

Step 3

The general solution is given by the sum of the complementary function and a particular solution giving

y=A?e3t(18/13)cos(2t)+(12/13)sin(2t).

si119_e

Step 4

Use the initial condition to find A.

When t = 0, y = 2. Substituting this into

y=A?e3t(18/13)cos(2t)+(12/13)sin(2t)

si120_e

gives

2=A(18/13)cos(0)+(12/13)sin(0)??????2=A18/13????????A=44/13.

si121_e

Therefore, the solution is

y=(44/13)e3t(18/13)cos(2t)+(12/13)sin(2t).

si122_e

Check: Substitute

y=(44/13)e3t(18/13)cos(2t)+(12/13)sin(2t)

si123_e

and

y=(132/13)e3t+(36/13)sin(2t)+(24/13)cos(2t)

si124_e

into

y3y=6?cos(2t)?giving(132/13)e3t+(36/13)sin(2t)+(24/13)cos(2t)???3(44/13)e3t(18/13)cos(2t)+(12/13)sin(2t)=6cos(2t)???????(78/13)cos(2t)=6cos(2t)

si125_e

which is correct.

We also check the initial condition by substituting t = 0, y = 2 into

y=(44/13)e3t(18/13)cos(2t)+(12/13)sin(2t).

si126_e

We find

2=(44/13)e0(18/13)cos(0)+(12/13)sin(0)??????2=(44/13)(18/13)??????2=26/13,?which?is?true.

si127_e

14.5 Solution of a second-order LTI systems

We can solve a second-order system in a manner similar to first-order systems. To solve ay″ + by′ + cy = f(t) we solve the homogeneous equation

ay+by+cy=0.

si128_e

The solution to this equation is called the complementary function.

We then find any particular solution and the sum of the complementary function and a particular solution gives us the general solution to the differential equation. We can again list the steps involved.

To?solve?ay+by+cy=f(t)

si129_e

Step 1Find the complementary function

The solution of the homogeneous equation

ay+by+cy=0

si130_e

is found by assuming solutions of the form y = A eλt. Hence, y′ = Aλ eλt and v” = Aλ2eλt and we find

aAλ2?et+bAλ?eλt+cA?eλt=0

si131_e

giving the auxiliary equation

aλ2+λb+c=0.

si132_e

The auxiliary equation is a quadratic equation. It has solutions

λ1,?λ2?=?b±b24ac2a.

si133_e

There are three possible types of solutions:

Case (1): λl and λ2 are real and distinct then the solution is:

y?=?A?eλ1t+?B?eλ2t.

si134_e

Case (2): λl and λ2 are complex. We set λl = k + jω0 and λ2 = kjω0

so that k = −b/2a and

ω0=4ac-b22a.

si135_e

Then the complex exponentials can be written in terms of cosines and sines and the solution becomes

y?=?ekt(A?cos(ω0t)?+?B?sin(ω0t)).

si136_e

Case (3): The roots are equal, that is, λl = λ2 = k = −b/2a, then the solution is y = (At + B)ekt.

Step 2: Find a particular solution

The particular solution is any solution of the equation

ay?+?by?cy?=?f(t).

si137_e

As for the first-order system we expect the system output, after the effect of any initial conditions have died out, to mimic the system input. Again to find a particular solution we try a trial solution as given in Table 14.1. The ‘guess’ at the particular solution is substituted into the differential equation and the unknowns coefficients can be determined. If this guess does not produce a solution then Laplace transform methods can be used as in Chapter 15.

Step 3

The general solution to the equation is given by the sum of the complementary function plus a particular solution.

Step 4

The final stage is to use the initial conditions or boundary conditions to find the appropriate values of the arbitrary constants A and B.

Example 14.8

Solve the differential equation 5y″ + 6y′ +5y = 6 cos(t), where y (0) = 0 and y′ (0) = 0.

Step 1

To find the complementary function we solve the homogeneous equation 5y″ + 6y′ + 5y = 0. Trying solutions of the form y = A eλt leads to the auxiliary equation 5λ2 + 6λ + 5 = 0. Notice that a quick way to get the auxiliary equation is to ‘replace’ y″ by λ2, y′ by A, and y by 1. The auxiliary equation has solutions

λ=6±3610010=6±6410=0.6±j0.8.

si138_e

Comparing this with λ = k ±0 gives k = −0.6, ω0 = 0.8. This means that the complementary function has the form

y?=?ekt(A?cos(ω0t)?+?B?sin(ω0t))

si139_e

(given as Case (2) in the general method), with k = −0.6 and ω0 = 0.8. This gives

y?=?e0.6t?(A?cos?(0.8t)?+?B?sin(0.8t)).

si140_e

Step 2

As f(t) = 6 cos(t), from Table 14.1 we decide to try a particular solution of the form y = c cos(t) + d sin(t). Then

y?=?c?sin(t)?+?d?cos(t)

si141_e

and

y?=?c?cos(t)?+?d?sin(t).

si142_e

Substituting in

5y?+?6y?+?5y?=?6?cos(t)

si143_e

we find

5(c?cos(t)??d?sin(t))?+?6(c?sin(t)?+?d?cos(t))??????+?5?(c?cos(t)?+?d?sin(t))?=?6?cos(t)????????????(5c?+?6d?+?5c)?cos(t)?+(5d6c+5d)?sin(t)?=?6?cos(t)?????????????6d?cos(t)?6c?sin(t)?=?6?cos?(t).

si144_e

As we want this to be an identity we equate the coefficients of cos(t) and the coefficients of sin (t) and get the two equations

6d?=?6d?=?16c?=?0c?=?0.

si145_e

Hence, a particular solution is y = sin(t).

Step 3

The general solution is given by the sum of the complementary function and a particular solution, so

y?=?e0.6t?(A?sin(0.8t)??+??B?cos(0.8t))?+?sin(t).

si146_e

Step 4

Use the given initial conditions to find values for the constants A and B. Substituting y = 0 when t = 0 into

y?=?e0.6t?(A?cos(0.8t)?+?B?sin(0.8t))?+?sin(t)

si147_e

then

0=e0(A?cos(0)?+?B?sin(0))?+?sin(0)0?=?A.

si148_e

To use the other condition, that y′ = 0 when t = 0, we need to differentiate the general solution to find an expression for y'. Differentiating (using the product rule):

y?=?e0.6t?(A?cos(0.8t)?+?B?sin(0.8t))?+?sin(t)?????????y?=?0.6?e0.6t?(A?cos(0.8t)?+?B?sin(0.8t))???????+?e0.6t(0.8A?sin(0.8t)?+?0.8?B?cos(0.8t))?+?cos(t)

si149_e

and using y′ = 0 when t = 0 gives

0?=?0.6A?+?0.8B?+?1.

si150_e

We have already found A = 0 from the first condition, so

B?=?1/(0.8)?=?1.25.

si151_e

Therefore, the solution is

y?=?1.25?e0.6t?sin?(0.8t)?+?sin(t).

si152_e

Check

y=1.25?e0.6t?sin?(0.8t)?+?sin(t)y=0.75?e0.6t?sin(0.8t)??e0.6tcos(0.8t)?+?cos(t)y=0.45?e0.6t?sin(0.8t)?+?0.6?e0.6t?cos(0.8t)+?0.6?e0.6t?cos(0.8t)?+?0.8?e0.6t?sin?(0.8t)??sin(t).

si153_e

Substitute into

5y?+?6?y?+?5?y?=?6?cos(t)

si154_e

giving

5(0.45?e0.6t?sin?(0.8t)?+?0.6?e0.6t?cos(0.8t)?????+?0.6?e0.6t?cos(0.8t)?+?0.8?e0.6t??sin?(0.8t)sin(t))??????+?6(0.75?e0.6t?sin(0.8t)??e0.6t?cos(0.8t)?+?cos(t))??????+?5(1.25?e0.6t?sin(0.8t)?+?sin(t))?=?6?cos(t)????????????e0.6t??sin(0.8t)?(1.75+4.56.25)?+?e−0.6t?cos(0.8t)?(66)??????+???sin(t)??(5+5)?+?6?cos?(t)?=?6?cos(t)

si155_e

which is true for all values of t.

We can also check that the solution satisfies the given initial conditions.

Example 14.9

Find the current in an initially relaxed LRC circuit with R = 5 Ω, L = 4 μH, C = 1 μF where the AC voltage source is given by v(t) = 20 sin(10t).

Solution The differential equation is given in Section 14.2 as

Ld2idt2+?Rdidt?+?iC?=?dvdt

si156_e

As v = 20 sin(10t)

dvdt?=?200?cos(10t)

si157_e

and substituting in the given values of L, R, and C we get

(4?×?106)?d2i/dt2+5?di/dt?+?i106?=?200?cos(10t)4?×?106d2i/dt2+?5?di/dt+?106i?=?200?cos(10t).

si158_e

Step 1

Solve the homogeneous equation

(4?×?106)?d2i/dt2+5?di/dt+106i=0

si159_e

This has auxiliary equation

4?×?106?λ2+5λ?+?106?=?0

si160_e

with solutions

λ?=?5?±254(4×106×1062×106?λ?=?5±92?×?106λ=4?×?106??λ?=?106.

si161_e

The complementary function is

i?=?A?e106t+B?e4?×106t.

si162_e

Step 2

Find a particular solution. As the forcing function is a cosine function we try

i?=?c?cos(10t)?+?d?sin(10t)

si163_e

di/dt=10c?sin(10t)?+?10d?cos(10t)=100c?cos(10t)??100d?sin(10t).

si164_e

Substituting into

(4?×?106)?d2i/dt2+5?di/dt+?106i?=?200?cos?(10t)

si165_e

we get

4?×?106(100c?cos(10t)??100d?sin(10t))??????+?5?(10c?sin(10t)?+?10d?cos(10t))??????+106(c?cos(10t)?+?d?sin(10t))?=?200?cos(10t)???????????0.0004c?cos(10t)?0.0004d?sin(10t)?50c?sin(10t)?+?50d?cos(10t)?????+???106c?cos(10t)?+?106d?sin(10t).

si166_e

Equating coefficients of sine and cosine terms to make this an identity gives

0.0004c?+?50d?+106c=2000.0004d??50c?+?106d=0

si167_e

and solving these equations we find d ≈ 10−8 and c ≈ 0.0002, so

i?=?0.0002?cos(10t)?+?108?sin(10t).

si168_e

Step 3

Hence, the general solution is

i?=?A?e106t?+?B?e4×106t?+?0.0002?cos?(10t)?+?108?sin(10t).

si169_e

Step 4

Given than i = 0 and di/dt = 0 when t = 0 initially, then we can substitute into

i?=?A?e106t?+?B?e4?×106t+?0.0002?cos?(10t)?+?108?sin(10t)

si170_e

and

didt?=?106Ae106t??4?B?106e4×106??0.002?sin(10t)?+?107cos(10t)

si171_e

to find equations for A and B

A?+?4?B?=??1013???A+B?=?0.0002

si172_e

which we solve to find A ≈ – 0.000267 and B = 0.0000667.

So, the solution to the initial value problem is approximately

i=0.000267?e106t+0.000667?e4×106t+?0.0002?cos?(10t)?+?108?sin(10t).

si173_e

The transient and steady state solution – system stability

From the systems modelled in Section 14.2 we can see that the term by′ in the equation:

ay?+?by?+?cy?=?f(t)

si174_e

comes from the damping factor in the system. For electrical systems this is provided by the resistance. b must be a positive quantity in any of those systems as are the other coefficients.

The auxiliary equation is 2 + bλ + c = 0 with solutions

λ1,λ2?=?b±b24ac2a

si175_e

and this gives three possibilities for the complementary function.

Case (1): Real distinct roots y = A eλ1t + B eλ2t. Notice that λ1 λ2 must be negative when a, b, and c are positive and therefore the complementary function will die out as t → ∞. In this case the system is said to be overdamped.

Case (2): Complex roots y = ekt (A cos(ω0t) + B sin(ω0t)) where k = −b/2a which is negative, so ekt is a negative exponential term. This then represents dying oscillations. The system is said to be underdamped.

Case (3): The roots are equal, then = k = −b/2a and y = (At + B)ekt Again this has a negative exponential part causing the complementary function to tend to zero as t →∞. This case is referred to as critical damping.

Because the contribution from the complementary function dies out as t → ∞, it is referred to as the transient solution. Graphs of the form of the transients, for positive initial displacement and zero initial velocity, are shown in Figures 14.7(a)(c) for Cases (1)–(3) respectively.

f14-07-9780750658553
Figure 14.7 The complementary function, found by solving the homogenous equation, provides the transient solution. The graphs shown are for positive initial displacement and zero velocity. (a) The graph of the transient for the overdamped case where y = Aeλ1t+ Beλ2t, λ1, λ2 negative. (b) Graph of the underdamped case where the transient consists of dying oscillations y = ekt (A cos0t) + B sin0t)) (k is negative). (c) The critically damped case where y = (At + B)ekt, k negative.

The other part of the solution, where we consider the effect of the forcing function, is called the steady state solution. For the solution found in Example 14.8 where

y?=?1.25?e0.6t?sin(0.8t)?+?sin(t)

si176_e

we find that −1.25 e−0.6t sin(0.8t) is the transient and sin(t) is the steady state solution. If we consider the system after some time has passes then the transient will effectively be zero and we are left with y = sin(t), the steady state solution.

We have said that in any truly linear system, as represented, for instance, by our models in Section 14.2, the constants must be positive with positive damping. However, we may wish to analyse non-linear systems by using a locally linear approximation. In this situation they may exhibit unstable behaviour, where the ‘transients’, instead of dying out, display positive exponential behaviour and grow very large. This is then referred to as an unstable system.

We can analyse systems in the following way:

Stable system: A system is stable if all the solutions to the auxiliary equation have negative real parts. A system with some purely imaginary solutions to the auxiliary equation can also considered to be stable although the complementary function does not die out as t → ∞ but represents sustained oscillations.

Unstable system: A system is unstable if any solutions to the auxiliary equation have positive real parts or, for systems of higher order, if there is a repeated, purely imaginary, solution.

Damped oscillations of a mechanical system – resonance

For damped oscillations of a spring we have the differential equation

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

si177_e

as shown in Section 14.2, where m is the mass, r the damping constant, and k the spring constant. We shall look at the steady state solution in the case where there is a single frequency input. We are interested in the magnitude of the response in this case in order to analyse the problem of resonance.

For simplicity we can regard the single frequency input as a complex exponential f(t) = F0ejωt where F0 is a constant. Having found the response to the complex exponential, then as

F0ejωt=F0?cos(ωt)+jF0?sin(ωt)

si178_e

we can find the response to a cosine function by taking the real part of the output or to a sine function by taking the imaginary part of the output (this is an application of the linearity property).

We have the equation m¨x+r˙x+kx=F0?ejωtsi179_eand we want to find the steady state solution. Try a solution of the form x = c ejωt then

˙x=cjω?ejωt¨x=cω2?ejωt

si180_e

and substituting into the differential equation we find

mcω2?ejωt+crjω?ejωt+kc?ejωt=F0?ejωt.

si181_e

On dividing both sides by ejωt (which is non-zero), we get

c(mω2+jrω+k)=F0.

si182_e

Hence

c=F0/(mω2+jrω+k)

si183_e

giving the steady state solution as

x=F0?ejωtmω2+jrω+k

si184_e

We are interested in the magnitude of the oscillations, which is given by

|F0mω2+jrω+k|.

si185_e

We can find this by taking the magnitude of the top and bottom lines. From Chapter 14 we know that the magnitude of a complex number, z = x + jy, is given by r=x2+y2si186_e. Hence, we find the amplitude of the oscillations in response to a single frequency of input of angular frequency is given by

F0(mω2k)2+r2ω2.

si187_e

This was plotted in Figure 11.10 for the case m = k = 1 and various values of r (there called c). If the damping, r, is quite small then we can set it to be effectively 0. In this case

|x|={F0kω2mfor?ω2<?k/mF0ω2mkfor?ω2>?k/m

si188_e

In which case there is an infinite discontinuity at

ω=km.

si189_e

We see that k/msi190_e represents the natural angular frequencies of m the system in the case where r is 0. We can show this by examining the solution to the homogeneous in the case where r = 0.

mx+k?x=0?has?auxiliary?equatioin

si191_e

mλ2+k=0

si192_e

λ2=k/m

si193_e

and setting λ = jω0 we find that ω20 = k/m and the complementary function x = A cos(ω0t) + B sin(ω0t).

We can see from this limiting case that if the damping constant is small and the oscillations of the forcing function are near to the natural oscillations of the underdamped system then we have a situation of resonance where the magnitude of the response can become very large. This effect has led to the destruction of some physical systems before the phenomenon of resonance was well understood.

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

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