Professional Documents
Culture Documents
0 (x − x0)2
00
f (x) = f (x0) + f (x0 )(x − x0) + f (x0 ) + ... (1)
2!
Example: Find the Taylor series expansion of the exponential func-
tion f (x) = e−x, about the point x = −2.0.
Since we know that we will need many derivatives of f (x), let’s
compute them first
f0 = −e−x
f 00 = e−x
f 000 = −e−x
.. ..
. = .
1
Expansion About Zero
A special case of the Taylor series occurs when the expansion is
about the point x0 = 0. The expansion is then
x2
f (x) = f (0) + f 0 (0)x + f 00 (0)
+ ... (2)
2!
Returning to our previous example, the expansion of e−x about
x0 = 0 is
1
f (x) = e−x = 1 − x + x2 + . . .
2
The important point here is that you must be clear about what
point you are expanding about.
Finally, the Taylor series expansion can also be applied to functions
of several variables. The more general version of the Taylor Series
equation, for the function f (x, y) expanded about the points x0 , y0 ,
is
∂f ∂f
f (x, y) = f (x0, y0 ) + (x0 , y0 )(x − x0) + (x0, y0 )(y − y0 ) +
∂x ∂y
1 ∂ 2f 2 1 ∂ 2f
2
(x0 , y0 )(x − x0) + 2
(x0, y0 )(y − y0 )2 +
2 ∂x 2 ∂y
1 ∂ f2
(x0 , y0 )(x − x0 )(y − y0 ) + . . .
2 ∂x∂y
or for the special case of expanding about zero (for all the variables)
∂f ∂f
f (x, y) = f (0, 0) + (0, 0)x + (0, 0)y +
∂x ∂y
1 ∂ 2f 2 1 ∂ 2f
2
(0, 0)x + 2
(0, 0)y 2 +
2 ∂x 2 ∂y
1 ∂ f2
(0, 0)xy + . . .
2 ∂x∂y
2
Binomial Expansion
The binomial expansion is the last useful special case we will con-
sider. Its general, one-variable form is
1
f (x) = (1 + x)α = 1 + αx + α(α − 1)x2 + (3)
2!
1
α(α − 1)(α − 2)x3 + . . . (4)
3!
3
Linear Systems
A function is linear if it satisfies both superposition and homogene-
ity. These two conditions can be combined into one as follows
A function f (x) that satisfies the property
4
Linearizing Dynamic Equations
In this section we’ll examine how to convert a nonlinear differential
equation into a linearized one. Note: This must be done very
carefully, and leads to specific assumptions that must be valid over
the operating region of interest. An example we will consider later
is
ẍ + 3x − sin y = 0
√
ÿ + xy = u
5
Example
Linearize the nonlinear dynamic equations
ẍ + 3x − sin y = 0
√
ÿ + xy = u
Step 1: Replace x, y, u with x0, y0 , u0 giving the steady-state equa-
tions
3x0 + sin y0 = 0
√
x 0 y0 = u0
Step 2: Substitute
x = x0 + ∆x
y = y0 + ∆y
u = u0 + ∆u
6
Linearization Example - cont’d
7
Modeling Liquid Level Systems
Consider the simple illustrative example, depicted below
Pump
qi
Patm
Reservoir
orifice
h
P
q
where
8
Liquid Level System Example
The starting point for the dynamic model is the equation that
describes the flow through an orifice
r
∆P
q = Aor 2g (6)
w
Our goal is to find a dynamic equation that relates the input (flow
rate qi ) to the output (liquid height h). To do this we must relate
the quantities in Eq. 6 to qi and h.
First we’ll consider the ∆P term. From the figure, the pressure P
comes from 2 sources
P = Patm + Pliquid
What we need is ∆P , or
∆P = P − Poutside the orif ice = P − Patm = Pliquid
∆P = w · h (7)
p
q = Aor 2gh (8)
qnet = qi − q
qnet 1
ḣ = = (qi − q) (9)
At At
Substituting Eq. 8 into Eq. 9
1 p
ḣ = (qi − Aor 2gh) (10)
At
10
State Space Representation of Dyn. Systems
11
Steps for Conversion to State Space Representation
1. Determine how many states are needed (sum the highest time
derivative (integer) for each independent variable)
x = Ax + B u State Equation
y = C x + Du Output Equation
where
• B ≡ n × m matrix
• u ≡ m × 1 vector of inputs
• y ≡ p × 1 vector of outputs
• C ≡ p × n matrix
• D ≡ p × m matrix
12
State Space Example
Convert the 2 second order dynamic equations to a state space
representation where the system output is θ2 .
J1 θ̈1 − b1 (θ̇2 − θ̇1 ) + k0 θ1 = 0
J2 θ̈2 + b1 (θ̇2 − θ̇1 ) = τ
ẋ1 = θ̇1 = x2
b1 k0
ẋ2 = θ̈1 = (θ̇1 − θ̇2 ) − θ1
J1 J1
ẋ3 = θ̇2 = x3
−b1 1
ẋ4 = θ̈2 = (θ̇2 − θ̇1 ) + τ
J2 J2
y = x3
13
Example Continued - Matrix Form
0 1 0 0
0
− Jk01 − Jb11 0 b1
J1
0
ẋ = 0 0 1 0
x + 0 τ
b1
1
0 J2
0 − Jb12 J2
y = [0 0 1 0] x + [0] τ
y = [0 0 1 0] x + [0] τ
14
Examples
ẋ = −3x + 2u (11)
Where the output is x.
...
θ 1 + 3θ̇1 + 7θ2 − 4θ̇2 = 3τ (12)
θ̈2 + 11θ1 + 25θ̇2 + 6θ̇1 = 2τ
Where the output is θ̇2 .
15