Beruflich Dokumente
Kultur Dokumente
page 1
by
Hugh Jack
PREFACE
How to use the book.
• read the chapters and do drill problems as you read
• examine the case studies - these pull together concepts from previous chapters
• problems at the ends of chapters are provided for further practice
Acknowledgement to,
Dr. Hal Larson for reviewing the calculus and numerical methods chapters
Dr. Wendy Reffeor for reviewing the translation chapter
Student background
a basic circuits course
a basic statics and mechanics of materials course
math up to differential equations
a general knowledge of physics
computer programming, preferably in ’C’
Special notes
- despite all common wisdom, inertia is presented as a force, this makes it easier
for students attempting to learn, and keep sign conventions correct
TO BE DONE
small
italicize variables and important terms
fix equation numbering (auto-numbering?)
fix subscripts and superscripts
fix problem forms to include therefores, mark FBDs, etc.
check C programs for ANSI compliance
big
verify the phase angle relationships cos vs/ sin.
page 2
chapter rotation
replace the rotational case with IC motor
chapter non-linear systems
develop chapter
chapter magnetic
consider adding/writing this chapter
chapter fluids
consider adding/writing this chapter
chapter thermal
consider adding/writing this chapter
chapter c programming
review section
add problems
Buzzword topics:
- Distributed systems
- Intelligent manufacturing systems
- Adaptive control
- Architectures for signal processing and control algorithms
- Discrete event systems
- Hybrid systems
- Predictive control
- Robust control
page 1
1. INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1
1.1 BASIC TERMINOLOGY 1.1
1.2 EXAMPLE SYSTEM 1.3
1.3 SUMMARY 1.3
1.4 PRACTICE PROBLEMS 1.3
2. TRANSLATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1
2.1 INTRODUCTION 2.1
2.2 MODELING 2.3
2.2.1 Free Body Diagrams 2.4
2.2.2 Mass and Inertia 2.4
2.2.3 Gravity and Other Fields 2.8
2.2.4 Springs 2.10
2.2.5 Damping and Drag 2.18
2.2.6 Cables And Pulleys 2.21
2.2.7 Friction 2.23
2.2.8 Contact Points And Joints 2.25
2.3 SYSTEM EXAMPLES 2.25
2.4 OTHER TOPICS 2.35
2.5 SUMMARY 2.36
2.6 PRACTICE PROBLEMS 2.36
2.7 PRACTICE PROBLEM SOLUTIONS 2.41
2.8 ASSIGNMENT PROBLEMS 2.45
5. ROTATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1
5.1 INTRODUCTION 5.1
5.2 MODELING 5.2
5.2.1 Inertia 5.3
5.2.2 Springs 5.7
5.2.3 Damping 5.12
5.2.4 Levers 5.14
5.2.5 Gears and Belts 5.15
5.2.6 Friction 5.19
5.2.7 Permanent Magnet Electric Motors 5.22
5.3 OTHER TOPICS 5.23
5.4 DESIGN CASE 5.23
5.5 SUMMARY 5.28
5.6 PRACTICE PROBLEMS 5.28
5.7 PRACTICE PROBLEM SOLUTIONS 5.35
5.8 ASSIGNMENT PROBLEMS 5.44
1. INTRODUCTION
Topics:
Objectives:
• Modeling
• Explicit solutions
• Numerical solutions
• Empirical data
• Simulation
• reversibility
Static
Dynamic Stochastic
Deterministic Distributed
Lumped Non-linear
Linear Continuous
Discrete
• disturbances
• component variations
• system error
• mechatronics
• embedded systems
• real-time systems
• Robot
1.3 SUMMARY
1.
translation - 2.1
2. TRANSLATION
Topics:
• Basic laws of motion
• Gravity, inertia, springs, dampers, cables and pulleys, drag, friction, FBDs
• System analysis techniques
• Design case
Objectives:
• To be able to develop differential equations that describe translating systems.
2.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 cen-
ter of mass will also cause rotation to occur. This chapter will focus only on translational
systems.
The equations of motion for translating bodies are shown in Figure 2.1. These state
simply that velocity is the first derivative of position, and velocity is the first derivative of
acceleration. Conversely the acceleration can be integrated to find velocity, and the veloc-
ity can be integrated to find position. 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, an
acceleration can be found by dividing the net force by the mass.
translation - 2.2
v(t) = ∫ a ( t ) dt (4)
a(t) = F ( t )-
--------- (5)
M
where,
x, v, a = position, velocity and acceleration
M = mass of the body
F = an applied force
An example application of these fundamental laws is shown in Figure 2.2. The ini-
tial conditions of the system are supplied (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. 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. 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 the units are used throughout the calculations, this is a good
practice for any engineer.
translation - 2.3
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.
The initial conditions for the system at time t=0 are,
x 0 = 5m
–1 Note: units are very important and should nor-
v 0 = 2ms mally be carried through all calculations.
–2
a 0 = 3ms
The constant acceleration can be integrated to find the velocity as a function of time.
Note:
v ( t ) = ∫ a 0 dt = a 0 t + C = a 0 t + v 0 (6)
v ( t ) = a0 t + C
v0 = a0 ( 0 ) + C
v0 = C
Next, the velocity can be integrated to find the position as a function of time.
a 2
x ( t ) = ∫ v ( t ) dt = ∫ ( a 0 t + v 0 ) dt = -----0- t + v 0 t + x 0 (7)
2
This can then be used to calculate the position of the mass after 5 seconds.
a 2
x ( 5 ) = -----0- t + v 0 t + x 0
2
–2 2 –1
3ms
= ---------------- ( 5s ) + 2ms ( 5s ) + 5m
2
= 37.5m + 10m + 5m = 52.5m
Figure 2.2 Sample calculation for a translating mass, with initial conditions
2.2 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 discussed in
following sections.
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.
K = 20 N/m
FR1
FR1
Mg
FR2
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
translation - 2.5
forces, which will equal zero. The second method is known as D’Alembert’s equation
where all of the forces are summed and set equal to the inertial force, as shown in Figure
2.4. The acceleration is proportional to the inertial force and inversely proportional to the
mass.
∑ F = Ma (Newton’s) (11)
∑ F – Ma = 0 (D’Alembert’s) (12)
An application of Newton’s equation to FBDs can be seen in Figure 2.5. 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 direction of the mass
matches the positive direction for the summation.
translation - 2.6
D’Alemberts’s form: x
d 2 d- 2
Ma = M ----- x ∑ x
+F = F – M ----
dt F dt x = 0
M or
d- 2
----
+
∑ x
F = – F + M dt x = 0
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 + ∑ x
F = F = M dt x
M
or
d- 2
----
+ ∑ x
F = – F = – M dt x
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.
5
F 1 = –4 N –7
F2 = –3 N
0
0
If both forces shown act through
the center of mass, what is the
acceleration of the ball? M=10kg
∑F = F 1 + F 2 = Ma
5 –7
–4 N + – 3 N = ( 10Kg )a
0 0
–2 – 0.2 – 0.2
1 Kgm
∴a = ------------- – 7 N = – 0.7 ----------- 1 m
- ------- = – 0.7 ----
10Kg 2 Kg 2
s s
0 0 0
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) which produces a large force of attraction. When ana-
lyzing forces acting on rigid bodies we add this force to our FBDs. The magnitude 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 sur-
face of the earth. The Imperial units for force and mass are both the pound (lb.) which
often causes confusion. To reduce this confusion the unit for force is normally modified to
be, lbf.
fx
0 0 x(t)
N- = m-
g = 0 Kg------ 0 ---- X( t) = y(t) F = f F g = Mg
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 dt X ( t )
fx
0 x(t)
d 2
+ f = 5Kg ----- y ( t )
m-
5Kg 0 ----
2 y dt
– 9.81 s fz z(t)
fx
0 x( t)
m –1 d- 2
----
0 ----2- + 0.2Kg fy = y ( t )
dt
– 9.81 s fz z(t)
Integrate twice to find the position components. Note: When an engineer
vx solves a problem they
fx 0 will always be looking
0 x(t)
m –1 d
f y t + v y = ----- y ( t ) at the equations and
0 ----2- + 0.2Kg 0 dt unknowns. In this case
– 9.81 s fz vz z ( t ) there are three equa-
0 tions, and there are 9
vx
fx 0 x0 constants/givens fx, fy,
0 x ( t ) fz, vx0, vy0, xz0, x0, y0
1--- m- + 0.2Kg – 1 2
0 ---- fy t + vy t + y0 = y ( t ) and z0. There are 4
2 2 0
– 9.81 s z(t) variables/unknowns x,
fz vz z0
2 y, z and t. Therefore
0.1f x t + v x t + x 0 0 with 3 equations and 4
0 unknowns only one
x(t)
2 value (4-3) is required
y(t) = 0.1f y t + v y t + y 0 m
0 to find all of the
z(t ) unknown values.
–------------
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. Electro-
static forces are less common, but may need to be considered for highly charged systems.
Given,
FBD:
3 0 F1
F1 = 4 N N-
g = – 9.81 ------ M = 2Kg
Kg
0 0 M
ans.
1.5
a = – 7.81 m
----
s
0
2.2.4 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 deter-
mined by the Young’s modulus (E) of the material and the geometry of the spring. A prim-
itive spring is shown in Figure 2.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 parameters (E, A and
L) are combined into a more convenient form. This form is known as Hooke’s Law.
translation - 2.11
F
δ = ------- F
L
EA
L
F = ------- δ
EA
L δ
F = Kδ (Hooke’s law)
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 2.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 compression, and then select the displacement and force
directions accordingly.
translation - 2.12
Fc ∆x
compression as positive:
Ks Fc = Ks ∆ x
Fc ∆x
Ks F c = –K s ∆ x
Fc ∆x
Ks F c = –K s ∆ x
Ks
Ft
tension as positive:
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 simi-
lar. You will need to remember this when dealing with complex systems - and espe-
cially in this book where we deal with both types of components.
Previous examples have shown springs with displacements at one end only. In Fig-
ure 2.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 compression or ten-
sion. 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 displacement is compressive so it is negative. In the second exam-
translation - 2.13
ple 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, so both terms are negative.
∆x1 ∆ x2
F Ks F
F = Ks ( ∆ x1 – ∆ x 2 )
∆x1 ∆ x2
F Ks F
F = Ks ( ∆ x 1 + ∆ x 2 )
∆x1 ∆ x2
F Ks F
F = Ks ( – ∆ x1 – ∆ x2 )
Figure 2.12 Examples of forces when both sides of a spring can move
The example in Figure 2.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 compres-
sion and this time x2 will put it in tension so it is made negative.
translation - 2.14
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 posi-
tive 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 deformation can be defined as a deformed and undeformed
length, as shown in Figure 2.14.
translation - 2.15
∆ x = l1 – l 0
where,
∆ x = deformation
l 0 = the length when undeformed
l 1 = the length when deformed
2
K ( ∆x )
E P = ------------------
2
Given,
N- Ks Ks
K s = 10 ---
m
∆ x = 0.1m
F
∆x
Find F assuming the springs are
normally 4m long when unloaded 10m
ans. F=2N
Draw the FBDs and the equations of motion for the masses
Ks
F
M1 M2
x1 x2
ans.
··
x1 ( M1 ) + x1 ( Ks ) + x2 ( –Ks ) = F
··
x 1 ( K s ) + x2 ( –M2 ) + x2 ( – K s ) = F
Figure 2.17 Drill problem: Draw the FBDs for the masses
translation - 2.18
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 2.18 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 damp-
ers. Normally these cause negligible effects.
orifice
motion
fluid
piston fluid
The basic equation for an ideal damper in compression is shown in Figure 2.19. In
this case the force and displacement are both compressive. The force is calculated by mul-
tiplying the damping coefficient by the velocity, or first derivative of position. Aside from
the use of the first derivative of position, the analysis of dampers in systems is similar to
that of springs.
translation - 2.19
x
Kd
F = K d ----- x
d (15)
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 2.20 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.
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 resis-
tance to flow. Normally these forces are small, except at high velocities.
Figure 2.20 Viscous damping between two bodies with relative motion
Figure 2.21 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 experimentally. The drag coefficient is a function of material type, sur-
face properties, object size and object geometry.
F F = –D v v
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
ans. F = – 0.02N
Figure 2.22 Drill problem: Find the required forces on the damper
translation - 2.21
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 represented as
a force vector. When used in combination with pulleys, a cable can redirect a force vector
or multiply a force.
Typically we assume that a pulley is massless and frictionless (in the rotation chap-
ter 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 2.23.
T1
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 rel-
ative ratio of forces between the sides of the pulley, as shown in Figure 2.24.
T1
T2 µ ( ∆θ )
----- = e k
T1
∆θ
T2
Given,
µ s = 0.35 µ k = 0.2
M = 1Kg
ans. π
0.2 ---
2
F up = 9.81e N
9.81N
F down = ---------------
π
0.2 ---
2
e
Although the discussion in this section has focused on cables and pulleys, the the-
ory also applies to belts over drums.
translation - 2.23
2.2.7 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 2.26 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 bidirectional,
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
Fapplied
Fs
F
Fg Fk = µk N
F k, F s
Fs ≤ µs N
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 fric-
tion is approximately constant. In addition, 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.
ans.
When constructing FBDs for a system we must break all of the components into
individual rigid bodies. Where the mechanism has been broken the contact forces must be
added to both of the separated pieces. Consider the example in Figure 2.28. At joint A the
forces are written as two components in the x and y directions. For joint B the force com-
ponents 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
F By Note: Don’t forget that forces on con-
nected FBDs should have equal
magnitudes, but opposite direc-
tions.
An orderly approach to system analysis can simplify the process of analyzing large
systems. The list of steps below is based on general observations of good problem solving
techniques.
translation - 2.26
Consider the cart in Figure 2.29. On the left is a force, it is opposed by a spring and
damper on the right. The basic problem definition already contains all of the needed defi-
nitions, 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 equation in Newton’s form. This equation is then rearranged to a sec-
ond-order non-homogeneous differential equation.
translation - 2.27
x
Given the system diagram;
Kd
F
M1 Ks
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.
Develop the equation relating the input force to the motion (in terms of x) of the lefthand
cart for the problem below.
x1 x2
K d1 K d2
F
M1 K s1 M2 K s2
A simplified model of an elevator (M1) and a passenger (M2) are shown in Figure
2.31. In this example many of the required variables need to be defined. These are added
to the FBDs. Care is also taken to ensure that all forces between bodies are equal in mag-
nitude, but opposite in direction. The wall forces are ignored because they are statically
indeterminate, and x-axis force components are irrelevant to the forces in the y-axis.
translation - 2.29
M1
M2
Kd
K S2
K S1
M2 g
· · y2
FD = Kd ( y2 – y1 ) M1 g
··
M1 y1 F S2 = K s2 ( y 1 – y 2 )
FD ··
M2 y2
F S2
y1 F S1 = – K s1 y 1
The forces on the FBDs are summed and the equations are expanded in Figure
2.32.
translation - 2.30
∑ FM 1
= F S1 + F S2 + M 1 g + F D = M 1 a 1
∑ FM 2
= – F S2 + M 2 g – F D = M 2 a 2
M2
µ k1
K S1
M1 µ k2
ans.
Consider the springs shown in Figure 2.34. When two springs are combined in this
manner they can be replaced with a single equivalent spring. In the parallel spring combi-
nation the overall stiffness of the spring would increase. In the series spring combination
the overall stiffness would decrease.
translation - 2.32
Parallel Series
K S1 K S2
K S1
M K S2
Figure 2.35 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 equation is rearranged into Hooke’s law, and the equivalent spring
coefficient is found.
translation - 2.33
First, draw FBDs for P and M and sum the forces assuming the system is static.
K S1 y 2
K S1
+ ∑ F y = K S1 y 2 – K S2 ( y 1 – y 2 ) = 0 (1)
P
K S2 ( y 1 – y 2 ) P
y2
K S2 ( y 1 – y 2 ) K S2
M
+ ∑ Fy = K S2 ( y 1 – y 2 ) – F g = 0 (2)
Fg
M
y1
Next, rearrange the equations to eliminate y2 and simplify.
(1) becomes K S2 ( y 1 – y 2 ) – Fg = 0
Fg
y 1 – y 2 = ----------
K S2
Fg
y 2 = y 1 – ---------- (3)
K S2
(2) becomes K S1 y 2 – K S2 ( y 1 – y 2 ) = 0
y 2 ( K S1 + K S2 ) = y 1 K S2 (4)
Fg
sub (3) into (4) y – --------- - ( K + K ) = y K
1 K S2 S1 S2 1 S2
Fg K S2
y 1 – ---------- = y 1 ----------------------------
K S2 K S1 + K S2
K S2
F g = y 1 1 – ---------------------------- K S2
K S1 + K S2
K S1 + K S2 – K S2
F g = y 1 -------------------------------------------- K S2
K S1 + K S2
K S1 K S2
F g = y 1 ----------------------------
K S1 + K S2
Finally, consider the basic spring equation to find the equivalent spring coefficient.
K S1 K S2
K equiv· = ----------------------------
K S1 + K S2
K S1 K S2
ans.
Figure 2.36 Drill problem: Find an equivalent spring for the springs in parallel
Consider the drill problem. 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 displace-
ment.
translation - 2.35
Show that a force applied to one side of a massless spring is the reaction force at the other
side.
ans.
Figure 2.37 Drill problem: Prove that the force on both sides is equal
Designing a system in terms of energy content can allow insights not easily
obtained by the methods already discussed. Consider the equations in Figure 2.38. These
equations show that the total energy in the system is the sum of kinetic and potential
energy. Kinetic energy is half the product of mass times velocity squared. Potential energy
in translating systems is a force magnitude multiplied by a distance (that force was applied
over). In addition, the power, or energy transfer rate is the force applied multiplied by the
velocity.
translation - 2.36
E = EP + EK (7)
2
Mv (8)
E K = -----------
2
E P = Fd = Mgd (9)
d- E
P = Fv = ---- (10)
dt
2.5 SUMMARY
1. If a spring has a deflection of 6 cm when exposed to a static load of 200N, what is the spring
constant?
translation - 2.37
2. Derive the effective damping coefficients for the pairs below from basic principles,
a) Kd1
Kd2
b) Kd1 Kd2
M F
x1 x2
K d1
K s1 M1 K s2 M2 F
B
Kd Ks
F
M1 M2
B1 B2
x1 x2
K d1
K s1 M1 K s2 M2 F
x1 x2
K d1 K d2 K d3
K s1 M1 K s2 M2 F
K s3
translation - 2.39
K s2 x2
M2 F
K d1
B
x1
K s1 M1
K s2 x2
M2 F
K d1 µ s, µ k
K s1 M1 x1
M1 x1
K s1
K d1
M2 x2
K s2
K d2
translation - 2.40
12. Write the differential equations for the system below. Assume that the pulley is massless and
frictionless and that the system begins undeflected.
x
K s1 R
M
K s2
13. 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, fric-
tionless pulley.
x1
Ks R
M1
M2 x2
Kd
translation - 2.41
x1
K s1
M1
µ s, µ k
M2 x2
K s2
2.
a) K eq = K d1 + K d2 b) K d1 K d2
K eq = ------------------------
K d1 + K d2
3.
x + x ----- = – -----
·· · B F
M M
4.
Ks –Ks
x 1 + x 1 ------- + x 2 --------- = -------
·· F
M1 M1 M1
Ks –Ks
x 2 + x 2 ------- + x 1 --------- = 0
··
M 2 M2
translation - 2.42
5.
· K d1 K s1 + K s2 – K s2
x 1 + x 1 --------- + x 1 ----------------------- + x 2 ----------- = 0
··
M1 M1 M1
K s2 – K s2
x 2 + x 2 ------- + x 2 -------- + x 1 ----------- = -------
·· · B F
M2 M2 M2 M2
6.
· Kd + B1 Ks –K s
x 1 + x 1 ------------------- + x 1 ------- + x 2 --------- = 0
··
M1 M 1 M1
· B2 Ks –K s
x 2 + x 2 ------- + x 2 ------- + x 1 --------- = -------
·· –F
M2 M2 M2 M2
7.
· K d1 K s1 – K s2
x 1 + x 1 --------- + x 1 -------- + x 2 ----------- = 0
··
M1 M1 M1
Ks
x 1 + x 1 ------- + x 2 + x 2 ------- + x 2 ------- = -------
·· · B ·· · B F
M2 M2 M2 M2
translation - 2.43
8.
FBDs: ··
M 1 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 = – Kd1 x1 – Ks1 x1 – Kd2 ( x1 – x2 ) – Ks2 ( x1 – x 2 ) = M1 x1
·· · ·
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
x 2 + x 2 ------------------------ + x 2 ----------------------- + x 1 ------------ + x 1 ----------- = F
··
M2 M2 M2 M2
9.
·· · ·
x 1 ( M 1 ) + x 1 ( K d1 + B ) + x 1 ( K s1 ) + x 2 ( – B ) = 0
· K d1 + B- K s1 · – B
x 1 + x 1 ------------------ + x 1 -------
·· - + x 2 ------- = 0
M1 M1 M 1
·· · ·
x 2 ( M 2 ) + x 2 ( B ) + x 2 ( K s2 ) + x 1 ( – B ) = F
K s2
x 2 + x 2 ------- + x 2 -------- + x 1 ------- = -------
·· · B · –B F
M 2 M2 M 2 M2
translation - 2.44
10.
·· ·
x 1 ( M 1 ) + x 1 ( K d1 ) + x 1 ( K s1 ) = FF
· 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 · ·
F F = µ k M 2 g ------------------
· · - if x1 ≠ x2
x1 – x2
11.
(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
x 1 + x 1 --------- + x 1 -------- + x 2 ------------ + x 2 ----------- = -------
·· F
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
12.
if ( x ≥ 0 ) T = 0
if ( x < 0 ) T = –K s2 x
K s1
x + x ------- + x -------- = -------
·· · B T
M1 M1 M1
translation - 2.45
13.
FBDs: Ks x 1 T T
· M1 ··
Bx 1 ·· M2 M2 x2
M1 x1
· ·· ·
For M1: +
∑ F = – Ks x1 – Bx 1 + T = M1 x1 M2 g Kd x2
·· ·
x1 ( M1 ) + x1 ( B ) + x1 ( Ks ) = T
Ks
x 1 + x 1 ------- + x 1 ------- = -------
·· · B T
M 1 M 1 M1
For M2:
· ··
+ ∑F = T + Kd x2 – M2 g = –M2 x2
·· ·
x2 ( – M2 ) + x2 ( –K d ) = T – M 2 g
· Kd T – M2 g
x 2 + x 2 ------- = --------------------
··
M 2 –M2
14.
if ( ( x 2 – x 1 ) < 0 ) T = 0
·
if ( x 1 = 0 ) F F ≤ M 1 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
x 2 + x 2 -------- = ------- – g
·· –T
M2 M2
Topics:
• First and second-order homogeneous differential equations
• Non-homogeneous differential equations
• First and second-order responses
• Non-linear system elements
• Design case
Objectives:
• To develop explicit equations that describe a system response.
• To recognize first and second-order equation forms.
3.1 INTRODUCTION
Figure 3.1 shows an abstract description of a system. The basic concept is that the
system changes the inputs to outputs. Say, for example, that the system to be analyzed is
an elevator. Inputs to the system would be the mass of human riders and desired elevator
height. The output response of the system would be the actual height of the elevator. For
analysis, the system model could be developed using differential equations for the motor,
elastic lift cable, mass of the car, etc. A basic test would involve assuming that the elevator
starts at the ground floor and must travel to the top floor. Using assumed initial values and
input functions the differential equation could be solved to get an explicit equation for ele-
vator height. This output response can then be used as a guide to modify design choices
(parameters). In practice, many of the assumptions and tests are mandated by law or by
groups such as Underwriters Laboratories (UL), Canadian Standards Association (CSA)
and the European Commission (CE).
differential equations - 3.2
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, such as very rapidly changing a desired speed
from 0Hz to 50Hz.
• ramp - a continuously increasing input, such as a motor speed that increases con-
stantly 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 system can be analyzed to determine its behavior. The
most fundamental technique is to integrate the differential equation(s) for the system.
The basic types of differential equations are shown in Figure 3.2. Each of these
equations is linear. On the left hand side is the integration variable ’x’. If the right hand
side is zero, then the equation is homogeneous. Each of these equations is linear because
each of the terms on the left hand side is simply multiplied by a linear coefficient.
differential equations - 3.3
·
Ax + Bx = 0 first-order homogeneous
·
Ax + Bx = Cf ( t ) first-order non-homogeneous
·· ·
Ax + Bx + Cx = 0 second-order homogeneous
·· ·
Ax + Bx + Cx = Df ( t ) second-order non-homogeneous
x0 = X
– 2t
ans. x ( t ) = 3e
Given,
Ax·· + Bx· + Cx = 0 x ( 0 ) = x0 and x· ( 0 ) = v 0
Guess a general equation form and substitute it into the differential equation,
Yt Yt 2 Yt
x h = Xe x· h = YXe x··h = Y Xe
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 ) – B ± B – 4AC
Y = ---------------------------------------------------- = ------------------------------------------
2A 2A
Note: There are three possible outcomes of finding the roots of the equa-
tions: 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.
If the values for Y are both real, and identical, the general form is,
R1t R1 t
Y = R 1, R 1 xh = X1 e + X 2 te
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.
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 + C j )t ( R – Cj )t
x = X1 e + X2e
Rt Cjt Rt – Cjt
x = X1 e e + X2 e e
x = e X1 e
Rt Cjt – Cjt
+ 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 ( ( X1 + X 2 ) cos ( Ct ) + j ( X 1 – X 2 ) sin ( Ct ) )
Rt
x = e ( ( X1 + 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 – X2 ) sin ( Ct ) )
2 2 2
( X1 + X2 ) + j ( X1 – X2 )
X 1 + 2X 1 X 2 + X 2 – X 1 + – 2 X 1 X 2 + X 2
2 2 2 2
Rt
x = e ------------------------------------------------------------------------------------------------------------- ( ( X 1 + X 2 ) cos ( Ct ) + j ( X 1 – X 2 ) sin ( C
X 1 + 2X 1 X 2 + X 2 – X 1 + – 2 X 1 X 2 + X 2
2 2 2 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 - cos ( Ct ) + j -----------------------
4X 1 X2 ------------------------ - sin ( Ct )
4X X 4X 1 X 2
1 2
Rt ( X1 – X2 )
x = e 4X 1 X 2 cos Ct + atan -------------------------
( X1 + X 2 )
Rt
x = e X3 cos ( Ct + X 4 ) where, X = 4X 1 X 2
3
( X1 – X2 )
X 4 = atan -------------------------
frequency phase shift ( X 1 + X 2 )
Figure 3.6 Phase shift solution for a second-order homogeneous differential equation
differential equations - 3.8
Note: Occasionally a problem solution might consist of both a sine and cosine term with
the same frequency. These should normally be combined to a single term with a phase
shift as shown below.
2 2
A = B +C
–t –t
ans. x ( t ) = e + 3te
The methods for solving non-homogeneous differential equations builds upon the
methods used for the solution of homogeneous 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 3.9. To find the homogeneous solution the non-
homogeneous part of the equation is set to zero. To find the particular solution the final
differential equations - 3.10
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 conditions, and the particular solution deals with the response to forced inputs.
Generally,
Ax· + Bx = Cf ( t ) x ( 0 ) = x0
First, find the homogeneous solution as before, in Figure 3.3.
–B
---t
A
xh = x0 e
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 hap-
pens, 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 forcing function.
For example, if we are given
4t
6x· + 2x = 5e
A reasonable guess for the particular solution is,
4t 4t
xp = C1 e \x· p = 4C 1 e
5-
24C 1 + 2C 1 = 5 ∴C 1 = -----
26
Combine the particular and homogeneous solutions.
– 6--- t
5- e 4t + x e 2
x = x p + x h = ----- 0
26
Generally,
Ax·· + Bx· + Cx = Df ( t ) x( 0 ) = x0 and x· ( 0 ) = v 0
1. Find the homogeneous solution as before.
σt
x h = X 3 e cos ( ω t + X4 )
or σt σt
x h = X 1 e + X 2 te
or σ1 t σ2 t
xh = X1 e + X2 e
2. Guess the particular solution by looking at the form of ’f(t)’. This step is highly sub-
jective, and if an incorrect guess is made it will be unsolvable. When this happens,
just make another guess and repeat the process. For the purpose of illustration an
example is given below. In the case below it should be similar to the sine function.
For example, if we are given
2x·· + 6x· + 2x = 2 sin ( 3t + 4 )
A reasonable guess is,
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.
2 ( – 9 A sin ( 3t ) – 9B cos ( 3t ) ) + 6 ( 3A cos ( 3t ) – 3B sin ( 3t ) ) +
2 ( A sin ( 3t ) + B cos ( 3t ) ) = 2 sin ( 3t + 4 )
( – 18 A – 18B + 2A ) sin ( 3t ) + ( – 18 B + 18A + 2B ) cos ( 3t ) = 2 sin ( 3t + 4 )
( – 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.
x p = – 0.0109 sin ( 3t ) + 0.0823 cos ( 3t )
π
– 0.0109 + 0.0823 sin 3t + atan ------------------- + ---
2 2 0.0823
xp =
–0.0109 2
3. Use the initial conditions to determine the coefficients in the homogeneous solution.
When guessing particular solutions, the forms in Figure 3.11 can be helpful.
–t –t
ans. x ( t ) = – e – te + 1
the homogeneous equation. Real roots are assumed thus allowing the problem solution to
continue in Figure 3.14.
Mg
My··
+ ∑ Fy = – Mg + K s y + K d y· = – M y··
Ksy K d y·
My·· + K d y· + K s y = Mg
Find the homogeneous solution.
At At 2 At
yh = e y· h = Ae y··h = A e
My·· + K d y· + K s y = 0
2 At
M A e + K d ( Ae ) + K s ( e ) = 0
At At
2
MA + K d A + K s = 0
2
– K d ± 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
y h = C1 e + C2 e
The solution continues by assuming a particular solution and calculating values for
the coefficients using the initial conditions in Figure 3.14. The final result is a second-
order system that is overdamped, with no oscillation.
differential equations - 3.15
Given,
A sin ( ω t + θ ) (the desired final form)
A ( cos ω t sin θ + sin ω t cos θ )
( A sin θ ) cos ω t + ( A cos θ ) sin ω t
B cos ω t + C sin ω t (the form we start with)
where, B = A sin θ
C = A cos θ
To find theta,
A sin θ- = tan θ
B- = ---------------
---
C A cos θ
θ = atan ----
B
C
To find A, (method #1)
B C-
A = ----------
- = -----------
sin θ cos θ
To find A, (method #2)
2 2
A = B +C
For example,
3 cos 5t + 4 sin 5t
3.3 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
differential equations - 3.17
3.3.1 First-order
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 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. Assum-
ing the change started at t=0, the time at this point corresponds to the time constant.
differential equations - 3.18
y
t
y0 –-
τ y· + --1- y = f ( t )
y ( t ) = y 1 + ( y 0 – y 1 )e τ
y1 time constant
The example in Figure 3.17 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 differ-
ential equation. The time constant can be found by drawing a line asymptotic to the start of
the motor curve, and finding the point where it intercepts the steady-state value. This gives
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.
differential equations - 3.19
For the motor, use the differential equation and the speed curve when Vs=10V is applied:
1s 2s 3s
For steady-state
----
d- –1
dt ω = 0 ω = 1400RPM = 146.6rads
K 2
0 + ------- 146.6 = ------ 10
K
JR JR
K = 0.0682
1400 RPM
τ ª 0.8s
1s
K 2 1
------- = ----------
JR 0.8s
0.0682 ------ = ---------
K 1-
JR 0.8s
K- = 18.328
-----
JR
ω· + ------1-
ω = 18.328Vs
0.8
1800 RPM 2
----
d- -----
K -----
K-
dt ω + JR ω = JR V s
-
----
d- 1 1800
ω + ---------- ω = --------------------- V s
ans. dt 0.15 12 ( 0.15 )
Figure 3.18 Drill problem: Find the constants for the equation
A simple mechanical example is given in Figure 3.19. The modeling starts with a
FBD and a sum of forces. After this, the homogenous solution is found by setting the non-
homogeneous part to zero and solving. Next, the particular solution is found, and the two
solutions are combined. The initial conditions are used to find the remaining unknown
coefficients.
differential equations - 3.21
F
y
Ks Kd
d- y = 0
+ ∑ F y = – F + K s y + K d ----
dt
K d ----- y
d
Ks y dt K d y· + K s y = F
Find the homogeneous solution.
Bt Bt
y h = Ae y· h = ABe
Bt Bt
K d ( ABe ) + K s ( Ae ) = 0
Kd B + K s = 0
–K
B = ---------s
Kd
Next, find the particular solution.
yp = C y· p = 0
Kd ( 0 ) + K s ( C ) = F F-
∴C = -----
Ks
Combine the solutions, and find the remaining unknown.
–Ks
---------t
Kd
F-
y ( t ) = y p + y h = Ae + -----
Ks
y(0) = h
0 F F
h = Ae + ----- - ∴A = h – ------
Ks K s
The final solution is,
–Ks
--------- t
Kd
y ( t ) = h – ----- e
F F
+ -----
Ks Ks
Use the general form given below to solve the problem in Figure 3.19 without solving
the differential equation. Assume the system starts at y=-20.
t
– --
· τ
y + 10y = 5 y ( t ) = y 1 + ( y 0 – y 1 )e
ans. – 10t
y ( t ) = 0.5 – 19.5e
Figure 3.20 Drill problem: Developing the final equation using the first-order model
form
3.3.2 Second-order
–σ t
y ( t ) = y ss + ( y 0 – y ss )e cos ( ω d t )
y ss
y0
When only the damping coefficient is increased, the frequency of oscillation, and
overall response time will slow, as seen in Figure 3.22. When the damping coefficient is 0
the system will oscillate indefinitely. Critical damping occurs when the damping coeffi-
differential equations - 3.24
cient is 1. At this point both roots of the differential equation are equal. The system will
not oscillate if the damping coefficient is greater than or equal to 1.
ξ = 0
ξ = 0.5
(underdamped)
1- = 0.707
ξ = ------
2
ξ = 1 (critical)
(overdamped)
ξ»1
When observing second-order systems it is more common to use more direct mea-
surements of the response. Some of these measures are shown in Figure 3.23. The rise
differential equations - 3.25
time is the time it takes to go from 10% to 90% of the total displacement, and is compara-
ble to a first order time constant. The settling time indicates how long it takes for the sys-
tem 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 oscil-
lation can be measured directly as the time between peaks of the oscillation, the inverse is
the damping frequency. (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
coefficient can be found.
0.02 ∆ x b
0.02 ∆ x
0.9 ∆ x tr where,
ts
t r = rise time (from 10% to 90%)
∆x t s = settling time (to within 2-5% typ.)
0.5 ∆ x ∆ x = total displacement
T, f d = period and frequency - damped
b = overshoot
0.1 ∆ x t p = time to first peak
e ss = steady state error
–σ t π
x = ∆ xe cos ( ω d t ) ω d ≈ ---- (1)
tp
σ = ξω n (2)
–σ tp
b- = e
----- (3)
∆x
1
ξ = ----------------------------- (4)
π - 2
-------
t p σ + 1
Note: We can calculate these relationships using the complex homogenous form, and the
generic second order equation form.
2 2
A + 2ξω n A + ω n = 0
2 2 2
– 2ξω n ± 4ξ ω n – 4ω n
A = ----------------------------------------------------------- = σ ± jω d
2
– 2ξωn σ
---------------- = σ = – ξω n ω n = ------ (1)
2 –ξ
2 2 2
4ξ ω n – 4ω n
----------------------------------- = jω d
2
2 2 2 2
4ξ ω n – 4ω n = 4 ( – 1 )ω d
2
ωn – ξ ωn = ωd
2 2 2
ωn 1 – ξ = ωd
2 (2)
2 2
------ – ξ 2 σ
σ
------ = ω 2d
2 2
ξ ξ
1
1- ωd
2 ξ = --------------------
2 (3)
----
2
= ------ + 1
2 ωd
ξ σ ------ + 1
2
σ
The time to the first peak can be used to find the approximate decay constant
– σt
x ( t ) = C1e cos ( ω d t + C 2 )
π
ω d = ---- (4)
tp
– σt p
b ≈ ∆xe (1)
ln ------
b (5)
∆x
σ = – ------------------
tp
Figure 3.24 Second order relationships between damped and natural frequency
differential equations - 3.27
2.2
y(t)
2.0
t
0
4.0 5.0
Write a function of time for the graph. (Note: measure, using a ruler, to get val-
ues.) Find the natural frequency and damping coefficient to develop the dif-
ferential equation. Using the dashed lines determine the settling time.
ans.
t<4 y(t) = 0
t≥4 y(t) =
Figure 3.25 Drill problem: Find the equation given the response curve
differential equations - 3.28
The basic techniques used for solving first and second-order differential equations
can be applied to higher order differential equations, although the solutions will start to
become complicated for systems with much higher orders. The example in Figure 3.27
shows a fourth order differential equation. In this case the resulting homogeneous solution
yields four roots. The result in this case are 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-homo-
geneous term is a constant.
differential equations - 3.29
d- 4
---- d 3 d 2
x + 13 ----- x + 34 ----- x + 42 ----- x + 20x = 5
d
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
---- x = A e x = A e x = A e
dt h dt h dt h dt h
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 )
0 + 13 ( 0 ) + 34 ( 0 ) + 42 ( 0 ) + 20A = 5 A = 0.25
The example is continued in Figure 3.28 and Figure 3.29 where the initial condi-
tions are used to find values for the coefficients in the homogeneous solution.
differential equations - 3.30
Solve for the unknowns, assuming the system starts at rest and undeflected.
–t –10t –t
x ( t ) = C1 e + C 2 e + C 3 e cos ( t + C 4 ) + 0.25
0 = C 1 + C 2 + C 3 cos ( C 4 ) + 0.25 (1)
C 3 cos ( C 4 ) = – C 1 – C 2 – 0.25 (2)
Equations (1) and (3) can be added to get the simplified equation below.
0 = – 9C 2 – C 3 sin ( C 4 ) + 0.25
C 3 sin ( C 4 ) = – 9C 2 + 0.25 (4)
d- 2
---- –t – 10t –t –t
x ( t ) = C e + 100C e + C e cos ( t + C ) + C 3 sin ( t + C 4 ) +
e
dt h 1 2 3 4
–t –t
C 3 e sin ( t + C 4 ) – C 3 e cos ( t + C 4 )
0 = C1 + 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 + 2C 3 sin ( C 4 ) (5)
Equations (4) and (5) can be combined.
0 = C 1 + 100C 2 + 2 ( – 9C 2 + 0.25 )
0 = – 17C 1 + 100C 2 + 0.5 (6)
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 ) (7)
C 1 = – --------- C 2 – ---
984 1 (8)
3 3
Equations (6) and (8) can be combined.
In some cases we will have systems with multiple differential equations, or non-
linear terms. In these cases explicit analysis 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.
Up to this point we have mostly discussed the process of calculating the system
response. As an engineer, obtaining the response is important, but evaluating the results is
more important. The most critical design consideration is system stability. In most cases a
system should be inherently stable in all situations, such as a car "cruise control". In other
differential equations - 3.32
cases an unstable system may be the objective, such as an explosive device. Simple meth-
ods for determining the stability of a system are listed below:
Beyond establishing the stability of a system, we must also consider general per-
formance. This includes the time constant for a first-order system, or damping coefficient
and natural frequency for a second-order system. For example, assume we have designed
an elevator that is a second-order system. If it is under damped the elevator will oscillate,
possibly leading to motion sickness, or worse. If the elevator is over damped it will take
longer to get to floors. If it is critically damped it will reach the floors quickly, without
overshoot.
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. Fig-
ure 3.30 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.
differential equations - 3.33
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 homogeneous solution might have steady state
effects, such as a non-decaying oscillation.
· 2
x+x = 5
Note: the sources of non-
·2 linearity are circled.
x +x = 5
·
x + log ( x ) = 5
·
x + ( 5t )x = 5
• aerodynamic drag
• forces that are a squared function of distance
• devices with non-linear responses
Explicitly solving non-linear differential equations can be difficult, and will typi-
cally involve complex solutions for simple problems.
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 – Mg = – My··
m
2 ∑ F y = 0.8 ( y
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
s - ( y· ) 2 = 981kg ----
m- ------ m-
100kgy·· + 0.8kg ----
2 2 2
–1 2 s m –2 s
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
9.81ms - = -------------------9.81 - m 2 s – 2 = 35.0 m
y· = ------------------------------ ---- = 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
3.33. 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 3.34 and Figure 3.35. The
final form of the equation is non-trivial, but contains e-to-t terms, as we would expect.
differential equations - 3.36
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
-------------------------------------------------
–2 –1 2
dv = dt
981ms – 0.8m v
100
--------------------
–1
–0.8m
∫ 981 –2 2- dv = ∫ dt
--------------------------------------------
-------------------- ms + v
–1
– 0.8m
– 125m
∫ --------------------------------------------
2
v – 1226.25m s
2 –2
- dv = t + C1
– 125m
∫ -----------------------------------------------------------------
m m
- dv = t + C1
v + 35.02 ---- v – 35.02 ----
s s
A B
∫ --------------------------------
v + 35.02 m m
- dv = t + C 1
- + -------------------------------
---- v – 35.02 ----
s s
Av – A 35.02 ---- + Bv + B 35.02 m ---- = – 125m
m
s s
m
v ( A + B ) + 35.02 ---- ( – A + B ) = – 125m
s
A+B = 0 A = –B
1.785s – 1.785s - dv = t + C
∫ --------------------------------- + -------------------------------
v + 35.02 m v – 35.02 m
1
---- ----
s s
The integral can then be solved using an identity from the integral table. In this case
the integration constants can be left off because they are redundant with the one on
the right hand side.
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 ---- ---------------
1.785s 1 = C2
s
---------------------------- = C 2 e
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
----------------
m
----------------
m
v1 − −
1.785s 1.785s
+ e = + 35.02 ---
- e – 35.02 ----
s s
----------------
t
− m −
0 = 35.02 ---- +
1.785s 1 – 1
+ = ------------- = ---
m e – 1 1–1 0
v = 35.02 ---- ---------------------------- - ----------------
s s 1+1 − 1 + 1 2
t -
---------------
1−+e
1.785s
---------------
t -
m e 1.785s
– 1
v = 35.02 ---- ----------------------- -
s ----------------
t
1 + e 1.785s
Figure 3.35 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 pre-
ferred.
If our models include a device that is non-linear and we want to use a linear tech-
differential equations - 3.39
nique 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.
Assume we have the non-linear differential equation below. It can be solved by lin-
earizing 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
– 0.316 ( 0.1 )
y ( 0.1 ) = – 40e + 50 = 11.24
d- y ( 0.1 ) = – 40 ( – 0.316 )e – 0.316 ( 0.1 ) = 12.25
---- Note: a small change
dt
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.
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 3.38. A mass is pulled by a springy cable. The
differential equations - 3.42
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 components are at
rest and undeflected.
x2
x 1 = 0.1 m
---- t
N- s
K s = 1000 ---
m
µ k = 0.1
M = 100kg
µ s = 0.3
An FBD and equation can be developed for the system. The friction force will be left as
a variable at this point.
x2
x 1 = 0.1 m
---- t
N- s
K s = 1000 ---
m
µ k = 0.1
M = 100kg
µ s = 0.3
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
d- x £ 0 m
static friction ---- ----
dt 2 s
0N £ F F < µ s N < 294.3N
d- x > 0 m
kinetic friction ---- ----
dt 2 s
F F = µ 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
m
x 2 + 10s x 2 = 1 ----- 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
Therefore the system is static from 0 to 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.
·· –2 98.1N-
m- t – --------------
x 2 + 10s x 2 = 1 ----
3 100kg
s
For the homogeneous,
·· –2
x 2 + 10s x 2 = 0
–2 –1
A + 10s = 0 A = ± 3.16js
x h = C 1 sin ( 3.16t + C 2 )
For the particular,
· ··
x p = At + B xp = A xp = 0
–2 98.1N-
m- t – --------------
0 + 10s( At + B ) = 1 ----
3 100kg
s
–2 m-
10s A = 1 ---- A = 0.1 m
----
3 s
s
–2 98.1N
10s B = – --------------- B = – 0.0981m
100kg
x ( 2.943s ) = 0m d- x ( 2.943s ) = 0 m
---- ----
dt s
The equation of motion changes after the cable becomes slack. This point in time can
be determined when the displacement of the block equals the displacement of the
cable/spring end.
m m
0.1 ---- t = – 0.199 m sin ( 3.16t – 7.889rad ) + 0.1 ---- t – 0.0981m
s s
– 0.199 m sin ( 3.16t – 7.889rad ) = 0.0981m
3.16t – 7.889 + π n = – 0.51549413 t = 3.328s
d- m
x ( 3.328 ) = 0.137m ---- x ( 2.333 ) = 0.648 ----
dt s
After this the differential equation without the cable/spring is used.
98.1N m
x 2'' = – --------------- = – 0.981 ---2-
100kg s
x 2 = – 0.981 ----2 t + C 1
· m
s
0.648 ---- = – 0.981 ----2 ( 3.328s ) + C 1
m m
s s
m
C 1 = 3.913 ----
s
0.981 m 2 m
x 2 = – ------------- ----2 t + 3.913 ---- t + C 2
2 s s
0.137m = – ------------- ---2- ( 3.328s ) + 3.913 ---- ( 3.328s ) + C 2
0.981 m 2 m
2 s
s
C 2 = – 7.453m
The solution can continue, considering when to switch the analysis conditions.
There are a number of elements to the design and analysis of this system, but as
usual the best place to begin is by developing a free body diagram, and a differential equa-
tion. This is done in Figure 3.45.
differential equations - 3.48
F
+ ∑ Fy = F – 4K s y – 4K d y· + Mg = My··
M y
My'· + 4K d y· + 4K s y = F + Mg
4K d y· 4K s y F- + g
··y + ------------
- + ------------ = ---- 4K s y 4K d y· Mg
M M M
4K d y· 4K s y 1000N - sin ( 2 ( 2 π )t ) + 9.81ms – 2
y·· + ---------------------
- + ---------------------
- = ---------------------
10000Kg 10000Kg 10000Kg
–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 3.46.
When the system is at rest the equation is simplified; the acceleration and velocity
terms both become zero. In addition, 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 s y = 9.81ms
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
The remaining unknown is the damping coefficient. At this point we have deter-
mined the range of motion of the mass. This can be done by developing the particular
differential equations - 3.49
solution of the differential equation, as it will contain the steady-state oscillations caused
by the forces as shown in Figure 3.47.
·· –1 · –1 –1 –2 –2
y + 0.0004Kg K d y + 0.0004Kg ( 491KNm )y = 0.1ms sin ( 4 π t ) + 9.81ms
·· –1 · –2 –2 –2
y + 0.0004Kg K d y + 196s y = 0.1ms sin ( 4 π t ) + 9.81ms
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
y' = 4 π A cos ( 4 π t ) – 4 π B sin ( 4 π t )
2 2
y'' = – 16 π A sin ( 4 π t ) – 16 π B cos ( 4 π t )
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 d – 0.124
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 coefficient that will give an
overall oscillation of 0.02m, as shown in Figure 3.48. 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.
differential equations - 3.50
In the previous particular solution the values were split into cosine and sine compo-
nents. The magnitude of oscillation can be calculated with the Pythagorean formula.
2 2
magnitude = A +B
2
( 0.1 ) + ( 3.18 ⋅ 10 )K d – 0.124
2 –6
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
( 0.1 ) + ( 3.18 ⋅ 10 )K d – 0.124
2 –6
0.01 = ---------------------------------------------------------------------------------------------------------------
2 –9 –3
K d ( – 159 ⋅ 10 ) + K d ( – ( 6.2 ⋅ 10 ) ) + 38.1
A given-find block was used in Mathcad to obtain a damper value of,
The values of the spring and damping 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 com-
panies.
differential equations - 3.51
3.7 SUMMARY
1. 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.
M F
2. 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.
+ ··
N ∑ Fy = K s y – Mg = – My
K s = 100 ----
m 100 ---
N-
y – ( 1Kg ) 9.81 ------- = ( – 1Kg )y
N ··
m Kg
y 1 Nm
-------- y·· + 100 ---- y = 9.81N
N
M = 1Kg
2 m
s
( 1Kg )y + 100 -----------
·· Kgm- Kgm-
y = 9.81 -----------
2 2
FBD: Ks y ms s
·· –2 –2
M y + ( 100s )y = 9.81ms
· –1
y = 0m y 0 = 0ms
Mg 0
3. Solve the following differential equation with the three given cases. All of the systems have a
differential equations - 3.52
case 2: ξ = 1 ω n = 10
case 3: ξ = 2 ω n = 10
4. Solve the following differential equation with the given initial conditions and draw a sketch of
the first 5 seconds. The input is a step function that turns on at t=0.
·· ·
0.5V o + 0.6V o + 2.1V o = 3V i + 2 initial conditions V i = 5
Vo = 0
·
Vo = 0
5. Solve the following differential equation with the given initial conditions and draw a sketch of
the first 5 seconds. The input is a step function that turns on at t=0.
·· ·
0.5V o + 0.6V o + 2.1V o = 3V i + 2 initial conditions V i = 5
Vo = 0
·
Vo = 1
6. a) Write the differential equations for the system below. Solve the equations for x assuming that
differential equations - 3.53
the system is at rest and undeflected before t=0. Also assume that gravity is present.
Kd1 = 1 Ns/m
Ks1 = 1 N/m Kd = 1 Ns/m
M = 1 kg
x1
Kd2 = 1Ns/m
Ks2 = 1 N/m
F=1N x
Ks = 1 N/m
x2
F=1N
7. Solve the following differential equation with the three given cases. All of the systems have a
sinusoidal input ’y’ and start undeflected and at rest.
·· · 2 ·
x + 2ξωn x + ω n x = y initial conditions x = 0
x = 0
y = sin ( t )
case 1: ξ = 0.5 ω n = 10
case 2: ξ = 1 ω n = 10
case 3: ξ = 2 ω n = 10
8. A spring damper system supports a mass of 34N. If it has a spring constant of 20.6N/cm, what
is the systems natural frequency?
9. Using a standard lumped parameter model the weight is 36N, stiffness is 2.06*103 N/m and
damping is 100Ns/m. What are the natural frequency (Hz) and damping ratio?
differential equations - 3.54
10. 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?
11. A system is to be approximated with a mass-spring-damper model using the following param-
eters: weight 28N, viscous damping 6Ns/m, and stiffness 36N/m. Calculate the undamped nat-
ural 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
12. Solve the differential equation below using homogeneous and particular solutions. Assume
the system starts undeflected and at rest.
··· ·· ·
θ + 40θ + 20θ + 2θ = 4
13. What would the displacement amplitude after 100ms for a 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. (Hint: Find the response as a function of time.)
14. Determine the first order differential equation given the graphical response shown below.
Assume the input is a step function.
x
4
t(s)
0 1 2 3 4
15. Explain with graphs how to develop first and second-order equations using experimental data.
16. The second order response below was obtained experimentally. Determine the parameters of
differential equations - 3.55
the differential equation that resulted in the response assuming the input was a step function.
0.5s
1s
10
0 t(s)
17. Develop equations (function of time) for the first and second order responses shown below.
x (m)
5m
0m
0.1s 0.2s 0.3s 0.4s 0.5s 0.6s 0.7s 0.8s t (s)
x (m)
5m
0m
1s 3s t (s)
-10m
differential equations - 3.56
1.
B
-----
– FM- – M t F FM-
x ( t ) = -----------
2
e – --- t + --------
2
B B B
2.
homogeneous: 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 )
particular: guess · ··
yp = A yp = 0 yp = 0
–2 –2
( 0 ) + ( 100s )A = 9.81ms
–2 –2
( 100s )A = 9.81ms
–2
9.81ms -
A = ---------------------
–2
= 0.0981m
100s
y p = 0.0981m
3.
– 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
4.
– 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
5.
– 0.6t
V 0 ( t ) = – 8.331e cos ( 1.96t – 0.238 ) + 8.095
6.
a) b)
–t
x1 ( t ) = e – 1 – 0.5t
x ( t ) = – 12.485e cos ( 0.866t – 0.524 ) + 10.81
–t
x 2 ( t ) = 2e – 2
ζ = 0.5 ωn = 1
τ = 1
7.
case 1: – 5t
x ( t ) = – 0.00117e sin ( 8.66t – 1.061 ) + 0.0101 sin ( t – 0.101 )
case 2: –3 – 10t –3 – 10t –3
x ( t ) = ( 1.96 ⋅ 10 )e + ( 9.9 ⋅ 10 )te + ( 9.9 ⋅ 10 ) sin ( t + 0.20 )
case 3: –3 – 2.679t –6 – 37.32t –3
x ( t ) = ( 3.5 ⋅ 10 )e – ( 18 ⋅ 10 )e + ( 9.4 ⋅ 10 ) sin ( t + 0.382 )
8. 24.37 rad/sec
9. fn=3.77Hz, damp.=.575
differential equations - 3.58
10.
·· ·
x + 8.048x + 77.88x = F ( t )
11.
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,
·· · K d Ks
x + x ------ + x ----- = -----
F
M M M
The second order parameters can be calculated from this.
·· · 2
x + x ( 2ζω n ) + x ( ω n ) = y ( t )
N kgm
36 ---- 36 ---------2-
Ks m = ms - = –2 rad
ωn = ----- = ---------------- ---------------- 12.63s = 3.55 --------- = 0.6Hz
M 2.85kg 2.85kg s
K d
----- s
- 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.52Hz
K -----d-
M Kd Ns
ξ = ------------ = --------------------------------------------- = 1.00 K d = 20.2 ------
m
2ω n rad
2 ( 3.55 ) --------- 2.85kg
s
12.
13.
π
sin 12.74t + ---
– 2.6t – 2.6t
y ( t ) = 0.05e cos ( 12.74t ) = 0.05e
2
14.
x
4
t(s)
0 1 2 3 4
τ = 1
Given the equation form,
· 1
x + --- x = A
τ
The values at steady state will be
·
x = 0 x = 4
So the unknown ‘A’ can be calculated.
1 A = 4
0 + --- 4 = A
1
· 1
x + --- x = 4
1
·
x+x = 4
15.
Key points:
First-order:
find initial final values
find time constant with 63% or by slope
use these in standard equation
Second-order:
find damped frequency from graph
find time to first peak
use these in cosine equation
differential equations - 3.60
16.
For the first peak:
b- – σt
----- = e p
∆x
π
2- – σ0.5 ω d ≈ ----
----- = e tp
10
ln ------ = – σ0.5
2
10
σ = – 2 ln ------ = 3.219
2
10 1
ξ = -----------------------------
For the damped frequency: π - 2
------- +1
2π t p σ
ω d = ------ = 2π
1s
These values can be used to find the damping coefficient and natural frequency
3.219
σ = ξω n ω n = -------------
ξ
2
ωd = ωn 1 – ξ
3.219 2
2π = ------------- 1 – ξ
ξ
2
2π - 2
------------ 1 – ξ-
= -------------
3.219 2
ξ
1
2π - 2
------------ 1 ξ = ------------------------------
- = 0.4560
+ 1 = ----2-
3.219 2π - 2
------------
ξ 3.219 + 1
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ξωn x + ω n x = 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
differential equations - 3.61
17.
–t
----------
0.18 – 0.693 t
x(t) = 51 – e x ( t ) = – 10e cos ( πt )
1. A mass-spring-damper system has a mass of 10Kg and a spring coefficient of 1KN/m. Select a
damping coefficient so that the system will have an overshoot of 20% for a step input.
numerical methods - 4.1
4. NUMERICAL ANALYSIS
Topics:
• State variable form for differential equations
• Numerical integration with software and calculators
• Numerical integration theory: first-order, Taylor series and Runge-Kutta
• Using tabular data
• A design case
Objectives:
• To be able to solve systems of differential equations using numerical methods.
4.1 INTRODUCTION
This chapter focuses on techniques that can be used for numerically integrating
systems of differential equations.
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 iden-
tifying state variables are:
After the state variables of a system have been identified, they can be used to write
first-order state variable equations. The general form of state variable equations is shown
in Figure 4.1. Notice that the state variable equation is linear, and the value of x is used to
calculate the derivative. The output equation is not always required, but it can be used to
calculate new output values.
----
d-
state variable equation
dt x = Ax + Bu
y = Cx + Du output equation
where,
x = state/output vector (variables such as position)
u = input vector (variables such as input forces)
A = transition matrix relating outputs/states
B = matrix relating inputs to outputs/states
y = non-state value that can be found directly (i.e. no integration)
C = transition matrix relating outputs/states
D = matrix relating inputs to outputs/states
Given the FBD shown below, the differential equation for the system is,
F K d x·
M
x Ksx
+
∑ Fx = – F – K d x· – K s x = Mx··
– F – K d x· – K s x = Mx··
Mx··
The equation is second-order, so two state variables will be needed. One obvious
choice for a state variable in this equation is ’x’. The other choice can be the veloc-
ity, ’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 (1)
Mx·· = – F – K d x· – K s x
Mv· = – F – K d v – K s x
–Ks –Kd
v· = x --------- + v ---------- + ------
–F (2)
M M M
Equations (1) and (2) can also be put into a matrix form similar to that given in Fig-
ure 4.1.
0 1 0
d x = – K – K x + –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 developed using an unexploited relation-
ship. If there are too many equations, a redundancy or over constraint must be
eliminated.
· F
ans. x· = v v = -----
M
0
d- x 0 1 x
---- = + F
dt v 0 0 v -----
M
Figure 4.3 Drill problem: Put the equation in state variable form
Consider the two cart problem in Figure 4.4. The carts are separated from each
other and the wall by springs, and a force is applied to the left hand side. Free body dia-
grams 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 equa-
tions are then put into the state variable matrix form.
numerical methods - 4.5
x1 x2
F K s1 K s2
M1 M2
··
F K s1 ( x 1 – x 2 ) +
∑ Fx = 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
M1 x1 ·
x1 = v1 (1)
·
M 1 v 1 + K s1 x 1 – K s1 x 2 = F
· F- – K s1 + K s1
v 1 = ------- ---------x 1 ---------x (2)
M1 M1 M1 2
··
K s1 ( x 1 – x 2 ) K s2 ( x 2 ) +
∑ Fx = K s1 ( x 1 – x 2 ) – K s2 ( x 2 ) = M 2 x 2
M2 ··
M 2 x 2 + ( K s1 + K s2 )x 2 – K s1 x 1 = 0
·· ·
M2 x2 x2 = v2 (3)
·
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 2 (4)
M2 1 M2
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 v1 M1 M1 v1 -------
----- = + M1
dt x 0 0 0 1 x
2 2 0
v2 K s1 – K s1 – K s2 v2
--------- 0 ----------------------------- 0 0
M2 M2
Kd
M Ks
ans.
·
x = v
Kd Ks
v = v ------ + x -----
·
M M
Figure 4.5 Drill problem: Develop the state equations in matrix form
numerical methods - 4.7
x1 x2
K d1
F K s2
M1 K s1 M2
ans. x· = v
1 1
·
x2 = v2
– K d1 – K s1 K d1 K s1
v 1 = v 1 ------------ + x 1 ----------- + v 2 --------- + x 2 -------- + -------
· F
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
Figure 4.7 Using dummy variables for multiple high order terms
x1
x2
F Kd
M
· F- (5)
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 q ------
0 0 0 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 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.
An example in Figure 4.9 shows the first four steps for a mass-spring-damper com-
bination. 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.
numerical methods - 4.11
KS Kd Ks y K d y·
----
d- d- 2
----
M ∑ y
F = – F – K d dt y – K s y = M dt y
y
d 2
F + K d ----- y + K s y + M ----- y = 0
M F d
My·· dt dt
F
Step 2: We need to identify state variables. In this case the height is clearly a defining vari-
able. 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
– F – Kd v – K s y
----
d-
v = ---------------------------------------
-
dt M
Step 4: We put the equations into a state variable matrix form.
----
d-
0 1
dt y F-
= – K – K y + 0 ----
---------- ---------d- v
S –1 M
----
d-
v M M
dt
Figure 4.10 shows the method for solving state equations on a TI-86 graphing cal-
culator. (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 interesting. The
next step is to put the equation in the form expected by the calculator. When solving with
the TI calculator the state variables 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 using the cursors. (Note: large solutions can sometimes take a few
minutes to solve.)
numerical methods - 4.12
First, we select some parameter values for the equations of Figure 4.9. 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][Fld-
Off][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 4.9. The input force
will be a decaying sine wave.
----
d-
y = vy
dt
– F – Kd vy – Ks y
----
d-
v y = ------------------------------------------ = – 4e
– 0.5t
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]
State equations can also be solved in Mathcad using built-in functions, as shown in
Figure 4.12. 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 vari-
ables in the equations. The ’rkfixed’ function is then used to obtain a solution. The argu-
ments 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
numerical methods - 4.14
response time for the system. If the time step is too large the solution may become unsta-
ble and go to infinity. A time step that is too small will increase the computation time mar-
ginally. When in doubt, run the calculator again using a smaller time step.
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 methods - 4.15
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 4.13. (Note: Recall that the state equations allow us to
calculate first-order derivatives.) The equation shown is known as Euler’s equation. Basi-
cally, 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.
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 4.14 shows the solution of Newton’s equation using Euler’s
method. In this example we are determining 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.
numerical methods - 4.16
F = M ----- v
d
dt
----
d- F-
dt v = ----
M
first rearrange equation
v ( t + h ) = v ( t ) + h ----- v ( t )
d 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 initially 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.
i t (sec) F (N) d/dt vi vi
-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
ans.
x ( t + h ) = x ( t ) + h ( – 0.1x ( t ) + 5 )
x ( 10 ) =
int main(){
double h = 0.1,
M = 1.0,
F;
FILE *fp;
double v,
t;
if( ( fp = fopen("out.txt", "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\n", t, v, F, M);
}
}
fclose(fp);
}
The program below 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 numeri-
cal integration. Finally the function is integrated with rectangular, trapezoidal and Simp-
son’s rule forms.
numerical methods - 4.20
//
// 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
//
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 4.20 for approximating a function. Notice that the first
part of the equation is identical to Euler’s equation, but the higher order terms add accu-
racy.
numerical methods - 4.22
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 ) + …
d
dt 2! dt 3! dt 4! dt
An example of the application of the Taylor series is shown in Figure 4.21. 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 values.
– 20t 3
Given x· – x = 1 + e +t
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 unsuit-
able for use with state variable equations.
The equations in Figure 4.22 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 previ-
ous 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.
F 1 = hf ( t, x )
F Note: in this case the state equation function
F 2 = hf t + h---, x + ------1 f(t, x) includes the state variables, x, and
2 2
F time, t. However, in simpler systems the
F 3 = hf t + h---, x + ------2 state equations may not include time and
2 2 it could be replaced with f(x).
F 4 = hf ( t + h, x + F 3 )
x ( t + h ) = x ( t ) + 1--- ( F1 + 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
d- x = v
---- y = 2 (assumed input)
dt
v0 = 1
d- v = 3 + 4v + 5y
----
dt x0 = 3
d- x = 0 1 x + 0 0 y h = 0.1
----
dt v 0 4 v 5 3 1
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
d 2
F = M ----- x
use, x(0) = 1
dt v(0) = 2
h = 0.5 s
F = 10
M=1
The program in Figure 4.26 and Figure 4.28 is used to perform a Runge-Kutta inte-
gration of a mass-spring-damper system. The ’main’ program loops through the time steps
and writes the value to a file. The ’step’ function performs one timestep integration for a
numerical methods - 4.27
second order Runge-Kutta integration. It uses the functions ’add’ and ’multiply’ to manip-
ulate the state matrix. The ’derivative’ function updates the state matrix with the new
derivative values.
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];
In most cases the result of numerical analysis is graphical or tabular. In both cases
numerical methods - 4.30
details such as time constants and damped frequencies can be obtained by the same meth-
ods used for experimental analysis. In addition to these methods there is a technique that
can determine the steady-state response of the system.
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 4.29. 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 equa-
tions are rearranged and solved with Cramer’s rule.
0 1 0 0
F Kd ----
F-
Ks F
– ----- – ------- – ------ – -----
M M M F- M M 0 - = 0
x = ------------------------------ = ------------ = ------ v = ------------------------------ = -----------
K KS K
0 1 -----s- 0 1 -----s-
Ks Kd M Ks Kd M
– ------ – ------- – ------ – -------
M M M M
When doing experiments, data is often collected in the form of individual data
points (not as complete functions). It is often necessary to integrate or differentiate these
values. The basic equations for integrating and differentiating are shown in Figure 4.30.
Given data points, y, collected at given times, t, we can integrate and differentiate using
the given equations. The integral is basically the average height of the two points multi-
plied by the width to give an area, or integral. The first derivative is basically the slope
between two points. The second derivative is the change in slope values for three points.
In a computer based system the time points are often equally spaced in time, so the differ-
ence in time can be replaced with a sample period, T. Ideally the time steps would be as
small as possible to increase the accuracy of the estimates.
y(t)
yi + 1
yi
yi – 1
ti – 1 T T
ti ti + 1
ti yi + yi – 1
------------------------
- ( t – t T
∫t y ( t i ) d t ≈ 2 i i – 1 ) = --2- ( y i + y i – 1 )
i–1
d- y i – y i – 1 y i + 1 – y i
---- y ( t i ) ≈ ------------------------ = ------------------------- = --1- ( y i – y i – 1 ) = --1- ( y i + 1 – y i )
dt ti – t i – 1 ti + 1 – ti T T
2 --1- ( y i + 1 – y i ) – --1- ( y i – y i – 1 ) –2 yi + yi – 1 + yi + 1
----
d-
y ( t ) ≈
T T
------------------------------------------------------------------------ = -----------------------------------------------------
dt i T 2
T
An example of numerical integration using Scilab is given in Figure 4.31 and Fig-
ure 4.32.
//
// integrate.sce
//
// 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);
When analyzing a system, we may need to choose an input that is more complex
than inputs such as steps, ramps, sinusoids and parabolae. The easiest way to do this is to
use switching functions. Switching functions turn on (have a value of 1) when their argu-
numerical methods - 4.34
ments are greater than or equal to zero, or off (a value of 0) when the argument is negative.
Examples of the use of switching functions are shown in Figure 4.33. By changing the val-
ues of the arguments we can change when a function turns on or off.
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
These switching functions can be multiplied with other functions to create a com-
plex function by turning parts of the function on or off. An example of a curve created
with switching functions is shown in Figure 4.34.
numerical methods - 4.35
f(t)
5
t
seconds
0 1 3 4
f ( t ) = 5t ( u ( t ) – ( 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 writ-
ing computer programs, as shown in Figure 4.35.
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 4.36. But, we may
need values between the datapoints. 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.
Figure 4.36 Using tables of values to interpolate numerical values using the lever law
The subroutine in Figure 4.37 was written to return the numerical value for the
data table in Figure 4.36. 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.
numerical methods - 4.37
The example in Figure 4.38 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 values.
The matrix is then solved to obtain the coefficient values for the final equation. This equa-
tion can then be used to build a mathematical model of the system.
numerical methods - 4.38
The datapoints 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 datapoints, 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.
2
P ( S ) = AS + BS + C
Data values can be substituted into the equation,
2
P ( 1000 ) = A1000 + B1000 + C = 105
2
P ( 4000 ) = A4000 + B4000 + C = 205
2
P ( 6000 ) = A6000 + B6000 + C = 110
This can then be put in matrix form to find the coefficients,
2 Note: in this example the
1000 1000 1 A 105
= inverse matrix is used, but
2
4000 4000 1 B 205 other methods for solving
2 C 110 systems of equations are
6000 6000 1 equally valid. If the equa-
–1 tions were simpler, substitu-
A 1000000 1000 1 105
B = 16000000 4000 1 205 tion might have been a
better approach.
C 36000000 6000 1 110
–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.
Despite our deepest wishes for simplicity, most systems contain non-linear compo-
nents. 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 4.39. As the mass moves
an aerodynamic resistance force is generated that is proportional to the square of the
velocity. This results in a non-linear differential equation. This equation can be numeri-
cally integrated using a technique such as Runge-Kutta. Note that the state equation matrix
form cannot be used because it requires linear equations.
x
2
20x· 2
F
M ∑ Fx = F – 20x· = Mx··
x· = v (1)
20- v2 + ----
v· = –-------- F- (2)
M M
Consider the simplified model of a car suspension shown in Figure 4.40. The
model distributes the vehicle weight over four tires with identical suspensions, so the mass
of the vehicle is divided by four. In this model the height of the road will change and drive
the tire up, or allow it to drop down. The tire acts as a stiff spring, with little deflection.
The upper spring and damper are the vibration isolation units. The damper has been
designed to stiffen as the damper is compressed. The given table shows how the damping
numerical methods - 4.40
yc
Mc N
K s1 = 50000 ---- L = yc – yt
m
N
K s2 = 200000 ---- L Kd
K s1 Kd m
(cm) (Ns/m)
M c = 400Kg
30 1000
M t = 20Kg
0 1600
Mt -20 2000
yt
-30 2250
K s2
yr
For our purposes we will focus only on the translation of the tire, and ignore its
rotational motion. The differential equations describing the system are developed in Fig-
ure 4.41.
numerical methods - 4.41
·· yc
Mc yc Mc
· ·
K s1 ( y t – y c ) K d ( y t – y c )
· · ·
∑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
---- (1)
dt c c
d
----- y t = v t (2)
dt
· K s1 – K s1 Kd – K d
vc = ---------y + ------------
- y + v + ---------- v + ( – g )
------- (3)
M c t M c c M c t M c c
K s1 ( y t – y c ) · ·
Kd ( yt – yc )
··
Mt yt
Mt
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
Figure 4.41 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 4.42.
numerical methods - 4.42
3 2 30 1000
K d ( L ) = AL + BL + CL + D 0 1600
-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
0.027 0.09 0.3 1 A 1000
0 0 0 1 B = 1600
– 0.008 0.04 – 0.2 1 C 2000
– 0.027 0.09 – 0.3 1 D 2250
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 result-
ing heights.
numerical methods - 4.43
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 –K d
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 s2
K 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 4.44.
numerical methods - 4.44
#include <stdio.h>
#include <math.h>
main(){
double state[SIZE];
double derivative[SIZE];
FILE *fp_out;
double t;
int i;
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 4.46. 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 transient effects
at the start.
numerical methods - 4.46
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 Series
-0.06
Series2 Series
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 S eries1 Series
S eries2 1
Series
-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
4.8 SUMMARY
• State variable equations are used to 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.
numerical methods - 4.47
·· ·
x + 2x + 3x + 5y = 3
·· ·
y + y + 6y + 9x = sin ( t )
Kd
F
M Ks
4. 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 pulley. Write the differential equations for the system, and
put them in state variable form.
x1
Ks
M1
B1
x2
F
M2
B2
numerical methods - 4.48
5. Do a first order numerical integration of the derivative below from 0 to 10 seconds in one sec-
ond steps. Assume the system starts undeflected. Write the equation for each time step.
d- 2
---- x ( t ) = 5( t – 4 )
dt
6. Given the differential equation below 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
7. Write a Scilab program to calculate the area under the function below using a numerical
method, such as Simpson’s rule. Test it by using the range from x=1 to x=1.2. Assume the sine
function is in radians
f ( x ) = 5x + 2 ln ----------
sin x
x
8. Write a computer program in a language of your choice (C/C++, Java, Scilab script, etc.) that
will numerically integrate the differential equation below.
·· ·
θ + 3θ + 9θ = 10
9. Given the following differential equation and initial conditions, draw a sketch of the first 5 sec-
onds 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.
·· ·
0.5V o + 0.6V o + 2.1V o = 3V i + 2 initial conditions V i ( t ≥ 0 ) = 5V
V o ( 0 ) = 0V
·
V o ( 0 ) = 1V
10. 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
calculator (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
11. 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
numerical methods - 4.49
coefficient is 1000N/m, and the damping 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 damping 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 damping
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 damp-
ing 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 numer-
ical 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 value to give an overall system damping coefficient of 1. Verify
the results by numerically integrating.
x
Kd
F
M Ks
12. 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 ini-
tially.
x1 x2
F K s1 K s2
M1 M2
1.
·
x = v
·
y = u
·
v = – 2v – 3x – 5y + 3
·
u = – u – 6y – 9x + sin t
x 0 0 1 0 x 0
d- y
---- = 0 0 0 1 y + 0
dt v –3 –5 –2 0 v 3
u –9 –6 0 –1 u sin t
2.
·
y1 = v1
·
y2 = v2
·
y3 = v3
·
v1 = – 2v 1 – 3y 1 – 4v 2 – 5y 2 – 6v 3 – t – F
· – v 13
v2 = -------1- – ------ v 3
12 12
· –v1 7 8 9 11 5
v3 = -------- – ------ y 1 – ------ v 2 – ------ y 2 – ------ y 3 – ------ cos ( 5t )
10 10 10 10 10 10
0 0 0 1 0 0
y1 y1 0
0 0 0 0 1 0
y2 y2 0
0 0 0 0 0 1
d- y 3 y3 0
---- = – 3 –5 0 –2 –4 – 6 + –t–F
dt v 1 13 v1
1
0 0 0 – ------ 0 – ------ 0
v2 12 12 v2
5
7 9 11 1 8 – ------ cos t
v3 – ------ – ------ – ------ – ------ – ------ 0 v3 10
10 10 10 10 10
numerical methods - 4.51
3.
x
·
· x = v
F Kd x
–K d –Ks
v = v --------- + x --------- + -----
Ks x · F
M
M M M
4.
+y
+x
T Ks x 1 · · ··
M1
∑F = – T – Ks x1 – B1 ( x 1 – x2 ) = M1 x1
·
v1 = x1
· · ·
B1 ( x1 – x2 ) v2 = x2
–K –B B
v 1 = x 1 ---------s + v 1 --------1- + v 2 ------1- + -------
· –T
M1 M1 M 1 M 1
· ·
B1 ( x1 – x2 )
· · · ··
T
M2 ∑F = – T + B 1 ( x1 – x2 ) + F – B2 x2 = M2 x2
F
B1 –B1 – B 2
v 2 = v 1 ------- + v 2 --------------------- + -----------------
· –T+F
· M2 M2 M2
B2 x2
5.
t x
h = 1
x ( t + h ) = x ( t ) + h5 ( t – 4 )
2 0 0
1 80
2 125
3 145
4 150
5 150
6 155
7 175
8 220
9 300
10 425
numerical methods - 4.52
6.
t x x’
x' = 3 – 0.25x
x ( t + h ) = x ( t ) + h ----- x ( t )
d 0 1 2.75
dt 1 3.75 2.06
2 5.81 1.55
x ( t + h ) = x ( t ) + 1 ( 3 – 0.25x ( t ) ) 3 7.36 1.16
4 8.52 0.870
x ( t + h ) = 0.75x ( t ) + 3 5 9.39 0.652
6 10.0 0.489
7 10.5 0.367
8 10.9 0.275
9 11.2 0.206
10 11.4
numerical methods - 4.53
7.
// integrate.sce - A simple program to integrate a function
// To run this in Scilab use 'File' then 'Exec'.
// by: H. Jack Sept., 9, 2002
// define the function
function foo=f(x)
foo = 5 * x + 2 * log(sin(x) / x);
endfunction
// Set the time length and step size
steps = 10;
x_start = 1;
x_end = 1.2;
x_delta = (x_end - x_start) / steps;
// 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 trapezoidal integration
total = 0; // set the initial sum to zero
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
total = total + 2 * f(x);
end
end
total = total * x_delta / 2;
printf("Trapezoidal 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);
numerical methods - 4.54
8.
#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);
}
}
numerical methods - 4.55
9.
– 0.6t
a) V o ( t ) = – 8.331e cos ( 1.960t – 0.238 ) + 8.095
·
b) Vo = Yo
·
Y o = – 1.2Y o – 4.2V o + 34
// assign4_1.sce
// 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.
numerical methods - 4.56
10.
·
Kd x
F · ··
M Ks x
∑F = F – K d x – K s x = Mx
·· ·
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
cos ------- t + C 2
– 0.5t 3
xh = C1 e
2
particular: xp = B
0+0+B = 1
xp = 1
initial conditions:
cos ------- t + C 2 + 1
– 0.5t 3
x = xh + xp = C1e
2
11.
·· K d · Ks
x + ------ x + ----- x = -----
F
a)
M M M
b) N – 5t
x 1 ( t ) = – 0.115e cos ( 5 3t – 0.524 ) + 0.10
K d = 100 ----
m
N x 1 ( t ) = – 0.1e
– 0.1t – 5 – 999.9t
+ 10 e + 0.10
K d = 10000 ----
m
c) 0 1
X0 X0 0
d
----- = –K –Kd + F-
dt X ---------s --------- X 1 ----
1 M
M M
For 10000N/m: all solutions are overdamped. The time to reach the time con-
stant (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
numerical methods - 4.58
12.
b) ·
x1 = v1
– K s1 K s1
x 1 = x 1 ----------- + x 2 -------- + -------
· F
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
------- - 0 v2
- 0 -------------------------- 0
M2 M2
numerical methods - 4.59
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];
//
// 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];
}
1. Write a Scilab 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
2. Write a Scilab program to implement the following equation to calculate the value of x.
10
F( t)
v = ∫ ---------
M
- dt M = 10
0
where,
F ( t ) = 10 when t≤5
F(t) = 0 when t>5
numerical methods - 4.61
3. Write a Scilab program to implement the following equation to calculate the value of x.
10
x = ∫ f ( t ) dt f ( t ) = 5 ln ( t )
0
4. Write a Scilab program to integrate the area under the function below using a numerical
method, such as Simpson’s rule. Find the area from 1 to 2.
f ( x ) = 5x + 2 ln ----------
sin x
x
5. Numerically integrate one time step of the differential equation below using a) first order inte-
gration and b) Runge Kutta integration.
·· ·
θ + 3θ + 9θ = 10
6. Convert the third order differential equation below 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
7. 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 timestep of
h=0.001s. ----> The final results must be put in a table for easy comparison.
·
k + 10k = 5 k ( 0 ) = 20
8. 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 ini-
numerical methods - 4.62
tially.
x1 x2
K d1
F K s2
M1 K s1 M2
9. Explicitly solve the following differential equation. Verify the result numerically.
· 2
v + 20v = 200
rotation - 5.1
5. ROTATION
Topics:
• Basic laws of motion
• Inertia, springs, dampers, levers, gears and belts
• Design cases
Objectives:
• To be able to develop and analyze differential equations for rotational systems.
5.1 INTRODUCTION
The equations of motion for a rotating mass are shown in Figure 5.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 inte-
grated to find the angular velocity, the angular velocity can be integrated to find the angu-
lar position. The angular acceleration is proportional to an applied torque, but inversely
proportional to the mass moment of inertia.
equations of motion
ω = ----- θ
d
θ (1)
dt
T
d 2
α = ----- ω = ----- θ
d (2)
dt dt
OR θ ( t ) = ∫ ω ( t ) dt = ∫ ∫ α ( t ) dt dt (3)
ω ( t ) = ∫ α ( t ) dt (4)
( t )-
α( t) = T
--------- (5)
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 differ-
ence is that ’torque’ normally refers to a rotating moment.
Given the initial state of a rotating mass, find the state 5 seconds later.
rad rad
θ 0 = 1rad ω 0 = 2 --------- α = 3 --------
2
-
s s
ans. θ ( 5 ) = 86rad
rad
ω ( 5 ) = 17 ---------
s
Figure 5.2 Drill problem: Find the position with the given conditions
5.2 MODELING
Free Body Diagrams (FBDs) are required when analyzing rotational systems, as
they were for translating systems. The force components normally considered in a rota-
tional system include,
5.2.1 Inertia
When unbalanced torques are applied to a mass it will begin to accelerate, in rota-
tion. The sum of applied torques is equal to the inertia forces shown in Figure 5.3.
θ, ω, α
∑T = JM α (6)
J M = I xx + I yy (7)
2
I xx = ∫ y dM (8)
J
2
T I yy = ∫ x dM (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.
The center of rotation for free body rotation will be the centroid. Moment of inertia
values are typically calculated about the centroid. If the object is constrained to rotate
about some point, other than the centroid, the moment of inertia value must be recalcu-
lated. The parallel axis theorem provides the method to shift a moment of inertia from a
centroid to an arbitrary center of rotation, as shown in Figure 5.4.
rotation - 5.4
J M = J˜M + Mr
2
where,
J M = mass moment about the new point
JM˜ = mass moment about the center of mass
Figure 5.4 Parallel axis theorem for shifting a mass moment of inertia
J A = J˜A + Ar
2
where,
J A = area moment about the new point
J˜A = area moment about the centroid
Figure 5.5 Parallel axis theorem for shifting a area moment of inertia
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.
The centroid can now be shifted to the center of rotation using the parallel axis theorem.
-4
ans. 2
I M x = 66.33Kgm
2
I M y = 145.8Kgm
2
J M = 209.2Kgm
ans. θ ( 5s ) = 312.5rad
rad
ω ( 5s ) = 125 ---------
s
Figure 5.8 Drill problem: Find the velocity of the rotating shaft
5.2.2 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 5.9. The angle of rotation is determined by the applied torque, T, the shear modu-
lus, G, the area moment of inertia, JA, and the length, L, of the rod. The constant parame-
ters can be lumped into a single spring coefficient similar to that used for translational
springs.
rotation - 5.8
L
JAG
T = ---------- θ (8)
L
θ
T = K S ( ∆θ ) (9)
T
Note: Remember to use radians for these calculations. In fact you are advised to use
radians for all calculations. 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 Fig-
ure 5.10, and based on the previous example in Figure 5.6. The calculations are similar to
those for the mass moments of inertia, except for the formulation of the integration ele-
ments. 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 sim-
ply by multiplying by the density. Also note the units.
rotation - 5.9
4
-2.5
-5 5
First, the area moment of inertia is calculated about the -1
centroid by integration. All dimensions are in m.
-4
4m
3 4m ) 3 ( – 4m ) 3
= 10m (--------------
4m 2 4m 2 y-----
I xx = ∫–4m y d A = ∫–4m y 2 ( 5m ) d y = 10m
3 3
- – ------------------- = 426.7
3
– 4m
5m
5m 2 5m 2 x
3 ( 5m ) 3 ( – 5m ) 3 4
I yy = ∫ x dA = ∫ x 2 ( 4m ) dx = 8m ----- = 8m --------------- – ------------------- = 666.7m
–5m – 5m 3
– 5m 3 3
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
Note: The basic definitions for the area I xx = ∫ y dA (8)
moment of inertia are shown to the 2
right. I yy = ∫ x dA (9)
J A = I xx + I yy (10)
2
J A = J˜A + Ar (11)
Note: You may notice that when the area moment of inertia is multiplied by the den-
sity 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.
For a 1/2" 1020 steel rod that is 1 yard long, find the torsional spring coefficient.
ans. Nm
K s = 215 ---------
rad
An example problem with torsional springs is shown in Figure 5.12. 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.
rotation - 5.11
J M1 J M2
τ K s1 K s2 K s3
Model the system above assuming that the center shaft is a torsional spring, and that a
torque is applied to the leftmost disk. Leave the results in state variable form.
θ1 ··
K s2 ( θ 1 – θ 2 ) + ∑M = τ – K s2 ( θ 1 – θ 2 ) = J M1 θ 1
··
J M1 θ 1 = – K s2 θ 1 + K s2 θ 2 + τ
·
θ1 = ω1 (1)
J M1
– K s2 K s2
ω 1 = ----------- θ 1 + -------- θ 2 + τ
·
τ JM JM
(2)
1 1
θ2 ··
K s2 ( θ 2 – θ 1 ) + ∑M = – K s2 ( θ 2 – θ 1 ) – K s3 θ 2 = J M2 θ 2
– K s3 – K s2 K s2
θ 2 = --------------------------- θ 2 + -------- θ 1
··
J M2 J M 2
·
J M2 θ2 = ω2 (3)
– K s3 – K s2 K s2
K s3 θ 2 ω 2 = --------------------------- θ 2 + -------- θ 1
· (4)
JM 2
JM 2
0 1 0 0
θ1 – K s2 K s2 θ1 0
----------- 0 -------- 0
d- ω 1 J M1 J M1 ω1
---- = + τ
dt θ 0 0 0 1 θ2 0
2
ω2 - 0 ω2
K s2 – K s3 – K s2 0
-------- 0 --------------------------
J M2 J M2
5.2.3 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 5.13. The
first equation is used for a system with one rotating and one stationary part. The second
equation is used for damping between two rotating parts.
T = Kd ω
T = Kd ( ω1 – ω2 )
If a wheel (JM=5kg m2) is turning at 150 rpm and the damping coefficient is 1Nms/rad,
what is the deceleration?
ans.
·· rad-
θ = – 3.141 --------
2
s
The example in Figure 5.12 is extended to include damping in Figure 5.15. The
primary addition from the previous example is the addition of the damping forces to the
FBDs. In this case the damping 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
rotation - 5.13
only addition.
J M1 J M2
τ K s1 K s2 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 leftmost disk. Leave the results in state variable form.
θ1 · ··
K s2 ( θ 1 – θ 2 ) + ∑M = τ – K s2 ( θ 1 – θ 2 ) – B 1 θ 1 = J M1 θ 1
·· ·
J M1 θ 1 = – B 1 θ 1 – K s2 θ 1 + K s2 θ 2 + τ
·
θ1 = ω1 (1)
J M1
–B – K s2 K s2 τ-
ω 1 = --------1- ω 1 + ----------- θ + -------
·
τ - θ + -------
JM J M 1 J M 2 J M (2)
·
B1 θ1 1 1 1 1
θ2 · ··
K s2 ( θ 2 – θ 1 ) + ∑ M = – K s2 ( θ 2 – θ 1 ) – B 2 θ 2 – K s3 θ2 = J M 2 θ 2
–B2 · – K s3 – K s2 K s2
θ 2 = --------- θ 2 + --------------------------- θ 2 + -------- θ 1
··
JM J M2 JM
2 2
·
J M2 θ2 = ω2 (3)
– B2 – K s3 – K s2 K s2
K s3 θ 2 ω 2 = --------- ω 2 + --------------------------- θ 2 + -------- θ 1
· (4)
·
B2 θ2 J M2 J M2 J M2
0 1 0 0
θ1 – K s2 –B1 K s2 θ1 0
----------- --------- -------- 0 τ-
d- ω 1 JM1 J M1 J M1 ω1 -------
---- = + J M1
dt θ 0 0 0 1 θ2
2
0
ω2 K s2 – K s3 – K s2 –B2 ω
2
-------- 0 --------------------------- --------- 0
JM2 J M2 J M2
5.2.4 Levers
The lever shown in Figure 5.16 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 the center.
F2
Note: As the lever rotates
d1 d2 the length ratio will be
maintained because of
δ2 similar triangles. This
allows the lever to work
F1
d1 F δ over a range of angles.
----- = -----2- = ----1- The lever above would
δ1 d2 F1 δ2 become ineffective if it
was vertical.
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?
ans.
F = 516.3N
While levers amplify forces and motions over limited ranges of motion, gears can
rotate indefinitely. Some of the basic gear forms are listed below.
Gear teeth are carefully designed so that they will mesh smoothly as the gears
rotate. The forces on gears acts at a tangential distance from the center of rotation called
the pitch diameter. The ratio of motions and forces through a pair of gears is proportional
to their radii, as shown in Figure 5.18. 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 to rotate 20
times for the output shaft to rotate once.
n1 n –T r n
T 1 = Fc r1 T2 = –Fc r2 ----- = ----2- --------1- = ----1 = ----1-
r1 r2 T2 r2 n2
r –ω –α –∆ θ n
Vc = ω1 r1 = –ω2 r2 ----2 = ---------1 = --------1- = ------------1 = ----2-
r1 ω2 α2 ∆θ 2 n1
where,
n = number of teeth on respective gears
r = radii of respective gears
Fc = force of contact between gear teeth
Vc = tangential velocity of gear teeth
T = torques 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.19. 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.
rotation - 5.16
N 2 = 60
N2 N4
N 5 = 15 e = ------------- = 16
N3 N5
A manual transmission is shown in Figure 5.20. In the transmission the gear ratio
is changed by sliding (left-right) some of the gears to change the sequence of gears trans-
mitting the force. Notice that when in reverse an additional compound gear set is added to
reverse the direction of rotation.
rotation - 5.17
9
clutch 8
stem gear
2 7
Motor shaft
reverse idler
3 4
10
11
6
5
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 rela-
tionships are shown in Figure 5.21.
rotation - 5.18
T = Fr V c = ω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 excep-
tion 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.
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?
ans.
rad
case 1: ω 3 = 2.5 ---------
s
rad
case 2: ω 3 = – 2.5 ---------
s
5.2.6 Friction
θ ··
+ ∑M = τ – Ks θ – TF = JM θ
Ks θ
··
JM θ = τ – Ks θ – T F (1)
·
θ = ω (2)
JM
τ – TF Ks
ω = -------------- + ------ θ
τ · (3)
JM JM
FF
Next, the torque force must be calculated, and then used to determine the new torque force.
·
J M ω = τ – K s θ – T test
· (4)
T test = τ – K s θ – J M ω
cases:
Not slipping previously
T test ≤ 10Nm T F = T test
T test > 10Nm T F = 6Nm
Slipping previously
T test < 6Nm T F = T test
T test ≥ 6Nm T F = 6Nm
The friction example in Figure 5.23 can be analyzed using the C program in Figure
5.24. 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 equations. Each
loop the friction conditions are checked and then used for a first-order solution to the state
equations.
rotation - 5.21
int main(){
double h = 0.1, /* time step */
theta, w, /* the state variables */
acceleration, /* the acceleration */
TF, /* friction force */
Ttest, /* the friction test force */
J = 10, /* the moment of inertia (I picked the value) */
tau = 5, /* the applied torque (I picked the value) */
Ks = 10; /* the spring constant (I picked the value) */
int slip = 0; /* the system starts with no slip */
FILE *fp;
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 5.25, and will be derived in a later chapter. The value of the constant ’K’ is a func-
tion 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’.
2 T load
∴ ----- ω + ω ------ = V s ------ – ------------
d K K
dt JR JR JM
where,
T voltage/current increases
ω ss
The energy and power relationships for rotational components are given in Figure
5.27. These can be useful when designing a system that will store and release energy.
E = E K + EP (5)
2
EK = JM ω (6)
E P = Tθ (7)
P = Tω (8)
To begin the analysis the velocity curve in Figure 5.28 was obtained experimen-
tally by applying a voltage of 15V to the motor with no load attached. In addition the resis-
tance of the motor coils was measured and found to be 40 ohms. The steady-state speed
and time constant were used to determine the constants for the motor.
rpm
2400
R = 40Ω
0.5s
----
d- K2 K T
--------- load
ω + ω ---------
- = V s J R- – -----------
-
dt m m J R
M M JM
The steady-state velocity can be used to find the value of K.
rot K
2
( 0 ) + 2400 --------- ---------- = 15V ---------- – ( 0 )
K
min J M R JMR
2400 --------
rot- 1min ---------------- ( K ) = 15V
------------- 2πrad
min 60s 1rot
15V - – 3 Vs
K = ----------------------------
–1
= 39.8 × 10 ---------
120πrads rad
The time constant can be used to find the remaining parameters.
2
K - 1 –1
--------- = ---------- = 2s
JM R 0.5s
2
39.8 × 10 –3 -------- Vs-
rad
- = 0.198005 ×10-4 = 19.8 × 10 –6 Kgm 2
J = --------------------------------------------
–1
( 40Ω ) ( 2s )
----
d- –1 –1 –2 T load
ω m + ω m 2s = V s ( 50.3V s rad ) – -----------------------------------------
-
dt –6 2
19.8 × 10 Kgm
θ m' = ω m (1)
– 1 –2 –1 –1 –2
ω m' = V s 50.3V s rad – ω m 2s – 50505Kg m T load (2)
rotation - 5.25
Figure 5.28 Motor speed curve and the derived differential equation
The remaining equations describing the system are developed in Figure 5.29.
These calculations are done with the assumption that the inertial effects of the gears and
other components are insignificant.
rotation - 5.26
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 = ------ θ m ω gear = ------ ω m
20 20
The rotation of the pinion is related to the displacement of the rack through the circum-
ferential travel. This ratio can also be used to find the force applied to the mass.
0.0254in 2
θ pinion = ------ θ m – θ pinion 1.768 × 10 in Kg K s ---------------------
·· 1 –6 – 2 –1
20 1.0m
· – 12 – 2 –1 –9 –2 –1
ω pinion = 57.1 × 10 m Kg K s θ m – 1.141 × 10 m Kg K s θ pinion (4)
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
rotation - 5.27
the equation for the motor shaft to be put into a useful form, as shown in Figure 5.30. Hav-
ing 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.
θm 0 1 0 0 θm 0
d- ω m –2525 K s –2 50505K s 0 ωm Vs 50.3
---- = +
dt θ 0 0 0 1 θpinion 0
pinion
– 12 –9
ω pinion 57.1 × 10 K s 0 – 1.141 × 10 K s 0 ω pinion 0
The state equations for the system are then analyzed using a computer for the parame-
ters 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
rotation - 5.28
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.)
5.5 SUMMARY
1. Draw the FBDs and write the differential equations for the mechanism below. The right most
shaft is fixed in a wall.
Τ θ1 θ2
JM1 JM2
Ks1 Ks2
B
rotation - 5.29
2. For the system pictured below a) write the differential equations (assume small angular deflec-
tions) and b) put the equations in state variable form.
M1 x1
3. Draw the FBDs and write the differential equations for the mechanism below.
θ2
R1
JM1
θ1
R2
JM2
Ks
Kd
x1
x2 M1
4. The system below consists of two masses hanging by a cable over mass ‘J’. 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.
rotation - 5.30
R
JM
K s1
K s2
x1 M1
M2 x2
5. Write the state equations for the system to relate the applied force ’F’ to the displacement ’x’.
Note that the rotating mass also experiences a rotational damping force indicated with Kd1
K d1
F
r
JM θ
M
K s2
K s1 K s3
K d2
6. For the system pictured below a) write the differential equations (assume small angular deflec-
rotation - 5.31
J1
Kd1 Ks1
θ1
F1
M1 x1
7. For the system pictured below a) write the differential equations (assume small angular deflec-
tions) and b) put the equations in state variable form.
M3 x1
8. For the system pictured below a) write the differential equations (assume small angular deflec-
rotation - 5.32
Ks2
x2
J M2, R 2
θ3 M2 θ2
F2
9. For the system pictured below a) write the differential equations (assume small angular deflec-
tions) and b) put the equations in state variable form.
Kd3 Ks3
A pulley system has the bot-
tom pulley anchored. A
mass is hung in the middle
of the arrangement with M3 x3
springs and dampers on
either side. Assume that
the cable is always tight. Ks2 F1
R2,J2,M2
x2
θ1
R1,J1
10. For the system pictured below a) write the differential equations (assume small angular
rotation - 5.33
M1
x1
Kd1
Ks1
R1 R2
x2
A mass is suspended over a Kd2 Ks2
lever arm. Forces are
applied to the lower side of
the moment arm through a
spring damper pair. F1 x3
11. For the system pictured below a) write the differential equations (assume small angular deflec-
tions) and b) put the equations in state variable form.
R2
R1
Two gears have a force on
Kd1 one side, and a mass
N1 N 2 on the other, both sus-
pended from moment
J1 J2 arms. There is a rota-
tional damping on one
F1 θ1 Ks1 of the gears.
θ2
M1 x1
12. 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?
13. 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 posi-
tion (not velocity) as a function of time for the first 5 seconds with your calcula-
rotation - 5.34
tor using the parameters below. Assume the system starts at rest.
θ
Nm Nms
K s = 10 --------- B = 1 -----------
rad rad
T
J M = 1Kgm
2
T = 10Nm J
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 sys-
tem starts at rest.
–1 –2 –2
θ'' + ( 1s )θ' + ( 10s )θ = 10s
14. Find the response as a function of time (i.e. solve the differential equation to get a function of
time.). Assume the system starts undeflected and at rest.
θ
τ = 10Nm
τ Ks J M = 1Kgm
2
Ns
JM K d = 3 ------
m
N
K s = 9 ----
m
Kd
rotation - 5.35
1.
θ1 θ2
T K s1 ( θ 1 – θ 2 )
J M1 J M2
K s1 ( θ 1 – θ 2 ) ·
Bθ 2
K s2 θ 2
··
+ ∑ M1 = T – K s1 ( θ1 – θ 2 ) = J M1 θ 1
K s1 – K s1
θ 1 + θ1 -------
- + θ2 ----------
·· T
- = --------
JM JM J M1
1 1
· ··
+ ∑ M2 = K s1 ( θ 1 – θ 2 ) – Bθ 2 – K s2 θ2 = J M 2 θ 2
K s1 + K s2 – K s1
θ 2 + θ2 -------- + θ2 ----------------------- + θ 1 ----------- = 0
·· · B
JM2 J M2 J M2
2.
·
x1 = v1
– K s1 K s1
x 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
v 2 = v 1 ------------------ + x 1 ------------------ + x 2 --------------- + -------------
J1 J1 J1 J1
rotation - 5.36
3.
T1
T2
M1 J M1
J M2
·
Kd x1
gM 1 T1 T2
–x 1 x1
if T1,T2,Kdx1 > 0 θ 1 = -------- θ 2 = ------ T1 = Ks ( x2 – x1 )
R2 R1
··
+ ∑ Fy = T 1 – gM 1 = – M 1 x 2
·· T1
x 2 = g – -------
M1
··
+ ∑ M1 = – T 1 R 1 + T 2 R 1 = – J M1 θ 2
·· T1 R1 – T2 R1
θ 2 = ------------------------------
J M1
· ··
+ ∑ M2 = T 2 R 2 – R 2 K d x 1 = – J M2 θ 1
· –R 2 Kd T2 R2
θ 1 + x 1 ---------------- = ------------
··
JM JM
2 2
6 equations, 6 unknowns
rotation - 5.37
4.
θK s1 T K s2 ( x 2 – θR )
a)
JM
RT
M1 M2
RK s2 ( x 2 – θR )
F M1 g M2 g
··
∑ FM2 = K s2 ( x 2 – θR ) – M 2 g = – M 2 x 2
K s2 –R K s2
x 2 + x 2 -------- + θ --------------- = g
··
M2 M2 (2)
·
b) θ = ω
2
· – K s1 – R K s2 RK s2 – RM 1 g – RF
ω = θ ---------------------------------
- + x 2 --------------------------
- + ---------------------------------
JM + R2 M1 J M + R 2 M 1 J M + R 2 M 1
·
x2 = v2
RK s2 – K s2
v 2 = θ ------------ + x 2 ----------- + g
·
M2 M2
rotation - 5.38
5.
·
θ = ω
2
– K s1 – r K s2 – K d1 K s2 r
ω = θ -------------------------------- + ω ------------ + x ----------- + ------
· Fr
J M J M J M J M
·
x = v
K s2 r – K d2 – K s2 – K s3
v = θ ----------- + v ------------ + x ---------------------------
·
M M M
6.
·
x1 = v1
– K d1 – K s1 K d1 R 2 R 4 K s1 R2 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 R2 R 4 – F 1 R 1
ω 1 = v 1 ---------------------- + x 1 --------------------- + ω 1 ------------------------
· - + θ 1 -----------------------
- + ---------------
J1 R3 J1 R3 J R2 1 3
J R2 1 3
J1
rotation - 5.39
7.
· ·
θ1 θ2 · · K d1 ( x 1 – x 3 )
R 2 K d1 ( x 1 – x 3 )
F1 R1 K s1 ( x 1 – x 3 )
··
JM1 JM2 J M2 θ 2
·· N2 M3
J M1 θ 1 τ τ ------
N1 R 2 K s1 ( x 1 – x 3 )
·· M3g
x M3 x1
θ1 N 1 = θ2 N2 θ 2 = -----3-
R2
·
x1 = v1
– K d1 – K s1 R2 K d1 R 2 K s1
v 1 = v 1 ------------ + x 1 ----------- + ω 2 --------------- + θ 1 --------------- – g
·
M3 M3 M3 M3
·
θ2 = ω2
–N2
v 1 ( R2 K d1 ) + x 1 ( R 2 K s1 ) + ω 2 ( – R 2 K d1 ) + θ 1 ( – R2 K s1 ) + F --------- R 1
2 2
· N1
ω 2 = -----------------------------------------------------------------------------------------------------------------------------------------------------------------
2
-
N2
J M1 -----2- + J M2
N1
rotation - 5.40
8.
·
K d1 x 1
K s2 ( x 1 – x 2 )
K s1 x 1
·· x2
x1 M2 x2 J M2, R 2
x1 M2 θ2
µ k N -------- M1
x1 K s2 ( x 1 – x 2 )
Fc F2
N = M 1 g cos ( θ 3 ) x M 2 g sin ( θ 3 )
θ 2 = -----2-
M 1 g sin ( θ 3 ) R2
·
x1 = v1
·
v1 =
·
x2 = v2
·
v2 =
9.
·
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 ----------------------------------------------------------- + -----------------------------------------------------------
4J· 1 R 2 + J 2 R 1 + R 1 R 2 M 2
2 2 2 2
4J 1 R 2 + J 2 R 1 + R 1 R 2 M 2 4J 1 R 22 + J 2 R 21 + R 21 R 22 M 2
2 2 2 2
x3 = v3
– K d3 – K s2 – K s3 K s2
v 3 = v 3 ------------ + x 3 --------------------------- + x 2 -------- + g
·
M3 M3 M3
rotation - 5.41
10.
state equations ·
x1 = v1
R1 + R 2
v 1 = F 1 ------------------
·
R1 M1
– K s2 K s2 F1
q = x 2 ----------- + x 3 --------- + ---------
·
K d2 K d2 K d1
– K s1 R 1 K s1 R1 + R2
p = x 1 ----------- + x 2 -------------------------------- + F1 ------------------
·
K d1 K d1 ( R 1 + R 2 ) R 1 K d1
R1 + R 2
output equations x 2 = ( x 1 – p ) ------------------
R1
x3 = – q + x2
11.
·
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 = x 1 -----------------------------
- + ω 1 -----------------------------
- + θ 1 -----------------------------
- + -----------------------------
-
J 1 N 2 + J 2 N 1
2 2
J 1 N 2 + J 2 N 1
2 2
J 1 N 2 + J 2 N 1 J 1 N 22 + J 2 N 21
2 2
12.
R R R R
For area: r
4
πR
4
= ∫ r dA = ∫ r ( 2πr dr ) = 2π ∫ r dr = 2π ----
2 2 3
J area = ---------
4 0
2
0 0 0
For mass: ρ = M M-
----- = --------
A 2
πR
R R R R
4 4 2
πR
= ρ --------- = -----------
r MR
= ∫ r dM = ∫ r ( ρ2πr dr ) = 2πρ ∫ r dr = 2πρ ----
2 2 3
J mass
4 2 2
0
0 0 0
The mass moment can be found by multiplying the area moment by the area density.
rotation - 5.42
13.
a) T · ··
+ ∑
M = T – K s θ – Bθ = J M θ
JM
·· ·
J M θ + Bθ + K s θ = T
· Ks θ Ks
·· · B T
Bθ θ + θ ------ + θ ------ = ------
JM JM JM
· T Ks B
b) θ' = ω ω = ------ – ------ θ – ------ ω
JM JM JM
Nm Nms
10 --------- 1 -----------
· 10Nm rad rad
ω = -----------------2 – -----------------2 θ – -----------------2 ω
2 1Kgm 1Kgm 1Kgm
ω = s 10 – --------- – --------- ω
· –2 10θ s
rad rad
rotation - 5.43
(c homogeneous:
·· –1 · –2
θ + ( 1s )θ + ( 10s )θ = 0
guess: θ = e At · At ·· 2 At
h θ h = Ae θh = A e
2 At –1 At –2 At
A e + ( 1s )Ae + ( 10s )e = 0
–1 –1 2 –2
2
A + ( 1s )A + 10s
–1 –2
= 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
θh = C1 e cos ( 3.123s t + C 2 )
particular:
–1 –2 –2
θ'' + ( 1s )θ' + ( 10s )θ = 10s
· ··
guess: θp = A θp = 0 θp = 0 –2
–1 –2 –2 10s -
( 0 ) + ( 1s ) ( 0 ) + ( 10s ) ( A ) = 10s A = ------------
–2
= 1
10s
θp = 1
Initial conditions:
–1
– 0.5s t –1
θ ( t ) = C1e cos ( 3.123s t + C 2 ) + 1
–1
– 0.5s 0 –1
θ ( 0 ) = C1 e cos ( 3.123s 0 + C 2 ) + 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
14.
1. for the system pictured below a) write the differential equations (assume small angular deflec-
tions) and b) put the equations in state variable form.
R2
R1
θ2
N2 M1
N1
x1
J1 J2
x2 θ1 T1
Two gears have levers attached. On one
Kd1 Ks1 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.
2. Draw FBDs for the following mechanical system containing two gears.
Ks1
J 2, R 2
J 1, R 1
Ks2 Kd2
rotation - 5.45
3. Draw FBDs for the following mechanical system. Consider both friction cases.
Ks1 τ
J,R
x
Ks1
M
µ s, µ k
J,R
Ks1
J,R
Ks2 Kd2
5. Develop a differential equation of motion for the system below assuming that the cable always
rotation - 5.46
remains tight.
J,R
Ks1
J,R
Ks2 Kd2
6. Analyze the system pictured below assuming the rope remains tight.
J,R
F
F = 10N
N
M 1 = 1kg K s1 = 100 ----
M1 m
N
Ks1 y M 2 = 1kg K s2 = 100 ----
m
Kd1 µk=0.2 R = 0.1m
Ns
K d1 = 50 ------
2
m
M2 J = 10Kgm Ns
θ=45 K d2 = 50 ------
m
Kd2
Ks2
a) Draw FBDs and write the differential equations for the individual masses.
b) Combine the equations in input-output form with y as the output and F as the
input.
d) Write the equations in state variable matrix form.
c) Use Runge-Kutta to find the system state after 1 second.
rotation - 5.47
7. Analyze the system pictured below assuming the rope remains tight.
J,R J,R
F = 10N
N
M 1 = 1kg K s1 = 100 ----
m
N
M 2 = 1kg K s2 = 100 ---- J,R
m F
Ns y
R = 0.1m K d1 = 50 ------
2
m
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 in input-output form with y as the output and F as the
input.
c) Write the equations in state variable matrix form.
d) Use Runge-Kutta to find the system state after 1 second.
input output equations - 6.1
6. INPUT-OUTPUT EQUATIONS
Topics:
• The differential operator, input-output equations
• Design case - vibration isolation
Objectives:
• To be able to develop input-output equations for mechanical systems.
6.1 INTRODUCTION
To solve a set of differential equations we have two choices, solve them numeri-
cally or symbolically. For a symbolic solution the system of differential equations must be
manipulated into a single differential equation. In this chapter we will look at methods for
manipulating differential equations into useful forms.
The differential operator ’d/dt’ can be written in a number of forms. In this book
there have been two forms used thus far, d/dt x and x-dot. For convenience we will add a
third, ’D’. The basic definition of this operator, and related operations are shown in Figure
6.1. In basic terms the operator can be manipulated as if it is a normal variable. Multiply-
ing by ’D’ results in a derivative, dividing by ’D’ results in an integral. The first-order
axiom can be used to help solve a first-order differential equation.
input output equations - 6.2
n
d n
d- x = Dx 1- x =
∫ x dt
---- -------- = D ---
basic definition n
dt dt D
algebraic manipulation Dx + Dy = D ( x + y )
Dx + Dy = Dy + Dx
Dx + ( Dy + Dz ) = ( Dx + Dy ) + Dz
n
D n–m
simplification ---------x- = D x
m
D
( D + a )- = x
x---------------------
(D + a)
x(t) -
= e ∫ x ( t )e dt + C
first-order axiom – at at
------------------
(D + a)
Note: ·
x + Ax = y ( t ) xD + Ax = y ( t )
xD + Ax = y ( t ) x( D + A) = 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 dt dt
∫e
At
e x = y ( t )dt + C
at at at
–A t
De x = e Dx + ae x
At
∫ e y ( t )dt + C
x = e
y(t )-
= e ∫ e y ( t )dt + C
–A t At
-------------
D+A
d- 2
---- d
x + ----- x + 5x = 5t
dt dt
2
D x + Dx + 5x = 5t
2
x ( D + D + 5 ) = 5t
5t
x = --------------------------
2
D +D+5
x = t --------------------------
5
2
D +D+5
d-
Given, ---- x + 5x = 3t x ( 0 ) = 10
dt
Dx + 5x = 3t d- 5t 5t
guess, ---- ( te – e )
3t dt
x = -------------
D+5 5t 5t 5t
= 5te + e – e
–5 t
3tdt + C
5t
∫ e
x = e 5t
= 5te
d- 5t 5t 5t
–5 t
5t 5t ---- ( te – e ) = 5e t
3 --------------------- + C
te – e dt
x = e
5 5t 5t
te –e -
∫e
5t
-------------------- = t dt
Initial conditions, 5
(0)( 1) – ( 1)
x ( 0 ) = ( 1 ) 3 ----------------------------- + C = 10
5
C = 10.6
5t 5t
–5 t --------------------
te – e -
x = e 3 + 10.6
5
–5t
x = 0.6 ( t – 1 ) + 10.6e
–5t
x = 0.6t – 0.6 + 10.6e
A typical system will be described by more than one differential equation. These
equations can be solved to find a single differential equation that can then be integrated.
The basic technique is to arrange the equations into an input-output form, such as that in
Figure 6.5. These equations will have only a single output variable, and these are always
shown on the left hand side. The input variables (there can be more than one) are all on the
right hand side of the equation, and act as the non-homogeneous forcing function.
input output equations - 6.5
e.g., ··· ·· · · ··
2y 1 + y 1 + y 1 + 4y 1 = u 1 + u 1 + 3u 2 + u 3 + u 3
·· · ·· · ·
y 2 + 6y 2 + y 2 = u 1 + 3u 2 + u 2 + 0.5u 2 + u 3
where,
y = outputs
u = inputs
∴y 2 = y 1 ------------- – 0.5u 1 – Du 2
D+3
2
(2) Dy 2 = 2y 1 + y 2 + Du 1
∴y 2 ( D – 1 ) = 2y 1 + Du 1
Find the second equation for the example in Figure 6.6 for the output y2.
Figure 6.7 Drill problem: Find the second equation in the previous example
x1 x2
F M1 Ks M2
Ks ( x2 – x 1 ) ∑ Fx
2
= –Ks ( x2 – x1 ) = M2 D x2
M2
2
Ks x1 = x 2 ( M2 D + Ks )
The equations can be combined to eliminate x2.
2 Ks x 1
x 1 ( M 1 D + K s ) = F + K s --------------------------
-
M 2 D 2 + K s
2 2 2 2
x1 ( ( M1 D + K s ) ( M2 D + Ks ) – Ks ) = F ( M2 D + Ks )
4 2 2 2 2
x1 ( D M1 M2 + D Ks ( M1 + M2 ) + Ks – Ks ) = F ( M 2 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.9.
input output equations - 6.8
This can then be written in state variable form by creating dummy variables for integrat-
ing the function ’F’.
----
d-
dt x 1 = v 1
----
d-
v = a1
dt 1
----
d-
dt a 1 = d 1
----
d-
dt d 1 M 1 M 2 + a 1 K s ( M 1 + M 2 ) = a F M 2 + FK s
----
d – K s ( M 1 + M 2 ) Ks
- d 1 = a 1 ----------------------------------
- + aF ------
1 - --------------
-
+ F
dt M1 M2 M 1 M 1 M 2
The approximate value of the second derivative of a unit time step can be calculated using
the time step.
1 (when the timestep, step, it is turned on)
a F0 = -----2
T
1
a F 1 = – ----2- (after the first timestep)
T
v F = TaF 0 + Ta F1 = T -----2 + T – ----2- = 0
1 1
(to verify)
T T
2 2 2 2
x F = ----- a F + ----- aF = ----- -----2 + ----- -----2 = --- + --- = 1
T T T 1 T 1 1 1
2 2 2 T 2 T 2 2
These equations can then be written in matrix form.
x1 0 1 0 0 x 0 0
1
0 0 1 0 0 0
d- v 1 v1 aF
---- = 0 0 0 1 + 0 0
dt a a1 F
1 –Ks ( M1 + M2 ) Ks
1 - --------------
d1 0 0 ----------------------------------- 0 d ------ -
M1 M2 1 M1 M1 M2
Guess, · ··
x = A x = 0 x = 0
0 + 3 ( 0 ) + 2A = 2 ( 0 ) + 5 ( 1 ) 5
A = ---
2
The derivative in the non-homogeneous solution must now be used to find the initial con-
ditions. However the initial position and velocity are known to be zero.
2
----
d-
x + 3 ----- x 0 + 2x 0 = 4 ----- F + 5F 0
d d
dt 0 dt dt 1
for a step function
2
----
d- ----
d-
dt x 0 + 3 ( 0 ) + 2 ( 0 ) = 4 dt 1 + 5 ( 0 ) · 1
u ( t ) = -----
dt
2
----
d- ----
d-
dt x 0 = 4 dt 1
d-
---- x = 4 Note: This will be used as an initial condition
dt 0
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 ) = C 1 e + C2 e + ---
2
–0 –0 5 5
x ( 0 ) = C1e + C2e + --- = 0 C 1 = – C 2 – ---
2 2
· –t – 2t
x ( t ) = – C 1 e – 2C 2 e
·
x ( 0 ) = – C 1 – 2C 2 = 4
– – C 2 – --- – 2C 2 = 4
5 3
2 C 2 = – ---
2
C 1 = – – --- – --- = – 1
3 5
2 2
The final equation can then be written.
– t 3 – 2t 5
x ( t ) = – e – --- e + ---
2 2
The example in Figure 6.10 is reconsidered with a sinusoidal input in Figure 6.12.
In this case the initial acceleration is found to be non-zero. In practical terms, this can be
ignored because only the initial position and velocity will be used to find the coefficients.
input output equations - 6.11
·
F ( t ) = sin ( t ) F ( t ) = cos ( t )
·
F(0) = 0 F(0) = 1
d- 2
---- ·
x 0 + 3 ----- x 0 + 2x 0 = 4 ( F ( 0 ) ) + 5F ( 0 )
d
dt dt
2
----
d-
dt x 0 + 3 ( 0 ) + 2 ( 0 ) = 4 ( 1 ) + 5 ( 0 )
2
----
d- This indicates that the acceleration will have an initial value,
dt x 0 = 4 but it will not affect the initial position or velocity.
2
dx- d x
∑ Fy = – F + Kd -----
dt
+ K s x = – M -------2-
dt
Ks 2
Kd d x dx
F = M -------2- + K d ------ + K s x
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 chang-
ing the input ‘x’, and there is some change in ‘F’. We know this could easily be
reversed mathematically and practically.
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.
Mass-spring-damper systems are often used when doing vibration analysis and
design work. The first stage of such analysis involves finding the actual displacement for a
given displacement or force. A system experiencing a sinusoidal oscillating force is given
in Figure 6.14. Numerical values are substituted and the homogeneous solution to the
equation is found.
input output equations - 6.13
The solution continues in Figure 6.15 where the particular solution is found and
put in phase shift form.
input output equations - 6.14
The system is assumed to be at rest initially, and this is used to find the constants in
the homogeneous solution in Figure 6.16. 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 fre-
quency components at 1.392rad/s and 6rad/s. The steady-state force at 6rad/s will have a
magnitude of .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.
input output equations - 6.15
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 ) )
F = 2 ---- ( – 0.1673 e
N – 0.25t
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 adding a mass-spring isolator, as shown in Figure
6.17. In the figure the bottom mass-spring-damper combination is the original system. The
input output equations - 6.16
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 dif-
ferential equations for both masses.
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 – x1 D ) – K s1 ( x 2 – x 1 ) = M 2 x 2 D
2
· ·
Kd ( x2 – x1 ) K s1 ( x 2 – x 1 ) x 2 ( – K s2 – K d D – K s1 – M 2 D ) = x 1 ( – K d D – K s1 )
2
K s2 + K d D + K s1 + M 2 D
x 1 = x 2 ------------------------------------------------------------- (1)
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
2
M1 K d ( x 2 D – x 1 D ) + K s1 ( x 2 – x 1 ) – F = M 1 x 1 D
2
F x 1 ( – K d D – K s1 – M 1 D ) + x 2 ( K d D + K s1 ) = F (2)
For the design we are only interested in the upper spring, as it determines the force
on the ground. An input-output equation for that spring is developed in Figure 6.18. The
input output equations - 6.17
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.
The solution begins by combining equations (1) and (2) and inserting the.numerical val-
ues 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
– ----- x + K s2 ----- x 2 – 0.5K s2 ----- x 2 – 2K s2 x 2 = 0.5 ----- F + 2F
d d
dt 2 dt dt dt
d 4 d 2
– ----- x + K s2 ----- x 2 – 0.5K s2 ----- x 2 – 2K s2 x 2 = 0.5 ----- 5 sin ( 6t ) + 2 ( 5 ) sin ( 6t )
d d
dt 2 dt dt dt
d 4 d 2
– ----- x + K s2 ----- x 2 – 0.5K s2 ----- x 2 – 2K s2 x 2 = 15 cos ( 6t ) + 10 sin ( 6t )
d
dt 2 dt dt
This particular solution of the differential equation will yield the steady-state dis-
placement of the upper mass. This can then be used to find the needed spring coefficient.
input output equations - 6.18
d 4 d 2
– ----- x + K s2 ----- x 2 – 0.5K s2 ----- x 2 – 2K s2 x 2 = 15 cos ( 6t ) + 10 sin ( 6t )
d
dt 2 dt dt
x p = A sin 6t + B cos 6t
----
d-
dt x p = 6A cos 6t – 6B sin 6t
d- 2
---- x = – 36 A sin 6t – 36B cos 6t
dt p
d- 3
---- x = – 216 A cos 6t + 216B sin 6t
dt p
4
----
d-
dt x p = 1296A sin 6t + 1296B cos 6t
sin ( 6t ) ( – 1296A – 36AK s2 + 0.5K s2 6B – 2K s2 A ) = 10 sin ( 6t )
A ( – 1296 – 38K s2 ) + B ( 3K s2 ) = 10
10 + A ( 1296 + 38K s2 )
B = ------------------------------------------------------
3K s2
cos ( 6t ) ( – 1296B – 36BK s2 + ( – 0.5 )K s2 6A – 2K s2 B ) = 15 cos ( 6t )
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 )
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 )
– 1453K 22s – 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
425K 2s + 12960 2 540K 2s + 69918768 2
0.1 = ---------------------------------------------------------------------------------
- + ----------------------------------------------------------------------------------
– 1453K 22s – 98496K 2s – 1679616 – 1453K 22s – 98496K 2s – 1679616
A value for the spring coefficient was then found using Mathcad to get a value of 662N/m.
6.5 SUMMARY
1. Develop the input-output equation for the mechanical system below. There is viscous damping
between the block and the ground. A force is applied to cause the mass the accelerate.
x
F
M
B
4. The following differential equations were converted to the matrix form shown. Use Cramer’s
rule to find an input-output equation for ‘y’.
·· F
y + 2x = ------ 2 F
10 (D ) (2) y = ------
10
· ·· 2
7y + 4y + 9x + 3x = 0 ( 7D + 4 ) ( 9D + 3 ) x 0
input output equations - 6.21
5. Find the input output equation for y2. Ignore the effects of gravity.
K s1
M1 y1
K s2
M2 y2
6. 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
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
input output equations - 6.22
R JM
K y
8. 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
1.
input output equations - 6.23
x + x ----- = -----
·· · B F
M M
2.
·· ·
x + 2x = –3
·· ·
y + 2y = 3
3.
d- 4
---- d 3 d 2
x + 2 ----- x + 3 ----- x + ----- x + x 1 = ----- F + F
d d
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 =
dt 2 dt 2 dt 2 dt 2 2 dt F + dt F + 2F
4.
F-
----- (2)
10
F- 2
0 ( 9D + 3 )
2 ----- ( 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
----
( ) ( ) ( ) ( ) dt F ( 0.9 ) + F ( 0.3 )
y 9 + y 3 + y – 14 + y – 8 =
dt dt dt
d- 4
---- d 2 1 d 1 – 14 d 2 1
y + ----- y --- + ----- y --------- + y ------ = ----- F ------ + F ---
–8 1
dt dt 3 dt 9 9 dt 10 3
5.
d- 4
---- d 2 K s1 M 2 + K s2 M 2 + K s2 M 1 K s1 K s2
y 2 + ----- y 2 ------------------------------------------------------------- + y 2 ----------------- =
dt dt M1 M2 M1 M2
M1
d- 2 --------------
---- K s1 + K s2
F - + F ----------------------
-
dt M 1 M 2 M1 M2
input output equations - 6.24
6.
d- 4
---- d- 3 J----------------------------
---- 1 B 2 + J 2 B 1 d- 2 J----------------------------------------------------
---- 1 K s2 + J 2 K s2 + B 1 B 2
θ + θ - + θ - +
dt 2 dt 2 J1 J2 dt 2 J1 J2
d B 1 K s2 + B 2 K s2
---- K s2
- θ 2 ------------------------------------ = τ ---------
-
dt J1 J2 J1 J2
d- 4
---- d 3 J1 B2 + J2 B1 d 2 J 1 K s2 + J 2 K s2 + B1 B 2
θ 1 + ----- θ 1 ----------------------------- + ----- θ 1 ----------------------------------------------------- +
dt dt J1 J2 dt J1 J2
d- B
---- 1 K s2 + B 2 K s2 d- 2 ---- B2 K s2
- = ---- τ - + ----- τ ---------- + τ ----------
1 d
θ -----------------------------------
dt 1 J1 J2 dt J 1 dt J 1 J 2 J 1 J 2
input output equations - 6.25
7.
θ ··
∑M = – R ( K ( θR ) ) + R ( K ( – y – θR ) ) = J M θ
2 2 ··
JM R Kθ + RKy + R Kθ = –J 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 )
2
F+Mg θ ( KR ) + y ( MD + K ) = – F – Mg
for the theta output equation;
2 2
2R K + J M D 2
θ ( KR ) + θ ---------------------------------- ( MD + K ) = – F – Mg
– RK
2 2 2 2 2
θ ( – K R ) + θ ( 2R K + J M D ) ( MD + K ) = FKR + MgKR
2 2 2 2 2 2 4 2
θ ( – K R + 2R MKD + 2R K + J M MD + J M KD ) = FKR + MgKR
d- 4 J-----------
---- M M d- 4
θ - + ---- 2 2 2
θ ( 2R M + J M ) + θ ( K R ) = FKR + MgKR
dt KR dt
d- 4 4 2R 3 K KR K 3 R 3 2 2 2 2
---- d K R MgK R
θ + ----- θ ------------- + -------- + θ ------------ = F ------------ + ---------------------
dt dt J M M JM M JMM JMM
for the y output equation;
– RK
- ( KR ) + y ( MD 2 + K ) = – F – Mg
y ---------------------------------
2R2 K + J M D 2
4 2
2 2 JM D M 2 JM D 2
y 2R MD + ------------------- + K2R + ------------- – R K =
K K 2 2
2 JM D 2 JMD
– F 2R + ------------- – Mg 2R + -------------
K K
----
4 J M
d- ----------- 2 J
y M - + ----- y 2R M + -----
d 2 M
- + y ( R2 K ) =
dt K dt K
d- 2 –---------
---- J M 2 2
F + F ( – 2 R ) + ( – 2 MgR )
dt K
d- 2 2KR 1- R 2 K 2
2
d- 4
----
dt y dt y J M + M y J M M
+ ---- ------------- ---- + ------------ =
d- 2 – 1
---- – 2 KR 2 – 2 gKR2
F -----
- + F ----------------- + --------------------
dt M JM M JM
input output equations - 6.26
8.
K1 K 2 K2 K2
x + x ----------------------------- = F ----------------------------- + g -------------------
··
M ( K1 + K 2 ) M ( K 1 + K2 ) K1 + K 2
a) x ( t ) = – 0.2168 cos ( 5.774t ) + 0.2162
1. Find the input-output equations for the differential equations below if both ’x’ and ’y’ are out-
puts.
·
y + y + 5x = 3
·
x+x+y = 7
2. For the system pictured below find the output response as a function of time for y1 and y2 using
a) integration to find an explicit function, b) numerical analysis using Scilab or C.
N
K s1 K s1 = 100 ----
m
M 1 = 1Kg
M1 y1
N
K s2 = 1000 ----
m
K s2 M 2 = 0.1Kg
M2 y2
F
input output equations - 6.27
6.9 REFERENCES
Irwin, J.D., and Graf, E.R., Industrial Noise and Vibration Control, Prentice Hall Publishers,
1979.
Close, C.M. and Frederick, D.K., “Modeling and Analysis of Dynamic Systems, second edition,
John Wiley and Sons, Inc., 1995.
circuits - 7.1
7. ELECTRICAL SYSTEMS
Topics:
• Basic components; resistors, power sources, capacitors, inductors and op-amps
• Device impedance
• Example circuits
Objectives:
• To apply analysis techniques to circuits
7.1 INTRODUCTION
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.2 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 cur-
rents 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.
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
circuits - 7.2
sinusoidal input. Finally the most complex is transient analysis, often requiring integra-
tion, or similar techniques.
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.
7.2.1 Resistors
+ V
I = ---
V R
R
- V = IR
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 volt-
ages is determined by the ratio of the resistance between R1 and R2. To prove this the cur-
circuits - 7.3
rents into the center node are summed and set equal to zero. The equations are then
manipulated to produce the final relationship.
I1 + I2 + I3 = 0
+
Vi – Vo 0 – Vo
I1 ∴ ----------------- + I 2 + --------------- = 0
R1 R1 R2
Assume the output resistance is large, so
I2 is negligible.
Vi
Vi – V o – Vo
∴ ----------------- + --------- = 0
I2 +
R1 R2
I3 Vo
R2
∴V o ------ + ------ = V i ------
1 1 1
-
- R1 R2 R1
R 1 + R 2
∴V o -----------------
- = V i -----
1-
R 1 R2 R 1
Vo R2
∴------ = ------------------
Vi R 1 + R2
If two resistors are in parallel or series they can be replaced with a single equiva-
lent resistance, as shown in Figure 7.4.
circuits - 7.4
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 R 2
R eq = ------------------
R1 + R2
+ +
V+
V V I
- V
- -
A circuit containing a voltage source and resistors is shown in Figure 7.6. The cir-
cuit is analyzed using the node voltage method.
+
Vi + R2 R3 Vo
-
-
Examining the circuit there are two loops, but only one node, so the node current meth-
ods is the most suitable for calculations. The currents into the upper right node, Vo,
will be solved.
Vo – Vi Vo Vo
∑ ----------------
I =
R1
- + ------ + ------ = 0
R2 R3
Aside: when doing node-cur-
rent methods, select cur-
rents out of a node as
V o ------ + ------ + ------ = V i -------
1 1 1 1
R 1 R 2 R 3 R1 positive, and in as nega-
tive. This will reduce the
R2 R 3 + R1 R 3 + R 1 R2
V o -------------------------------------------------
- = V i ------
1- chances of careless mis-
R 1 R2 R 3 R1 takes.
R2 R 3
V o = Vi --------------------------------------------------
R 2 R 3 + R1 R 3 + R 1 R2
Evaluate the circuit in Figure 7.6 using the loop voltage method.
R2 R3
V o = V i --------------------------------------------------
R1 R2 + R1 R3 + R2 R3
Evaluate the voltage divider in Figure 7.3 using the loop current method. Hint: Put a volt-
age supply on the left, and an output resistor on the right. Remember that the output
resistance should be infinite.
Dependant (variable) current and voltage sources are shown in Figure 7.9. The
voltage and current values of these supplies are determined by their relationship to some
other circuit voltage or current. The dependant voltage source will be accompanied by a
’+’ and ’-’ symbol, while the current source has an arrow inside.
V = f( )
+ I = f( )
2ohm + + 3ohm
Ii V1 Io
- - V =f(V )
2 1
Figure 7.10 Drill problem: Find the currents in the circuit above
7.2.3 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 equation for a capacitor and
schematic symbols are given in Figure 7.11.
circuits - 7.9
+
+
I = C ----- V = CDV
C d
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 neg-
ative sides must be observed in the circuit. (Warning: reversing the polarity on an electro-
lytic capacitor can make them leak, fail and possibly explode.) The other capacitor symbol
is for a regular capacitor, normally with values under a microfarad.
+ C=1uF
-
V= I
5cos(10t)V
7.2.4 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 gener-
ated. If the current through the inductor changes then the magnetic field must change, oth-
erwise 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.13.
+ I
V = L ----- I = LDI
d
L
V dt
+ L=1mH
-
V= I
5cos(10t)V
7.2.5 Op-Amps
The ideal model of an op-amp is shown in Figure 7.15. 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.
V-
I- Note: for analysis use,
- Vo
I- = I+ = 0
I+ +
V+ V- = V+
A simple op-amp example is given in Figure 7.16. 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 normally rea-
sonable 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.
circuits - 7.13
R2
R1
-
+
Vi + +
- Vo
-
The voltage at the non-inverting input will be 0V, by design the voltage at the invert-
ing input will be the same.
V + = 0V
V - = V + = 0V
V- – Vi V- – Vo
∑ I V- = ---------------- + ----------------- = 0
R1 R2
0 – Vi 0 – Vo
-------------- + --------------- = 0
R1 R2
–R 2 Vi
V o = --------------
R1
–R2
V o = --------- Vi
R1
R2
Find the input/output ratio,
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.17 and derived in Figure 7.18. 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 manipula-
tion 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 subtractor.
circuits - 7.15
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 + – V o
∑ I V+ = ----------------- + ------------------ = 0
R1 R2
R1 + R2
V + ------------------ = V i ------ + V o ------
1 1
R1 R2 R1 R2
R2 R1
V + = V i ------------------ + V o ------------------ (1)
R1 + R2 R 1 + R2
V - – V ref V-
∑ V- -------------------
I =
R5
- + ------ = 0
R4
V- = V+
R4 R2 R1
V ref ------------------ = V i ------------------ + V o ------------------
R 4 + R 5 R 1 + R 2 R1 + R 2
R1 R2 R4
V o ------------------ = Vi ------------------ – V ref ------------------
R 1 + R 2 R 1 + R 2 R 4 + R 5
R R 4 ( R 1 + R 2 )
V o = Vi -----2- – V ref -----------------------------
- (3)
R 1 R 1 ( R 4 + R 5 )
100KHz. When the op-amp is being used for high frequencies or large gains, the model of
the op-amp in Figure 7.19 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, normally less than 100mA.
V–
typically,
rn
+ Vo r n > 1M Ω
- 5
ro A > 10
V A ( V+ – V- ) r o < 100 Ω
+
7.3 IMPEDANCE
When representing component values with impedances the circuit solution is done
as if all circuit components are resistors. An example of this is shown in Figure 7.21.
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.
DL
t=0sec
50VDC +
+ R Vo
- 1/DC -
50VDC 1 1 R
+ ------------------------ = ------------------ = ----------------------
1 - --1- 1 RCD + 1
- ------------- + DC + ---
-------
1 - R R
DC
---------------------
R -
1 + DCR
Vo = 50V ------------------------------------------ = 50V ------------------------------------------
-
R
2
DL + ----------------------
R D RLC + DL + R
1 + DCR
The list of instructions below can be useful when approaching a circuits problem.
The most important concept to remember is that a minute of thinking about the solution
approach will save ten minutes of backtracking and fixing mistakes.
The circuit in Figure 7.22 could be solved with two loops, or two nodes. An arbi-
trary decision is made to use the current loop method. The voltages around each loop are
summed to provide equations for each loop.
circuits - 7.19
R1
C
+
V L
I2
- I1
+
R2 Vo
-
First, sum the voltages around the loops and then eliminate I1.
∑ VL1 = – V + R 1 I 1 + L ( DI 1 – DI 2 ) = 0
( R 1 + LD )I 1 = V + ( LD )I 2 (1)
I 1 = -------------------- + -------------------- I 2
V LD
R 1 + LD R 1 + LD (2)
I2
∑ V L2 = L ( DI 2 – DI 1 ) + -------
CD
- + R2 I2 = 0
I2 (3)
L ( DI 2 – DI 1 ) + -------- + R 2 I 2 = 0
CD
( DL )I 1 = LD + -------- + R2 I 2
1
CD
1 R2
I 1 = 1 + --------------2 + -------- I 2 (4)
CLD LD
The equations in Figure 7.22 are manipulated further in Figure 7.23 to develop an
input-output equation for the second current loop. This current can be used to find the cur-
rent through the output resistor R2. The output voltage can then be found by multiplying
the R2 and I2.
circuits - 7.20
First, sum the voltages around the loops and then eliminate I1.
R2
I 1 = -------------------- + -------------------- I 2 = 1 + --------------2 + -------- I 2
V LD 1
R 1 + LD R 1 + LD CLD LD
V - 1 R2 LD
------------------- = 1 + --------------2 + -------- – -------------------- I 2
R 1 + LD CLD LD R 1 + LD
2 2 3
V - ( CLD + 1 + CDR2 ) ( R 1 + LD ) – CL D
------------------- = --------------------------------------------------------------------------------------------------- I2
R 1 + LD CLD
2
CLD
2
I 2 = ---------------------------------------------------------------------------------------------------------------------------------
- V
( R 1 + LD ) ( ( CLD 2 + 1 + CDR 2 ) ( R 1 + LD ) – CL 2 D 3 )
CLD
2
I 2 = ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- V
CL ( R1 + R 2 )D 3 + L ( CR 21 + 2CR 1 R 2 + L )D 2 + R 1 ( CR1 R 2 + 2L )D + ( R 12 )
Convert it to a differential equation.
2
CL ( R 1 + R 2 )I 2''' + L ( CR1 + 2CR1 R 2 + L )I 2'' + R 1 ( CR 1 R 2 + 2L )I 2' + ( R 12 )I 2 = CLV''
The equations can also be manipulated into state equations, as shown in Figure
7.24. 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.
circuits - 7.21
State equations can also be developed using equations (1) and (3).
· ·
(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 (10)
· V R1
q 1 = --- – ------ I 1
L L
I1 = q1 + I2 (11)
· V R1
q 1 = --- – ------ ( q 1 + I 2 )
L L
R1 R1
q 1 = q 1 – ------ + I 2 – ------ + ---
· V (12)
L L L
·· ·· I ·
(3) becomes LI 2 – LI 1 + ---2- + R 2 I 2 = 0
C
I2 ·
V – R1 I 1 + ---- + R 2 I 2 = 0
C
I2 ·
V – R 1 ( q1 + I 2 ) + ---- = – R 2 I 2
C
I 2 = I 2 – R 1 + ---- + q 1 ( – R 1 ) + V
· 1 (13)
C
These can be put in matrix form,
R1 R1
d- q 1 – ------ – ------ q1 V
---
---- = L L + L q1
dt I I2 I1 = 1 1
2 1 V I2
– R 1 – R1 + ----
C
Evaluate the circuit in Figure 7.22 using the node voltage method.
Rf C
Ri
Vin
- Vout
+
The circuit in Figure 7.27 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.
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 = Vs ------------------
- where, ZR = R Z C = --------
Z R + Z C DC
Next, we may combine the equations, and convert it to a differential equation.
V o = Vs ------------------
R
1
R + --------
DC
V o = Vs ----------------------
CRD
CRD + 1
V o ( CRD + 1 ) = V s ( CRD )
· ·
V o ( CR ) + V o = Vs ( CR )
V o + Vo -------- = V s
· 1 ·
CR
– B + A -------- = – 3
1
CR
– B + B -------- -------- = – 3
–1 1
CR CR
B ------------
1
2 2 + 1 = 3
C R
2 2
3C R - 3C 2 R 2 – 1 – 3 CR -
B = ---------------------
2 2 A = ---------------------
- -------- = ---------------------
2 2 CR
1+C R 1 + C R 1+C R
2 2
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 velocity due to fric-
tion 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.29.
T voltage/current increases
The basic equivalent circuit model is shown in Figure 7.30, 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.
circuits - 7.27
I R
J1 J2
+ T, ω
Voltage
Supply Vm +
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.
These basic equations can be manipulated into the first-order differential equation
in Figure 7.31.
The current-voltage relationship for the left hand side of the equation can be writ-
ten and manipulated to relate voltage and angular velocity.
Vs – V m
I = ------------------
R
Tm V s – Kω
∴------ = --------------------
K R
J ----- ω + T load
d
dt V s – Kω
∴------------------------------------ = -------------------
-
K R
2 T load
∴ ----- ω + ω ------ = Vs ------ – ------------
d K K
dt JR JR J
AC induction motors are extremely common because of the low cost of construc-
tion, and compatibility with the power distribution system. The motors are constructed
with windings in the stator (outside of the motor). The rotor normally has windings, 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 fre-
quency of the AC power, and the number of pole of the machine. For example, an induc-
tion 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.32. 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.33. These can be com-
bined with the equivalent circuit model to determine the response of the motor to a load.
circuits - 7.29
Brushless servo motors are becoming very popular because of their low mainte-
nance requirements. The motors eliminate the need for brushes by using permanent mag-
nets on the rotor, with windings on the stator, as shown in Figure 7.33. The windings on
the stator are switched at a given frequency to produce a desired rotational speed, or held
static to provide a holding torque.
Va
windings on stator
Vb
N S
permanent
magnet rotor
Vc
The basic relationships for brushless DC motors are given in Figure 7.34.
V t = R m + ----- L I m + E
d
dt
E = Ke ω
T = Kt Im
where,
V t = terminal voltage across motor windings
R m = resistance of a motor winding
L = phase to phase inductance
I m = current in winding
E = back e.m.f. of motor
K e = motor speed constant
ω = motor speed
K t = motor torque constant
T = motor torque
d- 2 Rm d Ke Kt Kt V Rm T load
---- - ω = ----------t – 1--- ----
- ----- ω + -----------
ω + ------
d-
T load – -------------------
dt L dt LJ LJ J dt LJ
To rotate the motor at a constant velocity the waveform in Figure 7.36 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)
circuits - 7.32
7.6 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 Fig-
ure 7.37. At high frequencies the capacitor, C, has a very low impedance, and grounds the
input signal. At low frequencies the capacitor impedance is high, increasing the gain of the
op-amp circuit. This is easier to conceptualize if the R1-C pair are viewed as a voltage
divider.
Rf
Ri
-
+
R1 +
+ Vo
Vi -
C
-
A high pass filter is shown in Figure 7.38. In this case the voltage divider in the
previous circuit is reversed. In this circuit the gain will increase for signals with higher fre-
quencies.
circuits - 7.33
Rf
Ri
-
+
C +
+ Vo
Vi -
R
-
The relationships in Figure 7.39 can be used to calculate the power and energy in a
system. Notice that the power calculations focus on resistance, as resistances will dissipate
power in the form of heat. Other devices, such as inductors and capacitors, store energy,
but don’t dissipate it.
2
2V
P = IV = I R = ------ E = Pt
R
7.8 SUMMARY
1. Derive the equations for combined values for resistors, capacitors and inductors in series and
parallel.
R R
+
Vi
+
Vo
- R R
-
+
Vi
+ C Vo
-
-
L +
Vi + C
Vo
- R
-
5. Develop differential equations and the input-output equation for the electrical system below.
R1
+
Vi C
+ L R2 Vo
-
-
6. Consider the following circuit. Develop a differential equation for the circuit.
L +
C
Vi + R1
R2 R3 Vo
-
-
7. Find the input-output equation for the circuit below, and then find the natural frequency and
damping coefficient.
R1
+
Vi R2 Vo
+ L C
-
-
8. a) Find the differential equation for the circuit below where the input is Vi, and the output is Vo.
L
+
Vi
+ C R Vo
- -
c) Solve the differential equation found in part b) using the numerical values given
below. Assume at time t=0, the circuit has the voltage Vo and the first derivative
shown below.
L = 10mH C = 1µF R = 1KΩ V i = 10V
V
at t=0s V o = 2V V o ′ = 3 ---
s
9.
a) Write the differential equations for the system pictured below.
b) Put the equations in input-output form.
R2
R1
Vi
- Vo
C +
10. Given the circuit below, find the ratio of the output over the input (this is also known as a
transfer function). Simplify the results.
R2
Vi R1
C
- Vo
+
circuits - 7.37
11. Examine the following circuit and then derive the differential equation.
L R2
R1
+ -
+
+
Vi Vo
- -
12. Examine the following circuit and then derive the differential equation.
R2
R1
+ -
+
+
Vi Vo
- -
13.
a) Find the differential equation for the circuit below.
1000Ω
1µF
0.001H 1000Ω
-
+
+
Vi +
- 10Ω Vo
-
circuits - 7.38
b) Put the differential equation in state variable form and a numerical method to
produce a detailed sketch of the output voltage Vo. Assume the system starts at
rest, and the input is Vi=5V.
14.
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 general method is put in a voltage such as
Vi=1sin(___t), and see what the magnitude of the output is. Divide the magni-
tude 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
1.
R1 R 2
R parallel = ------------------ R series = R 1 + R 2
R1 + R2
C 1 C2
C series = ------------------- C parallel = C 1 + C 2
C1 + C 2
L1 L2
L parallel = ------------------ L series = L 1 + L 2
L1 + L2
circuits - 7.39
2.
Vo
------ = 1---
Vi 5
3.
4.
b) ·
V o = Xo
5.
6.
· R2 R3 C + L R2 R2 R 3
V o + Vo ------------------------------- + V o ------------------------------- = V i ---------------------------
·· ·
LC ( R 2 + R 3 ) LC ( R2 + R 3 ) L ( R2 + R3 )
7.
1- L ( R1 + R2 )
b) ωn = ------ ζ = -------------------------------
LC 2 CR 1 R 2
circuits - 7.40
8.
(a.
Sum currents at node Vo
( Vo – Vi ) ( Vo )
∑ IVo = ---------------------
DL
- + ( V o )DC + ----------
R
- = 0
2 V o DL
V o – V i + V o D LC + -------------- = 0
R
V o'' + Vo' -------- + V o ------- = V i -------
1 1 1
CR LC LC
(b.
V o + V o -------- + V o ------- = V i -------
·· · 1 1 1
CR LC LC
circuits - 7.41
(c.
· 10
–2
V o ( LC ) + V o --- + V o = V i
·· · L ·· – 2 –6
R V o ( 10 10 ) + V o ---------- + V o = 10
10 3
·· –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
A + A ( 10 ) + ( 10 ) = 0
8 – 10 ± ( 10 ) – 4 ( 10 )
A = -------------------------------------------------------------- = – 500 ± 9987j
2
– 500t
Vh = C1 e cos ( 9987t + C2 )
particular; guess
3 8 9
Vp = A ( 0 ) + ( 0 ) ( 10 ) + ( A ) ( 10 ) = ( 10 ) A = 10
V p = 10
for initial conditions,
– 500t
Vo = C1 e cos ( 9987t + C 2 ) + 10
– 500 ( 0 )
for t=0, Vo=2V 2 = C1 e cos ( 9987 ( 0 ) + C 2 ) + 10
– 8 = C 1 cos ( C 2 ) (1)
· – 500t – 500t
V o = –500C 1 e cos ( 9987t + C 2 ) – 9987C 1 e sin ( 9987t + C 2 )
for t=0, d/dt Vo=3V 3 = – 500C 1 cos ( C 2 ) – 9987C 1 sin ( C 2 )
9.
R1
V i + V i ( R 1 C ) + Vo ------ = 0
·
a)
R 2
–R 2
Vo = V i ( – CR 2 ) + Vi ---------
·
b)
R1
10.
Vo – R2
------ = ---------------------------------
-
Vi R 1 + DR 1 R 2 C
11.
–R
V o = Vi ------ + V i --------2-
· –L
R 1 R1
12.
R2 · –R2
V o + Vo ------ = V i ---------
·
L R1
13.
(a.
Create a node between the inductor and resistor Va, and use the node voltage method
( VA – Vi ) ( VA – V– ) V– = V = 0V
∑ IV A
= ---------------------- + -------------------------- = 0
0.001D 1000
+
1000000 ( V A – V i ) + V A D = 0
XXXXADD UNITSXXXXX
V A = V i -------------------------------
1000000
1000000 + D
( V– – VA ) ( V– – Vo )
∑ – -------------------------
I V =
1000
- + ------------------------- + ( V – – V o ) ( 0.000001D ) = 0
1000
– 1 )- 1000000 (-------------
(----------- –Vo )
V i ------------------------------- + - + ( – V o ) ( 0.000001D ) = 0
1000 1000000 + D 1000
V o ( – 1 – 0.001D ) = V i -------------------------------
1000000
1000000 + D
2
V o ( – 1000000 – D – 1000D – 0.001D ) = 1000000V i
–9 –3
V o'' ( – 10 ) + V o' ( – 1.001 ( 10 ) ) + V o ( – 1 ) = V i
circuits - 7.43
(b. d- · d- · ·
---- Vo = Vo ---- V o = – 1000000000V i – 1001000Vo – 1000000000V o
dt dt
14.
–R2
V o = Vi ( –CR 2 ) + V i ---------
a) ·
R1
b) Not a state equation
c) assume Vi=1sin(wt)
+ +
L Vo
Vi C
-
-
circuits - 7.44
L
R1
+ -
+
+
Vi Vo
- -
L
R
+ -
+
C +
Vi Vo
- -
4. 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
circuits - 7.45
+
C1 C2
Vi
+ R1 R2
L Vo
-
6. 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).
feedback control - 8.1
Topics:
• Transfer functions, block diagrams and simplification
• Feedback controllers
• Control system design
Objectives:
• To be able to represent a control system with block diagrams.
• To be able to select controller parameters to meet design objectives.
8.1 INTRODUCTION
Transfer functions are used for equations with one input and one output variable.
An example of a transfer function is shown below in Figure 8.1. The general form calls for
output over input on the left hand side. The right hand side is comprised of constants and
the ’D’ operator. In the example ’x’ is the output, while ’F’ is the input.
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.
·· · 2 f
x + 2ζωn x + ω n x = -----
M
2 2 f
xD + 2ζω n xD + ω n x = -----
M
2 2 f
x ( D + 2ζω n D + ω n ) = -----
M
----
1-
x M particular
-- = --------------------------------------------
f 2 2
D + 2ζω n D + ω n homogeneous
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.
feedback control - 8.3
· 1
x + --- x = f
τ
1
xD + --- x = f
τ
x D + --- = f
1
τ
x 1
-- = -------------
f 1
D + ---
τ
Figure 8.4 shows a transfer function block for a car. The input, or control variable
is the gas pedal angle. The system output, or result, is the velocity of the car. In standard
operation the gas pedal angle is controlled by the driver. When a cruise control system is
engaged the gas pedal must automatically be adjusted to maintain a desired velocity set-
point. 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 controller function to adjust the control variable in the system.
Negative feedback is the term used for this type of controller.
feedback control - 8.4
Control variable
INPUT OUTPUT
(e.g. θgas) SYSTEM
(e.g. velocity)
(e.g. a car)
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 pos-
itive 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 subtracted. As a
rule negative feedback systems are more stable than positive feedback systems. Negative
feedback also makes systems 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 gen-
eral idea of how a control function might work for a cruise control system.
feedback control - 8.5
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 systems.
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.
u = K p e + K i ∫ edt + K d ------
de
dt
Figure 8.7 shows a basic PID controller in block diagram form. In this case the
potentiometer on the left is used as a voltage 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 feed-
back error. The resulting error is used in the PID function. In the proportional branch the
error is multiplied by a constant, to provide a longterm 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 occurs 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.
feedback control - 8.6
Kp ( e )
V V
+ +V
integral
+ e u
Ki ( ∫ e ) amp motor
+
- derivative + -V
K d ----- e
d
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 eliminate errors. The PD controller does not deal with
longterm errors, but is very responsive to system changes.
For a PI Controller
θ gas = K p v error + K i ∫ v error dt
For a P Controller
θ gas = K p v error
For a PD Controller
dv error
θ gas = K p v error + K d ----------------
dt
Aside: The manual process for tuning a PID controlled is to set all gains to zero. The pro-
portional gain is then adjusted until the system is responding to input changes without
excessive overshoot. After that the integral gain is increased until the longterm 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 diagram will be developed for a system. The diagram
will then be simplified through a process that is both graphical and algebraic. For exam-
ple, 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
G( D)
r = ------------------------------------- c
1 + G ( D )H ( D )
Other block diagram equivalencies 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.
feedback control - 8.8
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 1 c
c G( D) is equal to -------------
G( D)
r = G ( D )c
c = r -------------
1
G(D )
c r c r
G( D)
is equal to G( D)
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 ± e
c ± G( D)
G( D)
is equal to
±
±
b 1 b
c -------------
G( D)
e = ± G ( D )c ± b
e = G ( D ) ± c ± -----------------
b
±G ( D )
c r c r
G( D) G(D)
is equal to
d
d r = G ( D ) ( ±c ± d ) G( D)
r = ± cG ( D ) ± dG ( D )
Recall the example of a cruise control system for an automobile presented in Fig-
ure 8.4. This example is extended in Figure 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.
feedback control - 8.11
= G(D)
vdesired verror vactual
K + K
-----i --------
10-
+ p D + K d D MD
-
H(D) = 1
K + K -----i --------
10-
vdesired p D + K d D MD vactual
--------------------------------------------------------------------------
Ki
1 + K p + ----- + K d D --------- ( 1 )
10
D MD
The function block is further simplified in Figure 8.18 to a final transfer function
for the whole system.
feedback control - 8.12
K + K -----i
vdesired p D + K d D vactual
-------------------------------------------------------
Ms K
------- + K p + -----i + K d D
10 D
2
vdesired D ( Kd ) + D ( K p ) + ( Ki ) vactual
----------------------------------------------------------------------
D 2 -----M
10- + K d + D ( K p ) + ( K i )
2
v actual D ( K d ) + D ( Kp ) + ( Ki )
----------------- = ----------------------------------------------------------------------
v desired D 2 -----M
10- + K d + D ( K p ) + ( K i )
2.2K
-
+
+5V -5V
5K potentiometer
desired position
voltage Vd
The feedback controller can be represented with the block diagram in Figure 8.20.
desired
position
voltage +
Vd gain Kp op-amp motor shaft
potentiometer
The transfer functions for each of the blocks are developed in Figure 8.21. Two of
the values must be provided by the system user. The op-amp is basically an inverting
amplifier with a fixed gain of -2.2 times. The potentiometer is connected as a voltage
divider and the equation relates angle to voltage. Finally the velocity of the shaft is inte-
grated to give position.
– Vi – V o
-------- + ----------- = 0
1K 2.2K
V
-----o- = – 2.2
Vi
For the potentiometer assume that the potentiometer has a range of 10 turns and 0
degrees is in the center of motion. So there are 5 turns in the negative and positive
direction.
θ
V o = 5V --------------
5 ( 2π )
V
-----o- = 0.159Vrad –1
θ
For the shaft, it integrates the angular velocity into position:
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’.
feedback control - 8.15
For the motor use the differential equation and the speed curve when Vs=10V is applied:
1400 RPM 2
----
d-
ω + ------ ω = ------ V s
K K
dt JR JR
1s 2s 3s
For steady-state
----
d-
ω = 0 ω = 1400RPM = 146.6rads
–1
dt
2
0 + ------ 146.6 = ------ 10
K K
JR JR
K = 0.0682
τ ≈ 0.8s
1s
2
-----
K -
= ---
1
JR τ
The individual transfer functions for the system are put into the system block dia-
gram 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’.
feedback control - 8.16
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 criti-
cally 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 fre-
quency. The final result of ’Kp’ is negative, but this makes sense when the negative gain
on the op-amp is considered.
feedback control - 8.17
ξ = 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' + ω n x
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
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 8.25. 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 e = c–b
Feedback error,
H
Given,
Kp
G ( D ) = ------ H( D) = 1
D
r G Kp
∴-- = ------------------ = ----------------
-
c 1 + GH D + Kp
·
∴r + K p c = K p c
c = A
The homogeneous solution is,
–Kp t
rh = C 1 e
C1 = –A
–Kp t
r = –A e +A
The error can now be calculated.
S = c–r
–Kp t –Kp t
S = A – ( –A e + A ) = Ae
Figure 8.27 Drill problem: Calculate the system error for a ramp input
feedback control - 8.20
Find the system error ’e’ for the given ramp input, R.
1
G ( D ) = -----------------------------
2
- H(D) = 5 c = 4t
D + 4D + 5
The PID controller, and simpler variations were discussed in earlier sections. A
more complete table is given in Figure 8.29.
Proportional (P) Gc = K
G c = K 1 + -------
1
Proportional-Integral (PI) τD
Proportional-Derivative (PD) G c = K ( 1 + τD )
G c = K 1 + ------- + τD
1
Proportional-Integral-Derivative (PID)
τD
1 + ατD
Lead G c = K -------------------- α>1
1 + τD
1 + τD
Lag G c = K -------------------- α>1
1 + ατD
1 + τ 1 D 1 + ατ 2 D α>1
G c = K ----------------------
- -----------------------
Lead-Lag 1 + ατ 1 D 1 + τ 2 D τ1 > τ2
When a model of a system is well known it can be used to improve the perfor-
mance of a control system by adding a feedforward function, as pictured in Figure 8.30.
The feedforward 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.
feedback control - 8.22
feedforward
function
feedback process
function
State variable matrices were introduced before. These can also be used to form a
control system, as shown in Figure 8.31.
d-
---- X = AX + BU
dt
Y = CX + D
d-
+ ---- X X + Y
U dt 1-
B --- C
D
+ +
A D
An example is shown in Figure 8.32 that implements a second order state equation.
The system uses two integrators to integrate the angular acceleration, then the angular
velocity, to get the position.
feedback control - 8.23
d- d-
+ ---- ω ---- θ θ
τ dt 1- dt 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 feedforward control systems to estimate system performance and then predict a
useful output value.
The model,
2
ω + ω ------ = V s ------
· K K
JR JR
V s = ω ------ + ω ( K )
· JR
K
State Based Controller
d-
ω ---- ω +
dt JR
A ------
K
+
K
+ K Plant
K P + -----i + DK d
D
-
Feedback
feedback control - 8.24
When controlling a multistep process a cascade controller can allow refined con-
trol 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.
8.4 SUMMARY
1. Develop differential equations and then transfer functions for the mechanical system below.
There is viscous damping between the block and the ground. A force is applied to cause the
feedback control - 8.25
F
M
2. 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
3. Find the transfer functions for the systems below. Here the input is a torque, and the output is
the angle of the second mass.
θ1 θ2
J1 J2
τ K s1 K s2
B1 B2
feedback control - 8.26
4. Find the transfer functions for the system below where Vi is the input and Vo is the output.
C L
+ +
Vi R1 R2 Vo
- -
5. Given the transfer function, G(s), determine the time response output Y(t) to a step input X(t).
4 Y
G = ------------- = ---
D+2 X X ( t ) = 20 When t >= 0
6. Given the transfer function below, develop a mechanical system that it could represent. (Hint:
Differential Equations).
x(D) 1 where: x = displacement
------------- = -----------------------
F(D ) 10 + 20D F = force
7. 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.
8. a) What is a Setpoint, and what is it used for? b) What does feedback do in control systems?
9. The block diagram below is for a servo motor position control system. The system uses a pro-
portional controller.
a) Draw a sketch of what the actual system might look like. Identify components.
θd V Ve Vm 10 - rad ω 1- θa
V- d K ------------ --------- ---
2 -------- D + 1 sV D
rad +
-
Va V
2 ---------
rad
A
- +
+ +
x B y
- +
11. Simplify the block diagram below. (Note: Vn is an input and cannot be combined in a transfer
function.)
+ +
A C
Vi Vo
- +
Vn
12. 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
feedback control - 8.28
1K 1K
-
Vs
1K
Ve +
RP
c) The equation below can be used to model a permanent magnet DC motor with
an applied torque. An equivalent block diagram is given. Prove that the block
diagram is equivalent to the equation.
2
----
d- Km Km T load
ω + ω ------------- = V s ------------- – ------------
dt J R R M J R R M JR
Vs K
+
e RM ω
------m- ---------------------------------
-
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
K s2
-----------------------------------------------------------------------------------------------------------------------
-
3 2
D ( J 1 J 2 ) + D ( BJ 1 ) + D ( Ks2 ( J 1 + J 2 ) ) + ( BK s2 )
KT
13. 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
14. 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
-
15. The following system is a feedback controller for an elevator. It uses a desired height ‘d’ pro-
vided by a user, and the actual height of the elevator ‘h’. The difference between these two is
called the error ‘e’. The PID controller will examine the value ‘e’ and then control the speed of
the lift motor with a control voltage ‘c’. The elevator and controller are described with transfer
functions, as shown below. all of these equations can be combined into a single system transfer
feedback control - 8.30
equation as shown.
e = d–h error
K 2 h--- 10 - elevator
= ----------------
-r- = K p + -----i + K d D = 2D
+ 1 + D - PID controller
----------------------------- r D +D
2
e 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
( 1 )
h = ------------------------
10 D +
(d – h)
2
D
10 ( D + 1 ) 10 ( D + 1 )
h 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 coefficient and natural frequency of the results in part a).
16. 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).
17. Write a C subroutine to implement the control system that is shown inside the dashed line. The
subroutine arguments are the setpoint, C, and the feedback value, F. the subroutine returns the
feedback control - 8.31
5D
+
C + e + U 1- R
Kp ------
5D
-
5
F
1.
--x- = ----------------------------
1
F D ( B – DM )
2.
10 ---- 10 ----
V V
Vo Vo y m m
------ = ------ --- = --------------------------------------------- = ---------------------------------------------------------------
F yF 2 2 Ns N
– MD – K d D – K s – 0.5kgD – 5 ------ D – 10 ----
m m
3.
θ2 K s2
----- = ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
τ 4 3 2
D ( J 1 J 2 ) + D ( B 1 J 2 + B 2 J 1 ) + D ( K s2 ( J 1 + J 2 ) + B1 B 2 ) + D ( K s2 ( B 1 + B 2 ) )
4.
Vo D ( R 1 R2 C )
------ = --------------------------------------------------------------------------------------------------
Vi 2
D ( R 1 LC ) + D ( L + CR 1 R 2 ) + ( R 1 + R2 )
feedback control - 8.32
5.
– 2t
y ( t ) = – 40e + 40
6.
N
K s = 10 ----
m
F
Ns
K d = 20 ------
m
7.
--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
8.
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 differ-
ence, the error, is used to adjust the control variable and increase the accuracy.
feedback control - 8.33
9.
a)
20K
----------------------------------
2
D + D + 20K
b)
10.
A+B
------------------------------------
-
1 + CB + A + B
11.
Vn --1-
A
+
Vo
+
CA
Vi -------------
1+A
12.
a) V + = V d ------------- = 0.5V d
R
R + R
V- – V f V - – V e
∑ IV -
= ---------------- + ----------------- = 0
R R
V e = 2V - – V f
Vd + Ve
V e = 2 ( 0.5V d ) – V f
-
Ve = Vd – Vf Vf
feedback control - 8.34
b) V- – 0 V- – V s
∑ V- -------------
I =
10
3
- + ----------------- = 0
10
3
V - = 0.5V s (1)
V + – V e V+ – 0
∑ V+ -----------------
I =
10
3
- + --------------- = 0
RP
Ve
V+ -------3- + ------ = -------3-
1 1
R P
10 10
substitute in (1)
R P + 1K V
- = -------e-
0.5V s -------------------
R P ( 10 )3 3 Ve 2R P Vs
10 --------------------
-
3
V 2R P R P + 10
-----s = --------------------
-
Ve 3
R P + 10 note: a constant set by the variable resistor Rp
2
----
d- Km Km T load
c) ω + ω ------------- = V s ------------- – ------------
dt J R R M J R R M JR
2
Km K m T load
- = V s ------------
ω D + ------------ - – ------------
J R R M J R R M JR
JR M K m T load
- V s ------------
ω = --------------------------------- - – ------------
J R R M D + K m 2 J R R M JR
RM Km
ω = ---------------------------------2- V s ------- – T load
J R R M D + K m R M
feedback control - 8.35
d)
K s2 ( θ 1 – θ 2 )
τ
∑M
2
= τ – K s2 ( θ 1 – θ 2 ) = J 1 θ 1 D
+
J1 2
τ – K s2 ( θ 1 – θ 2 ) = J 1 θ1 D
2
θ 1 ( J 1 D + K s2 ) + θ 2 ( – K s2 ) = τ (1)
K s2 ( θ 1 – θ 2 )
∑M
2
= K s2 ( θ 1 – θ 2 ) – Bθ2 D = J 2 θ 2 D
+
J2 2
K s2 ( θ 1 – θ 2 ) – Bθ2 D = J 2 θ 2 D
Bθ 2 D 2
θ 2 ( J 2 D + K s2 + BD ) = θ 1 ( K s2 )
2
J 2 D + K s2 + BD
θ 1 = θ 2 ----------------------------------------- (2)
K s2
substitute (2) into (1)
2
J 2 D + BD + K s2 2
θ 2 ----------------------------------------- ( J 1 D + K s2 ) + θ 2 ( – K s2 ) = τ
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
θ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 = 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( ) + ( ) -
= ------------------------------------------------------------------------------------------
4 3 2
Vd D ( ) + D ( ) + D ( ) + D( ) + ( )
feedback control - 8.36
13.
14.
rad
ω d = 1.530 --------- K = 1.30
s
15.
– 8.873t – 1.127t
a) h ( t ) = 2.91e – 22.91e + 20
rad
b) ζ = 1.58 ω n = 3.162 ---------
s
16.
Vo 1000
a) ------ = ----------------------
Vi D + 1000
– 1000t 5
b) V o = 0.050e + 0.050 sin ( 10 t + 1.561 )
17.
int controller(){
}
feedback control - 8.37
Vi R
C
Vo
-
2. Given the transfer functions and input functions, F, use a numerical method to calculate the out-
put 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 -
2
F = 5 sin ( 62.82t )
F ( D + 200π )
D ( D + 2π )-
--x- = ----------------------------- 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+2
feedback control - 8.38
+
+ +
A B C
2
D + 3D + 5
+
+ +
K 1
---- ------------------------------
D 2
D + 3D + 5
-
10
2
D + 3D + 5
+
+ +
K- 1
--- ------------------------------
D 2
D + 3D + 5
-
10
feedback control - 8.39
G1
-
C + + + R
G2 G3 G5
- -
G4 G6
8. Simplify the following block diagram for a crane gantry position control system. The system
also includes a negative 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
9. Write a C subroutine to implement the control system that is shown inside the dashed line. The
subroutine arguments are the setpoint, C, and the feedback value, F. the subroutine returns the
new controller output value, U.
C + e U 1 - R
Kp + KdD --------------------
2
(D + 1)
-
Ki
----- 5
D F
10. Write a C subroutine to implement the control system that is shown inside the dashed line. The
subroutine arguments are the setpoint, C, and the feedback value, F. the subroutine returns the
feedback control - 8.40
C + e Ki U 1 - R
K p + K d D + ----- --------------------
2
D (D + 1)
-
5
F
frequency response - 9.1
9. PHASOR ANALYSIS
Topics:
• Phasor forms for steady state analysis
• Complex and polar calculation of steady state system responses
• Vibration analysis
Objectives:
• To be able to analyze steady state responses using the phasor transform
9.1 INTRODUCTION
D = σ + jω where,
D = differential operator Phasor transform
σ = decay constant D = jω
ω = oscillation frequency
An example of the phasor transform is given in Figure 9.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.
The response of the steady state output ’x’ can now be found for the given input.
x(ω ) 1 - ( A cos θ input + jA sin θ input )
x ( ω ) = ------------ F ( ω ) = ----------------------------------------------------------------------
F( ω) ( 2000 – 1000ω ) + j ( 3000ω )
2
To continue the example in Figure 9.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.
frequency response - 9.3
( – 86304248 ) + j ( – 50563212 -)
x ( ω ) = -----------------------------------------------------------------------
14
1.0005 ×10
-6 -6
x ( ω ) = ( – 0.863 ×10 ) + j ( – 0.505 ×10 )
-6 2 -6 2 – 0.505 ×10-6
x(ω ) = ( – 0.863 ×10 ) + ( – 0.505 ×10 ) ∠ atan -----------------------------
- + π
– 0.863 ×10-6
Note: the signs of the components indicate that the angle is in the bottom left quad-
rant of the complex 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
This can then be converted to a function of time.
-6
x ( t ) = 0.9999 ×10 sin ( 100t + 3.671 )m
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.
A + B ∠ atan ---
2 2 B
A 2 2
= ------------------------------------------------- = ----------------------- ∠ atan --- – atan ----
A + jB- A +B B D
---------------
C + jD A C
C + D ∠ atan ----
2 2 D C +D
2 2
C
A ∠θ
-------------1- = A
--- ∠( θ 1 – θ 2 )
B ∠θ 2 B
( A ∠θ 1 ) ( B ∠θ 2 ) = AB ∠( θ 1 + θ2 )
For example,
( 1 + j ) --------------
2+j
3 + 4j
5 ∠0.4636
= 2 ∠0.7854 -------------------------------
25 ∠0.9273
2 5
= -------------- ∠0.7854 + 0.4636 – 0.9273
25
= 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 num-
bers 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
9.2 is redone using polar notation in Figure 9.5. In this example the input is directly con-
verted to polar form, without the need for calculation. The input frequency 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.
frequency response - 9.5
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
The transfer function can also be put in polar form.
x(ω) 1 1
------------ = ------------------------------------------------------------------------------------------
- = ---------------------------------------------------
F(ω) ( 2000 – 1000 ( 100 ) ) + j ( 3000 ( 100 ) )
2 – 9998000 + j300000
x(ω) 1 ∠0
------------ = --------------------------------------------------------------------------------------------------------------------------------
F(ω)
( – 9998000 ) + ( 300000 ) ∠ atan ------------------------ + π
2 2 300000
– 9998000
x ( ω ) 1 ∠ 0 1
------------ = ------------------------------------------ = ------------------------ ∠( 0 – 3.112 ) = 0.9998 ×10-7 ∠– 3.112
F(ω) 10002500 ∠3.112 10002500
The output can now be calculated.
x( ω) -7
x ( ω ) = ------------ F ( ω ) = ( 0.9998 ×10 ∠– 3.112 ) ( 10 ∠0.5 )
F(ω)
-7 -6
x ( ω ) = 0.9998 ×10 ( 10 ) ∠( – 3.112 + 0.5 ) = 0.9998 ×10 ∠– 2.612
The output function can be written from this result.
-6
x ( ω ) = 0.9998 ×10 sin ( 100t – 2.612 )
Re imaginary
Note: recall that tan θ = ------ but the atan θ function in
Im
calculators and software only returns values between - +/- +/+
90 to 90 degrees. To compensate for this the sign of the real
real and imaginary components must 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 9.6. In this example the component
values are converted to their impedances, 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 cartesian form.
frequency response - 9.6
The analysis continues in Figure 9.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 calcula-
tions. The final result is then converted back from phasor form to a function of time.
frequency response - 9.7
V o ( ω ) = ( 5 ∠0.3 ) ---------------------------------------------------------------------
-
1
4 –4
( 10 ) ( ( 10 ) + j ( 0.099 ) ) + 1
5 ∠0.3 5 ∠0.3
V o ( ω ) = ( 5 ∠0.3 ) -------------------- = ---------------------------------------------------- = ---------------------------------------
1
2 + j990 2 2 990 990 ∠1.5687761
2 + 990 ∠ atan ---------
2
5 –3
V o ( ω ) = --------- ∠( 0.3 – 1.5687761 ) = 5.05 × 10 ∠– 1.269
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 princi-
ple 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 sim-
ply added. The example considered in Figure 9.2 is extended in Figure 9.8. In this exam-
ple the input has a static component, as well as frequencies at 0.5 and 20 rad/s. The
transfer function is analyzed for each of these frequencies components. The output com-
ponents are found by multiplying the inputs by the response at the corresponding fre-
quency. The results are then converted back to functions of time, and added together.
frequency response - 9.8
These can then be multiplied by the input components to find output components.
x ( 0 ) = ( 0.0005 ∠0 )1000 ∠0 = 0.5 ∠0
1 ∠0
x ( 20 ) = ------------------------------------ 20 ∠0 = 0.497 ×10 ∠– 2.992
-4
402497 ∠2.992
1 ∠0
x ( 0.5 ) = ------------------------------ 10 ∠0 = 4.34 × 10 ∠– 0.709
–3
2305 ∠0.709
Therefore the output is,
–6 –3
x ( t ) = 0.5 + 49.7 × 10 sin ( 20t – 2.992 ) + 4.34 × 10 sin ( 0.5t – 0.709 )
Figure 9.8 A example for a signal with multiple frequency components (based on the
example in Figure 9.2)
9.3 VIBRATIONS
F out ( ω ) x out ( ω )
T = ------------------- = ------------------ The gain of a transfer function gives transmissibility
F in ( ω ) x in ( ω )
%I = ( 1 – T )100%
Given the transfer function for a vibration isolator below, find a value of K that will
give 50% isolation for a 10Hz vibration.
x out 5D + 10
--------- = ----------------------------------------
-
x in 2
4D + 20KD + 4
9.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.
1. 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Ω
+
2. A single d.o.f. model with a weight of 1.2 kN and a stiffness of 340 N/m has a steady-state har-
monic excitation force applied at 95 rpm (revolutions per minute). What damper value will
give a vibration isolation of 92%?
3. 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 equipment and determine the amount of isolation the springs
would afford if the equipment operating frequency is twice the natural frequency of the system.
4. a) For the circuit below find the transfer function and the steady state response for an input of
frequency response - 9.11
Vi=5sin(1000t)V.
1K
1uF
1mH
-
+ + + Vo
Vi
-
-
1.
1KΩ Va
1mH +
Va – Vi Va Va V a – Vo
∑ I Va = ----------------
1KΩ
- + -----------
- +
1KΩ 1KΩ 0.001D
-----------
- + ------------------ = 0
V o ------------------------------------ = V a
0.001D + 1KΩ
(2)
1KΩ
substitute (2) into (1)
V o = 10 -------------- = 2 ∠– 0.644
4 – 3j
25
6
V o ( t ) = 2.00 sin ( 10 t – 0.644 )V
2.
F
y
∑ Fy
2
M = – K s y – K d yD – F = MyD
--y- = -----------------------------------------
–1 -
F 2
D M + DK d + K s
Ks Kd
F floor = K s y + K d yD
F floor
------------
- = Ks + K d D
y
F floor F floor y –( Ks + Kd D )
------------- = ------------
- --- = -----------------------------------------
-
F y F 2
D M + DK d + K s
F floor – ( K s + K d ωj )
------------- = ----------------------------------------------
F 2
– ω M + ωjK d + K s
2 2
F floor Ks + ( K d ω )
- = ------------------------------------------------------------
------------
F 2 2 2
( K s – ω M ) + ( ωK d )
frequency response - 9.14
(cont’d
For 92% isolation, there is 100-92 = 8% transmission, at 95rpm.
N 1200N
K s = 340 ---- M = ----------------- = 122kg
m N
9.81 ------
kg
3.
a) M = 0.979kg
b) I = 67%
4.
π
+ 3536 sin 1000t + ---
– 1000t
b) V o ( t ) = – 5000 + 2500e
4
D ( D + 2π )-
--x- = -----------------------------
F 2
( D + 200π )
Topics:
• Bode plots
Objectives:
• To be able to describe the response of a system using Bode plots
10.1 INTRODUCTION
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 envelope 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.
40-120 120-360 360-1K 1K-3.2K 3.2K-9.7K 9.7K-20K
gain
f(Hz)
x(ω ) 1
------------ = ----------------------------------------------------------------------
-
F( ω) j ( 3000ω ) + ( 2000 – 1000ω )
2
2
x(ω ) 1 (------------------------------------------------------------------------------
– j ) ( 3000ω ) + ( 2000 – 1000ω )-
------------ = ----------------------------------------------------------------------
-
F( ω) j ( 3000ω ) + ( 2000 – 1000ω )
2
( – j ) ( 3000ω ) + ( 2000 – 1000ω )
2
2
x(ω ) ( 2000 – 1000ω ) – j ( 3000ω )-
------------ = -------------------------------------------------------------------------
F( ω) 2 2 2
( 2000 – 1000ω ) + ( 3000ω )
2 2 2
( 2000 – 1000ω ) + ( 3000ω ) -
x ( ω ) = ----------------------------------------------------------------------------- 1
------------ = ------------------------------------------------------------------------------
F( ω) ( 2000 – 1000ω ) + ( 3000ω )
2 2 2 2 2 2
( 2000 – 1000ω ) + ( 3000ω )
The results in Figure 10.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
10.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 magni-
tude 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.
bode plots - 10.4
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 Note: negative phase
values. To help keep the graphs rational we will angles mean that the
"compress" the values by converting them to dB mass motion lags the
(decibels) using the following formula. force.
gain db = 20 log ( gain )
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
10.4, where an input waveform is supplied 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 sinusoidal output.
bode plots - 10.5
In the previous section we calculated a table of gains and phase angles over a range
of frequencies. Graphs of these values are called Bode plots. These plots are normally
done on semi-log graph paper, such as that seen in Figure 10.5. Along the longer axis of
this paper the scale is logarithmic (base 10). This means that if the paper started at 0.1 on
one side, the next major division would be 1, then 10, then 100, and finally 1000 on the
other side of the paper. The basic nature of logarithmic scales prevents the frequency from
being zero. Along the linear axis (the short one) the gains and phase angles are plotted,
normally with two graphs side-by-side on a single sheet of paper.
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
bode plots - 10.6
bode plots - 10.7
Plot the points from Figure 10.3 in the semi-log graph paper in Figure 10.5. The gen-
eral layout is pictured below.
gain
(dB)
-40dB/dec
phase
(deg)
Figure 10.6 Drill problem: Plot the points from Figure 10.3 on graph paper
bode plots - 10.8
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("data.txt", "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);
Figure 10.8 Drill problem: Plot the points from Figure 10.2 with a computer
bode plots - 10.9
Draw the Bode plot for the transfer function by hand or D+3
-----------------------------------------------------
-
with computer. 2
D + 10000D + 10000
Figure 10.9 Drill problem: Draw the Bode plot for gain and phase
bode plots - 10.10
Bode plots for transfer functions can be approximated with the following steps.
1. Plot the straight line pieces.
a) The gain at 0rad/sec is calculated and used to find an initial off-
set. For example this transfer function starts at 10(D+1)/
(D+1000)=10(0+1)/(0+1000)=0.01=-40dB.
b) Put the transfer function in root form to identify corner frequen-
cies. For example (D+1)/(D+1000) will have corner frequencies
at 1 and 1000 rad/sec.
c) Curves that turn up or down are drawn for each corner fre-
quency. At each corner frequency a numerator term causes the
graph to turn up, each term in the dominator causes the graph to
turn down. The slope up or down is generally +/- 20dB/decade
for each term. Also note that squared (second-order) terms would
have a slope of +/-40dB/decade.
2. The effect of each term is added up to give the resulting straight line
approximation.
3. When the smooth curve is drawn, there should commonly be a 3dB dif-
ference at the corner frequencies. In second-order systems the damping
coefficient make may the corner flatter or peaked.
Figure 10.10 The method for Bode graph straight line gain approximation
bode plots - 10.11
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.
1
G ( jω ) = ------------------
ω c + jω
the initial gain is
1 1-
G ( 0 ) = ----------------- = -----
ω c + j0 ωc
at the corner frequency ωc = ω
1 1 1 π
G ( jω ) = --------------------- = ---------------------- = ------------- ∠– ---
ω c + jω c π ωc 2 4
ω c 2 ∠---
4
Therefore the difference is
G ( jω ) π π π
diff = --------------- = ------- ∠– --- = 20 log ------- ∠– --- = – 3.01dB ∠– ---
1 1
G(0) 2 4 2 4 4
Why does a first order pole go down at 20dB/dec?
1
G ( jω ) = ------------------
ω c + jω
before the corner frequency, ω c > jω
1- = 20 log ( ω –1 ) = – 20 log ( ω )
G ( jω ) = ----- c c
ωc
after the corner frequency, ω c < jω
1- = 20 log ( ω – 1 ) = – 20 log ( ω )
G ( jω ) = -----
jω
each time the frequency increases by a multiple of 10, the log 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?
1 ∠0 ω
G ( jω ) = ------------------ = --------------------------------------------------- = ----------------------- ∠– atan ------
1 1
ω c + jω ω ω
ω c + ω ∠ atan ------
2 2 2 2
ωc + ω c
ω c
before the corner frequency, ω c > jω
ω
angle ( G ( jω ) ) = – atan ------ = – atan ------ = 0
0
ωc ωc
after the corner frequency, ω c < jω
ω π
angle ( G ( jω ) ) = – atan ------ = – atan ( ∞ ) = – ---
ω c 2
Show that the second order transfer function below would result in a slope of +/- 40
dB/decade.
1
G ( jω ) = -------------------------2-
( ω c + jω )
An example of the straight line plotting technique is shown in Figure 10.14. 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.
bode plots - 10.14
4
100D + 100 10 ( D + 1 ) -
G ( D ) = --------------------------------------------------
- = --------------------------------------------- (the equation is put in root form)
2
0.01D + 0.11D + 10 ( D + 10 ) ( D + 100 )
Step 1: Draw lines for each of the terms in the transfer function,
Gain (dB)
D+1
4
10 ( 1 )
GAIN 0 = ------------------------- = 10 = 20dB
( 10 ) ( 100 )
20dB/dec.
1 10 100
0dB freq.(rad/sec)
(could be Hz also)
-20dB/dec. -20dB/dec.
1 - 1 -
--------------- ------------------
D + 10 D + 100
The example is continued in Figure 10.15 where the straight line segments are
added to produce a combined straight line curve.
bode plots - 10.15
Step 2: Sum the individual lines, and get the straight line approximation,
Gain (dB)
40dB
20dB
1 10 100
0dB freq.(rad/sec)
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 func-
tion. Higher order functions will be discussed later.
40dB 3dB
20dB
1 10 100
0dB freq.(rad/sec)
The process for constructing phase plots is similar to that of gain plots, as seen in
Figure 10.18. 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 positive 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.
Gain 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 frequen-
cies. 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 individ-
ual 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 fre-
quency. 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 fre-
quency, 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 10.17 The method for Bode graph straight line gain approximation
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
0 freq.(rad/sec)
-45 1 -
1 - ------------------
--------------- D + 100
D + 10
-90
The straight line segments for the phase plot are added in Figure 10.19 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 an rubber band will smooth the curve.
bode plots - 10.18
+90
+45
0.1 1 10 100 1000
0 freq.(rad/sec)
-45
-90
+90
+45
0.1 1 10 100 1000
0 freq.(rad/sec)
-45
-90
The previous example used a transfer function with real roots. In a second-order
system with double real roots (overdamped) the curve can be drawn with two overlapping
straight line approximations. If the roots for the transfer function are complex (under-
damped the corner frequencies will become peaked. This can be handled by determining
the damping coefficient and natural frequency as shown in Figure 10.20. The peak will
occur at the damped frequency. The peaking effect will become more pronounced as the
damping coefficient goes from 0.707 to 0 where the peak will be infinite.
bode plots - 10.19
Gain
Mn Resonant Peak
A
-------------------------------------------------------
-
=0.1 2 2
D + ( 2ξω n )D + ( ω n )
=0.5 2
dB = A ωd = 1 – ξ ωn
ξ = 0.707
-40dB/decade
freq
ωd
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.
bode plots - 10.20
If a vibration signal is measured and displayed it might look like Figure 10.22. The
overall sinusoidal shape is visible, along with a significant amount of ’noise’. When this is
considered in greater detail it can be described with the given function. To determine the
function other tools are needed to determine the frequencies, and magnitudes of the fre-
quency components.
x(t)
x ( t ) = A sin ---------- t + 0.3A sin ------------- t + 0.01A sin ---------------- t
displacement 2π 2π 2π
0.01 0.005 0.0005
A
5 t (ms)
frequency 1
freq. 3
freq. 2
Amplitude
A
log(freq.)
(Hz or rads.)
1- 1 - 1 -
--------- ------------ ---------------
0.01 0.005 0.0005
=100Hz =200Hz =2000Hz
10.4 SUMMARY
1. Draw a Bode Plot for both of the transfer functions below using the phasor transform.
( D + 1 ) ( D + 1000 -) 5
--------------------------------------------- AND ------
2 2
( D + 100 ) D
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 plots - 10.23
Bode plot.
3. Use the straightline approximation techniques to draw the Bode plot for the transfer function
below.
F D + 1000 -
G = --- = -----------------------------------
2
x D + 5D + 100
a) Find the steady state response of the circuit using phasors (i.e., phasor trans-
forms) if the input is Vi=5sin(100,000t).
b) Draw an approximate Bode plot for the circuit.
6. 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
f) Find x(t), given F(t) = 10N for t >= 0 seconds considering the effects of gravity.
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.
8. You are given the following differential equation for a spring damper pair.
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.
bode plots - 10.25
1.
20dB
0dB
-20dB 0dB -40dB/dec
1- 100 1000
----- --------- ------------
2π 2π 2π ------5-
2π
90deg 0deg
-45deg -180deg
bode plots - 10.26
2.
( D )-
y----------- ( D + 10 ) ( D + 5 -) ( D + 10 )
= --------------------------------------- = ---------------------
x(D ) (D + 5)
2 (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 )
= --------------------- = ----------------- -------------- = -------------------------------- = 1.236 – 0.425j
y-- 9j + 10 5 – 9j 50 + 81 – 45j
x (D + 5) 9j + 5 5 – 9j 25 + 81
Aside: This can also be done entirely with phasors in cartesian notation
( D + 10 )
= --------------------- = ----------------- -------------- = -------------------------------- = 1.236 – 0.425j
y-- 9j + 10 5 – 9j 50 + 81 – 45j
x (D + 5) 9j + 5 5 – 9j 25 + 81
x = 20 ( cos ( 0.3rad ) + j sin ( 0.3rad ) ) = 19.1 + 5.91j
y - = ( 1.236 – 0.425j ) ( 19.1 + 5.91j ) = 26.1 – 0.813j = 26.1 ∠– 0.031
----------------------------
19.1 + 5.91j
(cont’d
Aside: This can also be done entirely with phasors in polar notation
( D + 10 ) 13.45 ∠0.733
= --------------------- = ----------------- = ------------------------------- = ------------- ∠0.733 – 1.064 = 1.31 ∠– 0.331
y-- 9j + 10 13.45
x (D + 5) 9j + 5 10.30 ∠1.064 10.30
x = 20 ∠0.3
y -
----------------- = 1.31 ∠– 0.331
20 ∠0.3
y = 1.31 ( 20 ) ∠( – 0.331 + 0.3 ) = 26.2 ∠– 0.031
y ( t ) = 26.2 sin ( 9t – 0.031 )
bode plots - 10.28
3.
for the numerator, (zero) rad
1000 --------- = 159Hz
s
for the denominator, (poles) 2 2 2
D + 2ω n ζD + ω n = D + 5D + 100
2
ω n = 100
rad
∴ω n = 10 --------- f n = 1.59Hz
s
2ω n ζ = 5
5
∴ζ = -------------- = 0.25 (underdamped)
2 ( 10 )
2
f d = f n 1 – ζ = 1.54Hz
-40dB/dec
-60
-20dB/dec
-80
phase
(deg)
0 0.154 15.4,15.9 1590 f(Hz)
0.1 1 1.54 10 100 159 1000
-90
-180
bode plots - 10.29
4.
a) 5
V o ( t ) = 0.050 sin ( 10 t – 1.561 )
-20dB/dec
0 deg
-90 deg
5.
a)
b)
–3
c) 8.89 sin ( 624t + 1.571 ) + 0.141 ×10 sin ( 6.2t + 2.356 )
bode plots - 10.30
6.
--x- = ----------------------
a) 0.0667 - m ----
F 2
D + 33.3 N
b) ω = 1 ∴D = 1j
--x- = ----------------------------
0.0667 - –3 m
2
= 2.07 × 10 ∠0rad ----
F ( 1j ) + 33.3 N
F ( t ) = 10 cos ( t + 1 ) N
∴F ( ω ) = ( 10 ∠1rad )N
x - = 2.07 × 10 –3 ∠0rad m
------------------------------- ----
( 10 ∠1rad )N N
–3 m
∴x ( ω ) = 2.07 × 10 ∠0rad ---- ( 10 ∠1rad )N
–3
N
∴x ( ω ) = ( 10 )2.07 × 10 ∠( 0rad + 1rad )m
∴x ( ω ) = 0.0207 ∠1radm
∴x ( t ) = 0.0207 cos ( t + 1 ) m
2
F
--- = D
c) + 33.3- --- N-
----------------------
x 0.0667 m
bode plots - 10.31
2 2 2
d) for the denominator, (poles) D + 2ω n ζD + ω n = D + 33.3
rad
ω n = 5.77 --------- f n = 0.918Hz
s
ζ = 0 (undamped)
2
f d = f n 1 – ζ = 0.918Hz
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
7.
·
a) y = v
·
v = – v – 7y + F
b)
yi + 1 yi 0 1 yi + 0
= +h
vi + 1 vi – 7 –1 v i F
given
y0
= 1 F = 10
v0 0
using h=0.001s
y1
= 1 + 0.001 0 1 1 + 0
v1 0 –7 –1 0 10
y 100 1.428m
etc.. until
= m
v 100 0.000 ----
s
c) – 0.5t
y ( t ) = ( – 0.437e cos ( 2.598t – 0.19 ) + 1.429 )m
bode plots - 10.33
--y- = --------------------------
d) 1 1 1
2
= ----------------------------------
2
- = -------------------------------------
2
F D +D+7 ( jω ) + jω + 7 (7 – ω ) + j(ω)
1
--y- = ----------------------------------------
F 2 2 2
(7 – ω ) + ω
∠0 - = ∠( 0 – angle ( ω, 7 – ω 2 ) ) = ∠– angle ( ω, 7 – ω 2 )
∠θ = ----------------------------------------------
2
∠angle ( ω, 7 – ω )
-20dB
-40dB
0.01Hz 1Hz 100Hz
0deg
0.01Hz 1Hz 100Hz
-180deg
bode plots - 10.34
8.
--x- = ------------
a) 1 -
F 5+D
1 ∠0 ω
= --------------- = ------------------------------------------------ = ---------------------- ∠– atan ----
b)
--x- = ------------
1 - 1 1
F 5+D 5 + jω ω 5
5 + ω ∠ atan ----
2 2
2 2
5 +ω
5
c)
initial gain = 20 log ------------ = – 14dB
gain(dB) 1
5+0
-14dB 5
corner freq. = ------ = 0.8Hz
2π
-20dB/dec
phase(deg)
0°
– 45°
– 90°
t x
e) 0.2
0.186
0.0 0
Xi 0
0.002 9.98e-4
0.004 5.92e-3
− 0.099 0.2
0 0.5 1
0 i ⋅h 0.999 0.006 0.015
0.008 0.026
– 5t 0.010 0.041
1 e
f) x = --- – ---------
5 5
1. For the transfer functions below, draw the bode plots using computer software.
( D + 2π )D ( D + 2π )
---------------------------------------------------------
- -------------------------------------------------------
( D + 200π ) ( D + 0.02π ) 2
D + 50πD + 10000π
2
2. 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
a) draw the straight line approximation of the bode and phase shift plots.
b) determine the steady state output if the input is x(s) = 20 cos(9t+.3) using the
striaght line plots.
c) use an exact method to verify part b).
Please notice that there are a few sheets of 2 and 4 cycle log paper attached, make
additional copies if required, and if more cycles are required, sheets can be cut and pasted
together. Also note that better semi-log paper can be purchased at technical bookstores, as
well at most large office supply stores.
bode plots - 10.37
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
bode plots - 10.38
root locus - 11.1
Topics:
• Root-locus plots
Objectives:
• To be able to predict and control system stability.
11.1 INTRODUCTION
The system can also be checked for general stability when controller parameters
are varied using root-locus plots.
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 11.3 Negative real and complex roots cause decaying oscillation
root locus - 11.3
R = – A ± Bj
jw x(t)
B
-A
sigma
-B t
Figure 11.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 11.6 Positive real roots cause exponential growth and are unstable
root locus - 11.4
R = A ± Bj
jw x(t)
B
A sigma
-B t
Figure 11.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 equa-
tion. By analyzing the function in the denominator of a transfer function the general sys-
tem response can be found. An example of root-locus analysis for a mass-spring-damper
system is given in Figure 11.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 val-
ues are fixed, and the spring value will be varied. The range of values for the spring coef-
ficient should be determined by practical and design limitations. For example, the spring
coefficient should not be zero or negative.
root locus - 11.5
x ( D )- 1
------------ = -----------------------------------------
-
F(D) 2
MD + K d D + K s
Note: We want Ks Kd
the form below
A
--------------------------------------
- M
(D + B)(D + C)
1-
----
x ( D ) M
------------- = -------------------------------------
F(D) 2 Kd Ks Aside:
D + ------ D + -----
M M 2
ax + bx + c = ( x + A ) ( x + B )
2
–Kd K K
--------- ± ------d- – 4 -----s – b ± b – 4ac
2
M M
2 M A, B = --------------------------------------
B, C = ------------------------------------------
- 2a
2
M Kd Ks B C
0 0 0 0 0
100 100 100
100 100 1000
100 100 10000
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 unstable.
In addition complex roots will indicate oscillation.
root locus - 11.6
Imaginary
Real
Figure 11.9 Drill problem: Plot the calculated roots on the axes above
+ 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 ) D+K
1 + ---- ( 1 )
K
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 K→∞ K = 0 σ
2 -2
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 openloop gain, G(s).
+ 1-
K ---
D
-
1 H(D ) = 1
G ( D ) = ----
D
First, we must multiply G and H
G ( s )H ( s ) = ---- ( 1 ) = ----
1 1
D D
The numerator and denominator of this equation are then defined and plotted
using the ’evans’ function.
D = poly(0, ’D’); // define the differential operator
n = real(1.0); // define the numerator of GH
d = real(D); // define the denominator of GH
evans(n, d, 100); // plot for gains from K=0 to 100
1 + -----------------------------
- ( 1 ) = 0
K Note: For a negative feedback
2 controller the denominator is,
D + 3D + 2
2 1 + G ( D )H ( D )
D + 3D + 2 + K = 0
– 3 ± 9 – 4(2 + K) 1 – 4K
roots = ------------------------------------------------ = – 1.5 ± --------------------
2 2
Next, find values for the roots and plot the values,
K roots
jω
0
1
2
3
K(D + 5 )
G ( D )H ( D ) = ---------------------------------------
2
D ( D + 4D + 8 )
11.3 SUMMARY
1. Draw the root locus diagram for the system below. specify all points and values.
+ + 1
3.0 ---------------------
2
(D + 1)
- -
KdD
2. 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
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.
root locus - 11.12
4. 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 )
5. Draw a root locus plot for the control system below and determine acceptable values of K,
including critical points.
X 0.1 Y
K 5 + ---- + D
+ 1 + --------------------------------------
-
2
D D + 10D + 100
- -
10
------
D
0.01
6. 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
root locus - 11.13
1.
+ + 1 -
3.0 --------------------
2
(D + 1)
- -
KdD
+ 3.0
-------------------------------------
-
2
( D + 1 ) + Kd D
-
3.0
---------------------------------------------------
-
2
D + D ( K d + 2 ) + 4.0
2
2 – K d – 2 ± ( K d + 2 ) – 4 ( 4.0 )
D + D ( K d + 2 ) + 4.0 = 0 D = ---------------------------------------------------------------------------
2
2
Kd roots – K d – 2 ± K d + 4K d – 12
D = -----------------------------------------------------------------
2
0 -1 +/- 1.732j
1 -1.5 +/- 1.323j Critical points: (this is simple for a quadratic)
2 -2.000, -2.000
The roots becomes positive when
5 -0.628, -6.372
2
10 -0.343, -11.657 0 > – K d – 2 ± K d + 4K d – 12
100 -0.039, -102.0 2
1000 -0.004, -1000 2 + K d > ± K d + 4K d – 12
16 > 0
0 > – Kd – 2 Kd > –2
– 4 ± 16 – 4 ( – 12 ) K d = – 6, 2
K d = -----------------------------------------------
2
2.
a) 200K
---------------------------------------
-
2
D + 2D + 200K
b) – 2 ± 4 – 4 ( 200K )
roots = ------------------------------------------------ = – 1 ± 1 – 200K
2
Im
K roots
0 0,-2 K=0.005
0.001 -0.1,-1.9
0.005 -1,-1 Re
0.1 etc. -2 -1
1
5
10
c) 2
D + 2D + 200K = D + 2ζω n D + ω n
2 2 ∴ω n = 1 ∴K = 0.005
3.
a) 2
D + D + 20K = 0
– 1 ± 1 – 4 ( 20K ) For complex roots
D = --------------------------------------------- 1
2 1 – 80K < 0 K > ------
80
K roots For negative real roots (stable)
1 ± 1 – 80K-
–------------------------------------
0 0.000, -1.000 <0
2
1/80 -0.500, -0.500
1 -0.5 +/- 4.444j ± 1 – 80K < 1 K>0
10 -0.5 +/- 14.13j
1000 -0.5 +/- 141.4j
b)
Matching the second order forms,
2
2ω n ξ = 1 ω n = 20K
θo 20 ( 10 )
c) ----- = ----------------------------------------
-
θd 2
D + D + 20 ( 10 )
·· ·
θ o + θd + θ d 200 = 200θd
Homogeneous:
2
A + A + 200 = 0
Particular:
θ = A
0 + 0 + A200 = 200 ( 1rad ) A = 1rad
θ o ( t ) = 1rad
– 0.5t
θo ( t ) = ( e sin ( 14.1t – 1.54 ) + 1 ) ( rad )
root locus - 11.18
θo 20 ( 0.01 )
d) ----- = --------------------------------------------
-
θd 2
D + D + 20 ( 0.01 )
·· ·
θ o + θd + θ d 0.2 = 0.2θd
Homogeneous:
2
A + A + 0.2 = 0
Particular:
θ = A
0 + 0 + A0.2 = 0.2 ( 1rad ) A = 1rad
θ o ( t ) = 1rad
C 1 = – 0.381C 2
4.
(ans. X + Kp D + K i + Kd D
2 Y
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 )
root locus - 11.20
b) 2
D ( 12K d + 1 ) + D ( 9 + 12K p ) + ( 12K i ) = 0
2
– 9 – 12K p ± ( 9 + 12K p ) – 4 ( 12K d + 1 )12K 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 )
c) Kp = 1 Ki = 1 Kd = 1
2
3K p D + 3K i + 3K d D
--Y- = ----------------------------------------------------------------------------------------------
-
X 2
D ( 12K d + 1 ) + D ( 9 + 12K p ) + ( 12K i )
3- --------------------------------------------------
2 2
--Y- = -----------------------------------------
3D + 3D + 3 -
= -----
D +D+1 -
13 2
D + D1.615 + 0.923
X 2
D 13 + D21 + 12
-12dB
root locus - 11.22
2
3K p D + 3K i + 3K d D
--Y- = ----------------------------------------------------------------------------------------------
-
X 2
D ( 12K d + 1 ) + D ( 9 + 12K p ) + ( 12K i )
12K i
ωn = ---------------------
- = 2 12K i = 48K d + 4
12K d + 1
9 + 12K p
2ξω n = ---------------------- = 20.5 ( 2 ) 24K d = 7 + 12K p
12K d + 1
At this point there are two equations and two unknowns, one value
must be selected to continue, therefore,
K p = 10
0 = C11 + 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
root locus - 11.24
5.
X 0.1 Y
K 5 + ---- + D
+ 1 + --------------------------------------
-
D 2
D + 10D + 100
- -
10
------
D
0.01
X 2 0.1 Y
K ------------------------------
+ 5D + 1 + D ----------------------------------------------------------------
-
D + 10D + 100 + 0.1 ------
D 2 10
D
-
0.01
2
X + K ( 0.5D + 0.1 + 0.1D -) Y
-------------------------------------------------------
3 2
D + 10D + 100D + 1
-
0.01
6.
2
θ D ( 100 ) + D ( 100P ) + ( 100 ) -
a) ------ = ----------------------------------------------------------------------------------
Vd 3 2
D + D ( 300 ) + D ( 200P ) + ( 200 )
b)
c)
1. The systems below have a variable spring coefficient. For each of the systems below,
root locus - 11.26
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 differential 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.
2. 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
3. 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) = ------------ ---------------
2
--------------------
2
------------------------------
2
D+1 D +1 (D + 1) D + 2D + 2
root locus - 11.27
C + 1 R
K ---------------------
2
(D + 1)
-
2
------
2
D
C + 1 - R
K --------------------
2
(D + 1)
-
2
2D
C + 2 R
K (D + 1)
-
2
------
2
D
nonlinear system - 12.1
Topics:
•
Objectives:
•
12.1 INTRODUCTION
- no transfer functions
θ
– --π-
Q ( θ ) = 8.5 e – 1
• If our models include a device that is non linear we will need to linearize the
model before we can proceed.
• A non-linear system can be approximated with a linear equation using the follow-
ing method.
In this case the relationship between pressure drop and flow are non-linear. We
need to develop an equation that approximates the local operating point.
∆p ≈ R ( q – q )
∆q
∆ ( ∆p ) q
R ≈ --------------- R = 2 -----2-
∆q K
q
∆p
∆ ( ∆p )
nonlinear system - 12.3
Kd Ks
x + x ----------------------------- + x ----------------------------- = -----------------------------
·· · F
M – 0.0001t M – 0.0001t M – 0.0001t
12.3.2 Switching
- cables in tension/compression
·
y + 4y = f ( t ) f(t < 0) = 0
f ( 0 ≤ t < 5s ) = 2
f ( t ≥ 5s ) = 0
- give PWM (Pulse Width Modulation) example with ripple showing equivalent
voltage. PWM is used to generate analog voltage equivalents. Show for a system with first
nonlinear system - 12.4
order response with tau = 0.1s for a frequency of 1KHz, 10Hz and 1Hz. Point out the rip-
ple and effective voltage.
12.3.3 Deadband
- This effect is normally known as ’stiction’, a combination of the words static and
friction.
- The static friction, ’stiction’, will prevent initial motion. If the systems breaks
free and starts turning, the kinetic friction will provide a roughly constant friction resis-
tance.
- the region where the applied voltage has no effect is called the deadband.
nonlinear system - 12.5
-
ω
The kinetic
friction results
in a different curve
while slowing down
Vapplied
motor starts
deadband to turn as
friction is
overcome
Vadjusted
Vstick
Vwanted
-Vstick
Cadjusted
C max = 255
Cstick
C min = – 255 Cwanted
C max = 255
-Cstick if(Cwanted > 0)
C wanted
C adjusted = C stick + ------------------ ( C max – C stick )
C min = 255 C max
if(Cwanted < 0)
C wanted
C adjusted = – C stick + ------------------ ( C min – C stick )
C min
if(Cwanted = 0)
C adjusted = 0
- c-code below
return c_adjusted;
• Some devices have natural maximum values, such as voltage or pressure limita-
tions caused by a regulated supply.
- backlash
-
nonlinear system - 12.8
- correct by tracking the previous motion direction and taking extra steps when
reversing direction
• In the simplest form this is a period of time between when an event occurs and
when the effect occurs.
• If an output delay is larger than the control system step time it may be necessary
to predict future states and initiate outputs ahead of those.
• If an input delay is larger than the control system it might be necessary to slow
the control action, or build it into the control law.
nonlinear system - 12.9
12.4 SUMMARY
1.
Topics:
• Analog inputs and outputs
• Sampling issues; aliasing, quantization error, resolution
Objectives:
• To understand the basics of conversion to and from analog values.
13.1 INTRODUCTION
An analog value is continuous, not discrete, as shown in Figure 13.1. In the previ-
ous chapters, techniques were discussed for designing continuos control systems. In this
chapter we will examine analog inputs and outputs so that we may design continuous con-
trol systems that use computers.
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:
analog IO - 13.2
A basic analog input is shown in Figure 13.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 com-
puter. Integers limit the resolution of the numbers to a discrete, or quantized range. The
effect of using integers is shown in Figure 13.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 analog 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 resolution of the analog I/O.
continuous
analog
quantized
integer
analog IO - 13.3
To input an analog voltage (into a computer) the continuous voltage value must be
sampled and then converted to a numerical value by an A/D (Analog to Digital) converter
(also known as ADC). Figure 13.4 shows a continuous voltage changing over time. There
are three samples shown on the figure. The process of sampling the data is not instanta-
neous, so each sample has a start and stop time. The time required to acquire the sample is
called the sampling time. A/D converters can only acquire a limited number of samples
per second. The time between samples is called the sampling period T, and the inverse of
the sampling period is the sampling frequency (also called sampling rate). The sampling
time is often much smaller than the sampling period. The sampling frequency is specified
when buying hardware, but a common sampling rate is 100KHz.
voltage
time
A more realistic drawing of sampled data is shown in Figure 13.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 voltage 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;
analog IO - 13.4
0V to 5V
0V to 10V
-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 measurements.
V(t)
V max
V ( t2 )
V ( t1 )
V min
t
τ
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 13.5 can be used to calculate values for A/D con-
verters. These equations are summarized in Figure 13.6. Equation 1 relates the number of
analog IO - 13.5
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 commonly called the quantization error). Equation 3 relates the volt-
age 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.
N (1)
R = 2
V max – Vmin
V ERROR = ± -----------------------------
(2)
2R
V in – V min
V I = INT ----------------------------
- (R – 1) (3)
V max – V min
VI
V C = ------------ ( V max – V min ) + Vmin (4)
R–1
where,
R = resolution of A/D converter
V I = the integer value representing the input voltage
V C = the voltage calculated from the integer value
V ERROR = the maximum quantization error
Consider a simple example, a 10 bit A/D converter can read voltages between -
10V and 10V. This gives a resolution 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 voltage of 4.564V is
input into the PLC, 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 con-
verter with more bits. Each bit halves the quantization error.
analog IO - 13.6
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 – Vmin ) + V min = 4.570V
R
If the voltage being sampled is changing too fast we may get false readings, as
shown in Figure 13.8. In the upper graph the waveform completes seven cycles, and 9
samples are taken. The bottom graph plots out the values read. The sampling frequency
was too low, so the signal read appears to be different that it actually is, this is called alias-
ing.
analog IO - 13.7
The Nyquist criterion specifies that sampling frequencies should be at least twice
the frequency of the signal being measured, otherwise aliasing will occur. The example in
analog IO - 13.8
Figure 13.8 violated this principle, so the signal was aliased. If this happens in real appli-
cations the process will appear to operate erratically. In practice the sample frequency
should be 4 or more times faster than the system frequency.
There are other practical details that should be considered when designing applica-
tions 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 commonly 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 technique 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 a PLC can use a single common for mul-
tiple 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 sec-
ond. If reading multiple channels with a multiplexer, this may be reduced.
• Quantization Error - Analog IO is limited by the binary resolution of the con-
verter. This means that the output is at discrete levels, instead of continuous val-
ues.
• Triggers - often external digital signals are used to signal the start of data collec-
tion.
• Range - the typical voltages that the card can read. Typical voltage ranges are -
10V to 10V, 0V to 10V, 0V to 5V, 1V to 5V, -5V to 5V, 4mA to 20mA.
• DMA - a method to write large blocks of memory directly to computer memory.
This is normally used for high speed data captures.
analog IO - 13.9
• Filters - some A/D input cards will provide built in functions to filter the incom-
ing data to remove high frequency noise components.
• Input impedance - most analog inputs have very high input resistances, in the
range of Mohms.
ASIDE: This device is an 8 bit A/D converter. The main concept behind this is the succes-
sive 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 volt-
age will be sampled by a sample and hold circuit. This will then be converted to a digi-
tal value. The sample and hold circuits can be used before the multiplexer to collect
data values at the same instant in time.
Analog outputs are much simpler than analog inputs. To set an analog output an
integer is converted to a voltage. This process is very fast, and does not experience the
timing problems with analog inputs. But, analog outputs are subject to quantization errors.
Figure 13.11 gives a summary of the important relationships. These relationships are
almost identical to those of the A/D converter.
N (5)
R = 2
V max – Vmin
V ERROR = ± -----------------------------
(6)
2R
V desired – V min
VI = INT ----------------------------------- R (7)
Vmax – V min
VI
V output = ----- ( V max – V min ) + V min (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
V desired = the desired output voltage
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.
analog IO - 13.11
Given,
N = 8
V max = 10V
V min = 0V
V desired = 6.234V
Calculate,
N
R = 2 = 256
V max – V min
V ERROR = ----------------------------- = 0.020V
2R
V in – V min
V I = INT ----------------------------
- R = 160
V max – V min
VI
V C = ----- ( V max – Vmin ) + V min = 6.250V
R
The current output from a D/A converter is normally limited to a small value, typi-
cally 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.
analog IO - 13.12
ASIDE:
5K Ω
10K Ω V– V ss
MSB bit 3 -
V +
20K Ω + +
bit 2
0
Computer Vo
40K Ω
bit 1
-
80K Ω
LSB bit 0
Next, sum the currents into the inverting input as a function of the output voltage and the
input voltages from the computer,
Vb3 V b2 Vb1 V b0 Vo
--------------
- + --------------
- + --------------
- + --------------
- = -----------
-
10KΩ 20KΩ 40KΩ 80KΩ 5KΩ
∴V o = 0.5V b3 + 0.25V b2 + 0.125V b1 + 0.0625Vb 0
Consider an example where the binary output is 1110, with 5V for on,
∴V o = 0.5 ( 5V ) + 0.25 ( 5V ) + 0.125 ( 5V ) + 0.625 ( 0V ) = 4.375V
13.4.1 Shielding
When a changing magnetic field cuts across a conductor, it will induce a current
flow. The resistance in the circuits will convert this to a voltage. These unwanted voltages
analog IO - 13.13
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 negligible. 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 sig-
nals into the cases of the instruments. Figure 13.13 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 Figure 13.14. The two wires are twisted at regular inter-
vals, effectively forming small loops. In this case the small loops reverse every twist, so
any induced currents are cancel out for every two twists.
analog IO - 13.14
When designing shielding, the following design points will reduce the effects of
electromagnetic interference.
13.4.2 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.
- 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 nor-
mally 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.
analog IO - 13.15
- cable shields or grounds are normally only connected at one side to prevent
ground loops.
13.6 SUMMARY
2. 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 minimum number of bits required for the A/D converter?
3. If given a 12 bit analog input with a range of -10V to 10V. If we put in 2.735V, what will the
integer value be after the A/D conversion? What is the error? What voltage can we calculate?
1. 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.
analog IO - 13.16
2.
3.
1. An analog output needs to be between -4V and 8V, in 0.005V intervals. How many bits are
required for the D/A converter?
Topics:
• Continuous sensor issues; accuracy, resolution, etc.
• Angular measurement; potentiometers, encoders and tachometers
• Linear measurement; potentiometers, LVDTs, Moire fringes and accelerometers
• Force measurement; strain gages and piezoelectric
• Liquid and fluid measurement; pressure and flow
• Temperature measurement; RTDs, thermocouples and thermistors
• Other sensors
• Continuous signal inputs and wiring
• Glossary
Objectives:
• To understand the common continuous sensor types.
• To understand interfacing issues.
14.1 INTRODUCTION
Most of these sensors are based on subtle electrical properties of materials and
devices. As a result the signals often require signal conditioners. These are often amplifi-
ers that boost currents and voltages to larger voltages.
Sensors are also called transducers. This is because they convert an input phenom-
ena to an output in a different form. This transformation relies upon a manufactured
device with limitations and imperfection. As a result sensor limitations are often charac-
continuous sensors - 14.2
terized with;
Accuracy - This is the maximum difference between the indicated and actual read-
ing. For example, if a sensor reads a force of 100N with a ±1% accuracy, then
the force could be anywhere from 99N to 101N.
Resolution - Used for systems that step through readings. This is the smallest
increment that the sensor can detect, this may also be incorporated into the
accuracy value. For example if a sensor measures up to 10 inches of linear dis-
placements, and it outputs a number between 0 and 100, then the resolution of
the device is 0.1 inches.
Repeatability - When a single sensor condition is made and repeated, there will be
a small variation for that particular reading. If we take a statistical range for
repeated readings (e.g., ±3 standard deviations) this will be the repeatability.
For example, if a flow rate sensor has a repeatability of 0.5cfm, readings for an
actual flow of 100cfm should rarely be outside 99.5cfm to 100.5cfm.
Linearity - In a linear sensor the input phenomenon has a linear relationship with
the output signal. In most sensors this is a desirable feature. When the relation-
ship is not linear, the conversion from the sensor output (e.g., voltage) to a cal-
culated quantity (e.g., force) becomes more complex.
Precision - This considers accuracy, resolution and repeatability or one device rel-
ative to another.
Range - Natural limits for the sensor. For example, a sensor for reading angular
rotation may only rotate 200 degrees.
Dynamic Response - The frequency range for regular operation of the sensor. Typ-
ically sensors will have an upper operation frequency, occasionally there will be
lower frequency limits. For example, our ears hear best between 10Hz and
16KHz.
Environmental - Sensors all have some limitations over factors such as tempera-
ture, humidity, dirt/oil, corrosives and pressures. For example many sensors
will work in relative humidities (RH) from 10% to 80%.
Calibration - When manufactured or installed, many sensors will need some cali-
bration to determine or set the relationship between the input phenomena, and
output. For example, a temperature reading sensor may need to be zeroed or
adjusted so that the measured temperature matches the actual temperature. This
may require special equipment, and need to be performed frequently.
Cost - Generally more precision costs more. Some sensors are very inexpensive,
but the signal conditioning equipment costs are significant.
This section describes sensors that will be of use for industrial measurements. The
sections have been divided by the phenomena to be measured. Where possible details are
provided.
continuous sensors - 14.3
14.2.1.1 - Potentiometers
V1
resistive
film V1
Vw
Vw
V2
wiper
V2 physical
schematic
The potentiometer in Figure 14.2 is being used as a voltage divider. As the wiper
rotates the output voltage will be proportional to the angle of rotation.
continuous sensors - 14.4
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 nor-
mally 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.
14.2.2 Encoders
Encoders use rotating disks with optical windows, as shown in Figure 14.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 dis-
cussed later.
continuous sensors - 14.5
light light
emitters detectors
Shaft rotates
There are two fundamental types of encoders; absolute and incremental. An abso-
lute 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 grey code
number. An incremental (or relative) encoder will output two pulses that can be used to
determine displacement. Logic circuits 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 14.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 need to add more windows
to the existing two rings. Typical encoders will have from 2 to thousands of windows per
ring.
continuous sensors - 14.6
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.
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 counterclockwise.
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.
continuous sensors - 14.8
Normally absolute and relative encoders require a calibration phase when a con-
troller 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.
14.2.2.1 - Tachometers
pickup Vout
rotating coil
shaft Vout
t
magnet
1/f
14.2.3.1 - Potentiometers
continuous sensors - 14.9
V2
Vout = V 1 + ( V 2 – V1 ) ---
a
L
V out
L
a
V1
A rod drives
the sliding core
∆x
∆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 resis-
tor 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.
These devices are more accurate than linear potentiometers, and have less friction.
Typical applications for these devices include measuring dimensions on parts for quality
continuous sensors - 14.11
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.
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 14.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 deter-
mine direction and distance of motion.
continuous sensors - 14.12
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).
14.2.3.4 - Accelerometers
Base
Mounting Force
Stud Sensor Mass Housing
between 10Hz to 10KHz. Temperature variations 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 sensitivity requires a larger mass). Figure 14.13 shows
the sensitivity of two accelerometers with different resonant frequencies. A smaller reso-
nant 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.
The force sensor is often a small piece of piezoelectric material (discussed later in
this chapter). The piezoelectic material can be used to measure the force in shear or com-
pression. Piezoelectric based accelerometers typically have parameters such as,
• 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 velocity of 9.81 m/s**2.
continuous sensors - 14.14
accelerometer
isolated
stud isolated
wafer
surface
Equipment normally used when doing vibration testing is shown in Figure 14.15.
The sensor needs to be mounted on the equipment to be tested. A pre-amplifier 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 Controlled Milling machines now use these sensors
to actively eliminate chatter, and detect tool failure. The signal from accelerometers can be
continuous sensors - 14.15
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 14.16 shows the basic properties of the undeformed wire. Basi-
cally, the resistance of the wire is a function of the resistivity, length, and cross sectional
area.
t
L
-
V L L
+ R = --- = ρ --- = ρ ------
I A wt
I
where,
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 14.16 has been deformed it will take on the new dimen-
sions and resistance shown in Figure 14.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.
w’
t’
L’
F F F
σ = --- = ------ = Eε ∴ε = ----------
A wt Ewt
L(1 + ε)
R' = ρ -------- = ρ ----------------------------------------------
L'
w't' w ( 1 – νε )t ( 1 – νε )
F
(1 + ε)
∴∆R = R' – R = R ---------------------------------------- – 1
( 1 – νε ) ( 1 – νε )
where,
ν = poissons ratio for the material
F = applied force
E = Youngs modulus for the material
σ, ε = stress and strain of material
Aside: Gauge factor, as defined below, is a commonly used measure of stain gauge
sensitivity.
∆R
-------
R
GF = -------------
ε
Figure 14.17 The Electrical and Mechanical Properties of the Deformed Wire
continuous sensors - 14.17
Aside: Changes in strain gauge resistance are typically small (large values would require
strains that would cause the gauges 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+ - when Vo = 0V
R 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 14.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 measure 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 mount-
ing strain gages involves surface cleaning. application of adhesives, and soldering leads to
the strain gages.
continuous sensors - 14.18
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 14.20. In the narrow neck the strain is pro-
portional to the load on the member, so it may be used to measure force. These parts are
often called load cells.
F F
Strain gauges 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 application includes
using strain gages to measure die forces during stamping to estimate when maintenance is
needed.
14.2.4.2 - Piezoelectric
the Piezoelectric effect. Figure 14.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 capacitance is propor-
tional to the change in the thickness.
b
+
q
-
c a
F
εab d-
C = --------- i = εg F
----
c dt
where,
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)
E = Youngs modulus (quartz typ. 8.6*10**10 N/m**2)
These crystals are used for force sensors, but they are also used for applications
such as microphones and pressure sensors. Applying an electrical charge can induce
strain, allowing them to be used as actuators, such as audio speakers.
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 measure-
ments, when used for static measurements they tend to drift or slowly lose charge, and the
signal value will change.
continuous sensors - 14.20
There are a number of factors to be considered when examining liquids and gasses.
• Flow velocity
• Density
• Viscosity
• Pressure
There are a number of differences factors to be considered when dealing with flu-
ids and gases. Normally a fluid is considered incompressible, while a gas normally fol-
lows the ideal gas law. Also, given sufficiently high enough temperatures, or low enough
pressures a fluid can be come a liquid.
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 number 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.
continuous sensors - 14.21
VDρ
R = ------------
u
where,
R = Reynolds number
V = velocity
D = pipe diameter
ρ = fluid density
u = viscosity
14.2.5.1 - Pressure
Figure 14.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, con-
nected 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 pres-
sure drops. If there is no flow the pressure 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 14.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 centerline of the fluid flow through the valve. Assume the fluid is incompress-
ible, so the density 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 before p after v after
---------------- + ------------------ + 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 sec-
tion 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 differ-
ence 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 accelerates. When leaving the point it decelerates. The
continuous sensors - 14.24
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 typ-
ically 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 resis-
tance. The typical accuracy for a Coriolis flowmeter is 0.1%.
These flowmeters 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.
The transmitter and receiver have a minimal impact on the fluid flow, and there-
fore don’t result in pressure drops.
Fluid flowing past a large (typically flat) obstacle will shed vortices. The fre-
quency 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.
continuous sensors - 14.25
In some cases more precise readings of flow rates and volumes may be required.
These can be obtained by using a positive displacement meter. In effect these meters are
like pumps run in reverse. As the fluid is pushed through the meter it produces a measur-
able output, normally on a rotating shaft.
Gas flow rates can be measured using Pitot tubes, as shown in Figure 14.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.
gas flow
pitot
tube
14.2.6 Temperature
Temperature measurements are very common with control systems. The tempera-
ture ranges are normally described with the following classifications.
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) nor-
mally 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 Figure 14.26.
A current must be passed through the RTD to measure the resistance. (Note: a volt-
age 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
14.2.6.2 - Thermocouples
Each metal has a natural potential level, and when two different metals touch there
is a small potential difference, a voltage. (Note: when designing assemblies, dissimilar
metals should not touch, this will lead to corrosion.) Thermocouples use a junction of dis-
similar metals to generate a voltage proportional to temperature. This principle was dis-
covered by T.J. Seebeck.
The basic calculations for thermocouples are shown in Figure 14.27. This calcula-
tion provides the measured voltage using a reference temperature and a constant specific
continuous sensors - 14.27
to the device. The equation can also be rearranged to provide a temperature given a volt-
age.
measuring +
device - V out
V out = α ( T – T ref )
V out
∴T = ---------- + T ref
α
where,
α = constant (V/C) 50 µ V
------- (typical)
°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 rela-
tively 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
0
0 500 1000 1500 2000 2500
(°F)
14.2.6.3 - 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 semi-
conductor.) The resistance can change by more than 1000 times. The basic calculation is
shown in Figure 14.29.
β --- – -----
1 1
T T o
Rt = Ro e
βT o
∴T = ---------------------------------
Rt
T o ln ------ + β
R o
where,
Ro, 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 volt-
age using a Wheatstone bridge and an inverting amplifier.
+V
R5
R1 R3
-
+
Vout
R2 R4
Thermistors are small, inexpensive devices that are often made as beads, or metal-
lized 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.
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 temperature applications, or for production lines where it
is not possible to mount other sensors to the material.
14.2.7 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).
continuous sensors - 14.31
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
14.2.8 Chemical
14.2.8.1 - pH
The pH of an ionic fluid can be measured over the range from a strong base (alka-
line) 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.
14.2.8.2 - Conductivity
14.2.9 Others
Signals from sensors are often not in a form that can be directly input to a control-
ler. In these cases it may be necessary to buy or build signal conditioners. Normally, a sig-
nal conditioner is an amplifier, but it may also include noise filters, and circuitry to
convert from current to voltage. This section will discuss the electrical and electronic
interfaces between sensors and controllers.
Analog signal are prone to electrical noise problems. This is often caused by elec-
tromagnetic fields on the factory floor inducing currents in exposed conductors. Some of
the techniques for dealing with electrical noise include;
twisted pairs - the wires are twisted to reduce the noise induced by magnetic fields.
shielding - shielding is used to reduce the effects of electromagnetic interference.
single/double ended inputs - shared or isolated reference voltages (commons).
When a signal is transmitted through a wire, it must return along another path. If
the wires have an area between them the magnetic flux enclosed in the loop can induce
current flow and voltages. If the wires are twisted, a few times per inch, then the amount
of noise induced is reduced. This technique is common in signal wires and network cables.
A shielded cable has a metal sheath, as shown in Figure 14.32. This sheath needs
to be connected to the measuring device to allow induced currents to be passed to ground.
This prevents electromagnetic waves to induce voltages in the signal wires.
continuous sensors - 14.33
+ IN1
- REF1
SHLD
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
Single ended - with this arrangement the Double ended - with this arrangement
signal quality can be poorer, but more the signal quality can be better, but
inputs are available. fewer inputs are available.
Signals from transducers are typically too small to be read by a normal analog
input card. Amplifiers are used to increase the magnitude of these signals. An example of
a single ended signal amplifier is shown in Figure 14.34. The amplifier is in an inverting
configuration, so the output will have an opposite sign from the input. Adjustments are
provided for gain and offset adjustments.
Note: op-amps are used in this section to implement the amplifiers because they are
inexpensive, common, and well suited to simple design and construction projects.
When purchasing a commercial signal conditioner, the circuitry will be more com-
plex, and include other circuitry for other factors such as temperature compensation.
continuous sensors - 14.35
+V
Ro offset Rf Rg
-V gain
-
+
Ri
Vin Vout
Rf + Rg
V out = ----------------- V in + offset
Ri
A differential amplifier with a current input is shown in Figure 14.35. 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 14.36 will convert a differential (double ended) signal to a
single ended signal. The two input op-amps are used as unity gain followers, to create a
high input impedance. The following amplifier amplifies the voltage difference.
-
+
-
Vin +
Vout
-
+
CMRR
adjust
+V
R5
R1 R3
-
+
Vout
R2 R4
R2
V out = V ( R 5 ) ------------------ ------ + ------ + ------ – ------
1 1 1 1
R 1 + R 2 R 3 R 4 R 5 R 3
or if R = R 1 = R 2 = R 4 = R 5
V out = V ---------
R
2R 3
14.5 SUMMARY
• Selection of continuous sensors must include issues such as accuracy and resolu-
tion.
• Angular positions can be measured with potentiometers and encoders (more
accurate).
• Tachometers are useful for measuring angular velocity.
continuous sensors - 14.39
14.6 REFERENCES
Bryan, L.A. and Bryan, E.A., Programmable Controllers; Theory and Implementation, Industrial
Text Co., 1988.
Swainston, F., A Systems Approach to Programmable Controllers, Delmar Publishers Inc., 1992.
1. Name two types of inputs that would be analog input values (versus a digital value).
2. 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.)
3. What is the resolution of an absolute optical encoder that has six binary tracks? nine tracks?
twelve tracks?
5. If a thermocouple generates a voltage of 30mV at 800F and 40mV at 1000F, what voltage will
be generated at 1200F?
6. A potentiometer is to be used to measure the position of a rotating robot link (as a voltage
divider). The power supply connected across the potentiometer is 5.0 V, and the total wiper
travel is 300 degrees. The wiper arm is directly connected to the rotational joint so that a given
rotation of the joint corresponds to an equal rotation of the wiper arm.
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?
7. A motor has an encoder mounted on it. The motor is driving a reducing gear box with a 50:1
continuous sensors - 14.40
ratio. If the position of the geared down shaft needs to be positioned to 0.1 degrees, what is the
minimum resolution of the incremental encoder?
8. What is the difference between a strain gauge and an accelerometer? How do they work?
9. Use the equations for a permanent magnet DC motor to explain how it can be used as a tachom-
eter.
11. A potentiometer is connected to a PLC analog input card. The potentiometer can rotate 300
degrees, and the voltage supply for the potentiometer is +/-10V. Write a ladder logic program
to read the voltage from the potentiometer and convert it to an angle in radians stored in F8:0.
4. data bucket, smart machines, PLCs with analog inputs and network connections
5.
V out = α ( T – T ref ) 0.030 = α ( 800 – T ref ) 0.040 = α ( 1000 – T ref )
6.
θw
V out = ( V2 – V 1 ) ----------- + V 1 = ( 5V – 0V ) ------------------ + 0V = 0.7V
42deg
a)
θ max 300deg
θw
b) 2.765V = ( 5V – 0V ) ------------------ + 0V
300deg
θw
2.765V = ( 5V – 0V ) ------------------ + 0V
300deg
θ w = 165.9deg
7.
θ input
deg
θ output = 0.1 -------------- - = 50
--------------- ------ θ input = 50 0.1 -------------- = 5 --------------
deg deg
count θ output 1 count count
deg
360 ---------
rot count
R = ------------------ = 72 --------------
deg rot
5 --------------
count
8.
strain gauge measures strain in a material using a stretching wire that increases resis-
tance - accelerometers measure acceleration with a cantilevered mass on a piezoelec-
tric element.
9.
R
When the motor shaft is turned by
another torque source a voltage is gener-
ated that is proportional to the angular
DMM V = Ks ω +
velocity. This is the reverse emf. A dmm,
- or other high impedance instrument can
be used to measure this, thus minizing
the loses in resistor R.
2
ω + ω ------ = V s ------
· K K
JR JR
V s = ω ( K ) + ω ------
· JR
K
continuous sensors - 14.42
10.
encoders cost more but can have higher resolutions. Potentiometers have limited
ranges of motion
11.
FS BTW
Rack: 0
Group: 0
Module: 0
BT Array: BT9:0
Data File: N7:0
Length: 37
Continuous: no
BT9:0/EN BT9:1/EN
BTR
Rack: 0
Group: 0
Module: 0
BT Array: BT9:1
Data File: N7:37
Length: 20
Continuous: no
BT9:1/DN
CPT
Dest F8:0
Expression
"20.0 * N7:41 / 4095.0 - 10"
CPT
Dest F8:0
Expression
"300.0 * (F8:0 + 10) / 20"
RAD
Source F8:0
Dest F8:1
1. Write a simple C program to read incremental encoder inputs (A and B) to determine the cur-
rent position of the encoder. Note: use the quadrature encoding to determine the position of the
motor.
continuous sensors - 14.43
2. 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 con-
verter with a 0V to 10V input range. How many bits does the A/D converter need to accommodate
the accuracy of the potentiometer?
3. The table of position and voltage values below were measured for an inexpensive potentiome-
ter. Write a C subroutine 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
continuous actuators - 15.1
Topics:
• Servo Motors; AC and DC
• Stepper motors
• Single axis motion control
• Hydraulic actuators
Objectives:
• To understand the main differences between continuous actuators
• Be able to select a continuous actuator
• To be able to plan a motion for a single servo actuator
15.1 INTRODUCTION
An electric motor is composed of a rotating center, called the rotor, and a station-
ary outside, called the stator. These motors use the attraction and repulsion of magnetic
fields to induce forces, and hence motion. Typical electric motors use at least one electro-
magnetic coil, and sometimes permanent magnets to set up opposing fields. When a volt-
age is applied to these coils the result is a torque and rotation of an output shaft. There are
a variety of motor configuration the yields motors suitable for different applications. Most
notably, as the voltages supplied to the motors will vary the speeds and torques that they
will provide.
continuous actuators - 15.2
• Motor Categories
• AC motors - rotate with relatively constant speeds proportional to the fre-
quency of the supply power
induction motors - squirrel cage, wound rotor - inexpensive, effi-
cient.
synchronous - fixed speed, efficient
• Drives can be used to vary motor speeds electrically. This can also be done with
mechanical or hydraulic machines.
A control system is required when a motor is used for an application that requires
continuous position or velocity. A typical controller is shown in Figure 15.1. In any con-
trolled system a command generator is required to specify a desired position. The control-
ler will compare the feedback from the encoder to the desired position or velocity to
determine the system error. The controller with then generate an output, based on the sys-
tem error. The output is then passed through a power amplifier, which in turn drives the
motor. The encoder is connected directly to the motor shaft to provide feedback of posi-
tion.
continuous actuators - 15.3
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. Figure 15.2 shows a simplified model of a motor. The
magnetics provide a permanent magnetic field for the rotor to push against. When current
is run through the wire loop it creates a magnetic field.
magnetic
field
axis of
rotation ω
continuous actuators - 15.4
The power is delivered to the rotor using a commutator and brushes, as shown in
Figure 15.3. In the figure the power is supplied to the rotor through graphite brushes rub-
bing against the commutator. The commutator is split so that every half revolution the
polarity of the voltage on the rotor, and the induced magnetic field reverses to push against
the permanent magnets.
motor
shaft brushes
motor
shaft
brushes
V+ power V-
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
continuous actuators - 15.5
wear, which increases maintenance costs. In addition, the use of brushes increases resis-
tance, 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 rela-
tive 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 deliv-
ered 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 pro-
duce a variable effective voltage efficiently. The frequency of these waves is nor-
mally above 20KHz, above the range of human hearing.
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 con-
trolled with PWM in two directions
the H-bridge circuit (shown below)
is a popular choice. These can be
built with individual components, or Va Vb
purchased as integrated circuits for
smaller motors. To turn the motor in
one direction the 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 sig- Vb Va
nal 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.
-Vs
15.2.2 AC Motors
• Power is normally generated as 3-phase AC, so using this increases the efficiency
of electrical drives.
• Typically AC motors have windings on the stator with multiple poles. Each pole
is a pair of windings. As the AC current reverses, the magnetic field in the rotor appears to
rotate.
continuous actuators - 15.8
L1
stator windings
rotor
Neut.
L2
L1
L3
Neut.
Neut.
Neut.
• Rotor types for induction motors are listed below. Their function 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 - has the shape of a wheel with end caps and bars
Wound Rotor - the rotor has coils wound. These may be connected to exter-
nal contacts via commutator
• Induction motors require slip. If the motor turns at the precise speed of the stator
field, it will not see a changing magnetic 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.
continuous actuators - 15.10
An induction motor has the windings on the stator. 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.
The motor will turn at a frequency close to that of the applied voltage, but there is
always some slip. It is possible to control the speed of the motor by controlling the fre-
quency of the AC voltage. Synchronous motor drives control the speed of the motors by
synthesizing a variable frequency AC waveform, as shown in Figure 15.9.
Controller
These drives 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 15.10.
When the motor is used with a fixed frequency AC source the synchronous 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
motor 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 insig-
nificant.
continuous actuators - 15.11
synchronous speed
speed
torque
Class A
speed
torque
Class B
speed
torque
Class C
speed
torque
Class D
speed
• Wound rotor induction motors use external resistors. varying the resistance
allows the motors torque speed curve to vary. As the resistance value is increased the
motor torque speed curve shifts from the Class A to Class D shapes.
• The figure below shows the relationship between the motor speed and applied
power, slip, and number of poles. An ideal motor with no load would have a slip of 0%.
S = motor slip
• Single phase AC motors can run in either direction. To compensate for this a
shading pole is used on the stator windings. It basically acts as an inductor to one side of
the field which slows the filed buildup and collapse. The result is that the field strength
seems to naturally rotate.
• 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.
• Starting AC motors can be hard because of the low torque at low speeds. To deal
with this a switching arrangement is often used. At low speeds other coils or capacitors are
connected into the circuits. At higher speeds centrifugal switches disconnect these and the
motor behavior switches.
continuous actuators - 15.13
• 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.
continuous actuators - 15.14
Split Winding
starting winding
starting capacitor
Capacitor Start
starting winding
capacitor
Capacitor Run
capacitor winding
running capacitor
starting winding
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 mainte-
nance than the brushed DC motors.
A typical Brushless DC motor could have three poles, each corresponding to one
power input, as shown in Figure 15.14. Each of coils is separately controlled. The coils are
switched on to attract or repel the permanent magnet rotor.
continuous actuators - 15.16
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 fre-
quency of the signal.
A typical torque speed curve for a brushless motor is shown in Figure 15.15.
continuous actuators - 15.17
torque
speed
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 Fig-
ure 15.16. 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 more com-
plex switching circuitry.
a b 1a 1b
a b 2a 2b
2
unipolar bipolar
continuous actuators - 15.18
The motors are turned by applying different voltages at the motor terminals. The
voltage change patterns for a unipolar motor are shown in Figure 15.17. 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
2b 3 0 1 0 1
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 outputs is kept on constantly the motor will be
held in position.
Stepper motors do not require feedback except when used in high reliability appli-
cations and when the dynamic conditions 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 Figure 15.18. In addition they have different static
and dynamic holding torques. These motors are also prone to resonant conditions because
of the stepped motion control.
continuous actuators - 15.19
torque
speed
The motors are used with controllers that perform many of the basic control func-
tions. At the minimum a translator controller 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 res-
olutions with a process known as microstepping. This effectively divides the logical steps
described in Figure 15.17 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
• Uses DC power on the rotor and stator to generate the magnetic field (i.e., no per-
manent magnets)
• Shunt motors
Va
I a = ------
Ra
T = Kt Ia φ
where,
I a, V a, R a = Armature current, voltage and resistance
operating
range
• Series motors\
Va
I a = -----------------
Ra + Rf
2
T = Kt Ia φ = Kt Ia
where,
I a, V a = Armature current, voltage
stall torque
T
continuous actuators - 15.22
The XXXXXXX
e f = r a i a + Dla i a + e m
e m = K e θD
T = KT ia
e a = ( r a + l a D )i a + K e Dθ
e a = ( r a + l a D ) ------ + K e Dθ
T
K T
• Compound motors\
cumulative
differential
T
continuous actuators - 15.23
ef = rf if + l f if D
T = KT if
T
--- = JD 2 + BD
θ
--θ- = -----------------------
1 -
T 2
JD + BD
--- = --θ- T
θ KT
--- = -----------------------
-
if T if 2
JD + BD
θ θi KT 1
---- = --- ----f = -----------------------
- ------------------
ef if ef JD 2 + BD r f + l f D
i
--- ----f = K T -----------------
1 -
---- = T
T
ef if ef r f + l f D
15.3 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 feed-
back. An example system is shown in Figure 15.21. 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 provides the hydraulic power to drive the system.
continuous actuators - 15.24
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.
The continuous actuators discussed earlier in the chapter are the more common
types. For the purposes of completeness additional actuators are listed and described
briefly below.
15.5 SUMMARY
1. 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 resolution of each of the axes be 0.025”
a) to achieve this control resolution how many step angles are required on the step-
per 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.
2. For the stepper motor in the previous question, a pulse train is to be generated by the robot con-
troller.
a) How many pulses are required to rotate the motor through three complete revo-
lutions?
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 controller?
3. Explain the differences between stepper motors, variable frequency induction motors and DC
motors using tables.
continuous actuators - 15.26
1.
P = 0.125 -------
in in
a) R = 0.025 ----------
rot step
in
0.025 ---------- 1 step
R step rot
θ = --- = --------------------------- = 0.2 ---------- Thus ------------------
rot
= 5 ----------
rot
P step
0.125 -------
in 0.2 ----------
rot step
rot deg
b) θ = 0.2 ---------- = 72 ----------
step step
in
c) 3 -----
s steps
PPS = ------------------------ = 120 -------------
in s
0.025 ----------
step
2.
a)
pulses = ( 3rot ) 5 ---------- = 15steps
step
rot
---------------- = 25 --------
rot- step
5 ---------- = 125 ------------- = 125 ------------- ------------- = 2.08 ----------
b) pulses steps 1min steps step
s min rot min 60s min s
3.
speed torque
stepper motor very low speeds low torque
vfd limited speed range good at rated speed
dc motor wide range decreases at higher speeds
1. A stepper 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.
c) For the stepper motor, a pulse train is to be generated by a motion controller.
continuous actuators - 15.27
How many pulses are required to rotate the motor through three complete revo-
lutions? If it is desired to rotate the motor at a speed of 25 rev/min, what pulse
rate must be generated by the robot controller?
2. 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.
Topics:
• Motion controllers
• Motion profiles, trapezoidal and smooth
• Gain schedulers
Objectives:
• To understand single and multi axis motion control systems.
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 setpoints over time.
An example of a motion control system is shown in Figure 16.1. The motion con-
troller 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 pro-
file is then used to generate a set of setpoints, and times they should be output. The set-
point scheduler will then use a real-time clock to output these setpoints to the motor drive.
multiaxis motion - 16.2
motion controller
motion Motor
commands Setpoint Setpoint Servo
Generator Scheduler Drive
setpoint schedule
The combination of a motion controller, drive and actuator is called an axis. When
there is more than one drive and actuator the system is said to have multiple axes. Com-
plex motion control systems such as computer controlled milling machines (CNC) and
robots have 3 to 6 axes which must be moved in coordination.
θ ( 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 acceler-
ation and deceleration. The top level of the trapezoid is the maximum velocity. Some con-
trollers allow the user to use the acceleration and deceleration times instead of the
maximum acceleration and deceleration. 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
α max = the maximum acceleration
t acc, t dec = the acceleration and deceleration times
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 indicates that the
axis will not reach the maximum velocity, and the acceleration and deceleration times
must be decreased. The resulting velocity profile will be a triangle.
ω max
t acc = t dec = ------------ (1)
α max
t total = t acc + t max + t dec (2)
t acc t dec
θ = --- t acc ω max + t max ω max + --- t dec ω max = ω max -------- + t max + --------
1 1 (3)
2 2 2 2
θ t acc t dec
(4)
t max = ------------ – ----------- – -----------
ω max 2 2
Note: if the time calculated in equation 4 is negative then the axis never reaches
maximum velocity, 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 completed in half a second. The system moves for 7.5
seconds at the maximum velocity.
multiaxis motion - 16.5
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.
multiaxis motion - 16.6
Given the parameters calculated for the motion, the setpoints for motion can be
calculated with the equations in Figure 16.7.
multiaxis motion - 16.7
0s ≤ t < t acc
1 2
θ ( t ) = --- α max t + θ start
2
t acc ≤ t < t acc + t max
1 2
θ ( t ) = --- α max t acc + ω max ( t – t acc ) + θ start
2
t acc + t max ≤ t < t acc + t max + t dec
1 2 1 2
θ ( t ) = --- α max t acc + ω max t max + --- α max ( t – t max – t acc ) + θ start
2 2
t acc + t max + t dec ≤ t
θ ( t ) = θ end
A subroutine that implements these is shown in Figure 16.8. In this subroutine the
time is looped with fixed time steps. The position setpoint values are put into the setpoint
array, which will then be used elsewhere to guide the mechanism.
multiaxis motion - 16.8
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 decelera-
tion.
multiaxis motion - 16.9
2
ω ( deg ) ω ( t ) = At + Bt + C
ω max
α max – α max
t (s)
0
where,
ω max = the maximum velocity
α max = the maximum acceleration
t acc, t dec = the acceleration and deceleration times
The distance covered during acceleration, the area under the curves, is,
t acc 2 2
-------- α max 2 t acc α max 2
θ acc = ∫0 - t dt + ∫ ω max – --------------
- ( t – 2t acc t + t 2acc ) dt
2
--------------
--------
4ω max tacc 4ω max
t acc 2
-------- t acc
2
2 2
α max 3 α max t 3
+ ω max t – --------------- ---- – t acc t + t acc t
2 2
θ acc = ------------------ t
12ω max
0
4ω max 3
t acc
-------
-
2
2 3 2 3 2 3 3 3
α max t acc αmax t acc 3 t acc α max t acc t acc t acc
acc = ----------------- - -------- – t acc + t 3acc – ω max -------
- -------- + ω max t acc – -------------- - + --------------- -------- – -------- + -------
-
12ω max 8 4ω max 3 2 4ω max 24 4 2
2 2 2
αmax 3 ω max t acc α max 3 7α max 3
θ acc = ------------------ t acc + --------------------- – ------------------ t acc – ------------------ t acc
96ω max 2 12ω max 96ω max
2
– 14αmax 3 ω max t acc
θ acc = --------------------- t acc + ---------------------
96ω max 2
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.12 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 equation can
then be used in equation (1) to generate a smooth motion path between any arbitrary start
multiaxis motion - 16.12
p(0 ) = 0 p(1 ) = 1
d- d-
---- p(0) = 0 ---- p(1 ) = 0
dt dt
0 = 3A0 + 2B0 + C
2 ∴C = 0
∴B = – --- A
2
3
0 = 3A1 + 2B1 2
3 2
1 = A1 + B1 + ( 0 )0 + 0 ∴A = – 2
∴B = 3
3 2
p ( u ) = – 2 u + 3u (3)
The example in Figure 16.13 shows the use of a trigonometric function, instead of
a polynomial. This function was used to generate the points in the following sample pro-
gram in Figure 16.14.
multiaxis motion - 16.13
where,
p ( u ) = A sin ( Bt + C ) + D
The coefficients can be calculated using the conditions used previously,
d-
---- p ( 0 ) = AB cos ( B ( 0 ) + C ) = 0
dt π
∴ cos ( C ) = 0 ∴C = – ---
2
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
1
∴A ( 1 ) + A = 1 ∴A = ---
2
The final relationship is,
π
p ( u ) = --- sin πt – --- + ---
1 1
2 2 2
The program in Figure 16.14 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 glo-
bal setpoint variable, ’point_current’ at scheduled times. This function also includes a
simple clock to keep track of the system time.
multiaxis motion - 16.14
#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;
In a machine with multiple axes the motions of individual axes must often be coor-
dinated. A simple example would be a robot that needs to move two joints to reach a new
position. We could extend the motion of the slower joints so that the motion of each joint
would begin and end together.
multiaxis motion - 16.15
When the individual axis of a machine are not coordinated this is known as slew
motion. Each of the axes will start moving at the same time, but finish at separate times.
Consider the example in Figure 16.15. 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 acceler-
ations and decelerations are (50, 100, 150) degrees/sec/sec, and the maximum velocities
are (20, 40, 50) degrees/sec.
90
time(sec)
θ3
θ2
-90 θ1
The calculations for the motion parameters are shown in Figure 16.16. 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.
multiaxis motion - 16.16
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 deceleration.
ω max
t acc = t dec = ------------ = ------, ---------, --------- = ( 0.4, 0.4, 0.333 )sec.
20 40 50
αmax 50 100 150
t acc ω max.vel. 0.4 ( 20 ) 0.4 ( 40 ) 0.333 ( 50 )
θ acc. = θ dec. = ---------------------------- = ------------------, ------------------, ------------------------ = ( 4, 8, 8.33 )deg.
2 2 2 2
Remove the angles covered during accel./deccel., and find the travel time at maximum
velocity.
θ move – 2θ acc 80 – 2 ( 4 ) 80 – 2 ( 8 ) 40 – 2 ( 8.333 )
t max = ----------------------------------- = -----------------------, -----------------------, ---------------------------------
ω max 20 40 50
In interpolated motion the faster joints are slowed so that they finish in coordina-
tion 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 accelerating at the maximum acceleration, but setting
a new maximum velocity. This is shown in the example in Figure 16.17 using the results
from the example in Figure 16.16.
multiaxis motion - 16.17
The longest motion time is 4.4s for joint 1, and this can be used to prolong the other
motions. The calculation begins by rewriting the velocity/position relationship using
a new maximum velocity.
1 ω max' ω max' 1 ω max'
∆θ = --- ------------- ω max' + t total – 2 ------------- ω max' + --- ------------- ω max'
2 α max α max 2 α max
ω max'
∴∆ θ = ω max' t total – -------------
α max
2
∴( ω max' ) + ω max' ( – t total α max ) + ∆θα max = 0
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
∴ω max' = ---------------------------------------- = 421, 19.0
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
∴ω max' = 651, 9.22
9.22
t acc' = t acc' = ---------- = 0.092s
100
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
multiaxis motion - 16.18
should be updated. A diagram of a scheduler is shown in Figure 16.18. 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 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 situa-
tion where the axis is always chasing the target value. This leads to small errors, as shown
in Figure 16.19.
multiaxis motion - 16.19
speed
actual position
trajectory table
time
trajectory table time step
position
required
actual
time
• When we have simple features, paths are easy to generate. These features include,
- steps
- pockets
- holes
- etc.
• For complex surfaces we want to contour appropriately. These surfaces will almost always
be represented with spline patches.
(u=0,v=1) (u=1,v=1)
xp
p ( u, v ) = y p
zp
(u=0,v=0) (u=1,v=0)
- the controller described in the block diagram below uses a model for a DC per-
manent magnet DC motor to estimate a voltage based upon a predicted velocity and posi-
tion.
- the desired position and velocity are given in figure xxx based upon the motion
multiaxis motion - 16.22
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
- the controller that uses the desired position and velocity is shown in figure xxxx
ωd
2
JRD + K
------------------------
K physical system
θd + θa
+ K
P ------------------------
2
+ JRD + K
-
1-
---------- K enc
K enc
16.6 SUMMARY
1. 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 set-
point table that has values for positions every 0.5 seconds for the entire motion.
2. 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 accel-
eration 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 sec-
onds.
multiaxis motion - 16.24
1.
Given,
deg deg-
ω max = 20 --------- α max = 100 -------- 2
∆θ = 100 – ( – 100 ) = 200°
s s
The motion times can be calculated.
deg
ω max 20 ---------
s
t acc = t dec = ------------ = ------------------ = 0.2s
α max deg
100 -------- 2
-
s
deg
∆θ – ω max t acc 200deg – 20 --------- 0.2s
s
t max = ---------------------------------- = --------------------------------------------------- = 9.8s
ω max deg
20 ---------
s
t total = t acc + t max + t dec = 0.2s + 9.8s + 0.2s = 10.2s
t (s) angle
(deg)
0.0 -100 1 deg- 2 deg
θ 0.5s = --- 100 -------- ( 0.2s ) + 20 --------- ( 0.5s – 0.2s ) – 100deg
0.5 -92 2 s
2 s
1.0 -82
1.5 -72 θ0.5s = – 92deg
2.0 -62
deg
2.5 -52 θ 1.0s = θ 0.5s + 20 --------- ( 0.5s ) = – 92deg + 10deg
s
3.0 -42
3.5 -32
4.0 -22
4.5 -12
5.0 -2
5.5 8
6.0 18
6.5 28
7.0 38
7.5 48
8.0 58
8.5 68
9.0 78
9.5 88
10.0 98
10.5 100
11.0 100
multiaxis motion - 16.25
2.
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
1. 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.
2. 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
3. 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.
4. 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.
5. An axis has a maximum velocity of 5m/s and an acceleration/deceleration time of 1s. Sketch a
trapezoidal motion profile and find the motion time for a 25m motion.
6. Develop a smooth velocity profile for moving a cutting tool that starts at 1000 inches and
multiaxis motion - 16.26
moves to -1000 inches. The maximum velocity is 100 in/s and the maximum acceleration is
50in/s/s.
numerical methods - 17.1
Topics:
• Laplace transforms
• Using tables to do Laplace transforms
• Using the s-domain to find outputs
• Solving Partial Fractions
Objectives:
• To be able to find time responses of linear systems using Laplace transforms.
17.1 INTRODUCTION
Laplace transforms provide a method for representing and analyzing linear sys-
tems using algebraic methods. In systems that begin undeflected and at rest the Laplace ’s’
can directly replace the d/dt operator in differential equations. It is a superset of the phasor
representation in that it has both a complex part, for the steady state response, but also a
real part, representing the transient part. As with the other representations the Laplace s is
related to the rate of change in the system.
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 func-
tion in the s-domain is shown in upper case. Another useful observation is that the trans-
form 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.
numerical methods - 17.2
∞
∫0 f ( t )e
– st
F(s) = dt
where,
f ( t ) = the function in terms of time t
F ( s ) = the function in terms of the Laplace s
therefore,
– st
du = df ( t ) v = e
– st
u = f(t) dv = – se dt
∞ – st ∞ ∞
∴∫ f ( t ) ( – s )e – ∫ (d/dt)f ( t )e
– st – st
dt = f ( t )e 0
dt
0 0
∞ – ∞s ∞
∴∫ (d/dt)f ( t )e ] + s ∫ f ( t )e
– st – 0s – st
dt = [ f ( t )e – 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 presented in a later section for the most popular
transforms.
The process of applying Laplace transforms to analyze a linear system involves the
basic steps listed below.
numerical methods - 17.4
Laplace transform tables are shown in Figure 17.5, Figure 17.7 and Figure 17.8.
These are commonly used when analyzing systems with Laplace transforms. The trans-
forms shown in Figure 17.5 are general properties normally used for manipulating equa-
tions, and for converting them to/from the s-domain.
numerical methods - 17.5
f(t ) f(s )
Kf ( t ) KL [ f ( t ) ]
f1 ( t ) + f2 ( t ) –f3 ( t ) + … f 1 ( s ) + f 2 ( s ) –f 3 ( s ) + …
df ( t ) –
----------- sL [ f ( t ) ] – f ( 0 )
dt
2 –
d f(t ) 2 df ( 0 )
–
--------------
2
s L [ f ( t ) ] – sf ( 0 ) – ------------------
dt dt
n – n–1 –
f ( t )- n – 2 df ( 0
------------------) – … – -------------------------
d------------- n n–1 – d f(0
n
s L[f(t ) ] – s f(0 ) – s n
dt dt dt
t
[ f ( t ) -]
∫0 f ( t ) dt L
----------------
s
– as
f ( t – a )u ( t – a ), a > 0 e L[ f( t )]
– at
e f(t) f(s – a)
df ( s -)
–--------------
tf ( t )
ds
n
n n d f(s)
t f(t) ( – 1 ) --------------
n
-
ds
∞
( t )-
f-------
t ∫ f ( u ) du
s
·· · where,
L [ x + 7x + 8x = 9 ] = ··
x(0) = 1
·
x(0) = 2
x(0) = 3
The Laplace transform tables shown in Figure 17.7 and Figure 17.8 are normally
used for converting to/from the time/s-domain.
numerical methods - 17.7
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 +ω
s
cos ( ωt ) -----------------
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) + ω
f ( t ) = 5 sin ( 5t + 8 )
f(s ) = L[ f( t) ] =
5 6
f ( s ) = --- + -----------
s s+7
–1
f(t ) = L [ f(s )] =
Figure 17.10 Drill Problem: Converting from the s-domain to time domain
shown in the mass-spring-damper example in Figure 17.11. In this case we assume the
system starts undeflected and at rest, so the ’D’ operator may be directly replaced with the
Laplace ’s’. If the system did not start at rest and undeflected, the ’D’ operator would be
replaced with a more complex expression that includes the initial conditions.
2
F = MD x + K d Dx + K s x
Ks
Kd
F ( t )- 2
--------- = MD + K d D + K s
M x 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 initial 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 -------------
n
= s L[f(t )] – s f(0 ) – s ------------------ – … – -------------------
n
dt dt dt
Impedances in the s-domain are shown in Figure 17.12. As before these assume
that the system starts undeflected and at rest.
Resistor V ( t ) = RI ( t ) V ( s ) = RI ( s ) Z = R
1 I(s)
V ( s ) = ---- ---------
1 1
Capacitor V ( t ) = ---- ∫ I ( t ) dt Z = ------
C C s sC
d
Inductor V ( t ) = L ----- I ( t ) V ( s ) = LsI ( s ) Z = Ls
dt
Figure 17.13 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.
L
t=0sec
Vi +
+ R Vo
- C
-
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.
Given, x ( s )- 1
---------- = -------------------------------------
-
F( s) 2
Ms + K d s + K s
A
F ( s ) = ---
s
Therefore,
x( s)
x ( s ) = ----------- F ( s ) = -------------------------------------
1 - A---
F ( s ) Ms + K d s + Ks s
2
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 trans-
form tables. It is often necessary to simplify the output function before it can be converted
back to the time domain. Partial fraction methods allow the functions to be broken into
numerical methods - 17.13
smaller, simpler components. The previous example in Figure 17.15 is continued in Figure
17.16 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.
1 1 A B C
x ( s ) = --------------------------------- = ------------------------------------ = --- + ----------- + -----------
2
( s + 3s + 2 )s ( s + 1 ) ( s + 2 )s s s+1 s+2
A = lim s ------------------------------------
1 1
= ---
s→0 ( s + 1 ) ( s + 2 )s 2
B = lim ( s + 1 ) ------------------------------------
1
= –1
s → –1 ( s + 1 ) ( s + 2 )s
C = lim ( s + 2 ) ------------------------------------
1 1
= ---
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 + 3s + 2 )s s s + 1 s +2
After simplification with partial fraction expansion, the output function is easily
numerical methods - 17.14
–1 –1 0.5 – 1 - ----------
0.5-
x(t) = L [ x( s)] = L ------- + ---------- +
s s+1 s+2
–1 0.5 –1 - – 1 0.5
x(t) = L ------- + L –1 ---------- + 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
The flowchart in Figure 17.18 shows the general procedure for converting a func-
tion from the s-domain to a function of time. In some cases the function is simple enough
to immediately use a transfer function table. Otherwise, partial fraction expansion is nor-
mally used to reduce the complexity of the function.
numerical methods - 17.15
is the
function in
simplify the
yes the transform
function
tables?
no
can the
function be
simplified? yes
no
Done
Figure 17.18 The methodology for doing an inverse transform of an output function
Figure 17.19 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 polyno-
mial to multiplied roots. Calculators or computers are normally used when the order of the
polynomial is greater than second order. This results in a number of terms with unknown
resides that can be found using a limit or algebra based technique.
numerical methods - 17.16
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.20 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.
numerical methods - 17.17
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 denominator 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 partial fractions.
– 12s – 6- –---------------------
12s – 6- A B
x ( s ) = 5s + 3 + ---------------------
2
solve
2
= ------------- + -------------
s +4 s +4 s + 2j s – 2j
Figure 17.20 Partial fractions when the numerator is larger than the denominator
1 - A B C
x ( s ) = --------------------
2
= ---2- + --- + -----------
s (s + 1) s s s+1
C = lim ( s + 1 ) --------------------
1 -
= 1
s → –1 2
s (s + 1)
A = lim s --------------------
2 1 - 1
= lim ----------- = 1
s→0 2 s→0 s + 1
s (s + 1)
Figure 17.22 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.
5
F ( s ) = -----------------------3-
2
s (s + 1)
5 - A B C D E
----------------------- = ----2 + --- + ------------------3- + ------------------2- + ----------------
2 3 s (s + 1) (s + 1) (s + 1)
s (s + 1) s
Algebra techniques are a reasonable alternative for finding partial fraction resi-
dues. The example in Figure 17.23 extends the example begun in Figure 17.22. The equiv-
alent forms are simplified algebraically, until the point where an inverse matrix solution is
used to find the residues.
numerical methods - 17.19
5 -
----------------------- A B C D E
= ----2 + --- + ------------------3- + ------------------2- + ----------------
2 3 s (s + 1) (s + 1) ( s + 1)
s (s + 1) s
3 3 2 2 2 2
A ( s + 1 ) + Bs ( s + 1 ) + Cs + Ds ( s + 1 ) + Es ( s + 1 ) -
= -----------------------------------------------------------------------------------------------------------------------------------------
3
2
s (s + 1)
4 3 2
s ( B + E ) + s ( A + 3B + D + 2E ) + s ( 3A + 3B + C + D + E ) + s ( 3A + B ) + ( A )-
= --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
3
2
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- + ----------------
2 3 s (s + 1) (s + 1) ( s + 1)
s (s + 1) s
For contrast, the example in Figure 17.23 is redone in Figure 17.24 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.
numerical methods - 17.20
5 -
----------------------- A B C D E
= ---2- + --- + ------------------3- + ------------------2- + ----------------
2 3 s (s + 1) (s + 1) ( s + 1)
s (s + 1) s
5( –3 )
B = lim ----- -----------------------3- s = lim ----- ------------------3-
d 5 2 d 5
= lim ------------------4- = – 15
s→0 ds 2 s→0 ds (s + 1) s → 0 (s + 1)
s (s + 1)
E = lim ----- ----- -----------------------3- ( s + 1 ) = lim ----- ----- ----2 = lim ----- -----4- = 15
1 d2 5 3 1 d25 1 30
s → –1 2! ds 2 s → –1 2! ds s → –1 2!
s (s + 1) s s
5 - 5 – 15 5 10 15
----------------------- = ---2- + --------- + ------------------3- + ------------------2- + ----------------
2 3 s (s + 1) (s + 1) (s + 1)
s (s + 1) s
An inductive proof for the limit method of solving partial fractions is shown in
Figure 17.25.
5 - A B C D E
----------------------- = ---2- + --- + ------------------3- + ------------------2- + ----------------
2 3 s (s + 1) (s + 1) (s + 1)
s (s + 1) s
5 A B C D E
lim -----------------------3- = ---2- + --- + ------------------3- + ------------------2- + ----------------
s → –1 2 s (s + 1) (s + 1) (s + 1)
s (s + 1) s
2 ( 5 )-
–------------- 2 ( s + 1 ) 3 3 ( s + 1 ) 2 ( s + 1 ) 3 3 ( s + 1 ) 2
lim = A– ---------------------
- + ---------------------
- - + ---------------------- + D + 2E ( s + 1 )
+ B – ------------------
s → –1 s
3
s
3
s
2
s
2 s
2 ( 5 )-
–-------------
3
= D = 10
( –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).
2 5 ( )
3
( )
3
d A s + 1 B s + 1
- + ----------------------- + C + D ( s + 1 ) + E ( s + 1 )2
lim ----- ----2 = ----------------------
s → – 1 dt s s
2 s
d – 2 ( 5 -)
lim ----- ------------- = A ( … ) + B ( … ) + D + 2E ( s + 1 )
s → – 1 dt s 3
–3 ( –2 ( 5 ) )
lim -------------------------
4
= A ( … ) + B ( … ) + 2E
s → –1 s
3 ( –2 ( 5 ) )
–-------------------------
4
= A ( 0 ) + B ( 0 ) + 2E E = 15
( –1 )
Figure 17.25 A proof of the need for differentiation for repeated roots
17.6 EXAMPLES
Given,
1-
----
x(s) M
∴----------- = ---------------------------------
F( s) 2 K K
s + -----d- 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)
x ( s ) = F ( s ) ----------- = ---------------
5s - -----------------------------
-
1
F ( s ) 2 2 2
s + 6 s + 0.5s + 2
5s
∴x ( s ) = ---------------------------------------------------------
2 2
-
( s + 36 ) ( s + 0.5s + 2 )
A B C D
∴x ( s ) = ------------- + ------------- + ------------------------------------- + -------------------------------------
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.
numerical methods - 17.23
( s + 6j ) ( 5s )
------------------------------------------------------------------------ – 30j
- = ----------------------------------------------
-
A = lim
s → – 6j ( s – 6j ) ( s + 6j ) ( s + 0.5s + 2 )
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
73.2 × 10 ∠3.05 73.2 × 10 ∠– 3.05
∴x ( s ) = ------------------------------------------- + ---------------------------------------------- + …
s + 6j s – 6j
17.6.2 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 con-
verted to the s-domain and written in the equation. The resulting output function is manip-
ulated into partial fraction form and the residues calculated. An inverse Laplace transform
is used to convert the equation into a function of time using the tables.
numerical methods - 17.24
3
R = 10 Ω
t=0
V s = 3 cos t +
+ Vo
- C = 10 F
–3
-
As normal, relate the source voltage to the output voltage using component values in
the s-domain.
ZC 1
V o = Vs -------------------
3s
V s ( s ) = -------------
2
- ZR = R Z C = ------
sC
ZR + ZC s +1
Next, equations are combined. The numerator of resulting output function must be
reduced by long division.
----- 1-
3s sC 3s 3s
- ---------------- = -------------------------------------------
V o = ------------- - = ------------------------------------------------------- -
s + 1 R + ----- 1-
2 2 2 3 –3
( s + 1 ) ( 1 + sRC ) ( s + 1 ) ( s10 10 + 1 )
sC
The output function can be converted to a partial fraction form and the residues calcu-
lated.
2 2
3s As + B- ---------- C- As + As + Bs + B + Cs + C-
V o = -----------------------------------
2
= ---------------
2
+ = ---------------------------------------------------------------------
2
(s + 1 )(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
1.5s + 1.5- ---------- – 1.5-
V o = -----------------------
2
+
s +1 s+1
The output function can be converted to a function of time using the transform tables,
as shown below.
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 ---------------------------------
2
= lim -------------------------
2 2
s → 0 ( s + 3s + 2 )s s → 0 s + 3s + 2 (0 ) + 3(0) + 2 2
1(s) 1 1-
∴x ( t → 0 ) = lim --------------------------------- = -------------------------------------------
- = --- = 0
2
s → ∞ ( s + 3s + 2 )s 2
( ( ∞ ) + 3( ∞) + 2 ) ∞
The following map is to be used to generally identify the use of the various topics
covered in the course.
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
1. Convert the following functions from time to laplace functions using the tables.
·· · ·
a) L[5] o) L [ x + 5x + 3x ], x ( 0 ) = 8, x ( 0 ) = 7
– 3t
b) L[ e ] p) d
L ----- sin ( 6t )
dt
– 3t d 32
L [ 5e ] L ----- t
c) q)
dt
– 3t
d) L [ 5te ] t
r) L ∫0 y dt
e) L [ 5t ] 3 – 5t
s) L [ 3t ( t – 1 ) + e ]
2
f) L [ 4t ] t) L[u( t – 1) – u(t – 2)]
g) L [ cos ( 5t ) ] – 2t
u) L[e u( t – 2) ]
–( t + 1)
h) L[ 3( t – 1 ) + e ] –( t – 3 )
v) L[e u( t – 1) ]
– 3t
i) L [ 5e cos ( 5t ) ] – 3t
w) L [ 5e + u(t – 1) – u(t – 2)]
– 3t
j) 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 ) ]
2
m) L [ t sin ( 2t ) ]
aa)
n) d 2 – 3t
L ----- t e
dt
numerical methods - 17.29
2. Convert the following functions below from the laplace to time domains using the tables.
–1 1- –1 5--- – 4.5s
a) L ----------
s+1
g) L (1 – e )
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 -
2 4
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 -
-------------
f) L 2
s +6
3. 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
s + 5s + 4s + 6
2
–1 –1 9s + 4-
b) L [ ] h) L ------------------
3
(s + 3)
–1 –1 9s + 4 -
c) L [ ] i) L -----------------------
3 3
s (s + 3)
2
–1 –1 s-------------------------
+ 2s + 1-
d) L [ ] j) L 2
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 2
3 2
s + 5s + 4s + 6 s + 2s + 1
4. Convert the output function below Y(s) to the time domain Y(t) using the tables.
5 12 - ---------------------
3 - ----------------------
3 -
Y ( s ) = --- + ------------- + +
s s 2 + 4 s + 2 – 3j s + 2 + 3j
numerical methods - 17.30
6. 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)
7. 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
d 3 y0 = 1 y 0' = 2
L ----- y + 2 ----- y + y =
c) d where at t=0
dt dt
y 0'' = 3 y 0''' = 4
d) –1 1 + j - ---------------------
1–j -
L ---------------------- + =
s + 3 + 4j s + 3 – 4j
–1 1 3
e) L s + ----------- + ----------------------------
2
- =
s + 2 s + 4s + 40
10. Solve the differential equation using Laplace transforms. Assume the system starts unde-
flected and at rest.
··· ·· ·
θ + 40θ + 20θ + 2θ = 4
numerical methods - 17.31
1.
5--- 0.5- ----------
0.5-
a) l) ---------- –
s s–3 s+3
2 2
–4 16s - 12s – 16
1- m) --------------------- + -------------------- = ----------------------3-
b) ---------- 2 2 2 3 2
s+3 (s + 4) (s + 4) (s + 4)
5- n) 2s -
c) ---------- ------------------
3
s+3 (s + 3)
5 -
------------------ o) 2
( s x – 7s – 8 ) + 5 ( sx – 7 ) + 3x
d) 2
(s + 3)
6s
5 p) -----------------
e) ---- 2
2 s + 36
s
f) 8
---- q) 2
3
s
s r) y--
g) -----------------
2 s
s + 25
------ – 18
72 1 -
–1 s) ------ + ----------
h) 5 4 s+5
---- – 3--- + ----------
3 e - s s
2 s s+1
s –s – 2s
5(s + 3) t) e------- e---------
i) ------------------------------ –
2 2 s s
(s + 3) + 5
4 – 2s
j) 2.5 ∠1 - ----------------------
2.5 ∠– 1 - u) e
-------------
--------------------- +
s + 3 – 5j s + 3 + 5j s+2
s( ) + e -
2–s
= ----------------------------
2
- v) ----------
s + 6s + 34 s+1
–s – 2s
5 -
---------------- 5 - e------- e---------
k) w) ---------- + –
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
numerical methods - 17.32
2.
–t
a) e
g) 5 – 5u ( t – 4.5 )
–t
b) 5e
cos 2t + atan – ---
– ( 1 )t 3
h) 2 ( 5 )e
4
c) 6t 3
i) t + 2 sin ( 3t )
2
d) 3t
j) – 2t – 3t
6e – 6e
– 3t – 4t
e) – e + 2e
– 2t – 3t
k) 1.5e – 1.5e
f) 6 sin ( 6t )
3.
– 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
4.
– 2t
y ( t ) = 5 + 6 sin ( 2t ) + 2 ( 3 )e cos ( 3t – 0 )
5.
--x- = ----------------------------
5
a) -
F 2
5s + 6s + 2
y-- 3
b) = -----------
x s+8
y-- –5
c) = -----------
x s–1
numerical methods - 17.33
6.
– 2t
y ( t ) = 40 – 40e
7.
5--- 5--- – 3t 5--- – 4t
a) + e – e
6 3 2
– 2t
b) ( 5δ ( t ) + 30 – 5e )N
8.
a)
L [ 5e
–4 t
cos ( 3t + 2 ) ] = L [ 2 A e
– αt
cos ( βt + θ ) ] α = 4 β = 3
A = 2.5 θ = 2
A = 2.5 cos 2 + 2.5j sin 2 = – 1.040 + 2.273j
complex conjugate
A A – 1.040 + 2.273j – 1.040 – 2.273j
----------------------- + -------------------------------------- = --------------------------------------- + ---------------------------------------
s + α – βj s + α + βj s + 4 – 3j s + 4 + 3j
b)
– 2t – 2t
L[e + 5t ( u ( t – 2 ) – u ( t ) ) ] = L [ e ] + L [ 5tu ( t – 2 ) ] – L [ 5tu ( t ) ]
1 5 1 5
= ----------- + 5L [ tu ( t – 2 ) ] – ----2 = ----------- + 5L [ ( t – 2 )u ( t – 2 ) + 2u ( t – 2 ) ] – ----2
s+2 s s+2 s
1 5
= ----------- + 5L [ ( t – 2 )u ( t – 2 ) ] + 10L [ u ( t – 2 ) ] – ---2-
s+2 s
1 – 2s – 2s 5
= ----------- + 5e L [ t ] + 10e L [ 1 ] – ----2
s+2 s
– 2s – 2s
1 5e 10e 5
= ----------- + ------------
2
+ --------------- – ----2
s+2 s s s
c) 3
----
d 3 2 1
- y = s y + 1s + 2s + 3s
0
dt
----
d- 1 0
dt y
= s y+s 1
d 3
L ----- y + 2 ----- y + y = ( s y + 1s + 2s + 3 ) + ( sy + 1 ) + ( y )
d 3 2
dt dt
3 2
= y ( s + s + 1 ) + ( s + 2s + 4 )
numerical methods - 17.34
d) complex conjugate
–1 1 + j - ---------------------
1–j - –1 A A
L ---------------------- + = L ----------------------- + --------------------------------------
s + 3 + 4j s + 3 – 4j s + α – βj s + α + βj
π
θ = atan ------ = – ---
–1
A =
2
1 + 1 = 1.141
2 α = 3 β = 4
1 4
π
cos 4t – ---
– αt – 3t
= 2Ae cos ( βt + θ ) = 2.282e
4
e) –1 1 3 1-
- = L [ s ] + L ---------- 3
L s + ----------- + ----------------------------
2
+ L ----------------------------
2
-
s + 2 s + 4s + 40 s+2 s + 4s + 40
d – 2t 3 d- – 2t 6
= ----- δ ( t ) + e + L ------------------------------
2
- = ---- δ ( t ) + e + 0.5L ------------------------------
2
-
dt ( s + 2 ) + 36 dt ( s + 2 ) + 36
d – 2t – 2t
= ----- δ ( t ) + e + 0.5e sin ( 6t )
dt
9.
a) 3 2 1
s + 4s + 4s + 4
---------------------------------------- 3 3 2
3
s + 4s s + 4s s + 4s + 4s + 4
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 + 4s s s +4 2 3
s + 4s C = 0
B = 3
1 3s -
= 1 + --- + -------------
s s2 + 4
= δ ( t ) + 1 + 3 cos ( 2t )
numerical methods - 17.35
b) 2
s +4
------------------------------------------------------------------ A - ----------
- = ---------- B - ----------
C - ----------
D-
4 3 2
+ + +
s + 10s + 35s + 50s + 24 s+1 s+2 s+3 s+4
2
A = lim -------------------------------------------------- = ---
s +4 5
s → –1 ( s + 2 ) ( s + 3 ) ( s + 4 ) 6
2
B = lim -------------------------------------------------- = ------
s +4 8
s → –2 ( s + 1 ) ( s + 3 ) ( s + 4 ) –2
2
C = lim -------------------------------------------------- = ------
s +4 13
s → –3 ( s + 1 ) ( s + 2 ) ( s + 4 ) 2
2
D = lim -------------------------------------------------- = ------
s +4 20
s → –4 ( s + 1 ) ( s + 2 ) ( s + 3 ) –6
5--- –t – 2t 13 – 3t 10 – 4t
e – 4e + ------ e – ------ e
6 2 3
10.
– 6 – 39.50t 0.1383t – 0.3368t
θ ( t ) = – 66 ⋅ 10 e – 3.216e + 1.216e + 2.00
a) L f ---
t
= aF ( as ) d) lim f ( t ) = lim sF ( s )
a t→∞ s→0
d
c) L[ e
– at
f(t )] = F(s + a) f) L [ tf ( t ) ] = – ----- F ( s )
dt
numerical methods - 17.36
2. 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
F
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.
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 sketch the bode plots.
d) Convert the differential equation to the Laplace domain, including initial condi-
tions. Solve to find the time response.
4. 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 -
2
F = 5 sin ( 62.82t )
F ( D + 200π )
D ( D + 2π )-
--x- = ----------------------------- F = 5 sin ( 62.82t )
F 2
( D + 200π )
numerical methods - 17.37
2
D ( D + 2π )-
--x- = ----------------------------- F = 5 sin ( 62.82t )
F 2
( D + 200π )
17.13 REFERENCES
Irwin, J.D., and Graf, E.R., Industrial Noise and Vibration Control, Prentice Hall Publishers,
1979.
Close, C.M. and Frederick, D.K., “Modeling and Analysis of Dynamic Systems, second edition,
John Wiley and Sons, Inc., 1995.
linear feedback controller analysis - 18.1
Topics:
Objectives:
18.1 INTRODUCTION
• Control systems use some output state of a system and a desired state to make
control decisions.
• Consider the system below, and how it is enhanced by the addition of a control
system.
linear feedback controller analysis - 18.2
Control variable
INPUT OUTPUT
(e.g. θgas) SYSTEM
(e.g. velocity)
(e.g. a car)
The control system is in the box and could be a driver or a cruise control
(this type is known as a feedback 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.
• Some of the things we do naturally (like the rules above) can be done with math-
ematics
• The basic equation for a PID controller is shown below. This function will try to
compensate for error in a controlled system (the difference between desired and actual
output values).
u = K c e + K i ∫ edt + K d ------
de
dt
• The figure below shows a basic PID controller in block diagram form.
Kp ( e )
V V
+ +V
integral
+ e u
Ki ( ∫ e ) amp motor
+
- derivative + -V
K d ----- e
d
dt
e.g.
dv error
θ gas = K c v error + K i ∫ v error dt + K d ----------------
dt
Rule 4
Rules 2 & 3
(Immediate error)
(general difference)
Rule 1
(Long term error)
Kc
Ki Relative weights of components
Kd
Proportional
Integral
Derivative
For a PI Controller
θ gas = K c v error + K i ∫ v error dt
For a P Controller
θ gas = K c v error
For a PD Controller
dv error
θ gas = K c v error + K d ----------------
dt
dv error
θ gas = K c v error + K i ∫ v error dt + K d ----------------
dt
θ gas
- = K c + K i ∫ dt + K d ----
d-
------------
v error dt
d- dx
---- →s ------ → sx
dt dt
1 x
∫ dt = ---
s ∫ xdt = --
s
2
d x dv
F = Ma = M -------2- = M ------
dt dt
F d-
--- = M ----
v dt
v 1
L --- = ------- Transfer function for acceleration of car mass
F Ms
θgas F 1- vactual
10 ------
Ms
5. Finally, knowing the error is verror, and we can control θgas (the control variable),
we can select a control system.
verror θgas
Controller
• Even though the transfer function uses the Laplace ‘s’, it is still a ratio of input to
output.
vdesired
100 step
vdesired(t) = 100 for t >= 0 sec
ramp
vdesired(t) = 50t for t >= 0 sec
t(sec)
0
A
RAMP f ( t ) = Atu ( t ) f ( s ) = ----2
s
2
Aω
SINUSOID f ( t ) = A sin ( ωt )u ( t ) f ( s ) = -----------------
2 2
s +ω
PULSE f ( t ) = A ( u ( t ) – u ( t – t1 ) ) f( s) =
etc......
linear feedback controller analysis - 18.9
Therefore to continue the car example, lets assume the input below,
100
v desired ( s ) = L [ v desired ( t ) ] = ---------
s
Next, lets use the input, and transfer function to find the output of the system.
v actual
v actual = ----------------- v desired
v desired
2
s ( K d ) + s ( K c ) + K i 100
v actual = ------------------------------------------------------------- ---------
s 2 -----
M s
10- + K d + s ( K c ) + K i
At this point we have the output function, but not in terms of time yet. To do this
we break up the function into partial fractions, and then find inverse Laplace
transforms for each.
2
2
s + s + 0.1
v actual = 10 -------------------------------------------------
-
s ( s ( 1.01 ) + s + 0.1 )
2
2
– 1 ± 1 – 4 ( 1.01 ) ( 0.1 )
∴x = ------------------------------------------------------------ = – 0.113, – 0.877
2 ( 1.01 )
2 2
v actual = ---------- ----------------------------------------------------
10 s + s + 0.1
1.01 s ( s + 0.113 )s + 0.877
A B C
v actual = --- + ---------------------- + ----------------------
s s + 0.114 s + 0.795
linear feedback controller analysis - 18.11
2 2 2
A = lim s ---------- --------------------------------------------------------- = ---------- -------------------------------------
10 s + s + 0.1 10 0.1
s→0 1.01 s ( s + 0.113 ) ( s + 0.877 ) 1.01 ( 0.113 ) ( 0.877 )
∴A = 99.9
2 2
B = lim ---------
10 - --------------------------------------------------------
s + s + 0.1 - ( s + 0.113 )
s → – 0.113 1.01 s ( s + 0.113 ) ( s + 0.877 )
2 2
10 ( – 0.113 ) + ( – 0.113 ) + 0.1
∴B = ---------- ----------------------------------------------------------------- = 0.264
1.01 ( – 0.113 ) ( – 0.113 + 0.877 )
2 2
C = lim ---------
10 s + s + 0.1 - ( s + 0.877 )
- --------------------------------------------------------
s → – 0.877 1.01 s ( s + 0.113 ) ( s + 0.877 )
2 2
10 ( – 0.877 ) + ( – 0.877 ) + 0.1
∴C = ---------- ----------------------------------------------------------------- = – 1.16
1.01 ( – 0.877 ) ( – 0.877 + 0.113 )
f(t ) f(s )
A
---
A
s
A
At ----
2
s
– αt A -
Ae -----------
s+α
Aω
A sin ( ωt ) -----------------
2 2
s +ω
2
– ξω n t 2 ωn 1 – ξ for ( ξ < 1 )
e sin ( ω n t 1 – ξ ) ---------------------------------------
2
-
2
s + 2ξω n s + ω n
etc.
To finish the problem, we simply convert each term of the partial fraction back to
the time domain.
– 0.113t – 0.877t
v actual = 99.9 + 0.264e – 1.16e
linear feedback controller analysis - 18.13
Proportional (P) Gc = K
G c = K 1 + -----
1
Proportional-Integral (PI) τs
Proportional-Derivative (PD) G c = K ( 1 + τs )
G c = K 1 + ----- + τs
1
Proportional-Integral-Derivative (PID)
τs
1 + ατs
G c = K ------------------ α>1
1 + τs
Lead
1 + τs
G c = K ------------------ α>1
Lag 1 + ατs
1 + τ 1 s 1 + ατ 2 s α>1
G c = K --------------------- ---------------------
Lead-Lag 1 + ατ 1 s 1 + τ 2 s τ1 > τ2
• Consider the basic transform tables. A superficial examination will show that the
denominator (bottom terms) are the main factor in determining the final form of the solu-
tion. To explore this further, consider that the roots of the denominator directly impact the
partial fraction expansion and the following inverse Laplace transfer.
• Root locus plots allow us to determine instabilities (poles on the right hand side
of the plane), overdamped systems (negative real roots) and oscillations (complex roots).
linear feedback controller analysis - 18.14
• Note: this procedure can take some time to do, but the results are very important
when designing a control system.
+ 1---
K
s
-
K H(s) = 1
G ( s ) = ----
s
First, we must develop a transfer function for the entire control system.
K ----
G ( s ) s K
G S ( s ) = --------------------------------- = --------------------------- = ------------
1 + G ( s )H ( s ) s+K
1 + ---- ( 1 )
K
s
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.
s+K = 0 K root
jω
0
1 K→∞ K = 0 σ
2
3
etc..
Note: because all of the roots for all values of K are real negative this system will
always be stable, and it will always tend to have a damped response. The large the
value of K, the more stable the system becomes.
• Consider the previous example, the transfer function for the whole system was
found, but then only the denominator was used to determine stability. So in general we do
not need to find the transfer function for the whole system.
linear feedback controller analysis - 18.16
The transfer function values will often be supplied in a pole zero form.
K ( s + z0 ) ( s + z1 )… ( s + z m )
G ( s )H ( s ) = ------------------------------------------------------------------
-
( s + p 0 ) ( s + p 1 )… ( s + p n )
First, find the characteristic equation,. and an equation for the roots,
1 + -------------------------
- ( 1 ) = 0
K
2
s + 3s + 2
2
s + 3s + 2 + K = 0
– 3 ± 9 – 4(2 + K) 1 – 4K
roots = ------------------------------------------------ = – 1.5 ± --------------------
2 2
Next, find values for the roots and plot the values,
K root
jω
0 0
1 -1 σ
2 -2
3 -3
1. write the characteristic equation. This includes writing the poles and zeros of the
linear feedback controller analysis - 18.18
equation.
( s + z 1 ) ( s + z 2 )… ( s + z m )
1 + G ( s )H ( s ) = 1 + K ---------------------------------------------------------------- = 0
( s + p1 ) ( s + p 2 )… ( s + pn )
2. count the number of poles and zeros. The difference (n-m) will indicate how
many root loci lines end at infinity (used later).
3. plot the root loci that lie on the real axis. Points will be on a root locus line if
they have an odd number of poles and zeros to the right. Draw these lines in.
4. determine the asymptotes for the loci that go to infinity using the formula below.
Next, determine where the asymptotes intersect the real axis using the second
formula. Finally, draw the asymptotes on the graph.
± 180° ( 2k + 1 )
β ( k ) = ----------------------------------- k ∈ [ 0, n – m – 1 ]
n–m
( p1 + p2 + … + pn ) ( z 1 + z2 + … + z m )
σ = --------------------------------------------------------------------------------------------
n–m
5. the breakaway and breakin points are found next. Breakaway points exist
between two poles on the real axis. Breakin points exist between zeros. to cal-
culate these the following polynomial must be solved. The resulting roots are
the breakin/breakout points.
A = ( s + p 1 ) ( s + p 2 )… ( s + p n ) B = ( s + z 1 ) ( s + z 2 )… ( s + z m )
----
d-
A B – A ----- B = 0
d
ds ds
6. Find the points where the loci lines intersect the imaginary axis. To do this sub-
stitute the phasor for the laplace variable, and solve for the frequencies. Plot the
asymptotic curves to pass through the imaginary axis at this point.
( jω + z 1 ) ( jω + z 2 )… ( jω + z m )
1 + K --------------------------------------------------------------------------- = 0
( jω + p 1 ) ( jω + p2 )… ( jω + p n )
1 + G ( s )H ( s ) = 1 + -------------------------
- ( 1 ) = 1 + K --------------------------------
K 1 -
2 ( s + 1 ) (s + 2)
s + 3s + 2
Step 2: (find loci ending at infinity)
σ
-2 -1
d- d-
---- A = 0 ---- B = 2s + 3
ds ds
σ
A ----- B – B ----- A = 0
d d
ds ds -2 -1
2
1 ( 2s + 3 ) – ( s + 3s + 2 ) ( 0 ) = 0 -1.5
2s + 3 = 0
s = – 1.5
Note: because the loci do not intersect the imaginary axis, we know the system will be
stable, so step 6 is not necessary, but we it will be done for illustrative purposes.
1 + G ( s )H ( s ) = 0
1
1 + K -------------------------
2
- = 0
s + 3s + 2
2
s + 3s + 2 + K = 0
2
( jω ) + 3 ( jω ) + 2 + K = 0
2
– ω + 3jω + 2 + K = 0
2
ω + ω ( – 3j ) + ( – 2 – K ) = 0
2
3j ± ( – 3j ) – 4 ( – 2 – K ) 3j ± – 9 + 8 + 4K 3j ± 4K – 1
ω = -------------------------------------------------------------- = ---------------------------------------------- = -------------------------------
2 2 2
In this case the frequency has an imaginary value. This means that there will be no
frequency that will intercept the imaginary axis.
K( s + 5 )
G ( s )H ( s ) = ---------------------------------
2
s ( s + 4s + 8 )
18.5 SUMMARY
•
linear feedback controller analysis - 18.22
3. Given the transfer function below, and the input ‘x(s)’, find the output ‘y(t)’ as a function of
time.
( s )-
y--------- 5
= ----------- x( t) = 5 t ≥ 0 sec
x( s) s+2
8. Draw a detailed root locus diagram for the transfer function below. Be careful to specify angles
of departure, ranges for breakout/breakin points, and gains and frequency at stability limits.
2
2K ( s + 0.5 ) ( s + 2s + 2 )-
G ( s ) = -----------------------------------------------------------
3
s (s + 1)(s + 2)
10. Draw the root locus diagram for the transfer function below,
2
K(s + 4)-
G ( s ) = ----------------------
2
s (s + 1)
11. Draw the root locus diagram for the transfer function below,
K(s + 1)(s + 2)
G ( s ) = -------------------------------------
3
s
12. The block diagram below is for a motor position control system. The system has a propor-
tional controller with a variable gain K.
θd Vd + Ve Vs ω θa
2 K 100- 1---
----------
s+2 s
-
Va
ans. 200K
-----------------------------------
-
2
s + 2s + 200K
b) Draw the Root-Locus diagram for the system (as K varies). Use either the
approximate or exact techniques.
linear feedback controller analysis - 18.23
ans. – 2 ± 4 – 4 ( 200K )
roots = ------------------------------------------------ = – 1 ± 1 – 200K
2
Im
K r
o
o K=0.005
ts
Re
0 -2 -1
0
0
c) Select a K value that will result in an overall damping coefficient of 1. State if the Root-Locus
diagram shows that the system is stable for the chosen K.
(ans. 2
s + 2s + 200K = s + 2ζωn s + ω n
2 2 ∴ω n = 1 ∴K = 0.005
13. Draw a Bode Plot for either one of the two transfer functions below.
( s + 1 ) ( s + 1000 -) 5-
----------------------------------------- OR ---
2 2
( s + 100 ) s
17. The equation below describes a dynamic system. The input is ‘F’ and the output is ‘V’. It has
the initial values specified. The following questions ask you to find the system response to a
linear feedback controller analysis - 18.24
18. 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 s ----------
s s+9
-
4 2
s ( 3K d ) + s ( 3K p ) + ( 3K i )
--Y- = ------------------------------------------------------------------------------------
-
X 2
s ( 4 + 3K d ) + s ( 36 + 3K p ) + ( 3K i )
a) Verify the close loop controller function given.
b) Draw a root locus plot for the controller if Kp=1 and Ki=1. Identify any values
of Kd that would leave the system unstable.
c) Draw a Bode plot for the feedback system if Kd=Kp=Ki=1.
d) Select controller values that will result in a natural frequency of 2 rad/sec and
damping coefficient of 0.5. Verify that the controller will be stable.
e) For the parameters found in the last step find the initial and final values.
f) If the values of Kd=1 and Ki=Kd=0, find the response to a ramp input as a func-
tion of time.
19. The following system is a feedback controller for an elevator. It uses a desired heigh ‘d’ pro-
vided by a user, and the actual height of the elevator ‘h’. The difference between these two is
called the error ‘e’. The PID controller will examine the value ‘e’ and then control the speed of
the lift motor with a control voltage ‘c’. The elevator and controller are described with transfer
functions, as shown below. all of these equations can be combined into a single system transfer
linear feedback controller analysis - 18.25
equation as shown.
e = d–h error
Ki 2 h--- 10 - elevator
c-- 2s + 1 + s PID controller = ------------
= K p + ----- + K d s = -------------------------- c 2
s +s
e s s
combine the transfer functions
2 2
c-- h--- = h--- = -------------------------
2s + 1 + s - ------------ 10 - (s + 1) 10 10 ( s + 1 )
= ------------------- ------------------- = ----------------------
e c e s 2 s s(s + 1 ) 2
s +s s
h - 10 ( s + 1 ) eliminate ‘e’
----------- = ----------------------
d–h 2
s
( 1 )
h = ----------------------
10 s +
(d – h)
2
s
10 ( s + 1 ) 10 ( s + 1 )
h 1 + ---------------------- = ---------------------- (d)
2 2
s s
10 ( s + 1 )
----------------------
2
= -------------------------------- = -------------------------------
h--- s 10s + 10 - system transfer function
d 10 ( s + 1 ) 2
1 + ---------------------- s + 10s + 10
2
s
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) Write find the damping coefficient and natural frequency of the results in part
a).
c) verify the solution using the initial and final value theorems.
linear feedback controller analysis - 18.26
(ans. a) h 10s + 10 - 20
--- = ------------------------------- d ( t ) = 20u ( t ) d ( s ) = ------
d 2 s
s + 10s + 10
h = -------------------------------
10s + 10 - 20 ------ = A B
--- + -------------------------------- C
- + --------------------------------
-
2
s + 10s + 10 s s s + 5 – 3.873j s + 5 + 3.873j
A = lim -------------------------------
200s + 200 -
= 20
s → 0 s + 10s + 10
2
B = lim ----------------------------------------
200s + 200 -
= – 2.5 – 22.6j
s → – 5 + 3.873j s ( s + 5 + 3.873j )
C = – 2.5 + 22.6j
2 2
–1 – 2.5 – 22.6j- --------------------------------
– 2.5 + 22.6j- A = 2.5 + 22.6 = 22.73
h ( t ) = 20 + L -------------------------------- +
s + 5 – 3.873j s + 5 + 3.873j
θ = 4.602
α = 5
β = 3.873
– 5t
h ( t ) = 20 + 2 ( 22.73 )e cos ( 3.873t + 4.602 )
5
b) –5 = – ωn ζ ζ = ------
ωn
2 25
3.873 = 1 – ζ ωn = 1 – -----2- ω n
ωn
25 2 2 ωn = 35 = 5.916
15 = 1 – -----2- ω n = ω n – 25
ω n
5
ζ = ---------- = 0.845
35
c)
h ( 0 ) = lim s -------------------------------
10s + 10 - 20 ------ = lim 10s
-------- 20 = 0
s → ∞ s 2 + 10s + 10 s s → ∞ s2
------ = (----------------
10 )20-
h ( ∞ ) = lim s -------------------------------
10s + 10 - 20
= 20
s→0 2 s 10
s + 10s + 10
linear feedback controller analysis - 18.27
1. a) The block diagram below is for an angular positioning system. The setpoint is a desired
angle, which is converted 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
θd Vd e Ki Vs 100 - ω θa
1- K p + ----- + sK d --------------- 1---
--------- s s + 0.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 coefficient of 0.125 and a natural frequency of 10rad/s.
(Hint: eliminate Ki).
2
θa s ( 400K d ) + s ( 400K p ) + ( 400K i )
----- = ----------------------------------------------------------------------------------------------------------
θd 3 2
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.
θa s ( 0.9 ) + ( 4 ) -
----- = -----------------------------------
θd 2
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).
θa s ( 0.9 ) + ( 4 )
----- = ------------------------------------
θd 2
s + 2.5s + 100
linear feedback controller analysis - 18.28
e) The function below has a step input of magnitude 1. Find the output as a function of time using
Laplace transforms.
θ s ( 0.9 ) + ( 4 ) -
----a- = -----------------------------------
θd 2
s + 2.5s + 100
f) Given the transfer function below; a) apply a phasor/Fourier transform and express the gain and
phase angle as a function of frequency, b) calculate a set of values and present them in a table,
c) use the values calculated in step b) to develop a frequency response plot on semi-log paper,
d) draw a straight line approximation of the Bode plot on semi-log paper.
θa ( 0.9 ) + ( 4 )-
----- = s----------------------------
θd 2
s +s+4
2. 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 1
desired transfer function ----- = -----------
θd s+2
convolution - 19.1
19. CONVOLUTION
Topics:
Objectives:
19.1 INTRODUCTION
• It is most useful for finding an output response for a system given an arbitrary
input function
• It is also the basis for other methods that come later for system analysis.
Area = ε --- = 1
1 1---
ε ε t
ε
Dirac delta function
δ ( t ) = lim P ( t ) This function is theoretically
ε→0
undefined, it goes to infinity
∞
for an instant, but it does
Area = ∫–∞ δ ( t ) dt = 1
have an area of 1.
u(t < 0) = 0
u(t ≥ 0) = 1
d-
---- u( t) = δ ( t )
dt
• If we look at an input signal (force here) we can break it into very small segments
in time. As the time becomes small we can approximate it with a set of impulses.
convolution - 19.3
F(t) ∆t → 0
An impulse
F(t) x( t)
∫ g ( t )F ( t ) dt
t t
• If we add all of the impulse responses together we will get a total system
response. This operation is called convolution.
convolution - 19.4
F( t) x(t)
sum of responses
t
∫ g ( t – τ )F ( τ ) dτ
0
t t
impulse responses
The convolution integral
t
c(t) = ∫ g ( t – τ )r ( τ ) dτ
0
Figure 19.3 A set of pulses for a system gives summed responses to give the output
• Consider the unit impulse of a system with the given differential equation. Note:
This method is only valid for trivial differential equations with only one homogeneous
term. The preferred method is shown later.
convolution - 19.5
The following first order differential equation has an input ’F’. The input can be
replaced with a unit impulse function.
·
x + 0.5x = 2F
·
X + 0.5X = 2δ ( t )
The homogeneous solution can be found.
· guess, At · At
X + 0.5X = 0 Xh = e X h = Ae
A + 0.5 = 0
– 0.5 t
X h = Ce
The particular solution is found.
· ·
X + 0.5X = 2δ ( t ) guess, Xp = A Xp = 0
0 + 0.5A = 2 ( 0 )
Xp = A = 0
The initial condition caused by the impulse function found, assuming a zero initial con-
dition.
----
1- ----
1-
dt X0 + 0.5 ( 0 ) = 2 dt
X0 = 2
The initial condition caused by the impulse function found, assuming a zero initial con-
dition.
– 0.5 t
X ( t ) = Ce
0
X ( 0 ) = 2 = Ce
– 0.5 t
X ( t ) = 2e
• Note that the derivation of the unit impulse function assumed zero initial condi-
tions, so the process of convolution must also assume systems start at rest and undeflected.
19.4 CONVOLUTION
• The following example shows the use of the convolution integral to find a num-
convolution - 19.6
ber of responses.
The unit impulse response to a step input can be calculated using the convolution inte-
gral.
t t t t
0.5τ
– 0.5 ( t – τ ) – 0.5t e
∫ X ( t – τ )F ( τ ) dτ ∫ ( 2e ∫e
– 0.5t 0.5τ
x(t) = = ) ( 1 ) dτ = 2e dτ = 2e ----------
0.5 0
0 0 0
0.5t 0.5 ( 0 )
– 0.5t e
x ( t ) = 2e ---------- e-------------- = 4e –0.5t ( e 0.5t – 1 ) = 4 ( 1 – e –0.5t )
0.5 – 0.5
The unit impulse response to a unit ramp input can be calculated using the convolution
integral.
t t t
– 0.5 ( t – τ )
∫ X ( t – τ )F ( τ ) dτ ∫ 2e ∫e
– 0.5t 0.5τ
x(t) = = τ dτ = 2e τ dτ
0 0 0
The unit impulse response to a sinusoidal input can be calculated using the convolution
integral.
t t t
– 0.5 ( t – τ )
∫ X ( t – τ )F ( τ ) dτ ∫ 2e ∫e
– 0.5t 0.5τ
x(t) = = sin ( τ ) dτ = 2e sin ( τ ) dτ
0 0 0
• The convolution integral can also be solved numerically. This is particularly use-
ful for systems with arbitrary inputs.
convolution - 19.7
n–1
x ( t ) = h ∑ X ( t – ( i + 0.5 )h )F ( ( i + 0.5 )h )
i=0
where,
t
n = --- = number of steps
h
h = step size (s)
• This can be applied to the previous example for a unit step input to find the sys-
tem position at 10 seconds, with a 2 second time step.
convolution - 19.8
n–1
– 0.5 ( t – ( i + 0.5 )h )
x ( t ) = h ∑ 2e F ( ( i + 0.5 )h )
i=0
10
n = ------ = 5
2
5–1
– 0.5 ( 10 – 2 ( i + 0.5 ) )
x ( 10 ) = 2 ∑ 2e (1)
i=0
4
x ( 10 ) = 4 ∑ e
– 4.5 + i
i=0
x ( 10 ) = 3.81208
This value can be compared to the exact value calculated below. The accuracy of the
numerical value would increase substantially if the step size were decreased.
– 0.5 ( 10 )
x ( 10 ) = 4 ( 1 – e ) = 4 ( 1 – 0.006738 ) = 3.973048
• The convolution integral can be difficult to deal with because of the time shift.
But, the Laplace transform for the convolution integral turns it into a simple multiplica-
tion.
convolution - 19.10
c(t) = ∫ g ( t – τ )r ( τ ) dτ
0
C ( s ) = G ( s )R ( s )
19.7 SUMMARY
1.
state space analysis - 20.1
Topics:
Objectives:
20.1 INTRODUCTION
X ( sI – A ) = BU + X 0
–1 –1
X = ( sI – A ) BU + ( sI – A ) X 0
Y = CX + DU
–1 –1
Y = C ( ( sI – A ) BU + ( sI – A ) X 0 ) + DU
–1 –1
Y = ( C ( sI – A ) B + D )U + C ( sI – A ) X 0
Assuming the system starts at rest,
–1
Y = ( C ( sI – A ) B + D )U
Y- –1
--- = ( C ( sI – A ) B + D ) (the transfer function)
U
y = Cz + Du C = CT D = D
•
state space analysis - 20.4
• The transfer function form can be put into a matrix form. In this case the denom-
inator is the characteristic equation.
The transfer function can be said to be equivalant to the determinants of the matrix form.
( sI – A ) – B
------------------------------------ = (---------------------------------------------
C D sI – A )D – ( – B )C-
= ( sI – A )D + BC ( sI – A )
sI – A sI – A
( sI – A ) – B
–1 C D poles
G = C ( sI – A ) B + D = ------------------------------------ = --------------
sI – A zeros
• The free (homogeneous) response of a system can be used to find the state transi-
tion matrix.
state space analysis - 20.5
The homogeneous equation can be written in the s-domain, and then converted to time.
X h = sI – A X0
–1
x h ( t ) = L [ sI – A X 0 ]
2 3
-I + A
--- + A
------ + A
–1
xh ( t ) = L ------ + … X 0
s s s2 s3
At At
xh ( t ) = e x0 e = transition matrix
= I + At + ----- A t + ----- A t + …
At 1 22 1 33
e
2! 3!
• The forced response (particular) response of the system can be found using con-
volution,
The homogeneous equation can be written in the s-domain, and then converted to time.
·
x = Ax + Bu
t
A(t – τ)
x(t) = e x( 0) + ∫ e
At
Bu ( τ ) dτ
0
y = Cx + Du
t
A(t – τ)
y ( t ) = Ce x ( 0 ) + ∫ Ce
At
Bu ( τ ) dτ + Du ( t )
0
initial impulse
response response
Given a second order differential equation, the state matrix can be found,
··
F = Mx
·
x = v 0
d- x
---- = 01 x + 1 F A = 0 1
· F dt v 00 v ----
-
v = ----- M 0 0
M
This can be used to find the inverse matrix,
s 1 s ---1- 1--- 1
–1 ---- ----
–1 1 0 0 1 s – 1
–1
0 s s
2 2
s s s2
( sI – A ) = s – = -------------
= 2 = =
0 1 0 0 0 s s –0 0 s 1
---- ---- 0 ---
2 2 s
s s
The function of time can be found assuming an initial position of 10 and velocity of 5.
= L [ ( sI – A ) ] = 1 t
At –1 –1
e
0 1
x h ( t ) = x = e 10 = 1 t 10 = 10 + 5t
At
v 5 0 1 5 5
Given a second order differential equation, the state matrix can be found,
··
F = Mx
• If a matrix is diagonizable, the diagonal matrix can be found with the following
technique. This can be used for more advanced analysis techniques to create diagonal (and
state space analysis - 20.7
λ1 …
–1 –1
T AT = Λ A = TΛT Λ = … …
λn
This may also be written as,
At Λt – 1
e = Te T λ t
e 1 …
Λt
e = … …
λn t
e
This can also be applied to the
At 1 22
e = I + At + ----- A t + …
2!
At –1 1 –1 2 2
e = I + TΛT t + ----- ( TΛT ) t + …
2!
Eigenvalues can be found using the following relationship. If any of the Eigen-
values are repeated the Jordan normal form is required.
( λI – A )v = 0 Av = λv
The Eigenvectors are then combined into a single matrix, this is the transition matrix.
• example,
state space analysis - 20.8
A = –1 2
–3 4
The eigenvalues can be calculated,
λI – A = λ 1 0 – – 1 2 = λ + 1 –2
0 1 –3 4 3 λ–4
2
∴ = ( λ + 1 ) ( λ – 4 ) – ( – 6 ) = λ – 3λ + 2 = ( λ – 2 ) ( λ – 1 )
Therefore the Eigenvalues are, λ1 = 2 λ2 = 1
An eigenvector can be calculated using the Eigenvalue 2.
– 1 2 u 11 = λ u 11 = 2 u 11
1
– 3 4 u 21 u 21 u 21
u 11
– u 11 + 2u 21 = 2u 11 ∴2 u 21 = 3u 11 v1 = = 2
u 21 3
Another eigenvector can be calculated using the Eigenvalue 1.
– 1 2 u 12 = λ u 12 = 1 u 12
2
– 3 4 u 22 u 22 u 22
u 12
– u 12 + 2u 22 = u 12 ∴u 22 = u 12 v2 = = 1
u 22 1
The Eigenvectors can be combined to a single matrix.
T = v1 v2 = 2 1
31
To check, Av i = λ i v i
u11 u 12
A ,A = 2 2 ,1 1
u 21 u 22 3 1
–1 2 2 , – 1 2 1 = 4 , 1
–3 4 3 – 3 4 1 6 1
4, 1 = 4, 1 verified
6 1 6 1
• If there are repeated Eigenvalues in the system the Jordan Form can be used.
state space analysis - 20.9
λ1 1 0 … 0 0
0 λ2 1 … 0 0
0 0 λ3 … 0 0
J = Jordan block
… … … … … …
0 0 0 … λn – 1 1
0 0 0 … 0 λn
–2 1 1
A = 1 –2 1 Find a matrix, that has repeated eigenvalues, and is not singular
1 1 –2
λ – 2 –1 – 1
2
λI – A = –1 λ – 2 –1 = (λ + 3) (λ – 0)
– 1 –1 λ – 2
state space analysis - 20.10
T 11 – 2 1 1 T 11 – 2 T 11 + T 21 + T 31
1 T 21 = 1 –2 1 T 21 = T 11 – 2T 21 + T 31 FIX
T 31 1 1 – 2 T 31 T 11 + T 21 – 2T 31
T 11 = 2T 11 + T 21 + T 31 T 21 =
T 21 = T 11 + 2T 21 + T 31 T 21 =
T 31 = T 11 + T 21 + 2T 31 T 31 =
T 12 – 2 1 1 T 12 – 2 T 12 + T 22 + T 32
1 T 22 = 1 –2 1 T 22 = T 12 – 2T 22 + T 32
T 32 1 1 – 2 T 32 T 12 + T 22 – 2T 32
T 12 = 2T 12 + T 22 + T 32
T 22 = T 12 + 2T 22 + T 32
T 32 = T 12 + T 22 + 2T 32
T 13 – 2 1 1 T 13 – 2 T 13 + T 23 + T 33
0 T 23 = 1 –2 1 T 23 = T 13 – 2T 23 + T 33
T 33 1 1 – 2 T 33 T 13 + T 23 – 2T 33
4T 13 = 2T 13 + T 23 + T 33
4T 23 = T 13 + 2T 23 + T 33
4T 33 = T 13 + T 23 + 2T 33
state space analysis - 20.11
Given the following Eigen values and vectors the free response is,
λ1 = 2 λ2 = 1 v1 = 2 v2 = 1
3 1
n
λi t 2t t
∑ = 2 e + 1 e = 2e + e
2t 1t
xh ( t ) = vi e
3 1 2t t
i=1 3e + e
• zeros of state space functions can be found using the state matrices.
state space analysis - 20.12
s0 I – A –B
= 0
C D
Consider the example beginning with state equations,
·
x = v – 5F
·
v = – 3x – 4v + 5F
d- x
---- = 0 1 x + –5 F x = 1 0 x + 0F
dt v –3 – 4 v 5 v
A = 0 1 B = –5 C = 1 0 D = 0
– 3 –4 5
This can be put into the matrix form,
1 0
s0 – 0 1 – –5
0 1 –3 –4 5 = 0
1 0 0
s0 –1 5
3 s0 + 4 – 5 = 0
1 0 0
s 0 ( 0 ) – ( – 1 ) ( – 4.5 ) + 5 ( – ( s 0 + 4 ) ) = 0
– 24.5 = 5s 0
s 0 = – 4.9
There is one zero at -4.9 rad/sec. The order of the polynomial determines the
number of zeros. If the polynomial has no ’s’ terms, then there are no zeros.
state space analysis - 20.13
20.2 OBSERVABILITY
- a system is observable iff the system state x(t) can be found by observing the
input u and output y over a period of time from x(t) to x(t+h).
d- x
---- = a b x + e u
dt v c d v f
y = g h x + j u
v k
if the parameters c, d or f were not in the final expression for y, the second state equa-
tion would be said to be not observable. This will happen when an output parameter
is zero in the C matrix and an equation is decoupled in the A matrix, i.e. the same
variable column is zero.
For example,
d- x
---- = 1 0 x + 3 u
dt v 0 –a v b
y = 5 0 x + 6 u
v
–1
G = C ( sI – A ) B + D = 5 0 s 0 – 1 0 3 +
–1
6
0 s 0 –a b
s+a 0
–1 0 s – 1 3
G = 5 0 s–1 0 3 + --------------------------------
6 = 5 0 ( s – 1 ) ( s + a -) + 6
0 s+a b b
1- 3
---------- 0 -----------
s–1 3 15
G = 5 0 + 6 = 5 0 s – 1 + 6 = ----------- + 6
1- b b - s–1
0 ---------- ----------
s+a s+a
Note: the variables ’a’ and ’b’ both dissapeared because this system is not
observable.
state space analysis - 20.14
• This often happens when a system has elements that are decoupled, or when a
pole and zero cancel each other.
• Observability can be verified formally for an LTI system with the following rela-
tionship.
The system is unobservable if the equation below is true for any state,
At * 1 0 0
Ce x = 0 t≥0
x = 0 , 1 ,… 0
*
… … …
0 0 1
One example,
A = 1 2 C = 5 6
3 4
At * e e
t 2t 1 0 1 0
Ce x = 5 6 , = ( 5e t + 6e 3t ) ( 5e 2t + 6e 4t ) ,
e
3t
e
4t 0 1 0 1
Ce x = ( 5e t + 6e 3t ) ( 5e 2t + 6e 4t ) 1 , ( 5e t + 6e 3t ) ( 5e 2t + 6e 4t ) 0
At *
0 1
At * t 3t 2t 4t
Ce x = { ( 5e + 6e ), ( 5e + 6e ) }
Both values are non-zero, so both states are observable.
One example,
A = 1 0 C = 3 0
0 2
t
Ce x = 3 0 e 0 1 , 0 = 3e t 0 1 , 0 = { 3e , 0 }
At * t
0 e 0 1 0 1
2t
• Another theorem for testing observability is given below. If any of the states sat-
isfies the equation it is unobservable.
state space analysis - 20.15
C
CA *
x = 0
…
n–1
CA
C
CA
rank ( M o ) = rank = n
…
n–1
CA
20.3 CONTROLLABILITY
- a system is controllable iff there is an input u(t) that will cause the system to go
from any initial state to any final state in a finite time.
d- x
---- = a b x + e u
dt v c d v f
y = g h x + j u
v k
if the parameters c, d or f were not in the final expression for y, the second state equa-
tion would be said to be not uncontrollable. This will happen when an output
parameter is zero in the C matrix and an equation is decoupled in the A matrix, i.e.
the same variable column is zero.
For example,
d- x
---- = 1 0 x + 2 u
dt v a –b v 0
y = 3 4 x + 5 u
v
–1
G = C ( sI – A ) B + D = 3 4 s 0 – 1 0 2 +
–1
5
0 s a –b 0
s+B 0
–1
0 s–1 2
G = 3 4 s–1 0 2 +
5 = 3 4 --------------------------------
- + 5
0 s+b 0 (s – 1)( s + b) 0
1-
---------- 0
s–1 2 + 3 4 2 + 6
G = 3 4 5 = ----------- ----------- 5 = ----------
s – 1
-+5
1- 0 s – 1 s + b 0
0 ----------
s+b
Note: the variables ’a’ and ’b’ both dissapeared because this system is not con-
trollable.
A = 1 2 B = 5
3 4 6
1 2t
T
1 0 3 4 5 = e 1t e 2t 5
, e ,
1 0 0 1
0 1 6 e 3t e 4t 6
5e 1t + 6e 2t 1t 2t 3t 4t
1 0, 0 1 = { 5e + 6e , 5e + 6e }
5e 3t + 6e 4t
An example is,
A = 1 0 B = 0
0 2 3
1 0t
T
1 0 0 2 0 = e 1t 0 0
, e ,
1 0 0 1
0 1 3 0 e 2t 3
0 2t
1 0 , 0 1 2t = { 0, 3e }
3e
* T
( x ) B AB … A n – 1 B
rank ( M c ) = rank B AB … A n – 1 B = n
20.4 OBSERVERS
• Observers estimate system state variables when not all of the variables are
directly observable.
• Observers use a limited set of system states that are available to identify other
system states that are not observable.
• The separation principle ensures that the observer cannot effect the stability of
the system it is observing.
20.5 SUMMARY
•
state space analysis - 20.19
1.
20.9 BIBLIOGRAPHY
Topics:
Objectives:
21.1 INTRODUCTION
· 0 1 x+ 0 u ·
x = y = 1 x
– 2 –3 4 0
Check for controlability,
M c = B AB = 0 0 1 0 = 0 4
4 – 2 –3 4 4 – 12
The rank is 2, and the order of the matrix A is 2, so the system is controllable.
sI – A = s 0 – 0 1 = s –1
0 s – 2 –3 –2 s – 3
2
sI – A = s ( s – 3 ) – 2 = s – 3s – 2 = ( s – ) ( s – )
Therefore, the uncompensated system is.......
Select an input vector with variables,
u = – Kx = – k 1 k 2 x
Ac = 0 1 – 0 0 1 – 0 0 = 0 1
k1 k2 =
– 2 –3 4 –2 – 3 4k 1 4k 2 ( – 2 – 4k 1 ) ( – 3 – 4k 2 )
s 0 – 0 1 s –1
sI – A c = =
0 s ( – 2 – 4k 1 ) ( – 3 – 4k 2 ) s + 2 + 4k 1 s + 3 + 4k 2
2
sI – A c = s ( s + 3 + 4k 2 ) + ( s + 2 + 4k 1 ) = s + s ( 4 + 4k 2 ) + ( 2 + 4k 1 )
The system is clearly second order, so the second order methods may be used to select
parameters. However for variety, why don’t we select a system that has poles at,
p = 1 + 2j, 1 – 2j
2
s + s ( 4 + 4k 2 ) + ( 2 + 4k 1 ) = ( s + 1 + 2j ) ( s + 1 – 2j )
2 2
s + s ( 4 + 4k 2 ) + ( 2 + 4k 1 ) = s + s ( 1 + 2j + 1 – 2j ) + ( ( 1 + 2j ) ( 1 – 2j ) )
2 2
s + s ( 4 + 4k 2 ) + ( 2 + 4k 1 ) = s + s ( 2 ) + ( 5 )
4 + 4k 2 = 2 k 2 = – 0.5
2 + 4k 1 = 5 k 1 = 0.75
state space control - 21.4
·
r u x x y
1---
B C
+ + s
- +
A
• The value of K in the previous example could also be picked using Ackermann’s
formula.
–1
K = 0 0 … 1 Mc Φd ( A )
where,
Φ d ( s ) = the desired response
The state equations and the desired response of the system are,
· 0 1 x+ 0 u ·
x = y = 1 x
– 2 –3 4 0
2
Φd ( s ) = s + s ( 2 ) + ( 5 )
The Markov (?) parameter can be calculated first.
Mc = 0 0 1 0 = 0 4
4 –2 –3 4 4 – 12
–1
0 1 2
K = 0 1 0 4 + 0 1 ( 2 ) + ( 5 )I
4 – 12 – 2 –3 –2 –3
– 12 –4
–4 0
K = 0 1 ---------------------- – 2 – 3 + 0 2 + 5 0
0 – 16 6 7 –4 –6 0 5
21.3 OBSERVERS
• Observers are used to estimate the next system state. They can also be used to
predict future state values.
Actual Plant
(and assumed state equations)
U
d- Y
---- X = AX + BU
dt
Y = CX
Observer
d- ˆ ˆˆ ˆ ˆ ˆ
---- X = AX + BU + K( Y – Y ) Y
dt
ˆ ˆ ˆ
Y = CX X
Aside: For an open loop estimator a simulation is run, while the system is running. The
simulation values are compared to the actual system responses, and the model is
adjusted. It is assumed that the initial value of the state is unknown. If A is stable then
the estimation will eventually converge (this can be checked using the Eigenvalues).
However, there is no guarantee that it will converge quickly.
• A closed loop estimatior is shown below. It uses a learning matrix L to adjust the
convergence rate. A larger L value will result in faster convergence, but the exponent must
state space control - 21.8
• Consider the example below, for a second order system. The learning rate values
are selected to determine how quickly the model converges.
state space control - 21.9
d- x 1 –a1 1 x1 b x1
---- = + 1 u y = 1 0
dt x –a2 0 x2 b2 x2
2
– a1 1 l1 – a1 – l1 1
A – LC = – 1 0 =
– a2 0 l2 – a2 – l2 0
s + a1 + l1 –1
sI – ( A – LC ) = = s ( s + a 1 + l 1 ) – ( –1 ) ( a 2 + l2 )
a2 + l2 s
2
= s ( 1 ) + s ( a1 + l 1 ) + ( a2 + l2 )
0
T
L = K e = Φ e ( s )M o
–1 …
0
1
state space control - 21.10
Consider the state equations for a mass spring damper system (y is the position).
0 1 0
d
----- x = –K x + y = 1 0 x + 0 F
dt v –K d 1- F
---------s --------- v ---- v
M M M
0 1 0
A = –K –Kd B = 1 C = 1 0 D = 0
---------s --------- -----
M
M M
First test for observability, (note: it is observable)
1 0
1 0 1 0
rank C = rank 0 1 = rank = rank = 2
CA
1 0 –Ks –K d 0 1 0 1
--------- ---------
M M
ˆ 0 1 0
d
----- x = –K xˆ + yˆ = 1 0 x
ˆ
dt ˆ –Kd 1- F
v ---------s --------- vˆ ---- vˆ
M M M
• The open loop estimator will normally ignore the response to initial conditions
and will have long term errors resulting from modeling errors and random disturbances in
the system.
ˆ 0 1 0 ˆ
d
----- x = –K xˆ + l
F + 1 y˜ yˆ ( t ) = 1 0 x
–Kd 1
dt ˆ
v ---------s --------- vˆ ----- l2 vˆ
M M M
• In many cases some state variables can be measured directly, but others cannot.
In these cases it is more efficient to only estimate the unmeasurable variable values [Ero-
nini].
• This can be
W = KX
–1
X = C
---- Y- = M –1 ----
Y- M = C (Note: the inverse must exist)
---- ----
K W W K
Y- = MX
----
W
d- Y d –1 Y
---- ----- = ----- MX = M ( AX + BU ) = MAX + MBU = MAM ----
- + MBU
dt W dt W
The matrices can be partitioned to isolate the unmeasurable state variables. Note that the
Eigenvalues of Hw must be relatively small.
–1 … … …
MAM = MB =
Hy Hw Bw
d- ˆ ˆ
---- W = H y Y + H w W + Bw U
dt
• For a regulated system the control output ’u’ can be estimated using the desired
state space control - 21.12
system state.
ˆ
u = Kx = K y
CL
+ d- ˆ
- ---- d- y
x ---- x x
dt 1--- xˆ u dt 1---
–K B C
s s
+
+
A A
system
B
yˆ = Cxˆ
The state model for the system is,
d-
---- x = Ax + Bu
dt
y = Cx
These can be combined to obtain,
d- ˆ
---- x = Axˆ + Bu + L ( y – yˆ ) = xˆ ( A – BK – LC ) + x ( LC )
dt
d-
---- x = Ax + Bu = x ( A ) + xˆ ( – BK )
dt
Resulting in the matrix,
d- x x
---- = A – BK
dt x ˆ LC A – BK – LC xˆ
state space control - 21.14
x x
= I 0 = Tx cl ≈ x˜cl T = I 0 = T
–1
x˜ I – I x˜ I –I
An error variable can be introduced, and written in matrix form,
–1
A cl = TAcl T ≈ A cl
The previous matrix can be revised
A cl = I 0 A – BK I 0
I – I LC A – BK – LC I – I
A cl = I 0 A – BK BK
I – I A – BK – A + BK + LC
A cl = A – BK BK
0 A – LC
The new poles for this system can be written,
2
sI – A cl = ( A – BK ) ( A – LC ) – BK ( 0 ) = A – ALC – ABK + BKLC
• The estimators and regulators can be designed separately and then combined.
This is the separation principle.
d- ˆ d-
---- x ---- x
dt xˆ dt
+ x
1--- 1---
– BK
s s
+
+ +
A – BK – LC A
LC
state space control - 21.15
• The compensator,
• The system can also be set up for a compensator by assuming the setpoint input is
not zero,
state space control - 21.16
N Ns
M = 1kg K s = 10 ---- K d = 1 ------
m m
K = 4M 2 – 4M – K 4M – K
s d
K = 4 ( 1 ) 2 – 4 ( 1 ) – 10 4 ( 1 ) – ( 1 )
K = – 10 3
The desired response time for the system will be a time response of approximately
0.2sec.
x 1
G ( s ) = --- = -------------------------------------
2
-
F Ms + K d s + K s
0 1 0 0 1
A cl = A – BK = – K –Kd – 1- k 1 k 2 = – Ks – k1 – Kd – k2
---------s --------- ---- --------------------- ----------------------
M M M M M
0 1 s 1
Φ e ( s ) = sI – Acl = s 0 – =
– Ks – k1 – Kd – k2 K s + k 1 Kd + k2
0 s --------------------
- ---------------------- ----------------- ------------------ + s
M M M M
K d + k 2 – K s – k 1
= s + s -----------------
2
- + -------------------- = ( s + 0.2 ) 2
M M
–Ks – k 1
-------------------- = ( 0.2 ) 2 k 1 = – 10.04
M
Kd + k2
------------------ = 2 ( 0.2 ) k 2 = – 0.6
M
state space control - 21.19
–1
L = Φe ( A ) C 0
CA 1
0
2 1 0
1
= – K – K + 0.2 0
0 1
---------s --------d- 1
M M 1 0 –Ks
---------
–K d
---------
M M
0 1
2
0 1
2 1 0 0
= –K – K + 2 ( 0.2 ) –K – K d + 0.2 I
---------s --------d- ---------s --------- 1
M M M M 1 1
–Ks –Kd
--------- --------- 0 0.4
M M 0.04 0 1 0 0
= 2
+ – 0.4K – 0.4K +
K s Kd –K s Kd -----------------s ----------------d- 0 0.04 1
------------ --------- + ------- M M 1 1
M
2 M M2
–Ks –Kd
--------- + 0.04 --------- + 0.4
M M 1 0 0
= 2
K s K d 0.4K s – K s Kd
0.4K d 1 1 1
------------ – ------------- --------- + – -------
-------------- + 0.04
2 M M M M2
M
–Ks –Kd
--------- + 0.04 --------- + 0.4
M M 0
= 2
K s K d 0.4K s – K s Kd
0.4K d 1
------------ – ------------- --------- + – -------
-------------- + 0.04
2 M M M M2
M
–Kd
--------- + 0.4
M – 0.6
= 2
=
–K s Kd
0.4K d – 9.36
--------- + -------
– -------------- + 0.04
M M M 2
state space control - 21.20
A c = A – BK – LC
0
Ac = 0 1 – – 0.6
1 – 10 3 – 1 0
– 10 –1 ----- – 9.36
M
Ac = 0 1 – 0 0 – – 0.6 0 = 0.6 1
– 10 –1 – 10 3 – 9.36 0 9.36 –4
Bc = L = – 0.6
– 9.36
C c = K = – 10 3
double analog_in(){
d- ˆ d-
---- x ---- x
dt xˆ dt
+ x
1 1
--- – BK ---
s s
+
+ +
A – BK – LC A
LC
state space control - 21.22
21.6 LQR
- Linear Quadratic Regulator (LQR) allows the design of a regulating system that
tends to zero, but also considers the control effort.
- The basic function for evaluating the controller is defined below. The integral is
evaluated to reduce the value. Ideally the state value will go to zero (it is a regulator), and
the plant input will be minimized. It is assumed that D=0. Here a new state ’z’ is defined.
It should reflect the system state values that should be regulated to zero.
∫ [ (y(t) )
T 2
J LQR = y ( t ) + r ( u ( t ) ) ] dt
0
T
( y ( t ) ) y ( t ) = state cost
2
( u ( t ) ) = control cost
r = control penalty
z = Cz x
∞
∫ [ (x(t) )
T T 2
J LQR = C z C z x ( t ) + r ( u ( t ) ) ] dt
0
- the design process involves adjusting the r value to obtain the desired result.
-
state space control - 21.23
The equivalent transfer function can be written, where a(s) is the characteristic eqn.
–1 b(s) b(s)
C ( sI – A ) B = ---------- = -----------------
a(s) sI – A
UNKNOWN STUFF
sI – A + BK LQR = ∏ ( s – pi )
i=1
–1
∆ ( s ) = a ( s )a ( – s ) + r b ( s )b ( – s )
The poles are then found using Ackermann’s method.
2
( u ( t ) ) = control cost
r = control penalty
∞
∫ [ (x(t) )
T T 2
J LQR = C Cx ( t ) + r ( u ( t ) ) ] dt
0
∞
∫ [ (x(t) )
T T 2
J LQR = C Cx ( t ) + r ( u ( t ) ) ] dt
0
state space control - 21.24
A cost function for the system state, the design tries to minimize this
The relative weighting for the process and sensor noise
• Introduce random errors to the system model and test for stability
Z = N+P
where,
Z = 0, N = – P For stability
Note: Larger loops indicate a more stable system. Tight loops are very sensitive to
parameter variations.
21.8.1 Stability
L ( s ) = G ( s )G c ( s )
L N ( s ) = G N ( s )G c ( s )
L A ( s ) = G A ( s )G c ( s )
The distance, ’d’, from the point at -1 to the calculated point is found as a function.
d ( jω ) = L N ( jω ) – ( – 1 + 0j )
The sensistivity ’S’ is defined as the inverse of the distance from the point at -1.
1 1
S ( jω ) = -------------- = ---------------------------
d ( jω ) 1 + L N ( jω )
The boundedness of the system can be tested by ensuring that the sensitivity always
remains less than some given value ’gamma’ for all frequencies. Note: this requires
that D must be smaller than gamma.
S ( jω ) < γ
–1
C ( jωI – A ) B + D < γ
The Hamiltonian matrix is defined below. It does not have purely complex Eigenvalues.
2 T –1 T 2 T –1 T
H = A + B( γ I – D D) D C B(γ I – D D) B
T 2 T –1 T T T 2 T –1 T
– C ( I + D ( γ I – D D ) D )C – A – C D ( γ I – D D ) B
Or, if D=0,
T
BB
A ----------
H = 2
γ
T T
–C C –A
This matrix can then be tested, if there are no purely complex eigenvalues, the system is
bounded.
T T
BB - BB -
λ 0 – A --------- λ – A – ---------
λI – H = γ
2 = γ
2
0 λ
T T T T
–C C –A C C λ+A
2 T BB T C T C
= λ ( 1 ) + λ ( – A + A ) + – ---------------------
γ
2
etc....
state space control - 21.28
T
T T XBB X
A X + XA + C C + -----------------
2
- = 0
γ
Parameter Regulator
Estimation Design
Regulator Plant
state space control - 21.29
Adaptation
Reference Algorithm
Model
Controller Plant
Adaptation
Reference Algorithm
Model
+
Controller Plant
+
• Parallel MRAC
Adaptation
Reference Algorithm
Model
Adjustable
Plant
state space control - 21.30
• Series MRAC
Adaptation
Algorithm
Reference Adjustable
Model Plant
The reference model is developed from the fundamentals of the system. It should be
controllable and stable.
d-
---- X = Am Xm + Bm r
dt m
e = X m – Xp
d-
---- X = A p X p + Bp r
dt p
Where,
d-
---- X = Ap Xp + Bp ( r + ua )
dt p
d-
---- e = Am Xm + Bm r – Ap Xp – Bp ( r + ua ) = Am ( e + Xp ) + Bm r – Ap Xp – Bp ( r + ua )
dt
d-
---- e = e ( Am ) + Xp ( A m – A p ) + r ( B m – B p ) + u a ( –B p )
dt
d-
---- e = e ( Am ) + f f = Xp ( Am – Ap ) + r ( Bm – Bp ) + ua ( –Bp )
dt
state space control - 21.31
T
V = e Qe
• Kalman Filter helps settle estimators using estimates of snesor and process noise.
d-
---- x = Ax + Bu + B w w
dt
y = Cx + v
where,
B w = process noise weighting matrix
v = sensor noise
–1 N(s)
G yw ( s ) = C ( sI – A ) B w = -----------
D( s)
R
D ( s )D ( – s ) ± ------w N ( s )N ( – s ) = 0
Rv
where,
R w, R v = factors related to process/sensors noise
21.11 SUMMARY
•
state space control - 21.33
1.
state space control - 22.1
Topics:
Objectives:
22.1 INTRODUCTION
• A simple example
d-
---- X = AX out + BX in
dt out
d-
---- Y = CX out + DXin
dt out
state space control - 22.2
d- x i x
---- = a b i + e F
dt v c d vi f
i
Some sample data points can be calculated for F=1 and M=1,
1 2 1F 2
x = --- at = --- ----- t T = 1 F = 1 M = 1
2 2M
x(0) = 0 xi – 8 = 0
x ( 1 ) = 0.5 x i – 7 = 0.5
x(2) = 2 xi – 6 = 2
x ( 3 ) = 4.5 x i – 5 = 4.5
x(4) = 8 xi – 4 = 8
x ( 5 ) = 12.5 x i – 3 = 12.5
x ( 6 ) = 18 x i – 2 = 18
x ( 7 ) = 24.5 x i – 1 = 24.5
x ( 8 ) = 32 x i = 32
state space control - 22.5
The values can be substituted into the matrix, and the matrix solved
32 – 18-
32 – 18 -----------------
24.5 ------------------ 0 0 1 0 1
1
12.5 – 4.5-
12.5 – 4.5 -----------------------
8 ------------------------ 0 0 1 0 a 1
1
b 2-----------
– 0-
2-----------
– 0-
0.5 0 0 1 0 1
1 c =
32 – 2 ( 24.5 ) + 18-
32 – 18 d ------------------------------------------
0 0 24.5 ------------------ 0 1 1
2
1 e
12.5 – 4.5 12.5 – 2 ( 8 ) + 4.5-
0 0 8 ------------------------ 0 1 f ----------------------------------------
2
1 1
0 0
2 – 0.5
0.5 ---------------- 0 1 2 – 2 ( 0.5 ) + 0
----------------------------------
1 2
1
–1
a 24.5 14 0 0 1 0 14
a 0
b 8 8 0 0 1 0 8
b 1
c = 0.5 2 0 0 1 0 2
c = 0
d 0 0 24.5 14 0 1 1
d 0
e 0 0 8 8 0 1 1
e 0
f 0 0 0.5 1.5 0 1 1
f 1
Substituting these values back into the state equation results in the following
expression, which matches the exact state equation.
d- x i x
---- = a b i + e F state equation
dt v c d vi f
i
xi x
= 10 i + 0 0 F output equation
0 0 0 vi 0 0 1
–1 xi – xi – 2
xi – xi – 2 ---------------------
xi – 1 --------------------- 0 0 F 0 T
T
xi – 3 – xi – 5
xi – 3 – xi – 5 ---------------------------
xi – 4 --------------------------- 0 0 F 0 T
a T
xi – 6 – xi – 8
b xi – 6 – xi – 8 ---------------------------
x --------------------------- 0 0 F 0 T
c = i–7 T
x i – 2x i – 1 + x i – 2
d xi – xi – 2 -----------------------------------------
0 0 x i – 1 --------------------- 0 F T
2
e T
f xi – 3 – xi – 5 x i – 3 – 2x i – 4 + x i – 5
0 0 x i – 4 --------------------------- 0 F ------------------------------------------------
T 2
T
xi – 6 – xi – 7 x i – 6 – 2x i – 7 + x i – 8
0 0 x i – 7 --------------------------- 0 F ------------------------------------------------
T 2
T
This can then be used as a model to calculate a transfer function as shown below
using the previous example.
state space control - 22.7
d- x i x A = a b B = e
---- = a b i + e F
dt v c d vi f c d f
i
xi x
= 10 i + 0 0 F C = 1 0 D = 0 0
0 0 0 v i 0 0 1 0 0 0 0
these can be used to calculate a SISO system transfer function, and its inverse.
–1
G = C ( sI – A ) B + D = 1 0 s 1 0 – a b e + 0 0
–1
0 0 01 c d f 0 0
s–d b
–1 c s–a
G = 1 0 s – a –b e = 1 0 --------------------------------------------
- e
0 0 –c s – d f
0 0 ( s – a ) ( s – d ) + bc f
s–d b
0 0 ( s – d )e + bf -
e = --------------------------------------------
G = ---------------------------------------------
( s – a ) ( s – d ) + bc f ( s – a ) ( s – d ) + bc
–1 (--------------------------------------------
s – a ) ( s – d ) + bc-
G =
( s – d )e + bf
–1
G
+
+ + F xa
plant
xd controller
1
state space control - 22.8
The identified coefficients for the controller are substituted into the inverse transfer func.
a 0
b 1
c = 0 –1 ( s – a ) ( s – d ) + bc (s – 0)(s – 0) + 1(0 ) 2
G = --------------------------------------------- = -------------------------------------------------- = s
( s – d )e + bf ( s – 0 )0 + 1 ( 1 )
d 0
e 0
f 1
The identified coefficients for the controller are substituted into the inverse transfer func.
d- 2
---- F F
x = ----- = ---
dt M 1
--x- = ----
1
F 2
s
A state diagram for the system may then be written using a proportional controller,
2
s
+
+ + F xa
1-
xd P ---
2
s
-
1
state space control - 22.9
--1-
2
s
P
+
+ + xa
1-
xd P ---
2
s
-
1
2
s-
---
P
+
+ xa
P-
xd ---
2
s
- -
1
2
s-
---
P
+
xa
+ P
xd --------------
2
s +P
xa
2 P
xd s---- --------------
+1 2
P s +P
2
xd
+ P --------------
s-------------- P
xa
P 2
s +P
xd 1 xa
Note: This suggests that the result is an ideal controller, however in practice there are
errors, such as sensor noise, imperfect actuators, and changing system conditions
such as mass. This also assumes that the force actuator can generate any requested
force.
state space control - 22.10
22.2 SUMMARY
1.
electromagnetics - 23.1
Topics:
Objectives:
23.1 INTRODUCTION
• Magnetic fields and forces are extremely useful. The fields can allow energy stor-
age, or transmit forces.
• Magnetic fields have direction. As a result we must pay special attention to direc-
tions, and vector calculations.
23.2.1 Induction
I =
°∫ Hdl
where,
I = current flowing along a line (A)
∴I = 2πHr
I
∴H = ---------
2πr
• Flux density can be calculated for low H values. As the value climbs the relation-
ship becomes non-linear.
B = µH = µ r µ 0 H
where,
B = Flux density (Wb/m*2 or T)
µ = permeability of material
– 7 Henry
µ 0 = permeability of free space = 4π ×10 ----------------
m
µ r = relative permeability
• Permeability,
electromagnetics - 23.3
B
µ = ----
H
–7 H
µ 0 = 4π10 ----
m
µ = µr µ0
where,
• Permeability is approximately linear for smaller electric fields, but with larger
magnetic fields the materials saturate and the value of B reaches a maximum value.
1.5
linear saturation
H
4000
1.5
cast steel
1.0
B (T)
0.5
cast iron
0
0 500 1000
H (At/m)
I
B = --------- For an infinitely long straight conductor
2πr
where,
B = Flux density -------2- or Tesla
Wb
m
I = Current in the conductor (A)
r = radial distance from the conductor
Φ = ∫ B dA
where,
Φ = Flux density ( Wb )
• When a material is used out of the saturation region the permeabilities may be
written as reluctances,
L
R = -------
µA
where,
R = reluctance of a magnetic path
L = length of a magnetic path
A = cross section area of a magnetic path
electromagnetics - 23.6
Ni F
Φ = ------------- = ---
F ------
l - R
µA
• Example,
lc
I R c = -----------
µc Ac
lg lg
R g = ------------
µg Ag
lc
Ni
Φ = ------------------
Rc + R g
• Faraday’s law,
electromagnetics - 23.7
d
e = N ----- Φ For a coil
dt
where,
e = the potential voltage across the coil
N = the number of turns in the coil
• Field energy,
2 2
B B
W = ------ V = ------ Al
2µ 2µ
2
B
F = ------ A
2µ
• The basic property of induction is that it will (in the presence of a magnetic field)
convert a changing current flowing in a conductor to a force or convert a force to a current
flow from a change in the current or the path.
electromagnetics - 23.8
F = ( I × B )L B
NOTE: As with all cross prod-
F = ( L × B )I ucts we can use the right
hand rule here.
I, L
F
where,
L = conductor length
F = force (N)
The FBD/schematic equivalent is,
I F
M
B
e m = ( v × B )L
where,
v
e m = electromotive force (V)
e
φ = magnetic flux (Wb - webers)
v = velocity of conductor
The FBD/schematic equivalent
e
+
M
-
• Hysteresis
• These systems are very common, take for example a DC motor. The simplest
motor has a square conductor loop rotating in a magnetic field. By applying voltage the
wires push back against the magnetic field.
electromagnetics - 23.10
y
I
B
x
1 I
z
2 5
4
b 3
a
axis of
rotation ω
For wire 3,
r cos ( ωt )
– rω sin ( ωt ) 0
P 3 = r sin ( ωt ) V3 = rω cos ( ωt ) B = –B
b b
– --- to --- 0 0
2 2
de m3 = ( V × B )dL
b
--- – rω sin ( ωt ) 0
∫–b---
2
e m3 = rω cos ( ωt ) × – B dr
2 0 0
b 0
---
∫–b---
2
e m3 = 0 dr
2 Brω sin ( ωt )
b
---
2
2
b 2
= Bω sin ( ωt ) --- – – --- = 0
r b
e m3 = B ---- ω sin ( ωt )
2 b
2 2
– ---
2
For wires 1 and 5,
By symmetry, the two wires together will act like wire 3. Therefore they both
have an emf (voltage) of 0V.
e m1 = e m5 = 0V
b
– --- ω sin ( ωt )
a 2 0
e m2 = ∫0 b---
ω cos ( ωt )
× – B dl
2 0
0
0
a b
∫0
e m2 = 0 dl = aB --- cos ( ωt )
b 2
B --- ω cos ( ωt )
2
e m4 = e m2
e m = e m1 + e m2 + e m3 + e m4 + e m5
b b
e m = 0 + aB --- ω cos ( ωt ) + 0 + aB --- ω cos ( ωt ) + 0
2 2
e m = aBbω cos ( ωt )
• As can be seen in the previous equation, as the loop is rotated a voltage will be
generated (a generator), or a given voltage will cause the loop to rotate (motor).
• In this arrangement we have to change the polarity on the coil every 180 deg of
rotation. If we didn’t do this the loop the torque on the loop would reverse for half the
motion. The result would be that the motor would swing back and forth, but not rotate
fully. To make the torque push consistently in the same direction we need to reverse the
electromagnetics - 23.13
applied voltage for half the cycle. The device that does this is called a commutator. It is
basically a split ring with brushes.
e m = aBbω cos ( ωt )
• Real motors also have more than a single winding (loop of wire). To add this into
the equation we only need to multiply by the number of loops in the winding.
e m = NaBbω cos ( ωt )
• As with most devices the motor is coupled. This means that one change, say in
torque/force will change the velocity and hence the voltage. But a change in voltage will
also change the current in the windings, and hence the force, etc.
F w = ( I × B )L = IBa
T w = 2 F × --- = Fb = IBab
b
2
∑M = T w – T f = Jα
IBab – T f = Jα
• We still need to relate the voltage and current on the motor. The equivalent circuit
for a motor shows the related components.
electromagnetics - 23.14
IA
RA LA
em
eA +
-
-
where,
d
e A – I A RA – L A ----- I A – NaBbω cos ( ωt ) = 0
dt
and recall the previous equation,
IBab – T f = Jα
• Practice problem,
electromagnetics - 23.15
N Ks
M
Kd
S
R
x
23.4 SUMMARY
1.
Topics:
Objectives:
24.1 SUMMARY
w = flow rate
p = pressure
fluids - 24.2
24.2.1 Resistance
• If fluid flows freely, we say it is without resistance. In reality, every fluid flow
experiences some resistance. Even a simple pipe has resistance. Of similar interest is the
resistance of a value.
w = K ∆p
where,
w = flow rate through the pipe
∆p = pressure difference across valve/pipe
K = a constant specific to the pipe/valve/orifice
NOTE: In this case the relationship between pressure drop and flow are non-linear.
We have two choices if we want to analyze this system.
1. We can do a non-linear analysis (e.g. integration)
2. We can approximate the equation with a linear equation. This is only good for
operation near the chosen valve position. As the flow rate changes significantly
the accuracy of the equation will decrease.
w
∆p ≈ R ( w – w )
∆w
∆ ( ∆p ) w
R ≈ --------------- R = 2 -----2-
∆w K
w
∆p
∆ ( ∆p )
• Resistance may also result from valves. Valves usually restrict flow by reducing
an area for fluid to flow through.
• A simple form of valve is a sliding plunger. The valve below is called a two way
fluids - 24.3
• Four way valve allow fluid force to be applied in both directions of a cylinder
motion.
fluids - 24.4
to
reservoir
fluid in fluid in
to
reservoir
retract
no motion
advance
24.2.2 Capacitance
• Fluids are often stored in reservoirs or tanks. In a tank we have little pressure
near the top, but at the bottom the mass of the fluid above creates a hydrostatic pressure.
Other factors also affect the pressure, such as the shape of the tank, or whether or not the
top of the tank is open.
• To calculate the pressure we need to integrate over the height of the fluid.
fluids - 24.5
A
Fp
h
F p + Fg Fp + Fg
Fg
F p + Fg
Fg
P = ------
A
F g = ρV = ρgAh
ρgAh
P = -------------- = ρgh
A
• Consider a tank as a capacitor. As fluid is added the height of the fluid rises, and
the hydrostatic pressure increases. Hence we can pump fluid into a tank to store energy,
and letting fluid out recovers the energy. A very common application of this principle is a
municipal water tower. Water is pumped into these tanks. As consumers draw water
through the system these tanks provide pressure to the system. When designing these
tanks we should be careful to keep the cross section constant (e.g. a cylinder). If the cross
section varies then the fluid pressure will not drop at a linear rate and you won’t be able to
use linear analysis techniques (eg., Laplace).
A
C = ------
ρg
d
w = C ----- p
dt
fluids - 24.6
• As with most systems we need power sources. In hydraulics these are pumps that
will provide pressure and/or flow to the system.
Fluid In
Normally closed
inlet valve
Fluid Out
piston
Normally
Closed Valve
• A geared hydraulic pump is pictured below. Other types use vanes and pistons.
fluids - 24.7
• Vane based pumps can be used to create fluid flow. As the pump rotates the vanes
move to keep a good seal with the outer pump wall. The displacement on the advance and
return sides are unequal (aided by the sliding vanes). The relative displacement across the
pump determines the fluid flow.
Fluid in
As the center core of the pump rotates, the vanes
will slide in and out. Fluid is trapped between
vanes. On the inlet side the volume enclosed by
the vanes expands, drawing fluid in. On the outlet
side the volume between vanes decreases, forcing
fluid out.
Fluid out
fluids - 24.8
• As with the resistance of valves, these are not linear devices. It is essential that
we linearize the devices. To do this we look at the pressure flow curves. (Note: most
motors and engines have this problem)
∆p ∆ ( ∆p )
K = ---------------
∆p ∆w
1
w ≈ ---- ( ∆p – ∆p )
K
∆ ( ∆p )
w
∆w
• We can model a simple hydraulic system using the elements from before. Con-
sider the example below,
∆p
For the pump the relationship is
shown in the graph, and it will
operate at the point marked.
w
For the valve the relationship is
given below
∆p
w
The pipes are all equal length and
have the relationships shown
below.
∆p
24.4 SUMMARY
1.
Topics:
Objectives:
25.1 INTRODUCTION
25.2.1 Resistance
------ = --1- dθ
------
1 dq
q = --- ( θj – θ i )
R dl R dl
where,
d
R = -------
Aα
• When dealing with thermal resistance there are many parallels to electrical resis-
tance. The flow of heat (current) is proportional to the thermal difference (voltage). If we
have thermal systems in parallel or series they add as normal resistors do.
R1
R1 R2
R2
1- 1 1
----- = ------ + ------ RT = R1 + R2
RT R1 R2
25.2.2 Capacitance
1 dθ 1- dq
∆θ = ---- ( q in – q out ) ------ = --- ------
C dt C dt
where,
C = thermal capacitance
C = Mσ
where,
M = mass of thermal body
σ = specific heat of material in mass
• One consideration when dealing with heating capacitance is that the heat will not
instantly disperse throughout the mass. When we want to increase the rate of heat absorp-
tion we can use a mixer (with a gas or fluid). A mixer is shown in the figure below. This
mixer is just a rotating propeller that will cause the liquid to circulate.
25.2.3 Sources
• If we plan to design a thermal system we will need some sort of heat source. One
popular heating source is an electrical heating element.
• heating coils are normally made out of some high resistance metal/alloy such as
nichrome (nickel and chrome) or tungsten.
• If we run a current through the wire the resistance will generate heat. As these
metals get hotter the resistance rises, hence the temperature is self regulating. If we control
the voltage and current we can control the amount of heat delivered by the coil.
resistance
I
+
V
-
temp
P = IV
where,
P = power generated as heat
I = current into coil
V = voltage across coil
• We know that as we heat materials at one point, they do not instantly heat at all
points, there is some delay (consider a spoon in a hot bowl of soup). This delay is a func-
tion of heat capacitance (yes there is a parallel to the electrical description).
thermal systems - 25.5
• Consider an insulated sealed chamber with a resistive barrier between sides, and
a heating element in one side.
qi
θ 1, C 1 R θ 2, C 2
Given
q 0 = heat flow into the left chamber from the heating element
Next,
q 1 = heat flow through the center barrier
1
q 1 = --- ( θ 1 – θ 2 )
R
d- 1 d- 1
---- θ 1 = ------ ( q0 – q 1 ) ---- θ 2 = ------ ( q 1 )
dt C1 dt C2
sθ 1 = ------ q 0 – --- ( θ 1 – θ 2 )
1 1 1
C1 R sθ2 = ---------- ( θ 1 – θ 2 )
RC 2
Rq o – sRC 1 θ 1 = θ 1 – θ 2 θ1 = θ 2 + sRC 2 θ 2
θ 1 ( 1 + sRC 1 ) = θ2 + Rq o
θ2 + Rq o
θ 1 = ---------------------
-
1 + sRC 1
θ 2 + Rq o
θ 1 = ---------------------- = θ 2 + sRC 2 θ 2
1 + sRC 1
θ 2 + Rq o
------------------------------
- = 1 + sRC 1
θ 2 + sRC 2 θ 2
Rq o
---------
1 θ2
---------------------- + ---------------------- = 1 + sRC 1
1 + sRC 2 1 + sRC 2
Rq o
1 + --------- = 1 + s ( RC 1 + RC 2 ) + s R C 1 C 2
2 2
θ2
Rq o
--------- = s ( RC 1 + RC 2 ) + s 2 R 2 C 1 C 2
θ2
q
----o- = s ( C1 + C 2 ) + s 2 RC 1 C 2
θ2
qo
-----------------
RC 1 C 2 A B
θ2 = -------------------------------------- = --- + ----------------------------
C + C s C 1 + C2
s ------------------ 2
1
- + s2 s + ------------------ -
RC 1 C 2 RC 1 C 2
qo qo
----------------
RC C ----------------
- RC 1 C 2
-
qo
1 2
A = lim -------------------------------------- s = --------------------------------------- = -------------------
s → 0 C 1 + C 2 C 1 + C 2
------------------ C1 + C2
s ------------------- + s 2 - + (0)
RC 1 C 2 RC 1 C 2
qo qo
----------------
----------------
RC 1 C 2
-
C 1 + C 2 RC 1 C 2
-
– qo
B =
lim -------------------------------------- s + ------------------- = ---------------------------- = -------------------
C 1 + C 2 C 1 + C 2 RC 1 C 2 C 1 + C 2 C1 + C2
s → – ------------------
RC 1 C 2 RC C
s ------------------
- + s
2
– ------------------
-
1 2 RC 1 C 2
qo –qo
------------------- ------------------
-
C1 + C2 C1 + C2
θ 2 = ------------------- + ----------------------------
s C 1 + C2
s + ------------------ -
RC 1 C 2
–1 qo –1 1 –1 1
L ( θ 2 ) = ------------------- L --- – L ----------------------------
C 1 + C2 s C1 + C2
s + -------------------
RC 1 C 2
C1 + C 2
– ------------------ t
qo RC 1 C 2
θ 2 ( t ) = ------------------- 1 – e
C1 + C 2
25.4 SUMMARY
1.
26. OPTIMIZATION
Topics:
•
Objectives:
•
26.1 INTRODUCTION
L =
- money
- time
- mass
- volume
- power consumption
- some combination of factors
• Consider the example of building a fenced pasture. In this case when the area
becomes too large, there is a reduced value. We want to maximize the value of V.
multiaxis motion - 26.3
C fence = 20 ---- ( 2w + 2d )
$
m
where,
= 0.35 -----2-
$
C land
m
where,
C land = cost for the land
R = 0.05 -----------
$ - 2
2
wd wd < 300m
m yr
R = 0.01 -----------
$ - 2 2
2
( wd – 300m ) + 60$ wd ≥ 300m
m yr
where,
R = revenue generated by pasture land
V = R – C fence – C land
where,
V = total value
Figure 26.1 Example cost function for building a fence around a pasture
return value;
}
• Example of constraints, the pasture cannot be larger than one 1600m be 1600m
beacuse of the constraints of an existing road system.
w ≤ 1600m
d ≤ 1600m
return value;
}
4 4
C penaly = ---------------- + ----------------
w d
1600m 1600m
return value;
}
• A topographical map shows the relationship between search parameters and cost
values.
multiaxis motion - 26.7
Constraints
• Global Search space. In this case the system becomes ’stuck’ in a local mimina.
multiaxis motion - 26.8
• Global Search space. In this case the system searches all maxim.
multiaxis motion - 26.9
• The search algorithms change system parameters and try to lower system param-
eters.
• The main question is how to change the system paramters to minimize the system
value.
26.4.3 Simplex
26.5 SUMMARY
1.
1.
1.
state space analysis - 27.1
Topics:
Objectives:
27.1 INTRODUCTION
state space analysis - 27.2
nb
y
Ks
x
na Ks ni Ks
nc
Fi Ks
nd
• Equations can be written to relate the position of node i to the surrounding nodes
state space analysis - 27.3
F i = ( F i x, F i y ) + ∑ Fx = F iy – K s ( y i – y d ) + K s ( y b – y i ) = 0
Ks ( yi – yd ) y i ( 2K s ) + y b ( – K s ) + y d ( – K s ) = F i y
xi
yi
xa
ya
Fix 2K s 0 – K s 0 0 0 – K s 0 0 0 xb
=
Fiy 0 2K s 0 0 0 – K s 0 0 0 – K s y b
xc
yc
xd
yd
state space analysis - 27.4
na nb
y
Ks
Fa x
Fb Ks
Ks
Ks
nd nc
Fd Fc
• Equations can be written to relate the position of node i to the surrounding nodes
and the applied force. The ’x’ and ’y’ values are deflections from the unloaded state. The
’Ks’ value is based on the material stiffness and the geometry of the elements.
+
Ks ( xb – xa ) ∑ Fx = F ax + K s ( x b – x a ) = 0
( F a x, F a y )
∴F ax = x a ( K s ) + x b ( – K s )
Ks ( ya – y d )
+ ∑ Fx = F ay – K s ( y a – y d ) = 0
∴F ay = y a ( K s ) + y d ( – K s )
+
Ks ( xb – xa )
∑ Fx = Fbx – Ks ( xb – xa ) = 0
∴F bx = x a ( – K s ) + x b ( K s )
( Fb x, F by )
+ ∑ Fx = Fby – Ks ( yb – yc ) = 0
Ks ( y b – yc )
∴F b y = y b ( K s ) + y c ( – K s )
state space analysis - 27.5
Ks ( yb – yc ) +
∑ Fx = F cx – Ks ( x c – x d ) = 0
Ks ( xc – xd )
∴F cx = x c ( K s ) + x d ( – K s )
( F cx, F cy ) + ∑ Fx = F cy + Ks ( y b – y c ) = 0
∴F cy = y b ( – K s ) + y c ( K s )
Ks ( ya – yd ) +
∑ Fx = Fdx + Ks ( xc – x d ) = 0
Ks ( x c – xd ) ∴F d x = x c ( – K s ) + x d ( K s )
( F d x, F d y ) + ∑ Fx = F dy + K s ( y a – y d ) = 0
∴F dy = y a ( – K s ) + y d ( K s )
Fax Ks 0 –Ks 0 0 0 0 0 xa
Fay 0 Ks 0 0 0 0 0 –K s ya
Fbx –Ks 0 Ks 0 0 0 0 0 xb
Fby 0 0 0 Ks 0 –Ks 0 0 yb
=
Fcx 0 0 0 0 Ks 0 –Ks 0 xc
Fcy 0 0 0 –Ks 0 Ks 0 0 yc
Fdx 0 0 0 0 –Ks 0 Ks 0 xd
Fdy 0 –Ks 0 0 0 0 0 Ks yd
Ks #1 Ks #2 Ks
Ks Ks
n5 n6
n4
Ks #3 Ks #4 Ks
Ks Ks
n7 n8 n9
state space analysis - 27.7
For element #1
F 1x Ks 0 –K s 0 0 0 0 0 x1
Local stiffness matrix
F 1y 0 Ks 0 0 0 0 0 –Ks y1
F 2x –Ks 0 Ks 0 0 0 0 0 x2
F 2y 0 0 0 Ks 0 –K s 0 0 y2
=
F 4x 0 0 0 0 Ks 0 –Ks 0 x4
F 4y 0 0 0 –Ks 0 Ks 0 0 y4
F 5x 0 0 0 0 –Ks 0 Ks 0 x5
F 5y 0 –Ks 0 0 0 0 0 Ks y5
F 1x x1
F 1y y1
Ks 0 –Ks 0 0 0 0 0 0 0 0 0 0 0 0 0
F 2x x2
0 Ks 0 0 0 0 0 0 0 –Ks 0 0 0 0 0 0
F 2y y2
–K s 0 Ks 0 0 0 0 0 0 0 0 0 0 0 0 0
F 3x x3
0 0 0 Ks 0 0 0 –K s 0 0 0 0 0 0 0 0
F 3y y3
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
F 4x x
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4
F 4y 0 0 0 0 0 0 Ks 0 –K s 0 0 0 0 0 0 0 y4
F 5x 0 0 0 –Ks 0 0 0 K 0 0 0 0 0 0 0 0 x5
= s
F 5y 0 0 0 0 0 0 –Ks 0 Ks 0 0 0 0 0 0 0 y5
F 6x 0 –Ks 0 0 0 0 0 0 0 K 0 0 0 0 0 0 x6
s
F 6y 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y6
F 7x 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 x7
F 7y 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y7
F 8x 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 x8
F 8y 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y8
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
F 9x x9
F 9y y9
state space analysis - 27.8
F 1x x1
F 1y Ks 0 –K s 0 0 0 0 0 0 0 0 0 0 0 0 y1
0
F 2x 0 Ks 0 0 0 0 0 0 0 –K s 0 0 0 0 0 0 x2
F 2y – K s 0 2K s 0 – K s 0 0 0 0 0 0 0 0 0 0 0 y2
F 3x 0 0 0 2K s 0 0 0 –Ks 0 0 0 0 0 0 0 0 x3
F 3y 0 0 –K s 0 Ks 0 0 0 0 0 0 0 0 0 0 0 y3
F 4x 0 0 0 0 0 Ks 0 0 0 0 0 0 0 0 0 0 x4
F 4y 0 0 0 0 0 0 Ks 0 –Ks 0 0 0 0 0 0 0 y4
F 5x 0 0 0 –Ks 0 0 0 Ks 0 0 0 0 0 0 0 0 x5
=
F 5y 0 0 0 0 0 0 – K s 0 2K s 0 0 0 0 0 0 0 y5
F 6x 0 –Ks 0 0 0 0 0 0 0 2K s 0 0 0 0 0 0 x 6
F 6y 0 0 0 0 0 0 0 0 0 0 Ks 0 0 0 0 0 y6
F 7x 0 0 0 0 0 0 0 0 0 0 0 K 0 0 0 0 x7 s
F 7y 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y7
F 8x 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 x8
F 8y 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y8
F 9x 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 x9
F 9y y9
state space analysis - 27.9
• If the input forces are known, then the resulting displacements of the nodes can
be calculated by inverting the matrix. Consider the matrix for a single node.
state space analysis - 27.11
–1 Fax
xa Ks 0 –Ks 0 0 0 0 0
ya 0 Ks 0 0 0 0 0 –Ks Fay
xb –Ks 0 Ks 0 0 0 0 0 Fbx
yb 0 0 0 Ks 0 –Ks 0 0 Fby
=
xc 0 0 0 0 Ks 0 –Ks 0 F cx
yc 0 0 0 –Ks 0 Ks 0 0 F cy
xd 0 0 0 0 –Ks 0 Ks 0 Fdx
yd 0 –K s 0 0 0 0 0 Ks Fdy
• If we assume that node ’c’ is fixed in the ’x’ and ’y’ directions, the matrix can
reflect this by setting the appropriate matrix rows to zero.
–1
xa Ks 0 –Ks 0 0 0 F ax
ya 0 Ks 0 0 0 –K s F ay
xb –Ks 0 Ks 0 0 0 F bx
=
yb 0 0 0 Ks 0 0 F by
xd 0 0 0 0 Ks 0 F dx
yd 0 –K s 0 0 0 Ks F dy
• The displacements can then be found by selecting values for the coefficents and
solving the matrix. We can select a value of 1000 for the stiffness, and a force of 10 will be
state space analysis - 27.12
• This method generates very large matrices, easily into the millions.
• To reduce the matrix size techniques such as symmetry are commonly used.
• More complex elements are commonly used depending upon the stress condi-
tions, part geometry and other factors.
27.4 SUMMARY
•
state space analysis - 27.13
1.
27.8 BIBLIOGRAPHY
Topics:
• Fuzzy logic theory; sets, rules and solving
•
Objectives:
• To understand fuzzy logic control.
• Be able to implement a fuzzy logic controller.
28.1 INTRODUCTION
Fuzzy logic is well suited to implementing control rules that can only be expressed
verbally, or systems that cannot be modelled with linear differential equations. Rules and
membership sets are used to make a decision. A simple verbal rule set is shown in Figure
28.1. These rules concern how fast to fill a bucket, based upon how full it is.
The outstanding question is "What does it mean when the bucket is empty, half
full, or full?" And, what is meant by filling the bucket slowly or quickly. We can define
sets that indicate when something is true (1), false (0), or a bit of both (0-1), as shown in
Figure 28.2. Consider the bucket is full set. When the height is 0, the set membership is 0,
so nobody would think the bucket is full. As the height increases more people think the
bucket is full until they all think it is full. There is no definite line stating that the bucket is
full. The other bucket states have similar functions. Notice that the angle function relates
the valve angle to the fill rate. The sets are shifted to the right. In reality this would proba-
bly mean that the valve would have to be turned a large angle before flow begins, but after
that it increases quickly.
Fuzzy logic - 28.2
1 1
bucket is full stop filling
0 0
1 1
bucket is half full fill slowly
0 0
1 1
bucket is empty fill quickly
0 0
height angle
Now, if we are given a height we can examine the rules, and find output values, as
shown in Figure 28.3. This begins be comparing the bucket height to find the membership
for bucket is full at 0.75, bucket is half full at 1.0 and bucket is empty at 0. Rule 3 is
ignored because the membership was 0. The result for rule 1 is 0.75, so the 0.75 member-
ship value is found on the stop filling and a value of a1 is found for the valve angle. For
rule 2 the result was 1.0, so the fill slowly set is examined to find a value. In this case there
is a range where fill slowly is 1.0, so the center point is chosen to get angle a2. These two
results can then be combined with a weighted average to get
0.75 ( a1 ) + 1.0 ( a2 )
angle = ---------------------------------------------- .
0.75 + 1.0
Fuzzy logic - 28.3
1 1
bucket is empty fill quickly
0 0
height angle
1 1 1
LN 0 rps 0 rps/s 0 V
-100 -50 0 50 100 -6 -3 0 3 6 0 6 12 18 24
1 1 1
SN 0 rps 0 rps/s 0 V
-100 -50 0 50 100 -6 -3 0 3 6 0 6 12 18 24
1 1 1
ZE 0 rps 0 rps/s 0 V
-100 -50 0 50 100 -6 -3 0 3 6 0 6 12 18 24
1 1 1
SP 0
rps
0
rps/s
0
V
-100 -50 0 50 100 -6 -3 0 3 6 0 6 12 18 24
1 1 1
LP
0 rps 0 rps/s 0 V
-100 -50 0 50 100 -6 -3 0 3 6 0 6 12 18 24
Consider the case where verror = 30 rps and d/dt verror = 1 rps/s. Rule 1to 6 are calcu-
lated in Figure 28.5.
Fuzzy logic - 28.5
1 1 1
0 rps 0 rps/s 0 V
-100 -50 0 50 100 -6 -3 0 3 6 0 6 12 18 24
ANY VALUE
30rps (so ignore) 17V
(could also
This has about 0.6 (out of 1) membership have chosen
some value
above 17V)
1 1 1 1
rps rps/s V
0 0 0 rps/s 0
-100-50 0 50 100 -6 -3 0 3 6 -6 -3 0 3 6 0 6 12 18 24
1rps/s
30rps 1rps/s 14V
1 1 1
rps/s
0 rps 0 0 V
-100 -50 0 50 100 -6 -3 0 3 6 0 6 12 18 24
the lowest results in 0 set
30rps 1rps/s membership
This has about 0.0 (out of 1) membership
Fuzzy logic - 28.6
1 1 1
0 rps 0 rps/s 0 V
-100 -50 0 50 100 -6 -3 0 3 6 0 6 12 18 24
1rps/s the lowest results in 0 set
30rps
membership
This has about 0.0 (out of 1) membership
1 1 1
0 rps 0 rps/s 0 V
-100 -50 0 50 100 -6 -3 0 3 6 0 6 12 18 24
1rps
30rps
This has about 0.0 (out of 1) membership
1 1 1
0 rps 0 rps/s 0 V
-100 -50 0 50 100 -6 -3 0 3 6 0 6 12 18 24
ANY VALUE
30rps
This has about 0 (out of 1) membership
The results from the individual rules can be combined using the calculation in Fig-
ure 28.6. In this case only two of the rules matched, so only two terms are used, to give a
Fuzzy logic - 28.7
∑ ( Vmotor ) ( membershipi )
i
i---------------------------------------------------------------------
=1 -
V motor = n
∑ ( membershipi )
i=1
At the time of writing Allen Bradley did not offer any Fuzzy Logic systems for
their PLCs. But, other vendors such as Omron offer commercial controllers. Their control-
ler has 8 inputs and 2 outputs. It will accept up to 128 rules that operate on sets defined
with polygons with up to 7 points.
28.3 REFERENCES
Li, Y.F., and Lau, C.C., “Application of Fuzzy Control for Servo Systems”, IEEE International
Conference on Robotics and Automation, Philadelphia, 1988, pp. 1511-1519.
28.4 SUMMARY
2. Suggest 5 control problems that might be suitable for fuzzy logic control.
3. Two fuzzy rules, and the sets they use are given below. If verror = 30rps, and d/dtverror = 3rps/s,
find Vmotor.
1 1 1
SN 0 rps 0 rps/s 0 V
-100 -50 0 50 100 -6 -3 0 3 6 0 6 12 18 24
1 1 1
ZE 0 rps 0 rps/s 0 V
-100 -50 0 50 100 -6 -3 0 3 6 0 6 12 18 24
1 1 1
SP rps rps/s V
0 0 0
-100 -50 0 50 100 -6 -3 0 3 6 0 6 12 18 24
4. Develop a set of fuzzy control rules adjusting the water temperature in a sink.
5. Develop a fuzzy logic control algorithm and implement it in structured text. The fuzzy rule set
below is to be used to control the speed of a motor. When the error (difference between desired
and actual speeds) is large the system will respond faster. When the difference is smaller the
Fuzzy logic - 28.9
response will be smaller. Calculate the outputs for the system given errors of 5, 20 and 40.
100%
Big Error
error
0%
10 30
100%
Small Error
error
0%
10 30
20
Big Output
error
50
Small Output
5
error
50
if (big error) then (big output)
if (small error) then (small output)
29. NEURAL NETWORKS
Topics:
• Basic laws of motion
• Gravity, inertia, springs, dampers, cables and pulleys, drag, friction, FBDs
• System analysis techniques
• Design case
Objectives:
• To be able to develop differential equations that describe translating systems.
I. Introduction
Over the past decade, the artificial intelligence community has undergone a resurgence of interest in the
research and development of artificial neural networks. An artificial neural network is an attempt to simulate the man-
ner in which the brain interprets information as determined by the current knowledge of biology, physiology, and psy-
chology [14]. Artificial neural networks behave in much the same manner as biological neural networks, giving many
of the same benefits. Artificial neural nets are fault tolerant, exhibit the ability to learn and adapt to new situations,
and have the ability to generalize based on a limited set of data. This arises because of the structure which allows
neural nets to process information simultaneously, as opposed to the serial nature of traditional digital computers. This
parallel nature, inherent in neural networks, achieves the increase in speed by distributing the calculations among many
neurons. The network structure provides a level of fault tolerance, which allows the network to withstand component
failures without having the entire network fail.
This paper focuses on a popular feedforward model of neural networks. In this model a set of inputs are
applied to the network, and multiplied by a set of connection weights. All of the weighted inputs to the neuron are
then summed and an activation function is applied to the summed value. This activation level becomes the neuron’s
output and can be either an input for other neurons, or an output for the network. Learning in this network is done by
adjusting the connection weights based upon training vectors (input and corresponding desired output). When a train-
ing vector is presented to a neural net, the connection weights are adjusted to minimize the difference between the de-
sired and actual output. After a network is trained with a set of training vectors, the network should produce a good
output match for the inputs.
Artificial neural networks are mainly used in two areas --- pattern recognition, and pattern matching.
Pattern recognition is performed by classifying an unknown pattern through comparisons with previously learned pat-
translation - 29.2
terns. This ability is termed associative recall. An example of this is the use of neural networks to recognize hand-
written digits [4]. In pattern recognition, when a particular pattern is noisy or distorted, the network can generalize
and choose the closest match [3][4][10][13]. Pattern matching uses continuous input patterns to evoke continuous
output patterns (i.e. one-to-one mappings). An example is the use of a neural network as a basic controller for a plant.
The controller would accept the plant conditions as the inputs, and a set of control outputs would drive the current man-
ufacturing process. This approach is discussed in more detail in [11]. This paper uses the pattern matching strategy
for the inverse kinematics of a typical three link manipulator.
This paper focuses on the kinematic control of a three link manipulator working in three dimensional
space, within a quarter of the robot workspace. When manipulators interact with the environment, the position of the
end effector must be described. Human users are more suited to working in cartesian coordinates than the joint coor-
dinates of robots; hence, there is a need for conversion between the two coordinate systems. The conversion from
world coordinates to robot joint angles is called inverse kinematics. In the past, the problem of solving the inverse
kinematics has been done through the application of various methods. These methods take one of two basic forms (i)
Closed form equations or, (ii) Iterative. A closed form solution is found by decoupling the joints responsible for po-
sition and those responsible for orientation. These solution types are more desirable since explicit equations are avail-
able. Iterative techniques, such as, Newton-Raphson, Newton-Gauss and Linearization are available when no closed
form solutions can be obtained. Many of these solutions require that the kinematics be performed off-line because of
the computational demands of the algorithms. A brief survey of these various algorithms is given in [2] and [15]. Both
of the forms are generally rigid and do not account for uncontrollable variables such as manufacture tolerances, cali-
bration error, and wear. A neural network approach could adapt to changes in the robot due to wear from extended
use over time. Such algebraic and algorithmic procedures cannot incorporate these situations.
Previous research in the application of neural networks to kinematic control was performed for a to a two-
link planar manipulator (working in a plane), and a five degree of freedom robot working in three dimensional space.
The manipulators were controlled with a high accuracy; however, the training region for the two link robot was a small
square in the centre of the workspace, and the five link robot was limited to a small wedge volume within the robot
workspace [5][6][7]. This paper explains research extended to investigate the performance throughout the entire work
space of the robot. Investigations of a more complete representation of inverse kinematics throughout the entire work-
space is provided.
The paper begins with a general introduction to the artificial neuron, a brief description of feedforward
neural networks, and a description of the backpropagation learning algorithm. The inverse kinematics problem is de-
scribed, and the application of a two-layer neural network is discussed. The use of compensation networks is explored
and the results of the experimental work are presented. The implications of the neural network approach to the kine-
matic control problem are presented at the conclusion of this paper.
The basic building block of an artificial neural network is the neuron. In a popular model which will be
translation - 29.3
used in this paper, the connection weights between neurons are adjusted. The neuron receives inputs opi from neuron
ui while the network is exposed to input pattern p. Each input is multiplied by a connection weight wij, where wij is
the connection between neurons ui and uj. The connection weights correspond to the strength of the influence of each
of the preceding neurons. After the inputs have been multiplied by the connection weights for input pattern p, their
values are summed, netpj. Included in the summation is a bias value θj to offset the basic level of the input to the
activation function, f(netpj), which gives the output opj . Figure 1 shows the structure of the basic neuron.
wij Neuron uj
netpj = Σ wijopi + θj
where, wij ≡ synaptic weight, or connection weight between neuron ui and neuron uj
opi ≡ output of neuron ui (input of neuron uj)
θj ≡ bias value of neuron uj
opj ≡ output of neuron uj (function of the summation f(netpj))
In order to establish a bias value θj, the bias term can appear as an input from a separate neuron with a
fixed value (a value of +1 is common). Each neuron requiring a bias value will be connected to the same bias neuron.
The bias values are then self-adjusted as the other neurons learn, without the need for extra considerations.
In calculating the output of the neuron, the activation function may be in the form of a threshold function,
in which the output of the neuron is +1 if a threshold level is reached and 0 otherwise. Squashing functions limit the
linear output between a maximum and minimum value. These linear functions, however, do not take advantage of
multi-layer networks [14]. Hyperbolic tangents and the sigmoidal functions are similar to real neural responses; how-
ever, the hyperbolic tangent is unbounded and hard to implement in hardware. In this paper, the Sigmoidal function
is used because of its ability to produce continuous non-linear functions, which can be implemented in hardware in
future research areas. Figure 2 shows some commonly used activation functions.
translation - 29.4
-1
1
f(netpj) = - net pj
1-e
For more in depth information on neural networks, please refer to introductions to the subject in [3], [8], [14] and [16].
A single neuron can only simulate 14 of the 16 basic boolean logic functions. It cannot emulate the X-OR,
or the X-NOR gates [9]. These limitations require that more than a single neuron be used, and thus, the architecture
becomes an important consideration. In Feedforward systems, networks propagate the inputs forward through the neu-
ral net. Each neuron has inputs that only come from neurons in preceding layers. A one-layer neural net consists of a
layer of input neurons and a layer of output neurons. A multi-layer network consists of an input layer of neurons, one
or more hidden layers, and an output layer.
The circular nodes in figure 3 represent basic neurons, as described in the previous section. The input neu-
rons are shown as squares because they only act as terminal points (i.e. opi = input). The input layer does not process
information; thus, it is not considered to be a part of the structure and is numbered layer 0. A simple one-layer network
can effectively map many sets of inputs to outputs. In pattern recognition problems, this depends upon the linear sep-
arability of the problem domain. In pattern matching problems, this depends upon continuity, and topography of the
function. If such a set of connection weights cannot be found using one-layered networks, then multi-layered networks
must be considered.
translation - 29.5
Learning methods may be either supervised, or unsupervised. Supervised learning is required for pattern
matching, and backpropagation is the most popular of the supervised learning techniques. In the backpropagation
Training Paradigm, the connection weights are adjusted to reduce the output error. In the initial state, the network has
a random set of connection weights. When a system starts with all connection weights equal, the network begins at a
sort of local optimum, and will not converge to the global solution. In order for the network to learn, a set of inputs
are presented to the system and a set of outputs are calculated. A difference between the actual outputs and desired
outputs is calculated and the connection weights are modified to reduce this difference [14].
After inputs have been applied and the network output solution has been calculated, the estimated error
contribution, δ, by each neuron must be calculated. The calculations begin at the output layer of the network. The
delta value for any output neuron is computed as,
where, tpj is the desired output of output neuron uj, and opj is the actual output, and f ´(netpj) is the first derivative of
the activation function with respect to the total input (netpj) for the given input pattern p evaluated at neuron uj.
For the output layer, the change in connection weights can easily be calculated since the δ of the output
neurons is easily determined. With the introduction of hidden layers, the desired outputs of these hidden neurons be-
comes more difficult to estimate. In order to estimate the delta of a hidden neuron, the error signal from the output
translation - 29.6
layer must be propagated backwards to all preceding layers. The delta, δpj , for the hidden neurons is calculated as,
where, f ´(netpj) is the first derivative of the activation function with respect to netpj at hidden neuron uj, δpk is the
delta value for the subsequent neuron uk, and wjk is the connection weight for the link between hidden neuron uj and
subsequent neuron uk. This process of calculating the δs is performed for all layers until the input layer is reached
After all the error terms have been calculated for all the neurons, the weights may be adjusted. The esti-
mated weight change ∆pwij(n+1) is calculated for each input connection to neuron uj from neuron ui by,
where η is the learning rate, α is the smoothing term, δpj is the delta of neuron uj, opi is the output of preceding neuron
ui, and ∆wij(n) is the weight change in the previous training interval. The estimated errors are used to estimate the
The backpropagation method is essentially a gradient descent approach which minimizes the errors. In
order to adjust the connection weights, the gradient descent approach requires that steps be taken in weight space. If
the steps are too large, then the weights will overshoot their optimum values. If the steps are too small, it may take
longer to converge and may become caught in local minima. The step size is then a function of the learning rate. The
learning rate, which varies between 0 and 1, should be large enough to come up with a solution in a reasonable amount
of time without having the solution oscillate within weight space. By introducing the momentum term, which varies
between 0 and 1, the learning rate can be increased while preventing oscillation. The momentum term is introduced
by adding to the weight change some percentage of the last weight change. Common values for η range from 0.1 to
0.9, and common values of α range from 0.2 to 0.8
The training set is comprised of points which have inputs and desired outputs, which may or may not be
in a random order. In this paper, the training points were chosen at random from an ordered table. This allows a weight
correction after each point is trained. This method helps avoid local optimum points in weight space, by creating a
random walk type of weight optimization, and gives a much faster global convergence. This process is then repeatedly
performed for all training examples until a satisfactory output error is achieved. For an in-depth derivation of the back
propagation method, the reader is suggested to consult Rumelhart and McClelland [14].
In order for a robotic manipulator to perform tasks within space, a user must specify a location in three
dimensional space. The robotic controller must then determine the correct joint coordinates to locate the manipulator.
This area of robotics, Inverse Kinematics, has been well researched and many good solutions exist. In all cases the
* note: The subscript notation (i, j, k) means that neuron ui precedes neuron uj, which precedes uk, etc.
translation - 29.7
resultant solutions are highly specific to a particular robot configuration, with exact dimensions. Such explicit solu-
tions do not tolerate changes over time. These changes may be caused by poor tolerances in manufacture, wear over
extended periods of operation, damage to the robot, and poor calibration. Computations are often complex, can be
quite slow, and require a computer capable of performing complex mathematical functions.
An example of a robot which may be used with an artificial neural network control system is the three link
manipulator as shown in figure 4. The forward and inverse kinematic equations, used by the authors in testing, are
given in the equations (4) and (5).
Z0
θ1
a2
X
Denavit-Hartenburg
Transformations
0 0 0 1
The ± sign in θ2 indicates the general configuration of the robot arm. The positive sign (+ve) corresponds to an elbow
down solution, and the negative sign (-ve) corresponds to an elbow up solution.
translation - 29.8
px = c1(a3c23 + a2c2)
py = s1(a3c23 + a2c2) forward kinematic equations
pz = a3s23 + a2s2 (4)
py
θ1 = tan-1
px
β α
θ2 = tan-1 - tan-1 inverse kinematic equations
± √
pz2 + α2 - β2 pz
(5)
pz - a2s2
θ3 = tan-1 - θ2
α - a 2 c2
s1 = sin θ1
c1 = cos θ1
α = + √px2 + py 2
where and
c12 = cos (θ1 + θ2) α2 + pz2 + a22 - a32
β =
2a2
s12 = sin (θ1 + θ2)
It should be noted that the inverse kinematics is not determinate. The sources of indeterminacy for this
manipulator occur:
Other examples of indeterminacy occur in PUMA style robots where left and right arm configurations would give in-
determinacy. These sources of indeterminacy may all be overcome by constraining the inverse kinematics to a partic-
ular case.
Neural Network solutions have the benefit of having faster processing times since information is processed
in parallel. The solutions may be adaptive and still be implemented in hardware by using specialized electronics. Neu-
ral systems can generalize to approximate solutions from small training sets. Neural systems are fault tolerant and
robust. The network will not fail if a few neurons are damaged, and the solutions may still retain accuracy. When
implementing a neural network approach, complex computers are not essential and robot controllers need not be spe-
translation - 29.9
The nature of neural networks require that a set of training points be chosen which represent the nature of
the inputs (x, y, z) and the corresponding outputs (θ , θ and θ ). If the training points chosen tend to be clustered,
1 2 3
then the network will be very accurate when dealing with points near the cluster. In this case, the robot should be fa-
miliar with points throughout the entire workspace; thus, points should be evenly distributed. The order in which
points are presented to the network also affect the speed and quality of convergence. If the points are not presented in
a random order, each training update will tend to train the network for the current section of space which the points are
from.
The neural network architecture chosen for this problem is a simple network with one hidden layer. The
network has three input neurons for the desired position, and three output neurons for the estimated joint angles. A
bias neuron (with a value of +1) is attached to all of the neurons in the hidden layer, and to all of the output neurons.
The number of neurons in the hidden layer varied from 10, 20, and 40. This network architecture is pictured in figure 5.
x θ1
y θ2
z θ3
+1
bias
neuron
29.1 SUMMARY
•
translation - 29.10
29.5 REFERENCES
translation - 29.11
translation - 29.12
analog IO - 30.1
Topics:
•
Objectives:
•
30.1 INTRODUCTION
priority levels
hard vs. soft
• Structured Design
General systems design topics
show the general structure of a program with an executive routine
that calls task routines.
show a program that mixes an asynchronous GUI mixed with a
realtime routine
Modal System design
show the use of global mode bits to track the mode of the system
show how the mode bits changes the flow of execution in the exec-
utive routine.
Flowcharts
map flowchart structures to program structure
using a register value to track the location in the flowchart
State Diagrams
show the use of state diagrams to model a process and then how the
program is written for it.
Failure Analysis
show basic probability theory
show parallel vs serial failures
show failure estimation using theory for single and chained failure
modes
show the methods for categorizing failures as a hazard, danger, etc.
• Communication
Receiving and sending strings
String Handling
Parsing strings
Composing strings
Command and response structures
Error Checking
Non byte oriented data
Networked structured, ie destination address header
A full feedback control system
• Other topics
Keyboard multiplexing
output refreshing, LEDs
analog IO - 30.3
30.3 SUMMARY
1.
1.
1.
writing guide - 31.1
31. WRITING
Reports are the most common form of document written by engineering. Report
writing is an art that we often overlook, but in many cases can make a dramatic impact on
how our work is perceived. Your reports are most likely to find their way to a superiors
desk than you are to meet the individual.
Writing is the last thing you do - Students have been required to do rough drafts to
clarify their thoughts and determine what they want to say. To put it simply, if
you don’t know what you will say you are not ready to write. When you are
ready to write it should already be clear. An author should not start to write the
report until all
Don’t find ’creative ways to say things’ - many student have been taught that they
should not repeat themselves and find multiple ways to say things. When this is
done in technical documents it leads to confusion. Authors should use precise
terms (as many times as needed) and avoid trying to generate creative word
choices. For example, we could increase confusion by also describing transla-
tion as motion, movement, sliding, displacing, etc.
Keep it simple - In an attempt to increase the ’prestige’ of a document many
authors will use ’large’ words. This often leads to confusion and should be
avoided. In some cases when an author is unsure they will respond by making
their writing style more complex but most readers recognize this. For example,
“Electronic computer based digital readings can provided a highly accurate data
source to improve the quality of the ascertained data.” could be replaced with
“Computer based data collection is more accurate.”
Clear, concise and to the point - In the past many students have been required to
write reports with a minimum number of words. This encourages writers to
break ideas into smaller pieces. But, readers appreciate shorter documents that
get to the point. For example, “Readings of the pressure, as the probe was
ascending up the chimney towards the top, were taken.” is better put “Pressure
probe readings were taken as the probe was inserted”.
There is no great opening paragraph - Over half of all student authors spent a large
amount of time on the opening paragraph to set the tone for the report. In my
experience the longer a student tries to write the opening paragraph, the worse it
is. In most cases it can be removed entirely from the document without any neg-
ative impact. Ironically, the writing of these students often improves once they
writing guide - 31.2
get beyond the first paragraph, but they have already lost the interest of the
reader.
Transitions are not that important - Students are often coached to create clean tran-
sitions between sentences and paragraphs. As a result they often add unneces-
sary sentences and words. Words that are often warning signs are also and then.
You don’t need to keep the good stuff to the end - Many authors try to write the
report so that there is a ’climax’. It can be very frustrating for a reader who
reads 90% of a report before they encounter some discussion of the results.
(note: a report is not like a mystery novel.)
Saying it more than once is acceptable- Over 3/4 of students feel that it is unac-
ceptable to state facts more than once. In truth you want to state fact as many
times as necessary to make a technical point. In the case of very important
details, this will be in the abstract, introduction discussion and conclusion.
A better procedure for writing engineering reports is detailed below. The method
leaves writing to one of the last stages, but it becomes much easier when done this way.
1. Plan and do the work as normal. Regardless of what the report requires this will
often include drawings, sketches, graphs/charts of collected data, pictures, etc.
2. Do the analysis (preferably on computer) of the data and results. These should
be organized into a logical sequence.
3. Review the results to ensure they make sense and follow a logical flow.If neces-
sary add figures to help clarify.
4. Review the materials to verify that they make sense without the text.
5. Put in point form notes to lay out the document.
6. Write the text for the report.
7. Verify that the report conforms to guidelines.
8. Proofread.
Reports are written for a number of reasons, as listed below. In all cases they are
designed to communicate technical information. Report readers are often looking for clear
details that lead to a clear set of conclusions. By contrast, they are not looking for content
that is highly philosophical, or riddled with artistic diversions.
- (lets forget about this one) as a student you must do them to get marks
- to let other engineers know the results of an experiment
- to leave a record of work done so that others may continue on
- as a record you may use yourself if you must do work again some time later
- they are required for legal reasons (contract or legislation)
- they bring closure to the project
writing guide - 31.3
Knowing the level of reader is very important when writing. Engineers often write
reports for other engineers, or technically aware readers. As a result an engineer will often
write at their own knowledge level. When necessary, appendices can be added to accom-
modate readers with variable backgrounds. The depth of detail is another common issue.
The author should provide enough detail to allow others to follow and reproduce the
results. The two questions below should form a good basis for evaluation.
“What happens if I am hit by a car; could somebody pick up my report and con-
tinue?” if the answer to this question is no the report requires more detail.
The list below shows many of the reports written by engineers. In general, reports
give necessary background, discuss details and then draw conclusions from them. The
credibility of a report is based upon the evidence it contains. These then support the con-
clusions drawn by the author.
Laboratory - Theses ‘Lab Reports’ describe one or more experiments, the results,
and the conclusions drawn from them.
Consulting - A summary of details, test results, observations, and a set of conclu-
sions. Typically they will also contain a recommendation.
Project - A description of work done in a project to inform other engineers who
may be asked to take up further work on the project.
Research - A summary of current advances in a topic. This should end with some
comparison of alternatives.
Interim - A report to apprise supervisors and others as to the progress of a project
or other major undertaking.
Executive - A brief summary of the report, and any implications for decision mak-
ing at the management levels.
Proposals - A technical document describing a project for the purposes of obtain-
ing permission to proceed.
• Purpose: These reports should outline your procedure and results in detail. They
writing guide - 31.4
should also contain the analysis and conclusions. The completeness of detail allows you
(and others) to review these and verify the correctness of what has been done. These have
been historically used for hundreds of years and are accepted as a form of scientific and
legal evidence. It is completely unacceptable to make incorrect entries or leave out impor-
tant steps or data.
• Standard Format:
1. Title, Author, Date - these make it clear what the labs contain, who did the work,
and when it was done. If the report is done for a course it should also include
the course name/number, the lab instructor and the lab section.
2. Purpose - a brief one line statement that allows a quick overview of what the
experiment is about. This is best written in the form of a scientific goal using
the scientific methods.
3. Theory - a review of applicable theory and calculations necessary. Any design
work is done at this stage
4. Equipment - a list of the required equipment will help anybody trying to repli-
cate the procedure. Specific identifying numbers should be listed when possi-
ble. If there are problems in the data, or an instrument is found to be out of
calibration, we can track the problems to specific sets of data and equipment.
5. Procedure - these are sequential operations that describe what was done during
the experiment. The level of detail should be enough that somebody else could
replicate the procedure. We want to use this as a scientific protocol.
6. Results (Note: sometimes procedure and results are mixed) - the results are
recorded in tables, graphs, etc. as appropriate. It will also be very helpful to note
other events that occur (e.g. power loss, high humidity, etc.)
7. Discussion - At this stage the results are reviewed for trends and other observa-
tions. At this point we want to consider the scientific method.
8. Conclusions - To conclude we will summarize the significant results, and make
general statements either upholding or rejecting our purpose.
• Style: These are meant to be written AS the work is done. As a result the work
should be past tense
• Laboratory reports should have one or more hypotheses that are to be tested. If
testing designs these are the specifications. Examples might be,
• NOTE: These reports are much easier to write if you prepare all of the calcula-
tions, graphs, etc. before you start to write. If you sit down and decide to do things as you
writing guide - 31.5
write it will take twice as long and get you half the marks...... believe me, I have written
many in the past and I mark them now.
Laboratory Exercise 7
Author: I. M. Wyred
Purpose: To derive a theoretical model of the rate at which coffee cools and exper-
imentally verify the model and find coefficients.
Theory:
When coffee is heated kinetic energy is added, when coffee is cooled kinetic
energy is removed. In a typical use, coffee cools as heat is lost through convection and
conduction to the air and solids in contact. The factors involved in this convection/conduc-
tion can be difficult to measure directly, but we can approximate them with a simple ther-
mal resistance. Consider the temperature difference between the coffee and the ambient
temperature. The greater the temperature difference, the higher the rate of heat flow out of
the coffee. This relationship can be seen formally in the equation below. We can also
assume that the atmosphere is so large that the heat transfer will not change the tempera-
ture.
writing guide - 31.6
1
q = --- ( θ coffee – θ air )
R
where,
We can also consider that coffee has a certain thermal capacity for the heat energy.
As the amount of energy rises, there will be a corresponding temperature increase. This is
known as the thermal capacitance, and this value is unique for every material. The basic
relationships are given below. I will assume that the energy flow rate into the coffee is
negligible.
1 –1 dθ coffee –1 -
∆θ coffee = ---------------- ( q in – qout ) = ---------------- q -----------------
- = --------------- q
C coffee C coffee dt C coffee
where,
C coffee = thermal capacitance
C coffee = M coffee σ coffee
where,
M coffee = mass of thermal body
σ coffee = specific heat of material in mass
The temperatures can be found by consider that the energy flowing out of the cup,
and into the atmosphere is governed by the resistance. And, the temperature in the coffee
and air are governed by the two capacitances. We will make two assumptions, that the
thermal capacitance of the atmosphere is infinite, and that there is no energy flowing into
the coffee.
writing guide - 31.7
dθ coffee –1
-----------------
- = ---------------
-q
dt C coffee
dθ coffee
= --------------------------------- --- ( θ coffee – θ air )
–1 1
∴------------------
dt M coffee σ coffee R
dθ coffee
∴------------------ + ------------------------------------- θ coffee = ------------------------------------- θair
1 1
dt M coffee σ coffee R M coffee σ coffee R
This differential equation can then be solved to find the temperature as a function
of time.
Guess Ct d- Ct
θ = A + Be ---- θ = BCe
dt
B –1
BC + ------------------------------------- = 0 C = -------------------------------------
M coffee σ coffee R M coffee σ coffee R
C(0)
θ 0 = A + Be = θ air + B B = θ 0 – θair
The final equation is,
–t
----------------------------------
-
M coffee σ coffee R
θ = θ air + ( θ 0 – θ air )e
The time constant of this problem can be taken from the differential equation
writing guide - 31.8
above.
τ = M coffee σ coffee R
Equipment:
1. The coffee pot was filled with water and this was put into the coffee maker. The
coffee filter and grounds were put into the machine, and the machine was turned on. After
five minutes approximately the coffee was done, and the pot was full.
2. The mass of the empty coffee cup was measured on the scale and found to be
214g.
3. The air temperature in the room was measured with the thermometer and found
to be 24C. The temperature of the coffee in the pot was measured using the thermocouple
and temperature meter and found to be 70C.
4. Coffee was poured into the cup and, after allowing 1 minute for the temperature
to equalize, the temperature was measured again. The temperature was 65C. Readings of
the coffee temperature were taken every 10 minutes for the next 60 minutes. These values
were recorded in Table 1 below. During this period the cup was left on a table top and
allowed to cool in the ambient air temperature. During this period the mass of the full cof-
fee cup was measured and found to be 478g.
writing guide - 31.9
0 65
10 53
20 43
30 35
40 30
50 28
60 26
Discussion:
The difference between the temperature of the coffee in the pot and in the cup was
5C. This indicates that some of the heat energy in the coffee was lost to heating the cup.
This change is significant, but I will assume that the heating of the cup was complete
within the first minute, and this will have no effect on the data collected afterwards.
The readings for temperature over time are graphed in Figure 1 below. These show
the first-order response as expected, and from these we can graphically estimate the time
constant at approximately 32 minutes.
temp
(deg C)
60
40
24
20 t (min)
0 20 40 60
τ ≈ 32min
We can compare the theoretical and experimental models by using plotting both on
the same graph. The graph clearly shows that there is good agreement between the two
curves, except for the point at 30 minutes, where there is a difference of 3.5 degrees C.
temp
(deg C)
experimental data
60 mathematical model
max. difference
40 of 3.5 deg. C
20 t (min)
0 20 40 60
This gives an overall error of 8.5% between these two curves, compared to the
total range of the data.
3.5
error = ------------------ 100 = 8.5%
65 – 24
Finally, the results can be used to calculate a thermal resistance. If we know the
mass of the coffee and assume that the coffee has the same specific heat as water, and have
the time constant, the thermal resistance is found to be 1731sC/J.
Conclusion:
In general the models agreed well, except for a single data point. This error was
relatively small, only being 8.5% of the entire data range. This error was most likely
caused by a single measurement error. The error value is greater than the theoretical value,
which suggests that the temperature might have been read at a "hot spot". In the procedure
the temperature measuring location was not fixed, which probably resulted in a variation
in measurement location.
• A final draft of the report is available on the course website in Mathcad format,
and it will be distributed in the lab.
31.6 RESEARCH
• Purpose: After looking at a technical field we use these reports to condense the
important details and differences. After reading a research report another reader should be
able to discuss advanced topics in general terms.
• Strategy A:
- draft reports will be edited for contect. As a result they must be double spaced to
make room for editing comments.
writing guide - 31.12
Title page
- title of project
- Department/Company (i.e., unviersity) name
- course/name
- author list
- date of submission
Executive Summary/Overview
- the purpose is to let people know if they want ro read the report
- write it last after all the details are done
- briefly describe the purpose of the work
- what were the results, be detailed
- given numbers
- keep it short
Nomenclature
- list all variables used in the report
- put in alphaetical order, with upper case first
- list greek and other variables separately
Table of contents
- list all major sections, and minor sections to a reasonable level
- list page numbers
- right justify the numbers
Introduction
- if you must include this section, it should be brief
- the introduction is expected to outline details to be discussed in
the report.
Body............
Title page
writing guide - 31.13
• Purpose: These reports allow the developer or team to document all of the design
decisions made during the course of the project. This report should also mention avenues
not taken. Quite often the projects that we start will be handed off to others after a period
of time. In many cases they will not have the opportunity to talk to us, or we may not have
the time. These reports serve as a well known, central document that gathers all relevant
information.
• Strategy A:
31.9.1 Executive
Purpose: These reports condense long topics into a very brief document, typically
less than one page in length. Basically these save a manager from having to
read a complete report to find the details that interest him/her.
31.9.2 Consulting
31.9.3 Memo(randum)
mation.
- begin with Date, From, To, Subject:, cc:
31.9.4 Interim
Purpose: This report is normally a formal report to track the progress of a project.
When a project is initially planned, it will be given a timeline to follow. The
interim report will indicate progress relative to the initial timeline, as well as
major achievements and problems.
31.9.5 Poster
Purpose: A presentation format that conveys the key concept visually so that a
spectator would have a concept of the project in a glance, and be able to review
the key concepts in under one minute.
31.9.7 Oral
- This can be a very effective method of comminucation when done well, but it can
also be very cruel because an audience may be forced to sit through an uncom-
fortable experience.
31.9.8 Patent
At the end of each lab period, the notebook should be witnessed and signed by
either the instructor or a laboratory assistant. The notebook should be submitted to your
instructor for grading within 24 hour of the end of the lab.
For team studies, every member of the team is expected to keep an independent
record (in his/her own laboratory notebook) of the experimental procedure, results, and
preliminary interpretation of the results. This will facilitate team discussions.
Well-kept laboratory notebooks are very important. They facilitate the statistical
analysis and interpretation of the data and the eventual writing of a final technical report.
They provide a legal record of events and often make the difference between winning or
losing legal cases on patents and on a company's right to use a certain technology in their
manufacturing facilities. Losing one of these cases could bankrupt a company or cost it
millions of dollars in royalty!
• In reports we must back up our opinions with data, equations, drawings, etc. As a
result we use a number of common items,
writing guide - 31.17
- figures
- tables
- equations
-
• When these elements are included, there MUST be a mention of them in the writ-
ten text.
• These days it is common to cut and paste figures in software. Make sure
31.11.1 Figures
• They should be labelled underneath sequentially and given a brief title to distin-
guish it from other graphs. For example “Figure 1 - Voltage and currents for 50 ohm resis-
tor”
• The figures do not need to immediately follow the reference, but they should be
kept in sequence. We will often move figures to make the type setting work out better.
- if fitting a line/curve to the points indicate the method used (e.g. linear regres-
sion)
- try not to use more than 5 curves on the same graph
- use legends that can be seen in black and white
- clearly label units and scales
- label axes with descriptive term. For example “Hardness (RHC)” instead of
“RHC”
writing guide - 31.18
31.11.2 Graphs
• Units on axes
• Should have points drawn and connected with straight (or no) lines if experimen-
tal.
• Smooth lines are drawn for functions or fitted curves. If a curve has been fitted
the fitting method should be described.
- titles should clearly, and disctinct, indicate why the content of the figure is signif-
writing guide - 31.19
icant.
31.11.3 Tables
- titles should clearly, and disctinct, indicate why the content of the figure is signif-
icant.
31.11.4 Equations
• When presenting equations, use a good equation editor, and watch to make sure
subscripts, etc are visible.
+
∑ Fx = – T 1 sin 60° + F R sin θ R = 0 (1)
0.866
∴ tan θ R = ----------------
1 + 0.5
∴θ R = 30°
∴F R = 170N
• When analyzing the results from an experiment there are a few basic methods
that may be used,
Absolute difference - For example if the theoretical value is 105.8 and the mea-
sured value is 104.0 then you would say that "... the measured value was 1.8
below the theoretical value."
Percent difference - Avoid using this, but if must remember to assign a sign to the
percentage value. For example if the theoretical value is 100 and the measured
value is 50 then you would say that "... the measured value was 50% below the
theoretical value." OR "... the theoretical value was 200% of the experimental
value."
Mean and standard deviation - Useful for multiple data readings.
Point by point - look at each point, and compare it to another.
writing guide - 31.21
- Discuss the fit between theory and measured. Explain differences in terms of
hard facts and with numbers.
- Don’t make vague references to human or experimental error.
- Try to develop a conclusion about the quality of the experimental data.
- Make a recommendation about changes that would improve that data quality.
A results summary allows both the author and the reader a chance to review the
resuls before a final conclusion. These should include the important results presented else-
where in the report. It is best to use a graphical format such as a table or list.
31.11.7 References
• References help provide direction to the sources of information when the infor-
mation may be questioned, or the reader may want to get additional detail.
• Reference formats vary between publication sources. But, the best rule is be con-
sistent.
• One popular method for references is to number them. The numbers are used in
the body of the paper (eg, [14]), and the references are listed numerically at the end.
• Another method is to list the author name and year (eg, [Yackish, 1997]) and then
list the references at the end of the report.
31.11.8 Acknowledgments
• When others have contributed to the work but are not listed as authors we may
writing guide - 31.22
31.11.9 Abstracts
31.11.10 Appendices
Reports often include appendices to reduce bulk from the body. When putting
material in an appendix it should stand alone and be referred to in the body of the report. It
is customary to provide a summary of the results in the appendix, unless it is tutorial in
nature. Examples of common appendices are given below.
- use engineering notation (move exponents 3 places) so that units are always
micro, milli, kilo, mega, giga, etc. Avoid number formats such as ’0.00000456’
- use significant figures to round the numbers. For example a length of 0.345432in
for a dimension measured with a ruler is ridiculous.
- units are required always
- greek symbols or the unit name spelled out
- take care to distinguish between frequency in hertz and radians/sec
- put a ’0’ before a point, 0.5 not .5
-
General Requirements
- a standard border
- a title block with a part name, employer/client/etc, designers name, date
of creation, units used, tolerances (unless noted on each dimension).
Orthographic views
- three views unless axial symmetry allows fewer.
- the front view should be the most descriptive
- aligned correctly
- any hole/arc over 180 degrees must have center lines and marks
- blind holes made by drilling must have a drill point shown
- all parts must be manufacturable
Dimensioning
- The location and size of each feature must be clearly defined
- critical assembly dimensions must be directly readable and not require
writing guide - 31.24
addition.
- holes that form patterns must be dimensioned relative to each other and
relative to a major feature
- smaller dimensions should be closer to the part
- chained dimensions must be aligned
- hole sizes and dimensions should be on the profile view
- arcs/circles more than 180 degrees are sized by diameter, otherwise radius
is used.
- redundant dimensions should be eliminated
Tolerancing
- Tolerances must be reasonable for manufacturing
- Tolerances must ensure proper assembly and operation at maximum/min-
imum material conditions
- mating parts should not have identical dimensions, they should be free
running or press fits.
- Smaller tolerances should be used for mating parts
- a general part tolerance should be defined for the part, and smaller toler-
ances indicated for critical dimensions to reduce clutter
31.11.14 Discussions
- discussions are expected to state all of the details. Sometines these might be obvi-
ous when the data is observed, but they must be stated.
31.11.15 Conclusions
- This is the section to restate the key numbers that support the purpose of the lab.
- clear, concise recommendations are needed.
- You must not make statements such as ’this lab was a wonderful learning experi-
ence’ or ’all students should enjoy this lab’.
31.11.16 Recomendations
- This is the section to restate the key numbers that support the purpose of the lab.
- clear, concise recommendations are needed.
-
writing guide - 31.25
31.11.17 Appendices
- Some material is too bulky for a report body, these are normally moved to an
appendix.
- when material is placed in an appendix, it must be summarized in the body of the
report.
- The report must briefly summarize (ussually a figure or equation or more) and
then refer to the appendix.
- it is expected that there will be some duplication between the appendix and the
summary in the appendix.
31.11.18 Units
This list below indicates some of the general problems students encounter when
writing technical reports and some strategies for fixing these problems.
developed for efficiency and clarity. Examples include DMM, HTTP, kitted,
parted, etc. All acronyms should be defined at their first use.
Colloquialisms - Avoid informal language in technical reports. Use of informal
language such as ’show me the beef’ will look unprofessional, confuse some
readers and make material easily dated.
Everybody has suffered from writers block before. The obvious cause is not being
sure what to write. This can be caused by a lack of understanding about the topic, or possi-
bly how to express the point.
Knowledge - In the case you are not sure what you are writing about you should
spend time clarifying your knowledge before returning to writing. Reorganizing
the material often helps to create clarity.
Lack of knowledge - Current knowledge is based upon knowledge discovered and
used before. This means that no matter how simple something apparently is, it
has more layersw of knowledge than could be known by any one person. In the
cases where you don’t know everything you should define what you do/don’t
know.
Skip that great opening paragraph - It is quite acceptable to start by writing central
sections of a report. Many authors will write the abstract, introduction and con-
clusions last.
It doesn’t need to sound impressive - Simply write what you mean to say. If you
are having trouble saying it skip it and come back later, or leave it out.
The table below indicates some good and poor choices for words and terms to use
in technical papers.
Good Bad
calculated found,
measured read
writing guide - 31.27
Good Bad
chose optimized
parallax error human error
Good Bad
Good Bad
in order to be
needed to be ----> is
needed to be used
so as to
decided to be
can be located
found to have
found through
it was found that
writing guide - 31.29
implementation of
important
precise
exact
perfect
noted to be
invoved
allowed for it
was found to be
was looked thorough ---> reviewed
along with - with
also
then
decided on - selected
found - measured, calculated
The forms on the following pages are examples of forms that may be used to eval-
uate written reports during the semester. The
Lab Number/Title:
Technical:
technically accurate
theory section is complete
complete procedure and collected data
data analysis
theory is verified with data
conclusions based on data
adequate use of numbers
A = _____ / 10
Communication:
clear and concise
good use of figures, graphs and tables
use of english
professional style
passive voice/past tense
suitable use of formatting
B = _____ / 10
Team:
no yes
Follows defined formats and requirements
Comments:
31.16 PATENTS
Abstract
writing guide - 31.32
A method of swing on a swing is disclosed, in which a user positioned on a standard swing sus-
pended by two chains from a substantially horizontal tree branch induces side to side motion by
pulling alternately on one chain and then the other.
Inventors: Olson; Steven (337 Otis Ave., St. Paul, MN 55104)
Appl. No.: 715198
Filed: November 17, 2000
I claim:
a) suspending a seat for supporting a user between only two chains that are hung from a tree
branch;
b) positioning a user on the seat so that the user is facing a direction perpendicular to the tree
branch;
c) having the user pull alternately on one chain to induce movement of the user and the swing
toward one side, and then on the other chain to induce movement of the user and the swing toward
the other side; and
d) repeating step c) to create side-to-side swinging motion, relative to the user, that is parallel to
the tree branch.
2. The method of claim 1, wherein the method is practiced independently by the user to create the
side-to-side motion from an initial dead stop.
3. The method of claim 1, wherein the method further comprises the step of:
e) inducing a component of forward and back motion into the swinging motion, resulting in a
swinging path that is generally shaped as an oval.
writing guide - 31.33
4. The method of claim 3, wherein the magnitude of the component of forward and back motion is
less than the component of side-to-side motion.
Description
TECHNICAL FIELD
A few basic types of swings have been around for generations. Perhaps the most common is one
that includes a seat suspended between two ropes or chains that are hung from a tree branch or
other substantially horizontal support. These swings are often found in side-by-side sets of two or
three or more on, for example, a school playground.
Young children often need help to climb onto a swing, and may need a push (sometimes even an
"underdog" push) to begin swinging. Others may be able to begin the swinging movement on
their own by pushing with their feet against the ground, and once moving may coordinate the
motion of their legs and body in what may be called "pumping" to sustain the movement of the
swing. When swinging in this manner, the user travels along a path as generally shown in the
cross-section of FIG. 1. Another method of swinging on a swing involves twisting the seat around
repeatedly so that the chains or ropes are wound in a double helix. When allowed to unwind, the
swing spins quickly, which can be entertaining for the user.
These methods of swinging on a swing, although of considerable interest to some people, can lose
their appeal with age and experience. A new method of swinging on a swing would therefore rep-
resent an advance of great significance and value.
In accordance with one embodiment of the present invention, a method is provided for swinging
on a swing. The swing comprises a seat for supporting a user that is suspended between two
chains that are hung from a substantially horizontal tree branch. The method comprises the steps
of: a) positioning a user on the seat; and b) having the user pull alternately on one chain to induce
movement of the user and the swing toward one side, and then on the other chain to induce move-
ment of the user and the swing toward the other side, to create side-to-side motion. In another
embodiment of the invention, the swinging method may be practiced independently by the user to
create the side-to-side motion from an initial dead stop. These and other features of the invention
are described in greater detail below.
FIG. 1 is a schematic top view of the swinging path of a swing used in accordance with conven-
tional swinging methods.
writing guide - 31.34
FIG. 2 is a front view of a swinging path of a swing used in accordance with one embodiment of
the swinging method of the present invention.
FIG. 3 is a schematic top view of a swinging path of a swing used in accordance with a second
embodiment of the swinging method of the present invention.
The present inventor has created, through experimentation on a standard swing, a new and
improved method of swinging. The swing is of the type described above, in which a seat is sus-
pended between two chains that are hung from a substantially horizontal tree branch. As is appar-
ent to those of ordinary skill in the area of swinging, the chains could be replaced with ropes,
cables, or the like, or the tree branch could be replaced with another substantially horizontal sup-
port such as a metal bar or pole.
The standard swing should be a single swing that is suspended sufficiently far away from obstruc-
tions to make the practice of the inventive swinging method completely safe. That is, the swing
should be suspended a sufficient distance away from the trunk of the tree from which it sus-
pended, and from any other swing, building, support, overhead wire, or other obstruction or threat
to safety that may be present.
The standard method of swinging on a swing is defined by oscillatory motion of the swing and the
user along an axis that is substantially perpendicular to the axis of the tree branch from which the
swing is suspended. This "forward and back" movement has been known for generations, and is
illustrated in FIG. 1. In contrast to the conventional method of swinging, the present inventor has
discovered that much greater satisfaction can be obtained by alternately pulling on one chain to
move the swing and the user toward that side, and then pulling on the other chain to move the
swing and the user toward that side. This side-to-side oscillatory motion of the swing and the user
is thus along an axis that is substantially parallel to the axis of the tree branch from which the
swing is suspended, and is illustrated in FIG. 2. This side to side swinging method has the added
benefit that it can be continued for long periods of time simply by alternately pulling on one chain
and then the other. The importance of sufficient clearance between the swing and any obstructions
or threats to the user's safety is apparent.
The present inventor has discovered certain other improvements in the art of swinging on a swing,
either or both of which can be used in conjunction with the swinging method described immedi-
ately above. The first is that the inventive swinging method can be initiated from a dead stop with-
out pushing, and without the user having to contact the ground. That is, the user can climb onto
the swing, and begin from an initial dead stop to pull first on one chain, and then on the other
chain, alternately until the user and the swing have begun to swing side-to-side in accordance with
the inventive swinging method described herein. This enables even young users to swing indepen-
dently and joyously, which is of great benefit to all.
Another improvement on the swinging method described above is the induction into the side-to-
side swinging movement of a component of forward-and-back motion. That is, by skillful manip-
ulation of the body, the present inventor has found it possible to add a relatively minor component
writing guide - 31.35
of forward-and-back motion to the side-to-side swinging motion, resulting in a swinging path that
is generally shaped like an oval, as is shown in FIG. 3. It is preferred that the magnitude of the for-
ward-and back motion (shown in FIG. 3 as being along the Y axis) be less than the magnitude of
the side-to side motion (shown in FIG. 3 as being along the X axis), so that the latter predomi-
nates. In this manner, the motion can be more easily continued simply by alternately pulling on
one chain and then the other in the manner described.
Lastly, it should be noted that because pulling alternately on one chain and then the other resem-
bles in some measure the movements one would use to swing from vines in a dense jungle forest,
the swinging method of the present invention may be referred to by the present inventor and his
sister as "Tarzan" swinging. The user may even choose to produce a Tarzan-type yell while swing-
ing in the manner described, which more accurately replicates swinging on vines in a dense jungle
forest. Actual jungle forestry is not required.
32. PROJECTS
32.1
The project is intended to emphasize proper project management and team skills to
produce a complex engineering system from concept to completion.
32.2 OVERVIEW
Cranes are used to move large loads in industrial environments. To do this they
normally lift a load and then move it to a new position. At the end of the motion
the load is put down. If the load is swaying, the operator may have to pause
before putting down the load. This delay is undesirable because it increases the
total cycle time for the crane.
This design project will endeavor to build a proof-of-concept prototype for an anti-
sway system for a gantry crane as shown in Figure 32.1. The crane will ride on
a wooden beam constructed with 2x4 lumber (actually smaller). An electric
writing guide - 32.2
motor will drive the cart left or right. The mass will hang below the cart.
1Kg mass
The system will use active compensation to move the cart between positions, and
to move the cart to compensate for swaying of the suspended mass. The overall
system performance will be evaluated on how quickly the crane can move the
load, and then eliminate sway. Additional factors used in assessment of perfor-
mance will be the mass, cost and overall design quality.
The design will be mounted on 2x4 lumber and controlled through a wire harness
to external electronics and power supplies. The apparatus must be easily
mounted and removed without damaging the experimental setup. It will be
expected to carry a 1Kg mass, suspended 40cm below the top of the 2x4. The
2x4 will be oriented so that the longer dimension is vertical. The mass will be
mounted with a carriage bolt that is at least 3 inches long, with a 1/4" diameter.
The arm must be able to swing freely, as it is meant to be equivalent to a cable
suspending the mass. The mass will be provided with a rod that will be between
1/4" and 1/2". The mass will be a cylinder that is free to rotate to reduce
dynamic effects rotation. The width of the mass will be less than or equal to the
writing guide - 32.3
width of the 2x4. None of the cart, except for the arms, should be less than 2cm
below the bottom of the 2x4.
The objectives for the design are itemized below. The following equation will be
used to assess the overall score for the design.
- The equipment cost should be minimized. The goal of $150 or less has
been specified as very important.
- Mass should be minimized, the target value is 0.2Kg.
- A clearly justified and supported design process. This will be judged
before the competition.
- The settling time, ts, to less than a +/- 0.5 inch margin around the com-
manded position. This time will be determined using the best ts/d for two
arbitrary target motions.
- The test will start with the mass stationary at one position. The gantry sys-
tem must move the mass to another position once started. The total
movement range will be 2 to 20 inches in 2 inch increments.
C M
t s 2 --------
200
-
B T
-------
0.2
score = --
- ( 4 ) ( 10 ) ( 10 ) ( 2 )
d
where,
t s = the time to settle (s)
C = total cost of part ($)
d = distance moved in test (m)
B = build quality score assigned by judges (0=best, 1=worst)
T = theory quality score assigned by judges (0=best, 1 = poor)
M = mass of the apparatus (Kg)
32.3 MANAGEMENT
The management details for the project are outlined below. These may evolve as
the semester progresses.
32.3.2 Teams
The teams are composed of up to 4 students from EGR 345 and one student from
EGR 101. The EGR 345 teams are grouped using the skills survey attached in
the appendices.
Teams are expected to divided tasks for members to work in parallel. It is also
expected that team members will review the work of others to ensure accuracy
and completeness. This is particularly true of calculations, materials lists draw-
ings and budgets.
All team members are expected to work in a professional manner. The general
rules of conduct in a team are,
- treat others as you want to be treated
- communicate expectations and problems clearly
- be polite and accommodating
- when problems arise, help to solve them, even if they are not your fault.
Don’t lay the blame for problems on others.
In the event that team members cannot resolve differences with a team member,
the team may ’fire’ the team member by a vote (it must be unanimous, except
writing guide - 32.5
for the member in question). In this case the ’fired’ student is responsible for
finding another team that will accept (or ’hire’) them. In the event they cannot
find another team to join, they will be expected to perform all of the work them-
self. The firing mechanism is intended to deal with individuals who ’harm’ the
progress of the team, not for non-participants.
32.4 DELIVERABLES
Concepts are normally communicated with sketches that make the overall design
clear. Components that would be expected for this type of design are,
- Sketches should be done using normal drafting practices. A good set of
sketches will include 2-D, isometric and pictorial views.
- Calculations should be provided that support the design concept.
- Electrical schematics to describe the control system.
- Block diagram to describe the control system.
- Lists of components and budgets to indicate the major parts of the system.
- Other items, such as flowcharts, are often required to clarify the design
concept.
This project involves participants from EGR 101 and 345. Although the students
are at different points in their academic careers they are all considered peers,
and should have equal voices in the team. To help clarify issues of differences
between the EGR 101 and 345 students, a ’contract’ will be written that formal-
izes the responsibilities of the students in EGR 101. As with most contracts, it
outlines a process that is mutually beneficial. In this case both parties are
expected to benefit in an educational sense. The contract will be written in such
a manner that if all requirements are satisfied work will be marked ’as-is’. In
the event of a failure, marks will be deducted to hold the responsible party(s)
accountable.
writing guide - 32.6
Teams are expected to submit progress reports on a weekly basis. These reports
will include the following elements divided into sections with a heading for
each. Point form is preferred, but complete sentences must be used. (Note:
’Parts purchased’ should be ’Parts were purchased for the cart assembly.’) Each
section should include items completed since the last report, and current action
items. If there is nothing to be said about a category use ’no changes’, ’nothing
done’, or ’complete’ as appropriate.
Cover Page - a cover sheet indicating the course, project and tema num-
bers. The names of all team members should be listed on the cover,
including the EGR 101 team members.
Gantt chart - updated on a weekly basis and included each time.
Budget - when changes are made, include an updated budget.
Mass Table - when changes are made, include an updated mass table.
Design - Design changes should be indicated. Appropriate drawings, sche-
matics, or equivalent should be included. When appropriate, these should
normally be accompanied by a new set of models, calculations and/or
simulations to verify the new design.
Software - The current status of software development should be indicated,
including major accomplishments and issues.
Fabrication - The status of items being built/assembled should be indicated.
Purchasing - The status of ordered items should be indicated.
Testing - The testing progress should be indicated, including any numerical
results when available.
Other Issues - Items that may impact the success of the team should be
indicated.
Performance - A prediction of performance, including the overall perfor-
mance equation.
Early in the semester, other items will be requested, such as a combined timetable
for all team members, and a skills inventory. These should only be included in the reports
the weeks they are requested.
The design proposal is used to present all of the design details in a single docu-
ment. The focus of this document is a MINIMAL AMOUNT OF TEXT, but a thorough
presentation of the design details. Typical elements are listed below in a typical sequence;
- a cover page indicating all of the team members and all other pertinent informa-
writing guide - 32.7
tion.
- a table of contents
- three view drawings of each significant part
- block diagram of the control system
- block diagrams showing the system architecture
- circuit schematic
- if a motion profile will be used, it should be documented
- an assembly drawing of the mechanism, including a BOM
- a budget listing each of the parts that must be purchased/acquired. Catalog pages
and quotes can be used to validate the budget. In the final report, copies of
receipts, or catalog pages will be required.
- a weight inventory, itemized by each part of the design
- additional calculations for mechanical design issues, such as stress that may
result in failure. Normally these result in a factor of safety.
- the equations of motion for the system
- a Scilab program that verifies the operation of the system using the equations of
motion.
- a C program that implements the controller as designed.
The final design will follow the same structure as the Design Proposal, with the
addition of the following elements.
- test results
- the drawings, calculations, etc. should be based upon the final design. It is rea-
sonable to write a page or less about the modifications that were required, but it
is a minimal/optional part of the report.
The report should concisely and clearly describe the design, as shown in the dia-
grams, drawings, calculations, etc. In general the format of the report is as outlined below.
Sections and subsections should be numbered.
Cover page
Executive summary - one page or less that summarizes the design and results.
Table of contents
Design description - this section should describe the mechanical, electrical and
software design aspects. Subsections should focus on the following elements;
Drawing summary - selected isometric and assembly drawings
System block diagrams
Description of control scheme, such as the motion profile
Schematics
writing guide - 32.8
Appendix - Drawings
Appendix - Stress and other similar calculations
Appendix - Controller C program
Appendix - Simulation program
Appendix - Receipts and cost evidence
Final reports will be evaluated on numerous factors inculding the clarity for the
design documentation (i.e., how clear is what has been done?), theory to backup the
design (does the theory match the actual design?), did the theory and actual match?
Gantt charts are used to track major project tasks, including sequencing. a brief
tutorial on project management with Microsoft Project is available at http://
www.stylusinc.net/ms_project_tutorial/project_management.shtml. You may
also download free project management software from http://www.smart-
works.us/htm/downloads.htm. In general a Gantt chart should include,
- Most project parts should have a development, and then a review stage by
another team member. For example, if one task is preparing mechanical
drawings, this should be followed by a review task - done by another
team member.
- Most tasks that stretch more than a week should be broken into smaller
sub tasks.
- A Gantt chart should be presented on one single sheet. If it is small
enough this can be one page, otherwise a larger sheet can be used.
- On a weekly basis a Gantt chart should be updated to include the comple-
tion of tasks.
writing guide - 32.9
32.5.2 Drawings
All drawings will observe the standards used in EGR 101 (see the EGR 101 or 345
course pages). This includes dimensions and tolerances that can be produced
using the available equipment and materials. Please note that ’sketch’ means
that it is done by hand, approximately, while drawing means it is done formally
in a CAD package. Normally you should create solid models, and then generate
multiview drawings. Note: All drawings must have a title block.
Shaded views have very little value and should be avoided, wireframe drawings
are much more useful. If there is a definite need to include a shaded drawing,
change the background to change the quantity of toner used.
Budgets should list all substantial components. Consumables, such as bolts are
normally listed under a ’miscellaneous’ heading. However, all other compo-
nents should be listed, and prices provided. If the components have been drawn
from the engineering stores, similar devices can be identified from catalogs and
those prices may be used. If your design calls for parts not commonly issued to
engineering students, you may be required to purchase these yourself. An excel-
lent local source of small parts is hobby stores, such as Ryder’s Hobbies on 28th
St. The budget should also list the quantity of parts/material, price, source/sup-
plier and status (eg., not ordered, received, due 2 weeks, late 1 week).
Don’t forget to include cost of the controller and other components used. Assume
the power supply is provided as part of the crane system and therefore has no
cost is associated. Some of the commonly available components are listed
below. List simple commodity items such as wires, bolts, etc., under a miscella-
neous category with a general cost estimate.
68HC11 Axiom board $89
Grayhill encoder est. $8
Power Supply, list it but do not give a price
Gearhead motors assume $10
A Bill of Materials (BOM) lists all of the parts required to produce or assemble
some other device. This is different from parts listed in a budget in that some of
the parts will be work in process. In other words, the original material has been
worked on to produce new parts. A BOM is normally found on assembly draw-
ings.
Notes;
- there are different type of plastic, some are more brittle, others are
tougher.
writing guide - 32.10
32.5.4 Calculations
Calculations are required to justify the design work. These should follow the con-
ventions used in EGR 345. When computer programs are written, they should
be commented and included.
32.6 APPENDICES
The example system in Figure 32.2 is to control a cart with a hanging pendulum.
The cart is driven by a motor. The motor has an attached encoder to measure the motor
position. As the cart moves the mass underneath may sway. The position of the hanging
mass is measured with a potentiometer.
quadrature 1-
---
input D
Digital in
encoder
motor position θ motor
Vθ
Analog in potentiometer
mass angle
A block diagram for the system is shown in Figure 32.3. A motion generator is
used to generate a smooth path for the mass. There are two feedback control loops. The
first loop adjusts the motor for general positioning of the system. The inner loop adjusts
the output to reduce sway of the cart. The two control signals are added to produce a com-
mand signal the drives the load to the final position and then reduces vibrations.
writing guide - 32.11
Cp generate update Cd
setpoint setpoints
table
where,
C p = commanded position
C d = desired position setpoint
Cp encoder
K enc
-
Cd C pe C pc Cc Vs θp θL
cart and
K pp PWM motor mass
+ +
- C Lc
CL VL potentiometer
K sp A/D
K pot θ L – V zero
where,
C pe = the position error
K pp = the proportional gain for position control
C p = the position count from the encoder
θ p = the rotational position of the motor
C pc = output command for position control
C c = the combined motor control output
V s = effective voltage to the motor
θ p = position of the motor (cart)
θ L = angle of the load from vertical
V L = voltage proportional to angle of load
C L = integer value for load angle
C Lc = output command for sway control
··
x
··
M p lθ L
θL Fp
x
l
Fw ·· · 2
Mc x θL Mp l
Mc
Mp
M p g cos θ L
Fp
M p g sin θ L
θL ··
··
x sin θL M p
x cos θ L M p
where,
M c = mass of cart
M p = mass of payload
F p = force in suspension arm
F w = force from wheels
θ L = angle of payload from vertical
l = length of suspension arm
r w = radius of cart wheel
·· ··
∑ F = – Mp g sin θL – Mp lθL – x cos θL Mp = 0
·· ··
lθ L = – g sin θ L – x cos θL (1)
· 2 ··
∑ F = F p – M p g cos θ L – θ L M p l + x sin θ L M p = 0
· 2 ··
F p = M p g cos θ L + θ L M p l – x sin θ L M p
··
∑ Fx = – M c x + F p sin θ L + F w = 0
··
– M c x + F p sin θ L + F w = 0
·· ·2 ·· (2)
– M c x + ( M p g cos θL + θ L M p l – x sin θ L M p ) sin θ L + F w = 0
Figure 32.4 FBDs for the suspended mass and the compensator
writing guide - 32.13
2 Fw rw
ω w + ω w ------ = V s ------ – ------------
· K K
JR JR J
K · J K2
∴F w = V s --------- – ω w ----- – ω w ---------
r w R r w r w R
given x = θw rw
·· J · K -
2
∴Fw = V s --------- – x ----2- – x --------
K
r w R
r w r 2w R
(1) --->
·· J · K -
2
– M c x + ( M p g cos θ L + θ L M p l – x sin θ L M p ) sin θL + V s --------- – x ----2- – x --------
·· · 2 ·· K
r w R = 0
r w r 2w R
·· · K -
2
– x M c + ----2- + ( sin θL ) M p + cos θ L sin θ L M p g + θ L ( M p l sin θ L ) + V s --------- – x --------
J 2 ·2 K
r w R = 0
rw r 2w R
2 2 2
M c r w + J + ( sin θL ) M p r w
·· -------------------------------------------------------------- · 2 K - · -------- K -
2
x - = ( cos θ L sin θ L )M p g + θ L ( M p l sin θ L ) + V s -------- – x 2
rw
2
r w R r w R
2 2
M p gr w 2 M p l sin θ L r w
·· - + θ·L --------------------------------------------------------------
x = ( cos θL sin θL ) -------------------------------------------------------------- - +
M c r 2w + J + ( sin θL ) 2 M p r 2w M c r 2w + J + ( sin θ L )2 M p r 2w
Kr w –K
2
- + x· -----------------------------------------------------------------------
V s ----------------------------------------------------------------------- -
R ( M c r 2w + J + ( sin θ L ) 2 M p r 2w ) R ( M c r 2w + J + ( sin θ L ) 2 M p r 2w )
State Equations:
·
x = v
2
· –K
2 M p gr w
- + ( cos θ L sin θ L ) --------------------------------------------------------------
v = v ----------------------------------------------------------------------- -
R ( M c r w + J + ( sin θ L ) M p r w )
2 2 2
M c r w + J + ( sin θ L ) M p r w
2 2 2
2
2 M p l sin θ L r w Kr w
+ ω L --------------------------------------------------------------
- + V s -----------------------------------------------------------------------
-
M c r 2w + J + ( sin θ L ) 2 M p r 2w R ( Mc r 2w + J + ( sin θ L ) 2 M p r 2w )
·
θL = ωL
·
· –-----g- v cos θ L
ωL = sin θ L – -----------------
l l
A Scilab program that simulates the given system is given in Figure 32.7.
writing guide - 32.15
// contest.sce
// System state
x0 = 0; // initial conditions for position
v0 = 0;
theta0 = 0.0;// the initial position for the load
omega0 = 0.0;
X=[x0, v0, theta0, omega0];
function foo=control(Cdesired)
Cp = ppr * X($, 1)/(2*PI*rw);
Cpe = Cdesired - Cp;
Cpc = Kpp * Cpe;
VL = Kpot * X($,3) + 2.5; // assume the zero angle is 2.5V
CL = ((VL - Vadmin) / (Vadmax - Vadmin)) * (Cadmax - Cadmin);
if CL > Cadmax then CL = Cadmax; end// check for voltages over limits
if CL < Cadmin then CL = Cadmin; end
CLc = Ksp * (CL - (Cadmax + Cadmin) / 2);
Cc = Cpc + CLc;
Cpwm = 0;
if Cc > 0.5 then// deadband compensation
Cpwm = Cdeadpos + (Cc/Cpwmmax)*(Cpwmmax - Cdeadpos);
end
if Cc <= -0.5 then
Cpwm = -Cdeadneg + (Cc/Cpwmmax)*(Cpwmmax - Cdeadneg);
end
Figure 32.7 A Scilab program to simulate the swaying mass on the crane
writing guide - 32.16
// Integration Set the time length and step size for the integration
steps = 5000;// The number of steps to use
t_start = 0;// the start time - normally use zero
t_end = 10;// the end time
h = (t_end - t_start) / steps;// the step size
t = [t_start];// an array to store time values
for i=1:steps,
t = [t ; t($,:) + h];
X = [X ; X($,:) + h * derivative(X($,:), t($,:), h)];// first order
end
Figure 32.8 A Scilab program to simulate the swaying mass on the crane
writing guide - 32.17
Figure 32.9 A Scilab program to simulate the swaying mass on the crane
writing guide - 32.18
The text below outlines the general form of a contract between students in EGR
101 and 345.
This contract has been entered into this date by the parties of the first part Joe Junior, Pete
Zaa, Anne Nyther and Robert Sochs, to be referred to as ’345 students’, with Virve Meurte, to be
referred to as ’101 student(s)’.
Articles:
1. The 101 student is to participate in the design and construction of a cart as outlined below.
The 345 students are to prepare a design and construct a multicomponent system that uses the cart
as described below. The result must be a fully functional systems that meets the published design
objectives.
2. The 345 students are expected to prepare a functional design for an anti-sway system for a
crane. This design will include a cart that is designed in coordination with the 101 student. The
345 students will be required to do all calculation including system dynamics and strength of
materials. The 101 student will be responsible for all other design details related to the cart
including the geometry, mass, budget bill of materials and construction. This design will be
documented fully by the 101 student using accepted CAD practices and ProE. The design work will
result in the submission of a Formal Proposal, as shown on the Schedule of Actions.
3. Dr. Jack and/or Farris will comment on the Formal Proposal. Based upon these comments the 101
and 345 students will revise the design and agree upon a design for the cart. This will be labelled
Cart Build Approval. This will be signed by all parties and submitted to Dr. Farris by the
Scheduled date.
4. The cart will be build according to the Cart Build Approval before the date specified on the
Schedule of Actions. At the end of this period the design must be fully documented in ProE and be
ready for inclusion in the Design Report Draft.
5. Both the 101 and 345 students will participate in the first tests to verify the operation of the
system and develop a First List of Deficiencies. This list will be finalized and signed, according
to the date on the Schedule of Actions. The First List of Deficiencies will include a list of
remedies to be performed by the 101 and 345 students.
6. The 345 students will prepare the Design Report Draft using the ProE drawing submitted by the
101 student. They are responsible for submitting the report by the date in the Schedule of Actions.
7. Both the 101 and 345 students will participate in the final tests to verify the operation of the
system and develop a Final List of Deficiencies. This list will be finalized and signed, according
to the date on the Schedule of Actions. The Final List of Deficiencies will include a list of
remedies to be performed by the 101 and 345 students. Any changes made to the design must be
updated and submitted to the 345 students for inclusion in the Design Report.
8. Both the 101 and 345 students will participate in the Competition listed in the Schedule of
Actions.
9. The 345 students are to submit the final report with all necessary changes by the date listed in
the Schedule of Actions.
10. The 101 student is expected to produce a cart that is built to professional standards. All
drawings are expected to observe professional standards. When communicating drawings, generally
accessible files formats should be used.
11. The 345 students are to, at all times, maintain a functional design concept. They must ensure
that this will lead to a system that functions within the rules of the competition.
12. In the event of a dispute, 101 and 345 students are expected to resolve any conflicts
informally and mitigate any losses. In the event that one or both parties fundamentally breach the
writing guide - 32.19
contract Dr. Farris and Dr. Jack will acts as arbiters. If this occurs, one or both of the parties
will be penalized. This may involve actions as severe as receiving a failing grade in the project.
Exhibits:
1. Schedule of Actions
Oct 15-24 - Cart designs are developed by 101 and 345 students
resulting in submission of the Formal Proposal
Oct 30, 2003 - Cart Build Approval submitted
Nov 11 - Initial build completed
Nov 12 - First test completed and First List of Deficiencies submitted
Nov 15 - Design Report Draft submitted for review
Nov 19 - Final test completed and Final List of Deficiencies submitted
Nov 25 - Competition
Dec 4 - Submit Final Report
Peer Evaluations
writing guide - 32.20
Your Name:
none proficient
Hands-on Mechanical:
The ability to build components with wood, plastic, metal or other materials.
1 2 3 4 5
Hands-on Electrical: 1 2 3 4 5
Basic wiring skills, soldering, etc.
Writing:
Layout and write complex documents
1 2 3 4 5
Teamwork Skills:
The ability to work with others in a team environment.
1 2 3 4 5
Leadership Skills:
The ability to act as a role model that teammates will follow.
1 2 3 4 5
Design Skills:
Work in unstructured/semistructured problem solving.
1 2 3 4 5
Personal/Technical Strengths:
Personal/Technical Weaknesses:
Your Name:
Meets deadlines: 1 2 3 4 5
Did you teammate complete individual tasks on time? Did the teammate keep the project progressing forward in a timely
manner with a consistent effort throughout the project or was the teammate only available when the team was in trouble?
Quality of work: 1 2 3 4 5
Was you r teammate willing to accept and carry out individual tasks on time? How well were these
individual tasks carried out? Did your teammate do his or her fair share of the work?
Overall: 1 2 3 4 5
Would you be happy working with the person again? Would you give this person a job reference?
Height of Payload:
40cm below the beam = 40cm
Mass of Cart:
not including the harness
M = Kg
Cost:
proof of costs
C = $
Build Quality:
assigned by judges. 0 is the best
C = [ 0, 1 ]
Technical Analysis:
0 is the best
T = [ 0, 1 ]
Test Distance:
the distance specified in the test
d = m
Settling Times:
The time required to move within +/- 0.5in. from the target.
ts = s
Overall Score:
based upon other values
C M SCORE =
t s 2 --------
- -------
score = --- ( 4 ) ( 10 ) ( 10 ) ( 2 )
200 B T 0.2
d
Comments:
writing guide - 32.23
1 0 1 2 3 4 5 6 7 8 9 10
2 0 1 2 3 4 5 6 7 8 9 10
3 0 1 2 3 4 5 6 7 8 9 10
4 0 1 2 3 4 5 6 7 8 9 10
5 0 1 2 3 4 5 6 7 8 9 10
6 0 1 2 3 4 5 6 7 8 9 10
7 0 1 2 3 4 5 6 7 8 9 10
8 0 1 2 3 4 5 6 7 8 9 10
9 0 1 2 3 4 5 6 7 8 9 10
10 0 1 2 3 4 5 6 7 8 9 10
11 0 1 2 3 4 5 6 7 8 9 10
12 0 1 2 3 4 5 6 7 8 9 10
writing guide - 33.1
33.3.1 Graphs
33.4 SCILAB
33.5 TERMINOLOGY
graph: a plot,
numbers: a value
equation: a function, a relationship, an expression,
proof: a derivation
math guide - 34.1
• We use math in almost every problem we solve. As a result the more relevant top-
ics of mathematics are summarized here.
34.1 INTRODUCTION
• This section has been greatly enhanced, and tailored to meet our engineering
requirements.
• The section outlined here is not intended to teach the elements of mathematics,
but it is designed to be a quick reference guide to support the engineer required to use
techniques that may not have been used recently.
• For those planning to write the first ABET Fundamentals of Engineering exam,
the following topics are commonly on the exam.
- quadratic equation
- straight line equations - slop and perpendicular
- conics, circles, ellipses, etc.
- matrices, determinants, adjoint, inverse, cofactors, multiplication
- limits, L’Hospital’s rule, small angle approximation
- integration of areas
- complex numbers, polar form, conjugate, addition of polar forms
- maxima, minima and inflection points
- first-order differential equations - guessing and separation
- second-order differential equation - linear, homogeneous, non-homogeneous,
second-order
- triangles, sine, cosine, etc.
- integration - by parts and separation
- solving equations using inverse matrices, Cramer’s rule, substitution
- eigenvalues, eigenvectors
- dot and cross products, areas of parallelograms, angles and triple product
- divergence and curl - solenoidal and conservative fields
- centroids
- integration of volumes
math guide - 34.2
• A good place to start a short list of mathematical relationships is with greek let-
ters
name
lower case upper case
α Α alpha
β Β beta
γ Γ gamma
δ ∆ delta
ε Ε epsilon
ζ Ζ zeta
η Η eta
θ Θ theta
ι Ι iota
κ Κ kappa
λ Λ lambda
µ Μ mu
ν Ν nu
ξ Ξ xi
ο Ο omicron
π Π pi
ρ Ρ rho
σ Σ sigma
τ Τ tau
υ Υ upsilon
φ Φ phi
χ Χ chi
ψ Ψ psi
ω Ω omega
math guide - 34.3
• The constants listed are amount some of the main ones, other values can be
derived through calculation using modern calculators or computers. The values are typi-
cally given with more than 15 places of accuracy so that they can be used for double preci-
sion calculations.
1 n
e = 2.7182818 = lim 1 + --- = natural logarithm base
n→∞ n
π = 3.1415927 = pi
1radian = 57.29578°
• These operations are generally universal, and are described in sufficient detail for
our use.
distributive a ( b + c ) = ab + ac
associative a ( bc ) = ( ab )c a + (b + c) = (a + b) + c
34.1.2.1 - Factorial
n! = 1 ⋅ 2 ⋅ 3 ⋅ 4 ⋅ … ⋅ n
0! = 1
• The basic properties of exponents are so important they demand some sort of
mention
1
---
n m n+m 0 n
(x )( x ) = x x = 1 , if x is not 0 x = n x
m
–p 1 ----
n
(x ) x = ----p- n n m
---------- n–m x = x
m
= x x
(x )
n n n x-- = n------x-
n m n⋅m
( xy ) = ( x ) ( y ) n
(x ) = x y n y
logn ( 1 ) = 0
logn -- = log n ( x ) – logn ( y )
x
y
y
log n ( x ) = ylogn ( x )
log m ( x )
log n ( x ) = -------------------
logm ( n )
ln ( A ∠θ ) = ln ( A ) + ( θ + 2πk )j k∈I
n n n–1 n( n – 1 ) n – 2 2 n
( a + x ) = a + na x + -------------------- a x +…+x
2!
(ans.
a) A + B-
------------ A B 1 1
= ------- + ------- = --- + ---
AB AB AB B A
AB -
b) ------------
A + B cannot be simplified
3
c) (--------------
x y )
4 5
2 5 3 6 15
2 - = (x y ) = x y
x
2 3 4
a) n log ( x ) + m log ( x ) – log ( x )
(ans.
a) 2 3 4
n log ( x ) + m log ( x ) – log ( x )
2n log ( x ) + 3m log ( x ) – 4 log ( x )
( 2n + 3m – 4 ) log ( x )
( 2n + 3m – 4 ) log ( x )
math guide - 34.8
5. Rearrange the following equation so that only ‘y’ is on the left hand side.
y----------
+ x-
= x+2
y+z
(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
a) t3 + 5
lim ----------------
t → 0 5t 3 + 1
t3 + 5
b) lim ----------------
t → ∞ 5t 3 + 1
(ans. t3 + 5 3
0 +5 -
a) lim ---------------- = ---------------------- = 5
t → 0 5t 3 + 1 5(0) + 1
3
b) t3 + 5 ∞
3
+ 5 ∞
3
lim ---------------- = -----------------------
- = -------------- = 0.2
t → ∞ 5t 3 + 1 5(∞) + 1
3
5(∞)
3
math guide - 34.9
34.2 FUNCTIONS
Binomial
∑ t p q
n t n–t
q, p ∈ [ 0, 1 ]
P(m) = q = 1–p
t≤m
Poisson
t –λ
λe
P(m) = ∑ ------------
t!
λ>0
t≤m
Hypergeometric
r s
t n – t
P ( m ) = ∑ -----------------------
-
t≤m
r + s
n
Normal
1 x –t2
P ( x ) = ---------- ∫ e dt
2π –∞
2
2
ax + bx + c = 0 = a ( x – r 1 ) ( x – r 2 ) – b ± b – 4ac
r 1, r 2 = --------------------------------------
2a
• Cubic equations also appear on a regular basic, and as a result should also be con-
sidered.
3 2
x + ax + bx + c = 0 = ( x – r 1 ) ( x – r 2 ) ( x – r 3 )
First, calculate,
2 3
3b – a 9ab – 27c – 2a S =
3
R+ Q +R
3 2
T =
3
R– Q +R
3 2
Q = ----------------- R = ---------------------------------------
9 54
Then the roots,
a S+T a j 3 S+T a j 3
r 1 = S + T – --- r 2 = ------------ – --- + --------- ( S – T ) r 3 = ------------ – --- – --------- ( S – T )
3 2 3 2 2 3 2
• On a few occasions a quartic equation will also have to be solved. This can be
done by first reducing the equation to a quadratic,
4 3 2
x + ax + bx + cx + d = 0 = ( x – r 1 ) ( x – r 2 ) ( x – r 3 ) ( x – r 4 )
First, solve the equation below to get a real root (call it ‘y’),
3 2 2 2
y – by + ( ac – 4d )y + ( 4bd – c – a d ) = 0
a + a 2 – 4b + 4y
2 y + y2 – 4d
r 1, r 2 = z + ------------------------------------------- z + ------------------------------ = 0
2 2
2 a – a – 4b + 4y y – y2 – 4d
2
r 3, r 4 = z + ------------------------------------------- z + ------------------------------ = 0
2 2
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
1 - A B C
x ( s ) = --------------------
2
= ----2 + --- + -----------
s (s + 1) s s s+1
C = lim ( s + 1 ) --------------------
1 -
2 = 1
s → –1 s (s + 1)
A = lim s --------------------
2 1 - 1
2 = lim ----------- = 1
s→0 s (s + 1) s→0 s + 1
• Consider the example below where the order of the numerator is larger than the
denominator.
math guide - 34.13
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 denominator 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 partial fractions.
– 12s – 6- –---------------------
12s – 6- A B
x ( s ) = 5s + 3 + ---------------------
2
solve
2
= ------------- + -------------
s +4 s +4 s + 2j s – 2j
Figure 34.15 Solving partial fractions when the numerator order is greater than the
denominator
• When the order of the denominator terms is greater than 1 it requires an expanded
partial fraction form, as shown below.
5
F ( s ) = -----------------------3-
2
s (s + 1)
5 - A B C D E
----------------------- = ----2 + --- + ------------------3- + ------------------2- + ----------------
2 3 s (s + 1) (s + 1) (s + 1)
s (s + 1) s
5 A B C D E
------------------------ = ---- + --- + ------------------3- + ------------------2- + ----------------
2 3 2 s (s + 1) (s + 1) ( s + 1)
s (s + 1) s
3 3 2 2 2 2
A ( s + 1 ) + Bs ( s + 1 ) + Cs + Ds ( s + 1 ) + Es ( s + 1 ) -
= -----------------------------------------------------------------------------------------------------------------------------------------
3
2
s (s + 1)
4 3 2
s ( B + E ) + s ( A + 3B + D + 2E ) + s ( 3A + 3B + C + D + E ) + s ( 3A + B ) + ( A )-
= --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
3
2
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
------------------------ = ---- + --------- + ------------------- + ------------------- + ----------------
3 2 s 3 2 (s + 1)
2
s (s + 1) s (s + 1) (s + 1)
• Operations on summations:
b a
∑ xi = ∑ xi
i=a i=b
math guide - 34.15
b b
∑ αxi = α ∑ xi
i=a i=a
b b b
∑ xi + ∑ yj = ∑ ( xi + yi )
i=a j=a i=a
b c c
∑ xi + ∑ xi = ∑ xi
i=a i = b+1 i=a
b
d b d
y =
∑ i ∑ j ∑ ∑ xi yj
x
i = a j = c i=a j=c
N
1
∑i = --- N ( N + 1 )
2
i=1
N–1 1 – αN
----------------, α ≠ 1
∑ α = 1 – α
i
for both real and complex α .
i=0 N, α = 1
∞
1
∑α
i
= ------------, α < 1 for both real and complex α . For α ≥ 1 , the summation
1–α
i=0
does not converge.
math guide - 34.16
(ans. 2
2x + 8x = – 8
2
x + 4x + 4 = 0
2
(x + 2) = 0
x = – 2, – 2
(ans. x + 4-
---------------- x+4
------------------- A B-
--- + ----------- Ax + 8A + Bx-
--------------------------------
= = =
2
x + 8x x(x + 8) x x+8 2
x + 8x
( 1 )x + 4 = ( A + B )x + 8A
8A = 4 A = 0.5
1 = A+B B = 0.5
----------------- = 0.5
x+4 0.5 -
------- + -----------
2 x x +8
x + 8x
math guide - 34.17
34.3.1 Trigonometry
y 1
sin θ = -- = -----------
r csc θ
x 1
cos θ = -- = ----------- r
r sec θ
y
y 1 sin θ
tan θ = -- = ----------- = ------------
x cot θ cos θ
Pythagorean Formula:
2
r = x +y
2 2 θ
Sine - sin
Cosine - cos
Tangent - tan
Cosecant - csc
Secant - sec
Cotangent - cot
• NOTE: Keep in mind when finding these trig values, that any value that does not
lie in the right hand quadrants of cartesian space, may need additions of ±90° or ±180°.
math guide - 34.20
Cosine Law:
2 2 2
c = a + b – 2ab cos θ c
c
θA
b
Sine Law:
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.
math guide - 34.21
− sin θ sin θ
cos ( θ1 ± θ 2 ) = cos θ 1 cos θ 2 + OR
2
cos ( 2θ ) = ( cos θ ) + ( sin θ )
2
1 2
tan θ 1 ± tan θ 2
tan ( θ 1 ± θ 2 ) = ------------------------------------
-
1− + tan θ 1 tan θ 2
cot θ 1 cot θ2 − +1
cot ( θ 1 ± θ 2 ) = -------------------------------------
tan θ 2 ± tan θ 1
θ – cos θ-
sin --- = ± 1-------------------- -ve if in left hand quadrants
2 2
θ + cos θ-
cos --- = ± 1--------------------
2 2
θ sin θ 1 – cos θ
tan --- = --------------------- = ---------------------
2 1 + cos θ sin θ
2 2
( cos θ ) + ( sin θ ) = 1
jθ –jθ jθ –j θ
e +e e –e
cos θ = ---------------------- sin θ = ---------------------
2 2j
x –x
e –e
sinh ( x ) = ------------------ = hyperbolic sine of x
2
x –x
e +e
cosh ( x ) = ------------------ = hyperbolic cosine of x
2
x –x
sinh ( x ) e –e
tanh ( x ) = ------------------- = -----------------
- = hyperbolic tangent of x
cosh ( x ) x
e +e
–x
1 2 -
csch ( x ) = ------------------ = ----------------- = hyperbolic cosecant of x
sinh ( x ) x
e –e
–x
1 2
sech ( x ) = ------------------- = -----------------
- = hyperbolic secant of x
cosh ( x ) x
e +e
–x
x –x
cosh ( x ) e +e -
coth ( x ) = ------------------- = ----------------- = hyperbolic cotangent of x
sinh ( x ) x
e –e
–x
sinh ( – x ) = – sinh ( x )
cosh ( –x ) = cosh ( x )
tanh ( – x ) = – tanh ( x )
csch ( – x ) = – csch ( x )
sech ( – x ) = sech ( x )
coth ( –x ) = – coth ( x )
2 2 2 2 2 2
( cosh x ) – ( sinh x ) = ( sech x ) + ( tanh x ) = ( coth x ) – ( csch x ) = 1
sinh ( x ± y ) = sinh ( x ) cosh ( y ) ± cosh ( x ) sinh ( y )
cosh ( x ± y ) = cosh ( x ) cosh ( y ) ± sinh ( x ) sinh ( y )
tanh ( x ) ± tanh ( y )
tanh ( x ± y ) = -----------------------------------------------
1 ± tanh ( x ) tanh ( y )
• Some of the relationships between the hyperbolic, and normal trigonometry func-
tions are,
1. Find all of the missing side lengths and corner angles on the two triangles below.
5 5 3
3
10°
(ans.
cos θ cos θ – sin θ sin θ = cos ( θ + θ ) = cos ( 2θ )
2 2 2 2 2
( s + 3j ) ( s – 3j ) ( s + 2j ) = ( s – 9j ) ( s + 4js + 4j )
4 3 2 2 2 2 2 2 2
s + 4js + 4j s – 9j s – 9j 4js – 9j 4j
4 3 2
s + ( 4j )s + ( 5 )s + ( 36j )s + ( – 36 )
(ans. 4 A B Ax + 2A + Bx + B- ( 2A + B ) + ( A + B )x
-------------------------- = ------------ + ------------ = ------------------------------------------ = -------------------------------------------------
2 x + 1 x + 2 2 2
x + 3x + 2 x + 3x + 2 x + 3x + 2
A+B = 0 A = –B
4 - -----------
–4 -
----------- +
2A + B = 4 = – 2B + B = –B B = –4 A = 4 x+1 x+2
34.3.3 Geometry
• A set of the basic 2D and 3D geometric primitives are given, and the notation
used is described below,
math guide - 34.25
A = contained area
P = perimeter distance
V = contained volume
S = surface area
x, y, z = centre of mass
x, y, z = centroid
I x, I y, I z = moment of inertia of area (or second moment of inertia)
AREA PROPERTIES:
∫y
2
Ix = dA = the second moment of inertia about the y-axis
A
∫x
2
Iy = dA = the second moment of inertia about the x-axis
A
∫r ∫ (x
2 2 2
JO = dA = + 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
math guide - 34.26
y
Rectangle/Square:
A = ab
P = 2a + 2b a
b
Centroid: Moment of Inertia Moment of Inertia
(about centroid axes): (about origin axes):
3 3
b ba ba
x = --- I x = -------- I x = --------
2 12 3
3 3
b a b a
a I y = -------- I y = --------
y = --- 12 3
2
2 2
b a
I xy = 0 I xy = -----------
4
math guide - 34.27
Triangle: y
bh
A = ------
2 a
P = h
θ
x
Circle: y
2
r
A = πr
P = 2πr
Half Circle: y
2
πr
A = --------
2
P = πr + 2r r
x
Quarter Circle: y
2
πr
A = --------
4
πr
P = ----- + 2r
2 r
x
Circular Arc: y
2
θr
A = --------
2
P = θr + 2r r
x
θ
I xy = I xy = 0
math guide - 34.30
Ellipse: y
r1
A = πr 1 r 2 r2
π
--- 2 2
r1 + r 2
P = 4r 1 ∫
2 2
1 – -------------------- ( sin θ ) dθ x
0 a
2 2
r 1 + r2
P ≈ 2π ---------------
-
2
Half Ellipse: y
πr 1 r 2
A = ------------
-
2
r1
π 2 2
--- r1 +
r2 r2
P = 2r 1 ∫
2
2
1 – -------------------- ( sin θ ) dθ + 2r 2 x
0 a
2 2
r 1 + r2
P ≈ π ---------------
- + 2r 2
2
Quarter Ellipse: y
πr 1 r 2
A = -------------
4
r1
π
--- 2 2
r1 + r 2
r1 ∫
2 2
P = 1 – -------------------- ( sin θ ) dθ + 2r 2 r2 x
0 a
2 2
π r 1 + r2
P ≈ --- ---------------
- + 2r 2
2 2
4r 2 3
x = -------- Ix = I x = πr 2 r 1
3π
4r 1 3
y = -------- Iy = I y = πr 2 r 1
3π 2 2
r2 r1
I xy = I xy = ---------
8
Parabola: y
2
A = --- ab
3
a
b + 16a
2 2
b
2 4a + b + 16a 2 2
P = --------------------------- + ------ ln ---------------------------------------- x
2 8a b
b
Centroid: Moment of Inertia Moment of Inertia
(about centroid axes): (about origin axes):
b Ix = Ix =
x = ---
2
2a Iy = Iy =
y = ------
5
I xy = I xy =
math guide - 34.33
Half Parabola: y
ab
A = ------
3
a
b + 16a
2 2
b
2 4a + b2 + 16a 2
P = --------------------------- + --------- ln ---------------------------------------- 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.
math guide - 34.34
2 2
Ax + 2Bxy + Cy + 2Dx + 2Ey + F = 0
VOLUME PROPERTIES:
∫ rx
2
Ix = dV = the moment of inertia about the x-axis
V
∫ ry
2
Iy = dV = the moment of inertia about the y-axis
V
∫ rz
2
Iz = 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
math guide - 34.36
Parallelepiped (box): y
V = abc c
z
S = 2 ( ab + ac + bc )
b
x
Sphere: y
r
4 3
V = --- πr
3
z
2
S = 4πr
x
Hemisphere: y
2 3
V = --- πr
3
z
S = r
x
Cap of a Sphere: y
1 2 h
V = --- πh ( 3r – h )
3
z
S = 2πrh r
x
x = r Ix = Ix =
Iy = Iy =
y =
Iz = Iz =
z = r
math guide - 34.38
Cylinder: y
r
2
V = hπr h
2 z
S = 2πrh + 2πr
x
Cone: y
1 2
V = --- πr h
3
2 2 h
S = πr r + h z
r
x
Tetrahedron: y
z
1
V = --- Ah
3
h
A x
x = Ix = Ix =
h Iy = Iy =
y = ---
4
Iz = Iz =
z =
Torus: y
r2
1 2 2
V = --- π ( r 1 + r 2 ) ( r 2 – r 1 )
4 r1
z
2 2 2
S = π ( r2 – r1 ) x
x = r2 Ix = Ix =
r 2 – r 1
y = --------------
- Iy = Iy =
2
Iz = Iz =
z = r2
math guide - 34.40
Ellipsoid: y
r2 r3
4
V = --- πr 1 r 2 r 3
3
z r1
S =
x
x = r1 Ix = Ix =
Iy = Iy =
y = r2
Iz = Iz =
z = r3
Paraboloid: y
1 2
V = --- πr h h
2
z
S = r
x
x = r Ix = Ix =
Iy = Iy =
y =
Iz = Iz =
z = r
math guide - 34.41
1
m perpendicular = ---- a slope perpendicular to a line
m
y2 – y1
m = ---------------- the slope using two points
x2 – x1
• If we assume a line is between two points in space, and that at one end we have a
local reference frame, there are some basic relationships that can be derived.
math guide - 34.42
θβ d ( x 2, y 2, z 2 )
( x 1, y 1, z 1 )
2 2 2 θγ θα
d = ( x2 – x1 ) + ( y2 – y1 ) + ( z2 – z1 )
x
( x 0, y 0, z 0 )
z
x2 – x1 y2 – y1 z2 – z1
θ α = acos ---------------- θ β = acos ---------------- θ γ = acos ---------------
d d d
2 2 2
( cos θ α ) + ( cos θ β ) + ( cos θ γ ) = 1
The equation of the line is,
x – x1 y – y1 z–z Explicit
--------------- - = --------------1-
- = ---------------
x2 – x1 y2 – y1 z2 – z1
( x, y, z ) = ( x 1, y 1, z 1 ) + t ( ( x 2, y 2, z 2 ) – ( x 1, y 1, z 1 ) ) Parametric t=[0,1]
Ax + By + Cz + D = 0
P 1 = ( x 1, y 1, z 1 )
z c
x – x1 y – y1 z – z1
det x – x 2 y – y 2 z – z 2 = 0
x – x3 y – y3 z – z3
y2 – y1 z2 – z1 z2 – z1 x2 – x1
∴det ( x – x 1 ) + det ( y – y1 )
y3 – y1 z3 – z1 z3 – z1 x3 – x1
x2 – x1 y2 – y1
+ det ( z – z1 ) = 0
x3 – x1 y3 – y1
( x, y, z ) = t ( A , B , C )
1. What is the circumferenece of a circle? What is the area? What is the ratio of the area to the cir-
cumference?
math guide - 34.44
2. What is the equation of a line that passes through the points below?
a) (0, 0) to (2, 2)
b) (1, 0) to (0, 1)
c) (3, 4) to (2. 9)
3. Find a line that is perpendicular to the line through the points (2, 1) and (1, 2). The perpendicu-
lar line passes through (3, 5).
(ans.
a) x 2 + 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
b) sin x = cos x
sin x-
---------- = 1
cos x
tan x = 1
x = atan 1
x = …, –135°, 45°, 225°, …
(ans.
2
a) ( cos 2θ )
sin 2θ ---------------------- + sin 2θ = ( cos 2θ ) + ( sin 2θ ) = 1
2 2
sin 2θ
math guide - 34.45
6. A line that passes through the point (1, 2) and has a slope of 2. Find the equation for the line,
and for a line perpendicular to it.
(ans. given,
y = mx + b
m = 2
x = 1
y = 2
substituting
2 = 2(1) + b b = 0
y = 2x
perpendicular
1
m perp = – ---- = – 0.5
m
y = – 0.5 x
• In this section, as in all others, ‘j’ will be the preferred notation for the complex
number, this is to help minimize confusion with the ‘i’ used for current in electrical engi-
neering.
Complex Numbers:
a + bj where,
a and b are both real numbers
( a + bj ) – ( c + dj ) = ( a – c ) + ( b – d )j
( a + bj ) ⋅ ( c + dj ) = ( ac – bd ) + ( ad + bc )j
CARTESIAN FORM
Ij
imaginary (j)
N = R + Ij
R
real
2 2
A = R +I R = A cos θ
θ
R
real
A = amplitude
θ = phase angle
• We can also do calculations using polar notation (this is well suited to multiplica-
tion and division, whereas cartesian notation is easier for addition and subtraction),
math guide - 34.48
jθ
A ∠θ = A ( cos θ + j sin θ ) = Ae
( A 1 ∠θ 1 ) ( A 2 ∠θ 2 ) = ( A 1 A 2 ) ∠( θ 1 + θ 2 )
( A 1 ∠θ 1 ) A
--------------------- = -----1- ∠( θ 1 – θ 2 )
( A 2 ∠θ 2 ) A 2
n n
( A ∠θ ) = ( A ) ∠( nθ ) (DeMoivre’s theorem)
• Note that DeMoivre’s theorem can be used to find exponents (including roots) of
complex numbers
jθ
• Euler’s formula: e = cos θ + j sin θ
jθ – jθ
e +e
cos θ = ----------------------
2
jθ – jθ
e –e
sin θ = ---------------------
2j
• Basically, these coordinates appear as if the cartesian box has been replaced with
a cylinder,
math guide - 34.49
z z
( x, y, z ) ↔ ( r, θ, z )
z
z
y
r
x
x y
θ
2 2
x = r cos θ r = x +y
θ = atan --
y
y = r sin θ x
z z
( x, y, z ) ↔ ( r, θ, φ ) φ
r
z
y
x
x y
θ
2 2 2
x = r sin θ cos φ r = x +y +z
(ans. a) 16 16 16-
--------------------- = ------------------------------------
- = ------- = – 0.5j
2 – 16 + 32j + 16 32j
( 4j + 4 )
34.5.1 Vectors
head
terminus
y j
x i
z k
becomes
y j
z x k i
A = ( 2, 3, 4 ) A + B = ( 2 + 7, 3 + 8, 4 + 9 )
B = ( 7, 8, 9 ) A – B = ( 2 – 7, 3 – 8, 4 – 9 )
B
Parallelogram Law
A+B
A A
B
• We can use a dot product to find the angle between two vectors
math guide - 34.53
y F2 = 5i + 3j
F1 • F2
cos θ = -----------------
-
F1 F2
θ F1 = 2i + 4j
( 2 ) ( 5 ) + ( 4 )( 3)
∴θ = acos -------------------------------------------
2 2 + 4 2 5 2 + 3 2
• We can use a dot product to project one vector onto another vector.
z
F 1 = ( – 3i + 4j + 5k )N
We want to find the component of
force F1 that projects onto the
vector V. To do this we first con-
vert V to a unit vector, if we do
not, the component we find will V = 1j + 1k
be multiplied by the magnitude y
of V.
F1
V 1j + 1k
λV = ------ = --------------------- = 0.707j + 0.707k
V 2 2
1 +1
F 1V = λ V • F 1 = ( 0.707j + 0.707k ) • ( – 3i + 4j + 5k )N
∴F 1V = ( 0 ) ( – 3 ) + ( 0.707 ) ( 4 ) + ( 0.707 ) ( 5 ) = 6N V
F 1V
• We can consider the basic properties of the dot product and units vectors.
math guide - 34.54
Unit vectors are useful when breaking up vector magnitudes and direction. As an exam-
ple consider the vector, and the displaced x-y axes shown below as x’-y’.
y F = 10N
y’ x’
45°
60°
x
We could write out 5 vectors here, relative to the x-y axis,
x axis = 2i
y axis = 3j
x‘ axis = 1i + 1j
y‘ axis = – 1i + 1j
F = 10N ∠60° = ( 10 cos 60° )i + ( 10 sin 60° )j
None of these vectors has a magnitude of 1, and hence they are not unit vectors. But, if
we find the equivalent vectors with a magnitude of one we can simplify many tasks.
In particular if we want to find the x and y components of F relative to the x-y axis we
can use the dot product.
This result is obvious, but consider the other obvious case where we want to project a
vector onto itself,
math guide - 34.55
FF = F • F
= ( ( 10 cos 60° )i + ( 10 sin 60° )j ) • ( ( 10 cos 60° )i + ( 10 sin 60° )j )
= ( 10 cos 60° ) ( 10 cos 60° ) + ( 10 sin 60° ) ( 10 sin 60° )
2 2
= 100 ( ( cos 60° ) + ( sin 60° ) ) = 100
FF = F • λF
= ( ( 10 cos 60° )i + ( 10 sin 60° )j ) • ( ( cos 60° )i + ( sin 60° )j )
= ( 10 cos 60° ) ( cos 60° ) + ( 10 sin 60° ) ( sin 60° )
2 2
= 10 ( ( cos 60° ) + ( sin 60° ) ) = 10 Correct
Now consider the case where we find the component of F in the x’ direction. Again,
this can be done using the dot product to project F onto a unit vector.
F x' = F • λ x' = ( ( 10 cos 60° )i + ( 10 sin 60° )j ) • ( ( cos 45° )i + ( sin 45° )j )
= ( 10 cos 60° ) ( cos 45° ) + ( 10 sin 60° ) ( sin 45° )
= 10 ( cos 60° cos 45° + sin 60° sin 45° ) = 10 ( cos ( 60° – 45° ) )
Here we see a few cases where the dot product has been applied to find the vector pro-
jected onto a unit vector. Now finally consider the more general case,
math guide - 34.56
y
V2
V1
θ2 V 2V 1
θ1
x
First, by inspection, we can see that the component of V2 (projected) in the direction
of V1 will be,
V 2V 1 = V 2 cos ( θ 2 – θ1 )
Next, we can manipulate this expression into the dot product form,
V1 V2 V 1 • V2 V1 • V2
= V 2 --------- • --------- = V 2 ------------------ = ------------------ = V2 • λ V1
V1 V2 V1 V2 V1
Or more generally,
V1 • V 2
V2 V 1 = V 2 cos ( θ2 – θ 1 ) = V 2 ------------------
V1 V2
V1 • V2
∴ V 2 cos ( θ 2 – θ1 ) = V 2 ------------------
V1 V2
V1 • V2
∴ cos ( θ 2 – θ 1 ) = ------------------
V 1 V2
*Note that the dot product also works in 3D, and similar proofs are used.
math guide - 34.57
F = ( – 6.43i + 7.66j + 0k )N
NOTE: note that the cross prod-
d = ( 2i + 0j + 0k )m uct here is for the right hand
rule coordinates. If the left
handed coordinate system is
i j k used F and d should be
M = d×F = 2m 0m 0m reversed.
– 6.43N 7.66N 0N
NOTE: there are two things to note about the solution. First, it is a vector. Here
there is only a z component because this vector points out of the page, and a
rotation about this vector would rotate on the plane of the page. Second, this
result is positive, because the positive sense is defined by the vector system.
In this right handed system find the positive rotation by pointing your right
hand thumb towards the positive axis (the ‘k’ means that the vector is about
the z-axis here), and curl your fingers, that is the positive direction.
The cross (or vector) product of two vectors will yield a new vector perpendicular
to both vectors, with a magnitude that is a product of the two magnitudes.
V1 × V2
V1
V2
V1 × V2 = ( x 1 i + y1 j + z1 k ) × ( x2 i + y 2 j + z 2 k )
i j k
V1 × V2 = x1 y1 z1
x2 y2 z2
V 1 × V 2 = ( y 1 z 2 – z 1 y 2 )i + ( z 1 x 2 – x 1 z 2 )j + ( x 1 y 2 – y 1 x 2 )k
We can also find a unit vector normal ‘n’ to the vectors ‘V1’ and ‘V2’ using
a cross product, divided by the magnitude.
V1 × V2
λ n = ---------------------
V1 × V2
The positive orientation of angles and moments about an axis can be determined
by pointing the thumb of the right hand along the axis of rotation. The fingers
curl in the positive direction.
y x z
x z y
+ + +
z y x
The cross product is distributive, but not associative. This allows us to collect terms
in a cross product operation, but we cannot change the order of the cross product.
r 1 × F + r 2 × F = ( r 1 + r2 ) × F DISTRIBUTIVE
When we want to do a cross product, followed by a dot product (called the mixed triple
product), we can do both steps in one operation by finding the determinant of the follow-
ing. An example of a problem that would use this shortcut is when a moment is found
about one point on a pipe, and then the moment component twisting the pipe is found
using the dot product.
ux uy uz
( d × F) • u = dx dy dz
F x F y Fz
34.5.5 Matrices
• Matrices allow simple equations that drive a large number of repetitive calcula-
tions - as a result they are found in many computer applications.
n columns
If n=m then the matrix is said to be square.
a 11 a21 … a n1 Many applications require square matrices.
We may also represent a matrix as a 1-by-3
a 12 a22 … a n2 m rows for a vector.
… … … …
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 + 12 4 + 13 5 + 14
3+2 4+2 5+2
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
Multiplication/Division
3--- 4--- 5---
3(2 ) 4(2 ) 5(2) 2 2 2
A ⋅ B = 6(2 ) 7(2 ) 8(2)
B
--- = 6--- 7--- 8---
9 ( 2 ) 10 ( 2 ) 11 ( 2 ) 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 )
( 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
Note: To multiply matrices, the first matrix must have the same number
of columns as the second matrix has rows.
math guide - 34.62
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
T T 24
B = 4 7 10 D = 21 22 23 T
E = 25
5 8 11
26
math guide - 34.63
Adjoint T
7 8 – 6 8 6 7
10 11 10 11 9 10 The matrix of determinant to
the left is made up by get-
ting rid of the row and col-
B = – 4 5 3 5 – 3 4 umn of the element, and
10 11 9 11 9 10
then finding the determi-
4 5 nant of what is left. Note
– 3 5 3 4
the sign changes on alter-
7 8 6 8 6 7 nating elements.
–1 B
B = ---------
B In this case B is singular, so the
inverse is undetermined, and the
matrix is indeterminate.
–1
D = invalid (must be square)
math guide - 34.64
Identity Matrix
This is a square matrix that is the matrix equivalent to ‘1’.
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
A – λI = 0
Given,
2⋅x+4⋅y+3⋅z = 5
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
math guide - 34.65
Given,
2⋅x+4⋅y+3⋅z = 5
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 column 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
Multiply
ANS.
1 2 3 10 1 2 3 10 68
4 5 6 11 = 4 5 6 11 = 167
7 8 9 12 7 8 9 12 266
Determinant
12 3 1 2 3
42 6 = 4 2 6 = 36
78 9 7 8 9
Inverse –1
–1 1 2 3 – 0.833 0.167 0.167
12 3 =
4 2 6 0.167 – 0.333 0.167
42 6 =
7 8 9 0.5 0.167 –0.167
78 9
5. Solve the following set of equations using a) Cramer’s rule and b) an inverse matrix.
2x + 3y = 4
5x + 1y = 0
math guide - 34.67
(ans. 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 – ------
x = 2 3 4 = -------------------------------- 4 = ------------------- 4 = – -----
1- 4
= 13
y 5 1 0 0 – 13 0 13 – 20 20
2 3 ------
5 1 13
(ans.
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
GH I Z N GX + YH + IZ N GX + YH + IZ + N
= AX + BY + CZ + L DX + EY + FZ + M GX + YH + IZ + N
a) A B C X
D E F Y =
GH I Z
b) A B C
D E F X Y Z =
GH I
math guide - 34.68
8. Find the dot product, and the cross product, of the vectors A and B below.
x p
A = y B = q
z r
(ans.
A • B = xp + yq + zr
i j k yr – zq
A×B = x y z = i ( yr – zq ) + j ( zp – xr ) + k ( xq – yp ) = zp – xr
p q r xq – yp
a) T
a d e f b) c) –1
a b a b
b g h k c d
c d
c mnp
(ans.
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 mnp mnp
b)
a b = ad – bc
c d
adj
c) 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
math guide - 34.69
10. Find the value of ‘x’ for the following system of equations.
x + 2y + 3z = 5
x + 4y + 8z = 0
4x + 2y + z = 1
(ans.
12 3 x 5
14 8 y = 0
42 1 z 1
5 2 3
0 4 8
1 2 1 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 2 3
1 4 8
4 2 1
a) A B C X
D E F Y =
GH I Z
b) A B C
D E F X Y Z =
GH I
c)
det A B =
C D
d) A
A B =
C D
e) –1
A B =
C D
math guide - 34.70
12. Solve the following set of equations with the specified methods.
3x + 5y = 7
a) Inverse matrix
4x – 6y = 2
b) Cramer’s rule
c) Gauss-Jordan row reduction
d) Substitution
34.6 CALCULUS
• NOTE: Calculus is very useful when looking at real systems. Many students are
turned off by the topic because they "don’t get it". But, the secret to calculus is to remem-
ber that there is no single "truth" - it is more a loose collection of tricks and techniques.
Each one has to be learned separately, and when needed you must remember it, or know
where to look.
34.6.1.1 - Differentiation
Both u, v and w are functions of x, but this is not shown for brevity.
Also note that C is used as a constant, and all angles are in radians.
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 ) = ( nu ) ------ ( u )
dx dx
d- d d
----- ( uv ) = ( u ) ------ ( v ) + ( v ) ------ ( u )
dx dx dx
d- u--- ----
v d
- ------ ( u ) – ----
u- -----
d-
2 dx ( v )
----- =
dx v 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
d- 2 d
d- d ----- ( cot u ) = ( – csc u ) ------ ( u )
----- ( sin u ) = ( cos u ) ------ ( u ) dx dx
dx dx
d- d
d- d ----- ( sec u ) = ( tan u sec u ) ------ ( u )
----- ( cos u ) = ( – sin u ) ------ ( u ) dx dx
dx dx
1 2d
( tan u ) = ----------- ------ ( u )
d- d- d
----- ----- ( 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 ) = --- d- d
dx x ----- ( cosh u ) = ( sinh u ) ------ ( u )
dx dx
d- 2 d
----- ( tanh u ) = ( sech u ) ------ ( u )
dx dx
----
d- d- 2
----
f(x) f( x)
( ) dt dt
lim ---------- = lim --------------------- = lim -----------------------
f x - = …
x → a g(x) x → a d x → a d 2
----
dt- g ( x ) - g ( x )
----
dt
Leibnitz’s Rule, (notice the form is similar to the binomial equation) can be used for
finding the derivatives of multiplied functions.
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 n d n d 0
( u ) - ( v ) + … + ------ ( u ) ------ ( v )
2 dx dx n dx dx
34.6.1.2 - Integration
∫ 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
C
u = Cx
d- F(u) u = f(x)
∫ F ( f ( x ) ) dx = ∫ F ( u ) -----
du
( x ) du = ∫ ----------- du
f' ( x )
n+1
x - 1
∫ x dx = ----------- ∫ --x- dx
n
+C = ln x + C
n+1
x
a-
∫ a dx = ------- ∫ e dx
x x x
+C = e +C
ln a
3x sin 2x sin 4x
∫ sin x dx ∫ ( cos x )
4
= – cos x + C dx = ------ + ------------- + ------------- + C
8 4 32
n+1
( sin x ) -
∫ cos x dx ∫ cos x ( sin x ) dx = ------------------------
n
= sin x + C +C
n+1
sin x cos x + x
∫ ( sin x ) ∫ sinh x dx
2
dx = – ------------------------------- + C = cosh x + C
2
sin x cos x + x
∫ ( cos x ) ∫ cosh x dx
2
dx = ------------------------------- + C = sinh x + C
2
2
cos x ( ( sin x ) + 2 )-
∫ ( sin x ) dx = – ------------------------------------------- ∫ tanh x dx
3
+C = ln ( cosh x ) + C
3
2
sin x ( ( cos x ) + 2 )-
∫ ( cos x ) dx = -------------------------------------------
3
+C
3
cos ( ax -) --x-
∫ x cos ( ax ) dx = ------------------
a
2
+ sin ( ax ) + C
a
2 2
2x cos ( ax -) -------------------
a x –2
∫ x cos ( ax ) dx = -------------------------
2
2
+ 3
sin ( ax ) + C
a a
n+1
x
∫ x dx = -----------
n
-+C
n+1
ln a + bx
∫ ( a + bx )
–1
dx = ----------------------- + C
b
2 a + bx
∫ ( a + bx )
–1
dx = ---------------------- + C
b CORRECT??
1
– ---
2
∫ x(x
2 2 2 2
± a ) dx = x ±a +C
2 –1 1 b
∫
2
( 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
math guide - 34.76
1 3
--- ---
2-
∫ ( a + bx ) dx = -----
2 2
( a + bx )
3b
1--- 3---
2-
∫ ( a + bx ) dx = -----
2 2
( a + bx )
3b
3
1 ---
--- 2
2 ( 2a – 3bx ) ( a + bx ) -
∫ x ( a + bx )
2
dx = – ----------------------------------------------------
2
15b
1
---
1
ln x + ----2- + x
2 2
1
--- a
2 2 2
1---
x ( 1 + a x ) + ---------------------------------------------
2 a
∫ ( 1 + a x ) dx = ----------------------------------------------------------------------------------
2 2
-
2
3---
a ----2- + x
1 2 2
1
---
2 2 2 a
∫ x ( 1 + a x ) dx = ---------------------------
3
-
1
---
1
----- 2 2
1 3
--- 1 ln x + 2 + x
--- --- a
2 2 2 ax ----
1- 2 2 8 2 2 2
∫
2
x ( 1 + a x ) d x = -----
- + x – -------- x ( 1 + a x ) – --------------------------------------------
-
4 a 2
8a
2
8a
3
1--- 1---
2 2 21--- 2 2 2 asin ( ax )
∫ ( 1 – a x ) d x =
2
x ( 1 – a x ) + ---------------------
a
1--- 3---
∫ x ( 1 – a x ) dx = – --3- a----2- – x
2 2 2 a 1 2 2
1 3 1
--- --- ---
) + a asin ---
x- 2 2 2 1---
2 2 2 2 x
∫
2 2 2 2
x ( a – x ) d x = – -- ( a – x ) + x ( a – x
4 8 a
1 1
– --- ---
∫ ( 1 + a x ) dx = --a- ln x + a----2- + x
2 2 1 2 1 2 2
1
– ---
1 2 1
∫(1 – a
2 2
x ) dx = --- asin ( ax ) = – --- acos ( ax )
a a
math guide - 34.77
ax
e -
∫ e dx = ------
ax
+C
a
ax
e -
∫ xe dx = ------
ax
2
( ax – 1 ) + C
a
• When dealing with large and/or time varying objects or phenomenon we must be
able to describe the state at locations, and as a whole. To do this vectors are a very useful
tool.
• Consider a basic function and how it may be represented with partial derivatives.
math guide - 34.78
y = f ( x, y, z )
We can write this in differential form, but the right hand side must contain partial
derivatives. If we separate the operators from the function, we get a simpler form.
We can then look at them as the result of a dot product, and divide it into two vec-
tors.
∂ ∂ ∂
( d )y = f ( x, y, z ) dx + f ( x, y, z ) dy + f ( x, y, z ) dz
∂x ∂y ∂z
∂ ∂ ∂
( d )y = dx + dy + dz f ( x, y, z )
∂x ∂y ∂z
∂ ∂ ∂
( d )y = i + j + k • ( dxi + dyj + dzk ) f ( x, y, z )
∂x ∂y ∂z
We then replace these vectors with the operators below. In this form we can manipu-
late the equation easily (whereas the previous form was very awkward).
( d )y = [ ∇ • dX ]f ( x, y, z )
( d )y = ∇f ( x, y, z ) • dX
( d )y = ∇f ( x, y, z ) dX cos θ
In summary,
• Gauss’s or Green’s or divergence theorem is given below. Both sides give the
flux across a surface, or out of a volume. This is very useful for dealing with magnetic
fields.
∫ ( ∇ • F ) dV =
°∫ FdA
V A
where,
V, A = a volume V enclosed by a surface area A
F = a field or vector value over a volume
math guide - 34.79
• Stoke’s theorem is given below. Both sides give the flux across a surface, or out
of a volume. This is very useful for dealing with magnetic fields.
∫ ( ∇ × F ) dA =
°∫ FdL
A L
where,
A, L = A surface area A, with a bounding parimeter of length L
F = a field or vector value over a volume
• Solving differential equations is not very challenging, but there are a number of
forms that need to be remembered.
• Another complication that often occurs is that the solution of the equations may
vary depending upon boundary or initial conditions. An example of this is a mass spring
combination. If they are initially at rest then they will stay at rest, but if there is some dis-
turbance, then they will oscillate indefinitely.
• We can judge the order of these equations by the highest order derivative in the
equation.
• Note: These equations are typically shown with derivatives only, when integrals
occur they are typically eliminated by taking derivatives of the entire equation.
ordinary differential equations - if all the derivatives are of a single variable. In the
example below ’x’ is the variable with derivatives.
d- 2
---- x + ----- x = y
d
e.g.,
dt dt
first-order differential equations - have only first-order derivatives,
e.g., ----
d- ----
d-
dt x + dt y = 2
math guide - 34.80
2
e.g., ----
d-
x + ----- y = 2
d
dt dt
higher order differential equations - have at least one derivative that is higher than
second-order.
partial differential equations - these equations have partial derivatives
• Note: when solving these equations it is common to hit blocks. In these cases
backtrack and try another approach.
2 3
y' + 2xy – 4x = 0
y' – 2y = 0
homogeneous
34.6.3.1.1 - Guessing
• In this technique we guess at a function that will satisfy the equation, and test it to
see if it works.
• The previous example showed a general solution (i.e., the value of ’C’ was not
found). We can also find a particular solution.
–t
y = Ce a general solution
–t
y = 5e a particular solution
dx
e.g., ------ + y 2 + 2y + 3 = 0
dy
2
∴dx = ( – y – 2y – 3 )dy
3
–y 2
∴x = -------- – y – 3y + C
3
dx
e.g., ------ + x = 0
dy
∴ – --- dx = dy
1
x
∴ ln ( – x ) = y
• These techniques depend upon finding some combination of the variables in the
equation that can be replaced with another variable to simplify the equation. This tech-
nique requires a bit of guessing about what to substitute for, and when it is to be applied.
math guide - 34.83
dy
e.g., ------ = y-- – 1 the equation given
dx x
y the substitution chosen
u = --
x
Put the substitution in and solve the differential equation,
dy
------ = u – 1
dx
du
∴u + x ------ = u – 1
dx
du –1
∴------ = ------
dx x
du 1
∴– ------ = ---
dx x
∴– u = ln ( x ) + C
Substitute the results back into the original substitution equation to get rid of ’u’,
y
– -- = ln ( x ) + C
x
∴y = – x ln ( x ) – Cx
- homogeneous
- nonhomogeneous
d- 2
---- ----
d-
y + A
dt dt y + By = 0
d- 2
---- ----
d-
e.g., dt y + 6 dt y + 3y = 0
Guess,
Bt
y = e
----
d- Bt
dt y = Be
2
----
d- 2 Bt
dt y = B e
B = – 3 + 2.449j, – 3 – 2.449j
substitute and solve for B,
( – 3 + 2.449j )t
y = e
– 3 t 2.449jt
y = e e
–3 t
y = e ( cos ( 2.449t ) + j sin ( 2.449t ) )
d- 2
---- ----
d-
y + A
dt dt y + By = Cx
• to solve these equations we need to find the homogeneous and particular solu-
tions and then add the two solutions.
y = yh + yp
to find yh solve,
d- 2
---- ----
d
-
dt y + A dt y + B = 0
to find yp guess at a value of y and then test for validity, A good table of guesses is,
Cx form Guess
A C
Ax + B Cx + D
Ax Ax Ax
e Ce Cxe
B sin ( Ax ) or B cos ( Ax ) C sin ( Ax ) + D cos ( Ax )
or Cx sin ( Ax ) + xD cos ( Ax )
d- 2
---- ----
d- – 2x
y + y – 6y = e
dt dt
First solve for the homogeneous part,
d- 2
---- ----
d- y = e
Bx
dt y + dt y – 6y = 0 try
----
d-
y = Be
Bx
dt
2
----
d-
y = B
2 Bx
e
dt
2 Bx Bx Bx
B e + Be – 6e = 0
2
B +B–6 = 0
B = – 3, 2
– 3x 2x
yh = e +e
Next, solve for the particular part. We will guess the function below.
– 2x
y = Ce
----
d-
y = – 2C e
– 2x
dt
2
----
d- – 2x
dt y = 4Ce
– 2x – 2x – 2x – 2x
4Ce + – 2C e – 6Ce = e
4C – 2C – 6C = 1
C = 0.25
– 2x
y p = 0.25e
Finally,
– 3x 2x – 2x
y = e +e + 0.25e
2 (n – 1) n–1
f'' ( a ) ( x – a ) f ( a)(x – a)
f ( x ) = f ( a ) + f' ( a ) ( x – a ) + ------------------------------- + … + ------------------------------------------------
2! ( n – 1 )!
(ans. d 3t
----- ------------------ + e 2t = ----
d-
( 3t ( 2 + t ) ) + ----- ( e ) = 3 ( 2 + t ) – 6t ( 2 + t ) + 2e
–2 d 2t –2 –3 2t
dt 2 dt dt
(2 + t)
2. Solve the following differential equation, given the initial conditions at t=0s.
x'' + 4x' + 4x = 5t x0 = 0 x' 0 = 0
math guide - 34.88
(ans.
d d d
a) ----- ( 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 5
d) ----- ( 5 ln t ) = ---
dt t
∫ 6 t dt
2
a)
b) ∫ 14 e dt
7t
c) ∫ sin ( 0.5t ) dt
5
d)
∫ --x- dx
(ans.
3
a) ∫ 6 t dt = 6 ---- = 2t + C
2 t 3
3
7t
b) ∫ 14 e dt = 14 ------ + C = 2e + C
7t e 7t
7
– cos ( 0.5t )
c) ∫ sin ( 0.5t ) dt = -------------------------- + C = – 2 cos ( 0.5t ) + C
0.5
5
d)
∫ --x- dx = 5 ln ( x ) + C
d- -----------
----- 1 -
a)
dx x + 1
d- –t
b) ---- ( e sin ( 2t – 4 ) )
dt
(ans. d- -----------
1 - –1
a) ----- = ------------------2-
dx x + 1
(x + 1)
d
b) ----- ( e –t sin ( 2t – 4 ) ) = – e –t sin ( 2t – 4 ) + 2e –t cos ( 2t – 4 )
dt
∫e
a) 2t
dt
b)
∫ ( sin θ + cos 3θ ) dθ
(ans.
∫e
a) 2t 2t
dt = 0.5e + C
1
b)
∫ ( sin θ + cos 3θ ) dθ = – cos θ + --- sin 3θ + C
3
x'' + 5x' + 3x = 3 x( 0) = 1
x' ( 0 ) = 1
math guide - 34.91
(ans.
x'' + 5x' + 3x = 3 x( 0) = 1 x' ( 0 ) = 1
Homogeneous:
2
A + 5A + 4 = 0
– 5 ± 25 – 16 –5±3
A = ------------------------------------ = ---------------- = – 4, – 1
2 2
– 4t –t
xh = C1 e + C2e
Particular:
xp = A x'p = 0 x'' p = 0
0 + 5 ( 0 ) + 3A = 3 A = 1
xp = 1
Initial values:
– 4t –t
x = x h + xp = C1 e + C2 e + 1
9. Set up an integral and solve it to find the volume inside the shape below. The shape is basically
a cone with the top cut off.
math guide - 34.92
z
y
b
a
c
(ans. a
V = ∫ dV = ∫0 A dx
r = b + ----------- x
c–b
a
2 2
A = πr = π b + ----------- x = πb + 2π ----------- x + π ----------- x
2 c–b 2 c–b c–b 2
a a a
a 2
∫0 πb + 2π ----------
c – b-
x + π ----------- x dx
2 c–b 2
V =
a a
a
c–b 2 π c–b 3 2
V = πb x + π ----------- x + --- ----------- x
2
a 3 a
0
c–b 2 π c–b 2 3
V = πb a + π ----------- a + --- ----------- a
2
a 3 a
2 π 2 2
V = πb a + π ( c – b )a + --- ( c – b ) a
3
10. Solve the first order non-homogeneous differential equation below. Assume the system starts
at rest.
2x' + 4x = 5 sin 4t
• This form of integration is done numerically - this means by doing repeated cal-
culations to solve the equation. Numerical techniques are not as elegant as solving differ-
ential equations, and will result in small errors. But these techniques make it possible to
solve complex problems much faster.
y(t)
yi + 1
yi
yi – 1
ti – 1 T T
ti ti + 1
ti
y--------------------
i + y i – 1 T
∫ti – 1 i 2 - ( ti – ti – 1 ) = --2- ( y i + yi – 1 )
y ( t ) ≈
y i – y i – 1 y i + 1 – y i
y ( t i ) ≈ --------------------
- = --------------------
d-
---- - = --1- ( y i – y i – 1 ) = --1- ( y i + 1 – y i )
dt ti – ti – 1 t i + 1 – ti T T
--1- ( y i + 1 – y i ) – --- ( y i – y i – 1 )
1
----
d- 2 T T –2 yi + yi – 1 + y i + 1
dt y ( t i ) ≈ ----------------------------------------------------------------- = ---------------------------------------------
2
T T
math guide - 34.94
• We can also estimate the change resulting from a derivative using Euler’s equa-
tion for a first-order difference equation.
d
y ( t + h ) ≈ y ( t ) + h ----- y ( t )
dt
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 ) + …
d
dt 2! dt 3! dt 4! dt
----
d- 2 3 ----
d-
dt x 0
x = 1+x +t = 0
dt
x0 = 0
0 0 0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
math guide - 34.95
• The equations below are for calculating a fourth order Runge-Kutta integration.
1
x ( t + h ) = x ( t ) + --- ( F 1 + 2F 2 + 2F 3 + F4 )
6
F 1 = hf ( t, x )
F1
F 2 = hf t + ---, x + ------
h
2 2
F2
F 3 = hf t + ---, x + ------
h
2 2
F 4 = hf ( t + h, x + F 3 )
where,
f ( xi )
x i + 1 = x i – -----------------------
-----
d-
f ( x )
dx i
• This method can become divergent if the function has an inflection point near the
root.
• The Laplace transform allows us to reverse time. And, as you recall from before
the inverse of time is frequency. Because we are normally concerned with response, the
Laplace transform is much more useful in system analysis.
∞
∫0 f ( t )e
– st
F(s) = dt
where,
f ( t ) = the function in terms of time t
F ( s ) = the function in terms of the Laplace s
Kf ( t ) Kf ( s )
f1 ( t ) + f2 ( t ) –f3 ( t ) + … f1 ( s ) + f2 ( s ) –f 3 ( s ) + …
df (t) –
----------- sf ( s ) – f ( 0 )
dt
2 –
f ( t )-
d------------- 2 – df ( 0 )
2
s f ( s ) – sf ( 0 ) – ------------------
dt dt
n – n –
f ( t )- n – 2 df ( 0
-----------------)- – … – d-------------------
d------------- n n–1 – f ( 0 )-
n
s f( s) – s f(0 ) – s n
dt dt dt
t
( s -)
∫0 f ( t ) dt f--------
s
– as
f ( t – a )u ( t – a ), a > 0 e f( s)
– at
e f(t) f(s – a)
f ( at ), a > 0 1 s
--- f ---
a a
df ( s )-
–--------------
tf ( t )
ds
n
n f ( s -)
nd
t f(t) ( – 1 ) --------------
n
ds
∞
( t )-
f-------
t ∫ f ( u ) du
s
A
A ---
s
1
t ----
2
s
– at 1-
e ----------
s+a
sin ( ωt ) ω
-----------------
2 2
s +ω
s
cos ( ωt ) -----------------
2 2
s +ω
– at 1
te -------------------
2
(s + a)
– at ω
e sin ( ωt ) -------------------------------
2 2
-
(s + a) + ω
– at s+a -
e cos ( ωt ) -------------------------------
2 2
(s + a) + ω
– at A-
Ae ----------
s–a
– at A -
Ate -----------------
2
(s – a)
– αt complex conjugate
2Ae cos ( βt + θ ) A A
----------------------- + --------------------------------------
s + α – βj s + α + βj
– αt complex conjugate
2t A e cos ( βt + θ ) A
------------------------------ A
- + -------------------------------------
-
2 2
( s + α – βj ) ( s + α + βj )
34.9 z-TRANSFORMS
∑ ∑ x [ n ]z
–n –n
X(z) = x [ n ]z . The one-sided z-transform is defined by X ( z ) = . In
n = –∞ n=0
both cases, the z-transform is a polynomial in the complex variable z .
• Along with a z-transform we associate its region of convergence (or ROC). These
are the values of z for which X ( z ) is bounded (i.e., of finite magnitude).
math guide - 34.100
Signal z-Transform
ROC
x[ n] X(z)
δ[n] 1 All z
1 -
u[n] ---------------
–1 z >1
1–z
–1
z
nu [ n ] ----------------------
- z >1
–1 2
(1 – z )
–1 –1
( 1 + z )-
z----------------------------
2
n u[n ] z >1
–1 3
(1 – z )
1 -
n
a u[n ] ------------------
–1 z > a
1 – az
–1
az
n
na u [ n ] -------------------------- z > a
–1 2
( 1 – az )
1 -
n
( – a )u [ – n – 1 ] ------------------
–1 z < a
1 – az
–1
az
n
( – na )u [ – n – 1 ] -------------------------- z < a
–1 2
( 1 – az )
–1
1 – z cos ω 0
cos ( ω 0 n ) u [ n ] ------------------------------------------------
- z >1
–1 –2
1 – 2z cos ω 0 + z
–1
z sin ω 0
sin ( ω 0 n ) u [ n ] ------------------------------------------------
- z >1
–1 –2
1 – 2z cos ω 0 + z
–1
1 – az cos ω 0
n
a cos ( ω 0 n ) u [ n ] ---------------------------------------------------------
–1 2 –2
- z > a
1 – 2az cos ω 0 + a z
math guide - 34.101
Signal z-Transform
ROC
x[ n] X(z)
–1
az sin ω 0
n
a sin ( ω 0 n ) u [ n ] ---------------------------------------------------------
–1 2 –2
- z > a
1 – 2az cos ω 0 + a z
–k
n! - z
---------------------- u[n] -----------------------------
- z >1
k! ( n – k )! (1 – z )
–1 k + 1
• The z-transform also has various properties that are useful. The table below lists
properties for the two-sided z-transform. The one-sided z-transform properties can be
derived from the ones below by considering the signal x [ n ]u [ n ] instead of simply x [ n ] .
Time Shifting x[ n – k] –k
z X( z) That of X ( z ) , except
z = 0 if k > 0 and
z = ∞ if k < 0
z-Domain Scaling n
a x[ n] X(a z)
–1 a r2 < z < a r1
Multiplication x 1 [ n ]x 2 [ n ] At least
X 1 ( v )X 2 -- v dv
1- z –1
j2π°
------- ∫ v r 1l r 2l < z < r 1u r 2u
• These series describe functions by their frequency spectrum content. For example
a square wave can be approximated with a sum of a series of sine waves with varying
magnitudes.
∞
a0
a n cos --------- + b n sin ---------
nπx nπx
f ( x ) = ----- +
2 ∑ L L
n=1
1 L 1 L
a n = --- ∫ f ( x ) cos --------- dx b n = --- ∫ f ( x ) sin --------- dx
nπx nπx
L –L L L –L L
• To ensure that the omissions are obvious, I provide a list of topics not covered
below. Some of these may be added later if their need becomes obvious.
34.12 REFERENCES/BIBLIOGRAPHY
Spiegel, M. R., Mathematical Handbook of Formulas and Tables, Schaum’s Outline Series,
McGraw-Hill Book Company, 1968.
C programming - 35.1
• Machine Portable, which means that it requires only small changes to run on
other computers.
35.2 BACKGROUND
• The main program is treated like a function, and thus it has the name main().
main()
{
int x, y = 2, z; /* define three variables and give one a value */
x = 3; /* give another variable a value */
z = x + y; /* add the two variables */
printf(“%d + %d = %d\n”, x, y, z); /*print the results */
}
Results (output):
• Major Data Types for variables and functions are (for IBM PC):
•int, short, long, char can be modified by the addition of unsigned, and register.
An unsigned integer will not use 1 bit for number sign. A register variable will use a data
register in the microprocessor, if possible, and it will speed things up (this is only available
for integers).
main()
{
unsigned int i;
register j;
short k;
char l;
double m;
etc
main()
{
int x = 3, y = 2, z; /* define three variables and give values */
z = add(x, y); /* pass the two values to ‘add’ and get the sum*/
printf(“%d + %d = %d\n”, x, y, z); /*print the results */
}
• Every variable has a scope. This determines which functions are able to use that
variable. If a variable is global, then it may be used by any function. These can be modi-
fied by the addition of static, extern and auto. If a variable is defined in a function, then it
will be local to that function, and is not used by any other function. If the variable needs to
be initialized every time the subroutine is called, this is an auto type. static variables can
be used for a variable that must keep the value it had the last time the function was called.
Using extern will allow the variable types from other parts of the program to be used in a
function.
C programming - 35.6
main()
{
printf(“%d + %d = %d\n”, x, y, add()); /*print the results */
}
• Some basic control flow statements are while(), do-while(), for(), switch(), and
if(). A couple of example programs are given below which demonstrate all the ’C’ flow
statements.
main()
{
int i;
for(i = 1; i <= 5; i = i + 1){
printf(“number %d \n”, i); /*print the number */
}
}
C programming - 35.7
main()
{
int i = 1;
while(i <= 5){
printf(“number %d \n”, i);
i = i + 1;
}
}
main()
{
int i = 1;
do{
printf(“number %d \n”, i);
i = i + 1;
}while(i <= 5)
}
main()
{
int i = 1;
do{
printf(“number %d \n”, i);
i = i + 1;
}until(i > 5)
}
C programming - 35.8
main()
{
int x = 2, y = 3;
if(x > y){
printf(“Maximum is %d \n”, x);
} else if(y > x){
printf(“Maximum is %d \n”, y);
} else {
printf(“Both values are %d \n”, x);
}
}
main()
{
int x = 3; /* Number of People in Family */
switch(x){ /* choose the numerical switch */
case 0: /* Nobody */
printf(“There is no family \n”);
break;
case 1: /* Only one person, but a start */
printf(“There is one parent\n”);
break;
case 2: /* You need two to start something */
printf(“There are two parents\n”);
break;
default: /* critical mass */
printf(“There are two parents and %d kids\n”, x-2);
break;
}
}
C programming - 35.9
• #include <filename.h> will insert the file named filename.h into the program.
The *.h extension is used to indicate a header file which contains ‘C’ code to define func-
tions and constants. This almost always includes “stdio.h”. As we saw before, a function
must be defined (as with the ‘add’ function). We did not define printf() before we used it,
this is normally done by using #include <stdio.h> at the top of your programs. “stdio.h”
contains a line which says ‘int printf();’. If we needed to use a math function like y =
sin(x) we would have to also use #include <math.h>, or else the compiler would not know
what type of value that sin() is supposed to return.
#include “stdio.h”
#include “math.h”
#define TWO_PI 6.283185307
#define STEPS 5
main()
{
double x; /* Current x value*/
• #ifdef, #ifndef, #if, #else and #else can be used to conditionally include parts of a
program. This is use for including and eliminating debugging lines in a program.
• #define, #include, #ifdef, #ifndef, #if, #else, /* and */ are all handled by the Pre-
processor, before the compiler touches the program.
C programming - 35.10
• Matrices are defined as shown in the example. In ‘C’ there are no limits to the
matrix size, or dimensions. Arrays may be any data type. Strings are stored as arrays of
characters.
#include “stdio.h”
#define STRING_LENGTH 5
main()
{
int i;
char string[STRING_LENGTH]; /* character array */
gets(string); /* Input string from keyboard */
for(i = 0; i < STRING_LENGTH; i++){
printf(“pos %d, char %c, ASCII %d \n”, i, string[i], string[i]);
}
}
INPUT:
HUGH<return>
OUTPUT:
pos 0, char H, ASCII 72
pos 0, char U, ASCII 85
pos 0, char G, ASCII 71
pos 0, char H, ASCII 72
pos 0, char , ASCII 0
C programming - 35.11
• Pointers are a very unique feature of ‘C’. First recall that each variable uses a real
location in memory. The computer remembers where the location of that variable is, this
memory of location is called a pointer. This pointer is always hidden from the program-
mer, and uses it only in the background. In ‘C’, the pointer to a variable may be used. We
may use some of the operations of ‘C’ to get the variable that the pointer, points to. This
allows us to deal with variables in a very powerful way.
#include “stdio.h”
main()
{
int i;
char *string; /* character pointer */
gets(string); /* Input string from keyboard */
for(i = 0; string[i] != 0; i++){
printf(“ pos %d, char %c, ASCII %d \n”, i, string[i], string[i]);
}
}
INPUT:
HUGH<return>
OUTPUT:
pos 0, char H, ASCII 72
pos 0, char U, ASCII 85
pos 0, char G, ASCII 71
pos 0, char H, ASCII 72
• A ‘C’ compiler has three basic components: Preprocessor, First and Second Pass
C programming - 35.12
The Preprocessor
Executable Code
(*.exe)
C programming - 35.13
• Use indents, spaces and blank lines, to make the program look less cluttered, and
give it a block style.
• Descriptive variable names, and defined constants make the purpose of the vari-
able obvious.
• All declarations for the program should be made at the top of the program listing.
C programming - 35.14
main(){int i;for(;i<10;i++)printf(“age:%d\n”,i);}
#include <stdio.h>
#define COUNT 10 /* Number of counts in loop */
main()
{
int i; /* counter */
for(i = 0; i < COUNT; i++){ /* loop to print numbers */
printf(“age:%d\n”, i);
}
exit(0);
}
35.6.1 How?
• A program should be broken into fundamental parts (using functions for each
part) and then assembled using functions. Each function consists of programs written
using the previous simpler functions.
C programming - 35.15
Wheel
• Never use goto’s, they are a major source of logic errors. Functions are much eas-
ier to use, once written.
• Try to isolate machine specific commands (like graphics) into a few functions.
35.6.2 Why?
• When programs are complete, errors tend to be associated with modules, and are
thus much easier to locate.
C programming - 35.16
• Updates to programs are much easier, when we only need to change one function.
2. Define Problem - Write out the relevant theory. This description should include
variables, calculations and figures, which are necessary for a complete solution to the
problem. From this we make a list of required data (inputs) and necessary results (output).
3. Design User Interface - The layout of the screen(s) must be done on paper. The
method of data entry must also be considered. User options and help are also considered
here. (There are numerous factors to be considered at this stage, as outlined in the course
notes.)
4. Write Flow Program - This is the main code that decides when general opera-
tions occur. This is the most abstract part of the program, and is written calling dummy
‘program stubs’.
C programming - 35.17
5. Expand Program - The dummy ‘stubs’ are now individually written as func-
tions. These functions will call another set of dummy ‘program stubs’. This continues
until all of the stubs are completed. After the completion of any new function, the program
is compiled, tested and debugged.
6. Testing and Debugging- The program operation is tested, and checked to make
sure that it meets the objectives. If any bugs are encountered, then the program is revised,
and then retested.
Golden Rule: If you are unsure how to proceed when writing a program, then work
out the problem on paper, before you commit yourself to your programmed solution.
35.8.1 Objectives:
• The program is expected to aid the design of beams by taking basic information
about beam geometry and material, and then providing immediate feedback. The beam
will be simply supported, and be under a single point load. The program should also pro-
vide a printed report on the beam.
• The basic theory for beam design is available in any good mechanical design
textbook. In this example it will not be given.
• The inputs were determined to be few in number: Beam Type, Beam Material,
Beam Thickness, Beam Width, Beam Height, Beam Length, Load Position, Load Force.
• The possible outputs are Cross Section Area, Weight, Axial Stiffness, Bending
Stiffness, and Beam Deflection, a visual display of Beam Geometry, a display of Beam
Deflection.
• The small number of inputs and outputs could all be displayed, and updated, on a
single screen.
• The left side of the screen was for inputs, the right side for outputs.
• The screen is divided into regions for input(2), input display and prompts(1),
Beam Cross section(3), Numerical Results(4), and Beam Deflection(5).
35.8.3.2 - Input:
• Current Inputs were indicated by placing a box around the item on the display(1).
• The cursor keys could be used to cursor the input selector up or down.
• Keys required: UP/DOWN Cursors, F1, F2, F4, numbers from ‘0’ to ‘9’, ‘.’, ‘-’,
C programming - 35.20
and <RETURN>. In the spirit of robustness it was decided to screen all other keys.
35.8.3.3 - Output:
• Proper textual descriptions were used to ensure clarity for the user.
• For a printed report, screen information would be printed to a printer, with the
prompt area replaced with the date and time.
35.8.3.4 - Help:
• A special set of help information was needed. It was decided to ensure that the
screen always displays all information necessary(2).
35.8.3.6 - Miscellaneous:
main()
/*
* EXECUTIVE CONTROL LEVEL
*
* This is the main terminal point between the
* various stages of setup, input, revision
* and termination.
*
* January 29th, 1989.
*/
{
static int error;
screen(NEW);
screen(UPDATE);
}
}
error = NO_ERROR;
}
kill();
if(error == ERROR) {
printf(“EGA Graphics Driver Not Installed”);
• The routines were written in a top down fashion, in a time of about 30 hours.
These routines are listed below.
• picture() - draws the beam cross section and deflection of beam. For the sake
of speed, this section will use low level commands.
• input() - A function which controls the main input loop for numbers, con-
• Condition and error flags were used to skip unnecessary operations, and thus
speed up response. A response of more than 0.5 seconds will result in loss of attention by
the user.
C programming - 35.24
Top Down
picture()
In this case we see that most of the routines
are at the bottom of the design tree. This structure
shows a clear division of tasks, to their basic parts. enter()
On the above diagram, none of the functions calls
any of the functions to the left of it, only to the
right. In this case main() will call setup(), screen(), draw_line()
input() and kill() directly.
text()
calculations()
printes()
Machine Dependence Increases
Consideration of detail
Consideration of flow
• The testing and debugging was very fast, with only realignment of graphics being
required. This took a couple of hours.
35.8.7 Documentation
• The theory for beam design was given for the reference of any program user, who
wanted to verify the theory, and possible use it.
• A manual was given which described key layouts, screen layout, basic sequence
of operations, inputs and outputs.
• A walk through manual was given. This allowed the user to follow an example
which displayed all aspects of the program.
C programming - 35.26
1. What are the basic components of a ‘C’ compiler, and what do they do?
C programming - 35.27
2. You have been asked to design a CAD program which will choose a bolt and a
nut to hold two pieces of sheet metal together. Each piece of sheet metal will have a hole
drilled in it that is the size of the screw. You are required to consider that the two pieces are
experiencing a single force. State your assumptions about the problem, then describe how
you would produce this program with a Top Down design.
4. Describe some of the reasons for Using Top-Down Design, and how to do it.
units - 36.1
• Good engineering practice demands that each number should always be accom-
panied with a unit.
• This table does not give an exhaustive list of conversion factors, but instead a
minimal (but fairly complete) set is given. From the values below any conversion value
can be derived. If you are not sure about this, ask the instructor to show you how.
2 2
∴d = ( 10m ) + ( 5ft ) From the tables
multiply by 1
2 2
∴d = 100m + 25ft 1ft = 0.3048m
2 0.3048m 2 0.3048m
100m + 25ft --------------------- ∴1 = ---------------------
2
∴d =
1ft 1ft
2
2 2 m
∴d = 100m + 25ft ( 0.092903 ) ------2
ft
cancel out units
2 2
∴d = 100m + 25 ( 0.092903 )m
2
∴d = 102.32m = 10.12m
units - 36.2
1. Beware upper/lower case letter in many cases they can change meanings.
e.g., N•m
5. Use spaces to divide digits when there are more than 5 figures, commas are
avoided because their use is equivalent to decimal points in some cultures.
• In some cases units are non-standard. There are two major variations US units are
marked with ‘US’ and Imperial units are marked with ‘IMP’.
Major Division
Distance
1 ft. (feet) = 12 in. (inches) = 0.3048 m (meter)
1 mile = 1760 yards = 5280 ft = 1.609km
1 in.(inch) = 2.540 cm
1 yd (yard) = 3 ft.
1 nautical mile = 6080 ft. = 1852 m = 1.150782 mi
1 micron = 10-6 m
1 angstrom = 10-10 m
1 mil = 10-6 m
1 acre = 43,560 ft. = 0.4047 hectares
units - 36.3
1 furlong = 660 ft
1 lightyear = 9.460528e15 m
1 parsec = 3.085678e16 m
Area
1 acre = 43,559.66 ft2
1 Hectare (ha) = 10,000 m2
1 Hectare (ha) = 10,000 m2
1 Hectare (ha) = 10,000 m2
1 Hectare (ha) = 10,000 m2
Velocity
1 mph = 0.8689762 knot
Angle
1 rev = 2PI radians = 360 degrees = 400 gradians
1 degree = 60 minutes
1 minute = 60 seconds
Volume
1 US gallon = 231 in3
1 CC = 1 cm3
1 IMP gallon = 277.274 in3
1 barrel = 31 IMP gal. = 31.5 US gal.
1 US gal. = 3.785 l = 4 quarts = 8 pints = 16 cups
1 liter (l) = 0.001 m3 = 2.1 pints (pt) = 1.06 quarts (qt) = 0.26 gallons (gal)
1 qt (quart) = 0.9464 l
1 cup (c) = 0.2365882 l = 8 USoz
1 US oz = 8 U.S. drams = 456.0129 drops = 480 US minim = 1.040842
IMP oz
= 2 tablespoons = 6 teaspoons
1 IMP gal. = 1.201 U.S. gal.
1 US pint = 16 US oz
1 IMP pint = 20 IMP oz
1tablespoon = 0.5 oz.
1 bushel = 32 quarts
1 peck = 8 quarts
Force/Mass
1 N (newton) = 1 kg•m/s2 = 100,000 dyne
1 dyne = 2.248*10-6 lb. (pound)
1 kg = 9.81 N (on earth surface) = 2.2046 lb
1lb = 16 oz. (ounce) = 4.448N
units - 36.4
Pressure
1 Pascal (Pa) = 1 N/m2 = 6.895 kPa
1 atm (metric atmos.) =760 mmHg at 0°C=14.223 lb/in2=1.0132*105 N/m2
1 psi = 2.0355 in. Hg at 32F = 2.0416 in. Hg at 62F
1 microbar = 0.1 N/m2
Scale/Magnitude
atto (a) = 10-18
femto (f) = 10-15
pico (p) = 10-12
nano (n) = 10-9
micro (µ) = 10-6
milli (m) = 10-3
centi (c) 10-2
deci (d) = 10-1
deka (da) = 10
hecto (H) = 102
kilo (K) = 103
mega (M) = 106
giga (G) = 109
tera (T) = 1012
peta (P) = 1015
exa (E) = 1018
Power
1 h.p. (horsepower) = 745.7 W (watts) = 2.545 BTU/hr. = 550 ft.lb./sec.
1 ft•lb/s = 1.356 W
1 J (joule) = 1 N•m = 107 ergs = 0.2389 cal.
1 W = 1 J/s
units - 36.5
1 ev = 1.60219*10-19 J
1 erg = 10-7 J
Temperature
°F = [(°C*9)/5]+32, °C = Celsius (Centigrade), F = Fahrenheit
K = Kelvin
Rankine (R) = F - 459.666
0.252 calories = 1 BTU (British Thermal Unit)
-273.2 °C = -459.7 °F = 0 K = 0 R = absolute zero
0 °C = 32 °F = 273.3 K = 491.7 R = Water Freezes
100°C = 212°F = 373.3 K = 671.7 R = Water Boils (1 atm. pressure)
1 therm = 100,000 BTU
Mathematical
π radians = 3.1416 radians = 180 degrees = 0.5 cycles
1 Hz = 1 cycle/sec.
1 rpm (revolutions per minute) = 60 RPS (Revolutions per second) = 60Hz
1 fps (foot per second) = 1 ft/sec
1 mph (miles per hour) = 1 mi./hr.
1 cfm (cubic foot per minute) = 1 ft3/min.
e = 2.718
Time
1 Hz (hertz) = 1 s-1
1 year = 365 days = 52 weeks = 12 months
1 leap year = 366 days
1 day = 24 hours
1 fortnight = 14 days
1 hour = 60 min.
1 min = 60 seconds
1 millenium = 1000 years
1 century = 100 years
1 decade = 10 years
Physical Constants
R = 1.987 cal/mole K = ideal gas law constant
K = Boltzmann’s constant = 1.3x10-16 erg/K = 1.3x10-23 J/K
h = Planck’s constant = 6.62x10-27 erg-sec = 6.62x10-34 J.sec
Avagadro’s number = 6.02x1023 atoms/atomic weight
density of water = 1 g/cm3
electron charge = 1.60x10-19 coul.
electron rest mass = 9.11*10**-31 kg
proton rest mass = 1.67*10**-27 kg
units - 36.6
Electromagnetic
magnetic flux = weber (We) = 10**8 maxwell
inductance = henry
magnetic flux density = tesla (T) = 10**4 gauss
magnetic intensity = ampere/m = 0.004*PI oersted
electric flux density = coulomb/m**2
capacitance = farad
permeability = henry/m
electric field strength = V/m
luminous flux = lumen
luminance = candela/m**2
1 flame = 4 foot candles = 43.05564 lux = 43.05564 meter-candles
illumination = lux
resistance = ohm
• The table below will allow conversions between decimal, binary, hexadecimal,
and ASCII values. The values shown only go up to 127. ASCII values above this are not
commonly used in robust applications.
units - 36.7
hexadecimal
hexadecimal
decimal
decimal
ASCII
ASCII
binary
binary
0 0 00000000 NUL 32 20 00100000 space
1 1 00000001 SOH 33 21 00100001 !
2 2 00000010 STX 34 22 00100010 “
3 3 00000011 ETX 35 23 00100011 #
4 4 00000100 EOT 36 24 00100100 $
5 5 00000101 ENQ 37 25 00100101 %
6 6 00000110 ACK 38 26 00100110 &
7 7 00000111 BEL 39 27 00100111 ‘
8 8 00001000 BS 40 28 00101000 (
9 9 00001001 HT 41 29 00101001 )
10 A 00001010 LF 42 2A 00101010 *
11 B 00001011 VT 43 2B 00101011 +
12 C 00001100 FF 44 2C 00101100 ,
13 D 00001101 CR 45 2D 00101101 -
14 E 00001110 S0 46 2E 00101110 .
15 F 00001111 S1 47 2F 00101111 /
16 10 00010000 DLE 48 30 00110000 0
17 11 00010001 DC1 49 31 00110001 1
18 12 00010010 DC2 50 32 00110010 2
19 13 00010011 DC3 51 33 00110011 3
20 14 00010100 DC4 52 34 00110100 4
21 15 00010101 NAK 53 35 00110101 5
22 16 00010110 SYN 54 36 00110110 6
23 17 00010111 ETB 55 37 00110111 7
24 18 00011000 CAN 56 38 00111000 8
25 19 00011001 EM 57 39 00111001 9
26 1A 00011010 SUB 58 3A 00111010 :
27 1B 00011011 ESC 59 3B 00111011 ;
28 1C 00011100 FS 60 3C 00111100 <
29 1D 00011101 GS 61 3D 00111101 =
30 1E 00011110 RS 62 3E 00111110 >
31 1F 00011111 US 63 3F 00111111 ?
units - 36.8
hexadecimal
hexadecimal
decimal
decimal
ASCII
ASCII
binary
binary
64 40 01000000 @ 96 60 01100000 ‘
65 41 01000001 A 97 61 01100001 a
66 42 01000010 B 98 62 01100010 b
67 43 01000011 C 99 63 01100011 c
68 44 01000100 D 100 64 01100100 d
69 45 01000101 E 101 65 01100101 e
70 46 01000110 F 102 66 01100110 f
71 47 01000111 G 103 67 01100111 g
72 48 01001000 H 104 68 01101000 h
73 49 01001001 I 105 69 01101001 i
74 4A 01001010 J 106 6A 01101010 j
75 4B 01001011 K 107 6B 01101011 k
76 4C 01001100 L 108 6C 01101100 l
77 4D 01001101 M 109 6D 01101101 m
78 4E 01001110 N 110 6E 01101110 n
79 4F 01001111 O 111 6F 01101111 o
80 50 01010000 P 112 70 01110000 p
81 51 01010001 Q 113 71 01110001 q
82 52 01010010 R 114 72 01110010 r
83 53 01010011 S 115 73 01110011 s
84 54 01010100 T 116 74 01110100 t
85 55 01010101 U 117 75 01110101 u
86 56 01010110 V 118 76 01110110 v
87 57 01010111 W 119 77 01110111 w
88 58 01011000 X 120 78 01111000 x
89 59 01011001 Y 121 79 01111001 y
90 5A 01011010 Z 122 7A 01111010 z
91 5B 01011011 [ 123 7B 01111011 {
92 5C 01011100 yen 124 7C 01111100 |
93 5D 01011101 ] 125 7D 01111101 }
94 5E 01011110 ^ 126 7E 01111110 r arr.
95 5F 01011111 _ 127 7F 01111111 l arr.
36.5 G-CODES
• Note that G and M codes not universal standards, and may vary between
machines. In any case of doubt, the manuals for the machine should be checked.
units - 36.9
• A basic list of ‘G’ operation codes is given below. These direct motion of the
tool.
F = 96,500 coulombs
Table 1:
thermal expansion
ult. stress - comp.
Density
poisson
Type
G
E
10-6/deg C
(Mg/m3)
(MPa)
(MPa)
(GPa)
(GPa)
(%)
1100-h14
2024-T6
5456-h116
Table 1:
thermal expansion
ult. stress - comp.
Density
poisson
Type
G
E
10-6/deg C
(Mg/m3)
(MPa)
(MPa)
(GPa)
(GPa)
(%)
Brass typical 8.4-8.6 96-110 36-41 0.34 70-550 200-620 4-60 19.1-
21.2
Yellow Brass
cold rolled
annealed
Red Brass
cold rolled
annealed
Bronze typical 8.2-8.8 96-120 36-44 0.34 82-690 200-830 5-60 18-21
Cast Iron typical 7.0-7.4 83-170 32-69 0.2-0.3 120 69-480 0-1 340- 9.9-12
1400
Copper typical 8.9 110-120 40-47 0.33- 55-760 230-830 4-50 16.6-
0.36 17.6
annealed
hard drawn
Plate 70
Fibers 7000-
20000
Magnesium typ. alloys 1.76- 41-45 15-17 0.35 80-280 140-340 2-20 26.1-
1.83 28.8
Table 1:
thermal expansion
ult. stress - comp.
Density
poisson
Type
G
E
10-6/deg C
(Mg/m3)
(MPa)
(MPa)
(GPa)
(GPa)
(%)
Plastics
Rock 5-9
Rubber typical .96-1.3 0.0007- 0.0002- 0.45- 1-7 7-20 100-800 130-200
0.004 0.001 0.50
Sand,soil,gra 1.2-2.2
vel
cold rolled
annealed
astm-a48
materials - 37.4
Table 1:
thermal expansion
ult. stress - comp.
Density
poisson
Type
G
E
10-6/deg C
(Mg/m3)
(MPa)
(MPa)
(GPa)
(GPa)
(%)
astm-a47
astm-a5242
astm-a441
Titanium typ. alloys 4.5 100-120 39-44 0.33 760- 900- 10 8.1-11
1000 1200
sea 1.02
Wood (dry)
Axial/Normal Stress/Strain P PL
σ = εE = --- δ = εL = -------
A AE
Shear Stress/Strain τ xy
τ = γG γ xy = -------
G
σx σy σz
ε x = ----- – ν ----- – ν -----
E E E
Torsion τ max
Tc
τ max = ------ γmax = ----------
J G
4
TL πr (cylinder)
φ = ------- J = --------
JG 2
π 4 4
σ ten = – σ comp = τ J = --- ( r o – r i ) (hollow tube)
2
γ
ε = --- P = 2πfT
2
materials - 37.6
3
Beams My bh
σ = – -------- I = -------- (for rectangle)
12
I
4
VQ πr
τ = -------- I = -------- (for circle)
2
Ib
c
L = ρθ ε max = ---
ρ
My EI
σ = – -------- ρ = ------
I M
2
Buckling π EI k=0.5 (both ends fixed)
P < -----------
2 2
- k=0.7 (one end fixed, one pinned)
k L k=1.0 (both ends pinned)
k=2.0 (one end pinned, one free)
K d/2 r
3.0 P P
d/2
2.5
2.0
1.5
r/d
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
materials - 37.7
K
r
2.5
P D
d
P
2.0
D/d = 2.0
1.5
D/d = 1.5
D/d = 1.25
D/d = 1.1
1.0
r/d
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
materials - 37.8
K
T
r T
D d
2.5
2.0
1.5
D/d = 2.0
D/d = 1.33
D/d = 1.2
D/d = 1.1
1.0
r/d
0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1
bibliography - 38.1
38. BIBLIOGRAPHY
38.1 TEXTBOOKS
Citation: Slotine, J. E., Li, W., "Applied Nonlinear Control", Prentice Hall, 1991.
Topics/Chapters:
Introduction
Phase plane analysis
Fundamentals of Lyapunov theory
Advanced stability theory
Describing function analysis
Feedback linearization
Sliding control
Adaptive control
Control of Multi-input physical systems
38.1.2 VandeVegte
Topics/Chapters:
Topics:
Objectives:
ea = KE ω
Te = KT ia
2
T e – T L – C d ω = JDω
2
T e = JDω + C d ω + T L
v a = r a i a + l a Di a + e a
va = ia ( ra + la D ) + e a
va = ia ( ra + la D ) + K E ω
Te
v a = ------ ( r a + l a D ) + K E ω
KT
2
( JDω + C d ω + T L )
v a = ------------------------------------------------ ( r a + l a D ) + K E ω
KT
2
( JDω + C d ω + T L ) ( r a + l a D ) + K E K T ω = K T v a
2 2
Jr a Dω + C d r a ω + T L r a + Jla DDω + l a DC d ω + l a DT L + K E K T ω = K T v a
·· · 2 ·
ω ( Jla ) + ω ( Jr a + l a ωC d ) + ω ( K E K T ) + ω ( C d r a ) = v a ( K T ) + T L ( – r a ) + T L ( – l a )
input output equations - 39.2
r a = measured
T L ( ra ) = v a ( K T )
TL ( ra )
K T = ---------------
-
va
At a steady state speed,
2
0 ( Jl a ) + 0 ( Jr a + l a ωC d ) + ω ( K E K T ) + ω ( C d r a ) = v a ( K T ) + T L ( – r a ) + 0 ( – l a )
2
ω ( KE KT ) + ω ( Cd ra ) = v a ( K T ) + T L ( –r a )
2
ω ( C d ra ) + ω ( KE KT ) + ( TL ( ra ) – va ( KT ) ) = 0
0 ( Jl a ) + 0 ( Jr a + l a ωC d ) + ω ( K E K T ) + 0 = v a ( K T ) + T L ( – r a ) + 0 ( – l a )
ω ( KE KT ) = va ( KT ) + TL ( –ra )
ra
ω ( K E ) + T L ------ = v a
KT
The static friction limit,
0 ( Jl a ) + 0 ( Jr a + l a ωC d ) + 0 ( K E K T ) + 0 ( C d r a ) = v a ( K T ) + T L ( – r a ) + 0 ( –l a )
KT
T L = v a ------
ra
input output equations - 39.3
·· · 2 ·
ω + ω A + ωB + ω C = v a D + T L E + T L F
input output equations - 39.4
TL
-
ia Te
vs + 1 -
-------------------- 1
-------------------- ωr
La D + ra Ka JD + Bm
+
-
Ka
where,
Motor parameters can be measured by applying a voltage and holding (stalling) the shaft.
The stalled motor torque, and the current are measured. When stalled, the load and effec-
tive torques are equal, and the feedback loop is zero, allowing the simplified system
block diagram. This allows the calculation of the motor speed coefficient directly.
vs 1 ia TL
--------------------- Ka
La D + ra
T
K a = -----L-
ia
The resistance of the windings can be found by direct measurement with a DMM, but can
also be verified by using the steady state current and voltages.
i 1 - 1 1
---a- = ------------------ = --------------------------- = ----
vs La s + ra L a ( j0 ) + r a ra
v
r a = ----s
ia
The inductance of the windings can be found using the time constant - phase shift
????????????????
i 1 -
---a- = ------------------
vs La s + ra XXXXXXXXXXXXXXX
input output equations - 39.6
If the motor is unloaded (TL = 0) the following differential equation can be derived. If the
system is allowed to reach steady state, the derivatives of motor speed will become
zero.
ia Te
vs + 1 -
--------------------
1
-------------------- ωr
La D + ra Ka JD + Bm
-
Ka
2 2
D ω r ( L a J ) + Dω r ( L a B m + Jr a ) + ω r ( r a Bm + K a ) = Vs K a
2
( 0 ) ( L a J ) + ( 0 ) ( L a B m + Jr a ) + ω r ( r a B m + K a ) = V s K a
2
ω r ( ra Bm + K a ) = Vs Ka
2
Vs K a K a
Bm = ------------ – ------
ra ωr r a
2 2
D ω r ( L a J ) + Dω r ( L a B m + Jr a ) + ω r ( r a B m + K a ) = V s K a
TL
-
ia Te
vs + 1 -
--------------------
1
-------------------- ωr
La D + ra Ka JD + Bm
+
-
Ka
1
i a = ( v s – K a ω r ) ---------------------
La D + ra
Di a ( L a ) + i a ( r a ) = v s – K a ω r
–K a –ra
Di a = v s ----- + ω r --------- + i a --------
1
La La La
1
ω r = ( K a i a – T L ) --------------------
JD + B m
Dω r ( J ) + ω r ( B m ) = K a i a – T L
K –B
Dω r = i a -----a- + T L ------ + ω r ---------m-
–1
J J J
–r –K 1-
-------a- --------a- ---- 0
d- i a
----
La La ia La vs
= +
dt ω Ka –B m ω r –1 T
r
------ ---------- 0 ------ L
J J J
input output equations - 39.8
1
E = ----- La = E
La
–ra
A = -------- r a = – AL a = – AE
La
–Ka
B = --------- K a = – BL a = – BE
La
Ka Ka – BE
C = ------ J = ------ = ----------
J C C
–Bm – BED
D = ---------- B m = ---------------
J C
- each block in a block diagram has an input and output. Making sure that the units
are consistent is useful for detecting mistakes and ensuring consitency.
input output equations - 39.9
- t.
1 – Ts
1–e
G h ( s ) = ------------------
s
t
0 T
-
input output equations - 39.10
39.7 MISC
- controller goals
stabilize - to make the system stable
regulate - to control the system about a central design value
follow - to track an input/feedback signal
disturbance rejection - to minimize the effects of noise
- state diagrams can be used with multiple input/multiple output (MIMO) systems
state feedback - in an ideal controller the full state variables can be mea-
sured
observer-estimator - determines the system state using limited data.
- Linear Time Invariant (LTI) systems are linear, having constant coefficients. For
example, state coefficient matrices are all constant values
- if a system input (setpoint) is zero, or not used, then the control system is called a
regulator.
- stepper motor motion plans should not be approximate, the stepper motor should
follow the path, although trapezoidal profiles are more common.
• The method is used to determine system stability using the characteristic equa-
tion 1+Gc(s)G(s)H(s)
• If over the range of frequencies the system enters the unstable range of the
Nyquists contour shown below.
input output equations - 39.11
• The gain and phase margins can be determined from the polar plot as shown
below,
input output equations - 39.12
φM 1
G M = --------
OC
-1
C O
ωc
A
- a plot of the gain vs. the angle of a system transfer function after a phasor trans-
form.
0dB
25
0.5dB
-355° -5°
20
-350° -10°
15
3dB
10
-1dB
5 -330° -30°
dB 12dB
-300°
-5
-60°
-9dB
-10
-270°
-90°
-15
-240° -120°
-210° -180° -150° -18dB
-20
-280 -260 -240 -220 -200 -180 -160 -140 -120 -100 -80
phase (deg)
• The gain and phase margins are measured from the plot as shown below,
input output equations - 39.14
180°
φM
0dB
GM
Where,
φ M = phase margin
G M = gain margin
• These correlate to values on the Bode plot. To find the approximate gain/phase
margins with a Bode plot, locate the point where the gain is 180° to find the gain margin,
and find the phase margin where the gain is 0dB.
• In unstable systems the function will circle the center point of the plot.
polynomial roots
order
1 -4.6200
2 -4.0530±2.3400j
3 -5.0093,-3.9668±3.7845j
4 -4.0156±5.0723j,-5.5281±1.6553j
5 -6.4480,-4.1104±6.3142j,-5.9268±3.0813j
6 -4.2169±7.5300j,-6.2613±4.4018j,-7.1205±1.4540j
7 -8.0271,-4.3361±8.7519j, -6.5714±5.6786j,-7.6824±2.8081j
8 -4.4554±9.9715j,-6.8554±6.9278j,-8.1682±4.1057j,-8.7693±1.3616j
9 -9.6585,-4.5696±11.1838j,-7.1145±8.1557j,-8.5692±5.3655j,-9.4013±2.6655j
10 -4.6835±12.4033,-7.3609±9.3777j,-8.9898±6.6057j,-9.9657±3.9342j,-
10.4278±1.3071j
- the roots are used to construct the charateristic equation of the system.
- To increase, or decrease the reposnse time the root values are multiplied by the
desired settling time.
39.11 ITAE
- The Integral of Time Absolute Error (ITAE) integral equation becomes large for
errors that persist for a long time.
J ITAE = ∫ t e ( t ) dt
0
- is used to select poles to minimize the integral value when selecting a characteris-
tics equation.
input output equations - 39.16
- A design point on the root locus curve can be selected for a specific damping
coefficient.
cos θ = ζ
θ
• This method addresses the local stability of a non-linear system when linearized.
•
input output equations - 39.17
The proof begins with a taylor series expansion of a function that has a continuous dif-
ferential. The second term in the expression is the higher order terms. There is an
assumption that the system starts at equillibrium, so there is no initial value. The
result is a linear approximation.
∂f ∂f ∂f
----- x = f ( 0 ) + A =
d
x + f ( t ) =
dt ∂ x x = 0 h.o.t. ∂ x x = 0 x = Ax ∂x x = 0
∂f ∂f
x = x +
d-
---- u + f h.o.t. ( t ) = Ax + Bu
dt ∂ x x = 0, u = 0 ∂ u x = 0, u = 0
∂f ∂f
A = B =
∂ x x = 0, u = 0 ∂ u x = 0, u = 0
A linearized model of the control law can be written and the linearized model rewritten.
∂u
u ≈ x = Gx
∂x x = 0
d-
---- x = Ax + BGx = ( A + BG )x
dt
39.14 XXXXX
- ea.
input output equations - 39.18
39.15 XXXXX
- ea.
39.16 XXXXX
- ea.
39.17 XXXXX
- ea.
39.18 XXXXX
- ea.
39.19 XXXXX
- ea.
39.20 XXXXX
- ea.
39.21 SUMMARY
1.
input output equations - 39.19
1.
1.
39.25 REFERENCES
39.26 BIBLIOGRAPHY