MCLECTURE2
MCLECTURE2
=
t
t t
Ma F
u
s
L
M
(a) Physical
diagram
(b) Free body
diagram
s
T
De
W=Mg
u
u
s
L
M
(a) Physical
diagram
(b) Free body
diagram
s
T
De
W=Mg
u
Balancing the forces in the tangential direction:
This gives the following equation:
= Mg D
d
dt
Ma
t
sinu
u
(2)
( ) 1
=
t
t t
Ma F
a
dv
dt
d s
dt
t
= =
2
2 (3)
s L = u (4)
a L
d
dt
t
=
2
2
u
(5)
The tangential acceleration is given in terms of the rate of change of velocity or arc length by the equation:
Since the arc length, s, is given by:
Substituting s into the differential in Equation 3 yields:
Combining Equation 2 and Equation 5 yields:
Note that the unit of each term is force. In English units, W is in lb
f
, g is in ft./sec
2
, D is in
lb.sec, L is in feet, u is in radians, du/dt is in rad/sec and d
2
u/dt
2
is in rad/sec
2
. In international
SI units, M is in kg, g is in m/sec
2
, D is in kg-m/sec, L is in meters, u is in radians, du/dt is in
rad/sec and d
2
u/dt
2
is in rad/sec
2
.
This may be rewritten as:
d
dt
D
ML
d
dt
g
L
2
2
0
u u
u + + = sin
(7)
= = Mg D
d
dt
Ma ML
d
dt
t
sinu
u u
2
2
(6)
System
This equation may be said to
describe a system.
While there are many types of
systems, systems with no output
are difficult to observe, and
systems with no input are difficult
to control.
To emphasize the importance of
position, we can describe a
kinematic system, such as y = T(x).
To emphasize time, we can
describe a dynamic system, such as
g = h(f(t)).
Equation 7 describes a dynamic
response. The differential equation
is non-linear because of the sin u
term.
u
s
L
M
For a linear system, y = T (x), two conditions must be satisfied:
1. If a constant, a, is multiplied by the input, x, such that ax is applied as the input, then
the output must be multiplied by the same constant, as in Equation 8:
2. If the sum of two inputs is applied, the output must be the sum of the individual
outputs and the principal of superposition must hold as demonstrated by the following
equations:
where
and
T x y ( )
2 2
=
(11)
T x x y y ( )
1 2 1 2
+ = +
(9)
T ax ay ( ) =
(8)
T x y ( )
1 1
=
(10)
This may be rewritten as:
d
dt
D
ML
d
dt
g
L
2
2
0
u u
u + + = sin
(7)
Equation 7 is non-linear because the sine of the sum of two angles is not equal to the sum of
the sines of the two angles. For example, sin(45) = 0.707 while sin(90) = 1.
Linear approach modeling
Returning to the pendulum example, the solution to this non-linear equation with D=0
involves the elliptic function. (The solutions of this non-linear system will be investigated
later using Simulink.) Using the approximation sin u = u in Equation 7 gives the linear
approximation:
d
dt
D
ML
d
dt
g
L
2
2
0
u u
u + + =
(27)
Simple Harmonic Motion
When D=0, Equation 27 simplifies to the linear differential equation for simple harmonic
motion:
d
dt
g
L
2
2
0
u
u + =
(28)
Linear System Theory
Since an arbitrary
input function, f(t)
may be expressed as a
weighted sum of
impulse functions
using the Dirac delta
function, o(t).
Linear System
Representation by Dirac delta
function
Sample with Delta
function at time t, then
integrate over all time.
}
= t t o t d t f t f ) ( ) ( ) (
Apply this input to the linear
system
(
=
}
t t o t d t f h t g ) ( ) ( ) (
Since the system is linear
}
= t t o t d t h f t g )] ( [ ) ( ) (
Impulse response
Therefore, the
response of the linear
system is
characterized by the
response to an impulse
function. This leads to
the definition of the
impulse response:
| | ) , ( ) , ( t o t t h t h =
Superposition integral
}
+
= t t t d t h f t g ) , ( ) ( ) (
Casuality condition
No output before input
0 0 ) , ( < = t t t for t h If
}
=
t
d t h f t g t t t ) , ( ) ( ) (
With the condition that f(t)=0 for
t<0,
}
=
t
d t h f t g
0
) , ( ) ( ) ( t t t
If the system is time invariant,
then
) ( ) , ( t t = t h t h
This leads to the familiar
convolution equation
}
=
t
d t h f t g
0
) ( ) ( ) ( t t t
Convolution
The relationship
between the input and
output of a linear, time
invariant system is a
convolution.
Direct computation of
a convolution involves
a shifting,
multiplication and
integration.
}
=
t
d t h f t g
0
) ( ) ( ) ( t t t
Laplace transform
Transformational techniques, such as the
Laplace transforms, can be used to convert
the convolution into an equivalent product
in the transform domain.
This simplifies the solution for any linear
system.
The Laplace transform F(s) of f(t)
is:
}
=
0
) ( ) ( dt e t f s F
st
The Laplace convolution theorem
states that
}
}
}
=
=
=
0
0
0
) ( ) (
) ( ) (
) ( ) (
dt e t h s H
and
dt e t g s G
dt e t f s F
If
st
st
st
Convolution reduced to product
) ( ) ( ) (
) ( ) ( ) (
0
s H s F s G
then
d t h f t g
t
=
=
}
t t t
Block diagrams
This transform relationship may be used to
develop block diagram representations and
algebra for linear systems, which is very
useful to simplify the study of complicated
systems.
Basic blocks
H(s)
Sum
Basic Block
Comparison
A
B
C=A+B
F(s) G(s)=F(s)*H(s)
Pick off point
A
A
Blocks in cascade
H1 H2
G(s)
F(s)
G1(s)
H1*H2
F(s)
G(s)
Blocks in parallel
H1
H2
text F(s)
G(s)
+
+
H1+H2
F(s)
G(s)
Feedback block
G(s)
H(s)
R(s)
C(s)
-
+
E(s)
F(s)
C(s) = G(s)E(s)
F(s) = H(s)C(s)
E(s) = R(s)-F(s)
C(s) = G(s)(R(s)-F(s)
C(s) = G(s)(R(s)-H(s)C(s))
C(s)=G(s)R(s)-G(s)H(s)C(s)
C(s)(1+G(s)H(s))=G(s)R(s)
C(s)/R(s) = G(s)/(1+G(s)H(s))
A Matlab
1
m-file may be used to determine the time response to the linear differential
equation. To use Laplace transforms in Matlab, we must use the linear form of the system and
provide initial conditions since no forcing function is applied.
Remembering that the Laplace transform of the derivative is:
and
(29) ) 0 ( ) (
O =
)
`
u
u
s s
dt
d
L
(30)
dt
d
s s s
dt
d
L
) 0 (
) 0 ( ) (
2
2
2
O =
)
`
u
u
u
Taking the Laplace transform of the linear differential Equation 27 gives:
This may be simplified to:
(31)
s s s
d
dt
D
ML
s s
g
L
s
2
0
0
0 0 O O O ( ) ( )
( )
( ) ( ) ( ) + + =
u
u
u
(32) O( )
( ) ( )
( )
s
s
D
ML
d
dt
s
D
ML
s
g
L
=
+
+ +
u u
u
0 0
0
2
Block diagrams clarify ideas
u(s)
1
?
su(s)
1/s ?
(Note that the initial conditions act as a forcing function for the system to start it moving.) It is
more common to apply a step function to start a system. The unit step function is defined as:
(Note that the unit step function is the integral of the delta function.) It may also be shown
that the Laplace transform of the delta function is 1, and that the Laplace transform of the unit
step function is 1/s.
<
>=
=
0
0
0
1
) (
t
t
for
for
t u
(33)
To use Matlab to solve the transfer function for u(t), we must tell Matlab that this is the output
of some system. Since G(s) = H(s)F(s), we can let H(s) = 1 and F(s) = O(s). Then the output
will be G(s) = O(s), and the impulse function can be used directly. If Matlab does not have an
impulse response but it does have a step response, then a slight manipulation is required.
(Note that the impulse response of system G(s) is the same as the step response of system s
(G(s)).)
The transform function with numerical values substituted is:
O( )
( . )
. .
s
s
s s
=
+ +
45 00268
00268 1073
2
(34)
Note that u (0) = 45, and du(0)/dt = 0. We can define T0 = u (0) for ease of
typing, and express the numerator and denominator polynomials by their
coefficients as shown by the num and den vectors below.
To develop a Matlab m-file script using the step function, define the parameters
from the problem statement:
T0 =45
D = 0.1
M = 40/32.2
L = 3
G=32.3
num = [T0, D*T0/(M*L), 0];
den = [1, D/(M*L), G/L ];
t= 0:0.1:10;
step(num,den,t);
grid on
title('Time response of the pendulum linear approximation')
This m-file or script may be run using Matlab and should produce an oscillatory output. The
angle starts at 45 degrees at time 0 and goes in the negative direction first, then oscillates to
some positive angle and dampens out. The period, T in seconds (or frequency, f = 1/T in
cycles/second or Hertz) of the response can be compared to the theoretical solution for an
undamped pendulum given in Equation 35 [4]. The is shown in Figure 3.
T
L
g
= 2t
(35)
Now try it!
Use Matlab to solve
the pendulum.
Just open a new
workspace in Matlab.
Copy the sample
program.
Run the m-file.
0 2 4 6 8 10
-50
0
50
Time (Seconds)
Time response of pendulum with linear approximation
D
e
g
r
e
e
s
Figure 3. Pendulum response with linear
approximation. u(0+)=45
Demonstration
How is the pendulum a system?
What are the parameters of its model?
Simulate the effect of changes in the
parameters.
How is the pendulum a system?
The
O( )
( . )
. .
s
s
s s
=
+ +
45 00268
00268 1073
2
(34)
su(s)
1/s ?
What are the parameters of its
model? L, g, D what about M?
The period, T in seconds (or frequency, f = 1/T in
cycles/second or Hertz) of the response can be compared to the theoretical solution for an
undamped pendulum given in Equation 35 [4]. The is shown in Figure 3.
T
L
g
= 2t
(35)
Simulate the solution for D= 1,
100
What happens?