Dynamic System Modeling and Control
Dynamic System Modeling and Control
Dynamic System
Modeling and Control
2015 Edition
Hugh Jack
Hugh Jack
5 800111 604983
i
i
ii
ii
iii
Table Of Contents
1. Translation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1
1.1 Introduction 1
1.1 Modeling 2
1.1 System Reduction 14
1.2 Systems Examples 17
1.3 Other Topics 19
1.1 Summary 19
1.2 Problems with Solutions 19
1.3 Problem Solutions 25
1.4 Problems Without Solutions 30
3. Numerical Analysis - - - - - - - - - - - - - - - - - - - - - - - - - - - - 99
4. Rotation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 179
iii
iv
5. Mechanisms - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 217
iv
v
10.1 Problems Without Solutions 397
10.2 Complex Number Review 398
v
vi
15.3 Summary 506
15.4 Problems with Solutions 506
15.5 Problem Solutions 509
15.1 Problems Without Solutions 523
vi
1
1. Translation
Topic 1.1 Basic laws of motion.
Topic 1.2 Gravity, inertia, springs, dampers, cables and pulleys, drag, friction, FBDs.
Topic 1.3 System analysis techniques.
Topic 1.4 Design case.
Objective 1.1 To be able to develop differential equations that describe translating systems.
1.1 Introduction
If the velocity and acceleration of a body are both zero then the body will be static. If the applied forces are balanced, and
cancel each other out, the body will not accelerate. If the forces are unbalanced then the body will accelerate. If all of the forces act
through the center of mass then the body will only translate. Forces that do not act through the center of mass will also cause rota-
tion to occur. This chapter will focus only on translational systems.
The equations of motion for translating bodies are in Figure 1.1. These state simply that velocity is the first derivative of
position, equation 1.1, and acceleration is the first derivative of velocity with respect to time, equation 1.2. Conversely, the acceler-
ation can be integrated to find velocity, equation 1.3, and the velocity can be integrated to find position, equation 1.4. Therefore, if
we know the acceleration of a body, we can determine the velocity and position. Finally, when a force is applied to a mass, the
acceleration can be calculated by dividing the net force by the mass, equation 1.5.
v t = a t dt eqn 1.3
x t = v t dt = a t dt eqn 1.4
a t = F t- eqn 1.5
---------
M
where,
An example application of these fundamental laws is shown in Figure 1.2. The initial conditions of the system are sup-
plied (and are normally required to solve this type of problem). These are then used to find the state of the system after a period of
time. The solution begins by integrating the acceleration, and using the initial velocity value for the integration constant, equation
1.6. So at t=0 the velocity will be equal to the initial velocity. This is then integrated once more to provide the position of the
object, equation 1.7. As before, the initial position is used for the integration constant. This equation is then used to calculate the
position after a period of time. Notice that units are used throughout the calculations; this is a good practice for any engineer.
2
Given an initial (t=0) state of x=5m, v=2m/s, a=3ms-2, find the system state 5 seconds later assuming
constant acceleration.
x 0 = 5m
–1 Note: units are very important and should normally be car-
v 0 = 2ms ried through all calculations.
–2
a 0 = 3ms
The constant acceleration can be integrated to find the velocity as a function of time.
Figure 1.2 Example: Calculation for a translating mass, with initial conditions.
1.1 Modeling
When modeling translational systems it is common to break the system into parts. These parts are then described with
Free Body Diagrams (FBDs). Common components that must be considered when constructing FBDs are listed below, and are dis-
cussed in following sections.
• Springs - resist deflection.
• Dampers and drag - resist motion.
• Friction - opposes relative motion between bodies in contact.
• Cables and pulleys - redirect forces.
• Contact points/joints - transmit forces through up to 3 degrees of freedom.
• Inertia - opposes acceleration and deceleration.
• Gravity and other fields - apply non-contact forces.
Free Body Diagrams (FBDs) allow us to reduce a complex mechanical system into smaller, more manageable pieces. The
forces applied to the FBD can then be summed to provide an equation for the piece. These equations can then be used later to do an
analysis of system behavior. These are required elements for any engineering problem involving rigid bodies.
An example of FBD construction is shown in Figure 1.3. In this case there is a mass sitting atop a spring. An FBD can be
drawn for the mass. In total there are two obvious forces applied to the mass, gravity pulling the mass downward, and a spring
pushing the mass upwards. The FBD for the spring has two forces applied at either end. Notice that the spring force, FR1, acting on
the mass, and on the spring have an equal magnitude, but opposite direction.
3
N
K = 20 ----
m
F R1 Mg
F R1
In a static system the sum of forces is zero and nothing is in motion. In a dynamic system the sum of forces is not zero and
the masses accelerate. The resulting imbalance in forces acts on the mass causing it to accelerate. For the purposes of calculation
we create a virtual reaction force, called the inertial force. This force is also known as D’Alembert’s (pronounced as daa-lamb-
bears) force. It can be included in calculations in one of two ways. The first is to add the inertial force to the FBD and then add it
into the sum of forces, which will equal zero, equation 1.8. The second method is known as Newton’s equation where all of the
forces are summed and set equal to the inertial force, as shown in Figure 1.10. The acceleration is proportional to the inertial force
and inversely proportional to the mass.
An application of Newton’s equation to FBDs can be seen in Figure 1.6. In the first case an inertial force is added to the
FBD. This force should be in an opposite direction (left here) to the positive direction of the mass (right). When the sum of forces
equation is used then the force is added in as a normal force component. In the second case Newton’s equation is used so the force
is left off the FBD, but added to the final equation. In this case the sign of the inertial force is positive if the assumed positive direc-
tion of the mass matches the positive direction for the summation.
4
Note: Arrows are drawn to represent displacements. How they are drawn shows the positive
direction for the displacement. Systems are normally assumed to start at zero displacement
unless stated. This may be somewhat confusing because the figures may not be drawn that
way.
x
This block will move to the right as x changes in the positive
direction. Motion to the left would be negative.
x
This block will move to the left as x changes in the positive direction.
D’Albert’s form: x
d 2 + d 2
Ma = M ----- x F
F x = F – M ----- x = 0
dt dt
M or
+ d 2
F x = – F + M ----- x = 0
dt
Note: If using an inertial force then the direction of the force should be opposite to the positive
motion direction for the mass.
Newton’s Form:
x
d 2
F + F x = F = M ----- x
M dt
or
d 2
+ F x = – F = – M ----- x
dt
Note: If using Newton’s form the sign of the inertial force should be positive if the positive direction
for the summation and the mass are the same, otherwise if they are opposite then the sign should be
negative.
An example of the application of Newton’s equation is shown in Figure 1.7. In this example there are two unbalanced
forces applied to a mass. These forces are summed and set equal to the inertial force. Solving the resulting equation results in accel-
5
eration values in the ‘x’ and ‘y’ directions. In this example the forces and calculations are done in vector form for convenience and
brevity.
5
If both forces shown act –7
F1 = –4 N
through the center of mass,
F2 = –3 N
what is the acceleration of the 0
ball? 0
F = F 1 + F 2 = Ma
M=10kg
5 –7
–4 N + – 3 N = 10Kg a
0 0
–2 – 0.2 – 0.2
1 Kgm 1 m-
a = ------------- – 7 N = – 0.7 ------------ ------- = – 0.7 ----
10Kg 2 Kg 2
0 0 s 0 s
A = Sum() / M;
printf("The acceleration is ( %f, %f, %f) m/s^2 \n", A(1), A(2), A(3));
printf("The magnitude is |A| = %f m/s^2 \n", norm(A));
Gravity is a weak force of attraction between masses. In our situation we are in the proximity of a large mass (the earth)
that produces a large force of attraction. When analyzing forces acting on rigid bodies we add this force to our FBDs. The magni-
tude of the force is proportional to the mass of the object, with a direction toward the center of the earth (down).
The relationship between mass and force is clear in the metric system with mass having the units Kilograms (kg), and
force the units Newtons (N). The relationship between these is the gravitational constant 9.81N/kg, which will vary slightly over
the surface of the earth. The Imperial units for force and mass are both the pound (lb.) that often causes confusion. To reduce this
confusion the unit for force is normally modified to be, lbf.
An example calculation including gravitational acceleration is shown in Figure 1.9. The 5kg mass is pulled by two forces,
gravity and the arbitrary force ‘F’. These forces are described in vector form, with the positive ‘z’ axis pointing upwards. To find
6
the equations of motion the forces are summed. To eliminate the second derivative on the inertia term the equation is integrated
twice. The result is a set of three vector equations that describe the x, y and z components of the motion. Notice that the units have
been carried through these calculations.
Assume we have a mass that is acted upon by gravity and a second F M = 5Kg
constant force vector. To find the position of the mass as a function of
time we first define the gravity vector and position components for
the system. Fg g
fx
0 0 x t
g = N- =
------ m-
---- X t = y t F = f F g = Mg
0 Kg 0 2 y
– 9.81 – 9.81 s z t fz
Next, sum the forces and set them equal to inertial resistance.
d 2
F = Mg + F = M ----- X t
dt
fx
0 x t
m- + d- 2
----
Note: When an engineer solves a prob-
5Kg 0 ---- f y = 5Kg y t lem they will always be looking at the
2 dt
equations and unknowns. In this case
– 9.81 s fz z t there are three equations, and there are 9
fx constants/givens fx, fy, fz, vx0, vy0,
0 x t
d- 2
xz0, x0, y0 and z0. There are 4 vari-
m –1
0 ----2- + 0.2Kg fy = ---- y t ables/unknowns x, y, z and t. Therefore
dt with 3 equations and 4 unknowns only
– 9.81 s fz z t one value (4-3) is required to find all of
the unknown values.
Integrate twice to find the position components.
vx
fx 0
0 –1 x t
m v d-
----
0 ----- + 0.2Kg fy t + =
2 y0 dt y t
– 9.81 s z t
fz vz
0
vx
fx 0 x0
0 – 1 2 x t
1--- m
0 ----2- + 0.2Kg fy t + vy t + y0 = y t
2 0
– 9.81 s fz vz z0 z t
0
2
0.1f x t + v x t + x 0
0
x t
2
y t = 0.1f y t + v y t + y 0 m
0
z t
9.81- + 0.1f t 2 + v t + z
–------------
2 z z0 0
Like gravity, magnetic and electrostatic fields can also apply forces to objects. Magnetic forces are commonly found in
motors and other electrical actuators. Electrostatic forces are less common, but may need to be considered for highly charged sys-
tems.
Springs
Springs are typically constructed with elastic materials such as metals, and plastics, that will provide an opposing force
when deformed. The properties of the spring are determined by the Young’s modulus (E) of the material and the geometry of the
spring. A primitive spring is shown in Figure 1.10. In this case the spring is a solid member. The relationship between force and
displacement is determined by the basic mechanics of materials relationship. In practice springs are more complex, but the param-
eters (E, A and L) are combined into a more convenient form. This form is known as Hooke’s Law.
(Hooke’s law) L
= ------- F
EA
F
EA
F = -------
L
L
F = K
Figure 1.10 A solid member as a spring
Hooke’s law does have some limitations that engineers must consider. The basic equation is linear, but as a spring is
deformed the material approaches plastic deformation, and the modulus of elasticity will change. In addition the geometry of the
object changes, also changing the effective stiffness. Springs are normally assumed to be massless. This allows the inertial effects
to be ignored, such as a force propagation delay. In applications with fast rates of change the spring mass may become significant,
and they will no longer act as an ideal device.
The cases for tension and compression are shown in Figure 1.11. In the case of compression the spring length has been
made shorter than its’ normal length. This requires that a compression force be applied. For tension, both the displacement from
neutral and the required force reverse direction. It is advisable when solving problems to assume a spring is either in tension or
8
compression, and then select the displacement and force directions accordingly.
x = deformed length ASIDE: a spring has a natural or undeformed length. When at this
length it is neither in tension or compression
compression as positive:
Fc x
Ks Fc = Ks x
Fc x
Ks Fc = –Ks x
Fc x
Ks Fc = –Ks x
Ks
tension as positive: Ft
Ft = Ks x
x
Ks
Ft
Ft = –Ks x
x
Ks
Ft
Ft = –Ks x
x
NOTE: the symbols for springs, resistors and inductors are quite often the same or similar. You will
need to remember this when dealing with complex systems - and especially in this book where we deal
with both types of components.
Previous examples have shown springs with displacements at one end only. In Figure 1.12, springs are shown that have
movement at both ends. In these cases the sign of the force applied to the spring is selected with reference to the assumed compres-
sion or tension. The primary difference is that care is required to correctly construct the expressions for the tension or compression
forces. In all cases the forces on the springs must be assumed and drawn as either tensile or compressive. In the first example the
displacement and forces are tensile. The displacement at the left is tensile, so it will be positive, but on the right hand side the dis-
placement is compressive so it is negative. In the second example the force and both displacements are shown as tensile, so the
terms are both positive. In the third example the force is shown as compressive, while the displacements are both shown as tensile,
9
x1 x2
F Ks F
F = Ks x1 – x2
x1 x2
F Ks F
F = Ks x1 + x2
x1 x2
F Ks F
F = Ks – x1 – x2
Figure 1.12 Examples of forces when both sides of a spring can move
10
Ks
M1 M2
x1 x2
The system can be reduced to free body diagrams assuming the spring is tension.
M1 Ks – x1 + x2 M2
x1 x2
Note: In this example the spring is assumed to be in tension and the signs of the magnitude are
made negative for terms that result in compression for positive changes.
The system can be reduced to free body diagrams assuming the spring is in compression.
M1 Ks x1 – x2 M2
x1 x2
Sometimes the true length of a spring is important, and the deformation alone is insufficient. In these cases the deforma-
tion can be defined as a deformed and undeformed length, as shown in Figure 1.14. In addition to providing forces, springs may be
11
where,
x = deformation
l 0 = the length when undeformed
l 1 = the length when deformed
2
K x
E P = ------------------
2
where,
K = spring coefficient
Consider the springs shown in Figure 1.15. When two springs are combined in this manner they can be replaced with a
single equivalent spring. In the parallel spring combination the overall stiffness of the spring would increase. In the series spring
combination the overall stiffness would decrease.
Parallel Series
K S1 K S2
K S1
M K S2
Figure 1.16 shows the calculations required to find a spring coefficient equivalent to the two springs in series. The first
step is to draw a FBD for the mass at the bottom, and for a point between the two springs, P. The forces for both of these are then
summed. The next process is to combine the two equations to eliminate the height variable created for point P. After this, the equa-
tion is rearranged into Hooke’s law, and the equivalent spring coefficient is found.
12
First, draw FBDs for P and M and sum the forces assuming the system is static.
K S1 y 2
+ F y = K S1 y 2 – K S2 y 1 – y 2 = 0
P
K S2 y 1 – y 2
K S1
eqn 1.10
K S2 y 1 – y 2 P
M + F y = K S2 y 1 – y 2 – F g = 0 y2
K S2
Fg eqn 1.11
y 2 K S1 + K S2 = y 1 K S2 eqn 1.13
Figure 1.16 Example: Calculation of an equivalent spring coefficient for springs in series
13
A damper is a component that resists motion. The resistive force is relative to the rate of displacement. As mentioned
before, springs store energy in a system but dampers dissipate energy. Dampers and springs are often used to compliment each
other in designs.
Damping can occur naturally in a system, or can be added by design. The physical damper pictured in Figure 1.17 uses a
cylinder that contains a fluid. There is a moving rod and piston that can slide within the cylinder. As the piston moves, fluid is
forced through a small orifice. When moved slowly the fluid moves easily, but when moved quickly the pressure required to force
the fluid through the orifice rises. This rise in pressure results in a higher force of resistance. In ideal terms any motion would result
in an opposing force. In reality there is also a break-away force that needs to be applied before motion begins. Other manufacturing
variations could also lead to other small differences between dampers. Normally these cause negligible effects.
orifice
motion
fluid
piston
fluid
The standard symbol for a standard damper is shown in Figure 1.18. The basic equation for an ideal damper in compres-
sion is shown in equation 1.14. In this case the force and displacement are both compressive. The force is calculated by multiplying
the damper coefficient by the velocity, or first derivative of position. Aside from the use of the first derivative of position, the anal-
ysis of dampers in systems is similar to that of springs.
x
Kd d
F = K d ----- x eqn 1.14
F dt
Aside: The symbol shown is typically used for dampers. It is based on an old damper design called a
dashpot. It was constructed using a small piston inside a larger pot filled with oil.
Damping can also occur when there is relative motion between two objects. If the objects are lubricated with a viscous
fluid (e.g., oil) then there will be a damping effect. In the example in Figure 1.19 two objects are shown with viscous friction
(damping) between them. When the system is broken into free body diagrams the forces are shown to be a function of the relative
velocities between the blocks.
14
x1
· ·
Fd = Kd x1 – x2
Kd
· ·
Fd = Kd x1 – x2
x2
Aside: Fluids, such as oils, have a significant viscosity. When these materials are put in shear they
resist the motion. The higher the shear rate, the greater the resistance to flow. Normally these forces
are small, except at high velocities.
Figure 1.19 Viscous damping between two bodies with relative motion
A damping force is proportional to the first derivative of position (velocity). Aerodynamic drag is proportional to the
velocity squared. The equation for drag is shown in Figure 1.20 in vector and scalar forms. The drag force increases as the square
of velocity. Normally, the magnitude of the drag force coefficient ‘D’ is approximated theoretically and/or measured experimen-
tally. The drag coefficient is a function of material type, surface properties, object size, and object geometry.
F F = –D v v
Note: When deriving differential equations, the final value coefficient units
can be checked for errors using unit analysis. This method
involves replacing variables with their unit equivalents. Kgm
F N = ------------
All the units should match. 2
s
eg. N
Ks ----
m
·· ·
x 2 M 2 + x 2 B + x 2 K s2 + x 1 – K s2 = F
m- m Ns N N Ns
---- Kg + ---- ------ + m ---- + m – ---- = N Kd ------
2 s m m m m
s
N + N + N + –N = N
M Kg
The units match, so there are no obvious problems.
Consider the cart in Figure 1.21. On the left is a force that is opposed by a spring and damper on the right. The basic prob-
lem definition already contains all of the needed definitions, so no others are required. The FBD for the mass shows the applied
force and the reaction forces from the spring and damper. When the forces are summed the inertia is on the right side of the equa-
tion in Newton’s form. This equation is then rearranged to a second-order non-homogeneous differential equation.
Aside: later on we will solve the differential equations, or use other methods to determine how
the system will behave. It is useful to have all of the ‘output’ variables for the system on the left
hand side, and everything else on the other.
The example in Figure 1.13 shows two masses separated by a spring. In the first example the spring is assumed to be in
tension. When x1 becomes positive it will put the spring in compression, so it is made negative, however a positive x2 will put the
spring in tension, so it remains positive. In the second case the spring is assumed to be in compression and this time x2 will put it in
tension so it is made negative.
Friction
Viscous friction was discussed before, where a lubricant would provide a damping effect between two moving objects. In
cases where there is no lubricant, and the touching surfaces are dry, dry coulomb friction may result. In this case the surfaces will
stick in place until a maximum force is overcome. After that, the object will begin to slide and a constant friction force will result.
Figure 1.22 shows the classic model for (dry Coulomb) friction. The force on the horizontal axis is the force applied to the
friction surfaces while the vertical axis is the resulting friction force. Beneath the slip force the object will stay in place. When the
slip force is exceeded the object will begin to move, and the resulting kinetic friction force will be relatively constant. (Note: If the
object begins to travel much faster then the kinetic friction force will decrease.) It is common to forget that friction forces are bidi-
rectional, but it always opposes the applied force or motion. The friction force is a function of the coefficient of friction and the
normal force across the contact surfaces. The coefficient of friction is a function of the materials, surface texture and surface shape.
Fk
F applied
Fs
F
Fg Fk = kN
F k, F s
Fs sN
N
Note: When solving problems with friction remember that the friction force will always equal the applied
force (not the maximum force) until slip occurs. After that the friction is approximately constant. In addi-
tion, the friction forces direction opposes applied forces, and motion.
Many systems use kinetic friction to dissipate energy from a system as heat, sound and vibration.
Cables are useful when transmitting tensile forces or displacements. The centerline of the cable becomes the centerline for
the force. And, if the force becomes compressive, the cable becomes limp, and will not transmit force. A cable by itself can be rep-
resented as a force vector. When used in combination with pulleys, a cable can redirect a force vector or multiply a force.
17
Typically we assume that a pulley is massless and frictionless (in the rotation chapter we will assume they are not). If this
is the case then the tension in the cable on both sides of the pulley are equal, as shown in Figure 1.23.
T1
For a massless frictionless pulley
T1 = T2
T2
If we have a pulley that is fixed and cannot rotate, the cable must slide over the surface of the pulley. In this case we can
use the coefficient of friction to determine the relative ratio of forces between the sides of the pulley, as shown in Figure 1.24.
T1 Moving toward T1
T1 k
------ = e
T2
Moving toward T2
T2
T
-----2- = e
k
T1
Figure 1.24 Friction of a belt over a fixed drum if the belt is moving towards T1
Although the discussion in this section has focused on cables and pulleys, the theory also applies to belts over drums.
M1
M2
Kd
K S2
K S1
· · M1 g
FD = Kd y2 – y1
M2g
y2 ··
M1 y1 F S2 = K s2 y 1 – y 2
FD
··
M2 y2
F S2 y1 F S1 = – K s1 y 1
Figure 1.25 Example: A multi-body translating system (an elevator with a passenger)
The forces on the FBDs are summed and the equations are expanded in Figure 1.26.
F M = F S1 + F S2 + M 1 g + F D = M 1 a 1
1
F M = – F S2 + M 2 g – F D = M 2 a 2
2
··
K S1 – y 1 + K S2 y 2 – y 1 + M 1 – 9.81 + K d y· 2 – y· 1 = M 1 y 1
··
– K S2 y 2 – y 1 + M 2 – 9.81 – K d y· 2 – y· 1 = M 2 y 2
d- E
P = Fv = ---- eqn 1.18
dt
Figure 1.27 Energy and power equations for translating masses
1.1 Summary
• FBDs are useful for reducing complex systems to simpler parts.
• Equations for translation and rotation can be written for FBDs.
• The equations can be integrated for dynamic cases, or solved algebraically for static cases.
FBD:
F1
3 0 M
F1 = 4 N N-
g = – 9.81 ------ M = 2Kg
Kg
0 0
Problem 1.2 If a spring has a deflection of 6.00 cm for a static load of 200N, what is the spring constant?
Problem 1.3 Draw the FBDs and the equations of motion for the masses.
Ks
F
M1 M2
x1 x2
20
Problem 1.4 Find F assuming the springs are normally 4m long when unloaded.
Given, Ks Ks
N-
K s = 10 ---
m
x = 0.1m F
x
Aside: It can help to draw a FBD of
the node between the springs.. 10m
Problem 1.5 Find an equivalent spring coefficient to replace the two springs in parallel
K S1 K S2
Problem 1.6 Derive the effective damper coefficients for the pairs below from basic principles,
a) Kd1
Kd2
Kd1 Kd2
b)
Problem 1.7 Write a differential equation for the mass pictured below.
x
M F
B
21
Problem 1.8 The force is acting on the cylinder, resulting in the velocities given below. What is the applied force?
d- x = 0.1 m d- x = – 0.3 m
---- ----
---- ----
dt 1 s dt 2 s
F F
k d = 0.1 Ns
------
m
Problem 1.9 Write the differential equations for the system below.
x1 x2
K d1 K d2 K d3
K s1 M1 K s2 M2 F
K s3
Problem 1.10 Write the differential equations for the system below. In this system the upper mass, M1, is between a spring and
a cable and there is viscous damping between the mass and the floor. The suspended mass, M2, is between the
cable and a damper. The cable runs over a massless, frictionless pulley.
x1
Ks R
M1
M2 x2
Kd
Problem 1.11 Find F to start the mass moving up, and then the force required to maintain a low velocity downwards motion of
22
the mass.
Given,
s = 0.35 k = 0.2
M = 1Kg
Problem 1.12 Write the differential equations for the system below.
F
M1 x1
K s1
K d1
M2 x2
K s2
K d2
Problem 1.13 Write the differential equations for the system given below.
Kd Ks
F
M1 M2
B1 B2
Problem 1.14 Write the differential equations for the system below.
x1 x2
K d1
K s1 M1 K s2 M2 F
B
23
Problem 1.15 Write the differential equations for the system below. (Note: This problem differs because the x2 dimension is
relative, not absolute.)
x1 x2
K d1
K s1 M1 K s2 M2 F
Problem 1.16 Write the differential equations for the system below.
K s2 x2
M2
F
K d1
B
x1
K s1 M1
Problem 1.17 Write the differential equations for the system below.
K s2 x2
M2 F
K d1
s k
K s1 M1 x1
Problem 1.18 Write the differential equations for the system below. Assume that the pulley is massless and frictionless and that
24
x
K s1
R
M
K s2
Problem 1.19 Write the differential equations for the system below.
x1
K s1
M1
s k
M2 x2
K s2
25
Problem 1.20 Write the differential equations for the system below. Assume it is in motion.
M2
k1
K S1
M1 k2
1.5
m-
a = – 7.81 ---
2
s
0
Answer 1.3
··
x1 M1 + x1 Ks + x2 –Ks = F
··
x1 Ks + x2 –M2 + x2 –Ks = 0
Answer 1.4 F = 2N
Answer 1.5 Consider that when an object has no mass, the force applied to one side of the spring will also be applied to the
other. The only factor that changes is displacement.
F = K S1 + K S2 y
Answer 1.6
a) b) K d1 K d2
K eq = K d1 + K d2
K eq = --------------------------
K d1 + K d2
Answer 1.7
·· B F
x + x· ----- = – -----
M M
Answer 1.9
FBDs: ··
M1 x1
· · · ·
– K d1 x 1 K d2 x 1 – x 2 K d3 x 2
M1 M2
– K s1 x 1 K s2 x 1 – x 2 K s3 x 2
··
F M2 x2
For M1: · · · ··
+ F = – K d1 x 1 – K s1 x 1 – K d2 x 1 – x 2 – K s2 x 1 – x 2 = M 1 x 1
·· · ·
x 1 M 1 + x 1 K d1 + K d2 + x 1 K s1 + K s2 + x 2 – K d2 + x 2 – K s2 = 0
·· · K d1 + K d2 K s1 + K s2 · – K d2 – K s2
x 1 + x 1 -------------------------- + x 1 ------------------------- + x 2 ------------- + x 2 ------------ = 0
M1 M1 M1 M1
For M2:
· · · ·
+ F = K d2 x 1 – x 2 + K s2 x 1 – x 2 + F – K d3 x 2 – K s3 x 2 = M 2 x 2
·· · ·
x 2 M 2 + x 2 K d2 + K d3 + x 2 K s2 + K s3 + x 1 – K d2 + x 1 – K s2 = F
·· · K d2 + K d3 K s2 + K s3 · – K d2 – K s2 F
x 2 + x 2 -------------------------- + x 2 ------------------------- + x 1 ------------- + x 1 ------------ = -------
M2 M2 M2 M2 M2
Answer 1.10
FBD M1: FBD M2:
T
Ks x1 T
··
M1 M2 M2 x2
· ··
Bx 1 M1 x1
·
M2 g Kd x2
+ · ··
F = – K s x 1 – Bx 1 + T = M 1 x 1
· ··
Ks F = T + Kd x2 – M2 g = –M2 x2
·· · B T
x 1 + x 1 ------- + x 1 ------- = ------- +
M1 M1 M1 ·· ·
x2 –M2 + x2 –Kd = T – M2 g
·· · ·· · Kd T – M2 g
x1 M1 + x1 B + x1 Ks = T x 2 + x 2 ------- = --------------------
M2 –M2
For T: if T <= 0 then T = 0N
if T > 0 x1 = x2
Answer 1.11
0.35
F up = 9.81e N
9.81N
F down = -----------------
0.2
e
27
Answer 1.12
(assuming no gravity
·· · ·
x 1 M 1 + x 1 K d1 + x 1 K s1 + x 2 – K d1 + x 2 – K s1 = F
·· · K d1 K s1 · – K d1 – K s1 F
x 1 + x 1 --------- + x 1 --------- + x 2 ------------- + x 2 ------------ = -------
M1 M1 M1 M1 M1
·· · ·
x 2 M 2 + x 2 K d1 + K d2 + x 2 K s1 + K s2 + x 1 – K d1 + x 1 – K s1 = 0
·· · K d1 + K d2 K s1 + K s2 · – K d1 – K s1
x 2 + x 2 -------------------------- + x 2 ------------------------- + x 1 ------------- + x 1 ------------ = 0
M2 M2 M2 M2
Answer 1.13
·· · Kd + B1 Ks –Ks
x 1 + x 1 ------------------- + x 1 ------- + x 2 --------- = 0
M1 M1 M1
·· · B2 Ks –Ks –F
x 2 + x 2 ------- + x 2 ------- + x 1 --------- = -------
M2 M2 M2 M2
Answer 1.14
·· · K d1 K s1 + K s2 – K s2
x 1 + x 1 --------- + x 1 ------------------------- + x 2 ------------ = 0
M1 M1 M1
·· · B K s2 – K s2 F
x 2 + x 2 ------- + x 2 --------- + x 1 ------------ = -------
M2 M2 M2 M2
Answer 1.15
·· · K d1 K s1 – K s2
x 1 + x 1 --------- + x 1 --------- + x 2 ------------ = 0
M1 M1 M1
·· · B ·· · B Ks F
x 1 + x 1 ------- + x 2 + x 2 ------- + x 2 ------- = -------
M2 M2 M2 M2
Answer 1.16
·· · K d1 + B K s1 · –B
x 1 + x 1 -------------------- + x 1 --------- + x 2 ------- = 0
M1 M1 M1
·· · B K s2 · –B F
x 2 + x 2 ------- + x 2 --------- + x 1 ------- = -------
M2 M2 M2 M2
28
Answer 1.17
·· ·
x 1 M 1 + x 1 K d1 + x 1 K s1 = F F
·· · K d1 K s1 FF
x 1 + x 1 --------- + x 1 --------- = -------
M1 M1 M1
··
x 2 M 2 + x 2 K s2 = F – F F
·· K s2 F – FF
x 2 + x 2 --------- = ----------------
M2 M2
where, · ·
FF s M2 g
if x1 = x2
· ·
x1 – x2 · ·
FF = -------------------
k M2 g · ·- if x1 x2
x1 – x2
Answer 1.18
if x 0 T = 0
if x 0 T = – K s2 x
B K s1 T
··
x + x· ----- + x --------- = -----
M M M
Answer 1.19
if x 2 – x 1 0 T = 0
if T 0 x1 = x2
·
if x 1 = 0 FF M1 g s
·
· x1
if x 1 0 F F = M 1 g k -------
·-
x1
·· K s1 T – FF
x 1 + x 1 --------- = ----------------
M1 M1
·· K s2 –T
x 2 + x 2 --------- = ------- + g
M2 M2
29
Answer 1.20
T1
y T1 x
M 2 ··
x
T2
M1 M2
M 1 ··
y T2
x
M2 g -----
M1 g
k1 k2 x
F M1 = T 1 – M 1 g – M 1 ··
y = 0
M 1 ··
y = T1 – M1 g
if x – y 0
x
F M2 = – M 2 ··
x – T2 – M2 g ----- T2 = K S1 x – y
k2 x = 0
x- if x· 0
M 2 ··
x = – T2 – M2 g ---- ---
k2 x T2 2 k1
------ = e
T1
else
T1 ---
2 k1
------ = e
T2
else
T1 = 0
T2 = 0
30
Ks1
Y1
M1
Ks2
Y2
M2
Ks3
Y3
M3
Problem 1.22 Find the acceleration of the block for both angles indicated.
s = 0.3 10 kg
k = 0.2 1 = 5
2 = 35
Problem 1.23 Develop the equation relating the input force to the motion (in terms of x) of the left hand cart for the problem
below.
x1 x2
K d1 K d2
F
M1 K s1 M2 K s2
31
Problem 1.24 Write the differential equations for the systems below.
x1 x2
2
Bx· 1
K d1
K s2
M1 K s1 M2
32
33
inputs outputs
system Note: By convention inputs are on
the left, and outputs are on the right.
There are several standard input types used to test a system. These are listed below in order of relative popularity with
brief explanations.
• Step - a sudden change of input, from off to on and on to off, such as very rapidly changing a desired speed from
0Hz to 50Hz. These may repeat.
• Ramp - a continuously increasing input, such as a motor speed that increases constantly at 10Hz per minute.
• Sinusoidal - a cyclic input that varies continuously, such as wave height that is continually oscillating at 1Hz.
• Parabolic - an exponentially increasing input, such as a motor speed that is 2Hz at 1 second, 4rad/s at 2 seconds,
8rad/s at 3 seconds, etc.
After the system has been modeled, an input type has been chosen, and the initial conditions have been selected, the sys-
tem can be analyzed to determine its behavior. The most fundamental technique is to integrate the differential equation(s) for the
system.
because each of the terms on the left hand side is simply multiplied by a linear coefficient.
A···
x + Bx·· + Cx = 0 third-order homogeneous
A···
x + Bx· + Cx = Df t third-order non-homogeneous
A general solution for a first-order homogeneous differential equation is given in Figure 2.3. The solution begins with the
solution of the homogeneous equation where a general form is ‘guessed’. Substitution leads to finding the value of the coefficient
‘Y’. Following this, the initial conditions for the equation are used to find the value of the coefficient ‘X’. Notice that the final
equation will begin at the initial displacement, but approach zero as time goes to infinity. The e-to-the-x behavior is characteristic
for a first-order response.
and x 0 = x0
Ax· + Bx = 0
Guess a solution form and solve.
initial condition
– Yt – Yt
x = Xe x· = – YX e
– Yt – Yt
A – YX e + B Xe = 0 Note: The general form below is use-
ful for finding almost all homoge-
A –Y + B = 0 neous equations
Y = B --- – Yt
A x h t = Xe
Therefore the general form is,
–B
---t
A
x h = Xe
–B
---t
A
x h = Xe
–B
---0
A
x 0 = Xe
x0 = X
–B
---t
A
x t = x0 e
The general solution to a second-order homogeneous equation is shown in Figure 2.4. The solution begins with a guess of
the homogeneous solution, and the solution of a quadratic equation. There are three possible cases that result from the solution of
the quadratic equation: different but real roots; two identical real roots; or two complex roots. The three cases result in three differ-
ent forms of solutions, as shown. The complex result is the most notable because it results in sinusoidal oscillations. It is not
shown, but after the homogeneous solution has been found, the initial conditions need to be used to find the remaining coefficient
values.
As mentioned above, a complex solution when solving the homogeneous equation results in a sinusoidal oscillation, as
proven in Figure 2.5. The most notable part of the solution is that there is both a frequency of oscillation and a phase shift. This
form is very useful for analyzing the frequency response of a system, as will be seen in a later chapter.
Given,
2 Yt Yt Yt
A Y Xe + B YXe + C Xe = 0
2
A Y +B Y +C = 0
2 2
–B B – 4 AC - = –
Y = --------------------------------------------------- B B – 4AC
------------------------------------------
2A 2A
Note: There are three possible outcomes of finding the roots of the equations: two different real roots, two
identical real roots, or two complex roots. Therefore there are three fundamentally different results.
If the values for Y are both real, but different, the general form is,
R1 t R2 t
Y = R 1, R 2 xh = X1 e + X2 e
Note: The initial conditions are then used to find the values for X1 and X2.
the initial conditions are then used to find the values for X1 and X2.
Y = j t
x h = X 3 e cos t + X 4
the initial conditions are then used to find the values of X3 and X4.
Note: It is most likely that when you saw differential equations in your applied math class the left hand form
(with sin AND cos) was used. However this is not useful for engineering analysis. The right hand form is
equivalent (see later in the chapter) and will be the only form acceptable for a final answer.
t
x h = A cos t + B sin t = X 3 e cos t + X4
36
Consider the situation where the results of a homogeneous solution are the complex conjugate pair.
Y = R Cj
This gives the general result, as shown below:
R + Cj t R – Cj t
x = X1 e + X2 e
Rt Cjt Rt – Cjt
x = X1 e e + X2 e e
Rt Cjt – Cjt
x = e X1 e + X2 e
Rt
x = e X 1 cos Ct + j sin Ct + X 2 cos – C t + j sin – C t
Rt
x = e X 1 cos Ct + j sin Ct + X 2 cos Ct – j sin Ct
Rt
x = e X 1 + X 2 cos Ct + j X 1 – X 2 sin Ct
Rt
x = e X 1 + X 2 cos Ct + j X 1 – X 2 sin Ct
2 2 2
Rt X 1 + X 2 + j X 1 – X 2
x = e ------------------------------------------------------------------------- X 1 + X 2 cos Ct + j X 1 – X 2 sin Ct
2 2 2
X1 + X2 + j X1 – X2
2 2 2 2
X 1 + 2X 1 X 2 + X 2 – X 1 + – 2 X 1 X 2 + X 2
Rt
x = e ------------------------------------------------------------------------------------------------------------- X 1 + X 2 cos Ct + j X 1 – X 2 sin Ct
2 2 2 2
X 1 + 2X 1 X 2 + X 2 – X 1 + – 2 X 1 X 2 + X 2
Rt 4X 1 X 2
x = e --------------------- X 1 + X 2 cos Ct + j X 1 – X 2 sin Ct
4X 1 X 2
Rt X1 + X2 X1 – X2
x = e 4X 1 X 2 ------------------------
- cos Ct + j -----------------------
- sin Ct
4X 1 X 2 4X 1 X 2
Rt X1 + X2
x = e 4X 1 X 2 cos Ct + atan -------------------------
X1 – X2
Rt
x = e X 3 cos Ct + X 4 where, X3 = 4X 1 X 2
X1 + X2
frequency phase shift X 4 = atan -------------------------
X1 – X2
Figure 2.5 Example: Phase shift solution for a second-order homogeneous differential equation
37
Note: Occasionally a problem solution might consist of both a sine and cosine term with the same fre-
quency. These should normally be combined to a single term with a phase shift as shown below.
sin Y Y
------------ = --- = atan ---
cos X X
2 2
A = X +Y
The methods for solving non-homogeneous differential equations builds upon the methods used for the solution of homo-
geneous equations. This process adds a step to find the particular solution of the equation. An example of the solution of a first-
order non-homogeneous equation is shown in Figure 2.7. To find the homogeneous solution the non-homogeneous part of the
equation is set to zero. To find the particular solution the final form must be guessed. This is then substituted into the equation, and
the values of the coefficients are found. Finally the homogeneous and particular solutions are added to get the final equation. The
overall response of the system can be obtained by adding the homogeneous and particular parts. This is acceptable because the
equations are linear, and the principle of superposition applies. The homogeneous equation deals with the response to initial condi-
tions, and the particular solution deals with the response to forced inputs.
38
Generally,
Ax· + Bx = Cf t x 0 = x0
First, find the homogeneous solution as before, in Figure 2.3.
–B
---t
A
x = x e
h 0
Next, guess the particular solution by looking at the form of ‘f(t)’. This step is highly subjective, and if an
incorrect guess is made, it will be unsolvable. When this happens, just make another guess and repeat the
process. An example is given below. In the case below the guess should be similar to the exponential forc-
ing function.
24C 1 + 2C 1 = 5 5-
C 1 = -----
26
Combine the particular and homogeneous solutions.
–6
--- t
5- e + x e 2
x = x p + x h = -----
4t
26 0
The method for finding a particular solution for a second-order non-homogeneous differential equation is shown in Figure
2.8. In this example the forcing function is sinusoidal, so the particular result should also be sinusoidal. The final result is converted
into a phase shift form.
39
Generally,
x p = A sin 3t + B cos 3t
x· p = 3A cos 3t – 3B sin 3t
··
x p = – 9A sin 3t – 9B cos 3t
Substitute these into the differential equation ans solve for A and B.
– 16A – 18B sin 3t + 18A – 16B cos 3t = 2 sin 3t cos 4 + cos 3t sin 4
– 16A – 18B sin 3t + 18A – 16B cos 3t = 2 cos 4 sin 3t + 2 sin 4 cos 3t
– 16A – 18B = 2 cos 4 18A – 16B = 2 sin 4
–1
– 16 – 18 A = 2 cos 4 A = – 16 – 18 – 1.307 = – 0.0109
18 – 16 B 2 sin 4 B 18 – 16 – 1.514 0.0823
Next, rearrange the equation to phase shift form.
2 2 0.0823
xp = – 0.0109 + 0.0823 sin 3t + atan -------------------
– 0.0109
3. Use the initial conditions to determine the coefficients in the homogeneous solution.
When guessing particular solutions, the forms in Figure 2.9 can be helpful.
Forcing Function Guess
A C
Ax + B Cx + D
Ax Ax or Ax
e Ce Cxe
B sin Ax C sin Ax + D cos Ax
or B cos Ax or Cx sin Ax + xD cos Ax
An example of a second-order system is shown in Figure 2.10. As expected, it begins with a FBD and summation of
forces. This is followed with the general solution of the homogeneous equation. Real roots are assumed thus allowing the problem
solution to continue in Figure 2.11.
41
F
g
y
K K
Mg s d
My··
Ks y K d y· + F = – Mg + K y + K y· = – M ··
y
y s d
My·· + K d y· + K s y = Mg
Find the homogeneous solution.
At At 2 At
yh = e y· h = Ae ··
yh = A e
My·· + K d y· + K s y = 0
2 At At At
M A e + K d Ae + Ks e = 0
2
MA + K d A + K s = 0
2
– Kd K d – 4MK s
A = --------------------------------------------------
2M
Let us assume that the values of M, Kd and Ks lead to the case of two different positive roots. This
would occur if the damper value was much larger than the spring and mass values. Thus,
A = R 1, R 2
R1 t R2 t
yh = C1 e + C2 e
The solution continues by assuming a particular solution and calculating values for the coefficients using the initial condi-
tions in Figure 2.11. The final result is a second-order system that is overdamped, with no oscillation.
42
M 0 +K 0 + K C = Mg
d s
C = Mg
--------
K
s
Now, add the homogeneous and particular solutions and solve for the unknowns using the initial con-
ditions.
R1 t R2 t
y t = y p + y h = Mg
-------- + C 1 e + C2 e
Ks
y 0 = h y' 0 = 0
0 0
h = Mg
-------- + C 1 e + C 2 e
Ks
Mg
C 1 + C 2 = h – --------
Ks
R1 t R2 t
y' t = R 1 C 1 e + R2 C e
2
0 0
0 = R1 C1 e + R2 C e
2
–R
0 = R1 C1 + R2 C
2 C 1 = ---------2- C 2
R1
R2 Mg
– ------C 2 + C 2 = h – --------
R1 Ks
K s h – Mg –R1 – R K s h – Mg –R1
C 2 = ------------------------ ------------------
- C 1 = ---------2- ------------------------ ------------------
-
Ks R1 – R2 R1 Ks R1 – R2
Now, combine the solutions and solve for the unknowns using the initial conditions.
K s h – Mg –R1 R 1 t – R K h – Mg –R1 R2 t
s
y t = Mg
-------- + ------------------------ ------------------- e + ---------2- ------------------------ ------------------- e
Ks Ks R1 – R2 R1 Ks R1 – R2
K s h – Mg –R1 R1 t K s h – Mg R2 R2 t
y t = Mg
-------- + ------------------------ ------------------- e + ------------------------ ------------------- e
Ks Ks R1 – R2 Ks R1 – R2
Given
A sin t+ (the desired final form)
where,
B = A sin
C = A cos
To find theta,
B- = ---------------
--- A sin - = tan
C A cos
B
= atan ----
C
To find A (method #1)
B - = -----------
A = ---------- C-
sin cos
To find A, (method #2)
2 2
A = B +C
For example,
3 cos 5t + 4 sin 5t
2 2
3 + 4 sin 5t + atan 3
---
4
5 sin 5t + 0.6435
Note: Unless initial conditions are provided, normally assume that they are all zero. As a student this is
beneficial because it simplifies problem solutions. This is normally used for professional system analy-
sis to determine the reaction when a system is initially turned on. Common terms to indicate that the
conditions are zero include “the system starts at rest”, “initially the system is off”, “the system starts
undeflected”.
2.2 Responses
Solving differential equations tends to yield one of two basic equation forms. The e-to-the-negative-t forms are the first-
order responses and slowly decay over time. They never naturally oscillate, and only oscillate if forced to do so. The second-order
forms may include natural oscillation.
44
First-Order
A first-order system is described with a first-order differential equation. The response function for these systems is natural
decay or growth as shown in Figure 2.13. The time constant for the system can be found directly from the differential equation. It
is a measure of how quickly the system responds to a change. When an input to a system has changed, the system output will be
approximately 63% of the way to its final value when the elapsed time equals the time constant. The initial and final values of the
function can be determined algebraically to find the first-order response with little effort.
If we have experimental results for a system, we can calculate the time constant, initial and final values. The time constant
can be found two ways, one by extending the slope of the first (linear) part of the curve until it intersects the final value line. That
time at the intersection is the time constant. The other method is to look for the time when the output value has shifted 63.2% of the
way from the initial to final values for the system. Assuming the change started at t=0, the time at this point corresponds to the time
constant.
y0 t
– -- 1- y = f t
y· + --
y t = y1 + y0 – y1 e
y1 time constant
–1
y = y1 + y0 – y1 e
y = y 1 + y 0 – y 1 0.368
y0
y = 1 + 0 – 1 0.368
y = 0.632
t
Note: The time constant can also be found using the asymptote of the base (not the middle) of the
first order curve. In the simple proof that follows a straight line is extended from the base of the
curve to the steady state asymptote.
0 0
– --- – ---
d 1 1
y y 0 + ----- y 0 = y 0 + y 0 – y 1 – --- e = y0 + y 0 – y 1 – --- e = y1
dt
Note: Given a first order system the general form can be found knowing the input, steady state out-
put, and time constant. Consider the example below with an input of F and an output of x.
1 x ss
x· + --- x = ----------- F
F ss
The example in Figure 2.14 calculates the coefficients for a first-order differential equation given a graphical output
response to an input. The differential equation is for a permanent magnet DC motor, and will be examined in a later chapter. If we
consider the steady state when the speed is steady at 1400RPM, the first derivative will be zero. This simplifies the equation and
allows us to calculate a value for the parameter K in the differential equation. The time constant can be found by drawing two lines
over the data curve. The first line is asymptotic to the start of the motor curve, and the second line is asymptotic to the steady state
speed. The time point where the lines intersect is the time constant. This example results in an approximate time constant of 0.8 s.
This can then be used to calculate the remaining coefficient. Some additional numerical calculation leads to the final differential
equation as shown.
For the motor, use the differential equation and the speed curve when Vs=10V is applied:
1400 RPM 2
d-
---- K K
+ ------- = ------ V s
dt JR JR
1s 2s 3s
For steady-state
d- –1
---- = 0 = 1400RPM = 146.6rads
dt
2
K K
0 + ------- 146.6 = ------ 10
JR JR
K = 0.0682
1400 RPM
ª 0.8s
1s
2
K 1-
------- = ---------
JR 0.8s
K 1-
0.0682 ------ = ---------
JR 0.8s
K- = 18.328
-----
JR
· 1-
+ ------ = 18.328V s
0.8
A simple mechanical example is given in Figure 2.15. The modeling starts with a FBD and a sum of forces. After this, the
homogeneous solution is calculated without the non-homogeneous terms. Next, the particular solution is calculated using the com-
plete differential equation. The homogeneous and particular solutions are added for the overall systems response. The initial condi-
tions are used to find the remaining unknown coefficients.
46
Find the response to the applied force if the force is applied at t=0s.
Assume the system is initially deflected a height of h. F
F
y
K K
d s d
+ F = – F + K y + K ----- y = 0
y s d dt
d-
----
Ks y K y
d dt K y· + K y = F
d s
Find the homogeneous solution.
Bt Bt
y h = Ae y· h = ABe
Bt Bt
K d ABe + K s Ae = 0
Kd B + Ks = 0
–K
B = --------s-
Kd
yp = C y· p = 0
Kd 0 + Ks C = F F-
\C = -----
Ks
Combine the solutions, and find the remaining unknown.
–K
--------s-t
Kd
y t = y p + y h = Ae F-
+ -----
Ks
y 0 = h
0 F F
h = Ae + ------ \A = h – ------
Ks Ks
A first-order system tends to be passive, meaning it doesn’t deliver energy or power. A first-order system will not oscillate
unless the input forcing function is also oscillating. The output response lags the input and the delay is determined by the system’s
time constant.
47
Second-Order
A second-order system response typically contains two first-order responses, or a first-order response and a sinusoidal
component. A typical sinusoidal second-order response is shown in Figure 2.16. Notice that the coefficients of the differential
equation include a damping factor and a natural frequency. These can be used to develop the final response, given the initial condi-
tions and forcing function. Notice that the damped frequency of oscillation is the actual frequency of oscillation. The damped fre-
quency will be lower than the natural frequency when the damping factor is between 0 and 1. If the damping factor is greater than
one the damped frequency becomes negative, and the system will not oscillate because it is overdamped.
··
y ·
ny ny F t n d n –
– t
y t y ss y 0 – y ss e cos dt
y ss
y0
The phase shift represents a lag between the input action and output response. At
low frequencies this is often zero.
When only the damping factor is increased, the frequency of oscillation, and overall response time will slow, as seen in
Figure 2.17. When the damping factor is 0 the system will oscillate indefinitely. Critical damping occurs when the damping factor
is 1. At this point both roots of the differential equation are equal. The system will not oscillate if the damping factor is greater than
or equal to 1.
48
= 0
= 0.5
underdamped
1- = 0.707
= ------
2
(critical)
= 1
overdamped
»1
When observing second-order systems it is more common to use more direct measurements of the response. Some of
these measures are shown in Figure 2.18. The rise time is the time it takes to go from 10% to 90% of the total displacement, and is
comparable to a first order time constant. The settling time indicates how long it takes for the system to pass within a tolerance
band around the final value. The permissible zone shown is 2%, but if it were larger the system would have a shorter settling time.
The period of oscillation can be measured directly as the time between peaks of the oscillation; the inverse is the damped fre-
quency. (Note: don’t forget to convert to radians.) The damped frequency can also be found using the time to the first peak, as half
the period. The overshoot is the height of the first peak. Using the time to the first peak, and the overshoot the damping factor can
be found.
49
0.02 x b
0.02 x
0.9 x t where,
r ts
t r = rise time (from 10% to 90%)
x t s = settling time (to within 2-5% typ.)
b = overshoot
0.1 x t p = time to first peak
e ss = steady state error
= eqn 2.2
n
– tp
b- = e eqn 2.3
-----
x
1 eqn 2.4
= -------------------------------
2
-------- + 1
tp
Note: We can calculate these relationships using the complex homogeneous form, and the generic second
order equation form.
2 2
A +2 A+ = 0
n n
2 2 2
–2 n 4 n–4 n
A = --------------------------------------------------------------- = j
2 d
–2 n
----------------- = = – ------ eqn 2.5
2 n n = –
2 2 2
4 n–4 n
-------------------------------------- = j
2 d
2 2 2 2
4 n – 4 n = 4 –1 d
2 2 2 2 2 eqn 2.6
n– n = n 1
– =
d d
2 2
2 2
------ – ------ =
2 2 d
2 1
= ---------------------
1 d 2 eqn 2.7
------ = ------- + 1
2 2 d
------- + 1
2
The time to the first peak can be used to find the approximate decay constant
– t
x t = C1 e cos d t + C 2
b eqn 2.8
ln ------
x
= – ------------------
tp
Figure 2.19 Second order relationships between damped and natural frequency
Other Responses
First-order systems have e-to-the-t type responses. Second-order systems add another e-to-the-t response or a sinusoidal
excitation. As we move to higher order linear systems we typically add more e-to-the-t terms, and/or more sinusoidal terms. A pos-
sible higher order system response is seen in Figure 2.20. The underlying function is a first-order response that drops at the begin-
ning, but levels out. There are two sinusoidal functions superimposed, one with about one period showing, the other with a much
51
higher frequency.
The basic techniques used for solving first and second-order differential equations can be applied to higher order differen-
tial equations, although the solutions will start to become complicated for systems with much higher orders. The example in Figure
2.21 shows a fourth order differential equation. In this case the resulting homogeneous solution yields four roots. This result is two
real roots, and a complex pair. The two real roots result in e-to-the-t terms, while the complex pair results in a damped sinusoid.
The particular solution is relatively simple to find in this example because the non-homogeneous term is a constant.
d- 4
---- d 3 d 2 d
x + 13 ----- x + 34 ----- x + 42 ----- x + 20x = 5
dt dt dt dt
Guess a solution for the homogeneous equation,
At
xh = e
d- x = Ae At d- 2 2 At d- 3
----
3 At d- 4
----
4 At
---- ---- xh = A e xh = A e xh = A e
dt h dt dt dt
Substitute the values into the differential equation and find a value for the unknown.
4 At 3 At 2 At At At
A e + 13A e + 34A e + 42Ae + 20e = 0
4 3 2
A + 13A + 34A + 42A + 20 = 0
A = – 1, – 10, – 1 – j, – 1 + j
–t – 10t –t
xh = C1 e + C2 e + C 3 e cos t + C 4
xp = A d- x = 0 d- 2
---- d- 3
---- d- 4
----
---- xp = 0 xp = 0 xp = 0
dt p dt dt dt
0 + 13 0 + 34 0 + 42 0 + 20A = 5 A = 0.25
The example is continued in Figure 2.22 and Figure 2.23 where the initial conditions are used to find values for the coef-
ficients in the homogeneous solution.
52
Solve for the unknowns, assuming the system starts at rest and undeflected.
–t – 10t –t
x t = C1 e + C2 e + C 3 e cos t + C 4 + 0.25
Equations (1) and (3) can be added to get the simplified equation below.
0 = – C 1 – 10C 2 – – C 1 – C 2 – 0.25 – C 3 sin C 4
0 = – 9C 2 – C sin C + 0.25
3 4
C 3 sin C 4 = – 9C 2 + 0.25 eqn 2.12
d- 2
----
–t – 10t –t –t
x t = C 1 e + 100C 2 e + C 3 e cos t + C 4 + C 3 e sin t + C 4 +
dt h
–t –t
C 3 e sin t + C 4 – C 3 e cos t + C 4
d- 2
----
–t – 10t –t
x t = C 1 e + 100C 2 e + 2C 3 e sin t + C 4
dt h
0 = C 1 + 100C 2 + C 3 cos C 4 + C 3 sin C 4 + C 3 sin C 4 – C 3 cos C 4
0 = C 1 + 100C 2 + 2 – 9C 2 + 0.25
eqn 2.14
0 = C 1 + 82C 2 + 0.5
d- 3
----
–t – 10t –t –t
x t = – C 1 e + – 1000 C 2 e – 2C 3 e sin t + C 4 + 2C 3 e cos t + C 4
dt h
0 = – C 1 + – 1000 C 2 – 2C 3 sin C 4 + 2C 3 cos C 4 eqn 2.15
984 1
0 = – --------- C 2 – --- + 82C 2 + 0.5
3 3
984 1 1
C 1 = – --------- ------------ – --- C 1 = – 0.5555
3 1476 3
Equations (2) and (4) can be combined.
C 3 sin C 4 – 9C 2 + 0.25
---------------------------
- = ---------------------------------------
-
C 3 cos C 4 – C 1 – C 2 – 0.25
– 9 0.0006775 + 0.25
tan C 4 = ---------------------------------------------------------------------------------
- C 4 = 0.6748
– – 0.5555 – 0.0006775 – 0.25
Equation (4) can be used the find the remaining unknown.
In some cases we will have systems with multiple differential equations, or non-linear terms. In these cases explicit analy-
sis of the equations may not be feasible. In these cases we may use other techniques, such as numerical integration, which will be
covered in later chapters.
Engineers distinguish between initial setting effects (transient) and long term effects (steady-state). The transient effects
are closely related to the homogeneous solution to the differential equations and the initial conditions. The steady-state effects
occur after some period of time when the system is acting in a repeatable or non-changing form. Figure 2.24 shows a system
response. The transient effects at the beginning include a quick rise time and an overshoot. The steady-state response settles down
to a constant amplitude sine wave.
Steady-state
Transient
Note: the transient response is predicted with the homogeneous solution. The steady state
response in mainly predicted with the particular solution, although in some cases the homoge-
neous solution might have steady state effects, such as a non-decaying oscillation.
2
x· + x = 5
Note: the sources of non-lin-
earity are circled.
2
x· + x = 5
x· + log x = 5
x· + 5t x = 5
A non-linear differential equation is presented in Figure 2.26. It involves a person ejected from an aircraft with a drag
force coefficient of 0.8. (Note: This coefficient is calculated using the drag coefficient and other properties such as the speed of
sound and cross sectional area.) The FBD shows the sum of forces, and the resulting differential equation. The velocity squared
term makes the equation non-linear, and so it cannot be analyzed with the previous methods. In this case the terminal velocity is
calculated by setting the acceleration to zero. This results in a maximum speed of 126 kph.
Consider the differential equation for a 100kg human ejected from an airplane. The aerodynamic drag will
introduce a squared variable, therefore making the equation non-linear.
2 2
0.8 Ns
--------- y' 2
F y = 0.8 y· – Mg = – My··
2
m
2 2
100kgy·· + 0.8 Ns
--------- N-
y· = 100kg9.81 -----
2 kg
m
2 2
100kgy·· + 0.8 Ns
--------- y· = 981N
y 2
Mg m
2
100kgy·· + 0.8kg ---- s - y· 2 = 981kg ----
m- ------ m-
2 2 2
s m s
–1 · 2 –2
100y·· + 0.8m y = 981ms
·· –3 –1 · 2 –2
y + 8 10 m y = 9.81ms
The terminal velocity can be found be setting the acceleration to zero.
–3 –1 · 2 –2
0 + 8 10 m y = 9.81ms
–2
y· =
9.81ms -
---------------------------- = 9.81 - m 2 s – 2 = 35.0 m
----------------- ---- = 126 km
-------
–3 –1 –3 s h
8 10 m 8 10
The equation can also be solved using explicit integration, as shown in Figure 2.27. In this case the equation is separated
and rearranged to isolate the ‘v’ terms on the left, and time on the right. The term is then integrated in Figure 2.28 and Figure 2.29.
The final form of the equation is non-trivial, but contains e-to-t terms, as we would expect.
56
An explicit solution can begin by replacing the position variable with a velocity variable and rewriting the
equation as a separable differential equation.
–1 2 –2
100y·· + 0.8m y· = 981ms
–1 2 –2
100v· + 0.8m v = 981ms
dv –1 2 –2
100 ------ + 0.8m v = 981ms
dt
dv –2 –1 2
100 ------ = 981ms – 0.8m v
dt
100
---------------------------------------------------
- dv = dt
–2 –1 2
981ms – 0.8m v
100 -
--------------------
–1
– 0.8m
----------------------------------------------
- dv = dt
981 - – 2
--------------------
2
ms + v
–1
– 0.8m
– 125m
----------------------------------------------
- dv = t + C
2 2 –2 1
v – 1226.25m s
– 125m
-----------------------------------------------------------------
- dv = t + C 1
m m
v + 35.02 ---- v – 35.02 ----
s s
A B
- + -------------------------------
-------------------------------- - dv = t + C
m m 1
v + 35.02 ---- v – 35.02 ----
s s
---- + Bv + B 35.02 m
Av – A 35.02 m ---- = – 125m
s s
m
v A + B + 35.02 ---- – A + B = – 125m
s
A+B = 0 A = –B
35.02 m
---- – A + B = – 125m
s
125 - s
– – B + B = – ------------ B = – 1.785s
35.02
A = 1.785s
1.785s - + -------------------------------
-------------------------------- – 1.785s - dv = t + C
1
v + 35.02 m ---- v – 35.02 m ----
s s
The integral can then be solved using an identity from the integral table. In this case the integration con-
stants can be left off because they are redundant with the one on the right hand side.
1.785s ln v + 35.02 m
---- – 1.785s ln v – 35.02 m
---- = t + C 1
s s
v + 35.02 m ----
1.785s ln ---------------------------s- = t + C
1 –1 ln a + bx- + C
m
v – 35.02 ---- a + bx dx = -----------------------
s b
t -+C
v + 35.02 m ---- ---------------
1.785s 1
s- = e
---------------------------
v – 35.02 m ----
s
t -
---------------
v + 35.02 m ---- C 1 1.785s
s- = e e
---------------------------
v – 35.02 ---- m
s
m t -
---------------
v + 35.02 ---- 1.785s
s
---------------------------- = C 2 e
m
v – 35.02 ----
s
An initial velocity of zero can be assumed to find the value of the integration constant
m 0 -
0 + 35.02 ---- ---------------
s- = C e 1.785s 1 = C2
--------------------------- 2
m
0 – 35.02 ----
s
This can then be simplified, and the absolute value sign eliminated.
m t -
---------------
v + 35.02 ----
s- 1.785s
--------------------------- = e
m
v – 35.02 ----
s
t -
--------------- t -
---------------
m 1.785s m 1.785s
v + 35.02 ---- = ve 35.02 ---- e
s s
t
---------------- t
----------------
1.785s m 1.785s m
v 1 e = 35.02 e ---
- – 35.02 ----
s s
t -
---------------
1.785s m 1–1 1–1 0
m e –1 0 = 35.02 ---- ---------------- = ------------- = ---
v = 35.02 ---- --------------------------------- s 1 1 1 + 1 2
s t -
---------------
1.785s
1 e
t -
---------------
1.785s
m e –1
v = 35.02 ---- ----------------------------
s t
----------------
1.785s
1+e
Figure 2.29 Example: Solution of the integral and application of the initial conditions
As evident from the example, non-linear equations are involved and don’t utilize routine methods. Typically the numerical
methods discussed in the next chapter are preferred.
If our models include a device that is non-linear and we want to use a linear technique to solve the equation, we will need
to linearize the model before we can proceed. A non-linear system can be approximated with a linear equation using the following
method.
1. Pick an operating point or range for the component.
2. Find a constant value that relates a change in the input to a change in the output.
3. Develop a linear equation.
4. Use the linear equation for the analysis.
A linearized differential equation can be approximately solved using known techniques as long as the system doesn’t
travel too far from the linearized point. The example in Figure 2.30 shows the linearization of a non-linear equation about a given
59
operating point. This equation will be approximately correct as long as the first derivative doesn’t move too far from 100. When
this value does, the new velocity can be calculated.
Assume we have the non-linear differential equation below. It can be solved by linearizing the
value about the operating point
Given,
2
y· + 4y = 200 y 0 = 10
We can make the equation linear by replacing the velocity squared term with the velocity times the
actual velocity. As long as the system doesn’t vary too much from the given velocity the model
should be reasonably accurate.
y· = 200 – 4y
y· 0 = 200 – 4 10 = 12.65
12.65y· + 4y = 20
This system may now be solved as a linear differential equation. If the velocity (first derivative of
y) changes significantly, then the differential equation should be changed to reflect this.
Homogeneous:
12.65y· + 4y = 0
12.65A + 4 = 0 A = – 0.316
– 0.316t
y h = Ce
Particular:
yp = A
12.65 0 + 4A = 200 A = 50
Initial Conditions
– 0.316t
y t = Ce + 50
0
10 = Ce + 50 C = – 40
– 0.316t
y t = – 40e + 50
If the velocity (first derivative of y) changes significantly, then the differential equation should be
changed to reflect this. For example we could decide to recalculate the equation value after 0.1s.
– 0.316 0.1
y 0.1 = – 40e + 50 = 11.24
12.25y' + 4y = 20
Now recalculate the solution to the differential equation.
Homogeneous:
12.25y· + 4y = 0
12.25A + 4 = 0 A = – 0.327
– 0.327t
y h = Ce
Particular:
yp = A
12.25 0 + 4A = 200 A = 50
Initial Conditions:
– 0.327t
y t = Ce + 50
0.1
11.24 = Ce + 50 C = – 35.070575
– 0.316t
y t = – 35.07e + 50
Notice that the values have shifted slightly, and as the analysis progresses the equations will adjust
slowly. Higher accuracy can be obtained using smaller steps in time.
Changing Systems
In practical systems, the forces at work are continually changing. For example a system often experiences a static friction
force when motion is starting, but once motion starts it is replaced with a smaller kinetic friction. Another example is tension in a
cable. When in tension a cable acts as a spring. But, when in compression the force goes to zero.
Consider the example in Figure 2.32 where a mass is pulled by an elastic cable. The right hand side of the cable is being
pulled at a constant rate, while the block is free to move, only restricted by friction forces and inertia. At the beginning all compo-
nents are at rest and undeflected. The solution is done by solving for each stage of motion. At the beginning there is no tension on
the spring, hence no force. As x1 increase, so does the force. The mass remains stationary until the spring from the overcomes
static friction and the mass begins to move. The beginning of this motion requires a new differential equation, and solution. As this
type of analysis continues the end of each motion stage is used to switch to a new set of initial conditions, initial time, directions for
friction forces, and new differential equation. In simple terms, each phase of motion requires the solution of a differential equation.
Needless to say this can be very time consuming.
61
x
2 x = 0.1 m
---- t
1 s
N-
K = 1000 ---
s m
= 0.1
k M = 100kg
= 0.3
s
An FBD and equation can be developed for the system. The friction force will be left as a variable at
this point.
·· N- x = 1000 ---
N- 0.1 m
100kgx 2 + 1000 --- ---- t – F F
m 2 m s
·· FF
N -x = 1 -------
x 2 + 10 --------- N -t – --------------
-
kgm 2 kgs 100kg
–2 FF
·· m- t – --------------
-
x 2 + 10s x 2 = 1 ----
3 100kg
s
For the cable/spring in compression x1 – x2 < 0
FF
··
M = 100kg F x = – F F = Mx 2
··
Mx 2 ··
– F F = 100kgx 2
··
100kgx 2 = – F F
FF
··
x 2 = – ---------------
100kg
Figure 2.32 Example: A differential equation for a mass pulled by a springy cable
62
x
2 x = 0.1 m
---- t
1 s
N-
K = 1000 ---
s m
= 0.1
k M = 100kg
= 0.3
s
An FBD and equation can be developed for the system. The friction force will be left as a variable at
this point.
N- = 981N
N = 100kg9.81 -----
kg
static friction d- x = 0 m
---- ----
dt 2 s
FF
sN
d- x > 0 m
---- ----
kinetic friction
dt 2 s
FF = k N = 98.1N
The analysis of the system begins by assuming the system starts at rest and undeflected. In this case the
cable/spring will be undeflected with no force, and the mass will be experiencing static friction. Therefore
the block will stay in place until the cable stretches enough to overcome the static friction.
··
x2 = 0 x2 = 0 F F = 294.3N
·· –2 FF
x 2 + 10s x 2 = 1 ---- m- t – -------------- -
3 100kg
s
–2 m- t – 294.3N
0 + 10s 0 = 1 ---- -----------------
3 100kg
s
m- t = 294.3kgm
1 ---- ------------------------
3 2
s 100kgs
t = 2.943s
After motion begins the object will only experience kinetic friction, and continue to accelerate until the
cable/spring becomes loose in compression. This stage of motion requires the solution of a differential
equation. The value of time will be set equal to zero, t=0s, for this step of the motion. As a result the equa-
tion for the particular equation must be adjusted to have an offset of 2.93s. The time variable ‘t’ is given a
subscript of 2, indicating that it is the second segment of motion.
·· –2 98.1N-
m- t + 2.943s – --------------
x 2 + 10s x 2 = 1 ----
3 2 100kg
s
For the homogeneous,
·· –2
x 2 + 10s x 2 = 0
2 –2 –1
A + 10s = 0 A = 3.16js
x h = C 1 sin 3.16t 2 + C 2
For the particular,
· ··
x p = At 2 + B xp = A xp = 0
–2 98.1N-
m- t + 2.943s – --------------
0 + 10s At 2 + B = 1 ----
3 2 100kg
s
–2 m-
10s A = 1 ---- A = 0.1 m
----
3 s
s
–2 m 98.1N B = 0.1949m
10s B = 2.93 ----- – ---------------
2 100kg
s
For the initial conditions, the mass is still at zero position and velocity.
x 0s = 0m d- x 0s = 0 m
---- ----
dt s
m
x t = C sin 3.16t + C + 0.1 ---- t + 2.943s + – 0.1949 m
2 1 2 2 s 2
m
0 = C sin 3.16 0s + C + 0.1 ---- 0s + 2.943s + – 0.1949 m
1 2 s
C 1 sin C 2 = – 0.0994 s
C 1 sin C 2
- = –
--------------------------- 0.0994- = 3.146 = tan C
------------------ 2 C 2 = 1.263
C 1 cos C 2 – 0.0316
– 0.0994 - = – 0.1043
C 1 = -------------------------
sin 1.263
Finally we write the equations, and find the point where the spring becomes slack, in compres-
sion. This is done by setting the newly found equation for ‘x’ with the original spring displace-
ment. Note: units are now being removed to simplify calculation.
– 0.1
acos ---------------------------------------- + 1.263
– 0.1043 3.16
t 2 = ----------------------------------------------------------------------------- = 0.7992
3.16
There are a number of elements to the design and analysis of this system, but as usual the best place to begin is by devel-
oping a free body diagram, and a differential equation. This is done in Figure 2.38.
+ F y = F – 4K s y – 4K d y· + Mg = My··
· + 4K y· + 4K y = F + Mg F
My' d s
4K d y· 4K s y F- + g M y
··
y + ------------- + ------------ = ----
M M M
4K d y· 4K s y 1000N - sin 2 2 –2
··
y + ---------------------
- + ---------------------
- = --------------------- t + 9.81ms
10000Kg 10000Kg 10000Kg 4K s y 4K d y· Mg
·· –1 –1 –2 –2
y + 0.0004Kg K d y· + 0.0004Kg K s y = 0.1ms sin 4 t + 9.81ms
Using the differential equation, the spring values can be found by assuming the machine is at rest. This is done in Figure
2.39.
66
When the system is at rest the equation is simplified; the acceleration and velocity terms both become zero. In addi-
tion, we will assume that the cyclic force is not applied for the unloaded/loaded case. This simplifies the differential
equation by eliminating several terms.
–1 –2
0.0004Kg K y = 9.81ms
s
Now we can consider that when unloaded the spring is 0.30m long, and after loading the spring is 0.25m long. This
will result in a downward compression of 0.05m, in the positive y direction.
–1 –2
0.0004Kg K s 0.05m = 9.81ms
9.81 –2 –1
K s = -------------------------------- Kgms m
0.0004 0.05
–1
K s = 491KNm
At this point we have determined the range of motion of the mass. The remaining unknown is the damping factor. This can
be calculated by completing the particular solution of the differential equation and identifying the damped motion term of the equa-
tion. This calculation begins in Figure 2.40.
67
·· –1 –1 –1 –2 –2
y + 0.0004Kg K y· + 0.0004Kg 491KNm y = 0.1ms sin 4 t + 9.81ms
d
·· –1 –2 –2 –2
y + 0.0004Kg K y· + 196s y = 0.1ms sin 4 t + 9.81ms
d
The particular solution can now be found by guessing a value, and solving for the coefficients. (Note:
The units in the expression are uniform (i.e., the same in each term) and will be omitted for brevity.)
y = A sin 4 t + B cos 4 t + C
2 2
– 16 A sin 4 t – 16 B cos 4 t + 0.0004K d 4 A cos 4 t – 4 B sin 4 t
+ 196 A sin 4 t + B cos 4 t + C = 0.1 sin 4 t + 9.81
2
– 16 B + 0.0004K d 4 A + 196A = 0
–6
B = A 31.8 10 K d + 1.24
2
– 16 A + 0.0004K d – 4 B + 196A = 0.1
2 –3
A – 16 + 196 + B – 5.0 10 K
d = 0.1
2 –6 –3
A – 16 + 196 + A 31.8 10 K d + 1.24 – 5.0 10 K d = 0.1
0.1
A = ----------------------------------------------------------------------------------------------------------------------------------------------
2 –6 –3
– 16 + 196 + 31.8 10 K d + 1.24 – 5.0 10 K d
0.1
A = --------------------------------------------------------------------------------------------------------------
2 –9 –3
K d – 159 10 + K d – 6.2 10 + 38.1
–6
3.18 10 K – 0.124
d
B = --------------------------------------------------------------------------------------------------------------
2 –9 –3
K d – 159 10 + K d – 6.2 10 + 38.1
–2
C = 9.81ms
The particular solution can be used to find a damping factor that will give an overall oscillation of 0.02m, as shown in Fig-
ure 2.41. In this case Mathcad was used to find the solution, although it could have also been found by factoring out the algebra,
and finding the roots of the resulting polynomial.
68
In the previous particular solution the values were split into cosine and sine components. The magnitude
of oscillation can be calculated with the Pythagorean formula.
2 2
magnitude = A +B
2 –6 2
0.1 + 3.18 Þ 10 K d – 0.124
magnitude = -------------------------------------------------------------------------------------------------------------------
2 –9 –3
K d – 159 Þ 10 + K d – 6.2 Þ 10 + 38.1
The design requirements call for a maximum oscillation of 0.02m, or a magnitude of 0.01m.
2 –6 2
0.1 + 3.18 Þ 10 K d – 0.124
0.01 = -------------------------------------------------------------------------------------------------------------------
2 –9 –3
K d – 159 Þ 10 + K d – 6.2 Þ 10 + 38.1
s-
K d = 3411N --- Aside: the Mathcad solution
m
The values of the spring and damper coefficients can be used to select actual components. Some companies will design
and build their own components. Components can also be acquired by searching catalogs, or requesting custom designs from other
companies.
2.4 Summary
• First and second-order differential equations were analyzed explicitly.
• First and second-order responses were examined.
• The topic of analysis was discussed.
• A case study looked at a second-order system.
• Non-linear systems can be analyzed by making them linear.
69
Problem 2.2 Solve the following second order homogeneous differential equation given the initial condition.
··
x + 2x· + x = 0 x 0 = 1 x· 0 = 2
Problem 2.3 Solve the following second order non-homogeneous differential equation given the initial condition.
··
x + 2x· + x = 1 x 0 = 0 x· 0 = 0
5 sin 6t + 7 cos 6t
Problem 2.5 The following differential equation was derived for a mass suspended with a spring. At time 0s the system is
released and allowed to drop. It then oscillates. Solve the differential equation to find the motion as a function of
time.
+ F y = K s y – Mg = – My··
N
K s = 100 ----
m N N
100 ---- y – 1Kg 9.81 ------- = – 1Kg ··
y
m Kg
y Nm N
M = 1Kg 1 -------- ··
y + 100 ---- y = 9.81N
2 m
s
Kgm Kgm
1Kg ··
y + 100 ------------ y = 9.81 ------------
FBD: 2 2
Ks y ms s
·· –2 –2
M y + 100s y = 9.81ms
–1
y 0 = 0m y· 0 = 0ms
Mg
Problem 2.6 Find the differential equation equations using the response when a step input of Vs=12V is applied:
1800 rad/s 2
d- K K
---- + ------ = ------ V s
dt JR JR
Problem 2.7 Use the general form given below to find the final solution without solving the differential equation. Assume the
system starts at y=-20.
t
– --
y· + 10y = 5 y t = y1 + y0 – y1 e
Problem 2.8 Determine the first order differential equation given the graphical response shown below. Assume the input is a
70
step function.
x
4
t (s)
0 1 2 3 4
Problem 2.9 What are the damping coefficient and damped frequencies for the equations.
·· –2 FF
x 2 + 10s x 2 = 1 ---- m- t – --------------
-
3 100kg
s
·· FF
x 2 = – ---------------
100kg
Problem 2.10 Solve the following differential equation with the three given cases. All of the systems have a step input ‘y’ and
start undeflected and at rest.
··
x+2 · 2 initial conditions x· = 0
nx + nx = y
x = 0
y = 1
case 1: = 0.50 n = 10
case 2: = 1.0 n = 10
case 3: = 2.0 n = 10
Problem 2.11 Write the homogeneous differential equation for a second order system with the first peak at 1s and 10% over-
shoot. The system variable is ‘x’.
Problem 2.12 The second order response below was obtained experimentally. Determine the parameters of the differential
71
equation that resulted in the response assuming the input was a step function.
0.5s
1.0s
2.0
10.0
0 t (s)
Problem 2.13 A system is to be approximated with a mass-spring-damper model using the following parameters: mass 28N,
viscous damping 6Ns/m, and stiffness 36N/m. Calculate the undamped natural frequency (Hz) of the system, the
damping ratio and describe the type of response you would expect if the mass were displaced and released. What
additional damping would be required to make the system critically damped?
Mx·· + K d x· + K s x = F
Problem 2.14 Solve the differential equation below using homogeneous and particular solutions. Assume the system starts
undeflected and at rest with no acceleration.
··· ·· ·
+ 40 + 20 + 2 = 4
Problem 2.15 Solve the following differential equation with the given initial conditions and draw a sketch of the first 5 sec-
onds. The input is a step function that turns on at t=0.
·· · initial conditions
0.5V o + 0.6V o + 2.1V o = 3V i + 2 Vi = 5
Vo = 0
·
Vo = 0
Problem 2.16 A spring mass system supports a mass of 34N. If it has a spring constant of 20.6N/cm, what is the systems natu-
ral frequency?
Problem 2.17 Using a standard lumped parameter model the weight is 36N, stiffness is 2.06*10^3 N/m and damping is 100Ns/
m. What are the natural frequency (Hz) and damping ratio?
Problem 2.18 Write the differential equation for a first order system with a variable ‘x’. The system has the response shown in
72
t (s)
0 1 2 3
Problem 2.19 The mass, M, illustrated below starts at rest. It can slide across a surface, but the motion is opposed by viscous
friction (damping) with the coefficient B. Initially the system starts at rest, when a constant force, F, is applied.
Write the differential equation for the mass, and solve the differential equation. Leave the results in variable
form.
x
M F
Problem 2.20 Write a differential equation for a system that has a time constant of 2 s. For an input of 3, the steady state output
is 6.
Problem 2.21 A system is tested with a step input of F = 1N. The resulting output ‘y’ is shown in the graph below. a) Find the
differential equation for the system. b) Find the explicit response (i.e., solve the differential equation) for an input
of F=sin(t)N.
y(t)
t (s)
0
-6
0 2
Problem 2.22 Solve the following differential equation with the three given cases. All of the systems have a sinusoidal input ‘y’
73
··
x+2 · 2 initial conditions: x· = 0
nx + nx = y
x = 0
y = sin t
case 1: = 0.5 n = 10
case 2: = 1 n = 10
case 3: = 2 n = 10
Problem 2.23 Solve the following differential equation with the given initial conditions and draw a sketch of the first 5 sec-
onds. The input is a step function that turns on at t=0, and the system undeflected and at rest.
·· · initial conditions:
0.5V o + 0.6V o + 2.1V o = 3V i + 2 Vi = 5
Vo = 0
·
Vo = 1
Problem 2.24 What is the differential equation for a second-order system that responds to a step input with an overshoot of
20%, with a delay of 0.4 seconds to the first peak?
Problem 2.25 What would the displacement amplitude after 100ms for a second order system having a natural frequency of 13
rads/sec and a damping ratio of 0.20. Assume an initial displacement of 50mm, and a steady state displacement
of 0mm. The system is release from rest. (Hint: Find the response as a function of time.)
Problem 2.26 Explain with graphs how to develop first and second-order equations using experimental data.
74
Problem 2.27 Develop equations (function of time) for the first and second order responses shown below.
x (m)
5m
t (s)
0m
0.1s 0.2s 0.3s 0.4s 0.5s 0.6s 0.7s 0.8s
5m
0m
1s 3s t (s)
-10m
Problem 2.28 Find the explicit response of the following differential equation to the given step input. Assume the initial condi-
tions are all zero. (Note: u(t) simply means that the value is zero before t=0.)
···
x + 10x·· + 100x· + 1000x = 4F F t = 10u t
Problem 2.29 A mass-spring-damper system has a mass of 10 kg and a spring coefficient of 1KN/m. Select a damper coeffi-
cient so that the system will have an overshoot of 20% for a step input.
Answer 2.2
–t –t
x t = e + 3te
Answer 2.3
–t –t
x t = –e – te +1
Answer 2.4
8.602 sin 6t + 0.951
75
Answer 2.5
homogeneous: (we make a guess) At · At ·· 2 At
yh = e y h = Ae yh = A e
2 At –2 At
A e + 100s e = 0
2 –2 –1
A = – 100s A = 10 js
y h = C 1 cos 10t + C 2
–2 –2
0 + 100s A = 9.81ms
–2 –2
100s A = 9.81ms
–2
9.81ms
A = ----------------------- = 0.0981m
–2
100s
y p = 0.0981m
for y0 = 0m :
0 = C 1 cos 10 0 + 0 + 0.0981m
Answer 2.6
d- 1 1800
---- + ---------- = --------------------- V s
dt 0.15 12 0.15
Answer 2.7
– 10t
y t = 0.5 – 20.5e
76
Answer 2.8
x
= 1
t (s)
0 1 2 3 4
1
x· + --- x = A
The values at steady state will be
x· = 0 x = 4
x· + x = 4
Answer 2.9
·· –2 2
x 2 + 10s x 2 = ··
x + x· 2 n +x n
2 –2 rad
n = 10s n = 10 ---------
s
2 n = 0 = 0
2 rad
d = n 1– = n = 10 ---------
s
·· 2
x 2 = ··
x + x· 2 n +x n
2
n = 0 n = 0
2 n = 0 = 0
2
d = n 1–
=
n = 0
77
Answer 2.10
– 5t
case 1: x t = – 0.0115e cos 8.66t – 0.524 + 0.010
– 10t – 10t
case 2: x t = – 0.010e – 0.10te + 0.010
– 6 – 37.32t – 2.679t
case 3: x t = 775 10 e – 0.0108e + 0.010
Answer 2.11
··
x + 4.605x· + 15.171x = 0
78
Answer 2.12
b – tp
------ = e
x
2 – 0.5 d
----
------ = e tp
10
2
ln ------ = – 0.5
10
2
= – 2 ln ------ = 3.219
10 1
For the damped frequency: = ------------------------------
2
-------- +1
2 tp
------
d = 1s = 2
These values can be used to find the damping factor and natural frequency
3.219
= n =
-------------
n
2
d = n 1–
3.219 2
2 = ------------- 1 –
2
2 - 2 1–
------------ = --------------
3.219 2
2 1
2 1 = ------------------------------- = 0.4560
------------- + 1 = ----- 2 - 2
3.219 2 ------------ +1
3.219
3.219 3.219
n =
------------- = ---------------- = 7.059
0.4560
This leads to the final equation using the steady state value of 10
·· · 2
x+2 nx + nx = F
·· 2
x + 2 0.4560 7.059 x· + 7.059 x = F
··
x + 6.438x· + 49.83x = F
0 + 6.438 0 + 49.83 10 = F F = 498.3
··
x + 6.438x· + 49.83x = 498.3
79
Answer 2.13
Given,
s N 28N
K d = 6N ---- K s = 36 ---- M = ----------------- = 2.85kg
m m N
9.81 ------
kg
The typical transfer function for a mass-spring-damper systems is,
Kd Ks F
··
x + x· ------ + x ------ = -----
M M M
·· 2
x + x· 2 n +x n = y t
kgm
N 36 ----------
Ks 36 ---- 2
m ms –2 rad
n = ------ = ---------------- = ----------------- = 12.63s = 3.55 --------- = 0.6Hz
M 2.85kg 2.85kg s
K s
------d 6N ----
M m
= ------------ = --------------------------------------------- = 0.296
2 n rad
2 3.55 --------- 2.85kg
s
2 rad
d = n 1– = 3.39 ---------
s
If pulled and released the system would have a decaying oscillation about 0.54Hz
Answer 2.14
··· ·· ·
+ 40 + 20 + 2 = 4
Homogeneous
Particular
p t = 2.0
C 1 + C 2 + C 3 = – 2.0
2 2 2
39.495 C 1 + 0.1379 C 2 + 0.3672 C 3 = 0
In Scilab:
A = [1, 1, 1;-39.495] ; [-0.1379, -0.3672] ; [(-39.495)^2, (-0.1379)^2, (-0.3672)^2]
B = [-2 ; 0; 0]
inv(A)*B
– 6 – 39.495t – 0.1379t – 0.3672t
t = – 65.8 10 e + – 3.214 e + 1.214 e + 2.0
Answer 2.15
– 0.6t
V o t = – 8.465e sin 1.960t + 1.274 + 8.095
or
– 0.6t
V o t = – 8.465e cos 1.960t – 0.2971 + 8.095
Answer 2.18
1
x· + ------- x = 0.926F
0.9
81
Answer 2.19
B
– ----- t
– FM M F FM
x t = ------------ e – --- t + ---------
2 B 2
B B
Answer 2.20
· 1
V o + --- V o = CV i
Answer 2.21
a) y· + 0.5y = – 3F
– 0.5t
b) y t = 2.40e + 2.683 sin t – 1.107
Answer 2.22
case 1: – 5t
x t = – 0.00117e sin 8.66t – 1.061 + 0.0101 sin t – 0.101
Answer 2.23
– 0.6t
V 0 t = – 8.331e cos 1.96t – 0.238 + 8.095
Answer 2.24
··
x + 8.048x· + 77.88x = F t
Answer 2.25
– 2.6t
y t = 0.0510e cos 12.74t – 0.201
y 0.1s = 0.0188m
Answer 2.27
–t -
---------
0.18 – 0.693 t
x t = 5 1–e x t = – 10.24e cos t – 0.217
Answer 2.28
– 10t 0.040
x t = 0.040 – 0.020e – ------------- sin 10t + ---
2 4
Answer 2.29
Given,
N b
M = 10kg K s = 1000 ---- ------ = 0.2
m x
The differential equation for a mass spring damper system with known terms is,
Kd K Kd
··
y ny
·
ny
··
y ------ y· -----s- y ··
y ------ y· 100 y
M M 10
rad Kd = M
n = 100 = 10 --------- n = 20 000
s
The overshoot can be used with the approximation equations to find the damping factor.
– tp
b- = e
----- = 0.2 t p = – ln 0.2
x
1 1
= ------------------------------- = ------------------------------------------ = 0.5278
2 2
-------- + 1 – ln 0.2 +1
tp
The overshoot can be used with the approximation equations to find the damping factor.
– tp
b- = e
----- = 0.2 t p = – ln 0.2
x
Ns
K d = 20 000 = 10556 ------
m
Problem 2.31 Write a function of time for the graph. (Note: measure, using a ruler, to get values.) Find the natural frequency
83
and damping factor to develop the differential equation. Using the dashed lines determine the settling time.
2.2
y(t)
2.0
t
0
4.0 5.0
t 4 y t = 0
t 4 y t =
distributive a b + c = ab + ac
• The quadratic equation appears in almost every engineering discipline, therefore is of great importance.
2 2
ax + bx + c = 0 = a x – r 1 x – r 2 –b b – 4ac
r 1 r 2 = ---------------------------------------
2a
Problems
d) 2
x + 6 x – 6 = x + 36
e) 6
x+1 2
-------------------- = x + 2x + 1
2
x+1
Answer 2.34
ans: a) A + B- A B 1 1
------------ = ------- + ------- = --- + ---
AB AB AB B A
b) AB -
------------ cannot be simplified
A+B
c) 4 5 3
x y 2 5 3 6 15
---------------- = x y = x y
2
x
85
Problem 2.35 Rearrange the following equation so that only ‘y’ is on the left hand side.
y+x
----------- = x + 2
y+z
Answer 2.35
ans: y+x
----------- = x + 2
y+z
y+x = x+2 y+z
y + x = xy + xz + 2y + 2z
y – xy – 2y = xz + 2z – x
y – x – 1 = xz + 2z – x
xz + 2z – x
y = --------------------------
–x–1
Answer 2.36
2
ans: 2x + 8x = – 8
2
x + 4x + 4 = 0
2
x+2 = 0
x = –2 –2
Answer 2.37
2
x + 3x = – 2
2
x + 3x + 2 = 0
2
–3 3 –4 1 2 –3 9–8 –3 1
x = ------------------------------------------------- = ------------------------------ = ---------------- = – 1 – 2
2 1 2 2
86
y 1
sin = -- = -----------
r csc
x 1 r
cos = -- = -----------
r sec
y
y 1 sin
tan = -- = ----------- = ------------
x cot cos
Pythagoreans formula:
2 2 2
r = x +y
1.0
Cosine - COS
1.0
Tangent - TAN
1.0
• NOTE: Keep in mind when finding these trig values, that any value that does not lie in the right hand quadrants of Car-
tesian space, may need additions of ±90° or ±180°.
Cosine Law:
2 2 2
c = a + b – 2ab cos c
c
A
Sine Law: b
a b - c
-------------- = ------------- = --------------
sin A sin B sin C
C
B
• Now a group of trigonometric relationships will be given. These are often best used when attempting to manipulate
equations.
88
tan 1 tan 2
tan 1
-------------------------------------
2 = 1 tan tan
-
1 2
cot 1 cot 2 1
cot 1 2 = --------------------------------------
tan 2 tan 1
1--------------------
+ cos -
cos --- =
2 2
sin 1 – cos
tan --- = --------------------- = ---------------------
2 1 + cos sin
2 2
cos + sin = 1
Problems
Problem 2.38 Find all of the missing side lengths and corner angles on the two triangles below.
5 5 3
3
10°
Answer 2.39
sin x = cos x
Answer 2.40
sin x = cos x
sin x-
---------- = 1
cos x
tan x = 1
x = atan 1
x = – 135 45 225
2
cos 2
sin 2 ----------------------- + sin 2
sin 2
Answer 2.41
2
cos 2 2 2
sin 2 ----------------------- + sin 2 = cos 2 + sin 2 = 1
sin 2
90
Differentiation
d
------ C = 0
dx
d d
------ Cu = C ------ u
dx dx
d d d
------ u + v + = ------ u + ------ v +
dx dx dx
d- n
-----
n–1 d
------ u
u = nu
dx dx
d- d d
----- uv = u ------ v + v ------ u
dx dx dx
d- u--- v d u d
----- = ----- ------ u – ----- ------ v
dx v 2 dx 2 dx
v v
d d d d
------ uvw = uv ------ w + uw ------ v + vw ------ u
dx dx dx dx
d d d
------ y = ------ y ------ u = chain rule
dx du dx
d- 1
----- u = --------------
dx d
------ x
du
d-
----- y
d du
------ y = --------------
dx d-
----- x
du
91
d 1 2d d d
------ tan u = ----------- ------ u ------ csc u = – csc u cot u ------ u
dx cos u dx dx dx
d u u d
------ e = e ------ u d d
dx dx ------ sinh u = cosh u ------ u
dx dx
d- 1
----- ln x = ---
dx x d d
------ cosh u = sinh u ------ u
dx dx
d- 2d
----- tanh u = sech u ------ u
dx dx
d- d- 2
---- f x ---- f x
f----------
x dt dt
lim = lim --------------------- = lim ------------------------ =
x a g x x a ----d- x a d 2
g x ----- g x
dt dt
d- n d 0 d n d- 1
n ----- d n–1
----- uv = ------ u ------ v + u ------ v
dx dx dx 1 dx dx
d 2
n ----- d n–2 d n
n ----- d 0
- u ------ v + + - u ------ v
2 dx dx n dx dx
92
Integration
In the following expressions, u, v, and w are functions of x. in addition to this, C is a constant. and all
angles are radians.
C dx = ax + C
Cf x dx = C f x dx
u+v+w+ dx = u dx + v dx + w dx +
u dv = uv – v du = integration by parts
1
f Cx dx = ---- f u du u = Cx
C
d F u u = f x
F f x dx = F u ------ x du = ----------- du
du f' x
n+1
n x 1
x dx = -------------- + C --- dx = ln x + C
n+1 x
x
x a x x
a dx = -------- + C e dx = e + C
ln a
2 sin x cos x + x
cos x dx = ------------------------------- + C cosh x dx = sinh x + C
2
2
3 cos x sin x + 2
sin x dx = – -------------------------------------------- + C tanh x dx = ln cosh x + C
3
2
3 sin x cos x + 2
cos x dx = -------------------------------------------- + C
3
cos ax x
x cos ax dx = ------------------- + --- sin ax + C
2 a
a
2 2
2 2x cos ax a x –2
x cos ax dx = -------------------------- + -------------------- sin ax + C
2 3
a a
93
n+1
n x
x dx = -------------- + C
n+1
–1 ln a + bx
a + bx dx = ----------------------- + C
b
2 –1 1 a + 2 –b
a + bx dx = ---------------------- ln --------------------------- + C a 0 b 0
2 –b a a – x –b
2
2 –1 ln bx + a
x a + bx dx = ---------------------------- + C
2b
2 2 –1 x a x ab
x a + bx dx = --- – ------------- atan ------------- + C
b b ab a
2 2 –1 1 a+x 2 2
a –x dx = ------ ln ------------ + C a x
2a a–x
–1 1
ax + b dx = --- ln ax + b + C
a
1
– ---
2 2 2 2 2
x x a dx = x a +C
2 –1 1 2 b
a + bx + cx dx = ------ ln a + bx + cx + x c + ---------- + C c 0
c 2 c
2 –1 1 – 2cx – b
a + bx + cx dx = ---------- asin ------------------------- + C c 0
–c 2
b – 4ac
94
1--- 3---
22 2
a + bx dx = ------ a + bx
3b
1--- 3---
22 2
a + bx dx = ------ a + bx
3b
3---
1---
2
2 2a – 3bx a + bx
2
x a + bx dx = – -----------------------------------------------------
2
15b
1---
1 2 2
ln x + ----- + x
1---
2
1--- 2 2 2 a
x 1+a x + ----------------------------------------------
2 2 2 a
1 + a x dx = -------------------------------------------------------------------------------------
2
3---
1--- 1 2 2
a ----- + x
2
2 2 2 a
x 1+a x dx = ------------------------------ 1---
3
1 2 2
1--- 3--- 1--- ln x + ----- + x
2
2 2 2 2 ax 1 2 2 8 2 2 2 a
x 1 + a x dx = -----
- ----- + x – --------- x 1 + a x – ----------------------------------------------
4 2 2 3
a 8a 8a
1--- 1---
2 2 2 1 2 2 2 asin ax
1–a x dx = --- x 1 – a x + ---------------------
2 a
1--- 3---
2 2 2 a 1 2 2
x 1–a x dx = – --- ----- – x
3 2
a
1--- 3--- 1---
2 2 2 2 x 2 2 2 1 2 2 2 2 x
x a –x dx = – --- a – x + --- x a – x + a asin ---
4 8 a
1 1---
– ---
2 2 2 1 1 2 2
1+a x dx = --- ln x + ----- + x
a 2
a
1
– ---
2 2 2 1 1
1–a x dx = --- asin ax = – --- acos ax
a a
Problems
Problem 2.42 Find the derivative of the function below with respect to time.
3t 2t
------------------ + e
2
2+t
Answer 2.42
d 3t 2t d –2 d 2t –2 –3 2t
----- ------------------ + e = ----- 3t 2 + t + ----- e = 3 2+t – 6t 2 + t + 2e
dt 2 dt dt
2+t
d –2
b) ----- t + 2
dt
d 8t
c) ----- 5te
dt
d-
----
d) 5 ln t
dt
Answer 2.43
a) d- d d
---- sin t + cos t = ----- sin t + ----- cos t = cos t – sin t
dt dt dt
d- –2 –3
b) ---- t+2 = –2 t + 2
dt
d-
----
8t 8t 8t
c) 5te = 5e + 40te
dt
d) d- 5
---- 5 ln t = ---
dt t
b) 7t
14 e dt
c) sin 0.5t dt
d) 5
--- dx
x
96
Answer 2.44
3
a) 2 t 3
6 t dt = 6 ---- = 2t + C
3
7t
b) 7t e 7t
14 e dt = 14 ------- + C = 2e + C
7
– cos 0.5t
c) sin 0.5t dt = -------------------------- + C = – 2 cos 0.5t + C
0.5
d) 5
--- dx = 5 ln x + C
x
b) d- – t
---- e sin 2t – 4
dt
Answer 2.46
d 1 –1
a) ------ ------------ = -------------------
dx x + 1 2
x+1
b) d –t –t –t
----- e sin 2t – 4 = – e sin 2t – 4 + 2e cos 2t – 4
dt
Answer 2.47
2t 2t
a) e dt = 0.5e +C
1
b) sin + cos 3 d = – cos + --- sin 3 + C
3
x· + 5x = 0 x 0 = 4
97
Answer 2.48
x· + 5x = 0 x 0 = 4
Homogeneous:
At
x h = Ce
At At
CAe + 5 Ce = 0 A = –5
– 5t
x h = Ce
Initial Conditions:
– 5t
x t = Ce + no particular solution
–5 0
x 0 = Ce = 4 C = 4
– 5t
x t = 4e
Problem 2.49 Find the homogeneous solution for x’’ + 4x’ + 20x = 0
··
x + 4x· + 20x = 0
Answer 2.49
··
x + 4x· + 20x = 0
Homogeneous:
At
x h = Ce
2 At At At
CA e + 4CAe + 20Ce = 0
2 A = –2 4j
A + 4A + 20 = 0
– 2t
xh = C1 e sin 4t + C 2
98
99
3. Numerical Analysis
Topic 3.1 State variable form for differential equations.
Topic 3.2 Numerical integration with software and calculators.
Topic 3.3 Numerical integration theory: first-order, Taylor series and Runge-Kutta.
Topic 3.4 Using tabular data.
Topic 3.5 A design case.
Objective 3.1 To be able to solve systems of differential equations using numerical methods.
For engineering analysis it is always preferable to develop explicit equations that include symbols, but this is not always
practical. In cases where the equations are too costly to develop, numerical methods can be used. As their name suggests, numeri-
cal methods use numerical calculations (i.e., numbers not symbols) to develop a unique solution to a differential equation. The
solution is often in the form of a set of numbers, or a graph. This can then be used to analyze a particular design case. The solution
is often returned quickly so that trial and error design techniques may be used. But, without a symbolic equation the system can be
harder to understand and manipulate.
This chapter focuses on techniques that can be used for numerically integrating systems of differential equations.
d-
---- state variable equation
x = Ax + Bu
dt
y = Cx + Du output equation
where,
At any time a system can be said to have a state. Consider a car for example, the state of the car is described by its position
and velocity. Factors that are useful when identifying state variables are:
100
Given the FBD shown below, the differential equation for the system is,
F K d x·
M +
F x = – F – K d x· – K s x = Mx··
Ks x
x – F – K d x· – K s x = Mx··
M ··
x
The equation is second-order, so two state variables will be needed. One obvious choice for a state vari-
able in this equation is ‘x’. The other choice can be the velocity, ‘v’. Equation (1) defines the velocity
variable. The velocity variable can then be substituted into the differential equation for the system to
reduce it to first-order.
x· = v eqn 3.1
Mx·· = – F – K d x· – K s x
Mv· = – F – K d v – K s x
–K –K
s d –F eqn 3.2
v· = x --------- + v --------- + ------
M M M
equation 3.1 and equation 3.2 can also be put into a matrix form similar to that given in Figure 3.1.
0 1 0
d- x =
---- x +
–K –K –------
F
dt v --------s- ---------
d v
M
M M
Note: To have a set of differential equations that is solvable, there must be the same number of state
equations as variables. If there are too few equations, then an additional equation must be devel-
oped using an unexploited relationship. If there are too many equations, a redundancy or over con-
straint must be eliminated.
Consider the two cart problem in Figure 3.3. The carts are separated from each other and the wall by springs, and a force
is applied to the left hand side. Free body diagrams are developed for each of the carts, and differential equations developed. For
each cart a velocity state variable is created. The equations are then manipulated to convert the second-order differential equations
to first-order state equations. The four resulting equations are then put into the state variable matrix form.
101
x1 x2
F K s1 K s2
M1 M2
··
F K s1 x 1 – x 2 + F x = F – K s1 x 1 – x 2 = M 1 x 1
M1 ··
·· M 1 x 1 + K s1 x 1 – K s1 x 2 = F
M x · eqn 3.3
1 1 x1 = v1
·
M 1 v 1 + K s1 x 1 – K s1 x 2 = F
· F- – K
v 1 = ------- s1 + K
---------x s1
---------x
1 eqn 3.4
M1 M1 M1 2
+ ··
K s1 x 1 – x 2 K s2 x 2 F x = K s1 x 1 – x 2 – K s2 x 2 = M2 x2
M2 ··
M 2 x 2 + K s1 + K s2 x 2 – K s1 x 1 = 0
·· ·
M x x2 = v2
2 2 eqn 3.5
·
M 2 v 2 + K s1 + K s2 x 2 – K s1 x 1 = 0
· K s1 K s1 + K s2
v 2 = ---------x – -------------------------- x eqn 3.6
M2 1 M2 2
The state equations can now be combined in a matrix form.
0 1 0 0
x1 – K s1 K s1 x1 0
------------- 0 --------- 0 F-
d- 1 = M 1
----
v M1 v1 -------
+ M1
dt x 0 0 0 1 x2
2 0
v2 K s1 – K s1 – K s2 v
--------- 0 ----------------------------
- 0 2 0
M2 M2
In some cases we will develop differential equations that cannot be directly reduced because they have more than one
term at the highest order. For example, if a second-order differential equation has two second derivatives it cannot be converted to
a state equation in the normal manner. In this case the two high order derivatives can be replaced with a dummy variable. In
mechanical systems this often happens when masses are neglected. Consider the example problem in Figure 3.4, both ‘y’ and ‘u’
are first derivatives. To solve this problem, the highest order terms (‘y’ and ‘u’) are moved to the left of the equation. A dummy
variable, ‘q’, is then created to replace these two variables with a single variable. This also creates an output equation as shown in
Figure 3.1.
102
3y· + 2y = 5u·
Step 1: put both the first-order derivatives on the left hand side,
3y· – 5u· = – 2y
Figure 3.4 Using dummy variables for multiple high order terms
At other times it is possible to eliminate redundant terms through algebraic manipulation, as shown in Figure 3.5. In this
case the force on both sides of the damper is the same, so it is substituted into the equation for the cart. But, the effects on the
damper must also be integrated, so a dummy variable is created for the integration. An output equation was created to calculate the
value for x1.
103
x1
x2
F Kd
M
· ·
F Kd x1 – x2
+ · ·
Fx = F – Kd x1 – x2 = 0
· · eqn 3.7
Kd x1 – x2 = F
q = x1 – x2
K d q· = F
F-
q· = ------ eqn 3.8
Kd
x1 = x2 + q eqn 3.9
· · · · ··
Kd x1 – x2 + F x = K d x 1 – x 2 = Mx 2
M
··
F = Mx 2
··
Mx ·
2 x2 = v2 eqn 3.10
· F- eqn 3.11
v 2 = ----
M
The state equations (2, 4, 5) can be put in matrix form. The output equation (2) can also be put in matrix
form.
F-
------
q 000 q Kd q
d x x
----- 2 = 0 0 1 2 +
0 x1 = 1 1 0 x2 + 0
dt
v2 0 0 0 v2 F- v2
----
M
Numerical Integration
Numerical solutions can be developed with hand calculations, but this is a very time consuming task. In this section we
will explore some common tools for solving state variable equations. The analysis process follows the basic steps listed below.
1. Generate the differential equations to model the process.
2. Select the state variables.
3. Rearrange the equations to state variable form.
4. Add additional equations as required.
5. Enter the equations into a computer or calculator and solve.
An example in Figure 3.6 shows the first four steps for a mass-spring-damper combination. The FBD is used to develop
the differential equations for the system. The state variables are then selected, in this case the position, y, and velocity, v, of the
block. The equations are then rearranged into state equations. The state equations are also put into matrix form, although this is not
always necessary. At this point the equations are ready for solution.
KS Kd Ks y K d y·
d d 2
F y = – F – K d ----- y – K s y = M ----- y
M dt dt
y
M F d d 2
M ··
y F + K d ----- y + K s y + M ----- y = 0
dt dt
F
Step 2: We need to identify state variables. In this case the height is clearly a defining variable. We will also need
to use the vertical velocity, because the acceleration is a second derivative (we can only have first derivatives).
Using the height, y, and velocity, v, as state variables we may now proceed to rewriting the equations. (Note: this
is just an algebraic trick, but essential when setting up these matrices.)
Step 3:
d-
---- y = v
dt
d- – F – Kd v – Ks y
---- v = ---------------------------------------
-
dt M
Step 4: We put the equations into a state variable matrix form.
d-
---- y 0 1
dt F-
= – K – K y + 0 ----
S d
---------- ---------- v –1 M
d-
---- v M M
dt
Figure 3.7 shows the method for solving state equations on a TI-86 graphing calculator. (Note: this also works on other
TI-8x calculators with minor modifications.) In the example a sinusoidal input force, F, is used to make the solution more interest-
ing. The next step is to put the equation in the form expected by the calculator. When solving with the TI calculator the state vari-
ables must be replaced with the predefined names Q1, Q2, etc. The steps that follow describe the button sequences required to enter
and analyze the equations. The result is a graph that shows the solution of the equation. Points can then be taken from the graph
105
using the cursors. (Note: large solutions can sometimes take a few minutes to solve.)
First, we select some parameter values for the equations of Figure 3.6. The input force will be a decaying
sine wave.
d-
---- y = vy
dt
d- – F – Kd vy – Ks y – 0.5t
---- v y = ------------------------------------------ = – 4e sin t – 2v y – 5y
dt M
Next, the calculator requires that the state variables be Q1, Q2, ..., Q9, so we replace y with Q1 and v with
Q2.
Q1' = Q2
– 0.5t
Q2' = – 4e sin t – 2Q2 – 5Q1
Now, we enter the equations into the calculator and solve. To do this roughly follow the steps below.
Look at the calculator manual for additional details.
1. Put the calculator in differential equation mode [2nd][MODE][DifEq][ENTER]
2. Go to graph mode and enter the equations above [GRAPH][F1]
3. Set up the axis for the graph [GRAPH][F2] so that time and the x-axis is from 0 to 10
with a time step of 0.5, and the y height is from +3 to -3.
4. Enter the initial conditions for the system [GRAPH][F3] as Q1=0, Q2=0
5. Set the axis [GRAPH][F4] as x=t and y=Q
6. (TI-86 only) Set up the format [GRAPH][MORE][F1][FldOff][ENTER]
7. Draw the graph [GRAPH][F5]
8. Find points on the graph [GRAPH][MORE][F4]. Move the left/right cursor to move
along the trace, use the up/down cursor to move between traces.
First, we select some parameter values for the equations of Figure 3.6. The input force will be a decaying
sine wave.
d-
---- y = vy
dt
d- – F – Kd vy – Ks y – 0.5t
---- v y = ------------------------------------------ = – 4e sin t – 2v y – 5y
dt M
Next, the calculator requires that the state variables be Q1, Q2, ..., Q9, so we replace y with Q1 and v with
Q2.
Q1' = Q2
– 0.5t
Q2' = – 4e sin t – 2Q2 – 5Q1
Now, we enter the equations into the calculator and solve. To do this roughly follow the steps below. Look
at the calculator manual for additional details.
1. Put the calculator in differential equation mode [2nd][MODE][DifEq][ENTER]
2. Enter the initial conditions for the system [GRAPH][F3] as Q1=0, Q2=0
3. Set up the format [GRAPH][MORE][F1][FldOff][ENTER]
4. Go to graph mode and enter the equations above [GRAPH][F1]
5. Set up the axis for the graph [GRAPH][F2] so that time and the x-axis is from 0 to 10
with a time step of 0.5, and the y height is from +3 to -3.
6. Set the axis [GRAPH][F4] as x=t and y=Q
7. Draw the graph [GRAPH][F5]
8. Find points on the graph [GRAPH][MORE][F4]. Move the left/right cursor to move
along the trace, use the up/down cursor to move between traces.
State equations can also be solved in Mathcad using built-in functions, as shown in Figure 3.9. The first step is to enter the
state equations as a function, ‘D(t, Q)’, where ‘t’ is the time and ‘Q’ is the state variable vector. (Note: the equations are in a vector,
but it is not the matrix form.) The state variables in the vector ‘Q’ replace the original state variables in the equations. The ‘rkfixed’
function is then used to obtain a solution. The arguments for the function, in sequence are; the state vector, the start time, the end
time, the number of steps, and the state equation function. In this case the 10 second time interval is divided into 100 parts each
0.1s in duration. This time is chosen because of the general response time for the system. If the time step is too large the solution
may become unstable and go to infinity. A time step that is too small will increase the computation time marginally. When in doubt,
run the calculator again using a smaller time step.
107
Note: Notice that for the TI calculators the variables start at Q1, while in Mathcad the arrays start at Q0.
Many students encounter problems because they forget this.
Numerical Integration
The simplest form of numerical integration is Euler’s first-order method. Given the current value of a function and the
first derivative, we can estimate the function value a short time later, as shown in Figure 3.10. (Note: Recall that the state equations
allow us to calculate first-order derivatives.) The equation shown is known as Euler’s equation. Basically, using a known position
and first derivative we can calculate an approximate value a short time, h, later. Notice that the function being integrated curves
downward, creating an error between the actual and estimated values at time ‘t+h’. If the time step, h, were smaller, the error would
decrease.
108
y t+h
d d
----- y t y t+h y t + h ----- y t
dt dt
y t
Note: here the h value is the time step between
integrations points. A smaller time step will
increase the accuracy.
t t+h
The example in Figure 3.11 shows the solution of Newton’s equation using Euler’s method. In this example we are deter-
mining velocity by integrating the acceleration caused by a force. The acceleration is put directly into Euler’s equation. This is then
used to calculate values iteratively in the table. Notice that the values start before zero so that initial conditions can be used. If the
system was second-order we would need two previous values for the calculations.
d-
---- F-
v = ---- first rearrange equation
dt M
d
v t + h = v t + h ----- v t put this in the Euler equation
dt
F t
v t + h = v t + h ---------- finally substitute in known terms
M
We can now use the equation to estimate the system response. We will assume that the system is ini-
tially at rest and that a force of 1N will be applied to the 1kg mass for 4 seconds. After this time the
force will rise to 2N. A time step of 2 seconds will be used.
-1 -2 0 0 0
0 0 1 1 0
1 2 1 1 2
2 4 2 2 4
3 6 2 2 8
4 8 2 2 12
5 10 2 2 16
6 12 2 2 20
7 14 2 etc etc
8 16 2
An example of solving the previous example with a traditional programming language is shown in Figure 3.12. In this
example the results will be written to a text file ‘[Link]’. The solution iteratively integrates from 0 to 10 seconds with time steps of
109
0.1s. The force value is varied over the time period with ‘if’ statements. The integration is done with a separate function.
int main(){
double h = 0.1,
M = 1.0,
F;
FILE *fp;
double v,
t;
if( ( fp = fopen("[Link]", "w")) != NULL){
v = 0.0;
for( t = 0.0; t < 10.0; t += h ){
if((t >= 0.0) && (t < 4.0)) F = 1.0;
if(t >= 4.0) F = 2.0;
v = step(v, h, F/M);
fprintf(fp, "%f, %f, %f, %f\n", t, v,
F, M);
}
}
fclose(fp);
}
Figure 3.13 Example: Solving state variable equations with a Java program
The program in Figure 3.14 is for Scilab (a Matlab clone). The state variable function is defined first. This is followed by
a definition of the parameters to be used for the numerical integration. Finally the function is solved explicitly (with the exact func-
tion).
//
// first_order.sce
//
// A first order integration of an accelerating mass
//
// To run this in Scilab use 'File' then 'Exec'.
//
// by: H. Jack Sept., 16, 2002
//
x0 = 8; // initial conditions
v0 = 12;
X=[x0, v0];
// Set the time length and step size for the integration
steps = 100;
t_start = 1;
t_end = 100;
h = (t_end - t_start) / steps;
//
// Loop for integration
//
for i=1:steps,
X = [X ; X($,:) + h*f(X, i*h)];
end
printf("The value at the end of first order integration is (x, v) = (%f, %f)\n", ...
X($,1), ...
X($,2));
//
// Explicit equation
//
function x=position(x0, v0, a0, t)
x = (0.5 * a0 * t^2) + (v0 * t) + x0;
endfunction
//
// The results should be
// first order integration = (49710, 1002)
// explicit = (51208, 1012)
//
// The difference is 1498 for position and 10 for velocity. This is relatively small, but
// shows a clear case of the innacuracy of the numerical solutions.
//
// Note: increasing the number of steps increases the accuracy
//
Taylor Series
First-order integration works well with smooth functions. But, when a highly curved function is encountered we can use a
higher order integration equation. The Taylor series equation shown in Figure 3.16 for approximating a function. Notice that the
first part of the equation is identical to Euler’s equation, but the higher order terms add accuracy.
d 1 2 d 2 1 3 d 3 1 4 d 4
x t + h = x t + h ----- x t + ----- h ----- x t + ----- h ----- x t + ----- h ----- x t +
dt 2! dt 3! dt 4! dt
An example of the application of the Taylor series is shown in Figure 3.17. Given the differential equation, we must first
determine the derivatives and substitute these into Taylor’s equation. The resulting equation is then used to iteratively calculate val-
ues.
112
Given, – 20t 3
x· – x = 1 + e +t
We can write,
d- – 20t 3
---- x = 1+e +t +x
dt
d- 2
----
– 20t 2
x = –e + 3t
dt
d- 3
----
– 20t
x = e + 6t
dt
In Taylor series form this becomes,
– 20t 3 1- h 2 – e – t + 3t2 + ----
1- h 3 e – t + 6t
x t+h = x t +h 1+e + t + x + ----
2! 3!
Thus,
x0 = 0 t (s) x(t)
h = 0.1 0 0
0.1 0
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
Recall that the state variable equations are first-order equations. But, to obtain accuracy the Taylor method also requires
higher order derivatives, thus making is unsuitable for use with state variable equations.
Runge-Kutta Integration
First-order integration provides reasonable solutions to differential equations. That accuracy can be improved by using
higher order derivatives to compensate for function curvature. The Runge-Kutta technique uses first-order differential equations
(such as state equations) to estimate the higher order derivatives, thus providing higher accuracy without requiring other than first-
order differential equations.
The equations in Figure 3.18 are for fourth order Runge-Kutta integration. The function ‘f()’ is the state equation or state
equation vector. For each time step the values ‘F1’ to ‘F4’ are calculated in sequence and then used in the final equation to find the
next value. The ‘F1’ to ‘F4’ values are calculated at different time steps, and values from previous time steps are used to ‘tweak’
the estimates of the later states. The final summation equation has a remote similarity to the first order integration equation. Notice
that the two central values in time are more heavily weighted.
113
F 1 = hf t, x
Note: in this case the state equation function
F
F 2 = hf t + h---, x + ------1
f(t, x) includes the state variables, x, and
2 2 time, t. However, in simpler systems the state
equations may not include time and it could
F
F 3 = hf t + h---, x + ------2
be replaced with f(x).
2 2
F 4 = hf t + h, x + F 3
x t + h = x t + 1--- F 1 + 2F 2 + 2F 3 + F 4
6
where,
x = the state variables
f = the differential function or (d/dt) x
t = current point in time
h = the time step to the next integration point
An example of a Runge-Kutta integration calculation is shown in Figure 3.19. The solution begins by putting the state
equations in matrix form and defining initial conditions. After this, the four integrating factors are calculated. Finally, these are
combined to get the final value after one time step. The number of calculations for a single time step should make obvious the
necessity of computers and calculators.
114
d- x = v
---- y = 2 (assumed input)
dt
v = 1
d- v = 3 + 4v + 5y 0
----
dt x0 = 3
d- x = 0 1 x + 0 0 y
---- h = 0.1
dt v 0 4 v 5 3 1
3 + 0.1
-------
F 2 = 0.1 0 1 2 + 0 0 2 = 0.185
0 4 1 + 1.7
------- 5 3 1 2.04
2
3 + 0.185
-------------
F 3 = 0.1 0 1 2 + 0 0 2 = 0.202
04 2.04
1 + ---------- 5 3 1 2.108
2
xi + 1 xi
= +1
--- F 1 + 2F 2 + 2F 3 + F 4
vi + 1 vi 6
xi + 1
= 3 +1
--- 0.1 + 2 0.185 + 2 0.202 + 0.3108 = 3.1974667
vi + 1 1 6 1.7 2.04 2.108 2.5432 3.0898667
The program in Figure 3.20 and Figure 3.22 is used to perform a Runge-Kutta integration of a mass-spring-damper sys-
tem. The ‘main’ program loops through the time steps and writes the value to a file. The ‘step’ function performs one time step
integration for a second order Runge-Kutta integration. It uses the functions ‘add’ and ‘multiply’ to manipulate the state matrix.
The ‘derivative’ function updates the state matrix with the new derivative values.
115
int main(){
FILE *fp;
double h = 0.001;
double t;
int j = 0;
/* First order integration done here (could be replaced with runge kutta)*/
void step(double t, double h, double X[]){
double tmp[SIZE],
dX[SIZE],
F1[SIZE],
F2[SIZE],
F3[SIZE],
F4[SIZE];
/* Calculate F1 */
derivative(t, X, dX);
multiply(h, dX, F1);
/* Calculate F2 */
multiply(0.5, F1, tmp);
add(X, tmp, tmp);
derivative(t+h/2.0, tmp, dX);
multiply(h, dX, F2);
/* Calculate F3 */
multiply(0.5, F2, tmp);
add(X, tmp, tmp);
derivative(t+h/2.0, tmp, dX);
multiply(h, dX, F3);
/* Calculate F4 */
add(X, F3, tmp);
derivative(t+h, tmp, dX);
multiply(h, dX, F4);
// runge_kutta.sce
// A first order integration of an accelerating mass
// To run this in Scilab use 'File' then 'Exec'.
// by: H. Jack Sept., 15, 2003
x0 = 8; // initial conditions
v0 = 12;
X=[x0, v0];
// Set the time length and step size for the integration
steps = 1000;
t_start = 0;
t_end = 100;
h = (t_end - t_start) / steps;
t = [t_start];
Steady-State Response
The state equations can be used to determine the steady-state response of a system by setting the derivatives to zero, and
then solving the equations. Consider the example in Figure 3.23. The solution begins with a state variable matrix. (Note: this can
also be done without the matrix also.) The derivatives on the left hand side are set to zero, and the equations are rearranged and
solved with Cramer’s rule.
0 1 0 0
F- K d F-
Ks F
– – -------
---- ---- – ------ – -----
M M M F- M M 0 - = 0
x = ------------------------------ = ------------ = ------ v = ------------------------------ = -----------
Ks KS Ks
0 1 ------ 0 1 ------
Ks Kd M Ks Kd M
– ------ – ------- – ------ – -------
M M M M
y t
yi + 1
yi
yi – 1
ti – 1 T T
ti ti + 1
ti yi + yi – 1
y t i dt ------------------------- t – t
i i – 1 = T
--- y i + y i – 1
ti – 1 2 2
yi – yi – 1 yi + 1 – yi
d- - = --1- y – y
---- y t ------------------------ = ------------------------ = --1- y i + 1 – y i
dt i ti – ti – 1 ti + 1 – ti T i i – 1 T
--1- y i + 1 – y i – --1- y i – y i – 1 –2 yi + yi – 1 + yi + 1
d- 2
---- T T
y ti ------------------------------------------------------------------------ = ----------------------------------------------------
-
dt T 2
T
An example of numerical integration using Scilab is given in Figure 3.25 and Figure 3.26.
//
// [Link]
//
// A simple program to integrate a function
//
// To run this in Scilab use 'File' then 'Exec'.
//
// by: H. Jack Sept., 9, 2002
//
//
// Loop for rectangular integration
//
total = 0; // set the initial sum to zero
for i=0:steps,
x = x_start + i * x_delta;
total = total + f(x);
end
total = total * x_delta;
printf("Rectangular integration value %f\n", total);
//
// Loop for Simpson's rule integration
//
total = 0; // set the initial sum to zero
even = 0;
for i=0:steps,
x = x_start + i * x_delta;
if i == 0 then
total = total + f(x);
elseif i == steps then
total = total + f(x);
else
even = even + 1;
if even > 1 then
total = total + 4 * f(x);
even = 0;
else
total = total + 2 * f(x);
end
end
end
total = total * x_delta / 3;
printf("Simpsons rule integration value %f\n", total);
Switching Functions
When analyzing a system, we may need to choose an input that is more complex than inputs such as steps, ramps, sinu-
soids and parabolas. The easiest way to do this is to use switching functions. Switching functions turn on (have a value of 1) when
their arguments are greater than or equal to zero, or off (a value of 0) when the argument is negative. Examples of the use of switch-
ing functions are shown in Figure 3.27. By changing the values of the arguments we can change when a function turns on or off.
122
u t
1
t
u –t
1
t
u t–1
1
t
1
u t+1
1 t
-1
u t+1 –u t–1
1 t
-1 1
Figure 3.27 Example: Switching functions
Switching functions can be multiplied with other functions to create a complex function by turning parts of the function
on or off. An example of a curve created with switching functions is shown in Figure 3.28.
f(t)
5
t (s)
0 1 3 4
f t = 5t u t – u t – 1 +5 u t–1 –u t–3 + 20 – 5t u t – 3 – u t – 4
or
f t = 5tu t – 5 t – 1 u t – 1 – 5 t – 3 u t – 3 + 5 t – 4 u t – 4
The unit step switching function is available in Mathcad and makes creation of complex functions relatively trivial. Step
functions are also easy to implement when writing computer programs, as shown in Figure 3.29.
123
f = 5.0 * t * u(t)
- 5.0 * (t - 1.0) * u(t - 1.0)
- 5.0 * (t - 3.0) * u(t - 3.0)
+ 5.0 * (t - 4.0) * u(t - 4.0);
return f;
}
In some cases we are given tables of numbers instead of equations for a system component. These can still be used to do
numerical integration by calculating coefficient values as required, in place of an equation.
Tabular data consists of separate data points as seen in Figure 3.30. But, we may need values between the data points. A
simple method for finding intermediate values is to interpolate with the ‘lever law’. (Note: it is called this because of its’ similarity
to the equation for a lever.) The table in the example only gives flow rates for a valve at 10 degree intervals, but we want flow rates
at 46 and 23 degrees. A simple application of the lever law gives approximate values for the flow rates.
0 0
10 0.1 Given a valve angle of 46 degrees, the flow rate is,
20 0.4 46 – 40
30 1.2 Q = 2.0 + 2.3 – 2.0 ------------------ = 2.18
50 – 40
40 2.0
50 2.3
60 2.4 Given a valve angle of 23 degrees, the flow rate is,
70 2.4
23 – 20
80 2.4 Q = 0.4 + 1.2 – 0.4 ------------------ = 0.64
90 2.4 30 – 20
Figure 3.30 Example: Using tables of values to interpolate numerical values using the lever law
The subroutine in Figure 3.31 was written to return the numerical value for the data table in Figure 3.30. In the subroutine
the tabular data is examined to find the interval that the flow rate value falls inside. Once this is found the valve angle is calculated
as the ratio between the two known values.
124
#define SIZE 10
double data[SIZE][2] = {{0.0, 0.0},
{10.0, 0.1},
{20.0, 0.4},
{30.0, 1.2},
{40.0, 2.0},
{50.0, 2.3},
{60.0, 2.4},
{70.0, 2.4},
{80.0, 2.4},
{90.0, 2.4}};
When greater accuracy is required, smooth curves can be fitted to interpolate points. These curves are known as splines.
There are multiple methods for creating splines, but the simplest is to use a polynomial fitted to a set of points.
The example in Figure 3.32 shows a spline curve being fitted for three data points. In this case a second order polynomial
is used. The three data points are written out as equations, and then put into matrix form, using the coefficients as the unknown val-
ues. The matrix is then solved to obtain the coefficient values for the final equation. This equation can then be used to build a math-
ematical model of the system.
125
The data points below might have been measured for the horsepower of an internal combustion
engine on a dynamometer.
S (RPM) P (HP)
1000 105
4000 205
6000 110
In this case there are three data points, so we can fit the curve with a second (3-1) order polynomial.
The major task is to calculate the coefficients so that the curve passes through all of the given
points.
–8 –7 –7
A 6.667x10 – 1.667x10 1.000x10 105
B = –4 –3 – 4 205
– 6.667x10 1.167x10 – 5.000x10
C 110
1.600 – 1.000 0.400
A –5
– 1.617x10
B =
0.114
C 7.000
–5 2
P S = – 1.617x10 S + 0.114S + 7.000
The order of the polynomial should match the number of points. Although, as the number of points increases, the shape of
the curve will become less smooth. A common way for dealing with this problem is to fit the spline to a smaller number of points
and then verify that it matches the remaining points, or use a least squares method to find the best approximation.
126
Non-Linear Elements
Despite our deepest wishes for simplicity, most systems contain non-linear components. In the last chapter we looked at
dealing with non-linearities by linearizing them locally. Numerical techniques will handle non-linearities easily, but smaller time
steps are required for accuracy.
Consider the mass and an applied force shown in Figure 3.33. As the mass moves an aerodynamic resistance force is gen-
erated that is proportional to the square of the velocity. This results in a non-linear differential equation. This equation can be
numerically integrated using a technique such as Runge-Kutta. Note that the state equation matrix form cannot be used because it
requires linear equations.
2
F x = F – 20x· = Mx··
x
2 eqn 3.14
F 20x· x· = v
M
v· = – 20- v 2 + ----
-------- F- eqn 3.15
M M
Numbering Systems
Computer based number representations are ultimately reduced to true or false values. The simplest number is a binary bit
with an integer range from 0 to 1, however bits are normally grouped into some larger multiple of 8 based upon the size of the date
bus (e.g., 8-byte, 16-word, 32- long word, 64). These are then used to represent numerical values over a range. For example a byte
can represent an unsigned integer value from 0 to 255, a signed integer value from -127 to 127, or a 2s compliment integer value
from -128 to 127. As expected the precision and range of the number increases with the number of bits. And, by allocating a few of
the bits for an exponent, the number can be used to represent large real values. Figure 3.34 shows a very simplistic comparison of
127
The subject of computer numbering systems is very broad and this book is not intended to teach the fundamentals of these
numbering systems. But, to provide some design direction,
• If possible use 2s compliment integer calculations with 2 or 4 bytes. These will run easily on inexpensive hard-
ware, And if used on faster computers there will be a substantial speed bonus. The problems are the limited range
and loss of fractions.
• Floating point calculations are the standard on regular (non-embedded) computers. The numbers are 7 place, sin-
gle precision, 4 byte numbers or 14 place, double precision, 8 byte numbers. Unless space is at a premium, use
double precision. To implement these subroutines in small computers can consume large amounts of available
memory and processor time.
• Fixed point numbers do not allow all of the flexibility of the floating point values, but preserve the fractional
results. These are often used to get the speed or memory benefits of floating point calculations on lower end com-
puters.
Figure 3.35 shows two subroutines that are effectively identical, except for the choice of number system. Both will loop
999 times, incrementing the index value by adding one. The print statement within the loop also requires are division and modulo
operations. All three of the mathematical operations are slower for double precision. Moreover the ‘printf’ statement will require
more time to print the results for the floating point numbers. Overall the integer loop will probably run an order of magnitude
faster.
void loop_fast(){
int i;
for(i = 0; i < 1000; i++){
printf("Count %d.%d\n", i/10, i%100);
}
}
void loop_slow(){
double r;
for(r = 0.0; r < 1000.0; r++){
printf("Count %f.%f\n", r/10.0, r%100.0);
}
}
Speed
In the design of controls systems the execution time for a program may be critical to system stability. Or, when running
large numerical calculations, small changes can save days or weeks of computer time. Each operation requires a finite number of
computer CPU cycles with the number varying based upon the instruction. For example a sign change is very fast, addition and
subtraction can be slower, multiplication and division slower still, and a trigonometric operation is among the slowest. If the oper-
ations are done in hardware they will be much faster. If done in software the speed will vary depending upon the compiler. It is
often possible to reduce the computation time by reducing the number of slower operations. In Figure 3.36 there is a simple manip-
ulation that eliminates one addition, or a more elaborate method that eliminates one trigonometric operation. In practice this would
probably reduce the calculation time by at least one quarter to a half.
x = 2.5t + 3
A = cos 2x + sin x
2 2
1 = cos x + sin x
A = cos 2x + sin x
2 2
A = cos x – sin x + sin x
this can be continued to eliminate a trig operation,
2 2
A = 1 – sin x – sin x + sin x
2
A = 1 – 2 sin x + sin x
y = sin 2.5t + 3
#include <math.h>
Accuracy
Computer calculations are generally repeatable - meaning that repeating a calculation will give exactly the same result.
Although this does not mean that the result is correct. For example a small error (one in a million) repeated a million times
becomes significant. Considering the iterative nature of numerical calculations this scenario is likely to occur (note: not just possi-
129
ble). In these cases it is important to review the results with the following rules.
• Understand that the magnitude of errors increases with the number of calculations.
• Find a way to measure errors in calculations.
• Where possible correct for errors in calculations.
A common problem with floating point numbers is determining when the values are equal. Consider the values
2.00000001 and 1.99999998, for all practical purposes they are equal. But, from the standpoint of a computer they differ by
0.00000003 and are not equal. This can be overcome using a subroutine like that shown in Figure 3.37.
yc
Mc N
K s1 = 50000 ---- L = yc – yt
m
N
K s2 = 200000 ---- L Kd
m
K s1 Kd (cm) (Ns/m)
M c = 400Kg
30 1000
M t = 20Kg 0 1600
-20 2000
Mt -30 2250
yt
K s2
yr
For our purposes we will focus only on the translation of the tire, and ignore its rotational motion. The differential equa-
tions describing the system are developed in Figure 3.39.
130
·· yc
Mc y Mc
c
· ·
K s1 y t – y c Kd yt – yc
· · ·
F = K s1 y t – y c + K d y t – y c – M c g = M c y c
·· · ·
M c y c = K s1 y t + – K s1 y c + K d y t + – K d y c – M c g
d- y = v
---- eqn 3.16
dt c c
d- y = v
---- eqn 3.17
dt t t
· K s1 – K s1 Kd –Kd
v c = --------- y t + ------------- y c + ------- v t + ---------- v c + – g eqn 3.18
Mc Mc Mc Mc
K s1 y t – y c · ·
Kd yt – yc
··
Mt y
Mt t
K s2 y r – y t
· · ··
F = K s2 y r – y t – K s1 y t – y c – K d y t – y c – M t g = M t y t
·· · ·
M t y t = K s2 y r + – K s2 – K s1 y t + K s1 y c + – K d y t + K d y c – M t g
· K s2 – K s2 – K s1 K s1 –Kd Kd
v t = --------- y r + ----------------------------- y t + --------- y c + ---------- v t + ------- v c + – g eqn 3.19
Mt Mt Mt Mt Mt
Figure 3.39 Example: Differential and state equations for the car suspension system
The damping force must be converted from a tabular form to equation form. This is done in Figure 3.40.
131
30 1000
3 2 0 1600
K L = AL + BL + CL + D
d -20 2000
-30 2250
The four data points can now be written in equation form, and then put into matrix form.
3 2
1000 = A 0.3 + B 0.3 + C 0.3 + D
3 2
1600 = A 0 + B 0 + C 0 + D
3 2
2000 = A – 0.2 + B – 0.2 + C – 0.2 + D
3 2
2250 = A – 0.3 + B – 0.3 + C – 0.3 + D
The matrix can be solved to find the coefficients, and the final equation written.
A – 2778
B = 277.8
C – 1833
D 1600
3 2
K d L = – 2778 L + 277.8 L + – 1833 L + 1600
The system is to be tested for overall deflection when exposed to obstacles on the road. For the initial conditions we need
to find the resting heights for the tire and car body. This can be done by setting the accelerations and velocities to zero, and finding
the resulting heights.
132
The initial accelerations and velocities are set to zero, assuming the car has settled to a steady state
height. This then yields equations that can be used to calculate the initial deflections. Assume the road
height is also zero to begin with.
K s1 – K s1 Kd –Kd
0 = --------- y t + ------------ y c + ------- 0 + ---------- 0 + – g
Mc Mc Mc Mc
Mc
y c = y t – g ---------
K s1
K s2 – K s2 – K s1 K s1 –Kd Kd
0 = --------- 0 + --------------------------- y t + --------- y c + ---------- 0 + ------ 0 + – g
Mt Mt Mt Mt Mt
gM t = – K s2 – K s1 y t + K s1 y c
Mc Mc + Mt
gM t = – K s2 – K s1 y t + K s1 y t – g --------- y t = – g --------------------
K K s2
s1
Mc + Mt Mc Mc + Mt Mc
y c = – g -------------------- – g --------- y c = – g -------------------- + ---------
K s2 K s1 K s2 K s1
The resulting calculations can then be written in a computer program for analysis, as shown in Figure 3.42.
133
#include <stdio.h>
#include <math.h>
main(){
double state[SIZE];
double derivative[SIZE];
FILE *fp_out;
double t;
int i;
Figure 3.43 Example: Program for numerical analysis of suspension system (continued)
This program was then used to test various design cases by selecting input types for changes in the road height, and then
calculating how the tire and vehicle heights would change as a result. Some of these results are seen in Figure 3.44. These results
were obtained by running the program, and then graphing the results in a spreadsheet program. The input of zero for the road height
was used to test the program. As shown the height of the vehicle changes, indicating that the initial height calculations are correct,
and the model is stable. The step function shows some oscillations that settle out to a stable final value. The oscillation is relatively
slow, and is fully transmitted to the automobile. The ramp function shows that the car follows the rise of the slope with small tran-
sient effects at the start.
135
y r t = 0.0 y r t = 0.2m
0 0.3
1 8 15 22 29 36 43 50 57 64 71 78 85 92 99
0.25
-0.02
0.2
-0.04 0.15
0.1
Series1 Series1
-0.06
Series2 Series2
0.05
-0.08 0
1 8 15 22 29 36 43 50 57 64 71 78 85 92 99
-0.05
-0.1
-0.1
-0.12 -0.15
0.2
2
0.1
1.5
0
1 8 15 22 29 36 43 50 57 64 71 78 85 92 99 Series1 Series1
Series2 1
Series2
-0.1
0.5
-0.2
0
-0.3
1 8 15 22 29 36 43 50 57 64 71 78 85 92 99
-0.4 -0.5
3.1 Summary
• State variable equations are differential equations reduced to first order differential equations.
• First order equations can be integrated numerically.
• Higher order integration, such as Runge-Kutta increase the accuracy.
• Switching functions allow functions terms to be turned on and off to provide more complex function.
• Tabular data can be used to get numerical values.
Problem 3.2 Convert the following differential equations to state variable form.
··
x + 2x· + 3x + 5y = 3
··
y + y· + 6y + 9x = sin t
136
Problem 3.3 a) Put the differential equations given below in state variable form. b) Put the state equations in matrix form
·· · · ·
y 1 + 2y 1 + 3y 1 + 4y 2 + 5y 2 + 6y 3 + t + F = 0
· · ··
y 1 + 7y 1 + 8y 2 + 9y 2 + 10y 3 + 11y 3 + 5 cos 5t = 0
y 1 y 2 y 3 = outputs
· ·· · F = input
y 1 + 12y 2 + 13y 3 = 0
Kd
M Ks
K d1
F K s2
M1 K s1 M2
Problem 3.7 Do a first order numerical integration of the derivative below from 0 to 10 seconds in one second steps. Assume
the system starts undeflected and at rest. Write the equation for each time step.
d 2
----- x t = 5 t – 4
dt
Problem 3.8 Use first-order integration to solve the differential equation from 0 to 10 seconds with time steps of 1 second.
Assume that the system starts at rest and undeflected.
x· + 0.1x = 5
Problem 3.9 Solve the differential equation using first order numerical integration, for 0s, 0.5s, 1.0s, and 1.5s. Show the calcu-
137
lations.
d 2 use, x(0) = 1
F = M ----- x
dt v(0) = 2
h = 0.5 s
F = 10
M=1
Problem 3.10 Given the differential equation, integrate the values numerically for the first ten seconds with 1 second steps.
Assume the initial value of x is 1. You may use first order or Runge-Kutta integration.
x· + 0.25x = 3
Problem 3.11 Numerically integrate one time step of the differential equation using a) first order integration and b) Runge-
Kutta integration.c) Write a computer program in a language of your choice (C/C++, Java, Scilab script, etc.) that
will numerically integrate the differential equation.
·· ·
+3 +9 = 10
Problem 3.12 Write a program to implement the following equation to calculate the value of x.
i 100
x = 5iu i – 20
i=0
where,
u t = 0 when t 0
u t = 1 when t 0
Problem 3.13 Develop the state equations and numerically integrate the following differential equation for 20s for the given
input function. Show the results in a table.
··· + 2Q
·· + 10Q· + 20Q = 5
Q
where,
= 0 t 0
= 0.1t 0 t 10s
= 1 t 10s
138
Problem 3.14 Write the state equations for the system shown.
Ks1
Y1
M1
Ks2
Y2
M2
Ks3
Y3
M3
Problem 3.15 Develop state equations for the mass-spring-damper system below.
x
Kd
F
M Ks
Problem 3.16 a) For the mass-spring-damper system below solve the differential equation as a function of time. Assume the
system starts at rest and undeflected. b) Also, solve the problem using your Scilab (and state equations) to verify
your solution. Sketch the results.
x
K s = 10 Kd
K d = 10 F
M = 10 M Ks
F = 10
Problem 3.17 The system below is comprised of two masses. There is viscous damping between the masses and between the
bottom mass and the floor. The masses are also connected with a cable that is run over a massless and frictionless
139
pulley. Write the differential equations for the system, and put them in state variable form.
x1
Ks
M1
B1
x2
F
M2
B2
Problem 3.18 Find the response of the following differential equation to the given step input. Assume the initial conditions are
all zero. Solve the problem using a numerical method and show the values from 0 to 10 seconds in 1 second
intervals.
···
x + 10x·· + 100x· + 1000x = 4F F t = 10u t
Problem 3.19 Given the following differential equation and initial conditions, draw a sketch of the first 5 seconds of the output
response. The input is a step function that turns on at t=0. Use at least two different methods, and compare the
results.
·· · initial conditions
0.5V o + 0.6V o + 2.1V o = 3V i + 2 Vi t 0 = 5V
V o 0 = 0V
· –1
V o 0 = 1Vs
Problem 3.20 The mechanical system below is a mass-spring-damper system. A force ‘F’ of 100N is applied to the 10Kg cart at
time t=0s. The motion is resisted by the spring and damper. The spring coefficient is 1000N/m, and the damper
coefficient is to be determined. Follow the steps below to develop a solution to the problem. Assume the system
always starts undeflected and at rest.
a) Develop the differential equation for the system.
b) Solve the differential equation using damper coefficients of 100Ns/m and 10000Ns/m. Draw a graph of the
results.
c) Develop the state equations for the system.
d) Solve the system with a first order numerical analysis using Scilab for damper coefficients of 100Ns/m and
10000Ns/m. Draw a graph of the results.
e) Solve the system with a Runge-Kutta numerical analysis using Scilab for damper coefficients of 100Ns/m and
10000Ns/m. Draw a graph of the results.
f) Write a computer program (in C, Java or Fortran) to do the Runge Kutta numerical integration in step e). Draw
a graph of the results.
g) Compare all of the solutions found in the previous steps.
h) Select a damper coefficient to give an overall system damping factor of 1. Verify the results by numerically
140
integrating.
x
Kd
F
M Ks
Problem 3.21 For the mechanism illustrated in the figure below the values are Ks1=Ks2=100N/m, M1=M2=1kg, F=1N. Assume
that the system starts at rest, and the springs are undeformed initially.
x1 x2
F K s1 K s2
M1 M2
Problem 3.22 The second order response below was obtained for a unit step input (x) to a system. Develop the state equation
and find the response to a ramp input using a numerical method.
F
1.10
0.8
0.2 t(s)
Problem 3.23 The system shown has the applied force that is 0N at 0s, increases to 200N at 2s, and then goes to zero. a) Find
the response using a computer program to do numerical integration. b) Find the response by integrating the dif-
141
ferential equation.
F = 100t u t – u t – 2
x
M = 10Kg
Ks
M N
K s = 20 ----
m
B F
Ns
B = 100 ------
m
Problem 3.24 For the mechanism shown in the figure below the values are Ks1=Ks2=100N/m, Kd1=10Nm/s, M1=M2=1kg,
F=1N. Assume that the system starts at rest, and the springs are undeformed initially.
x1 x2
K d1
F K s2
M1 K s1 M2
Problem 3.25 Use a numerical method to find the position of the mass below over the first 2s. Record these values in a table
and sketch the curve. The mass starts at rest at x=0. The block experiences aerodynamic drag that opposes
motion. Assume the surface is frictionless.
x
2 N
2x· sign x· K s = 10 ----
m
M = 1kg
F = 10N
142
Problem 3.26 a) Use numerical integration to find the system response from 0 to 10s. .
Kd
F –1
K = 10Nsm
d
–1
y K s = 100Nm
M
M = 1kg
·
y 0 = 1m y 0 = 0m
Ks
F = 10 sin 10t
Problem 3.27 b) Modify the program to use the variables below and then use trial and error to select a new Kd value that makes
it critically damped..
–1 –1
K d = ?Nsm K s = 100Nm M = 1kg
· F = 10
y 0 = 1m y 0 = 0m
Problem 3.28 c) Develop an explicit solution using the given coefficients and input..
–1 –1
K d = 100Nsm K s = 10Nm M = 1kg
· F = 10 sin 10t
y 0 = 1m y 0 = 0m
Answer 3.2
x· = v
x 0 0 1 0 x 0
y· = u d
----- y = 0 0 0 1 y + 0
dt v –3 –5 –2 0 v 3
v· = – 2v – 3x – 5y + 3
u –9 –6 0 –1 u sin t
u· = – u – 6y – 9x + sin t
143
Answer 3.3
·
y1 = v1
· y1 0 0 0 1 0 0 y1
y2 = v2 0
y2 0 0 0 0 1 0 y2
· 0
y3 = v3 0 0 0 0 0 1
0
d y y3
·
v1 = – 2v 1 – 3y 1 – 4v 2 – 5y 2 – 6v 3 – t – F ----- 3 = –3 –5 0 –2 –4 –6 + –t–F
dt v 1 13 v1
1 0 0 0 – ------ 0 – ------ 0
· – v 1 13 12 12
v 2 = -------- – ------ v 3 v2 v2 5
12 12 7 9 11 1 8 – ------ cos 5t
– v1 7 v3 – ------ – ------ – ------ – ------ – ------ 0 v3 10
· 8 9 11 5 10 10 10 10 10
v 3 = -------- – ------ y 1 – ------ v 2 – ------ y 2 – ------ y 3 – ------ cos 5t
10 10 10 10 10 10
Answer 3.4
y· 1 = v 1
y· 2 = v 2
M 1 v· 1 = – K S1 y + K S2 y – K S2 y + – 9.81M 1 + K d v – K d v
1 2 1 2 1
– K S1 – K S2 –Kd K S2 Kd
v· 1 = y 1 ------------------------------ + v 1 ---------- + y 2 --------- + v 2 ------- + – 9.81
M1 M1 M1 M1
M 2 v· 2 = – K S2 y + K S2 y 1 + – 9.81M 2 – K d v + K d v
2 2 1
K S2 Kd – K S2 –Kd
v· 2 = y 1 --------- + v 1 ------- + y 2 ------------- + v 2 ---------- + – 9.81
M2 M2 M2 M2
Answer 3.5
x· = v 0 1
d
–Kd –Ks ----- x = – K – K x + 0
v· = v ---------- + x --------- dt v --------s- ---------d- v 0
M M M M
Answer 3.6
·
x1 = v1
·
x2 = v2
· – K d1 – K s1 K d1 K s1 F
v 1 = v 1 ------------- + x 1 ------------ + v 2 --------- + x 2 --------- + -------
M1 M1 M1 M1 M1
· – K d1 – K s1 – K s2 K d1 K s1
v 2 = v 2 ------------- + x 2 ----------------------------- + v 1 --------- + x 1 ---------
M2 M2 M2 M2
144
Answer 3.7
t x
h = 1
2 0 0
x t + h = x t + h5 t – 4 1 80
2 125
2
x 1 = x 0 +5 0–4 = 80 3 145
4 150
2 5 150
x 2 = x 1 +5 1–4 = 125
6 155
7 175
8 220
9 300
10 425
Answer 3.8
x t + h = x t + h – 0.1x t + 5
x 10 =
Answer 3.9
d 2
F = M ----- x
dt
x· = v
F
v· = ----- = 10
M
t v· i + 1 = 10 v i + 1 = v i + 0.5v· i x i + 1 = x i + 0.5v i
0 10 2 1
0.5 10 7 2
1.0 10 12 5.5
1.5 10 17 11.5
Answer 3.10
t x x’
x' = 3 – 0.25x
d 0 1 2.75
x t + h = x t + h ----- x t 1 3.75 2.06
dt
2 5.81 1.55
3 7.36 1.16
x t + h = x t + 1 3 – 0.25x t 4 8.52 0.870
5 9.39 0.652
x t + h = 0.75x t + 3 6 10.0 0.489
7 10.5 0.367
8 10.9 0.275
9 11.2 0.206
10 11.4
145
Answer 3.11 a)
·
= d i 0 1 i + 0
----- =
· dt –9 –3 10
= – 3 – 9 + 10 i i
i+1 d
i + h ---- i i +h 0 1 i +h 0
- =
dt –9 –3 10
i+1 i i i i
i+1 = i+h i
i+1 i – 9h i – 3h i + 10h
b)
d h i
F1 h ----- i = h 0 1 i +h 0 =
dt –9 –3 10 – 9h i – 3h i + 10h
i i
h
F i+ 2
---------i
d i + -----1- = h 0 1
F2 h ----- +h 0
dt 2 –9 –3 – 9h i – 3h i + 10h 10
i + -------------------------------------------------
-
i 2
2
h i
h i + ------------
= 2
2 2 2 2
h i 27h i + 9h i + 30h
– 9h i – 9 ------------ – 3h i + ---------------------------------------------------------- + 10h
2 2
d F
F3 h ----- i + -----2-
dt 2
i
d i +F
F4 h -----
dt 3
i
i+1 i +1
--- F 1 + 2F 2 + 2F 3 + F 4
6
i+1 i
146
c)
#include <stdio.h>
int main(){
int steps = 100,
i;
double theta,
omega,
step_t,
theta_last,
omega_last;
theta = 0.0;
omega = 0.0;
step_t = 1.0;
for(i = 0; i < steps; i++){
theta_last = theta;
omega_last = omega;
theta = theta_last + step_t * omega_last;
omega = omega_last + step_t*(-3 * omega_last - 9 *
theta_last + 10);
printf("%f %f %f \n", i+step_t, theta, omega);
}
}
Answer 3.12
// AP numerical integration
function ret=u(t)
ret = 0;
if(t > 0) then
ret = 1;
end
endfunction
x = 0;
for i = 0:99
x = x + 5 * i * u(i - 20);
end
Answer 3.13
Q· = R
R· = S
·
S = – 2S – 10R – 20Q + 5
The value at t=0.000000 s is (Q, R, S) = (0.000000, 0.000000, 0.000000)
The value at t=0.500000 s is (Q, R, S) = (0.000987, 0.007226, 0.036225)
The value at t=1.000000 s is (Q, R, S) = (0.010194, 0.030040, 0.040156)
The value at t=1.500000 s is (Q, R, S) = (0.027865, 0.035242, -0.022205)
The value at t=2.000000 s is (Q, R, S) = (0.041190, 0.016960, -0.034372)
The value at t=2.500000 s is (Q, R, S) = (0.047603, 0.013858, 0.025059)
The value at t=3.000000 s is (Q, R, S) = (0.059079, 0.032938, 0.034771)
The value at t=3.500000 s is (Q, R, S) = (0.077599, 0.035896, -0.025631)
The value at t=4.000000 s is (Q, R, S) = (0.090961, 0.016746, -0.034314)
The value at t=4.500000 s is (Q, R, S) = (0.097376, 0.014202, 0.026508)
The value at t=5.000000 s is (Q, R, S) = (0.109131, 0.033513, 0.033950)
The value at t=5.500000 s is (Q, R, S) = (0.127759, 0.035673, -0.027339)
The value at t=6.000000 s is (Q, R, S) = (0.140880, 0.016222, -0.033552)
The value at t=6.500000 s is (Q, R, S) = (0.147208, 0.014455, 0.028172)
The value at t=7.000000 s is (Q, R, S) = (0.159211, 0.034040, 0.033136)
The value at t=7.500000 s is (Q, R, S) = (0.177925, 0.035411, -0.029000)
The value at t=8.000000 s is (Q, R, S) = (0.190795, 0.015699, -0.032701)
The value at t=8.500000 s is (Q, R, S) = (0.197043, 0.014730, 0.029823)
The value at t=9.000000 s is (Q, R, S) = (0.209300, 0.034561, 0.032247)
The value at t=9.500000 s is (Q, R, S) = (0.228089, 0.035123, -0.030641)
The value at t=10.000000 s is (Q, R, S) = (0.240702, 0.015182, -0.031774)
148
Q = 0; // initial conditions
R = 0;
S = 0;
X=[Q, R, S];
// Set the time length and step size for the integration
steps = 10000;
t_start = 0.0;
t_end = 10.0;
h = (t_end - t_start) / steps;
t = [t_start];
Answer 3.14
·
y1 = v1
·
y2 = v2
·
y3 = v3
··
y 1 M 1 + K s1 y 1 + K s2 y 1 – y 2 + 9.81M 1 = 0
·· – K s1 – K s2 K s2
y 1 = y 1 ----------------------------- + v 1 0 + y 2 --------- + v 2 0 + y 3 0 + v 3 0 – 9.81
M1 M1
··
y 2 M 2 + K s2 y 2 – y 1 + K s3 y 2 – y 3 + 9.81M 2 = 0
·· K s2 – K s2 – K s3 K s3
y 2 = y 1 --------- + v 1 0 + y 2 ----------------------------- + v 2 0 + y 3 --------- + v 3 0 – 9.81
M2 M2 M2
··
y 3 M 3 + K s3 y 3 – y 2 + 9.81M 3 = 0
·· K s3 – K s3
y 3 = y 1 0 + v 1 0 + y 2 --------- + v 2 0 + y 3 ------------ + v 3 0 – 9.81
M3 M3
Answer 3.15
x
x· = v
F K d x·
–Kd –Ks F
M Ks x v· = v ---------- + x --------- + -----
M M M
150
Answer 3.16
K d x·
F
F = F – K d x· – K s x = Mx··
M Ks x
Mx·· + K d x· + K s x = F
x 10x·· + 10x· + 10x = 10
··
x + x· + x = 1
Homogeneous
··
x + x· + x = 0
2
A +A+1 = 0
–1 1–4 1 1 3
A = ---------------------------------------------- = – 0.5 j -------
2 1 2
– 0.5t 3
xh = C1 e cos ------- t + C 2
2
Particular:
xp = B
0+0+B = 1
xp = 1
Initial Conditions:
– 0.5t 3
x = xh + xp = C1 e cos ------- t + C 2 + 1
2
3 – 0.5t 3 – 0.5t 3
x' = – ------- C e sin ------- t + C 2 – 0.5C 1 e cos ------- t + C 2
2 1 2 2
3
x' 0 = – ------- C sin C 2 – 0.5C 1 cos C 2 = 0
2 1
3
– ------- sin C 2 = 0.5 cos C 2
2
–1 –1
tan C 2 = ------- C 2 = atan ------- = – 0.5236
3 3
x 0 = C 1 cos – 0.5236 + 1 = 0
–1
C 1 = --------------------------------- = – 1.155
cos – 0.5236
– 0.5t 3
x = – 1.155 e sin ------- t + 1.047 + 1
2
Answer 3.17
+y
+x
T Ks x1 · · ··
F = – T – Ks x1 – B1 x1 – x2 = M1 x1
M1
·
x1 = v1
· · ·
B1 x1 – x2 x2 = v2
· –Ks –B1 B1 –T
v 1 = x 1 --------- + v 1 --------- + v 2 ------- + -------
M1 M1 M1 M1
· ·
B1 x1 – x2
T · · · ··
F = – T + B1 x1 – x2 + F – B2 x2 = M2 x2
M2
F
· B1 –B1 – B2 –T+F
· v 2 = v 1 ------- + v 2 ---------------------- + -----------------
B2 x2 M2 M2 M2
Answer 3.18
t (s) x(t)
0 0.0000
1 0.0681
2 0.0127
3 0.0575
4 0.0383
5 0.0247
6 0.0678
7 0.0837
8 0.0652
9 0.0296
10 0.0316
152
Answer 3.19
a) – 0.6t
V o t = – 8.331e cos 1.960t – 0.238 + 8.095
b) ·
Vo = Yo
·
Y o = – 1.2Y o – 4.2V o + 34
// by: H. Jack Sept., 23, 2003
v0 = 0; // initial conditions
y0 = 1;
X=[v0, y0];
// Set the time length and step size for the integration
steps = 1000;
t_start = 0;
t_end = 10;
h = (t_end - t_start) / steps;
t = [t_start];
//
// Loop for integration
//
for i=1:steps,
t = [t ; t($,:) + h];
F1 = h * f(X($,:), t($,:));
F2 = h * f(X($,:) + F1/2.0, t($,:) + h/2.0);
F3 = h * f(X($,:) + F2/2.0, t($,:) + h/2.0);
F4 = h * f(X($,:) + F3, t($,:) + h);
X = [X ; X($,:) + (F1 + 2.0*F2 + 2.0*F3 + F4)/6.0];
end
//
// Graph the values
//
plot2d(t, X, [-2, -5], leg="position@velocity");
xtitle('Time (s)');
//
// Generate points from the given function
//
XX = [v0];
for i=1:steps,
tt = i * h;
XX = [XX ; -8.331 * exp(-0.6 * tt) * cos( 1.960 * tt - 0.238) + 8.095];
end
plot2d(t, XX, [-4], leg="explicit");
c) The two curves produced by the Scilab program overlap, so the results agree.
153
Answer 3.20
Kd Ks F
a) ··
x + ------ x· + ------ x = -----
M M M
N – 5t
b) K d = 100 ---- x 1 t = – 0.115e cos 5 3t – 0.524 + 0.10
m
N – 0.1t – 5 – 999.9t
K d = 10000 ---- x 1 t = – 0.1e + 10 e + 0.10
m
c)
0 1 X 0
d X
----- 0 = – K – K 0 +
F
dt X
1 --------s- ---------d- X 1 -----
M M M
For 10000N/m: all solutions are overdamped. The time to reach the time constant (at
0.06321) is,
b) 0.06321 at t = 10.001s
d) 0.06321 at t = 10.000s
e) 0.06321 at t = 10.000s
f) 0.06321 at t = 10.0s
Ns
h) K d = 200 ------ (verify with numerical integration also)
m
Answer 3.21
b) ·
x1 = v1
· – K s1 K s1 F
x 1 = x 1 ------------ + x 2 --------- + -------
M1 M1 M1
·
x2 = v2
· K s1 – K s1 – K s2
x 1 = x 1 --------- + x 2 -----------------------------
M2 M2
c) 0 1 0 0
x1 – K s1 K s1 x1 0
------------ 0 --------- 0 F
d- v 1 M1 M1 v1 -------
---- = + M1
dt x 0 0 0 1 x2
2 0
v2 K s1 – K s1 – K s2 v2
--------- 0 ----------------------------- 0 0
M2 M2
154
x0 = 0; // initial conditions
v0 = 0;
x1 = 0;
v1 = 0;
X=[x0, v0, x1, v1];
// define the state matrix function the values returned are [x, v]
function foo=f(state,t)
foo = [ state($,2), -Ks1/M1*state($,1)+Ks1/M1*state($,3)+F/M1, state($,4),
Ks1/M2*state($,1)-(Ks1+Ks2)/M2*state($,3)];
endfunction
// Set the time length and step size for the integration
steps = 10000;
t_start = 0;
t_end = 10;
h = (t_end - t_start) / steps;
t = [t_start];
h)
The following subroutine is used in place of the subroutine in the program shown in Figure
3.20 and Figure 3.21.
//
// State Equations Calculated Here
//
void derivative(double t, double X[], double dX[]){
dX[0] = X[1];
dX[1] = -Ks1 / M1 * X[0] + Ks1 / M1 * X[2] + Force / M1;
dX[2] = X[3];
dX[3] = Ks1 / M2 * X[0] - (Ks1 + Ks2) / M2 * X[2];
}
Answer 3.22
tp
b- = e 1 b-
----- 1 0.3
----- = ----- ln = ------- ln ------ = – 4.904
x tp x 0.2 0.8
1 1
= ------------------------------ = --------------------------------------------------- = 0.298
2 2
-------- +1 ----------------------------- +1
tp 0.2 – 4.904
– – – 4.904
n =
------- = ------------------------ = 16.46
0.298
F· = G eqn 3.1
Answer 3.23 a)
b)
·· 100 20
x 10 + x· --------- + x ------ = F
10 10
Homogeneous:
··
x 10 + x· 10 + x 2 = 0
– 0.7236t – 0.2764t
xh t = C1 e + C2e
To start, for the first 2 seconds when the force has a slope of 100. Find the particular
solution.
··
x 10 + x· 10 + x 2 = 100t
y p = At + B y· p = A
0 10 + A 10 + At + B 2 = 100t
2A = 100 A = 50
10A + 2B = 0 B = – 5A = – 250
y p = 50t – 250
– 0.7236t – 0.2764t
x t = C1 e + C2e + 50t – 250
x 0 = 0 x· 0 = 0
0 = C 1 + C 2 + 0 – 250 C 1 + C 2 = 250
– 0.7236t – 0.2764t
x· t = – 0.7236C 1 e + – 0.2764C 2 e + 50
0 = – 0.7236C 1 + – 0.2764C 2 + 50
0.7236C 1 + 0.2764C 2 = 50
50 – 0.2764 250
C 1 = ------------------------------------------ = – 42.710197
0.7236 – 0.2764
– 0.7236t – 0.2764t
x t = – 42.710197 e + 292.7102e + 50t – 250
158
The value and derivative must be found at t=2s to find the response for the second seg-
ment of the motion.
– 0.7236 2 – 0.2764 2
x 0 = – 42.710197 e + 292.7102e + 50 2 – 250
– 1.4472 – 0.5528
x 0 = – 42.710197e + 292.7102e – 150 = 8.3612
After 2s the input force is zero, resulting in the given differential equation. Since the equation is homogeneous it
is possible to proceed directly to finding the constants. Note that for this equation t = 0s is equivalent to t=2s in
real time.
··
x 10 + x· 10 + x 2 = 0
– 0.7236t – 0.2764t
x t = C1 e + C2 e
– 0.7236 2 – 0.2764 2
8.3612 = C 1 e + C2e = C 1 0.23523 + C 2 0.57534
– 0.7236 2 – 0.2764 2
10.722 = – 0.7236C 1 e + – 0.2764C 2 e = – 0.1702C 1 + – 0.1590C 2
– 0.7236t – 0.2764t
x t = 0.1419e + 3.106e
159
Answer 3.24
x1 x2
a), b)
·· ··
M1 x1 M2x2
F
· ·
K d1 x 1 – x 2
M1 M2 K s2 x 2
K s1 x 1 – x 2
·
x1 = v1 eqn 3.1
·
x2 = v2 eqn 3.2
·· · ·
F M1 F – M 1 x 1 – K d1 x 1 – x 2 – K s1 x 1 – x 2 = 0
· F K d1 K s1 eqn 3.3
v 1 = ------- – --------- v 1 – v 2 – --------- x 1 – x 2
M1 M1 M1
· · ··
F M2 K d1 x 1 – x 2 + K s1 x 1 – x 2 – M 2 x 2 – K s2 x 2 = 0
· K d1 K s1 K s2
v 2 = --------- v 1 – v 2 + --------- x 1 – x 2 – --------- x 2 eqn 3.4
M2 M2 M2
c)
0 0 1 0
x1 0 0 0 1 x1 0
K K K d1 K d1 0
d- x 2 s1 s1 x2
---- = – --------- --------- – --------- --------- + F
dt v M1 M1 M1 M1 v1 -------
1 M1
v2 K s1 – K s1 – K s2 K d1 K d1 v
--------
- --------------------------- --------- – --------- 2 0
M2 M2 M2 M2
160
x1 = 0; // initial conditions
v1 = 0;
x2 = 0;
v2 = 0;
X=[x1, x2, v1, v2];
A = [0, 0, 1, 0 ; 0, 0, 0, 1 ; -Ks1/M1, Ks1/M1, -Kd1/M1, Kd1/M1 ; Ks1/M2, (-Ks1-Ks2)/
M2, Kd1/M2, -Kd1/M2]; // define the A matrix
B = [0 ; 0 ; 1/M1 ; 0];
// Set the time length and step size for the integration
steps = 1000;
t_start = 0.0;
t_end = 10.0;
h = (t_end - t_start) / steps;
t = [t_start];
// SCILAB OUTPUT
//The value at t=0.000000 s is (x, v) = (0.000000, 0.000000)
//The value at t=1.000000 s is (x, v) = (0.005900, -0.003279)
//The value at t=2.000000 s is (x, v) = (0.008716, 0.008097)
//The value at t=3.000000 s is (x, v) = (0.011166, 0.014847)
//The value at t=4.000000 s is (x, v) = (0.013239, 0.018261)
//The value at t=5.000000 s is (x, v) = (0.014953, 0.019357)
//The value at t=6.000000 s is (x, v) = (0.016336, 0.018918)
//The value at t=7.000000 s is (x, v) = (0.017430, 0.017528)
//The value at t=8.000000 s is (x, v) = (0.018275, 0.015618)
//The value at t=9.000000 s is (x, v) = (0.018913, 0.013489)
//The value at t=10.000000 s is (x, v) = (0.019381, 0.011345)
161
e)
162
x1 = 0; // initial conditions
v1 = 0;
x2 = 0;
v2 = 0;
X=[x1, x2, v1, v2];
A = [0, 0, 1, 0 ; 0, 0, 0, 1 ; -Ks1/M1, Ks1/M1, -Kd1/M1, Kd1/M1 ; Ks1/M2, (-Ks1-Ks2)/
M2, Kd1/M2, -Kd1/M2]; // define the A matrix
B = [0 ; 0 ; 1/M1 ; 0];
// Set the time length and step size for the integration
steps = 1000;
t_start = 0.0;
t_end = 10.0;
h = (t_end - t_start) / steps;
t = [t_start];
int main(){
FILE *fp;
double h = 0.0001;
double t;
int j = 0;
return 0;
}
// First order integration done here (could be replaced with runge kutta)
void step(double t, double h, double X[]){
double tmp[SIZE],
dX[SIZE],
F1[SIZE],
F2[SIZE],
F3[SIZE],
F4[SIZE];
// Calculate F1
derivative(t, X, dX);
multiply(h, dX, F1);
// Calculate F2
multiply(0.5, F1, tmp);
add(X, tmp, tmp);
derivative(t+h/2.0, tmp, dX);
multiply(h, dX, F2);
164
g) // Calculate F3
multiply(0.5, F2, tmp);
cont add(X, tmp, tmp);
derivative(t+h/2.0, tmp, dX);
multiply(h, dX, F3);
// Calculate F4
add(X, F3, tmp);
derivative(t+h, tmp, dX);
multiply(h, dX, F4);
h)
Method x(10s)
Answer 3.25
// A numerical integration program
X = [x, v];
// Set the time length and step size for the integration
steps = 1000;
t_start = 0.0;
t_end = 2.0;
h = (t_end - t_start) / steps;
t = [t_start];
// SCILAB OUTPUT
//The value at t=0.000000 s is (x, v) = (0.000000, 0.000000)
//The value at t=0.200000 s is (x, v) = (0.171656, 1.506669)
//The value at t=0.400000 s is (x, v) = (0.507901, 1.704388)
//The value at t=0.600000 s is (x, v) = (0.820884, 1.384830)
//The value at t=0.800000 s is (x, v) = (1.054940, 0.942182)
//The value at t=1.000000 s is (x, v) = (1.196671, 0.467783)
//The value at t=1.200000 s is (x, v) = (1.242429, -0.015709)
//The value at t=1.400000 s is (x, v) = (1.194513, -0.438314)
//The value at t=1.600000 s is (x, v) = (1.085479, -0.605115)
//The value at t=1.800000 s is (x, v) = (0.969314, -0.523109)
//The value at t=2.000000 s is (x, v) = (0.885327, -0.298854)
166
Answer 3.26 .
– K d y· F F M = – K d y· + F – My·· – Mg – K s y = 0
Kd Ks F
y + ------ y· + ------ y = ----- – g
··
y M M M
M
y· = v
My·· –Kd –Ks F
v· = v ---------- + y --------- + ----- – g = v – 10 + x – 100 + 10 sin 10t – 9.81
Mg Ks y M M M
y0 = 0;
// y0 = 1.0;
v0 = 0;
X = [y0, v0];
t_start = 0.0;
t_end = 10.0;
t = [t_start];
n_steps = 1000;
h = (t_end - t_start) / n_steps;
plot(t, X);
167
Answer 3.27
The program in part a) was used with modified Kd Estimated
parameters. The table was used to keep track of damping coefficient
trial and error values. The t_end was reduced to
2s, and then 1s to show more detail. 10 < 1 (3 major cycles)
100, t_end=2 > 1 (no oscillation)
The final result is that the damper value must 50 > 1 (no oscillation)
be between 17.45 and 17.46 for critical damp- 30 > 1 (some curvature)
ing. 20 > 1 (getting close)
15 < 1 (some overshoot)
17 < 1 (small overshoot)
18 < 1 (no overshoot)
17.5, t_end = 1 > 1 (no overshoot)
17.2 < 1 (overshoot)
17.3 < 1 (overshoot)
17.4 < 1 (overshoot)
17.45 < 1 (overshoot)
17.48 > 1 (no overshoot)
17.47 > 1 (no overshoot)
17.46 > 1 (no overshoot)
Aside: Finding the roots of the homogeneous finds that a value of 20 is needed for critical
damping. As provided the numerical solution suggests an incorrect value of 17.45. This
occurs because the initial conditions and gravity mask the underlying phenomenon.
Kd K 2 K Kd Ks
– ------ ------d – 4 1 -----s- ·· F
y + ------ y· + ------ y = ----- – g
M M M M M M
R = ------------------------------------------------------------------------
2 1
Kd 2 K
0 = ------ – 4 1 -----s-
M M
Kd = 4 1 Ks M = 4 1 100 1 = 20
168
Answer 3.28
UNVERIFIED
Kd Ks F
··
y + ------ y· + ------ y = ----- – g ··
y + 100y· + 10y = 10 sin 10t – 9.81
M M M
Homogeneous:
R = – 99.8999 – 0.10010
– 99.8999 t – 0.10010 t
yh = C1 e + C2e
Particular:
– 100 A sin 10t + – 100B cos 10t + 100 10A cos 10t + – 10B sin 10t
+ 10 A sin 10t + B cos 10t + D = 10 sin 10t – 9.81
– 100A – 1000B + 10A sin 10t + – 100B + 1000A + 10B cos 10t + 10D = 10 sin 10t – 9.81
D = – 9.81
9
– 100B + 1000A + 10B = 0 A = --------- B
100
– 100A – 1000B + 10A = 10
9 10
B = ------------------------------------------- = – 0.0099196508
– 1000B – 90 --------- B = 10
100 9
– 1000 – 90 ---------
100
9
A = --------- – 0.0099196508 = – 0.00089276857
100
y p = – 0.00089276857 sin 10t + – 0.0099196508 cos 10t – 9.81
169
Initial Conditions:
– 99.8999 t – 0.10010 t
y = C1 e + C2 e + – 0.00089276857 sin 10t + – 0.0099196508 cos 10t – 9.81
– 99.8999 t – 0.10010 t
y· = – 99.8999 C 1 e + – 0.10010 C 2 e +
C 1 = – 0.01094 C 2 = 10.831
– 99.8999 t – 0.10010 t
y = – 0.01094 e + 10.831 e + 0.009960 sin 10t + 0.08976 – 9.81
d 2 use, x(0) = 1
F = M ----- x
dt v(0) = 2
h = 0.5 s
F = 10
M=1
···
x + ··
x + 100x· + 100x = F
Problem 3.31 Use numerical integration to find the system response. Leave the solution in variable form, and then change val-
170
Kd
–1
K = 10Nsm
d
–1
y K = 10Nm
M s
M = 1kg
·
y = 1m y = 0m
0 0
Ks
Problem 3.32 Convert the third order differential equation to state equation form. With a numerical method of your choice, find
the state of the system 1 second later. Show all calculations.
···
x + 4x·· + 2x· + 5x = 10
Problem 3.33 The differential equation below describes a first order system that starts with an initial value of k=20. Find the
state at two milliseconds using a) explicit integration, b) first order numerical integration and c) Runge-Kutta
integration. For the numerical methods use a time step of h=0.001s. The final results must be put in a table for
easy comparison.
·
k + 10k = 5 k 0 = 20
Problem 3.34 Explicitly solve the following differential equation. Verify the result numerically.
2
v· + 20v = 200
Problem 3.35 Given the mass spring damper system below a) develop the state equations, and b) estimate the steady state
171
Kd Ks
Kd
Ks
Kd
Ks
Problem 3.36 Write the differential equations AND state equations for the systems below.
x1 x2
2
Bx· 1
K d1
K s2
M1 K s1 M2
Problem 3.37 Solve the following nonlinear equation using numerical integration in scilab. Note that the velocity term is
squared for aerodynamic drag. When done save a graph of x from 0 to 10 seconds (use a PDF or image format).
·· 2
x + 20 x· + 10x = 10
Problem 3.38 Solve the following differential equation assuming a unit step input.
y· + 2y = x· + 3x
Problem 3.39 Solve the following differential equation assuming a unit step input.
·· y· y
y – --- – --- = ··
x + 2x
6 3
computer applications.
• A matrix has the form seen below,
n columns
If n = m then the matrix is said to be square. Many
applications require square matrices. We may also rep-
a 11 a 21 a n1 resent a matrix as a 1-by-3 for a vector.
a 12 a 22 a n2 m rows
a 1m a 2m a nm
• Matrix operations are available for many of the basic algebraic expressions, examples are given below. There are also
many restrictions - many of these are indicated.
3 4 5 12 13 14 21
A = 2 B = 6 7 8 C = 15 16 17 D = 22 E = 24 25 26
9 10 11 18 19 20 23
Addition/subtraction
3+2 4+2 5+2 3 + 12 4 + 13 5 + 14
A+B = 6+2 7+2 8+2 B + C = 6 + 15 7 + 16 8 + 17
9 + 2 10 + 2 11 + 2 9 + 18 10 + 19 11 + 20
B + D = not valid
B – D = not valid
173
Multiplication/division
3 4 5
3 2 4 2 5 2 --- --- ---
A B = 6 2 7 2 8 2 2 2 2
B
9 2 10 2 11 2 --- = 6
---
7
---
8
---
A 2 2 2
9 10 11
--- ------ ------
2 2 2
3 21 + 4 22 + 5 23
B D = 6 21 + 7 22 + 8 23 D E = 21 24 + 22 25 + 23 26
9 21 + 10 22 + 11 23
Note: To multiply matrices, the first matrix must have the same number of columns as the sec-
ond matrix has rows.
3 12 + 4 15 + 5 18 3 13 + 4 16 + 5 19 3 14 + 4 17 + 5 20
B C = 6 12 + 7 15 + 8 18 6 13 + 7 16 + 8 19 6 14 + 7 17 + 8 20
9 12 + 10 15 + 11 18 9 13 + 10 16 + 11 19 9 14 + 10 17 + 11 20
B B D
---- ---- ---- etc = not allowed (see inverse)
C D B
Determinant
B = 3 7 8 –4 6 8 +5 6 7 = 3 –3 – 4 –6 + 5 –3 = 0
10 11 9 11 9 10
7 8 = 7 11 – 8 10 = – 3
10 11
6 8 = 6 11 – 8 9 = – 6
9 11
6 7 = 6 10 – 7 9 = – 3
9 10
Transpose 3 6 9 24
T T
B = 4 7 10 T E = 25
D = 21 22 23
5 8 11 26
174
T
Adjoint
7 8 – 6 8 6 7 The matrix of determinant to the
10 11 10 11 9 10 left is made up by getting rid of the
row and column of the element, and
B = – 4 5 3 5 – 3 4 then finding the determinant of
10 11 9 11 9 10 what is left. Note the sign changes
on alternating elements.
4 5 – 35 3 4
7 8 68 6 7
x x
–1
B D = I y = y
–1 B
B = --------- z z
B
In this case B is singular, so the
inverse is undetermined, and the
matrix is indeterminate.
–1
D = invalid (must be square)
B I = I B = B
D I = I D = D
–1
B B = I
1 0 0
1 0
1 0 1 0 etc=I
0 1
0 0 1
9 x+6 y+8 z = 7
11 x + 13 y + 10 z = 12
Write down the matrix, then rearrange, and solve.
–1
2 4 3 x 5 x 2 4 3 5
9 6 8 y = 7 y = 9 6 8 7 =
11 13 10 z 12 z 11 13 10 12
9 x+6 y+8 z = 7
11 x + 13 y + 10 z = 12
Write down the coefficient and parameter matrices,
2 4 3 5
A = 9 6 8 B = 7
11 13 10 12
Calculate the determinant for A (this will be reused), and calculate the determinants for
matrices below. Note: when trying to find the first parameter ‘x’ we replace the first col-
umn in A with B.
5 4 3
7 6 8
12 13 10
x = ------------------------------ =
A
2 5 3
9 7 8
11 12 10
y = ------------------------------ =
A
2 4 5
9 6 7
11 13 12
z = ------------------------------ =
A
176
–1
1 2 3 10 1 2 3 1 2 3
4 5 6 11 = 4 2 6 = 4 2 6 =
7 8 9 12 7 8 9 7 8 9
Answer 3.40
–1
1 2 3 10 68 1 2 3 1 23 – 0.833 0.167 0.167
4 5 6 11 = 167 4 2 6 = 36 4 26 = 0.167 – 0.333 0.167
7 8 9 12 266 7 8 9 7 89 0.5 0.167 – 0.167
Answer 3.41
x= 0.273
y= -0.072
z= -0.627
Problem 3.42 Solve the following set of equations using a) Cramer’s rule and b) an inverse matrix.
2x + 3y = 4
5x + 1y = 0
Answer 3.42
a)
4 3 2 4
2 3 x = 4
0 1 4 5 0 – 20 20
5 1 y 0 x = ---------------- = --------- y = ---------------- = --------- = ------
– 13 – 13 13
2 3 2 3
5 1 5 1
b)
T
1 – 5 1 –3 4
–1 – 3 2 – 5 2 4 – ------
x = 2 3 4 = -------------------------------- 4 = ------------------ 1 4 13
- = – ------ =
y 5 1 0 0 – 13 0 13 – 20 20
2 3 ------
5 1 13
177
Problem 3.43 Perform the following matrix calculation. Show all work.
T
A B C X L
D E F Y + M
G H I Z N
Answer 3.43
T T T
A B C X L AX + BY + CZ L AX + BY + CZ + L
D E F Y + M = DX + EY + FZ + M = DX + EY + FZ + M
G H I Z N GX + YH + IZ N GX + YH + IZ + N
= AX + BY + CZ + L DX + EY + FZ + M GX + YH + IZ + N
b) A B C
D E F X Y Z =
G H I
Answer 3.45
a) T
a d e f d e f
b g h k = a b c g h k = ad + bg + cm ae + bh + cn af + bk + cp
c m n p m n p
b)
a b = ad – bc
c d
c) adj
a b d –c d –c
–1 c d – b a ------------------ ------------------
a b = -------------------- = ------------------- = ad – bc ad – bc
c d ad – bc – b - -----------------
a -
a b -----------------
c d ad – bc ad – bc
Problem 3.46 Find the value of ‘x’ for the following system of equations.
x + 2y + 3z = 5 x + 4y + 8z = 0 4x + 2y + z = 1
178
Answer 3.46
1 2 3 x 5
1 4 8 y = 0
4 2 1 z 1
5 23
0 48
1 21 5 4 – 16 + 2 8 – 0 + 3 0 – 4 – 60 + 16 – 12 – 56
x = ------------------ = ---------------------------------------------------------------------------------- = ---------------------------------- = --------- = – 7
1 4 – 16 + 2 32 – 1 + 3 2 – 16 – 12 + 62 – 42 8
1 23
1 48
4 21
b) A B C
D E F X Y Z =
G H I
c)
det A B =
C D
d) A
A B =
C D
e) –1
A B =
C D
Problem 3.48 Solve the following set of equations with the specified methods.
a) Inverse matrix
3x + 5y = 7 b) Cramer’s rule
c) Gauss-Jordan row reduction
4x – 6y = 2
d) Substitution
179
4. Rotation
Topic 4.1 Basic laws of motion.
Topic 4.2 Rotational inertia, combined rotation and translation.
Topic 4.3 Springs, damping, and friction.
Topic 4.4 Design cases.
Objective 4.1 To be able to develop and analyze differential equations for rotational systems.
The equations of motion for a rotating mass are shown in Figure 4.1. Given the angular position, the angular velocity can
be found by differentiating once, the angular acceleration can be found by differentiating again. The angular acceleration can be
integrated to find the angular velocity, the angular velocity can be integrated to find the angular position. The angular acceleration
is proportional to an applied torque, but inversely proportional to the mass moment of inertia.
equations of motion
d eqn 4.1
= -----
dt
T
d d 2 eqn 4.2
= ----- = -----
dt dt
OR eqn 4.3
t = t dt = t dt dt
eqn 4.4
t = t dt
eqn 4.5
t = T t-
---------
JM
where,
, , = position, velocity and acceleration
J M = second mass moment of inertia of the body
T = torque applied to body
Note: A ‘torque’ and ‘moment’ are equivalent in terms of calculations. The main difference is that ‘torque’
normally refers to a rotating moment.
4.1 Modeling
Free Body Diagrams (FBDs) are required when analyzing rotational systems, as they were for translating systems. The
force components normally considered in a rotational system include,
• Inertia - opposes acceleration and deceleration
• Springs - resist deflection
• Dampers - oppose velocity
Inertia
When unbalanced torques are applied to a mass it will begin to accelerate, in rotation. The sum of applied torques is equal
180
, ,
T = JM eqn 4.6
J M = I xx + I yy eqn 4.7
2
I = y dM eqn 4.8
J xx
2
I
yy =
T x dM eqn 4.9
Note: The ‘mass’ moment of inertia will be used when dealing with acceleration of a mass. Later we
will use the ‘area’ moment of inertia for torsional springs.
The mass moment of inertia determines the resistance to acceleration. This can be calculated using integration, or found in
tables. When dealing with rotational acceleration it is important to use the mass moment of inertia, not the area moment of inertia.
where,
Figure 4.3 Parallel axis theorem for shifting a mass moment of inertia
2
J A = J˜A + Ar
where,
Figure 4.4 Parallel axis theorem for shifting a area moment of inertia
181
Aside: If forces do not pass through the center of an object, it will rotate. If the object is made of a
homogeneous material, the area and volume centroids can be used as the center. If the object is made of
different materials then the center of mass should be used for the center. If the gravity varies over the
length of the (very long) object then the center of gravity should be used.
An example of calculating a mass moment of inertia is shown in Figure 4.5. In this problem the density of the material is
calculated for use in the integrals. The integrals are then developed using slices for the integration element dM. The integrals for
the moments about the x and y axes, are then added to give the polar moment of inertia. This is then shifted from the centroid to the
new axis using the parallel axis theorem.
The rectangular shape to the right is constrained to rotate about point A. The
total mass of the object is 10kg. The given dimensions are in meters. Find 4
the mass moment of inertia. -2.5
-5 5
First find the density and calculate the moments of inertia about the centroid.
-1
-4
10Kg –2
= -------------------------------- = 0.125Kgm
2 5m 2 4m
4
4 4 3
2 2 –1 y
I xx = y dM = y 2 5m dy = 1.25Kgm -----
–4 –4 3
–4
3 3
–1 4m – 4m - 2
= 1.25Kgm --------------- – ----------------- = 53.33Kgm
3 3
5
5 5 3
2 2 –1 x
I yy = x dM = x 2 4m dx = 1Kgm -----
–5 –5 3
–5
3 3
–1 5m – 5m 2
= 1Kgm --------------- – ------------------ = 83.33Kgm
3 3
2 2 2
J M = I xx + I yy = 53.33Kgm + 83.33Kgm = 136.67Kgm
The centroid can now be shifted to the center of rotation using the parallel axis theorem.
2 2 2 2 2
J M = J˜M + Mr = 136.67Kgm + 10Kg – 2.5m + – 1m = 209.2Kgm
4
-2.5
-5 5
First, the area moment of inertia is calculated about the centroid by inte- -1
gration. All dimensions are in m.
-4
4m
3 3 3
4m 2 4m 2 y – 4m -
4m - – ------------------ 4
I xx = y dA = y 2 5m dy = 10m ----- = 10m -------------- = 426.7m
– 4m – 4m 3 3 3
– 4m
5m
3 3 3
5m 2 5m 2 x – 5m -
5m - – ------------------ 4
I yy = x dA = x 2 4m dx = 8m ----- = 8m -------------- = 666.7m
– 5m – 5m 3 3 3
– 5m
4 4
J˜A = I xx + I yy = 426.7 + 666.7 m = 1093.4m
Next, shift the area moment of inertia from the centroid to the other point of rotation.
2
J A = J˜A + Ar
4 2 2
= 1093.4m + 4m – – 4m 5m – – 5m – 1m + – 2.5m
4
= 1673m
2 eqn 4.10
Note: The basic definitions for the area moment I xx = y dA
of inertia are shown to the right.
2 eqn 4.11
I yy = x dA
J A = I xx + I yy eqn 4.12
2
J A = J˜A + Ar eqn 4.13
Note: You may notice that when the area moment of inertia is multiplied by the density of the material, the mass
moment of inertia is the result. Therefore if you have a table of area moments of inertia, multiplying by density
will yield the mass moment of inertia. Keep track of units when doing this.
Springs
Twisting a rotational spring will produce an opposing torque. This torque increases as the deformation increases. A simple
example of a solid rod torsional spring is shown in Figure 4.7. The angle of rotation is determined by the applied torque, T, the
shear modulus, G, the area moment of inertia, JA, and the length, L, of the rod. The constant parameters can be lumped into a single
spring coefficient similar to that used for translational springs.
183
L
JA G eqn 4.14
T = ----------
L
eqn 4.15
T = KS
Note: Remember to use radians for these calculations. In fact you are advised to use radians for all calcu-
lations. Don’t forget to set your calculator to radians also.
The spring constant for a torsional spring will be relatively constant, unless the material is deformed outside the linear
elastic range, or the geometry of the spring changes significantly.
When dealing with strength of material properties the area moment of inertia is required. The calculation for the area
moment of inertia is similar to that for the mass moment of inertia. An example of calculating the area moment of inertia is shown
in Figure 5.10--, and based on the previous example in Figure 4.6--. The calculations are similar to those for the mass moments of
inertia, except for the formulation of the integration elements. Note the difference between the mass moment of inertia and area
moment of inertia for the part. The area moment of inertia can be converted to a mass moment of inertia simply by multiplying by
the density. Also note the units.
An example problem with torsional springs is shown in Figure 4.8. There are three torsional springs between two rotating
masses. The right hand spring is anchored solidly in a wall, and will not move. A torque is applied to the left hand spring. Because
the torsional spring is considered massless the torque will be the same at the other end of the spring, at mass J1. FBDs are drawn for
both of the masses, and forces are summed. (Note: the similarity in the methods used for torsional, and for translational springs.)
These equations are then rearranged into state variable equations, and finally put in matrix form.
184
JM JM
K s1 1 K s2 2 K s3
Model the system above assuming that the center shaft is a torsional spring, and that a torque is applied to
the left most disk. Leave the results in state variable form.
1
··
K s2 + M = – K s2 1– 2 = JM 1
1– 2 1
··
JM = – K s2 1 + K s2 2 +
1 1
· eqn 4.16
JM 1 = 1
1 – K s2 K s2
· -----------
- ---------
- ---------- eqn 4.17
1 = JM 1+ J 2+J
1 M1 M1
2
··
K s2 + M = – K s2 2 – 1 – K s3 2 = J M 2 2
2– 1
·· – K s3 – K s2 K s2
2 =
----------------------------- ---------
2+ J
- 1
JM M2
2
JM · eqn 4.18
2 2 = 2
· – K s3 – K s2 K s2 eqn 4.19
K s3 2 ----------------------------- ---------
-
2 = JM 2+ J 1
2 M2
0 1 0 0
– K s2 K s2 0
1 -----------
- 0 ---------
- 0 1
JM JM ----------
d-
---- 1 = 1 1 1 + J
M1
dt 0 0 0 1
2 2
K s2 – K s3 – K s2 0
2 ---------
- 0 ----------------------------
- 0 2 0
JM JM
2 2
Damping
Rotational damping is normally caused by viscous fluids, such as oils, used for lubrication. It opposes angular velocity
with the relationships shown in Figure 4.9. The first equation is used for a system with one rotating and one stationary part. The
185
T
1
T = Kd
T 2
T = Kd 1– 2
The example in Figure 4.8 is extended to include damping in Figure 4.10. The primary addition from the previous exam-
ple is the addition of the damping forces to the FBDs. In this case the damper coefficients are indicated with ‘B’, but ‘Kd’ could
have also been used. The state equations were developed in matrix form. Visual comparison of the final matrices in this and the
previous example reveal that the damping terms are the only addition.
186
JM JM
K s1 1 K s2 2 K s3
B1 B2
Model the system above assuming that the center shaft is a torsional spring, and that a torque is applied to
the left most disk. Leave the results in state variable form.
1
· ··
K s2 + M = – K s2 1 – 2 – B1 1 = JM1 1
1– 2
·· ·
JM = – B 1 1 – K s2 1 + K s2 2 +
1 1
· eqn 4.20
JM 1 = 1
1
· –B – K s2 K s2
1 =
---------1- 1+
------------ ---------
1+ J
- 2+J
---------- eqn 4.21
JM JM M1 M1
· 1 1
B1 1
2
· ··
K s2 + M = – K s2 2 – 1 – B 2 2 – K s3 2 = J M 2 2
2– 1
·· –B · – K s3 – K s2 K s2
2 =
---------2- 2 + ----------------------------
- ---------
2+ J
- 1
JM JM M2
2 2
JM · eqn 4.22
2 2 = 2
· –B – K s3 – K s2 K s2 eqn 4.23
K s3 2
· 2 =
---------2- 2+
----------------------------- ---------
2+ J
- 1
B2 2 JM JM M2
2 2
0 1 0 0
– K s2 –B K s2 0
1 -----------
- ---------1- ---------
- 0 1
JM JM JM ----------
d- 1 = 1 1 1 1 + J
---- M1
dt 0 0 0 1
2 2
K s2 – K s3 – K s2 –B 0
2 ---------
- 0 ----------------------------- ---------2- 2 0
JM JM JM
2 2 2
Friction
Friction between rotating components is a major source of inefficiency in machines. It is the result of contact surface
materials and geometries. Calculating friction values in rotating systems is more difficult than translating systems. Normally rota-
tional friction will be given as static and kinetic friction torques.
187
An example problem with rotational friction is shown in Figure 4.11. Basically these problems require that the model be
analyzed as if the friction surface is fixed. If the friction force exceeds the maximum static friction the mechanism is then analyzed
using the kinetic friction torque. There is friction between the shaft and the hole in the wall. The friction force is left as a variable
for the derivation of the state equations. The friction value must be calculated using the appropriate state equation. The result of
this calculation and the previous static or dynamic condition is then used to determine the new friction value.
JM s £ 10Nm
a k = 6Nm
1
··
+ M = a – f = JM
f
·· a– f eqn 4.24
= ----------------
JM
JM
· eqn 4.25
=
a –
· a + -------f eqn 4.26
= -------
JM JM
Next, the friction torque must be calculated, and then used to determine the new static case force.
· eqn 4.27
f = a – JM
cases:
It was not slipping previously (slip == 0)
if
f > 10Nm then
slip = 1
f = – 6 sign f Nm
else
= 0
now = 0 slip = 0
else
f = 6sign Nm
The friction example in Figure 4.11 can be analyzed using the C program in Figure 4.12. For the purposes of the example
some component values are selected and the system is assumed to be at rest initially. The program loops to integrate the state equa-
tions. Each loop the friction conditions are checked and then used for a first-order solution to the state equations.
188
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
int main(){
double h = 0.01, /* time step */
theta, w, /* the state variables */
acceleration, /* the acceleration */
w_last = 0, /* to store the previous value of w for direction change */
Tf, /* the friction test force */
Ttest,
J = 100, /* the moment of inertia (I picked a value) */
Ta_mag = 11, /* the applied torque (I picked a value) */
Ta_freq = 2, /* the freq of oscillation */
Ta, /* the applied force */
t = 0; /* time */
int slip = 0; /* the system starts with no slip */
FILE *fp;
Figure 4.13 Example: Simulation Results for Rotational Friction. Series 1:theta, 2:omega, 3:alpha
DC motors create a torque between the rotor (inside) and stator (outside) that is related to the applied voltage or current. In
a permanent magnet motor there are magnets mounted on the stator, while the rotor consists of wound coils. When a voltage is
applied to the coils the motor will accelerate. The differential equation for a motor is shown in Figure 4.14, and will be derived in a
later chapter. The value of the constant ‘K’ is a function of the motor design and will remain fixed. The value of the coil resistance
‘R’ can be directly measured from the motor. The moment of inertia ‘J’ should include the motor shaft, but when a load is added
this should be added to the value of ‘J’.
190
2
d K K- T load
\ ----- + ------- = V ----- – ---------------
dt JR s JR J
M
where,
The speed response of a permanent magnet DC motor is first-order. The steady-state velocity will be a straight line func-
tion of the torque applied to the motor, as shown in Figure 4.15. In addition the line shifts outwards as the voltage applied to the
motor increases.
ss
E = EK + EP eqn 4.28
2 eqn 4.29
EK = JM
EP = T eqn 4.30
P = T eqn 4.31
2
J Kgm
M
rpm
2400
R = 40
0.5s
2 T load
d K K
----- + ----------- = V ----------- – ---------------
dt m m J R s J R JM
M M
The steady-state velocity can be used to find the value of K.
2
rot- K K
0 + 2400 -------- ----------- = 15V ----------- – 0
min JM R JM R
2
1 - = 2s – 1
K = ---------
-----------
JM R 0.5s
– 3 Vs 2
39.8 10 ---------
rad -4 –6 2
J = ------------------------------------------------ = 0.198005 10 = 19.8 10 Kgm
–1
40 2s
–1 –1 –2 T load
d-
---- + 2s = V 50.3V s rad – ----------------------------------------------
dt m m s –6 2
19.8 10 Kgm
eqn 4.32
m' = m
–1 –2 –1 –1 –2 eqn 4.33
m' = V s 50.3V s rad – m 2s – 50505Kg m T load
Figure 4.17 Example: Motor speed curve and the derived differential equation
The remaining equations describing the system are developed in Figure 4.18. These calculations are done with the
assumption that the inertial effects of the gears and other components are insignificant.
193
The long shaft must now be analyzed. This will require that angles at both ends be defined, and the shaft
be considered as a spring.
gear gear = angular position and velocity of the shaft at the gear box
pinion pinion = angular position and velocity of the shaft at the pinion
1 1
------
gear = 20 m
------
gear = 20 m
The rotation of the pinion is related to the displacement of the rack through the circumferential travel. This
ratio can also be used to find the force applied to the mass.
K s gear – pinion
-------------------------------------------------- = M mass ··pinion 6in
6in
--------
2
·· –6 –2 –1
pinion = gear – pinion 1.768 10 in Kg Ks
·· 1 –6 –2 –1 0.0254in 2
------
pinion = 20 m – pinion 1.768 10 in Kg K s ---------------------
1.0m
·· 1- –9 –2 –1
pinion =
----- – pinion 1.141 10 m Kg Ks
20 m
· eqn 4.34
pinion = pinion
· – 12 – 2 –1 –9 –2 –1 eqn 4.35
pinion = 57.1 10 m Kg K s m – 1.141 10 m Kg K s pinion
If the gear box is assumed to have relatively small moment of inertia, then we can say that the torque load on the motor is
equal to the torque in the shaft. This then allows the equation for the motor shaft to be put into a useful form, as shown in Figure
4.19. Having this differential equation now allows the numerical analysis to proceed. The analysis involves iteratively solving the
equations and determining the point at which the system begins to overshoot, indicating critical damping.
194
· –1 –2 –1 –1 –2 1
m = V s 50.3V s rad – m 2s – 50505Kg m K s ------ m – pinion
20
· –1 –2 –1 –2 –1 –1 –2
m = V s 50.3V s rad + pinion 50505Kg m Ks + m –2 s + m – 2525 Kg m Ks
The state equations can then be put in matrix form for clarity. The units will be eliminated for brevity,
but acknowledging that they are consistent.
m 0 1 0 0 m 0
d- – 2525 K s –2 50505K s 0 V s 50.3
---- m = m +
dt 0 0 0 1 0
pinion pinion
– 12 –9 0
pinion 57.1 10 K s 0 – 1.141 10 Ks 0 pinion
The state equations for the system are then analyzed using a computer for the parameters below to find
the Ks value that gives a response that approximates critical damping for a step input from 0 to 10V.
Ks Overshoot
(rad/Nm) (rad)
100
These results indicate that a spring value of XXX is required to have the system behave as if it is critically damped. (Note:
Clearly this system is not second order, but in the absence of another characteristics we approximate it as second order.)
4.1 Summary
• The basic equations of motion were discussed.
• Mass and area moment of inertia are used for inertia and springs.
• Rotational dampers and springs.
• A design case was presented.
Problem 4.2 Find the second area and mass moments of inertia for a rectangle about the y-y axes. Assume that the rectangle is
195
Problem 4.3 The 20cm diameter 10 kg cylinder is sitting in a depression that is effectively frictionless. The cylinder starts at
rest. If a torque of 10 Nm is applied, what will the angular velocity be after 5s?
Problem 4.4 Find the polar moments of inertia of area and mass for a round cross section with known radius and mass per unit
area. How are they related?
Problem 4.5 Find the mass moment of inertia for the plate as shown. The total mass is 10Kg and it is pinned to rotate near the
lower left corner. You may choose to use any solution method, but all steps must be described.
0.3m
0.05m
0.2m
Problem 4.6 The rectangular shape to the right is constrained to rotate about point A. The total mass of the object is 10kg. The
given dimensions are in meters. Find the mass moment of inertia WITHOUT using the parallel axis theorem.
4
-2.5
-5 5
-1
-4
Problem 4.7 For a 1/2" 1020 steel rod that is 1 yard long, find the torsional spring coefficient.
Problem 4.8 If a wheel (JM=5kg m2) is turning at 150 rpm and the damper coefficient is 1Nms/rad, what is the deceleration?
Problem 4.9 Find the response as a function of time (i.e. solve the differential equation to get a function of time.). Assume the
196
= 10Nm
Ks 2
J M = 1Kgm
Ns
JM K d = 3 ------
m
N
K s = 9 ----
m
Kd
Problem 4.10 Draw the FBDs and write the differential equations for the mechanism below. The right most shaft is fixed in a
wall.
1 2
JM JM
1 2
Ks1 Ks2
Problem 4.11 The rotational spring is connected between a mass ‘J’, and the wall where it is rigidly held. The mass has an
applied torque ‘T’, and also experiences damping ‘B’.
a) Derive the differential equation for the rotational system shown.
b) Put the equation in state variable form (using variables) and then plot the position (not velocity) as a function
of time for the first 5 seconds with your calculator using the parameters below. Assume the system starts at rest.
Nm Nms
K s = 10 --------- B = 1 -----------
rad rad
T
2 J
J M = 1Kgm T = 10Nm Ks
B
c) A differential equation for the rotating mass with a spring and damper is given below. Solve the differential
equation to get a function of time. Assume the system starts at rest.
–1 –2 –2
'' + 1s ' + 10s = 10s
197
Problem 4.12 Calculate the area and mass moments of inertia for the 1kg plate in the figure.
0.15m
0.08m
0.10m
0.06m
5 = 48.5rad
rad
5 = 17 ---------
s
198
Answer 4.2
Given:
h/2
M = mass
h = height
-w/2 w/2
w = width
-h/2 dx
For Area:
w w w
---- ---- ----
2 2 2
3 3
2 2 hx h w 3 w 3 w
I yy = x dA = x h dx = -------- = --- ---- – – ---- = h ------
3 3 2 2 12
w
w w – ----
– ---- – ---- 2
2 2
For Mass:
M M
= ----- = -------
A hw
M M
dM = dA = ------- hdx = ----- dx
hw w
w w w
---- ---- ----
2 2 2
3 3 3 2
M
----- dx = Mx M w
---- – – w
2 2 w
I yy = x dM = x ---------- = ------- ---- = M ------
w 3w 3w 2 2 12
w
w w – ----
– ---- – ---- 2
2 2
Answer 4.3
2 2
t = -- dt dt = -- t + C 1 dt = ------ t + C 1 t + C 2 = ------ t + v 0 t + x 0
J J 2J 2J
2 2
Mr 10Kg 0.10m 2 Note: The units all cancel but
J = ---------- = ------------------------------------- = 0.05Kgm
2 2 rad is added for angular dis-
placement.
2
10Nm 2 10 Ns
5s = ---------------------------------- 5s + 0 + 0 = ------------------ 25 ------------ = 2500rad
2 2 0.05 Kgm
2 0.05Kgm
10Nm –1
5s = -- t + v 0 = ------------------------- 5s + 0 = 1000s rad
J 2
0.05Kgm
199
Answer 4.4
For area:
R R R R
4 4
2 2 3 r R
J area = r dA = r 2 r dr = 2 r dr = 2 ----- = ----------
4 2
0
For mass: 0 0 0
M M
= ----- = ----------
A 2
R
R R R R
4 4 2
2 2 3 r R MR
J mass = r dM = r 2 r dr = 2 r dr = 2 ----- = ---------- = -----------
4 2 2
0
0 0 0
The mass moment can be found by multiplying the area moment by the area density.
Answer 4.5
M 10Kg kg
= ----- = ------------------------------------------ = 333 -------
A 0.5 0.2m 0.3m 2
m
0.25
˜ = 2 0.2
I yy x ------- x + 0.05 dx
0.3
– 0.05
0.25 0.25
4 3
˜ = 2---
I yy
3 2 2
x + 0.05x dx = ---
x
----- + 0.05x
----------------
3 3 4 3
– 0.05
– 0.05
4 3 4 3
˜ = 2--- 333 ------------
I yy
0.25
- + 0.05 0.25 - --------------------
---------------------------- –
– 0.05 - 0.05 – 0.05
– --------------------------------
3 4 3 4 3
˜ = 0.2754kgm 2
I yy
0.2
˜ = 2 – 0.3
I xx y ---------- y – 0.2 dy
0.2
0
0.2 0.2
4 3
˜ = – 1.5 3 2 y 0.2y -
I xx y – 0.2y dy = – 1.5 ----- – ------------
4 3
0
0
4 3
0.2 - 0.2
˜ = – 1.5 333 --------- 0.2 2
I xx – ----------------------- = 0.0666kgm
4 3
Answer 4.6
2
I M = 63.33Kgm
x
2
I M = 145.8Kgm
y
2
J M = 209.2Kgm
Answer 4.7
Nm
K s = 215 ---------
rad
Answer 4.8
·· rad
= – 3.141 ---------
2
s
Answer 4.9
10 – 1.5t 27
t = ------ + – 1.283 e cos ---------- t – 0.524
9 2
Answer 4.10
1 2
T K s1 1– 2
JM JM
1 2
K s1 ·
1– 2 B 2
K s2 2
··
+ M 1 = T – K s1 1– 2
= JM 1
1
·· K s1 – K s1 T-
---------
1+ 1 J
- + 2 -----------
- = ---------
M1 J M1 J M1
· ··
+ M 2 = K s1 1 – 2 – B 2 – K s2 2 = J M 2
2
·· · ---------
B- K s1 + K s2 – K s1
2+ 2 J + 2 ------------------------- + 1 ------------ = 0
M2 JM JM
2 2
201
Answer 4.11 a)
a) T · ··
M = T – Ks – B = JM
+
J
M
·· ·
J +B +K = T
M s
· Ks K
·· · B
B + ------- + -------s = -------
T
JM JM JM
· K
T s B
b) ' = = ------- – ------- – -------
JM JM JM
Nm Nms
10 --------- 1 ------------
· 10Nm rad rad
= ------------------- – ------------------- – -------------------
2 2 2
2 1Kgm 1Kgm 1Kgm
· Nm 10 s
= --------------- 10 – --------- – --------
1 2 rad rad
Kgm
Kgm
------------ m
0 2
· s 10 s
5s = ----------------------- 10 – --------- – --------
2 rad rad
Kgm
· –2 10 s
= s 10 – --------- – ---------
rad rad
202
c)
homogeneous:
·· –1 · –2
+ 1s + 10s = 0
guess: At · At ·· 2 At
= e = Ae = A e
h h h
2 At –1 At – 2 At
A e + 1s Ae + 10s e = 0
2 –1 –2 –1 –1 2 –2
A + 1s A + 10s = 0 – 1s 1s – 4 1 10s
A = ------------------------------------------------------------------------------------
2 1
–1 –2 –2
– 1s 1s – 40s –1
A = ------------------------------------------------------------ = – 0.5 j3.123 s
2 1
–1
– 0.5s t –1
= C e cos 3.123s t + C
h 1 2
particular:
–1 –2 –2
'' + 1s ' + 10s = 10s
· ··
guess: p = A p = 0 p = 0 –2
–1 –2 –2 10s - = 1
0 + 1s 0 + 10s A = 10s A = --------------
–2
10s
p = 1
Initial conditions:
–1
– 0.5s t –1
t = C1 e cos 3.123s t + C2 + 1
–1
– 0.5s 0 –1
0 = C1 e cos 3.123s 0 + C2 + 1 = 0
C 1 cos C 2 + 1 = 0
–1 –1
–1 – 0.5s t –1 –1 – 0.5s t –1
' t = – 0.5s C 1 e cos 3.123s t + C 2 – 3.123s C 1 e sin 3.123s t + C 2
–1 –1
' 0 = – 0.5s C 1 1 cos C 2 – 3.123s C 1 1 sin C 2 = 0
Answer 4.12
As integrals:
0.2m
0.15m
0.05m
Problem 4.14 For the shape a) find the area of the shape, b) find the centroid of the shape, and c) find the moment of inertia of
the shape about the centroid.
y
2
y = x+2
4 x
204
A = contained area
P = perimeter distance
V = contained volume
S = surface area
x y z = centre of mass
x y z = centroid
Area Properties:
2
Ix = y dA = the second moment of inertia about the y-axis
A
2
Iy = x dA = the second moment of inertia about the x-axis
A
2 2 2
JO = r dA = x + y dA = I x + I y = The polar moment of inertia
A A
x dA
A
x = ------------- = centroid location along the x-axis
dA
A
y dA
A
y = ------------- = centroid location along the y-axis
dA
A
205
Rectangle/Square: y
A = ab
P = 2a + 2b
a
b
Centroid: Moment of Inertia Moment of Inertia
(about centroid axes): (about origin axes):
3 3
b
x = --- I x = ba
--------- I x = ba
---------
2 12 3
3 3
Iy = b
--------a- Iy = b
--------a-
y = --a- 12 3
2
2 2
b a
I xy = 0 I xy = -----------
-
4
Triangle: y
bh
A = ------
2 a
P = h
x
2 2
bh bh
I xy = --------- 2a – b I xy = --------- 2a – b
72 24
206
Circle: y
r
2
A = r
P = 2 r
Half Circle: y
2
r
A = --------
2
P = r + 2r r
x
x = r 8 4 4
I x = --- – ------ r r
8 9 I x = --------
8
4r- 4
y = ----- r 4
3 I y = -------- r
I y = --------
8 8
I xy = 0 I xy = 0
207
Quarter Circle: y
2
r
A = --------
4
r
P = ----- + 2r
2 r
x
4 4
I xy = – 0.01647 r I xy = r-----
8
Circular Arc: y
2
r
A = --------
2
P = r + 2r
r
x
4
2r sin --- r
2- Ix = I x = ----- – sin
x = ---------------- 8
3
4
Iy = I y = r----- + sin
y = 0 8
I xy = I xy = 0
208
Ellipse: y
r
1
A = r1 r2 r
2
--- 2 2
2 r1 + r2 2
P = 4r 1 1 – --------------------- sin d x
0 a
2 2
r1 + r2
P 2 ---------------- Moment of Inertia Moment of Inertia
2 Centroid:
(about centroid axes): (about origin axes):
3
x = r r1 r2
2 I x = -------------- Ix =
4
3
r1 r2
y = r1 I y = -------------- Iy =
4
I xy = I xy =
Half Ellipse: y
r1 r2
A = --------------
2
r1
--- 2 2
2 r1 + r2 2 r2
P = 2r 1 1 – --------------------- sin d + 2r 2 x
0 a
2 2
r1 + r2
Pª ---------------- + 2r 2
2 Centroid: Moment of Inertia Moment of Inertia
(about centroid axes): (about origin axes):
3
x = r2 r2 r1
3 I x = --------------
I x = 0.05488r 2 r 1 16
4r 1 3
3 r2 r1
y = -------- I y = 0.05488r 2 r 1 I y = --------------
3 16
2 2
2 2 r1 r2
I xy = – 0.01647r 1 r 2 I xy = ----------
8
209
Quarter Ellipse: y
r r
1 2
A = --------------
4
r
2 2 1
--- r1 + r2
2 2 r
P = r1 1 – --------------------- sin d + 2r 2 2 x
0 a
2 2
r1 + r2
P ª --- ---------------- + 2r 2 Centroid: Moment of Inertia Moment of Inertia
2 2 (about centroid axes): (about origin axes):
4r 3
2 Ix = Ix = r2 r1
x = --------
3
4r 3
Iy = Iy = r2 r1
y = -------1-
3
2 2
r2 r1
I xy = I xy = ----------
8
Parabola: y
2
A = --- ab
3
a
2 2 2 2 2
b + 16a b 4a + b + 16a
P = ----------------------------- + ------ ln ----------------------------------------- x
2 8a b
x = b--- Ix = Ix =
2
Iy = Iy =
y = 2a
------
5
I xy = I xy =
210
Half Parabola: y
ab
A = ------
3
a
2 2 2 2 2
b + 16a - + b ln 4a + b + 16a
P = ---------------------------- --------- ----------------------------------------- x
4 16a b
b
• A general class of geometries are conics. This for is shown below, and can be used to represent many of the simple
shapes represented by a polynomial.
2 2
Ax + 2Bxy + Cy + 2Dx + 2Ey + F = 0
Conditions
A = B = C = 0 straight line
B = 0, A = C circle
2 ellipse
B – AC < 0
2 parabola
B – AC = 0
2 hyperbola
B – AC > 0
211
Volume Properties:
2
Ix = r x dV = the moment of inertia about the x-axis
V
2
Iy = r y dV = the moment of inertia about the y-axis
V
2
Iz = r z dV = the moment of inertia about the z-axis
V
x dV
V
x = ------------- = centroid location along the x-axis
dV
V
y dV
V
y = ------------- = centroid location along the y-axis
dV
V
z dV
V
z = ------------- = centroid location along the z-axis
dV
V
212
Parallelepiped (box): y
V = abc c
z
S = 2 ab + ac + bc
b
x
Sphere: y
r
3
V = 4--- r
3
z
2
S = 4 r
x
Hemisphere: y
2 3
V = --- r
3
z
S = r
x
83 2
I = --------- Mr I =
x = r x 320 x
2
2Mr -
I y = ------------- Iy =
3r 5
y = -----
8
83- Mr 2
I z = -------- Iz =
z = r 320
Cap of Sphere: y
2 h
V = 1--- h 3r – h
3
z
S = 2 rh r
x
y =
Iy = Iy =
z = r
Iz = Iz =
214
Cylinder: y
r
2
V = h r h
2 z
S = 2 rh + 2 r
x
2 2 2 2 2 2
h r h r M 3r + h
x = r I x = M ------ + ----- I x = M ------ + ----- J x = -------------------------------
12 4 3 4 12
2 2
h Mr Mr
y = --- I y = ---------- I = J y = ----------
2 y 2
2
2 2 2 2 2 2
h - + r----- M 3r + h
z = r I z = M ----- Iz = M h
------ + r----- J z = -------------------------------
12 4 3 4 12
Cone: y
1 2
V = --- r h
3
2 2 z h
S = r r +h r
x
Tetrahedron: y
z
1
V = --- Ah
3
h
A x
h
y = --- Iy = Iy =
4
z = Iz = Iz =
Torus: y
r2
1 2 2
V = --- r1 + r2 r2 – r1
4 r1
z
2 2 2
S = r2 – r1 x
z = r2 Iz = Iz =
216
Ellipsoid: y
r r
2 3
4
V = --- r r r
3 1 2 3
z r
1
S =
x
y = r2 Iy = Iy =
z = r3 Iz = Iz =
Parabaloid: y
2
V = 1--- r h
2 h
z
S = r
x
y = Iy = Iy =
z = r Iz = Iz =
217
5. Mechanisms
Topic 5.1 Levers, gears and belts.
Topic 5.2 Design cases.
Objective 5.1 To be able to develop and analyze systems with rotation, translation, and complex components.
Mechanisms contain multiple components connected together to perform a complex function. The first step in analysis of
mechanisms is to break the device into multiple rigid bodies with clearly defined contact points. Components, such as gears, result
in more complex interactions.
A system is built by connecting components together. These connections can be rigid or moving. In solid connections all
forces and moments are transmitted and the two pieces act as a single rigid body. In moving connections there is at least one degree
of freedom. If we limit this to translation only, there are up to three degrees of freedom, x, y and z. In any direction there is a degree
of freedom, a force or moment cannot be transmitted.
When constructing FBDs for a system we must break all of the components into individual rigid bodies. Where the mech-
anism has been broken the contact forces must be added to both of the separated pieces. Consider the example in Figure 5.1. At
joint A the forces are written as two components in the x and y directions. For joint B the force components with equal magnitudes
but opposite directions are added to both FBDs.
F Ay F By
A F Ax
F Bx
M1
B
M1 g M2 g
M2
F Bx
Levers
The lever shown in Figure 5.2 can be used to amplify forces or motion. Although theoretically a lever arm could rotate
fully, it typically has a limited range of motion. The amplification is determined by the ratio of arm lengths to the left and right of
218
the center.
F
2 Note: As the lever rotates the
length ratio will be maintained
d d because of similar triangles. This
1 2
allows the lever to work over a
2 range of angles. The lever above
would become ineffective if it
F1
d1 F2 was vertical.
1
------ = ------ = ------
d F
1 2 1 2
While levers amplify forces and motions over limited ranges of motion, gears can rotate indefinitely. Some of the basic
gear forms are listed below.
• Spur - Round gears with teeth parallel to the rotational axis.
• Rack - A straight gear (used with a small round gear called a pinion).
• Helical - The teeth follow a helix around the rotational axis.
• Bevel - The gear has a conical shape, allowing forces to be transmitted at angles.
Gear teeth are carefully designed so that they will mesh smoothly as the gears rotate. The forces on gears acts at a tangen-
tial distance from the center of rotation called the pitch diameter. The ratio of motions and forces through a pair of gears is propor-
tional to their radii, as shown in Figure 5.3. The number of teeth on a gear is proportional to the diameter. The gear ratio is used to
measure the relative rotations of the shafts. For example a gear ratio of 20:1 would mean the input shaft of the gear box would have
219
, , , , , ,
1 1 1 1 F , –v 2 2 2 2
c c
n ,r n ,r
1 1 2 2
F ,v
c c
n n r n
1 = ----1- = -----1-
1 = Fc r1 2 = Fc r2 -----1- = -----2- -----
r1 r2 2 r2 n2
r2 – – – n
vc = 1 r1 = – 2 r2 ----- = ---------1- = ---------1- = ------------1- = -----2-
r1 2 2 2
n1
where,
n = number of teeth on respective gears
r = radii of respective gears
Fc = reaction force of contact between gear teeth
vc = tangential velocity of gear teeth
= Torque on gears
For lower gear ratios a simple gear box with two gears can be constructed. For higher gear ratios more gears can be added.
To do this, compound gear sets are required. In a compound gear set two or more gears are connected on a single shaft, as shown in
Figure 5.4. In this example the gear ratio on the left is 4:1, and the ratio for the set on the right is 4:1. Together they give a gear ratio
of 16:1.
N 2 = 60
N2 N4
N 5 = 15 e = -------------- = 16
N3 N5
N 3 = 15
N 4 = 60
A manual transmission is shown in Figure 5.5. In the transmission the gear ratio is changed by sliding (left-right) some of
220
the gears to change the sequence of gears transmitting the force. Notice that when in reverse an additional compound gear set is
added to reverse the direction of rotation.
9
clutch 8
stem gear
2 7
Motor shaft
reverse idler
3 4
10
11
6
5
Speed (gear) Gear Train In this manual transmission the gear shifter will
move the gears in and out of contact. At this point
1 2-3-6-9 all of the needed gears will be meshed and turning.
2 2-3-5-8 The final step is to engage the last gear in the gear
3 2-3-4-7 train with the clutch (plate) and this couples the
4 bypass gear train gears to the wheels.
reverse 2-3-6-10-11-9
Rack and pinion gear sets are used for converting rotation to translation. A rack is a long straight gear that is driven by a
small mating gear called a pinion. The basic relationships are shown in Figure 5.6.
T = Fr Vc = r l = r
where,
r = radius of pinion
F = force of contact between gear teeth
Vc = tangential velocity of gear teeth and velocity of rack
T = torque on pinion
Belt based systems can be analyzed with methods similar to gears (with the exception of teeth). A belt wound around a
drum will act like a rack and pinion gear pair. A belt around two or more pulleys will act like gears.
221
5.1 Summary
• The basic equations of motion were discussed.
• Mass and area moment of inertia are used for inertia.
JM
1
2
R2
JM
2
Ks
Kd
x1
x2 M1
Problem 5.2 Given a lever set to lift a 1000 kg rock - if the lever is 2m long and the distance from the fulcrum to the rock is
10cm, how much force is required to lift it?
Problem 5.3 A lever arm has a force on one side, and a spring damper combination on the other side with a suspended mass.
The moment J1 is about the pivot point. For the system a) write the differential equations (assume small angular
deflections) and b) put the equations in state variable form.
K d1
R1 R2
J2 M2
x2
K s1
F
M1
x1
Problem 5.4 A gear train has an input gear with 20 teeth, a center gear that has 100 teeth, and an output gear that has 40 teeth.
If the input shaft is rotating at 5 rad/sec what is the rotation speed of the output shaft? What if the center gear is
222
removed?
Problem 5.5 This system consists of two gears with fixed centers of rotation and lever arms. a) Write the differential equations
(assume small angular deflections) and b) put the equations in state variable form. All moment of inertia values
are about the pivot [Link] the mass of the R1 and R2 arms is negligible.
R1 R2
JM , N1 x2
x1 1 JM , N2
2
F1
Kd1 Ks1
M3 x3
Problem 5.6 A round drum with a slot. The slot drives a lever arm with a suspended mass. A force is applied to a belt over the
drum. For the system a) write the differential equations (assume small angular deflections) and b) put the equa-
tions in state variable form.
R1 R2 R3 R4
J1
Kd1 Ks1
1
F1
M1 x1
Problem 5.7 Two gears have a force on one side, and a mass on the other, both suspended from moment arms. There is a rota-
tional damping on one of the gears. The moments of inertia are given about the pivot points. For the system a)
write the differential equations (assume small angular deflections) and b) put the equations in state variable form.
223
Kd1
N1 N2
J1 J2
F1 Ks1
1
2
M1 x1
Problem 5.8 Two gears have levers attached. On one side is a mass, the other side a spring damper pair. A torque is applied to
one gear. Assume the mass remains in contact with the lever. Both moments of inertia are about the pivot points.
For the system a) write the differential equation for the system with theta2 as the output (assume small angular
deflections) and b) put the equations in state variable form. The mass of the arms is much lower than the gears
and can be ignored.
R2
R1
2
N2 M1
N1
x1
J1 J2
x2 1 T1
Kd1 Ks1
Problem 5.9 The system below consists of two masses hanging by a cable over mass ‘JM’. There is a spring in the cable near
M2. The cable doesn’t slip on ‘J’. a) Derive the differential equations for the following system. b) Convert the
224
R
JM
K s1
K s2
x1 M1
M2 x2
Problem 5.10 Write the state equations for the system to relate the applied force ‘F’ to the displacement ‘x’. Note that the rotat-
ing mass also experiences a rotational damping force indicated with Kd1
K d1
F
r
JM
M
K s2
K s1 K s3
K d2
Problem 5.11 A mass slides on a plane with dry kinetic friction (0.3). It is connected to a round mass that rolls and does not
slip. For the system a) write the differential equations (assume small angular deflections) and b) put the equations
225
Kd1
Ks1
M1 x1
Ks2
x2
JM , R
2 2
3 M2 2
F2
Problem 5.12 A pulley system has the bottom pulley anchored. A mass is hung in the middle of the arrangement with springs
and dampers on either side. Assume that the cable is always tight. For the system a) write the differential equa-
tions (assume small angular deflections) and b) put the equations in state variable form.
Kd3 Ks3
M3 x3
Ks2 F1
R2,J2,M2
x2
1
R1,J1
Problem 5.13 A mass is suspended over a lever arm. Forces are applied to the lower side of the moment arm through a spring
damper pair. For the system a) write the differential equations (assume small angular deflections) and b) put the
226
M1
x1
K d1
K s1
R1 R2
x2
K d2 K s2
F1 x3
Problem 5.14 Analyze the system pictured below assuming the rope remains tight.
J,R
F
F = 10N
N
M 1 = 1kg K s1 = 100 ----
m
M1 N
Ks1 y M 2 = 1kg K s2 = 100 ----
m
Kd1 Ns
k R = 0.1m K d1 = 50 ------
m
2 Ns
M2 J = 10Kgm K d2 = 50 ------
m
Kd2
Ks2
a) Draw FBDs and write the differential equations for the individual masses.
b) Write the equations in state variable matrix form.
c) Use Runge-Kutta integration to find the system state after 1 second.
Problem 5.15 The system below is comprised of two masses. There is viscous damping between the masses and between the
bottom mass and the floor. The masses are also connected with a cable that is run over a massless and frictionless
227
pulley.
x
1
K
M s
1
B
1 x
2
F
M2
B2
+y
+x
T Ks x1 · · ··
F = –T–K x –B x –x = M x
s 1 1 1 2 1 1
M1
·
v1 = x1
· · ·
B1 x1 – x2 v2 = x2
· –Ks –B1 B1 –T
v 1 = x 1 ---------- + v 1 ---------- + v 2 -------- + --------
M1 M1 M1 M1
· ·
B1 x1 – x2
T · · · ··
F = –T+B x –x +F–B x = M x
M2 1 1 2 2 2 2 2
F
· B1 –B1 – B2 –T+F
· v 2 = v 1 -------- + v 2 ----------------------- + -----------------
B2 x2 M2 M2 M2
a) Write a program to numerically integrate the state equations, assume that the rope always stays solid, even
when in compression.
b) Test the program by setting all of the parameters to 1 (i.e. M, Ks, B, F).
c) Calculate the steady state position for part b) by setting derivatives to zero. (Note: the results from steps b and
c must agree.)
d) Produce a graph of the system for F = 1 sin (100 t).
e) Modify the program to allow the rope to become slack when in compression.
f) Product a graph using the new program for F = 1 sin ( t ).
228
Problem 5.16 Assume that the pulley is massless and frictionless and that the system begins undeflected.
x
K s1 F
R
M
if x 0 T = 0
if x 0 T = – K s2 x
K s1 K s2
·· B T
x + x· ----- + x --------- = -----
M M M
Problem 5.17 a) Write the state equations for the following mechanical system. Assume that the cables always remain tight and
all deflections are small. For this dynamic case the inertia J2 is significant, but the mass of the beam is not.
J1 R1
R3 R2
K s1
J2
y1
F
K s2
M
M
y2
b) Find the time response to problem 1 using numerical integration with the values below. You must select a time
interval that shows the transient effects. (submit the program in an email and a descriptive graph of the output.)
J1 = 0.001 Kg m^2
J2 = 0.00001 Kg m^2
R1 = 0.20 m
R2 = 0.10 m
R3 = 0.25 m
M = 10Kg
229
F = 500 N
Ks1 = 1000 N/m
Ks2 = 10000 N/m
Problem 5.18 Analyze the system pictured below assuming the rope remains tight and gravity acts downwards.
J,R J,R
F = 10N
N
M 1 = 1kg K s1 = 100 ----
m
N J,R
M 2 = 1kg K s2 = 100 ----
m F
Ns y
R = 0.1m K d1 = 50 ------
m
2
J = 10Kgm Ns
K d2 = 50 ------
m
M1 M2
a) Draw FBDs and write the differential equations for the individual masses.
b) Combine the equations and simplify the equations as much as possible.
c) Write the equations in state variable matrix form.
d) Use Runge-Kutta to find the system state after 1 second.
Problem 5.19 Write the state equations for the following mechanical system. Assume that the cables always remain tight and
all deflections are small. The moment of inertia value is about the center of rotation.
R1 R2
F
J2
y2
K s2
K s1
M3
M1
y1 y3
Problem 5.20 Draw FBDs for the following mechanical system. Consider both friction cases.
Ks1
J,R
x
Ks1
M
s, k
Problem 5.21 Convert the following state equations to physical systems. Show the method.
·
x1 = v1
· – K s1 K s1
v 1 = x 1 ------------ + x 2 --------- + g
M1 M1
·
x2 = v2
2 2
· – R 2 K s1 R 2 K s1 – FR 1 R 2
v 2 = x 1 ------------------- + x 2 ---------------- + --------------------
J1 J1 J1
231
–x x
if T1,T2,Kdx1 > 0 = --------1- 1-
= ------ T = K x –x
1 R2 2 R1 1 s 2 1
··
+ F y = T 1 – gM 1 = – M 1 x 2
T1
··
x 2 = g – --------
M1
··
+ M1 = – T1 R1 + T2 R1 = –JM 1
1
·· T1 R1 – T2 R1
1 = ----------------------------------
JM
1
· ··
+ M2 = T2 R2 – R2 Kd x1 = –JM 2
2
·· · –R2 Kd T2 R2
------------------ = --------------
2 + x1 J JM
M2
2
6 equations, 6 unknowns
Answer 5.3
·
x1 = v1
Answer 5.4
rad
Case 1: ---------
3 = 2.5 s
rad
Case 2: ---------
3 = – 2.5 s
232
Answer 5.5
· ·
· · K x –x
1 2 R K x –x d1 3 2
F R 2 d1 3 2
1 1 K x –x
s1 3 2
N
J ------2- J J
··
M1 N1 M2 M2 2
M3
··
J
M1 1 R K x –x
2 s1 3 2
M3g
–x x2 ··
M x
= --------1- = ------
- 3 3
1 R1 2 R
2
N R
2 1-
x 1 = x 2 --------------
1 N1 = – 2 N2 N1 R2
· ·
x3 = v3 x2 = v2
· – K d1 – K s1 K d1 K s1
v 3 = v 3 ------------- + x 3 ------------ + v 2 --------- + x 2 --------- + g
M3 M3 M3 M3
··
– F 1 R 1 + – J M1 1 = 0
J M1 ·· N 2 ··
= F 1 R 1 – ---------- x 1 = F 1 R 1 – J M1 ------------- x 2
R1 N1 R2
· · ·· N2
R 2 K d1 x 3 – x 2 + R 2 K s1 x 3 – x 2 – J M2 2 + ------ = 0
N1
· · J M2 ·· N2 N 2 ·· N 2
R 2 K d1 x 3 – x 2 + R 2 K s1 x 3 – x 2 – ---------- x 2 + F 1 R 1 ------ – J M1 ------------- x ------ = 0
R2 N1 N1 R2 2 N1
2 R1 N
·· J M2 N2 2
x 2 ---------- + J M1 ------------- = x 2 – R 2 K s1 + v 2 – R 2 K d1 + x 3 R 2 K s1 + v 3 R 2 K d1 – F 1 -------------
R2 2 N1
N1 R2
2 2 2 2 2 2
· – R 2 N 1 K s1 – R 2 N 1 K d1 R 2 N 1 K s1
v 2 = x 2 ----------------------------------------- + v 2 ----------------------------------------- + x 3 ----------------------------------------- +
2 2 2 2 2 2
N 1 J M2 + J M1 N 2 N 1 J M2 + J M1 N 2 N 1 J M2 + J M1 N 2
2 2 R1 R2 N1 N
R 2 N 1 K d1 2
+ v 3 ----------------------------------------- + F 1 -----------------------------------------
2 2 2 2
N 1 J M2 + J M1 N 2 N 1 J M2 + J M1 N 2
Answer 5.6
·
x1 = v1
· – K d1 – K s1 K d1 R 2 R 4 K s1 R 2 R 4
v 1 = v 1 ------------- + x 1 ------------ + 1 ----------------------- + 1 ----------------------- + g
M1 M1 M1 R3 M1 R3
·
1 = 1
2 2 2 2
· K d1 R 2 R 4 K s1 R 2 R 4 – K d1 R 2 R 4 – K s1 R 2 R 4 F1 R1
1 = v 1
----------------------- + x 1
----------------------
- + 1
--------------------------
- + 1
-------------------------
- + ------------
-
J1 R3 J1 R3 2 2 J1
J1R3 J1 R3
233
Answer 5.7
·
x1 = v1
· – K s1 R 2 K s1 N 1
v 1 = x 1 ------------ + 1 ----------------------- + g
M1 M1 N2
·
1 = 1
2 2 2 2
· R 2 K s1 N 1 N 2 – K d1 N 1 – R 2 K s1 N 1 F1 R1 N2
1 = x1
-------------------------------
- + 1 -------------------------------
- + 1 -------------------------------
- + -------------------------------
-
2 2 2 2 2 2 2 2
J1 N2 + J2 N1 J1 N2 + J2 N1 J1 N2 + J2 N1 J1 N2 + J2 N1
Answer 5.8
·· N2 2 · 2 N2
2
2 N2
2
J
2 2 + J ------
1 N + R
2 1 N
------ K d1 + R
2 1 N
------ K s1 = – M 1 gR 2
1 1 1
Answer 5.9 a)
K s1 T K s2 x 2 – R
JM
RT
M1 M2
RK s2 x 2 – R
F M1 g M2 g
K s2 – R K s2 eqn 5.2
··
x 2 + x 2 ---------- + ----------------- = g
M2 M2
234
b)
·
=
2
· – K s1 – R K s2 RK s2 – RM 1 g – RF
= -----------------------------------
- + x 2 ---------------------------
- + --------------------------------
-
2 2 2
JM + R M1 JM + R M1 JM + R M1
·
x2 = v2
· RK s2 – K s2
v2 = ------------- + x 2 -----------
- +g
M2 M2
Answer 5.10
·
=
2
· – K s1 – r K s2 – K d1 K s2 r Fr-
= ---------------------------------- + ------------- + x -----------
- + ------
JM JM JM JM
x· = v
K s2 r – K d2 – K s2 – K s3
v· = -----------
- + v ------------
- + x ----------------------------
-
M M M
Answer 5.11
·
K d1 x 1
K s2 x 1 – x 2
K s1 x 1
x2
x1 ··
M2 x2 JM R2
v1 2
N -------
- M1 M2 2
k v
1 K s2 x 1 – x 2
Fc F2
N = M 1 g cos 3 x2 M 2 g sin 3
2 = -----
-
M 1 g sin R2
3
·
x1 = v1
·
v1 =
·
x2 = v2
·
v2 =
235
Answer 5.12
·
x2 = v2
2 2 2 2 2 2
· R 1 R 2 – K s2 – K s3 R 1 R 2 K s2 R 1 R 2 2F 1 + M 2 g
v 2 = x 3 --------------------------------------------------------------- + x 2 --------------------------------------------------------------- + ---------------------------------------------------------------
2 2 2 2 2 2 2 2 2 2 2 2
4J 1 R 2 + J 2 R 1 + R 1 R 2 M 2 4J 1 R 2 + J 2 R 1 + R 1 R 2 M 2 4J 1 R 2 + J 2 R 1 + R 1 R 2 M 2
·
x3 = v3
· – K d3 – K s2 – K s3 K s2
v 3 = v 3 ------------- + x 3 ----------------------------- + x 2 --------- + g
M3 M3 M3
236
Answer 5.13
We are assuming that all of the masses are zero, except M1. Therefor the force F1 is transmitted to
mass M1 with no inertial delay. However, the level arm will result in a decrease of displacement
proportional to R1 / ( R1+R2 ).
·
K s1 x 1 – x half K d1 x 1 – x· half
·
·· K s2 x 3 – x 2 K d2 x 3 – x· 2
M1 x1
M1
M1 g R1
x half = x 2 -------------------
R1 + R2
· F1
F = K d2 x 3 – x· 2 + K s2 x 3 – x 2 + F 1 = 0
x· 2 – K d2 + x 2 – K s2 + x· 3 K d2 + x 3 K s2 = – F 1
– K s2 K s2 –F1
x· 2 – x· 3 = x 2 ------------ + x 3 --------- + ---------
K d2 K d2 K d2
p = x2 – x3
– K s2 K s2 –F1 K s2 –F
p· = x 2 ------------ + x 3 --------- + --------- = – --------- p + ---------1
K d2 K d2 K d2 K d2 K d2
· ·
M = K s1 R 1 x 1 – x half + K d1 R 1 x 1 – x· half + K s2 R 1 + R 2 x 3 – x 2 + K d2 R 1 + R 2 x 3 – x· 2 = 0
R1 R1 R1 · · R1
K s1 ------------------------ x 1 – x 2 ------------------- + K d1 ------------------------ x 1 – x 2 ------------------- + K s2 – p + K d2 – p· = 0
R1 + R2 R1 + R2 R1 + R2 R1 + R2
R1 R1 R1 R1 + R2
q = x 1 – x 2 ------------------- -----------------------
- x 1 – x 2 ------------------- = q ------------------------
R1 + R2 R1 + R2 R1 + R2 R1
K s1 q + K d1 q· + K s2 – p + K d2 – p· = 0
K d1 q· + K d2 – p· = K s1 – q + K s2 p
·· ·
F = M 1 x 1 + K d1 x 1 – x· half + K s1 x 1 – x half – M 1 g = 0
·· ·
M 1 x 1 + x 1 K d1 + x 1 K s1 + x· half – K d1 + x half – K s1 = M 1 g
·· · R1 R1
M 1 x 1 + x 1 K d1 + x 1 K s1 + x· 2 ------------------- – K d1 + x 2 ------------------- – K s1 = M 1 g
R1 + R2 R1 + R2
· – K s1 R1 + R2 R1 K s1
v 1 = x 1 ------------ + q ------------------------ K d1 + x 2 ------------------- --------- + g
M1 M1R R1 + R2 M1
1
K s2 –F1
p· = – --------- p + --------- LOOK AT LATER ------- XXXXXXXXXXXXXXX - SEE NEXT
K d2 K d2 FIGURE FOR ALTERNATE SOLUTION
237
We are assuming that all of the masses are zero, except M1. Therefor the force F1 is transmitted to
mass M1 with no inertial delay. However, the level arm will result in a decrease of displacement
proportional to R1 / ( R1+R2 ).
·· R1 + R2
M 1 x 1 + F 1 ------------------- = 0
R1
·
x1 = v1
· R1 + R2
v 1 = F 1 -------------------
R1 M1
Although the force is immediately transmitted to M1, the x2 and x3 positions of the other components
will not change immediately. To find these positions we begin by summing the forces on Ks1 and
Kd1.
R1 · R1 · R1 + R2
R 1 K s1 x 1 – ------------------- x 2 + R 1 K d1 x 1 – ------------------- x 2 + R 1 F 1 ------------------- = 0
R1 + R2 R1 + R2 R1
R1 · – K s1 R R1 + R2
1
K d1 ------------------- x 2 = x 1 K s1 + v 1 K d1 + x 2 ------------------- + F 1 -------------------
R1 + R2 R1 + R2 R1
– K s1 R R 1 + R 2 2
· K s1 R 1 + R 2 R1 + R2 1 R1 + R2
x2 = x1 ---------------------------------
- + v1 ------------------
- + x2 -------------------------------------------
- + F1 --------------------------
-
R1 K R1 R1 + R2 R1 K 2
d1 d1 R 1 K d1
Finally the forces can be summed on the right hand spring and damper.
· ·
K s2 x 2 – x 3 + K d2 x 2 – x 3 + F 1 = 0
· K s2 – K s2
x 3 = x 2 --------- + x 3 ------------ + v 2 + F 1
K d2 K d2
·
x1 = v1
· R1 + R2
v 1 = – F 1 ------------------- + g
M1 R1
– K s2 F1 R1 + R2
q· = ------------ q + --------- x 2 = x 1 – p -------------------
K d2 K d2 R1
– K s1 R1 + R2 R1 + R2
p· = ------------ p + F 1 ------------------- x 3 = x 1 – p ------------------- – q
K d1 K d1 R 1 R1
Answer 5.14
0
0 1
K s1 + K s2 K d1 + K d2 y
d- y
---- = ---------------------------------- y + M 1 g k cos ----- + sin + F + M 2 g
- ----------------------------------- y
dt v J J v ---------------------------------------------------------------------------------------
M 1 + M 2 + ------ M 1 + M 2 + ------ J
2 2 M 1 + M 2 + ------
R R 2
R
238
239
y = 0; // initial conditions
v = 0;
X=[y, v];
tmp = ((J / R^2) + M1 + M2); // this is used a few times, may as well reduce calcs
A = [0, 1 ; (Ks1 + Ks2) / tmp, (Kd1 + Kd2) / tmp]; // define the A matrix
B = [0, 0; (g * (M1 * sin(theta) + M2) + F) / tmp, (M1 * g * cos(theta)) / tmp]; // B matrix
// Set the time length and step size for the integration
steps = 1000;
t_start = 0.0;
t_end = 1.0;
h = (t_end - t_start) / steps;
t = [t_start];
// SCILAB OUTPUT
//The value at t=0.000000 s is (y, v) = (0.000000, 0.000000)
//The value at t=0.100000 s is (y, v) = (0.000168, 0.003376)
//The value at t=0.200000 s is (y, v) = (0.000677, 0.006796)
//The value at t=0.300000 s is (y, v) = (0.001529, 0.010264)
//The value at t=0.400000 s is (y, v) = (0.002731, 0.013788)
//The value at t=0.500000 s is (y, v) = (0.004289, 0.017374)
//The value at t=0.600000 s is (y, v) = (0.006209, 0.021032)
//The value at t=0.700000 s is (y, v) = (0.008498, 0.024768)
240
Answer 5.15 a)
·
T1 = x1 –Ks + v1 –B1 + v2 B1 – M1 v1
·
T2 = v1 B1 + v2 –B1 – B2 + F – M2 v2
xx· =
= vx 1 = – x 2
x – K s + v – B 1 + v – B 1 – M 1 v· = v B 1 + v B 1 + B 2 + F + M 2 v·
M 1 + M 2 v· = x – K s + v – 4B 1 – B 2 + – F
–Ks – 4B 1 – B 2 –F
v· = x ---------------------- + v --------------------------- + ----------------------
M1 + M2 M1 + M2 M1 + M2
M1 = 1; M2 = 1; Ks = 1; B1 = 1; B2 = 1; F = 1
rope_tight = 1
endfunction
for i = 1:n_steps
X = [X; X($, :) + h*state_equations(X($, :), t($))]
if rope_tight == 1 then
X($, 3) = X($, 1) // set x2 and v2 equal to x1 and v1
X($, 4) = X($, 2)
end
t = [t; i*h]
end
plot2d(t, X)
c)
·
v1 = x1 = 0
·
v2 = x2 = 0
· –Ks –B1 B1 –T
v 1 = x 1 --------- + v 1 --------- + v 2 ------- + -------
M1 M1 M1 M1
–1 –1 1 –T
0 = x 1 ------ + 0 ------ + 0 --- + ------ = x 1 – T
1 1 1 1
· B1 –B1 – B2 –T+F
v 2 = v 1 ------- + v 2 ---------------------- + -----------------
M2 M2 M2
1 –2 –T+1
0 = 0 --- + 0 ------ + ----------------- = – T + 1
1 1 1
x1 = –1 x2 = 1
d)
242
e)
M1 = 1; M2 = 1; Ks = 1; B1 = 1; B2 = 1; F = 1
x1_0 = 0; v1_0 = 0; x2_0 = 0; v2_0 = 0 ·
X = [x1_0, v1_0, x2_0, v2_0] v1 = x1
t_start = 0; t_end = 2; n_steps = 1000 ·
v2 = x2
h = (t_end - t_start) / n_steps
t = [t_start]
tight = 1 // start with the cable tight
function der = state_equations(X, t)
x1 = X(1)
v1 = X(2)
x2 = X(3) · –Ks –B1 B1 –T
v 1 = x 1 --------- + v 1 --------- + v 2 ------- + -------
v2 = X(4) M1 M1 M1 M1
F = sin(100*t($)) B1 –B1 – B2
if tight == 0 then // see if it should be tight · –T+F
v 2 = v 1 ------- + v 2 ---------------------- + -----------------
if (x1 + x2) >= 0 then M 2 M 2 M2
tight = 1
x1 = (x1 + x2) / 2
x2 = -x1
tight = 1
end
else // see if it should be loose
if (v1 + v2) < 0 then // they are moving towards each other
tight = 0
else // watch for numerical drift
x1 = (x1 + x2) / 2
x2 = -x1
end
end
if tight == 0 then
dx1 = v1
dx2 = v2
dv1 = -x1*Ks/M1 - v1*B1/M1 + v2*B1/M1
dv2 = v1*B1/M2 + v2*(-B1-B2)/M2 + (F/M2)
else
dx1 = v1
dv1 = x1*(-Ks)/(M1+M2) + v1*(-4*B1-B2)/(M1+M2) + (-F)/(M1+M2)
dx2 = - dx1
dv2 = - dv1
end
if tight == 1 then
T1 = x1*(-Ks) + v1*(-B1) + v2*(B1) + dv1*(-M1)
T2 = v1*(B1) + v2*(-B1 - B2) + F + dv2*(-M2)
end
der = [dx1, dv1, dx2, dv2]
endfunction
for i = 1:n_steps
X = [X; X($, :) + h*state_equations(X($, :))]
t = [t; i*h]
end
plot2d(t, X)
f)
243
Answer 5.16 a)
if x 0 T = 0
if x 0 T = – K s2 x
B K s1 T F
··
x + x· ----- + x --------- = ----- + -----
M M M M
M = 1; Ks = 1; B = 1; Ks1 = 1; Ks2 = 2; F = 1
x_0 = 0; v_0 = 0
X = [x_0, v_0]
t_start = 0; t_end = 10; n_steps = 100
h = (t_end - t_start) / n_steps
t = [t_start]
for i = 1:n_steps
X = [X; X($, :) + h*state_equations(X($, :))]
t = [t; i*h]
end
plot2d(t, X)
244
b)
c)
245
Answer 5.17 a)
R3 ·
y1 = v1
K s2 y 2 + y 1 ------
R2
·· ·
My 2 y2 = v2
·· R3
M My 2 = – K s2 y 2 + y 1 ------ + Mg
y2 R2
· – K s2 R 3 – K s2
Mg v 2 = y 1 ------------ ------ + y 2 ------------ + g
M R2 M
··
R1 T y1
J 1 ------ ··
R1 y1
J 1 ------ + R 1 K y 1 = R 1 T
J1 R1 s1
J 1 ··
T = ------ y 1 + K s1 y 1
2
R1 K y1 R1
s1
R3 y
R3 K y 2 + y 1 ------ -----1-
s2 R2 R2
R2 F – T
J2
··
y1
J 2 ------
R2
··
R3 y1
– R 3 K y 2 + y 1 ------ + R 2 F – T – J 2 ------ = 0
s2 R2 R2
··
y1 R3 J 1 ··
J 2 ------ = – R 3 K y 2 + y 1 ------ + R 2 F – R 2 ------ y 1 + K s1 y 1
R2 s2 R2 2
R1
2
·· J 2 R2 – R 3 K s2
y 1 ------ + J 1 ------ = y 1 ------------------- – R 2 K + y2 –R3 K + R2 F
R2 2 R2 s1 s2
R1
2 2 2 2
·· J 2 R 1 + J 1 R 2 – R 3 K s2 – R 2 K s1
y 1 ------------------------------- = y 1 ------------------------------------------- + y 2 – R 3 K + R2 F
2 R2 s2
R2 R1
2 2 2 2 2
·· 2 – R 3 K s2 – R 2 K s1 – R 3 R 2 R 1 K s2 R1 R2
y 1 = y 1 R 1 ------------------------------------------- + y 2 --------------------------------- + F -------------------------------
2 2 2 2 2 2
J2 R1 + J1 R2 J2 R1 + J1 R2 J2 R1 + J1 R2
246
b)
// Problem solution
// Constants
J1 = 0.1
J2 = 0.001
R1 = 0.20
R2 = 0.10
R3 = 0.25
M = 10
F = 500
Ks1 = 1000
Ks2 = 10000
g = 9.81
A = -Ks2 * R3 / (M * R2)
B = -Ks2 / M
DEN = (J2 * R1 * R1) + (J1 * R2 * R2)
C = R1 * R1 * ((-R3 * R3 * Ks2 - R2 * R2 * Ks1)) / DEN
D = (-R3 * R2 * R1 * R1 * Ks2) / DEN
E = R1 * R1 * R2 * R2 / DEN
for i = 1: n_steps
X = [X ; X($, :) + h * state_eqns(X($, :), t($))]
t = [t ; t($)+h]
end
plot(t, X)
247
Answer 5.18
F = 10;
M1 = 1;
M2 = 1;
R = 0.1;
J = 10;
Ks1 = 100;
Ks2 = 100;
Kd1 = 50;
Kd2 = 50;
g = 9.81;
X = [y, v];
// Set the time length and step size for the integration
steps = 100;
t_start = 0.0;
t_end = 1.0;
h = (t_end - t_start) / steps;
t = [t_start];
// SCILAB OUTPUT
// The value at t=0.000000 s is (y, v) = (0.000000, 0.000000)
// The value at t=0.100000 s is (y, v) = (-0.000017, -0.000333)
// The value at t=0.200000 s is (y, v) = (-0.000066, -0.000664)
// The value at t=0.300000 s is (y, v) = (-0.000149, -0.000993)
// The value at t=0.400000 s is (y, v) = (-0.000265, -0.001321)
// The value at t=0.500000 s is (y, v) = (-0.000414, -0.001647)
// The value at t=0.600000 s is (y, v) = (-0.000594, -0.001971)
// The value at t=0.700000 s is (y, v) = (-0.000808, -0.002292)
// The value at t=0.800000 s is (y, v) = (-0.001053, -0.002611)
// The value at t=0.900000 s is (y, v) = (-0.001330, -0.002927)
// The value at t=1.000000 s is (y, v) = (-0.001638, -0.003240)
248
Answer 5.19
·· R1
y2 ··
J2 -
----- K s1 y 1 + y 2 ------ ·· K s2 y 3 – y 2 M3 y3
R2 R 2 M1 y1
F
J2
M3
y2 M1 y3
y1
R1 K s3 – y 3 M3 g
K s1 y 1 + y 2 ------ K s2 y 3 – y 2 M1 g
R 2
·
y1 = v1
·
y2 = v2
·
y3 = v3
··
R1 y2
R 1 F – R 1 K s1 y 1 + y 2 ------ – J 2 ------ + R 1 K s2 y 3 – y 2 = 0
R2 R2
·· 2
y2 R1
J 2 ------ = y 1 – R 1 K + y 2 – R 1 K s2 – K s1 ------ + y 3 R 1 K s2 + R 1 F
R2 s1 R2
2
–R1 R2 K – R 1 R 2 K – K s1 R 1 R1 R2 K R1 R2
· s1 s2 s2
v 2 = y 1 -------------------------- + y 2 -------------------------------------------------- + y 3 ----------------------- + ------------- F
J2 J2 J2 J2
R1 ··
K s1 y 1 + y 2 ------ + M 1 y 1 – M 1 g = 0
R 2
·· R1
M 1 y 1 = – K s1 y 1 + y 2 ------ + M 1 g
R 2
– K s1 – K s1 R
· 1
v 1 = y 1 ------------ + y 2 ------------------- + g
M1 M1 R
2
··
K s2 y 3 – y 2 + M 3 y 3 – K s3 – y 3 – M 3 g = 0
··
M 3 y 3 = y 2 K s2 + y 3 – K s3 – K s2 + M 3 g
· K s2 – K s3 – K s2
v 3 = y 2 --------- + y 3 ----------------------------- + g
M3 M3
249
Answer 5.20
T2
x
J,R
K x
s1
M
Mx·· T
T1 1
·· FF
J
if v <> 0 then
v
F F = ----- k Mg
v
if v == 0 then
FF = s Mg
T2 = 0
T 2 = – K s1 R
250
Answer 5.21
·· – K s1 K s1
x 1 = x 1 ------------ + x 2 --------- + g
M1 M1
··
M 1 x 1 + x 1 K s1 + x 2 – K s1 = M 1 g
K s1 x 1 – x 2
··
M 1 x 1 + K s1 x 1 – x 2 – M 1 g = 0
x1
M1
M1g
··
M1 x1
2 2
·· – R 2 K s1 R 2 K s1 – FR 1 R 2
x 2 = x 1 ------------------- + x 2 ---------------- + --------------------
J1 J1 J1
x
-----2-
·· 2 2 R2
J 1 x 2 + x 1 R 2 K s1 + x 2 – R 2 K s1 = – FR 1 R 2 ··
x2
J 1 ------
·· R2
x2
J 1 ------ + R 2 K s1 x 1 – x 2 + FR 1 = 0
R2
J1
K s1 x 1 – x 2 F
R 2 K s1 x 1 – x 2
FR 1
Ks1
J 2, R 2
J 1, R 1
Ks2 Kd2
Problem 5.23 Write the state equation(s) for the following mechanical system of two gears. Assume that the cables always
251
2
Ks1
J 2, R 2
J 1, R 1
Kd2
Problem 5.24 Develop state equation(s) for the following system. Assume the rope remains tight.
R3, J3
R2, J2, M2
F y1
M1
Problem 5.25 a) Draw FBDs for the following mechanical system. b) Develop a differential equation of motion for the system
252
J,R
Ks1
J,R
Ks2 Kd2
Problem 5.26 Write the state equations for the following mechanical system. Assume that the cables always remain tight and
all deflections are small. Both moment of inertia values are about the pivot points. The mass of the beam should
be considered negligible.
J1 R1
K s2
R3 R2
K s1
J2
x
F
Problem 5.27 A simplified model of a cam shaft driven lever is shown below. The moment of inertia is about the pivot point.
L1
y
[[[Note: add mass to the beam
F L2 in the future]]]
JM
Ks
a) Determine the equation of motion (differential equation) for the system as a function of theta.
b) Assume that L1 = 10.0cm and L2 = 4.0cm. Given an applied force of F=400N resulting in a deflection of y=-
1.0cm, calculate the spring coefficient Ks.
c) Explicitly solve the differential equation to find theta as a function of time. The result should be left variable
form.
d) Provide the system model as a state variable matrix.
253
e) Select a value for Jm that results in a natural frequency of 4Hz using the values provided in step b).
Problem 5.28 Draw FBDs for a system described with the equations below.
·· K s1 – K s1 T-
1 + ---------
1 J
- + ------------ = ---------
2 J
M1 M1 J M1
·· · ---------
B- K s1 + K s2 – K s1
2+ 2 J + 2 ------------------------- + 1 ------------ = 0
M2 JM JM
2 2
254
255
algebraic manipulation Dx + Dy = D x + y
Dx + Dy = Dy + Dx
Dx + Dy + Dz = Dx + Dy + Dz
n n–m
simplification D
---------x- = D x
m
D
x---------------------
D + a- = x
D+a
first-order axiom
x t - = e – at x t e at dt + C
------------------
D+a
Note:
x· + Ax = y t xD + Ax = y t
x D+A = y t
xD + Ax = y t
y t
At At At x = --------------
e xD + e Ax = e y t D+A
At At
e xD = e y t
At At
e xD = e y t
d at at d at
----- e x = e ----- x + ae x
At At dt dt
e x = e y t dt
at at at
At De x = e Dx + ae x
–A t
x = e e y t dt
y t - –A t At
------------- = e e y t dt
D+A
Figure 6.3 contains an example of the manipulation of a differential equation using the ‘D’ operator. The solution begins
by replacing the ‘d/dt’ terms with the ‘D’ operator. After this the equation is rearranged to simplify the expression. Notice that the
manipulation follows the normal rules of algebra.
d- 2
----
d
x + ----- x + 5x = 5y
dt dt
2
D x + Dx + 5x = 5y
2
x D + D + 5 = 5y
5y
x = ---------------------------
2
D +D+5
5
x = y ---------------------------
2
D +D+5
An example of the solution of a first-order differential equation is given in Figure 6.4. This begins by replacing the differ-
ential operator and rearranging the equation. The first-order axiom is then used to obtain the solution. The initial conditions are
then used to calculate the coefficient values.
257
Given, d
----- x + 5x = 3t x 0 = 10
dt
Dx + 5x = 3t guess, 5t
d 5t e
----- te – -------
dt 5
3t
x = -------------
D+5 5t 5t 5t
= 5te +e –e
–5 t 5t
x = e e 3tdt + C 5t
= 5te
5t
d 5t e 5t
5t 5t ----- te – ------- = 5e t
–5 t te – e dt 5
x = e 3 ----------------------- + C
5 5t
5t e
Initial conditions, te – -------
5- 5t
----------------------- = e t dt
1 5
0 1 – ---
1
x 0 = 1 3 ------------------------------ + C = 10
5
C = 10.6
5t 5t
–5 t te – e
x = e 3 ----------------------- + 10.12
5
1 –5 t
x = 0.6 t – --- + 10.12e
5
–5 t
x = 0.6t – 0.12 + 10.12e
·· · ·· · ·
y 2 + 6y 2 + y 2 = u 1 + 3u 2 + u 2 + 0.5u 2 + u 3
where,
y = outputs
u = inputs
A sample derivation of an input-output equation from a system of differential equations is given in Figure 6.6. This begins
by replacing the differential operator and combining the equations to eliminate one of the output variables. The solution ends by
rearranging the equation to input-output form.
258
(1) Dy 1 = – 3y 1 + 2y 2 + u 1 + 2Du 2
y D + 3 = 2y + u + 2Du
1 2 1 2
D + 3-
-------------
y = y – 0.5u – Du
2 1 2 1 2
(2) Dy = 2y + y + Du
2 1 2 1
y 2 D – 1 = 2y 1 + Du 1
D+3
y 1 -------------- – 0.5u – Du D – 1 = 2y + Du
2 1 2 1 1
2
D + 2D – 3- – 2 – 0.5Du + 0.5u – D 2 u + Du = Du
y 1 ------------------------------
2 1 1 2 2 1
2 2
0.5D y 1 + Dy 1 – 3.5y 1 = Du 1 + 0.5Du 1 – 0.5u 1 + D u 2 – Du 2
In some instances we will want to numerically integrate an input-output equation. The example starting in Figure 6.7
shows the development of an input-output equation for two freely rolling masses joined by a spring. The final equation has a deriv-
ative on the right hand side that would prevent it from being analyzed in many cases. In particular if the input force ‘F’ was a step
function the first derivative would yield an undefined (infinite) value that could not be integrated.
259
x1 x2
F M1 Ks M2
2
Ks x2 – x1 Fx = –Ks x2 – x1 = M2 D x2
M2
2
Ks x1 = x2 M2 D + Ks
2 Ks x1
x 1 M 1 D + K s = F + K s ----------------------------
2
M2 D + Ks
2 2 2 2
x1 M1 D + Ks M2 D + Ks – Ks = F M2 D + Ks
4 2 2 2 2
x1 D M1 M2 + D Ks M1 + M2 + Ks – Ks = F M2 D + Ks
4 2 2
x1 D M1 M2 + D Ks M1 + M2 = F M2 D + Ks
d 4 d 2 d 2
----- x 1 M 1 M 2 + ----- x 1 K s M 1 + M 2 = ----- FM + FK s
dt dt dt 2
The equation is then converted to state variable form, including a step to calculate a second derivative of the input, as
shown in Figure 6.8.
260
This can then be written in state variable form by creating dummy variables for integrating the function ‘F’.
d
----- x 1 = v 1
dt
d
----- v 1 = a 1
dt
d
----- a 1 = d 1
dt
d
----- d 1 M 1 M 2 + a 1 K s M 1 + M 2 = a F M + FK s
dt 2
d- –Ks M1 + M2 1 Ks
---- d 1 = a 1 ------------------------------------- + a F ------- + F ----------------
dt M1 M2 M1 M1 M2
The approximate value of the second derivative of a unit time step can be calculated using the time step.
x1 0 1 0 0 x 0 0
1
0 0 1 0 0 0
d v1 v1 aF
----- = 0 0 0 1 + 0 0
dt a a1 F
1 –Ks M1 + M2 1 Ks
d1 0 0 ------------------------------------- 0 d ------- ---------------
-
M1 M2 1 M1 M1 M2
Figure 6.8 Example: Writing state equations for equations with derivatives
output x 4+D
----------------- = f D --- = ---------------------------------
input F 2
D + 4D + 16
If both sides of the example were inverted then the output would become ‘F’, and the input ‘x’. This ability to invert a
transfer function is called reversibility. In reality many systems are not reversible.
There is a direct relationship between transfer functions and differential equations. This is shown for the second-order dif-
ferential equation in Figure 6.10. The homogeneous equation (the left hand side) ends up as the denominator of the transfer func-
tion. The non-homogeneous solution ends up as the numerator of the expression.
·· · 2 f
x+2 nx +
-----
nx = M
2 2 f
xD + 2 n xD + n x = M
-----
2 2 f
x D +2 nD +
-----
n = M
1-
---- particular
x M
-- = ---------------------------------------------
f 2 2
D + 2 nD + n
homogeneous
Damping factor of system - If < 1 then underdamped, and the system will oscillate. If =1
critically damped. If > 1 overdamped, and never any oscillation (more like a first-order
system). As damping factor approaches 0, the first peak becomes infinite in height.
Figure 6.10 The relationship between transfer functions and differential equations for a mass-spring-damper example
The transfer function for a first-order differential equation is shown in Figure 6.11. As before the homogeneous and non-
homogeneous parts of the equation becomes the denominator and the numerator of the transfer function.
262
1
x· + --- x = f
1
xD + --- x = f
1
x D + --- = f
x-- 1
= -------------
f 1
D + ---
A transfer function is in a form suitable for using normal integration techniques. If the non-homogeneous part does not
includes derivatives, then the techniques presented in previous chapters can be used. If the equation does include derivatives of the
inputs, the solution can be found using superposition by reducing the differential equation to separate input parts, or decomposing
it into partial fractions.
x 4D + 5
--- = ------------------------------
F 2
D + 3D + 2
The transfer function can be converted to a differential equation.
x + x· 3 + x 2 = F· 4 + F 5
··
Note: The D in the numerator (top) requires special
care - as shown in this example.
the problem term
The effect of the derivatives on the input side of the equation is an adjusted value of the initial conditions. For example the
equation shown in Figure 6.12 may have initial conditions of zero at t=0-, but the derivative of F will result in a non-zero velocity
at t=0+. In simple terms this does not affect the solution of the problem, but requires the calculation of a new set of initial condi-
tions at t=0+, and these are used to find the coefficients of the homogenous equation. It is important to keep in mind that the initial
conditions are not at zero, but just before. The input derivatives have an effect that starts at t=0.
263
x 4D + 5
--- = ------------------------------
F 2
D + 3D + 2
The solution begins by reducing the transfer function to a differential equation, and then into two differen-
tial equations with results that can be summed because of the principle of superposition (it is a linear sys-
tem). Assume F is a unit step function
x + x· 3 + x 2 = F· 4 + F 5
··
homogeneous:
R = 1 2
–t – 2t
xh = C1 e + C2 e i.e., d
----- u t = 0 t 0
particular x(t=0+): dt
x 2p = C 3 0 + 0 3 + C3 2 = 0 4 + 1 5 C 3 = 2.5
Part. x(t=0):
At time t=0, the step function will have a non-zero value for the derivative. This term can be iso-
lated by multiplying through by dt and then taking the limit as dt approaches 0.
d- 2
----
d d
x 1 + ----- x 3 + x 1 2 = ----- F 4 + F 5
dt dt 1 dt
d
----- x 1 + x 1 3 + dt x 1 2 = F 4 + dt F 5
dt
d
----- x 1 + x 1 3 = F 4
dt
x 1 + dt x 1 3 = dt F 4
As dt equals zero the left hand side of the equation will become x1.
d
x 1 = dt 4 ----- x = 4
dt 1
Init. Conditions for x1 (assume all zero):
- -
x 0 = 0 x 0 = 0 x· 0 = 0 x· 0 = 4
–t – 2t –t – 2t
x = C1 e + C2 e + 2.5 x· = – C 1 e – 2 C 2 e
0 = C 1 + C 2 + 2.5 4 = – C 1 – 2C 2
– 2.5 + 4 = C 1 – C 1 + C 2 – 2C 2 = – C 2 C 2 = – 1.5
C1 = 3 – 4 = –1
–t – 2t
x = –e + – 1.5 e + 2.5
This method will allow the solution of the differential equation using methods that are very similar to those used before.
The only complication is the need to determine the initial conditions for t=0. The following method provides a slightly longer, but
more routine approach to solving these problems.
The equation is shown in Figure 6.15 can be solved by decomposing it into a simpler set of differential equations. The
method is shown in Figure 6.15. It begins by reducing the transfer function to a partial fraction form. Once in this form each of the
partial fraction terms can be converted to a separate differential equation. Each of these differential equations can then be solved
separately. The total response for the system is then found by summing the individual responses. Note: this is permitted using the
principle of superposition because the system is linear.
265
x 4D + 5
--- = ------------------------------
F 2
D + 3D + 2
The solution begins by reducing the homogeneous equation with partial fractions.
x 4D + 5 A B D A + B + 2A + B
--- = ------------------------------------- = ------------- + ------------- = ---------------------------------------------------
F D+1 D+2 D+1 D+2 D+1 D+2
5 = 2A + B
- 4 = A+B
1 = A B = 3
--x- = ------------
1 - ------------
+
3 -
F D+1 D+2
1 3
x = F ------------- + F -------------
D+1 D+2 or
1 3
x = x1 + x2 x 1 = F ------------- x 2 = F -------------
D+1 D+2
· ·
x1 + x1 = F x 2 + 2x 2 = 3F
The solution begins by evaluating the homogeneous equations. The homogeneous solution for these can
be found separately and then added. The addition is only possible because the system is linear.
–t – 2t –t – 2t
xh = C1 e xh = C2 e xh = xh + xh = C1 e + C2 e
1 2 1 2
The input is a unit step function (i.e. F=1). The particular solution is found by examining the two equa-
tions separately and then summing the results.
·
For, x1 + x1 = 1
·
xp = A xp = 0
1 1
0+A = 1 A = 1
·
For, x 2 + 2x 2 = 3
·
xp = A xp = 0
1 1
3
0 + 2A = 3 A = ---
2
3 5
x p = x p + x p = 1 + --- = ---
1 1 2 2
(IMPORTANT NEW STEP) Next we must determine the initial conditions. Although we will assume the
system starts undeflected at rest.
·
For t = 0+ x1 + x1 = 1 x1 = 0 x· 1 = 1
·
For t = 0+ x 2 + 2x 2 = 3 x2 = 0 x· 2 = 3
· ·
x· = x 1 + x 2 = 1 + 3 = 4
The initial conditions can then be used to find the values of the coefficients. It will be assumed that the
system starts undeflected and at rest.
–t – 2t 5
x t = C1 e + C2 e + ---
2
–0 –0 5 5
x 0 = C1 e + C2 e + --- = 0 C 1 = – C 2 – ---
2 2
–t – 2t
x· t = – C 1 e – 2C 2 e
x· 0 = – C 1 – 2C 2 = 4
5 3
– – C 2 – --- – 2C 2 = 4 C 2 = – ---
2 2
3 5
C 1 = – – --- – --- = – 1
2 2
The final equation can then be written.
–t 3 – 2t 5
x t = –e – --- e + ---
2 2
The downside to this method is that it requires the solution of a partial fraction, and multiple (although simpler) differen-
tial equations. The advantage is that it is very routine and does not require any special manipulation.
Aside: Keep in mind that the mathematical expression ‘F/x’ is a ratio between input (displacement action)
and output (reaction force). When shown with differentials it is obvious that the ratio is not simple, and is
a function of time. Also keep in mind that if we were given a force applied to the system it would become
the input (action force) and the output would be the displacement (resulting motion). To do this all we
need to do is flip the numerators and denominators in the transfer function.
268
2
dx d x
F y = – F + K d ------ + K s x = – M --------
Ks dt 2
dt
Kd 2
d x dx
F = M -------- + K d ------ + K s x
2 dt
dt
M x 2
F = MD x + K d Dx + K s x
F 2
--- = MD x + K d Dx + K s x
F x
or
x 1
--- = -------------------------------------------
F 2
MD + K d D + K s
Aside: An important concept that is ubiquitous yet largely unrecognized is the use of functional design. We look at
parts of systems as self contained modules that use inputs to produce outputs. Some systems (such a mechanisms)
are reversible, others are not (consider a internal combustion engine, turning the crank does not produce gasoline).
An input is typically something we can change, an output is the resulting change in a system. For the example
above ‘F’ over ‘x’ implies that we are changing the input ‘x’, and there is some change in ‘F’. We know this could
easily be reversed mathematically and practically.
Mass-spring-damper systems are often used when doing vibration analysis and design work. The first stage of such analy-
sis involves finding the actual displacement for a given displacement or force. A system experiencing a sinusoidal oscillating force
is given in Figure 6.19. Numerical values are substituted and the homogeneous solution to the equation is found.
Given the component values input force,
N Ns
M = 1Kg K s = 2 ---- K d = 0.5 ------ F = 5 sin 6t N
m m
The differential equation for the mass-spring damper system can be written.
2
d x Ns dx N
1Kg -------- + 0.5 ------ ------ + 2 ---- x = 5 sin 6t N
2 m dt m
dt
The homogeneous solution can be determined.
2
d x Ns dx N
1Kg -------- + 0.5 ------ ------ + 2 ---- x = 0
2 m dt m
dt
Ns Ns 2 N
– 0.5 ------ 0.5 ------ – 4 1Kg 2 ----
m m m
A = -------------------------------------------------------------------------------------------
2 1Kg
–1
A = 0.5 – 0.5 0.25 – 8 s
–1
A = – 0.25 1.392j s
– 0.25t
xh = C1 e cos 1.392t + C 2
The solution continues in Figure 6.20 where the particular solution is found and put in phase shift form.
– 36A – 3B + 2A = 5
34
– 34 ------ B – 3B = 5
3
5 34
B = ----------------------------- = – 0.01288 A = ------ – 0.01288 = – 0.1460
–-------------------
34 34 - 3
–3
3
x p = – 0.1460 sin 6t + – 0.01288 cos 6t
2 2
– 0.1460 + – 0.01288
x p = -------------------------------------------------------------------- – 0.1460 sin 6t + – 0.01288 cos 6t
2 2
– 0.1460 + – 0.01288
– 0.9961
x p = 0.1466 sin 6t + atan ----------------------
– 0.08788
x p = 0.1466 sin 6t + 1.483
The system is assumed to be at rest initially, and this is used to find the constants in the homogeneous solution in Figure
6.21. Finally the displacement of the mass is used to find the force exerted through the spring on the ground. In this case there are
two force frequency components at 1.392rad/s and 6rad/s. The steady-state force at 6rad/s will have a magnitude of 0.2932N. The
transient effects have a time constant of 4 seconds (1/0.25), and should be negligible within a few seconds of starting the machine.
270
– 0.25t – 0.25t
x' = – 0.25C 1 e cos 1.392t + C 2 – 1.392 C 1 e sin 1.392t + C 2 + 6 0.1466 cos 6t + 1.483
0
0 = C 1 e cos 0 + C 2 + 0.1466 sin 0 + 1.483
C 1 cos C 2 = – 0.1460
– 0.1460
C 1 = --------------------
cos C 2
0 0
0 = – 0.25C 1 e cos 0 + C 2 – 1.392 C 1 e sin 0 + C 2 + 6 0.1466 cos 0 + 1.483
0.0365 + 0.07713
C 2 = atan ------------------------------------------ = – 0.5099
– 0.2032
– 0.1460
C 1 = --------------------------------- = – 0.1673
cos – 0.5099
– 0.25t
x = – 0.1673 e cos 1.392t – 0.5099 + 0.1466 sin 6t + 1.483 m
The displacement can then be used to calculate the force transmitted to the ground, assuming the
spring is massless.
F = Ks x
N – 0.25t
F = 2 ---- – 0.1673 e cos 1.392t – 0.5099 + 0.1466 sin 6t + 1.483 m
m
– 0.25t
F = – 0.3346 e cos 1.392t – 0.5099 + 0.2932 sin 6t + 1.483 N
A decision has been made to reduce the vibration magnitude transmitted to the ground to 0.1N. This can be done by add-
ing a mass-spring isolator, as shown in Figure 6.22. In the figure the bottom mass-spring-damper combination is the original sys-
tem. The mass and spring above have been added to reduce the vibration that will reach the ground. Values must be selected for the
mass and spring. The design begins by developing the differential equations for both masses.
271
K s2
x2
M2
Kd K s1
M1 x1
– K s2 x 2 · · ··
F = – K s2 x 2 – K d x 2 – x 1 – K s1 x 2 – x 1 = M 2 x 2
2
M2 – K s2 x 2 – K d x 2 D – x 1 D – K s1 x 2 – x 1 = M 2 x 2 D
2
· · x 2 – K s2 – K d D – K s1 – M 2 D = x 1 – K d D – K s1
Kd x2 – x1 K s1 x 2 – x 1
2
K s2 + K d D + K s1 + M 2 D eqn 6.3
x 1 = x 2 -----------------------------------------------------------------
K d D + K s1
· ·
Kd x2 – x1 K s1 x 2 – x 1 · · ··
F = K d x 2 – x 1 + K s1 x 2 – x 1 – F = M 1 x 1
M1 2
K d x 2 D – x 1 D + K s1 x 2 – x 1 – F = M 1 x 1 D
2 eqn 6.4
F x 1 – K d D – K s1 – M 1 D + x 2 K d D + K s1 = F
For the design we are only interested in the upper spring, as it determines the force on the ground. An input-output equa-
tion for that spring is developed in Figure 6.23. The given values for the mass-spring-damper system are used. In addition a value
for the upper mass is selected. This is arbitrarily chosen to be the same as the lower mass. This choice may need to be changed later
if the resulting spring constant is not practical.
272
The solution begins by combining equations (1) and (2) and inserting [Link] values for the lower
mass, spring and damper. We can also limit the problem by selecting a mass value for the upper mass.
2
K s2 + K d D + K s1 + M 2 D 2
x 2 ----------------------------------------------------------------- – K d D – K s1 – M 1 D + x 2 K d D + K s1 = F
K d D + K s1
N Ns
M 1 = 1Kg K s1 = 2 ---- K d = 0.5 ------ M 2 = 1Kg
m m
2
K s2 + 0.5D + 2 + D 2
x 2 -------------------------------------------------- – 0.5D – 2 – D + x 2 0.5D + 2 = F
0.5D + 2
2 2 2
x 2 D + 0.5D + 2 + K s2 D – 0.5D – 2 + x 2 0.5D + 2 = F 0.5D + 2
4 2 1
x 2 D – 1 + D K s2 + D – 0.5K s2 + – 2K s2 = F 0.5D + 2
This can now be converted back to a differential equation and combined with the force.
d 4 d 2 d d
– ----- x + K s2 ----- x 2 – 0.5K s2 ----- x 2 – 2K s2 x 2 = 0.5 ----- F + 2F
dt 2 dt dt dt
d 4 d 2 d d
– ----- x + K s2 ----- x 2 – 0.5K s2 ----- x 2 – 2K s2 x 2 = 0.5 ----- 5 sin 6t + 2 5 sin 6t
dt 2 dt dt dt
d 4 d 2 d
– ----- x + K s2 ----- x 2 – 0.5K s2 ----- x 2 – 2K s2 x 2 = 15 cos 6t + 10 sin 6t
dt 2 dt dt
This particular solution of the differential equation will yield the steady-state displacement of the upper mass. This can
then be used to find the needed spring coefficient.
273
The transfer function can be broken into pieces using a partial fraction expansion.
x – 0.5 D + – 2 MD + N OD + P
----2- = ---------------------------------------------------------------------------------------------------------- = -------------------------------- + --------------------------------
F 4 2 1 2 2
D 1 + D – K s2 + D 0.5K s2 + 2K s2 D + SD + Q D + TD + U
x2 3 2
D M + O + D N + MT + SO + P + D MU + NT + OQ + PS + NU + PQ
----- = -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
F 4 3 2
D 1 + D S + T + D Q + U + ST + D SU + QT + QU
M+O = 0 M = –O S+T = 0 S = –T
N + –O T + –T O + P = 0 N – 2OT + P = 0 = 0
MU + NT + OQ + PS = – 0.5 – O U + NT + OQ + P – T = – 0.5
Q + U + ST = S + T Q + U + –T T = – T + T
NU + PQ = – 2
SU + QT = 0.5K s2 QU = 2K s2
d 4 d 2 d
– ----- x + K s2 ----- x 2 – 0.5K s2 ----- x 2 – 2K s2 x 2 = 15 cos 6t + 10 sin 6t
dt 2 dt dt
x p = A sin 6t + B cos 6t
d
----- x = 6A cos 6t – 6B sin 6t
dt p
d 2
----- x p = – 36 A sin 6t – 36B cos 6t
dt
d 3
----- x p = – 216 A cos 6t + 216B sin 6t
dt
d 4
----- x p = 1296A sin 6t + 1296B cos 6t
dt
A – 3K s2 + B – 1296 – 38K s2 = 15
10 + A 1296 + 38K s2
A – 3K s2 + ------------------------------------------------------- – 1296 – 38K s2 = 15
3K s2
2
A – 9K s2 + 10 + A 1296 + 38K s2 – 1296 – 38K s2 = 45K s2
2
– 9K s2 45K s2
A ------------------------------------------- + A 1296 + 38K s2 = ------------------------------------------- – 10
– 1296 – 38K s2 – 1296 – 38K s2
45K s2
------------------------------------------
- – 10
– 1296 – 38K s2
A = ----------------------------------------------------------------------------------------
2
– 9K s2
------------------------------------------- + 1296 + 38K s2
– 1296 – 38K s2
425K 2s + 12960
A = -----------------------------------------------------------------------------------
2
– 1453K 2s – 98496K 2s – 1679616
425K 2s + 12960
10 + ----------------------------------------------------------------------------------- 1296 + 38K s2
2
– 1453K 2s – 98496K 2s – 1679616
B = ---------------------------------------------------------------------------------------------------------------------------------------------
3K s2
2
10 – 1453K 2s – 98496K 2s – 1679616 + 425K 2s + 12960 1296 + 38K s2
B = -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2
3K s2 – 1453K 2s – 98496K 2s – 1679616
2 8
1620K 2s + 2.097563 10 K 2s
B = -----------------------------------------------------------------------------------------------------
2
3K s2 – 1453K 2s – 98496K 2s – 1679616
540K 2s + 69918768
B = -----------------------------------------------------------------------------------
2
– 1453K 2s – 98496K 2s – 1679616
Finally the magnitude of the particular solution is calculated and set to the desired amplitude of 0.1N. This is then used to
calculate the spring coefficient.
2 2
amplitude = A +B
A value for the spring coefficient was then found using Mathcad to get a value of 662N/m.
6.1 Summary
• The differential operator can be manipulated algebraically
• Equations can be manipulated into input-output forms and solved as normal differential equations
276
y· + y + x = 3
x· + x + y = 0
Problem 6.2 Find the input-output form for the following equations.
·· · ·
x 1 + x 1 + 2x 1 – x 2 – x 2 = 0
· ·· ·
– x1 – x1 + x2 + x2 + x2 = F
Problem 6.3 Find the input-output equations for the differential equations below if both ‘x’ and ‘y’ are outputs.
y· + y + 5x = 3u
x· + x + y = 7v
Problem 6.4 For the system below find the a) state and b) input-output equations. The cable always remains tight, and all
deflections are small. Assume that the value of J2 is negligible. The input is the force F and the output is the
angle ‘theta’.
K s1
J2 R2
Kd
J1 R1
F
K s2
y
M3
Problem 6.5 Develop the input-output equation and transfer function for the mechanical system below. There is viscous
damping between the block and the ground. A force is applied to cause the mass to accelerate.
x
Problem 6.6 Assume that the cables always remain tight and all deflections are small. Find the transfer function for the system
277
below.
J1 R1
K s2
R3 R2
K s1
J2
x
F
Problem 6.7 Write the input-output equations for the mechanical system below. The input is force ‘F’, and the output is ‘y’ or
the angle theta (give both equations). Include the inertia of both masses, and gravity for mass ‘M’.
R JM
K y
Problem 6.8 For the system pictured below find the input-output equation for y2 considering the effect of gravity.
K s1
M1 y1
K s2
M2 y2
F
278
Problem 6.9 The following differential equations were converted to the matrix form shown. Use Cramer’s rule (or equivalent)
to find an input-output equation for ‘y’.
·· F
y + 2x = ------ 2 F
10 D 2 y = ------
10
2 x
7y· + 4y + 9x·· + 3x = 0 7D + 4 9D + 3 0
Problem 6.10 Find the input-output equations for the systems below. Here the input is the torque on the left hand side.
1 2
J1 J2
K s1 K s2
B1 B2
Problem 6.11 The applied force ‘F’ is the input to the system, and the output is the displacement ‘x’.
K1 = 500 N/m
x K2 = 1000 N/m
M = 10kg
w
Problem 6.12 a) Write the differential equations for the system below. Solve the equations for x assuming that the system is at
279
rest and undeflected before t=0. Also assume that gravity is present.
N
Ns K s1 = 1 ---- Ns
K d1 = 1 ------ m K d = 1 ------
m m
M = 1kg
x1
Ns N
K d2 = 1 ------ K s2 = 1 ----
m m
F = 1N
x
N
K s = 1 ----
m
x2
F = 1N
b) State whether each system is first or second-order. If the system if first-order find the time constant. If it is sec-
ond-order find the natural frequency and damping ratio.
Answer 6.2
d- 4 d 3 d 2 d d
---- x + 2 ----- x + 3 ----- x + ----- x + x 1 = ----- F + F
dt 1 dt 1 dt 1 dt 1 dt
d- 4 d 3 d 2 d d 2 d
---- x + 2 ----- x + 3 ----- x + ----- x + x 2 = ----- F + ----- F + 2F
dt 2 dt 2 dt 2 dt 2 dt dt
Answer 6.3
··
y + 2y· – 4y = 3u – 35v + 3u·
··
x + 2x· – 4x = – 3u + 7v + 7v·
280
Answer 6.4 a)
a) y· = v
– K s2 R 1 – K s2 F – M3g
v· = ------------------- + y -----------
- + --------------------
M3 M3 M3
·
=
2 2 2
· – K d1 R 1 – K s1 R 1 – K s2 R 1 – R 1 K s2
= -------------------- + ------------------------------------------- + y ------------------
-
J1 J1 J1
b) 2 2 2
d 4 d 3 – K d1 R 1 M 3 d 2 – M 3 K s1 R 1 – K s2 J 1 – M 3 K s2 R 1
----- + ----- ---------------------------
- + ----
- --------------------------------------------------------------------------------
-
dt dt –J1 M3 dt –J1 M3
2 2 2 2
d 1 – K s1 K d1 R 1 – K s1 K s2 R 1 – K s2 R 1 + K s2 R 1 F – M3 g
+ ----- ----------------------------- + --------------------------------------------------------------------------- = --------------------
dt –J1 M3 –J1 M3 –J1 M3
Answer 6.5
--x- = ----------------------------
B F 1
··
x + x· ----- = ----- -
M M F D B + DM
Answer 6.6
x ··
------ x
R1 J 1 ------ ··
R1 x
M = J 1 ------ + K s1 x R 1 – T R 1 = 0
R 1
··
x
T = J 1 ------ + K s1 x
2
R1
K s1 x
T
R3 ··
x
M = K s2 ------ x R 3 – J 2 ------ – TR 2 + FR 2 = 0
R2 R2
··
x
J 2 ------
R3 R2 T 2
– K s2 ------ x R3 ··
x ··
x
R2 – K s2 ------ x – J 2 ------ – J 1 ------ + K s1 x R 2 + FR 2 = 0
R2 R2 2
R1
2
J2 R2 R3
··
x ------ + J 1 ------ + x K s2 ------ + K s1 R 2 = FR 2
R2 2 R2
R1
F
2
R2
--x- = ---------------------------------------------------------------------------------------
-
F 2
2 R2 2 2
D J 1 ------ + J 2 + K s1 R 2 + K s2 R 3
2
R1
281
Answer 6.7
··
M = –R K R +R K –y– R = J
M
2 2 ··
J R K + RKy + R K = – J
M M
2 2
R K R 2R K + J M D
R K –y– R ------------------------------------- = y
– RK
K –y– R y
F = K – y – R – F – Mg = My··
2
K y + R + F + Mg = – M yD
M
2
KR + F + Mg = y – MD – K
F+Mg 2
KR + y MD + K = – F – Mg
2 2 2 2 2 2 4 2
– K R + 2R MKD + 2R K + J MD + J KD = FKR + MgKR
M M
d 4 d 2 2 2 2
----- J M M + ----- 2R MK + J M K + K R = FKR + MgKR
dt dt
2 2 2
d 4 d 2 2R K K K R KR - + gKR
----- + ----- --------------- + ----- + --------------- = F ------------ ------------
dt dt JM M JM M JM M JM
for the y output equation;
– RK 2
y ----------------------------------- KR + y MD + K = – F – Mg
2 2
2R K + J M D
2 2 2 2 2 2 2
y – RK KR + y MD + K 2R K + J M D = – F 2R K + J M D – Mg 2R K + J M D
4 2 2 2 2 2 2 2 2 2
y MJ M D + 2R K MD + K JMD +R K = – F 2R K + J M D – Mg 2R K + J M D
2 2 2 2 2 2
2 2R K M + K J M K JM D JM 2
----------------------------------------------- + R
------------- = – F 2R
K
- – Mg 2R
4 K
y D +D -------------- + -------------- -------------- + -----------
-D
MJ M MJ M MJ M MJ M MJ M MJ M
2 2 2 2 2 2
4 2 2R K K R K 2R K D 2R K 2
y D +D -------------- + ----- + ------------- = – F -------------- + ------- – g -------------- + D
JM M MJ M MJ M M JM
2 2 2 2 2
d- 4 d 2 2KR K R K d 2 –1 – 2 KR – 2 gKR d 2
---- y + ----- y -------------- + ----- + y ------------- = ----- F ------ + F ----------------- + -------------------- + ----- g
dt dt JM M JMM dt M JMM JM dt
282
Answer 6.8
d 4 d 2 M 2 K s1 + K s2 + M 1 K s2 K s1 + K s2
----- y + ----- y -------------------------------------------------------------
- + y 2 ------------------------
-
dt 2 dt 2 M1 M2 M1 M2
d 2 1 K s1 + K s2 g M 2 K s1 + K s2 + M 1 K s2
= ----- F ------- + F ------------------------- + ----------------------------------------------------------------------
dt M2 M1 M2 M1 M2
Answer 6.9
F
------ 2
10
2 F 2
0 9D + 3 ------ 9D + 3 2
10 F 0.9D + 0.3
y = -------------------------------------------------------- = --------------------------------------------------------------- = -----------------------------------------------------
2 2 4 2
2 D 9D + 3 – 2 7D + 4 9D + 3D – 14D – 8
D 2
2
7D + 4 9D + 3
4 2 2
y 9D + 3D – 14D – 8 = F 0.9D + 0.3
d 4 d 2 d 1 d 2
----- y 9 + ----- y 3 + ----- y – 14 + y – 8 = ----- F 0.9 + F 0.3
dt dt dt dt
d 4 d 2 1 d 1 – 14 –8 d 2 1 1
----- y + ----- y --- + ----- y --------- + y ------ = ----- F ------ + F ------
dt dt 3 dt 9 9 dt 10 30
Answer 6.10
d 4 d 3 J1 B2 + J2 B1 d 2 J 1 K s2 + J 2 K s2 + B 1 B 2
----- 2 + ----
- 2
------------------------------
- + ----
- 2
-------------------------------------------------------- +
dt dt J1J2 dt J1 J2
d B 1 K s2 + B 2 K s2 K s2
----- 2
--------------------------------------- = ----------
-
dt J1J2 J1J2
d 4 d 3 J1 B2 + J2 B1 d 2 J 1 K s2 + J 2 K s2 + B 1 B 2
----- 1 + ----- 1
------------------------------- + ----- 1
-------------------------------------------------------- +
dt dt J1J2 dt J1 J2
d B 1 K s2 + B 2 K s2 d 2 1 d B2 K s2
----- 1
--------------------------------------- = ----- ----- + ----- ----------
- + ----------
-
dt J1 J2 dt J1 dt J1J2 J1 J2
Answer 6.11
K1K K2 K2
·· 2
x + x ------------------------------ = F ------------------------------ + g --------------------
M K1 + K2 M K1 + K2 K1 + K2
Answer 6.12
a) –t b) – 0.5t
x1 t = e –1 x t = – 12.485e cos 0.866t – 0.524 + 10.81
–t
x 2 t = 2e –2
= 0.50 n = 1.0
= 1.0
1 M = 100Kg
-----
y M Ns
--- = ------------------------------------------------- K d = 5000 ------
F 2 Kd Ks m
D + D ------ + ------
M M N
K s = 1000 ----
m
d) Find a new value for Kd that makes the system critically damped.
e) Use a numerical method to find the response to the input function below, using your new Kd value. Use the
‘u(t)’ function in your program for the input function. Plot the results from 0 to 5 seconds. (Hint: to check your
solutions remember critical damping.)
F (N)
20
10
t (sec)
6.5 References
6.1 Irwin, J.D., and Graf, E.R., Industrial Noise and Vibration Control, Prentice Hall Publishers, 1979.
6.2 Close, C.M. and Frederick, D.K., “Modeling and Analysis of Dynamic Systems, second edition, John Wiley and Sons, Inc.,
1995.
284
285
7. Electrical Systems
Topic 7.1 Basic components; resistors, power sources, capacitors, inductors and op-amps.
Topic 7.2 Device impedance.
Topic 7.3 Example circuits.
Objective 7.1 To apply analysis techniques to circuits.
A voltage is a pull or push acting on electrons. The voltage will produce a current when the electrons can flow through a
conductor. The more freely the electrons can flow, the lower the resistance of a material. Most electrical components are used to
control this flow.
7.1 Modeling
Kirchoff’s voltage and current laws are shown in Figure 7.1. The node current law holds true because the current flow in
and out of a node must total zero. If the sum of currents was not zero then electrons would be appearing and disappearing at that
node, thus violating the law of conservation of matter. The loop voltage law states that the sum of all rises and drops around a loop
must total zero.
I node = 0 node current
The simplest form of circuit analysis is for DC circuits, typically only requiring algebraic manipulation. In AC circuit
analysis we consider the steady-state response to a sinusoidal input. Finally the most complex is transient analysis, often requiring
integration, or similar techniques.
• DC (Direct Current) - find the response for a constant input.
• AC (Alternating Current) - find the steady-state response to an AC input.
• Transient - find the initial response to changes.
There is a wide range of components used in circuits. The simplest components are passive, such as resistors, capacitors
and inductors. Active components are capable of changing their behaviors, such as op-amps and transistors. A list of components
that will be discussed in this chapter are listed below.
• Resistors - reduce current flow as described with ohm’s law
• Voltage/current sources - deliver power to a circuit
• Capacitors - pass current based on current flow, these block DC currents
• Inductors - resist changes in current flow, these block high frequencies
• Op-amps - very high gain amplifiers useful in many forms
Resistors
Resistance is a natural phenomenon found in all materials except superconductors. A resistor will oppose current flow as
described by ohm’s law in Figure 7.2. The resistance value is assumed to be linear, but in actuality it varies with conductor tem-
perature.
+ I = V
---
R
V R
- V = IR
286
The voltage divider example in Figure 7.3 illustrates the methods for analysis of circuits using resistors. In this circuit an
input voltage is supplied on the left hand side. The output voltage on the right hand side will be some fraction of the input voltage.
If the output resistance is very large, no current will flow, and the ratio of output to input voltages is determined by the ratio of the
resistance between R1 and R2. To prove this the currents into the center node are summed and set equal to zero. The equations are
then manipulated to produce the final relationship.
I +I +I = 0
1 2 3
+
V –V 0–V
I i o o
1 ------------------ + I + --------------- = 0
R1 R 2 R2
1
Assume the output resistance is large, so I2 is
negligible.
Vi
+ Vi – Vo –V
I2 ------------------ + ---------o- = 0
R1 R2
I3 Vo
R2 1 + ------ 1 1
- V o ------ = Vi ------
- R1 R2 R1
R1 + R2 1
V o -------------------- = V i ------
R1 R2 R1
Vo R2
------ = -------------------
-
Vi R1 + R2
If two resistors are in parallel or series they can be replaced with a single equivalent resistance, as shown in Figure 7.4.
287
R1
series resistors
R eq = R 1 + R 2
R2
1 1 1
--------- = ------ + ------
parallel resistors R eq R1 R2
R1 R2
1
R eq = --------------------
1 1
------ + ------
R1 R2
R1 R2
R eq = -------------------
R1 + R2
A voltage source will maintain a voltage in a circuit, by varying the current as required. A current source will supply a
current to a circuit, by varying the voltage as required. The schematic symbols for voltage and current sources are shown in Figure
7.5. The supplies with ‘+’ and ‘-’ symbols provide DC voltages, with the symbols indicating polarity. The symbol with two hori-
zontal lines is a battery. The circle with a sine wave is an AC voltage supply. The last symbol with an arrow inside the circle is a
current supply. The arrow indicates the direction of positive current flow.
+ +
V+
V V I
- V
- -
A circuit containing a voltage source and resistors is shown in Figure 7.6. The circuit is analyzed using the node voltage
method.
288
R1
Find the output voltage Vo.
+
Vi + R2 R3 Vo
-
-
Examining the circuit there are two loops, but only one node, so the node current methods is the most suit-
able for calculations. The currents into the upper right node, Vo, will be solved.
R2 R3
V o = V i -----------------------------------------------------
R2 R3 + R1 R3 + R1 R2
Dependent (variable) current and voltage sources are shown in Figure 7.7. The voltage and current values of these sup-
plies are determined by their relationship to some other circuit voltage or current. The dependent voltage source will be accompa-
nied by a ‘+’ and ‘-’ symbol, while the current source has an arrow inside.
V = f
I = f
+
Capacitors
Capacitors are composed of two isolated metal plates very close together. When a voltage is applied across the capacitor,
electrons will be forced into one plate, and forced out of the other plate. Temporarily this creates a small current flow until the
plates reach equilibrium. So, any voltage change will result in some current flow. In practical terms this means that the capacitor
will block any DC voltages, except for transient effects. But, high frequency AC currents will pass through the device. The equa-
289
tion for a capacitor and schematic symbols are given in Figure 7.8.
+
+ C d
I = C ----- V = CDV
C V I dt
The symbol on the left is for an electrolytic capacitor. These contain a special fluid that increases the effective capacitance
of the device but requires that the positive and negative sides must be observed in the circuit. (Warning: reversing the polarity on an
electrolytic capacitor can make them leak, fail and possibly explode.) The other capacitor symbol is for a regular capacitor, nor-
mally with values under a microfarad.
Inductors
While a capacitor will block a DC current, an inductor will pass it. Inductors are basically coils of wire. When a current
flows through the coils, a magnetic field is generated. If the current through the inductor changes then the magnetic field must
change, otherwise the field is maintained without effort (i.e., no voltage). Therefore the inductor resists changes in the current. The
schematic symbol and relationship for an inductor are shown in Figure 7.9.
+ I
d
L V = L ----- I = LDI
V dt
An inductor is normally constructed by wrapping wire in loops about a core. The core can be hollow, or be made of ferrite
to increase the inductance. Inductors usually cost more than capacitors. In addition, inductors are susceptible to interference when
metals or other objects disturb their magnetic fields. When possible, designers normally try to avoid using inductors in circuits.
Op-Amps
The ideal model of an op-amp is shown in Figure 7.10. On the left hand side are the inverting and non-inverting inputs.
Both of these inputs are assumed to have infinite impedance, and so no current will flow. Op-amp application circuits are designed
so that the inverting and non-inverting inputs are driven to the same voltage level. The output of the op-amp is shown on the right.
In circuits op-amps are used with feedback to perform standard operations such as those listed below.
• Adders, subtracters, multipliers, and dividers - simple analog math operations.
• Amplifiers - increase the amplitude of a signal.
• Impedance isolators - hide the resistance of a circuit while passing a voltage.
290
A simple op-amp example is given in Figure 7.11. As expected both of the op-amp input voltages are the same. This is a
function of the circuit design. (Note: most op-amp circuits are designed to force both inputs to have the same voltage, so it is nor-
mally reasonable to assume they are the same.) The non-inverting input is connected directly to ground, so it will force both of the
inputs to 0V. When the currents are summed at the inverting input, an equation including the input and output voltages is obtained.
The final equation shows the system is a simple multiplier, or amplifier. The gain of the amplifier is determined by the ratio of the
input and feedback resistors.
R2
R1
-
+
Vi + +
- Vo
-
The voltage at the non-inverting input will be 0V, by design the voltage at the inverting input will be
the same.
V + = 0V
V - = V + = 0V
V- – Vi V- – Vo
I V- = ----------------- + ------------------ = 0
R1 R2
0–V 0–V
--------------i + --------------o- = 0
R1 R2
–R2 V
i
V o = ---------------
R1
–R2
V o = --------- V i
R1
R2
R1
+
-
+
Vi R5 +
- + R3 Vo
Vref -
R4
-
For ideal op-amp problems the node voltage method is normally the best choice. The equations for the circuit in Figure
7.12 are derived in Figure 7.13. The general approach to this solution is to sum the currents into the inverting and non-inverting
input nodes. Notice that the current into the op-amp is assumed to be zero. Both the inverting and non-inverting input voltages are
then set to be equal. After that, algebraic manipulation results in a final expression for the op-amp. Notice that if all of the resistor
values are the same then the circuit becomes a simple subtracter.
292
Note: normally node voltage methods work best with op-amp circuits, although others can be used if the
non-ideal op-amp model is used.
First sum the currents at the inverting and non-inverting op-amp terminals.
V+ – Vi V+ – Vo
I V+ = ------------------ + ------------------- = 0
R1 R2
1 1 1 1
V + ------ + ------ = V i ------ + V o ------
R1 R2 R1 R2
R1 + R2 1 1
V + ------------------- = V i ------ + V o ------
R1 R2 R1 R2
R2 R1 eqn 7.1
V + = V i ------------------- + V o -------------------
R1 + R2 R1 + R2
V - – V ref V -
I V- = ---------------------- + ------ = 0
R5 R4
1 1 1
V - ------ + ------ = V ref ------
R4 R5 R5
R4 eqn 7.2
V - = V ref -------------------
R4 + R5
V- = V+
R4 R2 R1
V ref ------------------- = V i ------------------- + V o -------------------
R4 + R5 R1 + R2 R1 + R2
R1 R2 R4
V o ------------------- = – V i ------------------- + V ref -------------------
R1 + R2 R1 + R2 R4 + R5
R2 R4 R1 + R2 eqn 7.3
V o = – V i ------ + V ref -------------------------------
R1 R1 R4 + R5
An op-amp (operational amplifier) has an extremely high gain, typically 100,000 times. The gain is multiplied by the dif-
ference between the inverting and non-inverting terminals to form an output. A typical op-amp will work for signals from DC up to
about 100KHz. When the op-amp is being used for high frequencies or large gains, the model of the op-amp in Figure 7.14 should
be used. This model includes a large resistance between the inverting and non-inverting inputs. The voltage difference drives a
dependent voltage source with a large gain. The output resistance will limit the maximum current that the device can produce, nor-
mally less than 100mA.
293
V–
typically,
rn r n > 1M
+ Vo
- 5
ro A > 10
V + A V+ – V- r o < 100
7.1 Impedance
Circuit components can be represented in impedance form as shown in Figure 7.15. When represented this way the circuit
solutions can focus on impedances, ‘Z’, instead of resistances, ‘R’. Notice that the primary difference is that the differential opera-
tor has been replaced. In this form we can use impedances as if they are resistances.
Capacitor 1- I t dt
V t = --- 1-
Z = -------
C DC V = ZI
Inductor d- I t
V t = L ---- Z = LD
dt
When representing component values with impedances the circuit solution is done as if all circuit components are resis-
tors. An example of this is shown in Figure 7.16. Notice that the two impedances at the right (resistor and capacitor) are equivalent
to two resistors in parallel, and the overall circuit is a voltage divider. The impedances are written beside the circuit elements.
294
DL
t=0sec
50VDC +
+ R Vo
- 1/DC -
DL
50VDC 1 1 R -
+ ------------------------ = ------------------ = ---------------------
1 1 1 RCD +1
- -------------- + --- DC + ---
1 R R
--------
DC
R
----------------------
1 + DCR R
V o = 50V ------------------------------------------ = 50V --------------------------------------------
R 2
DL + ---------------------- D RLC + DL + R
1 + DCR
Vs
L -------
A
V
R ----
A
The circuit in Figure 7.17 could be solved with two loops, or two nodes. An arbitrary decision is made to use the current
loop method. The voltages around each loop are summed to provide equations for each loop.
R1
C
+
V L
I2
- I1
+
R2 Vo
-
First, sum the voltages around the loops and then eliminate I1. Note: when summing voltages
in a loop remember to deal
V L1 = – V + R 1 I 1 + L DI 1 – DI 2 = 0 with sources that increase the
eqn 7.4 voltage by flipping the sign.
R 1 + LD I 1 = V + LD I 2
V LD
I 1 = --------------------- + --------------------- I 2
R 1 + LD R 1 + LD eqn 7.5
I2
V L2 = L DI 2 – DI 1 + -------- + R 2 I 2 = 0
CD
2
1 LCD + 1 + R 2 CD eqn 7.6
DL I 1 = LD + -------- + R 2 I 2 = ---------------------------------------------- I 2
CD CD
2
LCD + 1 + R 2 CD
I 1 = ---------------------------------------------- I 2 eqn 7.7
2
CLD
The equations in Figure 7.17 are manipulated further in Figure 7.18 to develop an input-output equation for the second
current loop. This current can be used to find the current through the output resistor R2. The output voltage can then be found by
multiplying the R2 and I2.
296
First, sum the voltages around the loops and then eliminate I1.
2
V LD LCD + 1 + R 2 CD
I 1 = --------------------- + --------------------- I 2 = ---------------------------------------------- I 2
R 1 + LD R 1 + LD 2
CLD
2
LCD + 1 + R 2 CD R 1 + LD
V = ----------------------------------------------------------------------------- – LD I 2
2
CLD
2 2 3 2 2 3 2
R 1 LCD + R 1 + R 1 R CD + L CD + LD + R 2 CLD – CL D I 2 = CLD V
2
3 2 2 2 2
I 2 D L C – CL + D R 1 LC + R 2 CL + D R 1 R C + L + R 1 = V CLD
2
Vo = R2 I2
·· · ·· R CL
V o LC R 1 + R 2 + V o R 1 R C + L + V o R 1 = V 2
2
R1 R C + L R1 R 2 CL
·· · 2 ·· -------------------------------
V o + V o -------------------------------- + V o -------------------------------- = V -
LC R 1 + R 2 LC R 1 + R 2 LC R 1 + R 2
R1 R C + L R1 R2
·· · 2 ·· -----------------------
V o + V o -------------------------------- + V o -------------------------------- = V -
LC R 1 + R 2 LC R 1 + R 2 R1 + R2
The equations can also be manipulated into state equations, as shown in Figure 7.19. In this case a dummy variable is
required to replace the two first derivatives in the first equation. The dummy variable is used in place of I1, which now becomes an
output variable. In the remaining state equations I1 is replaced by q1. In the final matrix form the state equations are in one matrix,
and the output variable must be calculated separately.
297
State equations can also be developed using equations (1) and (3).
equation 1 becomes · ·
R 1 I 1 + LI 1 = V + LI 2
· ·
LI 1 – LI 2 = V – R 1 I 1
· · V R1
I 1 – I 2 = --- – ------ I 1
L L
q1 = I1 – I2 eqn 7.8
· V R1
q 1 = --- – ------ I 1
L L
eqn 7.9
I1 = q1 + I2
· V R1
q 1 = --- – ------ q 1 + I 2
L L
· R1 R1 V eqn 7.10
q 1 = q 1 – ------ + I 2 – ------ + ---
L L L
· · I 2 ·
equation 3 becomes LI 2 – LI 1 + ---- + R 2 I 2 = 0
C
I2 ·
V – R 1 I 1 + ---- + R 2 I 2 = 0
C
I2 ·
V – R 1 q 1 + I 2 + ---- = – R 2 I 2
C
· 1 eqn 7.11
I 2 = I 2 – R 1 + ---- + q 1 – R 1 + V
C
R1 R1
q1 – ------ – ------ q1 V
d L L --- q1
----- = + L
dt I I1 = 1 1
2 1 I I2
– R 1 – R 1 + ---- 2 V
C
The circuit in Figure 7.20 can be evaluated as a voltage divider when the capacitor is represented as an impedance. In this
case the result is a first-order differential equation.
298
t=0
C
V s = 3 cos t +
+ R Vo
- -
As normal we relate the source voltage to the output voltage. The we find the values for the various
terms in the frequency domain.
ZR 1
V o = V s -------------------- where, ZR = R Z C = --------
ZR + ZC DC
R
V o = V s ------------------
1
R + --------
DC
CRD
V o = V s ----------------------
CRD + 1
V o CRD + 1 = V s CRD
· ·
V o CR + V o = V s CR
· 1 ·
V o + V o -------- = V s
CR
The first-order differential equation in Figure 7.20 is continued in Figure 7.21 where the equation is integrated. The solu-
tion is left in variable form, except for the supply voltage.
299
· 1 d
V o + V o -------- = ----- 3 cos t = – 3 sin t
CR dt
V p = A sin t + B cos t
2 2 B
Vp =A + B sin t + atan ---
A
The homogeneous and particular solutions can now be combined. The system will be assumed to be at
rest initially.
t
– --------
CR 2 2 B
V0 = Vh + Vp = C1 e + A + B sin t + atan ---
A
0 2 2 B
0 = C 1 e + A + B sin 0 + atan ---
A
2 2 B
C 1 = – A + B sin 0 + atan ---
A
DC motors apply a torque between the rotor and stator that is related to the applied voltage/current. When a voltage is
applied the torque will cause the rotor to accelerate. For any voltage and load on the motor there will tend to be a final angular
300
velocity due to friction and drag in the motor. And, for a given voltage the ratio between steady-state torque and speed will be a
straight line, as shown in Figure 7.22.
The basic equivalent circuit model is shown in Figure 7.23, includes the rotational inertia of the rotor and any attached
loads. On the left hand side is the resistance of the motor and the ‘back emf’ dependent voltage source. On the right hand side the
inertia components are shown. The rotational inertia J1 is the motor rotor, and the second inertia is an attached disk.
I R
J1 J2
+ T,
Voltage Vm +
Supply Vs -
-
Because a motor is basically wires in a magnetic field, the electron flow (current) in the wire will push
against the magnetic field. And, the torque (force) generated will be proportional to the current.
Tm
T m = KI \I = -------
K
Next, consider the power in the motor,
P = V m I = T = KI \V m = K
Consider the dynamics of the rotating masses by summing moments.
d d
M = T m – T load = J ----- \T m = J ----- + T load
dt dt
These basic equations can be manipulated into the first-order differential equation in Figure 7.24.
The current-voltage relationship for the left hand side of the equation can be written and manipu-
lated to relate voltage and angular velocity.
Vs – Vm
I = --------------------
R
Tm Vs – K
------- = --------------------
K R
d
J ----- + T load Vs – K
dt
--------------------------------------- = -------------------
-
K R
2 T load
d-
---- K K-
------- = V -----
+ – ---------------
dt JR s JR J
301
Induction Motors
AC induction motors are extremely common because of the low cost of construction, and compatibility with the power
distribution system. The motors are constructed with windings in the stator (outside of the motor). The rotor normally has wind-
ings, or a squirrel cage. The motor does not have bushes to the rotor. The motor speed is close to, but always less than the rotating
AC fields. The rotating fields generate currents, and hence opposing magnetic fields in the stator. The maximum motor speed is a
function of the frequency of the AC power, and the number of pole of the machine. For example, an induction motor with three
poles being used with a 60Hz AC supply would have a maximum speed of 2*(60Hz/3) = 40Hz = 2400RPM.
The equivalent circuit for an AC motor is given in Figure 7.25. The slip of the motor determines the load current, IL. It is
a function of the fraction, f, of full speed.
Ls Rs Lr Rr
IL RL
V Lm
1–f
R L = ---------- R r
f
The torque relationship for AC motors is given in Figure 7.26. These can be combined with the equivalent circuit model to
determine the response of the motor to a load.
d
M = T rotor – T load = J -----
dt
Brushless servo motors are becoming very popular because of their low maintenance requirements. The motors eliminate
the need for brushes by using permanent magnets on the rotor, with windings on the stator, as shown in Figure 7.26. The windings
302
on the stator are switched at a given frequency to produce a desired rotational speed, or held static to provide a holding torque.
V
a
windings on stator
V
b
N S
permanent magnet rotor
Vc
The basic relationships for brushless DC motors are given in Figure 7.27.
d- L I + E
V t = R m + ----
dt m
E = Ke
T = Kt Im
where,
d T
V t = R m + ----- L ----- + K e
dt K t
d
M = T – T load = J -----
dt
d
T = J ----- + T
dt load
where,
d
J ----- + T load
d dt
V t = R m + ----- L ---------------------------------- + K e
dt K
t
JR m d LJ d 2 Rm L d
V t = ----------- ----- + ------ ----- + -------- T load + ----- ----- T load + K e
K t dt K t dt Kt K t dt
d 2 d d
LJ ----- + JR m ----- + K e K t = K t V – L ----- T load – R m T load
dt dt t dt
Rm d KeKt Kt V R m T load
d- 2
----
t 1d
+ -------- ----- + ------------- = ----------- – --- ----- T load – -----------------------
dt L dt LJ LJ J dt LJ
To rotate the motor at a constant velocity the waveform in Figure 7.29 would be applied to each phase. Although each
phase would be 120 degrees apart for a three pole motor. A more sophisticated motor controller design would smooth the waves
more to approach a sinusoidal shape.
Vt
t(ms)
7.2 Filters
Filters are useful when processing data signals. Low pass often used to eliminate noise, high pass filters eliminate static
signals and leave dynamic signals. Band pass filters reject all frequencies outside a desired frequency band. A low pass filter is
shown in Figure 7.30. At high frequencies the capacitor, C, has a very low impedance, and grounds the input signal. At low fre-
quencies the capacitor impedance is high, increasing the gain of the op-amp circuit. This is easier to conceptualize if the R1-C pair
304
Ri
R1 +
+ Vo
Vi -
C
-
A high pass filter is shown in Figure 7.31. In this case the voltage divider in the previous circuit is reversed. In this circuit
the gain will increase for signals with higher frequencies.
Rf
Ri
C +
+ Vo
Vi -
R
-
7.4 Summary
• Basic circuit components are resistors, capacitors, inductors op-amps.
• Node and loop methods can be used to analyze circuits.
• Capacitor and inductor impedances can be used as resistors in calculations.
Problem 7.2 Evaluate the circuit in Figure 7.6 using the current loop method.
Problem 7.4 Find the output current, Io, if Ii = 1A. What if the input current is Ii = 1sin(2t)A?
2ohm + + 3ohm
Ii V1 Io
- - V =f(V )
2 1
f(V1) = 3V1
+ C=1uF
-
V= I
5sin(10t)V
306
+ L=1mH
-
V= I
5cos(10t)V
Problem 7.7 a) Find the differential equation for the circuit below where the input is Vi, and the output is Vo.
L
+
Vi
+ C R Vo
- -
Problem 7.8 Evaluate the circuit in Figure 7.17 using the node voltage method.
L
Vi
R
R
Vo
307
Problem 7.10 Find the equation relating the output and input voltages,
Rf C
Ri
Vin
- Vout
+
Problem 7.11 Find the transfer function for the system below.
R1 L
C
Vo
Vi
R2
Problem 7.12 a) Find the differential equation for the circuit below.
1000
1 F
0.001H 1000
-
+
+
Vi +
10
- Vo
-
b) Put the differential equation in state variable form and a numerical method to produce a graph of the output
voltage Vo using a computer. Assume the system starts at rest, and the input is Vi=5V.
308
Problem 7.13 Write the differential equation for the following circuit.
L R +
Vi
+ C Vo
-
L +
Vi + C
Vo
- R
Problem 7.15 Consider the following circuit. Develop a differential equation for the circuit.
L +
C
Vi + R1
R2 R3 Vo
-
-
Problem 7.16 Find the input-output equation for the circuit below, and then find the natural frequency and damping factor.
R1
+
Vi R2 Vo
+ L C
-
-
309
Problem 7.17 a) Write the differential equations for the system pictured below. b) Put the equations in input-output form.
R2
R1
Vi
- Vo
C +
Problem 7.18 Given the circuit below, find the ratio of the output over the input (this is also known as a transfer function). Sim-
plify the results.
R2
Vi R1
C
- Vo
Problem 7.19 Examine the following circuit and then derive the differential equation.
L R2
R1
+ -
+
+
Vi Vo
- -
310
Problem 7.20 Examine the following circuit and then derive the differential equation.
L
R2
R1
+ -
+
+
Vi Vo
- -
Problem 7.21 a) Write the differential equations for the system pictured below.
b) Put the equations in state variable form.
c) Use numerical methods to find the ratio between input and output voltages for a range of frequencies. The gen-
eral method is put in a voltage such as Vi=1sin(___t), and see what the magnitude of the output is. Divide the
magnitude of the output sine wave by the input magnitude. Note: This should act as a high pass or low pass filter.
d) Plot a graph of gain against the frequency of the input.
R2
R1
Vi
- Vo
C +
C=1uF
R1=1K
R2=1K
Problem 7.22 Develop the differential equation(s) for the system below, and use them to find the response to the following
inputs. Assume that the circuit is off initially.
R3
Vi - Vo
+ C
R1=R2=R3=R4=1Kohm - R4
C=1uF
a) V i = 5 sin 100t
b) V i = 5 sin 1000000t R1
c) Vi = 5 R2
311
Problem 7.23 Use the following differential equation to construct an op-amp circuit.
· –R2
V o = V i – CR 2 + V i ---------
R1
C1 C2
C series = -------------------- C parallel = C 1 + C 2
C1 + C2
L1 L2
L parallel = ------------------ L series = L 1 + L 2
L1 + L2
Answer 7.2
R2 R3
V o = V i -----------------------------------------------------
R1 R2 + R1 R3 + R2 R3
Answer 7.3
Vo 1
------ = ---
Vi 5
Answer 7.4
I o = 2A
Answer 7.5
–6
I t = 50 10 cos 10t
Answer 7.6
I t = 5000 sin 10t
312
Answer 7.7
a) Sum currents at node V0.
Vo – Vi Vo
I V = ---------------------- + V o DC + ----------- = 0
o DL R
2 V o DL
V o – V i + V o D LC + -------------- = 0
R
·· · 1 1 1
V o + V o -------- + V o ------- = V i -------
CR LC LC
b) ·· · 1 1 1
V o + V o -------- + V o ------- = V i -------
CR LC LC
313
c)
–2
·· · L ·· –2 –6 · 10
V o LC + V o --- + V o = V i V o 10 10 + V o ----------- + V o = 10
R 3
10
·· –8 · –5
V o 10 + V o 10 + V o = 10
·· · 3 8 9
V o + V o 10 + V o 10 = 10
homogeneous:
2 At At 3 At 8
A e + Ae 10 +e 10 = 0
3 3 2 8
2 3 8 – 10 10 – 4 10
A + A 10 + 10 = 0 A = --------------------------------------------------------------- = – 500 9987j
2
– 500t
Vh = C1 e cos 9987t + C 2
particular:
Vp = A 3 8 9
0 + 0 10 + A 10 = 10 A = 10
V p = 10
initial conditions
– 500t
Vo = C1 e cos 9987t + C 2 + 10
–8
3 = – 4000 – 9987 -------------------- sin C 2
cos C 2
– 3997 - sin C 2
------------------- = -------------------- = tan C 2 C 2 = – 0.050
8 9987 cos C 2
–8
C 1 = -------------------- = – 8.01
cos C 2
– 500t
V o = – 8.01 e cos 9987t – 0.050 + 10
314
Answer 7.8
2
CL R 1 + R 2 I 2''' + L CR 1 + 2CR 1 R 2 + L I 2'' + R 1 CR 1 R 2 + 2L I 2' + R 12 I 2 = CLV''
V – V1 0 – V1 Vo – V1
I V1 = ---------------- + --------------- + ------------------- = 0
R1 LD 1
--------
CD
1 1 V
V 1 ------ + -------- + CD = ------ + V o CD
R 1 LD R1
LD LD
V 1 = V ------------------------------------------------- + V o R 1 CD -------------------------------------------------
2 2
LD + R 1 + R 1 LCD LD + R 1 + R 1 LCD
V1 – Vo 0 – Vo
I V2 = ------------------- + --------------- = 0
1 R2
--------
CD
1
CDV 1 = V o CD + ------
R 2
1 + CR 2 D
V 1 = V o -------------------------
CDR 2
1 + CR 2 D LD LD
V o ------------------------- = V ------------------------------------------------- + V o R 1 CD -------------------------------------------------
CDR 2 2 2
LD + R 1 + R 1 LCD LD + R 1 + R 1 LCD
2 2 2 3
V o 1 + CR 2 D LD + R 1 + R 1 LCD = VLD CR 2 + V o R 1 C D LR 2
2 2 3 2 2 3
V o LD + R 1 + R 1 LCD + CR 2 LD + CR 2 R D + CR 2 R LCD = VLD CR 2 + V o R 1 C D LR 2
1 1
2 2
V o D R 1 L C + CR 2 L + D L + CR 2 R + R 1 = VLD CR 2
1
·· · ·· LCR
V o R 1 L C + CR 2 L + V o L + CR 2 R + V o R 1 = V 2
1
L + CR 2 R R1 R2
·· · 1 ·· ------------------
V o + V o -------------------------------- + V o -------------------------------- = V -
LC R 1 + R 2 LC R 1 + R 2 R1 + R2
315
Answer 7.9
Method 1: Node Voltage
V o – 0 V o – V CR
--------------- + ----------------------- = 0
R LD
LD LD + R
V CR = V o -------- + 1 = V o ------------------
R R
V CR – V i V CR – 0 V CR – V o
---------------------- + -------------------- + ----------------------- = 0
1 R LD
--------
CD
V CR V CR 1
CDV CR – CDV i + ----------- + ----------- = V o --------
R LD LD
1 1 1
V o -------- = V CR CD + --- + -------- + V i – CD
LD R LD
2
1 LD + R RCLD + LD + R
V o -------- = V o ------------------ ------------------------------------------- + V i – CD
LD R RLD
2 2 2 2
Vo R = V o LD + R RCLD + LD + R + V i – CLR D
2 3 2 2 2 2 2 2 2 2
V o RCL D + L D + RLD + R CLD + RLD + R – R = V i CLR D
Vo 2
D CR
------ = -------------------------------------------------------------------------------
Vi 2 2
D RCL + D L + R C + 2R
Method 2: Simplification
Z o = R + LD
RZ o 2
R + RLD
Z c = ---------------- = -------------------------
R + Zo 2R + LD
Zc CDZ c 2
CD R + RLD
V CR = V i -------------------------- = V i ------------------------ = V i ------------------------------------------------------------------
1- 1 + CDZ c 2
------- + Zc 2R + LD + CD R + RLD
CD
2
R CD R + RLD R
V o = V CR ------------------ = V i ------------------------------------------------------------------ ------------------
R + LD 2 R + LD
2R + LD + CD R + RLD
V 2
D R C
-----o- = -------------------------------------------------------------------------------
Vi 2 2
D CLR + D CR + L + 2R
316
Answer 7.10
· Vi Rf ·
V o = --------- – ----- V i
CR i R i
Answer 7.11
For Vi use a voltage divider,
R2 R 2 CD
V + = V i --------------------- = V i -------------------------
1 R 2 CD + 1
R 2 + --------
Sum currents at V- CD
Vo – V– 0 – V–
-------------------------- + ------------------ = 0
LD R1
1 1 1
V– ------ + -------- = V o --------
R 1 LD LD
1 R 1 LD R1
V – = V o -------- --------------------- = V o ---------------------
LD R 1 + LD R 1 + LD
Combine
R 2 CD R1
V + = V – = V i ------------------------- = V o ---------------------
R 2 CD + 1 R 1 + LD
V R 2 CD R 1 + LD
-----o- = ------------------------
- ---------------------
Vi R 2 CD + 1 R1
Answer 7.12 a)
Create a node between the inductor and resistor Va, and use the node voltage method
VA – Vi VA – V– V– = V + = 0V
IV = ----------------------- + --------------------------- = 0
A 0.001D 1000
1000000 V A – V i + V A D = 0
1000000
V A = V i -------------------------------
1000000 + D
V– – VA V– – Vo
IV = --------------------------- + -------------------------- + V – – V o 0.000001D = 0
– 1000 1000
–1 - 1000000 –Vo
----------- V i ------------------------------- + -------------- + – V o 0.000001D = 0
1000 1000000 + D 1000
1000000
V o – 1 – 0.001D = V i -------------------------------
1000000 + D
2
V o – 1000000 – D – 1000D – 0.001D = 1000000V i
–9 –3
V o'' – 10 + V o' – 1.001 10 + Vo –1 = Vi
317
b)
d ·
----- V o = Y o
dt
d ·
----- Y o = – 1000000000V i – 1001000Y o – 1000000000V o
dt
Answer 7.13
·· · R 1 1
V o + V o --- + V o ------- = V i -------
L LC LC
Answer 7.14
·· · 1 1 1
a) V o + V o -------- + V o ------- = V i -------
RC LC LC
b) ·
Vo = Xo
· –1 –1 1
X o = X o -------- + V o ------- + V i -------
RC LC LC
Answer 7.15
·· R2 R3 C + L R2 · R2 R3
V o + V· o -------------------------------- + V o -------------------------------- = V i ----------------------------
LC R 2 + R 3 LC R 2 + R 3 L R2 + R3
Answer 7.16
·· · 1 1 1 · 1
a) V o + V o ---------- + ---------- + V o ------- = V i ----------
CR 1 CR 2 LC CR 1
1 L R1 + R2
b) = --------------------------------
n = -------
LC 2 CR 1 R 2
Answer 7.17
· R1
a) V i + V i R 1 C + V o ------ = 0
R2
· –R2
b) V o = V i – CR 2 + V i ---------
R1
Answer 7.18
Vo –R2
------ = ----------------------------------
-
Vi R 1 + DR 1 R 2 C
Answer 7.19
318
· –L –R2
V o = V i ------ + V i ---------
R1 R1
Answer 7.20
· R2 · –R2
V o + V o ------ = V i ---------
L R1
Answer 7.21
a) –R
· 2
V o = V i – CR 2 + V i ----------
R1
b) Not a state equation
c) assume Vi=1sin(wt)
2 –3 2 –3
Vo = –1 + – 10 sin t + atan – 1, – 10
2 –3 2
d) GAIN = 1 + 10
Answer 7.22
· 3 · 3
V o + V o 10 = V i 0.5 + V i 10
3
– 10 t
a) V o t = 0.2475e + 4.9813 sin 100t – 0.0497
3
– 10 t 6
b) V o t = 2500e + 2500 sin 10 t – 1.569
3
– 10 t
c) Vo t = –5 e +5 3
– 10 t
V o t = – 2.5 e +5
319
Answer 7.23
–R –R
· 2 2
V o = V i – CR 2 + V i ---------- = V i – CDR 2 + V i ----------
R R
1 1
An arbitrary choice to begin, assume the node voltage method. Each term should be voltage over
impedance.
V –V –R –V –V
o i 2 i i
------ = -------------- + V -------------- = -------------
- + --------
R2 1 i R R 1 R
-------- 1 2 -------- 1
CD CD
V V V
o i i
------ + -------------- + ------ = 0
R2 1 R1
--------
CD
It is worth noting that there are only two variables, and the node voltage is zero. We commonly
see this with an op-amp circuit.
Vo – 0 Vi – 0 Vi – 0
--------------- + -------------- + -------------- = 0
R2 1 R1
--------
CD
R2
R1
+ – +
Vi + Vo
–
–
Problem 7.25 Write the input-output equation for the circuit below.
+
C1 C2
Vi
+ R
L Vo
-
-
320
Problem 7.26 Write the differential equation for the following schematic.
+ R R +
L Vo
Vi C
-
-
Problem 7.27 Write the input-output equation for the circuit below.
+
C1 C2
Vi
+ R1 R2
L Vo
-
Problem 7.28 Study the circuit below. Assume that for t<0s the circuit is discharged and off. Starting at t=0s an input of
Vi=5sin(100,000t) is applied.
1K
+
Vi -
+
1uF
Vo
-
Answer 7.28
1
--------
CD 1 1
V o = V i ------------------------ = V i ---------------------- = V i -------------------------
1 CDR + 1 –3
R + -------- 1 + D10
CD
–3
V o 1 + D10 = Vi
·
V o + 1000V o = 1000V i
·
V o + 1000V o = 1000 5 sin 100000t
2 2
5000 – 1000t 1 + 100 – 100
V o t = --------------- e + ---------------------------- sin 100000t + atan ------------
10001 10001 1
Problem 7.29 Write the input-output equation for the circuit below.
+
C1 C2
Vi
+ L1 R
L2 Vo
-
Problem 7.30 Write the differential equation for the following schematic.
L
R1
+ -
+
+
Vi Vo
- -
Problem 7.31 Write the differential equation for the following schematic.
L
R
+ -
+
C +
Vi Vo
- -
322
Problem 7.32 Write the input-output equation for the circuit below.
L
C
-
V +
i + + V
R o
-
-
Problem 7.33 Write the input-output equation for the circuit below.
L
R
+ -
C +
+
Vi Vo
- -
R1 R2
-
Ve
+ Vs
C
323
output x 4+D
----------------- = f D --- = ---------------------------------
input F 2
D + 4D + 16
If both sides of the example were inverted then the output would become ‘F’, and the input ‘x’. This ability to invert a
transfer function is called reversibility. In reality many systems are not reversible.
There is a direct relationship between transfer functions and differential equations. This is shown for the second-order dif-
ferential equation in Figure 8.2. The homogeneous equation (the left hand side) ends up as the denominator of the transfer function.
The non-homogeneous solution ends up as the numerator of the expression.
324
·· · 2 f
x+2 nx + nx = M
-----
2 2 f-
----
xD + 2 n xD + n x = M
2 2 f
x D +2 nD + n = -----
M
1
-----
x M
-- = --------------------------------------------- particular
f 2 2
D + 2 nD + n homogeneous
Damping factor of system - If < 1 then underdamped, and the system will oscil-
late. If =1 critically damped. If > 1 overdamped, and never any oscillation
(more like a first-order system). As damping factor approaches 0, the first peak
becomes infinite in height.
Figure 8.2 The relationship between transfer functions and differential equations for a mass-spring-damper example
The transfer function for a first-order differential equation is shown in Figure 8.3. As before the homogeneous and non-
homogeneous parts of the equation becomes the denominator and the numerator of the transfer function.
1
x· + --- x = f
1
xD + --- x = f
1
x D + --- = f
x 1
-- = -------------
f 1
D + ---
system is engaged the gas pedal must automatically be adjusted to maintain a desired velocity setpoint. To do this a control system
is added, in this figure it is shown inside the dashed line. In this control system the output velocity is subtracted from the setpoint to
get a system error. The subtraction occurs in the summation block (the circle on the left hand side). This error is used by the con-
troller function to adjust the control variable in the system. Negative feedback is the term used for this type of controller.
control variable
Input output
(e.g. gas) system (e.g., a car) (e.g. velocity)
Note: The arrows in the diagram indicate directions so that outputs and inputs are unambiguous.
Each block in the diagram represents a transfer function.
There are two main types of feedback control systems: negative feedback and positive feedback. In a positive feedback
control system the setpoint and output values are added. In a negative feedback control the setpoint and output values are sub-
tracted. As a rule negative feedback systems are more stable than positive feedback systems. Negative feedback also makes sys-
tems more immune to random variations in component values and inputs.
The control function in Figure 8.4 can be defined many ways. A possible set of rules for controlling the system is given in
Figure 8.5. Recall that the system error is the difference between the setpoint and actual output. When the system output matches
the setpoint the error is zero. Larger differences between the setpoint and output will result in larger errors. For example if the
desired velocity is 50mph and the actual velocity 60mph, the error is -10mph, and the car should be slowed down. The rules in the
figure give a general idea of how a control function might work for a cruise control system.
1. If verror is not zero, and has been positive/negative for a while, increase/decrease gas
2. If verror is very big/small increase/decrease gas
3. If verror is near zero, keep gas the same
4. If verror suddenly becomes bigger/smaller, then increase/decrease gas.
5. etc.
In following sections we will examine mathematical control functions that are easy to implement in actual control sys-
tems.
326
The Proportional Integral Derivative (PID) control function shown in Figure 8.6 is the most popular choice in industry. In
the equation given the ‘e’ is the system error, and there are three separate gain constants for the three terms. The result is a control
variable value.
de
u = K p e + K i edt + K d ------
dt
Figure 8.6 A PID controller equation
Figure 8.7 shows a basic PID controller in block diagram form. In this case the potentiometer on the left is used as a volt-
age divider, providing a setpoint voltage. At the output the motor shaft drives a potentiometer, also used as a voltage divider. The
voltages from the setpoint and output are subtracted at the summation block to calculate the feedback error. The resulting error is
used in the PID function. In the proportional branch the error is multiplied by a constant, to provide a long term output for the
motor (a ballpark guess). If an error is largely positive or negative for a while the integral branch value will become large and push
the system towards zero. When there is a sudden change in the error value the differential branch will give a quick response. The
results of all three branches are added together in the second summation block. This result is then amplified to drive the motor. The
overall performance of the system can be changed by adjusting the gains in the three branches of the PID function.
Kp e
V V
+ +V
integral
+ e u
Ki e amp motor
+
- derivative + -V
d
K d ----- e
dt
There are other variations on the basic PID controller shown in Figure 8.8. A PI controller results when the derivative gain
is set to zero. (Recall the second order response.) This controller is generally good for eliminating long term errors, but it is prone
to overshoot. In a P controller only the proportional gain in non-zero. This controller will generally work, but often cannot elimi-
nate errors. The PD controller does not deal with long term errors, but is very responsive to system changes.
For a PI Controller
For a P Controller
gas = K p v error
For a PD Controller
dv error
= K v + K --------------------
gas p error d dt
Aside: The manual process for tuning a PID controlled is to set all gains to zero. The proportional gain is
then adjusted until the system is responding to input changes without excessive overshoot. After that the
integral gain is increased until the long term errors disappear. The differential gain will be increased last to
make the system respond faster.
A block diagram for a system is not unique, meaning that it may be manipulated into new forms. Typically a block dia-
gram will be developed for a system. The diagram will then be simplified through a process that is both graphical and algebraic.
For example, equivalent blocks for a negative feedback loop are shown in Figure 8.9, along with an algebraic proof.
c r
G D c G D r
+ ------------------------------------
-
is equal to 1+G D H D
-
r = G D e
H D
r = G D c–H D r
r 1+G D H D = G D c
Note: Units can be used to verify the G D
feedback loop calculations. r = ------------------------------------- c
1+G D H D
Other block diagram equivalences are shown in Figure 8.10 to Figure 8.16. In all cases these operations are reversible.
Proofs are provided, except for the cases where the equivalence is obvious.
c r
G D c G D r
+ ------------------------------------
-
is equal to 1–G D H D
+
r = G D e
H D
r = G D c+H D r
r 1–G D H D = G D c
G D
r = ------------------------------------- c
1–G D H D
r r c
c G D is equal to 1
-------------
G D
r = G D c
1
c = r -------------
G D
c r c r
G D
G D
is equal to
G D
r r
c x b is equal to
H D c b
G D G D H D
x = G D c
b = H D x
b = H D G D c
c r c r
G D
G D
is equal to 1
-------------
G D
c c
e
c c e
G D G D
is equal to
b
1 b
c -------------
G D
e = G D c b
b -
----------------
e = G D c
G D
c r c r
G D G D
is equal to
r = G D c d d
d G D
r = cG D dG D
Recall the example of a cruise control system for an automobile presented in Figure 8.4. This example is extended in Fig-
ure 8.17 to include mathematical models for each of the function blocks. This block diagram is first simplified by multiplying the
blocks in sequence. The feedback loop is then reduced to a single block. Notice that the feedback line doesn’t have a function block
on it, so by default the function is ‘1’ - everything that goes in, comes out.
330
= G(D)
vdesired verror Ki vactual
10
K p + ----- + K d D ---------
+ D MD
-
H(D) = 1
Ki 10
K p + ----- + K d D --------- vactual
vdesired D MD
----------------------------------------------------------------------------
Ki 10
1 + K p + ----- + K d D --------- 1
D MD
The function block is further simplified in Figure 8.18 to a final transfer function for the whole system.
331
K
K + -----i + K D vactual
vdesired p D d
-------------------------------------------------------------
K
MD
--------- + K p + -----i + K d D
10 D
2
vdesired D Kd + D Kp + Ki vactual
---------------------------------------------------------------------------
2 M
D ----- -+K +D K + K
10 d p i
2
v actual D Kd + D Kp + Ki
---------------------- = ---------------------------------------------------------------------------
v desired 2 M
D ----- -+K +D K + K
10 d p i
Consider the example of a DC servo motor controlled by a computer. The purpose of the controller is to position the
motor. The system in Figure 8.19 shows a reasonable control system arrangement. Some elements such as power supplies and com-
mons for voltages are omitted for clarity.
LM675
X op-amp
shafts are coupled
-
+
+5V -5V
5K potentiometer
desired position
voltage Vd
The feedback controller can be represented with the block diagram in Figure 8.20.
332
desired
position
voltage +
gain Kp op-amp motor shaft
Vd
potentiometer
The transfer functions for each of the blocks are developed in Figure 8.21. Two of the values must be provided by the sys-
tem user. The op-amp is basically an inverting amplifier with a fixed gain of -2.2 times. The potentiometer is connected as a volt-
age divider and the equation relates angle to voltage. Finally the velocity of the shaft is integrated to give position.
V o = 5V --------------
5 2
Vo –1
------ = 0.159Vrad
d-
= ----
dt
1-
---- = ---
D
Figure 8.21 Transfer functions for the power amplifier, potentiometer and motor shaft
The basic equation for the motor is derived in Figure 8.22 using experimental data. In this case the motor was tested with
the full inertia on the shaft, so there is no need to calculate ‘J’.
333
For the motor use the differential equation and the speed curve when Vs=10V is applied:
1400 RPM 2
d K K
----- + ------- = ------ V
dt JR JR s
1s 2s 3s
For steady-state
d –1
----- = 0 = 1400RPM = 146.6rads
dt
2
K K
0 + ------- 146.6 = ------ 10
JR JR
K = 0.0682
ª 0.8s
1s
2
K
------- = 1---
JR
K 1-
0.0682 ------ = ---------
JR 0.8s
K- = 18.328
-----
JR
1
D + ------- = 18.33V s
0.8
18.33 -
------ = --------------------
Vs D + 1.25
The individual transfer functions for the system are put into the system block diagram in Figure 8.23. The block diagram
is then simplified for the entire system to a single transfer function relating the desired voltage (setpoint) to the angular position
(output). The transfer function contains the unknown gain value ‘Kp’.
334
Vd +
Kp -2.2 18.33 1
--------------------- ----
D + 1.25 D
-
0.159
Vd +
– 40.33Kp
------------------------------
D + 1.25 D
-
0.159
Vd
– 40.33Kp
------------------------------
D + 1.25 D
-----------------------------------------------------------
– 40.33Kp -
1 + 0.159 -----------------------------
D + 1.25 D
Vd
– 40.33Kp
----------------------------------------------------------
D + 1.25 D – 6.412Kp
Vd
– 40.33Kp
--------------------------------------------------------
2
D + 1.25 D – 6.412Kp
The value of ‘Kp’ can be selected to ‘tune’ the system performance. In Figure 8.24 the gain value is calculated to give the
system an overall damping factor of 1.0, or critically damped. This is done by recognizing that the bottom (homogeneous) part of
the transfer function is second-order and then extracting the damping factor and natural frequency. The final result of ‘Kp’ is nega-
tive, but this makes sense when the negative gain on the op-amp is considered.
335
= 1.0
The denominator of the system transfer function can be compared to the standard second-order
response.
2 2
D + 1.25 D – 6.412K p = x'' + 2 n x' + nx
1.25 = 2 n
1.25 = 2 1.0 n
n = 0.625
2
– 6.412K p = n
2
– 6.412K p = 0.625
K p = – 0.0609
8.3 Summary
• Transfer functions can be used to model the ratio of input to output.
• Block diagrams can be used to describe and simplify systems.
Problem 8.2 Find the transfer function for the systems below. Here the input is a torque, and the output is the angle of the sec-
336
ond mass.
1 2
J J
K 1 K 2
s1 s2
B B
1 2
Problem 8.3 Find the transfer functions for the system below where Vi is the input and Vo is the output.
C L
+ +
Vi R1 R2 Vo
- -
Problem 8.4 Given the block diagram below, select a system gain K that will give the overall system a damping ratio of 0.7
(for a step input). What is the resulting damped frequency of the system?
+ 2
K -------------------------------
2
D + 3D + 2
-
Problem 8.5 The block diagram below is for a servo motor position control system. The system uses a proportional controller.
a) Draw a sketch of what the actual system might look like. Identify components.
Vd Ve Vm 10 - rad 1-
d K ------------ -------- --- a
V
2 -------- + D + 1 sV D
rad
-
Va V
2 --------
rad
b) Convert the system to a transfer function.
337
Problem 8.6 Simplify the block diagram below and find the overall transfer function for the system.
D D + 10
--------------------------
10
Fd e 2 + V xa Fa
10
4 D + 100 -------------------------- 1
---------------------- D D + 10 ---
xd 2 4
D + 20
xf
4
c e K 1- r
10 - 2+D
-------------
+ K p + -----i ---
D
2+D D
-
10 -
-------------
D+2
a) Find a transfer function for the system.
b) Select Kp and Ki values to make the system critically damped and the natural frequency is 1 rad/s.
Hint:
3 2 2 2
D +D P +D Q + R = D+A D +2 nD + n
Problem 8.8 Develop a transfer function for the system below. The input is the force ‘F’ and the output is the voltage ‘Vo’.
The mass is suspended by a spring and a damper. When the spring is undeflected y=0. The height is measured
with an ultrasonic proximity sensor. When y = 0, the output Vo=0V. If y=20cm then Vo=2V and if y=-20cm then
Vo=-2V. Neglect gravity.
N s
K s = 10 ---- K d = 5N ---- M = 0.5Kg
m m
Ks Kd
Ultrasonic F y
Proximity
Sensor
Problem 8.9 Given the transfer function, G(s), determine the time response output Y(t) to a step input X(t).
4 - = Y
G = ------------ ---- X t = 20 When t >= 0
D+2 X
338
Problem 8.10 Given a mass supported by a spring and damper, find the displacement of the supported mass over time if it is
released from neutral at t=0sec, and gravity pulls it downward.
a) develop a transfer function for y/F.
b) find the input function F.
c) solve the input output equation to find an explicit equation of the position as a function of time for Ks = 10N/
m, Kd = 5Ns/m, M=10kg.
d) solve part c) numerically.
Problem 8.11 a) What is a Setpoint, and what is it used for? b) What does feedback do in control systems?
A
- +
+ +
x B y
- +
Problem 8.13 Study the circuit below. Assume that for t<0s the circuit is discharged and off. Starting at t=0s an input of
Vi=5sin(100,000t) is applied.
1K
+
Vi -
+
1uF
Vo
-
a) Write a differential equation and then a transfer function describing the circuit.
b) Find the output of the circuit using explicit integration (i.e., homogeneous and particular solutions).
339
Problem 8.14 Write the differential equation for the control system below.
C
L
R2
V feedback R1
–
V setpoint R1
+
V controller
L
C
R2
Problem 8.15 Develop a transfer function for the following system. The input is Vd and the output is the motor shaft position.
Assume all components are ideal. The motor has a resistance of 10 ohms. With an input voltage of 4V the motor
spins at 4000RPM (steady state), and has a time constant of 0.1s. When the potentiometer is rotated +180
degrees the output is 5V, a rotation of -180 degrees results in an output of -5V.
+5V
1uF 1K
1K potentiometer
- -5V
1K +
motor
Vd
1K
Problem 8.16 A feedback control system is shown below. The system incorporates a PID controller. The closed loop transfer
function is given.
X + Y
Ki 3
K p + ------ + K d D ------------
-
D D+9
-
4 2
Y D 3K d + D 3K p + 3K i
---- = ---------------------------------------------------------------------------------------------------
X 2
D 1 + 12K d + D 9 + 12K p + 12K i
b) For the given transfer function select controller values that will result in a natural frequency of 3 rad/sec and
damping factor of 0.5. (Hint: assume Kd=0.)
c) For the given transfer function, if the values are Kp=5 and Ki=1, and Kd=0, find the response equation to a
unit ramp input (i.e., X=t) as a function of time by solving the differential equation to obtain an explicit solution.
d) For the given transfer function, if the values of Kp=1 and Ki=Kd=0, find the response to a unit ramp input
(i.e., X=t) as a function of time using state equations and a numerical method. (email the program and graphical
output to the instructor).
Problem 8.17 The system in the figure uses a high power op-amp to drive a motor. An identical motor is used for measuring
motor speed. The input to the system is Vd, and the output is the motor shaft speed.
a) Develop an equation for the op-amp portion using Vf and Vd as inputs, and Vo as the output.
b) Find differential equations for the permanent magnet DC motors. Assume all components are ideal. The
motors are identical with a resistance of 20 ohms. With an input voltage of 5V the connected motors spin at
2000RPM, and have a time constant of 0.25s.
c) Draw a block diagram for the system shown in the figure. Put values in each of the blocks.
Tachometer
1K
Vf 1K
-
1K + Vo
Motor
Vd 1uF
1K
Problem 8.18 a) Develop an equation for the system below relating the two inputs to the output. Put it in block diagram format.
(Hint: think of a summation block.)
R R
Vf -
Ve
R
Vd +
b) Develop an equation for the system below relating the input to the output. Put the result in block diagram for-
341
mat.
1K 1K
-
V
1K s
V +
e
R
P
c) The equation below can be used to model a permanent magnet DC motor with an applied torque. An equiva-
lent block diagram is given. Prove that the block diagram is equivalent to the equation.
2
d- Km Km T load
---- + -------------- = V s -------------- – --------------
dt JR RM JR RM JR
Vs +
Km e RM
-------
- ------------------------------------
-
RM 2
JR RM D + Km
-
T load
d) Write the transfer function for the system below relating the input torque to the output angle theta2. Then write
the transfer function for the angular velocity of mass 2.
1 2
J1 J2
K s1 K s2
e) The system below is a combination of previous components, and a tachometer for velocity feedback. Simplify
342
Vd RM
2R P Km + -------------------------------------
-
---------------------
- -------
- 2
+ 3 RM JM RM D + Km
R P + 10
- -
K s2
----------------------------------------------------------------------------------------------------------------------------
-
3 2
D J 1 J 2 + D BJ 1 + D K s2 J 1 + J 2 + BK s2
KT
Problem 8.19 Given the transfer function below, develop a mechanical system that it could represent. (Hint: Differential Equa-
tions).
x D 1 where: x = displacement
------------ = -----------------------
F D 10 + 20D F = force
Problem 8.20 Develop an op-amp circuit to implement the controller with values found in Problem 3.
Answer 8.2
K s2
-----2- = --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-
4 3 2
D J 1 J 2 + D B 1 J 2 + B 2 J 1 + D K s2 J 1 + J 2 + B 1 B 2 + D K s2 B 1 + B 2
Answer 8.3
Vo D R1 R2 C
------ = ----------------------------------------------------------------------------------------------------
-
Vi 2
D R 1 LC + D L + CR 1 R 2 + R 1 + R 2
Answer 8.4
rad
---------
d = 1.530 s K = 1.30
343
Answer 8.5
a)
20K
-----------------------------------
2
D + D + 20K
a 20K
b) ------ = -----------------------------------
d 2
D + D + 20K
Answer 8.6
2
D D + 10 D + 20
---------------------------------------------------
2
10 D + 100
+
Fd e + 2 10 Fa
4 D + 100 -----------------------------
---------------------- 4D D + 10
xd 2
D + 20
xf 4
2
D D + 10 D + 20
---------------------------------------------------
2
10 D + 100
+
Fd 2 Fa
+ 10 D + 100
4 ------------------------------------------------------
2
+ 4D D + 10 D + 20
-
4
2 2
Fd D D + 10 D + 20 10 D + 100 Fa
4 --------------------------------------------------- + 1 -----------------------------------------------------------------------------------------------
2 2 2
10 D + 100 4D D + 10 D + 20 + 40 D + 100
2 2 2
Fd 40 D + 100 D D + 10 D + 20 + 10 D + 100 Fa
--------------------------------------------------------------------------------------------------------------------------------------
2 2 2
10 D + 100 4D D + 10 D + 20 + 40 D + 100
2 2
Fd 4D D + 10 D + 20 + 40 D + 100 Fa
----------------------------------------------------------------------------------------------------
2 2
4D D + 10 D + 20 + 40 D + 100
Fd Fa
1
344
Answer 8.7 a)
c e K 1- r
10 - 2+D
-------------
+ K + -----i ---
D
2+D p D
-
10 -
-------------
D+2
c e D Kp + Ki 2 + D r
10 -
-------------
+ -----------------------------------------------------
-
2+D 2
- D
10 -
-------------
D+2
2
D K p + D 2K p + K i + 2K i
--------------------------------------------------------------------------------- r
c 2
10 - D
--------------------------------------------------------------------------------------------------------------------
-
------------- 2
2+D D K p + D 2K p + K i + 2K i
10
1 + -------------- ---------------------------------------------------------------------------------
D+2 2
D
c 2 r
D 10K p + D 20K p + 10K i + 20K i
-----------------------------------------------------------------------------------------------------------------------------
3 2
D + D 10K p + 2 + D 20K p + 10K i + 20K i
2
D 10K p + D 20K p + 10K i + 20K i
r-- = ----------------------------------------------------------------------------------------------------------------------------
-
c 3 2
D + D 10K p + 2 + D 20K p + 10K i + 20K i
345
b)
2 2
r D 10K p + D 20K p + 10K i + 20K i D 10K p + D 20K p + 10K i + 20K i
-- = -----------------------------------------------------------------------------------------------------------------------
- = ------------------------------------------------------------------------------------------------
c 3 2 2 2
D + D 10K p + 2 + D 20K p + 10K i + 20K i D + A D + 2 nD + n
3 2 2 2
D + D 10K p + 2 + D 20K p + 10K i + 20K i = D + A D + 2 nD + n
2
= D + A D + 2D + 1
3 2
= D 1 + D 2 + A + D 2A + 1 + A
10K p + 2 = 2 + A
20K p + 10K i = 2A + 1
20K i = A
10K p + 2 = 2 + A = 2 + 20K i
K p = 2K i
20K p + 10K i = 2A + 1
20 2K i + 10K i = 40K i + 1
Answer 8.8
V V
Vo Vo y 10 ---- 10 ----
m m
------ = ------ --- = ----------------------------------------------- = ---------------------------------------------------------------
F y F 2 2 Ns N
– MD – K d D – K s – 0.5kgD – 5 ------ D – 10 ----
m m
Answer 8.9
– 2t
y t = – 40e + 40
Answer 8.10
y 1
a) --- = ---------------------------------------------
F 2
D M + DK d + K s
b) F = Mg
– 0.25t
c) y t = – 10.13e cos 0.968t – 0.253 + 9.81
d) y t+h = y t +h 0 1 y t + 0
v t+h v t – 1 – 0.5 v t 9.81
Answer 8.11 a) A setpoint is a system input that correlates to a desired output for a system with negative feedback control.
b) Feedback in a control system allows an out to be compared to an input. The difference, the error, is used to
adjust the control variable and increase the accuracy.
346
Answer 8.12
A+B
-------------------------------------
1 + CB + A + B
Answer 8.13
Vo 1000
a) ------ = ----------------------
Vi D + 1000
– 1000t 5
b) V o = 0.050e + 0.050 sin 10 t + 1.561
Answer 8.14
R R R R
·· CR + V· ------2- + V ------2- + V
V· controller = V ·· – CR + V· – ------2- + V – ------2-
s 2 s R s L f 2 f R f L
1 1
or
R2 R
1- ------2-
V controller = e D CR 2 + ------- + ---
R1 D L
Kd Kp Ki
347
Answer 8.15
V p = --5-
· 1 ·
+ --- = V A + 10 = V m A
m
2 2
0 + 4000 ------ 10 = 4 A A = 4000
------------ ------ 10 = 1000
------------
60 4 60 3
· 1000
+ 10 = ------------ V m = ----
3 D
2
2 1000 3D + 30D
D + 10D = ------------ V m Vm = ----------------------------
3 1000
Combined:
–3
10 5 –3
V m = V d 1 + ------------ D + --- – 1 – 10 D
2
2 –3
3D + 30D- 5 –3 10
--------------------------- – --- – 1 – 10 D = V d 1 + ------------ D
1000 2
2 –3
3D + 30D 5 5 – 3 10
---------------------------- + --- + --- 10 D = V d 1 + ------------ D
1000 2
2
3D + 30D + 5000 + 5D = V d 1000 + --- D
2
2 35 5000 1000
D + ------ D + ------------ = V d ------------ + --- D
3 3 3 6
1000
D --- + ------------
6 3
------- = ------------------------------------------------------
Vd 2 35 5000
D + D ------ + ------------
3 3
348
Answer 8.16 a)
X + Y
Ki 3
K p + ------ + K d D -------------
D D+9
-
X + 2 Y
Kp D + Ki + Kd D
3
---------------------------------------------- ------------
-
D D+9
-
2 Y
X Kp D + Ki + Kd D 3
-------------------------------------------------------------------------------------------
2 2
D + 9D + 4 3 K p D + K i + K d D
X Y
2
D 3K d + D 3K p + 3K i
---------------------------------------------------------------------------------------------------
2
D 1 + 12K d + D 9 + 12K p + 12K i
b)
2
Y D 3K d + D 3K p + 3K i
--- = ------------------------------------------------------------------------------------------------
- = ---------------------------------------------
X 2 2 2
D 1 + 12K d + D 9 + 12K p + 12K i D + D2 n + n
2 12K i 2 12K i
---------------------
n = 1 + 12K
- 3 = ---------------------- 9 + 108K d = 12K i
d 1 + 12K d
9 + 12K p 9 + 12K p
2 = ---------------------- 2 0.5 3 = ---------------------- 3 + 36K d = 9 + 12K p
n 1 + 12K d 1 + 12K d
In simple terms there are two equations and three unknowns. The system can only be solved by adding
one equation, or removing one unknown. Therefore I have made an arbitrary decision to set Kd = 0.
However, any of the gains could be set to any value to move ahead. Note: We would prefer to avoid
arbitrary solutions and under-constrained problems suggest ill-posed designs.
Kd = 0
3
9 + 108 0 = 12K i K i = ---
4
3 + 36 0 = 9 + 12K p 1
K p = – ---
2
349
c)
2
Y D 3K d + D 3K p + 3K i 15D + 3
--- = ------------------------------------------------------------------------------------------------
- = ------------------------------------
X 2 2
D 1 + 12K d + D 9 + 12K p + 12K i D + 69D + 12
X = t
Assume initial conditions are zero. Solution simplified from WolframAlpha using
y’’ + 69y’ + 12y = 15 + 3t, y(0)=0, y’(0)=0
–3 – 3 – 68.8256t – 3 – 0.17435t
Y t = 62.500 10 4t – 3 + 3.1654 10 e + 184.33 10 e
d)
2
--Y- = ----------------------------------------------------------------------------------------------------
D 3 0 +D 3 1 + 3 0 3
- = ----------------------------
-
X 2 D 1 + 21
D 1 + 12 0 + D 9 + 12 1 + 12 0
Y· + 21Y = 3t
Y· = Y – 21 + 3t
Y0 = 0 ;
ST = [ Y0 ];
t = [0];
h = 0.001;
n_steps = 1000;
function ST_der = state_eqns(ST, t)
Y = ST($, 1) ;
Y_der = - 21 * Y + 3 * t;
ST_der = [ Y_der ];
endfunction
for i = 1 : n_steps
ST = [ ST ; ST($, :) + h * state_eqns( ST($, :), t($) ) ]
t = [ t ; t($) + h]
end
plot(t, ST);
350
Answer 8.17 a)
Vd – V+ Vd – V+ 0 – V+
I V+ = ------------------- + ---------------------- + --------------- = 0
1000 1 1000
----------------
–6
10 D
2 –6 1 –6 1000 + D
V + ------------ + 10 D = V d ------------ + 10 D V + = V d ----------------------
1000 1000 2000 + D
Vf – V- Vo – V-
I V- = ----------------- + ------------------ = 0
1000 1000
V f – 2V - + V o = 0
1000 + D
V o = 2V d ---------------------- – V f
2000 + D
b)
For the PM DC motor we begin with the basic differential equation. Using the given data the
coefficients are calculated. Note: because the motors are connected the J will include the inertia
for both motors.
2
d- K K
---- + ------ = V o ------ R = 20
dt JR JR
2 5V 3 Vs Vs
K K K = --------------------------------------- = --------- --------- = 0.02387 ---------
------ ------
ss JR = V o JR 2000min 2 40 rad rad
---------------------------------
60s
2
K 1
------ = --- 3 2
0.25 ---------
JR 40 –6 2
J = ---------------------------------- = 7.124 10 kgm
20
For the motor being used as a tachometer there is little load, so the voltage output Vf should be
directly proportional to the shaft speed.
2
K K
0+ ------ = V f ------ Vf = K
JR JR
351
c)
1000 + D
V o = 2V d ---------------------- – V f
2000 + D
2
d K K K
----- + ------ = V o ------ = V o ------------------------
dt JR JR 2
DJR + K
Vf = K
Vo
Vd 1000 + D + K
2 ---------------------- ------------------------
2000 + D 2
DJR + K
-
Vf K
Answer 8.18
R
a) V + = V d -------------- = 0.5V d
R+R
V- – Vf V- – Ve
I V = ------------------- + ------------------- = 0
- R R
V e = 2V - – V f
Vd + Ve
V e = 2 0.5V d – V f
-
Ve = Vd – Vf Vf
b) V- – 0 V- – Vs
I V = --------------
- + ------------------- = 0
- 3 3
10 10
V+ – Ve V+ – 0
IV = --------------------- + ---------------- = 0
+ 3 RP
10
V
1 - + ------
1 - = -------- e-
V + --------
3 RP 3
10 10
substitute in (1)
R P + 1K Ve
0.5V s ---------------------- = ---------
3 3 Ve 2R P Vs
R P 10 10
----------------------
-
3
Vs 2R P R P + 10
------- = -----------------------
Ve 3 note: a constant set by the variable resistor Rp
R P + 10
352
2
d Km Km T load
c) ----- + ---------------- = V ---------------- – ---------------
dt J R s J R J
R M R M R
2
K Km T load
m ---------------- – ---------------
D + ---------------- = V
JR RM s J R J
R M R
JR M Km T load
= ---------------------------------------- V ---------------- – ---------------
2 s J R J
JR RM D + Km R M R
RM Km
= ------------------------------------- V s -------- – T load
2 RM
JR RM D + Km
d)
K s2 1– 2 2
M = – K s2 1 – 2 = J1 1 D
+
J1 2
– K s2
1 – 2 = J1 1 D
2 eqn 8.1
1 J 1 D + K s2 + 2 – K s2 =
K s2 1– 2 2
M = K s2 1 – 2 – B 2 D = J2 2 D
+
J2 2
K s2 1 – 2 – B 2 D = J2 2 D
B 2D
2
2 J 2 D + K s2 + BD = 1 K s2
2
J 2 D + K s2 + BD
= --------------------------------------------- eqn 8.2
substitute (2) into (1) 1 2 K s2
2
J 2 D + BD + K 2
s2-
-------------------------------------------- J 1 D + K s2 + 2 – K s2 =
2 K s2
4 3 2
D J 1 J 2 + D BJ 1 + D K s2 J 1 + J 2 + D BK s2
---------------------------------------------------------------------------------------------------------------------------------------- =
2 K s2
K s2
-----2- = ---------------------------------------------------------------------------------------------------------------------------------------
-
4 3 2
D J 1 J 2 + D BJ 1 + D K s2 J 1 + J 2 + D BK s2
2 = D 2
K s2
------2- = -------------------------------------------------------------------------------------------------------------------------------
-
3 2
D J 1 J 2 + D BJ 1 + D K s2 J 1 + J 2 + BK s2
e) 3 2
D +D +D +
------ = -------------------------------------------------------------------------------------------
-
Vd 4 3 2
D +D +D +D +
353
Answer 8.19
N
K s = 10 ----
m
K = 20 Ns
-------
d m
354
Answer 8.20
+ ex U xpwm FD 2L
5 a
d ----------
Kp + Kd D 2
- JD
U = Kp + Kd D d– a
This type of function is a good application for an op-amp. The circuit pictured was presented earlier
in the book using resistors. The dashed line circles represent two different op-amp circuits. The one
on the left is a subtraction circuit. The second is a feedback amplifier with an inductor on the feed-
back loop. First we create the PD amplifier circuit by rearranging the negative feedback circuit. A
value of 100K is chosen to provide a reasonable current draw.
–Zf
U = K p + K d D e = -------- e Z i = 100K 5 5
Zi Z f = 10 K p + 10 K d D
5 5
10 K d 10 K p
100K
+ -
+
+
e U
- -
The subtraction circuit has been presented earlier. Making all of the resistor values makes the result a sim-
ple subtraction with no weights. The value of R is arbitrary but 10-100K would be reasonable. Not that the
gains of both are negative, canceling out.
R
R
+
-
+
R +
d e
- + R
-
a R
-
R2 R4 R1 + R2
V o = – V i ------ + V ref -------------------------------
R1 R1 R4 + R5
355
Vi R
C
Vo
-
Problem 8.22 Given the transfer functions and input functions, F, use a numerical method to calculate the output of the system
as a function of time for 0 to 0.5 seconds in 0.05 second intervals. Record the values in a table.
2
x D
--- = ------------------------------- F = 5 sin 62.82t
F 2
D + 200
x D D+2
--- = ------------------------------- F = 5 sin 62.82t
F 2
D + 200
2
D D+2 -
--x- = ------------------------------ F = 5 sin 62.82t
F 2
D + 200
+ 1 -
------------
D+1
-
1
-------------
D+2
5D
356
+
+ +
A B C
2
D + 3D + 5
+
+ +
K-
--- 1
-----------------------------
-
D 2
D + 3D + 5
-
10
G1
-
C + + + R
G2 G3 G5
- -
G4 G6
Problem 8.28 Simplify the following block diagram for a crane gantry position control system. The system also includes a neg-
ative feedback loop to control the sway of an attached load
encoder
Cp
K enc
-
Cd C pe C pc Vs
p
K pp K pwm G motor
+ +
- C Lc
CL VL L
K sp K AD K pot G load
Problem 8.29 Develop a block diagram for the system below and transfer functions for each of the blocks. The input is Vd and
the output is the motor shaft position. Assume all components are ideal. The motor has a resistance of 10 ohms.
357
With an input voltage of 4V the motor spins at 4000RPM (steady state), and has a time constant of 0.1s. When
the potentiometer is rotated +180 degrees the output is 5V, a rotation of -180 degrees results in an output of -5V.
+5V
1K
1K potentiometer
- -5V
1K +
motor
Vd
1K
358
359
System Error
System error is often used when designing control systems. The two common types of error are system error and feedback
error. The equations for calculating these errors are shown in Figure 9.1. If the feedback function ‘H’ has a value of ‘1’ then these
errors will be the same.
e r
c
G System error, S = c–r
+
-
b
Feedback error, e = c–b
H
An example of calculating these errors is shown in Figure 9.2. The system is a simple integrator, with a unity feedback
loop. The overall transfer function for the system is calculated and then used to find the system response. The response is then com-
pared to the input to find the system error. In this case the error will go to zero as time approaches infinity.
360
Given,
K
G D = ------p- H D = 1
D
r G Kp
\-- = ------------------ = -----------------
c 1 + GH D+K
p
\r· + K p r = K p c
c = A (a step function)
The homogeneous solution is,
–Kp t
r = C e
h 1
The particular solution is found with a guess,
rp = C2
·
rp = 0
0 + Kp C2 = Kp A C2 = A
The solutions can be combined and the remaining unknown found for the system at rest initially.
–Kp t
r = rh + rp = C 1 e +A
0
0 = C1 e + A
C1 = –A
–Kp t
r = –A e +A
S = c–r
–Kp t –Kp t
S = A – –A e + A = Ae
The PID controller, and simpler variations were discussed in earlier sections. A more complete table is given in Figure
361
9.3.
Type Transfer Function
Proportional (P) G = K
c
1-
G = K 1 + ------
Proportional-Integral (PI) c D
Proportional-Derivative (PD) Gc = K 1 + D
Proportional-Integral-Derivative (PID) 1- + D
G c = K 1 + ------
D
1+ D
Lead G c = K --------------------- >1
1+ D
1+ D >1
Lag G c = K ---------------------
1+ D
1 + 1D 1 + 2D >1
Lead-Lag G c = K ------------------------ ------------------------
1+
1D
1+ D
2
1> 2
Feedforward Controllers
When a model of a system is well known it can be used to improve the performance of a control system by adding a feed
forward function, as pictured in Figure 9.4. The feed forward function is basically an inverse model of the process. When this is
used together with a more traditional feedback function the overall system can outperform more traditional controllers function,
such as the PID controller.
feed forward
function
feedback process
function
State variable matrices were introduced before. These can also be used to form a control system, as shown in Figure 9.5.
362
d
----- X = AX + BU
dt
Y = CX + D
d
+ ----- X
dt X + Y
U 1
B ---- C
D
+ +
A D
An example is shown in Figure 9.6 that implements a second order state equation. The system uses two integrators to inte-
grate the angular acceleration, then the angular velocity, to get the position.
d d-
+ ----- ----
dt dt
1 1
C ---- ----
D D
+
d- +
---- =
dt A
d-
---- = A +B +C
dt
B
The previous block diagrams are useful for simulating systems. These can then be used in feed forward control systems to
estimate system performance and then predict a useful output value.
363
The model,
2
· K K
+ ------- = V ------
JR s JR
· JR
------ +
Vs = K
K
State Based Controller
d
----- +
dt JR
A ------
K
+
+ K Plant
K P + ------i + DK d
D
-
Feedback
Cascade Controllers
When controlling a multi-step process a cascade controller can allow refined control of sub-loops within the larger control
system. Most large processes will have some form of cascade control. For example, the inner loop may be for a heating oven, while
the outer loop controls a conveyor feeding parts into the oven.
‘e_last’, ‘v_last’, and ‘u_last’ in the subroutine. The derivative ‘e_derivative’ is calculated using the current and previous values of
‘e’. A time step ‘T’ is provided for differentiating and integrating. The time step would be the since the last ‘e’ value was used to
calculate the last ‘u’ value. The sequence of this subroutine is i) calculate the derivative of ‘e’, ii) find the derivatives using the state
equations, iii) integrate the derivatives, and iv) store the current values for use in the next time step.
u D+4
--- = ----------------------------------------
e 2
D + 10D + 100
u· = v
u· i = v i – 1
v· + 10v + 100u = e· + 4e
u = u_last + T*u_derivative;
v = v_last + T*v_derivative;
u_last = u;
v_last = v;
e_last = e;
return u;
}
Using a single time step for integration and differentiation is reasonable for simpler systems with little or no noise. In
practical systems more sophisticated methods are used for calculating integrals and derivatives. The accuracy of the error estima-
tion can be increased by using a Taylor series equation, Figure 9.10. In this example the first and second order derivatives are esti-
mated using previous error values. In this case the first and second order derivatives are used, but additional terms can be used to
increase the accuracy of the error estimation. (Note that these methods are explored in depth in signals and systems courses, using
‘z-transforms’.)
365
2 3
T ·· e i – 1 T ··· ei – 1
ei e i – 1 + Te· i – 1 + ------------------- + -------------------- +
2 6
2
T ··· ei – 1
e· i · ··
0 + e i – 1 + Te i – 1 + -------------------- +
2
ei – ei – 1
e· i – 1 ----------------------
T
ei – ei – 1 ei – 1 – ei – 2
e· i – 1 – e· i – 2 ---------------------- – -------------------------------
·· T T 1 –2 1
ei – 1 ------------------------------
- ------------------------------------------------------------ = ------ e i + ------ e i – 1 + ------ e i – 2
T T 2 2 2
T T T
ei – ei – 1 T – 2T T
e· i e· i – 1 + Te··i – 1 ---------------------- + ------ e i + --------- e i – 1 + ------ e i – 2
T 2 2 2
T T T
2 3 1
e· i --- e i + – --- e i – 1 + --- e i – 2
T T T
Figure 9.10 A Second Order Taylor Series Estimation of the Derivative Error
Other considerations include practical limits on the control systems and potential failure modes, Figure 9.11. For example
the output of the control system may be from -10.0V to 10.0V. Therefore, any value of ‘u’ that falls outside of the valid range is
clipped at the maximum or minimum. Another problem would be an invalid value of ‘T’ that results in a divide by zero error.
Ensuring that the time step is greater than 0.0001 should prevent problems. This step is essential when dealing with system with a
variable time step value.
366
if ( T , 0.0001 ){
fault(); // create a fault condition if the time step is too small
}
u = u_last + T*u_derivative;
v = v_last + T*v_derivative;
u_last = u;
v_last = v;
e_2 = e_1;
e_1 = e;
return u;
}
9.2 Summary
• Controllers can be designed to meet criteria, such as damping ratio and natural frequency.
• System errors can be used to determine the long term stability and accuracy of a controlled system.
• Other control types are possible for more advanced systems.
e = d–h
error
K 2 h 10 elevator
r i 2D + 1 + D PID controller --- = ------------------
-- = K + ------ + K D = ------------------------------- r 2
e p D d D D +D
combine the transfer functions
2 2
r h
-- --- = h--- = 2D +1+D 10 D+1 10 10 D + 1
------------------------------- ------------------ = --------------------- ----------------------- = ------------------------
e r e D 2 D D D+1 2
D +D D
h 10 D + 1 eliminate ‘e’
------------ = ------------------------
d–h 2
D
10 D + 1
h = ------------------------ d – h
2
D
10 D + 1
h 1 + 10
D+1
------------------------ = ------------------------ d
2 2
D D
10 D + 1
------------------------
2
h D 10D + 10 system transfer function
--- = ---------------------------------- = -------------------------------------
d 10 D + 1 2
1 + ------------------------ D + 10D + 10
2
D
a) Find the response of the final equation to a step input. The system starts at rest on the ground floor, and the
input (desired height) changes to 20 as a step input.
b) Calculate the damping factor and natural frequency of the results in part a).
Vd e Kp Vs 100
d ------------- ------------------ a
D D+ D + 0.1 1
---------- ----
0.25 + D
-
Sensor
Va
D
----------
0.25
b) Given the transfer function below, select values for Kp and tau that will include a second order response that
has a damping factor of 0.125 and a natural frequency of 10rad/s.
Qa 400K p
------- = -----------------------------------------------------------------------------------
-
Qd 2
D + D + 0.1 + 400K p + 0.1
c) The function below has a step input of magnitude 1.0. Find the output as a function of time using numerical
methods. Give the results in a table OR graph.
Qa 99.76
------- = ------------------------------------------------
Qd 2
D + 2.5D + 99.884
d) The function below has a step input of magnitude 1.0. Find the output as a function of time by integrating the
368
Qa 99.76
------- = ------------------------------------------------
Qd 2
D + 2.5D + 99.884
e) Select a controller transfer function, Gc, that will reduce the system to a first order system with a time constant
of 0.5s, as shown below.
Controller Actuator
Q V e V 100 -
d d G s -----------------
D-
--------- c D + 0.1 1-
---
0.25 + D
-
Va Sensor
D
----------
0.25
Q
------a- = ------------
desired transfer function 1 -
Qd D+2
Problem 9.3 Convert the following block diagram to state equations. Pick a K value that would leave the system critically
damped.
-
c + + 1 - r
D+K ------------------
D + 100
- +
Problem 9.4 Write a function in C that implements a PID function using the following function prototype. The function
accepts the desired and current values and returns the controller output.
double pid(double v_desired, double v_feedback);
Problem 9.5 Given the transfer function, G(s), determine the time response output Y(t) to a step input X(t).
4 - = Y
G = ------------ ---- X t = 20 When t >= 0
D+2 X
Problem 9.6 Given a mass supported by a spring and damper, find the displacement of the supported mass over time if it is
released from neutral at t=0sec, and gravity pulls it downward.
a) develop a transfer function for y/F.
b) find the input function F.
c) solve the input output equation to find an explicit equation of the position as a function of time for Ks = 10N/
m, Kd = 5Ns/m, M=10kg.
d) solve part c) numerically.
369
Problem 9.7 Simplify the block diagram below. (Note: Vn is an input and cannot be combined in a transfer function.)
+ +
A C
Vi Vo
- +
Vn
Problem 9.8 Find the system output, feedback error and system error when the input is a ramp with the function c(t) = 0.5t.
Sketch the system errors as a function of time.
C D + 5 R D
-----------------------
D D+1
-
1 + 0.2D
Problem 9.9 A feedback control system is shown below. The system incorporates a PID controller. The closed loop transfer
function is given.
X + Y
Ki 3
K p + ------ + K d D -------------
D D+9
-
4 2
D 3K d + D 3K p + 3K i
Y
---- = ---------------------------------------------------------------------------------------------------
X 2
D 1 + 12K d + D 9 + 12K p + 12K i
= 1.58 rad-
b) n = 3.162 -------
s
370
Answer 9.2
a) Qa 400K p
------- = -------------------------------------------------------------------------------------
Qd 2
D + D + 0.1 + 400K p + 0.1
400K p
b) ------------------------------------------------------------------------------------- = ----------------------------------------------
2 2 2
D + D + 0.1 + 400K p + 0.1 D + 2 nD + n
1
+ 0.1 = 2 ---
n = 2 8 10 = 2.5 = 2.4
Qa 99.76
------- = -------------------------------------------------
Qd 2
D + 2.5D + 99.884
c)
Q· a = P a
·
P a = P a – 2.5 + Q a – 99.884 + Q d 99.76
··
d) Q a + Q· a 2.5 + Q a 99.884 = Q d 99.76
– 1.25t – 1.25t
Q a t = – 0.1259e sin 9.9157t – 0.9988e cos 9.9157t + 0.9988
– 1.25t 0.9988
Q a t = 1.0067e sin 9.9157t + atan ---------------- + + 0.9988
0.1259
e)
Controller Actuator
Qd Vd e Vs 100
Gc ------------------ 1
D- D + 0.1 ----
--------- D
0.25 +
-
Va
Sensor
D
----------
0.25
Q 4G c 100 D 1
------a- = --------------------------------------------------------------
- = -------------
Qd D D + 0.1 + 4DG c 100 D+2
D + 0.1
G c = -----------------------------
400D + 400
371
Answer 9.3
-
c + 1+D+K + 1
-------------------
r
D + 100
-
D + 100
c + 1+D+K
1
-----------------------------
r
D + 100 + 1
-
D + 100
c + 1 + D + K-
----------------------------
r
D + 100 + 1
-
D + 100
c r
1+D+K
-----------------------------------------------------------------------------------------
D + 100 + 1 + D + 100 1 + D + K
c r
1+D+K
-----------------------------------------------------------------------------------------------------------------------------
2
D 1 + D 1 + 100 + 1 + K + 101 + 100 + 100K
-r- = ---------------------------------------------------------------------------------
1+D+K -
c 2
D + D 102 + K + 201 + 100K
n = 201 + 100K
2
r D + D 102 + K + 201 + 100K = c 1+D+K
r· = s
s· = s – 102 – K + r – 201 – 100K + c· 1 + c 1 + K
Answer 9.4
#define T 0.010 // time step
#define Kp 1
#define Ki 1
#define Kd 1
e = v_desired - v_feedback;
derivative = (e - e_last) / T;
integral_sum + T * e_last;
e_last = e;
Answer 9.5
– 2t
y t = – 40e + 40
Answer 9.6
y 1
a) --- = ---------------------------------------------
F 2
D M + DK d + K s
b) F = Mg
– 0.25t
c) y t = – 10.13e cos 0.968t – 0.253 + 9.81
d) y t+h = y t +h 0 1 y t + 0
v t+h v t – 1 – 0.5 v t 9.81
Answer 9.7
1-
Vn ---
A
+
Vo
+
CA
Vi -------------
1+A
Answer 9.8
–t 1 1
R t = 0.25e cos 2t + 0.644 – --- + --- t
5 2
–t 1
S t = 0.25e cos 2t + 0.644 – ---
5
–t 1
e t = 0.224e sin 2t – 0.464 + ------
10
373
Answer 9.9 a)
X + Y
Ki 3
K p + ------ + K d D -------------
D D+9
-
X + 2 Y
Kp D + Ki + Kd D
3
---------------------------------------------- ------------
-
D D+9
-
2 Y
X Kp D + Ki + Kd D 3
-------------------------------------------------------------------------------------------
2 2
D + 9D + 4 3 K p D + K i + K d D
X Y
2
D 3K d + D 3K p + 3K i
---------------------------------------------------------------------------------------------------
2
D 1 + 12K d + D 9 + 12K p + 12K i
b)
2
Y D 3K d + D 3K p + 3K i
--- = ------------------------------------------------------------------------------------------------
- = ---------------------------------------------
X 2 2 2
D 1 + 12K d + D 9 + 12K p + 12K i D + D2 n + n
2 12K i 2 12K i
---------------------
n = 1 + 12K
- 3 = ---------------------- 9 + 108K d = 12K i
d 1 + 12K d
9 + 12K p 9 + 12K p
2 = ---------------------- 2 0.5 3 = ---------------------- 3 + 36K d = 9 + 12K p
n 1 + 12K d 1 + 12K d
In simple terms there are two equations and three unknowns. The system can only be solved by adding
one equation, or removing one unknown. Therefore I have made an arbitrary decision to set Kd = 0.
However, any of the gains could be set to any value to move ahead. Note: We would prefer to avoid
arbitrary solutions and under-constrained problems suggest ill-posed designs.
Kd = 0
3
9 + 108 0 = 12K i K i = ---
4
3 + 36 0 = 9 + 12K p 1
K p = – ---
2
374
c)
2
Y D 3K d + D 3K p + 3K i 15D + 3
--- = ------------------------------------------------------------------------------------------------
- = ------------------------------------
X 2 2
D 1 + 12K d + D 9 + 12K p + 12K i D + 69D + 12
X = t
Assume initial conditions are zero. Solution simplified from WolframAlpha using
y’’ + 69y’ + 12y = 15 + 3t, y(0)=0, y’(0)=0
–3 – 3 – 68.8256t – 3 – 0.17435t
Y t = 62.500 10 4t – 3 + 3.1654 10 e + 184.33 10 e
d)
2
--Y- = ----------------------------------------------------------------------------------------------------
D 3 0 +D 3 1 + 3 0 3
- = ----------------------------
-
X 2 D 1 + 21
D 1 + 12 0 + D 9 + 12 1 + 12 0
Y· + 21Y = 3t
Y· = Y – 21 + 3t
Y0 = 0 ;
ST = [ Y0 ];
t = [0];
h = 0.001;
n_steps = 1000;
function ST_der = state_eqns(ST, t)
Y = ST($, 1) ;
Y_der = - 21 * Y + 3 * t;
ST_der = [ Y_der ];
endfunction
for i = 1 : n_steps
ST = [ ST ; ST($, :) + h * state_eqns( ST($, :), t($) ) ]
t = [ t ; t($) + h]
end
plot(t, ST);
H D = 1
c = At
375
Problem 9.11 Find the system error ‘e’ for the given ramp input, R.
1
G D = ------------------------------ H D = 5 c = 4t
2
D + 4D + 5
Problem 9.12 Write a C subroutine to implement the control system that is shown inside the dashed line. The subroutine argu-
ments are the setpoint, C, and the feedback value, F. the subroutine returns the new controller output value, U.
C + e U
1 -
R
Kp + Kd D --------------------
2
D+1
-
K
-----i 5
D
F
Problem 9.13 Write C subroutines to implement the control system that is shown inside the dashed line. The subroutine argu-
ments are the setpoint, C, and the feedback value, F. the subroutine returns the new controller output value, U.
C + e Ki U
1 -
R
K p + K d D + ----- --------------------
D 2
D+1
-
5
F
Problem 9.14 Given the following negative feedback control system, calculate a new controller transfer function (Gc) to get the
desired response for the system.
c + 1 - r
Gc ------------------ desired response
D + 100
r 1
- -- = ----------------
c D + 10
Problem 9.15 Write a C subroutine that implements the control function below. (Hint: Convert it to state equations first.)
u D + 10
--- = ------------------------------
e 2
D + 2D + 3
double u(e) {
376
F_int = F_int + T * F;
e = C - F_int;
e_int = e_int + T * e;
return Kp * e + Ki * e_int;
}
Problem 9.17 Select a controller transfer function, Gc, that will reduce the system to a first order system with a time constant of
0.5s, as shown below.
Controller Motor
Vd e Vs 100
d ------------------ a
1 Gc D + 0.1 1
---------- ----
0.25 + D
-
Potentiometer
Va
1
----------
0.25
desired transfer function a 1
------ = -------------
d D +2
Problem 9.18 Write a C subroutine to implement the control system that is shown inside the dashed line. The subroutine argu-
ments are the setpoint, C, and the feedback value, F. the subroutine returns the new controller output value, U.
5D
+
C + e + U R
1-
Kp ------
5D
-
5
F
Problem 9.19 A symmetrical system is approximated with a thrust force Ft, and a ballast mass Mb. The mass and forces are
377
attached to an angled arm. The arm is free to move vertically, and rotate about point A.
Ft
Rt
y
Rb
R t = 0.3m
R b = 0.1m
M b = 0.3Kg
Mb
a) Develop differential equations to model the system as a function of height and angle. Neglect Coriolis effects.
b) Develop a numerical integration program.
c) Assume that the thrust force, Ft, is always vertical. Numerically simulate the system if Ft = 10sin(10t)+12.
d) Develop a subroutine for modeling a brushless servo motor driven propeller. The input to the unit is a PWM
value between 0% and 100%. The output was measured with as; 0%=0N, 5%=0N, 10%=3N, 20%=6N,
40%=12N, 60%=17N, 80%=21N, 100%=23N. Given a particular RPM value the subroutine should estimate the
0, 1st, and 2nd derivative of the thrust value.
e) Develop a feedback diagram for a system that uses a PID controller to control the angle ONLY.
f) Develop a feedback diagram for a system that uses a PID controller to control the height ONLY.
g) Write software in spin to implement the control algorithms.
h) Example the numerical integration program to model the height control feedback loop using a height of 0.5m.
i) Expand the system model to have two thrust motors symmetrically positioned. Each will have its own thrust
force.
j) Modify the numerical analysis program to balance the two motor system.
Problem 9.20 A quadcopter system has four motors mounted on arms. For analysis and design purposes these systems can be
simplified to a mass hung between two propellers. The equivalent system is pictured in the figure below. The
copter body is defined as a solid mass Mc, and Jc. The position of the copter is defined using an x,y position and
angle of rotation, theta. There are two motors driving propellers. The are centered at a height of ’h’ above, and
378
’d’ across from the center of mass. The motors are approximated with a thrust force, FL or FR.
FL FR
d d
y
h
x
d = 0.35m
Mc Jc
h = 0.10m
M c = 1.5Kg
2
J c = 0.03kgm
g) Use the following Pseudocode to modify the Scilab simulation. Run the program and verify.
t_now := 0;
y := 0;
x := 0;
theta := 0;
function F_to_PWM
function PWM_to_F
y_e := y_setpoint - y;
x_e := x_setpoint - x;
theta_setpoint := 1 * x_e;
theta_e := theta_setpoint - theta;
Problem 9.21 Develop an equation to estimate the first derivative of an error input. Use a third order Taylor’s series.
380
381
D = +j where,
D = differential operator Phasor transform
= decay constant D = j
= oscillation frequency
An example of the phasor transform is given in Figure 10.2. We start with a transfer function for a mass-spring-damper
system. In this example numerical values are assumed to put the equation in a numerical form. The differential operator is replaced
with j , and the equation is simplified to a complex number in the denominator. This equation then described the overall response
of the system to an input based upon the frequency of the input. A generic form of sinusoidal input for the system is defined, and
also converted to phasor (complex) form. (Note: the frequency of the input does not show up in the complex form of the input, but
it will be used later.) The steady state response of the system is then obtained by multiplying the transfer function by the input, to
obtain the output.
382
A phasor transform can be applied to a transfer function for a mass-spring-damper system. Some
component values are assumed.
F t = A sin input t + input Note: the frequency is not used when converting
an oscillating signal to complex form. But it is
F = A cos input + j sin input needed for the transfer function.
The response of the steady state output ‘x’ can now be found for the given input.
x x
= ------------F 1
= ------------------------------------------------------------------------
- A cos
F 2 input + jA sin input
2000 – 1000 + j 3000
To continue the example in Figure 10.2 values for the sinusoidal input force are assumed. After this the method only
requires the simplification of the complex expression. In particular having a complex denominator makes analysis difficult and is
undesirable. To simplify this expression it is multiplied by the complex conjugate. After this, the expression is quickly reduced to a
simple complex number. The complex number is then converted to polar form, and then finally back into a function of time.
383
x 1
= -------------------------------------------------------------------------------------------
- 10 cos 0.5 + j10 sin 0.5
2
2000 – 1000 100 + j 3000 100
1
x = ------------------------------------------------------------
- 8.776 + j4.794
– 9998000 + j 300000
x – 86304248 + j – 50563212 -
= ------------------------------------------------------------------------
14
1.0005 10
-6 -6
x = – 0.863 10 + j – 0.505 10
-6
-6 2 -6 2 – 0.505 10
x = – 0.863 10 + – 0.505 10 – atan ------------------------------- +
-6
– 0.863 10
Note: the signs of the components indicate that the angle is in the bottom left quadrant of the com-
plex plane, so the angle should be between 180 and 270 degrees. To correct for this pi radians are
added to the result of the calculation.
-6
x = 0.9999 10 –3.671
Note: when dividing and multiplying complex numbers in polar form the magnitudes can be multiplied or
divided, and the angles added or subtracted.
Unfortunately when the numbers are only added or subtracted they need to be converted back to Cartesian
form to perform the operations. This method eliminates the need to multiply by the complex conjugate.
2 2 B
A + B – atan --- 2 2
A A + B - – atan B
A + jB
----------------- = --------------------------------------------------- = ------------------------- --- – atan D
----
C + jD 2 2 D 2 2 A C
C + D – atan ---- C +D
C
A– 1 A
------------- = --- – 1 – 2
B– 2 B
A – 1 B – 2 = AB – 1 + 2
For example,
2+j
1 + j ---------------
3 + 4j
= 5 –0.4636-
2 –0.7854 -----------------------------
25 –0.9273
= 0.6325 –0.3217
= 0.6 + j0.2
The Cartesian form of complex numbers seen in the last section are well suited to operations where complex numbers are
added and subtracted. But, when complex numbers are to be multiplied and divided these become tedious and bulky. The polar
form for complex numbers simplifies many calculations. The previous example started in Figure 10.2 is redone using polar nota-
tion in Figure 10.5. In this example the input is directly converted to polar form, without the need for calculation. The input fre-
quency is substituted into the transfer function and it is then converted to polar form. After this the output is found by multiplying
the transfer function by the input. The calculations for magnitudes involve simple multiplications. The angles are simply added.
After this the polar form of the result is converted directly back to a function of time.
385
Consider the input function from the previous example in polar form it becomes,
F t = 10 sin 100t + 0.5 N F = 10 –0.5
Im imaginary
Note: recall that tan = ------ , but the atan function in calculators
Re
and software only returns values between -90 to 90 degrees. To com-
pensate for this the sign of the real and imaginary components must +/- +/+
real
be considered to determine where the angle lies. If it lies beyond the -
90 to 90 degree range the correct angle can be obtained by adding or
subtracting 180 degrees.
-/- -/+
Consider the circuit analysis example in Figure 10.6. In this example the component values are converted to their imped-
ances, and the input voltage is converted to phasor form. (Note: this is a useful point to convert all magnitudes to powers of 10.)
After this the three output impedances are combined to a single impedance. In this case the calculations were simpler in the carte-
sian form.
386
6 -
V = 5 sin 10 t + 0.3
i
4
10
+
5 –0.3 –3 6 1 - 4
10 10 j ----------------------- 10
+ –7 6 Vo
10 10 j
-
-
4
10
+
5 –0.3 Z eq
+ Vo
-
-
1- 1 1 1-
-------- = ------------------------ + ----------------------------- + --------
Z eq –3 6 1 4
10 10 j ------------------------ 10
–7 6
10 10 j
1 –3 –1 –4 –4
--------- = – 10 j + 10 j + 10 = 10 + j 0.099
Z eq
1
Z eq = --------------------------------------------
–4
10 + j 0.099
The analysis continues in Figure 10.7 as the output is found using a voltage divider. In this case a combination of cartesian
and polar forms are used to simplify the calculations. The final result is then converted back from phasor form to a function of time.
387
1
V = 5 –0.3 --------------------------------------------------------------------------
o 4 –4
10 10 + j 0.099 + 1
1 5 –0.3 5 –0.3
Vo = 5 –0.3 --------------------- = ----------------------------------------------------- = -------------------------------------
2 + j990 2 2 990 – 1.5687761
2 + 990 – atan 990 ---------
2
5 - – 0.3 – 1.5687761 = 5.05 ¥ 10 –– 1.269 – 3
Vo = --------
990
Finally, the output voltage can be written.
6
V o t = 5.05 sin 10 t – 1.269 mV
Phasor analysis is applicable to systems that are linear. This means that the principle of superposition applies. Therefore,
if an input signal has more than one frequency component then the system can be analyzed for each component, and then the
results simply added. The example considered in Figure 10.2 is extended in Figure 10.8. In this example the input has a static com-
ponent, as well as frequencies at 0.5 and 20 rad/s. The transfer function is analyzed for each of these frequencies components. The
output components are found by multiplying the inputs by the response at the corresponding frequency. The results are then con-
verted back to functions of time, and added together.
388
These can then be multiplied by the input components to find output components.
1 –0 –3
x 0.5 = ---------------------------- 10 –0 = 4.34 ¥ 10 –– 0.709
2305 –0.709
Figure 10.8 A example for a signal with multiple frequency components (based on the example in Figure 10.2)
Phasor analysis is a useful application of Fourier Transforms. The substitution of jw for D is valid as long as the system is
described with a transfer function. If the system cannot be rearranged into a transfer function the Fourier Transform properties must
be considered. [Figure number] shows an example of a a mass-spring-damper system exposed to gravity. Without the gravity term
this equation would be easily converted to a transfer function. However, the constant ‘Mg’ term prevents this conversion. Theoret-
ically this is multiplied by the unit impulse function during the transform. The unit impulse function is circled in the equation. This
theoretical function has a unit area of 1, is infinitely high, and infinitely short. The only time is will exist is when the frequency is 0
rad/s. So, when we deal with any other frequencies, this term will be zero. For our purposes, the constant term can be canceled,
simplifying the equation, allowing the creation of a transfer function. If you have a chance to study the Fourier transform in the
future you will explore this property. However, for now, you may simply cancel the term and recognize that the result for w=0 will
be incorrect.
389
Ks y K d y· My·· + K d y· + K s y = – F – Mg
y
2
y MD + K d D + K s = F – 1 + – Mg
M
My··
Note: The ‘Mg’ term prevents the equation from being rearranged into a transfer
function. However, for the phasor (Fourier) transform the term is replaced with a unit
impulse function. For our phasor application this means that we can set it to zero. The
Mg F
proof of this property goes beyond our treatment of the topic, but the rule will be used
to eliminate constant forcing functions.
2
y M j + Kd j + Ks = F –1 + – Mg
2
y M j + Kd j + Ks = F –1
--y- = ---------------------------------------------------
–1 –1
------------------------------------------
-
F 2 2
M j + Kd j + Ks MD + K d D + K s
Figure 10.9 Creating a Phasor Transfer Function from a Complicated Differential Equation
D+5
G = ------------------------------------
2
D + 5D + 100
f = 100; // give it a frequency
j = sqrt(-1); // instead of i
D = j * 2 * %pi * f; // the phasor substitution
G = (D + 5) / (D ^ 2 + 5 * D + 100); // the transfer function
20*log10(abs(G)) // gain in dB
180 * atan2(imag(G), real(G)) / %pi // phase angle in degrees
Traditional programming languages may require the use of a mathematical library, or additional programming. Figure
10.11 is a simple set of C functions for complex numbers. A data structure for complex numbers is defined with an angle and mag-
nitude. (Note: This data structure could have also been defined as a real and imaginary component.) Functions are then written to
perform basic mathematical operations. The complex structure and functions can be reused for other calculations and programs.
390
#include <math.h>
#define PI 3.14159
struct complex {
double mag;
double angle;
};
The transfer function ‘G’ from the previous example is implemented in Figure 10.12 with the C functions. The routine is
called and then each of the mathematical operations is performed with a separate function call. This function could be simplified
with overloaded operators in C++ or Java. The main function calls the transfer function calculation using a frequency of 75Hz. The
calculation results are returned in the ‘result’ structure. The resulting magnitude and angle are printed without being converted to
dB for gain and degrees for angle.
391
w = 2 * PI * f;
define(D, w, PI/2.0); // D = jw
void main(){
struct complex result;
G(&result, 75.0);
printf("mag=%f, angle =%f \n", [Link],
[Link]);
}
10.3 Vibrations
Oscillating displacements and forces in mechanical systems will cause vibrations. In some cases these become a nuisance,
or possibly lead to premature wear and failure in mechanisms. A common approach to dealing with these problems is to design
vibration isolators. The equations for transmissibility and isolation are shown in Figure 10.13. These equations can compare the
ratio of forces or displacements through an isolator. The calculation is easy to perform with a transfer function or Bode plot.
Transmissibility for a simple component can be a ration of input to output force, or displacement, at dif-
ferent frequencies. At a frequency of 0 rad/s this value is normally 1, or 100%.
For realistic systems it is often impractical to put the inputs and outputs in the same units. In these cases we can
compare the output magnitude at 0 rad/s and the frequency in question.
F out x out
T = -------------------
- = ------------------
-
F out 0 x out 0
Isolation is the compliment of transmission. So when the transmissibility is 90%, the isolation is 10%.
I = 1–T
An example of a transmissibility calculation is shown in [fig number]. The example begins with a transfer function that
392
has been derived for some system where the input is ‘F’ and the output is ‘x’. In the previous sections of this chapter, phasors
(D=jw) were used to find the transfer function ratio given a specific frequency. The magnitude of this ratio is the magnifier
between input and output sine waves. The angle of the ratio is the offset between the input and output sine waves. For the given
transfer function the input and output values are not the same, meaning they do not have the same units. As a result the analysis
must compare the gain at a frequency of zero, and the target frequency. Therefore two values must be calculated to find the trans-
missibility at a frequency. In this example the input ‘F’ is eliminated by giving it a value of 1.0, but it is not necessary to do this, the
value of the transfer function alone is sufficient.
In the second part of the example the transmissibility is calculated for multiple frequencies. These are then plotted to show
how the system behaves over a range of frequencies. The frequency range is set to cover three decades, where each decade is a
multiple of 10 starting at 0.1 rad/s. The transfer function is calculated in the function to simplify the remainder of the program.
Before the loop starts the initial gain is calculated. All of the frequencies and magnitudes are stored in arrays for plotting later. In
the loop the current output magnitude is divided by the initial magnitude to normalize it to a scale of 1. The resulting plot is done
using a logarithmic scale to make it readable. If a logarithmic scale is not used the graph is often a line pushed to one side of the
plot that is unusable for analysis and engineering design.
The given transfer function has an input force F, resulting in a displacement x. The Phasor transform
is used for the transfer function, and the input F is set to 1 to simplify calculations.
x 5D + 6
--- = ------------------------------
F 2
D + 7D + 8
A manual calculation is shown for the transmissibility for an input at 100rad/s. This is done by calculating
the output magnitude at w=0 and w=100. The input value F is arbitrary because it will be canceled out, so
it is given a value of 1 for simplicity.
2 2
5D + 6 5j + 6 6 +5
x = 1 ------------------------------ - = ----------------------------------------
= ----------------------------------
2 2
D + 7D + 8 – + 7j + 8 2 2 2
8– +7
x 100 0.0499
T 100 = ------------------- = ---------------- = 0.0665 = 6.65%
x 0 0.75
A program can also be used to do this over a range of frequencies. The results are plotted using log scales
because the differences are multiplied, whereas an additive problem would use linear axes. Note that the
denominator of the transfer function is slightly underdamped, so the transmissibility rises above 1.0 near the
damped frequency.
10.4 Summary
• Phasor transforms and phasor representations can be used to find the steady state response of a system to a given
input.
• Vibration analysis determines frequency components in mechanical systems.
Problem 10.2 Develop a transfer function for the system pictured below and then find the response to an input voltage of Vi =
10sin(1,000,000 t) using phasor transforms.
1mH
1K
+
+ 1K 1K 1K
Vi Vo
-
Problem 10.3 A single d.o.f. model with a weight of 1.2 KN and a stiffness of 340 N/m has a steady-state harmonic excitation
force applied at 95 rpm (revolutions per minute). What damper value will give a vibration isolation of 92%? Use
phasors to do the calculations.
Problem 10.4 Four helical compression springs are used, one at each corner of a piece of equipment. The spring rate is 240 N/
m for each spring and the vertical static deflection of the equipment is 10mm. Calculate the mass of the equip-
ment and determine the amount of isolation the springs would afford if the equipment operating frequency is
twice the natural frequency of the system.
Problem 10.5 a) For the circuit below find the transfer function and the steady state response for an input of Vi=5sin(1000t)V.
1K
1uF
1mH
-
+ + + Vo
Vi
-
-
Problem 10.6 Given an input of F=5sin(62.82t), find the output, x, using phasors for the following transfer functions.
2
a) x D
--- = -------------------------------
F 2
D + 200
b) x D D+2
--- = -------------------------------
F 2
D + 200
2
c) x D D+2
--- = -------------------------------
F 2
D + 200
Answer 10.2
1K Va
1mH +
+ 1K 1K 1K
Vi Vo
-
Va – Vi Va Va Va – Vo
I Va = ------------------- + ------------ + ------------ + -------------------- = 0
1K 1K 1K 0.001D
3 1 –1 1
V ------------ + ------------------ + V ------------ = V ------------------ eqn 10.1
a 1K 0.001D i 1K o 0.001D
Vo – Va Vo
I Vo = -------------------- + ------------ = 0
0.001D 1K
1 - + ----------- 1
1 - = V -----------------
V o ----------------- -
0.001D 1K a 0.001D
0.001D + 1K 3 - + ----------------- –1
1 - + V ----------- 1
V o ------------------------------------- ----------- i 1K
- = V ------------------
o 0.001D
1K 1K 0.001D
1
Vo ------------
1K
------- = --------------------------------------------------------------------------------------------------------------------
Vi 0.001D + 1K 3 - + -----------------
1 - – ----------------- 1
------------------------------------- ----------- -
1K 1K 0.001D 0.001D
Answer 10.3
F
y
2
M F = – K y – K yD – F – Mg = MyD
y s d
y –1
--- = ---------------------------------------------
F 2
D M + DK d + K s
Ks Kd
F floor = K s y + K d yD
F
floor
---------------- = K + K D
y s d
F floor F floor – Ks + Kd D
---------------- = ---------------- --y- = --------------------------------------------
-
F y F 2
D M + DK d + K s
F floor – Ks + Kd j
---------------- = --------------------------------------------------
F 2
– M + jK d + K s
2 2
F floor Ks + K
d
---------------- = -----------------------------------------------------------------
F 2 2 2
Ks – M + Kd
N 1200N
K s = 340 ---- M = ----------------- = 122kg
m N
9.81 ------
kg
N 2 rad 2
340 ---- + K d 9.95 --------
m s
0.08 = -----------------------------------------------------------------------------------------------------------------------
2
N rad 2 rad 2
340 ---- – 9.95 -------- 122kg + 9.95 -------- K d
m s s
N 2 rad 2
2 340 ---
- + K 9.95 --------
N rad 2 rad 2 m d s
340 ---- – 9.95 -------- 122kg + 9.95 -------- K d = -----------------------------------------------------------------
m s s 2
0.08
2 2 2 2 99.0025 rad 2
8 N rad 2 115600 N
1.377878 10 ------- + 99.0025 -----------K d = ------------------ ------- + K d ------------------- -----------
2 2 0.0064 2 0.0064 2
m s m s
8 2 2
1.197253 10 - N s 2
---------------------------------- ------------------- = K d Ns
15370.138 2 2 K d = 88.3 -------
m rad m
397
Answer 10.4
a)
F = K y
s
Mg = 4 240 0.010 M = 0.979kg
b) y·· M + y· K +y K = Mg + F
d s
K K
d s F
y·· + y· ------- + y ------ = g + -----
M M M
Ks 4 240
n = ------ =
M
----------------- = 31.31
0.979
o = 2 n = 62.62
Mg + F
y = ---------------------------------------------
2
D M + DK d + K s
y off = 0.011046
off = 0
y on = 0.0036833
on = 62.62
y off – y on
- = 0.011046
– 0.0036833- = 0.667 = 66.7%
I = ------------------------------- -----------------------------------------------------
y off 0.011046
Answer 10.5
a) V o t = 3536 sin 1000t + 0.785
– 1000t
b) V o t = – 5000 + 2500e + 3536 sin 1000t + ---
4
Answer 10.6
a) –3
x t = 49.5 10 sin 62.82t + 2.942
–3
b) x t = 49.7 10 sin 62.82t + 2.843
x out 5D + 10
---------- = ------------------------------------------------------------------
-
x in 2
104D + 20K + 200 D + 4
Problem 10.8 Write the differential equation for the following schematic. If the constants for the system are L=0.001H, R1 =
398
100000, what will the steady system response be for an input of 10sin(20000t)?
L
R1
+ -
+
+
Vi Vo
- -
Qd Vd e Kp Vs Qa
------------
- 100 -
--------------------------
D-
--------- D+ D D + 0.1 1-
---
0.25 + D
-
Sensor
Va
D
----------
0.25
b) Select values for Kp and tau that will include a second order response that has a damping factor of 0.125 and a
natural frequency of 10rad/s.
Hint:
------------------------------------------------------------------------
2 2
D + 2 nD + n D + A
c) For a step input of magnitude 1.0 find the output as a function of time using numerical methods. Give the
results in a table OR graph.
d) For a step input of magnitude 1 find the output as a function of time by integrating the differential equation
(i.e., using the homogeneous and particular solutions).
e) Compare the values found in steps c) and d).
f) For the transfer function; 1) apply a phasor transform and express the gain and phase angle as a function of fre-
quency, 2) calculate a set of values and present them in a table, 3) use the values calculated in step 4) to develop
a frequency response plot on semi-log paper, 5) draw a straight line approximation of the Bode plot on semi-log
paper.
complex conjugate of the denominator ‘M’ is ‘M*’. Multiplying the top and bottom is the same as multiplying by ‘1’. After the
multiplication the denominator only contains real terms, and these can be used to divide the real and imaginary parts. The result is
a single complex number. Although this seems a little involved, it is a simple method once used.
N = a + bj N* = a – bj
Basic Properties:
a + bj + c + dj = a + c + b + d j
a + bj – c + dj = a – c + b – d j
a + bj Þ c + dj = ac – bd + ad + bc j
N- a + bj N M* a + bj c – dj ac + bd bc – ad
---- = -------------- = ----- -------- = -------------- ------------- = -----------------
- + ------------------ j
M c + dj M M* c + dj c – dj 2 2 2 2
c +d c +d
Figure 10.15 Basic complex number properties
The complex numbers shown in Figure 10.16in both Cartesian and polar forms. While the Cartesian form shows the num-
ber with two components, the polar form shows the number as a magnitude and direction. While the representations change, the
numbers are equivalent. The numbers can be converted between forms using the properties of right angle triangles. In polar form
there is no ‘j’, but there is a real number, and an angle. The angle follows the angle sign that is like a less than sign with a horizontal
bottom leg. So, the obvious question at this point is, “does the Polar form have any benefits?” The answer is yes, it simplifies divi-
sion, and multiplication.
400
Cartesian form
Ij
imaginary (j)
N = R + Ij
R
real
2 2
A = R +I R = A cos
I I = A sin
= atan ----
R
Polar form
Ij
imaginary (j)
N = A–
R
real
A = amplitude
= phase angle
Euler’s formula is shown in Figure 10.17. The polar notation can be directly converted to the complex exponent form.
Once in this form exponents are added for multiplication, and subtracted for division. To multiply two polar complex numbers, the
magnitudes ‘A’ are multiplied, and the angles added. Division is done by dividing the ‘A’ values and subtracting the angle in the
denominator. The final equation, DeMoivre’s theorem, will occasionally be used to find exponents and roots of complex numbers.
To add and complex numbers in polar form, they are normally converted to Cartesian form first.
j Euler’s formula
e = cos + j sin
j
A = A cos + j sin = Ae
A1 1 A2 2 = A1 A2 1+ 2
A1 1 A
- = -----1-
--------------------- 1– 2
A2 2 A2
n n DeMoivre’s theorem
A = A n
Figure 10.17 Euler’s formula for multiplication and division of polar complex numbers
401
Voltage
logical
continuous
Typical analog inputs and outputs for computers are listed below. Actuators and sensors that can be used with analog
inputs and outputs will be discussed in later chapters.
• Inputs:
• Oven temperature
• Fluid pressure
• Fluid flow rate
• Outputs:
• Fluid valve position
• Motor position
• Motor velocity
A basic analog input is shown in Figure 11.2. In this type of system a physical value is converted to a voltage, current or
other value by a transducer. A signal conditioner converts the signal from the transducer to a voltage or current that is read by the
analog input.
Analog to digital and digital to analog conversion uses integers within the computer. Integers limit the resolution of the
numbers to a discrete, or quantized range. The effect of using integers is shown in Figure 11.3 where the desired or actual analog
value is continuous, but the possible integer values are quantified with a ‘staircase’ set of values. Consider when a continuous ana-
log voltage is being read, it must be quantized into an available integer value. Likewise, a desired analog output value is limited to
available quantized values. In general the difference between the analog and quantized integer value is an error based upon the res-
olution of the analog I/O.
402
continuous
analog
quantized
integer
voltage
time
A more realistic drawing of sampled data is shown in Figure 11.5. This data is noisier, and even between the start and end
of the data sample there is a significant change in the voltage value. The data value sampled will be somewhere between the volt-
age at the start and end of the sample. The maximum (Vmax) and minimum (Vmin) voltages are a function of the control hardware.
These are often specified when purchasing hardware, but reasonable ranges are;
• 0V to 5V
• 0V to 10V
403
• -5V to 5V
• -10V to 10V
The number of bits of the A/D converter is the number of bits in the result word. If the A/D converter is 8 bit then the
result can read up to 256 different voltage levels. Most A/D converters have 12 bits, 16 bit converters are used for precision mea-
surements.
V t
V max
V t2
V t1
V min
t1 t2
where,
V t = the actual voltage over time
= sample interval for A/D converter
t = time
t 1, t 2 = time at start,end of sample
V t 1 , V t 2 = voltage at start, end of sample
V min, V max = input voltage range of A/D converter
N = number of bits in the A/D converter
The parameters defined in Figure 11.5 can be used to calculate values for A/D converters. These equations are summa-
rized in Figure 11.6. Equation 1 relates the number of bits of an A/D converter to the resolution. Equation 2 gives the error that can
be expected with an A/D converter given the range between the minimum and maximum voltages, and the resolution (this is com-
monly called the quantization error). Equation 3 relates the voltage range and resolution to the voltage input to estimate the integer
that the A/D converter will record. Finally, equation 4 allows a conversion between the integer value from the A/D converter, and a
voltage in the computer.
404
N eqn 11.1
R = 2
VI
V C = ------------ V max – V min + V min eqn 11.4
R–1
where,
R = resolution of A/D converter
Consider a simple example, a 10 bit A/D converter is set up to read voltages between -10V and 10V. This gives a resolu-
tion of 1024, where 0 is -10V and 1023 is +10V. Because there are only 1024 steps there is a maximum error of ±9.8mV. If a volt-
age of 4.564V is input, the A/D converter converts the voltage to an integer value of 746. When we convert this back to a voltage
the result is 4.570V. The resulting quantization error is 4.570V-4.564V=+0.006V. This error can be reduced by selecting an A/D
converter with more bits. Each bit halves the quantization error.
Given,
N = 10
V max = 10V
V min = – 10V
V in = 4.564V
Calculate,
N
R = 2 = 1024
V max – V min
V ERROR = ---------------------------------- = 0.0098V
2R
V in – V min
V I = INT ---------------------------------- R = 746
V max – V min
VI
V C = ----- V max – V min + V min = 4.570V
R
If the voltage being sampled is changing too fast we may get false readings, as shown in Figure 11.8. In the upper graph
405
the waveform completes seven cycles, and 9 samples are taken. The bottom graph plots out the values read. The sampling fre-
quency was too low, so the signal read appears to be different than it actually is, this is called aliasing.
The Nyquist criterion specifies that sampling frequencies should be at least twice the frequency of the signal being mea-
sured, otherwise aliasing will occur. The example in Figure 11.8 violated this principle, so the signal was aliased. If this happens in
real applications the process will appear to operate erratically. In practice the sample frequency should be 4 or more times faster
than the system frequency.
f AD > 2f signal where,
f AD = sampling frequency
f signal = maximum frequency of the input
406
ASIDE: This device is an 8 bit A/D converter. The main concept behind this is the successive approximation
logic. Once the reset is toggled the converter will start by setting the most significant bit of the 8 bit number.
This will be converted to a voltage Ve that is a function of the +/-Vref values. The value of Ve is compared to
Vin and a simple logic check determines which is larger. If the value of Ve is larger the bit is turned off. The
logic then repeats similar steps from the most to least significant bits. Once the last bit has been set on/off
and checked the conversion will be complete, and a done bit can be set to indicate a valid conversion value.
Vin
+
-
+Vref
successive 8
approximation D to A
clock converter
logic Ve
reset done
-Vref 8
data out
Quite often an A/D converter will multiplex between various inputs. As it switches the voltage will be sam-
pled by a sample and hold circuit. This will then be converted to a digital value. The sample and hold circuits
can be used before the multiplexer to collect data values at the same instant in time.
There are other practical details that should be considered when designing applications with analog inputs;
• Noise - Since the sampling window for a signal is short, noise will have added effect on the signal read. For
example, a momentary voltage spike might result in a higher than normal reading. Shielded data cables are com-
monly used to reduce the noise levels.
• Delay - When the sample is requested, a short period of time passes before the final sample value is obtained.
• Multiplexing - Most analog input cards allow multiple inputs. These may share the A/D converter using a tech-
nique called multiplexing. If there are 4 channels using an A/D converter with a maximum sampling rate of
100Hz, the maximum sampling rate per channel is 25Hz.
• Signal Conditioners - Signal conditioners are used to amplify, or filter signals coming from transducers, before
they are read by the A/D converter.
• Resistance - A/D converters normally have high input impedance (resistance), so they affect circuits they are
measuring.
• Single Ended Inputs - Voltage inputs to the A/D converter can use a single common for multiple inputs, these
types of inputs are called single ended inputs. These tend to be more prone to noise.
• Double Ended Inputs - Each double ended input has its own common. This reduces problems with electrical
noise, but also tends to reduce the number of inputs by half.
• Sampling Rates - The maximum number of samples that can be read each second. If reading multiple channels
with a multiplexer, this may be reduced.
• Quantization Error - Analog IO is limited by the binary resolution of the converter. This means that the output is
at discrete levels, instead of continuous values.
• Triggers - often external digital signals are used to signal the start of data collection.
• Range - the typical voltages that the card can read. Typical voltage ranges are -10V to 10V, 0V to 10V, 0V to 5V,
407
V max – V min
V ERROR = ---------------------------------- eqn 11.6
2R
V desired – V min
V I = INT ------------------------------------------- R eqn 11.7
V max – V min
VI
V output = ----- V max – V min + V min eqn 11.8
R
where,
R = resolution of A/D converter
V ERROR = the maximum quantization error
V I = the integer value representing the desired voltage
V output = the voltage output using the integer value
Assume we are using an 8 bit D/A converter that outputs values between 0V and 10V. We have a resolution of 256, where
0 results in an output of 0V and 255 results in 10V. The quantization error will be 20mV. If we want to output a voltage of 6.234V,
we would specify an output integer of 160, this would result in an output voltage of 6.250V. The quantization error would be
6.250V-6.234V=0.016V.
408
Given,
N = 8
V max = 10V
V min = 0V
V desired = 6.234V
Calculate,
N
R = 2 = 256
V –V
max min
V ERROR = ---------------------------------- = 0.020V
2R
V in – V min
V I = INT ---------------------------------- R = 160
V max – V min
VI
V C = ----- V max – V min + V min = 6.250V
R
The current output from a D/A converter is normally limited to a small value, typically less than 20mA. This is enough for
instrumentation, but for high current loads, such as motors, a current amplifier is needed. This type of interface will be discussed
later. If the current limit is exceeded for 5V output, the voltage will decrease (so don’t exceed the rated voltage). If the current limit
is exceeded for long periods of time the D/A output may be damaged.
409
Aside:
5K
10K V V
– ss
MSB bit 3 -
V
20K +
+ +
bit 2
0
Computer V
o
40K
bit 1
-
80K
LSB bit 0
V + = 0 = V–
Next, sum the currents into the inverting input as a function of the output voltage and the
input voltages from the computer,
Vb Vb Vb Vb Vo
3 2 1 0 - = -----------
--------------- + --------------- + --------------- + -------------- -
10K 20K 40K 80K 5K
nal wires.
+ IN1
- REF1
SHLD
When connecting analog voltage sources to a controller the common, or 0V reference voltage, can be connected different
ways, as shown in Figure 11.14. The least expensive method uses one shared common for all analog signals, this is called single
ended. The more accurate method is to use separate commons for each signal, this is called double ended. Most analog input cards
allow a choice between one or the other. But, when double ended inputs are used the number of available inputs is halved. Most
analog output cards are double ended.
device + device +
#1 Ain 0 #1 Ain 0
- -
Ain 1 Ain 0
device + device +
#1 Ain 2 #1 Ain 1
- -
Ain 3 Ain 1
Ain 4 Ain 2
Ain 5 Ain 2
Ain 6 Ain 3
Ain 7 Ain 3
COM
Double ended - with this arrangement the signal quality can be
Single ended - with this arrangement the signal quality can better, but fewer inputs are available.
be poorer, but more inputs are available.
Shielding
When a changing magnetic field cuts across a conductor, it will induce a current flow. The resistance in the circuits will
411
convert this to a voltage. These unwanted voltages result in erroneous readings from sensors, and signal to outputs. Shielding will
reduce the effects of the interference. When shielding and grounding are done properly, the effects of electrical noise will be negli-
gible. Shielding is normally used for; all logical signals in noisy environments, high speed counters or high speed circuitry, and all
analog signals.
There are two major approaches to reducing noise; shielding and twisted pairs. Shielding involves encasing conductors
and electrical equipment with metal. As a result electrical equipment is normally housed in metal cases. Wires are normally put in
cables with a metal sheath surrounding both wires. The metal sheath may be a thin film, or a woven metal mesh. Shielded wires are
connected at one end to “drain” the unwanted signals into the cases of the instruments. “Shielding for a Thermocouple” on
page 411 shows a thermocouple connected with a thermocouple. The cross section of the wire contains two insulated conductors.
Both of the wires are covered with a metal foil, and final covering of insulation finishes the cable. The wires are connected to the
thermocouple as expected, but the shield is only connected on the amplifier end to the case. The case is then connected to the
shielding ground, shown here as three diagonal lines.
Insulated wires
Two conductor
shielded cable
cross section Metal sheath
Insulating cover
A twisted pair is shown in “A Twisted Pair” on page 411. The two wires are twisted at regular intervals, effectively form-
ing small loops. In this case the small loops reverse every twist, so any induced currents are cancel out for every two twists.
When designing shielding, the following design points will reduce the effects of electromagnetic interference.
• Avoid “noisy” equipment when possible.
• Choose a metal cabinet that will shield the control electronics.
• Use shielded cables and twisted pair wires.
• Separate high current, and AC/DC wires from each other when possible.
• Use current oriented methods such as sourcing and sinking for logical I/O.
• Use high frequency filters to eliminate high frequency noise.
• Use power line filters to eliminate noise from the power supply.
412
Grounding
• Ground voltages are based upon the natural voltage level in the physical ground (the earth under your feet). This
will vary over a distance. Most buildings and electrical systems use a ground reference for the building. Between
different points on the same building ground voltage levels may vary as much as a few hundred millivolts. This
can lead to significant problems with voltage readings and system safety.
• A signal can be floating, or connected to a ground
• If floating a system normally has a self contained power source, or self reference such as a battery, strain gauge
or thermocouple. These are usually read with double ended outputs. The potential for floating voltage levels can
be minimized by connecting larger resistors (up to 100K) from the input to ground.
• A grounded system uses a single common (ground) for all signals. These are normally connected to a single
ended inputs.
• The analog common can also be connected to the ground with a large resistor to drain off induced voltages.
• Cable shields or grounds are normally only connected at one side to prevent ground loops.
11.3 Summary
• A/D conversion will convert a continuous value to an integer value.
• D/A conversion is easier and faster and will convert a digital value to an analog value.
• Resolution limits the accuracy of A/D and D/A converters.
• Sampling too slowly will alias the real signal.
• Analog inputs are sensitive to noise.
• Analog shielding should be used to improve the quality of electrical signals.
Problem 11.2 What is the difference between an A/D input and D/A output?
Problem 11.3 An analog voltage that has a range of -10V to 10V and is to be read to a precision of +/-0.05V. How is the mini-
mum number of bits required for the A/D converter?
Problem 11.4 Write a (complete) program for the ATmega32 that will read a potentiometer connected to PA0. The potentiome-
ter is connected across a 2V voltage source. When the potentiometer is above the middle of the range (>1V) pin
PB0 will be turned on.
VI
V C = ------------ V max – V min + V min = 2.733V
R–1
error = V c – V in = – 0.002 V
413
Answer 11.2 An A/D converter will convert an analog input voltage (or current) to an integer value. A D/A output will convert
an integer value to an output voltage.
Answer 11.3
10V – – 10V 7 bits, R = 128
R = ----------------------------------- = 200
0.1V 8 bits, R = 256
The minimum number of bits is 8.
Answer 11.4
V in – V min 1.0 – 0 10
V = INT ---------------------------------- R – 1 = INT ------------------- 2 – 1 = 403
I V –V 2.54 – 0
max min
#include <avr/io.h>
int main(void)
{
ADMUX = 0xC0; // set the input to channel 0
ADCSRA = 0xE0;// turn on ADC and set to free running
DDRB = (unsigned char)255; // set port B to outputs
while (1) {
if(ADCW > 403){
PORTB = 0x01; // set output
} else {
PORTB = 0x00; // clear output
}
}
return 0;
}
Problem 11.6 Discuss methods for reducing electrical noise in analog inputs.
Problem 11.7 Write a C program for an ATMega 32 microcontroller to collect an analog data value every half a second and
print it to the screen. The program should run for 10 seconds and then stop.
Problem 11.8 Write a C program for an ATMega 32 microcontroller to read a 10 bit analog input every 20ms and update an 8
bit PWM output. The relationship between input and output should be such that when the analog input is 0 the
PWM output should be 0, and when the analog input is 1023 the PWM output should be 255.
414
415
Potentiometers measure the angular position of a shaft using a variable resistor. A potentiometer is shown in Figure 12.1.
The potentiometer is resistor, normally made with a thin film of resistive material. A wiper can be moved along the surface of the
resistive film. As the wiper moves toward one end there will be a change in resistance proportional to the distance moved. If a volt-
age is applied across the resistor, the voltage at the wiper interpolate the voltages at the ends of the resistor.
V
1
resistive
V
film 1
Vw
Vw
V2
wiper
V2 physical
schematic
The potentiometer in Figure 12.2 is being used as a voltage divider. As the wiper rotates the output voltage will be propor-
tional to the angle of rotation.
V1
max w
w
V out = V 2 – V 1 ------------ + V 1
max
V out
V2
Potentiometers are popular because they are inexpensive, and don’t require special signal conditioners. But, they have
limited accuracy, normally in the range of 1% and they are subject to mechanical wear.
Potentiometers measure absolute position, and they are calibrated by rotating them in their mounting brackets, and then
tightening them in place. The range of rotation is normally limited to less than 360 degrees or multiples of 360 degrees. Some
potentiometers can rotate without limits, and the wiper will jump from one end of the resistor to the other.
417
Faults in potentiometers can be detected by designing the potentiometer to never reach the ends of the range of motion. If
an output voltage from the potentiometer ever reaches either end of the range, then a problem has occurred, and the machine can be
shut down. Two examples of problems that might cause this are wires that fall off, or the potentiometer rotates in its mounting.
Encoders use rotating disks with optical windows, as shown in Figure 12.3. The encoder contains an optical disk with fine
windows etched into it. Light from emitters passes through the openings in the disk to detectors. As the encoder shaft is rotated, the
light beams are broken. The encoder shown here is a quadrature encode, and it will be discussed later.
light light
emitters detectors
Shaft rotates
There are two fundamental types of encoders; absolute and incremental. An absolute encoder will measure the position of
the shaft for a single rotation. The same shaft angle will always produce the same reading. The output is normally a binary or Gray
code number. An incremental (or relative) encoder will output two pulses that can be used to determine displacement. Logic cir-
cuits or software is used to determine the direction of rotation, and count pulses to determine the displacement. The velocity can be
determined by measuring the time between pulses.
Encoder disks are shown in Figure 12.4. The absolute encoder has two rings, the outer ring is the most significant digit of
the encoder, the inner ring is the least significant digit. The relative encoder has two rings, with one ring rotated a few degrees
ahead of the other, but otherwise the same. Both rings detect position to a quarter of the disk. To add accuracy to the absolute
encoder more rings must be added to the disk, and more emitters and detectors. To add accuracy to the relative encoder we only
418
need to add more windows to the existing two rings. Typical encoders will have from 2 to thousands of windows per ring.
relative encoder
(quadrature) absolute encoder
When using absolute encoders, the position during a single rotation is measured directly. If the encoder rotates multiple
times then the total number of rotations must be counted separately.
When using a relative encoder, the distance of rotation is determined by counting the pulses from one of the rings. If the
encoder only rotates in one direction then a simple count of pulses from one ring will determine the total distance. If the encoder
can rotate both directions a second ring must be used to determine when to subtract pulses. The quadrature scheme, using two
rings, is shown in Figure 12.5. The signals are set up so that one is out of phase with the other. Notice that for different directions of
419
Quad input A
clockwise rotation
Quad Input B
Quad input A
counterclockwise rotation
Quad Input B
Note: To determine direction we can do a simple check. If both are off or on, the first to change state
determines direction. Consider a point in the graphs above where both A and B are off. If A is the first
input to turn on the encoder is rotating clockwise. If B is the first to turn on the rotation is counterclock-
wise.
Aside: A circuit (or program) can be built for this circuit using an up/down counter. If the positive edge
of input A is used to trigger the clock, and input B is used to drive the up/down count, the counter will
keep track of the encoder position.
Interfaces for encoders are commonly available for PLCs and as purchased units. Newer PLCs will also allow two normal
inputs to be used to decode encoder inputs.
Normally absolute and relative encoders require a calibration phase when a controller is turned on. This normally involves
moving an axis until it reaches a logical sensor that marks the end of the range. The end of range is then used as the zero position.
Machines using encoders, and other relative sensors, are noticeable in that they normally move to some extreme position before
use.
420
Tachometers measure the velocity of a rotating shaft. A common technique is to mount a magnet to a rotating shaft. When
the magnetic moves past a stationary pick-up coil, current is induced. For each rotation of the shaft there is a pulse in the coil, as
shown in Figure 12.6. When the time between the pulses is measured the period for one rotation can be found, and the frequency
calculated. This technique often requires some signal conditioning circuitry.
pickup Vout
coil
rotating
shaft Vout
t
magnet
1/f
Another common technique uses a simple permanent magnet DC generator (note: you can also use a small DC motor).
The generator is hooked to the rotating shaft. The rotation of a shaft will induce a voltage proportional to the angular velocity. This
technique will introduce some drag into the system, and is used where efficiency is not an issue.
Both magnetic and optical tachometers are well understood, commonly used, and inexpensive.
Rotational potentiometers were discussed before, but potentiometers are also available in linear/sliding form. These are
capable of measuring linear displacement over long distances. Figure 12.7 shows the output voltage when using the potentiometer
as a voltage divider.
V2
a
V out = V 1 + V 2 – V 1 ---
L
V out
L
a
V1
Linear/sliding potentiometers have the same general advantages and disadvantages of rotating potentiometers.
Linear Variable Differential Transformers (LVDTs) measure linear displacements over a limited range. The basic device is
shown in Figure 12.8. It consists of outer coils with an inner moving magnetic core. High frequency alternating current (AC) is
421
applied to the center coil. This generates a magnetic field that induces a current in the two outside coils. The core will pull the mag-
netic field towards it, so in the figure more current will be induced in the left hand coil. The outside coils are wound in opposite
directions so that when the core is in the center the induced currents cancel, and the signal out is zero (0Vac). The magnitude of the
signal out voltage on either line indicates the position of the core. Near the center of motion the change in voltage is proportional to
the displacement. But, further from the center the relationship becomes nonlinear.
A rod drives
the sliding core
V = K x
where,
AC input
V = output voltage
K = constant for device
x = core displacement
signal out
Aside: The circuit below can be used to produce a voltage that is proportional to position. The two diodes
convert the AC wave to a half wave DC wave. The capacitor and resistor values can be selected to act as a
low pass filter. The final capacitor should be large enough to smooth out the voltage ripple on the output.
Vac in LVDT
These devices are more accurate than linear potentiometers, and have less friction. Typical applications for these devices
include measuring dimensions on parts for quality control. They are often used for pressure measurements with Bourdon tubes and
bellows/diaphragms. A major disadvantage of these sensors is the high cost, often in the thousands.
High precision linear displacement measurements can be made with Moire Fringes, as shown in Figure 12.10. Both of the
strips are transparent (or reflective), with black lines at measured intervals. The spacing of the lines determines the accuracy of the
position measurements. The stationary strip is offset at an angle so that the strips interfere to give irregular patterns. As the moving
422
strip travels by a stationary strip the patterns will move up, or down, depending upon the speed and direction of motion.
Stationary
Moving
Note: you can recreate this effect with the strips below. Photocopy the pattern twice, overlay the sheets
and hold them up to the light. You will notice that shifting one sheet will cause the stripes to move up or
down.
A device to measure the motion of the moire fringes is shown in Figure 12.11. A light source is collimated by passing it
through a narrow slit to make it one slit width. This is then passed through the fringes to be detected by light sensors. At least two
light sensors are needed to detect the bright and dark locations. Two sensors, close enough, can act as a quadrature pair, and the
same method used for quadrature encoders can be used to determine direction and distance of motion.
on
off
on
off
These are used in high precision applications over long distances, often meters. They can be purchased from a number of
suppliers, but the cost will be high. Typical applications include Coordinate Measuring Machines (CMMs).
Accelerometers measure acceleration using a mass suspended on a force sensor, as shown in Figure 12.12. When the sen-
sor accelerates, the inertial resistance of the mass will cause the force sensor to deflect. By measuring the deflection the accelera-
tion can be determined. In this case the mass is cantilevered on the force sensor. A base and housing enclose the sensor. A small
423
Base
Mounting Force
Stud Sensor Mass Housing
Accelerometers are dynamic sensors, typically used for measuring vibrations between 10Hz to 10KHz. Temperature vari-
ations will affect the accuracy of the sensors. Standard accelerometers can be linear up to 100,000 m/s**2: high shock designs can
be used up to 1,000,000 m/s**2. There is often a trade-off between a wide frequency range and device sensitivity (note: higher sen-
sitivity requires a larger mass). “Piezoelectric Accelerometer Sensitivities” on page 423 shows the sensitivity of two accelerome-
ters with different resonant frequencies. A smaller resonant frequency limits the maximum frequency for the reading. The smaller
frequency results in a smaller sensitivity. The units for sensitivity is charge per m/s**2.
resonant freq. (Hz) sensitivity
The force sensor is often a small piece of piezoelectric material (discussed later in this chapter). The piezoelectric material
can be used to measure the force in shear or compression. Piezoelectric based accelerometers typically have parameters such as,
• -100 to 250°C operating range
• 1mV/g to 30V/g sensitivity
• operate well below one forth of the natural frequency
The accelerometer is mounted on the vibration source as shown in Figure 12.14. The accelerometer is electrically isolated
from the vibration source so that the sensor may be grounded at the amplifier (to reduce electrical noise). Cables are fixed to the
surface of the vibration source, close to the accelerometer, and are fixed to the surface as often as possible to prevent noise from the
cable striking the surface. Background vibrations can be detected by attaching control electrodes to non-vibrating surfaces. Each
accelerometer is different, but some general application guidelines are;
• The control vibrations should be less than 1/3 of the signal for the error to be less than 12%).
• Mass of the accelerometers should be less than a tenth of the measurement mass.
• These devices can be calibrated with shakers, for example a 1g shaker will hit a peak acceleration of 9.81 m/
s**2.
accelerometer
isolated
stud isolated
wafer
surface
424
Equipment normally used when doing vibration testing is shown in Figure 12.15. The sensor needs to be mounted on the
equipment to be tested. A preamplifier normally converts the charge generated by the accelerometer to a voltage. The voltage can
then be analyzed to determine the vibration frequencies.
Sensor
Source of vibrations,
pre- or site for vibration
amp measurement
Accelerometers are commonly used for control systems that adjust speeds to reduce vibration and noise. Computer Con-
trolled Milling machines now use these sensors to actively eliminate chatter, and detect tool failure. The signal from accelerometers
can be integrated to find velocity and acceleration.
Currently accelerometers cost hundreds or thousands per channel. But, advances in micromachining are already beginning
to provide integrated circuit accelerometers at a low cost. Their current use is for airbag deployment systems in automobiles.
Strain gages measure strain in materials using the change in resistance of a wire. The wire is glued to the surface of a part,
so that it undergoes the same strain as the part (at the mount point). Figure 12.16 shows the basic properties of the undeformed
425
wire. Basically, the resistance of the wire is a function of the resistivity, length, and cross sectional area.
w
t
L
-
V V L L
R = --- = --- = ------
I A wt
+ where,
I
R = resistance of wire
V, I = voltage and current
L = length of wire
w, t = width and thickness
A = cross sectional area of conductor
= resistivity of material
After the wire in Figure 12.16 has been deformed it will take on the new dimensions and resistance shown in Figure
12.17. If a force is applied as shown, the wire will become longer, as predicted by Young’s modulus. But, the cross sectional area
will decrease, as predicted by Poison’s ratio. The new length and cross sectional area can then be used to find a new resistance.
426
w’
t’
L’
= F F- = E
--- = ----- F-
\ = ---------
A wt Ewt
L'- = L 1+
---------------------------------------------
-
R' = -------
w't' w 1– t 1–
F
1+
\ R = R' – R = R ---------------------------------------
-–1
1– 1–
where,
Figure 12.17 The Electrical and Mechanical Properties of the Deformed Wire
427
Aside: Changes in strain gauge resistance are typically small (large values would require strains that would
cause the gages to plastically deform). As a result, Wheatstone bridges are used to amplify the small change.
In this circuit the variable resistor R2 would be tuned until Vo = 0V. Then the resistance of the strain gage
can be calculated using the given equation.
R2 R1
V+ R = -------------
- when Vo = 0V
strain R3
R4
R2 R1
+
Vo
R3
Rstrain
R5
A strain gage must be small for accurate readings, so the wire is actually wound in a uniaxial or rosette pattern, as shown
in Figure 12.19. When using uniaxial gages the direction is important, it must be placed in the direction of the normal stress. (Note:
the gages cannot read shear stress.) Rosette gages are less sensitive to direction, and if a shear force is present the gage will mea-
sure the resulting normal force at 45 degrees. These gauges are sold on thin films that are glued to the surface of a part. The process
of mounting strain gages involves surface cleaning. application of adhesives, and soldering leads to the strain gages.
direction
stress
uniaxial rosette
A design techniques using strain gages is to design a part with a narrowed neck to mount the strain gage on, as shown in
Figure 12.20. In the narrow neck the strain is proportional to the load on the member, so it may be used to measure force. These
428
F F
Strain gages are inexpensive, and can be used to measure a wide range of stresses with accuracies under 1%. Gages
require calibration before each use. This often involves making a reading with no load, or a known load applied. An example appli-
cation includes using strain gages to measure die forces during stamping to estimate when maintenance is needed.
When a crystal undergoes strain it displaces a small amount of charge. In other words, when the distance between atoms in
the crystal lattice changes some electrons are forced out or drawn in. This also changes the capacitance of the crystal. This is
known as the Piezoelectric effect. Figure 12.21 shows the relationships for a crystal undergoing a linear deformation. The charge
generated is a function of the force applied, the strain in the material, and a constant specific to the material. The change in capaci-
tance is proportional to the change in the thickness.
F
b
+
q
-
c a
ab-
C = -------- d- F
i = g ----
c dt
where, F
C = capacitance change
a, b, c = geometry of material
= dielectric constant (quartz typ. 4.06*10**-11 F/m)
i = current generated
F = force applied
g = constant for material (quartz typ. 50*10**-3 Vm/N)
These crystals are used for force sensors, but they are also used for applications such as microphones and pressure sen-
sors. Applying an electrical charge can induce strain, allowing them to be used as actuators, such as audio speakers.
429
When using piezoelectric sensors charge amplifiers are needed to convert the small amount of charge to a larger voltage.
These sensors are best suited to dynamic measurements, when used for static measurements they tend to drift or slowly lose charge,
and the signal value will change.
PV = nRT
where,
P = the gas pressure
V = the volume of the gas
n = the number of moles of the gas
R = the ideal gas constant =
T = the gas temperature
When flowing, the flow may be smooth, or laminar. In case of high flow rates or unrestricted flow, turbulence may result.
The Reynold’s number is used to determine the transition to turbulence. The equation below is for calculation the Reynold’s num-
ber for fluid flow in a pipe. A value below 2000 will result in laminar flow. At a value of about 3000 the fluid flow will become
uneven. At a value between 7000 and 8000 the flow will become turbulent.
VD -
R = -----------
u
where,
R = Reynolds number
V = velocity
D = pipe diameter
= fluid density
u = viscosity
Figure 12.22 shows different two mechanisms for pressure measurement. The Bourdon tube uses a circular pressure tube.
When the pressure inside is higher than the surrounding air pressure (14.7psi approx.) the tube will straighten. A position sensor,
430
connected to the end of the tube, will be elongated when the pressure increases.
pressure pressure
increase increase
position sensor
position sensor
pressure pressure
These sensors are very common and have typical accuracies of 0.5%.
When a flowing fluid or gas passes through a narrow pipe section (neck) the pressure drops. If there is no flow the pres-
sure before and after the neck will be the same. The faster the fluid flow, the greater the pressure difference before and after the
neck. This is known as a Venturi valve. Figure 12.23 shows a Venturi valve being used to measure a fluid flow rate. The fluid flow
rate will be proportional to the pressure difference before and at the neck (or after the neck) of the valve.
differential
pressure
transducer
fluid flow
Aside: Bernoulli’s equation can be used to relate the pressure drop in a venturi valve.
2
--p- + -----
v + gz = C
2
where,
p = pressure
= density
v = velocity
g = gravitational constant
z = height above a reference
C = constant
Consider the center line of the fluid flow through the valve. Assume the fluid is incompressible, so the den-
sity does not change. And, assume that the center line of the valve does not change. This gives us a simpler
equation, as shown below, that relates the velocity and pressure before and after it is compressed.
2 2
p before v p after v after
before
-------------------- + ----------------------- + gz = C = --------------- + ------------------ + gz
2 2
2 2
p before v before p after v after
-------------------- + ----------------------- = --------------- + ------------------
2 2
2 2
v after v before
p before – p after = ------------------ – -----------------------
2 2
The flow velocity v in the valve will be larger than the velocity in the larger pipe section before. So, the
right hand side of the expression will be positive. This will mean that the pressure before will always be
higher than the pressure after, and the difference will be proportional to the velocity squared.
Venturi valves allow pressures to be read without moving parts, which makes them very reliable and durable. They work
well for both fluids and gases. It is also common to use Venturi valves to generate vacuums for actuators, such as suction cups.
Fluid passes through thin tubes, causing them to vibrate. As the fluid approaches the point of maximum vibration it accel-
erates. When leaving the point it decelerates. The result is a distributed force that causes a bending moment, and hence twisting of
the pipe. The amount of bending is proportional to the velocity of the fluid flow. These devices typically have a large constriction
on the flow, and result is significant loses. Some of the devices also use bent tubes to increase the sensitivity, but this also increases
the flow resistance. The typical accuracy for a Coriolis flowmeter is 0.1%.
432
A magnetic sensor applies a magnetic field perpendicular to the flow of a conductive fluid. As the fluid moves, the elec-
trons in the fluid experience an electromotive force. The result is that a potential (voltage) can be measured perpendicular to the
direction of the flow and the magnetic field. The higher the flow rate, the greater the voltage. The typical accuracy for these sensors
is 0.5%.
These flow meters don’t oppose fluid flow, and so they don’t result in pressure drops.
A transmitter emits a high frequency sound at point on a tube. The signal must then pass through the fluid to a detector
where it is picked up. If the fluid is flowing in the same direction as the sound it will arrive sooner. If the sound is against the flow
it will take longer to arrive. In a transit time flow meter two sounds are used, one traveling forward, and the other in the opposite
direction. The difference in travel time for the sounds is used to determine the flow velocity.
A Doppler flowmeter bounces a sound wave off particle in a flow. If the particle is moving away from the emitter and
detector pair, then the detected frequency will be lowered, if it is moving towards them the frequency will be higher.
The transmitter and receiver have a minimal impact on the fluid flow, and therefore don’t result in pressure drops.
Fluid flowing past a large (typically flat) obstacle will shed vortices. The frequency of the vortices will be proportional to
the flow rate. Measuring the frequency allows an estimate of the flow rate. These sensors tend be low cost and are popular for low
accuracy applications.
In some cases more precise readings of flow rates and volumes may be required. These can be obtained by using a posi-
tive displacement meter. In effect these meters are like pumps run in reverse. As the fluid is pushed through the meter it produces a
measurable output, normally on a rotating shaft.
Gas flow rates can be measured using Pitot tubes, as shown in Figure 12.25. These are small tubes that project into a flow.
The diameter of the tube is small (typically less than 1/8") so that it doesn’t affect the flow.
433
gas flow
Pitot
tube
12.3 Temperature
Temperature measurements are very common with control systems. The temperature ranges are normally described with
the following classifications.
• Very low temperatures <-60 deg C - e.g. superconductors in MRI units
• Low temperature measurement -60 to 0 deg C - e.g. freezer controls
• Fine temperature measurements 0 to 100 deg C - e.g. environmental controls
• High temperature measurements <3000 deg F - e.g. metal refining/processing
• Very high temperatures > 2000 deg C - e.g. plasma systems
When a metal wire is heated the resistance increases. So, a temperature can be measured using the resistance of a wire.
Resistive Temperature Detectors (RTDs) normally use a wire or film of platinum, nickel, copper or nickel-iron alloys. The metals
are wound or wrapped over an insulator, and covered for protection. The resistances of these alloys are shown in “RTD Properties”
on page 433.
These devices have positive temperature coefficients that cause resistance to increase linearly with temperature. A plati-
num RTD might have a resistance of 100 ohms at 0C, that will increase by 0.4 ohms/°C. The total resistance of an RTD might dou-
ble over the temperature range.
A current must be passed through the RTD to measure the resistance. (Note: a voltage divider can be used to convert the
resistance to a voltage.) The current through the RTD should be kept to a minimum to prevent self heating. These devices are more
linear than thermocouples, and can have accuracies of 0.05%. But, they can be expensive
434
Thermocouples
Each metal has a natural potential level, and when two different metals touch there is a small potential difference, a volt-
age. (Note: when designing assemblies, dissimilar metals should not touch, this will lead to corrosion.) Thermocouples use a junc-
tion of dissimilar metals to generate a voltage proportional to temperature. This principle was discovered by T.J. Seebeck.
The basic calculations for thermocouples are shown in Figure 12.27. This calculation provides the measured voltage using
a reference temperature and a constant specific to the device. The equation can also be rearranged to provide a temperature given a
voltage.
measuring +
device - V out
V out = T – T ref
V out
\T = ------------ + T ref
where,
= constant (V/C) V- (typical)
50 ------
C
T, T ref = current and reference temperatures
The list in Table 1 shows different junction types, and the normal temperature ranges. Both thermocouples, and signal
conditioners are commonly available, and relatively inexpensive. For example, most PLC vendors sell thermocouple input cards
that will allow multiple inputs into the PLC.
Temperature
ANSI Voltage Range
Materials Range
Type (mV)
(°F)
mV
80
E
60 K
J C
40
20 T R
S
F
0
0 500 1000 1500 2000 2500
The junction where the thermocouple is connected to the measurement instrument is normally cooled to reduce the ther-
mocouple effects at those junctions. When using a thermocouple for precision measurement, a second thermocouple can be kept at
a known temperature for reference. A series of thermocouples connected together in series produces a higher voltage and is called
a thermopile. Readings can approach an accuracy of 0.5%.
Thermistors
Thermistors are non-linear devices, their resistance will decrease with an increase in temperature. (Note: this is because
the extra heat reduces electron mobility in the semiconductor.) The resistance can change by more than 1000 times. The basic cal-
culation is shown in Figure 12.29.
often metal oxide semiconductors The calculation uses a reference temperature and resistance, with a constant for the
device, to predict the resistance at another temperature. The expression can be rearranged to calculate the temperature given the
resistance.
1
--1- – ------
T T o
Rt = Ro e
To
\T = ----------------------------------
-
Rt
T o ln ------ +
Ro
where,
R o, R t = resistances at reference and measured temps.
T o, T = reference and actual temperatures
= constant for device
Aside: The circuit below can be used to convert the resistance of the thermistor to a voltage using a Wheat-
stone bridge and an inverting amplifier.
+V
R5
R1 R3
+
Vout
R2 R4
Thermistors are small, inexpensive devices that are often made as beads, or metallized surfaces. The devices respond
quickly to temperature changes, and they have a higher resistance, so junction effects are not an issue. Typical accuracies are 1%,
but the devices are not linear, have a limited temperature/resistance range and can be self heating.
Other Sensors
IC sensors are becoming more popular. They output a digital reading and can have accuracies better than 0.01%. But, they
have limited temperature ranges, and require some knowledge of interfacing methods for serial or parallel data.
Pyrometers are non-contact temperature measuring devices that use radiated heat. These are normally used for high tem-
perature applications, or for production lines where it is not possible to mount other sensors to the material.
12.4 Light
Light dependant resistors (LDRs) change from high resistance (>Mohms) in bright light to low resistance (<Kohms) in the
dark. The change in resistance is non-linear, and is also relatively slow (ms).
437
Aside: an LDR can be used in a voltage divider to convert the change in resistance to a measurable voltage.
V
high
V
out
V low
Chemical - pH
The pH of an ionic fluid can be measured over the range from a strong base (alkaline) with pH=14, to a neutral value,
pH=7, to a strong acid, pH=0. These measurements are normally made with electrodes that are in direct contact with the fluids.
Materials - Conductivity
Conductivity of a material, often a liquid is often used to detect impurities. This can be measured directly be applying a
voltage across two plates submerged in the liquid and measuring the current. High frequency inductive fields is another alternative.
adjustments.
Note: op-amps are used in this section to implement the amplifiers because they are inexpensive, com-
mon, and well suited to simple design and construction projects. When purchasing a commercial signal
conditioner, the circuitry will be more complex, and include other circuitry for other factors such as tem-
perature compensation.
+V R +R
f g
V out = ------------------- V in + offset
Ri
Ro offset Rf Rg
-V gain
-
+
Ri
Vin Vout
A differential amplifier with a current input is shown in Figure 12.33. Note that Rc converts a current to a voltage. The
voltage is then amplified to a larger voltage.
R1 Rf
Rc -
Iin +
R2
Vout
R3
R4
The circuit in Figure 12.34 will convert a differential (double ended) signal to a single ended signal. The two input op-
439
amps are used as unity gain followers, to create a high input impedance. The following amplifier amplifies the voltage difference.
-
+
-
Vin +
Vout
-
+
CMRR
adjust
The Wheatstone bridge can be used to convert a resistance to a voltage output, as shown in Figure 12.35. If the resistor
values are all made the same (and close to the value of R3) then the equation can be simplified.
+V
R5
R1 R3
+
Vout
R2 R4
R2 1
V out = V R 5 -------------------- 1 + ------
------ 1 + ------
1 – ------
R1 + R2 R3 R4 R5 R3
or if R = R1 = R2 = R4 = R5
R
V out = V ----------
2R 3
12.8 Summary
• Selection of continuous sensors must include issues such as accuracy and resolution.
• Angular positions can be measured with potentiometers and encoders (more accurate).
• Tachometers are useful for measuring angular velocity.
• Linear positions can be measured with potentiometers (limited accuracy), LVDTs (limited range), moire fringes
(high accuracy).
• Accelerometers measure acceleration of masses.
• Strain gages and piezoelectric elements measure force.
• Pressure can be measured indirectly with bellows and Bourdon tubes.
• Flow rates can be measured with Venturi valves and pitot tubes.
• Temperatures can be measured with RTDs, thermocouples, and thermistors.
• Input signals can be single ended for more inputs or double ended for more accuracy.
12.9 References
12.1 Bryan, L.A. and Bryan, E.A., Programmable Controllers; Theory and Implementation, Industrial Text Co., 1988.
12.2 Swainston, F., A Systems Approach to Programmable Controllers, Delmar Publishers Inc., 1992.
a) If the joint is at 42 degrees, what voltage will be output from the potentiometer?
b) If the joint has been moved, and the potentiometer output is 2.765V, what is the position of the potentiometer?
Problem 12.2 What is the resolution of an absolute optical encoder that has six binary tracks? nine tracks? twelve tracks?
Problem 12.3 If a thermocouple generates a voltage of 30mV at 800F and 40mV at 1000F, what voltage will be generated at
1200F?
Problem 12.4 Name two types of inputs that would be analog input values (versus a digital value).
Problem 12.5 Search the web for common sensor manufacturers for 5 different types of continuous sensors. If possible identify
prices for the units. Sensor manufacturers include (Hyde Park, Banner, Allen Bradley, Omron, etc.)
Problem 12.6 Suggest a couple of methods for collecting data on the factory floor.
Problem 12.7 A motor has an encoder mounted on it. The motor is driving a reducing gear box with a 50:1 ratio. If the position
of the geared down shaft needs to be positioned to 0.1 degrees, what is the minimum resolution of the incremen-
tal encoder?
Problem 12.8 What is the difference between a strain gauge and an accelerometer? How do they work?
Problem 12.9 Use the equations for a permanent magnet DC motor to explain how it can be used as a tachometer.
Problem 12.10 What are the trade-offs between encoders and potentiometers?
Problem 12.11 The table of position and voltage values below were measured for an inexpensive potentiometer. Write a C sub-
routine that will accept a voltage value and interpolate the position value.
theta (deg) V
0 0.1
67 0.6
145 1.6
195 2.4
213 3.4
296 4.2
315 5.0
w
b) 2.765V = 5V – 0V ------------------ + 0V
300deg
w
2.765V = 5V – 0V ------------------ + 0V
300deg
w = 165.9deg
Answer 12.3
Answer 12.6 Examples include ‘data buckets’, smart machines, PLCs with analog inputs, and network connections.
Answer 12.7
deg
360 ---------
rot count
R = ------------------ = 72 --------------
deg rot
5 --------------
count
Answer 12.8 Strain gauge measures strain in a material using a stretching wire that increases resistance - accelerometers mea-
sure acceleration with a cantilevered mass on a piezoelectric element.
Answer 12.9 When the motor shaft is turned by another torque source a voltage is generated that is proportional to the angular
velocity. This is the reverse emf. A DMM, or other high impedance instrument can be used to measure this, thus
minimizing the loses in resistor R.
R
2
· K K
+ + ------- = V ------
DMM V = Ks JR s JR
-
· JR
------
Vs = K +
K
Answer 12.10 Encoders cost more but can have higher resolutions. Potentiometers have limited ranges of motion.
443
Answer 12.11
#define SIZE 7;
double data[SIZE][2] = {{0.0, 0.1},
{67.0, 0.6},
{145.0, 1.6},
{195.0, 2.4},
{213.0, 3.4},
{296.0, 4.2},
{315.0, 5.0}};
Problem 12.13 A high precision potentiometer has an accuracy of +/- 0.1% and can rotate 300degrees and is used as a voltage
divider with a of 0V and 5V. The output voltage is being read by an A/D converter with a 0V to 10V input range.
How many bits does the A/D converter need to accommodate the accuracy of the potentiometer?
Problem 12.14 A potentiometer is connected to a microcontroller analog input. The potentiometer can rotate 300 degrees, and
the voltage supply for the potentiometer is +/-10V. Write a program to read the voltage from the potentiometer
and convert it to an angle in radians stored in ‘angle’.
444
445
drives the motor. The encoder is connected directly to the motor shaft to provide feedback of position.
command
generator
(e.g., PLC)
desired position
or velocity amplified encoder
voltage/ voltage/
current power current motor
controller
amp
In a DC motor there is normally a set of coils on the rotor that turn inside a stator populated with permanent magnets. Fig-
ure 13.2 shows a simplified model of a motor. The magnets provide a permanent magnetic field for the rotor to push against. When
current is run through the wire loop it creates a magnetic field.
I
magnetic
field
axis of
rotation
The power is delivered to the rotor using a commutator and brushes, as shown in Figure 13.3. In the figure the power is
supplied to the rotor through graphite brushes rubbing against the commutator. The commutator is split so that every half revolu-
447
tion the polarity of the voltage on the rotor, and the induced magnetic field reverses to push against the permanent magnets.
split commutator
motor
motor
shaft
shaft
brushes brushes
V+ power V-
split commutator supply
The direction of rotation will be determined by the polarity of the applied voltage, and the speed is proportional to the
voltage. A feedback controller is used with these motors to provide motor positioning and velocity control.
These motors are losing popularity to brushless motors. The brushes are subject to wear, which increases maintenance
costs. In addition, the use of brushes increases resistance, and lowers the motors efficiency.
ASIDE: The controller to drive a servo motor normally uses a Pulse Width Modulated (PWM) signal. As shown below the
signal produces an effective voltage that is relative to the time that the signal is on. The percentage of time that the signal
is on is called the duty cycle. When the voltage is on all the time the effective voltage delivered is the maximum voltage.
So, if the voltage is only on half the time, the effective voltage is half the maximum voltage. This method is popular
because it can produce a variable effective voltage efficiently. The frequency of these waves is normally above 20KHz,
above the range of human hearing.
50% duty cycle
V max
50
V eff = --------- V max
100
0
t
0% duty cycle
V max
0
V eff = --------- V max
100
0
t
ASIDE: A PWM signal can be used to drive a motor with the circuit shown below. The PWM signal
switches the NPN transistor, thus switching power to the motor. In this case the voltage polarity on the
motor will always be the same direction, so the motor may only turn in one direction.
power
V+ supply
V+ V-
signal
source DC motor
com
+Vs
Aside: When a motor is to be controlled with
PWM in two directions the H-bridge circuit
(shown below) is a popular choice. These can
be built with individual components, or pur-
chased as integrated circuits for smaller
motors. To turn the motor in one direction the Va Vb
PWM signal is applied to the Va inputs, while
the Vb inputs are held low. In this arrangement
the positive voltage is at the left side of the
motor. To reverse the direction the PWM signal
is applied to the Vb inputs, while the Va inputs
are held low. This applies the positive voltage
to the right side of the motor.
Vb Va
-Vs
AC Induction Motors
Induction motors are relatively low cost and high efficiency when used around a rated speed. These motors do not use
magnets or brushes, thus lowering the construction costs. The only wear problems on the motor occur on the bearings, providing
449
for a long running life. The key to these motors is the construction, an induction motor has the windings on the stator, Figure 13.7.
The rotor is normally a squirrel cage design. The squirrel cage is a cast aluminum core that when exposed to a changing magnetic
field will set up an opposing field. When an AC voltage is applied to the stator coils an AC magnetic field is created, the squirrel
cage sets up an opposing magnetic field and the resulting torque causes the motor to turn.
L1
stator windings
rotor
Neut.
In a three phase AC motor there are six poles. The AC current and voltage on each phases is 120 degrees out of phase.
Over each cycle of the current, from positive to negative to positive, the magnetic field will reverse on each of the poles. Figure
13.8 shows a three phases motor arrangement. The sum of the three magnetic fields would appear to be like one large magnetic
field rotating once for every cycle of the current. It is possible to build motors with additional poles to slow the overall speed.
L2
L1
L3
Neut.
Neut.
Neut.
There are many possible variations on the basic induction motor design. The number of windings (poles) can be an integer
multiple of the number of phases of power. More poles results in a lower rotational speed of the motor. Alternate rotor types for
induction motors are listed below. Regardless of the construction the function of the rotor is to intersect changing magnetic fields
from the stator. The changing field induces currents in the rotor. These currents in turn set up magnetic fields that oppose fields
from the stator, generating a torque.
• Squirrel cage - The conductors on the rotor have the shape of a wheel with end caps and bars.
• Wound Rotor - The rotor has coils wound. These are sometimes connected to external contacts with a commuta-
tor.
Induction motors require ‘slip’. If the motor turns at the precise speed of the stator field, it will not see a changing mag-
netic field. The result would be a collapse of the rotor magnetic field. As a result an induction motor always turns slightly slower
than the stator field. The difference is called the slip. This is typically a few percent. As the motor is loaded the slip will increase
until the motor stalls.
In general these motors should be used for applications that only require a single rotational direction. The torque speed
curve for a typical induction motor is shown in Figure 13.9. When the motor is used with a fixed frequency AC source the synchro-
nous speed of the motor will be the frequency of AC voltage divided by the number of poles in the motor. The motor actually has
the maximum torque below the synchronous speed. For example a 2 pole motor might have a synchronous speed of (2*60*60/2)
3600 RPM, but be rated for 3520 RPM. When a feedback controller is used the issue of slip becomes insignificant.
synchronous speed
speed
The torque-speed curve of an induction will vary, based on the construction. NEMA defines five basic induction motor
designs designated by a letter A to E. These different constructions results in different costs and efficiencies, Figure 13.10. Regard-
less of the motor type the torque will become zero at the maximum speed. Past that the motor will act as a brake.
torque
Class D
Class C
Class A, B, E
speed
The rotational speed of an induction motor is a function of the AC power frequency, Figure 13.11. For example, a motor
powered with 60Hz AC could rotate as fast as 60Hz or 3600RPM. Adding poles divides this number. The simplest motor is 2 pole
and will only have one north and south pole at anytime. A four pole motor adds a second, duplicated but shifted, stator winding set,
but runs under 1800RPM. The slip is the difference between the ideal and actual motor speed. In an ideal motor with no loses or
load the slip is 0, practically the slip is normally around 5%. For example a common speed rating for an AC motor is 1720RPM.
The rated speed is the steady state speed for the motor with the rated torque.
S
RPM = f120
----------- 1 – --------------
p 100%
where,
f = power frequency (60Hz typ.)
S = motor slip
Given that the speed of the motor is a function of the frequency, the speed of the motor is changed using the frequency, not
the voltage. Variable frequency motor drives control the speed of the motors by synthesizing a variable frequency AC waveform, as
shown in Figure 13.12. Variable Frequency Drives (VFDs) are very common for large motors in the Horsepower, or KW, power
ranges.
Controller
• Single phase induction motors are typically used for loads under 1HP. Various types (based upon their starting
and running modes) are,
• Split phase - there are two windings on the motor. A starting winding is used to provide torque at lower
speeds.
• Capacitor run -
• Capacitor start -
• Capacitor start and run -
• Shaded pole - these motors use a small offset coil (such as a single copper winding) to encourage the
field buildup to occur asymmetrically. These motors are for low torque applications much less than 1HP.
• Universal motors (also used with DC) have a wound rotor and stator that are connected in series.
452
Split Winding
starting winding
starting capacitor
Capacitor Start
starting winding
capacitor
Capacitor Run
capacitor winding
running capacitor
starting winding
Brushless DC Motors
Brushless motors use a permanent magnet on the rotor, and use windings on the stator. Therefore there is no need to use
brushes and a commutator to switch the polarity of the voltage on the coil. The lack of brushes means that these motors require less
maintenance than the brushed DC motors.
A typical Brushless DC motor could have three poles, each corresponding to one power input, as shown in Figure 13.15.
454
Each of coils is separately controlled. The coils are switched on to attract or repel the permanent magnet rotor.
V1
N
V2
V3
To continuously rotate these motors the current in the stator coils must alternate continuously. If the power supplied to the
coils was a 3-phase AC sinusoidal waveform, the motor will rotate continuously. The applied voltage can also be trapezoidal,
which will give a similar effect. The changing waveforms are controller using position feedback from the motor to select switching
times. The speed of the motor is proportional to the frequency of the signal.
A typical torque speed curve for a brushless motor is shown in Figure 13.16.
torque
speed
Stepper Motors
Stepper motors are designed for positioning. They move one step at a time with a typical step size of 1.8 degrees giving
200 steps per revolution. Other motors are designed for step sizes of 1.8, 2.0, 2.5, 5, 15 and 30 degrees.
There are two basic types of stepper motors, unipolar and bipolar, as shown in Figure 13.17. The unipolar uses center
tapped windings and can use a single power supply. The bipolar motor is simpler but requires a positive and negative supply and
455
a b 1a 1b
a b 2a 2b
2
unipolar bipolar
The motors are turned by applying different voltages at the motor terminals. The voltage change patterns for a unipolar
motor are shown in Figure 13.18. For example, when the motor is turned on we might apply the voltages as shown in line 1. To
rotate the motor we would then output the voltages on line 2, then 3, then 4, then 1, etc. Reversing the sequence causes the motor to
turn in the opposite direction. The dynamics of the motor and load limit the maximum speed of switching, this is normally a few
thousand steps per second. When not turning the output voltages are held to keep the motor in position.
1a Step 1a 2a 1b 2b
2a stepper
controller 1 1 0 1 0
1b motor 2 0 1 1 0
3 0 1 0 1
2b
4 1 0 0 1
To turn the motor the phases are stepped through 1, 2, 3, 4, and then back to 1. To reverse the
direction of the motor the sequence of steps can be reversed, eg. 4, 3, 2, 1, 4, ..... If a set of out-
puts is kept on constantly the motor will be held in position.
Stepper motors do not require feedback except when used in high reliability applications and when the dynamic condi-
tions could lead to slip. A stepper motor slips when the holding torque is overcome, or it is accelerated too fast. When the motor
slips it will move a number of degrees from the current position. The slip cannot be detected without position feedback.
Stepper motors are relatively weak compared to other motor types. The torque speed curve for the motors is shown in Fig-
ure 13.19. In addition they have different static and dynamic holding torques. These motors are also prone to resonant conditions
because of the stepped motion control.
torque
speed
The motors are used with controllers that perform many of the basic control functions. At the minimum a translator con-
troller will take care of switching the coil voltages. A more sophisticated indexing controller will accept motion parameters, such as
distance, and convert them to individual steps. Other types of controllers also provide finer step resolutions with a process known
as microstepping. This effectively divides the logical steps described in Figure 13.18 and converts them to sinusoidal steps.
• Translators - the user indicates maximum velocity and acceleration and a distance to move
• Indexer - the user indicates direction and number of steps to take
• Microstepping - each step is subdivided into smaller steps to give more resolution
Basic induction motors do not have a commutator, however it is possible to use a commutator to connect the wound rotor
to outside circuitry. (Note: wound rotors are used instead of a squirrel cage.) Wound rotor induction motors use varying external
resistances to change the motor torque speed curve. As the resistance value is increased the motor torque speed curve shifts from
the Class A to Class D.
• Universal motors were presented earlier for DC applications, but they can also be used for AC power sources.
This is because the field polarity in the rotor and stator both reverse as the AC current reverses.
• Synchronous motors are different from induction motors in that they are designed to rotate at the frequency of the
fields, in other words there is no slip.
• Synchronous motors use generated fields in the rotor to oppose the stators field.
• Uses DC power on the rotor and stator to generate the magnetic field (i.e., no permanent magnets)
• Shunt motors
• Have the rotor and stator coils connected in parallel.
• When the load on these motors is reduced the current flow increases slightly, increasing the field, and
slowing the motor.
• These motors have a relatively small variation in speed as they are varied, and are considered to have a
relatively constant speed.
• The speed of the motor can be controlled by changing the supply voltage, or by putting a rheostat/resis-
457
V
I = ------a
a R
a
T = Kt Ia
where,
operating
range
• Series motors
• Have the rotor and stator coils connected in series.
• As the motor speed increases the current increases, the motor can theoretically accelerate to infinite
speeds if unloaded. This makes the dangerous when used in applications where they are potentially
unloaded.
• These motors typically have greater starting torques that shunt motors
458
Va
I = ------------------
-
a Ra + Rf
2
T = Kt Ia = Kt Ia
where,
stall torque
e f = r a i a + Dl a i a + e m
em = Ke D
T = KT ia
ea = ra + la D ia + Ke D
T
e a = r a + l a D ------- + K e D
KT
• Compound motors\
• Have the rotor and stator coils connected in series.
• Differential compound motors have the shunt and series winding field aligned so that they oppose each other.
• Cumulative compound motors have the shunt and series winding fields aligned so that they add
cumulative
differential
ef = rf if + lf if D
T = KT if
T 2
--- = JD + BD
1
--- = ------------------------
-
T 2
JD + BD
T KT
--- = --- --- = ------------------------
-
if T if 2
JD + BD
i KT 1
---- = --- ----f = ------------------------
- ------------------
ef if ef 2 rf + lf D
JD + BD
T Ti 1
---- = --- ----f = K T ------------------
ef if ef rf + lf D
13.2 Hydraulics
Hydraulic systems are used in applications requiring a large amount of force and slow speeds. When used for continuous
actuation they are mainly used with position feedback. An example system is shown in Figure 13.22. The controller examines the
position of the hydraulic system, and drivers a servo valve. This controls the flow of fluid to the actuator. The remainder of the pro-
vides the hydraulic power to drive the system.
valve hydraulic
controller power
supply
position position
sensor hydraulic
actuator
sump
The valve used in a hydraulic system is typically a solenoid controlled valve that is simply opened or closed. Newer, more
expensive, valve designs use a scheme like pulse with modulation (PWM) which open/close the valve quickly to adjust the flow
rate.
13.4 Summary
• AC motors are low cost and work in a relatively narrow speed range (e.g., around 1700RPM).
• DC motors work over a range of speeds and tend to be more controllable. Costs are higher for controls or main-
tenance.
• Motion control introduces velocity and acceleration objectives to servo control.
c) Determine the pulse rate that will be required to drive a given joint at a velocity of 3.0”/sec.
Problem 13.2 For the stepper motor in the previous question, a pulse train is to be generated by the robot controller.
a) How many pulses are required to rotate the motor through three complete revolutions?
b) If it is desired to rotate the motor at a speed of 25 rev/min, what pulse rate must be generated by the robot con-
troller?
Problem 13.3 Explain the differences between stepper motors, variable frequency induction motors and DC motors using
tables.
rot deg
b) = 0.2 ---------- = 72 ----------
step step
in
c) 3 -----
s steps
PPS = ------------------------ = 120 -------------
in s
0.025 ----------
step
Answer 13.2 a)
step
pulses = 3rot 5 ---------- = 15steps
rot
Answer 13.3
speed torque
stepper motor very low speeds low torque
(
Answer 13.4 a)
Motor Type Cost Torque Speed Applications
b) Deadband correction allows the motor to break free of the static friction. Once moving freely the torque
required to ‘stick’ the motor is determined by the lower kinetic friction. Generally this means that the motor can
move slightly slower than the static friction minimum speed, but not the kinetic friction minimum speed.
c) Calibration is a process where instrumentation outputs are related to inputs. These results are then used later to
relate measurement equipment outputs with actual phenomenon. For example, in the laboratory, tachometers are
calibrated by turning them at a steady speed. The speed is measured with a strobe tachometer and the voltage out-
put is also recorded. These are then used to make a graph relating voltage and speed. Later the strobe tachometer
is not used and the voltage output of the tach. is used to calculate the speed.
Problem 13.6 Describe the voltage ripple that would occur when using a permanent magnet DC motor as a tachometer. Hint:
consider the use of the commutator to switch the polarity of the coil.
Problem 13.7 Compare the advantages/disadvantages of DC permanent magnet motors and AC induction motors.
463
14.1 Introduction
When a phasor transform is applied to a transfer function the result can be expressed as a magnitude and angle that are
functions of frequency. The magnitude is the gain, and the angle is the phase shift. In the previous chapter these values were calcu-
lated for a single frequency and then multiplied by the input values to get an output value. At different frequencies the transfer
function value will change. The transfer function gain and phase angle can be plotted as a function of frequency to give an overall
picture of system response.
Aside: Consider a ‘graphic equalizer’ commonly found on home stereo equipment. The spectrum can be
adjusted so that high or low tones are emphasized or muted. The position of the sliders adjusts the enve-
lope that the audio signal is filtered through. The sliders trace out a Bode gain plot. In theoretical terms the
equalizer can be described with a transfer function. As the slides are moved the transfer function is
changed, and the bode plot shifts. In the example below the slides are positioned to pass more of the lower
frequencies. The high frequencies would not be passed clearly, and might sound somewhat muffled.
gain
f(Hz)
The mass-spring-damper transfer function from the previous chapter is expanded in Figure 14.2. In this example the trans-
fer function is multiplied by the complex conjugate to eliminate the complex number in the denominator. The magnitude of the
resulting transfer function is the gain, and the phase shift is the angle. Note that to correct for the quadrant of the phase shift angles
pi radians is subtracted for certain frequency values.
The results in Figure 14.2 are normally left in variable form so that they may be analyzed for a range of frequencies. An
example of this type of analysis is done in Figure 14.3. A set of frequencies is used for calculations. These need to be converted
from Hz to rad/s before use. For each one of these the gain and phase angle is calculated. The gain gives a ratio between the input
sine wave and output sine wave of the system. The magnitude of the output wave can be calculated by multiplying the input wave
magnitude by the gain. (Note: recall this example was used in the previous chapter) The phase angle can be added to the input wave
to get the phase of the output wave. Gain is normally converted to ‘dB’ so that it may cover a larger range of values while still
remaining similar numerically. Also note that the frequencies are changed in multiples of tens, or magnitudes.
464
x 1
------------ = ------------------------------------------------------------------------
F 2
j 3000 + 2000 – 1000
2
x 1 – j 3000 + 2000 – 1000
------------ = ------------------------------------------------------------------------ --------------------------------------------------------------------------------
F 2 2
j 3000 + 2000 – 1000 – j 3000 + 2000 – 1000
2
x 2000 – 1000 – j 3000
------------ = ---------------------------------------------------------------------------
F 2 2 2
2000 – 1000 + 3000
2 2 2
x 2000 – 1000 + 3000 1
- = -------------------------------------------------------------------------------
------------ = ------------------------------------------------------------------------------- -
F 2 2 2 2 2 2
2000 – 1000 + 3000 2000 – 1000 + 3000
– 3000 –3
= atan ------------------------------------------ = atan ------------- for 2
2 2
– 1000 + 2000 2–
–3
= atan ------------- – for 2
2
2–
0 0
0.001 0.006283
0.01 0.06283
0.1 0.6283
1 6.283
10 62.83
100 628.3
1000 6283
Note: the gain values will cover many magnitudes of values. Note: negative phase angles
To help keep the graphs rational we will “compress” the values mean that the mass motion lags
by converting them to dB (decibels) using the following for- the force.
mula.
Note: The frequencies chosen should be chosen to cover the points with the greatest amount of
change.
In this example gain is defined as x/F. Therefore F is the input to the system, and x is the resulting output. The gain means
that for each unit of F input to the system, there will be gain*F=x output. If the input and output are sinusoidal, there is a difference
in phase between the input and output wave of (the phase angle). This is shown in Figure 14.4, where an input waveform is sup-
465
plied with three sinusoidal components. For each of the frequencies a gain and phase shift are calculated. These are then used to
calculate the resulting output wave, relative to the input wave. The resulting output represents the steady-state response to the sinu-
soidal output.
· 2
x t = 1000 _________ sin 0t + ______ ---------
360
2
+ 20 _________ sin 20t + _______ ---------
360
2
+ 10 __________ sin 0.5t + ________ ---------
360
1
2
3
4
5 6 789 1
2
3
4
5 6 789 1
2
3
4
5 6 789 1
2
3
4
5 6 789
steps_per_dec = 6;
decades = 6;
start_freq = 0.1;
// this section writes the values to a datafile that may be graphed in a spreadsheet
fd = mopen("[Link]", "w");
for step = 0:(steps_per_dec * decades),
f = start_freq * 10 ^ (step / steps_per_dec); // calculate the next frequency
w = f * 2 * %pi);// convert the frequency to radians
[gain, phase] = polar(G(w));// find the gain and convert it to mag and angle
gaindb = 20 * log10(gain);// convert magnitude to dB
phasedeg = 180 * phase / %pi;// convert to degrees
mfprint(fd, "%f, %f, %f \n", f, gaindb, phasedeg);
end
mclose(fd);
Aside: This can also be done entirely with phasors in Cartesian notation
D + 10 - = 9j
y--- = -------------------- + 10
-----------------
5 – 9j
-------------- = 50 + 81 – 45j- = 1.236 – 0.425j
-------------------------------
x D+5 9j + 5 5 – 9j 25 + 81
Aside: This can also be done entirely with phasors in polar notation
D + 10 - = 9j
y--- = -------------------- + 10
----------------- = 13.45 –0.733- = 13.45
----------------------------- ------------- –0.733 – 1.064 = 1.31 –– 0.331
x D+5 9j + 5 10.30 –1.064 10.30
x = 20 –0.3
y
---------------- = 1.31 –– 0.331
20 –0.3
Figure 14.7 The method for Bode graph straight line gain approximation
469
Note: Some of the straight line approximation issues are discussed below.
Why is there 3dB between a first order corner and the smooth plot, and the phase angle is 45 degrees
of the way to +/- 90 degrees.
G j 1 -
= -------------------
c j +
the initial gain is
1 1
G 0 = ------------------- = ------
-
c + j0 c
at the corner frequency c =
G j 1 - = --------------------
= ---------------------- 1 - = -------------
1 - –– ---
+ j 4
c c c 2 –--4- c 2
Therefore the difference is
1-
diff = G j - = ------
-------------- 1- –– --- = 20 log ------ –– --- = – 3.01dB –– ---
G 0 2 4 2 4 4
Why does a first order pole go down at 20dB/dec?
G j 1 -
= -------------------
c j +
1- = 20 log –1
G j = ----- = – 20 log
j
each time the frequency increases by a multiple of 10, the logarithm value
becomes 1 larger, thus resulting in a gain change of -20 dB.
Why does a pole make the phase angle move by -90deg after the corner frequency?
G j 1 - = ----------------------------------------------------
= ------------------- 1 –0 1
- = ------------------------- –– atan -------
c + j 2 2 2 2 c
c+ – atan ------- c+
c
before the corner frequency,
c>j
0
angle G j = – atan ------- = – atan ------- = 0
c c
after the corner frequency,
c<j
angle G j = – atan ------- = – atan = – ---
c 2
An example of the straight line plotting technique is shown in Figure 14.9. In this example the transfer function is first put
into a root form. In total there are three roots, 1, 10 and 100 rad/sec. The single root in the numerator will cause the curve to start
upward with a slope of 20dB/dec after 1rad/sec. The two roots will cause two curves downwards at -20dB/dec starting at 10 and
100 rad/sec. The initial gain of the transfer function is also calculated, and converted to decibels. The frequency axis is rad/sec by
default, but if Hz are used then it is necessary to convert the values.
4
G D = ------------------------------------------------- 10 D + 1
100D + 100 - = ----------------------------------------------- (the equation is put in root form)
2 D + 10 D + 100
0.01D + 1.1D + 10
Step 1: Draw lines for each of the terms in the transfer function,
Gain (dB)
D+1
4
10 1 - = 10 = 20dB
GAIN 0 = ------------------------
10 100
20dB/dec.
10-
----- 100
---------
2 2
0dB freq.(Hz)
1-
-----
2
-20dB/dec. -20dB/dec.
1 -
---------------- 1 -
-------------------
D + 10 D + 100
The example is continued in Figure 14.10 where the straight line segments are added to produce a combined straight line
curve.
Step 2: Sum the individual lines, and get the straight line approximation,
Gain (dB)
40dB
20dB
10-
----- 100
---------
2 2
0dB freq.(Hz)
1-
-----
2
Finally a smooth curve is fitted to the straight line approximation. When drawing the curve imagine that there are rubber
bands at the corners that pull slightly and smooth out. For a simple first-order term there is a 3dB gap between the sharp corner and
the function. Higher order functions will be discussed later.
40dB 3dB
20dB
1- 10-
----- 100-
--------
-----
2 2 2
0dB freq.(Hz)
The process for constructing phase plots is similar to that of gain plots, as seen in Figure 14.13. The transfer function is
put into root form, and then straight line phase shifts are drawn for each of the terms. Each term in the numerator will cause a pos-
itive shift of 90 degrees, while terms in the denominator cause negative shifts of 90 degrees. The phase shift occurs over two
decades, meaning that for a center frequency of 100, the shift would start at 10 and end at 1000. If there are any lone ‘D’ terms on
the top or bottom, they will each shift the initial value by 90 degrees, otherwise the phase should start at 0degrees.
Phase plots for transfer functions can be approximated with the following steps.
1. Plot the straight line segments.
a) Put the transfer function in root form to identify center frequencies. For example (D+1)/
(D+1000) will have center frequencies at 1 and 1000 rad/sec. This should have already been
done for the gain plot.
b) The phase at 0rad/sec is determined by looking for any individual D terms. Effectively
they have a root of 0rad/sec. Each of these in the numerator will shift the starting phase angle
up by 90deg. Each in the denominator will shift the start down by 90 deg. For example the
transfer function 10(D+1)/(D+1000) would start at 0 deg while 10D(D+1)/(D+1000) would
start at +90deg.
c) Curves that turn up or down are drawn around each center frequency. Again terms in the
numerator cause the curve to go up 90 deg, terms in the denominator cause the curves to go
down 90 deg. Curves begin to shift one decade before the center frequency, and finish one
decade after.
2. The effect of each term is added up to give the resulting straight line approximation.
3. The smooth curve is drawn.
Figure 14.12 The method for Bode graph straight line gain approximation
The previous example started in Figure 14.9 is continued in Figure 14.13 to develop a phase plot using the approximate
technique. There are three roots for the transfer function. None of these are zero, so the phase plot starts at zero degrees. The root in
the numerator causes a shift of positive 90 deg, starting one decade before 1rad/sec and ending one decade later. The two roots in
the denominator cause a shift downward.
472
4
10 D + 1
G D = -----------------------------------------------
D + 10 D + 100
Step 1: Draw lines for each of the terms in the transfer function
+45
0.1
------- 1- 10-
----- 100
--------- 1000-
-----------
-----
2 2 2 2 2
0 freq.(Hz)
-45 1 -
1 - -------------------
---------------- D + 100
D + 10
-90
The straight line segments for the phase plot are added in Figure 14.14 to produce a straight line approximation of the
final plot. A smooth line approximation is drawn using the straight line as a guide. Again, the concept of a rubber band will smooth
the curve.
473
+90
-45
-90
+90
+45
0 freq.(Hz)
-45
-90
The previous example used a transfer function with real roots. In a second-order system with double real roots (over-
damped) the curve can be drawn with two overlapping straight line approximations. If the roots for the transfer function are com-
plex (underdamped the corner frequencies will become peaked. This can be handled by determining the damping factor and natural
frequency as shown in Figure 14.15. The peak will occur at the damped frequency. The peaking effect will become more pro-
nounced as the damping factor goes from 0.707 to 0 where the peak will be infinite.
474
Gain
M Resonant Peak
n A
=0.1 -----------------------------------------------------------
2 2
D + 2 D+
n n
=0.5 2
dB = A = 1–
d n
= 0.707
-40dB/decade
freq
------d-
2 freq.
Note: If is less than 1 the roots become complex, and the Bode plots get a peak. This can
be seen mathematically because the roots of the transfer function become complex.
The approximate techniques do decrease the accuracy of the final solution, but they can be calculated quickly. In addition
these curves provide an understanding of the system that makes design easier. For example, a designer will often describe a system
with a Bode plot, and then convert this to a desired transfer function.
In some cases the transfer function will have a lone ‘D’ on the top or bottom. In these cases it means that the gain of the
system starts (i.e., f = 0Hz) starts at infinity for a ‘D’ on the bottom, or at a gain of 0 (negative infinity dB) for a ‘D’ on the [Link]
in other words, consider the Ds to have corner frequencies at zero. This means that Ds on the top start at infinity and come down.
Ds on the bottom start at negative infinity and come up. If at all possible cancel the Ds on the top and bottom, if any remain then to
draw the Bode plot you must work from the right side of the graph (i.e. f = infinity Hz).
Consider the example in Figure 14.16. The D squared term on the top is squared, so the system is second order and the
phase angle starts at 180 degrees. The gain starts at 0 (-infinity dB) goes upwards at 40dB/dec. As the upward slope of +40dB/dec
approaches the corner frequency of the bottom, with a slope of -40dB/dec, the two effects cancel and the slope becomes 0, for a
vertical line. The problem solution is similar when the lone Ds are on the bottom. With these types of problems the top and bottom
of the transfer function might go to zero or infinity. Normally we would say this is underdefined. In these cases, L’Hospital’s rule
475
may be used.
2
D
----------------------------
2
D + 20
or less formally....
2 22 2
j j –180
------------------------------ = ------------ = ---------------------- = 1 –0 = 0dB –0
2 22 2
j + 20 j –180
Corner frequencies: D = j
0dB
gain
(dB)
-20dB
-40dB
f(Hz)
1 10 100
180
phase
(deg) 90
In all of the examples presented, were we start or stop could be drawn from the left or right. This will not always be the
case as shown in the Figure 14.17. In this case the term on the top results in a slope of +20dB/dec on the left. The order of the
numerator and denominator are not the same so the final result will not be horizontal. The bottom is second order, compared to the
first order top, so the final result will be a downward slope of -20dB/dec. This leaves the dilemma of where the graph starts and
476
ends. The solution is to calculate one or more points on the curve using phasor transforms.
D
----------------------------
2
D + 20
0j 0j 0 –90
----------------------------- = ----------------- = ------------------------- = 0 –90 = – dB –90
2 2 2
0j + 20 20 400 –0
Corner frequencies: D = j
Zeroes: 0Hz
20
Poles: ---------Hz = 10Hz, 10Hz
2
Gain at 1Hz: D = 2 j
2 j
-------------------------------
- = 0.0015758 –1.371459rad = – 56dB –78.6
2
2 j + 20
-40dB
gain
(dB)
-50dB
-60dB
1 10 100
90 f(Hz)
phase
(deg) 0
-90
80
60
f(Hz)
This can be converted to a Bode plot, then transfer function by doing a straight line fit to the function. When the graph is
drawn using experimental values there is some need to allow for points that are off the straight line. In other words, fit the curve
using a good educated guess. Then using the form of the graph work backwards to construct a transfer function.
Gain (dB)
x/V
100
80 -40dB/dec
60
f(Hz)
Initial value: D = 0j
100
--------- 2
20 0j + 200 - \A = 1000
10 = A -------------------------------
2
0j + 20
2
D + 200
= 1000 -------------------------------
2
D + 20
x(t)
displacement 2 - t + 0.3A sin ------------
x t = A sin --------- 2 - t + 0.01A sin ---------------
2 -t
0.01 0.005 0.0005
A
5 t (ms)
frequency 1
freq. 3
freq. 2
A signal spectrum displays signal magnitude as a function of frequency, instead of time. The time based signal in Figure
14.20 is shown in the spectrum in Figure 14.21. The three frequency components are clearly identifiable spikes. The height of the
peaks indicates the relative signal magnitude.
Amplitude
A
log(freq.)
(Hz or rads.)
1- 1 -
------------ 1 -
---------------
---------
0.01 0.005 0.0005
14.6 Summary
• Bode plots show gain and phase angle as a function of frequency.
• Bode plots can be constructed by calculating point or with straight line approximations.
• A signal spectrum shows the relative strengths of components at different frequencies.
479
y D D + 10 D + 5
------------ = ----------------------------------------
x D 2
D+5
a) draw the straight line approximation of the Bode (gain and phase shift) plots.
b) determine the steady-state output if the input is x(t) = 20 sin(9t+0.3) using the Bode plot.
Problem 14.2 You are given the following differential equation for a spring damper pair.
d F t = 10 sin 100t
5x + ----- x = F
dt
a) Write the transfer function for the differential equation if the input is F.
b) Apply the phasor transform to the transfer function to find magnitude and phase as functions of frequency.
c) Draw a Bode plot for the system using either approximate or exact techniques.
d) Use the Bode plot to find the response to;
F t = 10 sin 100t
e) Put the differential equation in state variable form and use a calculator to find values in time for the given
input.
F = 10 sin 100t t x
0.0
0.002
0.004
0.006
0.008
0.010
f) Give the expected ‘x’ response of this first-order system to a step function input for force F = 1N for t > 0 if the
system starts at rest. Hint: Use the canonical form.
Problem 14.3 Given the following transfer function perform the following operations.
y D + 10
-- = ------------------------------------------------
x 2
D + 100D + 10000
a) Draw a Bode plot using the straight line methods (using the graph paper on the next page).
b) Determine y(t) if x(t) = 20 + 3 sin(10t) using the Bode plot.
c) Determine y(t) if x(t) = 20 + 3 sin(10t) using phasors.
Problem 14.4 Draw a Bode Plot for both of the transfer functions below using the phasor transform.
D + 1 D + 1000 and 5
---------------------------------------------- -------
2 2
D + 100 D
Problem 14.5 Use the straight line approximation techniques to draw the Bode plot for the transfer function below.
F D + 1000
G = --- = ------------------------------------
x 2
D + 5D + 100
480
Vo 1000
------ = ----------------------
Vi D + 1000
a) Find the steady state response of the circuit using phasors (i.e., phasor transforms) if the input is
Vi=5sin(100,000t).
b) Draw an approximate Bode plot for the circuit.
Problem 14.7 The applied force ‘F’ is the input to the system, and the output is the displacement ‘x’. Neglect the effects of
gravity. a) find the transfer function.
K1 = 500 N/m
x K2 = 1000 N/m
M = 10kg
Problem 14.8 The following differential equation is supplied, with initial conditions.
··
y + y· + 7y = F y 0 = 1 y· 0 = 0
F t = 10 t 0
a) Write the equation in state variable form.
b) Solve the differential equation numerically.
c) Solve the differential equation using calculus techniques.
d) Find the frequency response (gain and phase) for the transfer function using the phasor transform. Sketch the
bode plots.
Problem 14.9 Given the frequency response plot below, develop a transfer function.
Vo
V i = 10 sin t
10dB
-30dB
Problem 14.10 For the transfer function below draw an approximate bode plot. Use the approximate Bode plot to estimate the
response to the input. Verify the results using phasors.
x D D+2
-- = ------------------------------- f = 5 sin 62.82t
f 2
D + 200
y D D + 10 D + 5 D + 10
------------ = ---------------------------------------- = ---------------------
x D 2 D+5
D+5
6dB
0dB
0.8 1.6
90
0.8 1.6
-90
x t = 20 cos 9t + 0.3
Aside: the numbers should be obtained from the graphs, but I have calculated them
D + 10 - = 9j
y--- = -------------------- + 10
-----------------
5 – 9j
-------------- = 50 + 81 – 45j- = 1.236 – 0.425j
-------------------------------
x D+5 9j + 5 5 – 9j 25 + 81
y--- = 2 2 – 0.425
1.236 + 0.425 – atan ---------------- = 1.307 –– 0.3312rad
x 1.236
y
--- = 2.33dB –– 9.49
x
Answer 14.2 a)
x 1
--- = -------------
F 5+D
b) x 1 1 1 –0 1
--- = ------------- = --------------- = ------------------------------------------------ = ------------------------ –– atan ----
F 5+D 5+j 2 2 2 2 5
5 + – atan ---- 5 +
5
c)
gain(dB) 1
initial gain = 20 log ------------ = – 14dB
5+0
-14dB 5
corner freq. = ------ = 0.8Hz
2
-20dB/dec
phase(deg)
0
– 45
– 90
d) f = 100
--------- = 16Hz
2
e)
t x
0.2
0.186
0.0 0
0
0.002 9.98e-4
Xi
0.004 5.92e-3
0.010 0.041
– 5t
1 e
f) x = --- – ----------
5 5
484
Answer 14.3 a)
initial: 0j + 10 10 –0 –3
------------------------------------------------------------ = --------------------- = 10 –0 = – 60dB –0
2 10000 –0
0j + 100 0j + 10000
zero: 10
f c = ------ = 1.6Hz
2
poles:
100 = 2 \ = 0.5
n = 10000 = 100 n
2 86.6
f c = ---------- = 13.8Hz
d = n 1– = 86.6 2
y- = -----------------------------------------------------------
0j + 10 200 - = 0.02 –0
----- - y = --------------
20 2 10000
0j + 100 0j + 10000
for 10rad/s:
200 –---
y--- = -----------------------------------------------------------------
10j + 10 4
- = --------------------------------------------------------------
-
3 2 100 10j + 10000 – 100
10j + 100 10j + 10000
y = 0.0042637891 –0.68469816
y t = 0.02 + 0.00426 sin 10t + 0.685
485
f (Hz)
0.1 1 10 100 1000
1 2 3 4 5 6 789 1 2 3 4 5 6 789 1 2 3 4 5 6 789 1 2 3 4 5 6 789
-40
-50
-60
-70
-80
-90
90 deg
0deg
-90 deg
-180
486
Answer 14.4
20dB
0dB
1 100 1000
------ --------- ------------
2 2 2 5
-------
2
90deg 0deg
-45deg -180deg
487
Answer 14.5
for the numerator, (zero) rad
1000 -------- = 159Hz
s
2
fd = fn 1 – = 1.54Hz
-40dB/dec
-60
-20dB/dec
-80
phase
(deg)
0 0.154 15.4,15.9 1590 f(Hz)
-90
-180
488
Answer 14.6
a) 5
V t = 0.050 sin 10 t – 1.561
o
-20dB/dec
0 deg
-90 deg
Answer 14.7
--x- = -----------------------
a) 0.0667 - m ----
F 2 N
D + 33.3
b) = 1 D = 1j
x 0.0667 –3 m
--- = ----------------------------- = 2.07 10 0rad ----
F 2 N
1j + 33.3
F t = 10 cos t + 1 N
F = 10 1rad N
x –3 m
-------------------------------- = 2.07 10 0rad ----
10 1rad N N
–3 m
x = 2.07 10 0rad ---- 10 1rad N
N
–3
x = 10 2.07 10 0rad + 1rad m
x = 0.0207 1radm
x t = 0.0207 cos t + 1 m
2
c) F D + 33.3 N
--- = ------------------------ ----
x 0.0667 m
489
d) 2 2 2
for the denominator, (poles) D +2 D+ = D + 33.3
n n
rad
= 5.77 -------- f = 0.918Hz
n s n
= 0 (undamped)
2
f = f 1– = 0.918Hz
d n
0.0667
for the initial gain G 0 = ---------------- = 2 = – 54 dB
33.3
Gain
(dB)
-54
f(Hz)
0
0.1 1 10 100
-94
-40dB/dec
-134
-20dB/dec
phase
(deg)
f(Hz)
0
0.1 1 10 100
-90
-180
Answer 14.8
a) y· = v
v· = – v – 7y + F
b)
yi + 1 yi
= +h 0 1 yi + 0
vi + 1 vi –7 –1 v F
i
given
y0
= 1 F = 10
v 0
0
using h=0.001s
y1
= 1 + 0.001 0 1 1 + 0
v1 0 –7 –1 0 10
c) – 0.5t
y t = – 0.437e cos 2.598t – 0.19 + 1.429 m
491
d) y 1 1 1
--- = --------------------------- = ------------------------------------ = --------------------------------------
F 2 2 2
D +D+7 j +j +7 7– +j
y 1
--- = ------------------------------------------
F 2 2 2
7– +
–0 2 2
– = ---------------------------------------------- = – 0 – angle ,7– = –– angle ,7–
2
–angle , 7 –
-20dB
-40dB
0.01Hz 1Hz 100Hz
0deg
0.01Hz 1Hz 100Hz
-180deg
492
Answer 14.9
Vo
10dB
-30dB
rad rad
10 2 = 62.8 -------- 1000 = 6283 --------
s s
Vo s + 6283
------- = A --------------------
Vi s + 62.8
10
------ 10
------
20 20 –3
10 = A 0--------------------
+ 6283- A = 10 0.01 = 31.6 10
0 + 62.8
Vo – 3 + 6283
------- = 31.6 10 s-------------------
-
Vi s + 62.8
Vo – 3 j + 6283 –3
check: ------- = 31.6 10 ------------------------ = 31.6 10 = – 30dB
Vi j + 62.8
493
Answer 14.10
x j j+2
--- = --------------------------------- = 1 + 0j = 0dB –0
f 2
j + 200
0dB
-40dB
-80dB
f(Hz)
1Hz 100Hz
f = 5 sin 62.82t
deg
170deg
1Hz 100Hz
–--------
40-
20
x = 5 10 sin 62.82t + 170 --------- = 0.05 sin 62.82t + 2.97
180
j62.82 j62.82 + 2
x = ------------------------------------------------- 5 + 0j = 0.0497 –162.9 = 0.0497 sin 62.82t + 2.843
2
j62.82 + 200
pictured below.
gain
(dB)
-40dB/dec
phase
(deg)
Problem 14.12 Draw the straight line approximation for the transfer function.
D+3
-----------------------------------------------------
-
2
D + 10000D + 10000
Problem 14.13 Show that the second order transfer function below would result in a slope of +/- 40 dB/decade.
1
G j = ---------------------------
2
c+j
Problem 14.14 For the transfer functions below, draw the bode plots using computer software.
2 2
-r- = -----------------------------------------------------------
D+2 D D+2 D +2 1 1 D+1 -
---------------------------------------------------------
- -------------------------------------------------------
D + 200 D + 0.02 2 2 c 2 2
D + 50 D + 10000 D + 2 0.1 10 D + 10
Problem 14.15 Draw Bode plots for the following functions using straight line approximations.
1 1 1 1
------------- ---------------- --------------------- ------------------------------
D+1 2 2 2
D +1 D+1 D + 2D + 2
Problem 14.16 Use computer software, such as Mathcad or a spreadsheet, to calculate the points in Figure 14.2, and then draw
Bode plots. Most software will offer options for making one axis use a base 10 logarithm scale.
Problem 14.17 Draw the Bode plot for the transfer function by hand or with computer.
D+3
------------------------------------------------------
2
D + 10000D + 10000
b) Determine the steady state output if the input is x(s) = 20 cos(9t+.3) using the straight line plots.
c) Use an exact method to verify part b).
Problem 14.22 Given the experimental Bode (Frequency Response Function) plot below, find a transfer function to model the
system. The input is a voltage ‘V’ and the output is a displacement ‘x’. (Hint: after calculating the function use
Scilab to verify the results.)
Gain (dB)
x/V
20
10
0
f(Hz)
Problem 14.23 Given the experimental Bode (Frequency Response Function) plot below, find a transfer function to model the
system. The input is a voltage ‘V’ and the output is a displacement ‘x’. (Hint: after calculating the function use
496
Gain (dB)
x/V
20
-20
-60
f(Hz)
Answer 14.24 a)
b)
c)
–3
8.89 sin 624t + 1.571 + 0.141 10 sin 6.2t + 2.356
1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 789 1 2 3 4 5 6 789 1 2 3 4 5 6 789 1 2 3 4 5 6 789
498
499
The basic natural logarithm (e is a constant with a value found near the start of this section:
y
ln x = log e x = y x = e
log n 1 = 0
x
log n -- = log n x – log n y
y
y
log n x = ylog n x
log m x
log n x = --------------------
log m n
ln A = ln A + +2 k j k I
Problems
b) 3 log 4 = log 16
log 5 10
c) 10 = ------
5
Answer 14.27
5 3
log x + log x = 5 log x + 3 log x = 8 log x
2 3 4
n log x + m log x – log x
Answer 14.28
2 3 4
n log x + m log x – log x
2n + 3m – 4 log x
2n + 3m – 4 log x
501
R = – A, – B
jw
x(t)
x0
-A -B
sigma
R = Aj
jw x(t)
A
sigma
-A
t
R = –A Bj
jw x(t)
B
-A
sigma
-B t
Figure 15.3 Negative real and complex roots cause decaying oscillation
R = –A Bj
jw x(t)
-A
sigma
-B t
Figure 15.4 More negative real and complex roots cause a faster decaying oscillation
R = – A, – A
jw x(t)
-A,-A
sigma
R = A, A
jw x(t)
A,A
sigma
Figure 15.6 Positive real roots cause exponential growth and are unstable
R = A Bj
jw x(t)
B
A sigma
-B t
Figure 15.7 Complex roots with positive real parts have growing oscillations and are unstable
Next, recall that the denominator of a transfer function is the homogeneous equation. By analyzing the function in the
denominator of a transfer function the general system response can be found. An example of root-locus analysis for a mass-spring-
damper system is given in Figure 15.8. In this example the transfer function is found and the roots of the equation are written with
the quadratic equation. At this point there are three unspecified values that can be manipulated to change the roots. The mass and
damper values are fixed, and the spring value will be varied. The range of values for the spring coefficient should be determined by
practical and design limitations. For example, the spring coefficient should not be zero or negative.
504
x D - = --------------------------------------------
------------ 1 -
F D 2
MD + K d D + K s
Ks Kd
Note: We want
the form below
A
---------------------------------------
-
D+B D+C M
1-
----
x D M
------------- = ----------------------------------------
F D 2 K K Aside:
D + ------d- D + -----s-
M M 2
ax + bx + c = x + A x + B
2
–Kd Kd K
---------- -------- – 4 -----s- 2
M
M
2 M A, B = – b b – 4ac-
--------------------------------------
B, C = --------------------------------------------- 2a
2
M Kd Ks B C
0 0 0 0 0
100 100 100
100 100 1000
100 100 10000
Imaginary
Real
The roots of the equation can then be plotted to provide a root locus diagram. These will show how the values of the roots
change as the design parameter is varied. If any of these roots pass into the right hand plane we will know that the system is unsta-
ble. In addition complex roots will indicate oscillation.
A feedback controller with a variable control function gain is shown in Figure 15.9. The variable gain ‘K’ necessitates the
evaluation of controller stability over the range of operating values. This analysis begins by developing a transfer function for the
overall system. The root of the denominator is then calculated and plotted for a range of ‘K’ values. In this case all of the roots are
on the left side of the plane, so the system is stable and doesn’t oscillate. Keep in mind that gain values near zero put the control
505
system close to the right hand plane. In real terms this will mean that the controller becomes unresponsive, and the system can go
where it pleases. It would be advisable to keep the system gain greater than zero to avoid this region.
Note: This controller has adjustable gain. After this design is built we
must anticipate that all values of K will be used. It is our responsibil-
ity to make sure that none of the possible K values will lead to insta-
bility.
+
1
K ----
D
-
K H D = 1
G D = ----
D
First, we must develop a transfer function for the entire control system.
K
----
G D D K
G S D = ------------------------------------- = --------------------------- = --------------
1+G D H D K D+K
1 + ---- 1
D
Next, we use the characteristic equation of the denominator to find the roots as the value of K
varies. These can then be plotted on a complex plane. Note: the value of gain ‘K’ is normally
found from 0 to +infinity.
D+K = 0 K root
j
0 -0
1 -1
2 -2 KÆ K = 0
3 -3
etc...
Note: This system will always be stable because all of the roots for all values of K are negative real, and
it will always have a damped response. Also, larger values of K, make the system more stable.
Aside: Scilab can be used to draw root locus plots for systems of the form below, where there is a
simple gain, K, multiplying the open loop gain, G(s).
+
1
K ----
D
-
1 H D = 1
G D = ----
D
15.3 Summary
• Root-locus plots show the roots of a transfer function denominator to determine stability
+ + 1
3.0 ---------------------
2
D+1
- -
Kd D
507
Problem 15.2 Draw a root locus plot for the control system below and determine acceptable values of K, including critical
points.
X + 1- + D + 0.1 Y
K 5 + --- ----------------------------------------
D 2
D + 10D + 100
- -
10
------
D
0.01
Problem 15.3 The block diagram below is for a motor position control system. The system has a proportional controller with a
variable gain K.
d Vd + Ve Vs a
2 K 100 1
------------- ----
D+2 D
-
Va
20K
-----o- = ---------------------------------
-
2
d D + D + 20K
a) Draw the root locus diagram and state what values of K are acceptable.
b) Select a gain value for K that has either a damping factor of 0.707 or a natural frequency of 3 rad/sec.
c) Given a gain of K=10 find the steady-state response to an input step of 1 rad.
d) Given a gain of K=0.01 find the response of the system to an input step of 0.1rad.
Problem 15.5 A feedback control system is shown below. The system incorporates a PID controller. The closed loop transfer
function is given.
X + Y
Ki 3
K p + ------ + K d D ------------
-
D D+9
-
4 2
D 3K d + D 3K p + 3K i
Y
---- = ---------------------------------------------------------------------------------------------------
X 2
D 12K d + 1 + D 9 + 12K p + 12K i
Problem 15.6 For the system transfer function below a) Create a root locus plot for various values of Kp from 0.0 to 2.0, if Ki
= 0.1. Indicate the range of gain values where the system is stable and/or oscillates. b) Create a Bode plot for Kp
= 1, and Ki = 1. c) If there is a steady state input of 10sin(10t), what is the steady state output if Ki=1 and Kp=1?
2
r D 10K p + D 20K p + 10K i + 20K i
-- = ----------------------------------------------------------------------------------------------------------------
-
c 3 2
D + D 10K p + 2 + D 20K p + K i + 20K i
Problem 15.7 Develop a root locus plot for various positive values of Kp. Indicate the range of Kp values that would result in a
stable system.
c K- 10 -
--------------- r
--- 2
D D +5
509
+ + 1
3.0 ---------------------
2
D+1
- -
Kd D
+ 3.0
----------------------------------------
2
D + 1 + Kd D
-
3.0
-----------------------------------------------------
-
2
D + D K d + 2 + 4.0
2
2 – Kd – 2 K d + 2 – 4 4.0
D + D K d + 2 + 4.0 = 0 D = ------------------------------------------------------------------------------
2
2
Kd roots – Kd – 2 K d + 4K d – 12
D = --------------------------------------------------------------------
2
0 -1 +/- 1.732j
1 -1.5 +/- 1.323j
2 -2.000, -2.000 Critical points: (this is simple for a quadratic)
5 -0.628, -6.372
The roots becomes positive when
10 -0.343, -11.657
100 -0.039, -102.0 2
0 > – Kd – 2 K d + 4K d – 12
1000 -0.004, -1000
2
2 + Kd > K d + 4K d – 12
16 > 0
0 > – Kd – 2 Kd > –2
–4 16 – 4 – 12 K d = – 6, 2
K d = -----------------------------------------------
2
Gains larger than -2 will result in a stable system. Any gains between -4
and -2 will result in oscillations.
510
Answer 15.2
X + 1- + D + 0.1 Y
K 5 + --- ----------------------------------------
D 2
D + 10D + 100
- -
10
------
D
0.01
X + 2 0.1 Y
5D + 1 + D ------------------------------------------------------------------
K -------------------------------
D 2 10
D + 10D + 100 + 0.1 ------
D
-
0.01
2
X + K 0.5D + 0.1 + 0.1D Y
---------------------------------------------------------
3 2
D + 10D + 100D + 1
-
0.01
X 2 Y
K 0.5D + 0.1 + 0.1D
----------------------------------------------------------------------------------------------------------------------------------------
3 2 2
D + 10D + 100D + 1 + 0.01 K 0.5D + 0.1 + 0.1D
X 2 Y
K 0.5D + 0.1 + 0.1D
-------------------------------------------------------------------------------------------------------------------------------------------------
3 2
D + D 10 + 0.001K + D 100 + 0.005K + 1 + 0.001K
511
Answer 15.3 a)
200K
-----------------------------------------
2
D + 2D + 200K
b)
–2 4 – 4 200K = – 1
roots = ------------------------------------------------ 1 – 200K
2
Im
K roots
0 0,-2
0.001 -0.1,-1.9 K=0.005
0.005 -1,-1
Re
0.1 etc.
1 -2 -1
5
10
c)
2 2 2 \ n = 1 \K = 0.005
D + 2D + 200K = D + 2 nD + n
From the root locus graph this value is critically stable.
512
Answer 15.4 a)
2
D + D + 20K = 0
b)
c)
o 20 10
------ = -----------------------------------------
d 2
D + D + 20 10
·· ·
+ + 200 = 200
o d d d
Homogeneous:
2
A + A + 200 = 0
= A
o t = 1rad
– 0.5t – 0.5t
' o t = – 0.5C 1 e sin 14.1t + C 2 – 14.1C 1 e cos 14.1t + C 2
0 = – 0.5C 1 sin C 2 – 14.1C 1 cos C 2
14.1 cos C 2 = – 0.5 sin C 2
14.1- = tan C
--------- C 2 = – 1.54
– 0.5 2
– 1rad – 1rad
C 1 = -------------------- = -------------------------- = 1.000rad
sin C 2 sin – 1.54
– 0.5t
o t = e sin 14.1t – 1.54 + 1 rad
514
d)
o 20 0.01
------ = ----------------------------------------------
d 2
D + D + 20 0.01
·· ·
+ + 0.2 = 0.2
o d d d
Homogeneous:
2
A + A + 0.2 = 0
= A
o t = 1rad
– 0.724t – 0.276t
' o t = – 0.724 C 1 e – 0.276 C 2 e
C 1 = – 0.381C 2
– 0.724t – 0.276t
o t = 0.616 e
+ – 1.616 e + 1rad
515
Answer 15.5 a)
2 Y
X + Kp D + Ki + Kd D 3
---------------------------------------------- -------------
D D+9
-
X + 2 Y
3K p D + 3K i + 3K d D
--------------------------------------------------------
D D+9
-
X 2 Y
3K p D + 3K i + 3K d D
-----------------------------------------------------------------------------------------------
2
D D + 9 + 12K p D + 12K i + 12K d D
X 2 Y
3K p D + 3K i + 3K d D
---------------------------------------------------------------------------------------------------
2
D 12K d + 1 + D 9 + 12K p + 12K i
516
b)
2
D 12K + 1 + D 9 + 12K + 12K = 0
d p i
2
– 9 – 12K 9 + 12K – 4 12K + 1 12K
p p d i
D = -----------------------------------------------------------------------------------------------------------------------
2 12K d + 1
Kd roots
Stable for, 2
– 9 – 12K p 9 + 12K p – 4 12K d + 1 12K i < 0
2
9 + 12K p – 4 12K d + 1 12K i < 9 + 12K p
2 2
9 + 12K p – 4 12K d + 1 12K i < 9 + 12K p
K d > –-----1-
12
2
9 + 12K p – 48K i
K d > -------------------------------------------------- K d > 0.682
576K d K i
517
c)
K = 1 K = 1 K = 1
p i d
2
3K D + 3K + 3K D
Y p i d
---- = ---------------------------------------------------------------------------------------------------
X 2
D 12K + 1 + D 9 + 12K + 12K
d p i
2 2
Y = 3D + 3D + 3 = ----- 3 D +D+1
---- ------------------------------------------- - ----------------------------------------------------
X 2 13 2
D 13 + D21 + 12 D + D1.615 + 0.923
3
final gain = 20 log ------ = – 12.7
13
3
initial gain = 20 log ------ = – 12.0
12
-12dB
518
2
Y 3K p D + 3K i + 3K d D
---- = ---------------------------------------------------------------------------------------------------
X 2
D 12K d + 1 + D 9 + 12K p + 12K i
12K i
n = ----------------------
- = 2 12K i = 48K d + 4
12K + 1
d
9 + 12K p
2 n = ----------------------- = 20.5 2 24K d = 7 + 12K p
12K + 1
d
At this point there are two equations and two unknowns, one value
must be selected to continue, therefore,
K p = 10
2
64.504D + 129D + 258 = 0
2
– 129 129 – 4 64.5 258- = – 1
D = --------------------------------------------------------------------- 1.73j
2 64.5
f)
2
Y 3 0 D+3 0 +3 1 D
---- = -----------------------------------------------------------------------------------------------------
X 2
D 12 1 + 1 + D 9 + 12 0 + 12 0
2
Y 3D
---- = ----------------------------
X 2
13D + 9D
2 2
Y 13D + 9D = X 3D
·· 13 + Y· 9 = X
Y ·· 3 X = t X· = 1 ·· = 0
X
9- = 0
·· + Y· -----
Y
13
It is a first order system,
9- t
– -----
13
Y t = C1 e + C2
0 = C1 1 + C2 C1 = –C2
9- t
– -----
9 13
Y' t = – ------ C e
13 1
9 C1 = 0
0 = – ------ C 1
13 1
C2 = 0 no response
520
Answer 15.6 a)
2
r D 10K p + D 20K p + 10K i + 20K i K Roots
-- = ----------------------------------------------------------------------------------------------------------------
- p
c 3 2
D + D 10K p + 2 + D 20K p + K i + 20K i
b)
2
r D 10K p + D 20K p + 10K i + 20K i
-- = -----------------------------------------------------------------------------------------------------------------
c 3 2
D + D 10K p + 2 + D 20K p + K i + 20K i
2
-r- = ----------------------------------------------------------------------
D 10 + D 30 + 20 -
c 3 2
D + D 12 + D 21 + 20
D = poly(0, 'D');
G = syslin('c', (10*D^2 + 30*D + 20) / (D^3 + 12*D^2 + 21*D + 20));
bode(G, 0.01, 1000);
c)
2
r D 10 + D 30 + 20
-- = -----------------------------------------------------------------------
c 3 2
D + D 12 + D 21 + 20
w = 10;
j = sqrt(-1);
D = j * w;
G = (10*D^2 + 30*D + 20) / (D^3 + 12*D^2 + 21*D + 20);
c = 10
r = c * G;
[mag, ang] = polar(r);
printf("output r = %f sin ( 10 t + %f )\n", mag, ang);
Answer 15.7
10K
--------------------------
2
D D +5
-r- = ----------------------------------- = ------------------------------------------
10K 10K
= --------------------------------------------------------
c 10K 2 3
1 + -------------------------- D D + 5 + 10K D 1 + D 5 + 10K
2
D D +5
3 Ki Roots
D 1 + D 5 + 10K = 0
0 0, +/- 2.236j
0.01 -0.0200, 0.0100 +/- 2.24j
0.1 -0.198, 0.099 +/- 2.24j
1 -1.423, 0.712 +/- 2.55j
10 -4.28, 2.141 +/- 4.33j
100 -9.833, 4.917 +/- 8.804j
10000 -46.38, 23.19 +/- 40.23j
There is no gain where the roots all have a negative real component, therefore this system
will always be unstable.
523
1 – 4K-
roots = –------------------------------------------------
3 9 – 4 2 + K - = – 1.5 -------------------
2 2
j
Next, find values for the roots and plot the values,
K roots
0
1
2
3
Problem 15.9 Draw a Root Locus plot for the transfer function.
K D+5
G D H D = ----------------------------------------
2
D D + 4D + 8
Problem 15.10 The systems below have a variable spring coefficient. For each of the systems below,
524
Ks1
M = 1 kg
M = 1kg
y
F y
F
Ks
b) If the input force is a step function of magnitude 1N, calculate the time response for ‘y’ by solving a differen-
tial equation for a Ks value of 10N/m.
c) Draw the poles for the transfer function on a real-complex plane.
d) Draw a Bode plot for Ks = 1N/m.
Problem 15.11 Draw a root locus diagram for the feedback system below given the variable parameter ‘P’.
Vd + e Vs 100 1
P ------------------- ----
D + 100 D
- Va
2
Problem 15.12 For the transfer functions below, draw the root locus plots assuming there is unity feedback, i.e., H(D) = 1. Draw
an approximate time response for each for a step input.
1 - 1 1 - 1
G s = ------------ ---------------- -------------------- ------------------------------
D+1 2 2 2
D +1 D+1 D + 2D + 2
Problem 15.13 Draw a root-locus plot for the following feedback control systems.
C + R
1
K ---------------------
2
D+1
-
2
-------
2
D
525
C + 1 -
R
K --------------------
2
D+1
-
2
2D
C + 2
R
K D+1
-
2
-------
2
D
Problem 15.14 The feedback loop below is for controlling a DC motor with a PID controller.
Vd + e 2 Vs 100 -
------------------
1-
---
D + PD + 1- D + 100 D
------------------------------
D
-
Va
2
Answer 15.14 a)
2
D 100 + D 100P + 100
------ = ------------------------------------------------------------------------------------
Vd 3 2
D + D 300 + D 200P + 200
b)
c)
526
527
16.1 Introduction
A system with a feedback controller will attempt to drive the system to a state described by the desired input, such as a
velocity. In earlier chapters we simply chose step inputs, ramp inputs and other simple inputs to determine the system response. In
practical applications this setpoint needs to be generated automatically. A simple motion control system is used to generate set-
points over time.
An example of a motion control system is shown in Figure 16.1. The motion controller will accept commands or other
inputs to generate a motion profile using parameters such as distance to move, maximum acceleration and maximum velocity. The
motion profile is then used to generate a set of setpoints, and times they should be output. The setpoint scheduler will then use a
real-time clock to output these setpoints to the motor drive.
motion controller
motion Motor
commands Setpoint Setpoint Servo
Generator Scheduler Drive
setpoint schedule
0 0.0
0.4 0.1 0.2
0.2 0.4
t 0.3 0.4
0.4 0.4
0 0.2 0.6 0.8 ..... ....
The combination of a motion controller, drive and actuator is called an axis. When there is more than one drive and actua-
tor the system is said to have multiple axes. Complex motion control systems such as computer controlled milling machines (CNC)
and robots have 3 to 6 axes which must be moved in coordination.
528
Velocity Profiles
A simple example of a velocity profile for a point-to-point motion is shown in Figure 16.2. In this example the motion
starts at 20 deg and ends at 100 deg. (Note: in motion controllers it is more common to used encoder pulses, instead of degrees, for
positions velocities, etc.) For position control we want a motion that has a velocity of zero at the start and end of the motion, and
accelerates and decelerates smoothly.
deg
100
20
t (s)
A trapezoidal velocity profile is shown in Figure 16.3. The area under the curve is the total distance moved. The slope of
the initial and final ramp are the maximum acceleration and deceleration. The top level of the trapezoid is the maximum velocity.
Some controllers allow the user to use the acceleration and deceleration times instead of the maximum acceleration and decelera-
tion. This profile gives a continuous acceleration, but there will be a jerk (third order derivative) at the four sharp corners.
deg
max
– max
max
t (s)
0
where,
max = the maximum velocity
The basic relationships for these variables are shown in Figure 16.4. The equations can be used to find the acceleration
and deceleration times. These equations can also be used to find the time at the maximum velocity. If this time is negative it indi-
cates that the axis will not reach the maximum velocity, and the acceleration and deceleration times must be decreased. The result-
529
t t
1 1 acc dec eqn 16.3
= --- t +t + --- t = ---------- + t + ----------
2 acc max max max 2 dec max max 2 max 2
t acc t dec
t max = --------------- – ------------- – ------------- eqn 16.4
2 2
max
Note: if the time calculated in equation 4 is negative then the axis never reaches maximum veloc-
ity, and the velocity profile becomes a triangle.
For the example in Figure 16.5 the move starts at 100deg and ends at 20 deg. The acceleration and decelerations are com-
pleted in half a second. The system moves for 7.5 seconds at the maximum velocity.
deg- deg-
max = 10 -------- max = 20 --------
2
s s
10 deg---------
max s = 0.5s
t acc = t dec = --------------- = ---------------
max deg
20 ---------
2
s
=
end – start = 20deg – 100deg = – 80deg
t acc t dec
80deg – 0.5s
t max = --------------- – ------------- – ------------- = --------------- ---------- – 0.5s
---------- = 7.5s
2 2 deg 2 2
max 10 ---------
s
t total = t acc + t max + t dec = 0.5s + 7.5s + 0.5s = 8.5s
The motion example in Figure 16.6 is so short the axis never reaches the maximum velocity. This is made obvious by the
negative time at maximum velocity. In place of this the acceleration and deceleration times can be calculated by using the basic
acceleration position relationship. The result in this example is a motion that accelerates for 0.316s and then decelerates for the
same time.
530
deg- = 20 deg
---------
max = 10 --------
s
max
s
2
2
--- = 1--- max t acc
2 2
2deg = 2
t acc = -------------- = --------------- 0.1s = 0.316s
max 20 deg---------
2
s
t max = 0s
Given the parameters calculated for the motion, the setpoints for motion can be calculated with the equations in Figure
16.7.
1 2 1 2
t = --- max t acc + max t max + --- max t – t max – t acc + start
2 2
t = end
A subroutine that implements these is shown in Figure 16.8. In this subroutine the time is looped with fixed time steps.
531
The position setpoint values are put into the setpoint array, which will then be used elsewhere to guide the mechanism.
void generate_setpoint_table(
double t_acc, double t_max, double t_step,
double vel_max, double acc_max,
double theta_start, double theta_end,
double setpoint[], int *count){
double t, t_1, t_2, t_total;
t_1 = t_acc;
t_2 = t_acc + t_max;
t_total = t_acc + t_max + t_acc;
*count = 0;
for(t = 0.0; t <= t_total; t += t_step){
if( t < t_1){
setpoint[*count] = 0.5*acc_max*t*t + theta_start;
} else if ( (t >= t_1) && (t < t_2)){
setpoint[*count] = 0.5*acc_max*t_acc*t_acc
+ vel_max*(t - t_1) + theta_start;
} else if ( (t >= t_2) && (t < t_total)){
setpoint[*count] = 0.5*acc_max*t_acc*t_acc
+ vel_max*(t_max)
+ 0.5*acc_max*(t-t_2)*(t-t_2) + theta_start;
} else {
setpoint[*count] = theta_end;
}
*count++;
}
setpoint[*count] = theta_end;
*count++;
}
In some cases the jerk should be minimized. This can be achieved by replacing the acceleration ramps with a smooth
polynomial, as shown in Figure 16.9. In this case two quadratic polynomials will be used for the acceleration, and another two for
the deceleration.
deg 2
t = At + Bt + C
max
max – max
t (s)
0
An example of calculating the polynomial coefficients is given in Figure 16.10. The curve found is for the first half of the
532
acceleration. It can then be used for the three other required curves.
0 = 2A0 + B \B = 0
2 max-
max = At acc A = --------------
2
t acc
max-
max = 2At acc A = -------------
2t acc
max- = -------------
max- 2 max
A = -------------- t acc = -----------------
-
2 2t acc max
t acc
2
max max max-
A = -------------- = --------------------------- = -----------------
2t acc 2 max 4
max
2 ------------------
max
The equation for the first segment is,
2
max- t 2 t acc
t = ----------------- 0 £ t < ----------
4 2
max
The equation for the second segment can be found using the first segment,
2
max 2
t =
max – 4------------------ t acc – t
max
2 t acc
max- t 2 – 2t 2 ---------- £ t < t acc
t = 2
max – -----------------
4 acc t + t acc
max
The distance covered during acceleration, the area under the curves, is,
t acc
---------- 2 t acc 2
2 max 2 max- t 2 – 2t 2
acc = ------------------ t dt +
4 t max – -----------------
4 acc t + t acc dt
0 max t acc acc max
----------
---------- 2 t acc
2
2 2 3
= max - t 3
-------------------- + t – max- t---- – t
-----------------
2 2
t + t acc t
acc 12 max max 4 max 3 acc
0 t acc
----------
2 3 2 3 2
t
max - ---------- acc + t
max- ----------acc – t 3 3
acc = --------------------
12 max 8 max t acc – -----------------
4 max 3 acc + t acc
2 3 3 3
t acc
max- t acc t acc t acc
– max ---------- + ----------------- ---------- – ---------- + ----------
2 4 max 24 4 2
2 2 2
3 t acc 3 7 max 3
max max max
acc = --------------------
96 max acc
-t + -------------------------- – --------------------- t acc + --------------------- t acc
2 12 max 96 max
= max t acc-
-------------------------
acc 2
Controllers use a variety of motion profiles. The trapezoidal and quadratic equations presented previously can be used in
simpler systems. Other motion profiles are possible for some or all of the curves, as shown in Figure 16.12.
Type Equation
t – t0
Trapezoidal X t = X 1 – X 0 --------------- + X 0
t1 – t0
2
Quadratic X t = A t – t0 + B t – t0 + C
t – t0
Sinusoidal X t = X 1 – X 0 sin --------------- --- + X
t1 – t0 2 0
1
Sigmoid X t = X 1 – X 0 -----------------------------------------------
t – t0
– --------------- – 3
t1 – t0
1+e
Position Profiles
A motion can be described using position points along a path. These methods are normally used when a controller does
not have any velocity or acceleration limits. The method shown in Figure 16.13 controls motion using a parametric function ‘p(u)’.
The function value varies from 0 to 1 as the parameter ‘u’ varies from 0 to 1. However, the parameters of the function are selected
so that the motion starts and stops with a velocity of zero. In this case the final polynomial equation, (3), is fairly simple. This equa-
tion can then be used in equation (1) to generate a smooth motion path between any arbitrary start and end point, with arbitrary start
and end times.
t–t
start -
------------------------------ eqn 16.5
t = start + end – start p t
end t start–
where,
, = start and end positions of motion
start end
t start, t end = start and end times for the motion
3 2
p u = Au + Bu + Cu + D eqn 16.6
p 0 = 0 p 1 = 1
d- p 0 = 0 d- p 1 = 0
----
----
dt dt
3 2 \D = 0
0 = A0 + B0 + C0 + D
2 \C = 0
0 = 3A0 + 2B0 + C
2 3
\B = – --- A
0 = 3A1 + 2B1 2
3 2
1 = A1 + B1 + 0 0 + 0 \A = – 2
\B = 3
3 2 eqn 16.7
p u = – 2 u + 3u
The example in Figure 16.14 shows the use of a trigonometric function, instead of a polynomial. This function was used
to generate the points in the following sample program in Figure 16.15.
535
where,
p u = A sin Bt + C + D
d- p 1 = AB cos B 1 + C = 0
----
dt
\ cos B + C = 0
\B =
\B + C = ---
2
p 0 = A sin B 0 – --- + D = 0 \A = D
2
p 1 = A sin 1 – --- + D = 1
2
\A = 1
---
\A 1 + A = 1 2
The program in Figure 16.15 generates a motion table that can then be used to update setpoints. The function ‘table_init()’
must be called once when the program starts to set up global time and table values. When a new target position has been specified
the ‘table_generate()’ function is called to generate the setpoint table. The ‘table_update()’ function is called once every interrupt
scan to check the setpoint table, and update the global setpoint variable, ‘point_current’ at scheduled times. This function also
includes a simple clock to keep track of the system time.
536
#define TABLE_SIZE 11
int point_master[TABLE_SIZE] = {0, 24, 95, 206, 345, 500, 655, 794, 905, 976, 1000};
int point_position[TABLE_SIZE];
int point_time[TABLE_SIZE];
int point_start_time;
int point_index;
Slew Motion
When the individual axis of a machine are not coordinated this is known as slew motion. Each of the axes will start mov-
ing at the same time, but finish at separate times. Consider the example in Figure 16.16. A three axis motion is required from the
starting angles of (40, 80, -40)deg, and must end at (120, 0, 0)deg. The maximum absolute accelerations and decelerations are (50,
537
100, 150) degrees/sec/sec, and the maximum velocities are (20, 40, 50) degrees/sec.
Joint angle (degrees)
180
90
time(sec)
3
-90 2
1
– max
max
The calculations for the motion parameters are shown in Figure 16.17. These are done in vector format for simplicity. All
of the joints reach the maximum acceleration. The fastest motion is complete in 1.13s, while the longest motion takes 4.4s.
The area under the velocity curve is the distance (angle in this case) travelled. First we can determine
the distance covered during acceleration, and deceleration and the time during acceleration, and deceler-
ation.
max- = 20
t acc = t dec = -------------- 40-, --------
------, -------- 50- = 0.4, 0.4, 0.333 sec.
max 50 100 150
t acc [Link].
acc. = dec. = ---------------------------------- = 0.4 20 -, 0.4
----------------- 40 -, 0.333
----------------- 50 - = 4, 8, 8.33 deg.
-----------------------
2 2 2 2
The next step is to examine the moves specified,
Remove the angles covered during accel./deccel., and find the travel time at maximum
velocity.
move – 2 acc- = ----------------------
t max = --------------------------------------- 80 – 2 4 -, ----------------------
80 – 2 8 -, --------------------------------
40 – 2 8.333 -
20 40 50
max
Interpolated Motion
538
In interpolated motion the faster joints are slowed so that they finish in coordination with the slowest. This is essential in
devices such as CNC milling machines. If this did not occur a straight line cut in the x-y plane would actually be two straight lines.
The slew motion example can be extended to be slew motion where all joints finish their motion at 4.4s. This can be done by accel-
erating at the maximum acceleration, but setting a new maximum velocity. This is shown in the example in Figure 16.18 using the
results from the example in Figure 16.17.
The longest motion time is 4.4s for joint 1, and this can be used to prolong the other motions. The calcula-
tion begins by rewriting the velocity/position relationship using a new maximum velocity.
2 2
t total max t total max – 4 max
max ' = ----------------------------------------------------------------------------------------------
-
2
max'
t acc' = t acc' = ---------------
max
A new maximum velocity can be calculated for joint 2 using this equation.
2 2
4.4 100 4.4 100 – 4 80 100
max' =
--------------------------------------------------------------------------------------------------
-
2
440 401.99502
---------------------------------------- = 421 19.0
max' = 2
19.0
t acc' = t acc' = ---------- = 0.19s
100
A new maximum velocity can be calculated for joint 3 using this equation.
2 2
4.4 150 4.4 150 – 4 40 150
max' =
--------------------------------------------------------------------------------------------------
-
2
Motion Scheduling
After the setpoint schedule has been developed, it is executed by the setpoint scheduler. The setpoint scheduler will use a
clock to determine when an output setpoint should be updated. A diagram of a scheduler is shown in Figure 16.19. In this system
the setpoint scheduler is an interrupt driven subroutine that compares the system clock to the total motion time. When enough time
has elapsed the routine will move to the next value in the setpoint table. The frequency of the interrupt clock should be smaller than
539
or equal to the time steps used to calculate the setpoints. The servo drive is implemented with an algorithm such a PID control.
Compute
desired error
Interrupt
Clock
Output actuator
signal
Return
The output from the scheduler updates every time step. This then leads to a situation where the axis is always chasing the
target value. This leads to small errors, as shown in Figure 16.20.
speed
actual position
trajectory table
time
trajectory table time step
position
required
actual
time
A simple approach to path planning for CNC machining is to break a surface into regularly spaced points. The surface
patch in Figure 16.22 would normally be modelled by splines. Locations on the surface patch are specified with the ‘u’ and ‘v’
parameters. For example u=0.5 and v=0.5 should be near the geometric center of the surface. A set of equations are used to convert
the ‘u’ and ‘v’ values to a ‘[x, y, z]’ coordinates. The dashed line path on the surface can be calculated by keeping u=0.5, and then
varying v from 0.0 to 1.0.
(u=0,v=1) (u=1,v=1)
xp
p u v = yp
zp
(u=0,v=0) (u=1,v=0)
The sample subroutine in Figure 16.23 can convert a four sided surface patch into a series of path segments. A function
‘p(u, v)’ is used to calculate surface points. This subroutine will break the surface into 10 passes with ten steps in each, for a total
of 100 straight line cuts. The coordinates are printed with the format of CNC G-codes including ‘G00’ and ‘G01’.
16.3 Kinematics
[[This section is still in point form. The core topics are present and correct, it will be expanded with text later.]]
A robot must be able to map between things that it can control, such as joint angles, to the position of the tool in space.
Describing the position of the robot in terms of joint positions/angles is Joint Space.
Real space is often described with a number of coordinate systems,
Cartesian
polar
spherical
Positions can also be specified with respect to the robot base (Robot Coordinates), or globally (World Coordinates).
Robot Positions
link/joint coordinates
tool coordinates
base coordinates
• Robot base coordinates don’t move and are often used to specify robot tool position and orientation. (center of
the robots world)
• Link/Joint Coordinates - specify where joints, endpoints or centers are located.
• Tool coordinates - determine where the tool is and what orientation it is in.
• World Coordinates - relates various robots to other robots and devices.
542
• Coordinate transformation - Can map from one set of coordinates to another. Most common method is matrix
based. One special case of this is the Denavit-Hartenrberg transformation.
0.2m
1m
TCP
theta2 (xT, yT)
(x1,y1)
1m Note: When defining angles it is more convenient
to indicate the positive direction and origin (as
shown with the solid line for ‘theta 2’). With more
classical sketching we would use the dashed line,
theta1 but this leads to confusion with variable robotic
(xb, yb) geometries.
• Forward kinematics involves finding the endpoint of the robot (xT, yT) given the joint coordinates (theta1, the-
ta2)
• There a number of simple methods for finding these transformations,
• basic geometry
• transformation matrices
• Denavit-Hartenberg transformations
1, 2,
¨ x ,y ,z ,
T T T T x, T y, T z
Also note that the orientation of the tool is included, as well as position, therefore for
the example,
Tx = 0
Ty = 0
=
Tz 1+ 2
• The problem with geometrical methods are that they become difficult to manage when more complex robots are
considered. This problem is overcome with systematic methods.
Inverse kinematics maps from the tool coordinates to the joint coordinates.
1 2 xT yT zT Tx Ty Tz
• Mathematically this calculation is difficult, and there are often multiple solutions.
• If modeling only one link in motion, the model of the robot can treat all the links as a single moving rigid body,
CG M J
• If multiple joints move at the same time, the model becomes non-linear, in this case there are two approaches
taken,
1. Develop a full non-linear controller (can be very complicated).
2. Develop linear approximations of the model/control system in the middle of the normal workspace.
Straight-line motion
• In this method the tool of the robot travels in a straight line between the start and stop points. This can be diffi-
cult, and lead to rather erratic motions when the boundaries of the workspace are approached.
• NOTE: straight-line paths are the only paths that will try to move the tool straight through space, all others will
move the tool in a curved path.
1. Develop a set of points from the start and stop points that minimize acceleration.
2. Do the inverse kinematics to find the joint angles of the robot at the specified points.
• Consider the example below,
Given,
P = 5, 5, 5 in. P = – 5, – 5, 5
0 1
t0 = 0 t1 = 2
d d
----- P 0 = 0, 0, 0 ----- P 1 = 0, 0, 0
dt dt
Model the path with a function that allows acceleration/deceleration, in this case a third order polyno-
mial will be used. The equation will be parameterized for simplicity (i.e., s = [0,1], where s=0 is the
path start, and s=1 is the path end).
P t = P0 + P1 – P0 s t
d d- s t = 0
s t0 = 0 s t1 = 1 ----- s t 0 = 0 ----
dt dt 1
3 2 d 2
s t = At + Bt + Ct + D ----- s t = 3At + 2Bt + C
dt
Next, numerical values will be entered to find equation values
3 2
s 0 = A 0 +B 0 +C 0 +D = 0 D = 0
3 2
s 2 = A 2 +B 2 +C 2 +D = 1 \8A + 4B = 1
d
----- s 0 = 3A 0 + 2B 0 + C = 0 C = 0
dt
d 3
----- s 2 = 3A 2 + 2B 2 + C = 0 \ – --- A = B
dt 2
3 3
8A + 4 – --- A = 1 A = 1
--- B = – ---
2 2 4
3
t 32
P t = P 0 + P 1 – P 0 ---- – --- t
2 4
earlier section
t – t start
t = start +
----------------------------
end – start p t
-
end – t start
3 2
p u = – 2 u + 3u
t – t start
t = · ----------------------------
-
end – start p t
end – t start
2
p· u = – 6 u + 6u
Figure 16.29 Motion position control equation
• the controller that uses the desired position and velocity is shown in figure xxxx
real-time control loop
d
2
JRD +K-
------------------------
K physical system
+
d + K a
P -------------------------
2
+ JRD + K
-
1 K enc
-------------
K enc
16.6 Summary
• Axis limits can be used to calculate motion profiles.
• Trapezoidal and smooth motion profiles were presented.
• Motion profiles can be used to generate setpoint tables.
• Values from the setpoints can then be output by a scheduler to drive an axis.
Indicate the positions at 1 second intervals over the duration of the motion.
m
v ----
s
m
2 ----
s
t (s)
0
0 1s t max 2s
Problem 16.2 a) Develop a motion profile for a joint that moves from -100 degrees to 100 degrees with a maximum velocity of
20 deg/s and a maximum acceleration of 100deg/s/s. b) Develop a setpoint table that has values for positions
every 0.5 seconds for the entire motion.
Problem 16.3 Consider a basic servo controller with encoder feedback. The motor will start at a position count of 100, and end
the motion at a count of 3000. The motion is to have a maximum acceleration of 300 counts/s/s, and a maximum
velocity of 100 counts/s. Find a motion profile that satisfies these constraints. Generate a table of setpoints for
the desired position every 2 seconds.
Problem 16.4 Find a smooth path for a robot joint that will turn from = 75° to = -35° in 10 seconds. Do this by developing
an equation then calculating points every 1.0 seconds along the path for a total motion time of 10 seconds.
Problem 16.5 We are designing motion algorithms for a 2 degree of freedom robot. To do this we are developing sample calcu-
lations to explore the basic process.
a) We want to move the tool in a straight line through space from (3”, 5”) to (8”, 7”). Develop equations that will
give a motion that starts and stops smoothly. The motion should be complete in 1 second.
b) Find the velocity of the tool at t=0.5 seconds.
c) Plot out the tool position, joint positions and velocities as functions of time.
548
m
v ----
s
m
2 ----
s
t (s)
0
0 1s t max 2s
Answer 16.2
Given,
deg deg
= 20 --------- = 100 --------- = 100 – – 100 = 200
max s max 2
s t (s) angle
The motion times can be calculated. (deg)
deg 0.0 -100
20 ---------
max s 0.5 -92
t acc = t dec = --------------- = ------------------ = 0.2s
deg 1.0 -82
max 100 ---------
2 1.5 -72
s 2.0 -62
2.5 -52
– max t acc 200deg – 20 deg --------- 0.2s 3.0 -42
s
t max = --------------------------------------- = --------------------------------------------------- = 9.8s 3.5 -32
max deg
20 --------- 4.0 -22
s
4.5 -12
t total = t acc + t max + t dec = 0.2s + 9.8s + 0.2s = 10.2s 5.0 -2
5.5 8
6.0 18
1 deg 2 deg
0.5s = --
- 100 --------- 0.2s + 20 --------
- 0.5s – 0.2s – 100deg 6.5 28
2 2 s
s 7.0 38
7.5 48
0.5s = – 92deg 8.0 58
8.5 68
deg 9.0 78
1.0s = 0.5s + 20 -------- s
- 0.5s = – 92deg + 10deg
9.5 88
10.0 98
10.5 100
11.0 100
Answer 16.3
t counts
(s)
0 100
2 283
4 483
6 683
8 883
10 1083
12 1283
14 1483
16 1683
18 1883
20 2083
22 2283
24 2483
26 2683
28 2883
30 3000
550
Answer 16.4
3 2
t = At + Bt + Ct + D 0 = 75 10 = – 35
d 2 d d
----- t = 3At + 2Bt + C ----- 0 = 0 ----- 10 = 0
dt dt dt
Solving
3 2 t (sec) theta(t)
75 = A 0 +B 0 +C 0 +D
3 2 0 75
– 35 = A 10 + B 10 + C 10 + D 1 71.92
2 63.56
2 3 51.24
0 = 3A 0 + 2B 0 + C
4 36.28
2 5 20
0 = 3A 10 + 2B 10 + C
6 3.72
For A, B, C, D we get 7 -11.24
8 -23.56
3 2 9 -31.92
t = 0.22 t + – 3.3 t + 75 10 -35
Answer 16.5 a)
3 2
P t = 3 + – 2t + 3t 5
5 2
b)
d
----- P t = 7.5
dt 3
Problem 16.7 Find a smooth path for a robot joint that will turn from = 75° to = -35° in 10 seconds. Do this by developing
an equation then calculating points every 1.0 seconds along the path for a total motion time of 10 seconds. Do not
assume a maximum velocity.
Problem 16.8 Paths are to be planned for a three axis motion controller. Each of the joints has a maximum velocity of 20 deg/s,
and a maximum acceleration of 30 deg/s/s. Assuming all of the joints start at an angle of 0 degrees. Joints 1, 2
and 3 move to 40 deg, 100deg and -50deg respectively. Develop the motion profiles assuming,
a) slew motion
b) interpolated motion
Problem 16.9 Develop a smooth velocity profile for moving a cutting tool that starts at 1000 inches and moves to -1000 inches.
The maximum velocity is 100 in/s and the maximum acceleration is 50in/s/s.
Problem 16.10 An axis has a maximum velocity of 2.0 rad/s and a maximum acceleration/deceleration of 0.5 rad/s^2. Sketch a
trapezoidal motion profile and find the motion time for a -4.0 rad motion.
Problem 16.11 An axis has a maximum velocity of 5m/s and an acceleration/deceleration time of 1s. Sketch a trapezoidal
551
motion profile and find the motion time for a 25m motion.
Problem 16.12 Develop a smooth velocity profile for moving a cutting tool that starts at 1000 inches and moves to -1000 inches.
The maximum velocity is 100 in/s and the maximum acceleration is 50in/s/s.
a) A stepping motor is to be used to actuate one joint of a robot arm in a light duty pick and place application.
The step angle of the motor is 10 degrees. For each pulse received from the pulse train source the motor rotates
through a distance of one step angle.
i) What is the resolution of the stepper motor?
ii) Relate this value to the definitions of control resolution, spatial resolution, and accuracy, as discussed in class.
b) Solve part a) under the condition that the three joints move at different rotational velocities. The first joint
moves at 10 degrees/sec., the second joint moves at 25 degrees/sec, and the third joint moves at 30°/sec.
Problem 16.13 A stepping motor is to be used to drive each of the three linear axes of a Cartesian coordinate robot. The motor
output shaft will be connected to a screw thread with a screw pitch of 0.125”. It is desired that the control resolu-
tion of each of the axes be 0.025”
a) to achieve this control resolution how many step angles are required on the stepper motor?
b) What is the corresponding step angle?
c) Determine the pulse rate that will be required to drive a given joint at a velocity of 3.0”/sec.
Problem 16.14 For the stepper motor of question 6, a pulse train is to be generated by the robot controller.
a) How many pulses are required to rotate the motor through three complete revolutions?
b) If it is desired to rotate the motor at a speed of 25 rev/min, what pulse rate must be generated by the robot con-
troller?
Problem 16.15 A stepping motor is to be used to actuate one joint of a robot arm in a light duty pick and place application. The
step angle of the motor is 10 degrees. For each pulse received from the pulse train source the motor rotates
through a distance of one step angle.
a) What is the resolution of the stepper motor?
b) Relate this value to the definitions of control resolution, spatial resolution, and accuracy, as discussed in class.
Problem 16.16 Find the forward kinematics for the robots below using geometry methods.
y y y
x x x
y y
x x
552
Problem 16.17 Consider the forward kinematic transformation of the two link manipulator below.
Pw(x, y)
L1 = 12” y
x
theta1 = 30 deg.
a) Given the position of the joints, and the lengths of the links, determine the location of the tool centre point
using basic geometry.
b) Determine the inverse kinematics for the robot. (i.e., given the position of the tool, determine the joint angles
of the robot.) Keep in mind that in this case the solution will have two different cases.
c) Determine two different sets of joint angles required to position the TCP at x=5”, y=6”.
d) What mathematical conditions would indicate the robot position is unreachable? Are there any other cases that
are indeterminate?
Problem 16.18 A jointed arm robot has three rotary joints, and is required to move all three axes so that the first joint is rotated
through 50 degrees; the second joint is rotated through 90 degrees, and the third joint is rotated through 25
degrees. Maximum speed of any of these rotational joints is 10 degrees/sec. Ignore effects of acceleration and
deceleration and,
a) determine the time required to move each joint if slew motion (joint motion is independent of all other joints)
is used.
b) determine the time required to move the arm to a desired position and the rotational velocity of each joint, if
joint interpolated motion (all joints start and stop simultaneously) is used.
c) Solve question 4 under the condition that the three joints move at different rotational velocities. The first joint
moves at 10 degrees/sec., the second joint moves at 25 degrees/sec, and the third joint moves at 30°/sec.
Problem 16.21 We are designing motion algorithms for a 2 degree of freedom robot. To do this we are developing sample calcu-
lations to explore the basic process. We want to move the tool in a straight line through space from (8”, 7”) to
(3”, 5”). Develop equations that will give a motion that starts and stops smoothly. The motion should be com-
plete in 2 seconds. Show all derivations.
553
s = +j
The basic definition of the Laplace transform is shown in Figure 17.2. The normal convention is to show the function of
time with a lower case letter, while the same function in the s-domain is shown in upper case. Another useful observation is that the
transform starts at t=0s. Examples of the application of the transform are shown in Figure 17.3 for a step function and in Figure
17.4 for a first order derivative.
– st
F s = f t e dt
0-
where,
f t = the function in terms of time t
F s = the function in terms of the Laplace s
Note: To avoid confusion, functions of time are often shown in lower case, while functions of ‘s’ are
often shown as upper case. Sometimes ‘(t)’ or ‘(s)’ will be shown for clarity, and sometimes omitted
for brevity.
Note: The Laplace transform always starts at 0 and goes to infinity. Please note that in the definition
the limit of ‘0-’ is used. It is also possible to use ‘0+’, but results in another set of transforms that are
somewhat less clear. All of the transforms used in this book assume ‘0+’.
Ref: Lundberg, K.H., Miller, H.R., Trumper, D.L., “Initial Conditions, Generalized Functions, and the
Laplace Transform”, IEEE Control Systems Magazine, February, 2007, Vol. 27, No. 1, pg. 22-35.
For f(t) = 5,
– s0
– st – st 5 – st 5 –s 5e 5
F s = f t e dt = 5e dt = – --- e = – --- e – – -------------- = ---
0- 0 s s s s
0
d – st
G s = L g t = L ----- f t = (d/dt)f t e dt
dt 0
we can use integration by parts to go backwards,
b b b
u dv = uv – v du
a a a
– st
(d/dt)f t e dt
0
therefore,
– st
du = df t v = e
– st
u = f t dv = – se dt
– st – st – st
f t –s e dt = f t e – (d/dt)f t e dt
0 0 0
– st – s – 0s – st
(d/dt)f t e dt = f t e –f t e +s f t e dt
0 0
d
L ----- f t = – f 0 + sL f t
dt
The previous proofs were presented to establish the theoretical basis for this method, however tables of values will be pre-
sented in a later section for the most popular transforms.
Laplace transform tables are shown in Figure 17.5, Figure 17.6 and Figure 17.7. These are commonly used when analyz-
ing systems with Laplace transforms. The transforms shown in Figure 17.5 are general properties normally used for manipulating
555
Note: The following tables all assume that the system is at rest before t=0, unless initial conditions are specified. Addi-
tionally, each of the time domain functions implicitly includes a unit step function, u(t), to turn the function on at t=0. For
example if the input function is 5sin(10t), it should practically be interpreted as 5sin(10t)u(t). Please note that the s-
domain (frequency domain) functions are written to address this assumption.
f t F s
Kf t KL f t
f1 t + f2 t –f3 t + F1 s + F2 s –F3 s +
df t –
----------- sL f t –f 0
dt
2 –
d f t 2 – df 0
-------------- s L f t – sf 0 – -------------------
2 dt
dt
n – n–1 –
d f t n n–1 – n – 2 df 0 d f 0
-------------- s L f t –s f 0 –s ------------------- – – ------------------------------
n dt n–1
dt dt
t
f t dt L f t -
----------------
0- s
– as
f t–a u t–a a 0 e L f t
– at
e f t F s+a
f at a 0 1 s
--- F ---
a a
– dF s
tf t -----------------
ds
n
n nd F s
t f t – 1 -----------------
n
ds
f t-
------- F u du
t
s
The Laplace transform tables shown in Figure 17.6 and Figure 17.7 are normally used for converting to/from the time/s-
556
domain.
t unit impulse 1
step A
A ----
s
ramp 1
t -----
2
s
2 2
t -----
3
s
n n!
t ,n>0 --------------
n+1
s
– at exponential decay 1
e -----------
s+a
sin t -------------------
2 2
s +
cos t s -
------------------
2 2
s +
– at 1
te -------------------
2
s+a
2 – at 2! -
t e ------------------
3
s+a
– at
e sin t --------------------------------
2 2
s+a +
– at s+a
--------------------------------
e cos t
2 2
s+a +
– at
e sin t --------------------------------
2 2
s+a +
– t
2Ae cos t+ A A –
----------------------- + ------------------------
s+ – j s+ + j
– t
2t A e cos t+ A A –
------------------------------- + --------------------------------
2 2
s+ – j s+ + j
– at – bt
c–a e – c–b e s+c
------------------------------------------------------------ --------------------------------
-
b–a s+a s+b
– at – bt
e –e - 1
------------------------- --------------------------------
-
b–a s+a s+b
As + B 2
-----------------------------------------
– t 2 2 d = n 1–
Ce cos dt + s + 2 ns + n
= n
A –B
= atan -----------------
A d
2 A –B 2
C = A + -----------------
d
Proof:
As + B F G
----------------------------------------- = ----------------------------------- + --------------------------- 2
2
s + 2 ns + n
2 s + + – d j s + + dj d = n 1–
= n
F s + + dj + G s + + – d j
= --------------------------------------------------------------------------------------------------------------------------------------
2
s + s + – d j + + dj + + – d j + dj
s F + G + F + dj + G + – d j
= --------------------------------------------------------------------------------------------------------
2 2 2
s +s 2 + + d
A = F+G G = A–F
B = F + dj + G + – d j
B – F + dj
G = ------------------------------------- = A – F
+ – d j
B–F + dj = A + – d j – F + – d j
B–A + – d j B – A + jA d A A –B
F = --------------------------------------------- = – j ------------------------------------ = --- + j -----------------
2 d j 2 d 2 2 d
A –B
-----------------
A 2 A –B 2 2 d 1 2 A –B 2 A –B
A = --- + ----------------- atan ----------------------- = --- A + ----------------- atan -----------------
2 2 d A 2 d A d
---
2
2 A –B 2 – t A –B
= A + ----------------- e cos -----------------
d t + atan A
d d
Example: 2
2s + 14
----------------------------- n = 25 = 5 n = 6 = 0.6
2 2
s + 6s + 25
= 3 d = 5 1 – 0.6 = 4
2 A –B 2 – t A –B
= A + ----------------- e cos -----------------
d t + atan A
d d
2 2 3 – 14 2 – 3t 2 3 – 14
= 2 + ----------------------- e cos 4t + atan -----------------------
4 2 4
– 3t
= 2.828e cos 4t – 0.7854
2
f = MD x + K d Dx + K s x
Ks
Kd
f t 2
x --------- = MD + K d D + K s
M x t
f t F s 2
L --------- = ----------- = Ms + K d s + K s
F x t X s
ASIDE: Here ‘D’ is simply replaced with ‘s’. Although this is very convenient, it is only valid if the ini-
tial conditions are zero, otherwise the more complex form, shown below, must be used.
n – n –
d f t n n–1 – n – 2 df 0 d f 0
L -------------- = s L f t –s f 0 –s ------------------- – – ----------------------
n dt n
dt dt
Impedances in the s-domain are shown in Figure 17.10. As before these assume that the system starts undeflected and at
rest.
Resistor v t = Ri t V s = RI s Z = R
1 1 I s 1
Capacitor v t = ---- i t dt V s = ---- --------- Z = ------
C C s sC
d
Inductor v t = L ----- i t V s = LsI s Z = Ls
dt
Figure 17.11 shows an example of circuit analysis using Laplace transforms. The circuit is analyzed as a voltage divider,
using the impedances of the devices. The switch that closes at t=0s ensures that the circuit starts at rest. The calculation result is a
transfer function.
560
L
t=0sec
Vi +
+ R Vo
- C
-
1
Vi ----------------
1 R
sC + --- V i --------------------
R 1 + sCR R
V o = ----------------------------------- = -------------------------------------- = V i ---------------------------------------
R 2
1 sL + -------------------- s RLC + sL + R
sL + ---------------- 1 + sCR
1
sC + ---
R
Vo R
------ = ---------------------------------------
Vi 2
s RLC + sL + R
At this point two transfer functions have been derived. To state the obvious, these relate an output and an input. To find an
output response, an input is needed.
561
Examples.....
– 3s
–5 t – 3 – 3s – 5t e
L e u t–3 = e L e = -----------
s+5
– 5t 10
L 10e cos 8t + 5 A = ------ 5 = 1.418 – 4.795j
2
1.418 – 4.795j 1.418 – 4.795j
= ----------------------------------- + ------------------------------------
s + –5 – 8 j s + –5 + 8 j
– 9.589s + 25.253
= -------------------------------------------
2
s – 10s + 89
– 1 – 9.589s + 25.253
L -------------------------------------------
2
s – 10s + 89
10
A = ------ 5 = 1.418 – 4.795j
2
– 5t
= 10e cos 8t + 5
A
F s = L f t = ----
s
In the previous section we converted differential equations, for systems, to transfer functions in the s-domain. These trans-
fer functions are a ratio of output divided by input. If the transfer function is multiplied by the input function, both in the s-domain,
the result is the system output in the s-domain.
562
Given, X s 1
----------- = -----------------------------------------
F s 2
Ms + K d s + K s
A
F s = ----
s
Therefore,
X s 1 A
X s = ----------- F s = ----------------------------------------- ----
F s 2 s
Ms + K s + K
d s
Assume,
Ns
K d = 3000 -------
m
N
K s = 2000 ----
m
M = 1000kg
A = 1000N
1
\X s = ----------------------------------
2
s + 3s + 2 s
Output functions normally have complex forms that are not found directly in transform tables. It is often necessary to sim-
plify the output function before it can be converted back to the time domain. Partial fraction methods allow the functions to be bro-
ken into smaller, simpler components. The previous example in Figure 17.14 is continued in Figure 17.15 using a partial fraction
expansion. In this example the roots of the third order denominator polynomial, are calculated. These provide three partial fraction
terms. The residues (numerators) of the partial fraction terms must still be calculated. The example shows a method for finding
resides by multiplying the output function by a root term, and then finding the limit as s approaches the root.
563
1 1 A B C
X s = ---------------------------------- = ------------------------------------ = --- + ----------- + -----------
2 s+1 s+2 s s s+1 s+2
s + 3s + 2 s
1 1
A = lim s ------------------------------------ = ---
s 0 s + 1 s+2 s 2
1
B = lim s + 1 ------------------------------------ = –1
s –1 s + 1 s+2 s
1 1
C = lim s + 2 ------------------------------------ = ---
s –2 s + 1 s+2 s 2
Aside: the short cut above can reduce time for simple partial fraction
expansions. A simple proof for finding ‘B’ above is given in this box.
1 A B C
------------------------------------ = --- + ----------- + -----------
s+1 s+2 s s s+1 s+2
1 A B C
s + 1 ------------------------------------ = s + 1 --- + s + 1 ----------- + s + 1 -----------
s+1 s+2 s s s+1 s+2
1 A C
------------------- = s + 1 --- + B + s + 1 -----------
s+2 s s s+2
1 - A C
lim ------------------ = lim s + 1 --- + lim B + lim s + 1 -----------
s –1 s + 2 s s –1 s s –1 s –1 s + 2
1
lim ------------------- = lim B = B
s –1 s + 2 s s –1
1 0.5 –1 0.5
X s = ---------------------------------- = ------- + ----------- + -----------
2 s s+1 s+2
s + 3s + 2 s
After simplification with partial fraction expansion, the output function is easily converted back to a function of time as
shown in Figure 17.16.
–1 – 1 0.5 – 1 - ----------
0.5-
x t = L x s = L ------- + ---------- +
s s+1 s+2
– 1 0.5 –1 –1 – 1 0.5
x t = L ------- + L ----------- + L -----------
s s+1 s+2
–t – 2t
x t = 0.5 + –1 e + 0.5 e
–t – 2t
x t = 0.5 – e + 0.5e
is the
function in
simplify the
yes the transform
function
tables?
no
can the
function be
simplified? yes
no
Done
Figure 17.17 The methodology for doing an inverse transform of an output function
Figure 17.18 shows the basic procedure for partial fraction expansion. In cases where the numerator is greater than the
denominator, the overall order of the expression can be reduced by long division. After this the denominator can be reduced from a
polynomial to multiplied roots. Calculators or computers are normally used when the order of the polynomial is greater than sec-
ond order. This results in a number of terms with unknown residues that can be found using a limit or algebra based technique.
565
is the
order of the use long division to
numerator >= yes reduce the order of the
denominator? numerator
no
Find roots of the denominator
and break the equation into
partial fraction form with
unknown values
OR
use limits technique. use algebra technique
If there are higher order
roots (repeated terms)
then derivatives will be
required to find solutions
Done
Figure 17.19 shows an example where the order of the numerator is greater than the denominator. Long division of the
numerator is used to reduce the order of the term until it is low enough to apply partial fraction techniques. This method is used
infrequently because this type of output function normally occurs in systems with extremely fast response rates that are infeasible
in practice.
566
3 2
5s + 3s + 8s + 6
X s = ---------------------------------------------
2
s +4
This cannot be solved using partial fractions because the numerator is 3rd order and the denomi-
nator is only 2nd order. Therefore long division can be used to reduce the order of the equation.
5s + 3
2 3 2
s +4 5s + 3s + 8s + 6
3
5s + 20s
2
3s – 12s + 6
2
3s + 12
– 12s – 6
This can now be used to write a new function that has a reduced portion that can be solved with par-
tial fractions.
Figure 17.19 Partial fractions when the numerator is larger than the denominator
Partial fraction expansion of a third order polynomial is shown in Figure 17.20. The s-squared term requires special treat-
ment. Here it produces two partial fraction terms divided by s and s-squared. This pattern is used whenever there is a root to an
exponent.
1 A B C
X s = ---------------------- = ----- + --- + -----------
2 2 s s+1
s s+1 s
1
C = lim s + 1 ---------------------- = 1
s –1 2
s s+1
2 1 1
A = lim s ---------------------- = lim ----------- = 1
s 0 2
s s+1 s 0 s+1
d 2 1 d 1 –2
B = lim ----- s ---------------------- = lim ----- ----------- = lim – s + 1 = –1
s 0 ds 2 s 0 ds s + 1 s 0
s s+1
Figure 17.21 shows another example with a root to an exponent. In this case each of the repeated roots is given with the
highest order exponent, down to the lowest order exponent. The reader will note that the order of the denominator is fifth order, so
the resulting partial fraction expansion has five first order terms.
567
5
F s = -------------------------
2 3
s s+1
5
------------------------
- =
A B C D E
----- + --- + ------------------- + ------------------- + ----------------
2 3 2 s 3 2 s+1
s s+1 s s+1 s+1
Algebra techniques are a reasonable alternative for finding partial fraction residues. The example in Figure 17.22 extends
the example begun in Figure 17.21. The equivalent forms are simplified algebraically, until the point where an inverse matrix solu-
tion is used to find the residues.
5 A- B C D E
------------------------
- = ---- + --- + ------------------- + ------------------- + ----------------
2 3 2 s 3 2 s+1
s s+1 s s+1 s+1
3 3 2 2 2 2
A s + 1 + Bs s + 1 + Cs + Ds s + 1 + Es s + 1
= --------------------------------------------------------------------------------------------------------------------------------------------
2 3
s s+1
4 3 2
s B + E + s A + 3B + D + 2E + s 3A + 3B + C + D + E + s 3A + B + A
= ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2 3
s s+1
–1
0 1 0 0 1 A 0 A 0 1 0 0 1 0 5
1 3 0 1 2 B 0 B 1 3 0 1 2 0 – 15
3 3 1 1 1 C = 0 C = 3 3 1 1 1 0 = 5
3 1 0 0 0 D 0 D 3 1 0 0 0 0 10
1 0 0 0 0 E 5 E 1 0 0 0 0 5 15
5 5 – 15 5 10 15
------------------------- = ----- + --------- + ------------------- + ------------------- + ----------------
2 3 2 s 3 2 s+1
s s+1 s s+1 s+1
For contrast, the example in Figure 17.22 is redone in Figure 17.23 using the limit techniques. In this case the use of
repeated roots required the differentiation of the output function. In these cases the algebra techniques become more attractive,
despite the need to solve simultaneous equations.
568
5 A B C D E
------------------------- = ----- + --- + ------------------- + ------------------- + ----------------
2 3 2 s 3 2 s + 1
s s+1 s s+1 s+1
5 2 5
A = lim ------------------------- s = lim ------------------- = 5
s 0 2 3 s 0 s+1 3
s s+1
d 5 2 d 5 5 –3
B = lim ----- ------------------------- s = lim ----- ------------------- = lim ------------------- = – 15
s 0 ds 2 3 s 0 ds 3 s 0 s+1 4
s s+1 s+1
5 3 5
C = lim ------------------------- s + 1 = lim ----- = 5
s –1 2 3 s –1 2
s s+1 s
1 d 5 3 1 d 5 1 –2 5
D = lim ----- ----- ------------------------- s + 1 = lim ----- ----- ----- = lim ----- -------------- = 10
s – 1 1! ds 2 3 s – 1 1! ds s 2 s – 1 1! s 3
s s+1
---- d- 2
1- ---- 5 3 1 d25 1 30
E = lim ------------------------
- s+1 = lim ----- ----- ----- = lim ----- ------ = 15
s –1 2! ds 2 3 s –1 2! ds 2 s –1 2! 4
s s+1 s s
5 5 – 15 5 10 15
------------------------- = ----- + --------- + ------------------- + ------------------- + ----------------
2 3 2 s 3 2 s+1
s s+1 s s+1 s+1
An inductive proof for the limit method of solving partial fractions is shown in Figure 17.24.
5 A- B C D E
------------------------
- = ---- + --- + ------------------- + ------------------- + ----------------
2 3 2 s 3 2 s+1
s s+1 s s+1 s+1
5
------------------------ A- B
- = ---- C D E
lim + --- + ------------------- + ------------------- + ----------------
s –1 2 3 2 s 3 2 s+1
s s+1 s s+1 s+1
3 5
------------------------
-= A- B
---- C D E
lim s+1 + --- + ------------------- + ------------------- + ----------------
s –1 2 3 2 s 3 2 s+1
s s+1 s s+1 s+1
3 3
----- = A
5 s+1 - B s+1 2
lim ---------------------- + ----------------------- + C + D s + 1 + E s + 1
s –1 s 2 2 s
s
569
3 3
5 A 0 B 0 2
-------------- = --------------- + --------------- + C + D 0 + E 0 C = 5
2 2 –1
–1 –1
For E, differentiate twice, then evaluate (the terms for A and B will be ignored to save
space, but these will drop out anyway).
3 3
d- 2 5 A s + 1 B s+1 2
lim ---- ----- = ------------------------ + ------------------------ + C + D s + 1 + E s + 1
s Æ – 1 dt s
2
s
2 s
d –-------------
2 5- = A
lim ----- +B + D + 2E s + 1
s Æ –1 dt 3
s
lim –-------------------------
3 –2 5 = A
+B + 2E
s Æ –1 4
s
–-------------------------
3 – 2 5 = A 0 + B 0 + 2E
E = 15
4
–1
Figure 17.24 A proof of the need for differentiation for repeated roots
570
-->s=poly(0,'s');
-->res(1)
ans =
0.0950737 - 0.0244323s
------------------------
2
9.293225 - 4.3103716s + s
-->res(2)
ans =
0.0621686 + 0.0170142s
--------------------------
2
9.6469792 + 2.0795122s + s
-->res(3)
ans =
0.0074181
-------------
2.2308594 + s
-->res(4)
!--error 21
invalid index
-->
17.5 Examples
Mass-Spring-Damper Vibration
Given,
1
-----
X s M
\----------- = -----------------------------------
F s 2 Kd Ks
s + ------- s + ------
M M
Component values are,
N Ns
M = 1kg K s = 2 ---- K d = 0.5 -------
m m
The sinusoidal input is converted to the s-domain,
f t = 5 cos 6t N
5s -
\F s = -----------------
2 2
s +6
This can be combined with the transfer function to obtain the output function,
1
---
x s 5s 1
X s = F s ---------- = -----------------
- ------------------------------
-
F s 2 2 2
s +6 s + 0.5s + 2
5s
\X s = ----------------------------------------------------------
-
2 2
s + 36 s + 0.5s + 2
A - + ------------
X s = ------------ B - + ------------------------------------
C D
- + ------------------------------------
-
s + 6j s – 6j s – 0.25 + 1.39j s – 0.25 – 1.39j
The residues for the partial fraction in Figure 17.26 are calculated and converted to a function of time in Figure 17.27. In
this case the roots of the denominator are complex, so the result has a sinusoidal component.
s + 6j 5s – 30j
A = lim ------------------------------------------------------------------------- = ----------------------------------------------
-
s – 6j s – 6j s + 6j s 2 + 0.5s + 2 – 12j 36 – 3j + 2
–3
A = 73.2 10 –3.05
* –3
B = A = 73.2 ¥ 10 –– 3.05
Continue on to find C, D same way
–3 –3
X s = 73.2 10 –3.05- + 73.2
--------------------------------------
¥ 10 –– 3.05- +
---------------------------------------------
s + 6j s – 6j
Circuits
It is not necessary to develop a transfer functions for a system. The equation for the voltage divider is shown in Figure
17.28. Impedance values and the input voltage are converted to the s-domain and written in the equation. The resulting output func-
tion is manipulated into partial fraction form and the residues calculated. An inverse Laplace transform is used to convert the equa-
tion into a function of time using the tables.
3
R = 10
t=0
v s = 3 cos t +
+ Vo
- –3
C = 10 F -
As normal, relate the source voltage to the output voltage using component values in the s-domain.
ZC 3s 1
V o = V s -------------------- V s s = -------------- ZR = R Z C = ------
ZR + ZC 2 sC
s +1
Next, equations are combined. The numerator of resulting output function must be reduced by long divi-
sion.
1
------
3s sC 3s 3s
V o = -------------- ---------------- = -------------------------------------------- = ---------------------------------------------------------
2 1 2 2 3 –3
s + 1 R + ------ s + 1 1 + sRC s + 1 s10 10 + 1
sC
The output function can be converted to a partial fraction form and the residues calculated.
2 2
3s As + B C As + As + Bs + B + Cs + C
V o = ------------------------------------ = ---------------- + ----------- = -----------------------------------------------------------------------
2 2 s+1 2
s +1 s+1 s +1 s +1 s+1
2
3s s A+C +s A+B + B+C
V o = ------------------------------------ = -----------------------------------------------------------------------------
2 2
s +1 s+1 s +1 s+1
B+C = 0 B = –C
A+C = 0 A = –C
A+B = 3 –C–C = 3 C = – 1.5 A = 1.5 B = 1.5
The output function can be converted to a function of time using the transform tables, as shown below.
2 2 1.5 –t
vo t = 1.5 + 1.5 sin t + atan ------- – 1.5e
1.5
–t
v o t = 2.121 sin t + --- – 1.5e
4
Input Functions
In some cases a system input function is comprised of many different functions, as shown in Figure 17.30. The step func-
tion can be used to switch function on and off to create a piecewise function. This is easily converted to the s-domain using the e-
to-the-s functions.
f(t)
t
seconds
0 1 3 4
f t = 5tu t – 5 t – 1 u t – 1 – 5 t – 3 u t – 3 + 5 t – 4 u t – 4
–s – 3s – 4s
5 5e 5e 5e
F s = ----- – ----------- – -------------- + --------------
2 2 2 2
s s s s
The initial and final values an output function can be calculated using the theorems shown in Figure 17.31.
1s 1 1 1
x t = lim ---------------------------------- = lim -------------------------- = ------------------------------------- = ---
2
s 0 s + 3s + 2 s 2
s 0 s + 3s + 2 2 2
0 +3 0 +2
1 s 1 1-
x t 0 = lim ---------------------------------- = --------------------------------------------- = --- = 0
s 2 2
s + 3s + 2 s +3 +2
d t
t = ----- u t
dt
u t
A unit impulse is the input in Figure 17.33. The input ‘f’ is a brief but nearly infinite impact. In terms of energy the force
is the equivalent of 1Ns. In the s-domain the force becomes 1. The following analysis is similar to those done previously. The result
on this impact is a motion resulting in two exponential decay functions.
575
Y s+3
--- = -------------------------- f = t N F = 1
X 2
s + 3s + 2
s+3 A B s A + B + 2A + B
Y = -------------------------- = ----------- + ----------- = -------------------------------------------------
2 s+1 s+2 2
s + 3s + 2 s + 3s + 2
2A + B = 3
- A+B = 1
A = 2 B = –1
2 –1 –t – 2t
Y = ----------- + ----------- y = 2e – 1e
s+1 s+2
When the result of a Laplace analysis is an impulse function this indicates a very brief event, such as an impact or release
of energy.
576
Transfer
Function Input described with
Laplace Equation
We can figure
out from plots
Substitute
Experiments Root-Locus
for stability
Output Function
(Laplace form)
Bode and Phase Plots Phasor Transform
- Straight line
- Exact plot
Output Function
Equations for gain and phase (Laplace terms)
at different frequencies Partial Fraction
Approximate equations for Inverse Laplace
steady state vibrations
17.9 Summary
• Transfer and input functions can be converted to the s-domain
• Output functions can be calculated using input and transfer functions
• Output functions can be converted back to the time domain using partial fractions.
577
a) L 5
o) L ··
x + 5x· + 3x x· 0 = 8 x 0 = 7
b) – 3t
L e p) d
L ----- sin 6t
dt
c) – 3t d 32
L 5e q) L ----- t
dt
d) – 3t t
L 5te r) L y dt
0
e) L 5t 3 – 5t
s) L 3t t – 1 + e
f) 2
L 4t
t) L u t–1 –u t–2
g) L cos 5t – 2t
u) L e u t–2
h) – t+1
L 3 t–1 +e – t–3
v) L e u t–1
i) – 3t
L 5e cos 5t w) – 3t
L 5e +u t–1 –u t–2
j) – 3t
L 5e cos 5t + 1 t–3
x) L cos 7t + 2 + e
k) L sin 5t y) L cos 5t + 1
l) L sinh 3t – 2.7t
z) L 6e cos 9.2t + 3
m) 2
L t sin 2t
aa)
n) d 2 – 3t
L ----- t e
dt
Problem 17.2 Convert the following functions below from the frequency to time domains using the tables.
–1 1 –1 5 – 4.5s
a) L ----------- g) L --- 1 – e
s+1 s
–1 5- –1 4 + 3j 4 – 3j
b) L ---------- h) L ---------------------- + -----------------------
s+1 s + 1 – 2j s + 1 + 2j
–1 6 –1 6 6
c) L ----- i) L ----- + --------------
2 4 2
s s s +9
–1 6 –1 6
d) L ----- j) L --------------------------
-
3 2
s s + 5s + 6
–1 s+2 - –1 6
e) L -------------------------------- k) L -----------------------------------
-
s+3 s+4 2
4s + 20s + 24
–1 6
L --------------
f) 2
s +6
578
b) y· + 8y = 3x
c) y· – y + 5x = 0
– 2t
b) L e + 5t u t – 2 – u t =
–1 1 - + -----------------------------
3
e) L s + ---------- - =
s+2 2
s + 4s + 40
Problem 17.6 Convert the following functions below from the Laplace to time domains using partial fractions and the tables.
3 2
–1 s+2 - – 1 s + 9s + 6s + 3
a) L -------------------------------- g) L ------------------------------------------
s+3 s+4 3 2
s + 5s + 4s + 6
–1 2s + 2 – 1 9s + 4
b) L ----------------------- h) L -------------------
2 3
s +s+2 s+3
–1 s+1 - –1 9s + 4
c) L ---------------------- i) L -------------------------
2 3 3
s +s+3 s s+3
2 2
–1 s + 2s – 1 s + 2s + 1
d) L -------------------------------- j) L ---------------------------
3 2 2
s + 4s + 8s s + 3s + 2
2
–1 6 – 1 s + 3s + 5
e) L ----------------- k) L ---------------------------
2 2
s + 5s 6s + 6
2 2
–1 9s + 6s + 3 – 1 s + 2s + 3
f) L ------------------------------------------ l) L ---------------------------
3 2 2
s + 5s + 4s + 6 s + 2s + 1
Problem 17.7 Convert the output function below Y(s) to the time domain Y(t) using the tables.
5 12 3 3
Y s = --- + -------------- + ---------------------- + -----------------------
s 2 s + 2 – 3j s + 2 + 3j
s +4
579
Problem 17.8 Given the transfer function, G(s), determine the time response output Y(t) to a step input X(t).
4 Y s
G s = ----------- = ----------- x t = 20 When t >= 0
s+2 X s
Problem 17.9 Given the following input functions and transfer functions, find the response in time.
Transfer Function Input
X s-
---------- s+2 m
a) = --------------------------------- ---- f t = 5N
F s s+3 s+4 N
X s s+2 m
b) ----------- = --------------------------------- ---- x t = 5m
F s s+3 s+4 N
Problem 17.10 Solve the differential equation using Laplace transforms. Assume the system starts undeflected and at rest.
··· ·· ·
+ 40 + 20 + 2 = 4
Problem 17.11 For the following control system select a controller transfer function, Gc, that will make the overall system per-
formance match the desired transfer function.
Controller Motor
d Vd e Vs 100 a
2 Gc ------------------- 1
---------------------- s + 0.01 ---
s + 0.002 + s
-
Potentiometer
Va
2 -
---------------------
s + 0.002
-----a- = ---------------
desired transfer function 1 -
d s + 0.1
Problem 17.12 Write a C program for an ATMega microcontroller to implement the control system in the dashed line below with
an update time of 10ms.
Controller Actuator
2
Qd Vd e s K d + sK p + K i Vs 100
------------------------------------------ --------------------------------- 1
s 2 100 --------
---------- s s s + 0.1 10
0.25 + s
-
Sensor
Va
s-
---------
0.25
Problem 17.13 A feedback control system is shown below. The system incorporates a PID controller. The closed loop transfer
580
function is given.
X + Y
Ki 5
K p + ------ + K d s -----------
s s+5
-
Problem 17.14 a) The block diagram below is for an angular positioning system. The set point is a desired angle, which is con-
verted to a desired voltage. This is compared to a feedback voltage from a potentiometer. A PID controller is
used to generate an output voltage to drive a DC motor. Simplify the block diagram.
PID Controller Motor
Vd e Ki Vs 100
d K p + ------ + sK d ---------------- a
1 s s + 0.1 1
---------- ---
0.25 + s
-
Potentiometer
Va
1-
---------
0.25
b) Given the transfer function below, select values for Kp, Ki and Kd that will result in a second order response
that has a damping factor of 0.125 and a natural frequency of 10rad/s. (Hint: eliminate Ki).
2
a s 400K d + s 400K p + 400K i
------ = ------------------------------------------------------------------------------------------------------------
3 2
d s + s 0.1 + 400K d + s 400K p + 400K i
c) The function below has a step input of magnitude 1.0. Find the output as a function of time using numerical
methods. Give the results in a table OR graph.
s 0.9 + 4
-----a- = -------------------------------------
2
d s + 2.5s + 100
d) The function below has a step input of magnitude 1. Find the output as a function of time by integrating the
differential equation (i.e., using the homogeneous and particular solutions).
s 0.9 + 4
-----a- = -------------------------------------
2
d s + 2.5s + 100
e) The function below has a step input of magnitude 1. Find the output as a function of time using Laplace trans-
forms.
s 0.9 + 4 -
-----a- = ------------------------------------
2
d s + 2.5s + 100
f) Given the transfer function below; 1) apply a phasor transform and express the gain and phase angle as a func-
tion of frequency, 2) calculate a set of values and present them in a table, 3) use the values calculated in step 2) to
develop a frequency response plot on semi-log paper, 4) draw a straight line approximation of the Bode plot on
581
semi-log paper.
s 0.9 + 4
-----a- = -----------------------------
2
d s +s+4
Qd Vd e Kp Vs 100 Qa
s ----------- ----------------------- 1
---------- s+ s s + 0.1 ---
0.25 + s
-
Sensor
Va
s-
---------
0.25
b) Given the transfer function below, select values for Kp and tau that will include a second order response that
has a damping factor of 0.125 and a natural frequency of 10rad/s.
Qa 400K p
------- = -----------------------------------------------------------------------------------------
-
Qd 3 2
s + s 0.1 + + s 0.1 + 400K p
Hint:
---------------------------------------------------------------
2 2
s + 2 ns + n s + A
c) The function below has a step input of magnitude 1.0. Find the output as a function of time using numerical
methods. Give the results in a table OR graph from 0.0 to 0.010s.
Qa – 4156.8
------- = ----------------------------------------------------------------------------------------------------------
Qd 3 2
s + s – 39.068 + s – 3.9168 + – 4156.8
d) The function below has a step input of magnitude 1. Find the output as a function of time by integrating the
differential equation (i.e., using the homogeneous and particular solutions).
Qa – 4156.8
------- = ---------------------------------------------------------------------------------------------------------
-
Qd 3 2
s + s – 39.068 + s – 3.9168 + – 4156.8
e) The function below has a step input of magnitude 1. Find the output as a function of time using Laplace trans-
forms.
Qa – 4156.8
------- = ----------------------------------------------------------------------------------------------------------
Qd 3 2
s + s – 39.068 + s – 3.9168 + – 4156.8
f) Given the transfer function below; 1) apply a phasor/Fourier transform and express the gain and phase angle as
a function of frequency, 2) calculate a set of values and present them in a table, 3) use the values calculated in
step 4) to develop a frequency response plot on semi-log paper, 5) draw a straight line approximation of the Bode
plot on semi-log paper.
Qa – 4156.8
------- = ----------------------------------------------------------------------------------------------------------
Qd 3 2
s + s – 39.068 + s – 3.9168 + – 4156.8
g) Select a controller transfer function, Gc, that will reduce the system to a first order system with a time constant
582
Qd Vd e Vs 100
s Gc ----------------------- 1
---------- s s + 0.1 ---
0.25 + s
-
Sensor
Va
s-
---------
Q 0.25
desired transfer function a 1
------- = -----------
Qd s+2
Problem 17.16 a) Find the simplified transfer function for the block diagram.
Controller Actuator
Qa
Qd Vd e Vs 100
Gc ----------------------- 1
10s s s + 0.1 ---
+ s
-
Sensor
Va
10s
b) Given the transfer function below calculate a controller transfer function, Gc. The desired response should be
first order with a time constant of 1s.
Qa 1000G c
------- = ---------------------------------------------------
-
Qd 2
s + 0.1 s + 1000G c
c) For the system given below, and the provided controller function, find the response to a unit step input using
Laplace transforms.
Qa 1000G c
------- = ---------------------------------------------------
-
Qd 2 G c = 0.01 s + 1
s + 0.1 s + 1000G c
d) For the system given below, and the provided controller function, find the response to a unit step input by
solving the differential equation.
Qa 1000G c
------- = ---------------------------------------------------
-
Qd 2 G c = 0.01 s + 1
s + 0.1 s + 1000G c
e) For the system given below, and the provided controller function, find the response to a unit step input using
numerical methods.
Qa 1000G c
------- = ---------------------------------------------------
-
Qd 2 G c = 0.01 s + 1
s + 0.1 s + 1000G c
f) Write a C program for an ATMega microcontroller to implement the control system in the dashed line below
583
Sensor
Va
10s
#define T 0.010
s+2
Problem 17.18 a) Using Laplace transforms find the system response for the given transfer function and input function.
200
------ = -------------------------------
- Vd t = 5
Vd 2
s + 2s + 100
b) Convert the transfer function to a differential equation and then solve the differential equation with the given
input.
200
------ = -------------------------------
- Vd t = 5
Vd 2
s + 2s + 100
c) Convert the given transfer function to state equations and then solve it numerically. Show the results for the
first 2 seconds in 0.2s intervals.
200
------ = -------------------------------- Vd t = 5
Vd 2
s + 2s + 100
d) Compare the solutions for parts a), b), and c). Show that they are equal.
Problem 17.19 a) Given the experimental Bode (Frequency Response Function) plot below, find a transfer function to model a
584
positioning system. The input is a voltage ‘V’ and the output is a displacement ‘x’.
Gain (dB)
x/V
-40
-50
-60
f(Hz)
Fd xd e 2 V positioning xa Fa
4 Kd s + Kp s + Ki
------------------------------------------ system 1
---
s 4
xf
4
Problem 17.20 Write a C subroutine for an ATMega microcontroller to implement the control system in the dashed line below
with an update time of 10ms. The subroutine should use integer math for all calculations
Controller Actuator
2
Qd Vd e s K d + sK p + K i Vs 100
------------------------------------------ ----------------------- 1
4 s s s + 0.1 ---
+ s
-
Sensor
Va
s-
---------
0.25
585
5 n) 2s
c) ----------- -------------------
s+3 3
s+3
5 o) 2
d) ------------------- s x – 7s – 8 + 5 sx – 7 + 3x
2
s+3
6s
-----------------
5- p)
e) ---- 2
2 s + 36
s
f) 8 q) 0
-----
3
s
s r) y
g) ----------------- ---
2 s
s + 25
72 18 1
s) ------ – ------ + -----------
h) –1 5 4 s+5
3 3 e s s
----- – --- + -----------
2 s s+1
s –s – 2s
t) e
e-------- -----------
i) 5 s+3 - –
------------------------------- s s
2 2
s+3 +5
– 4 – 2s
j) 2.5 –1 - + ----------------------
2.5 –– 1 - u) e----------------------
---------------------
s + 3 – 5j s + 3 + 5j s+2
s + - 2–s
= ----------------------------- v) e--------------
2 s+1
s + 6s + 34
–s – 2s
5
----------------- w) 5 e e
k) ----------- + -------- – -----------
2 s+3 s s
s + 25
–3 –3
x) cos 2 s – sin 2 7 e – 0.416s – 6.37 e
-------------------------------------------- + ----------- = ------------------------------------- + -----------
2 s–1 2 s–1
s + 49 s + 49
s cos 1 – 5 sin 1
y) ----------------------------------
2
s + 25
3 –3 3 –– 3 s +
------------------------------- + -------------------------------- = ------------------------------------------
z) s + 2.7 – 9.2j s + 2.7 + 9.2j 2
s + 5.4s + 91.93
586
Answer 17.2
–t
a) e
g) 5 – 5u t – 4.5
–t
b) 5e
– 1 t 3
h) 2 5 e cos 2t + atan ---
4
c) 6t
3
i) t + 2 sin 3t
2
d) 3t
j) – 2t – 3t
6e – 6e
– 3t – 4t
e) –e + 2e
k) – 2t – 3t
1.5e – 1.5e
f) 6 sin 6t
Answer 17.3
X 5
a) --- = ------------------------------
F 2
5s + 6s + 2
Y 3
b) --- = -----------
X s+8
Y –5
c) --- = -----------
X s–1
Answer 17.4 a)
–4 t – t = 4 = 3
L 5e cos 3t + 2 = L 2Ae cos t+
A = 2.5 = 2
1 5 1 5
= ----------- + 5L tu t – 2 – ----- = ----------- + 5L t – 2 u t – 2 + 2u t – 2 – -----
s+2 2 s+2 2
s s
1 5
= ----------- + 5L t – 2 u t – 2 + 10L u t – 2 – -----
s+2 2
s
1 – 2s – 2s 5
= ----------- + 5e L t + 10e L 1 – -----
s+2 2
s
– 2s – 2s
1 5e 10e 5
= ----------- + -------------- + ----------------- – -----
s+2 2 s 2
s s
587
c)
d 3 3 2 1 0
----- y = s y + 1s + 2s + 3s
dt
d 1 0
----- y = s y + s 1
dt
d 3 d 3 2
L ----- y + 2 ----- y + y = s y + 1s + 2s + 3 + sy + 1 + y
dt dt
3 2
= y s + s + 1 + s + 2s + 4
d)
complex conjugate
–1 1+j 1–j –1 A A
L ----------------------- + ---------------------- = L ----------------------- + --------------------------------------------
s + 3 + 4j s + 3 – 4j s+ – j s+ + j
2 2 –1
A = 1 + 1 = 1.141 = atan ------ = – --- = 3 = 4
1 4
– t – 3t
= 2Ae cos t+ = 2.282e cos 4t – ---
4
e)
–1 1 3 1 3
L s + ----------- + ----------------------------- = L s + L ----------- + L -----------------------------
s+2 2 s+2 2
s + 4s + 40 s + 4s + 40
d – 2t 3 d – 2t 6
= ----- t +e + L ------------------------------- = ----- t +e + 0.5L -------------------------------
dt 2 dt 2
s + 2 + 36 s + 2 + 36
d – 2t – 2t
= ----- t +e + 0.5e sin 6t
dt
Answer 17.5 a)
3 2 1
s + 4s + 4s + 4-
---------------------------------------- 3 3 2
3 s + 4s s + 4s + 4s + 4
s + 4s 3
– s + 4s
2
4s + 4
2 2 A = 1
4s + 4 A Bs + C s A + B + s C + 4A
= 1 + ------------------ = 1 + --- + ---------------- = 1 + ------------------------------------------------------------
3 s 2 3 C = 0
s + 4s s +4 s + 4s
B = 3
1 3s
= 1 + --- + --------------
s 2
s +4 = t + 1 + 3 cos 2t
588
b)
2
s +4
------------------------------------------------------------------- A - ----------
- = ---------- B - ----------
C - ----------
D-
+ + +
4 3 2 s+1 s+2 s+3 s+4
s + 10s + 35s + 50s + 24
2
s +4 5
A = lim -------------------------------------------------- = ---
s –1 s + 2 s + 3 s + 4 6
2
s +4 8
B = lim - = ------
-------------------------------------------------
s –2 s + 1 s + 3 s + 4 –2
2
s +4 13
C = lim -------------------------------------------------- = ------
s –3 s + 1 s + 2 s + 4 2
2
s +4 20
D = lim - = ------
-------------------------------------------------
s –4 s + 1 s + 2 s + 3 – 6
5 –t – 2t 13 – 3t 10 – 4t
--- e – 4e + ------ e – ------ e
6 2 3
Answer 17.6
– 3t – 4t
a) –e + 2e g)
b) h)
c) i)
– 2t
d) j) t –e
– 5t t
e) 1.2 – 1.2e k) --------- + 0.834 cos t – 0.927
6
– 4.4t – 0.3t –t
f) 8.34e + 2 0.99 e cos 1.13t + 1.23 l) t + 2te
Answer 17.7
– 2t
y t = 5 + 6 sin 2t + 2 3 e cos 3t – 0
Answer 17.8
– 2t
y t = 40 – 40e
Answer 17.9
5
--- + 5
– 3t 5 – 4t
a) --- e – --- e
6 3 2
– 2t
b) 5 t + 30 – 5e N
589
Answer 17.10
– 6 – 39.50t – 0.1383 t – 0.3368t
t = – 66 10 e – 3.216e + 1.216e + 2.00
Answer 17.11
3 2
s + 0.012s + 0.00002s
G c = -----------------------------------------------------------
200s – 180
Answer 17.12
2
Vs s K d + sK p + K i
----- = ---------------------------------------
-
e 2
s
··
V s = K d e + K p dt + K i e dt
V s-
------d- = ---------
Qd 0.25
·
V d = 4Q d
Answer 17.13
2
5 Kp s + Ki + Kd s
Y
a) ---- = -----------------------------------------------------------------------------------------------
X 2
s 1 + 20K d + s 5 + 20K p + 20K i
1
b) K p = – 0.15 K i = 1.0 K d = ---
5
picked arbitrarily
c) add
d) y· = v
– 25 20 5 5 5
v· = --------- v – ------ y + ------ x·· + ------ x· + ------ x
21 21 21 21 21
e) add
590
Answer 17.14 a)
d Vd e Ki Vs 100 - a
1- K p + ----- + sK d --------------- 1
--------- s s + 0.1 ---
0.25 + s
-
1
----------
0.25
2
K i + K p s + s K d 100 a
d ------------------------------------------------------
4 2
s s + 0.1
+
-
2
K i + K p s + s K d 400 a
d ---------------------------------------------------------------------------------------
-
2 2
s s + 0.1 + K i + K p s + s K d 400
2
a s 400K d + s 400K p + 400K i
------ = -------------------------------------------------------------------------------------------------------
-
3 2
d s + s 0.1 + 400K d + s 400K p + 400K i
b)
2
a s 400K d + s 400K p + 400K i
------ = ------------------------------------------------------------------------------------------------------------ Ki = 0
3 2
d s + s 0.1 + 400K d + s 400K p + 400K i
2
s 400K d + s 400K p s 400K d + 400K p
-----a- = ---------------------------------------------------------------------------------
- = ----------------------------------------------------------------------------
3 2 2
d s + s 0.1 + 400K d + s 400K p s + s 0.1 + 400K d + 400K p
2 K p = 0.25
400K p = 10
c)
t theta a
s 0.9 + 4 -
-----a- = ------------------------------------ 0.0 0.0
2
d s + 2.5s + 100 0.5 0.037
·· · ·· 1.0 0.051
a + a 2.5 + a 100 = d 0.9 + d 4
1.5 0.044
· 2.0 0.038
a = a 2.5 0.038
· ·· 3.0 0.040
a = d 0.9 + d 4 + a – 2.5 + a – 100 3.5 0.041
4.0 0.040
·
a = 4+ a – 2.5 + a – 100
591
d)
·· · ··
a + a 2.5 + a 100 = d 0.9 + d 4
2
0.9s + 4 A B
-----a- = ------------------------------------- = ----------------------------------------- + ------------------------------------------
d
2 s + 1.25 – 9.9216 s + 1.25 + 9.9216
s + 2.5s + 100
first term: ·
a + a 1.25 – 9.9216j = d – 1.125 + 4.192j
homog.:
– 1.25 + 9.9216j t
a = C1 e
part.:
a = – 0.4300 – 0.05922j
init cond. of zero:
– 1.25 + 9.9216j t
a = C1 e – 0.4300 – 0.05922j
0.1369j
C 1 = 0.4300 + 0.05922j = 0.4341e
0.1369j – 1.25 + 9.9216j t
a = 0.4341e e – 0.4300 – 0.05922j
second term: ·
a + a 1.25 + 9.9216 j = d – 1.125 + – 4.192 j
homog.:
– 1.25 + – 9.9216 j t
a = C1 e
part.:
a = – 0.4300 + 0.05922j
init cond. of zero:
– 1.25 + – 9.9216 j t
a = C1 e – 0.4300 + 0.05922j
– 0.1369 j
C 1 = 0.4300 + – 0.05922 j = 0.4341e
– 0.1369 j – 1.25 + – 9.9216 j t
a = 0.4341e e – 0.4300 + 0.05922j
0.1369j – 1.25 + 9.9216j t
a = 0.4341e e – 0.4300 – 0.05922j
– 0.1369 j – 1.25 + – 9.9216 j t
+ 0.4341e e – 0.4300 + 0.05922j
0.1369j – 1.25 + 9.9216j t – 0.1369 j – 1.25 + – 9.9216 j t
a = 0.4341 e e +e e – 0.8600
– 1.25t
a = 0.4341e 2 cos 9.9216t + 0.1369 – 0.8600
– 1.25t
a = 0.8682e cos 9.9216t + 0.1369 – 0.8600
e)
592
4 1
-----a- = ------------------------------------- ---
d = s
2
d s + 2.5s + 100
4 A B C
a =
-------------------------------------------- = ----------------------------------------- + ------------------------------------------------- + ----
2 s + 1.25 + 9.922j s + 1.25 + – 9.922 j s
s s + 2.5s + 100
4
A = lim ------------------------------------------------ = 0.0202 – 3.016
s – 1.25 – 9.922j s + 1.25 – 9.922j s
4
B = lim ------------------------------------------------ = 0.0202 3.016
s – 1.25 + 9.922j s + 1.25 + 9.922j s
4
C = lim ------------------------------------- = 0.04
2
s 0 s + 2.5s + 100
– 1.25t
a = 2 0.0202 e cos 9.922t + 3.016 + 0.04
– 1.25t 3.14159
a = – 0.0404 e sin 9.922t + 3.016 – ------------------- + 0.04
2
– 1.25t
a = – 0.0404 e sin 9.922t + 1.445 + 0.04
f)
s 0.9 + 4 - j 0.9 + 4
-----a- = ---------------------------- = ---------------------------------
2 2
d s +s+4 – +j +4
f = 1 = 2
j2 0.9 + 4 -
-----a- = ----------------------------------------- = 0.1922 – 2.011
2
d – 2 + j2 + 4
Answer 17.15 a)
Qd 100K p Qa
4s ------------------------------------------
-
2
s s + 0.1 s +
+
-
Qd 400K p Qa
---------------------------------------
-
s s + 0.1 s +
+
-
Qa 400K p 400K p
------- = --------------------------------------------------------------
- = -----------------------------------------------------------------------------------------
-
Qd s s + 0.1 s + + 400K p 3 2
s + s 0.1 + + s 0.1 + 400K p
b)
Qa 400K p 400K p
------- = -----------------------------------------------------------------------------------------
- = ---------------------------------------------------------------
Qd 3 2 2 2
s + s 0.1 + + s 0.1 + 400K p s + 2 ns + n s + A
400K p
= -----------------------------------------------------------------------------------------------------------
3 2 2 2 2
s + 2 n s + s n + As + A2 n s + A n
400K p
= ------------------------------------------------------------------------------------------------------------
3 2 2 2
s + s 2 n + A + s n + A2 n + A n
2
400K p = A n = 100A
2
0.1 = n + A2 n = 100 + 2.5A
0.1 + = 2 n + A = 2.5 + A
100 + 2.5 – 2.4
0.1 = 100 + 2.5 – 2.4 = -------------------------------------- = – 39.167
– 2.4
c)
3 2 t Qa
Q a s + s – 39.068 + s – 3.9168 + – 4156.8 = – 4156.8Q d
· 0.0 0.0
Qa = R 0.001 -1e-6
0.002 -6e-6
R· = S 0.003 -19e-6
0.004 -46e-6
S· + – 39.068 S + – 3.9168 R + – 4156.8 Q a = – 4156.8Q d 0.005 -91e-6
0.006 -159e-6
S· = 4156.8Q d + 39.068 S + 3.9168 R + – 4156.8 1 0.007 -255e-6
0.008 -384e-6
0.009 -553e-6
0.010 -766e-6
Note: This solution ‘blows up’ - it is not a practical system.
595
d)
··· ·· ·
Q a + Q a – 39.068 + Q a – 3.9168 + Q a – 4156.8 = – 4156.8
41.57t – 1.250t
Qh = C1 e + C2 e sin 9.922t + C 3
part: – 4156.8
Q P = ------------------- = 1
– 4156.8
41.57t – 1.250t
Qa = C1 e + C2e sin 9.922t + C 3 + 1
0 = C 1 + C 2 sin C 3 + 1 C 1 = – C 2 sin C 3 – 1
· 41.57t
Q a = 41.57C 1 e
– 1.250t – 1.250t
– 1.250C 2 e sin 9.922t + C 3 + 9.922C 2 e cos 9.922t + C 3
·· 2 41.57t 2 – 1.250t
Q a = 41.57 C 1 e + – 1.250 C 2 e sin 9.922t + C 3
– 1.250t
+ – 1.250 9.922 C 2 e cos 9.922t + C 3
– 1.250t
+ 9.922 – 1.250 C 2 e cos 9.922t + C 3
2 – 1.250t
– 9.922 C 2 e sin 9.922t + C 3
2 2
0 = 41.57 C 1 + – 1.250 C 2 sin C 3 + – 1.250 9.922 C 2 cos C 3
2
+ 9.922 – 1.250 C 2 cos C 3 – 9.922 C 2 sin C 3
C 1 = – C 2 sin C 3 – 1 = – 2.0519
41.57t – 1.250t
Q a = – 2.0519 e + – 1.0574 e sin 9.922t – 1.4684 + 1
596
e)
– 4156.8 1
Q a = ---------------------------------------------------------------------------------------------------------- ---
3 2 s
s + s – 39.068 + s – 3.9168 + – 4156.8
– 4156.8
Q a = -------------------------------------------------------------------------------------------------------------------------------
s – 41.57 s + 1.250 – 9.922j s + 1.250 + 9.922j s
A B C D
Q a = -------------------------- + ------------------------------------------------ + -------------------------------------------- + ----
s – 41.57 s + 1.250 – 9.922j s + 1.250 + 9.922j s
– 4156.8
A = lim ---------------------------------------------------------------------------------------------------- = – 0.05176
s 41.57 s + 1.250 – 9.922j s + 1.250 + 9.922j s
– 4156.8
B = lim ------------------------------------------------------------------------------ = 0.4765 – 3.039
s – 1.250 + 9.922j s – 41.57 s + 1.250 + 9.922j s
– 4156.8
D = lim ----------------------------------------------------------------------------------------------------------------------------- = 1.000
s 0 s – 41.57 s + 1.250 – 9.922j s + 1.250 + 9.922j
41.57t – 1.250t
Q a = – 0.05176e + 0.2292e cos 9.922t – 1.343 + 1.000
41.57t – 1.250t
Q a = – 0.05176e + 0.2292e cos 9.922t – 1.343 + 1.000
Note: the results of d) and e) have different forms, but are equivalent.
597
f)
Qa – 4156.8 – 4156.8
------- = --------------------------------------------------------------------- = ----------------------------------------------------------------------------------------------
Qd 2 2 2
s – 41.57 s + 2.5s + 100 s – 41.57 s + 2 10 0.125s + 10
g)
Controller Actuator
Qd Vd e Vs 100
s Gc ----------------------- 1
---------- s s + 0.1 ---
0.25 + s
-
Sensor
Va
s
----------
0.25
400G c
----------------------------------------------
s s + 0.1 + 400G c
Qa 1 400G c
------- = ----------- = ----------------------------------------------
Qd s+2 s s + 0.1 + 400G c
Answer 17.16 a)
Qd e 100G c Qa
-------------------------
-
10s 2
s s + 0.1
+
-
Qa 1000G c 1000G c
- = ---------------------------------------------------
------- = ------------------------------------------------ -
Qd s s + 0.1 + 1000G c 2
s + 0.1 s + 1000G c
b)
Qa 1000G c 1
------- = ---------------------------------------------------
- = -----------
Qd 2 s+1
s + 0.1 s + 1000G c
2
1000G c s + 1 = s + 0.1 s + 1000G c
2
G c s 1000 = s + 0.1 s
2
s + 0.1 s
G c = --------------------------
1000s
c)
1000 0.01 s + 1 1 10s + 10
Q a = ----------------------------------------------------------------------------- --- = -------------------------------------------------
2 s 2
s + 0.1 s + 1000 0.01 s + 1 s + 10.1 s + 10 s
10s + 10 A B C
= --------------------------------------------------------------- = ------------------------- + ------------------------- + ----
s + 1.1127 s + 8.9873 s s + 1.1127 s + 8.9873 s
10s + 10
A = lim -------------------------------- = 0.12862
s – 1.1127 s + 8.9873 s
10s + 10
B = lim -------------------------------- = – 1.1286
s – 8.9873 s + 1.1127 s
10s + 10
C = lim ------------------------------------------------------------ = 1
s 0 s + 1.1127 s + 8.9873
– 8.9873t – 1.1127t
Q a = 0.12862e – 1.1286e +1
599
d)
Qa 10 s + 1 – 0.1431 10.143
------- = ------------------------------------------ = ------------------------- + -------------------------
Qd 2 s + 1.1127 s + 8.9873
s + 10.1 s + 10
part:
– 0.1431
Q p = ------------------- = – 0.1286
1.1127
init cond zero:
– 1.1127t C 1 = 0.1286
Qa = C1 e – 0.1286
– 1.1127t
Q a = 0.1286e – 0.1286
part:
10.143
Q p = ---------------- = 1.1286
8.9873
init cond zero:
– 8.9873t C 1 = – 1.1286
Qa = C1 e + 1.1286
– 8.9873t
Q a = – 1.1286 e + 1.1286
Combined:
– 1.1127t – 8.9873t
Q a = 0.1286e – 0.1286 + – 1.1286 e + 1.1286
– 1.1127t – 8.9873t
Q a = 0.1286e + – 1.1286 e +1
e)
·· 1 + Q· 10.1 + Q 10 = Q· 10 + Q 10 t Qa
Q a a a d d
· 0.0 0.000
Qa = R eqn 17.1 0.1 0.036
0.2 0.110
·· 1 + R 10.1 + Q 10 = 10
Q a a 0.3 0.192
0.4 0.273
eqn 17.2
R· 1 = 10 – R 10.1 – Q a 10 0.5 0.347
0.6 0.415
0.7 0.476
0.8 0.531
0.9 0.581
1.0 0.625
600
f)
#define T 0.010
e = Vd - Va;
return Vs;
}
Answer 17.17
X + Y
1 5
----------------------------------------- -----------
s + K2 s + K1 s+2
-
s+2
X + Y
5
----------------------------------------------------------
s + K2 s + K 1 s + 2
-
s+2
5
----------------------------------------------------------
Y s + K 2 s + K1 s + 2 5
--- = -----------------------------------------------------------------------------------------
- = -----------------------------------------------------------------------------------------
X 5 s + K2 s + K1 s + 2 + s + 2 5
1 + s + 2 ----------------------------------------------------------
s + K2 s + K1 s + 2
5 5
= ------------------------------------------------------------------------ = ------------------------------------------------------------------------------------------------
s + 2 s + K2 s + K 1 + 5 2
s + 2 s + s K1 + K2 + 5 + K1 K2
2 10 2 = K 1 + K 2
10 = 5 + K1 K2 K 1 K 2 = 95 = 40 – K 1 K 1
2
K 1 – 40K 1 + 95 = 0
2
– – 40 40 – 4 1 95
K 1 K 2 = ------------------------------------------------------------------ = 20 17.464249 = 37.46 2.536
2
601
Answer 17.18 a)
200 5 A B C
= -------------------------------- --- = ------------------------------ + ------------------------------ + ----
2 s s + 1 – 9.95j s + 1 + 9.95j s
s + 2s + 100
1000
A = lim -------------------------------------- = 5.025 3.041
s – 1 + 9.95j s s + 1 + 9.95j
B = 5.025 – 3.041
1000
C = lim -------------------------------- = 10
s 0 s 2 + 2s + 100
–t
= 2 5.025 e cos 9.95t + 3.041 + 10
b)
·· ·
+ 2 + 100 = 200V d = 1000
homog:
R = –1 9.95j
–t
h = C 1 e cos 9.95t + C 2
part:
p = 10
–t
= C 1 e cos 9.95t + C 2 + 10
0 = C 1 cos C 2 + 10
· –t –t
= – C 1 e cos 9.95t + C 2 – 9.95C 1 e sin 9.95t + C 2
– 1- sin C 2 –1
--------- = -------------------- C 2 = atan ---------- = – 0.100 + = 3.04159
9.95 cos C 2 9.95
– 10
C 1 = --------------------------------- = 10.05
0 = C 1 cos 3.04159 + 10 cos 3.04159
–t
= 10.05e cos 9.95t + 3.042 + 10
602
c)
·· · t (s) w a
+ 2 + 100 = 1000
· 0 0 0.0
=
0.2 12.7 76.5
·
= –2 + – 100 + 1000 0.4 15.1 -52.5
0.6 4.6 -17.4
0.8 10.1 48.5
1.0 13.7 -21.1
1.2 7.40 -19.4
1.4 9.21 28.0
1.6 12.4 -5.68
1.8 8.94 -15.6
2.0 9.09 14.7
d) There are multiple ways to verify. The easiest is to calculate points at the time intervals from step c). They
should be very close if the answers are correct.
Answer 17.19 a)
Gain (dB)
x/V
-40
-50
-60
f(Hz)
--x- = A --------------------
s + 20 -
V s + 200
60 60
– ------ – ------
20 0 + 20 20
10 = A ---------------------- A = 10 10 = 0.01
0 + 200
b)
Fd xd e 2 s + 20 xa Fa
4 Kd s + Kp s + Ki 0.01 ---------------------
---------------------------------------
- s + 200 1
---
s 4
xf
4
2
Kd s + Kp s + Ki s + 20
- 0.01 ---------------------
---------------------------------------
Fa s s + 200
------ = ----------------------------------------------------------------------------------------------
Fd 2
Kd s + Kp s + Ki s + 20
1 + ---------------------------------------- 0.01 ---------------------
s s + 200
2
F K d s + K p s + K i s + 20
-----a- = -----------------------------------------------------------------------------------------------------------------
Fd 2
100s s + 200 + K d s + K p s + K i s + 20
2
Fa K d s + K p s + K i s + 20
------ = -----------------------------------------------------------------------------------------------------------------
Fd 2
100s s + 200 + K d s + K p s + K i s + 20
Answer 17.20
Ki #define T 10 // 10 ms loop
V s = esK d + eK p + ----- e #define Kd 5
s
#define Ki 6
#define Kp 7
Vd = Qd * 4;
e = Vd - Va;
e_sum += e * T;
e_diff = (1000 * (e - e_last)) / T;
e_last = e;
x· 0 = 2
x 0 = 3
604
f t = 5 sin 5t + 8
F s = L f t =
–1
f t = L F s =
1 s e) lim f t = lim sF s
b) L f at = --- F --
a a t s 0
– at d
L e f t = F s+a f) L tf t = – ----- F s
c) dt
Problem 17.25 The applied force ‘f’ is the input to the system, and the output is the displacement ‘x’.
a) find the transfer function.
K1 = 500 N/m
x K2 = 1000 N/m
M = 10kg
b) What is the steady state response for an applied force F(t) = 10cos(t + 1) N ?
c) Give the transfer function if ‘x’ is the input.
d) Find x(t), given F(t) = 10N for t >= 0 seconds using Laplace methods.
Problem 17.26 The following differential equation is supplied, with initial conditions.
··
y + y· + 7y = f y 0 = 1 y· 0 = 0
f t = 10 t 0
a) Solve the differential equation using calculus techniques.
b) Write the equation in state variable form and solve it numerically.
c) Find the frequency response (gain and phase) for the transfer function using the phasor transform. Roughly
605
Problem 17.27 Given the transfer functions and input functions, F, use Laplace transforms to find the output of the system as a
function of time. Indicate the transient and steady state parts of the solution.
2
x-- D
= ------------------------------- f = 5 sin 62.82t
f 2
D + 200
x D D+2
-- = ------------------------------- f = 5 sin 62.82t
f 2
D + 200
2
x D D+2
-- = ------------------------------- f = 5 sin 62.82t
f 2
D + 200
Problem 17.28 Select a controller transfer function, Gc, that will reduce the system to a first order system with a time constant of
0.5s, as shown below.
Controller Motor
d Vd e Vs 100 a
1 Gc ---------------- 1
---------- s + 0.1 ---
0.25 + s
-
Potentiometer
Va
1
----------
0.25
-----a- = ----------
desired transfer function 1-
d s + 2
Problem 17.29 Write a C program for an ATMega 32 microcontroller to implement the control system in the dashed line below
with an update time of 10ms.
Controller Actuator
Qd Vd e Kp Vs 100 -
s- ----------
- ---------------------- 1
--------- s+ s s + 0.1 ---
0.25 + s
-
Sensor
Va
s
----------
0.25
desired transfer function a 1
------ = -----------
s + 2
d
Problem 17.30 a) Given the experimental Bode (Frequency Response Function) plot below, find a transfer function to model a
positioning system. The input is a voltage ‘V’ and the output is a displacement ‘x’. (Hint: after calculating the
606
Gain (dB)
x/V
-40
-60
-80
f(Hz)
Fd xd e 2 V positioning xa Fa
4 s + 20s + 100 -
---------------------------------------------- 1
2 system ---
s + 200s + 100000 4
xf
4
c) Find a new controller transfer function (V/e) that would give the overall response below.
Fa s + 10-
------ = ----------------
Fd s + 100
d) Write a subroutine that implements the control function (V/e) found in step c). (Hint: Convert it to state equa-
tions first.)
e) The controller function is replaced with the function below. Draw a Bode plot using the straight line approxi-
mation. Compare it to the Bode plot in part a).
V
--- = 10
e
Problem 17.31 a) Develop differential and state equations describing the following system. The input is Vd and the output is the
motor shaft speed. Assume all components are ideal. The motors are identical with a resistance of 20 ohms. With
607
an input voltage of 5V the motors spin at 2000RPM, and have a time constant of 0.25s.
1K
1K
-
1K +
V 1uF
d
1K
b) Find the system response to a unit step input explicitly (i.e. homogeneous and particular).
c) Find the system response to a unit step input using Laplace transforms.
d) Solve the problem numerically and report the results using a table of values.
e) Use phasors to find the steady state output response to an input of,
v d = 5 sin 100t
Problem 17.32 a) Using Laplace transforms find the system response for the transfer function and input function (given as a
function of time).
7
5000s + 10
------ = ----------------------------------------------
- V d t = 5t
Vd 2
s + 2001s + 20000
b) Use numerical methods to find the response of the system described with a transfer function. Report the results
using a table of values.
7
5000s + 10
------ = ----------------------------------------------
- V d t = 5t
Vd 2
s + 2001s + 20000
c) Use phasors to find the steady state output response to the input given below.
7
5000s + 10
------ = ----------------------------------------------- V d = 5 sin 100t
Vd 2
s + 2001s + 20000
608
Problem 17.33 Convert the following differential equations to physical systems. Show the method.
a) ·· · 1 1 1
V o + V o -------- + V o ------- = V i -------
CR LC LC
b) ·
x1 = v1
· – K s1 K s1
v 1 = x 1 ------------ + x 2 --------- + g
M1 M1
·
x2 = v2
2 2 2
· – R 2 K d1 – R 2 K s1 R 2 K s1 – FR 1 R 2
v 2 = v 1 -------------------- + x 1 ------------------- + x 2 ---------------- + --------------------
J1 J1 J1 J1
Problem 17.34 For the following control system select a controller transfer function, Gc, that will make the overall system per-
formance match the desired transfer function.
Controller Motor
Vd e Vs 100 -
d ------------------ a
s+1- Gc 2 1
------------------ s + 0.1 ---
s + 0.25 + s
-
Potentiometer
Va
s+1
-------------------
s + 0.25
Problem 17.35 Write a C program for an ATMega microcontroller to implement the control system in the dashed line below with
an update time of 10ms.
Controller Actuator
2
Qd Vd e s K d + sK p + K i Vs 100
s ------------------------------------------ ----------------------- 1
---------- s s s + 0.1 ---
0.25 + s
-
Sensor
Va
s
----------
0.25
Problem 17.36 A feedback control system is shown below. The system incorporates a PID controller. The closed loop transfer
609
function is given.
X + Y
Ki 3s + 6 -
----------------------------
K p + ----- + K d s 2
s s + 9s + 91
-
Problem 17.37 For the following control system select a controller transfer function, Gc, that will make the overall system per-
formance match the desired transfer function.
Gc
+
C + e + s+3 - R
s + 10 -
------------------------ ----------------------------
2 3
s + 100 s + 5s + 10
-
R 1
desired transfer function ---- = --------------
C s + 50
Problem 17.38 A feedback control system is shown below. The system incorporates a PID controller. The closed loop transfer
function is given.
X + Y
K1 5- 1
--------------
- ---------- ---
s + K2 s+2 s
-
4-
----------
s+5
a) Develop the transfer function for the system.
b) Select controller values that will result in a response that includes a natural frequency of 2 rad/sec and damp-
ing factor of 0.5. Verify that the controller will be stable.
c) If the values of K1 = K2= 1 find the response to a unit ramp input as a function of time using LaPlace Trans-
forms.
d) Find the response in part c) using numerical methods.
e) Find the system response to an input of X = 5sin(10t + 1) using phasor transforms.
f) If the input X is a trapezoidal motion profile with an acceleration time of 2 seconds, and a maximum velocity
of 5, calculate the response Y.
Problem 17.39 The following differential equation is supplied, with initial conditions.
··
y + y· + 7y = f y 0 = 1 y· 0 = 0
f t = 10 t 0
610
Problem 17.40 Select a controller transfer function, Gc, that will reduce the system to a first order system with a time constant of
0.5s, as shown below.
Controller Motor
d Vd e Vs 100 a
1 G ------------------- 1
---------- c 2 ---
0.25 + s + 0.1 s
-
Potentiometer
Va
1
----------
0.25
-----a- = ----------
desired transfer function 1-
d s+2
Problem 17.41 Write a C program for an ATMega 32 microcontroller to implement the control system in the dashed line below
with an update time of 10ms.
Controller Actuator
Qd Vd e Kp Vs 100 -
s- ----------
- ---------------------- 1
--------- s+ s s + 0.1 ---
0.25 + s
-
Sensor
Va
s
----------
0.25
Problem 17.42 a) Given the experimental Bode (Frequency Response Function) plot below, find a transfer function to model a
positioning system. The input is a voltage ‘V’ and the output is a displacement ‘x’. (Hint: after calculating the
function develop a Bode plot to verify the system performance.)
Gain (dB)
x/V
-40
-60
-80
f(Hz)
b) The transfer function found in step a) will be used for the positioning system in the block diagram below. Find
the overall transfer function for the system.
Fd xd e 2 V positioning xa Fa
4 s + 20s + 100 1
----------------------------------------------- system ---
2
s + 200s + 100000 4
xf
4
c) Find a new controller transfer function (V/e) that would give the overall response below.
Fa s + 10
------ = -----------------
Fd s + 100
Problem 17.43 Develop differential and state equations describing the following system. The input is Vd and the output is the
motor shaft speed. Assume all components are ideal. The motors are identical with a resistance of 20 ohms. With
an input voltage of 5V the motors spin at 2000RPM, and have a time constant of 0.25s.
1K
1K
-
1K +
Vd 1uF
1K
17.2 References
17.1 Close, C.M. and Frederick, D.K., “Modeling and Analysis of Dynamic Systems, second edition, John Wiley and Sons, Inc.,
1995.
612