This action might not be possible to undo. Are you sure you want to continue?

**tex - 12/25/2008 3:19am Page 13
**

CHAPTER

2

Modeling

and Simulation

2.1 MODELING BASED ON FIRST PRINCIPLES

2.2 STATE SPACE MODEL AND LINEARIZATION

2.3 TRANSFER FUNCTIONS AND IMPULSE RESPONSES

2.4 SIMPLIFYING BLOCK DIAGRAMS

2.5 TRANSFER FUNCTION MODELING

2.6 MATLAB MANIPULATION OF LTI SYSTEMS

2.7 SIMULATION AND IMPLEMENTATION OF SYSTEMS

2.8 MISO AND SIMO SYSTEMS

2.9 MODELING OF CLOSED-LOOP SYSTEMS

2.10 CASE STUDIES

2.11 NOTES AND REFERENCES

The purpose of modeling is to understand the relationships among various physical

variables in a system, in particular that between the input and the output of the

system. Such a relationship is called a mathematical model. There are several

ways to obtain a mathematical model. The ﬁrst is to write down a complete set of

equations relating the diﬀerent variables in the system based on physical laws. The

equations are usually diﬀerential equations. This method is called ﬁrst principle

modeling. The second is to ﬁnd out the relationship between input and output,

as well as other signals, from a set of experimental data. This method is called

system identiﬁcation. In most cases, modeling is done by combining the above

two methods. It happens quite often that the structure of the model is determined

from physical principles and the parameters are obtained from experiments.

In general, modeling is time consuming, problem dependent, and theoretically

underdeveloped, but a very important step toward controller design.

In this chapter, only ﬁrst principle modeling will be covered. We will dis-

cuss, using examples, the modeling of electrical, mechanical, and electromechanical

systems. These are the systems that we are most likely to meet in applications.

However, by no means do they exhaust all possible systems. Mathematical models

13

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 14

14 Chapter 2 Modeling and Simulation

may take diﬀerent forms. We will see how we can process or simplify a model to

make it easy to use and how to convert a model from one form to another.

2.1 MODELING BASED ON FIRST PRINCIPLES

In this section, we will discuss the modeling of various types of systems using

examples.

2.1.1 Electrical systems

We will basically consider two types of circuits: one consisting of active RLC cir-

cuits containing possibly lumped resistors, inductors, capacitors, ideal sources, and

controlled sources; and the other one consisting of circuits containing operational

ampliﬁers.

First let us consider a simple RLC circuit as shown in Figure 2.1, where

the diamond symbol labeled gv

1

means a voltage-controlled current source whose

current is proportional to the voltage across the capacitor C

1

. The input and output

of the system are v

i

(t) and v

o

(t), respectively.

ϳ

R

1

C

1

C

2

R

2

gv

1

v

2

L

i

ϩ

Ϫ

v

1

ϩ

Ϫ

v

i

ϩ

Ϫ

v

o

ϩ

Ϫ

FIGURE 2.1: A simple RLC circuit.

The use of intermediate variables in addition to the input and output greatly

facilitates the generation of the diﬀerential equation model. In an RLC circuit,

we usually choose capacitor voltages and inductor currents as the intermediate

variables. Let the number of such intermediate variables be n. Then we can write

down n independent diﬀerential equations using Kirchhoﬀ’s current law (KCL) and

Kirchhoﬀ’s voltage law (KVL), applied to nodes and loops involving inductors and

capacitors. Here, by independent equations we mean that any one of them cannot

be generated from the others among the equations obtained.

Referring back to the RLC circuit shown in Figure 2.1, we choose v

1

(t), v

2

(t),

and i(t) as intermediate variables. Then applying KCL to the node connecting R

1

,

C

1

, and L gives

C

1

dv

1

(t)

dt

=

v

i

(t) −v

1

(t)

R

1

−i(t). (2.1)

Applying KCL to the node connecting to L, C

2

, R

2

, and the controlled source gives

C

2

dv

2

(t)

dt

= i(t) −gv

1

(t) −

v

2

(t)

R

2

. (2.2)

Applying KVL to the loop containing C

1

, L, and C

2

gives

L

di(t)

dt

= v

1

(t) −v

2

(t). (2.3)

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 15

Section 2.1 Modeling Based on First Principles 15

The output should be expressed as a function of the intermediate variables and the

input variable. For the RLC circuit at hand, the output v

o

(t) is simply one of

the intermediate variables,

v

o

(t) = v

2

(t). (2.4)

The diﬀerential equations (2.1), (2.2), and (2.3), as well as the algebraic equation

(2.4), give a model of the RLC circuit.

The model can also be organized in the following matrix form

C

1

0 0

0 C

2

0

0 0 L

¸

¸

˙ v

1

(t)

˙ v

2

(t)

˙ı(t)

¸

¸

=

−1/R

1

0 −1

−g −1/R

2

1

1 −1 0

¸

¸

v

1

(t)

v

2

(t)

i(t)

¸

¸

+

1/R

1

0

0

¸

¸

v

i

(t)

(2.5)

v

o

(t) =

0 1 0

v

1

(t)

v

2

(t)

i(t)

¸

¸

. (2.6)

Note that we have used the alternative notation ˙ x(t) to denote the derivative

dx(t)

dt

.

One may premultiply by the inverse of the matrix on the left-hand side of (2.5) both

sides of the equation. We then obtain

˙ v

1

(t)

˙ v

2

(t)

˙ı(t)

¸

¸

¸

¸

¸

¸

=

−

1

R

1

C

1

0 −

1

C

1

−

g

C

2

−

1

R

2

C

2

1

C

2

1

L

−

1

L

0

¸

¸

¸

¸

¸

¸

¸

v

1

(t)

v

2

(t)

i(t)

¸

¸

¸

¸

¸

¸

+

1

R

1

C

1

0

0

¸

¸

¸

¸

¸

¸

v

i

(t) (2.7)

v

o

(t) =

0 1 0

v

1

(t)

v

2

(t)

i(t)

¸

¸

. (2.8)

As we will see later, the model of this form is called a state space model.

Next let us consider circuits containing operational ampliﬁers (op-amps),

which are simply called op-amp circuits. Such circuits have wide applications.

We often use such a circuit to realize a set of diﬀerential equations or a system.

An ideal op-amp, as shown in Figure 2.2, is an ampliﬁer with inﬁnite gain,

inﬁnite input impedance, and zero output impedance.

A

Ϫ

ϩ

v

1

(t)

v

o

(t)

v

2

(t)

FIGURE 2.2: An operational ampliﬁer.

Consider the circuit shown in Figure 2.3. This is a system with m inputs

u

1

(t), . . . , u

m

(t) and one output y(t). Owing to the inﬁnite gain of the op-amp, the

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 16

16 Chapter 2 Modeling and Simulation

R

1

R

C

A

u

1

i

i

y

N

u

m

v

a

i

a

R

m

.

.

.

.

.

. Ϫ

ϩ

FIGURE 2.3: An op-amp circuit.

node N is a virtual ground, i.e., v

a

(t) = 0. Owing to the inﬁnite input impedance

of the op-amp, the current ﬂowing into the op-amp is zero, i.e., i

a

(t) = 0. Thus we

have

i(t) =

u

1

(t)

R

1

+

u

2

(t)

R

2

+ · · · +

u

m

(t)

R

m

and

i(t) = −

1

R

y(t) −C

dy(t)

dt

.

Hence

RC

dy(t)

dt

+y(t) = −

¸

R

R

1

u

1

(t) + · · · +

R

R

m

u

m

(t)

.

If C = 0, i.e., the capacitor is disconnected, then

y(t) = −

¸

R

R

1

u

1

(t) + · · · +

R

R

m

u

m

(t)

,

i.e., the output is a negatively weighted sum of the inputs. In this case, the circuit

is called an (inverting) summing ampliﬁer. If further, m = 1, the circuit is called

an (inverting) ampliﬁer.

If R = ∞, i.e., the resistor is disconnected, then

y(t) = −

¸

1

R

1

C

t

0

u

1

(τ)dτ + · · · +

1

R

m

C

t

0

u

m

(τ)dτ

,

i.e., the output is a negatively weighted sum of the integrals of the inputs. If further,

m = 1, then the output is proportional to the integral of the input. In this case,

the circuit is called an (inverting) integrator.

Operational ampliﬁers are the building blocks of most electronic systems ex-

isting today. In an abstract level, we do not wish to keep track of the inverting

eﬀect and the coeﬃcient of the integrators. We take pure integrators and weighted

summing ampliﬁers as the basic components. We schematically represent them

by diagrams shown in Figure 2.4. These two types of components can be used as

the building blocks of sophisticated op-amp circuits that can be used in system

simulation and implementation, as will be discussed in Section 2.7.

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 17

Section 2.1 Modeling Based on First Principles 17

y u

a

1

u

1

u

n

y

a

n

.

.

. 1

FIGURE 2.4: Schematic symbols for a summing ampliﬁer and an integrator.

2.1.2 Mechanical systems

Typical mechanical systems may involve two kinds of motion: linear motion and

rotational motion. In this section, we will look at two examples of mechanical

systems. The ﬁrst example is one with linear motion. The second example is one

with rotational motion. Of course, a general mechanical system may have both

linear and rotational motion, as will be seen in Section 2.10.

x

1

f

x

2

K

F

M

1

M

2

FIGURE 2.5: A two-cart system.

Consider two carts moving on a table, as shown in Figure 2.5. The carts,

assumed to have masses M

1

and M

2

, respectively, are connected by a spring. A

force f(t) is applied to cart M

1

and we wish to control the position of cart M

2

. An

ideal spring generates a force that is proportional to the relative displacement of

its two ends. The spring in this system is assumed to be nonideal and its eﬀect is

equivalent to the sum of an ideal spring, depicted by the symbol in the upper part of

the connection, and a friction device, depicted by the symbol in the lower part

of the connection, which generates a force proportional to the relative velocity of

its two ends. Assume that the reference points for the positions of the two carts

are chosen so that the spring is at rest when x

1

(t) = x

2

(t).

To model a mechanical system like this, we usually choose the positions of

all independent rigid bodies as the internal variables and write down the equations

according to Newton’s second law. Applying Newton’s second law to the ﬁrst body,

we obtain

M

1

d

2

x

1

(t)

dt

2

= f(t) −K(x

1

(t) −x

2

(t)) −F

dx

1

(t)

dt

−

dx

2

(t)

dt

. (2.9)

Applying Newton’s second law to the second cart, we obtain

M

2

d

2

x

2

(t)

dt

2

= K(x

1

(t) −x

2

(t)) +F

dx

1

(t)

dt

−

dx

2

(t)

dt

. (2.10)

Finally, we identify the output and relate it to the internal variables and the input.

In this case, the output is simply x

2

(t).

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 18

18 Chapter 2 Modeling and Simulation

We can also reorganize the equations into the following matrix form

¸

M

1

0

0 M

2

¸

¨ x

1

(t)

¨ x

2

(t)

+

¸

F −F

−F F

¸

˙ x

1

(t)

˙ x

2

(t)

+

¸

K −K

−K K

¸

x

1

(t)

x

2

(t)

=

¸

1

0

f(t). (2.11)

Models of the form (2.11) are very typical for mechanical systems. Such a

model is called a second-order model.

Next let us consider a pendulum shown in Figure 2.6. Here a torque τ

i

(t) can

be applied around the pivot point and we are concerned with the angle θ(t) between

the pendulum and the vertical downward direction. The length of the pendulum is

L and the mass M of the pendulum is concentrated at its tip.

M

u

FIGURE 2.6: A pendulum.

In a rotational motion, Newton’s second law takes the form

J

d

2

θ(t)

dt

2

= τ(t)

where J is called the moment of inertia, θ(t) is the angular displacement, and

τ(t) is the total torque applied.

Applying this to the pendulum system, we know that the moment of inertia is

J = ML

2

and there are two torques applied to the system: the externally applied

torque τ

i

(t), and the torque due to the gravity of the mass which is MgLsin θ(t).

Therefore, the equation governing the motion is given by

ML

2

d

2

θ(t)

dt

2

= τ

i

(t) −MgLsin θ(t).

This is a second-order diﬀerential equation. Here the input is the torque τ

i

(t) and

the output is the angle θ(t).

2.1.3 Electromechanical systems

A simple electromechanical system is an armature-controlled direct current (DC)

motor with a load, shown in Figure 2.7.

A DC motor has two sets of windings. One set is mounted on the stator

and is used to generate the magnetic ﬁeld. In an armature-controlled DC motor,

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 19

Section 2.1 Modeling Based on First Principles 19

ϳ

v

a

ϩ

Ϫ

v

b

v

e

ϩ

ϩ

Ϫ

Ϫ

J

R

a

L

a

K

f

i

a

FIGURE 2.7: An armature-controlled DC motor system.

the current to this set of windings is set to be constant so that the magnetic ﬁeld

in the motor is constant. The other set is mounted on the rotor and is used to

generate the torque through the magnetic force. The current through this winding

is controllable so a controlled torque can be obtained. When the motor shaft turns,

the magnetic ﬁeld also generates a potential in the rotor winding as a result of

the Faraday induction. This potential is called the back electro-motive force (back

emf). There are two basic relations in a DC motor. One is that the torque in the

motor shaft is proportional to the armature current via the torque constant K

t

, i.e.,

τ

m

(t) = K

t

i

a

(t).

The other is that the back emf v

b

(t) is proportional to the motor velocity ω(t) via

the back emf constant K

b

, i.e.,

v

b

(t) = K

b

ω(t).

The torque in the motor shaft then drives the load, which consists of a mass with a

moment of inertia J and a counteractive friction torque proportional to the motor

velocity via the friction coeﬃcient K

f

. Therefore, the whole DC motor system

including the armature circuit and the mechanical load can be described by the

following parameters and variables:

R

a

: armature resistance

L

a

: armature inductance

J: moment of inertia of the load

K

f

: friction coeﬃcient

K

t

: torque constant

K

b

: back emf constant

v

a

(t): armature voltage

i

a

(t): armature current

v

b

(t): back electro-motive force (back emf)

τ

m

(t): motor torque

θ(t): angular position of the motor shaft

ω(t): angular velocity of the motor shaft (=

˙

θ(t))

Applying KVL to the armature circuit, we obtain

R

a

i

a

(t) +L

a

di

a

(t)

dt

+K

b

dθ(t)

dt

= v

a

(t). (2.12)

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 20

20 Chapter 2 Modeling and Simulation

Applying the rotational version of Newton’s second law to the motor shaft, we

obtain

J

d

2

θ(t)

dt

2

+K

f

dθ(t)

dt

= K

t

i

a

(t). (2.13)

These two equations give the mathematical model of the DC motor system with

input v

a

(t) and output θ(t).

In some applications, we are concerned with the angular velocity (speed) of

the motor, instead of the angular position. Such cases are called speed control

cases. Replacing

dθ(t)

dt

by ω(t) in (2.12) and (2.13), we get the diﬀerential equation

model of a DC motor system in the speed control case.

R

a

i

a

(t) +L

a

di

a

(t)

dt

+K

b

ω(t) = v

a

(t) (2.14)

J

dω(t)

dt

+K

f

ω(t) = K

t

i

a

(t). (2.15)

These two equations give the mathematical model of the DC motor system with

input v

a

(t) and output ω(t).

Another interesting electromechanical system is a magnetic-ball suspension

system shown in Figure 2.8. The coil at the top, after being fed with current,

produces a magnetic ﬁeld. The magnetic ﬁeld generates an attracting force on the

steel ball.

M

y

R, L

i

v

ϩ

Ϫ

FIGURE 2.8: A magnetic-ball suspension system.

Here, the voltage applied to the coil v(t) is the input, the distance from the

ball to the coil y(t) is the output, and the lifting force generated by the magnetic

ﬁeld on the ball is approximately given by f(t) = K

i

2

(t)

y(t)

. The other parameters

are mass of the ball M, winding resistance R, and winding inductance L.

Applying KVL to the coil, we obtain

Ri(t) +L

di(t)

dt

= v(t).

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 21

Section 2.2 State Space Model and Linearization 21

Applying Newton’s second law to the ball, we obtain

M

d

2

y(t)

dt

2

= −K

i

2

(t)

y(t)

+Mg.

These two equations then give the mathematical model of the system. It is noted

that the variables y(t) and i(t) are involved nonlinearly in the equations and this

system is called a nonlinear system.

2.2 STATE SPACE MODEL AND LINEARIZATION

The mathematical models obtained in the previous sections consist of sets of dif-

ferential equations with diﬀerent orders and these equations involve variables other

than the inputs and outputs. For the sake of systematic study, we need to put them

in standard forms. One of the commonly used standard forms is the state space

form.

Deﬁnition 2.1. The state variables of a system are a set of independent

variables whose values at time t

0

, together with input for all t ≥ t

0

, determine

the behavior of the system for all t ≥ t

0

.

This deﬁnition looks very abstract but in many situations the state variables

can be chosen intuitively. For electrical circuits, we can always choose the voltages

across independent capacitors and the currents through independent inductors as

state variables. For mechanical systems, we can always choose the positions and

velocities of independent rigid bodies as state variables. Suppose that a diﬀerential

equation model of a system is already obtained, the variables in the diﬀerential equa-

tions are the input u(t) and the internal variables v

1

(t), . . . , v

p

(t), and the highest

order of the derivatives of v

i

(t) in the diﬀerential equations is q

i

. Then we can

choose

v

i

(t), ˙ v

i

(t), ¨ v

i

(t), . . . , v

(q

i

−1)

i

(t) i = 1, 2, . . . , p

as the state variables. In this case, the total number of state variables is

¸

p

i=1

q

i

.

After the state variables are chosen, usually named x

1

(t), x

2

(t), . . . , x

n

(t), we

put them into a vector

x(t) =

x

1

(t)

x

2

(t)

.

.

.

x

n

(t)

¸

¸

¸

¸

¸

∈ R

n

.

This vector is called a state vector. Here and in the sequel, we use bold font

letters to denote vectors (or matrices) and vector-valued (or matrix-valued) func-

tions, whereas we use normal font letters to denote scalars and scalar-valued

functions. Then the set of mixed ordered diﬀerential equations can be converted

into a set of ﬁrst-order diﬀerential equations plus an algebraic equation

˙ x(t) = f[x(t), u(t), t] (2.16)

y(t) = g[x(t), u(t), t] (2.17)

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 22

22 Chapter 2 Modeling and Simulation

where u(t) ∈ R is the input, y(t) ∈ R is the output,

f[x(t), u(t), t] =

f

1

[x(t), u(t), t]

f

2

[x(t), u(t), t]

.

.

.

f

n

[x(t), u(t), t]

¸

¸

¸

¸

¸

¸

: R

n

×R ×R →R

n

is a vector-valued function, and

g[x(t), u(t), t] : R

n

×R ×R →R

is a scalar-valued function. The number of state variables n is called the order

of the system. The set of ﬁrst-order diﬀerential equations (2.16) is called the

state equation of the system. The algebraic equation (2.17) is called the out-

put equation of the system. Together they form the state space model of the

system.

We always assume that the system starts operation at time t = 0; namely,

we assume that the input u(t) is a unilateral signal whose value before the ini-

tial time is zero. To determine the state vector x(t) from the diﬀerential equation

(2.16), the input u(t) alone is not suﬃcient. According to Deﬁnition 2.1, the ini-

tial value of the state x(0) is also needed. This initial value is called the initial

condition. To conform to our standard mathematical treatment of signals, we

also view x(t) as a unilateral function. If the initial condition is nonzero, then

x(t) has a jump discontinuity at t = 0 and its derivative ˙ x(t) contains impulse

functions.

Among the models of the systems discussed in Section 2.1, the one for the

active RLC circuit has already been put in the state space form.

EXAMPLE 2.2

For the pendulum system introduced in the last section, the diﬀerential equation

model directly obtained from Newton’s second law is

ML

2

¨

θ(t) = τ(t) −MgLsin θ(t)

with input τ(t) and output θ(t). Renaming x

1

(t) = θ(t), x

2

(t) =

˙

θ(t), u(t) = τ(t),

y(t) = θ(t), we obtain the state space model

¸

˙ x

1

(t)

˙ x

2

(t)

=

x

2

(t)

−MgLsin x

1

(t) +u(t)

ML

2

¸

¸

¸

y(t) = x

1

(t)

with

¸

x

1

(0)

x

2

(0)

=

¸

θ(0)

˙

θ(0)

.

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 23

Section 2.2 State Space Model and Linearization 23

EXAMPLE 2.3

The magnetic suspension system has the diﬀerential equation model

Ri(t) +L

di(t)

dt

= v(t)

M

d

2

y(t)

dt

2

= −K

i

2

(t)

y(t)

+Mg.

Choose x

1

(t) = i(t), x

2

(t) = y(t), x

3

(t) = ˙ y(t), u(t) = v(t), and we get the state

space model

˙ x

1

(t)

˙ x

2

(t)

˙ x

3

(t)

¸

¸

=

u(t) −Rx

1

(t)

L

x

3

(t)

−

Kx

2

1

(t)

Mx

2

(t)

+g

¸

¸

¸

¸

¸

¸

¸

y(t) = x

2

(t)

with

x

1

(0)

x

2

(0)

x

3

(0)

¸

¸

=

i(0)

y(0)

˙ y(0)

¸

¸

.

Deﬁnition 2.4. A system is said to be linear if it can be described by linear

diﬀerential equations, in particular, if the functions f and g in its state space

model are linear functions of x(t) and u(t).

For a linear system, the state space model takes the following matrix form:

˙ x(t) = A(t)x(t) +b(t)u(t)

y(t) = c(t)x(t) +d(t)u(t)

where A(t) ∈ R

n×n

is an n × n matrix, possibly depending on time t, and b(t) ∈

R

n×1

and c(t) ∈ R

1×n

are, respectively, column and row vectors depending possibly

on time t. For example, the RLC circuit in Section 2.1 is a linear system and its

state space equations were already in the matrix form as in (2.7) and (2.8)

Theorem 2.5 (Superposition Principle). Assume that a linear system has

zero initial condition. If input u

1

(t) produces output y

1

(t) and input u

2

(t)

produces output y

2

(t), then input α

1

u

1

(t)+α

2

u

2

(t) produces output α

1

y

1

(t)+

α

2

y

2

(t) for all α

1

, α

2

∈ R.

Proof. With zero initial condition, if input u

1

(t) produces output y

1

(t) and

input u

2

(t) produces output y

2

(t), then there are x

1

(t) and x

2

(t) with

x

1

(0) = 0 and x

2

(0) = 0 satisfying

˙ x

1

(t) = A(t)x

1

(t) +b(t)u

1

(t)

y

1

(t) = c(t)x

1

(t) +d(t)u

1

(t)

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 24

24 Chapter 2 Modeling and Simulation

and

˙ x

2

(t) = A(t)x

2

(t) +b(t)u

2

(t)

y

2

(t) = c(t)x

2

(t) +d(t)u

2

(t).

If we add the two state equations and the two output equations, respectively,

and deﬁne u(t) = α

1

u

1

(t) + α

2

u

2

(t), x(t) = α

1

x

1

(t) + α

2

x

2

(t), and y(t) =

α

1

y

1

(t) + α

2

y

2

(t), then we obtain x(0) = 0 and

˙ x(t) = A(t)x(t) +b(t)u(t)

y(t) = c(t)x(t) +d(t)u(t).

This implies that y(t) is the output of the system with zero initial condition

and input u(t).

Deﬁnition 2.6. A system is said to be time-invariant if it can be de-

scribed by diﬀerential equations with constant coeﬃcients, in particular, if

the functions f and g in its state space model do not depend on the time t

explicitly.

All examples of real physical systems considered so far are time-invariant

systems.

Theorem 2.7. Assume that a time-invariant system has zero initial con-

dition. Also assume that zero input generates zero output. If input u(t)

produces output y(t), then input u(t −τ) produces output y(t −τ).

A linear time-invariant (LTI) system has the following form of state space

model:

˙ x(t) = Ax(t) +bu(t)

y(t) = cx(t) +du(t)

where A ∈ R

n×n

, b ∈ R

n×1

, c ∈ R

1×n

, and d ∈ R are constant matrices.

EXAMPLE 2.8

The DC motor system is an LTI system. Indeed, in the position control case, if

we choose the state variables, input and output variables as x

1

(t) = i

a

(t), x

2

(t) =

θ(t), x

3

(t) = ω(t), u(t) = v

a

(t), y(t) = θ(t), then the state space equation can be

written as

˙ x

1

(t)

˙ x

2

(t)

˙ x

3

(t)

¸

¸

=

−

R

a

L

a

0 −

K

b

L

a

0 0 1

K

t

J

0 −

K

f

J

¸

¸

¸

¸

¸

¸

x

1

(t)

x

2

(t)

x

3

(t)

¸

¸

+

1

L

a

0

0

¸

¸

¸

¸

¸

¸

u(t)

y =

0 1 0

x

1

(t)

x

2

(t)

x

3

(t)

¸

¸

.

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 25

Section 2.2 State Space Model and Linearization 25

In the speed control case, if we choose x

1

(t) = i

a

(t), x

2

(t) = ω(t), u(t) = v

a

(t),

y(t) = ω(t), then we obtain

¸

˙ x

1

(t)

˙ x

2

(t)

=

−

R

a

L

a

−

K

b

L

a

K

t

J

−

K

f

J

¸

¸

¸

¸

¸

x

1

(t)

x

2

(t)

+

1

L

a

0

¸

¸

¸u(t)

y(t) =

0 1

¸

x

1

(t)

x

2

(t)

.

In the rest of this section, we will study how to approximate a nonlinear

system by a linear one. Such a process is called linearization.

We will deal only with time-invariant systems. Assume that a system is

described by a state space model.

˙ x(t) = f[x(t), u(t)]

y(t) = g[x(t), u(t)]

and f and g are continuously diﬀerentiable functions, i.e., f and g are suﬃciently

smooth functions.

Deﬁnition 2.9. A triple of constant vectors (u

0

, x

0

, y

0

) ∈ R×R

n

×R is said

to be an operating point of the system if

0 = f(x

0

, u

0

)

y

0

= g(x

0

, u

0

).

The physical meaning of an operating point is that if the system has initial

condition x

0

and a constant input u

0

is applied, then the state and output will stay

at constant values x

0

and y

0

, respectively, for all time, i.e.,

u(t) = u

0

, x(0) = x

0

=⇒x(t) = x

0

, y(t) = y

0

.

Since f and g are suﬃciently smooth, we can conclude that

u(t) −u

0

and x(0) −x

0

are small =⇒x(t) −x

0

and y(t) −y

0

are small.

Denote

˜ u(t) = u(t) −u

0

˜ x(t) = x(t) −x

0

˜ y(t) = y(t) −y

0

.

Replace f and g by their diﬀerentials:

˙

˜ x(t) =

∂f

∂x

x=x

0

u=u

0

˜ x(t) +

∂f

∂u

x=x

0

u=u

0

˜ u(t) + high-order terms

˜ y(t) =

∂g

∂x

x=x

0

u=u

0

˜ x(t) +

∂g

∂u

x=x

0

u=u

0

˜ u(t) + high-order terms

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 26

26 Chapter 2 Modeling and Simulation

where

∂f

∂x

=

∂f

1

∂x

1

. . .

∂f

1

∂x

n

.

.

.

.

.

.

∂f

n

∂x

1

. . .

∂f

n

∂x

n

¸

¸

¸

¸

¸

¸

,

∂f

∂u

=

∂f

1

∂u

.

.

.

∂f

n

∂u

¸

¸

¸

¸

¸

¸

,

∂g

∂x

=

¸

∂g

∂x

1

. . .

∂g

∂x

n

.

Since ˜ u(t), ˜ x(t), ˜ y(t) are small, we can neglect the high-order terms and approximate

the original system by the following linear system:

˙

˜ x(t) = A˜ x(t) +b˜ u(t)

˜ y(t) = c˜ x(t) +d˜ u(t)

where

A =

∂f

∂x

x=x

0

u=u

0

, b =

∂f

∂u

x=x

0

u=u

0

,

c =

∂g

∂x

x=x

0

u=u

0

, d =

∂g

∂u

x=x

0

u=u

0

.

This linear system is called a linearized system of the original nonlinear system.

EXAMPLE 2.10

The magnetic suspension system is a nonlinear system described by state space

equation

˙ x

1

(t)

˙ x

2

(t)

˙ x

3

(t)

¸

¸

=

u(t) −Rx

1

(t)

L

x

3

(t)

−

x

2

1

(t)

Mx

2

(t)

+g

¸

¸

¸

¸

¸

¸

¸

y(t) = x

2

(t).

A usual control problem is to lift the ball to a certain height and suspend it at that

height. Hence we wish to linearize it around an operating point with y(t) = y

0

.

To get the operating point, solve equations

0 =

u

0

−Rx

10

L

0 = x

30

0 = −

x

2

10

Mx

20

+g

y

0

= x

20

.

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 27

Section 2.3 Transfer Functions and Impulse Responses 27

This gives

u

0

= R

Mgy

0

,

x

10

x

20

x

30

¸

¸

=

√

Mgy

0

y

0

0

¸

¸

, y

0

= y

0

which means that to suspend the ball at height y

0

in the steady state, one needs

to apply a constant voltage u(t) = R

√

Mgy

0

to the coil. Denote the deviations of

the input, state, and output variables from the operating point by

˜ u(t) = u(t) −u

0

= u(t) −R

Mgy

0

˜ x(t) = x(t) −x

0

=

x

1

(t) −

√

Mgy

0

x

2

(t) −y

0

x

3

(t)

¸

¸

˜ y(t) = y(t) −y

0

.

Now, the linearized model of the deviation variables is

˙

˜ x(t) = A˜ x(t) +b˜ u(t)

˜ y(t) = c˜ x(t) +d˜ u(t)

where

A =

∂f

∂x

x=x

0

u=u

0

=

−

R

L

0 0

0 0 1

−2

g

My

0

g

y

0

0

¸

¸

¸

¸

¸

¸

¸

, b =

∂f

∂u

x=x

0

u=u

0

=

1

L

0

0

¸

¸

¸

¸

¸

¸

,

c =

∂g

∂x

x=x

0

u=u

0

=

0 1 0

, d =

∂g

∂u

x=x

0

u=u

0

= 0.

2.3 TRANSFER FUNCTIONS AND IMPULSE RESPONSES

Consider an LTI system described by state space equation

˙ x(t) = Ax(t) +bu(t)

y(t) = cx(t) +du(t).

Take the Laplace transform with zero initial conditions:

sX(s) = AX(s) +bU(s) (2.18)

Y (s) = cX(s) +dU(s). (2.19)

Now a set of diﬀerential equations in the time domain becomes a set of alge-

braic equations in the frequency domain. There are a total of n + 1 equations in

(2.18)–(2.19) and we can use them to eliminate the n variables in X(s) to obtain

an equation relating the input U(s) and the output Y (s). Linear algebra now gives

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 28

28 Chapter 2 Modeling and Simulation

a formal method of capturing this process. From (2.18), we get

X(s) = (sI −A)

−1

bU(s).

Plugging it into (2.19), we obtain

Y (s)

U(s)

= c(sI −A)

−1

b +d,

i.e., the ratio of the Laplace transform of the output over that of the input is a

ﬁxed function independent of the input.

Deﬁnition 2.11. The transfer function of an LTI system is the ratio of

the Laplace transform of the output over that of the input when the initial

condition is zero, i.e.,

G(s) =

Y (s)

U(s)

.

EXAMPLE 2.12

Let us continue to consider the DC motor system in Example 2.8. In the position

control case, the transfer function is

G(s) =

0 1 0

s +

R

a

L

a

0

K

b

L

a

0 s −1

−

K

t

J

0 s +

K

f

J

¸

¸

¸

¸

¸

¸

−1

1

L

a

0

0

¸

¸

¸

¸

¸

¸

=

K

t

/(L

a

J)

s(s +R

a

/L

a

)(s +K

f

/J) +K

t

K

b

/(L

a

J)s

=

K

t

L

a

Js

3

+ (R

a

J +K

f

L

a

)s

2

+ (R

a

K

f

+K

t

K

b

)s

.

One may feel that the inverse of the 3 × 3 matrix is hard to compute, but the

computation can be signiﬁcantly simpliﬁed if one notices that only the element in

the second row and the ﬁrst column of the inverse is needed since all other elements

will be multiplied by zero when forming the transfer function. Computing only one

element is, of course, much simpler than computing all elements in the inverse. In

the speed control case, the transfer function is

G(s) =

0 1

s +

R

a

L

a

K

b

L

a

−

K

t

J

s +

K

f

J

¸

¸

¸

¸

−1

1

L

a

0

¸

¸

¸

=

K

t

/(L

a

J)

(s +R

a

/L

a

)(s +K

f

/J) +K

t

K

b

/(L

a

J)

=

K

t

L

a

Js

2

+ (R

a

J +K

f

L

a

)s + (R

a

K

f

+K

t

K

b

)

.

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 29

Section 2.3 Transfer Functions and Impulse Responses 29

For systems with a small number of state variables, it is probably more conve-

nient to obtain the transfer function by directly manipulating the Laplace transform

of the state space model (2.18) and (2.19). For example, in the speed control case,

the Laplace transform of the state space model is

sX

1

(s) = −

R

a

L

a

X

1

(s) −

K

b

L

a

X

2

(s) +

1

L

a

U(s)

sX

2

(s) =

K

t

J

X

1

(s) −

K

f

J

X

2

(s)

Y (s) = X

2

(s).

Substitute X

1

(s) from the second equation into the ﬁrst equation and note that

Y (s) = X

2

(s) from the third equation. We then get

¸

J

K

t

s +

R

a

L

a

s +

K

f

J

+

K

b

L

a

Y (s) =

1

L

a

U(s).

Consequently,

G(s) =

Y (s)

U(s)

=

K

t

L

a

Js

2

+ (R

a

J +K

f

L

a

)s + (R

a

K

f

+K

t

K

b

)

,

the same result as the one obtained by matrix inversion.

EXAMPLE 2.13

Let us continue with Example 2.10, the magnetic suspension system. The transfer

function of the linearized model is

G(s) =

0 1 0

s +

R

L

0 0

0 s −1

2

g

My

0

−

g

y

0

s

¸

¸

¸

¸

¸

¸

−1

1

L

0

0

¸

¸

¸

¸

¸

¸

=

−2

g

My

0

1

L

s +

R

L

s

2

−

g

y

0

=

−2

√

gy

0

√

M(Ls +R)(y

0

s

2

−g)

.

The transfer function of an LTI system with a state space model is always a

ratio of two polynomials

G(s) =

b(s)

a(s)

where b(s) is called the numerator polynomial and a(s) is called the denominator

polynomial. We assume that polynomials b(s) and a(s) are coprime, i.e., they do

not have common factors.

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 30

30 Chapter 2 Modeling and Simulation

The ratio of two polynomials is also called a rational function. So the

transfer function of an LTI system with a state space model is a rational function.

We often denote a transfer function, or any rational function, in either of the

following forms

G(s) =

b

0

s

m

+b

1

s

m−1

+ · · · +b

m

a

0

s

n

+a

1

s

n−1

+ · · · +a

n

or

G(s) = K

(s −z

1

)(s −z

2

) · · · (s −z

m

)

(s −p

1

)(s −p

2

) · · · (s −p

n

)

.

The ﬁrst form is called the unfactored form and the second form is called the

factored form. Here z

1

, z

2

, . . . , z

m

, the roots of b(s), are called the zeros of G(s)

and p

1

, p

2

, . . . , p

n

, the roots of a(s), are called the poles of G(s). K is called the

(high frequency) gain of G(s). The factored form is also called the pole-zero-

gain form.

Several additional deﬁnitions will be needed. A transfer function or system

G(s) is said to be proper if deg b(s) ≤ deg a(s), or equivalently |G(∞)| < ∞. It

is said to be strictly proper if deg b(s) < deg a(s), or equivalently G(∞) = 0.

It is said to be bi-proper if deg b(s) = deg a(s), or equivalently 0 = |G(∞)| = ∞.

Transfer functions obtained from state space models are always proper, but

occasionally nonproper transfer functions appear in abnormal cases. For a proper

transfer function, the diﬀerence deg a(s) − deg b(s) is called the relative degree

of G(s), and deg a(s) is called the order or degree of G(s). G(0) is called the

DC gain of G(s). Notice the diﬀerence between (high frequency) gain and DC

gain.

In the transfer function of a state space model

G(s) = c(sI −A)

−1

b +d =

c adj(sI −A) b

det(sI −A)

+d

where adj means the adjugate of a matrix (see Appendix B), if there is no common

factor on the above denominator and numerator, then a(s) = det(sI − A), i.e.,

a(s) is the characteristic polynomial of matrix A, and the poles of the system are

the eigenvalues of A. If there are common factors on the above denominator and

numerator, then a(s) is only a factor of det(sI − A) and the poles of the system

are part of the eigenvalues of A. In this case, some of the eigenvalues of A do

not appear as the poles of the transfer function G(s). They become hidden from

the transfer function and hence are called the hidden poles. This again is an

abnormal phenomenon and is prone to trouble. Extra care needs to be taken in

this case. We will assume that this does not happen in our development.

In MATLAB, one can represent a polynomial

p(s) = p

0

s

n

+p

1

s

n−1

+ · · · +p

n

by a vector

p =

p

0

p

1

· · · p

n

.

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 31

Section 2.4 Simplifying Block Diagrams 31

To ﬁnd the roots of p(s), we can type

>> roots(p)

One often needs to compute the sums and products of polynomials. Let

p(s) = s

3

+ 2s

2

+ 3s + 4, q(s) = 5s + 6.

Represent them in MATLAB by

>> p=[1 2 3 4];

>> q=[5 6];

However, neither of the following commands

>> p+q

>> p*q

would give you what you want since the ﬁrst requires the two vectors to have the

same dimension and the second is, in general, not deﬁned at all. For polynomial

addition, one has to augment either p or q with enough zeros so that they have the

same dimension. For the example above, we should do

>> p+[0 0 q];

For polynomial multiplication, one has to use the command “conv”:

>> conv(p,q)

One may ﬁnd these inconvenient and counterintuitive. In Section 2.6, we will

present an alternative way of representing and operating polynomials in MATLAB .

Since the transfer function G(s) of an LTI system is the ratio of the output

Laplace transform Y (s) and the input Laplace transform U(s), if U(s) = 1, i.e.,

u(t) = δ(t), then Y (s) = G(s) and y(t) = L

−1

[G(s)] = g(t). Hence the inverse

Laplace transform of G(s), denoted by g(t), is called the impulse response.

2.4 SIMPLIFYING BLOCK DIAGRAMS

Interconnected systems are often conveniently represented by block diagrams. For

example, the system in the last section Y (s) = G(s)U(s) can be represented using

the block diagram in Figure 2.9.

G(s)

U(s) Y(s)

FIGURE 2.9: Block diagram representation.

Block diagrams are particularly useful when dealing with complex systems

consisting of collections of interconnected subsystems. They can be simpliﬁed using

the equivalence relationships in Table 2.1.

We shall now see how a complex system block diagram can be simpliﬁed.

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 32

32 Chapter 2 Modeling and Simulation

G

G

1

G

G

G

G

G

G

G

G

1 __

G

G _______

1 Ϫ GH

G

1

G

2

G

2

G

2

G

1

G

1

ϩ G

2

H

TABLE 2.1: Equivalent block diagrams.

EXAMPLE 2.14

Consider the simple feedback system shown in Figure 2.10. To ﬁnd the relationship

between r and y, we shall write down all the equations:

Y (s) = P(s)U(s), U(s) = C(s)E(s), E(s) = F(s)R(s) −H(s)Y (s).

F(s) C(s) P(s)

H(s)

r e u

y

Ϫ

FIGURE 2.10: A simple feedback system.

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 33

Section 2.4 Simplifying Block Diagrams 33

We shall now eliminate the intermediate variables, E(s) and U(s), to get

Y (s) = P(s)C(s) [F(s)R(s) −H(s)Y (s)] .

Thus solving Y (s), we get

Y (s) =

P(s)C(s)F(s)

1 +P(s)C(s)H(s)

R(s)

i.e., the transfer function from R(s) to Y (s) is given by

Y (s)

R(s)

=

P(s)C(s)F(s)

1 +P(s)C(s)H(s)

.

EXAMPLE 2.15

Consider the feedback control system shown in Figure 2.11. Here we omitted the

variable s in the transfer function notation to make the expressions more compact.

F

G

1

G

2

H

3

G

3

H

2

H

1

D

Ϫ

R Y

FIGURE 2.11: Original diagram of Example 2.15.

We shall compute the transfer function from R to Y . Thus, we shall assume

D = 0 and we can simplify the block diagram by ﬁrst closing the two inner loops:

G

1

→H

1

→G

1

loop and G

3

→H

2

→G

3

loop, which results in the block diagram

in Figure 2.12. We then move the ﬁrst summing junction to the place of the second

summing junction to get the block diagram in Figure 2.13. Finally, closing the

loop, we have

Y

R

=

F +

G

1

1 −G

1

H

1

G

2

G

3

1 +G

3

H

2

1 −

G

2

G

3

1 +G

3

H

2

G

1

H

3

1 −G

1

H

1

=

G

2

G

3

(F −FG

1

H

1

+G

1

)

1 −G

1

H

1

+G

3

H

2

−G

1

G

3

H

1

H

2

−G

1

G

2

G

3

H

3

.

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 34

34 Chapter 2 Modeling and Simulation

F

R

D

Y

G

2

G

1

_________

1 Ϫ G

1

H

1

G

3

_________

1 ϩ G

3

H

2

H

3

FIGURE 2.12: Block diagram of Example 2.15 with inner loops closed.

G

1

H

3

_________

1 Ϫ G

1

H

1

F

R

D

Y

G

2

G

1

_________

1 Ϫ G

1

H

1

G

3

_________

1 ϩ G

3

H

2

FIGURE 2.13: Further simpliﬁed block diagram of Example 2.15.

We can also ﬁnd the transfer function from D to Y as

Y

D

=

G

2

G

3

1 +G

3

H

2

1 −

G

2

G

3

1 +G

3

H

2

G

1

H

3

1 −G

1

H

1

=

G

2

G

3

(1 −G

1

H

1

)

1 −G

1

H

1

+G

3

H

2

−G

1

G

3

H

1

H

2

−G

1

G

2

G

3

H

3

.

In general, block diagrams can always be simpliﬁed by using the block diagram

algebra as shown in Table 2.1.

2.5 TRANSFER FUNCTION MODELING

The modeling of complicated interconnected LTI systems can be done in the Laplace

transform domain using transfer functions and block diagrams in cases when the

transfer functions of the subsystems are known.

Let us use an armature-controlled DC motor with a load torque, shown in

Figure 2.7, as an example to see how this can be done. Let us consider the case

when the load not only contains an inertia torque proportional to the angular accel-

eration and a friction torque proportional to the angular velocity, but also includes

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 35

Section 2.5 Transfer Function Modeling 35

a nonzero possibly time-varying torque τ

d

(t) independent of the angular position,

velocity, and acceleration. Such a system can be considered as an interconnected

system with electrical, magnetic, and mechanical subsystems.

First notice that in the electrical part, we have

I

a

(s) =

1

L

a

s +R

a

[V

a

(s) −V

b

(s)]. (2.20)

Then the torque generated by the motor is given by

T

m

(s) = K

t

I

a

(s). (2.21)

We also know that the back emf voltage is given by

V

b

(s) = K

b

Ω(s). (2.22)

The mechanical part has relations

Ω(s) =

1

Js +K

f

[T

m

(s) −T

d

(s)] (2.23)

and

Θ(s) =

1

s

Ω(s)

where T

d

(s) is the Laplace transform of a possible load torque. Combining all of

these equations, we can see that the block diagram of the whole system is as in

Figure 2.14. Simplifying the block diagram gives

Θ(s) =

1

s [(L

a

s +R

a

)(Js +K

f

) +K

t

K

b

]

K

t

−(L

a

s +R

a

)

¸

V

a

(s)

T

d

(s)

.

K

t

v

a v u

i

a

t

m

t

d

Ϫ

Ϫ

1

_

s

K

b

1

________

L

a

s ϩ R

a

1

________

Js ϩ K

f

FIGURE 2.14: Block diagram of an armature-controlled DC motor.

Another illustrative example is a ﬁeld-controlled DC motor shown in

Figure 2.15. •A ﬁeld-controlled DC motor has the same structure as an armature-

•Q1

controlled DC motor. The diﬀerence is that in the ﬁeld-controlled case, the arma-

ture current i

a

(t) is set to be constant but the ﬁeld circuit is used to control the

varying torque. In this case, the torque is related to the ﬁeld current as

τ

m

(t) = K

t

i

f

(t) (2.24)

where i

f

(t) is the ﬁeld current. In the Laplace domain, we have

T

m

(s) = K

t

I

f

(s) (2.25)

where I

f

(s) is the Laplace transform of i

f

(t).

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 36

36 Chapter 2 Modeling and Simulation

ϳ

v

f

ϩ

Ϫ

J

R

f

L

f

i

a

ϭ constant

K

f

i

f

FIGURE 2.15: A ﬁeld-controlled DC motor system.

The ﬁeld current is generated by a ﬁeld voltage through a ﬁeld circuit and

satisﬁes the following equation:

v

f

(t) = L

f

di

f

(t)

dt

+R

f

i

f

(t) (2.26)

which, in terms of Laplace transforms, gives

I

f

(s)

V

f

(s)

=

1

L

f

s +R

f

. (2.27)

Combining equations (2.23), (2.25), and (2.27), we get

Θ(s) =

1

(L

f

s +R

f

)(Js +K

f

)s

K

t

−(L

f

s +R

f

)

¸

V

f

(s)

T

d

(s)

.

An interconnection block diagram for the system is shown in Figure 2.16.

K

t

v

f

v u

i

f

t

m

t

d

Ϫ

1

_

s

1

________

R

f

ϩ L

f

s

1

________

Js ϩ K

f

FIGURE 2.16: Block diagram of a ﬁeld-controlled DC motor.

2.6 MATLAB MANIPULATION OF LTI SYSTEMS

In the MATLAB Control Systems Toolbox, a system can be represented by a single

variable, no matter whether it is described by a state space model or by transfer

function model. Suppose that we have a system described by its state space model:

˙ x(t) =

¸

0 1

−1 −2

x(t) +

¸

0

1

u(t)

y(t) =

2 1

x(t)

and we wish to name it as F. Then the following sequence of commands assigns

the variable F with its state space description:

>> A=[0 1; -1 -2];

>> B=[0 ; 1];

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 37

Section 2.6 MATLAB Manipulation of LTI Systems 37

>> C=[2 1];

>> D=0;

>> F=ss(A,B,C,D);

Suppose we now have a system described by its transfer function model

s + 2

s

2

+ 2s + 1

and we wish to name it as G. The following sequence of commands assigns the

variable G with its transfer function description:

>> num=[1 2];

>> den=[1 2 1];

>> G=tf(num,den);

The diﬀerent descriptions of a system can be easily converted from one to

another. The command

>> F=tf(F);

converts the description of F from state space to transfer function. By doing this

we can ﬁnd that F and G are actually the same system since they have the same

transfer function. Also the command

>> G=ss(G);

converts the description of G from transfer function to state space. However, we

do not necessarily get exactly the same state space description as the original F al-

though G and F have the same transfer function. This is because a system may have

diﬀerent state space descriptions. Now F is in transfer function form. Let us run

>> F=ss(F);

We will observe that this state space description of F is diﬀerent from the original

state space description of F, but is actually the same as the state space description

of G obtained from the conversion. This is because by running the transfer function

to state space conversion, the computer program chooses, among many possibili-

ties, a particular canonical form of the state space description. If the very original

state space description is not of this canonical form, then a state space to transfer

function to state space conversion will not give the same thing back. The original

state space description of F is forever lost after the “ss” to “tf” conversion.

For a system F in either the state space form or the transfer function form,

commands

>> [A,B,C,D]=ssdata(F);

>> [num,den]=tfdata(F);

give back the parameter matrices of its state space description and the numerator

and denomination coeﬃcients of its transfer function respectively. Owing to the

nonuniqueness of the state space model for a given transfer function, one may

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 38

38 Chapter 2 Modeling and Simulation

wonder which choice the ﬁrst command takes if F is in transfer function form. It

turns out that the same canonical form as that chosen by the command “ss(F)” is

also chosen here.

The use of the LTI system variable brings much convenience. To ﬁnd out the

poles and zeros of system F, instead of computing the denominator and numerator

polynomials of transfer function F(s) and then using the command “roots”, we can

simply do

>> pole(F);

and

>> zero(F);

Here the actual form of F is immaterial. To compute the sum and product of

systems, we can simply run

>> F+G;

and

>> F*G;

Here F and G may take diﬀerent forms. The following commands have obvious

meanings:

>> F-G;

and

>> F/G;

When doing the last operation, one may run into trouble when G is strictly proper

and either F or G is in state space form since the inverse of a strictly proper system

cannot be represented by a state space system. Nevertheless, no problem will arise

if both F and G are in transfer function form unless G(s) = 0. The feedback

connection of two systems are computed easily:

>> feedback(F,G)

computes

F

1 +FG

and

>> feedback(F,G,1)

computes

F

1 −FG

.

LTI system variables give another way of representing and operating polyno-

mials, simply by interpreting them as transfer functions with 1 as the denominator

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 39

Section 2.7 Simulation and Implementation of Systems 39

polynomials. In this case, the operations on polynomials, such as addition and

multiplication, can be done in a way closer to natural language. Again, take

p(s) = s

3

+ 2s

2

+ 3s + 4, q(s) = 5s + 6

as an example. The commands

>> p=tf([1 2 3 4],1);

>> q=tf([5 6],1);

assign p and q to be appropriate transfer functions with 1 as denominators, i.e.,

polynomials. Addition and multiplication can then be done in the following natural

way without worrying about dimension compatibility and complications caused by

vector multiplication:

>> p+q

>> p*q

2.7 SIMULATION AND IMPLEMENTATION OF SYSTEMS

We have seen how to model a physical system using diﬀerential equations and how

to convert the model into a transfer function. In many situations, we also need to

carry out the inverse process. For example, in system simulation, we often need

to build a physical system with a given transfer function to observe the behavior

of the system represented by the transfer function. In control implementation, we

need to build a physical controller from the designed controller transfer function to

connect it with the plant to form a feedback loop. The process of building a real

physical system with a given transfer function is called realization. Unlike the

modeling process of ﬁnding transfer functions from physical systems, the inverse

realization process is highly nonunique, in terms of the kind of physical components

used and the many possible conﬁgurations and structures. Although nowadays such

a job is more and more accomplished by computer software, the traditional way of

using hardware components is still of great theoretical and practical value. In the

majority of such system simulation and implementation, op-amp circuits are used.

2.7.1 Hardware simulation and implementation

Let a system be given by a proper nth order transfer function

G(s) =

b(s)

a(s)

=

b

0

s

n

+b

1

s

n−1

+ · · · +b

n

a

0

s

n

+a

1

s

n−1

+ · · · +a

n

, a

0

= 0.

The op-amp circuit shown in Figure 2.17 gives a realization of G(s). To show this,

notice that

a

0

x

(n)

(t) = −a

1

x

(n−1)

(t) −· · · −a

n

x(t) +u(t).

Taking the Laplace transforms with zero initial conditions, we get

a

0

s

n

X(s) = −a

1

s

n−1

X(s) −· · · −a

n

X(s) +U(s).

This gives us

a(s)X(s) = U(s).

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 40

40 Chapter 2 Modeling and Simulation

1 1

b

1

a

n Ϫ 1

1/a

0

Ϫ

b

n Ϫ 1

b

n

a

1

x

(n)

x

(n Ϫ 1)

x

x

y

u

b

0

a

n

.

.

.

.

FIGURE 2.17: Controller form realization.

Also, notice that

y(t) = b

0

x

(n)

(t) +b

1

x

(n−1)

(t) + · · · +b

n

x(t).

Taking the Laplace transforms with zero initial conditions, we get

Y (s) = b

0

s

n

X(s) +b

1

s

n−1

X(s) + · · · +b

n

X(s) = b(s)X(s).

Hence

Y (s)

U(s)

=

b(s)

a(s)

.

This realization is called a controller form realization.

The op-amp circuit in Figure 2.17 has a natural state space model. If we

follow our tradition of assigning the voltages across capacitors, which are hidden in

the integrators, then the state vector becomes

x(t) =

x

(n−1)

(t)

.

.

.

˙ x(t)

x(t)

¸

¸

¸

¸

¸

.

The corresponding state space model is

˙ x(t) =

−

a

1

a

0

· · · −

a

n−1

a

0

−

a

n

a

0

1 · · · 0 0

.

.

.

.

.

.

.

.

.

.

.

.

0 · · · 1 0

¸

¸

¸

¸

¸

¸

x(t) +

1

a

0

0

.

.

.

0

¸

¸

¸

¸

¸

¸

u(t)

y(t) =

b

1

−b

0

a

1

a

0

· · · b

n−1

−b

0

a

n−1

a

0

b

n

−b

0

a

n

a

0

x(t) +

b

0

a

0

u(t).

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 41

Section 2.7 Simulation and Implementation of Systems 41

This state space model, of course, gives a transfer function exactly the same as the

given one.

Another realization of the same system is given by the circuit shown in Figure

2.18. To show this, notice that

a

0

y(t) = x

1

(t) +b

0

u(t)

˙ x

1

(t) = x

2

(t) −a

1

y(t) +b

1

u(t)

.

.

.

˙ x

n−1

(t) = x

n

(t) −a

n−1

y(t) +b

n−1

u(t)

˙ x

n

(t) = −a

n

y(t) +b

n

u(t).

1 1

b

1

a

n Ϫ 1

1/a

0

Ϫ

b

n Ϫ 1

b

n

a

1

u

x

n

x

2

x

1

y

b

0

a

n

.

.

.

Ϫ Ϫ

FIGURE 2.18: Observer form realization.

Taking the Laplace transforms with zero initial conditions, we get

a

0

Y (s) = X

1

(s) +b

0

U(s)

sX

1

(s) = X

2

(s) −a

1

Y (s) +b

1

U(s)

.

.

.

sX

n−1

(s) = X

n

(s) −a

n−1

Y (s) +b

n−1

U(s)

sX

n

(s) = −a

n

Y (s) +b

n

U(s).

Multiplying the above equations by s

n

, s

n−1

, . . . , s, 1, respectively, and adding them

altogether, one can see that the variables X

1

(s), . . . , X

n

(s) are all cancelled and the

resulting equation is

a(s)Y (s) = b(s)U(s).

So we also get

Y (s)

U(s)

=

b(s)

a(s)

.

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 42

42 Chapter 2 Modeling and Simulation

This realization is called the observer form realization. It also has a state space

model. Let us again assign the voltage across capacitors as state variables. The

state vector then becomes

x(t) =

x

1

(t)

x

2

(t)

.

.

.

x

n

(t)

¸

¸

¸

¸

¸

.

The corresponding state space model is

˙ x(t) =

−

a

1

a

0

1 · · · 0

.

.

.

.

.

.

.

.

.

.

.

.

−

a

n−1

a

0

0 · · · 1

−

a

n

a

0

0 · · · 0

¸

¸

¸

¸

¸

¸

¸

¸

¸

¸

x(t) +

b

1

−b

0

a

1

a

0

.

.

.

b

n−1

−b

0

a

n−1

a

0

b

n

−b

0

a

n

a

0

¸

¸

¸

¸

¸

¸

¸

¸

¸

¸

u(t)

y(t) =

¸

1

a

0

0 · · · 0

x(t) +

b

0

a

0

u(t).

2.7.2 Software simulation and implementation

MATLAB provides certain tools for the numerical computation of system re-

sponses. For a system represented by a variable G, regardless of whether it is

in the transfer function form or state space form, to compute its impulse response,

i.e., its response to the unit impulse input δ(t), one can use

>> [y,t]=impulse(G);

To ﬁnd its step response, i.e., its response to the unit step input σ(t), one can use

>> [y,t]=step(G);

To calculate a system response with respect to a more general input signal

than impulse and step, one can use a MATLAB command lsim. For example, the

following sequence of commands gives the sinusoidal response of the system:

>> t=0:0.1:10;

>> u=sin(t);

>> y=lsim(G,u,t);

Another software product associated with MATLAB is SIMULINK. It can

be used to simulate an interconnected system, represented by a block diagram. Let

us demonstrate its use by a couple of examples.

EXAMPLE 2.16

Consider the unity feedback system shown in Figure 2.19 with a loop transfer

function

L(s) =

1

s(s + 1)

.

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 43

Section 2.7 Simulation and Implementation of Systems 43

L(s)

r e

y

Ϫ

FIGURE 2.19: For Examples 2.16 and 2.17.

The time responses of this system with respect to various kinds of command

signals are simulated using a SIMULINK diagram as shown in Figure 2.20 and are

plotted in Figure 2.21.

r

1

________

s(s ϩ 1)

ϩ

Ϫ

Signal

generator

To workspace1

y

To workspace

Scope Zero-pole

FIGURE 2.20: SIMULINK diagram for Example 2.16.

0 1 2 3 4 5

Ϫ1

0

1

2

3

4

5

Time t [sec]

0

1

Time t [sec]

0 10 20 30 40 50

Ϫ1.5

Ϫ1

Ϫ0.5

0.5

1.5

0

1

Time t [sec]

0 10 20 30 40 50

Ϫ1.5

Ϫ1

Ϫ0.5

0.5

1.5

0

1

Time t [sec]

0 10 20 30 40 50

Ϫ1.5

Ϫ1

Ϫ0.5

0.5

1.5

FIGURE 2.21: Responses to a ramp signal, a square wave, a sawtooth signal, and a sine wave

for Example 2.16.

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 44

44 Chapter 2 Modeling and Simulation

EXAMPLE 2.17

Consider the unity feedback system shown in Figure 2.19 with

L(s) =

5(s + 1)

s

2

(s + 2)

.

Then a similar SIMULINK block can be built, and the time response of the system

with respect to a ramp and a square wave of 0.05 Hz are shown in Figure 2.22.

It is noted that there is no steady-state error in tracking a ramp for this system.

However, this system is lightly damped, so the transient performance is rather poor.

0 1 2 3 4 5

Ϫ1

0

1

2

3

4

5

Time t [sec]

Ϫ2.5

Ϫ1.5

Ϫ0.5

0.5

1.5

2.5

0 10 20 30 40 50

Time t [sec]

0

1

Time t [sec]

0 10 20 30 40 50

Ϫ1.5

Ϫ1

Ϫ0.5

0.5

1.5

Ϫ2.5

Ϫ1.5

Ϫ0.5

0.5

1.5

2.5

0 10 20 30 40 50

Time t [sec]

FIGURE 2.22: Responses to a ramp signal, a square wave, a sawtooth signal, and a sine wave

for Example 2.17.

SIMULINK can also be used to implement a controller in a digital form, i.e.,

it can be used to generate computer codes so that the computer with the codes can

serve as the controller in a feedback system. We refer to the SIMULINK manual

on how this can be done.

2.8 MISO AND SIMO SYSTEMS

So far we have dealt with mostly SISO systems. A general system might be MIMO,

i.e., it might have multiple inputs and multiple outputs. We will leave the theory

of MIMO feedback control systems to a more advanced course. In this book, we

will occasionally deal with MISO systems or SIMO systems for two reasons. One is

that MISO systems and SIMO systems are frequently seen in practice and they can

be dealt with using techniques not much beyond the theory for SISO systems. The

other reason is that in the control of SISO systems, such as in the regulation control,

we often need to use MISO systems, which lead to better performance. To simplify

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 45

Section 2.8 MISO and SIMO Systems 45

notation and understanding, we will study only double-input–single-output (DISO)

systems and single-input–double-output (SIDO) systems. The general theory of

MISO and SIMO systems extends in a rather trivial way from that of DISO and

SIDO systems. The MISO and SIMO systems that we are going to deal with and use

in this book are actually DISO and SIDO systems.

An LTI DISO system has two inputs and one output. Its block diagram takes

the form in Figure 2.23 and its transfer function takes the form

G(s) =

G

1

(s) G

2

(s)

G(s)

u

1

u

2

y

FIGURE 2.23: A DISO system.

which has the meaning

Y (s) =

G

1

(s) G

2

(s)

¸

U

1

(s)

U

2

(s)

= G

1

(s)U

1

(s) +G

2

(s)U

2

(s).

Here, we follow our convention of writing vectors or matrices using bold letters.

G

1

(s)

u

1

y

G

2

(s)

u

2

FIGURE 2.24: A misleading way of viewing a DISO system.

Although one may identify a DISO system by a connection of two SISO sub-

systems as shown in Figure 2.24, this view would do more harm than good. It is

useful only in the algebraic manipulation of the input/output relations, but might

lead to erroneous results in stability analysis, simulation, and implementation. Thus

we say that Figure 2.24 is only algebraically equivalent to Figure 2.23. It is better

to view a DISO system as an inseparable single system. Hence we prefer to write

G(s) =

b(s)

a(s)

=

1

a(s)

b

1

(s) b

2

(s)

=

b

10

s

n

+ · · · +b

1n

b

20

s

n

+ · · · +b

2n

a

0

s

n

+a

1

s

n−1

+ · · · +a

n

, a

0

= 0.

Here a(s) is the common denominator of G

1

(s) and G

2

(s), i.e., the least common

multiple of the denominators of G

1

(s) and G

2

(s). A typical question one might ask

is what the order of this system is. Let us take the view that the order of a system is

the minimum number of integrators needed in its op-amp circuit realization. If we

realize the two subsystems G

1

(s) and G

2

(s) separately and then connect them as in

Figure 2.24, then we may need 2n integrators in the worst case. However, a more

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 46

46 Chapter 2 Modeling and Simulation

economical realization is given in Figure 2.25 where only n integrators are used.

Hence the order of the system is n, instead of 2n. The signiﬁcance of the realization

in Figure 2.25 is not just to save integrators. More importantly, it has eliminated

many redundant signals which might behave in unexpected and undesirable ways

if a DISO system is realized as the sum of two separate systems.

b

1n

u

2

y

u

1

x

n

x

2

x

1

Ϫ

b

2n

1 1

b

2(n Ϫ 1)

b

1(n Ϫ 1)

a

n Ϫ 1

b

21

b

11

a

n

a

1

b

10

b

20

1/a

0

.

.

.

Ϫ Ϫ

FIGURE 2.25: Realization of a DISO system.

When SIMULINK, or any other software, is used to simulate or implement the

system, one should always keep in mind that a DISO system is a single integrated

system, not the sum of two SISO systems.

Similarly, an LTI SIDO system has one input and two outputs. Its block

diagram takes the form in Figure 2.26

G(s)

y

1

y

2

u

FIGURE 2.26: A SIDO system.

and its transfer function takes the form

G(s) =

¸

G

1

(s)

G

2

(s)

,

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 47

Section 2.9 Modeling of Closed-Loop Systems 47

which has the meaning

¸

Y

1

(s)

Y

2

(s)

=

¸

G

1

(s)

G

2

(s)

U(s)

or

Y

1

(s) = G

1

(s)U(s), Y

2

(s) = G

2

(s)U(s).

G

1

(s)

y

1

u

G

2

(s)

y

2

FIGURE 2.27: A misleading way to view a SIDO system.

Again, we should be careful in viewing a SIDO system as a connection of two

SISO subsystems shown in Figure 2.27. This view is useful only in the algebraic

manipulation of input/output relations, but might lead to erroneous results in sta-

bility analysis, simulation, and implementation. So we say that Figure 2.27 is only

algebraically equivalent to Figure 2.26. Hence we prefer to write

G(s) =

b(s)

a(s)

=

1

a(s)

¸

b

1

(s)

b

2

(s)

=

¸

b

10

s

n

+ · · · +b

1n

b

20

s

n

+ · · · +b

2n

a

0

s

n

+a

1

s

n−1

+ · · · +a

n

, a

0

= 0.

Let us again take the view that the order of a system is the minimum number of

integrators needed in its op-amp circuit realization. If we realize the two subsystems

G

1

(s) and G

2

(s) separately and then connect them as in Figure 2.27, then we need

2n integrators. However, a more economical realization is given in Figure 2.28

where only n integrators are used. Hence the order of the system is n, instead of

2n. Again, the realization in Figure 2.28 has eliminated many redundant signals

which might behave in unexpected and undesirable ways if a SIDO system is realized

as the interconnection of two separate systems.

2.9 MODELING OF CLOSED-LOOP SYSTEMS

Two types of closed-loop systems will be used in this book. One is the feedback

system for stabilization as shown in Figure 2.29. The other is the feedback

system for regulation as shown in Figure 2.30.

Let us ﬁrst analyze the feedback system for stabilization. The transfer func-

tion from w

1

to y

1

is

P(s)C(s)

1 +P(s)C(s)

. Here 1 +P(s)C(s) has to be nonzero in order

for the transfer function to be meaningful. If we try to ﬁnd the transfer functions

from any external signal to any internal signal, we can see that we always need

1 +P(s)C(s) to be nonzero.

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 48

48 Chapter 2 Modeling and Simulation

b

1n

u

x

(n)

x

(n Ϫ 1)

x x

y

1

b

2n

1 1

b

2(n Ϫ 1)

b

1(n Ϫ 1)

a

n Ϫ 1

b

21

b

11

a

n

a

1

b

10

b

20

1/a

0

.

.

.

.

Ϫ

y

2

FIGURE 2.28: Realization of a SIDO system.

P(s)

C(s)

u

1

u

2

w

2

y

1

Ϫ

y

2

w

1

FIGURE 2.29: Feedback system for stabilization.

P(s) C(s)

n y

z v u r

d

Ϫ

FIGURE 2.30: Feedback system for regulation.

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 49

Section 2.9 Modeling of Closed-Loop Systems 49

Deﬁnition 2.18. The closed-loop system shown in Figure 2.29 is said to be

well posed if 1 +P(s)C(s) ≡ 0. Otherwise, it is said to be ill posed.

An ill-posed system is not meaningful, does not work properly, and should be

avoided.

EXAMPLE 2.19

If P(s) = 1 and C(s) = −1, then the system shown in Figure 2.29 is ill posed.

In this case, the internal signals cannot be uniquely determined from the external

signals.

Proposition 2.20. The closed-loop system shown in Figure 2.29 is well posed

if P(s) and C(s) are proper and at least one of them is strictly proper.

Proof. If P(s) and C(s) are proper, then |P(∞)| < ∞and |C(∞)| < ∞. Fur-

thermore, if at least one of P(s) and C(s) is strictly proper, then P(∞) = 0

or C(∞) = 0. This shows P(∞)C(∞) = 0, i.e., 1 + P(∞)C(∞) = 1. There-

fore 1 +P(s)C(s) ≡ 0.

In most applications, the condition in Proposition 2.20 is satisﬁed. When the

closed-loop system is well posed, we can ﬁnd the transfer function from one of the

external signals w

1

(t), w

2

(t) to one of the internal signals u

1

(t), u

2

(t), y

1

(t), y

2

(t).

For example, the transfer function from w

1

(t) to y

2

(t) is

P(s)

1 +P(s)C(s)

.

It is more convenient to write down all the transfer functions in a compact

matrix form as

U

1

(s)

U

2

(s)

Y

1

(s)

Y

2

(s)

¸

¸

¸

¸

=

1

1 +P(s)C(s)

−C(s)

1 +P(s)C(s)

P(s)

1 +P(s)C(s)

1

1 +P(s)C(s)

P(s)C(s)

1 +P(s)C(s)

C(s)

1 +P(s)C(s)

P(s)

1 +P(s)C(s)

−P(s)C(s)

1 +P(s)C(s)

¸

¸

¸

¸

¸

¸

¸

¸

¸

¸

¸

¸

¸

¸

W

1

(s)

W

2

(s)

(2.28)

where an element of the big 4 × 2 matrix is simply the transfer function from

the corresponding external signal to the corresponding internal signal. Although

there are eight diﬀerent possible input/output pairs, the transfer functions between

these input/output pairs contain some repetitions. Essentially there are only four

diﬀerent transfer functions:

1

1 +P(s)C(s)

,

P(s)

1 +P(s)C(s)

,

C(s)

1 +P(s)C(s)

,

P(s)C(s)

1 +P(s)C(s)

. (2.29)

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 50

50 Chapter 2 Modeling and Simulation

These four diﬀerent transfer functions are called the gang of four. Among the

transfer functions in the gang of four, we also denote

S(s) =

1

1 +P(s)C(s)

and T(s) =

P(s)C(s)

1 +P(s)C(s)

,

and call them sensitivity function and complementary sensitivity function, respec-

tively. These two closed-loop transfer functions are related by

S(s) +T(s) = 1.

Let us now consider the feedback system for regulation. In this case C(s) is

a DISO system. Hence it can be denoted by

U(s) =

C

1

(s) −C

2

(s)

¸

R(s)

Y (s)

.

Here we put a minus sign in front of C

2

(s) because this suggests a negative feedback.

This controller C(s) is also called a two-degree-of-freedom, or simply a 2DOF,

controller since it actually involves two transfer functions C

1

(s) and C

2

(s). From

a pure algebraic point of view, the feedback system in Figure 2.30 is equivalent to

the system shown in Figure 2.31. However, we will later see that analytically they

are not equivalent and Figure 2.31 should not be used to build the actual feedback

system.

P(s) C

1

(s)

n y

z v u r

d

Ϫ

C

2

(s)

FIGURE 2.31: Algebraic equivalence of Figure 2.30.

From Figure 2.31, it can be seen that a stabilization system formed by P(s)

and C

2

(s) is a subsystem of the regulation system. Therefore, in order for the

system in Figure 2.30 to work properly, the stabilization system formed by P(s)

and C

2

(s) has to work properly.

Deﬁnition 2.21. The closed-loop system shown in Figure 2.30 is said to be

well posed if the feedback system for stabilization formed by P(s) and C

2

(s)

is well posed.

If the closed-loop system is well posed, we can ﬁnd each of the transfer func-

tions from external signals d(t), n(t), r(t) to internal signals u(t), v(t), y(t), z(t).

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 51

Section 2.9 Modeling of Closed-Loop Systems 51

Again we can put these transfer functions into a compact matrix form

U(s)

V (s)

Y (s)

Z(s)

¸

¸

¸

¸

=

−P(s)C

2

(s)

1 +P(s)C

2

(s)

−C

2

(s)

1 +P(s)C

2

(s)

C

1

(s)

1 +P(s)C

2

(s)

1

1 +P(s)C

2

(s)

−C

2

(s)

1 +P(s)C

2

(s)

C

1

(s)

1 +P(s)C

2

(s)

P(s)

1 +P(s)C

2

(s)

1

1 +P(s)C

2

(s)

P(s)C

1

(s)

1 +P(s)C

2

(s)

P(s)

1 +P(s)C

2

(s)

−P(s)C

2

(s)

1 +P(s)C

2

(s)

P(s)C

1

(s)

1 +P(s)C

2

(s)

¸

¸

¸

¸

¸

¸

¸

¸

¸

¸

¸

¸

¸

¸

D(s)

N(s)

R(s)

¸

¸

.

(2.30)

We see that there are 12 elements in the matrix corresponding to the 12 possible

input/output pairs, but again there are repetitions among the 12 elements. Essen-

tially, there are only six diﬀerent transfer functions, the gang of four formed by

P(s) and C

2

(s) as well as two additional ones involving C

1

(s):

C

1

(s)

1 +P(s)C

2

(s)

and

P(s)C

1

(s)

1 +P(s)C

2

(s)

.

The 2DOF controller also takes some other equivalent forms. Figure 2.32

shows a two-loop feedback system. Here H(s) is a DISO system with transfer

function

H(s) =

H

1

(s) H

2

(s)

.

P(s) H(s)

n y

z v u e r

d

Ϫ

Ϫ

FIGURE 2.32: Two-loop feedback system.

Hence

U(s) =

H

1

(s) −H

2

(s)

¸

E(s)

Y (s)

.

The system has an inner loop consisting of H

2

(s) and P(s) and an outer loop

consisting of H

1

(s) and the inner loop. This might be more easily seen from its

algebraic equivalence shown in Figure 2.33. It can be easily shown that if

H

1

(s) = C

1

(s) and H

2

(s) = C

2

(s) −C

1

(s),

then it is equivalent to the 2DOF controller.

Another equivalent form of the DISO controller is the feedback plus feedfor-

ward conﬁguration shown in Figure 2.34. Here F(s) is a DISO system with transfer

function

F(s) =

F

1

(s) F

2

(s)

.

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 52

52 Chapter 2 Modeling and Simulation

P(s) H

1

(s)

n y

z v u e r

d

Ϫ Ϫ

H

2

(s)

FIGURE 2.33: Algebraic equivalence of Figure 2.32.

P(s) F(s)

n y

z v u e r

d

Ϫ

FIGURE 2.34: Feedback plus feedforward system.

Hence

U(s) =

F

1

(s) F

2

(s)

¸

R(s)

E(s)

.

This system has a feedback loop consisting of F

2

(s) and P(s) and a feedforward

path with transfer function F

1

(s). It also has an algebraic equivalence as shown in

Figure 2.35. It can be easily seen that if

F

1

(s) = C

1

(s) −C

2

(s) and F

2

(s) = C

2

(s),

then it is equivalent to the 2DOF controller.

P(s) F

2

(s)

n y

z v u e r

d

Ϫ

F

1

(s)

FIGURE 2.35: Algebraic equivalence of Figure 2.34.

Yet another equivalent form of the 2DOF controller is the observer-based

feedback system shown in Figure 2.36. It is so called since the controller O(s) takes

both the input and the output of the plant and has the capability to observe the

internal behavior of the plant from external signals. It can be seen that if

O(s) =

O

1

(s) O

2

(s)

=

¸

1 −C

1

(s)

C

1

(s)

C

2

(s)

C

1

(s)

,

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 53

Section 2.10 Case Studies 53

P(s)

n y

z v u r

d

Ϫ

Ϫ

O(s)

FIGURE 2.36: Observer based feedback system.

then it is equivalent to the 2DOF controller.

A widely used special case of the regulation system shown in Figure 2.30 is

the unity feedback system shown in Figure 2.37, which is obtained from Figure 2.30

by setting C

1

(s) = C

2

(s) = C(s).

P(s) C(s)

n y

z v u e r

d

Ϫ

FIGURE 2.37: Unity feedback system.

It is easy to see that this system is well posed if and only if the system for

stabilization in Figure 2.29 is well posed.

2.10 CASE STUDIES

In this section we take a close look at two mechanical systems that we often see

in laboratories. The ﬁrst is a ball and beam system. The second is an inverted

pendulum.

2.10.1 Ball and beam system

The ball and beam system consists of a ball rolling along a tilting rail, as shown in

Figure 2.38. The rail (also called the beam) is made up of two parts: a steel rod

and a resistance bar. When a steel ball rolls on these two components, it acts as

a wiper similar to that of a potentiometer. Voltage is applied on both ends of the

resistance bar, and thus the distance of the ball is found by measuring the voltage

Ϫ

u

ϩ

R

a

x

M

u

m

u

f

FIGURE 2.38: A ball and beam system.

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 54

54 Chapter 2 Modeling and Simulation

on the steel bar. A terminal block is ﬁxed on one end of the beam as support.

A mechanical arm which translates the rotatory motion of a big disk into vertical

motion is on the other end of the beam. Thus, the beam is pivoted around the

support by controlling the angle of the big disk. The big disk is then driven by a

geared motor assembly.

A precise mathematical model of the ball and beam system is complicated.

Fortunately, approximate models are suﬃcient for feedback control. Let us derive

a simple approximate model of the ball and beam system. Roughly, the ball and

beam model can be decomposed into four parts: the ball and beam model, the

angle transfer mechanism model, the gear model, and the motor model. The ball

and beam model relates the position x(t) of the ball with the tilt angle φ(t) of the

beam, whereas the angle transfer mechanism model relates the tilt angle φ(t) with

the rotation angle θ(t) of the big disc. Finally, the motor in the ball and beam

system is internally controlled and its model relates the voltage input u(t) to the

motor control system with the rotational angle θ

m

(t).

Let us approximate the ball rolling on the beam by a point mass sliding in a

frictionless surface. Then Newton’s second law gives

M¨ x(t) = Mg sin φ(t)

where M is the mass of the ball and g is the acceleration of gravity. Assume that

the tilt angle φ(t) is small. Then we get the linearized equation

¨ x(t) = gφ(t).

Taking the Laplace transform we get

X(s)

Φ(s)

=

g

s

2

. (2.31)

The relationship between the tilt angle φ(t) and the rotational angle θ(t) of

the big disk is nonlinear but static. It can be approximated by

Φ(s)

Θ(s)

=

φ(t)

θ(t)

=

R

L

, (2.32)

where R is the radius of the motor disk and L is the length of the beam.

The angular displacement θ(t) of the big disk and that of the rotor of the

motor, denoted by θ

m

(t), is related by the gear ratio K

g

as follows

Θ(s)

Θ

m

(s)

= K

g

.

Finally, the motor transfer function is taken as an approximation of the one

given in Example 2.12 by assuming L

a

≈ 0 and K

b

≈ 0:

Θ

m

(s)

U(s)

=

K

t

R

a

s(Js +K

f

)

.

Notice that the motor dynamics and the ball dynamics are actually coupled

since the load inertia also depends on the ball location and the ball motion depends

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 55

Section 2.10 Case Studies 55

on the motor velocity. However, the above approximation is good enough for the

control purpose.

As a result, the whole ball and beam system can be approximated by the

cascade connection of four systems: the ball and beam part, the angle transfer

part, the gear part, and the motor part, as shown in Figure 2.39.

K

t

_________

R

a

s(JsϩK

f

)

K

g

u u

m

u f

x

R

__

L

g

__

s

2

FIGURE 2.39: Block diagram of the ball and beam system.

The ball and beam system has two measurements: the disc angle θ(t) and

the ball position x(t). Therefore, the whole system is SIDO and is given by the

input/output relation

¸

Θ(s)

X(s)

=

1

R

a

s

3

(Js +K

f

)

¸

K

t

K

g

s

2

K

t

K

g

Rg/L

U(s).

In a particular case, we have R

a

= 10 [Ω], J = 0.75 × 10

−3

[Nm sec

2

/rad],

L = 0.4 [m], R = 0.04 m, K

t

= 7.5 ×10

−3

[Nm A], K

f

= 37.5 ×10

−3

[Nm sec/rad],

and K

g

= 1/75. Plugging in all these parameters, we get the input/output relation

of a typical ball and beam system

¸

Θ(s)

X(s)

=

1

s

3

(s + 50)

¸

s

2

/75

g/750

U(s)

where g is equal to 9.8 [m/sec

2

].

2.10.2 Inverted pendulum system

The inverted pendulum mimics a game we often played in our childhood: balancing

a long stick upward on our ﬁnger tip. As shown in Figure 2.40, an inverted pendu-

lum system consists of a moving cart with a rod mounted on the top. Unlike the

childhood game where our ﬁngers move in a horizontal plane and the stick can fall

in all directions, the cart moves linearly along a straight rail and the rod can only

fall either to the front or to the back of the cart.

f

x

M

p

M

c

u

FIGURE 2.40: Inverted pendulum system.

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 56

56 Chapter 2 Modeling and Simulation

The system consists of a cart and a rod. The cart, with a mass M

c

, slides

on a stainless steel shaft and is equipped with a motor. A rod, with an evenly

distributed mass M

p

and a length L, is mounted on the cart whose axis of rotation

is perpendicular to the direction of the motion of the cart. The cart position x(t)

and the pendulum angle θ(t) can be measured. The input is the force f(t) applied

on the cart.

Applying Newton’s law to the horizontal direction of Figure 2.40, we get

f(t) = M

c

d

2

x(t)

dt

2

+M

p

d

2

[x(t) −L/2 sin θ(t)]

dt

2

.

This gives

(M

p

+M

c

)¨ x(t) −

M

p

L

2

¨

θ(t) cos θ(t) +

M

p

L

2

˙

θ

2

(t) sin θ(t) = f(t). (2.33)

Note that the moment of inertia of the rod with respect to the pivot point

can be computed as

J =

L

0

2

M

p

L

d

=

1

3

M

p

L

2

.

Writing the rotational version of Newton’s second law for the pendulum around the

pivot point, we obtain

J

¨

θ(t) = M

p

¨ x(t) cos θ(t)

L

2

+M

p

g sin θ(t)

L

2

.

This gives

2

3

L

¨

θ(t) − ¨ x(t) cos θ(t) −g sin θ(t) = 0. (2.34)

Therefore the diﬀerential equation model of the system is given by

(M

p

+M

c

)¨ x(t) −

1

2

M

p

L

¨

θ(t) cos θ(t) +

1

2

M

p

L

˙

θ

2

(t) sin θ(t) = f(t)

−¨ x(t) cos θ(t) +

2

3

L

¨

θ(t) −g sin θ(t) = 0.

This is a highly nonlinear system. A straightforward way to linearize it around

x(t) = 0, ˙ x(t) = 0, θ(t) = 0,

˙

θ(t) = 0 is to remove the second- and higher-order

terms. This gives

(M

p

+M

c

)¨ x(t) −

1

2

M

p

L

¨

θ(t) = f(t)

−¨ x(t) +

2

3

L

¨

θ(t) −gθ(t) = 0.

Taking Laplace transform on both sides of the equations, we get

(M

p

+M

c

)s

2

X(s) −

1

2

M

p

Ls

2

Θ(s) = F(s)

−s

2

X(s) +

2

3

Ls

2

Θ(s) −gΘ(s) = 0.

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 57

Section 2.10 Case Studies 57

Taking X(s) and Θ(s) as the outputs, and F(s) as the input, we get

¸

X(s)

Θ(s)

=

1

(M

p

+M

c

)s

2

(2Ls

2

/3 −g) −M

p

Ls

4

/2

¸

2Ls

2

/3 −g

s

2

F(s)

=

1

s

2

[(M

p

+ 4M

c

)Ls

2

−6(M

p

+M

c

)g]

¸

4Ls

2

−6g

6s

2

F(s).

Therefore, the vector transfer function of the system is

P(s) =

¸

P

x

(s)

P

θ

(s)

=

1

s

2

[(M

p

+ 4M

c

)Ls

2

−6(M

p

+M

c

)g]

¸

4Ls

2

−6g

6s

2

.

As an example, let us have a virtual inverted pendulum with M

c

= 1 kg, M

p

= 2 kg,

L = 1 m. This gives

P(s) =

1

s

2

(s

2

−3g)

¸

2/3s

2

−g

s

2

(2.35)

where g = 9.8 [m/sec

2

].

PROBLEMS

2.1. Consider the circuit shown in Figure 2.41. Let the input be v

i

(t) and output be

v

o

(t). Obtain a state space model and the transfer function of this system.

ϳ

R

2

L

1

C

1

C

2

R

1

R

3

v

o

ϩ

Ϫ

v

i

ϩ

Ϫ

FIGURE 2.41: A simple RLC circuit for Problem 2.1.

2.2. Consider the mechanical system shown in Figure 2.42. Here u(t) is an external

force applied to the mass M, y(t) is the displacement of the mass with respect

M

f

sp

f

b

u

FIGURE 2.42: A mass and spring system for Problem 2.2.

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 58

58 Chapter 2 Modeling and Simulation

to the position when the spring is relaxed. The spring force and friction force

are given respectively by

f

sp

(t) = k(1 + ay

2

(t))y(t), f

b

(t) = b ˙ y(t).

1. Write the diﬀerential equation model of this system.

2. Write a state space description of the system.

3. Is the system linear? If it is not linear, linearize it around the operating

point with u

0

= 0.

4. Find the transfer function of the linearized system.

M

l

f

u

FIGURE 2.43: A see-saw system for Problem 2.3.

2.3. Consider the see-saw system shown in Figure 2.43. The beam has length L

with an evenly distributed mass M

b

. A mass M

l

sits on one end. A vertically

downward force f(t) is applied on the other end. We are concerned with the

angular displacement θ(t) of the beam with the horizontal line.

1. Write the diﬀerential equation model of this system with input f(t) and

output θ(t).

2. Is this system linear? If not, linearize it about the operating point with

θ

0

= 0.

3. Obtain the transfer function from ∆f(t) to ∆θ(t), where ∆f(t) and ∆θ(t)

are the deviations of f(t) and θ(t) from their values at the operating point.

M

L

u

t

FIGURE 2.44: A pendulum system for Problem 2.4.

2.4. Consider the pendulum system shown in Figure 2.44. The pendulum consists of

a rod of length l with evenly distributed mass m and a point mass M at its lower

end. The input is the torque τ(t) and the output is the angular position θ(t).

Assume that there is no friction.

a. Derive the state space model of the system.

b. Is the system linear? If not, linearize it around the operating point with

θ

0

= 0.

c. Compute the transfer function of the linearized model.

2.5. Consider the system shown in Figure 2.45. φ is a continuously diﬀerentiable

nonlinear function satisfying φ(0) = 0. Write a state space equation of the

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 59

Section 2.10 Case Studies 59

c(sI ϪA)

Ϫ1

b

f(·)

R(s) Y(s)

Ϫ

FIGURE 2.45: Linear system with nonlinear memoryless feedback for Problem 2.5.

closed-loop system. Linearize it around an equilibrium point with zero output.

Write the transfer function of the linearized closed-loop system.

h

f

i

f

o

FIGURE 2.46: A conical water tank for Problem 2.6.

2.6. Consider a water tank in the shape of an ice cream cone shown in Figure 2.46. The

height is 4 m and the top diameter is 2 m. Assume that the input is the inﬂow

f

i

(t) and the output is the water level h(t). It is also known that the outﬂow is

f

o

(t) =

3h(t).

1. Choose a state variable of the system and write a state space model of the

system.

2. Is the system linear? If not, linearize it around the equilibrium point with

h

0

= 3.

3. Find the transfer function of the linearized system.

2.7. Consider a ball shaped water tank with radius R shown in Figure 2.47. Assume

that the input is the inﬂow f

i

(t) and the output is the water level h(t). It is also

known that the outﬂow is f

o

(t) = α.

1. Write a state space model of the system.

2. Is the system linear? If not, linearize it when the tank is half full.

3. Find the transfer function of the linearized system.

4. What are the poles and zeros of the system?

2.8. Consider Figure 2.48. Assume that a state space model of P(s) is

˙ x(t) = Ax(t) + bu(t)

y(t) = cx(t)

and K is a pure gain. Obtain a state space model of the closed-loop system with

input r(t) and output y(t).

2.9. Find the closed-loop transfer function of the system shown in Figure 2.49. Choose

F(s) such that the closed-loop transfer function is 1.

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 60

60 Chapter 2 Modeling and Simulation

f

i

f

o

h

FIGURE 2.47: A ball shaped water tank for Problem 2.7.

P(s)

K

u y

Ϫ

r

FIGURE 2.48: Unity feedback system with a proportional feedback for Problem 2.8.

F(s)

C(s) P(s)

z

Ϫ

e r u

FIGURE 2.49: A feedback plus feedforward system for Problem 2.9.

2.10. Consider the feedback system shown in Figure 2.50.

1. Find the transfer function from r to y.

2. Find its equivalent 2DOF feedback structure, i.e., ﬁnd a 2DOF controller

which gives the same transfer functions from r to u and from y to u.

2.11. Find the transfer function from r to y of the system shown in Figure 2.51. Choose

H(s) so that the transfer function is equal to 1.

2.12. Find the transfer function from r to y of the system shown in Figure 2.52.

MATLAB PROBLEMS

2.13. In MATLAB, there is a third form to describe a SISO LTI system in addition to

the state space form and the transfer function form. This third form is called the

zero-pole-gain form. The command to create or convert to a system described

by the zero-pole-gain form is zpk. Learn the use of the command zpk and the

related command zpkdata from the online help by using the help command.

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 61

Section 2.10 Case Studies 61

H

1

(s)

H

2

(s) H

3

(s) P(s)

Ϫ

r

H

4

(s)

Ϫ

H

5

(s)

y u

FIGURE 2.50: A complicated feedback system for Problem 2.10.

H(s)

P(s)

F(s)

Ϫ

r y

FIGURE 2.51: A partial feedback system for Problem 2.11.

G

4

(s)

G

1

(s) G

2

(s) G

3

(s)

Ϫ Ϫ Ϫ

y r

FIGURE 2.52: A complicated feedback system for Problem 2.12.

2.14. Use MATLAB to solve this problem. A ﬂexible beam system is described by the

following state space equation

˙ x(t) =

**−1.7860 15.9674 −1.6930 13.1487
**

−1.1773 −15.2644 −1.3548 −14.5145

3.3427 −6.8798 3.4513 −3.5889

1.5017 16.7058 1.1717 13.4250

¸

¸

¸

x(t) +

−0.9618

1.3011

0.1081

−1.1984

¸

¸

¸

u(t)

y(t) =

**29.8608 35.9450 29.4689 17.7162
**

x(t).

1. Form a system variable representing this system. (Use ss.)

2. Find the transfer function of the system. (Use tf.)

3. Find the poles, zeros, and the DC gain of the system. (Use zpk.)

4. Write a state space equation of the system from its transfer function using

the formulas in Section 2.7.

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 62

62 Chapter 2 Modeling and Simulation

5. Obtain a state space equation of the system from its transfer function by

using ss. Compare the result with the original state space equation and the

result of part 4. Are they the same? Explain why.

2.15. Build a transfer function block in SIMULINK to implement a MISO system. Use

your new block to build the system shown in Figure 2.53(a) and also build the

system in Figure 2.53(b) using the existing blocks in SIMULINK. Simulate

the step responses of two systems and compare.

s + 1

____

s

1

_

s

1

____

s + 2

r u y

Ϫ

[s + 1 1]

_______

s

1

____

s + 2

r u y

Ϫ

(b) (a)

FIGURE 2.53: For MATLAB Problem 2.15.

2.11 NOTES AND REFERENCES

Modeling of a physical system usually involves specialized knowledge in the areas

where the system falls in. For simple systems, such as the ones discussed in this

chapter, knowledge on elementary physics is usually suﬃcient.

More in-depth coverage of circuit analysis is given in

C. A. Desoer and E. S. Kuh, Basic Circuit Theory, McGraw-Hill Inter-

national, Auckland, 1969.

For the analysis of op-amp circuits, as well as detailed knowledge on DC motors,

see

R. J. Smith and R. C. Dorf, Circuits, Devices, and Systems, 5th Edition,

John Wiley & Sons, New York, 1992.

A good reference on mechanical system modeling is

A. Bedford and W. Fowler, Engineering Mechanics, 3rd Edition, Prentice Hall,

Upper Saddle River, NewJersey, 2002.

The use of the gang of four for the four transfer functions in (2.29) ﬁrst appeared

in

K. J.

˚

Astr¨ om and R. Murray, Feedback Systems: An Introduction for

Scientists and Engineers, Princeton University Press, Princeton and

Oxford, 2008.

Qiu-Zhou runall.tex - 12/25/2008 3:19am Page 63

Queries in Chapter 2

Q1. We have provided the citation for Figure 2.15 here. Please conﬁrm if this is

ﬁne.

Qiu-Zhou

runall.tex - 12/25/2008 3:19am Page 14

14

Chapter 2

Modeling and Simulation

may take diﬀerent forms. We will see how we can process or simplify a model to make it easy to use and how to convert a model from one form to another. 2.1 MODELING BASED ON FIRST PRINCIPLES In this section, we will discuss the modeling of various types of systems using examples. 2.1.1 Electrical systems We will basically consider two types of circuits: one consisting of active RLC circuits containing possibly lumped resistors, inductors, capacitors, ideal sources, and controlled sources; and the other one consisting of circuits containing operational ampliﬁers. First let us consider a simple RLC circuit as shown in Figure 2.1, where the diamond symbol labeled gv1 means a voltage-controlled current source whose current is proportional to the voltage across the capacitor C1 . The input and output of the system are vi (t) and vo (t), respectively.

R1 L i

vi

C1

v1

C2

v2

gv1

R2

vo

FIGURE 2.1: A simple RLC circuit.

The use of intermediate variables in addition to the input and output greatly facilitates the generation of the diﬀerential equation model. In an RLC circuit, we usually choose capacitor voltages and inductor currents as the intermediate variables. Let the number of such intermediate variables be n. Then we can write down n independent diﬀerential equations using Kirchhoﬀ’s current law (KCL) and Kirchhoﬀ’s voltage law (KVL), applied to nodes and loops involving inductors and capacitors. Here, by independent equations we mean that any one of them cannot be generated from the others among the equations obtained. Referring back to the RLC circuit shown in Figure 2.1, we choose v1 (t), v2 (t), and i(t) as intermediate variables. Then applying KCL to the node connecting R1 , C1 , and L gives vi (t) − v1 (t) dv1 (t) C1 = − i(t). (2.1) dt R1 Applying KCL to the node connecting to L, C2 , R2 , and the controlled source gives C2 dv2 (t) v2 (t) = i(t) − gv1 (t) − . dt R2 di(t) = v1 (t) − v2 (t). dt (2.2)

Applying KVL to the loop containing C1 , L, and C2 gives L (2.3)

Qiu-Zhou

runall.tex - 12/25/2008 3:19am Page 15

Section 2.1

Modeling Based on First Principles

15

The output should be expressed as a function of the intermediate variables and the input variable. For the RLC circuit at hand, the output vo (t) is simply one of the intermediate variables, (2.4) vo (t) = v2 (t). The diﬀerential equations (2.1), (2.2), and (2.3), as well as the algebraic equation (2.4), give a model of the RLC circuit. The model can also be organized in the following matrix form 0 −1 C1 0 0 v1 (t) ˙ −1/R1 v1 (t) 1/R1 0 C2 0 v2 (t) = −g 1 v2 (t) + 0 vi (t) ˙ −1/R2 0 0 L ı ˙(t) 1 −1 0 i(t) 0 (2.5) v1 (t) vo (t) = 0 1 0 v2 (t) . (2.6) i(t) Note that we have used the alternative notation x(t) to denote the derivative ˙ dx(t) . dt One may premultiply by the inverse of the matrix on the left-hand side of (2.5) both sides of the equation. We then obtain 1 1 1 − 0 − v1 (t) v1 (t) R1 C1 ˙ C1 R1 C1 1 g 1 v2 (t) = − (2.7) v2 (t) + 0 vi (t) ˙ − C2 R2 C2 C2 1 1 ı ˙(t) i(t) 0 − 0 L L v1 (t) vo (t) = 0 1 0 v2 (t) . (2.8) i(t)

As we will see later, the model of this form is called a state space model. Next let us consider circuits containing operational ampliﬁers (op-amps), which are simply called op-amp circuits. Such circuits have wide applications. We often use such a circuit to realize a set of diﬀerential equations or a system. An ideal op-amp, as shown in Figure 2.2, is an ampliﬁer with inﬁnite gain, inﬁnite input impedance, and zero output impedance.

v1(t) v2(t)

A

vo(t)

FIGURE 2.2: An operational ampliﬁer.

Consider the circuit shown in Figure 2.3. This is a system with m inputs u1 (t), . . . , um (t) and one output y(t). Owing to the inﬁnite gain of the op-amp, the

Qiu-Zhou

runall.tex - 12/25/2008 3:19am Page 16

16

Chapter 2

**Modeling and Simulation
**

R C u1 R1

. . .

. . .

Rm

i

N va

ia A

i y

um

FIGURE 2.3: An op-amp circuit.

node N is a virtual ground, i.e., va (t) = 0. Owing to the inﬁnite input impedance of the op-amp, the current ﬂowing into the op-amp is zero, i.e., ia (t) = 0. Thus we have u1 (t) u2 (t) um (t) i(t) = + + ··· + R1 R2 Rm and i(t) = − Hence RC dy(t) R R + y(t) = − u1 (t) + · · · + um (t) . dt R1 Rm 1 dy(t) y(t) − C . R dt

If C = 0, i.e., the capacitor is disconnected, then y(t) = − R R u1 (t) + · · · + um (t) , R1 Rm

i.e., the output is a negatively weighted sum of the inputs. In this case, the circuit is called an (inverting) summing ampliﬁer. If further, m = 1, the circuit is called an (inverting) ampliﬁer. If R = ∞, i.e., the resistor is disconnected, then y(t) = − 1 R1 C

t 0

u1 (τ )dτ + · · · +

1 Rm C

0

t

um (τ )dτ ,

i.e., the output is a negatively weighted sum of the integrals of the inputs. If further, m = 1, then the output is proportional to the integral of the input. In this case, the circuit is called an (inverting) integrator. Operational ampliﬁers are the building blocks of most electronic systems existing today. In an abstract level, we do not wish to keep track of the inverting eﬀect and the coeﬃcient of the integrators. We take pure integrators and weighted summing ampliﬁers as the basic components. We schematically represent them by diagrams shown in Figure 2.4. These two types of components can be used as the building blocks of sophisticated op-amp circuits that can be used in system simulation and implementation, as will be discussed in Section 2.7.

Qiu-Zhou

runall.tex - 12/25/2008 3:19am Page 17

Section 2.1

u1 a1

**Modeling Based on First Principles
**

1

17

. . .

y u

un

an

y

FIGURE 2.4: Schematic symbols for a summing ampliﬁer and an integrator.

2.1.2

Mechanical systems Typical mechanical systems may involve two kinds of motion: linear motion and rotational motion. In this section, we will look at two examples of mechanical systems. The ﬁrst example is one with linear motion. The second example is one with rotational motion. Of course, a general mechanical system may have both linear and rotational motion, as will be seen in Section 2.10.

x1 K M1 F

FIGURE 2.5: A two-cart system.

x2

f

M2

Consider two carts moving on a table, as shown in Figure 2.5. The carts, assumed to have masses M1 and M2 , respectively, are connected by a spring. A force f (t) is applied to cart M1 and we wish to control the position of cart M2 . An ideal spring generates a force that is proportional to the relative displacement of its two ends. The spring in this system is assumed to be nonideal and its eﬀect is equivalent to the sum of an ideal spring, depicted by the symbol in the upper part of the connection, and a friction device, depicted by the symbol in the lower part of the connection, which generates a force proportional to the relative velocity of its two ends. Assume that the reference points for the positions of the two carts are chosen so that the spring is at rest when x1 (t) = x2 (t). To model a mechanical system like this, we usually choose the positions of all independent rigid bodies as the internal variables and write down the equations according to Newton’s second law. Applying Newton’s second law to the ﬁrst body, we obtain M1 d2 x1 (t) = f (t) − K(x1 (t) − x2 (t)) − F dt2 dx1 (t) dx2 (t) − dt dt . (2.9)

Applying Newton’s second law to the second cart, we obtain M2 d2 x2 (t) = K(x1 (t) − x2 (t)) + F dt2 dx1 (t) dx2 (t) − dt dt . (2.10)

Finally, we identify the output and relate it to the internal variables and the input. In this case, the output is simply x2 (t).

In a rotational motion. A DC motor has two sets of windings. Here a torque τi (t) can be applied around the pivot point and we are concerned with the angle θ(t) between the pendulum and the vertical downward direction. dt2 This is a second-order diﬀerential equation.6. θ(t) is the angular displacement. shown in Figure 2. One set is mounted on the stator and is used to generate the magnetic ﬁeld. The length of the pendulum is L and the mass M of the pendulum is concentrated at its tip.tex .3 Electromechanical systems A simple electromechanical system is an armature-controlled direct current (DC) motor with a load. Next let us consider a pendulum shown in Figure 2.6: A pendulum.12/25/2008 3:19am Page 18 18 Chapter 2 Modeling and Simulation We can also reorganize the equations into the following matrix form M1 0 0 M2 x1 (t) ¨ x2 (t) ¨ + F −F −F F x1 (t) ˙ x2 (t) ˙ + K −K = −K K 1 0 x1 (t) x2 (t) f (t).Qiu-Zhou runall. and the torque due to the gravity of the mass which is M gL sin θ(t). M L2 2. In an armature-controlled DC motor. . the equation governing the motion is given by J d2 θ(t) = τi (t) − M gL sin θ(t).11) Models of the form (2. and τ (t) is the total torque applied. Here the input is the torque τi (t) and the output is the angle θ(t).11) are very typical for mechanical systems. Therefore. u M FIGURE 2.1. (2. we know that the moment of inertia is J = M L2 and there are two torques applied to the system: the externally applied torque τi (t). Applying this to the pendulum system. Such a model is called a second-order model.7. Newton’s second law takes the form d2 θ(t) = τ (t) dt2 where J is called the moment of inertia.

When the motor shaft turns.Qiu-Zhou runall. τm (t) = Kt ia (t). which consists of a mass with a moment of inertia J and a counteractive friction torque proportional to the motor velocity via the friction coeﬃcient Kf .1 ia Ra La Modeling Based on First Principles ve 19 va vb J Kf FIGURE 2.tex . This potential is called the back electro-motive force (back emf). the current to this set of windings is set to be constant so that the magnetic ﬁeld in the motor is constant. we obtain Ra ia (t) + La (2.. i.12/25/2008 3:19am Page 19 Section 2. Therefore. The other is that the back emf vb (t) is proportional to the motor velocity ω(t) via the back emf constant Kb .e. One is that the torque in the motor shaft is proportional to the armature current via the torque constant Kt .e. dt dt Applying KVL to the armature circuit. There are two basic relations in a DC motor. the whole DC motor system including the armature circuit and the mechanical load can be described by the following parameters and variables: Ra : La : J: Kf : Kt : Kb : va (t): ia (t): vb (t): τm (t): θ(t): ω(t): armature resistance armature inductance moment of inertia of the load friction coeﬃcient torque constant back emf constant armature voltage armature current back electro-motive force (back emf) motor torque angular position of the motor shaft ˙ angular velocity of the motor shaft (= θ(t)) dia (t) dθ(t) + Kb = va (t). i. The other set is mounted on the rotor and is used to generate the torque through the magnetic force.12) . The current through this winding is controllable so a controlled torque can be obtained.7: An armature-controlled DC motor system. the magnetic ﬁeld also generates a potential in the rotor winding as a result of the Faraday induction.. The torque in the motor shaft then drives the load. vb (t) = Kb ω(t).

Replacing dt model of a DC motor system in the speed control case.8: A magnetic-ball suspension system. J dt (2. the distance from the ball to the coil y(t) is the output. + Kf (2.14) (2. Another interesting electromechanical system is a magnetic-ball suspension system shown in Figure 2. we obtain Ri(t) + L di(t) = v(t). instead of the angular position. winding resistance R. Such cases are called speed control dθ(t) by ω(t) in (2. we obtain d2 θ(t) dθ(t) J = Kt ia (t). The other parameters ﬁeld on the ball is approximately given by f (t) = K y(t) are mass of the ball M . and winding inductance L. Ra ia (t) + La dia (t) + Kb ω(t) = va (t) dt dω(t) + Kf ω(t) = Kt ia (t). Here. we are concerned with the angular velocity (speed) of the motor.Qiu-Zhou runall.15) These two equations give the mathematical model of the DC motor system with input va (t) and output ω(t). Applying KVL to the coil.12) and (2.13) dt2 dt These two equations give the mathematical model of the DC motor system with input va (t) and output θ(t). R. produces a magnetic ﬁeld. In some applications. we get the diﬀerential equation cases. L i v y M FIGURE 2. The magnetic ﬁeld generates an attracting force on the steel ball. the voltage applied to the coil v(t) is the input. after being fed with current.tex .13).8. dt . The coil at the top.12/25/2008 3:19am Page 20 20 Chapter 2 Modeling and Simulation Applying the rotational version of Newton’s second law to the motor shaft. and the lifting force generated by the magnetic i2 (t) .

It is noted that the variables y(t) and i(t) are involved nonlinearly in the equations and this system is called a nonlinear system. . 2.1. . we obtain M i2 (t) d2 y(t) + M g. ∈ Rn . vi (t). For electrical circuits. we can always choose the voltages across independent capacitors and the currents through independent inductors as state variables. Suppose that a diﬀerential equation model of a system is already obtained. . the variables in the diﬀerential equations are the input u(t) and the internal variables v1 (t). . . . together with input for all t ≥ t0 . xn (t) p This vector is called a state vector. we put them into a vector x1 (t) x2 (t) x(t) = . . . . usually named x1 (t). and the highest order of the derivatives of vi (t) in the diﬀerential equations is qi . whereas we use normal font letters to denote scalars and scalar-valued functions.17) . 2. determine the behavior of the system for all t ≥ t0 .Qiu-Zhou runall. vp (t).12/25/2008 3:19am Page 21 Section 2. we need to put them in standard forms.2 STATE SPACE MODEL AND LINEARIZATION The mathematical models obtained in the previous sections consist of sets of differential equations with diﬀerent orders and these equations involve variables other than the inputs and outputs. Deﬁnition 2. In this case. . For mechanical systems. Here and in the sequel. u(t). vi (t). . . xn (t).2 State Space Model and Linearization 21 Applying Newton’s second law to the ball. u(t). t] ˙ y(t) = g[x(t). . p vi (t). the total number of state variables is i=1 qi .16) (2. we use bold font letters to denote vectors (or matrices) and vector-valued (or matrix-valued) functions. . x2 (t). One of the commonly used standard forms is the state space form. = −K dt2 y(t) These two equations then give the mathematical model of the system. Then we can choose (q −1) ˙ ¨ i = 1. . we can always choose the positions and velocities of independent rigid bodies as state variables. This deﬁnition looks very abstract but in many situations the state variables can be chosen intuitively. .tex . . After the state variables are chosen. vi i (t) as the state variables. . Then the set of mixed ordered diﬀerential equations can be converted into a set of ﬁrst-order diﬀerential equations plus an algebraic equation x(t) = f [x(t). t] (2. The state variables of a system are a set of independent variables whose values at time t0 . For the sake of systematic study.

t] is a vector-valued function. we assume that the input u(t) is a unilateral signal whose value before the initial time is zero. fn [x(t). . The algebraic equation (2. t] 2 : Rn × R × R → R n f [x(t). u(t) = τ (t). we also view x(t) as a unilateral function. x2 (t) = θ(t). y(t) ∈ R is the output. This initial value is called the initial condition. f1 [x(t). u(t). To conform to our standard mathematical treatment of signals. Together they form the state space model of the system. the input u(t) alone is not suﬃcient. EXAMPLE 2. u(t). The number of state variables n is called the order of the system. and g[x(t).1.Qiu-Zhou runall. To determine the state vector x(t) from the diﬀerential equation (2. According to Deﬁnition 2. The set of ﬁrst-order diﬀerential equations (2. We always assume that the system starts operation at time t = 0.tex . u(t). the one for the active RLC circuit has already been put in the state space form. then x(t) has a jump discontinuity at t = 0 and its derivative x(t) contains impulse ˙ functions. If the initial condition is nonzero. t] f [x(t). t] : Rn × R × R → R is a scalar-valued function.12/25/2008 3:19am Page 22 22 Chapter 2 Modeling and Simulation where u(t) ∈ R is the input. Renaming x1 (t) = θ(t). u(t). the diﬀerential equation model directly obtained from Newton’s second law is ˙ with input τ (t) and output θ(t). we obtain the state space model x2 (t) x1 (t) ˙ = −M gL sin x (t) + u(t) x2 (t) ˙ 1 M L2 y(t) = x1 (t) x1 (0) x2 (0) with θ(0) ˙ θ(0) ¨ M L2 θ(t) = τ (t) − M gL sin θ(t) = . y(t) = θ(t). Among the models of the systems discussed in Section 2.1. the initial value of the state x(0) is also needed. t] = .2 For the pendulum system introduced in the last section. .17) is called the output equation of the system.16). namely. u(t). .16) is called the state equation of the system.

3 The magnetic suspension system has the diﬀerential equation model Ri(t) + L M di(t) = v(t) dt d2 y(t) i2 (t) + M g. in particular. α2 ∈ R. then input α1 u1 (t)+α2 u2 (t) produces output α1 y1 (t)+ α2 y2 (t) for all α1 . column and row vectors depending possibly on time t. possibly depending on time t.7) and (2.8) n×n Proof. A system is said to be linear if it can be described by linear diﬀerential equations. = −K 2 dt y(t) v(t). x2 (t) = y(t). If input u1 (t) produces output y1 (t) and input u2 (t) produces output y2 (t).2 State Space Model and Linearization 23 EXAMPLE 2. then there are x1 (t) and x2 (t) with x1 (0) = 0 and x2 (0) = 0 satisfying x1 (t) = A(t)x1 (t) + b(t)u1 (t) ˙ y1 (t) = c(t)x1 (t) + d(t)u1 (t) Theorem 2.tex . x3 (t) = y(t). Assume that a linear system has zero initial condition. if input u1 (t) produces output y1 (t) and input u2 (t) produces output y2 (t). With zero initial condition. the RLC circuit in Section 2. x3 (0) y(0) ˙ Deﬁnition 2.5 (Superposition Principle). and b(t) ∈ Rn×1 and c(t) ∈ R1×n are. For a linear system. . the state space model takes the following matrix form: x(t) = A(t)x(t) + b(t)u(t) ˙ y(t) = c(t)x(t) + d(t)u(t) where A(t) ∈ R is an n × n matrix. and we get the state Choose x1 (t) = i(t). if the functions f and g in its state space model are linear functions of x(t) and u(t). respectively.1 is a linear system and its state space equations were already in the matrix form as in (2.4.12/25/2008 3:19am Page 23 Section 2. For example.Qiu-Zhou runall. u(t) = ˙ space model u(t) − Rx1 (t) L x1 (t) ˙ x2 (t) = x3 (t) ˙ x3 (t) ˙ Kx2 (t) 1 − +g M x2 (t) y(t) = x2 (t) with x1 (0) i(0) x2 (0) = y(0) .

if we choose the state variables. Also assume that zero input generates zero output.8 The DC motor system is an LTI system. Deﬁnition 2. Theorem 2. x(t) = α1 x1 (t) + α2 x2 (t). in the position control case. then we obtain x(0) = 0 and x(t) = A(t)x(t) + b(t)u(t) ˙ y(t) = c(t)x(t) + d(t)u(t). Indeed. in particular. If we add the two state equations and the two output equations. A linear time-invariant (LTI) system has the following form of state space model: x(t) = Ax(t) + bu(t) ˙ y(t) = cx(t) + du(t) where A ∈ Rn×n . respectively. and y(t) = α1 y1 (t) + α2 y2 (t). c ∈ R1×n . input and output variables as x1 (t) = ia (t).Qiu-Zhou runall. All examples of real physical systems considered so far are time-invariant systems. and d ∈ R are constant matrices.6. if the functions f and g in its state space model do not depend on the time t explicitly. then the state space equation can be written as R 1 Kb a − 0 − La La La x1 (t) x1 (t) ˙ x2 (t) + 0 u(t) x2 (t) = 0 ˙ 0 1 x3 (t) x3 (t) ˙ Kt Kf 0 0 − J J x1 (t) y = 0 1 0 x2 (t) . then input u(t − τ ) produces output y(t − τ ).12/25/2008 3:19am Page 24 24 Chapter 2 Modeling and Simulation and x2 (t) = A(t)x2 (t) + b(t)u2 (t) ˙ y2 (t) = c(t)x2 (t) + d(t)u2 (t). EXAMPLE 2.tex .7. x3 (t) . This implies that y(t) is the output of the system with zero initial condition and input u(t). b ∈ Rn×1 . A system is said to be time-invariant if it can be described by diﬀerential equations with constant coeﬃcients. Assume that a time-invariant system has zero initial condition. x3 (t) = ω(t). x2 (t) = θ(t). y(t) = θ(t). u(t) = va (t). If input u(t) produces output y(t). and deﬁne u(t) = α1 u1 (t) + α2 u2 (t).

x(t) = f [x(t). x0 .12/25/2008 3:19am Page 25 Section 2. if we choose x1 (t) = ia (t). u(t) = va (t). i. respectively. then we obtain Kb Ra 1 − − La La x1 (t) x1 (t) ˙ La = + x2 (t) ˙ Kf x2 (t) Kt 0 − J J y(t) = 0 1 x1 (t) x2 (t) .tex . u(t)] and f and g are continuously diﬀerentiable functions. u0 ) y0 = g(x0 . f and g are suﬃciently smooth functions.2 State Space Model and Linearization 25 In the speed control case. i. u(t)] ˙ y(t) = g[x(t). we will study how to approximate a nonlinear system by a linear one. u(t) In the rest of this section... A triple of constant vectors (u0 .9. Deﬁnition 2. Assume that a system is described by a state space model.e.e. Such a process is called linearization. ˜ ∂f ∂u ∂g ∂u u(t) + high-order terms ˜ u(t) + high-order terms ˜ x(t) + ˜ x(t) + ˜ x=x0 u=u0 x=x0 u=u0 x=x0 u=u0 . u(t) = u0 . Since f and g are suﬃciently smooth. for all time. We will deal only with time-invariant systems. The physical meaning of an operating point is that if the system has initial condition x0 and a constant input u0 is applied. x(0) = x0 =⇒ x(t) = x0 . x2 (t) = y(t) = ω(t). then the state and output will stay at constant values x0 and y0 . y(t) = y0 . ω(t). we can conclude that u(t) − u0 and x(0) − x0 are small =⇒ x(t) − x0 and y(t) − y0 are small. u0 ).Qiu-Zhou runall. y0 ) ∈ R × Rn × R is said to be an operating point of the system if 0 = f (x0 . Denote u(t) = u(t) − u0 ˜ x(t) = x(t) − x0 ˜ Replace f and g by their diﬀerentials: ∂f ˙ x(t) = ˜ ∂x y (t) = ˜ ∂g ∂x x=x0 u=u0 y (t) = y(t) − y0 .

∂g ∂xn . .. Hence we wish to linearize it around an operating point with y(t) = y0 ..Qiu-Zhou runall. x=x0 u=u0 x=x0 u=u0 x=x0 u=u0 x=x0 u=u0 This linear system is called a linearized system of the original nonlinear system. A usual control problem is to lift the ball to a certain height and suspend it at that height. .tex . y(t) are small. . ∂f = ∂x ∂f1 ∂x1 . . ∂f = ∂u ∂f1 ∂u . . ∂fn ∂xn .12/25/2008 3:19am Page 26 26 Chapter 2 Modeling and Simulation where Since u(t). ∂g = ∂x ∂g ∂x1 . . b= d= ∂f ∂u ∂g ∂u . . . ∂fn ∂u . ∂fn ∂x1 . we can neglect the high-order terms and approximate ˜ ˜ ˜ the original system by the following linear system: ˙ x(t) = A˜ (t) + b˜(t) ˜ x u y (t) = c˜ (t) + d˜(t) ˜ x u where A= c= ∂f ∂x ∂g ∂x . solve equations 0= u0 − Rx10 L x2 10 +g M x20 0 = x30 0=− y0 = x20 .. .. x(t).10 The magnetic suspension system is a nonlinear system described by state space equation u(t) − Rx1 (t) L x1 (t) ˙ x2 (t) = x3 (t) ˙ x3 (t) ˙ x2 (t) 1 − +g M x2 (t) y(t) = x2 (t). ∂f1 ∂xn . ... EXAMPLE 2. To get the operating point.

Take the Laplace transform with zero initial conditions: sX(s) = AX(s) + bU (s) Y (s) = cX(s) + dU (s). x=x0 u=u0 2. (2. the linearized model of the deviation variables is ˙ x(t) = A˜ (t) + b˜(t) ˜ x u y (t) = c˜ (t) + d˜(t) ˜ x u where −2 R L 0 g M y0 0 1 .19) Now a set of diﬀerential equations in the time domain becomes a set of algebraic equations in the frequency domain.Qiu-Zhou runall.12/25/2008 3:19am Page 27 Section 2.tex .3 TRANSFER FUNCTIONS AND IMPULSE RESPONSES Consider an LTI system described by state space equation x(t) = Ax(t) + bu(t) ˙ y(t) = cx(t) + du(t). state. There are a total of n + 1 equations in (2. ˜ √ x10 M gy0 . d= ∂g ∂u = = 0. one needs √ to apply a constant voltage u(t) = R M gy0 to the coil. and output variables from the operating point by u(t) = u(t) − u0 = u(t) − R M gy0 ˜ √ x1 (t) − M gy0 ˜ x2 (t) − y0 x(t) = x(t) − x0 = x3 (t) Now.19) and we can use them to eliminate the n variables in X(s) to obtain an equation relating the input U (s) and the output Y (s). 0 1 L 0 0 y (t) = y(t) − y0 . Linear algebra now gives .18)–(2. which means that to suspend the ball at height y0 in the steady state. Denote the deviations of the input. .18) (2.3 Transfer Functions and Impulse Responses 27 This gives u0 = R M gy0 . x20 = y0 x30 0 y0 = y0 ∂f A= ∂x x=x0 u=u0 c= ∂g ∂x x=x0 u=u0 = = − 0 0 g y0 ∂f b= ∂u x=x0 u=u0 0 1 0 .

Deﬁnition 2.Qiu-Zhou runall.12/25/2008 3:19am Page 28 28 Chapter 2 Modeling and Simulation a formal method of capturing this process. From (2. of course.19). + (Ra J + Kf La )s + (Ra Kf + Kt Kb ) .12 Let us continue to consider the DC motor system in Example 2. The transfer function of an LTI system is the ratio of the Laplace transform of the output over that of the input when the initial condition is zero.11.. i. the transfer function is −1 Kb Ra 1 s+ La La La G(s) = 0 1 K Kf t 0 s+ − J J = = Kt /(La J) (s + Ra /La )(s + Kf /J) + Kt Kb /(La J) La Js2 Kt . Computing only one element is.8. control case. In the speed control case. we get Plugging it into (2. U (s) EXAMPLE 2.tex .18).e. + (Ra J + Kf La )s2 + (Ra Kf + Kt Kb )s One may feel that the inverse of the 3 × 3 matrix is hard to compute. we obtain X(s) = (sI − A)−1 bU (s).. much simpler than computing all elements in the inverse. but the computation can be signiﬁcantly simpliﬁed if one notices that only the element in the second row and the ﬁrst column of the inverse is needed since all other elements will be multiplied by zero when forming the transfer function. Y (s) G(s) = . Y (s) = c(sI − A)−1 b + d. the transfer function is −1 1 Ra Kb s+ 0 La La La 0 G(s) = 0 1 0 0 s −1 Kt Kf 0 − 0 s+ J J Kt /(La J) = s(s + Ra /La )(s + Kf /J) + Kt Kb /(La J)s = La Js3 In the position Kt . the ratio of the Laplace transform of the output over that of the input is a ﬁxed function independent of the input.e. U (s) i.

=√ M (Ls + R)(y0 s2 − g) The transfer function of an LTI system with a state space model is always a ratio of two polynomials b(s) G(s) = a(s) where b(s) is called the numerator polynomial and a(s) is called the denominator polynomial.13 Let us continue with Example 2. in the speed control case. Substitute X1 (s) from the second equation into the ﬁrst equation and note that Y (s) = X2 (s) from the third equation. . We then get J Kt Consequently. G(s) = Kt Y (s) = .10.18) and (2. the magnetic function of the linearized model is R 0 s+ L 0 s G(s) = 0 1 0 g g 2 − M y0 y0 = −2 s+ R L g 1 M y0 L s2 − suspension system.tex . EXAMPLE 2. i. it is probably more convenient to obtain the transfer function by directly manipulating the Laplace transform of the state space model (2.. The transfer −1 1 L −1 0 s 0 0 g y0 √ −2 gy0 .e.12/25/2008 3:19am Page 29 Section 2. Y (s) = La La the same result as the one obtained by matrix inversion.3 Transfer Functions and Impulse Responses 29 For systems with a small number of state variables.19). U (s) La Js2 + (Ra J + Kf La )s + (Ra Kf + Kt Kb ) s+ Ra La s+ Kf J + 1 Kb U (s). they do not have common factors. the Laplace transform of the state space model is sX1 (s) = − sX2 (s) = Ra Kb 1 X1 (s) − X2 (s) + U (s) La La La Kt Kf X1 (s) − X2 (s) J J Y (s) = X2 (s). We assume that polynomials b(s) and a(s) are coprime. For example.Qiu-Zhou runall.

. the roots of b(s). and the poles of the system are the eigenvalues of A. It is said to be strictly proper if deg b(s) < deg a(s). or equivalently |G(∞)| < ∞. .tex . Transfer functions obtained from state space models are always proper. one can represent a polynomial p(s) = p0 sn + p1 sn−1 + · · · + pn by a vector p= p0 p1 · · · pn . are called the poles of G(s). or equivalently G(∞) = 0.Qiu-Zhou runall. but occasionally nonproper transfer functions appear in abnormal cases. We often denote a transfer function. some of the eigenvalues of A do not appear as the poles of the transfer function G(s). . . zm . a(s) is the characteristic polynomial of matrix A. pn . or any rational function. A transfer function or system G(s) is said to be proper if deg b(s) ≤ deg a(s). or equivalently 0 = |G(∞)| = ∞. . For a proper transfer function. In this case. Several additional deﬁnitions will be needed. Notice the diﬀerence between (high frequency) gain and DC gain. then a(s) = det(sI − A). G(s) = K (s − p1 )(s − p2 ) · · · (s − pn ) The ﬁrst form is called the unfactored form and the second form is called the factored form. the roots of a(s).. So the transfer function of an LTI system with a state space model is a rational function. . . It is said to be bi-proper if deg b(s) = deg a(s). We will assume that this does not happen in our development. i. are called the zeros of G(s) and p1 .12/25/2008 3:19am Page 30 30 Chapter 2 Modeling and Simulation The ratio of two polynomials is also called a rational function. The factored form is also called the pole-zerogain form. K is called the (high frequency) gain of G(s). This again is an abnormal phenomenon and is prone to trouble. then a(s) is only a factor of det(sI − A) and the poles of the system are part of the eigenvalues of A. z2 . if there is no common factor on the above denominator and numerator. . the diﬀerence deg a(s) − deg b(s) is called the relative degree of G(s). They become hidden from the transfer function and hence are called the hidden poles. In MATLAB. Here z1 . in either of the following forms b0 sm + b1 sm−1 + · · · + bm G(s) = a0 sn + a1 sn−1 + · · · + an or (s − z1 )(s − z2 ) · · · (s − zm ) . If there are common factors on the above denominator and numerator. In the transfer function of a state space model G(s) = c(sI − A)−1 b + d = c adj(sI − A) b +d det(sI − A) where adj means the adjugate of a matrix (see Appendix B). p2 .e. G(0) is called the DC gain of G(s). . and deg a(s) is called the order or degree of G(s). Extra care needs to be taken in this case.

is called the impulse response.9.e. >> q=[5 6].. then Y (s) = G(s) and y(t) = L−1 [G(s)] = g(t). Block diagrams are particularly useful when dealing with complex systems consisting of collections of interconnected subsystems. For polynomial addition. one has to augment either p or q with enough zeros so that they have the same dimension. we will present an alternative way of representing and operating polynomials in MATLAB .9: Block diagram representation.12/25/2008 3:19am Page 31 Section 2. u(t) = δ(t). For example. denoted by g(t). However. For the example above. 2. we can type >> roots(p) One often needs to compute the sums and products of polynomials. For polynomial multiplication. the system in the last section Y (s) = G(s)U (s) can be represented using the block diagram in Figure 2.q) One may ﬁnd these inconvenient and counterintuitive. i.4 Simplifying Block Diagrams 31 To ﬁnd the roots of p(s). FIGURE 2. in general. U(s) G(s) Y(s) q(s) = 5s + 6. one has to use the command “conv”: >> conv(p. They can be simpliﬁed using the equivalence relationships in Table 2.1.Qiu-Zhou runall. not deﬁned at all. we should do >> p+[0 0 q]. Hence the inverse Laplace transform of G(s). Since the transfer function G(s) of an LTI system is the ratio of the output Laplace transform Y (s) and the input Laplace transform U (s).4 SIMPLIFYING BLOCK DIAGRAMS Interconnected systems are often conveniently represented by block diagrams. if U (s) = 1. neither of the following commands >> p+q >> p*q would give you what you want since the ﬁrst requires the two vectors to have the same dimension and the second is. Represent them in MATLAB by >> p=[1 2 3 4]. .6. In Section 2. Let p(s) = s3 + 2s2 + 3s + 4.tex . We shall now see how a complex system block diagram can be simpliﬁed.

14 Consider the simple feedback system shown in Figure 2. .10: A simple feedback system.Qiu-Zhou runall. U (s) = C(s)E(s).tex .1: Equivalent block diagrams. To ﬁnd the relationship between r and y. we shall write down all the equations: Y (s) = P (s)U (s).12/25/2008 3:19am Page 32 32 Chapter 2 Modeling and Simulation G1 G2 G2G1 G1 G1 G2 G2 G G 1 __ G G G G G G G G G _______ 1 GH H TABLE 2. EXAMPLE 2.10. E(s) = F (s)R(s) − H(s)Y (s). r F(s) e C(s) u P(s) y H(s) FIGURE 2.

4 Simplifying Block Diagrams 33 We shall now eliminate the intermediate variables. E(s) and U (s).Qiu-Zhou runall.12.tex .e..11: Original diagram of Example 2. to get Y (s) = P (s)C(s) [F (s)R(s) − H(s)Y (s)] . Here we omitted the variable s in the transfer function notation to make the expressions more compact. we shall assume D = 0 and we can simplify the block diagram by ﬁrst closing the two inner loops: G1 → H1 → G1 loop and G3 → H2 → G3 loop.15 Consider the feedback control system shown in Figure 2. we have Y = R = G1 1 − G1 H1 G2 G3 1 + G3 H2 G1 H3 G2 G3 1− 1 + G3 H2 1 − G1 H1 F+ G2 G3 (F − F G1 H1 + G1 ) . which results in the block diagram in Figure 2. R(s) 1 + P (s)C(s)H(s) EXAMPLE 2. 1 − G1 H1 + G3 H2 − G1 G3 H1 H2 − G1 G2 G3 H3 .12/25/2008 3:19am Page 33 Section 2. Thus solving Y (s). We shall compute the transfer function from R to Y . We then move the ﬁrst summing junction to the place of the second summing junction to get the block diagram in Figure 2. Thus. Finally. we get Y (s) = P (s)C(s)F (s) R(s) 1 + P (s)C(s)H(s) i. closing the loop.11. F R Y G1 D H1 G2 G3 H2 H3 FIGURE 2.13.15. the transfer function from R(s) to Y (s) is given by Y (s) P (s)C(s)F (s) = .

15.7.1.13: Further simpliﬁed block diagram of Example 2.12/25/2008 3:19am Page 34 34 Chapter 2 Modeling and Simulation F R G1 _________ 1 G1H1 G3 _________ 1 G3H2 Y G2 D H3 FIGURE 2.5 TRANSFER FUNCTION MODELING The modeling of complicated interconnected LTI systems can be done in the Laplace transform domain using transfer functions and block diagrams in cases when the transfer functions of the subsystems are known. Let us consider the case when the load not only contains an inertia torque proportional to the angular acceleration and a friction torque proportional to the angular velocity.15 with inner loops closed. but also includes . Let us use an armature-controlled DC motor with a load torque.12: Block diagram of Example 2. shown in Figure 2. 2. block diagrams can always be simpliﬁed by using the block diagram algebra as shown in Table 2. 1 − G1 H1 + G3 H2 − G1 G3 H1 H2 − G1 G2 G3 H3 In general.Qiu-Zhou runall. as an example to see how this can be done.tex . F R G1 _________ 1 G1H1 G3 _________ 1 G3H2 Y G2 D G1H3 _________ 1 G1H1 FIGURE 2. We can also ﬁnd the transfer function from D to Y as Y = D = G2 G3 1 + G3 H2 G1 H3 G2 G3 1− 1 + G3 H2 1 − G1 H1 G2 G3 (1 − G1 H1 ) .

and acceleration.5 Transfer Function Modeling 35 a nonzero possibly time-varying torque τd (t) independent of the angular position.25) (2. magnetic. we have 1 [Va (s) − Vb (s)]. (2. First notice that in the electrical part. Such a system can be considered as an interconnected system with electrical.15.24) . Combining all of these equations. we have Tm (s) = Kt If (s) where If (s) is the Laplace transform of if (t). We also know that the back emf voltage is given by Vb (s) = Kb Ω(s).23) (2.22) (2. the armature current ia (t) is set to be constant but the ﬁeld circuit is used to control the varying torque. Simplifying the block diagram gives Θ(s) = 1 Kt s [(La s + Ra )(Js + Kf ) + Kt Kb ] td va 1 ________ ia Las Ra Kt tm 1 ________ Js Kf v 1 _ s u −(La s + Ra ) Va (s) Td (s) . the torque is related to the ﬁeld current as τm (t) = Kt if (t) where if (t) is the ﬁeld current.14. velocity.14: Block diagram of an armature-controlled DC motor. In the Laplace domain.Qiu-Zhou runall.21) 1 Ω(s) s where Td (s) is the Laplace transform of a possible load torque. •A ﬁeld-controlled DC motor has the same structure as an armaturecontrolled DC motor. The mechanical part has relations Ω(s) = and 1 [Tm (s) − Td (s)] Js + Kf Θ(s) = (2.20) Ia (s) = La s + Ra Then the torque generated by the motor is given by Tm (s) = Kt Ia (s). and mechanical subsystems. Kb FIGURE 2.tex .12/25/2008 3:19am Page 35 Section 2. we can see that the block diagram of the whole system is as in Figure 2. (2. In this case. •Q1 Another illustrative example is a ﬁeld-controlled DC motor shown in Figure 2. The diﬀerence is that in the ﬁeld-controlled case.

1]. (2. . Then the following sequence of commands assigns the variable F with its state space description: >> A=[0 1.tex .15: A ﬁeld-controlled DC motor system.16: Block diagram of a ﬁeld-controlled DC motor.12/25/2008 3:19am Page 36 36 Chapter 2 Modeling and Simulation if Rf ia vf Lf J Kf constant FIGURE 2.25).23).Qiu-Zhou runall.26) (2.16. (2. and (2. 2. no matter whether it is described by a state space model or by transfer function model. gives vf (t) = Lf If (s) 1 = . The ﬁeld current is generated by a ﬁeld voltage through a ﬁeld circuit and satisﬁes the following equation: dif (t) + Rf if (t) dt which.6 MATLAB MANIPULATION OF LTI SYSTEMS In the MATLAB Control Systems Toolbox. a system can be represented by a single variable. -1 -2]. >> B=[0 .27). in terms of Laplace transforms. Vf (s) Lf s + Rf Combining equations (2. td vf 1 ________ if Rf Lf s Kt tm 1 ________ Js Kf v 1 _ s u FIGURE 2. we get Θ(s) = 1 Kt (Lf s + Rf )(Js + Kf )s −(Lf s + Rf ) Vf (s) Td (s) .27) An interconnection block diagram for the system is shown in Figure 2. Suppose that we have a system described by its state space model: x(t) = ˙ y(t) = 0 −1 1 −2 x(t) + 0 1 u(t) 2 1 x(t) and we wish to name it as F .

The original state space description of F is forever lost after the “ss” to “tf” conversion. a particular canonical form of the state space description. By doing this we can ﬁnd that F and G are actually the same system since they have the same transfer function.B.C. >> D=0.D]=ssdata(F).C. converts the description of F from state space to transfer function. then a state space to transfer function to state space conversion will not give the same thing back. Owing to the nonuniqueness of the state space model for a given transfer function. among many possibilities.tex . The command >> F=tf(F).6 MATLAB Manipulation of LTI Systems 37 >> C=[2 1]. one may . Now F is in transfer function form. >> den=[1 2 1]. This is because a system may have diﬀerent state space descriptions. Let us run >> F=ss(F). We will observe that this state space description of F is diﬀerent from the original state space description of F .den]=tfdata(F). The following sequence of commands assigns the variable G with its transfer function description: >> num=[1 2]. For a system F in either the state space form or the transfer function form. >> F=ss(A. converts the description of G from transfer function to state space.Qiu-Zhou runall.den). Also the command >> G=ss(G). we do not necessarily get exactly the same state space description as the original F although G and F have the same transfer function. >> [num.12/25/2008 3:19am Page 37 Section 2. commands >> [A. >> G=tf(num. the computer program chooses. give back the parameter matrices of its state space description and the numerator and denomination coeﬃcients of its transfer function respectively.D). This is because by running the transfer function to state space conversion. but is actually the same as the state space description of G obtained from the conversion. If the very original state space description is not of this canonical form. Suppose we now have a system described by its transfer function model s2 s+2 + 2s + 1 and we wish to name it as G.B. The diﬀerent descriptions of a system can be easily converted from one to another. However.

Qiu-Zhou runall.G) computes F 1 + FG and >> feedback(F. no problem will arise if both F and G are in transfer function form unless G(s) = 0.1) F . and >> zero(F). It turns out that the same canonical form as that chosen by the command “ss(F)” is also chosen here. we can simply do >> pole(F). and >> F/G. The use of the LTI system variable brings much convenience. and >> F*G. To ﬁnd out the poles and zeros of system F .G. one may run into trouble when G is strictly proper and either F or G is in state space form since the inverse of a strictly proper system cannot be represented by a state space system. we can simply run >> F+G. instead of computing the denominator and numerator polynomials of transfer function F (s) and then using the command “roots”.tex . 1 − FG LTI system variables give another way of representing and operating polynomials. To compute the sum and product of systems. When doing the last operation. simply by interpreting them as transfer functions with 1 as the denominator computes . Here F and G may take diﬀerent forms. Here the actual form of F is immaterial.12/25/2008 3:19am Page 38 38 Chapter 2 Modeling and Simulation wonder which choice the ﬁrst command takes if F is in transfer function form. The feedback connection of two systems are computed easily: >> feedback(F. Nevertheless. The following commands have obvious meanings: >> F-G.

2. In many situations. The commands >> p=tf([1 2 3 4]. This gives us a(s)X(s) = U (s). take p(s) = s3 + 2s2 + 3s + 4. Unlike the modeling process of ﬁnding transfer functions from physical systems.1). notice that a0 x(n) (t) = −a1 x(n−1) (t) − · · · − an x(t) + u(t).12/25/2008 3:19am Page 39 Section 2. q(s) = 5s + 6 The op-amp circuit shown in Figure 2. a(s) a0 sn + a1 sn−1 + · · · + an a0 = 0.7 SIMULATION AND IMPLEMENTATION OF SYSTEMS We have seen how to model a physical system using diﬀerential equations and how to convert the model into a transfer function. we often need to build a physical system with a given transfer function to observe the behavior of the system represented by the transfer function. In the majority of such system simulation and implementation. assign p and q to be appropriate transfer functions with 1 as denominators. Taking the Laplace transforms with zero initial conditions. In control implementation. The process of building a real physical system with a given transfer function is called realization. Again. such as addition and multiplication.7 Simulation and Implementation of Systems 39 polynomials. we also need to carry out the inverse process. in system simulation. Addition and multiplication can then be done in the following natural way without worrying about dimension compatibility and complications caused by vector multiplication: >> p+q >> p*q 2. the inverse realization process is highly nonunique. op-amp circuits are used. the traditional way of using hardware components is still of great theoretical and practical value.17 gives a realization of G(s). In this case. Although nowadays such a job is more and more accomplished by computer software. i.1 Hardware simulation and implementation Let a system be given by a proper nth order transfer function G(s) = b0 sn + b1 sn−1 + · · · + bn b(s) = .tex .1).7. To show this. we get a0 sn X(s) = −a1 sn−1 X(s) − · · · − an X(s) + U (s). >> q=tf([5 6]. For example. we need to build a physical controller from the designed controller transfer function to connect it with the plant to form a feedback loop. can be done in a way closer to natural language. polynomials. as an example..e. in terms of the kind of physical components used and the many possible conﬁgurations and structures. .Qiu-Zhou runall. the operations on polynomials.

Also. U (s) a(s) This realization is called a controller form realization. 0 0 an−1 a0 bn − b0 · · · bn−1 − b0 an b0 x(t) + u(t). . The op-amp circuit in Figure 2. If we follow our tradition of assigning the voltages across capacitors. . . a1 an 1 an FIGURE 2. . 0 y(t) = b1 − b0 ··· − ··· . x 1 x bn y .Qiu-Zhou runall. ··· a1 a0 an−1 a0 0 . we get Hence Y (s) = b0 sn X(s) + b1 sn−1 X(s) + · · · + bn X(s) = b(s)X(s). then the state vector becomes (n−1) x (t) . . a0 a0 .17: Controller form realization. . .. x(t) ˙ x(t) 1 an a0 a0 0 x(t) + 0 u(t) .tex . The corresponding state space model is a1 − a0 1 ˙ x(t) = . which are hidden in the integrators. . . 1 − Y (s) b(s) = . . .12/25/2008 3:19am Page 40 40 Chapter 2 Modeling and Simulation b0 b1 bn 1 u 1/a0 x (n) 1 x (n 1) .17 has a natural state space model. y(t) = b0 x(n) (t) + b1 x(n−1) (t) + · · · + bn x(t). notice that Taking the Laplace transforms with zero initial conditions. x(t) = . . . .

18: Observer form realization. . . .7 Simulation and Implementation of Systems 41 This state space model. . . xn−1 (t) = xn (t) − an−1 y(t) + bn−1 u(t) ˙ xn (t) = −an y(t) + bn u(t).12/25/2008 3:19am Page 41 Section 2. we get a0 Y (s) = X1 (s) + b0 U (s) sX1 (s) = X2 (s) − a1 Y (s) + b1 U (s) . and adding them altogether. . . Xn (s) are all cancelled and the resulting equation is a(s)Y (s) = b(s)U (s). To show this. 1. of course. U (s) a(s) sXn (s) = −an Y (s) + bn U (s). . gives a transfer function exactly the same as the given one. notice that a0 y(t) = x1 (t) + b0 u(t) x1 (t) = x2 (t) − a1 y(t) + b1 u(t) ˙ . Another realization of the same system is given by the circuit shown in Figure 2. . . . 1 a1 . one can see that the variables X1 (s). s. . ˙ b0 b1 bn u 1 1 bn xn x2 1 x1 1/a0 y an an FIGURE 2.tex . sn−1 .Qiu-Zhou runall. . . respectively. . So we also get Y (s) b(s) = .18. Taking the Laplace transforms with zero initial conditions. sXn−1 (s) = Xn (s) − an−1 Y (s) + bn−1 U (s) Multiplying the above equations by sn .

one can use >> [y.1:10. L(s) = s(s + 1) . one can use a MATLAB command lsim. .. . >> u=sin(t).t). .u. . Let us demonstrate its use by a couple of examples. For example. i. Another software product associated with MATLAB is SIMULINK. For a system represented by a variable G. To ﬁnd its step response. The state vector then becomes x1 (t) x2 (t) x(t) = ..t]=impulse(G).12/25/2008 3:19am Page 42 42 Chapter 2 Modeling and Simulation This realization is called the observer form realization. . .19 with a loop transfer function 1 . the following sequence of commands gives the sinusoidal response of the system: >> t=0:0.16 Consider the unity feedback system shown in Figure 2. Let us again assign the voltage across capacitors as state variables.7. It also has a state space model. . regardless of whether it is in the transfer function form or state space form. EXAMPLE 2.t]=step(G). . x(t) + an−1 u(t) bn−1 − b0 0 · · · 1 a0 an bn − b0 0 ··· 0 a0 b0 u(t). . xn (t) The corresponding state space model is a1 a0 . To calculate a system response with respect to a more general input signal than impulse and step. its response to the unit impulse input δ(t).e. It can be used to simulate an interconnected system.. to compute its impulse response. represented by a block diagram.2 Software simulation and implementation MATLAB provides certain tools for the numerical computation of system responses. i. . its response to the unit step input σ(t). . . .e. >> y=lsim(G. ˙ x(t) = − an−1 a0 an − a0 − y(t) = 1 a0 a1 1 ··· 0 b1 − b0 a0 .Qiu-Zhou runall. .tex . a0 0 · · · 0 x(t) + 2. one can use >> [y. .

tex . a square wave. a sawtooth signal.19: For Examples 2.21.5 1 1.16.5 0 0.5 0 0.5 1 1.5 0 10 20 30 40 50 Time t [sec] 1.21: Responses to a ramp signal.17.5 1 0.5 1 0. Scope 5 4 3 2 1 0 1 0 1 2 3 4 5 1.Qiu-Zhou runall.7 r e Simulation and Implementation of Systems L(s) y 43 FIGURE 2.16 and 2. The time responses of this system with respect to various kinds of command signals are simulated using a SIMULINK diagram as shown in Figure 2.12/25/2008 3:19am Page 43 Section 2.5 1 0. . and a sine wave for Example 2.5 Time t [sec] 0 10 20 30 40 50 0 10 20 30 40 50 Time t [sec] Time t [sec] FIGURE 2.5 1 1.5 0 0.5 1.16. 1 ________ s(s 1) Signal generator Zero-pole y To workspace r To workspace1 FIGURE 2.20 and are plotted in Figure 2.20: SIMULINK diagram for Example 2.

We refer to the SIMULINK manual on how this can be done.e. we will occasionally deal with MISO systems or SIMO systems for two reasons.5 0. and the time response of the system with respect to a ramp and a square wave of 0. we often need to use MISO systems. However. it can be used to generate computer codes so that the computer with the codes can serve as the controller in a feedback system. The other reason is that in the control of SISO systems.5 1.5 0 1 2 3 4 5 2.17.05 Hz are shown in Figure 2. i.5 0 10 20 30 40 50 Time t [sec] 2. A general system might be MIMO.5 1.5 1 1. this system is lightly damped. it might have multiple inputs and multiple outputs. We will leave the theory of MIMO feedback control systems to a more advanced course. a sawtooth signal. a square wave..5 0 0.5 0.5 0 10 20 30 40 50 1.5 1. such as in the regulation control. which lead to better performance.5 1 0.8 MISO AND SIMO SYSTEMS So far we have dealt with mostly SISO systems. 5 4 3 2 1 0 1 2.. It is noted that there is no steady-state error in tracking a ramp for this system.22.e.tex . and a sine wave for Example 2. s2 (s + 2) Then a similar SIMULINK block can be built.5 1. One is that MISO systems and SIMO systems are frequently seen in practice and they can be dealt with using techniques not much beyond the theory for SISO systems. SIMULINK can also be used to implement a controller in a digital form.22: Responses to a ramp signal.17 Consider the unity feedback system shown in Figure 2. In this book.Qiu-Zhou runall. 2. so the transient performance is rather poor. To simplify . i.5 0.5 Time t [sec] 0 10 20 30 40 50 Time t [sec] Time t [sec] FIGURE 2.5 0.5 2.12/25/2008 3:19am Page 44 44 Chapter 2 Modeling and Simulation EXAMPLE 2.19 with L(s) = 5(s + 1) .

A typical question one might ask is what the order of this system is. and implementation. However. i. we follow our convention of writing vectors or matrices using bold letters. which has the meaning Y (s) = G1 (s) G2 (s) U1 (s) U2 (s) = G1 (s)U1 (s) + G2 (s)U2 (s).12/25/2008 3:19am Page 45 Section 2.Qiu-Zhou runall. the least common multiple of the denominators of G1 (s) and G2 (s). The MISO and SIMO systems that we are going to deal with and use in this book are actually DISO and SIDO systems. Here a(s) is the common denominator of G1 (s) and G2 (s). Hence we prefer to write G(s) = = 1 b(s) = a(s) a(s) b1 (s) b2 (s) . a more b10 sn + · · · + b1n b20 sn + · · · + b2n a0 sn + a1 sn−1 + · · · + an . u1 G1(s) y u2 G2(s) FIGURE 2. simulation.24. then we may need 2n integrators in the worst case. An LTI DISO system has two inputs and one output. but might lead to erroneous results in stability analysis.24: A misleading way of viewing a DISO system. Here.24 is only algebraically equivalent to Figure 2.24.23 and its transfer function takes the form G(s) = u1 u2 G(s) G1 (s) G2 (s) y FIGURE 2. It is useful only in the algebraic manipulation of the input/output relations. Its block diagram takes the form in Figure 2.23. a0 = 0. It is better to view a DISO system as an inseparable single system.23: A DISO system. The general theory of MISO and SIMO systems extends in a rather trivial way from that of DISO and SIDO systems. Thus we say that Figure 2.e.8 MISO and SIMO Systems 45 notation and understanding. Although one may identify a DISO system by a connection of two SISO subsystems as shown in Figure 2. If we realize the two subsystems G1 (s) and G2 (s) separately and then connect them as in Figure 2. Let us take the view that the order of a system is the minimum number of integrators needed in its op-amp circuit realization. we will study only double-input–single-output (DISO) systems and single-input–double-output (SIDO) systems. this view would do more harm than good.tex ..

25 where only n integrators are used. and its transfer function takes the form G(s) = G1 (s) G2 (s) . instead of 2n. one should always keep in mind that a DISO system is a single integrated system. not the sum of two SISO systems. or any other software.26 u y1 G(s) y2 FIGURE 2.Qiu-Zhou runall. Similarly.25: Realization of a DISO system. Hence the order of the system is n. is used to simulate or implement the system. an LTI SIDO system has one input and two outputs. More importantly. . it has eliminated many redundant signals which might behave in unexpected and undesirable ways if a DISO system is realized as the sum of two separate systems. Its block diagram takes the form in Figure 2. .12/25/2008 3:19am Page 46 46 Chapter 2 Modeling and Simulation economical realization is given in Figure 2. u1 b10 b20 b11 b21 b1(n b2(n b1n u2 b2n 1 xn x2 1 a1 an an 1 1) 1) x1 1/a0 y FIGURE 2.25 is not just to save integrators.tex . . The signiﬁcance of the realization in Figure 2. When SIMULINK. .26: A SIDO system.

Qiu-Zhou runall.tex .26. Let us ﬁrst analyze the feedback system for stabilization. but might lead to erroneous results in stability analysis. .27. Hence the order of the system is n. = a0 sn + a1 sn−1 + · · · + an G(s) = b1 (s) b2 (s) a0 = 0. Let us again take the view that the order of a system is the minimum number of integrators needed in its op-amp circuit realization. then we need 2n integrators. a more economical realization is given in Figure 2. The transfer funcP (s)C(s) . However. we can see that we always need 1 + P (s)C(s) to be nonzero. instead of 2n. Y2 (s) = G2 (s)U (s). y1 = G1 (s) G2 (s) U (s) G1(s) u G2(s) y2 FIGURE 2. simulation. we should be careful in viewing a SIDO system as a connection of two SISO subsystems shown in Figure 2. Hence we prefer to write 1 b(s) = a(s) a(s) b10 sn + · · · + b1n b20 sn + · · · + b2n . Here 1 + P (s)C(s) has to be nonzero in order tion from w1 to y1 is 1 + P (s)C(s) for the transfer function to be meaningful. Again.27: A misleading way to view a SIDO system.27 is only algebraically equivalent to Figure 2. 2. If we realize the two subsystems G1 (s) and G2 (s) separately and then connect them as in Figure 2.12/25/2008 3:19am Page 47 Section 2.30.9 MODELING OF CLOSED-LOOP SYSTEMS Two types of closed-loop systems will be used in this book. the realization in Figure 2. If we try to ﬁnd the transfer functions from any external signal to any internal signal.9 Modeling of Closed-Loop Systems 47 which has the meaning Y1 (s) Y2 (s) or Y1 (s) = G1 (s)U (s).28 has eliminated many redundant signals which might behave in unexpected and undesirable ways if a SIDO system is realized as the interconnection of two separate systems.29. Again. So we say that Figure 2. One is the feedback system for stabilization as shown in Figure 2. and implementation.28 where only n integrators are used. The other is the feedback system for regulation as shown in Figure 2. This view is useful only in the algebraic manipulation of input/output relations.27.

12/25/2008 3:19am Page 48 48 Chapter 2 Modeling and Simulation b10 b20 b11 y1 b21 b1(n b2(n 1) 1) b1n u 1/a0 1 a1 an 1 x (n) x (n 1) .30: Feedback system for regulation. d r C(s) u v P(s) z y n FIGURE 2. .tex .28: Realization of a SIDO system. . . . x 1 x b2n y2 FIGURE 2.Qiu-Zhou runall.29: Feedback system for stabilization. u1 y1 C(s) u2 an w1 P(s) y2 w2 FIGURE 2.

EXAMPLE 2. Although there are eight diﬀerent possible input/output pairs. and should be avoided. i. w2 (t) to one of the internal signals u1 (t). 1 + P (s)C(s) P (s)C(s) . 1 + P (∞)C(∞) = 1. In most applications. y2 (t).29 is ill posed. Otherwise. Proposition 2. then P (∞) = 0 or C(∞) = 0. 1 + P (s)C(s) It is more convenient to write down all the transfer functions in a compact matrix form as −C(s) 1 1 + P (s)C(s) 1 + P (s)C(s) P (s) 1 U1 (s) 1 + P (s)C(s) 1 + P (s)C(s) U2 (s) W1 (s) (2. does not work properly. it is said to be ill posed. 1 + P (s)C(s) (2. the transfer functions between these input/output pairs contain some repetitions. the condition in Proposition 2. Proof.9 Modeling of Closed-Loop Systems 49 An ill-posed system is not meaningful.12/25/2008 3:19am Page 49 Section 2.29 is well posed if P (s) and C(s) are proper and at least one of them is strictly proper. y1 (t). Therefore 1 + P (s)C(s) ≡ 0.19 Deﬁnition 2. u2 (t).20 is satisﬁed.tex .29) . the internal signals cannot be uniquely determined from the external signals. When the closed-loop system is well posed. In this case. The closed-loop system shown in Figure 2. If P (s) = 1 and C(s) = −1.20. For example.29 is said to be well posed if 1 + P (s)C(s) ≡ 0. the transfer function from w1 (t) to y2 (t) is P (s) .e. The closed-loop system shown in Figure 2.28) Y1 (s) = P (s)C(s) W2 (s) C(s) Y2 (s) 1 + P (s)C(s) 1 + P (s)C(s) P (s) −P (s)C(s) 1 + P (s)C(s) 1 + P (s)C(s) where an element of the big 4 × 2 matrix is simply the transfer function from the corresponding external signal to the corresponding internal signal.. 1 + P (s)C(s) C(s) . then the system shown in Figure 2.Qiu-Zhou runall.18. Essentially there are only four diﬀerent transfer functions: 1 . we can ﬁnd the transfer function from one of the external signals w1 (t). Furthermore. This shows P (∞)C(∞) = 0. if at least one of P (s) and C(s) is strictly proper. then |P (∞)| < ∞ and |C(∞)| < ∞. 1 + P (s)C(s) P (s) . If P (s) and C(s) are proper.

the stabilization system formed by P (s) and C2 (s) has to work properly. v(t).Qiu-Zhou runall. In this case C(s) is a DISO system. . or simply a 2DOF. Hence it can be denoted by U (s) = C1 (s) −C2 (s) R(s) . we will later see that analytically they are not equivalent and Figure 2. we also denote S(s) = 1 1 + P (s)C(s) and T (s) = P (s)C(s) . in order for the system in Figure 2. Y (s) Here we put a minus sign in front of C2 (s) because this suggests a negative feedback. From a pure algebraic point of view. This controller C(s) is also called a two-degree-of-freedom. Deﬁnition 2. r(t) to internal signals u(t). the feedback system in Figure 2. z(t).30 is said to be well posed if the feedback system for stabilization formed by P (s) and C2 (s) is well posed.31: Algebraic equivalence of Figure 2. y(t).30 to work properly. it can be seen that a stabilization system formed by P (s) and C2 (s) is a subsystem of the regulation system. controller since it actually involves two transfer functions C1 (s) and C2 (s).30 is equivalent to the system shown in Figure 2. Among the transfer functions in the gang of four.12/25/2008 3:19am Page 50 50 Chapter 2 Modeling and Simulation These four diﬀerent transfer functions are called the gang of four.21. n(t).tex . The closed-loop system shown in Figure 2. From Figure 2. respectively.31.30. we can ﬁnd each of the transfer functions from external signals d(t).31 should not be used to build the actual feedback system. However. d r C1(s) u v P(s) z C2(s) y n FIGURE 2. 1 + P (s)C(s) and call them sensitivity function and complementary sensitivity function.31. Therefore. Let us now consider the feedback system for regulation. If the closed-loop system is well posed. These two closed-loop transfer functions are related by S(s) + T (s) = 1.

Here F (s) is a DISO system with transfer function F (s) = F1 (s) F2 (s) .32: Two-loop feedback system. the gang of four formed by P (s) and C2 (s) as well as two additional ones involving C1 (s): C1 (s) 1 + P (s)C2 (s) and P (s)C1 (s) . . This might be more easily seen from its algebraic equivalence shown in Figure 2.tex . Essentially. but again there are repetitions among the 12 elements.30) We see that there are 12 elements in the matrix corresponding to the 12 possible input/output pairs.9 Modeling of Closed-Loop Systems 51 Again we can put these transfer functions into a compact matrix form −C2 (s) C1 (s) −P (s)C2 (s) 1 + P (s)C2 (s) 1 + P (s)C2 (s) 1 + P (s)C2 (s) 1 −C2 (s) C1 (s) U (s) V (s) 1 + P (s)C2 (s) 1 + P (s)C2 (s) 1 + P (s)C2 (s) D(s) N (s) . Y (s) = P (s) 1 P (s)C1 (s) R(s) Z(s) 1 + P (s)C2 (s) 1 + P (s)C2 (s) 1 + P (s)C2 (s) P (s) −P (s)C2 (s) P (s)C1 (s) 1 + P (s)C2 (s) 1 + P (s)C2 (s) 1 + P (s)C2 (s) (2. Figure 2. Here H(s) is a DISO system with transfer function H(s) = H1 (s) H2 (s) . It can be easily shown that if H1 (s) = C1 (s) and then it is equivalent to the 2DOF controller.32 shows a two-loop feedback system.Qiu-Zhou runall. Another equivalent form of the DISO controller is the feedback plus feedforward conﬁguration shown in Figure 2. n Hence U (s) = H1 (s) −H2 (s) E(s) . d r e H(s) u v P(s) z y FIGURE 2. H2 (s) = C2 (s) − C1 (s).33.34.12/25/2008 3:19am Page 51 Section 2. 1 + P (s)C2 (s) The 2DOF controller also takes some other equivalent forms. Y (s) The system has an inner loop consisting of H2 (s) and P (s) and an outer loop consisting of H1 (s) and the inner loop. there are only six diﬀerent transfer functions.

34: Feedback plus feedforward system. .34. F1(s) d r e F2(s) u v P(s) z F1 (s) = C1 (s) − C2 (s) and F2 (s) = C2 (s).Qiu-Zhou runall.12/25/2008 3:19am Page 52 52 Chapter 2 Modeling and Simulation d r e H1(s) u v P(s) z H2(s) y n FIGURE 2.35: Algebraic equivalence of Figure 2. It can be easily seen that if then it is equivalent to the 2DOF controller. This system has a feedback loop consisting of F2 (s) and P (s) and a feedforward path with transfer function F1 (s).32. Hence U (s) = F1 (s) F2 (s) R(s) E(s) . Yet another equivalent form of the 2DOF controller is the observer-based feedback system shown in Figure 2. y n FIGURE 2. It also has an algebraic equivalence as shown in Figure 2.tex . It can be seen that if O(s) = O1 (s) O2 (s) = 1 − C1 (s) C1 (s) C2 (s) C1 (s) .35.36. It is so called since the controller O(s) takes both the input and the output of the plant and has the capability to observe the internal behavior of the plant from external signals. d r e F(s) u v P(s) z y n FIGURE 2.33: Algebraic equivalence of Figure 2.

. The second is an inverted pendulum.Qiu-Zhou runall. n It is easy to see that this system is well posed if and only if the system for stabilization in Figure 2. as shown in Figure 2. and thus the distance of the ball is found by measuring the voltage x M f u um Ra u FIGURE 2.37. it acts as a wiper similar to that of a potentiometer. When a steel ball rolls on these two components.36: Observer based feedback system.29 is well posed. then it is equivalent to the 2DOF controller.tex . A widely used special case of the regulation system shown in Figure 2. 2.10 d r u v P(s) z Case Studies 53 O(s) y n FIGURE 2. d r e C(s) u v P(s) z y FIGURE 2.12/25/2008 3:19am Page 53 Section 2.38.37: Unity feedback system.10.38: A ball and beam system.1 Ball and beam system The ball and beam system consists of a ball rolling along a tilting rail.10 CASE STUDIES In this section we take a close look at two mechanical systems that we often see in laboratories. Voltage is applied on both ends of the resistance bar. 2.30 by setting C1 (s) = C2 (s) = C(s). which is obtained from Figure 2.30 is the unity feedback system shown in Figure 2. The ﬁrst is a ball and beam system. The rail (also called the beam) is made up of two parts: a steel rod and a resistance bar.

Thus. A mechanical arm which translates the rotatory motion of a big disk into vertical motion is on the other end of the beam. The angular displacement θ(t) of the big disk and that of the rotor of the motor. Let us derive a simple approximate model of the ball and beam system.tex . the motor transfer function is taken as an approximation of the one given in Example 2. the beam is pivoted around the support by controlling the angle of the big disk. Θ(s) θ(t) L (2. the angle transfer mechanism model. Then Newton’s second law gives M x(t) = M g sin φ(t) ¨ where M is the mass of the ball and g is the acceleration of gravity. It can be approximated by φ(t) R Φ(s) = = . Φ(s) s (2. Finally. is related by the gear ratio Kg as follows Θ(s) = Kg . whereas the angle transfer mechanism model relates the tilt angle φ(t) with the rotation angle θ(t) of the big disc.31) The relationship between the tilt angle φ(t) and the rotational angle θ(t) of the big disk is nonlinear but static. the ball and beam model can be decomposed into four parts: the ball and beam model. denoted by θm (t). the gear model.Qiu-Zhou runall. Fortunately. The big disk is then driven by a geared motor assembly. A precise mathematical model of the ball and beam system is complicated. Then we get the linearized equation x(t) = gφ(t).12 by assuming La ≈ 0 and Kb ≈ 0: Kt Θm (s) = .32) where R is the radius of the motor disk and L is the length of the beam. Roughly. Let us approximate the ball rolling on the beam by a point mass sliding in a frictionless surface. ¨ Taking the Laplace transform we get X(s) g = 2.12/25/2008 3:19am Page 54 54 Chapter 2 Modeling and Simulation on the steel bar. U (s) Ra s(Js + Kf ) Notice that the motor dynamics and the ball dynamics are actually coupled since the load inertia also depends on the ball location and the ball motion depends . and the motor model. the motor in the ball and beam system is internally controlled and its model relates the voltage input u(t) to the motor control system with the rotational angle θm (t). Assume that the tilt angle φ(t) is small. The ball and beam model relates the position x(t) of the ball with the tilt angle φ(t) of the beam. approximate models are suﬃcient for feedback control. Θm (s) Finally. A terminal block is ﬁxed on one end of the beam as support.

the angle transfer part.4 [m].40: Inverted pendulum system. u um Kt _________ Ras(Js Kf) Kg u R __ L f g __ s2 x FIGURE 2. the whole ball and beam system can be approximated by the cascade connection of four systems: the ball and beam part. and Kg = 1/75.12/25/2008 3:19am Page 55 Section 2. we have Ra = 10 [Ω]. 2.04 m. the gear part. As a result. R = 0.2 Inverted pendulum system The inverted pendulum mimics a game we often played in our childhood: balancing a long stick upward on our ﬁnger tip. and the motor part. an inverted pendulum system consists of a moving cart with a rod mounted on the top.8 [m/sec2 ]. Unlike the childhood game where our ﬁngers move in a horizontal plane and the stick can fall in all directions.75 × 10−3 [Nm sec2 /rad].5 × 10−3 [Nm A]. However.10 Case Studies 55 on the motor velocity.40. J = 0.10. As shown in Figure 2. the whole system is SIDO and is given by the input/output relation Θ(s) X(s) = 1 Ra s3 (Js + Kf ) Kt Kg s 2 Kt Kg Rg/L U (s).39. we get the input/output relation of a typical ball and beam system Θ(s) X(s) = 1 3 (s + 50) s s2 /75 g/750 U (s) where g is equal to 9. Therefore. Kt = 7.tex .5 × 10−3 [Nm sec/rad]. Plugging in all these parameters. In a particular case.Qiu-Zhou runall. the above approximation is good enough for the control purpose. .39: Block diagram of the ball and beam system. The ball and beam system has two measurements: the disc angle θ(t) and the ball position x(t). L = 0. the cart moves linearly along a straight rail and the rod can only fall either to the front or to the back of the cart. as shown in Figure 2. Kf = 37. x u Mp f Mc FIGURE 2.

and higher-order ˙ terms. ¨ 3 Therefore the diﬀerential equation model of the system is given by 1 1 ¨ ˙ (Mp + Mc )¨(t) − Mp Lθ(t) cos θ(t) + Mp Lθ 2 (t) sin θ(t) = f (t) x 2 2 2 ¨ −¨(t) cos θ(t) + Lθ(t) − g sin θ(t) = 0. x(t) = 0.40. x 3 Taking Laplace transform on both sides of the equations. dt2 dt2 Note that the moment of inertia of the rod with respect to the pivot point can be computed as L Mp 1 2 J= d = Mp L2 . with an evenly distributed mass Mp and a length L. The input is the force f (t) applied on the cart. x 3 This is a highly nonlinear system. with a mass Mc . A straightforward way to linearize it around ˙ x(t) = 0. is mounted on the cart whose axis of rotation is perpendicular to the direction of the motion of the cart. A rod. 2 2 (2. slides on a stainless steel shaft and is equipped with a motor. 3 . The cart position x(t) and the pendulum angle θ(t) can be measured.34) 2 ¨ Lθ(t) − x(t) cos θ(t) − g sin θ(t) = 0.12/25/2008 3:19am Page 56 56 Chapter 2 Modeling and Simulation The system consists of a cart and a rod. θ(t) = 0 is to remove the second. The cart. 2 2 (2.tex . we obtain ¨ J θ(t) = Mp x(t) cos θ(t) ¨ This gives L L + Mp g sin θ(t) . Applying Newton’s law to the horizontal direction of Figure 2.33) d2 x(t) d2 [x(t) − L/2 sin θ(t)] + Mp . θ(t) = 0. we get 1 (Mp + Mc )s2 X(s) − Mp Ls2 Θ(s) = F (s) 2 2 −s2 X(s) + Ls2 Θ(s) − gΘ(s) = 0.Qiu-Zhou runall. L 3 0 Writing the rotational version of Newton’s second law for the pendulum around the pivot point. we get f (t) = Mc This gives (Mp + Mc )¨(t) − x Mp L ˙2 Mp L ¨ θ(t) cos θ(t) + θ (t) sin θ(t) = f (t). This gives 1 ¨ (Mp + Mc )¨(t) − Mp Lθ(t) = f (t) x 2 2 ¨ −¨(t) + Lθ(t) − gθ(t) = 0.

2.1.2. the vector transfer function of the system is P (s) = Px (s) Pθ (s) = s2 [(Mp 1 + 4Mc )Ls2 − 6(Mp + Mc )g] 4Ls2 − 6g 6s2 . y (t) is the displacement of the mass with respect u fsp M fb FIGURE 2. Consider the circuit shown in Figure 2. R1 C1 R3 s2 (s2 1 − 3g) 2/3s2 − g s2 (2.1. and F (s) as the input.Qiu-Zhou runall.tex . As an example. PROBLEMS 2. Consider the mechanical system shown in Figure 2. Here u(t) is an external force applied to the mass M .12/25/2008 3:19am Page 57 Section 2.10 Case Studies 57 Taking X(s) and Θ(s) as the outputs.41. Mp = 2 kg. 2. .35) L1 vi C2 R2 vo FIGURE 2. Obtain a state space model and the transfer function of this system. we get X(s) Θ(s) = = 1 (Mp + Mc )s2 (2Ls2 /3 − g) − Mp Ls4 /2 1 s2 [(Mp + 4Mc )Ls2 − 6(Mp + Mc )g] 2Ls2 /3 − g s2 F (s) 4Ls2 − 6g 6s2 F (s).41: A simple RLC circuit for Problem 2.8 [m/sec2 ]. L = 1 m.42: A mass and spring system for Problem 2. This gives P (s) = where g = 9. let us have a virtual inverted pendulum with Mc = 1 kg. Therefore. Let the input be vi (t) and output be vo (t).42.

The input is the torque τ (t) and the output is the angular position θ(t). 1.12/25/2008 3:19am Page 58 58 Chapter 2 Modeling and Simulation to the position when the spring is relaxed. 2.44. A vertically downward force f (t) is applied on the other end. Consider the pendulum system shown in Figure 2. Compute the transfer function of the linearized model. Write a state space description of the system.5. 2. A mass Ml sits on one end. Find the transfer function of the linearized system. 3.Qiu-Zhou runall.44: A pendulum system for Problem 2.45. Ml f u FIGURE 2. Is this system linear? If not. Consider the see-saw system shown in Figure 2. 2. Write the diﬀerential equation model of this system. Is the system linear? If it is not linear. φ is a continuously diﬀerentiable nonlinear function satisfying φ(0) = 0. linearize it about the operating point with θ0 = 0.tex . linearize it around the operating point with θ0 = 0. The pendulum consists of a rod of length l with evenly distributed mass m and a point mass M at its lower end. linearize it around the operating point with u0 = 0. Obtain the transfer function from ∆f (t) to ∆θ(t).43. Is the system linear? If not. 2. fb (t) = by(t). 3.3. The spring force and friction force are given respectively by fsp (t) = k(1 + ay 2 (t))y (t).4. c. 4.3. where ∆f (t) and ∆θ(t) are the deviations of f (t) and θ(t) from their values at the operating point. Write the diﬀerential equation model of this system with input f (t) and output θ(t). b. Derive the state space model of the system. t L u M FIGURE 2.43: A see-saw system for Problem 2. The beam has length L with an evenly distributed mass Mb .4. Consider the system shown in Figure 2. a. ˙ 1. Assume that there is no friction. We are concerned with the angular displacement θ(t) of the beam with the horizontal line. 2. Write a state space equation of the .

Assume that the input is the inﬂow fi (t) and the output is the water level h(t).10 R(s) c(sI A) 1b Y(s) Case Studies 59 f(·) FIGURE 2.49. Find the transfer function of the linearized system. Is the system linear? If not. 2.45: Linear system with nonlinear memoryless feedback for Problem 2. .6. 1.tex . Find the closed-loop transfer function of the system shown in Figure 2.46. Write a state space model of the system. Write the transfer function of the linearized closed-loop system.46: A conical water tank for Problem 2.48.8. Choose F (s) such that the closed-loop transfer function is 1.Qiu-Zhou runall. 3. closed-loop system. fi h fo FIGURE 2. It is also known that the outﬂow is fo (t) = α. 3.7. 2.9.12/25/2008 3:19am Page 59 Section 2. linearize it when the tank is half full.47.6. Find the transfer function of the linearized system. Linearize it around an equilibrium point with zero output. 2. Assume that a state space model of P (s) is ˙ x(t) = Ax(t) + bu(t) y (t) = cx(t) and K is a pure gain. 2. Is the system linear? If not. Consider Figure 2. Choose a state variable of the system and write a state space model of the system. What are the poles and zeros of the system? 2. Consider a ball shaped water tank with radius R shown in Figure 2. Obtain a state space model of the closed-loop system with input r(t) and output y (t). linearize it around the equilibrium point with h0 = 3. The height is 4 m and the top diameter is 2 m. Consider a water tank in the shape of an ice cream cone shown in Figure 2. Assume that the input is the inﬂow fi (t) and the output is the water level h(t). It is also known that the outﬂow is fo (t) = 3h(t). 1.5. 4. 2.

Find the transfer function from r to y of the system shown in Figure 2.48: Unity feedback system with a proportional feedback for Problem 2. there is a third form to describe a SISO LTI system in addition to the state space form and the transfer function form. 2. This third form is called the zero-pole-gain form.47: A ball shaped water tank for Problem 2. The command to create or convert to a system described by the zero-pole-gain form is zpk.49: A feedback plus feedforward system for Problem 2. Consider the feedback system shown in Figure 2. F(s) r e u z C(s) P(s) FIGURE 2.. 2.e.Qiu-Zhou runall.50. Learn the use of the command zpk and the related command zpkdata from the online help by using the help command. i. Find its equivalent 2DOF feedback structure. Choose H (s) so that the transfer function is equal to 1.11. 2. MATLAB PROBLEMS 2.9. Find the transfer function from r to y . Find the transfer function from r to y of the system shown in Figure 2.13.8.52.12.51. In MATLAB. r u P(s) y K FIGURE 2. ﬁnd a 2DOF controller which gives the same transfer functions from r to u and from y to u.12/25/2008 3:19am Page 60 60 Chapter 2 Modeling and Simulation fi h fo FIGURE 2. . 1.7.10.tex . 2.

(Use zpk.3011 x(t) + u(t) −3.10.1487 −0.5889 0.3548 3. zeros.50: A complicated feedback system for Problem 2.1773 ˙ x(t) = 3.12/25/2008 3:19am Page 61 Section 2.7860 −1.1984 x(t). Use MATLAB to solve this problem. A ﬂexible beam system is described by the following state space equation −1.9674 −15. G4(s) r y G1(s) G2(s) G3(s) FIGURE 2.9450 −1. H(s) r y P(s) F(s) FIGURE 2. 4.8798 16.Qiu-Zhou runall.) Find the transfer function of the system.10 H1(s) r u y Case Studies 61 H2(s) H3(s) P(s) H4(s) H5(s) FIGURE 2.1717 29. (Use tf.51: A partial feedback system for Problem 2.11.) Write a state space equation of the system from its transfer function using the formulas in Section 2. 3.3427 1.1081 13.14.8608 29.6930 −1. 2. and the DC gain of the system. .52: A complicated feedback system for Problem 2.5017 y (t) = 15.4513 1.9618 −14. Form a system variable representing this system.4689 17.7. (Use ss. 2.tex .4250 −1.7162 13.5145 1.) Find the poles.12.2644 −6. 1.7058 35.

J. . Upper Saddle River. knowledge on elementary physics is usually suﬃcient.12/25/2008 3:19am Page 62 62 Chapter 2 Modeling and Simulation Obtain a state space equation of the system from its transfer function by using ss. Bedford and W. Build a transfer function block in SIMULINK to implement a MISO system. Fowler. The use of the gang of four for the four transfer functions in (2. More in-depth coverage of circuit analysis is given in C. see R. 3rd Edition. 5th Edition.15. A good reference on mechanical system modeling is A. and Systems. r [s + 1 1] _______ s u 1 ____ s+2 y r s+1 ____ s 1 _ s (a) (b) u 1 ____ s+2 y FIGURE 2. Desoer and E. 2. C. ˚str¨m and R. 2002. Circuits. Basic Circuit Theory. Prentice Hall. J. Feedback Systems: An Introduction for A o Scientists and Engineers. Princeton University Press. 1969.11 NOTES AND REFERENCES Modeling of a physical system usually involves specialized knowledge in the areas where the system falls in. Kuh. Dorf. Murray. 2008. 1992. A. 2.Qiu-Zhou runall. as well as detailed knowledge on DC motors.29) ﬁrst appeared in K. Devices.53(b) using the existing blocks in SIMULINK. For simple systems.tex . Engineering Mechanics. Auckland. Are they the same? Explain why. Princeton and Oxford. John Wiley & Sons. For the analysis of op-amp circuits.53: For MATLAB Problem 2. such as the ones discussed in this chapter. New York. Use your new block to build the system shown in Figure 2. 5.15.53(a) and also build the system in Figure 2. NewJersey. Smith and R. McGraw-Hill International. Simulate the step responses of two systems and compare. S. Compare the result with the original state space equation and the result of part 4.

12/25/2008 3:19am Page 63 Queries in Chapter 2 Q1.15 here. Please conﬁrm if this is ﬁne.Qiu-Zhou runall. We have provided the citation for Figure 2.tex . .

Sign up to vote on this title

UsefulNot useful- PDFF160
- State Space Models
- Chapter20 - Copy.ppt
- 2etagemodel
- Research Ppr
- Course Outline 131
- Mat Lab Course
- CS 16 MARK Unit 5 Only
- instruction plan
- Control Engg Model Imp Ques
- Control system analysis-Lecture 2
- MOCK TEST-3.pdf
- ECE516 Typical Syllabus (Eg Spring 07)
- MaSiMS-A-2
- a New Riser Fatigue Monitoring Methodology Based on Measured Accelerations
- Fault Diagnosis of Analog Circuit Using DC Approach and Neural Networks
- Rm3de
- A Fuzzy Approach for Robust Reference-Tracking of ball bearing systems
- ME2142C9_162
- Summer Syllabus 36140
- Section 5
- 6ET006 Notes_Digital Control
- CMO 9, S. 2008
- Yearly Plan Add maths Form 4-Sibu
- Kertas 1 SPM Matematik Tambahan 2004-2010
- L. Difference Equations With Applications- David L. Jagerman
- Lecture 11
- An Approximate Method for Solving the Inverse Scattering Problem With Fixed-Energy Data
- Algone12015 Exam
- Equivalent Circuit Model Analysis Example
- ch2

Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

We've moved you to where you read on your other device.

Get the full title to continue

Get the full title to continue reading from where you left off, or restart the preview.