Mechatronics with LabVIEW Introduction

advertisement
Mechatronics
The Practice of 21st-Century
Multidisciplinary Systems
Engineering
with
Dr. Kevin Craig
Professor of Mechanical Engineering
Rensselaer Polytechnic Institute
Mechatronics with LabVIEW
K. Craig
1
Presentation Topics
• Mechatronics
– The What, Why, and How of Mechatronics
– Mechatronics Education
• Mechatronic System Design with LabVIEW
– Simulation: Spring Pendulum System
– Control Design: Magnetic Levitation System
– Control Implementation: Rotary Inverted
Pendulum System
Mechatronics with LabVIEW
K. Craig
2
Relevant Questions
What are the challenges presented to
Engineering Educators by the Field of
Mechatronics ?
How can a company stay successful in
an industry where electronics,
computers, and control systems are
integral parts of an overall system and
performance, reliability, low cost, and
robustness are absolutely essential ?
Mechatronics with LabVIEW
K. Craig
3
What is the Best Way to Train
the 21st-Century Engineer?
Industrial Interaction
Shapes
Technical
Communications
Ma
the
ma
Engineering Curriculum
Physical &
Mathematical
Modeling
t ic
s
Hands-On
Ph
Engineering
System
Investigation
Process
Teamwork
Social Science
Engineering
Measurement
ys
ic s
Minds-On
Engineering
Analysis &
Computing
Freshman Year
to
Senior Year
Professionalism
Mechatronics with LabVIEW
K. Craig
4
Industrial Interaction
• What are the knowledge, skills, and tools required for
the 21st-century multidisciplinary engineer? For
industry and universities both, this question is
paramount.
• Industry needs engineers who can hit the ground
running with a balance between theory and practice,
an attitude of professionalism, experience in
multidisciplinary teamwork, and outstanding
communication skills.
• Universities need to know the answer to this question
to shape their engineering curricula to better prepare
students for professional practice.
Mechatronics with LabVIEW
K. Craig
5
• In the 21st century all engineers will need to become
mechatronics engineers.
• What is mechatronics, why does it transcend traditional
engineering disciplinary boundaries, and why are its
characteristics so essential to the 21st-century
multidisciplinary systems engineer?
Mechatronics with LabVIEW
K. Craig
6
Engineer of the Future Attributes
•
•
•
•
•
•
•
•
•
•
•
Solid Foundation in Mathematics and Science
Real-World Problem Identifying and Solving Skills
Multidisciplinary Systems Approach to Engineering
Balance between Theory and Practice
Technical Depth and Competency in a Discipline
Written and Oral Communication Skills
Teamwork, Leadership, Professionalism, Ethical Behavior
Critical and Independent Thinker
Creative, Innovative, Entrepreneurial Visionary
Globally and Socially Aware
Management of Projects, Risks, Time, Economics
Mechatronics with LabVIEW
K. Craig
7
Mechatronics
Mechatronics is the synergistic integration of
physical systems, electronics, controls, and
computers through the design process, from the
very start of the design process, thus enabling
complex decision making.
Integration is the key element in mechatronic
design as complexity has been transferred from
the mechanical domain to the electronic and
computer software domains.
Mechatronics is an evolutionary design
development that demands horizontal integration
among the various engineering disciplines as well
as vertical integration between design and
manufacturing.
Mechatronics is the best practice for synthesis by
engineers driven by the needs of industry and
human beings.
Mechatronics with LabVIEW
K. Craig
8
Real-Time Software
• Real-Time Software is at the heart of mechatronic systems.
• Real-time software differs from conventional software in
that its results must not only be numerically and logically
correct, they must also be delivered at the correct time.
• Real-time software must embody the concept of duration,
which is not part of conventional software.
• Real-time software used in most physical system control is
also safety-critical. Software malfunction can result in
serious injury and/or significant property damage.
• Asynchronous operations, which while uncommon in
conventional software, are the heart and soul of real-time
software.
Mechatronics with LabVIEW
K. Craig
9
The WHY of Mechatronics
• Companies must:
– have the ability to increase the competitiveness of
their products through the use of technology
– be able to respond rapidly and effectively to changes
in the market place
• Mechatronic strategies:
– support and enable the development of new products
and markets
– enhance existing products
– respond to the introduction of new product lines by a
competitor
Mechatronics with LabVIEW
K. Craig
10
• The adoption by a company of a mechatronic
approach to product development and
manufacturing provides the company with a
strategic and commercial advantage:
–
–
–
–
through the development of new and novel products
through the enhancement of existing products
by gaining access to new markets
or by some combination of these factors
Mechatronics with LabVIEW
K. Craig
11
The HOW of Mechatronics
• The achievement of a successful mechatronics design
environment essentially depends on the ability of the
design team to innovate, communicate, collaborate, and
integrate.
• Indeed, a major role of the mechatronics engineer is often
that of acting to bridge the communications gaps that can
exist between more specialized colleagues in order to
ensure that the objectives of collaboration and integration
are achieved.
• This is important during the design phases of product
development and particularly so in relation to requirements
definition where errors in interpretation of customer
requirements can result in significant cost penalties.
Mechatronics with LabVIEW
K. Craig
12
Challenge of Mechatronic System Design
• Master the future increase of system complexity
– Innovative Excellence
• Yielding new products with distinctive functionality,
better quality and/or a cost advantage
– Operational Excellence
• Effective and highly efficient processes for product
design, manufacturing, and calibration
Mechatronics with LabVIEW
K. Craig
13
Is Mechatronics New?
• Mechatronics is simply the application of the latest, costeffective technology in the areas of computers,
electronics, controls, and physical systems to the design
process to create more functional and adaptable
products. It is just Good Design Practice! Many
Forward-Thinking Designers and Engineers have been
doing this for years!
• Mechatronics is a significant design trend – an
evolutionary development – a mixture of technologies
and techniques that together help in designing better
products. Mechatronics demands horizontal integration
among the various disciplines as well as vertical
integration between design and manufacturing.
Mechatronics with LabVIEW
K. Craig
14
Mechatronics Workshops
• Three-day to one-week, hands-on, integrated, customized,
mechatronics workshops for practicing engineers at Xerox
(4), Pitney Bowes, Dana (2), Procter & Gamble (4), Fiat,
Plug Power Fuel Cells, NASA Kennedy Space Center, U.S.
Army ARDEC, and for the ASME Professional Development
Program (12).
• Key elements of these workshops are:
– Balance between Theory and Practice
– Integration of Mathematical & Scientific Fundamentals with
Industrial Applications
– Customized to the Needs of the Participants from Industry
– Use of Videos & Daily Hands-On Hardware & Software Exercises
Mechatronics with LabVIEW
K. Craig
15
Mechatronics Workshop
Bergamo, Italy
March 2007
(Tetra Pak, Salvagnini,
Electrolux, Fiat, ABB)
Fiat Mechatronics Workshop
Torino, Italy
Summer 2006
Mechatronics with LabVIEW
K. Craig
16
Mechatronics at P&G
• How does an engineering company change its culture,
embrace a mechatronic approach to design, and take
complete responsibility for the engineering challenges
it faces?
• We all use toothpaste, shampoo, laundry detergent,
disposable diapers, liquid soap – the list goes on and
on. Procter & Gamble makes products like these that
we use everyday and often take for granted. But who
in Procter & Gamble makes these products and how
are they made and packaged?
Mechatronics with LabVIEW
K. Craig
17
• This is where a company like Procter & Gamble gets its
competitive advantage – by making and packaging its
products with higher quality, faster, and at lower cost.
The machines that make these products are modern
marvels of engineering design – mechatronic system
design!
• Eric Berg is the Technical Section Head, Mechatronics
and Intelligent Systems, P&G Product Supply
Engineering in Cincinnati, Ohio.
• Here is where many of the machines that make and
package the P&G products are designed, built, and
tested.
• Here is a summary of what Eric had to say about
mechatronics and its impact at P&G.
Mechatronics with LabVIEW
K. Craig
18
• P&G is a consumer-products company; our purpose is to
provide branded products and services of superior
quality and value that improve the lives of the world’s
consumers. We want consumers to identify with our
products and brands, not our engineering. Therefore,
the engineering that goes into delivering our products
must be transparent. Engineering in turn impacts
product quality, cost of goods sold, and speed to market,
so internal to P&G, engineering gets a lot of attention
and we are under constant pressure to improve quality,
reduce cost, and accelerate speed to market.
Mechatronics with LabVIEW
K. Craig
19
• Mechatronics got P&G leadership attention when a
handful of engineers, using mechatronics models,
stopped one major program dead in its tracks and got a
few other programs back on track, saving millions of
dollars and years of development effort. A common
element in early mechatronics models was the holistic
approach to modeling the system dynamics, a relatively
modest investment in time, and a conclusive result. In
one case, the laws of physics prevented program
success, and in the other two cases, the chosen control
structures were inadequate for the respective plant
dynamics – In other words, classic dynamics and control
theory won the day.
Mechatronics with LabVIEW
K. Craig
20
• Since then, P&G has instituted a formal mechatronics
training program. Engineers are trained in the analysis
and synthesis (modeling) of systems, as well as the skills
needed to convert models into commercial hardware and
software. On the front end, engineers learn that the
dynamics of most productions systems can be described
by a handful of ideal elements that have analogous
behavior regardless of whether the system is electrical,
mechanical, thermal, gas or liquid flow. The four
common analogous elements are: capacitance,
resistance, inertia and dead-time lag. Using these
elements, engineers soon discover that a majority of the
systems they care about are governed by the first order
lag transfer function: 1/(Js + B); therefore, engineers
quickly realize the benefits of re-application from one
project to the next.
Mechatronics with LabVIEW
K. Craig
21
• Note that the key to engineers becoming proficient at
mechatronics analysis is to connect their industry
experience with their academic skills. The same is true
as they need to implement their designs using
commercial components. It could be said that what we
really teach our mechatronics engineers at P&G is how
to reduce theory to practice!
• The fact that most dynamic processes we work with are
governed by the first order lag transfer function makes
broad reapplication throughout P&G's manufacturing
enterprise straight forward. For the technicians on the
manufacturing floor, the underlying theory is not
important as long as they understand the process
characteristics.
Mechatronics with LabVIEW
K. Craig
22
• Over the years, we've also found a number of
applications that are governed by higher order, multipleinput, multiple-output, coupled, linear, and non-linear
models. However, these applications tend to be the
exception, not the rule, and therefore, we can handle
these problems with just a handful of engineers that
have advanced mechatronics skills.
• Bottom line is that mechatronics has helped P&G make
significant gains in engineering productivity that in turn
improves quality, reduces cost, and accelerates speed to
market. Furthermore, we have achieved these results by
teaching engineers how to make the most of their
academic skills!
Mechatronics with LabVIEW
K. Craig
23
P&G Corporate Engineering Technology
Internal Mechatronics Courses
Mechatronics
Expert
Mechatronics III:
RPI Course
Advanced
Mechatronics II:
Dynamic System
Analysis
ENG-9424
Mechatronics I:
Fundamentals
ENG-9414
Mechatronics with LabVIEW
Servo Drives
Mentoring &
Experience
Machine Control
Loop Health
Vendor
Courses
ENG-9240
Drives
Fundamentals
ENG-9416
K. Craig
24
RPI Mechatronics Graduates
• 35 M.S. Graduates (3 in progress)
• 19 Ph.D. Graduates (1 in progress)
Visit to Samsung, Seoul, South Korea, March 2006
Fred Stolfi
Professor
Columbia U.
Ph.D. 1998
Mechatronics with LabVIEW
Jeongmin Lee
Samsung
Mechatronics
Research Engineer
Ph.D. 2001
K. Craig
25
Design News Magazine
Mechatronics with LabVIEW
Monthly Article
on
Mechatronics
K. Craig
26
Design News Mechatronics Web Casts
Mechatronics with LabVIEW
K. Craig
27
Mechatronics Education
Mechatronics with LabVIEW
K. Craig
28
Educational Challenge
• Control Design and Implementation is still the domain
of the specialist.
• Controls and Electronics are still viewed as afterthought
add-ons.
• Very few practicing engineers perform any kind of
physical and mathematical modeling.
• Mathematics is a subject that is not viewed as
enhancing one’s engineering skills but as an obstacle
to avoid.
• Very few engineers have the balance between analysis
and hardware essential for success in Mechatronics.
Mechatronics with LabVIEW
K. Craig
29
–R
es
lica
ti o
ns
me
nt
pp
–B
es
tP
De
ve
lop
ea
r ch
lA
ra c
es
ti c
ulu
m
Ac
tiv
tri a
us
Cu
rric
In d
30
K. Craig
Mechatronics with LabVIEW
itie
s
Balance
What is it? Why is it Important?
• Some Definitions:
–
–
–
–
...harmonious proportion of elements in a design
...to bring into proportion, harmony
...state of equilibrium
…bodily or mental stability
• Balance in Nutrition
• Balance in Athletics
Mechatronics with LabVIEW
K. Craig
31
Balance: The Key to Success
• Balance is the Key
– Fundamentals: constant or
slowly changing with time
– Tools (e.g., computers and
computer programs):
moderately changing with
time
– Applications: rapidly
changing with time
YOUR
EDUCATION
• Primary focus of the
university is fundamentals
Mechatronics with LabVIEW
K. Craig
32
Balance: The Key to Success
Experimental
Validation
&
Hardware
Implementation
Modeling
&
Analysis
The Mechatronic Design Process
Computer Simulation Without Experimental Verification
Is At Best Questionable, And At Worst Useless!
Mechatronics with LabVIEW
K. Craig
33
Do you ever feel like this ?
Mechatronics with LabVIEW
K. Craig
34
Engineering System Investigation Process
Engineering
System
Investigation
Process
START HERE
Physical
System
System
Measurement
Parameter
Identification
Physical
Model
Mathematical
Model
The cornerstone of
modern engineering
practice !
Measurement
Analysis
Mathematical
Analysis
Comparison:
Predicted vs.
Measured
Design
Changes
YES
Is The
Comparison
Adequate ?
NO
Mechatronics with LabVIEW
K. Craig
35
Physical & Mathematical
Modeling
Less Real, Less Complex, More Easily Solved
Truth Model
Design Model
More Real, More Complex, Less Easily Solved
Hierarchy Of Models
Always Ask: Why Am I Modeling?
Mechatronics with LabVIEW
K. Craig
36
• There are actually two distinct models of an actual dynamic
physical system: a physical model and a mathematical
model, and the distinction between them is most important.
• In general, a physical model is an imaginary physical
system, a slice of reality, based on engineering judgment
and simplifying assumptions.
• There is a hierarchy of physical models of varying
complexity possible, from the less-real, less-complex,
more-easily-solved design model to the more-real, morecomplex, less-easily-solved truth model.
• The complexity of the physical model depends on the
particular need, e.g., system design iteration, control
system design, control design verification, physical
understanding.
Mechatronics with LabVIEW
K. Craig
37
• Always ask the question: Why am I modeling?
• An excellent analogy is geographic maps and the
varying detail one can display on a map.
• Modeling is an essential part of the Engineering System
Investigation Process, which I first learned about from
the books of two pioneers and giants in engineering
education, Robert Cannon from Stanford University and
Ernie Doebelin from Ohio State University.
• My version of that process is shown; it is the
cornerstone of modern engineering practice. It is a
procedure an engineer follows to thoroughly investigate,
i.e., understand, predict, and experimentally verify, how
a dynamic engineering system or device performs, no
matter how simple or complex the system may be.
Mechatronics with LabVIEW
K. Craig
38
• It is an iterative process, as there is a hierarchy of
physical models possible.
• There are techniques and tools to predict model
behavior – what are they and which ones should an
engineer be able to use?
• Comparing the predicted dynamic behavior with the
actual measured dynamic behavior is a key step in the
investigation process.
• Computer simulation without experimental verification is
at best, questionable, and at worst, useless.
• The importance of modeling and analysis in the design
process has never been more important, as design
concepts can no longer be evaluated by the build-andtest approach.
Mechatronics with LabVIEW
K. Craig
39
Mechatronics with LabVIEW
K. Craig
40
• Modeling is the single most important activity in the
mechatronic system design process. There are two
situations one needs to consider.
• The first is the common situation where an engineer is
designing a component or system and needs to predict
its performance.
• The second situation, which is becoming more and more
common in multidisciplinary systems engineering in the
age of globalization, occurs when subsystems are
designed and manufactured by different contractors at
remote locations and these subsystems are then brought
together for final assembly with the expectation that the
combined system will perform as expected.
Mechatronics with LabVIEW
K. Craig
41
• The most common technique used for modeling linear,
time-invariant systems is the block diagram with the
mathematical model represented as a transfer function.
• As an example of this first situation, let’s use the
simplest dynamic system for illustration – the first-order
system, an example of which is the common electrical
resistance-capacitance (RC) system. Mechanical,
thermal, or fluid analog first-order systems could also be
used. Shown below is a schematic of a first-order RC
low-pass electrical filter.
Mechatronics with LabVIEW
K. Craig
42
• Once an engineer decides that this physical model –
made up of pure and ideal elements and an ideal
voltage source – is a good representation of the actual
physical system, the engineer can apply the appropriate
Laws of Nature, here Kirchhoff’s Voltage and Current
Laws (KVL and KCL), to the physical model, together
with the constitutive relations describing each model
element voltage-current relationship (e = iR for a
resistor and i = C de/dt for a capacitor), to generate a
complete mathematical representation of the inputoutput behavior of the device.
Mechatronics with LabVIEW
K. Craig
43
• At each port, input and output, the variables that together
define power, i.e., voltage and current, are identified,
resulting in a complete description. The resulting
mathematical model, consisting of differential equations,
can be transformed to algebraic equations through the
use of the Laplace transform or differential operator
(D = d/dt).
• Once algebraic equations are obtained, ratios between
input and output variables, the transfer functions, can be
determined.
Mechatronics with LabVIEW
K. Craig
44
• Now let’s combine two identical RC circuits in series, as
an illustration of the second situation where two
components are connected together to form a system.
• An engineering student would most likely simply multiply
two ideal transfer functions together to get an overall
input-output transfer function. Of course, if the student
were to build that system and compare the prediction
with the measurement, he/she would be surprised by the
outcome.
• This approach only works if steps have been taken to
ensure that the downstream RC circuit does not draw any
power from the upstream RC circuit, by the insertion of a
buffer op-amp in between, for example.
Mechatronics with LabVIEW
K. Craig
45
• For this situation, there are three block-diagram /
transfer-function methods that an engineer can use to
obtain the correct prediction.
– The first is to analyze the complete interconnected
system physical model through the application of KVL
and KCL. This could lead to a complicated analysis
problem.
– The second is to use the complete component
description as given by the transfer-function matrix
relating the input and output power variables, i.e.,
voltage and current, and then multiplying the matrices
together to get the overall system transfer-function
matrix for the interconnected components.
Mechatronics with LabVIEW
K. Craig
46
1
RCs + 1
1
RCs + 1
≠
⎛ 1 ⎞
⎜
⎟
⎝ RCs + 1 ⎠
2
⎡ ein ⎤ ⎡ RCs + 1 −R ⎤ ⎡ RCs + 1 −R ⎤ ⎡ eout ⎤ ⎡ R 2C 2s 2 + 3RCs + 1 − R 2Cs − 2R ⎤ ⎡ eout ⎤
⎥⎢ ⎥
⎢ i ⎥ = ⎢ Cs
⎥ ⎢ Cs
⎥ ⎢i ⎥ = ⎢
2 2
1
1
−
−
− RCs − 1 ⎦ ⎣ i out ⎦
⎦⎣
⎦ ⎣ out ⎦ ⎣ RC s + 2Cs
⎣ in ⎦ ⎣
⎡ eout ⎤
1
=
⎢
⎥
2 2 2
e
⎣ in ⎦ iout =0 R C s + 3RCs + 1
Mechatronics with LabVIEW
K. Craig
47
• The last approach, and the one with the most relevance
and practicality, is to use the concept of impedance.
Impedance is defined at a port and is the ratio of effort to
flow, i.e., how much effort is required to give unity flow.
Here it is the ratio of voltage to current at the input or
output port of a component with some specified condition
at the other port. It can be shown that if the output
impedance of the upstream component Zo and the input
impedance of the downstream component Zi are known
either analytically or experimentally, then the overall
transfer function for the interconnection of the
components can be obtained.
Mechatronics with LabVIEW
K. Craig
48
• The input impedance and output impedance for the RC
circuit are given below, together with the ideal transfer
function. With this information, we can predict the
response of the overall system when the components,
here two identical RC circuits, are connected. The
importance of this approach is that the impedances and
ideal transfer functions can be measured experimentally
for each component at each separate location. The
performance when the components are brought to the
same location and connected can then be predicted
reliably before the actual connection is made.
Mechatronics with LabVIEW
K. Craig
49
Electro-Dynamic Vibration Exciter
Physical System vs. Physical Model
Mechatronics with LabVIEW
K. Craig
50
Electro-Pneumatic
Transducer
Σ
Mechatronics with LabVIEW
Σ
K. Craig
51
This system can be
collapsed into a
simplified
approximate overall
model when
numerical values
are properly
chosen:
Mechatronics with LabVIEW
K. Craig
52
Temperature Feedback
Control System:
A Larger-Scale
Engineering System
Desired
Temperature
(set with RV)
RV
Block Diagram of an Temperature Control System
eE
Σ
Bridge
Circuit
pM
eM
Amplifier
Controller
ElectroPneumatic
Transducer
xV
Valve
TC
Chemical
Process
RC
Actual
Temperature
(measured with
RC)
Mechatronics with LabVIEW
Thermistor
K. Craig
53
Mechatronics with LabVIEW
K. Craig
54
Mechatronic Teaching Systems
Balancing
Human
Transporter
Rotary Inverted Pendulum
System
Mechatronics with LabVIEW
K. Craig
55
Pneumatic System Closed-Loop
Position Control
Brushed DC Motor Position
and Speed Control with
Magneto-Rheological Fluid
Rotary Brake/Damper
System
Mechatronics with LabVIEW
K. Craig
56
Power
Supply
Manual Flow
Control Valve:
Meter Out
Supply Air
30 psig
Manual Flow
Control Valve:
Meter Out
Valve A
Valve B
Darlington
Switches
1/8 Inch Ported, 3-Way, Spring-Return,
Two-Position, Solenoid Valves
Microcontroller
with 12-Bit
A/D Converter
Piston Shaft
A
Chamber 1
Piston
B
Chamber 2
Mass
Actuator
3/4 Inch Bore, Double-Acting,
Non-Rotating Air Cylinder
5 Volts
Mechatronics with LabVIEW
Linear Potentiometer
4-Inch Stroke
K. Craig
57
Valve-Controlled Hydraulic Servo System
Mechatronics with LabVIEW
K. Craig
58
Nonlinear Equations
2(ps − pcl )
Qcl = Cd w(x v )
ρ
2(p cr − p r )
Qcr = −Cd w(x v )
ρ
Qcr −
Qcl −
(Vr 0 − A p x C ) dp cr
β
dt
(Vl0 + A p x C ) dpcl
β
dt
+ K pl (p cl − pcr ) = − A p
− K pl (p cl − p cr ) = A p
dx C
dt
dx C
dt
dx C
d2xC
(p cl − p cr )A p − B
+ fU = M 2
dt
dt
Mechatronics with LabVIEW
K. Craig
59
dx C,p
V0 dp cl,p
( Cx x v,p − Cp pcl,p ) − β dt − K pl ( pcl,p − pcr,p ) = A p dt
dx C,p
V0 dp cr,p
( −Cx x v,p − Cp pcr,p ) − β dt + K pl ( pcl,p − pcr,p ) = −A p dt
( pcl,p − pcr,p ) A p − B
dx C,p
dt
+ f U,p = M
Transfer
Function
xC
K
(s ) = 2
xv
⎛s
2ζs ⎞
s⎜ 2 +
+ 1⎟
⎝ ωn ωn
⎠
Mechatronics with LabVIEW
d 2 x C,p
Linearized
Equations
dt 2
K=
ωn =
2C x A p
2A 2p + B ( Cp + 2K pl )
β ⎡⎣ 2A 2p + B ( C p + 2K pl ) ⎤⎦
MV0
⎛ 2βM ⎞
⎛ βM ⎞
B+⎜
K
+
⎟ pl ⎜
⎟ Cp
⎝ V0 ⎠
⎝ V0 ⎠
ζ=
βM ⎡ 2
2
2A p + B ( C p + 2K pl ) ⎤⎦
⎣
V0
K. Craig
60
Cantilever Beam
Mechanical
System
Steel Cantilever Beam
Eddy-Current
Accelerometer Damper
Vibration Exciter
Strain Gage
MEMS Accelerometer
Hard-Drive Read-Write Head
Mechatronics with LabVIEW
K. Craig
61
Stepper Motor System
Design:
Ink-Jet Printer
Application
Stepper Motor Open-Loop
and Closed-Loop Control
Experimental System
Engineering Application
Mechatronics with LabVIEW
K. Craig
62
Mechatronics with LabVIEW
K. Craig
63
Nonlinear Equations of Motion:
x
( I + mr ) θ − B r + mxr cos θ − mgr sin θ = −Td + Tf
2
⎛
Iw ⎞
1
⎛B⎞
2
⎜ m + m w + r 2 ⎟ x + ( mr cos θ ) θ − mrθ sin θ + ⎜ r 2 ⎟ x = r ( Td − Tf )
⎝ ⎠
⎝
⎠
Simplifying Assumptions:
•
•
•
•
•
Two degrees of freedom: x and θ
Wheels roll without slipping
Rotating structure is a rigid body
Both wheel motors mounted to rotating body are identical
Rate gyro and inclinometer give instantaneous response
Mechatronics with LabVIEW
K. Craig
64
Sensor Fusion
(Complementary Filtering)
• When measuring a particular variable, a single type of
sensor for that variable may not be able to meet all the
required performance specifications.
• We sometimes combine several sensors into a
measurement system that utilizes the best qualities of
each individual device.
• Thus, sensors complement each other, giving rise to the
name complementary filtering. Another name is sensor
fusion and a more advanced version of a similar idea is
called Kalman filtering.
Mechatronics with LabVIEW
K. Craig
65
• Basic Concept
– If a time-varying signal is applied to both a low-pass
filter and a high-pass filter, and if the two filter output
signals are summed, the summed output signal is
exactly equal to the input signal.
1
τs + 1
∑
τs
τs + 1
Mechatronics with LabVIEW
K. Craig
66
Mechatronics with LabVIEW
K. Craig
67
Mechatronics with LabVIEW
K. Craig
68
– The high-pass filter and the low-pass filter do not
have to be the simple filters shown. An example of
“stronger” filters would be:
3s 2 + 3s + 1
Low − Pass Filter
3
2
s + 3s + 3s + 1
s3
High − Pass Filter
3
2
s + 3s + 3s + 1
• Mechatronics Example: Absolute Angle
Measurement
– The two basic sensors used are a micro-electromechanical (MEMS) rate gyro using piezoelectric
tuning forks (no spinning wheel) and an inclinometer.
Mechatronics with LabVIEW
K. Craig
69
– The inclinometer measures tilt angle relative to gravity
vertical by immersing two circular sector capacitance
plates in a dielectric liquid. Angular tilting causes one
pair of plates to increase capacitance and the other to
decrease. These capacitance changes cause a
frequency change in an oscillator, which is then
converted to a pulse-width-modulated (PWM) signal.
By low-pass filtering the PWM signal, a DC voltage
proportional to tilt angle is obtained.
– A rate gyro gives a DC voltage output proportional to
angular velocity, with a flat frequency response to
about 50 Hz. Op-amp analog integration would give
us angular position, but the bias error in the rate gyro,
when integrated, quickly gives an unacceptable, everincreasing drift of the position signal.
Mechatronics with LabVIEW
K. Craig
70
– The inclinometer does not suffer from a drift problem
(no integration is involved) and can thus be used to
correct for the gyro drift problem. It cannot, however,
be used by itself for angle measurements in
applications that require a fast response (like
measuring vehicle or robotic motions) since it is a
first-order instrument with low bandwidth, typically 0.5
Hz to 6 Hz, too slow for many applications.
– The two sensors are thus good candidates for a
complementary-filtering application, giving both
angular position and angular velocity data over about
a 50-Hz bandwidth with negligible drift.
Mechatronics with LabVIEW
K. Craig
71
– While the configuration of the separate high-pass and
low-pass filters is most useful for explaining the basic
concept of complementary filtering, the practical
implementation uses instead a feedback type of
configuration that produces identical differential
equations and transfer functions.
– Also, realistic sensor models should be used for
analysis and simulation purposes. The inclinometer is
modeled as a first-order system (e.g., Ki =1, time
constant = 0.3). The rate gyro is modeled as a secondorder system (e.g., Kg = 1, damping ratio = 0.5, and
natural frequency = 50 Hz).
θsensor
Ki
Inclinometer
=
θactual τi s + 1
Mechatronics with LabVIEW
K gs
θsensor
Rate Gyro
= 2
2ζ g s
s
θactual
+
+1
2
ωn g ωn g
K. Craig
72
– The gyro bias error is taken as a constant (e.g., 0.005
rad/s) and the inclinometer noise is taken as a small
random signal.
– The complementary filter has two adjustments: ωn
which we take to be 0.2 rad/s and ς which we take to
be 0.7. The major effect is that of ωn; larger values
correct bias effects more quickly but filter noise
effects less effectively.
– To test out this algorithm, take the input angle to be
zero for the first 20 seconds to see how the system
“fights out” the gyro bias and attenuates the
inclinometer noise. At 20 seconds, the input angle
steps up to 1.0 radian, so we can see the response to
sudden changes.
Mechatronics with LabVIEW
K. Craig
73
K gs
s 2 2ζ g s
+
+1
2
ωn g ωn g
∑
∑
1
s
2ζωn
ω2n
Ki
τi s + 1
Mechatronics with LabVIEW
1
s
∑
∑
K. Craig
74
– Analyzing this block diagram results in the following
equation:
s2
2ζ s
+1
2
ωn
ωn
φm = 2
θrg + θrg _ b ) + 2
φinc + φinc _ n )
(
(
s
2ζ s
s
2ζ s
+
+
+
+1
1
2
2
ωn ωn
ωn ωn
High-Pass Filter
Low-Pass Filter
– This is how the Watson Vertical Reference System is
implemented. The description of that system is
shown on the next page.
Mechatronics with LabVIEW
K. Craig
75
Mechatronics with LabVIEW
K. Craig
76
Magnetic Levitation
System
Electromagnet
Phototransistor
Infrared LED
Levitated Ball
Electromagnetic Valve Actuator
For a Camless Automotive Engine
Mechatronics with LabVIEW
K. Craig
77
bias
desired
Σ
Σ
actual
⎛ i2 ⎞
f ( x,i ) = C ⎜ 2 ⎟
⎝x ⎠
Mechatronics with LabVIEW
K. Craig
78
Camless Automotive Engine
• Think about the tradeoffs a cam has to make on
engine performance, high speeds vs. idle. With
camless valve trains, one doesn’t have to live with
compromise.
• Consider a camless engine with an
electromechanical valve-train actuator.
• Camless valve trains add six degrees of freedom to
engine control: three per intake valve and three per
exhaust valve, corresponding to a valve’s opening,
closing, and lift.
Mechatronics with LabVIEW
K. Craig
79
• This eliminates the need for inefficient throttling and
could deliver higher torque. Also, a camless engine
could deactivate unneeded cylinders for better efficiency.
It could dispense with having to recirculate exhaust
gases through EGR systems.
• But a camless engine could be noisy and susceptible to
wear. At 3000 rpm, each electromechanical valve
moves a distance about 8 mm, 100 times a second.
Sensors and controls will tell the story!
• In moving away from camshafts, engine builders would
replace a single reliable component with a complex
system comprising many more components of dubious
integrity. Reliability of the camless engine will have to be
built in through a combination of sensors, estimators,
and diagnostic routines.
Mechatronics with LabVIEW
K. Craig
80
Mechatronics with LabVIEW
K. Craig
81
• These devices are presently being developed for
implementation of advanced combustion strategies in
internal combustion engines.
• Issues with the deployment of EMVs in internal
combustion engines include:
– Noise produced when the energized plunger strikes
the core
– Control of the seating velocity
– Improved energy consumption
– Trajectory shaping with a minimum number of
measurements
– High actuation speeds
• It is necessary to have tighter control tolerances and
more in-depth models of the latest generation EMA.
Mechatronics with LabVIEW
K. Craig
82
• The overall system also must be cost effective. This
means that the system may have to optimize
performance with fewer available sensors.
• These demands, coupled with the strongly nonlinear
dynamics of the EMA, make the use of classical sensorbased control strategies a less attractive option.
• The EMV is one of the promising solutions to the
challenge of reduction in fuel consumption and vehicle
emissions and improved engine performance. The idea
of individual cylinder control and camless engines has
reinvigorated interest in the concept of variable valve
timing (VVT) or fully flexible valve actuation (FFVA)
systems, i.e., direct control of both valve timing and
valve lift.
Mechatronics with LabVIEW
K. Craig
83
• The plunger-striking problem, which may contribute to
reduced structural integrity, as well as noise, can be
addressed by reducing the plunger seating velocity
(plunger speed before it impacts the core or housing of
each electromagnet).
• Plunger seating velocity reduction can be obtained partly
by mechanical design and entirely by electronic control.
• Modeling is essential and the model of the EMV actuator
is nonlinear with secondary nonlinearities like saturation,
hysteresis, bounce, and mutual induction. These
nonlinearities are important in modeling the
electromagnetic force to a reasonable degree of
accuracy since the force exhibits these characteristics.
Mechatronics with LabVIEW
K. Craig
84
• The control of the EMV actuator entails modulating some
measured mechanical variable like velocity or position.
– Certain mechanical variables may not be measured
accurately due to operational or environmental
conditions.
– From a cost perspective, it is also advantageous to
use the least number of sensors possible.
– There is a need to use other signals, usually an
electrical variable, from which information on certain
mechanical variables could be inferred. This is called
sensorless estimation.
Mechatronics with LabVIEW
K. Craig
85
NI Week 2006
Keynote Presentation
Mechatronics with LabVIEW
K. Craig
86
Mechatronics with LabVIEW
K. Craig
87
NI Instrumentation Newsletter 1st Quarter 2007
Mechatronics with LabVIEW
K. Craig
88
Plant
Design
Plant Dynamics
&
Control Structure
Integration and
Assessment
Early in the
Design Process
Fast Component
Mounter Placement Module
Mechatronics with LabVIEW
K. Craig
89
• Conceptual Integrated Design of Controlled
Electro-Mechanical Motion Systems
– Goal: Identify the performance-limiting factors of
the design proposal(s) and choose satisfactory
specifications for these factors.
– Factors which dominantly determine system
performance:
• Task specification: motion distance, motion
time, required positional accuracy after motion
time
• Path Generator: smoothness of the path
• Controller: proportional and differential gains
• Plant: total mass to be moved, lowest
eigenfrequency, location of the position and
velocity sensors
Mechatronics with LabVIEW
K. Craig
90
– The dominant plant factors motivate the use of
simple 4th-order models which take only the rigidbody mode and the lowest mode of vibration into
account. These models have the following
characteristics:
• Simple and of low order
• Have a small number of parameters
• Completely describe the performance-limiting
factor
• Are a good basis to provide reliable estimates
of the dominant dynamic behavior and the
attainable closed-loop bandwidth
– A Mechatronic Approach to Design allows for the
assessment of the influence of these design
factors on the system performance.
Mechatronics with LabVIEW
K. Craig
91
• Basic Plant Transfer Function Types
– Plant damping and friction are neglected as they
generally do not dominate the dynamics and add
needless complexity.
s2
+1
2
1 ωar
ms 2 s 2
+1
2
ωr
1
ms 2
s2
+1
2
1 ωar
ms 2 s 2
+1
2
ωr
ωar < ωr
ωar = ωr
ωar > ωr
Mechatronics with LabVIEW
1
1
ms 2 s 2
+1
2
ωr
s2
−1
2
1 ωar
ms 2 s 2
+1
2
ωr
K. Craig
92
• Classes of Electromechanical Motion
Systems
– Flexible Mechanism, Flexible Frame
– Flexible Actuator Suspension, Flexible Guidance
• Example of a Flexible Actuator Suspension
– Type AR when actuator position is measured
– Type RA when end-effector position is measured
J
m = 2 + m e = moving mass
i
(J + i m )k
2
ωr =
Mechatronics with LabVIEW
xe
i=
θ
T
u=
i
ωar =
e
J ( me + mf ) + i 2 me mf
k
me + mf
y = iθ
ωar =
k
mf
y = xe
K. Craig
93
• Specifications for this Electromechanical Device
Fast Component
Mounter Placement
Module
–
–
–
–
–
–
Maximum error e0 = 100 µm
Motion time tm = 250 ms
Motion distance hm = 0.15 m
Settling time ts = 30 ms
Maximum acceleration amax = 10 m/s2
Maximum velocity vmax = 1 m/s
• Goal: Satisfy design requirements in a short design cycle
using only plant knowledge available at the conceptual
design stage
Mechatronics with LabVIEW
K. Craig
94
• Simple Model
– Parameter Values
• Motor mass (J/i2) mm = 6.53 kg
• Frame stiffness k = 4.3E6 N/m
• Frame mass mf = 16.5 kg
• End-effector mass me = 2.3 kg
Mechatronics with LabVIEW
xe
i=
θ
T
u=
i
K. Craig
95
• Performance Assessment Procedure
• Class of Electromechanical Motion System
– Flexible Actuator Suspension
• Concept
– Location of Position and Velocity Sensor
• Concept AR: position and velocity measurement at
the actuator
• Concept RA: position and velocity measurement at
the end effector
• Concept AR-RA: position measurement at the end
effector and velocity measurement at the actuator
– Consider concept AR with only a position sensor
on the motor axis.
2
⎛ ωar ⎞
– Frequency Ratio
ρ=⎜
⎟
ω
⎝ r ⎠
Mechatronics with LabVIEW
K. Craig
96
• Consider Three Alternative Situations
– Assume that the reference path and the desired
performance, in terms of maximal position error e0,
are fixed. Based on this, calculate the minimal
required anti-resonance frequency of the plant.
– Assume that the reference path and the antiresonance frequency are fixed. Based on this,
calculate the maximum position error e0.
– Assume that the desired performance and the
anti-resonance frequency are fixed. Produce a
characteristic reference path.
• Determine the control system for the particular
problem setting
Mechatronics with LabVIEW
K. Craig
97
• Summary
– The aim of conceptual design is to obtain a
feasible design for the path generator, control
system, and electromechanical plant with
appropriate sensor locations in an integrated way.
– Electromechanical motion systems are classified
by four types using standard 4th-order plant
transfer functions.
– Dimensionless quantities are used to characterize
closed-loop behavior (i.e., reference path
generator, controller, and plant) and standard
closed-loop transfer functions are defined.
– Standard solutions are determined for these
standard problems and an assessment method is
developed.
Mechatronics with LabVIEW
K. Craig
98
• Conclusions
– Using minimal plant knowledge, the assessment
method provides the designer with relevant
knowledge about the design process, early in the
design process.
– The assessment method can quickly provide
insight into the design problem and feasible goals
and required design efforts can be estimated at an
early stage.
• Reference for this Section
– E. Coelingh, T. deVries, and R. Koster, “Assessment of
Mechatronic System Performance at an Early Design
Stage,” IEEE/ASME Transactions on Mechatronics,
Vol. 7, No. 3, September 2002, pp. 269-279.
Mechatronics with LabVIEW
K. Craig
99
Automotive Mechatronics
Spring 2007
Course Topics
Introduction to Automotive Mechatronics
Engine Systems and Electronic Controls
Transmissions and Electronic Controls
Steering and Suspension Systems
Breaking, Traction, & Stability Control Systems
Automotive Safety Systems
Electric and Hybrid Vehicles
Automotive Sensors and Actuators
LabVIEW + ADAMS
Approach
Automotive Engineering Fundamentals + Latest Mechatronic
Advances + Mechatronic Fundamentals + Latest Computer Tools
Mechatronics with LabVIEW
K. Craig
100
Automotive
Mechatronics
Mechatronics with LabVIEW
K. Craig
101
Mechatronics Module: Smart Actuator
Mechatronics with LabVIEW
K. Craig
102
Unleashing the Internal Combustion
Engine Through Mechatronics
Mechatronics with LabVIEW
K. Craig
103
• The Automobile – Comprehensive Mechatronic
System
– Today, mechatronic features have become the
product differentiator in these traditionally mechanical
systems.
– This is further accelerated by:
• Higher performance-price ratio in electronics
• Market demand for innovative products with smart
features
• Drive to reduce cost of manufacturing of existing
products through redesign incorporating
mechatronics elements
– The use of electronics in automobiles is increasing at
a staggering rate.
Mechatronics with LabVIEW
K. Craig
104
– Examples of new applications of mechatronic
systems in the automotive world include:
• semi-autonomous to fully-autonomous automobiles
• safety enhancements
• emission reduction
• intelligent cruise control
• brake-by-wire systems eliminating the hydraulics
– Mechatronic systems will contribute to meet the
challenges in emission control and engine efficiency.
– Clearly, an automobile with up to 60 microcontrollers
and 100 electric motors, about 200 pounds of wiring,
a multitude of sensors, and thousands of lines of
software code can hardly be classified as a strictly
mechanical system.
Mechatronics with LabVIEW
K. Craig
105
By-Wire Systems
Replace
Mechanical Systems
In
Automobiles
IEEE Spectrum 4/01
Mechatronics with LabVIEW
K. Craig
106
• Expanding Automotive Electronic Systems
– Cost of electronics in luxury vehicles can amount to
23% of the total manufacturing cost.
– More than 80% of all automotive innovation now
stems from electronics.
– High-end vehicles today may have more than 4
kilometers of wiring compared to 45 meters in
vehicles manufactured in 1955.
– In 1969, Apollo 11 employed a little more than 150
Kbytes of onboard memory to go to the moon and
back. 30 years later, a family car might use 500
Kbytes to keep the CD player from skipping tracks.
– The resulting demands on power and design have led
to innovations in electronic networks for cars.
Mechatronics with LabVIEW
K. Craig
107
– Researchers have focused on developing electronic
systems that safely and efficiently replace entire
mechanical and hydraulic applications.
– Highly reliable and fault-tolerant electronic control
systems, X-by-wire systems, do not depend on
conventional mechanical or hydraulic mechanisms.
They make vehicles lighter, cheaper, safer, and more
fuel-efficient.
– Increasing power demands have prompted the
development of 42-V automotive systems.
– X-by-wire systems feature dynamic interaction among
system elements.
– Replacing rigid mechanical components with
dynamically-configurable electronic elements triggers
a system-wide level of integration.
Mechatronics with LabVIEW
K. Craig
108
Dynamic Driving Control Systems
Mechatronics with LabVIEW
IEEE Computer 1/02
K. Craig
109
• Challenges of Automotive Mechatronic System
Design
– For typical mechatronic systems, there has been a
dramatic increase of complexity during the past few
years (doubling every 2-3 years) almost comparable
to complexity increase in microelectronics.
– System complexity can be measured by different
parameters, e.g., number of components and their
level of interaction, code size of software.
Challenge
Mastering the
future increase of
mechatronic
system complexity
Mechatronics with LabVIEW
K. Craig
110
The Camless Dream Meets Reality
Current
Future
Valeo
Mechatronics with LabVIEW
Auto Fundamentals 2005
K. Craig
111
Engine Systems & Electronic Controls
• May 2005 – Industry experts say “Don’t expect to see
the internal-combustion engine evaporate as a viable
power source anytime soon.” There are still many more
improvements remaining.
• As computer-modeling capability improves, there is a
better understanding of the IC engine and how to
improve it, e.g., variable valve timing, combustion
development, and fuel-injection systems.
• There will be significant improvements in fuel economy,
emissions, and performance.
Mechatronics with LabVIEW
K. Craig
112
• Technologies related to the engine itself – not so much
technologies within the engine itself – have dramatically
accelerated.
• Controls, with computing power and speed, and sensors,
capable and durable, are enabling technologies!
• Goal of manufacturers: build engines with high levels of
fuel economy, power, and torque, along with low
emissions levels – and to do so at very high volumes –
better than ever in terms of reliability and durability.
• Advanced technologies will focus on “variable
everything.” Adding on-demand and variable controls to
almost any system can improve fuel economy and lower
parasitic losses.
Mechatronics with LabVIEW
K. Craig
113
• The last two decades have seen the ever-increasing
usage of electronics and microcontrollers in response to
the need to meet regulations and customer demands for
high fuel economy, low emissions, best possible engine
performance, and ride comfort.
• This has also lead to the development of new engine
control methods with new sensors and new actuators.
• Devices have gone from purely mechanical to electromechanical with electronic control, e.g., carburetors and
injection systems.
• New actuators have been added, e.g., exhaust gas
recirculation (EGR), camshaft positioning, and variable
geometry turbochargers (VTG).
Mechatronics with LabVIEW
K. Craig
114
• Today’s combustion engines are completely
microcomputer controlled with:
– many actuators (e.g., electrical, electro-mechanical,
electro-hydraulic, electro-pneumatic influencing spark
timing, fuel-injector pulse widths, EGR valves)
– many measured output variables (e.g., pressures,
temperatures, engine rotational speed, air mass flow,
camshaft position, exhaust gas oxygen-concentration)
– taking into account different operating phases (e.g.,
start-up, warming-up, idling, normal operation, overrun,
shut down.)
• The microprocessor-based control has grown up to a
rather complicated control unit with 50-120 look-up tables,
relating about 15 measured inputs and about 30
manipulated variables as outputs.
Mechatronics with LabVIEW
K. Craig
115
• Because many output variables (e.g., torque and
emission concentrations) are mostly not available as
measurements (too costly or short life time), a majority of
control functions is feedforward.
• Increasing computational capabilities using floating point
processors will allow advanced estimation techniques for
non-measurable qualities like engine torque or exhaust
gas properties and precise feedforward and feedback
control over large ranges and with small tolerances.
• New electronically controlled actuators and new sensors
entail additional control functions for new engine
technologies (e.g., VTG turbo chargers, dynamic
manifold pressure, variable valve timing (VVT) of inlet
valves, combustion-pressure-based engine control).
Mechatronics with LabVIEW
K. Craig
116
• Overview of Engine Control Structures of State-of-the-Art
Spark Ignition Engines
Simplified
Control
Structure of a
SI Engine
Mechatronics, Vol. 13, 2003
• The engine control system must be designed for 5-10 main
manipulated variables and 5-8 main output variables,
leading to a complex nonlinear MIMO system.
Mechatronics with LabVIEW
K. Craig
117
– Modern IC engines increasingly involve more
actuating elements. SI engines have the classical
inputs like amount of injection, ignition angle, injection
angle, but also additionally controlled air/fuel ratio,
EGR, and VVT.
Location of
Sensors and
Actuators of a
SI Engine
(all are state-ofthe-art in current
engine control
units except
cylinder pressure
sensors)
Mechatronics with LabVIEW
Mechatronics, Vol. 13, 2003
K. Craig
118
• In the May 2003 ASME Mechanical Engineering
magazine, an excellent analogy was presented in the
article Controlled Breathing
– Climb a mountain! Thinner air at elevation makes you
work harder to get the same amount of oxygen into
your blood as at sea level.
– Engines gasp for air just like mountain climbers do.
– If during your climb, you strap a pressurized oxygen
mask to your face, you would be revived. You need
oxygen to perform.
– Turbochargers boost engine performance in the same
way that bottled oxygen helps mountaineers climb
high.
Mechatronics with LabVIEW
K. Craig
119
– Imagine that with every breath you inhale and exhale
the same volume. There is no such thing as deep or
shallow breathing. Somewhere between standing up
and ascending the steepest sections of the climb,
your lungs reach a point where they are working at
optimum capacity.
– That is the nature of the internal combustion cycle
operating with fixed cams which open and close the
intake and exhaust valves by the same amount and at
the same point in the cycle every time, regardless of
engine speed, load, or external conditions.
Mechatronics with LabVIEW
K. Craig
120
• Engine spark and fuel metering have already escaped their
bonds of purely mechanical control; engine respiration will
be the last of the combustion triumvirate to fall.
• A fuel-injected engine feeds on a mixture of gasoline and
air. By monitoring the amount of air coming through the
intake manifold, the fuel control dispenses an allotment of
gasoline for efficient burning in the cylinders. In stepping
on the gas pedal, a driver in actuality increases oxygen
flowing to the engine by opening a throttle plate that sits in
the path of incoming air. When the driver lets off the gas,
this plate closes, throttling the engine.
• Although proven as an effective method of controlling
engine speed, throttling wastes energy. A constricted
intake forces the pistons to pull against a partial vacuum,
creating pumping losses.
Mechatronics with LabVIEW
K. Craig
121
• BMW in 2000 eliminated the throttle plate and began
using the valves themselves to control engine speed. An
eccentric shaft that acts upon intermediate rocker arms
adjusts the stroke lengths of the valves. A motor moves
the eccentric shaft in response to driving conditions.
• Providing engine designers with even greater flexibility to
move valves any way they want will improve engine
performance. Engine designers love degrees of freedom
and the average car today has only two: electronic fuel
injection and electronic spark timing.
• Yesterday’s engine control systems took an empirical
approach to telling engine actuators where they should
be for any particular set of conditions. The engine was
considered to be a black box!
Mechatronics with LabVIEW
K. Craig
122
• Next-generation controls are based on models! With these
models, control engineers can characterize the flow through
an engine, for example.
• Think about the tradeoffs a cam has to make on engine
performance, high speeds vs. idle. With camless valve
trains, one doesn’t have to live with compromise.
• Consider a camless engine with an electromechanical
valve-train actuator. Camless valve trains add six degrees
of freedom to engine control: three per intake valve and
three per exhaust valve, corresponding to a valve’s
opening, closing, and lift.
• This eliminates the need for inefficient throttling and could
deliver higher torque. Also, a camless engine could
deactivate unneeded cylinders for better efficiency. It could
dispense with having to recirculate exhaust gases through
EGR systems.
Mechatronics with LabVIEW
K. Craig
123
• But a camless engine could be noisy and susceptible to
wear, as we will see.
• At 3000 rpm, each electromechanical valve moves a
distance about 8 mm, 100 times a second. Sensors and
controls will tell the story!
• In moving away from camshafts, engine builders would
replace a single reliable component with a complex
system comprising many more components of dubious
integrity. Reliability of the camless engine will have to be
built in through a combination of sensors, estimators and
diagnostic routines.
• Continuously variable transmissions, CVTs, started as
theoretical visions also; now they are commercial
entities. Camless engines may follow the same path.
Mechatronics with LabVIEW
K. Craig
124
Mechatronics with LabVIEW
K. Craig
125
Modeling and Observers:
Let's Go Sensorless
• Shown is a traditional control system. Ideally, C(s) is the
actual state. Access to the state comes through the
sensor, which produces Y(s), the feedback variable. The
sensor transfer function, GS(s), is often ignored and is
our focus here. GS-Ideal(s) = 1.
Mechatronics with LabVIEW
K. Craig
126
• Phase lag and attenuation can be caused by the sensor
itself or by sensor filters used to attenuate noise. Phase
lag reduces margins of stability. Noise (usually EMI)
causes random behavior in the control system corrupting
the output and wasting power.
• We assume that the sensor in use is appropriate for a
given process; our goal is to make the best use of that
sensor, or, stated differently, to minimize the effects of
GS(s) ≠ 1. We will do this with an observer or estimator.
– Principle of an Observer: By combining a measured
feedback signal with knowledge of the control-system
components (plant + feedback system) the behavior
of the plant can be known with greater accuracy and
precision than by using the feedback alone.
Mechatronics with LabVIEW
K. Craig
127
• For this purpose, we need only consider the plant and
sensor, as shown. Note that Y(s) is not C(s).
• There are two ways to avoid GS(s) ≠ 1.
– The first is impractical: add the inverse sensor transfer
function. The nature of GS(s) makes taking its inverse
impractical as a derivative would result in the
numerator, leading to excessive high-frequency output
noise.
Mechatronics with LabVIEW
K. Craig
128
– Another alternative is to simulate a model of the plant
in software as the control loop is being executed. The
signal from the power converter output PC(s) is
applied to a plant model in parallel with the actual
plant.
– Such a solution is subject to drift because most
control system plants contain at least one integrator;
even small differences between the physical plant
and the model plant will cause the estimated state
CEst(s) to drift. This then is also impractical.
Mechatronics with LabVIEW
K. Craig
129
• The first solution works well at low frequency, but
produces excessive noise at high frequency. The
second solution works well at high frequency but drifts in
the lower frequencies.
• Let’s combine the best parts of these two solutions.
5 Elements of
an Observer:
• Sensor output Y(s)
• Plant excitation PC(s)
• Plant Model GPEst(s)
• Sensor Model GSEst(s)
• PI or PID observer
compensator GCO(s)
Mechatronics with LabVIEW
K. Craig
130
• The gains of GCO(s) are often set as high as possible so
that even small errors drive the observer compensator to
minimize the difference between Y(s) and YO(s). If this
error is small, the observed state, CO(s), becomes a
reasonable representation of the actual state, C(s).
Certainly, it can be much more accurate than the sensor
output, Y(s).
One application
of the observer
is to use the
observed state
to close the
control loop.
Mechatronics with LabVIEW
K. Craig
131
• This computer experiment will demonstrate the
elimination of phase lag from the control loop and the
resulting increase in the margins of stability, one of the
primary benefits of an observer.
Mechatronics with LabVIEW
K. Craig
132
Mechatronics with LabVIEW
K. Craig
133
Mechatronics with LabVIEW
K. Craig
134
• To summarize, an observer is a mathematical structure
that combines sensor output and plant excitation signals
with models of the plant and sensor. An observer
provides feedback signals that are superior to the sensor
output alone.
An observer can
be described as a
predictorcorrector method.
Mechatronics with LabVIEW
K. Craig
135
• There are 4 major components of observer design:
– Modeling the sensor
– Modeling the plant
– Selecting the observer compensator
– Tuning the compensator
• Observer can be used to enhance system performance
– More accurate than sensor and reduce phase lag
inherent in sensor
– Replace sensors in a control system
– Alternative to adding new sensors or upgrading
existing ones, thus reducing system cost
– However, it is not a panacea as it adds complexity to
a system and requires computational resources
Mechatronics with LabVIEW
K. Craig
136
• Example of the Application of an Observer for
Sensorless Control
– Modeling and Sensorless Control of an Electromagnetic
Valve Actuator
• Mechatronics, Volume 16 (2006), pp. 159-175
• Peter Eyabi, Eaton Aerospace
• Gregory Washington, Ohio State University
– In order to eliminate the need for position and velocity
sensing, a nonlinear observer is developed that only
employs coil current measurement. The position
estimate is used as feedback to track a desired
trajectory.
– The control objective is to minimize energy consumption
and to reduce the seating velocity which should improve
actuator fatigue life and reduce impact noise.
Mechatronics with LabVIEW
K. Craig
137
Foundations of Engineering
Engineering System Investigation Process
START HERE
Technical
Communications
Ma
th e
ma
Physical
System
System
Measurement
Physical &
Mathematical
Modeling
t ic
s
Hands-On
y
Ph
Engineering
System
Investigation
Process
Teamwork
Social Science
Engineering
Measurement
s ic
Parameter
Identification
Physical
Model
s
Mathematical
Model
Minds-On
Engineering
Analysis &
Computing
Measurement
Analysis
Mathematical
Analysis
Comparison:
Predicted vs.
Measured
Professionalism
Design
Changes
YES
Is The
Comparison
Adequate ?
NO
Mechatronics with LabVIEW
K. Craig
138
Mechatronics with LabVIEW
K. Craig
139
Mechatronics with LabVIEW
K. Craig
140
Become an Engineer
• Studying Engineering vs. Becoming an Engineer
– New attitude towards learning
• Embrace knowledge – make it a part of one’s
being
• Prepared for class, ready to learn and dynamically
interact
– New attitude towards teaching
• Mentor students
• Active, integrative, project-based teaching
– Changing attitude and behavior is difficult for all
involved
Mechatronics with LabVIEW
K. Craig
141
Interactive Learning
•
•
•
•
•
•
•
•
Not just lecture anymore
Classroom discussions / open-ended problems
Students learn from professors, TA’s, each other
Lectures / laboratory together
Project oriented
Hands-on / Minds-on
Team oriented
Studio environment
Mechatronics with LabVIEW
K. Craig
142
Ideal Learning Environment
•
•
•
•
•
•
•
Small classes
Student-to-student interaction
Frequent contact with professor and TA’s
Ability to perform analysis and simulations
Visualization tools
Laboratory / hardware experience to validate analysis
Student testing based on understanding fundamentals
(not tool-dependent, not memorization)
Mechatronics with LabVIEW
K. Craig
143
Mechatronics with LabVIEW
K. Craig
144
Mechatronics with LabVIEW
K. Craig
145
Mechatronics with LabVIEW
K. Craig
146
Magnetic Levitation System
A Genuine Mechatronic System
Electromagnet
Phototransistor
Infrared LED
Levitated Ball
Mechatronics with LabVIEW
K. Craig
147
Mechatronics with LabVIEW
K. Craig
148
NI ELVIS
Mechatronics with LabVIEW
K. Craig
149
Mechatronics with LabVIEW
K. Craig
150
ELVIS Connections
• Circuit Input to FUNC OUT
• Measured Signal to Oscilloscope CH B+
• Oscilloscope CH B- to Power Ground
• Circuit Ground to Power Ground
RC Circuit
Step Response
Mechatronics with LabVIEW
K. Craig
151
ELVIS Connections
• FUNC OUT to Circuit Input
• Measured Signal to Analog Input Signal ACH0+
• FUNC OUT to Analog Input Signal ACH1+
• Power Ground to Analog Input Signals ACH0- and ACH1- and Circuit Ground
RC Circuit
Frequency
Response
Mechatronics with LabVIEW
K. Craig
152
RC Electrical System
Spring-Damper Mechanical System
fi − f B − f K = 0
ein − e R − eC = 0
ein − iR − eout = 0
⎛ deout ⎞
ein − ⎜ C
⎟ R − eout = 0
⎝ dt ⎠
deout
RC
+ eout = ein
dt
eout
1
=
τ = RC
ein RCD + 1
Mechatronics with LabVIEW
f i − Bv − Kx = 0
f i − Bv − f o = 0
⎛ fi ⎞
fi − B ⎜ o ⎟ − f o = 0
⎜K⎟
⎝ ⎠
B i
f o + f o = fi
K
fo
1
B
=
τ=
fi B D + 1
K
K
K. Craig
153
LabVIEW Simulation
Mechatronics with LabVIEW
K. Craig
154
Spring-Pendulum
Physical System
Mechatronics with LabVIEW
K. Craig
155
Engineering
System
Investigation
Process
SpringPendulum
Dynamic System
Investigation
Mechatronics with LabVIEW
K. Craig
156
Physical Model
Simplifying Assumptions
•
•
•
•
•
•
pure spring, i.e., negligible inertia and damping
ideal (linear) spring
frictionless pivot
neglect all material damping and air damping
point mass, i.e., neglect rotational inertia of mass
two degrees of freedom, i.e., r and θ are the generalized
coordinates (this assumes no out-of-plane motion and no
bending of the spring)
• support structure is rigid
Mechatronics with LabVIEW
K. Craig
157
Physical Model
with
Parameter Identification
m = pendulum mass = 1.815 kg
mspring = spring mass = 0.1445 kg
ℓ = unstretched spring length = 0.333 m
k = spring constant = 172.8 N/m
g = acceleration due to gravity = 9.81 m/s2
Ft = 5.71 N = pre-tension of spring
rs = static spring stretch, i.e., rs = (mg-Ft)/k = 0.070 m
rd = dynamic spring stretch
r = total spring stretch = rs + rd
Mechatronics with LabVIEW
K. Craig
158
Spring Parameter Identification
spring
t
Mechatronics with LabVIEW
K. Craig
159
Polar Coordinates:
Position, Velocity, Acceleration
êθ
deˆ r
= êθ
dθ
deˆ θ
= −ê r
dθ
r = reˆ r
ê r
dr
v=
= reˆ r + rθeθ = v r eˆ r + v θ eˆ θ
dt
dv
a=
= r − rθ2 eˆ r + rθ + 2rθ eˆ θ
dt
= a r eˆ r + a θ eˆ θ
(
)
(
)
r
θ
magnitude change
direction change
rθ
rθ + rθ magnitude change
rθ
Mechatronics with LabVIEW
2
direction change
K. Craig
vr
vθ
160
Rigid Body Kinematics
XY: R reference frame (ground)
xy: R1 reference frame (pendulum)
⎡ x ⎤ ⎡ cos θ
⎢ y ⎥ = ⎢ − sin θ
⎢ ⎥ ⎢
⎢⎣ z ⎥⎦ ⎢⎣ 0
⎡ ˆi ⎤ ⎡ cos θ
⎢ ⎥ ⎢
⎢ ˆj ⎥ = ⎢ − sin θ
⎢ˆ⎥ ⎢ 0
⎢⎣ k ⎥⎦ ⎣
R
sin θ 0 ⎤ ⎡ X ⎤
cos θ 0 ⎥ ⎢ Y ⎥
⎥⎢ ⎥
0
1 ⎥⎦ ⎢⎣ Z ⎥⎦
sin θ 0 ⎤ ⎡ ˆI ⎤
⎢ ⎥
⎥
cos θ 0 ⎢ Jˆ ⎥
⎥
ˆ⎥
0
1 ⎥⎦ ⎢ K
⎢⎣ ⎥⎦
a P = R a O + ⎣⎡ R ωR1 ×
(
Mechatronics with LabVIEW
R
Y
y
x
X
O
k
ℓ+r
m
P
)
ωR1 × r OP ⎦⎤ + ⎡⎣ R α R1 × r OP ⎤⎦ + R1 a P + 2 ⎡⎣ R ωR1 × R1 v P ⎤⎦
K. Craig
161
Rigid Body Kinematics
R
aO = 0
ˆ
ωR1 = θkˆ = θK
r OP = − ( + r ) ˆj = − ( + r ) ⎣⎡ − sin θˆI + cos θJˆ ⎦⎤
R
ˆ
α R1 = θkˆ = θK
R1 P
v = −rjˆ = −r ⎡⎣ − sin θˆI + cos θJˆ ⎤⎦
R1 P
a = − rjˆ = − r ⎡⎣ − sin θˆI + cos θJˆ ⎦⎤
After substitution and evaluation:
R
R
a P = ˆi ⎡⎣( + r ) θ + 2rθ⎤⎦ + ˆj ⎡⎣ − r + ( + r ) θ2 ⎤⎦
Mechatronics with LabVIEW
K. Craig
162
Mathematical
Model
t
2
⎡
⎤⎦
F
ma
m
r
r
=
=
−
+
θ
(
)
∑r
r
⎣
∑F
θ
= ma θ = m ⎡⎣( + r ) θ + 2rθ ⎤⎦
mr − m ( + r ) θ2 + kr + Ft − mg cos θ = 0
Free Body Diagram
( + r ) θ + 2rθ + g sin θ = 0
− kr − Ft + mg cos θ = m ⎡⎣ r − ( + r ) θ2 ⎤⎦
− mg sin θ = m ⎡⎣( + r ) θ + 2rθ ⎤⎦
Mechatronics with LabVIEW
Nonlinear Equations
of Motion
K. Craig
163
d ⎛ ∂T ⎞ ∂T ∂V
+
= Qi
⎜
⎟−
dt ⎝ ∂q i ⎠ ∂q i ∂q i
Mathematical Model:
Lagrange’s Equations
q1 = r
q2 = θ
Q r = − Ft
Generalized Coordinates
1 ⎡ 2
2 2
T = m r + ( + r) θ ⎤
⎦
2 ⎣
Potential Energy
mr − m ( + r ) θ2 + kr + Ft − mg cos θ = 0
+ r ) θ + 2rθ + g sin θ = 0
Mechatronics with LabVIEW
Qθ = 0
Generalized
Forces
Kinetic Energy
1 2
V = kr − mg ⎡⎣( + r ) cos θ − ⎤⎦
2
(
Lagrange’s Equations
Nonlinear Equations
of Motion
K. Craig
164
LabVIEW Simulation Diagram
Mechatronics with LabVIEW
K. Craig
165
Simulation Results
Simulation Results with Initial Conditions: theta = -0.274 rad, r = 0.046 m
0.3
Initial
Conditions
r0 = 0.046 m
radial and angular position (rad or m)
θ0 = −0.274 rad
0.2
0.1
0
-0.1
-0.2
-0.3
-0.4
Mechatronics with LabVIEW
0
10
20
30
time (sec)
40
50
60
K. Craig
166
Simulation Results
Simulation Results with Initial Conditions: theta = 0.021 rad, r = 0.115 m
0.25
Initial
Conditions
r0 = 0.115 m
0.15
radial and angular position (rad or m)
θ0 = 0.021 rad
0.2
0.1
0.05
0
-0.05
-0.1
-0.15
-0.2
-0.25
Mechatronics with LabVIEW
0
10
20
30
time (sec)
40
50
60
K. Craig
167
Actual Measured Dynamic Behavior
Experimental Results with Initial Conditions: theta = -0.274 rad, r = 0.046 m
0.3
Initial
Conditions
r0 = 0.046 m
radial and angular position (rad or m)
θ0 = −0.274 rad
0.2
0.1
0
-0.1
-0.2
-0.3
-0.4
Mechatronics with LabVIEW
0
10
20
30
time (sec)
40
50
60
K. Craig
168
Actual Measured Dynamic Behavior
Experimental Results with Initial Conditions: theta = 0.021 rad, r = 0.115 m
0.2
Initial
Conditions
r0 = 0.115 m
radial and angular position (rad or m)
θ0 = 0.021 rad
0.15
0.1
0.05
0
-0.05
-0.1
-0.15
-0.2
Mechatronics with LabVIEW
0
10
20
30
time (sec)
40
50
60
K. Craig
169
Comparison
Simulation Results with Initial Conditions: theta = -0.274 rad, r = 0.046 m
0.3
0.2
radial and angular position (rad or m)
radial and angular position (rad or m)
0.2
0.1
0
-0.1
-0.2
0.1
0
-0.1
-0.2
-0.3
-0.3
-0.4
Experimental Results with Initial Conditions: theta = -0.274 rad, r = 0.046 m
0.3
-0.4
0
10
20
30
time (sec)
40
50
60
Initial Conditions:
Mechatronics with LabVIEW
0
10
20
30
time (sec)
40
50
60
θ0 = −0.274 rad
r0 = 0.046 m
K. Craig
170
Comparison
Simulation Results with Initial Conditions: theta = 0.021 rad, r = 0.115 m
0.25
Experimental Results with Initial Conditions: theta = 0.021 rad, r = 0.115 m
0.2
0.2
0.15
radial and angular position (rad or m)
radial and angular position (rad or m)
0.15
0.1
0.05
0
-0.05
-0.1
0.1
0.05
0
-0.05
-0.1
-0.15
-0.15
-0.2
-0.25
0
10
20
30
time (sec)
40
50
60
Initial Conditions:
Mechatronics with LabVIEW
-0.2
0
10
20
30
time (sec)
40
50
60
θ0 = 0.021 rad
r0 = 0.115 m
K. Craig
171
LabVIEW Control Design
Mechatronics with LabVIEW
K. Craig
172
Magnetic Levitation
System
Electromagnet
Phototransistor
Infrared LED
Levitated Ball
Electromagnetic Valve Actuator
For a Camless Automotive Engine
Mechatronics with LabVIEW
K. Craig
173
Magnetic Levitation System
A Genuine Mechatronic System
Electromagnet
Phototransistor
Vsensor = 5.44 V
At Equilibrium
i
Infrared LED
+x
Levitated Ball
m = 0.008 kg
r = 0.0062 m = 0.24 in
Mechatronics with LabVIEW
Equilibrium Conditions
x0 = 0.003 m
i0 = 0.222 A
K. Craig
174
• Electromagnet Actuator
– Current flowing through the coil windings of the
electromagnet generates a magnetic field.
– The ferromagnetic core of the electromagnet provides
a low-reluctance path in the which the magnetic field
is concentrated.
– The magnetic field induces an attractive force on the
ferromagnetic ball.
Electromagnetic Force
Proportional to the square of
the current
and
Inversely proportional to the
square of the gap distance
Mechatronics with LabVIEW
⎛ i2 ⎞
f ( x,i ) = C ⎜ 2 ⎟
⎝x ⎠
K. Craig
175
– The electromagnet uses a ¼ - inch steel bolt as the
core with approximately 3000 turns of 26-gauge
magnet wire wound around it.
– The resistance of the electromagnet at room
temperature is approximately 32 Ω.
Mechatronics with LabVIEW
K. Craig
176
φ = φ + φm Neglect φ
Derivation
Ni
φm =
ℜm
⎛ i2 ⎞
f ( x,i ) = C ⎜ 2 ⎟
⎝x ⎠
ℜm = ℜcore + ℜgap + ℜobject + ℜreturn path
N 2i
λ = Nφ = Nφm =
= L mi
ℜm
Define: ℜ = ℜcore + ℜobject + ℜreturn path = constant
ℜ gap =
Wfield
x gap
μ 0 A gap
2
N
=
Lm =
ℜm
2
ℜ+
N
x gap
μ 0 A gap
=
μ 0 A gap N 2
μ 0 A gapℜ + x gap
μ 0 A gap N 2
1
1
2
= L(x)i =
i2
2
2 μ 0 A gap ℜ + x gap
2
⎛
⎞
⎛
1 2 dL(x)
1
1
i
2
fe = i
= − μ 0 A gap N ⎜
=
−
K
⎟⎟
1⎜
⎜
⎜K +x
2
dx
2
gap
⎝ μ 0 A gapℜ + x gap ⎠
⎝ 2
Mechatronics with LabVIEW
K. Craig
⎞
⎟⎟
⎠
2
177
sensor
Ball-Position Sensor
iemitter = 15 mA
Mechatronics with LabVIEW
LED Blocked: Vsensor = 0 V
LED Unblocked: Vsensor = 10 V
Equilibrium Position: Vsensor ≈ 5.40 V
Ksensor ≈ 4 V/mm
Range ± 1mm
K. Craig
178
• Ball-Position Sensor
– The sensor consists of an infrared diode (emitter) and
a phototransistor (detector) which are placed facing
each other across the gap where the ball is levitated.
– Infrared light is emitted from the diode and sensed at
the base of the phototransistor which then allows a
proportional amount of current to flow from the
transistor collector to the transistor emitter.
– When the path between the emitter and detector is
completely blocked, no current flows.
– When no object is placed between the emitter and
detector, a maximum amount of current flows.
– The current flowing through the transistor is converted
to a voltage potential across a resistor.
Mechatronics with LabVIEW
K. Craig
179
– The voltage across the resistor, Vsensor, is sent through
a unity-gain, follower op-amp to buffer the signal and
avoid any circuit loading effects.
– Vsensor is proportional to the vertical position of the ball
with respect to its operating point; this is compared to
the voltage corresponding to the desired ball position.
– The emitter potentiometer allows for changes in the
current flowing through the infrared LED which affects
the light intensity, beam width, and sensor gain.
– The transistor potentiometer adjusts the phototransistor
current-to-voltage conversion sensitivity and allows
adjustment of the sensor’s voltage range; a 0 - 10 volt
range allows for maximum sensor sensitivity without
saturation of the downstream buffer op-amp.
Mechatronics with LabVIEW
K. Craig
180
Vbias
Vdesired
+ Σ
-
Gc(s)
Controller
Vactual
+
+
Σ
Current
Amplifier
i
G(s)
Magnet + Ball
X
H(s)
Sensor
From Equilibrium:
As i ↑, x↓, & Vsensor ↓
As i ↓, x ↑, & Vsensor ↑
Magnetic Levitation System
Block Diagram
Linear Feedback Control System
to Levitate Steel Ball
about an Equilibrium Position
Corresponding to Equilibrium Gap x0
and Equilibrium Current i0
Mechatronics with LabVIEW
⎛ i2 ⎞
f ( x,i ) = C ⎜ 2 ⎟
⎝x ⎠
K. Craig
181
Voltage-to-Current Converter
OPA544
High-Voltage, High Current
Op Amp
1
out
in
2
M
M
S
Assume Ideal Op-Amp
Behavior
e+ = e−
Mechatronics with LabVIEW
⎛ R2 ⎞⎛ 1 ⎞
iM = ⎜
⎟ ein
⎟⎜
⎝ R1 + R 2 ⎠⎝ R S ⎠
R1 = 49KΩ, R2 = 1KΩ, R3 = 0.1Ω
K. Craig
182
Non-Ideal
Op-Amp Behavior
A
eo =
e+ − e− )
(
τs + 1
eout − e1 = ( L M s + R M ) i
e1 = R Si
e1
e1
eout − e1 = ( L M s + R M )
RS
eout
⎛ R2 ⎞
ein ⎜
⎟
⎝ R1 + R 2 ⎠
Saturation
A
τs + 1
out
⎛ LMs + R M + R S ⎞
=⎜
⎟ e1
RS
⎝
⎠
RS
LMs + R M + R S
1
1
RS
1
Mechatronics with LabVIEW
K. Craig
183
Magnetic Levitation System
Control System Design
⎛ i2 ⎞
f ( x,i ) = C ⎜ 2 ⎟
⎝x ⎠
Linearization:
Equation of Motion:
⎛ i2 ⎞
mx = mg − C ⎜ 2 ⎟
⎝x ⎠
At Equilibrium:
⎛i ⎞
mg = C ⎜ 2 ⎟
⎝x ⎠
2
Mechatronics with LabVIEW
⎛ i2 ⎞
⎛ i2 ⎞
⎛ 2i 2 ⎞
⎛ 2i
C ⎜ 2 ⎟ ≈ C ⎜ 2 ⎟ − C ⎜ 3 ⎟ xˆ + C ⎜ 2
⎝x ⎠
⎝x ⎠
⎝ x ⎠
⎝x
⎞ˆ
⎟i
⎠
⎛ i2 ⎞
⎛ 2i 2 ⎞
⎛ 2i
mxˆ = mg − C ⎜ 2 ⎟ + C ⎜ 3 ⎟ xˆ − C ⎜ 2
⎝x ⎠
⎝ x ⎠
⎝x
⎞ˆ
⎟i
⎠
⎛ 2i 2 ⎞
⎛ 2i
mxˆ = C ⎜ 3 ⎟ xˆ − C ⎜ 2
⎝ x ⎠
⎝x
⎞ˆ
⎟i
⎠
K. Craig
184
Use of Experimental Testing in Multivariable Linearization
f m = f (i, y)
∂f
∂f
f m ≈ f ( i0 , y0 ) +
( y − y0 ) +
∂y i0 ,y0
∂i
Mechatronics with LabVIEW
( i − i0 )
i0 ,y0
K. Craig
185
Kamp = 0.2 A/V
Σ
m = 0.008
g = 9.81
x = 0.003
Σ
Ksensor = 4 V/mm
⎛ i2 ⎞
mg = C ⎜ 2 ⎟
⎝x ⎠
C = 1.4332E − 5
i = 0.222
⎛ 2i 2 ⎞
⎛ 2i
mxˆ = C ⎜ 3 ⎟ xˆ − C ⎜ 2
⎝ x ⎠
⎝x
xˆ = 6540xˆ − 88iˆ
Mechatronics with LabVIEW
⎞ˆ
⎟i
⎠
xˆ
−88
=
ˆi ( s 2 − 6540 )
K. Craig
186
Open-Loop
Transfer Function
Controller
PD Controller
K P + K Ds
τs + 1
KP
s+
KD
KD
τ s+1
τ
τ = 0.002
K P = 0.3
88
70400
( 0.2 )( 4000 ) = 2
2
s − 6540
( s − 6540 )
s + 100 ⎤
⎡s + z ⎤
⎡
K⎢
= 1.5 ⎢
⎥
⎣ s + 500 ⎥⎦
⎣s + p ⎦
Open-Loop
Bode Plot
Root Locus
Plot
K D = 0.003
Mechatronics with LabVIEW
K. Craig
187
LabVIEW Control
Front Panel
Mechatronics with LabVIEW
K. Craig
188
LabVIEW Control
Block Diagram
Mechatronics with LabVIEW
K. Craig
189
Active
Lead Controller
C 2 = 0.01 μF
R 4 = 50 KΩ
R1 = 100 KΩ
R 2 = 100 KΩ
R 3 = 1.6 KΩ
C1 = 0.1 μF
51 KΩ
1.6 KΩ
Vcontrol ⎡ R 2 ⎤ ⎡ R 1C1s + 1 ⎤ ⎡ R 4 ⎤ ⎡ R 4 ⎤ ⎡ 0.01s + 1 ⎤
= ⎢− ⎥ ⎢
− ⎥ = ⎢ ⎥⎢
⎢
⎥
− Verror ⎣ R1 ⎦ ⎣ R 2 C 2s + 1⎦ ⎣ R 3 ⎦ ⎣ R 3 ⎦ ⎣ 0.001s + 1⎥⎦
Mechatronics with LabVIEW
K. Craig
190
LabVIEW Control Implementation
Mechatronics with LabVIEW
K. Craig
191
Mechatronic
System Case
Study
Rotary Inverted
Pendulum
Dynamic System
Investigation
With
LabVIEW
Mechatronics with LabVIEW
K. Craig
192
P&G Inertia-Assisted Knife Concept
• Knife
• Inertia Arms
• Gear sprocket
to drive Inertia
Arms
• (2) Servo
Motors would
be used to
drive the
system
Mechatronics with LabVIEW
K. Craig
193
Inertia-Assisted Knife
Knife Cut
Zone
Mechatronics with LabVIEW
K. Craig
194
Physical System
Mechatronics with LabVIEW
K. Craig
195
Physical & Mathematical Modeling
Reference Frames:
R: ground xyz
R1: arm x1y1z1
R2: pendulum x2y2z2
⎡ ˆi1 ⎤ ⎡ cos θ sin θ 0 ⎤ ⎡ ˆi ⎤
⎢ ⎥ ⎢
⎢ ⎥
⎥
ˆ
⎢ j1 ⎥ = ⎢ − sin θ cos θ 0 ⎥ ⎢ ˆj ⎥
⎢ˆ ⎥ ⎢ 0
⎢ˆ⎥
0
1
⎥
⎦ ⎢⎣ k ⎥⎦
⎢⎣ k1 ⎥⎦ ⎣
ˆ
⎡ ˆi2 ⎤ ⎡1
0
0 ⎤ ⎡ i1 ⎤
⎢ ⎥ ⎢
⎢ ⎥
⎥
ˆ
⎢ j2 ⎥ = ⎢ 0 cos φ sin φ ⎥ ⎢ ˆj1 ⎥
⎢ ˆ ⎥ ⎢ 0 − sin φ cos φ ⎥ ⎢ ˆ ⎥
⎦ ⎢⎣ k1 ⎥⎦
⎢⎣ k 2 ⎥⎦ ⎣
Mechatronics with LabVIEW
y
y1
Top View
x1
θ
x
O
z1
z2
Pendulum
Link 2
α
y2
φ
B
Arm
Link 1
y1
Front View
K. Craig
196
• Angular Velocities of Links
R
R
ωR1 = θkˆ = θkˆ 1
ωR 2 = φ cos θˆi + φ sin θˆj + θkˆ
= φˆi + θkˆ
1
• Velocities of CG’s of Links
1
= φˆi2 + θ sin φˆj2 + θ cos φkˆ 2
– Point A is CG of Link 1
– Point C is CG of Link 2
(
= ( −θ
+ (θ
+ (φ
R
vA = −
R
vC
Mechatronics with LabVIEW
) (
ˆi +
sin
θ
θ
11
1 sin θ − θ
1
cos θ − θ
21
)
ˆj
cos
θ
θ
11
21 cos φ cos θ + φ
21
cos φ sin θ − φ
)
sin φ cos θ ) ˆj
ˆi
sin
sin
φ
θ
21
21
)
cos φ kˆ
K. Craig
197
(
(
R
R
v
v
)
)
A 2
=
2 2
11
C 2
=
2 2
21
θ
φ + 12 θ2 − 2θφ
1
2
sin
φ
+
θ
21
11
+
2
21
cos 2 φ
• Definitions:
1
11
= length of link 1 =
12
= distance from pivot O to CG of link 1
= distance from CG of link 1 to end of link 1
2 = length of link 2 = 21 + 22
12
21
= distance from pivot B to CG of link 2
22
= distance from CG of link 2 to end of link 2
Mechatronics with LabVIEW
K. Craig
198
Lagrange’s Equations
• Lagrange’s Equations
• Generalized Coordinates
d ⎛ ∂T ⎞ ∂T ∂V
+
= Qi
⎜
⎟−
dt ⎝ ∂q i ⎠ ∂q i ∂q i
q1 = θ
q2 = φ
• Kinetic Energy T of System
1
1
1
R A 2
2
R C 2
T = m1 ( v ) + I1z1 θ + m 2 ( v ) +
2
2
2
1⎡
I2x2 φ2 + I2y2 ( sin 2 φ ) θ2 + I2z2 ( cos 2 φ ) θ2 ⎤ + I2x2 y2 φθ sin φ
⎦
2⎣
Mechatronics with LabVIEW
K. Craig
199
• Potential Energy V of the System
V = −m 2g
• Generalized Forces
()
sgn ( φ )
Qθ = T − Bθ θ − Tfθ sgn θ
Qφ = −Bφ φ − Tfφ
• Equations of Motion
Mechatronics with LabVIEW
21
(1 − sin φ )
T = motor torque
Bθ = viscous damping constant θ joint
Tfθ = Coulomb friction constant θ joint
Bφ = viscous damping constant φ joint
Tfφ = Coulomb friction constant φ joint
d
dt
d
dt
∂T ∂T ∂V
−
+
= Qθ
∂θ ∂θ ∂θ
∂T ∂T ∂V
−
+
= Qφ
∂φ ∂φ ∂φ
K. Craig
200
Nonlinear Equations of Motion
⎡ m1
⎣
2
11
+ I1z1 + m 2
⎡ I2 − m 2
⎣ x 2 y2
⎡ I2 − m 2
⎣ y2
2
21
2
1
1
cos 2 φ + I2z2 cos 2 φ + I2y2 sin 2 φ ⎤ θ +
⎦
2
⎤
⎡
⎤
sin
I
m
cos
φφ
+
−
φφ
+
21 ⎦
2 1 21 ⎦
⎣ 2 x 2 y2
+ m2
2
21
()
− I2z ⎤ ( 2 cos φ sin φ ) φθ = T − ⎡⎣ Bθ θ + Tfθ sgn θ ⎤⎦
2 ⎦
[1]
⎡m2
⎣
2
21
− I2y
2
⎡ m 2 221 + I2 ⎤ φ + ⎡ I2 − m 2 1 21 ⎤ sin φθ +
x2 ⎦
⎣
⎣ x 2 y2
⎦
+ I2z ⎤ ( cos φ sin φ ) θ2 + m 2 g 21 cos φ = − ⎡⎣ Bφ φ + Tfφ sgn φ ⎤⎦
2 ⎦
[2]
Mechatronics with LabVIEW
()
K. Craig
201
π
2
Define: α = − φ
⎡ m1
⎣
2
11
+ I1z1 + m 2
⎡ I2 − m 2
⎣ x 2 y2
⎡ + I2 + m 2
⎣ z2
2
21
sin 2 α + I2z2 sin 2 α + I2y2 cos 2 α ⎤ θ −
⎦
2
⎤
⎡
⎤
cos
I
m
sin
αα
+
−
αα
+
21 ⎦
2 1 21 ⎦
⎣ 2 x 2 y2
2
1
1
+ m2
2
21
()
− I2y2 ⎤ ( 2 cos α sin α ) αθ = T − ⎡⎣ Bθ θ + Tfθ sgn θ ⎤⎦
⎦
[1A]
− ⎡⎣ m 2
2
21
+ I2x2 ⎤⎦ α + ⎡⎣ I2x2 y2 − m 2
⎡m2
⎣
+m2g
Mechatronics with LabVIEW
2
21
1 21
⎤ cos αθ +
⎦
− I2y2 + I2z2 ⎤⎦ ( cos α sin α ) θ2
21
sin α = ⎣⎡ Bα α + Tfα sgn ( α ) ⎦⎤
[2A]
K. Craig
202
Linearization:
θ=0
α=0
⎡ m1
⎣
2
1
2
11
+ I1z1 + m 2
− ⎡⎣ m 2
2
21
Operating Point
+ I2y2 ⎤⎦ θ − ⎡⎣ I2x2 y2 − m 2
+ I2x2 ⎤⎦ α + ⎡⎣ I2x2 y2 − m 2
Definitions:
1 21
1 21
⎤ α = T − Bθ θ
⎦
⎤ θ + m2g
⎦
21
C1 = m1
+ I1z2 + m 2
α = Bα α
2
11
C1θ + C 2 α = T − Bθ θ
[5]
C2 = m 2
1 21
C 3 α + C 2 θ − C 4 α = − Bα α
[6]
C3 = m 2
2
21
C4 = m 2g
Mechatronics with LabVIEW
[3]
[4]
2
1
+ I2y2
− I2x2 y2
+ I2x2
21
K. Craig
203
C 3s 2 − C 4
θ
= 2
T s ⎡( C1C3 − C22 ) s 2 − C1C 4 ⎤
⎣
⎦
α
−C 2s 2
= 2
T s ⎡( C1C3 − C22 ) s 2 − C1C 4 ⎤
⎣
⎦
Transfer Functions
(neglect damping terms):
State-Space Equations
(neglect damping terms):
q1 = θ
q2 = θ
q3 = α
q4 = α
⎡0
⎡ q1 ⎤ ⎢
⎢q ⎥ ⎢0
⎢ 2⎥ = ⎢
⎢ q 3 ⎥ ⎢0
⎢ ⎥ ⎢
⎣q 4 ⎦ ⎢0
⎢
⎣
Mechatronics with LabVIEW
1
0
0
−C 2 C 4
C1C3 − C22
0
0
0
C1C4
C1C3 − C22
0⎤
0
⎡
⎤
⎥
⎥ ⎡q ⎤ ⎢
C
3
⎥
0⎥ ⎢ 1 ⎥ ⎢
2
⎥ ⎢q 2 ⎥ ⎢ C1C3 − C2 ⎥
T]
+⎢
[
⎥
⎥
1 ⎢q3 ⎥
0
⎥⎢ ⎥ ⎢
⎥
⎥ ⎣ q 4 ⎦ ⎢ −C 2 ⎥
0⎥
⎢ C C − C2 ⎥
2⎦
⎦
⎣ 1 3
K. Craig
204
Model Parameter Identification
•
•
•
•
•
Motor Parameters
Masses of Links 1 and 2
Location of CG’s of Links 1 and 2
Moment of Inertia for Link 1: I1
z1
Inertia Matrix for Link 2:
⎡ I2
⎢ x2
⎢ I2y2 x2
⎢
⎢⎣ I2z2 x2
I2x2 y2
I2y2
I2z2 y2
I2x2z2 ⎤
⎥
I2y2z2 ⎥
⎥
I2z2 ⎥⎦
• System Friction: Coulomb and Viscous
Mechatronics with LabVIEW
K. Craig
205
Free Oscillation of the Pendulum
Frequency of oscillation = 0.87 cycles/sec
Friction is a combination of viscous and Coulomb
Mechatronics with LabVIEW
K. Craig
206
Free Oscillation of the Pendulum
Coulomb
Friction
added as
needed to
match
simulation to
experimental
results.
LabVIEW Simulation Block Diagram
Mechatronics with LabVIEW
K. Craig
207
Pendulum Simulated Response
B = 1.5E-4 N-m/rad/s
Tf = 4.35E-4 N-m
Mechatronics with LabVIEW
K. Craig
208
Free Oscillation of the Horizontal Arm
Mechatronics with LabVIEW
K. Craig
209
Free Oscillation of the Horizontal Arm
LabVIEW Simulation Block Diagram
Mechatronics with LabVIEW
Viscous
Damping
added as
needed to
match
simulation to
experimental
results.
K. Craig
210
Horizontal Arm Simulated Response
B = 1.1E-3 N-m/rad/s
Tf = 4.51E-2 N-m
Mechatronics with LabVIEW
K. Craig
211
• Pendulum Inertia Matrix: Computational Results
⎡ I2
⎤
I
I
2
2
x 2 y2
x 2 z2
⎢ x2
⎥
I2y
I2y z ⎥ =
⎢ I2y x
2 2
2
2 2
⎢
⎥
I2z ⎥
⎢⎣ I2z2 x2 I2z2 y2
2 ⎦
−6.5383E − 5
0
⎡ 3.34E − 3
⎤
⎢ −6.5383E − 5 2.1457E − 5
⎥ kg-m 2
0
⎢
⎥
0
0
3.523E − 3⎥⎦
⎢⎣
• Experimental Result
I2x = 0.00334 kg-m 2
2
Mechatronics with LabVIEW
K. Craig
212
LabVIEW Nonlinear Model
Mechatronics with LabVIEW
K. Craig
213
Total System Response
BLUE:
Simulated
Pendulum
WHITE:
Real Pendulum
GREEN:
Simulated Arm
RED:
Real Arm
Mechatronics with LabVIEW
K. Craig
214
LabVIEW Control Block Diagram
Mechatronics with LabVIEW
K. Craig
215
• Balancing Controllers
– Full-State Feedback Regulator
– Classical Control Design
• Swing-Up Controller
– Calculates the total system energy based on the
kinetic energy of both links and the potential
energy of the pendulum.
– The calculated total system energy is compared to
a defined quantity of energy when the pendulum is
balanced (i.e., zero energy when balanced).
– The difference between the desired energy and
the actual energy is multiplied by an “aggressivity”
gain and applied to the motor.
Mechatronics with LabVIEW
K. Craig
216
– The objective of the swing-up control exercise is to
move the system from the stable equilibrium
position to the unstable equilibrium position.
– Energy must be added to the system to achieve
this swing-up action.
– The manipulated input to achieve this is given by
the control law:
⎛ dα
⎞
V = K A ( E − E 0 ) sgn ⎜
cos α ⎟
⎝ dt
⎠
– The first two terms in the above control law are the
"aggressivity" gain and the difference between
actual and desired system energy. These two
terms provide the magnitude of energy that has to
be added to the system at any given time.
Mechatronics with LabVIEW
K. Craig
217
– The "aggressivity" gain determines what
proportion of the available input will be used to
increase or decrease the system energy. This gain
could be the difference in swinging the pendulum
up in 3 or 10 oscillations.
– The second half of the energy swing up equation
determines the direction the input should be
applied to increase the energy of the system. The
velocity term causes the input to change directions
when the pendulum stops and begins to swing in
the opposite direction. The cosine term is
negative when the pendulum is below horizontal
and positive above horizontal. This helps the
driven link to get under the pendulum and catch it.
Mechatronics with LabVIEW
K. Craig
218
– By controlling on energy feedback, the system
automatically stops inputting excess energy and
allows the system to coast to a balanced position.
When the remaining potential energy required is
equal to the kinetic energy, the feedback will
become very small and the pendulum will coast to
vertical position.
– By setting the desired energy to a value greater
than zero, unmodeled energy dissipation effects
can be overcome as the pendulum is approaching
its balanced point. If this is too much, the
pendulum will overshoot and the driven link will
not be able to catch it.
Mechatronics with LabVIEW
K. Craig
219
– The switching between the controllers has a deadband of 5°. When the pendulum is within ± 25° of
vertical, the swing up controller will turn off. If the
pendulum coasts to within ± 20° of vertical, the
balance controller will be activated and the driven
link will attempt to catch the pendulum. If the
balance controller is not successful, the pendulum
will fall and the swing up algorithm will
automatically engage.
Mechatronics with LabVIEW
K. Craig
220
Simulation Results
Mechatronics with LabVIEW
K. Craig
221
Controlled System Response
Mechatronics with LabVIEW
K. Craig
222
Download