1.3 Developing Linear Models 91.4 Function Identification and Parameter Estimation 15 1.5 Fitting Models to Scattered Data 23 2.2 Rotation About a Fixed Axis 48 2.3 Equivalent Mass and I
Trang 1William J Palm III
System Dynamics
further improve student accessibility of the material.
System Dynamics includes the strongest treatment of computational software and system simulation of any available text,
with its early introduction of MATLAB and Simulink The text’s extensive coverage also includes discussion of the root locus
and frequency response plots, among other methods, for assessing system behavior in the time and frequency domains as well
as topics such as function discovery, parameter estimation, and system identifi cation techniques, motor performance evaluation,
and system dynamics in everyday life
New features and their benefits:
Block diagrams are now presented in Chapter 9 to be closer to their applications in control system analysis
The material in Chapter 5 dealing with transfer functions and state variable methods has been reorganized to better
delineate the advantages of each method
Introduction to MATLAB, offered on the text website, provides readers with a practical, concise guide to the program
The dynamics review in Chapter 2 and the introduction to electrical systems in Chapter 6 have been edited for a more
concise presentation of the material
The former Chapter 11 has been split into two chapters to focus more concisely on PID control system design issues
(the new Chapter 11) and compensator design (the new Chapter 12).
The fi nal chapter (Vibration Applications) now includes coverage of active vibration control systems and nonlinear vibration
Retained/hallmark features:
The fi rst edition’s extensive coverage of mechanical, electrical, fl uid, and thermal systems is retained.
Function discovery, parameter estimation, and system identifi cation techniques are covered in several chapters.
MATLAB is introduced in the fi rst chapter and used throughout the book as an optional feature
Simulink is introduced in Chapter 5 and used as an optional feature in remaining chapters for doing systems simulation
Trang 2System Dynamics Second Edition
i
Trang 3ii
Trang 4System Dynamics
Second Edition
William J Palm III
University of Rhode Island
iii
Trang 5SYSTEM DYNAMICS, SECOND EDITION
Published by McGraw-Hill, a business unit of The McGraw-Hill Companies, Inc., 1221 Avenue of the Americas, New York, NY 10020 Copyright © 2010 by The McGraw-Hill Companies, Inc All rights reserved Previous edition © 2005 No part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written consent of The McGraw-Hill Companies, Inc., including, but not limited to, in any network or other electronic storage or transmission, or broadcast for distance learning.
Some ancillaries, including electronic and print components, may not be available to customers outside the United States.
This book is printed on recycled, acid-free paper containing 10% postconsumer waste.
1 2 3 4 5 6 7 8 9 0 QPD/QPD 0 9
ISBN 978–0–07–352927–1 MHID 0–07–352927–3
Global Publisher: Raghothaman Srinivasan Senior Sponsoring Editor: Bill Stenquist Director of Development: Kristine Tibbetts Developmental Editor: Lora Neyens Senior Marketing Manager: Curt Reynolds Project Manager: Melissa M Leick Lead Production Supervisor: Sandy Ludovissy Associate Design Coordinator: Brenda A Rolwes Cover Designer: Studio Montage, St Louis, Missouri Compositor: ICC Macmillan
Typeface: 10.5/12 Times Roman Printer: Quebecor World Dubuque, IA
MATLAB ® and Simulink ® are trademarks of The MathWorks, Inc and are used with permission The MathWorks does not warrant the accuracy of the text or exercises in this book This book’s use or discussion of MATLAB®and Simulink®software or related products does not constitute endorsement or sponsorship by The MathWorks of a particular pedagogical approach or particular use of the MATLAB®and Simulink®software.
Library of Congress Cataloging-in-Publication Data
Palm, William J (William John), System dynamics / William J Palm III – 2nd ed.
2008045193
www.mhhe.com
iv
Trang 6To my wife, Mary Louise; and to my children, Aileene, Bill, and Andrew.
v
Trang 71.3 Developing Linear Models 9
1.4 Function Identification and Parameter
Estimation 15
1.5 Fitting Models to Scattered Data 23
2.2 Rotation About a Fixed Axis 48
2.3 Equivalent Mass and Inertia 55
2.4 General Planar Motion 61
3.2 Response Types and Stability 92
3.3 The Laplace Transform Method 101
4.5 Additional Modeling Examples 193
4.6 Collisions and Impulse Response 205
5.2 State-Variable Methods with MATLAB 236
5.4 Simulink and Linear Models 249
5.5 Simulink and Nonlinear Models 255
Trang 8Fluid and Thermal Systems 339
Part I Fluid Systems 340
8.4 Filtering Properties of Dynamic
9.1 Response of First-Order Systems 482
9.2 Response of Second-Order Systems 490
9.3 Description and Specification of Step
9.4 Parameter Estimation in the Time Domain 507
9.5 Introduction to Block Diagrams 516
9.6 Modeling Systems with Block Diagrams 523
10.2 Control System Terminology 550
10.3 Modeling Control Systems 551
10.4 The PID Control Algorithm 565
10.5 Control System Analysis 572
10.6 Controlling First-Order Plants 577
10.7 Controlling Second-Order Plants 587
11.1 Root Locus Plots 633
11.2 Design Using the Root Locus Plot 638
11.3 State-Variable Feedback 665
11.4 Tuning Controllers 674
11.5 Saturation and Reset Windup 680
Trang 913.4 Modes of Vibrating Systems 783
13.5 Active Vibration Control 792
Index 827
Trang 10P R E F A C E
System dynamics deals with mathematical modeling and analysis of devices and
processes for the purpose of understanding their time-dependent behavior Whileother subjects, such as Newtonian dynamics and electrical circuit theory, alsodeal with time-dependent behavior, system dynamics emphasizes methods for han-
dling applications containing multiple types of components and processes such as
electromechanical devices, electrohydraulic devices, and fluid-thermal processes
Be-cause the goal of system dynamics is to understand the time-dependent behavior of a
system of interconnected devices and processes as a whole, the modeling and analysis
methods used in system dynamics must be properly selected to reveal how the
con-nections between the system elements affect its overall behavior Because systems of
interconnected elements often require a control system to work properly, control system
design is a major application area in system dynamics
TEXT PHILOSOPHY
This text is an introduction to system dynamics and is suitable for such courses
com-monly found in engineering curricula It is assumed that the student has a background in
elementary differential and integral calculus and college physics (dynamics, mechanics
of materials, thermodynamics, and electrical circuits) A previous course in
differen-tial equations is desirable but not necessary, as the required material on differendifferen-tial
equations, as well as Laplace transforms and matrices, is developed in the text
The decision to write a textbook often comes from the author’s desire to improve
on available texts The decisions as to what topics to include and what approach to take
emerge from the author’s teaching experiences that give insight as to what is needed
for students to master the subject This text is based on the author’s thirty-seven years
of experience in teaching system dynamics
This experience shows that typical students in a system dynamics course are not yetcomfortable with applying the relevant concepts from earlier courses in dynamics and
differential equations Therefore, this text reviews and reinforces these important topics
early on Students often lack sufficient physical insight to relate the mathematical results
to applications The text therefore uses everyday illustrations of system dynamics to
help students to understand the material and its relevance
If laboratory sessions accompany the system dynamics course, many of the text’sexamples can be used as the basis for experiments The text is also a suitable reference
on hardware and on parameter estimation methods
MATLAB ® AND SIMULINK ®1
MATLAB and Simulink are used to illustrate how modern computer tools can be
applied in system dynamics.2 MATLAB was chosen because it is the most widely
used program in system dynamics courses and by practitioners in the field Simulink,
1 MATLAB and Simulink are registered trademarks of The MathWorks, Inc.
2 The programs in this text will work with the following software versions, or higher versions: Version 6 of
MATLAB, Version 5 of Simulink, and Version 5 of the Control Systems Toolbox.
ix
Trang 11which is based on MATLAB and uses a diagram-based interface, is increasing inpopularity because of its power and ease of use In fact, students convinced the author
to use Simulink after they discovered it on their own and learned how easy it is to use!
It provides a useful and motivational tool
It is, however, not necessary to cover MATLAB or Simulink in order to use thetext, and it is shown how to do this later in the Preface
CORE MATERIAL FOR SYSTEM DYNAMICS
This text has been designed to accommodate a variety of courses in system dynamics.The core material is in Chapters 1 through 6 and Chapters 8 and 9
Chapter 1 introduces the basic terminology of system dynamics, covers commonlyused functions, and reviews the two systems of units used in the text: British Engineering(FPS) units and SI units These are the unit systems most commonly used in systemdynamics applications The examples and homework problems employ both sets ofunits so that the student will become comfortable with both Chapter 1 also introducesmethods for parameter estimation These methods are particularly useful for obtainingspring constants and damping coefficients The chapter then illustrates how MATLABcan be used for this purpose
Chapter 2 covers rigid-body dynamics, including planar motion Using the modelsdeveloped in Chapter 2, Chapter 3 reviews solution methods for linear ordinary differ-ential equations where either there is no forcing function (the homogeneous case) orwhere the forcing function is a constant The chapter then develops the Laplace trans-form method for solving differential equations and applies it to equations having step,ramp, sine, impulse, and other types of forcing functions It also introduces transferfunction models
Chapter 4 covers modeling of mechanical systems having stiffness and damping,and it applies the analytical methods developed in Chapter 3 to solve the models.Chapter 5 develops the state-variable model, which is useful for certain analyticaltechniques as well as for numerical solutions The optional sections of this chapterintroduce Simulink, which is based on diagram descriptions, and apply the chapter’sconcepts using MATLAB
Chapter 6 treats modeling of electric circuits, operational amplifiers, mechanical devices, sensors, and electroacoustic devices It also discusses how motorparameters can be obtained, and it shows how to analyze motor performance
electro-Chapters 8 and 9 cover analysis methods in the frequency domain and the timedomain, respectively Chapter 8 demonstrates the usefulness of the transfer functionfor understanding and analyzing a system’s frequency response It introduces Bodeplots and shows how they are sketched and interpreted to obtain information about timeconstants, resonant frequencies, and bandwidth
Chapter 9 integrates the modeling and analysis techniques of earlier chapters with
an emphasis on understanding system behavior in the time domain, using step, ramp,and impulse functions primarily The chapter covers step response specifications such asmaximum overshoot, peak time, delay time, rise time, and settling time Block diagrammodels are graphical representations of system structure Chapter 9 introduces thesemodels as preparation for Chapter 10, which deals with control systems
ALTERNATIVE COURSES IN SYSTEM DYNAMICS
The choice of remaining topics depends partly on the desired course emphasis andpartly on whether the course is a quarter or semester course
Trang 12Preface xi
Some courses omit fluid and thermal systems, which are covered in Chapter 7
This chapter can be skipped if necessary because only some examples in the remaining
chapters, and not the theory and methods, depend on it Part I of the chapter covers
fluid systems Part II covers thermal systems These two parts are independent of each
other A background in fluid mechanics or heat transfer is not required to understand
this chapter, but students should have had elementary thermodynamics before covering
the material on pneumatic systems in Section 7.5
Chapters 10, 11, and 12 deal with a major application of system dynamics, namely,control systems Chapter 10 is an introduction to feedback control systems, including
the PID control algorithm applied to first- and second-order plants Chapter 11 deals
with control systems in more depth and includes design methods based on the root locus
plot and practical topics such as compensation, controller tuning, actuator saturation,
reset wind-up, and state-variable feedback, with emphasis on motion control systems
Chapter 12 covers series compensation methods and design with the Bode plot
Chapter 13 covers another major application area, vibrations Important practicalapplications covered are vibration isolators, vibration absorbers, modes, and suspension
system design
At the author’s institution, the system dynamics course is a junior course requiredfor mechanical engineering majors It covers Chapters 1 through 10, with some optional
sections omitted This optional material is then covered in a senior elective course in
control systems, which also covers Chapters 11 and 12
GLOSSARY AND APPENDICES
There is a glossary containing the definitions of important terms, four appendices, and
an index Appendices C and D are on the text website
Appendix A is a collection of tables of MATLAB commands and functions, nized by category The purpose of each command and function is briefly described in
orga-the tables
Appendix B is a brief summary of the Fourier series, which is used to represent aperiodic function as a series consisting of a constant plus a sum of sine terms and cosine
terms It provides the background for some applications of the material in Chapter 8
Appendix C is a self-contained introduction to MATLAB, and it should be read first
by anyone unfamiliar with MATLAB if they intend to cover the MATLAB and Simulink
sections It also provides a useful review for those students having prior experience with
MATLAB
Appendix D covers basic numerical methods, such as the Runge-Kutta algorithms,that form the basis for the differential equation solvers of MATLAB It is not neces-
sary to master this material to use the MATLAB solvers, but the appendix provides a
background for the interested reader
4. MATLAB sections (in most chapters)
5. Simulink section (in most chapters)
Trang 136. Chapter review
7. References
8. ProblemsThis structure has been designed partly to accommodate those courses that donot cover MATLAB and/or Simulink, by placing the optional MATLAB and Simulinkmaterial at the end of the chapter Note that coverage of Simulink requires that the chap-ter’s MATLAB sections also be covered Because the chapter problems are arrangedaccording to the chapter section whose concepts they illustrate, all problems requiringMATLAB and/or Simulink have been placed in separate, identifiable groups
OPTIONAL TOPICS
In addition to the optional chapters (7, 10, 11, 12, and 13), some chapters have sectionsdealing with material other than MATLAB and Simulink that can be omitted withoutaffecting understanding of the core material in subsequent chapters All such optionalmaterial has been placed in sections near the end of the chapter This optional materialincludes:
1. Function discovery, parameter estimation, and system identification techniques(Sections 1.4, 1.5, 8.5, and 9.4)
2. General theory of partial fraction expansion (Section 3.5)
3. Impulse response (Sections 3.6 and 4.6)
4. Motor performance (Section 6.5)
5. Sensors and electroacoustic devices (Section 6.6)
DISTINGUISHING FEATURES
The following are considered to be the major distinguishing features of the text
1 MATLAB. Stand-alone sections in most chapters provide concise summariesand illustrations of MATLAB features relevant to the chapter’s topics
2 Simulink. Stand-alone sections in chapters 5 through 12 provide extensiveSimulink coverage not found in most system dynamics texts
3 Parameter estimation. Coverage of function discovery, parameter estimation,and system identification techniques is given in Sections 1.4, 1.5, 8.5, and 9.4.Students are uneasy when they are given parameter values such as spring stiffnessand damping coefficients in examples and homework problems, because theywant to know how they will obtain such values in practice These sections showhow this is done
4 Motor performance evaluation. Section 6.5 discusses the effect of motordynamics on practical considerations for motor and amplifier applications, such
as motion profiles and the required peak and rated continuous current and torque,and maximum required voltage and motor speed These considerations offerexcellent examples of practical applications of system dynamics, but are notdiscussed in most system dynamics texts
5 System dynamics in everyday life. Commonly found illustrations of systemdynamics are important for helping students to understand the material and itsrelevance This text provides examples drawn from objects encountered ineveryday life These examples include a storm door closer, fluid flow from a
Trang 14Preface xiii
bottle, shock absorbers and suspension springs, motors, systems with gearing,chain drives, belt drives, a backhoe, a water tower, and cooling of liquid in a cup
6 Theme applications. Two common applications provide themes for examples
and problems throughout the text These are motion control systems such as aconveyor system and a robot arm, and vehicle suspension systems
WEBSITE
The publisher maintains a website for this text at www.mhhe.com/palm An on-line
instructors manual is available at this site It contains solutions to the problems and
other pedagogical aids, and is accessible to instructors who have adopted the text for
their course The site is also home to the text Appendices C & D
ELECTRONIC TEXTBOOK OPTION
This text is offered through CourseSmart for both instructors and students CourseSmart
is an online resource where students can purchase access to this and other McGraw-Hill
textbooks in a digital format Through their browsers, students can access the complete
text online for almost half the cost of a traditional text Purchasing the eTextbook also
allows students to take advantage of CourseSmart’s web tools for learning, which
in-clude full text search, notes and highlighting, and email tools for sharing notes between
classmates To learn more about CourseSmart options, contact your sales representative
or visit www.CourseSmart.com
ACKNOWLEDGMENTS
I want to acknowledge and thank the many individuals who contributed to this effort At
McGraw-Hill, my thanks go to Tom Casson, who initiated the project, and to Jonathan
Plant, Betsy Jones, Debra Matteson, and Lisa Kalner Williams for persevering on the
“long and winding road”! Bill Stenquist and Lora Neyens deserve credit for the initiation
and production of the second edition
The help and expertise of the following reviewers, and several anonymous ers, are gratefully acknowledged
review-William Durfee, University of Minnesota Lawrence Eisenberg, University of Pennsylvania Dale McDonald, Midwestern State University Peter Meckl, Purdue University
Thomas Royston, University of Illinois at Chicago Ting-Wen Wu, University of Kentucky
The University of Rhode Island provided an atmosphere that encourages teachingexcellence, course development, and writing, and for that I am grateful
Finally, I thank my wife, Mary Louise, and my children, Aileene, Bill, and Andrew,for their support, patience, and understanding
William J Palm III
Kingston, Rhode IslandAugust 2008
Trang 15A B O U T T H E A U T H O R
at the University of Rhode Island In 1966 he received a B.S from Loyola College inBaltimore, and in 1971 a Ph.D in Mechanical Engineering and Astronautical Sciencesfrom Northwestern University in Evanston, Illinois
During his thirty-seven years as a faculty member, he has taught nineteen courses.One of these is a junior system dynamics course, which he developed He hasauthored nine textbooks dealing with modeling and simulation, system dynamics, con-
trol systems, vibrations, and MATLAB These include Introduction to MATLAB 7 for Engineers (McGraw-Hill, 2005) and A Concise Introduction to MATLAB (McGraw- Hill, 2008) He wrote a chapter on control systems in the Mechanical Engineers’ Handbook third edition, (M Kutz, ed., Wiley, 2006), and was a special contributor
to the fifth editions of Statics and Dynamics, both by J L Meriam and L G Kraige
(Wiley, 2002)
Professor Palm’s research and industrial experience are in control systems, robotics,vibrations, and system modeling He was the Director of the Robotics Research Center
at the University of Rhode Island from 1985 to 1993, and is the co-holder of a patent for
a robot hand He served as Acting Department Chair from 2002 to 2003 His industrialexperience is in automated manufacturing; modeling and simulation of naval systems,including underwater vehicles and tracking systems; and design of control systems forunderwater vehicle engine test facilities
xiv
Trang 161.3 Developing Linear Models 9
1.4 Function Identification and
Parameter Estimation 15
1.5 Fitting Models to Scattered Data 23
1.6 MATLAB®1and the Least-Squares Method 29
1.7 Chapter Review 37
Problems 37
CHAPTER OBJECTIVES
When you have finished this chapter, you should be able to
1. Define the basic terminology of system dynamics
2. Apply the basic steps used for engineering problemsolving
3. Apply the necessary steps for developing acomputer solution
4. Use units in both the FPS and the SI systems
5. Develop linear models from given algebraicexpressions
6. Identify the algebraic form and obtain thecoefficient values of a model, given a set of data
7. Apply MATLAB to the methods of this chapter
This chapter introduces the basic terminology of system dynamics, which includes
the notions of system, static and dynamic elements, input, and output Because
we will use both the foot-pound-second (FPS) and the metric (SI) systems ofunits, the chapter introduces these two systems Developing mathematical models ofinput-output relations is essential to the applications of system dynamics Therefore, webegin our study by introducing some basic methods for developing algebraic models
of static elements We show how to use the methods of function identification andparameter estimation to develop models from data, and how to fit models to scattereddata by using the least-squares method We then show how to apply MATLAB for thispurpose
1 MATLAB is a registered trademark of The MathWorks, Inc.
1
Trang 17Although Sections 1.4, 1.5, and 1.6 provide the foundation for understanding how
to develop models of static elements, coverage of these sections is not required tounderstand the methods of the remaining chapters, because the appropriate models will
be supplied in the examples and chapter problems and thus need not be derived ■
1.1 INTRODUCTION TO SYSTEM DYNAMICS
This text is an introduction to system dynamics We presume that the reader has somebackground in calculus (specifically, differentiation and integration of functions of
a single variable) and in physics (specifically, free body diagrams, Newton’s laws
of motion for a particle, and elementary dc electricity) In this section we establishsome basic terminology and discuss the meaning of the topic “system dynamics,” itsmethodology, and its applications
SYSTEMS
The meaning of the term system has become somewhat vague because of overuse The
original meaning of the term is a combination of elements intended to act together toaccomplish an objective For example, a link in a bicycle chain is usually not considered
to be a system However, when it is used with other links to form a chain, it becomespart of a system The objective for the chain is to transmit force When the chain iscombined with gears, wheels, crank, handlebars, and other elements, it becomes part
of a larger system whose purpose is to transport a person
The system designer must focus on how all the elements act together to achievethe system’s intended purpose, keeping in mind other important factors such as safety,cost, and so forth Thus, the system designer often cannot afford to spend time on thedetails of designing the system elements For example, our bicycle designer might nothave time to study the metallurgy involved with link design; that is the role of thechain designer All the systems designer needs to know about the chain is its strength,its weight, and its cost, because these are the factors that influence its role in thesystem
With this “systems point of view,” we focus on how connections between theelements influence the overall behavior of the system This means that sometimes wemust accept a less-detailed description of the operation of the individual elements toachieve an overall understanding of the system’s performance
INPUT AND OUTPUT
Like the term “system,” the meanings of input and output have become less precise.
Nowadays, for example, a factory manager will call a meeting to seek “input,” meaningopinions or data, from the employees, and the manager may refer to the productsmanufactured in the factory as its “output.” However, in the system dynamics meaning
of the terms, an input is a cause; an output is an effect due to the input Thus, one input
to the bicycle is the force applied to the pedal One resulting output is the acceleration
of the bike Another input is the angle of the front wheel; the output is the direction ofthe bike’s path of travel
The behavior of a system element is specified by its input-output relation, which
is a description of how the output is affected by the input The input-output relationexpresses the cause-and-effect behavior of the element Such a description, which isrepresented graphically by the diagram in Figure 1.1.1, can be in the form of a table
of numbers, a graph, or a mathematical relation For example, a force f applied to a
Trang 181 1 Introduction to System Dynamics 3
System
Boundary
Figure 1.1.1 A system
input-output diagram, showing the system boundary.
particle of mass m causes an acceleration a of the particle The input-output or causal
relation is, from Newton’s second law, a = f/m The input is f and the output is a.
The input-output relations for the elements in the system provide a means of fying the connections between the elements When connected together to form a system,
speci-the inputs to some elements will be speci-the outputs from ospeci-ther elements
The inputs and outputs of a system are determined by the selection of the system’sboundary (see Figure 1.1.1) Any causes acting on the system from the world external
to this boundary are considered to be system inputs Similarly, a system’s outputs
are the outputs from any one or more of the system elements that act on the world
outside the system boundary If we take the bike to be the system, one system input
would be the pedal force; another input is the force of gravity acting on the bike The
outputs may be taken to be the bike’s position, velocity, and acceleration Usually, our
choices for system outputs are a subset of the possible outputs and are the variables
in which we are interested For example, a performance analysis of the bike would
normally focus on the acceleration or velocity, but not on the bike’s position
Sometimes input-output relations are reversible, sometimes not For example, wecan apply a current as input to a resistor and consider the resulting voltage drop to be the
output (v = i R) Or we can apply a voltage to produce a current through the resistor
(i = v/R) However, acceleration is the cause of a change in velocity, but not vice
versa If we integrate acceleration a over time, we obtain velocity v; that is v = a dt
Whenever an output of an element is the time integral of the input and the direction
of the cause-effect relation is not reversible, we say that the element exhibits integral
causality We will see that integral causality constitutes a basic form of causality for
all physical systems
Similar statements can be made about the relation between velocity and
displace-ment Integration of velocity produces displacement x: x =v dt Velocity is the cause
of displacement, but not vice versa
Note that the mathematical relations describing integral causality can be reversed;
for example, we may write a = dv/dt, but this does not mean that the cause-and-effect
relation can be reversed
STATIC AND DYNAMIC ELEMENTS
When the present value of an element’s output depends only on the present value of its
input, we say the element is a static element For example, the current flowing through
a resistor depends only on the present value of the applied voltage The resistor is thus
a static element However, because no physical element can respond instantaneously,
the concept of a static element is an approximation It is widely used, however, because
it results in a simpler mathematical representation; that is, an algebraic representation
rather than one involving differential equations
If an element’s present output depends on past inputs, we say it is a dynamic
element For example, the present position of a bike depends on what its velocity has
been from the start
Trang 19In popular usage, the terms static and dynamic distinguish situations in which nochange occurs from those that are subject to changes over time This usage conforms
to the preceding definitions of these terms if the proper interpretation is made A staticelement’s output can change with time only if the input changes and will not change
if the input is constant or absent However, if the input is constant or removed from
a dynamic element, its output can still change For example, if we stop pedaling, thebike’s displacement will continue to change because of its momentum, which is due topast inputs
A dynamic system is one whose present output depends on past inputs A static
system is one whose output at any given time depends only on the input at that time A
static system contains all static elements Any system that contains at least one dynamic
element must be a dynamic system System dynamics, then, is the study of systems that
contain dynamic elements
MODELING OF SYSTEMS
Table 1.1.1 contains a summary of the methodology that has been tried and tested bythe engineering profession for many years These steps describe a general problem-solving procedure Simplifying the problem sufficiently and applying the appropriate
fundamental principles is called modeling, and the resulting mathematical description
is called a mathematical model, or just a model When the modeling has been finished,
we need to solve the mathematical model to obtain the required answer If the model
is highly detailed, we may need to solve it with a computer program
The form of a mathematical model depends on its purpose For example, design
of electrical equipment requires more than a knowledge of electrical principles Anelectric circuit can be damaged if its mounting board experiences vibration In thiscase, its force-deflection properties must be modeled In addition, resistors generateheat, and a thermal model is required to describe this process Thus, we see that devices
Table 1.1.1 Steps in engineering problem solving.
you make.
proceeding with the details.
problem Checking the dimensions and units, and printing the results of intermediate steps in the calculation sequence can uncover mistakes.
expected result and compare it with your answer Do not state the answer with greater precision than is justified by any of the following:
Interpret the mathematics If the mathematics produces multiple answers, do not discard some
of them without considering what they mean The mathematics might be trying to tell you something, and you might miss an opportunity to discover more about the problem.
Trang 201 1 Introduction to System Dynamics 5
can have many facets: thermal, mechanical, electrical, and so forth No mathematical
model can deal with all these facets Even if it could, it would be too complex, and thus
too cumbersome, to be useful
For example, a map is a model of a geographic region But if a single map containsall information pertaining to the roads, terrain elevation, geology, population density,
and so on, it would be too cluttered to be useful Instead, we select the particular type
of map required for the purpose at hand In the same way, we select or construct a
mathematical model to suit the requirements of a particular study
The examples in this text follow the steps in Table 1.1.1, although for compactnessthe steps are usually not numbered In each example, following the example’s title,
there is a problem statement that summarizes the results of steps 1 through 5 Steps 6
through 10 are described in the solution part of the example To save space, some steps,
such as checking dimensions and units, are not always explicitly displayed However,
you are encouraged to perform these steps on your own
CONTROL SYSTEMS
Often dynamic systems require a control system to perform properly Thus, proper
control system design is one of the most important objectives of system dynamics
Microprocessors have greatly expanded the applications for control systems These
new applications include robotics, mechatronics, micromachines, precision
engineer-ing, active vibration control, active noise cancellation, and adaptive optics Recent
technological advancements mean that many machines now operate at high speeds and
high accelerations It is therefore now more often necessary for engineers to pay more
attention to the principles of system dynamics
THEME APPLICATIONS
Two common applications of system dynamics are in (1) motion control systems and
(2) vehicle dynamics Therefore we will use these applications as major themes in many
of our examples and problems
Figure 1.1.2 shows a robot arm, whose motion must be properly controlled to move
an object to a desired position and orientation To do this, each of the several motors
and drive trains in the arm must be adequately designed to handle the load, and the
motor speeds and angular positions must be properly controlled Figure 1.1.3 shows
a typical motor and drive train for one arm joint Knowledge of system dynamics is
essential to design these subsystems and to control them properly
Mobile robots are another motion control application, but motion control tions are not limited to robots Figure 1.1.4 shows the mechanical drive for a conveyor
applica-system The motor, the gears in the speed reducer, the chain, the sprockets, and the
drive wheels all must be properly selected, and the motor must be properly controlled
for the system to work well In subsequent chapters we will develop models of these
components and use them to design the system and analyze its performance
Our second major theme application is vehicle dynamics This topic has receivedrenewed importance for reasons related to safety, energy efficiency, and passenger
comfort Of major interest under this topic is the design of vehicle suspension systems,
whose elements include various types of springs and shock absorbers (Figure 1.1.5)
Active suspension systems, whose characteristics can be changed under computer
con-trol, and vehicle-dynamics control systems are undergoing rapid development, and their
design requires an understanding of system dynamics
Trang 21Figure 1.1.2 A robot arm.
Elbow rotation
Shoulder
rotation
Waist rotation
Three wrist rotations
Figure 1.1.3 Mechanical drive for a robot
Reducer Motor
Drive wheels
Drive chains Load
1 Simulink is a registered trademark of The MathWorks, Inc.
Trang 221 2 Units 7
Table 1.1.2 Steps for developing a computer solution.
if necessary.
reasonable data values, and perform a reality check on the results Document the program with comment statements, flow charts, pseudo-code, or whatever else is appropriate.
we will introduce the necessary methods as we need them For the convenience of those
who prefer to use a software package other than MATLAB or Simulink, we have placed
all the MATLAB and Simulink material in optional sections at the end of each chapter
They can be skipped without affecting your understanding of the following chapters
If you use a program, such as MATLAB, to solve a problem, follow the steps shown in
Table 1.1.2
1.2 UNITS
In this book we use two systems of units, the FPS system and the metric SI The common
system of units in business and industry in English-speaking countries has been the
foot-pound-second (FPS) system This system is also known as the U.S customary system or
the British Engineering system Much engineering work in the United States has been
based on the FPS system, and some industries continue to use it The metric Syst`eme
International d’Unit´es (SI) nevertheless is becoming the worldwide standard Until the
changeover is complete, engineers in the United States will have to be familiar with
both systems
In our examples, we will use SI and FPS units in the hope that the student willbecome comfortable with both Other systems are in use, such as the meter-kilogram-
second (mks) and centimeter-gram-second (cgs) metric systems and the British system,
in which the mass unit is a pound We will not use these, because FPS and SI units are
the most common in engineering applications We now briefly summarize these two
systems
FPS UNITS
The FPS system is a gravitational system This means that the primary variable is force,
and the unit of mass is derived from Newton’s second law The pound is selected as the
unit of force and the foot and second as units of length and time, respectively From
Newton’s second law of motion, force equals mass times acceleration, or
where f is the net force acting on the mass m and producing an acceleration a Thus,
the unit of mass must be
Trang 23Table 1.2.1 SI and FPS units.
Unit name and abbreviation
horsepower (hp)
Table 1.2.2 Unit conversion factors.
Energy has the dimensions of mechanical work; namely, force times displacement
Therefore, the unit of energy in this system is the foot-pound (ft-lb) Another energy unit
in common use for historical reasons is the British thermal unit (Btu) The relationship
between the two is given in Table 1.2.1 Power is the rate of change of energy with time,
and a common unit is horsepower Finally, temperature in the FPS system can be expressed in degrees Fahrenheit or in absolute units, degrees Rankine.
SI UNITS
The SI metric system is an absolute system, which means that the mass is chosen as the primary variable, and the force unit is derived from Newton’s law The meter and the
second are selected as the length and time units, and the kilogram is chosen as the mass
unit The derived force unit is called the newton In SI units the common energy unit
is the newton-meter, also called the joule, while the power unit is the joule/second, or
watt Temperatures are measured in degrees Celsius,◦C, and in absolute units, which
are degrees Kelvin, K The difference between the boiling and freezing temperatures of
water is 100◦C, with 0◦C being the freezing point
At the surface of the earth, the standard value of g in SI units is g = 9.81 m/s2.Table 1.2.2 gives the most commonly needed factors for converting between theFPS and the SI systems
Trang 241 3 Developing Linear Models 9
OSCILLATION UNITS
There are three commonly used units for frequency of oscillation If time is measured
in seconds, frequency can be specified as radians /second or as hertz, abbreviated Hz.
One hertz is one cycle per second (cps) The relation between cycles per second f and
radians per second ω is 2π f = ω For sinusoidal oscillation, the period P, which is
the time between peaks, is related to frequency by P = 1/f = 2π/ω The third way of
specifying frequency is revolutions per minute (rpm) Because there are 2π radians per
revolution, one rpm = (2π/60) radians per second.
1.3 DEVELOPING LINEAR MODELS
A linear model of a static system element has the form y = mx + b, where x is the
input and y is the output of the element As we will see in Chapter 3, solution of
dy-namic models to predict system performance requires solution of differential equations
Differential equations based on linear models of the system elements are easier to solve
than ones based on nonlinear models Therefore, when developing models we try to
ob-tain a linear model whenever possible Sometimes the use of a linear model results in a
loss of accuracy, and the engineer must weigh this disadvantage with advantages gained
by using a linear model In this section, we illustrate some ways to obtain linear models
DEVELOPING LINEAR MODELS FROM DATA
If we are given data on the input-output characteristics of a system element, we can
first plot the data to see whether a linear model is appropriate, and if so, we can
extract a suitable model Example 1.3.1 illustrates a common engineering problem—
the estimation of the force-deflection characteristics of a cantilever support beam
The deflection of a cantilever beam is the distance its end moves in response to a force applied
at the end (Figure 1.3.1) The following table gives the measured deflection x that was produced
in a particular beam by the given applied force f Plot the data to see whether a linear relation
exists between f and x.
Trang 25Figure 1.3.2 Plot of beam
deflection versus applied force.
800
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8
The plot is shown in Figure 1.3.2 Common sense tells us that there must be zero beam deflection
if there is no applied force, so the curve describing the data must pass through the origin Thestraight line shown was drawn by aligning a straightedge so that it passes through the originand near most of the data points (note that this line is subjective; another person might draw a
different line) The data lies close to a straight line, so we can use the linear function x = a f to describe the relation The value of the constant a can be determined from the slope of the line,
Once we have discovered a functional relation that describes the data, we can use
it to make predictions for conditions that lie within the range of the original data This process is called interpolation For example, we can use the beam model to estimate the
deflection when the applied force is 550 lb We can be fairly confident of this predictionbecause we have data below and above 550 lb and we have seen that our model describesthis data very well
Extrapolation is the process of using the model to make predictions for
condi-tions that lie outside the original data range Extrapolation might be used in the beam
application to predict how much force would be required to bend the beam 1.2 in.
We must be careful when using extrapolation, because we usually have no reason tobelieve that the mathematical model is valid beyond the range of the original data Forexample, if we continue to bend the beam, eventually the force is no longer proportional
to the deflection, and it becomes much greater than that predicted by the linear model.Extrapolation has a use in making tentative predictions, which must be backed up later
on by testing
Trang 261 3 Developing Linear Models 11
In some applications, the data contains so much scatter that it is difficult to identify
an appropriate straight line In such cases, we must resort to a more systematic and
objective way of obtaining a model This topic will be treated in Section 1.5
LINEARIZATION
Not all element descriptions are in the form of data Often we know the analytical form of
the model, and if the model is nonlinear, we can obtain a linear model that is an accurate
approximation over a limited range of the independent variable Examples 1.3.2 and
1.3.3 illustrate this technique, which is called linearization.
We will see in Chapter 2 that the models of many mechanical systems involve the sine function
sinθ, which is nonlinear Obtain three linear approximations of f (θ) = sin θ, one valid near
θ = 0, one near θ = π/3 rad (60◦), and one nearθ = 2π/3 rad (120◦).
The essence of the linearization technique is to replace the plot of the nonlinear function with
a straight line that passes through the reference point and has the same slope as the nonlinear
function at that point Figure 1.3.3 shows the sine function and the three straight lines obtained
with this technique Note that the slope of the sine function is its derivative, d sin θ/dθ = cos θ,
and thus the slope is not constant but varies withθ.
Consider the first reference point, θ = 0 At this point the sine function has the value
sin 0= 0, the slope is cos 0 = 1, and thus the straight line passing through this point with
a slope of 1 is f (θ) = θ This is the linear approximation of f (θ) = sin θ valid near θ = 0,
line A in Figure 1.3.3 Thus we have derived the commonly seen small-angle approximation
sinθ ≈ θ.
0 0.2 0.4 0.6 0.8 1 1.2 1.4
Figure 1.3.3 Three linearized
models of the sine function.
Trang 27Next consider the second reference point,θ = π/3 rad At this point the sine function has
the value sinπ/3 = 0.866, the slope is cos π/3 = 0.5, and thus the straight line passing through this point with a slope of 0.5 is f (θ) = 0.5(θ − π/3) + 0.866, line B in Figure 1.3.3 This is the linear approximation of f (θ) = sin θ valid near θ = π/3.
Now consider the third reference point,θ = 2π/3 rad At this point the sine function has the
value sin 2π/3 = 0.866, the slope is cos 2π/3 = −0.5, and thus the straight line passing through
this point with a slope of−0.5 is f (θ) = −0.5(θ − 2π/3) + 0.866, line C in Figure 1.3.3 This
is the linear approximation of f (θ) = sin θ valid near θ = 2π/3.
In Example 1.3.2 we used a graphical approach to develop the linear approximation.The linear approximation can also be developed with an analytical approach based on
the Taylor series The Taylor series represents a function f (θ) in the vicinity of θ = θ r
Consider the nonlinear function f (θ), which is sketched in Figure 1.3.4 Let
[θ r , f (θ r )] denote the reference operating condition of the system A model that is
linear can be obtained by expanding f (θ) in a Taylor series near this point and
trun-cating the series beyond the first-order term If θ is “close enough” to θ r, the termsinvolving(θ − θ r ) i for i≥ 2 are small compared to the first two terms in the series Theresult is
fr )
y = mx
x y
f)
Trang 281 3 Developing Linear Models 13
where the subscript r on the derivative means that it is evaluated at the reference point.
This is a linear relation To put it into a simpler form let m denote the slope at the
The geometric interpretation of this result is shown in Figure 1.3.4 We have replaced
the original function f (θ) with a straight line passing through the point [θ r , f (θ r )]
and having a slope equal to the slope of f (θ) at the reference point Using the (y, x)
coordinates gives a zero intercept, and simplifies the relation
This equation gives the straight line shown in Figure 1.3.5
Sometimes we need a linear model that is valid over so wide a range of the pendent variable that a model obtained from the Taylor series is inaccurate or grossly
inde-incorrect In such cases, we must settle for a linear function that gives a conservative
estimate
Trang 29The drag force on an object moving through a liquid or a gas is a function of the velocity A
commonly used model of the drag force D on an object is
whereρ is the mass density of the fluid, A is the object’s cross-sectional area normal to the relative
flow,v is the object’s velocity relative to the fluid, and C D is the drag coefficient, which is usually
determined from wind-tunnel or water-channel tests on models Curve A in Figure 1.3.6 is a plot
of this equation for an Aerobee rocket 1.25 ft in diameter, with C D = 0.4, moving through the
lower atmosphere whereρ = 0.0023 slug/ft3, for which equation (1) becomes
a Obtain a linear approximation to this drag function valid nearv = 600 ft/sec.
b Obtain a linear approximation that gives a conservative (high) estimate of the drag force
as a function of the velocity over the range 0≤ v ≤ 1000 ft/sec.
This straight line is labeled B in Figure 1.3.6 Note that it predicts that the drag force will
be negative when the velocity is less than 300 ft /sec, a result that is obviously incorrect.This illustrates how we must be careful when using linear approximations
b The linear model that gives a conservative estimate of the drag force (that is, an estimatethat is never less than the actual drag force) is the straight-line model that passes throughthe origin and the point atv = 1000 This is the equation D = 0.56v, shown by the
straight line C in Figure 1.3.6
Trang 301 4 Function Identification and Parameter Estimation 15
0 100 200 300 400 500 600
Velocity (ft/sec)
A
B C
Figure 1.3.6 Models of fluid
drag.
1.4 FUNCTION IDENTIFICATION AND
PARAMETER ESTIMATION
Function identification, or function discovery, is the process of identifying or
discov-ering a function that can describe a particular set of data The term curve fitting is also
used to describe the process of finding a curve, and the function generating the curve,
to describe a given set of data Parameter estimation is the process of obtaining values
for the parameters, or coefficients, in the function that describes the data
The following three function types can often describe physical phenomena
1. The linear function y (x) = mx + b Note that y(0) = b.
2. The power function y (x) = bx m Note that y (0) = 0 if m ≥ 0, and y(0) = ∞ if
m < 0.
3. The exponential function y (x) = b(10) mx or its equivalent form y = be mx, where
e is the base of the natural logarithm (ln e = 1) Note that y(0) = b for both
forms
For example, the linear function describes the voltage-current relation for a resistor(v = i R) and the velocity versus time relation for an object with constant acceleration
a ( v = at + v0) The distance d traveled by a falling object versus time is described by
a power function (d = 0.5gt2) The temperature changeT of a cooling object can be
described by an exponential function (T = T0e −ct)
Each function gives a straight line when plotted using a specific set of axes:
1. The linear function y = mx + b gives a straight line when plotted on rectilinear
axes Its slope is m and its y intercept is b.
2. The power function y = bx mgives a straight line when plotted on log-log axes
3. The exponential function y = b(10) mx and its equivalent form, y = be mx , give a
straight line when plotted on semilog axes with a logarithmic y axis.
Trang 31Figure 1.4.1 The power
exponential function
rectilinear, semi-log, and
log-log axes, respectively.
0 5 10 15 20
x
Exponential Power
These properties of the power and exponential functions are illustrated in Figure 1.4.1,
which shows the power function y = 2x −0.5 and the exponential function y = 10(10 −x ).
When we need to identify a function that describes a given set of data, we look for
a set of axes (rectilinear, semi-log, or log-log) on which the data forms a straight line,because a straight line is the one most easily recognized by eye, and therefore we caneasily tell if the function will fit the data well
Using the following properties of base-ten logarithms, which are shared with naturallogarithms, we have:
log(ab) = log a + log b
log(a m ) = m log a
Take the logarithm of both sides of the power equation y = bx mto obtain
log y = log (bx m ) = log b + m log x
This has the form Y = B + m X if we let Y = log y, X = log x, and B = log b Thus if
we plot Y versus X on rectilinear scales, we will obtain a straight line whose slope is m and whose intercept is B This is the same as plotting log y versus log x on rectilinear scales, so we will obtain a straight line whose slope is m and whose intercept is log b This process is equivalent to plotting y versus x on log-log axes Thus, if the data can be
described by the power function, it will form a straight line when plotted on log-log axes
Taking the logarithm of both sides of the exponential equation y = b(10) mx weobtain:
log y = log [b(10) mx]= log b + mx log 10 = log b + mx
because log 10= 1 This has the form Y = B + mx if we let Y = log y and B = log b Thus if we plot Y versus x on rectilinear scales, we will obtain a straight line whose slope is m and whose intercept is B This is the same as plotting log y versus x on rectilinear scales, so we will obtain a straight line whose slope is m and whose intercept
is log b This is equivalent to plotting y on a log axis and x on a rectilinear axis Thus, if
the data can be described by the exponential function, it will form a straight line whenplotted on semilog axes (with the log axis used for the ordinate)
Trang 321 4 Function Identification and Parameter Estimation 17
This property also holds for the other exponential form: y = be mx Taking thelogarithm of both sides gives
log y = log (be mx ) = log b + mx log e
This has the form
Y = B + Mx
if we let Y = log y, B = log b, and M = m log e Thus if we plot Y versus x on
rectilinear scales, we will obtain a straight line whose slope is M and whose intercept
is B This is the same as plotting log y versus x on rectilinear scales, so we will obtain
a straight line whose slope is m log e and whose intercept is log b This is equivalent to
plotting y on a log axis and x on a rectilinear axis Thus, equivalent exponential form
will also plot as a straight line on semilog axes
STEPS FOR FUNCTION IDENTIFICATION
Here is a summary of the procedure to find a function that describes a given set of data
We assume that the data can be described by one of the three function types given above
Fortunately, many applications generate data that can be described by these functions
The procedure is
1. Examine the data near the origin The exponential functions y = b(10) mx and
y = be mx can never pass through the origin (unless, of course b= 0, which is a
trivial case) See Figure 1.4.2 for examples with b = 1 The linear function y =
mx + b can pass through the origin only if b = 0 The power function y = bx m
can pass through the origin but only if m > 0 See Figure 1.4.3 for examples.
2. Plot the data using rectilinear scales If it forms a straight line, then it can be
represented by the linear function, and you are finished Otherwise, if you have
data at x = 0, then
a If y (0) = 0, try the power function, or
b If y (0) = 0, try the exponential function.
If data is not given for x = 0, proceed to step 3
0 0.5 1 1.5 2 2.5 3 3.5 4
Trang 33Figure 1.4.3 Examples of
power functions.
0 0.5 1 1.5 2 2.5 3 3.5 4
OBTAINING THE COEFFICIENTS
There are several ways to obtain the values of the coefficients b and m If the data lie
very close to a straight line, we can draw the line through the data using a straightedgeand then read two points from the line These points can be conveniently chosen tocoincide with gridlines to eliminate interpolation error Let these two points be denoted
(x1, y1) and (x2, y2).
For the linear function y = mx + b, the slope is given by
m = y2− y1
x2− x1
Once m is computed, b can be found by evaluating y = mx + b at a given point, say
the point(x1, y1) Thus b = y1− mx1
For the power function y = bx m, we can write the following equations for the twochosen points
Trang 341 4 Function Identification and Parameter Estimation 19
These can be solved for m as follows.
x2− x1
log y2
y1
Once m is computed, b can be found by evaluating y = b(10) mx at a given point, say
the point(x1, y1) Thus b = y110−mx1
A similar procedure can be used for the other exponential form, y = be mx Thesolutions are
If the data are scattered about a straight line to the extent that it is difficult to
identify a unique straight line that describes the data, we can use the least-squares
method to obtain the function This method finds the coefficients of a polynomial of
specified degree n that best fits the data, in the so-called “least-squares sense.” We
discuss this method in Section 1.5 The MATLAB implementation of this method uses
the polyfit function, which is discussed in Section 1.6
Examples 1.4.1 and 1.4.2 feature experiments that you can easily perform on yourown Engineers are often required to make predictions about the temperatures that will
occur in various industrial processes, for example Example 1.4.1 illustrates how we
can use function identification to predict the temperature dynamics of a cooling process
Water in a glass measuring cup was allowed to cool after being heated to 204◦F The ambient air
temperature was 70◦F The measured water temperature at various times is given in the following
Common sense tells us that the water temperature will eventually reach the air temperature of
70◦ Thus we first subtract 70◦from the temperature data T and seek to obtain a functional
description of the relative temperature,T = T − 70 A plot of the relative temperature data
is shown in Figure 1.4.4 We note that the plot has a distinct curvature and that it does not pass
through the origin Thus we can rule out the linear function and the power function as candidates
To see if the data can be described by an exponential function, we plot the data on a semilogplot, which is shown in Figure 1.4.5 The straight line shown can be drawn by aligning a straight-
edge so that it passes near most of the data points (note that this line is subjective; another person
might draw a different line) The data lie close to a straight line, so we can use the exponential
function to describe the relative temperature
Trang 35Figure 1.4.4 Plot of relative
temperature versus time.
50 60 70 80 90 100 110 120 130 140
Time (sec)
Figure 1.4.5 Semilog plot of
relative temperature versus
Using the second form of the exponential function, we can writeT = be mt Next we
select two points on the straight line to find the values of b and m The two points indicated by
an asterisk were selected to minimize interpolation error because they lie near grid lines Theaccuracy of the values read from the plot obviously depends on the size of the plot Two pointsread from the plot are(1090, 60) and (515, 90) Using the equations developed previously to compute b and m (with t replacing x and T replacing y), we have
Trang 361 4 Function Identification and Parameter Estimation 21
50 60 70 80 90 100 110 120 130 140
whereT and T are in ◦F and time t is in seconds The plot of T versus t is shown in
Figure 1.4.6 From this we can see that the function provides a reasonably good description of
the data In Section 1.5 we will discuss how to quantify the quality of this description
Engineers often need a model to calculate the flow rates of fluids under pressure
The coefficients of such models must often be determined from measurements
A hole 6 mm in diameter was made in a translucent milk container (Figure 1.4.7) A series of
marks 1 cm apart was made above the hole While adjusting the tap flow to keep the water height
constant, the time for the outflow to fill a 250-ml cup was measured (1 ml= 10−6m3) This was
repeated for several heights The data are given in the following table
Obtain a functional description of the volume outflow rate f as a function of water height h
above the hole
First obtain the flow rate data in ml/s by dividing the 250 ml volume by the time to fill:
t
Trang 37Figure 1.4.7 An experiment to determine
flow rate versus liquid height.
11
0 1 2 3 4 5 6 7 8 9 10
Figure 1.4.8 Plot of flow rate data.
0 5 10 15 20 25 30 35 40
Height (cm)
Figure 1.4.9 Log-log plot of
flow rate data.
A plot of the resulting flow rate data is shown in Figure 1.4.8 There is some curvature in the plot,
so we rule out the linear function Common sense tells us that the outflow rate will be zero whenthe height is zero, so we can rule out the exponential function because it cannot pass throughthe origin
The log-log plot shown in Figure 1.4.9 shows that the data lie close to a straight line, so wecan use the power function to describe the flow rate as a function of height Thus we can write
f = bh m
Trang 381 5 Fitting Models to Scattered Data 23
0 5 10 15 20 25 30 35 40
The straight line shown can be drawn by aligning a straightedge so that it passes near most of
the data points (note that this line is subjective; another person might draw a different line) Next
we select two points on the straight line to find the values of b and m The two points indicated
by an asterisk were selected to minimize interpolation error because they lie near grid lines
The accuracy of the values read from the plot obviously depends on the size of the plot The
values of the points as read from the plot are(1, 9.4) and (8, 30) Using the equations developed
previously to compute b and m (with h replacing x and f replacing y), we have
m = log(30/9.4)log(8/1) = 0.558
b = 9.4 (1 −0.558 ) = 9.4 Thus the estimated function is f = 9.4h0.558 , where f is the outflow rate in ml/s and the water
height h is in centimeters The plot of f versus h is shown in Figure 1.4.10 From this we can
see that the function provides a reasonably good description of the data In Section 1.5 we will
discuss how to quantify the quality of this description
1.5 FITTING MODELS TO SCATTERED DATA
In practice the data often will not lie very close to a straight line, and if we ask two
people to draw a straight line passing as close as possible to all the data points, we will
probably receive two different answers A systematic and objective way of obtaining a
straight line describing the data is the least-squares method Suppose we want to find
the coefficients of the straight line y = mx + b that best fits the following data.
According to the least-squares criterion, the line that gives the best fit is the one that
minimizes J , the sum of the squares of the vertical differences between the line and the
data points (see Figure 1.5.1) These differences are called the residuals Here there are
Trang 39If we evaluate this equation at the data values x = 0, 5, and 10, we obtain the
values y = 1.8333, 6.3333, and 10.8333 These values are different than the given data values y = 2, 6, and 11 because the line is not a perfect fit to the data The value of J is
J = (1.8333 − 2)2+ (6.3333 − 6)2+ (10.8333 − 11)2= 0.1666 No other straight line will give a lower value of J for these data.
Trang 401 5 Fitting Models to Scattered Data 25
0 2 4 6 8 10 12
THE GENERAL LINEAR CASE
We can generalize the preceding results to obtain formulas for the coefficients m and b
in the linear equation y = mx + b Note that for n data points,
The values of m and b that minimize J are found from ∂ J/∂m = 0 and ∂ J/∂b = 0.
These conditions give the following equations that must be solved for m and b:
These are two linear equations in terms of m and b.
Because the exponential and power functions form straight lines on semilogand log-log axes, we can use the previous results after computing the logarithms of
the data