Mathematical and Computational Modeling and Simulation
Prof. Dr.-Ing. D.P.F.MöllerVAK 18.211
Sommersemester 2005
Tech
nisc
he
Syste
me
Syste
me
Info
rmat
ik
Leitung: Prof. Dr.-Ing. D.P.F. Möller
Modeling and Simulation D.P.F Möller
Content
1. Modeling Continuous-Time and Discrete-Time Systems
2. Mathematical Description of Continuous-Time Systems
3. Mathematical Description of Discrete-Time Systems
4. Simulation Languages of Continuous-Time and Discrete-Time
Systems
5. Parameter Estimation of Dynamic Systems
6. Soft Computing in Simulation
7. Distributed Simulation
8. Virtual Reality in Simulation
Modeling and Simulation D.P.F Möller
2. Mathematical Description of Continuous Time Dynamic Systems
Modeling and Simulation D.P.F Möller
Content
2. Mathematical Description of Continuous TimeDynamic Systems
2.1 Introduction2.2 State Space Systems Concept2.2.1 Solution of the State Space Differential Equation2.2.2 Stability Analysis 2.3 Use of State Space Models2.4 First Order Linear State Space Models of Time Continuous Systems2.4.1 Systems Theory of First Order Linear State Space Systems Models2.5 Second Order Linear State Space Models 2.5.1 Systems Theory of Second Order Linear State Space Models2.6. Higher Order Linear State Models
Modeling and Simulation D.P.F Möller
2.1 IntroductionBased on the phenomenological principles relevant to a particular dyna-mical system, the equations which characterize the dynamic system canusually be written in the notation of ordinary differential equations or, in the notation of state space variables. Hence we may decide upon the input and output variables; this subjective decision depends on what aspects of the dynamic responses are of interest, e.g. system analysis. The input and output variables typically are certain of the physical variables, the input variable relates the effects of the system on the external environment. State space variables of the system which are unknown may be identified to be known. State space variables should have the following property: If the current state is known and the future input is known then the future state and output are uniquely determined. The basic methodological concepts behind are state space controlla-bility, and its inverse, state space observability.
Modeling and Simulation D.P.F Möller
2.1 IntroductionDefinition 2.1A dynamic system
is said to be completely controllable if there exist a control signalu(t), defined over the finite interval t0<t<tF, which transfers the dy-namic system from any initial state x(t0) = x0 to any desired finalstate x(tF) = xF in the defined time interval.
Definition 2.1 is true if and only if the (nxnr)-controllability matrix
S: = [B AB A²B²… An-1B ]has full rank n.
Modeling and Simulation D.P.F Möller
2.1 Introduction
A dynamic system may be described by the state space model
dx/dt = A*x(t) + B*u(t)
-3 1 x1 0= -2 –1.5 x2 + 1 [u]
WithA = -3 1
-2 –1.5 and
B = 01
The dynamic system given in the example is completely controllable if Band AB are linear independent and the rank of the controllability matrix C: [B, AB] = 2, which means the system is completely controllable.
Modeling and Simulation D.P.F Möller
2.1 Introduction
Definition 2.1-1:A dynamic system
is said to be completely observable within A the finite interval t0<t<tF, if every initial state x(t0) = x0 can be determined from the output y(t), observed over the time interval.
Definition 2.1-1 is true if and only if the (nxnr)-matrix O: = [CT CTAT … CT( A)n-1 ]
has full rank n, with CT as the transform of C.
Modeling and Simulation D.P.F Möller
2.1 Introduction
Modeling and Simulation D.P.F Möller
2.1 Introduction
Modeling and Simulation D.P.F Möller
2.1 Introduction
Modeling and Simulation D.P.F Möller
2.1 Introduction
Definition 2.1-3:A dynamic system is said to be structurally identifiable if its para-meter vector Θ can be determined from the output y(t), observed over the same interval t0<t< tF.
A dynamic system is called at the true model parameter vector ΘT· parameter identifiable if there exists an input sequence {u}such
that Θ and ΘT are distinguished for all Θ ≠ ΘT,· system identifiable if there exists an input sequence {u}such that Θ
and ΘT are distinguishable for all Θ ≠ ΘT but a finite set· unidentifiable in all other cases.
Modeling and Simulation D.P.F Möller
2.1 IntroductionThe conditions for controllability, and observability of dynamic systems, defined by Kalman, rely on the system state-space representation, which can successfully be applied both in continuous time and discrete time dynamic systems.
The state variable concept of dynamic systems completely charac-terize the systems past, since the past input is not required to de-termine the future output of the dynamic system. This seemingly elementary notation of state space is of importance in the systems state space approach. In fact, this modern mathematical approachdescribing dynamic systems is fundamentally based upon the state space variables concept
Although the state space notation has been explicitly emphasized during the last several decades due to the successive use of digital computers when modeling and simulating dynamic system.
Modeling and Simulation D.P.F Möller
2.1 Introduction
Unfortunately, no general prescription can be given for choosing state space variables in the sense of general guidelines, i.e., in electrical RLC circuits the charge on each capacitor and the current through each inductor in the network usually serve to define the state space of the respective network; in a mechanical system the force and mass of each body, usually serve to define the state space of a mechanical system. In other domains choosing state space variables may be much more difficult. Once state space variables are chosen the mathematical equations characterizing the state space variables, the state space equations, can be derived.
Depending on the particular form of the equations used to describe the physical system the state space equations may be in one of the many-fold mathematical forms. It is possible classifying state space equations on the basis of their mathematical structure.
Modeling and Simulation D.P.F Möller
2.1 Introduction
Time is usually an independent variable in state space models:• sometimes the time variable is considered being a discrete variable
and the state space model is described by recursive equations• or the independent variable time is considered to be real valued• sometimes there can be additional independent variables in which
case the state space model is said to be distributed; such statespace models can often be described by partial differential equations
• if time is the only independent variable then the state space model is said to be lumped
• further, the state model may include random effects in which case the state space model is said to be stochastic
• if no such effects are included the state space model is said to bedeterministic.
Modeling and Simulation D.P.F Möller
2.1 Introduction
State space equations considered here are assumed to be described by ordinary differential equations, in their respective notation of n-order with u(t) as control variable and y(t) as output variable
u(t) = an * y(n)(t) + an-1 * y(n-1))(t) + … , a0 * y(t)
Rewriting the above differential equation, which is of order n, using n first order differential equations, we find:
x1 (t) = y (t)
x2 (t) = y(1) (t).
xn (t) = y(n-1) (t)
Modeling and Simulation D.P.F Möller
2.1 Introduction
This results in n differential equations if first order
x1´(t) = f1 ( x1(t), …, xn(t), u(t) )
xn´(t) = fn ( x1(t), …, xn(t), u(t) )
The output variable is assumed to depend on the state space variables and the input variable u according to an algebraic equation
y = g (x1, …, xn, u)
Modeling and Simulation D.P.F Möller
2.1 Introduction
From a more general point of view, the model is expressed in terms of nstate space variables labeled x1, …, xn
If a mathematical model for a dynamic system can be written in the above form, then the variables x1, …, xn do have state property. State equations can be assumed to serve as basis for the application of systems theory to dynamic systems modeling; the state space equation, in their first order form, is said to be in the standard or normal formState equations also serve as a very general model for the manifold of physical, electrical, mechanical, medical, biological, etc. processes, that is, it is often possible to develop state models of the above form for the mani-fold of physical, etc. processes; thus there is a large range of potential application of any mathematical systems theory based on the above state equations
Modeling and Simulation D.P.F Möller
2.1 IntroductionThe previously defined differential state space model, defined in terms of the arbitrary functions f1, …, fn and g, is sufficiently general to include models developed for many dynamic systems.A special class of state space models, of much practical importance in applications, are those for which the functions f1, …, fn and g have a linear mathematical structure so that the state space equations can be written as
dx1/dt = a11 x1 + … + a1n xn + b1 u..
dxn/dt = an1 x1 + … + ann xn + bn u
y = c1 x1 + ..., cn xn + d u
where a11,… ,ann, b1, …,bn, c1, …, cn, d are the systems constants. State models with such special structure said to be linear state models
Modeling and Simulation D.P.F Möller
2.2 State Space ConceptsIt should be noticed that the state space model, defined in terms of
dx1/dt = f1 ( x1 ,…, xn , u )..
dxn/dt = fn ( x1, …, xn , u )
y = g ( x1, ..., xn, u )
is a sufficient way describing dynamic systems in terms of a mathemati-cal model. Our interest when using state space nation is both• formalization of state space noticed models • analysis of state space models as a way of better understanding the
intrinsic systems dynamic
Modeling and Simulation D.P.F Möller
2.2.1 Solution of the State Space Differential Equation
The time dependent behavior of a linear state space differential system is
which means the dependence of the output vector y(t) form is input vec-tor u(t), where the system matrix A and the control matrix B assumed to be constant, can be solved applying the Laplace transform
L [ f(t) ] = ∫f(t) * e-st dt = L [ f(t) ] = F(s) hence:
s*x(s) - x(0) = A x(s) + B u(s)
with x(0) as initial state of the dynamic system under test, and x(s) = ∫e-st x(t)dt
as the Laplace transform, and s as the Laplace operator for d/dt.
Modeling and Simulation D.P.F Möller
2.2.1 Solution of the State Space Differential Equation
Solving equation s*x(s) - x(0) = A*x(s) + B*u(s)we receive
s*x(s) - A*x(s) = x(0) + B*u(s)x(s)[ s – A ] = x(0) + B*u(s)
1 1and with I = equal to the (n,n)-unit matrix, and after rewriting
1 1
x(s)[ s I – A ] = x(0) + B*u(s)x(s) = x(0) / [ s I – A ] + B*u(s) / [ s I – A ] ⇒x(s) = (s I – A)-1 x(0) +( s I – A)-1 B*u(s)
with x(s) as Laplace transform of x(t), and I , as mentioned, as a (n,n)-unit matrix.
Modeling and Simulation D.P.F Möller
2.2.1 Solution of the State Space Differential Equation
Assuming u(s) being known, the state vector x(t) can be calculated from u(s) as follows, while
L{f(t)} = F(s)
and the inversion property is written as
f(t) =L-1{ F(s)} we receive
x(t) = L-1 {(s I – A)-1} x(0) + L-1 {( s I – A)-1}B*u(s)
Modeling and Simulation D.P.F Möller
2.2.1 Solution of the State Space Differential Equation
Introducing the notation
x(t) = L-1 {(s I – A)-1} x(0) = eAt
and the respective correspondency from the Laplace transform we may rewrite the equation above as follows
Φ(t) = L-1 {(s I – A)-1} x(0) = eAt
in order to calculate the solution for the state space differential equation
Modeling and Simulation D.P.F Möller
2.2.1 Solution of the State Space Differential EquationWe finally receive
Φ(t) = eAt
in order to calculate the solution for the state space differential equation, where Φ(t) is called fundamental-, transistion-, or state space transientmatrix, which with the state for any future time step of a dynamic systemcan be calculated, if the initial state is known.
Modeling and Simulation D.P.F Möller
2.2.1 Solution of the State Space Differential Equation
For the state variables
we may introduce the well known concept of solving ODEs by the partial and the homogeneous solution, which is
x(t) = xh(t) + xp(t)
For the homogeneous part we receive the expression
d xh(t) /dt = A * xh(t)
Modeling and Simulation D.P.F Möller
2.2.1 Solution of the State Space Differential Equation
With the solution
xh(t) = eAt xh(0) = Φ(t) xh(0)
while eAt can be expressed in terms as Taylor series expansion at t=0which results in
eA*t = ∑ ( A*t ) / n! = I + A*t + (½) ( A²*t² ) + ...
Modeling and Simulation D.P.F Möller
2.2.1 Solution of the State Space Differential Equation
For the particular solution of the state space which is
xp(t) = Φ(t) * g(t)
we may use Langrange´s method of variation of the constants, whichyields in general terms
y´= a´* b + a * b´
which results in the solution which has to satisfy the state equation as
d/dt { Φ(t) * g(t)} = Φ´(t) * g(t) + Φ(t) * g´(t)
Modeling and Simulation D.P.F Möller
2.2.1 Solution of the State Space Differential EquationThe derivation of Φ(t) can be expressed using the well known equation
eA*t = Φ(t)which results in
dΦ/dt = d/dt *eAt = A * eAt = A* Φ(t)
Using this equation, the particular equation
d/dt { Φ(t) * g(t)} = Φ´(t) * g(t) + Φ(t) * g´(t)
may be rewritten as follows
xp (t) = A* Φ(t) * g(t) + Φ(t) * g´(t) = A* Φ(t) * g(t) + B * u(t) or
g´(t) = Φ-1(t) * B * u(t)or
g(t) = ∫ Φ-1(τ) * B * u(τ) dτ
Modeling and Simulation D.P.F Möller
2.2.1 Solution of the State Space Differential Equation
The solution of the particular as well as for the homogeneous part is now well known as
x(t) = xh(t) + xp(t)
⇒ x(t) = Φ(t) x(0) g(t) + ∫ Φ(t) * Φ-1(τ) * B * u(τ) dτ
Modeling and Simulation D.P.F Möller
2.2.2 Stability Analysis
An important class of state responses of the state space equations are those which are periodic or oscillatory. If for some initial state and some input function the solution of the state space equations satisfy
xi(t+T) = xi(t), i=1, .., n
for all t>0, where T>0, then the state response is said to be periodic.
The smallest such value of T is said to be the periodic of the oscillation.
A special class of periodic state responses are those which are constant functions, i.e. for some initial state and some input function the solution of the state equations satisfy
xi(t) = xi(0), i=1, .., n
Modeling and Simulation D.P.F Möller
2.2.2 Stability Analysis
For all t>0. Such constant state responses are said to define anequilibrium state, denoted by xi(0), ..., xn(0)
An important property of a class of responses of the state equations in the property of stability. An equilibrium state is stable, roughly, if for any initial state close to the equilibrium state the state response tends, in the limit as time increases, to the equilibrium state.
Modeling and Simulation D.P.F Möller
2.2.2 Stability Analysis
Stability analysis of linear state space systems of type dx/dt = A*x is possible by calculating the Eigenvalues λ of the system matrix A.
A System S is said to be stable if the Eigenvalues λ1of the system matrix A are negativ.
Modeling and Simulation D.P.F Möller
2.2.2 Stability AnalysisExample:Inspecting a linear system whether it satisfy the stability criteria, which meansthe system has to have only one equilibrium state
xs1 0xs = =
xs2 0with the system matrix
- k12 0A =
-k12 -k2Eigenvalues of system matrix A are calculated with polynomial det(A-λI)= 0
-k12-λ 0det = (-k12-λ)(-k2-λ) =0
k12 -k2-λThe Eigenvalues λ1= -k12 and λ =-k2 are negative which satisfies the stability criteria. The solution of the equations tends to 0 for t→∝ which means that b the equilibrium state is said to be asymptotic stable state.
Modeling and Simulation D.P.F Möller
2.3 Use of State Models
The most direct use of state space models is as basis for the analysis ofthe dynamic responses of the dynamic system. This requests analysis ofresponse properties of the state space equations of the dynamic systemA related but usually more difficult use of state space models as basisfor the modification of the dynamic system in order to achieve some de-sired objective. This process is usually referred to as synthesis or designof the dynamic system, often used in controller design.
State space models are useful in developing insight into some aspects of a dynamical system. This insight may be qualitative in nature or it may involve quantitative information about the dynamic responses of the dynamic system under test. State space models are useful in obtaining both types of information.
Modeling and Simulation D.P.F Möller
2.4 First Order Linear State Space Models
The time dependent behavior of a linear state space differential system is
with u as input variable, y as output variable, and x is a state variable. The state model is defined by the constants a, b, c. A block diagram interconnection is as follows, where the symbol 1/s is used to denote the integration operator.
Modeling and Simulation D.P.F Möller
2.4.1 System Theory of First Order Linear State Space ModelsDue to the simplicity of state equations it is easy matter to determine an explicit representation for the solution response as a function of initial state and the input function. Suppose that U(s) denotes the Laplacetransform of u(t), Y(s) denotes the Laplace transform of y(t) and X(s) denotes the Laplace transform of x(t).In general terms the Laplace transformation converts or transforms a real function of a real variable into a complex function of a complex variable. In particular let f(t) be a real function defined for t > 0; then the Laplace transform of the function is defined by
L [ f(t) ] = ∫f(t) * e-st dtand is often written as L [f(t)] = F(s). The integral is defined for complex values of s, F(s) is a complex function and the methods of complex analysis are applicable. Laplace transform is defined for a wide class of functions, so long as the complex values s are restricted to a region in the complex plane for which the indefinite integral in the definition converges.
Modeling and Simulation D.P.F Möller
2.4.1 System Theory of First Order Linear State Space Models
For the systems state equations
we obtain, with the Laplace transform with s as Laplace operator of d/dt
s*x(s) - x(0) = a*x(s) + b*u(s)or
sX -x(0) = a X + b Uand
Y = c X
where x(0) denotes the initial state.
Modeling and Simulation D.P.F Möller
2.4.1 System Theory of First Order Linear State Space ModelsWe may rewrite this equation as
sX - a X = x(0) + b U ⇒ X (s - a) = - x(0) + b U
⇒ X = [ x(0) ]/[ (s - a) ] + [ b U ] / [(s - a) ]
and
Y = c * {[ x(0) ]/[ (s - a) ] + [ b U ] / [(s - a) ]}
⇒ Y = [ c*x(0) ] / [ ( s-a ) ] + [ c*b*U ] / [ (s-a) ]
Modeling and Simulation D.P.F Möller
2.4.1 Systems Theory of First Order Linear State Space ModelsLet a be an arbitrary real number and let f(t), t > 0, have a Laplace trans-form F(s). Then we find the expressions
L[ e-at * f(t) ] = F (s+a) and
L[ eat * f(t) ] = F (s-a)
Let f(t), t > 0, have the Laplace transform F(s) and let g(t), t > 0, have the Laplace transform G(s). Then the convolution integral
∫f(τ) g(t-τ) dτhas the Laplace transform
L [ ∫f(τ) g(t-τ) dτ ] = F(s) * G(s)
Modeling and Simulation D.P.F Möller
2.4.1 Systems Theory of First Order Linear State Space Models
Hence with the convolution integral we find
x(t) = eat x(0) + ∫ea(t-τ) bu(τ)dτand
y(t) = c eat x(0) + ∫c ea(t-τ) bu(τ)dτ
as the explicit expressions for the state and the output responses as a function of the initial state x(0) and the input function u(t).
The first term in the above expression is the zero input response while the second term is the zero state response. Thus in this case the general response is the sum of the zero input response and the zero state response.
Modeling and Simulation D.P.F Möller
2.4.1 Systems Theory of First Order Linear State Space ModelsIt is convenient to introduce some terminology. The expression
G(s) = (c*b) / (s-a)
is called transfer function of the system: the transform of the zero state space output response is the product of the transfer function and the transform of the input function. The expression
g(t) =c*eat*b
is called the weighting or impulse response function of the system; note that the transfer function is the transform of the weighting function. The denominator polynomial of the transfer function
d(s) = s-ais called the characteristic polynomial..
Modeling and Simulation D.P.F Möller
2.4.1 Systems Theory of First Order Linear State Space Models
The denominator polynomial of the transfer function
d(s) = s-a,
the characteristic polynomial is due to several boundaries.If a < 0, i.e the zero of the characteristic polynomial is negative, then the zero input response always tends to zero as t→∝, for any initial state; the state equations are said to be stable.
If a > 0 the state equations are said to be unstable.
It its clear that the state equation indicated, with one state variable, is a minimal realization for the system, assuming that c*b ≠ 0. Any state model for the same system with more than one state variable would be certainly not be minimal
Modeling and Simulation D.P.F Möller
2.4.1 Systems Theory of First Order Linear State Space Models
Example:A two-compartment model is used to study ingestion, distribution and metabolism of a
drug in the individual. It provides the background information of the mechanism of action of drugs in general pharmacological terms and the significance of pharmacoki-netic parameters that determine the efficacy of drugs.
In particular, the drug is ingested, e.g. orally as medication, the drug enters the gastro-intestinal tract from where it is then distributed throughout the bloodstream of the individual to be metabolized and eliminated.
The primary interest of studying compartment models is to govern how input ingestion rate and/or the initial concentration of the drug in the body affects the individual. State variable X2(t) is of great interest, because it is ac-ces-sib-le to analysis by taking blood samples.
Modeling and Simulation D.P.F Möller
2.4.1 Systems Theory of First Order Linear State Space Models
Example:Supposing that the drug is taken orally, it enters the gastrointestinal tract, is absorbed
into the circulation and distributed throughout the body to be metabolized and finally eliminated.
Compartment X1 describes the gastrointestinal tract and the gastrointestinal vascular bed (circulation) of the individual.
Compartment X2 stands for the bloodstream (between the distribution and elimination processes) of the individual.
K12 and K20 represent the distribution and elimination constants, respectively. Start is at time zeroX1(t) denote the mass of drug in compartment 1 X2(t) be the mass of drug in compartment 2. If the ingestion rate of the drug U(t) > 0, we find the plausible assumption for the two-
compartment model, that the rate of change of the mass of drug in the gastrointestinal tract is equal to the rate at which the drug is ingested minus the rate at which the drug is distributed from the gastrointestinal tract to the bloodstream:
21)(1 totcompartmenrateondistributidrugtUdtdX
−=
Modeling and Simulation D.P.F Möller
2.4.1 Systems Theory of First Order Linear State Space Models
Example:In the case of first order kinetics, drug distribution rate from compartment 1 to 2 is
assumed to be proportional to the mass (or concentration) of the drug in the first compartment. If K12 > 0 is the corresponding proportionality constant, then the equation above becomes:
(1)
where K12 ⋅ X1 is the inflow rate of drug distribution from the first compartment. Compartment 2 is described by a flow rate equation that balances the inflow and outflow rates descri-bed by in the equation above.
With respect to first order kinetics, the outflow rate of compartment 2 is proportional to X2. Thus the equation above becomes:
(2)
K20 being the elimination constant.
)()( 1121 tXKtU
dtdX
⋅−=
rateoutflowratelowdtdX
−= inf2
)()( 2201122 tXKtXK
dtdX
⋅−⋅=
Modeling and Simulation D.P.F Möller
2.4.1 Systems Theory of First Order Linear State Space Models
Example:The equations constitute the linear pharmacokinetic model. In a matrix vector format
the constant coefficient linear differential equation model is (t > 0):
(3)
with
(4)
The pharmacokinetic model described in the equation above is a second-order linear model. The first differential equation is uncoupled from the second differential equation, the second differential equation is coupled with the first differential equation. It should be noted that this observation is important, since mathematical models should not be excessively difficult for analytical studies.
+
−
−=
0)(
)()(0
2
1
2012
12
2
1
tUtXtX
KK
K
dtdXdtdX
tKeAtU ⋅−⋅= 31)(
Modeling and Simulation D.P.F Möller
2.4.1 Systems Theory of First Order Linear State Space Models
Example:The homogeneous differential equation of (1) is
(5)
which can be solved using the approach
(6)Substituting (6) into (5) yields
(7)
with the solution λ = K12, which can be used in (6)
(8)
0)(1121 =⋅+ tXK
dtdX
tetX ⋅−= λ)(1
012 =⋅+⋅− ⋅−⋅− tt eKe λλλ
tKetX ⋅−= 12)(1
Modeling and Simulation D.P.F Möller
2.4.1 Systems Theory of First Order Linear State Space Models
Example:The general solution is
Consider the initial value c1 = A we obtain
(9)
Substituting (9) into (2) results in
which can be rewritten after multiplying by as follows
(10)
tKectX ⋅−⋅= 1211 )(
tKeAtX ⋅−⋅= 12)(1
)(220122 12 tXKeAK
dtdX tK ⋅−⋅⋅= ⋅−
tKKtKtK eAKeKtXedtdX ⋅−⋅⋅ ⋅⋅=⋅⋅+⋅ )(
122022 12201212 )(
Modeling and Simulation D.P.F Möller
2.4.1 Systems Theory of First Order Linear State Space Models
Example:The left side of (10) can be rewritten using the product rule for the calculus of differen-
tial equations, which has the form
hence, (10) can be integrated as follows:
or
which results in
( )tKetXdtd ⋅⋅ 20)(2
cdteAKetX tKKtK +⋅⋅⋅=⋅ ∫ ⋅−⋅ )(122
122012)(
ceKKAKetX tKKtK +⋅
−⋅
=⋅ ⋅−⋅ )(
1220
122
122012)(
tktK eceKKAKtX ⋅−⋅− ⋅+⋅
−⋅
= 2012
1220
122 )(
Modeling and Simulation D.P.F Möller
2.4.1 Systems Theory of First Order Linear State Space Models
Example:With the initial value we obtain
⇒
and finally
0)0(2 =X
cKKAK
+−⋅
=1220
120
1220
12
KKAKc
−⋅
−=
)()( 2012
1220
122
tktK eeKKAKtX ⋅−⋅− −⋅
−⋅
=
Modeling and Simulation D.P.F Möller
2.4.1 Systems Theory of First Order Linear State Space Models
Example:The model of the pharmaceutical kinetics can be implemented directly in common
simulation systems. For the simulation software CSMP the model formalization is as follows:
INITIALPARAMETERS K12=1.0, K20=0.5CONSTANT A=0., K31=0., X10=100., X20=100.
DYNAMICX1DOT = - K12·X1 + UX2DOT = K12·X1 – K2·X2X1 = INTGRL (X10, X!DOT)X2 = INTGRL (X20, X2DOT)
U = A·EXP(-K31·TIME)TIMER DELT=0.1, OUTDEL=0.2, FINTIM=10.0
PRTPLT U, X1, X2END PARAMETER A=100.0ENDSTOP
Modeling and Simulation D.P.F Möller
2.4.1 Example Radioactive Decay of Cesium
Consider a tank containing a certain quantity of a radioactive material, e.g. isotope Cesium 132. Such radioactive material decays, the mass ofthe material changes as radiation is emitted. On the basis of statistical assumptions about the radioactive decay process it is usually assumed that the rate at which the mass decays is proportional to the mass itself.Assuming that radioactive material can be added to the tank at the rate r, the change in the mass m of the radioactive material in the tank is described by
dm/dt = - K*M + rwhere K is a constant depending on the properties of the radioactive material. This simple ODE is in state form: to be consistent with the notation used previously define the state variable x = m and input variable u = r. The output variable y is the mass m of cesium in the tank. Thus the state model is
dx/dt = - K*x + uy = x
Modeling and Simulation D.P.F Möller
2.4.1 Example Radioactive Decay of Cesium
Our objective in the example is to analyze the response properties of the process so that the relation between the rate at which radioactive materi-al is added to the tank and the mass of radioactive material in the tank can be clarified.In this simple example it is possible to determine an analytical expresionfor the general response function. Assuming the initial state is M and u(t) for t > 0 is the input function, then the transform of the state equation leads to
sX – M = - K*X + U
where U(s) and X(s) are Laplace transforms of u(t) and x(t) so that
X = M / (s+K) + u / (s+K)and
y(t) = x(t) = e-Kt M + ∫e-K(t-τ) u(τ)dτ
Modeling and Simulation D.P.F Möller
2.4.1 Example Radioactive Decay of Cesium
Thus the impulse response or weighting function is
g(t) = e-Kt
and the transfer function is
G(s) = 1 / (s+K)
Modeling and Simulation D.P.F Möller
2.4.1 Example Radioactive Decay of Cesium
Since K > 0 the system is stable.
Now consider the response to constant input u(t) = R for t > 0, where radioactive material is adder at a constant rate. The response is thus
y(t) = e-Kt M – R/K* e-Kt + R/K * e-Kt
and
y(t) → R/K as t →∝
i.e. the mass of radioactive material in the tank tends to a constant value independent of the initial mass M.
Modeling and Simulation D.P.F Möller
2.4.1 Example Temperature in a Building
Temperature in a Building is considered where the outside air surroun-ding the building is at a generally different temperature than the building.
The temperature inside the building is considered to be uniform through-out, say at temperature T. The air outside the building is considered to be at a uniform and constant Temperature Ta.
Heat can be generated within the building by operation of a furnace, which is assumed to supply heat uniformly to the building at the rate Q.
Our interest is to relate the rate at which the furnance supplies heat to the building, considered as the input,to the temperature of the building, considered as the output.
Modeling and Simulation D.P.F Möller
2.4.1 Example Temperature in a Building
The basic physical relationship here is that the total rate of change of heat within the building, given by
m*CP (dT/dt)
where m: mass of the air in the building, and C: heat capacity, equals the rate at which heat is supplied by the furnace Q plus the rate at which heat is transferred to the building from the surrounding air. But the rate of heat transfer into the building from the surrounding air is proportional to the temperature difference between the building and the surrounding air, namely Ka(T-Ta) for constant Ka.
Modeling and Simulation D.P.F Möller
2.4.1 Example Temperature in a Building
Thus, the rate of change of temperature is given by
m*CP* dT/dt = - Ka(T-Ta) + Qor
dT/dt = - Ka/(m*CP)*(T-Ta) + Q/(m*CP)or
dT/dt = - 1/τ (T-Ta) + K*Q
where τ = Ka / m*CP, and K = 1/ m*CP
Modeling and Simulation D.P.F Möller
2.4.1 Example Temperature in a Building
Assuming that the surrounding air is at constant temperature Ta it is convenient to choose the temperature difference x = T-Ta as the state variable the input variable u = Q, and the output variable y = T; thus the state model is given by
dx/dt = - 1/τ *x * k*u
y = x + Ta
Note that since y = x + Ta these equations are not of the form considered previously; however with minor modifications this ideas are applicable here.
Modeling and Simulation D.P.F Möller
2.4.1 Example Temperature in a Building
It’s a relatively simple matter to determine an exact analytical expression for the time response by taking the transform of the state equation. Assuming the initial state is (T0-Ta) and the input is u(t) for t > 0 then
sX - (T0-Ta) = - 1/τ * X + K*U
where U(s) and X(s) are L-transforms of u(t) and x(t)
X = (T0-Ta) / (s + 1/τ) + K*U / (s + 1/τ) thus
x(t) = e-t/τ (T0-Ta) + ∫e-(t-λ)/τ K*u(λ)dλ
consequently the output response is
y(t) = Ta + e-t/τ (T0-Ta) + ∫e-(t-λ)/τ K*u(λ)dλ
Modeling and Simulation D.P.F Möller
2.4.1 Example Temperature in a Building
Due to the presence of the constant Ta ii is not possible to define an im-pulse response function or a transfer function with input u and output y.
g(t) = e-t/τ K
is the impulse response function, for the related system with input u and output y-Ta
Similarly the transfer function from u to y-Ta is
G(s) = K / (s + 1/τ)
Modeling and Simulation D.P.F Möller
2.4.1 Example Temperature in a Building
The zero input response is
y(t) = Ta + e-t/τ (T0-Ta)
Thus, if no heat is supplied to the building by the furnace then the temperature of the building tends to the temperature of the surrounding air, no matter what is the initial temperature in the building. The rate at which this change occurs is characterized by the parameter τ, which is called time constant of the building
Modeling and Simulation D.P.F Möller
2.4.1 Example Temperature in a Building
Now consider the case where the furnace is in continual operation and transfers heat to the building at a constant rate so that u(t) = Q for t > 0. Then, from the above expression for the output response it is easily de-termined that
y(t) = Ta + e-t/τ (T0-Ta) + τ*K*Q (1- e-t/τ )
Thus if heat is transferred to the building by the furnace at a constant rate the temperature of the building satisfies
y(t) → Ta + τ*K*Q as t →∝
That is, the ultimate temperature of the building exceeds the outside temperature by the quantity τ*K*Q
Modeling and Simulation D.P.F Möller
2.4.1 Example Temperature in a Building
Consider τ= 5, Ta = 0, K = 0.05, than the temperature in the building during a 2 hour time period (100 time steps) , if the initial temperature in the building is assumed being 0oF, can be simulated.
What is the temperature in the building during a 2 hour time period if the initial temperature in the building is 65oF and the furnace, which supplies heat to the building, is switched on and of every 30 minutes?
Modeling and Simulation D.P.F Möller
2.4.1 Example RC NetworkIn this case study example a simple electrical network is examined Which contains a single ideal resistor and a single ideal capacitor.
The input is voltage ei applied at the indicated terminals; it is assumedthat the applied voltage source ei has zero impedance. The output of thenetwork is the voltage eo across the resistor.
Let Q denote the charge on the capacitor and let I denote the current through the capacitor; then the total voltage drop in the single loop is
Q/C + R*I – ei = 0
with C as capacitance and R as resistance of the circuit. The charge and current relationship is
dQ/dt = I
Modeling and Simulation D.P.F Möller
2.4.1 Example RC NetworkWe choose the charge Q on the capacitor as state variable x; the inputvariable u = ei , and the output variable y = eo = RI. Thus the state model for the RC-network is given by
dx/dt = - 1/RC * x + 1/R * u
y = - 1/C * x + uThe objective is to relate the response properties of the output voltage to the initial state of the network and to the input voltage.The response properties of the system are now examined. It is possible to determine an expression for the general response as follows. Taking the transform of the state equation, assuming Qo is the initial state and u (t), t > 0 is the input, obtain
sX – Q0 = - 1/RC * X + 1/R * Uwhere U (s) and X (s) are Laplace transform of u (t) and x (t) , so that
X = Q0 / (s+1/RC) + U / [R(s+1/RC)]
Modeling and Simulation D.P.F Möller
2.4.1 Example RC Networkand consequently
x(t) = e-t/RC Q0 + ∫e-(t-τ)/RC [u(τ)]/R *dτand
y(t) = - Q0/C* e-t/RC – 1/RC ∫c e-(t-τ)/RC u(τ)dτ + u(t)
The transfer function for the network is given by
G(s) = s / [s + 1/RC ]
Since RC > 0 the system is stable.
Now consider the response to a sinusoidal input voltage u (t) = ei coswt for t > 0. Then the output is given by
y(t) = - Q0/C* e-t/RC – ei/RC ∫c e-(t-τ)/RC cos ωτ dτ + ei cos wt
Modeling and Simulation D.P.F Möller
2.5 Second Order Linear State Space ModelsLinear second order state space models can be expressed in the form
with u as the input variable, y as the output variable and x1 and x2 as state space variables. The state space model is defined by the constants
a11, a12, a21, a22 , b1, b2, c1, c2.
A block diagram interconnection with the Laplace transform 1/s is denoted to the integration operator. It should be noted that the implicit feedback structure of the state space equations is obvious from the block diagram.
,12121111 ubxaxadtdx
++=
2211
22221212 ,
xcxcy
ubxaxadtdx
+=
++=
Modeling and Simulation D.P.F Möller
2.5 Second Order Linear State Space Models
Modeling and Simulation D.P.F Möller
2.5 Second Order Linear State Space Models
Supposing that U(s) denotes the Laplace transform of u(t), Y(s) denotes the Laplace transform of y(t) and X(s) denotes the Laplace transform of x(t). Then from the state space equations we obtain
sX1 = a11 X1 + a12 X2 + b1 U
sX2 = a21 X1 + a22 X2 + b2 U
Y = c1 X1 + c2 X2
where the capital letters denote transforms of the correspondingvariables.
Modeling and Simulation D.P.F Möller
2.5 Second Order Linear State Space ModelsThus
and
Consequently
is the so called transfer function; the transform of the zero state output response is the product of the transfer function and the transform of the input function.
( )[ ]( )( ) 21122211
12121221 aaasas
UbabasX
−−−
+−=
( )( ) 21122211
2111212
])([aaasasUbasba
X−−−
−+=
.))((
])([])[(
21122211
21112122121221 Uaaasas
basbacbabascY
−−−−+++−
=
21122211
21112122121221
))((])([])[()(
aaasasbasbacbabascsG
−−−−+++−
=
Modeling and Simulation D.P.F Möller
2.5 Second Order Linear State Space ModelsThe denominator polynomial of the transfer function
is called the characteristic polynomial of the system. The zeros of this polynomial are called the characteristic zeros of the system; they are also the poles of the transfer function. It can be shown that if the real part of the characteristic zeros, which may be complex, are negative then the zero input response always tends to zero; the system is said to be stable. If this property does not hold then the system is said to be unstable.
Assuming that there are no common factors between the numerator polynomial and the denominator polynomial in the transfer function, it is clear that the state equations indicated, with two state variables, is a minimal state realization. One state variable would clearly not be sufficient to obtain a state realization while any state realization with more than two state variables would not be minimal.
21122211 ))(()( aaasassd −−−=
Modeling and Simulation D.P.F Möller
2.5 Second Order Linear State Space Models
To make the analysis somewhat simpler consider a special set of second order linear state equations, with constant parameters defined by
bw ,, 0ξ
.
,2
,
1
12020
2
21
xy
buxwxwdtdx
xdtdx
=
+−−=
=
ξ
Modeling and Simulation D.P.F Möller
2.5 Second Order Linear State Space ModelsSuch a special form occurs quite commonly and can be analysed rather easily. The parameter is usually referred to as the damping ratio of the system and is referred to as the natural frequency of the system. The transfer function is given by
and the characteristic polynomial is
ξ
0w
200
2 2)(
wswsbsG
++=
ξ
.2)( 200
2 wswssd ++= ξ
Modeling and Simulation D.P.F Möller
2.5 Second Order Linear State Space ModelsAssuming the system is always stable. If the characteristic zeros are
complex; if ξ > 1 the characteristic zeros are real.The zero input response is first examined; in this rather simple case it is not too
difficult to determine the exact state responses using the method of Laplacetransforms. Taking the transforms of the state equations obtain
so that
0>ξ 10 >< ξ
,2)0(,)0(
1202022
211
XwXwxsXXxsX
−−=−
=−
ξ
.2
)0()0(
,2
)0()0()2(
200
21
202
2
200
2101
wswsxwsx
X
wswsxxws
X
++−
=
++++
=
ξ
ξξ
Modeling and Simulation D.P.F Möller
2.5 Second Order Linear State Space Models
The state responses can be determined by taking the inverse transforms. The state response x1(t), if 0 < ξ < 1, is given by
and if the state response is given by
( )( );1sin
1
)0()0(1cos)0()(
202
0
102
2011
0
0
twew
xwxtwextx
tw
tw
ξξ
ξξ
ξ
ξ
−−
++
−=
−
−
1>ξ
( )
( ) .1
20
12
02
1
20
212
01
20
20
12
)0(1)0(
12
)0()0(1)(
tw
tw
ew
xwx
ew
xxwtx
−−−
−+−
−
−+++
−
−−−−=
ξξ
ξξ
ξ
ξξ
ξ
ξξ
Modeling and Simulation D.P.F Möller
2.5 Second Order Linear State Space Models
Also
Even in this case the zero input response is a rather complicated function of the initial state and In order to make this dependence more explicit it is convenient to plot, for a fixed initial state one state function versus the other state functionCurves in the phase plane corresponding to solutions of the state equations are called trajectories. Some typical trajectories in the phase plane are shown for two different values of the damping ratio in the following Figure.
).)(()( 12 tdtdxtx =
)0(1x ).0(2x
)(2 tx ).(1 tx
Modeling and Simulation D.P.F Möller
2.5 Second Order Linear State Space Models
Modeling and Simulation D.P.F Möller
2.5 Second Order Linear State Space ModelsIf the damping ratio is less than one the trajectories are of the form of spirals since the characteristic zeros are complex; if the damping ratio exceeds one then the trajectories are of nodal type since the charac-teristic zeros are negative.The arrows on the trajectories indicate the change in the values of the state variables as time increases. Since each trajectory is para-meterized by time, the time parameter could be indicated along the trajectory; this is usually omitted however. Phase plane is a rather simple graphical way of illustrating the qua-li-tative dependence of the zero input response on the initial state. In this case the trajectories in the phase plane were determined from the time responses directly; this is usually very difficult. In many ca-ses it is possible to determine, the form of the trajectories without use of the time responses. Use of the phase plane as a tool for under-standing the zero input response is particularly valuable for systems which can be described by the two state variables x1 and x2.
Modeling and Simulation D.P.F Möller
2.5 Second Order Linear State Space ModelsNow the response for several standard input functions should be determined. First consider a constant input function for Conditions for an equilibrium state are that and so that define an equilibrium state. Thus if and then and for all ; and for all If
then the zero state response can be determined as
so that as If then the zero state response can be determined as
so that as
utu =)(
.0≥t
01 =dtdx 02 =dtdx 0, 2201 == xwubx
201 )0( wubx =
0)0(2 =x201 )( wubtx = 0)(2 =tx ;0≥t
201 )( wubty =
.0≥t
10 << ξ
( )( ),1sin
1
1cos)(
2022
0
202
020
0
0
twew
ub
twewub
wubty
tw
tw
ξξ
ξ
ξ
ξ
ξ
−−
−
−−=
−
−
( )
( )tw
tw
ew
ub
ew
ubwubty
−+−
−−−
−+−+
−−−+=
1
2220
1
2220
20
20
20
112
112)(
ξξ
ξξ
ξξξ
ξξξ
201 )( wubty =
.∞→t
( ) ( )tweandtwe twtw 20
20 1sin1cos 00 ξξ ξξ −− −−
1=ξ
Modeling and Simulation D.P.F Möller
2.5 Second Order Linear State Space ModelsIf so that the characteristic zero are real, then the responses are purely exponential in form. If the response is said to be under damped; if the response is said to be over damped; if the response is said to be critically damped.
The form of some typical responses to a constant input, showing the dependence on the damping ratio, are shown in the following figures. The damping ratio is generally considered to correspond to the “fastest” response; it represents a compromise between overshoot and rise time.
10 << ξ
1>ξ
1>ξ1=ξ
707.0=ξ
* Transient response of the nonlinear dynamic system showing the influence of the damping factor
* Impulse response functions, showing the influence of the damping ratio
* Amplitude (top) and phase (bottom) as function of the damping ratio
Modeling and Simulation D.P.F Möller
2.5 Second Order Linear State Space Models
Modeling and Simulation D.P.F Möller
2.5 Second Order Linear State Space Models
Modeling and Simulation D.P.F Möller
2.5 Second Order Linear State Space Models
Modeling and Simulation D.P.F Möller
2.5.1 Second Order Linear State Space Models Example 1Two tanks contain a salt solution; assume V1 and V2 are the Volumes of the two tanks and that the two tanks are interconnected.
The solution of the first tank is pumped to the second tank at the constant flow rate Q1; the solution in the second tank is pumped back to the first tank at the constant flow rate Q2. Assume the net flow is from the first to the second tank. Assuming that each tank remains full the external flow rate into the first tank and out of the second tank is necessarily Q1 – Q2. It is assumed that there is a salt solution in each tank, at a uniform concentration due to complete mixing within each tank. The external inflow added to the first tank contains a salt solution at a certain concentration C which is taken to be the input variable. The output is taken to be the concentration of the salt withdrawn from the second tank.
The system may be characterize the output concentration as a function of the input concentration and the initial amount of salt in each tank.
Modeling and Simulation D.P.F Möller
2.5.1 Second Order Linear State Space Models Example 1Let S1 and S2 be the mass of salt in each tank; then the total rate of changeof mass of salt in the first tank is the rate at which salt is added to the first tank minus the rate at which salt is withdrawn from the first tank, I.e.
dS1/dt = - Q1*(S1 / V1) + Q2*(S2 / V2) + (Q1 – Q2)*C
Similarly, the total rate of change of mass of salt in the second tank is the rate at which salt is added to the second tank minus the rate at which salt is withdrawn from the second tank, i.e.,
dS2/dt = Q1*(S1 / V1) - Q2*(S2 / V2) - (Q1 – Q2)*(S2 / V2)
The above two equations describing the relation between physical variables in the process have been determined from the physical considerations, na-mely that mass is conserved. It is assumed that Q1 > 0, Q2 > 0 and that Q1 – Q2 > 0. Physically, it is required that C > 0 and that S1 > 0 and S2 > 0always.Clearly the masses of salt in each tank serve as state variables so define x1 = S1 and x2 = S2; the input variable u is the concentration C of salt added to the first tank; the output variable y is the concentration of salt in the se-cond tank, S2 / V2.
Modeling and Simulation D.P.F Möller
2.5.1 Second Order Linear State Space Models Example 1The state equations x1 and x2 for the physical process are
dx1/dt = - (Q1 / V1)*x1 + (Q2 / V2)*x2 + (Q1 – Q2)*u
dx2/dt = (Q1 / V1)*x1 - (Q2 / V2)*x2
y = (1 / V2)*x2
The above equations describing clearly a linear second order system.
Consider the mixing of a salt solution as described may be Q1 = 10, V1 = 5, Q2 = 5 and V2 = 10Assume C(t) = 0 for t> 0, and the initial amounts of salt in the two tanks are S1 = 5 and S2 = 0.Assume C(t) = 0.1 for 0 < t < 10, and C(t) = 0.01 for t > 10, the initial amounts of salt in the two tanks are S1 = 0 and S2 = 0.Consider V1 = 10, V2 = 5 and Q1 – Q = 2
Modeling and Simulation D.P.F Möller
2.5.1 Second Order Linear State Space Models Example 2The operational considerations for a general DC motor will be investigated.
A DC motor is essential a device for converting electrical energy into mechanical, or rotational, energy. The basic ingredients of the motor are an armature circuit and a field circuit; these circuits are coupled in such a way that a torque is produced on the motor shaft.
if ia
vf Te ω va
The voltage applied to the field and armature circuits are vf and va respecti-vely; if and ia are the current in the field and armature circuits respectively. The torque generated by the motor is Te and ωis the motor speed. In the field circuit
-vf + Rf * if + Lf * dif / dt = 0
where Rf and Lf are the field resistance and inductance.
Modeling and Simulation D.P.F Möller
2.5.1 Second Order Linear State Space Models Example 2In the armature circuits there is resistance Ra and inductance La; there is a voltage drop in the armature circuit which is proportional to the product of the motor speed and the field current; thus
-va + Ra*ia + La*dia / dt + B*ω*if = 0
where B is an electromechanical constant for the motor. The field current is clearly independent of the armature current by the armature current does depend on the field current and also the motor speed is indicated. Finally, the torque Te generated by the motor is assumed to be proportional to the product of the field current and the armature current to the equation
Te = B*ω*if
In terms of deriving a realistic model for the motor it is necessary to consider the rotational motion of the motor shaft. It may be assumed that the inertia of the motor shaft, as well as any external load, is J; and that there is a viscous damping torque which is proportional to the motor speed where c is the damping coefficient. Thus
J*dω/dt = - c*ω + Te.
Modeling and Simulation D.P.F Möller
2.5.1 Second Order Linear State Space Models Example 2The equations derived constitute the basis for the model of the DC motor. The external input variables are the applied field and/or armature voltages; the variables of interest are the field and/or armature currents and the motor speed. A careful analysis of the above equations is quite difficult since se-veral of the equations involve products of the variables and hence nonlinear equations, which is really a task for simulation. Two cases are possible: -constant armature current-Constant field currentLet´s assume that armature current is maintained at a constant value. Such operation is referred to as a field controlled DC motor. From the previous equations it follows that
-vf + Rf*if + La*dif / dt = 0and
J*dω/dt = - c*ω + B*I*if
while ia = I are the descriptive equations for the motor. It is an easy matter to choose the state variables as the field current x1 = if and the motor speed x2 = ω. The input variable u is the applied field voltage vf; the output variable y is the motor speed ω.
Modeling and Simulation D.P.F Möller
2.5.1 Second Order Linear State Space Models Example 2The state equation can be written as:
dx1/dt = -Rf/Lf * x1 + u/Lf
dx2/dt = - c/J * x2 + (B*Ia / J) * x2
The state equations derived a second order linear state equations for the field controlled DC motor.
Consider the following parameters as a priori information availableRf = 3.3Ra = 0.75Lf = La = 0.1vf = 10cos360t
Modeling and Simulation D.P.F Möller
2.6 Higher Order Linear State Space Models
Consider linear state equations of the form
with u as the input variable, y as the output variable and x1 ,…, xn as state variables, where n > 2. In case where more than two state variables are required, a deteiled analysis of the response properties of the system is usually difficult; simulation has become quite involved and the dependence of the output response on the initial state involved and the initial function may be quite complicated, but can be investigated using simulation.The transfer function is necessarily the ratio of two polynominal func-tions
G(s) = n(s) / d(s)
,11111 ubxaxadtdx
nnn ++=
nn
nnmnn
xcxcy
ubxnaxadtdx
+=
++=
11
11 ,
Modeling and Simulation D.P.F Möller
2.6 High Order Linear State Space Models
Case Study Example: Automobile Suspension System
The mass m1 represents one quarter of the mass of the automobile frame m2, represents the effective mass of the wheel. The constant k1 is the stiffness of the suspension spring, k2 is the stiffness constant for the tire and µ is the damping constant of the shock absorber. Assuming there is some reference level for the ground the car and wheel assembly define an equilibrium level. Then as measured from this equilibrium level, q1 denotes the vertical displacement of the automobile frame, i.e., of the mass m1, and q2 denotes the vertical displacement of the wheel, i.e.; of the mass m2.
Modeling and Simulation D.P.F Möller
2.6 High Order Linear State Space Models
Case Study Example: Automobile Suspension SystemThe input is assumed to be the variable qi which is the vertical displace-ment of the bottom of the tire due to the road irregularities, as measured from the ground reference level. The bottom of the tire is assumed to remain in contact with the ground. Using the simple spring-mass-damper model shown the mathematical equations which describe the motion of the suspension system are obtained by applying Newton’s law to each mass in the system. This leads to the equations
( )
( ) ( )
.
,
21
2112222
2
2
212112
12
1
−−
−+−−=
−−−−=
dtdq
dtdq
qqkqqkdtqdm
dtdq
dtdqqqk
dtqdm
i
µ
µ
Modeling and Simulation D.P.F Möller
2.6 High Order Linear State Space Models
Case Study Example: Automobile Suspension System
It is natural to choose the displacements and velocities of each mass as the state variables, i.e., x1 = q1, x2 = dq1/dt, x3 = q2, x4 = dq2/dt. The input variable u is the displacement of the road surface qi; the output variable y is the displacement of the automobile frame q1.The resulting state model is
( ) ( )
( ) ( ) ( )
.
,
,
,
1
422
312
13
2
24
,43
4,21
311
12
21
xy
xxm
xxmkux
mk
dtdx
xdtdx
xxm
xxmk
dtdx
xdtdx
=
−+−−−−=
=
−−−−=
=
µ
µ
Modeling and Simulation D.P.F Möller
2.6 High Order Linear State Space Models
Case Study Example: Automobile Suspension System
The automobile suspension model is fourth order linear state equations. It is exceedingly difficult to determine exact analytical expressions for the response functions in terms of the given parameters. However, it is possible to determine certain qualitative features of the response proper-ties. The transfer function of the system can be determined by talking the transform of the four state equations, assuming the initial state is zero; then by solving the resulting four algebraic equations an expression for the transform of the output can be obtained as a function of the transform of the input, given by
Thus the characteristic polynomial is
( )( )( ) ( )
.)( 2121
221
21
12
kskkssmkssmksksG
+−++++++
=µµµ
µ
( )( ) ( ) .)( 2121
221
21 kskkssmkssmsd +−+++++= µµµ
Modeling and Simulation D.P.F Möller
2.6 High Order Linear State Space Models
Case Study Example: Automobile Suspension System
Since the characteristic polynomial is of degree four it is not possible to determine explicitly the characteristic zeros of the polynomial. But the stability can be checked using the Routh-Hurwitz criteria; each coefficient in the characteristic polynomial is positive and the Routh-Hurwitz array is
( )( )
( )( )
( )00
00
0
0
21
212
2211
22
21
2121
212
2211
221
212112121
kkmkmmk
km
kkmm
mkmmk
kmmkkkmkmmmm
++
+++
++
µ
µµ
Modeling and Simulation D.P.F Möller
2.6 High Order Linear State Space Models
Case Study Example: Automobile Suspension System
Since each term in the first column of the Routh-Hurwitz array is positive it follows that all characteristic zeros have negative real part and the sys-tem is stable.
Consequently, for any initial state the zero input response always tends to zero. This fact certainly agrees with our expectation for the responses of an automobile suspension system.
Considering the response of the automobile suspension to a step input, e.g., as characterized by the automobile running over a curb. Suppose that u(t) = u for t > 0; then the transform of the zero state response is given by
+=
su
sdkskY
)()( 12 µ
Modeling and Simulation D.P.F Möller
2.6 High Order Linear State Space Models
Case Study Example: Automobile Suspension System
which can be written as
where is a polynomial of degree three or less. Thus, since the system is stable it follows that the zero state response to step input satisfies
in fact, for any initial state the response to a step input satisfies
,)()(
sdsp
suY +=
;)( ∞→→ tasuty
;)( ∞→→ tasuty
Modeling and Simulation D.P.F Möller
2.6 High Order Linear State Space Models
Case Study Example: Automobile Suspension System
Consider the response of an automobile suspension system to a sinuso-idal input function, e.g. characterized by the automobile running over a uniformly bumpy road. Suppose that u(t) = u cosωt for t > 0. The transform of the zero state response is
Y = [ k2 (µ s + k1) / d(s) ] [u s / s² + ω² ]
It is possible to determine the inverse transform of this expression, al-though it is quite involved. It is much easier to recognize that, since the system is stable, the zero state response satisfies
as t →∝, where For any initial state
as t →∝.
)cos()( owtuMty /+→
).()( )( jwGewM woj =/
)cos()( owtuMty /+→
Modeling and Simulation D.P.F Möller
2.6 High Order Linear State Space Models
Case Study Example: Automobile Suspension System
The frequency response functions M(ω) and Φ(ω) are determined from
After some rather complicated complex algebra it can be determined that
( ).
)()( 12)( 1
jwdkwjk
ewM woj +=/
µ
[ ]( )( )[ ] ( )[ ]
( )( )( )[ ] ( )[ ] .)(tan
,)(
2212
22211
222
2111
222
31
21
22212
22211
222
211
2221
22
wmmkwwmkwmkwmkkwmkwmw
wmmkwwmkwmkwmkwkkwM
+−+−−−
−−=
+−+−−−
+=
µ
µφ
µ
µ
Modeling and Simulation D.P.F Möller
2.6 High Order Linear State Space Models
Case Study Example: Automobile Suspension System
It can be seen that the frequency response functions M(ω) and Φ(ω) have the following general properties: if ω = 0 then M(ω) = 1, Φ(ω) = 0; for 0 < ω < √k2/m2and Φ(ω) = - π, for ω > √k2/m2, -π < Φ(ω) < 3π/2; as ω → ∝, M(ω) → 0 and Φ(ω) →3π/2. The Bode plot of these frequency response functions are shown in the following figures.
Modeling and Simulation D.P.F Möller
2.6 High Order Linear State Space Models
Case Study Example: Automobile Suspension System
The Bode plots make it possible to infer the effects of the frequency ωdetermined by the properties of the road and seed of the automobile, on the displacement of the frame of the automobile. Such information is particularly valuable in evaluation or design of a suspension system.