Professional Documents
Culture Documents
Mahmoud Qaid
Component modeling, which is the derivation of mathematical equations suitable for computer
simulation, plays a critical role during the design stages of a mechatronic system. For all but the
simplest systems, the performance aspects of components (such as sensors, actuators, and
mechanical geometry) and their effect on system performance can only be evaluated by
simulation.
Any modeling task requires the formulation of mathematical models suitable for computer
simulation or solution—the terms are analogous. This chapter presents one method, the analogy
approach, which can be used for such modeling tasks. It was developed by electrical engineers to
model mechanical, thermal, and fluid systems for simulation on analog computers. Because the
analog computer was used for the simulation environment, it was fitting that models were
constructed using standard electrical elements, such as resistors, capacitors, and inductors.
2.1 Operator Notation and Transfer Functions
For ease in writing linear lumped-parameter differential equations, the D operator is introduced.
Any linear lumped differential equation can be converted to operator form by simply substituting
the operation using differentiation or integration with the appropriate operator. Table 2-1
summarizes the operators for differentiation and integration and presents several examples.
Oftentimes, we wish to do more than just write a differential equation in a concise form. We
want to solve it and analyze its behavior.
Oftentimes, we wish to do more than just write a differential equation in a concise form. We want
to solve it and analyze its behavior. The Laplace transform is used to represent a continuous time
domain system, f(t), using a continuous sum of complex exponential functions of the form 𝒆𝑺𝑻
where s is a complex variable defined as S = σ + jω. The complex domain is just a plane with a
rectangular x–y coordinate system where σ is the real part and jω is the imaginary part. Applying
the Laplace transform to a time-domain differentiation operation results in a frequency domain
multiplication operation where s is the operator. The Laplace s operator is identical to the D
operator previously introduced, except when a differential equation is written in s-operator or
Laplace format, it is no longer in the time domain but rather in the frequency (complex variable)
domain.
The cause–effect relationship for many systems can be approximated by a linear ordinary
differential equation. For example, consider the following second-order dynamic system with one
input, r(t) , and one output, y(t) .
ሷ
𝒚ሷ 𝒕 − 𝟐𝒚ሶ 𝒕 + 𝟕𝒚 𝒕 =ሶ 𝒓ሶ 𝒕 − ሶ 𝟔𝒓(𝒕)
This type of system is called a single input–single output or SISO system. The transfer function is
another way of writing a SISO system. The transfer function is the ratio of the output variable
over the input variable represented as the ratio of two polynomials in the D or s operator. Any
linear ordinary differential equation can be converted to transfer function form using the following
three step procedure. To illustrate the procedure, we’ll convert the second-order differential
equation to its transfer function form.
Step 1. Rewrite the equation using operator notation
𝑫𝟐 y(t)- 2Dy(t) +7y(t) = Dr(t) -6r(t)
Step 2. Collect and factor all output terms on the left side and input terms on the right side:
y(t).( 𝑫𝟐 - 2D +7) = r(t).(D-6)
Step 3. Obtain the transfer function by solving for the ratio of the output over the input signal:
𝒚(𝒕) 𝑫−𝟔
=
𝒓(𝒕) 𝑫𝟐 −𝟐𝑫+𝟕
The transfer function consists of two polynomials in the D or s operator, a numerator polynomial, and a
denominator polynomial. A monic polynomial has its highest D or s-power coefficient set to 1.
2.2 Block Diagrams, Manipulations, and Simulation
Simulation is the process of solving a block diagram model on a computer. Generally, simulation
is the process of solving any model, but since block diagram models are so widely used, we will
use block diagrams for all modeling tasks in this text. Block diagrams are usually part of a larger
visual programming environment. Other parts of the environment may include numerical
algorithms for integration, real-time interfacing, code generation, and hardware interfacing for
high-speed applications.
Visual programming environments are offered by many vendors and, depending on the supplier,
will support different environment features.
2.2.1 Block Diagrams—Introduction
Block diagram models consist of two fundamental objects: signal wires and blocks. The function
of a Signal wire is to transmit a signal or value from its origination point (usually a block) to its
termination point (usually another block). The flow direction of the signal is defined by an
arrowhead on the signal wire. Once the flow direction has been defined for a given signal wire, all
signals traveling on that wire must flow in the specified direction. A block is a processing element
which operates on input signals and parameters to produce output signals. Because block
functions may be nonlinear as well as linear, the collection of special function blocks is practically
unlimited and almost never the same between vendors of block diagram languages. There is,
however, a fundamental set of three basic blocks that all block diagram languages possess. These
blocks are the summing junction, the gain, and the integrator. An example system using these
three blocks is presented in Figure 2-1. The vertical signal, 𝒀𝟎 , entering the integrator from the
top represents the initial condition on the integrator. When this signal is omitted, the initial
condition is assumed to be 0.
The initial condition also could be represented as a summing junction downstream of the
integrator, as shown in Figure 2-2.
The block diagram will be used extensively in this text to represent system models. Once a system
is represented in block diagram form, it can be analyzed or simulated. Analysis of block diagram
systems involves reductions, usually to obtain the transfer characteristic between signals. These
manipulations are discussed in the next section.
2.2.2 Block Diagrams—Manipulations
Block diagrams are rarely constructed in a standard form, and it is often necessary to reduce them
to more efficient or understandable forms. The ability to simplify a block diagram is often a
critical step in understanding its function and behavior. This section presents several basic rules
which may be used to reduce a block diagram.
Series Block Reduction
Downstream When a pick-off point is shifted Upstream When a pick-off point is shifted
downstream over a block, the inverse of the upstream over a block, the block appears in
block appears in the feedback path. Figure 2-5 the feedback path. Figure 2-6 illustrates this
reduction.
illustrates this reduction.
Moving Blocks Through Summing Junctions it is based on the distributive property of the summation
operation, y = k(A + B) = kA + kB . Care must be taken to preserve the correct sign conventions. Two
situations are considered: moving a block through a summing junction in the upstream direction (Figure
2-7) and moving a block through a summing junction in the downstream direction (Figure 2-8).
or
To complete this step, we
implement the output equation
on the block diagram from
step 4 by combining the existing
state variable and its derivatives
through the appropriate gains
and a summing junction to
create the output signal, y(t),
as in Figure 2-19. Figure 2-19.
so we have
Step 6 is completed by adding the initial conditions to the block diagram from step 5. The completed block
diagram is shown in Figure 2-20.
FIGURE 2-24
Step 2. For this example, we will take the mass displacement, x(t), as the output, y(t). With some
manipulation, the state equation for
the mass–spring–damper system is written as:
Step 3. This puts us at step 3 in our procedure. Noting
that the equation is second order, we will begin
construction of the block diagram with two integrators as:
FIGURE 2-26
2.3.2 Conversion of Mechanical Illustrations to Block Diagram Models
The procedure for converting a system illustration to a block diagram model is primarily applicable to
single domain systems such as mechanical translation or mechanical rotation. The method makes use of the
basic force relationships for the three basic mechanical components: the mass, spring, and damper.
Given A system illustration is used with input r, output y, and
all required initial conditions. As in the transfer function
approach, we’ll develop the modeling steps using an
illustrative example. In this case, we’ll use the mass–spring–
damper system introduced in the Example 2.5: ODE to Block
Diagram presented previously. The system is presented in Figure 2-28
Figure 2-29 for reference. As before, the input is defined as the
force, F(t), and the output as the displacement, x(t).
Figure 2-29
In this step, we further define the spring and damper forces in terms of the states from
each of the masses. In this example, there is only one mass, and the states are . The
spring and damper forces are defined as:
Step 3. Implement the step 2 equations on the diagram begun in step 1. You
will probably find it necessary to redraw the resulting block diagram (Figure 2-
30) to obtain the most concise and readable form. The block diagram obtained
is slightly different in form from the previous example, which modeled the
ODE’s directly; however, the functionality is identical. We’ll present several
examples to illustrate this modeling method to mechanical systems with
multiple masses. FIGURE 2-30
2.4 Block Diagram Modeling—Analogy Approach
All disciplines of engineering are based on sets of fundamental laws or relationships. Electrical
engineering relies on Ohm’s and Kirchoff’s laws, mechanical engineering on Newton’s law,
electromagnetics on Faradays and Lenz’s laws, fluids on continuity and Bernoulli’s law, and so on. These
laws are used to predict the behavior (both static and dynamic) of systems. Systems may exist completely
in one engineering discipline (such as an electric circuit, a gear system, or a water distribution system), or
they may be coupled between several disciplines (such as electromechanical, electromagnetic, etc).
System modeling is the derivation and representation of the equations which describe the behavior of a
system. The term representation is used to indicate that the equations have been prepared for computer
solution as a computer program The modeling by analogy method, or analogy method as it is often called,
became popular during the era of the analog computer. Although the method was originally intended for
use on linear or linearized systems, it may be applied to some nonlinear systems as well. The analogy
method becomes even more powerful when combined with block diagram modeling. By using the analogy
method to first derive the fundamental relationships in a system, the equations then can be represented in
block diagram form, allowing secondary and nonlinear effects to be added. This two-step approach is
especially useful when modeling large coupled systems using block diagrams.
2.4.1 Potential and Flow Variables, PV and FV
Systems consist of components such as springs and dampers in mechanical systems, tanks and restrictions
in fluid systems, and insulators and thermal capacitances in thermal systems. When in motion, the energy
in a system can be increased by an energy-producing source outside the system, redistributed between
components within the system, or decreased by energy loss through components out of the system. In this
context, a coupled system becomes synonymous with energy transfer between systems.
Since the analogy method was developed for use on analog computers, it is fitting that the approach be
described from a basic electrical viewpoint. Electrical systems are based on three fundamental
components: • Resistor • Capacitor • Inductor
The capacitor and inductor are capable of storing energy. The energy stored in a capacitor is 𝑪𝒗𝟐 /2 and
the energy stored in an inductor 𝐿𝑖 2 . The resistor cannot store energy but can transfer electrical energy into
heat energy. In an ideal, lossless LC circuit with nonzero initial energy, all energy remains in the circuit
and is transferred back and forth in sustained oscillations between the inductor and capacitor. Addition of a
resistor establishes an energy leak to the surrounding air through which heat energy is transferred, causing
the oscillations to decay in amplitude and eventually disappear. If the resistor were immersed in a fluid
such as water, the temperature of the fluid would rise due to the heat energy transferred to it. In the steady
state, all electrical energy in the circuit would be converted to heat energy in the fluid.
Further addition of a voltage or current source to the circuit would provide an external source of energy
into the circuit. If the source had a nonzero mean value, the heat energy transferred to the fluid would be
sustained Total energy, E, in the LC circuit consists of potential energy, U, and kinetic energy, K. Potential
energy is associated with the potential to perform work and kinetic energy with the work to change motion
or flow. Based on this association two energy related are defined as
Flow variable = FV
Potential variable = PV
2.4.2 Impedance Diagrams
In an electrical circuit the impedance of a component is defined as the ratio of the voltage phasor, v, across
the component over the current phasor, i, through the component. Since voltage and current are complex
numbers, the impedance is also a complex number. A complex number consists of a real part and an
imaginary part. The placeholder for the imaginary part is j, and no placeholder is required for the real part.
The impedance of an electrical circuit element is a complex phasor quantity defined as the ratio of the
voltage phasor divided by the current phasor. The impedance phasors for the capacitor, inductor, and
resistor are summarized in Figure 2-35 and are shown as bold arrows. Positive phase occurs when the
phasor is rotated in the counterclockwise direction beginning from the positive real axis (which is the zero
phase direction).
When the phasor is lined up with the positive imaginary
axis (vertically upward) 90° of the phase has been
accumulated. When the phasor is pointing leftward, 180°
of the phase has been accumulated. When the phasor is
pointing downward along the negative imaginary axis,
270° or of the phase has been accumulated. Keeping in
mind that impedance is voltage divided by current, a
positive imaginary component indicates voltage leading
current, and a negative imaginary component indicates
voltage lagging current. Because j occurs in the
denominator of the capacitor impedance, the capacitor
voltage lags its current by 90°. Similarly, because j occurs
in the numerator of the inductor impedance, the inductor FIGURE 2-35 IMPEDANCE PHASORS FOR THE
voltage leads its current by 90°. The imaginary CAPACITOR, INDUCTOR, AND RESISTOR
component of impedance for a resistor is zero, indicating that the current and voltage are in phase with
one another. Consider the sinusoid . If we differentiate x(t) analytically with respect to time, we obtain
FIGURE 2-36
Solution
Step 1. Create/simplify the impedance diagram.
The impedances that will be used in the impedance diagram are listed here.
FIGURE 2-65 SUSPENSION
MECHANICAL DIAGRAM
The impedance diagram is presented in Figure 2-66, and forces also
have been labeled. It can be clearly seen how much force is drawn
by each of the two masses. This feature of the impedance diagram is
especially useful when losses need to be calculated.
Step 2. Identify all independent nodes (FV and PV) in the impedance
diagram and label all signals. The impedance diagram may be
reduced by first combining the parallel spring–damper into an
equivalent impedance defined as ZKB. With this reduction, the
impedance diagram has one FV node at y2 and two PV nodes over
ZKtire and ZKB. The node equations are summarized here.