2,592 143 50MB
Pages 1229 Page size 504 x 720 pts Year 2002
THE MECHATRONICS HANDBOOK Editor-in-Chief
Robert H. Bishop The University of Texas at Austin Austin, Texas
CRC PR E S S Boca Raton London New York Washington, D.C.
0066 disclaimer Page 1 Friday, January 18, 2002 3:07 PM
This reference text is published in cooperation with ISA Press, the publishing division of ISA–The Instrumentation, Systems, and Automation Society. ISA is an international, nonprofit, technical organization that fosters advancement in the theory, design, manufacture, and use of sensors, instruments, computers, and systems for measurement and control in a wide variety of applications. For more information, visit www.isa.org or call (919) 549-8411.
Library of Congress Cataloging-in-Publication Data Catalog record is available from the Library of Congress
This book contains information obtained from authentic and highly regarded sources. Reprinted material is quoted with permission, and sources are indicated. A wide variety of references are listed. Reasonable efforts have been made to publish reliable data and information, but the authors and the publisher cannot assume responsibility for the validity of all materials or for the consequences of their use. Neither this book nor any part may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, microfilming, and recording, or by any information storage or retrieval system, without prior permission in writing from the publisher. All rights reserved. Authorization to photocopy items for internal or personal use, or the personal or internal use of specific clients, may be granted by CRC Press LLC, provided that $1.50 per page photocopied is paid directly to Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923 USA The fee code for users of the Transactional Reporting Service is ISBN 0-8493-0066-5/02/$0.00+$1.50. The fee is subject to change without notice. For organizations that have been granted a photocopy license by the CCC, a separate system of payment has been arranged. The consent of CRC Press LLC does not extend to copying for general distribution, for promotion, for creating new works, or for resale. Specific permission must be obtained in writing from CRC Press LLC for such copying. Direct all inquiries to CRC Press LLC, 2000 N.W. Corporate Blvd., Boca Raton, Florida 33431. Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identification and explanation, without intent to infringe.
Visit the CRC Press Web site at www.crcpress.com © 2002 by CRC Press LLC No claim to original U.S. Government works International Standard Book Number 0-8493-0066-5 Printed in the United States of America 1 2 3 4 5 6 7 8 9 0 Printed on acid-free paper
0066 frontmatter Page i Thursday, January 17, 2002 11:36 AM
Preface
According to the original definition of mechatronics proposed by the Yasakawa Electric Company and the definitions that have appeared since, many of the engineering products designed and manufactured in the last 25 years integrating mechanical and electrical systems can be classified as mechatronic systems. Yet many of the engineers and researchers responsible for those products were never formally trained in mechatronics per se. The Mechatronics Handbook can serve as a reference resource for those very same design engineers to help connect their everyday experience in design with the vibrant field of mechatronics. More generally, this handbook is intended for use in research and development departments in academia, government, and industry, and as a reference source in university libraries. It can also be used as a resource for scholars interested in understanding and explaining the engineering design process. As the historical divisions between the various branches of engineering and computer science become less clearly defined, we may well find that the mechatronics specialty provides a roadmap for nontraditional engineering students studying within the traditional structure of most engineering colleges. It is evident that there is an expansion of mechatronics laboratories and classes in the university environment worldwide. This fact is reflected in the list of contributors to this handbook, including an international group of 88 academicians and engineers representing 13 countries. It is hoped that the Mechatronics Handbook can serve the world community as the definitive reference source in mechatronics.
Organization The Mechatronics Handbook is a collection of 50 chapters covering the key elements of mechatronics: a. b. c. d. e.
Physical Systems Modeling Sensors and Actuators Signals and Systems Computers and Logic Systems Software and Data Acquisition
Section One – Overview of Mechatronics In the opening section, the general subject of mechatronics is defined and organized. The chapters are overview in nature and are intended to provide an introduction to the key elements of mechatronics. For readers interested in education issues related to mechatronics, this first section concludes with a discussion on new directions in the mechatronics engineering curriculum. The chapters, listed in order of appearance, are: 1. What is Mechatronics? 2. Mechatronic Design Approach
©2002 CRC Press LLC
0066 frontmatter Page ii Thursday, January 17, 2002 11:36 AM
3. 4. 5. 6.
System Interfacing, Instrumentation and Control Systems Microprocessor-Based Controllers and Microelectronics An Introduction to Micro- and Nanotechnology Mechatronics: New Directions in Nano-, Micro-, and Mini-Scale Electromechanical Systems Design, and Engineering Curriculum Development
Section Two – Physical System Modeling The underlying mechanical and electrical mathematical models comprising most mechatronic systems are presented in this section. The discussion is intended to provide a detailed description of the process of physical system modeling, including topics on structures and materials, fluid systems, electrical systems, thermodynamic systems, rotational and translational systems, modeling issues associated with MEMS, and the physical basis of analogies in system models. The chapters, listed in order of appearance, are: 7. 8. 9. 10. 11. 12. 13. 14.
Modeling Electromechanical Systems Structures and Materials Modeling of Mechanical Systems for Mechatronics Applications Fluid Power Systems Electrical Engineering Engineering Thermodynamics Modeling and Simulation for MEMS Rotational and Translational Microelectromechanical Systems: MEMS Synthesis, Microfabrication, Analysis, and Optimization 15. The Physical Basis of Analogies in Physical System Models Section Three – Sensors and Actuators The basics of sensors and actuators are introduced in the third section. This section begins with chapters on the important subject of time and frequency and on the subject of sensor and actuator characteristics. The remainder of the section is subdivided into two categories: sensors and actuators. The chapters include both the fundamental physical relationships and mathematical models associated with the sensor and actuator technologies. The chapters, listed in order of appearance, are: 16. Introduction to Sensors and Actuators 17. Fundamentals of Time and Frequency 18. Sensor and Actuator Characteristics 19. Sensors 19.1 Linear and Rotational Sensors 19.2 Acceleration Sensors 19.3 Force Measurement 19.4 Torque and Power Measurement 19.5 Flow Measurement 19.6 Temperature Measurements 19.7 Distance Measuring and Proximity Sensors 19.8 Light Detection, Image, and Vision Systems 19.9 Integrated Micro-sensors
©2002 CRC Press LLC
0066 frontmatter Page iii Thursday, January 17, 2002 11:36 AM
20. Actuators 20.1 Electro-mechanical Actuators 20.2 Electrical Machines 20.3 Piezoelectric Actuators 20.4 Hydraulic and Pneumatic Actuation Systems 20.5 MEMS: Microtransducers Analysis, Design and Fabrication Section Four – Systems and Controls An overview of signals and systems is presented in this fourth section. Since there is a significant body of readily-available material to the reader on the general subject of signals and systems, there is not an overriding need to repeat that material here. Instead, the goal of this section is to present the relevant aspects of signals and systems of special importance to the study of mechatronics. The section begins with articles on the role of control in mechatronics and on the role of modeling in mechatronic design. These chapters set the stage for the more fundamental discussions on signals and systems comprising the bulk of the material in this section. Modern aspects of control design using optimization techniques from H2 theory, adaptive and nonlinear control, neural networks and fuzzy systems are also included as they play an important role in modern engineering system design. The section concludes with a chapter on design optimization for mechatronic systems. The chapters, listed in order of appearance, are: 21. The Role of Controls in Mechatronics 22. The Role of Modeling in Mechatronics Design 23. Signals and Systems 23.1 Continuous- and Discrete-time Signals 23.2 Z Transforms and Digital Systems 23.3 Continuous- and Discrete-time State-space Models 23.4 Transfer Functions and Laplace Transforms 24. State Space Analysis and System Properties 25. Response of Dynamic Systems 26. Root Locus Method 27. Frequency Response Methods 28. Kalman Filters as Dynamic System State Observers 29. Digital Signal Processing for Mechatronic Applications 30. Control System Design Via H2 Optimization 31. Adaptive and Nonlinear Control Design 32. Neural Networks and Fuzzy Systems 33. Advanced Control of an Electrohydraulic Axis 34. Design Optimization of Mechatronic Systems Section Five – Computers and Logic Systems The development of the computer, and then the microcomputer, embedded computers, and associated information technologies and software advances, has impacted the world in a profound manner. This is especially true in mechatronics where the integration of computers with electromechanical systems has led to a new generation of smart products. The future is filled with promise of better and more intelligent products resulting from continued improvements in computer technology and software engineering. The last two sections of the Mechatronics Handbook are devoted to the topics of computers and software. In
©2002 CRC Press LLC
0066 frontmatter Page iv Thursday, January 17, 2002 11:36 AM
this fifth section, the focus is on computer hardware and associated issues of logic, communication, networking, architecture, fault analysis, embedded computers, and programmable logic controllers. The chapters, listed in order of appearance, are: 35. 36. 37. 38. 39. 40. 41. 42. 43.
Introduction to Computers and Logic Systems Logic Concepts and Design System Interfaces Communication and Computer Networks Fault Analysis in Mechatronic Systems Logic System Design Synchronous and Asynchronous Sequential Systems Architecture Control with Embedded Computers and Programmable Logic Controllers
Section Six – Software and Data Acquisition Given that computers play a central role in modern mechatronics products, it is very important to understand how data is acquired and how it makes its way into the computer for processing and logging. The final section of the Mechatronics Handbook is devoted to the issues surrounding computer software and data acquisition. The chapters, listed in order of appearance, are: 44. 45. 46. 47. 48. 49. 50.
Introduction to Data Acquisition Measurement Techniques: Sensors and Transducers A/D and D/A Conversion Signal Conditioning Computer-Based Instrumentation Systems Software Design and Development Data Recording and Logging
Acknowledgments I wish to express my heartfelt thanks to all the contributing authors. Taking time in otherwise busy and hectic schedules to author the excellent articles appearing in the Mechatronics Handbook is much appreciated. I also wish to thank my Advisory Board for their help in the early stages of planning the topics in the handbook. This handbook is a result of a collaborative effort expertly managed by CRC Press. My thanks to the editorial and production staff: Nora Konopka, Acquisitions Editor Michael Buso, Project Coordinator Susan Fox, Project Editor Thanks to my friend and collaborator Professor Richard C. Dorf for his continued support and guidance. And finally, a special thanks to Lynda Bishop for managing the incoming and outgoing draft manuscripts. Her organizational skills were invaluable to this project.
Robert H. Bishop Editor-in-Chief ©2002 CRC Press LLC
0066 frontmatter Page v Thursday, January 17, 2002 11:36 AM
Editor-in-Chief
Robert H. Bishop is a Professor of Aerospace Engineering and Engineering Mechanics at The University of Texas at Austin and holds the Myron L. Begeman Fellowship in Engineering. He received his B.S. and M.S. degrees from Texas A&M University in Aerospace Engineering, and his Ph.D. from Rice University in Electrical and Computer Engineering. Prior to coming to The University of Texas at Austin, he was a member of the technical staff at the MIT Charles Stark Draper Laboratory. Dr. Bishop is a specialist in the area of planetary exploration with an emphasis on spacecraft guidance, navigation, and control. He is currently working with NASA Johnson Space Center and the Jet Propulsion Laboratory on techniques for achieving precision landing on Mars. He is an active researcher authoring and co-authoring over 50 journal and conference papers. He was twice selected as a Faculty Fellow at the NASA Jet Propulsion Laboratory and a Welliver Faculty Fellow by The Boeing Company. Dr. Bishop co-authored Modern Control Systems with Prof. R. C. Dorf, and he has authored two other books entitled Learning with LabView and Modern Control System Design and Analysis Using Matlab and Simulink. He recently received the John Leland Atwood Award from the American Society of Engineering Educators and the American Institute of Aeronautics and Astronautics that is given periodically to “a leader who has made lasting and significant contributions to aerospace engineering education.”
©2002 CRC Press LLC
0066 frontmatter Page vii Friday, January 18, 2002 6:21 PM
Contributors
Maruthi R. Akella
Kevin C. Craig
Halit Eren
University of Texas at Austin Austin, Texas
Rennselaer Polytechnic Institute Troy, New York
Curtin University of Technology Bentley, Australia
Sami A. Al-Arian
Timothy P. Crain II
H. R. (Bart) Everett
University of South Florida Tampa, Florida
NASA Johnson Space Center Houston, Texas
Space and Naval Warfare Systems Center San Diego, California
M. Anjanappa
Jace Curtis
University of Maryland Baltimore, Maryland
National Instruments, Inc. Austin, Texas
Dragos Arotaritei
K. Datta
Aalborg University Esbjerg Esbjerg, Denmark
University of Maryland Baltimore, Maryland
Ramutis Bansevicius
Raymond de Callafon
Kaunas University of Technology Kaunas, Lithuania
University of California La Jolla, California
Eric J. Barth
Santosh Devasia
Vanderbilt University Nashville, Tennessee
University of Washington Seattle, Washington
Peter Breedveld
Ivan Dolezal
University of Twente Enschede, The Netherlands
Technical University of Liberec Liberec, Czech Republic
Tomas Brezina
C. Nelson Dorny
Technical University of Brno Brno, Czech Republic
University of Pennsylvania Philadelphia, Pennsylvania
George T.-C. Chiu
Stephen A. Dyer
Purdue University West Lafayette, Indiana
Kansas State University Manhattan, Kansas
George I. Cohn
M.A. Elbestawi
California State University Fullerton, California
McMaster University Hamilton, Ontario, Canada
Daniel A. Connors
Eniko T. Enikov
University of Colorado Boulder, Colorado
University of Arizona Tuscon, Arizona
©2002 CRC Press LLC
Jorge Fernando Figueroa NASA Stennis Space Center New Orleans, Louisiana
C. J. Fraser University of Abertay Dundee Dundee, Scotland
Kris Fuller National Instruments, Inc. Austin, Texas
Ivan J. Garshelis Magnova, Inc. Pittsfield, Massachusetts
Carroll E. Goering University of Illinois Urbana, Illinois
Michael Goldfarb Vanderbilt University Nashville, Tennessee
Margaret H. Hamilton Hamilton Technologies, Inc. Cambridge, Massachusetts
Cecil Harrison University of Southern Mississippi Hattiesburg, Mississippi
Bonnie S. Heck Georgia Institute of Technology Atlanta, Georgia
0066 frontmatter Page viii Thursday, January 17, 2002 11:36 AM
Neville Hogan
Thomas R. Kurfess
Ondrej Novak
Massachusetts Institute of Technology Cambridge, Massachusetts
Georgia Institute of Technology Atlanta, Georgia
Technical University of Liberec Liberec, Czech Republic
Kam Leang
Cestmir Ondrusek
University of Washington Seattle, Washington
Technical University of Brno Brno, Czech Republic
Chang Liu
Hitay Özbay
University of Illinois Urbana, Illinois
The Ohio State University Columbus, Ohio
Michael A. Lombardi
Joey Parker
University of Illinois Urbana, Illinois
National Institute of Standards and Technology Boulder, Colorado
University of Alabama Tuscaloosa, Alabama
Mohammad Ilyas
Raul G. Longoria
Florida Atlantic University Boca Raton, Florida
University of Texas at Austin Austin, Texas
Florin Ionescu
Kevin M. Lynch
University of Applied Sciences Konstanz, Germany
Northwestern University Evanston, Illinois
Stanley S. Ipson
Sergey Edward Lyshevski
University of Bradford Bradford, West Yorkshire, England
Indiana University-Purdue University Indianapolis Indianapolis, Indiana
Rick Homkes Purdue University Kokomo, Indiana
Bouvard Hosticka University of Virginia Charlottesville, Virginia
Wen-Mei W. Hwu
Rolf Isermann Darmstadt University of Technology Darmstadt, Germany
Hugh Jack Grand Valley State University Grand Rapids, Michigan
Jeffrey A. Jalkio Univeristy of St. Thomas St. Paul, Minnesota
Rolf Johansson Lund Institute of Technology Lund, Sweden
J. Katupitiya The University of New South Wales Sydney, Australia
Ctirad Kratochvil Technical University of Brno Brno, Czech Republic
©2002 CRC Press LLC
Stefano Pastorelli Politecnico di Torino Torino, Italy
Michael A. Peshkin Northwestern University Evanston, Illinois
Carla Purdy University of Cincinnati Cincinnati, Ohio
M. K. Ramasubramanian
Tom Magruder
North Carolina State University Raleigh, North Carolina
National Instruments, Inc. Austin, Texas
Giorgio Rizzoni
Francis C. Moon
The Ohio State University Columbus, Ohio
Cornell University Ithaca, New York
Armando A. Rodriguez
Thomas N. Moore
Arizona State University Tempe, Arizona
Queen’s University Kingston, Ontario, Canada
Michael J. Moran
Momoh-Jimoh Eyiomika Salami
The Ohio State University Columbus, Ohio
International Islamic University of Malaysia Kuala Lumpur, Malaysia
Pamela M. Norris
Mario E. Salgado
University of Virginia Charlottesville, Virginia
Universidad Tecnica Federico Santa Maria Valparaiso, Chile
Leila Notash Queen’s University Kingston, Ontario, Canada
Jyh-Jong Sheen National Taiwan Ocean University Keelung, Taiwan
0066 frontmatter Page ix Friday, January 18, 2002 6:21 PM
T. Song
Richard Thorn
Bogdan M. Wilamowski
University of Maryland Baltimore, Maryland
University of Derby Derby, England
University of Wyoming Laramie, Wyoming
Massimo Sorli
Rymantas Tadas Tolocka
Juan I. Yuz
Politecnico di Torino Torino, Italy
Kaunas University of Technology Kaunas, Lithuania
Universidad Tecnica Federico Santa Maria Vina del Mar, Chile
Andrew Sterian
M. J. Tordon
Grand Valley State University Grand Rapids, Michigan
The University of New South Wales Sydney, Australia
Alvin Strauss
Mike Tyler
Vanderbilt University Nashville, Tennessee
National Instruments, Inc. Austin, Texas
Fred Stolfi
Crina Vlad
Rennselaer Polytechnic Institute Troy, New York
Politehnica University of Bucharest Bucharest, Romania
©2002 CRC Press LLC
Qin Zhang University of Illinois Urbana, Illinois
Qingze Zou University of Washington Seattle, Washington
Job van Amerongen University of Twente Enschede, The Netherlands
0066_Frame_FM Page v Wednesday, January 9, 2002 11:38 AM
Contents
SECTION I
Overview of Mechatronics
1
What is Mechatronics? Robert H. Bishop and M. K. Ramasubramanian
2
Mechatronic Design Approach
3
System Interfacing, Instrumentation, and Control Systems Rick Homkes
4
Microprocessor-Based Controllers and Microelectronics Ondrej Novak and Ivan Dolezal
5
An Introduction to Micro- and Nanotechnology Alvin Strauss and Eric J. Barth
6
Mechatronics: New Directions in Nano-, Micro-, and Mini-Scale Electromechanical Systems Design, and Engineering Curriculum Development Sergey Edward Lyshevski
SECTION II
Rolf Isermann
Michael Goldfarb,
Physical System Modeling
7
Modeling Electromechanical Systems
8
Structures and Materials
9
Modeling of Mechanical Systems for Mechatronics Applications Raul G. Longoria
©2002 CRC Press LLC
Francis C. Moon
Eniko T. Enikov
0066_Frame_FM Page vi Wednesday, January 9, 2002 11:38 AM
10
Fluid Power Systems
11
Electrical Engineering
12
Engineering Thermodynamics
13
Modeling and Simulation for MEMS
14
Rotational and Translational Microelectromechanical Systems: MEMS Synthesis, Microfabrication, Analysis, and Optimization Sergey Edward Lyshevski
15
The Physical Basis of Analogies in Physical System Models Neville Hogan and Peter C. Breedveld
SECTION III
Qin Zhang and Carroll E. Goering Giorgio Rizzoni Michael J. Moran Carla Purdy
Sensors and Actuators
16
Introduction to Sensors and Actuators and T. Song
M. Anjanappa, K. Datta
17
Fundamentals of Time and Frequency
Michael A. Lombardi
18
Sensor and Actuator Characteristics
19
Sensors 19.1 19.2 19.3 19.4 19.5 19.6 19.7 19.8 19.9
20
Joey Parker
Linear and Rotational Sensors Kevin Lynch and Michael Peshkin Acceleration Sensors Halit Eren Force Measurement M. A. Elbestawi Torque and Power Measurement Ivan Garshelis Flow Measurement Richard Thorn Temperature Measurements Pamela Norris and Bouvard Hosticka Distance Measuring and Proximity Sensors J. Fernando Figueroa Light Detection, Image, and Vision Systems Stanley Ipson Integrated Microsensors Chang Liu
Actuators 20.1 Electromechanical Actuators George T.-C. Chiu 20.2 Electrical Machines Charles Fraser 20.3 Piezoelectric Actuators Habil Ramutis Bansevicius and Rymanta Tadas Tolocka
©2002 CRC Press LLC
0066_Frame_FM Page vii Wednesday, January 9, 2002 11:38 AM
20.4 Hydraulic and Pneumatic Actuation Systems Massimo Sorli and Stefano Pastorelli 20.5 MEMS: Microtransducers Analysis, Design, and Fabrication Sergey Lyshevski
SECTION IV
Systems and Controls
21
The Role of Controls in Mechatronics
22
The Role of Modeling in Mechatronics Design
23
Signals and Systems
Job van Amerongen Jeffrey A. Jalkio
23.1 Continuous- and Discrete-Time Signals Momoh Jimoh Salami 23.2 z Transform and Digital Systems Rolf Johansson 23.3 Continuous- and Discrete-Time State-Space Models Kam Leang, Qingze Zou, and Santosh Devasia 23.4 Transfer Functions and Laplace Transforms C. Nelson Dorny
24
State Space Analysis and System Properties and Juan I. Yuz
25
Response of Dynamic Systems
26
The Root Locus Method
27
Frequency Response Methods
28
Kalman Filters as Dynamic System State Observers Timothy P. Crain II
29
Digital Signal Processing for Mechatronic Applications S. Heck and Thomas R. Kurfess
30
Control System Design Via H 2 Optimization Armando A. Rodriguez
31
Adaptive and Nonlinear Control Design
32
Neural Networks and Fuzzy Systems
©2002 CRC Press LLC
Mario E. Salgado
Raymond de Callafon
Hitay Özbay Jyh-Jong Sheen
Bonnie
Maruthi R. Akella
Bogdan M. Wilamowski
0066_Frame_FM Page viii Wednesday, January 9, 2002 11:38 AM
33
Advanced Control of an Electrohydraulic Axis Crina Vlad and Dragos Arotaritei
Florin Ionescu,
34
Design Optimization of Mechatronic Systems Kratochvil, and Cestmir Ondrusek
Tomas Brezina, Ctirad
SECTION V Computers and Logic Systems
35
Introduction to Computers and Logic Systems and Fred Stolfi
36
Digital Logic Concepts and Combinational Logic Design George I. Cohn
37
System Interfaces
38
Communications and Computer Networks
39
Fault Analysis in Mechatronic Systems N. Moore
40
Logic System Design
41
Synchronous and Asynchronous Sequential Systems Sami A. Al-Arian
42
Architecture
43
Control with Embedded Computers and Programmable Logic Controllers Hugh Jack and Andrew Sterian
SECTION VI
Kevin Craig
M.J. Tordon and J. Katupitiya Mohammad Ilyas
Leila Notash and Thomas
M. K. Ramasubramanian
Daniel A. Connors and Wen-mei W. Hwu
Software and Data Acquisition
44
Introduction to Data Acquistition
45
Measurement Techniques: Sensors and Transducers Cecil Harrison
©2002 CRC Press LLC
Jace Curtis
0066_Frame_FM Page ix Wednesday, January 9, 2002 11:38 AM
46
A/D and D/A Conversion
47
Signal Conditioning
48
Computer-Based Instr umentation Systems
49
Software Design and Development
50
Data Recording and Logging
©2002 CRC Press LLC
Mike Tyler
Stephen A. Dyer Kris Fuller
Margaret H. Hamilton
Tom Magruder
I Overview of Mechatronics 1 What is Mechatronics? Robert H. Bishop and M. K. Ramasubramanian Basic Definitions • Key Elements of Mechatronics • Historical Perspective • The Development of the Automobile as a Mechatronic System • What is Mechatronics? And What’s Next?
2 Mechatronic Design Approach Rolf Isermann Historical Development and Definition of Mechatronic Systems • Functions of Mechatronic Systems • Ways of Integration • Information Processing Systems (Basic Architecture and HW/SW Trade-offs) • Concurrent Design Procedure for Mechatronic Systems
3 System Interfacing, Instrumentation, and Control Systems Rick Homkes Introduction • Input Signals of a Mechatronic System • Output Signals of a Mechatronic System • Signal Conditioning • Microprocessor Control • Microprocessor Numerical Control • Microprocessor Input–Output Control • Software Control • Testing and Instrumentation • Summary
4 Microprocessor-Based Controllers and Microelectronics Ondrej Novak and Ivan Dolezal Introduction to Microelectronics • Digital Logic • Overview of Control Computers • Microprocessors and Microcontrollers • Programmable Logic Controllers • Digital Communications
5 An Introduction to Micro- and Nanotechnology Michael Goldfarb, Alvin Strauss, and Eric J. Barth Introduction • Microactuators • Microsensors • Nanomachines
6 Mechatronics: New Directions in Nano-, Micro-, and Mini-Scale Electromechanical Systems Design, and Engineering Curriculum Development Sergey Edward Lyshevski Introduction • Nano-, Micro-, and Mini-Scale Electromechanical Systems and Mechatronic Curriculum • Mechatronics and Modern Engineering • Design of Mechatronic Systems • Mechatronic System Components • Systems Synthesis, Mechatronics Software, and Simulation • Mechatronic Curriculum • Introductory Mechatronic Course • Books in Mechatronics • Mechatronic Curriculum Developments • Conclusions: Mechatronics Perspectives
©2002 CRC Press LLC
1 What is Mechatronics? Robert H. Bishop The University of Texas at Austin
1.1 1.2 1.3 1.4
M. K. Ramasubramanian North Carolina State University
1.5
Basic Definitions Key Elements of Mechatronics Historical Perspective The Development of the Automobile as a Mechatronic System What is Mechatronics? And What’s Next?
Mechatronics is a natural stage in the evolutionary process of modern engineering design. The development of the computer, and then the microcomputer, embedded computers, and associated information technologies and software advances, made mechatronics an imperative in the latter part of the twentieth century. Standing at the threshold of the twenty-first century, with expected advances in integrated bioelectro-mechanical systems, quantum computers, nano- and pico-systems, and other unforeseen developments, the future of mechatronics is full of potential and bright possibilities.
1.1 Basic Definitions The definition of mechatronics has evolved since the original definition by the Yasakawa Electric Company. In trademark application documents, Yasakawa defined mechatronics in this way [1,2]: The word, mechatronics, is composed of “mecha” from mechanism and the “tronics” from electronics. In other words, technologies and developed products will be incorporating electronics more and more into mechanisms, intimately and organically, and making it impossible to tell where one ends and the other begins. The definition of mechatronics continued to evolve after Yasakawa suggested the original definition. One oft quoted definition of mechatronics was presented by Harashima, Tomizuka, and Fukada in 1996 [3]. In their words, mechatronics is defined as the synergistic integration of mechanical engineering, with electronics and intelligent computer control in the design and manufacturing of industrial products and processes. That same year, another definition was suggested by Auslander and Kempf [4]: Mechatronics is the application of complex decision making to the operation of physical systems. Yet another definition due to Shetty and Kolk appeared in 1997 [5]: Mechatronics is a methodology used for the optimal design of electromechanical products. More recently, we find the suggestion by W. Bolton [6]: A mechatronic system is not just a marriage of electrical and mechanical systems and is more than just a control system; it is a complete integration of all of them.
©2002 CRC Press LLC
All of these definitions and statements about mechatronics are accurate and informative, yet each one in and of itself fails to capture the totality of mechatronics. Despite continuing efforts to define mechatronics, to classify mechatronic products, and to develop a standard mechatronics curriculum, a consensus opinion on an all-encompassing description of “what is mechatronics” eludes us. This lack of consensus is a healthy sign. It says that the field is alive, that it is a youthful subject. Even without an unarguably definitive description of mechatronics, engineers understand from the definitions given above and from their own personal experiences the essence of the philosophy of mechatronics. For many practicing engineers on the front line of engineering design, mechatronics is nothing new. Many engineering products of the last 25 years integrated mechanical, electrical, and computer systems, yet were designed by engineers that were never formally trained in mechatronics per se. It appears that modern concurrent engineering design practices, now formally viewed as part of the mechatronics specialty, are natural design processes. What is evident is that the study of mechatronics provides a mechanism for scholars interested in understanding and explaining the engineering design process to define, classify, organize, and integrate many aspects of product design into a coherent package. As the historical divisions between mechanical, electrical, aerospace, chemical, civil, and computer engineering become less clearly defined, we should take comfort in the existence of mechatronics as a field of study in academia. The mechatronics specialty provides an educational path, that is, a roadmap, for engineering students studying within the traditional structure of most engineering colleges. Mechatronics is generally recognized worldwide as a vibrant area of study. Undergraduate and graduate programs in mechatronic engineering are now offered in many universities. Refereed journals are being published and dedicated conferences are being organized and are generally highly attended. It should be understood that mechatronics is not just a convenient structure for investigative studies by academicians; it is a way of life in modern engineering practice. The introduction of the microprocessor in the early 1980s and the ever increasing desired performance to cost ratio revolutionized the paradigm of engineering design. The number of new products being developed at the intersection of traditional disciplines of engineering, computer science, and the natural sciences is ever increasing. New developments in these traditional disciplines are being absorbed into mechatronics design at an ever increasing pace. The ongoing information technology revolution, advances in wireless communication, smart sensors design (enabled by MEMS technology), and embedded systems engineering ensures that the engineering design paradigm will continue to evolve in the early twenty-first century.
1.2 Key Elements of Mechatronics The study of mechatronic systems can be divided into the following areas of specialty: 1. 2. 3. 4. 5.
Physical Systems Modeling Sensors and Actuators Signals and Systems Computers and Logic Systems Software and Data Acquisition
The key elements of mechatronics are illustrated in Fig. 1.1. As the field of mechatronics continues to mature, the list of relevant topics associated with the area will most certainly expand and evolve.
1.3 Historical Perspective Attempts to construct automated mechanical systems has an interesting history. Actually, the term “automation” was not popularized until the 1940s when it was coined by the Ford Motor Company to denote a process in which a machine transferred a sub-assembly item from one station to another and then positioned the item precisely for additional assembly operations. But successful development of automated mechanical systems occurred long before then. For example, early applications of automatic control ©2002 CRC Press LLC
MECHANICS OF SOLIDS TRANSLATIONAL AND ROTATIONAL SYSTEMS FLUID SYSTEMS ELECTRICAL SYSTEMS THERMAL SYSTEMS MICRO- AND NANO-SYSTEMS ROTATIONAL ELECTROMAGNETIC MEMS PHYSICAL SYSTEM ANALOGIES
FIGURE 1.1
The key elements of mechatronics.
FIGURE 1.2 Water-level float regulator. (From Modern Control Systems, 9th ed., R. C. Dorf and R. H. Bishop, Prentice-Hall, 2001. Used with permission.)
systems appeared in Greece from 300 to 1 B.C. with the development of float regulator mechanisms [7]. Two important examples include the water clock of Ktesibios that used a float regulator, and an oil lamp devised by Philon, which also used a float regulator to maintain a constant level of fuel oil. Later, in the first century, Heron of Alexandria published a book entitled Pneumatica that described different types of water-level mechanisms using float regulators. In Europe and Russia, between seventeenth and nineteenth centuries, many important devices were invented that would eventually contribute to mechatronics. Cornelis Drebbel (1572–1633) of Holland devised the temperature regulator representing one of the first feedback systems of that era. Subsequently, Dennis Papin (1647–1712) invented a pressure safety regulator for steam boilers in 1681. Papin’s pressure regulator is similar to a modern-day pressure-cooker valve. The first mechanical calculating machine was invented by Pascal in 1642 [8]. The first historical feedback system claimed by Russia was developed by Polzunov in 1765 [9]. Polzunov’s water-level float regulator, illustrated in Fig. 1.2, employs a float that rises and lowers in relation to the water level, thereby controlling the valve that covers the water inlet in the boiler. Further evolution in automation was enabled by advancements in control theory traced back to the Watt flyball governor of 1769. The flyball governor, illustrated in Fig. 1.3, was used to control the speed ©2002 CRC Press LLC
FIGURE 1.3 Watt’s flyball governor. (From Modern Control Systems, 9th ed., R. C. Dorf and R. H. Bishop, PrenticeHall, 2001. Used with permission.)
of a steam engine [10]. Employing a measurement of the speed of the output shaft and utilizing the motion of the flyball to control the valve, the amount of steam entering the engine is controlled. As the speed of the engine increases, the metal spheres on the governor apparatus rise and extend away from the shaft axis, thereby closing the valve. This is an example of a feedback control system where the feedback signal and the control actuation are completely coupled in the mechanical hardware. These early successful automation developments were achieved through intuition, application of practical skills, and persistence. The next step in the evolution of automation required a theory of automatic control. The precursor to the numerically controlled (NC) machines for automated manufacturing (to be developed in the 1950s and 60s at MIT) appeared in the early 1800s with the invention of feed-forward control of weaving looms by Joseph Jacquard of France. In the late 1800s, the subject now known as control theory was initiated by J. C. Maxwell through analysis of the set of differential equations describing the flyball governor [11]. Maxwell investigated the effect various system parameters had on the system performance. At about the same time, Vyshnegradskii formulated a mathematical theory of regulators [12]. In the 1830s, Michael Faraday described the law of induction that would form the basis of the electric motor and the electric dynamo. Subsequently, in the late 1880s, Nikola Tesla invented the alternating-current induction motor. The basic idea of controlling a mechanical system automatically was firmly established by the end of 1800s. The evolution of automation would accelerate significantly in the twentieth century. The development of pneumatic control elements in the 1930s matured to a point of finding applications in the process industries. However, prior to 1940, the design of control systems remained an art generally characterized by trial-and-error methods. During the 1940s, continued advances in mathematical and analytical methods solidified the notion of control engineering as an independent engineering discipline. In the United States, the development of the telephone system and electronic feedback amplifiers spurred the use of feedback by Bode, Nyquist, and Black at Bell Telephone Laboratories [13–17]. The operation of the feedback amplifiers was described in the frequency domain and the ensuing design and analysis practices are now generally classified as “classical control.” During the same time period, control theory was also developing in Russia and eastern Europe. Mathematicians and applied mechanicians in the former Soviet Union dominated the field of controls and concentrated on time domain formulations and differential equation models of systems. Further developments of time domain formulations using state variable system representations occurred in the 1960s and led to design and analysis practices now generally classified as “modern control.” The World War II war effort led to further advances in the theory and practice of automatic control in an effort to design and construct automatic airplane pilots, gun-positioning systems, radar antenna control systems, and other military systems. The complexity and expected performance of these military systems necessitated an extension of the available control techniques and fostered interest in control systems and the development of new insights and methods. Frequency domain techniques continued to dominate the field of controls following World War II, with the increased use of the Laplace transform, and the use of the so-called s-plane methods, such as designing control systems using root locus. ©2002 CRC Press LLC
On the commercial side, driven by cost savings achieved through mass production, automation of the production process was a high priority beginning in the 1940s. During the 1950s, the invention of the cam, linkages, and chain drives became the major enabling technologies for the invention of new products and high-speed precision manufacturing and assembly. Examples include textile and printing machines, paper converting machinery, and sewing machines. High-volume precision manufacturing became a reality during this period. The automated paperboard container-manufacturing machine employs a sheet-fed process wherein the paperboard is cut into a fan shape to form the tapered sidewall, and wrapped around a mandrel. The seam is then heat sealed and held until cured. Another sheet-fed source of paperboard is used to cut out the plate to form the bottom of the paperboard container, formed into a shallow dish through scoring and creasing operations in a die, and assembled to the cup shell. The lower edge of the cup shell is bent inwards over the edge of the bottom plate sidewall, and heat-sealed under high pressure to prevent leaks and provide a precisely level edge for standup. The brim is formed on the top to provide a ring-on-shell structure to provide the stiffness needed for its functionality. All of these operations are carried out while the work piece undergoes a precision transfer from one turret to another and is then ejected. The production rate of a typical machine averages over 200 cups per minute. The automated paperboard container manufacturing did not involve any nonmechanical system except an electric motor for driving the line shaft. These machines are typical of paper converting and textile machinery and represent automated systems significantly more complex than their predecessors. The development of the microprocessor in the late 1960s led to early forms of computer control in process and product design. Examples include numerically controlled (NC) machines and aircraft control systems. Yet the manufacturing processes were still entirely mechanical in nature and the automation and control systems were implemented only as an afterthought. The launch of Sputnik and the advent of the space age provided yet another impetus to the continued development of controlled mechanical systems. Missiles and space probes necessitated the development of complex, highly accurate control systems. Furthermore, the need to minimize satellite mass (that is, to minimize the amount of fuel required for the mission) while providing accurate control encouraged advancements in the important field of optimal control. Time domain methods developed by Liapunov, Minorsky, and others, as well as the theories of optimal control developed by L. S. Pontryagin in the former Soviet Union and R. Bellman in the United States, were well matched with the increasing availability of high-speed computers and new programming languages for scientific use. Advancements in semiconductor and integrated circuits manufacturing led to the development of a new class of products that incorporated mechanical and electronics in the system and required the two together for their functionality. The term mechatronics was introduced by Yasakawa Electric in 1969 to represent such systems. Yasakawa was granted a trademark in 1972, but after widespread usage of the term, released its trademark rights in 1982 [1–3]. Initially, mechatronics referred to systems with only mechanical systems and electrical components—no computation was involved. Examples of such systems include the automatic sliding door, vending machines, and garage door openers. In the late 1970s, the Japan Society for the Promotion of Machine Industry (JSPMI) classified mechatronics products into four categories [1]: 1. Class I: Primarily mechanical products with electronics incorporated to enhance functionality. Examples include numerically controlled machine tools and variable speed drives in manufacturing machines. 2. Class II: Traditional mechanical systems with significantly updated internal devices incorporating electronics. The external user interfaces are unaltered. Examples include the modern sewing machine and automated manufacturing systems. 3. Class III: Systems that retain the functionality of the traditional mechanical system, but the internal mechanisms are replaced by electronics. An example is the digital watch. 4. Class IV: Products designed with mechanical and electronic technologies through synergistic integration. Examples include photocopiers, intelligent washers and dryers, rice cookers, and automatic ovens. ©2002 CRC Press LLC
The enabling technologies for each mechatronic product class illustrate the progression of electromechanical products in stride with developments in control theory, computation technologies, and microprocessors. Class I products were enabled by servo technology, power electronics, and control theory. Class II products were enabled by the availability of early computational and memory devices and custom circuit design capabilities. Class III products relied heavily on the microprocessor and integrated circuits to replace mechanical systems. Finally, Class IV products marked the beginning of true mechatronic systems, through integration of mechanical systems and electronics. It was not until the 1970s with the development of the microprocessor by the Intel Corporation that integration of computational systems with mechanical systems became practical. The divide between classical control and modern control was significantly reduced in the 1980s with the advent of “robust control” theory. It is now generally accepted that control engineering must consider both the time domain and the frequency domain approaches simultaneously in the analysis and design of control systems. Also, during the 1980s, the utilization of digital computers as integral components of control systems became routine. There are literally hundreds of thousands of digital process control computers installed worldwide [18,19]. Whatever definition of mechatronics one chooses to adopt, it is evident that modern mechatronics involves computation as the central element. In fact, the incorporation of the microprocessor to precisely modulate mechanical power and to adapt to changes in environment are the essence of modern mechatronics and smart products.
1.4 The Development of the Automobile as a Mechatronic System The evolution of modern mechatronics can be illustrated with the example of the automobile. Until the 1960s, the radio was the only significant electronics in an automobile. All other functions were entirely mechanical or electrical, such as the starter motor and the battery charging systems. There were no “intelligent safety systems,” except augmenting the bumper and structural members to protect occupants in case of accidents. Seat belts, introduced in the early 1960s, were aimed at improving occupant safety and were completely mechanically actuated. All engine systems were controlled by the driver and/or other mechanical control systems. For instance, before the introduction of sensors and microcontrollers, a mechanical distributor was used to select the specific spark plug to fire when the fuel–air mixture was compressed. The timing of the ignition was the control variable. The mechanically controlled combustion process was not optimal in terms of fuel efficiency. Modeling of the combustion process showed that, for increased fuel efficiency, there existed an optimal time when the fuel should be ignited. The timing depends on load, speed, and other measurable quantities. The electronic ignition system was one of the first mechatronic systems to be introduced in the automobile in the late 1970s. The electronic ignition system consists of a crankshaft position sensor, camshaft position sensor, airflow rate, throttle position, rate of throttle position change sensors, and a dedicated microcontroller determining the timing of the spark plug firings. Early implementations involved only a Hall effect sensor to sense the position of the rotor in the distributor accurately. Subsequent implementations eliminated the distributor completely and directly controlled the firings utilizing a microprocessor. The Antilock Brake System (ABS) was also introduced in the late 1970s in automobiles [20]. The ABS works by sensing lockup of any of the wheels and then modulating the hydraulic pressure as needed to minimize or eliminate sliding. The Traction Control System (TCS) was introduced in automobiles in the mid-1990s. The TCS works by sensing slippage during acceleration and then modulating the power to the slipping wheel. This process ensures that the vehicle is accelerating at the maximum possible rate under given road and vehicle conditions. The Vehicle Dynamics Control (VDC) system was introduced in automobiles in the late 1990s. The VDC works similar to the TCS with the addition of a yaw rate sensor and a lateral accelerometer. The driver intention is determined by the steering wheel position and then compared with the actual direction of motion. The TCS system is then activated to control the ©2002 CRC Press LLC
power to the wheels and to control the vehicle velocity and minimize the difference between the steering wheel direction and the direction of the vehicle motion [20,21]. In some cases, the ABS is used to slow down the vehicle to achieve desired control. In automobiles today, typically, 8, 16, or 32-bit CPUs are used for implementation of the various control systems. The microcontroller has onboard memory (EEPROM/EPROM), digital and analog inputs, A/D converters, pulse width modulation (PWM), timer functions, such as event counting and pulse width measurement, prioritized inputs, and in some cases digital signal processing. The 32-bit processor is used for engine management, transmission control, and airbags; the 16-bit processor is used for the ABS, TCS, VDC, instrument cluster, and air conditioning systems; the 8-bit processor is used for seat, mirror control, and window lift systems. Today, there are about 30–60 microcontrollers in a car. This is expected to increase with the drive towards developing modular systems for plug-n-ply mechatronics subsystems. Mechatronics has become a necessity for product differentiation in automobiles. Since the basics of internal combustion engine were worked out almost a century ago, differences in the engine design among the various automobiles are no longer useful as a product differentiator. In the 1970s, the Japanese automakers succeeded in establishing a foothold in the U.S. automobile market by offering unsurpassed quality and fuel-efficient small automobiles. The quality of the vehicle was the product differentiator through the 1980s. In the 1990s, consumers came to expect quality and reliability in automobiles from all manufacturers. 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, and the drive to reduce cost of manufacturing of existing products through redesign incorporating mechatronics elements. With the prospects of low single digit (2–3%) growth, automotive makers will be searching for high-tech features that will differentiate their vehicles from others [22]. The automotive electronics market in North America, now at about $20 billion, is expected to reach $28 billion by 2004 [22]. New applications of mechatronic systems in the automotive world include semi-autonomous to fully autonomous automobiles, safety enhancements, emission reduction, and other features including intelligent cruise control, and brake by wire systems eliminating the hydraulics [23]. Another significant growth area that would benefit from a mechatronics design approach is wireless networking of automobiles to ground stations and vehicle-tovehicle communication. Telematics, which combines audio, hands-free cell phone, navigation, Internet connectivity, e-mail, and voice recognition, is perhaps the largest potential automotive growth area. In fact, the use of electronics in automobiles is expected to increase at an annual rate of 6% per year over the next five years, and the electronics functionality will double over the next five years [24]. Micro Electromechanical Systems (MEMS) is an enabling technology for the cost-effective development of sensors and actuators for mechatronics applications. Already, several MEMS devices are in use in automobiles, including sensors and actuators for airbag deployment and pressure sensors for manifold pressure measurement. Integrating MEMS devices with CMOS signal conditioning circuits on the same silicon chip is another example of development of enabling technologies that will improve mechatronic products, such as the automobile. Millimeter wave radar technology has recently found applications in automobiles. The millimeter wave radar detects the location of objects (other vehicles) in the scenery and the distance to the obstacle and the velocity in real-time. A detailed description of a working system is given by Suzuki et al. [25]. Figure 1.4 shows an illustration of the vehicle-sensing capability with a millimeter-waver radar. This technology provides the capability to control the distance between the vehicle and an obstacle (or another vehicle) by integrating the sensor with the cruise control and ABS systems. The driver is able to set the speed and the desired distance between the cars ahead of him. The ABS system and the cruise control system are coupled together to safely achieve this remarkable capability. One logical extension of the obstacle avoidance capability is slow speed semi-autonomous driving where the vehicle maintains a constant distance from the vehicle ahead in traffic jam conditions. Fully autonomous vehicles are well within the scope of mechatronics development within the next 20 years. Supporting investigations are underway in many research centers on development of semi-autonomous cars with reactive path planning using GPSbased continuous traffic model updates and stop-and-go automation. A proposed sensing and control ©2002 CRC Press LLC
FIGURE 1.4 Using a radar to measure distance and velocity to autonomously maintain desired distance between vehicles. (Adapted from Modern Control Systems, 9th ed., R. C. Dorf and R. H. Bishop, Prentice-Hall, 2001. Used with permission.)
FIGURE 1.5
Autonomous vehicle system design with sensors and actuators.
system for such a vehicle, shown in Fig. 1.5, involves differential global positioning systems (DGPS), realtime image processing, and dynamic path planning [26]. Future mechatronic systems on automobiles may include a fog-free windshield based on humidity and temperature sensing and climate control, self-parallel parking, rear parking aid, lane change assistance, fluidless electronic brake-by-wire, and replacement of hydraulic systems with electromechanical servo systems. As the number of automobiles in the world increases, stricter emission standards are inevitable. Mechatronic products will in all likelihood contribute to meet the challenges in emission control and engine efficiency by providing substantial reduction in CO, NO, and HC emissions and increase in vehicle ©2002 CRC Press LLC
efficiency [23]. Clearly, an automobile with 30–60 microcontrollers, up to 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. The automobile is being transformed into a comprehensive mechatronic system.
1.5 What is Mechatronics? And What’s Next? Mechatronics, the term coined in Japan in the 1970s, has evolved over the past 25 years and has led to a special breed of intelligent products. What is mechatronics? It is a natural stage in the evolutionary process of modern engineering design. For some engineers, mechatronics is nothing new, and, for others, it is a philosophical approach to design that serves as a guide for their activities. Certainly, mechatronics is an evolutionary process, not a revolutionary one. It is clear that an all-encompassing definition of mechatronics does not exist, but in reality, one is not needed. It is understood that mechatronics is about the synergistic integration of mechanical, electrical, and computer systems. One can understand the extent that mechatronics reaches into various disciplines by characterizing the constituent components comprising mechatronics, which include (i) physical systems modeling, (ii) sensors and actuators, (iii) signals and systems, (iv) computers and logic systems, and (v) software and data acquisition. Engineers and scientists from all walks of life and fields of study can contribute to mechatronics. As engineering and science boundaries become less well defined, more students will seek a multi-disciplinary education with a strong design component. Academia should be moving towards a curriculum, which includes coverage of mechatronic systems. In the future, growth in mechatronic systems will be fueled by the growth in the constituent areas. Advancements in traditional disciplines fuel the growth of mechatronics systems by providing “enabling technologies.” For example, the invention of the microprocessor had a profound effect on the redesign of mechanical systems and design of new mechatronics systems. We should expect continued advancements in cost-effective microprocessors and microcontrollers, sensor and actuator development enabled by advancements in applications of MEMS, adaptive control methodologies and real-time programming methods, networking and wireless technologies, mature CAE technologies for advanced system modeling, virtual prototyping, and testing. The continued rapid development in these areas will only accelerate the pace of smart product development. The Internet is a technology that, when utilized in combination with wireless technology, may also lead to new mechatronic products. While developments in automotives provide vivid examples of mechatronics development, there are numerous examples of intelligent systems in all walks of life, including smart home appliances such as dishwashers, vacuum cleaners, microwaves, and wireless network enabled devices. In the area of “human-friendly machines” (a term used by H. Kobayashi [27]), we can expect advances in robot-assisted surgery, and implantable sensors and actuators. Other areas that will benefit from mechatronic advances may include robotics, manufacturing, space technology, and transportation. The future of mechatronics is wide open.
References 1. Kyura, N. and Oho, H., “Mechatronics—an industrial perspective,” IEEE/ASME Transactions on Mechatronics, Vol. 1, No. 1, 1996, pp. 10–15. 2. Mori, T., “Mechatronics,” Yasakawa Internal Trademark Application Memo 21.131.01, July 12, 1969. 3. Harshama, F., Tomizuka, M., and Fukuda, T., “Mechatronics—What is it, why, and how?—an editorial,” IEEE/ASME Transactions on Mechatronics, Vol. 1, No. 1, 1996, pp. 1–4. 4. Auslander, D. M. and Kempf, C. J., Mechatronics: Mechanical System Interfacing, Prentice-Hall, Upper Saddle River, NJ, 1996. 5. Shetty, D. and Kolk, R. A., Mechatronic System Design, PWS Publishing Company, Boston, MA, 1997. 6. Bolton, W., Mechatronics: Electrical Control Systems in Mechanical and Electrical Engineering, 2nd Ed., Addison-Wesley Longman, Harlow, England, 1999. 7. Mayr, I. O., The Origins of Feedback Control, MIT Press, Cambridge, MA, 1970. ©2002 CRC Press LLC
8. Tomkinson, D. and Horne, J., Mechatronics Engineering, McGraw-Hill, New York, 1996. 9. Popov, E. P., The Dynamics of Automatic Control Systems; Gostekhizdat, Moscow, 1956; AddisonWesley, Reading, MA, 1962. 10. Dorf, R. C. and Bishop, R. H., Modern Control Systems, 9th Ed., Prentice-Hall, Upper Saddle River, NJ, 2000. 11. Maxwell, J. C., “On governors,” Proc. Royal Soc. London, 16, 1868; in Selected Papers on Mathematical Trends in Control Theory, Dover, New York, 1964, pp. 270–283. 12. Vyshnegradskii, I. A., “On controllers of direct action,” Izv. SPB Tekhnotog. Inst., 1877. 13. Bode, H. W., “Feedback—the history of an idea,” in Selected Papers on Mathematical Trends in Control Theory, Dover, New York, 1964, pp. 106–123. 14. Black, H. S., “Inventing the Negative Feedback Amplifier,” IEEE Spectrum, December 1977, pp. 55–60. 15. Brittain, J. E., Turning Points in American Electrical History, IEEE Press, New York, 1977. 16. Fagen, M. D., A History of Engineering and Science on the Bell Systems, Bell Telephone Laboratories, 1978. 17. Newton, G., Gould, L., and Kaiser, J., Analytical Design of Linear Feedback Control, John Wiley & Sons, New York, 1957. 18. Dorf, R. C. and Kusiak, A., Handbook of Automation and Manufacturing, John Wiley & Sons, New York, 1994. 19. Dorf, R. C., The Encyclopedia of Robotics, John Wiley & Sons, New York, 1988. 20. Asami, K., Nomura, Y., and Naganawa, T., “Traction Control (TRC) System for 1987 Toyota Crown, 1989,” ABS-TCS-VDC Where Will the Technology Lead Us? J. Mack, ed., Society of Automotive Engineers, Warrendale PA, 1996. 21. Pastor, S. et al., “Brake Control System,” United States Patent # 5,720,533, Feb. 24, 1998 (see http:// www.uspto.gov/ for more information). 22. Jorgensen, B., “Shifting gears,” Auto Electronics, Electronic Business, Feb. 2001. 23. Barron, M. B. and Powers, W. F., “The role of electronic controls for future automotive mechatronic systems,” IEEE/ASME Transactions on Mechatronics, Vol. 1, No. 1, 1996, pp. 80–88. 24. Kobe, G., “Electronics: What’s driving the growth?” Automotive Industries, August 2000. 25. Suzuki, H., Hiroshi, M. Shono, and Isaji, O., “Radar Apparatus for Detecting a Distance/Velocity,” United States Patent # 5,677,695, Oct 14, 1997 (see http://www.uspto.gov/ for more information). 26. Ramasubramanian, M. K., “Mechatronics—the future of mechanical engineering-past, present, and a vision for the future,” (Invited paper), Proc. SPIE, Vol. 4334-34, March 2001. 27. Kobayashi, H. (Guest Editorial), IEEE/ASME Transactions on Mechatronics, Vol. 2, No. 4, 1997, p. 217.
©2002 CRC Press LLC
2 Mechatronic Design Approach 2.1 2.2
Historical Development and Definition of Mechatronic Systems Functions of Mechatronic Systems Division of Functions Between Mechanics and Electronics • Improvement of Operating Properties • Addition of New Functions
2.3
Ways of Integration Integration of Components (Hardware) • Integration of Information Processing (Software)
2.4
Information Processing Systems (Basic Architecture and HW/SW Trade-offs) Multilevel Control Architecture • Special Signal Processing • Model-based and Adaptive Control Systems • Supervision and Fault Detection • Intelligent Systems (Basic Tasks)
2.5
Rolf Isermann Darmstadt University of Technology
Concurrent Design Procedure for Mechatronic Systems Design Steps • Required CAD/CAE Tools • Modeling Procedure • Real-Time Simulation • Hardware-in-the-Loop Simulation • Control Prototyping
2.1 Historical Development and Definition of Mechatronic Systems In several technical areas the integration of products or processes and electronics can be observed. This is especially true for mechanical systems which developed since about 1980. These systems changed from electro-mechanical systems with discrete electrical and mechanical parts to integrated electronic-mechanical systems with sensors, actuators, and digital microelectronics. These integrated systems, as seen in Table 2.1, are called mechatronic systems, with the connection of MECHAnics and elecTRONICS. The word “mechatronics” was probably first created by a Japanese engineer in 1969 [1], with earlier definitions given by [2] and [3]. In [4], a preliminary definition is given: “Mechatronics is the synergetic integration of mechanical engineering with electronics and intelligent computer control in the design and manufacturing of industrial products and processes” [5]. All these definitions agree that mechatronics is an interdisciplinary field, in which the following disciplines act together (see Fig. 2.1): • mechanical systems (mechanical elements, machines, precision mechanics); • electronic systems (microelectronics, power electronics, sensor and actuator technology); and • information technology (systems theory, automation, software engineering, artificial intelligence).
©2002 CRC Press LLC
TABLE 2.1
FIGURE 2.1
Historical Development of Mechanical, Electrical, and Electronic Systems
Mechatronics: synergetic integration of different disciplines.
Some survey contributions describe the development of mechatronics; see [5–8]. An insight into general aspects are given in the journals [4,9,10]; first conference proceedings in [11–15]; and the books [16–19]. Figure 2.2 shows a general scheme of a modern mechanical process like a power producing or a power generating machine. A primary energy flows into the machine and is then either directly used for the energy consumer in the case of an energy transformer, or converted into another energy form in the case of an energy converter. The form of energy can be electrical, mechanical (potential or kinetic, hydraulic, pneumatic), chemical, or thermal. Machines are mostly characterized by a continuous or periodic (repetitive) energy flow. For other mechanical processes, such as mechanical elements or precision mechanical devices, piecewise or intermittent energy flows are typical. ©2002 CRC Press LLC
FIGURE 2.2
Mechanical process and information processing develop towards mechatronic systems.
The energy flow is generally a product of a generalized flow and a potential (effort). Information on the state of the mechanical process can be obtained by measured generalized flows (speed, volume, or mass flow) or electrical current or potentials (force, pressure, temperature, or voltage). Together with reference variables, the measured variables are the inputs for an information flow through the digital electronics resulting in manipulated variables for the actuators or in monitored variables on a display. The addition and integration of feedback information flow to a feedforward energy flow in a basically mechanical system is one characteristic of many mechatronic systems. This development presently influences the design of mechanical systems. Mechatronic systems can be subdivided into: • • • • •
mechatronic systems mechatronic machines mechatronic vehicles precision mechatronics micro mechatronics
This shows that the integration with electronics comprises many classes of technical systems. In several cases, the mechanical part of the process is coupled with an electrical, thermal, thermodynamic, chemical, or information processing part. This holds especially true for energy converters as machines where, in addition to the mechanical energy, other kinds of energy appear. Therefore, mechatronic systems in a wider sense comprise mechanical and also non-mechanical processes. However, the mechanical part normally dominates the system. Because an auxiliary energy is required to change the fixed properties of formerly passive mechanical systems by feedforward or feedback control, these systems are sometimes also called active mechanical systems.
2.2 Functions of Mechatronic Systems Mechatronic systems permit many improved and new functions. This will be discussed by considering some examples.
Division of Functions between Mechanics and Electronics For designing mechatronic systems, the interplay for the realization of functions in the mechanical and electronic part is crucial. Compared to pure mechanical realizations, the use of amplifiers and actuators with electrical auxiliary energy led to considerable simplifications in devices, as can be seen from watches, ©2002 CRC Press LLC
electrical typewriters, and cameras. A further considerable simplification in the mechanics resulted from introducing microcomputers in connection with decentralized electrical drives, as can be seen from electronic typewriters, sewing machines, multi-axis handling systems, and automatic gears. The design of lightweight constructions leads to elastic systems which are weakly damped through the material. An electronic damping through position, speed, or vibration sensors and electronic feedback can be realized with the additional advantage of an adjustable damping through the algorithms. Examples are elastic drive chains of vehicles with damping algorithms in the engine electronics, elastic robots, hydraulic systems, far reaching cranes, and space constructions (with, for example, flywheels). The addition of closed loop control for position, speed, or force not only results in a precise tracking of reference variables, but also an approximate linear behavior, even though the mechanical systems show nonlinear behavior. By omitting the constraint of linearization on the mechanical side, the effort for construction and manufacturing may be reduced. Examples are simple mechanical pneumatic and electromechanical actuators and flow valves with electronic control. With the aid of freely programmable reference variable generation the adaptation of nonlinear mechanical systems to the operator can be improved. This is already used for the driving pedal characteristics within the engine electronics for automobiles, telemanipulation of vehicles and aircraft, in development of hydraulic actuated excavators, and electric power steering. With an increasing number of sensors, actuators, switches, and control units, the cable and electrical connections increase such that reliability, cost, weight, and the required space are major concerns. Therefore, the development of suitable bus systems, plug systems, and redundant and reconfigurable electronic systems are challenges for the designer.
Improvement of Operating Properties By applying active feedback control, precision is obtained not only through the high mechanical precision of a passively feedforward controlled mechanical element, but by comparison of a programmed reference variable and a measured control variable. Therefore, the mechanical precision in design and manufacturing may be reduced somewhat and more simple constructions for bearings or slideways can be used. An important aspect is the compensation of a larger and time variant friction by adaptive friction compensation [13,20]. Also, a larger friction on cost of backlash may be intended (such as gears with pretension), because it is usually easier to compensate for friction than for backlash. Model-based and adaptive control allow for a wide range of operation, compared to fixed control with unsatisfactory performance (danger of instability or sluggish behavior). A combination of robust and adaptive control allows a wide range of operation for flow-, force-, or speed-control, and for processes like engines, vehicles, or aircraft. A better control performance allows the reference variables to move closer to the constraints with an improvement in efficiencies and yields (e.g., higher temperatures, pressures for combustion engines and turbines, compressors at stalling limits, higher tensions and higher speed for paper machines and steel mills).
Addition of New Functions Mechatronic systems allow functions to occur that could not be performed without digital electronics. First, nonmeasurable quantities can be calculated on the basis of measured signals and influenced by feedforward or feedback control. Examples are time-dependent variables such as slip for tyres, internal tensities, temperatures, slip angle and ground speed for steering control of vehicles, or parameters like damping, stiffness coefficients, and resistances. The adaptation of parameters such as damping and stiffness for oscillating systems (based on measurements of displacements or accelerations) is another example. Integrated supervision and fault diagnosis becomes more and more important with increasing automatic functions, increasing complexity, and higher demands on reliability and safety. Then, the triggering of redundant components, system reconfiguration, maintenance-on-request, and any kind of teleservice make the system more “intelligent.” Table 2.2 summarizes some properties of mechatronic systems compared to conventional electro-mechanical systems. ©2002 CRC Press LLC
TABLE 2.2
Properties of Conventional and Mechatronic Design Systems
Conventional Design 1 2 3 4 5 6 7 8 9 10
Mechatronic Design
Added components Bulky Complex mechanisms Cable problems Connected components
Integration of components (hardware) Compact Simple mechanisms Bus or wireless communication Autonomous units
Simple control Stiff construction Feedforward control, linear (analog) control Precision through narrow tolerances Nonmeasurable quantities change arbitrarily Simple monitoring Fixed abilities
Integration by information processing (software) Elastic construction with damping by electronic feedback Programmable feedback (nonlinear) digital control Precision through measurement and feedback control Control of nonmeasurable estimated quantities Supervision with fault diagnosis Learning abilities
FIGURE 2.3
General scheme of a (classical) mechanical-electronic system.
2.3 Ways of Integration Figure 2.3 shows a general scheme of a classical mechanical-electronic system. Such systems resulted from adding available sensors, actuators, and analog or digital controllers to mechanical components. The limits of this approach were given by the lack of suitable sensors and actuators, the unsatisfactory life time under rough operating conditions (acceleration, temperature, contamination), the large space requirements, the required cables, and relatively slow data processing. With increasing improvements in miniaturization, robustness, and computing power of microelectronic components, one can now put more emphasis on electronics in the design of a mechatronic system. More autonomous systems can be envisioned, such as capsuled units with touchless signal transfer or bus connections, and robust microelectronics. The integration within a mechatronic system can be performed through the integration of components and through the integration of information processing.
Integration of Components (Hardware) The integration of components (hardware integration) results from designing the mechatronic system as an overall system and imbedding the sensors, actuators, and microcomputers into the mechanical process, as seen in Fig. 2.4. This spatial integration may be limited to the process and sensor, or to the process and actuator. Microcomputers can be integrated with the actuator, the process or sensor, or can be arranged at several places. Integrated sensors and microcomputers lead to smart sensors, and integrated actuators and microcomputers lead to smart actuators. For larger systems, bus connections will replace cables. Hence, there are several possibilities to build up an integrated overall system by proper integration of the hardware.
Integration of Information Processing (Software) The integration of information processing (software integration) is mostly based on advanced control functions. Besides a basic feedforward and feedback control, an additional influence may take place through the process knowledge and corresponding online information processing, as seen in Fig. 2.4. This means a processing of available signals at higher levels, including the solution of tasks like supervision ©2002 CRC Press LLC
FIGURE 2.4
Ways of integration within mechatronic systems.
with fault diagnosis, optimization, and general process management. The respective problem solutions result in real-time algorithms which must be adapted to the mechanical process properties, expressed by mathematical models in the form of static characteristics, or differential equations. Therefore, a knowledge base is required, comprising methods for design and information gaining, process models, and performance criteria. In this way, the mechanical parts are governed in various ways through higher level information processing with intelligent properties, possibly including learning, thus forming an integration by process-adapted software.
2.4 Information Processing Systems (Basic Architecture and HW/SW Trade-offs) The governing of mechanical systems is usually performed through actuators for the changing of positions, speeds, flows, forces, torques, and voltages. The directly measurable output quantities are frequently positions, speeds, accelerations, forces, and currents.
Multilevel Control Architecture The information processing of direct measurable input and output signals can be organized in several levels, as compared in Fig. 2.5. level 1: level 2: level 3: level 4: level 5:
low level control (feedforward, feedback for damping, stabilization, linearization) high level control (advanced feedback control strategies) supervision, including fault diagnosis optimization, coordination (of processes) general process management
Recent approaches to mechatronic systems use signal processing in the lower levels, such as damping, control of motions, or simple supervision. Digital information processing, however, allows for the solution of many tasks, like adaptive control, learning control, supervision with fault diagnosis, decisions ©2002 CRC Press LLC
FIGURE 2.5 Advanced intelligent automatic system with multi-control levels, knowledge base, inference mechanisms, and interfaces.
for maintenance or even redundancy actions, economic optimization, and coordination. The tasks of the higher levels are sometimes summarized as “process management.”
Special Signal Processing The described methods are partially applicable for nonmeasurable quantities that are reconstructed from mathematical process models. In this way, it is possible to control damping ratios, material and heat stress, and slip, or to supervise quantities like resistances, capacitances, temperatures within components, or parameters of wear and contamination. This signal processing may require special filters to determine amplitudes or frequencies of vibrations, to determine derivated or integrated quantities, or state variable observers.
Model-based and Adaptive Control Systems The information processing is, at least in the lower levels, performed by simple algorithms or softwaremodules under real-time conditions. These algorithms contain free adjustable parameters, which have to be adapted to the static and dynamic behavior of the process. In contrast to manual tuning by trial and error, the use of mathematical models allows precise and fast automatic adaptation. The mathematical models can be obtained by identification and parameter estimation, which use the measured and sampled input and output signals. These methods are not restricted to linear models, but also allow for several classes of nonlinear systems. If the parameter estimation methods are combined with appropriate control algorithm design methods, adaptive control systems result. They can be used for permanent precise controller tuning or only for commissioning [20]. ©2002 CRC Press LLC
FIGURE 2.6
Scheme for a model-based fault detection.
Supervision and Fault Detection With an increasing number of automatic functions (autonomy), including electronic components, sensors and actuators, increasing complexity, and increasing demands on reliability and safety, an integrated supervision with fault diagnosis becomes more and more important. This is a significant natural feature of an intelligent mechatronic system. Figure 2.6 shows a process influenced by faults. These faults indicate unpermitted deviations from normal states and can be generated either externally or internally. External faults can be caused by the power supply, contamination, or collision, internal faults by wear, missing lubrication, or actuator or sensor faults. The classical way for fault detection is the limit value checking of some few measurable variables. However, incipient and intermittant faults can not usually be detected, and an in-depth fault diagnosis is not possible by this simple approach. Model-based fault detection and diagnosis methods were developed in recent years, allowing for early detection of small faults with normally measured signals, also in closed loops [21]. Based on measured input signals, U(t), and output signals, Y(t), and process models, features are generated by parameter estimation, state and output observers, and parity equations, as seen in Fig. 2.6. These residuals are then compared with the residuals for normal behavior and with change detection methods analytical symptoms are obtained. Then, a fault diagnosis is performed via methods of classification or reasoning. For further details see [22,23]. A considerable advantage is if the same process model can be used for both the (adaptive) controller design and the fault detection. In general, continuous time models are preferred if fault detection is based on parameter estimation or parity equations. For fault detection with state estimation or parity equations, discrete-time models can be used. Advanced supervision and fault diagnosis is a basis for improving reliability and safety, state dependent maintenance, triggering of redundancies, and reconfiguration.
Intelligent Systems (Basic Tasks) The information processing within mechatronic systems may range between simple control functions and intelligent control. Various definitions of intelligent control systems do exist, see [24–30]. An intelligent control system may be organized as an online expert system, according to Fig. 2.5, and comprises • • • •
multi-control functions (executive functions), a knowledge base, inference mechanisms, and communication interfaces.
©2002 CRC Press LLC
The online control functions are usually organized in multilevels, as already described. The knowledge base contains quantitative and qualitative knowledge. The quantitative part operates with analytic (mathematical) process models, parameter and state estimation methods, analytic design methods (e.g., for control and fault detection), and quantitative optimization methods. Similar modules hold for the qualitative knowledge (e.g., in the form of rules for fuzzy and soft computing). Further knowledge is the past history in the memory and the possibility to predict the behavior. Finally, tasks or schedules may be included. The inference mechanism draws conclusions either by quantitative reasoning (e.g., Boolean methods) or by qualitative reasoning (e.g., possibilistic methods) and takes decisions for the executive functions. Communication between the different modules, an information management database, and the man– machine interaction has to be organized. Based on these functions of an online expert system, an intelligent system can be built up, with the ability “to model, reason and learn the process and its automatic functions within a given frame and to govern it towards a certain goal.” Hence, intelligent mechatronic systems can be developed, ranging from “low-degree intelligent” [13], such as intelligent actuators, to “fairly intelligent systems,” such as selfnavigating automatic guided vehicles. An intelligent mechatronic system adapts the controller to the mostly nonlinear behavior (adaptation), and stores its controller parameters in dependence on the position and load (learning), supervises all relevant elements, and performs a fault diagnosis (supervision) to request maintenance or, if a failure occurs, to request a fail safe action (decisions on actions). In the case of multiple components, supervision may help to switch off the faulty component and to perform a reconfiguration of the controlled process.
2.5 Concurrent Design Procedure for Mechatronic Systems The design of mechatronic systems requires a systematic development and use of modern design tools.
Design Steps Table 2.3 shows five important development steps for mechatronic systems, starting from a purely mechanical system and resulting in a fully integrated mechatronic system. Depending on the kind of mechanical system, the intensity of the single development steps is different. For precision mechanical devices, fairly integrated mechatronic systems do exist. The influence of the electronics on mechanical elements may be considerable, as shown by adaptive dampers, anti-lock system brakes, and automatic gears. However, complete machines and vehicles show first a mechatronic design of their elements, and then slowly a redesign of parts of the overall structure as can be observed in the development of machine tools, robots, and vehicle bodies.
Required CAD/CAE Tools The computer aided development of mechatronic systems comprises: 1. 2. 3. 4.
constructive specification in the engineering development stage using CAD and CAE tools, model building for obtaining static and dynamic process models, transformation into computer codes for system simulation, and programming and implementation of the final mechatronic software.
Some software tools are described in [31]. A broad range of CAD/CAE tools is available for 2D- and 3D-mechanical design, such as Auto CAD with a direct link to CAM (computer-aided manufacturing), and PADS, for multilayer, printed-circuit board layout. However, the state of computer-aided modeling is not as advanced. Object-oriented languages such as DYMOLA and MOBILE for modeling of large combined systems are described in [31–33]. These packages are based on specified ordinary differential ©2002 CRC Press LLC
TABLE 2.3
Steps in the Design of Mechatronic Systems Precision Mechanics
Mechanical Elements
Machines
Pure mechanical system 1. Addition of sensors, actuators, microelectronics, control functions 2. Integration of components (hardware integration) 3. Integration by information processing (software integration) 4. Redesign of mechanical system 5. Creation of synergetic effects Fully integrated mechatronic systems Examples
Sensors actuators disc-storages cameras
Suspensions dampers clutches gears brakes
Electric drives combustion engines mach. tools robots
The size of a circle indicates the present intensity of the respective mechatronic development step:
large,
medium,
little.
equations, algebraic equations, and discontinuities. A recent description of the state of computer-aided control system design can be found in [34]. For system simulation (and controller design), a variety of program systems exist, like ACSL, SIMPACK, MATLAB/SIMULINK, and MATRIX-X. These simulation techniques are valuable tools for design, as they allow the designer to study the interaction of components and the variations of design parameters before manufacturing. They are, in general, not suitable for realtime simulation.
Modeling Procedure Mathematical process models for static and dynamic behavior are required for various steps in the design of mechatronic systems, such as simulation, control design, and reconstruction of variables. Two ways to obtain these models are theoretical modeling based on first (physical) principles and experimental modeling (identification) with measured input and output variables. A basic problem of theoretical modeling of mechatronic systems is that the components originate from different domains. There exists a well-developed domain specific knowledge for the modeling of electrical circuits, multibody mechanical systems, or hydraulic systems, and corresponding software packages. However, a computer-assisted general methodology for the modeling and simulation of components from different domains is still missing [35]. The basic principles of theoretical modeling for system with energy flow are known and can be unified for components from different domains as electrical, mechanical, and thermal (see [36–41]). The modeling methodology becomes more involved if material flows are incorporated as for fluidics, thermodynamics, and chemical processes. ©2002 CRC Press LLC
A general procedure for theoretical modeling of lumped parameter processes can be sketched as follows [19]. 1. Definition of flows • energy flow (electrical, mechanical, thermal conductance) • energy and material flow (fluidic, thermal transfer, thermodynamic, chemical) 2. Definition of process elements: flow diagrams • sources, sinks (dissipative) • storages, transformers, converters 3. Graphical representation of the process model • multi-port diagrams (terminals, flows, and potentials, or across and through variables) • block diagrams for signal flow • bond graphs for energy flow 4. Statement of equations for all process elements (i) Balance equations for storage (mass, energy, momentum) (ii)Constitutive equations for process elements (sources, transformers, converters) (iii)Phenomenological laws for irreversible processes (dissipative systems: sinks) 5. Interconnection equations for the process elements • continuity equations for parallel connections (node law) • compatibility equations for serial connections (closed circuit law) 6. Overall process model calculation • establishment of input and output variables • state space representation • input/output models (differential equations, transfer functions) An example of steps 1–3 is shown in Fig. 2.7 for a drive-by-wire vehicle. A unified approach for processes with energy flow is known for electrical, mechanical, and hydraulic processes with incompressible fluids. Table 2.4 defines generalized through and across variables. In these cases, the product of the through and across variable is power. This unification enabled the formulation of the standard bond graph modeling [39]. Also, for hydraulic processes with compressible fluids and thermal processes, these variables can be defined to result in powers, as seen in Table 2.4. However, using mass flows and heat flows is not engineering practice. If these variables are used, socalled pseudo bond graphs with special laws result, leaving the simplicity of standard bond graphs. Bond graphs lead to a high-level abstraction, have less flexibility, and need additional effort to generate simulation algorithms. Therefore, they are not the ideal tool for mechatronic systems [35]. Also, the tedious work needed to establish block diagrams with an early definition of causal input/output blocks is not suitable. Development towards object-oriented modeling is on the way, where objects with terminals (cuts) are defined without assuming a causality in this basic state. Then, object diagrams are graphically represented, retaining an intuitive understanding of the original physical components [43,44]. Hence, theoretical modeling of mechatronic systems with a unified, transparent, and flexible procedure (from the basic components of different domains to simulation) are a challenge for further development. Many components show nonlinear behavior and nonlinearities (friction and backlash). For more complex process parts, multidimensional mappings (e.g., combustion engines, tire behavior) must be integrated. For verification of theoretical models, several well-known identification methods can be used, such as correlation analysis and frequency response measurement, or Fourier- and spectral analysis. Since some parameters are unknown or changed with time, parameter estimation methods can be applied, both, for models with continuous time or discrete time (especially if the models are linear in the parameters) [42,45,46]. For the identification and approximation of nonlinear, multi-dimensional characteristics, ©2002 CRC Press LLC
TABLE 2.4
Generalized Through and Across Variables for Processes with Energy Flow
System Electrical Magnetic Mechanical • translation • rotation Hydraulic Thermodynamic
Through Variables
Across Variables
Electric current Magnetic Flow
I F
Electric voltage Magnetic force
U Q
Force Torque Volume flow Entropy flow
F M V˙
Velocity Rotational speed Pressure Temperature
w ω p T
FIGURE 2.7 Different schemes for an automobile (as required for drive-by-wire-longitudinal control): (a) scheme of the components (construction map), (b) energy flow diagram (simplified), (c) multi-port diagram with flows and potentials, (d) signal flow diagram for multi-ports.
artificial neural networks (multilayer perceptrons or radial-basis-functions) can be expanded for nonlinear dynamic processes [47].
Real-Time Simulation Increasingly, real-time simulation is applied to the design of mechatronic systems. This is especially true if the process, the hardware, and the software are developed simultaneously in order to minimize iterative development cycles and to meet short time-to-market schedules. With regard to the required speed of computation simulation methods, it can be subdivided into 1. simulation without (hard) time limitation, 2. real-time simulation, and 3. simulation faster than real-time. Some application examples are given in Fig. 2.8. Herewith, real-time simulation means that the simulation of a component is performed such that the input and output signals show the same time-dependent ©2002 CRC Press LLC
FIGURE 2.8
Classification of simulation methods with regard to speed and application examples.
FIGURE 2.9
Classification of real-time simulation.
values as the real, dynamically operating component. This becomes a computational problem for processes which have fast dynamics compared to the required algorithms and calculation speed. Different kinds of real-time simulation methods are shown in Fig. 2.9. The reason for the real-time requirement is mostly that one part of the investigated system is not simulated but real. Three cases can be distinguished: 1. The real process can be operated together with the simulated control by using hardware other than the final hardware. This is also called “control prototyping.” 2. The simulated process can be operated with the real control hardware, which is called “hardwarein-the-loop simulation.” 3. The simulated process is run with the simulated control in real time. This may be required if the final hardware is not available or if a design step before the hardware-in-the-loop simulation is considered.
Hardware-in-the-Loop Simulation The hardware-in-the-loop simulation (HIL) is characterized by operating real components in connection with real-time simulated components. Usually, the control system hardware and software is the real system, as used for series production. The controlled process (consisting of actuators, physical processes, and sensors) can either comprise simulated components or real components, as seen in Fig. 2.10(a). In general, mixtures of the shown cases are realized. Frequently, some actuators are real and the process ©2002 CRC Press LLC
FIGURE 2.10
Real-time simulation: hybrid structures. (a) Hardware-in-the-loop simulation. (b) Control prototyping.
and the sensors are simulated. The reason is that actuators and the control hardware very often form one integrated subsystem or that actuators are difficult to model precisely and to simulate in real time. (The use of real sensors together with a simulated process may require considerable realization efforts, because the physical sensor input does not exist and must be generated artificially.) In order to change or redesign some functions of the control hardware or software, a bypass unit can be connected to the basic control hardware. Hence, hardware-in-the-loop simulators may also contain partially simulated (emulated) control functions. The advantages of the hardware-in-the-loop simulation are generally: • design and testing of the control hardware and software without operating a real process (“moving the process field into the laboratory”); • testing of the control hardware and software under extreme environmental conditions in the laboratory (e.g., high/low temperature, high accelerations and mechanical shocks, aggressive media, electro-magnetic compatibility); • testing of the effects of faults and failures of actuators, sensors, and computers on the overall system; • operating and testing of extreme and dangerous operating conditions; • reproducible experiments, frequently repeatable; • easy operation with different man-machine interfaces (cockpit-design and training of operators); and • saving of cost and development time.
Control Prototyping For the design and testing of complex control systems and their algorithms under real-time constraints, a real-time controller simulation (emulation) with hardware (e.g., off-the-shelf signal processor) other than the final series production hardware (e.g., special ASICS) may be performed. The process, the actuators, and sensors can then be real. This is called control prototyping (Fig. 2.10(b)). However, parts of the process or actuators may be simulated, resulting in a mixture of HIL-simulation and control prototyping. The advantages are mainly: • early development of signal processing methods, process models, and control system structure, including algorithms with high level software and high performance off-the-shelf hardware; • testing of signal processing and control systems, together with other design of actuators, process parts, and sensor technology, in order to create synergetic effects; ©2002 CRC Press LLC
• reduction of models and algorithms to meet the requirements of cheaper mass production hardware; and • defining the specifications for final hardware and software. Some of the advantages of HIL-simulation also hold for control prototyping. Some references for realtime simulation are [48,49].
References 1. Kyura, N. and Oho, H., Mechatronics—an industrial perspective. IEEE/ASME Transactions on Mechatronics, 1(1):10–15. 2. Schweitzer, G., Mechatronik-Aufgaben und Lösungen. VDI-Berichte Nr. 787. VDI-Verlag, Düsseldorf, 1989. 3. Ovaska, S. J., Electronics and information technology in high range elevator systems. Mechatronics, 2(1):89–99, 1992. 4. IEEE/ASME Transactions on Mechatronics, 1996. 5. Harashima, F., Tomizuka, M., and Fukuda, T., Mechatronics—“What is it, why and how?” An editorial. IEEE/ASME Transactions on Mechatronics, 1(1):1–4, 1996. 6. Schweitzer, G., Mechatronics—a concept with examples in active magnetic bearings. Mechatronics, 2(1):65–74, 1992. 7. Gausemeier, J., Brexel, D., Frank, Th., and Humpert, A., Integrated product development. In Third Conf. Mechatronics and Robotics, Paderborn, Germany, Okt. 4–6, 1995. Teubner, Stuttgart, 1995. 8. Isermann, R., Modeling and design methodology for mechatronic systems. IEEE/ASME Transactions on Mechatronics, 1(1):16–28, 1996. 9. Mechatronics: An International Journal. Aims and Scope. Pergamon Press, Oxford, 1991. 10. Mechatronics Systems Engineering: International Journal on Design and Application of Integrated Electromechanical Systems. Kluwer Academic Publishers, Nethol, 1993. 11. IEE, Mechatronics: Designing intelligent machines. In Proc. IEE-Int. Conf. 12–13 Sep., Univ. of Cambridge, 1990. 12. Hiller, M. (ed.), Second Conf. Mechatronics and Robotics. September 27–29, Duisburg/Moers, Germany, 1993. Moers, IMECH, 1993. 13. Isermann, R. (ed.), Integrierte mechanisch elektroni-sche Systeme. March 2–3, Darmstadt, Germany, 1993. Fortschr.-Ber. VDI Reihe 12 Nr. 179. VDI-Verlag, Düsseldorf, 1993. 14. Lückel, J. (ed.), Third Conf. Mechatronics and Robotics, Paderborn, Germany, Oct. 4–6, 1995. Teubner, Stuttgart, 1995. 15. Kaynak, O., Özkan, M., Bekiroglu, N., and Tunay, I. (eds.), Recent advances in mechatronics. In Proc. Int. Conf. Recent Advances in Mechatronics, August 14–16, 1995, Istanbul, Turkey. 16. Kitaura, K., Industrial mechatronics. New East Business Ltd., in Japanese, 1991. 17. Bradley, D. A., Dawson, D., Burd, D., and Loader, A. J., Mechatronics-Electronics in Products and Processes. Chapman and Hall, London, 1991. 18. McConaill, P. A., Drews, P., and Robrock, K. H., Mechatronics and Robotics I. IOS-Press, Amsterdam, 1991. 19. Isermann, R., Mechatronische Systeme. Springer, Berlin, 1999. 20. Isermann, R., Lachmann, K. H., and Matko, D., Adaptive Control Systems, Prentice-Hall, London, 1992. 21. Isermann, R., Supervision, fault detection and fault diagnosis methods—advanced methods and applications. In Proc. XIV IMEKO World Congress, Vol. 1, pp. 1–28, Tampere, Finland, 1997. 22. Isermann, R., Supervision, fault detection and fault diagnosis methods—an introduction, special section on supervision, fault detection and diagnosis. Control Engineering Practice, 5(5):639–652, 1997. 23. Isermann, R. (ed.), Special section on supervision, fault detection and diagnosis. Control Engineering Practice, 5(5):1997. ©2002 CRC Press LLC
24. Saridis, G. N., Self Organizing Control of Stochastic Systems. Marcel Dekker, New York, 1977. 25. Saridis, G. N. and Valavanis, K. P., Analytical design of intelligent machines. Automatica, 24:123– 133, 1988. 26. Åström, K. J., Intelligent control. In Proc. European Control Conf., Grenoble, 1991. 27. White, D. A. and Sofge, D. A. (eds.), Handbook of Intelligent Control. Van Norstrad, Reinhold, New York, 1992. 28. Antaklis, P., Defining intelligent control. IEEE Control Systems, Vol. June: 4–66, 1994. 29. Gupta, M. M. and Sinha, N. K., Intelligent Control Systems. IEEE-Press, New York, 1996. 30. Harris, C. J. (ed.), Advances in Intelligent Control. Taylor & Francis, London, 1994. 31. Otter, M. and Gruebel, G., Direct physical modeling and automatic code generation for mechatronics simulation. In Proc. 2nd Conf. Mechatronics and Robotics, Duisburg, Sep. 27–29, IMECH, Moers, 1993. 32. Elmquist, H., Object-oriented modeling and automatic formula manipulation in Dymola, Scandin. Simul. Society SIMS, June, Kongsberg, 1993. 33. Hiller, M., Modelling, simulation and control design for large and heavy manipulators. In Proc. Int. Conf. Recent Advances in Mechatronics. 1:78–85, Istanbul, Turkey, 1995. 34. James, J., Cellier, F., Pang, G., Gray, J., and Mattson, S. E., The state of computer-aided control system design (CACSD). IEEE Transactions on Control Systems, Special Issue, April 6–7 (1995). 35. Otter, M. and Elmqvist, H., Energy flow modeling of mechatronic systems via object diagrams. In Proc. 2nd MATHMOD, Vienna, 705–710, 1997. 36. Paynter, H. M., Analysis and Design of Engineering Systems. MIT Press, Cambridge, 1961. 37. MacFarlane, A. G. J., Engineering Systems Analysis. G. G. Harrop, Cambridge, 1964. 38. Wellstead, P. E., Introduction to Physical System Modelling. Academic Press, London, 1979. 39. Karnopp, D. C., Margolis, D. L., and Rosenberg, R. C., System Dynamics. A Unified Approach. J. Wiley, New York, 1990. 40. Cellier, F. E., Continuous System Modelling. Springer, Berlin, 1991. 41. Gawtrop, F. E. and Smith, L., Metamodelling: Bond Graphs and Dynamic Systems. Prentice-Hall, London, 1996. 42. Eykhoff, P., System Identification. John Wiley & Sons, London, 1974. 43. Elmqvist, H., A structured model language for large continuous systems. Ph.D. Dissertation, Report CODEN: LUTFD2/(TFRT-1015) Dept. of Aut. Control, Lund Institute of Technology, Sweden, 1978. 44. Elmqvist, H. and Mattson, S. E., Simulator for dynamical systems using graphics and equations for modeling. IEEE Control Systems Magazine, 9(1):53–58, 1989. 45. Isermann, R., Identifikation dynamischer Systeme. 2nd Ed., Vol. 1 and 2. Springer, Berlin, 1992. 46. Ljung, L., System Identification: Theory for the User. Prentice-Hall, Englewood Cliffs, NJ, 1987. 47. Isermann, R., Ernst, S., and Nelles, O., Identification with dynamic neural networks—architectures, comparisons, applications—Plenary. In Proc. IFAC Symp. System Identification (SYSID’97), Vol. 3, pp. 997–1022, Fukuoka, Japan, 1997. 48. Hanselmann, H., Hardware-in-the-loop simulation as a standard approach for development, customization, and production test, SAE 930207, 1993. 49. Isermann, R., Schaffnit, J., and Sinsel, S., Hardware-in-the-loop simulation for the design and testing of engine control systems. Control Engineering Practice, 7(7):643–653, 1999.
©2002 CRC Press LLC
3 System Interfacing, Instrumentation, and Control Systems 3.1
Introduction The Mechatronic System • A Home/Office Example • An Automotive Example
3.2
Input Signals of a Mechatronic System Transducer/Sensor Input • Analog-to-Digital Converters
3.3
Output Signals of a Mechatronic System Digital-to-Analog Converters • Actuator Output
3.4
Signal Conditioning Sampling Rate • Filtering • Data Acquisition Boards
3.5
Microprocessor Control PID Control • Programmable Logic Controllers • Microprocessors
3.6
Microprocessor Numerical Control
3.7
Microprocessor Input–Output Contro
Fixed-Point Mathematics • Calibrations Polling and Interrupts • Input and Output Transmission • HC12 Microcontroller Input–Output Subsystems • Microcontroller Network Systems
3.8
Software Control Systems Engineering • Software Engineering • Software Design
3.9
Rick Homkes Purdue University
Testing and Instrumentation Verification and Validation • Debuggers • Logic Analyzer
3.10 Summary
3.1 Introduction The purpose of this chapter is to introduce a number of topics dealing with a mechatronic system. This starts with an overview of mechatronic systems and a look at the input and output signals of a mechatronic system. The special features of microprocessor input and output are next. Software, an often-neglected portion of a mechatronic system, is briefly covered with an emphasis on software engineering concepts. The chapter concludes with a short discussion of testing and instrumentation.
©2002 CRC Press LLC
The Mechatronic System Figure 3.1 shows a typical mechatronic system with mechanical, electrical, and computer components. The process of system data acquisition begins with the measurement of a physical value by a sensor. The sensor is able to generate some form of signal, generally an analog signal in the form of a voltage level or waveform. This analog signal is sent to an analog-to-digital converter (ADC). Commonly using a process of successive approximation, the ADC maps the analog input signal to a digital output. This digital value is composed of a set of binary values called bits (often represented by 0s and 1s). The set of bits represents a decimal or hexadecimal number that can be used by the microcontroller. The microcontroller consists of a microprocessor plus memory and other attached devices. The program in the microprocessor uses this digital value along with other inputs and preloaded values called calibrations to determine output commands. Like the input to the microprocessor, these outputs are in digital form and can be represented by a set of bits. A digital-to-analog converter (DAC) is then often used to convert the digital value into an analog signal. The analog signal is used by an actuator to control a physical device or affect the physical environment. The sensor then takes new measurements and the process repeated, thus completing a feedback control loop. Timing for this entire operation is synchronized by the use of a clock.
A Home/Office Example An example of a mechatronic system is the common heating/cooling system for homes and offices. Simple systems use a bimetal thermostat with contact points controlling a mercury switch that turns on and off the furnace or air conditioner. A modern environmental control system uses these same basic components along with other components and computer program control. A temperature sensor monitors the physical environment and produces a voltage level as demonstrated in Fig. 3.2 (though generally not nearly such a smooth function). After conversion by the ADC, the microcontroller uses the digitized temperature Physical Device
Measurement
Sensor
Analog
ADC
Digital
Microprocessor Control
Control
Digital
DAC
Clock Pulse
Clock pulse
Microprocessor control system.
FIGURE 3.2
Voltage levels.
Voltage Level Output (0 - 5 volts)
FIGURE 3.1
Clock Pulse
Clock
©2002 CRC Press LLC
Temperature
Analog
Actuator
data along with a 24-hour clock and the user requested temperatures to produce a digital control signal. This signal directs the actuator, usually a simple electrical switch in this example. The switch, in turn, controls a motor to turn the heating or cooling unit on or off. New measurements are then taken and the cycle is repeated. While not a mechatronic product on the order of a camcorder, it is a mechatronic system because of its combination of mechanical, electrical, and computer components. This system may also incorporate some additional features. If the temperature being sensed is quite high, say 80°C, it is possible that a fire exists. It is then not a good idea to turn on the blower fan and feed the fire more oxygen. Instead the system should set off an alarm or use a data communication device to alert the fire department. Because of this type of computer control, the system is “smart,” at least relative to the older mercury-switch controlled systems.
An Automotive Example A second example is the Antilock Braking System (ABS) found in many vehicles. The entire purpose of this type of system is to prevent a wheel from locking up and thus having the driver loose directional control of the vehicle due to skidding. In this case, sensors attached to each wheel determine the rotational speed of the wheels. These data, probably in a waveform or time-varied electrical voltage, is sent to the microcontroller along with the data from sensors reporting inputs such as brake pedal position, vehicle speed, and yaw. After conversion by the ADC or input capture routine into a digital value, the program in the microprocessor then determines the necessary action. This is where the aspect of human computer interface (HCI) or human machine interface (HMI) comes into play by taking account of the “feel” of the system to the user. System calibration can adjust the response to the driver while, of course, stopping the vehicle by controlling the brakes with the actuators. There are two important things to note in this example. The first is that, in the end, the vehicle is being stopped because of hydraulic forces pressing the brake pad against a drum or rotor—a purely mechanical function. The other is that the ABS, while an “intelligent product,” is not a stand-alone device. It is part of a larger system, the vehicle, with multiple microcontrollers working together through the data network of the vehicle.
3.2 Input Signals of a Mechatronic System Transducer/Sensor Input All inputs to mechatronic systems come from either some form of sensory apparatus or communications from other systems. Sensors were first introduced in the previous section and will be discussed in much more depth in Chapter 19. Transducers, devices that convert energy from one form to another, are often used synonymously with sensors. Transducers and their properties will be explained fully in Chapter 45. Sensors can be divided into two general classifications, active or passive. Active sensors emit a signal in order to estimate an attribute of the environment or device being measured. Passive sensors do not. A military example of this difference would be a strike aircraft “painting” a target using either active laser radar (LADAR) or a passive forward looking infrared (FLIR) sensor. As stated in the Introduction section, the output of a sensor is usually an analog signal. The simplest type of analog signal is a voltage level with a direct (though not necessarily linear) correlation to the input condition. A second type is a pulse width modulated (PWM) signal, which will be explained further in a later section of this chapter when discussing microcontroller outputs. A third type is a waveform, as shown in Fig. 3.3. This type of signal is modulated either in its amplitude (Fig. 3.4) or its frequency (Fig. 3.5) or, in some cases, both. These changes reflect the changes in the condition being monitored. There are sensors that do not produce an analog signal. Some of these sensors produce a square wave as in Fig. 3.6 that is input to the microcontroller using the EIA 232 communications standard. The square wave represents the binary values of 0 and 1. In this case the ADC is probably on-board the sensor itself, adding to the cost of the sensor. Some sensors/recorders can even create mail or TCP/IP packets as output. An example of this type of unit is the MV100 MobileCorder from Yokogawa Corporation of America. ©2002 CRC Press LLC
Amplitude
T = Time = Period f = frequency = 1 / T
t = time
Peak to Peak Amplitude
FIGURE 3.3
Sine wave.
Amplitude
t = time
FIGURE 3.4
Amplitude modulation.
Amplitude
t = time
FIGURE 3.5
Frequency modulation.
Amplitude
T = Time = Period
t = time
FIGURE 3.6
Square wave.
©2002 CRC Press LLC
Analog-to-Digital Converters The ADC can basically be typed by two parameters: the analog input range and the digital output range. As an example, consider an ADC that is converting a voltage level ranging 0–12 V into a single byte of 8 bits. In this example, each binary count increment reflects an increase in analog voltage of 1/256 of the maximum 12 V. There is an unusual twist to this conversion, however. Since a zero value represents 0 V, and a 128 value represents half of the maximum value, 6 V in this example, the maximum decimal value of 255 represents 255/256 of the maximum voltage value, or 11.953125 V. A table of the equivalent values is shown below: Binary 0000 0000 1000 1111
0000 0001 0000 1111
Decimal
Voltage
0 1 128 255
0.0 0.00390625 6.0 11.953125
An ADC that is implemented in the Motorola HC12 microcontroller produces 10 bits. While not fitting so nicely into a single byte of data, this 10-bit ADC does give additional resolution. Using an input range from 0 to 5 V, the decimal resolution per least significant bit is 4.88 mV. If the ADC had 8 bits of output, the resolution per bit would be 19.5 mV, a fourfold difference. Larger voltages, e.g., from 0 to 12 V, can be scaled with a voltage divider to fit the 0–5 V range. Smaller voltages can be amplified to span the entire range. A process known as successive approximation (using the Successive Approximation Register or SAR in the Motorola chip) is used to determine the correct digital value.
3.3 Output Signals of a Mechatronic System Digital-to-Analog Converters The output command from the microcontroller is a binary value in bit, byte (8 bits), or word (16 bits) form. This digital signal is converted to analog using a digital-to-analog converter, or DAC. Let us examine converting an 8-bit value into a voltage level between 0 and 12 V. The most significant bit in the binary value to be converted (decimal 128) creates an analog value equal to half of the maximum output, or 6 V. The next digit produces an additional one fourth, or 3 V, the next an additional one eighth, and so forth. The sum of all these weighted output values represents the appropriate analog voltage. As was mentioned in a previous section, the maximum voltage value in the range is not obtainable, as the largest value generated is 255/256 of 12 V, or 11.953125 V. The smoothness of the signal representation depends on the number of bits accepted by the DAC and the range of the output required. Figure 3.7 demonstrates a simplified step function using a one-byte binary input and 12-V analog output.
Voltage Level Output ( 0 - 12 volts ) 8 bit Value Input ( 0-255 decimal )
FIGURE 3.7
DAC stepped output.
©2002 CRC Press LLC
Amplitude
T = Time = Period
t = time 50% Duty Cycle
FIGURE 3.8
20% Duty Cycle
Pulse width modulation.
Actuator Output Like sensors, actuators were first introduced in a previous section and will be described in detail in a later chapter of this handbook. The three common actuators that this section will review are switches, solenoids, and motors. Switches are simple state devices that control some activity, like turning on and off the furnace in a house. Types of switches include relays and solid-state devices. Solid-state devices include diodes, thyristors, bipolar transistors, field-effect transistors (FETs), and metal-oxide field-effect transistors (MOSFETs). A switch can also be used with a sensor, thus turning on or off the entire sensor, or a particular feature of a sensor. Solenoids are devices containing a movable iron core that is activated by a current flow. The movement of this core can then control some form of hydraulic or pneumatic flow. Applications are many, including braking systems and industrial production of fluids. More information on solenoid actuators can be found in a later chapter. Motors are the last type of actuator that will be summarized here. There are three main types: direct current (DC), alternating current (AC), and stepper motors. DC motors may be controlled by a fixed DC voltage or by pulse width modulation (PWM). In a PWM signal, such as shown in Fig. 3.8, a voltage is alternately turned on and off while changing (modulating) the width of the on-time signal, or duty cycle. AC motors are generally cheaper than DC motors, but require variable frequency drive to control the rotational speed. Stepper motors move by rotating a certain number of degrees in response to an input pulse.
3.4 Signal Conditioning Signal conditioning is the modification of a signal to make it more useful to a system. Two important types of signal conditioning are, of course, the conversion between analog and digital, as described in the previous two sections. Other types of signal conditioning are briefly covered below, with a full coverage reserved for Chapters 46 and 47.
Sampling Rate The rate at which data samples are taken obviously affects the speed at which the mechatronic system can detect a change in situation. There are several things to consider, however. For example, the response of a sensor may be limited in time or range. There is also the time required to convert the signal into a form usable by the microprocessor, the A to D conversion time. A third is the frequency of the signal being sampled. For voice digitalization, there is a very well-known sampling rate of 8000 samples per second. This is a result of the Nyquist theorem, which states that the sampling rate, to be accurate, must be at least twice the maximum frequency being measured. The 8000 samples per second rate thus works well for converting human voice over an analog telephone system where the highest frequency is approximately 3400 Hz. Lastly, the clock speed of the microprocessor must also be considered. If the ADC and DAC are
©2002 CRC Press LLC
Cutoff Frequency Low Pass Band Output Frequency
FIGURE 3.9
Low-pass filter.
on the same board as the microprocessor, they will often share a common clock. The microprocessor clock, however, may be too fast for the ADC and DAC. In this case, a prescaler is used to divide the clock frequency to a level usable by the ADC and DAC.
Filtering Filtering is the attenuation (lessening) of certain frequencies from a signal. This process can remove noise from a signal and condition the line for better data transmission. Filters can be divided into analog and digital types, the analog filters being further divided into passive and active types. Analog passive filters use resistors, capacitors, and inductors. Analog active filters typically use operational amplifiers with resistors and capacitors. Digital filters may be implemented with software and/or hardware. The software component gives digital filters the feature of being easier to change. Digital filters are explained fully in Chapter 29. Filters may also be differentiated by the type of frequencies they affect. 1. Low-pass filters allow lower set of frequencies to pass through, while high frequencies are attenuated. A simplistic example of this is shown in Fig. 3.9. 2. High-pass filters, the opposite of low-pass, filter a lower frequency band while allowing higher frequencies to pass. 3. Band-pass filters allow a particular range of frequencies to pass; all others are attenuated. 4. Band-stop filters stop a particular range of frequencies while all others are allowed to pass. There are many types and applications of filters. For example, William Ribbens in his book Understanding Automotive Electronics (Newnes 1998) described a software low-pass filter (sometimes also called a lag filter) that averages the last 60 fuel tank level samples taken at 1 s intervals. The filtered data are then displayed on the vehicle instrument cluster. This type of filtering reduces large and quick fluctuations in the fuel gauge due to sloshing in the tank, and thus displays a more accurate value.
Data Acquisition Boards There is a special type of board that plugs into a slot in a desktop personal computer that can be used for many of the tasks above. It is called a data acquisition board, or DAQ board. This type of board can generate analog input and multiplex multiple input signals onto a single bus for transmission to the PC. It can also come with signal conditioning hardware/software and an ADC. Some units have direct memory access (DMA), where the device writes the data directly into computer memory without using the microprocessor. While desktop PCs are not usually considered as part of a mechatronic system, the DAQ board can be very useful for instrumentation.
©2002 CRC Press LLC
3.5 Microprocessor Control PID Control A closed loop control system is one that determines a difference in the desired and actual condition (the error) and creates a correction control command to remove this error. PID control demonstrates three ways of looking at this error and correcting it. The first way is the P of PID, the proportional term. This term represents the control action made by the microcontroller in proportion to the error. In other words, the bigger the error, the bigger the correction. The I in PID is for the integral of the error over time. The integral term produces a correction that considers the time the error has been present. Stated in other words, the longer the error continues, the bigger the correction. Lastly, the D in PID stands for derivative. In the derivative term, the corrective action is related to the derivative or change of the error with respect to time. Stated in other words, the faster the error is changing, the bigger the correction. Control systems can use P, PI, PD, or PID in creating corrective actions. The problem generally is “tuning” the system by selecting the proper values in the terms. For more information on control design, see Chapter 31.
Programmable Logic Controllers Any discussion of control systems and microprocessor control should start with the first type of “mechatronic” control, the programmable logic controller or PLC. A PLC is a simpler, more rugged microcontroller designed for environments like a factory floor. Input is usually from switches such as push buttons controlled by machine operators or position sensors. Timers can also be programmed in the PLC to run a particular process for a set amount of time. Outputs include lamps, solenoid valves, and motors, with the input–output interfacing done within the controller. A simple programming language used with a PLC is called ladder logic or ladder programming. Ladder logic is a graphical language showing logic as a combination of series (and’s) and parallel (or’s) blocks. Additional information can be found in Chapter 43 and in the book Programmable Logic Controllers by W. Bolton (Newnes 1996).
Microprocessors A full explanation of a microprocessor is found in section 5.8. For this discussion of microprocessors and control, we need only know a few of the component parts of computer architecture. RAM, or random access memory, is the set of memory locations the computer uses for fast temporary storage. The radio station presets selected by the driver (or passenger) in the car radio are stored in RAM. A small electrical current maintains these stored frequencies, so disconnection of the radio from the battery will result in their loss. ROM, or read only memory, is the static memory that contains the program to run the microcontroller. Thus the radio’s embedded program will not be lost when the battery is disconnected. There are several types of ROM, including erasable programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), and flash memory (a newer type of EEPROM). These types will be explained later in this handbook. There are also special memory areas in a microprocessor called registers. Registers are very fast memory locations that temporarily store the address of the program instruction being executed, intermediate values needed to complete a calculation, data needed for comparison, and data that need to be input or output. Addresses and data are moved from one point to another in RAM, ROM, and registers using a bus, a set of lines transmitting data multiple bits simultaneously.
3.6 Microprocessor Numerical Control Fixed-Point Mathematics The microprocessors in an embedded controller are generally quite small in comparison to a personal computer or computer workstation. Adding processing power in the form of a floating-point processor and additional RAM or ROM is not always an option. This means that sometimes the complex mathematical ©2002 CRC Press LLC
functions needed in a control system are not available. However, sometimes the values being sensed and computed, though real numbers, are of a reasonable range. Because of this situation there exists a special type of arithmetic whereby microcontrollers use integers in place of floating-point numbers to compute non-whole number (pseudo real) values. There are several forms of fixed-point mathematics currently in use. The simplest form is based upon powers of 2, just like normal integers in binary. However, a virtual binary point is inserted into the integer to allow an approximation of real values to be stored as integers. A standard 8-bit unsigned integer is shown below along with its equivalent decimal value. 4
2
0001 0100 = (1 * 2 ) + (1 * 2 ) = (1 * 16) + (1 * 4) = 20 Suppose a virtual binary point is inserted between the two nibbles in the byte. There are now four bits left of the binary point with the standard positive powers of 2, and 4 bits right of the binary point with negative powers of 2. The same number now represents a real number in decimal. 0
-2
0001 0100 = (1 * 2 ) + (1 * 2 ) = (1 * 1 ) + (1 * 0.25) = 1.25 Obviously this method has shortcomings. The resolution of any fixed point number is limited to the -4 power of 2 attached to the least significant bit on the right of the number, in this case 2 or 1/16 or 0.0625. Rounding is sometimes necessary. There is also a tradeoff in complexity, as the position of this virtual binary point must constantly be maintained when performing calculations. The savings in memory usage and processing time, however, often overcome these tradeoffs; so fixed-point mathematics can be very useful.
Calibrations The area of calibrating a system can sometimes take on an importance not foreseen when designing a mechatronic system. The use of calibrations, numerical and logical values kept in EEPROM or ROM, allow flexibility in system tuning and implementation. For example, if different microprocessor crystal speeds may be used in a mechatronic system, but real-time values are needed, a stored calibration constant of clock cycles per microsecond will allow this calculation to be affected. Thus, calibrations are often used as a gain, the value multiplied by some input in order to produce a scaled output. Also, as mentioned above, calibrations are often used in the testing of a mechatronic system in order to change the “feel” of the product. A transmission control unit can use a set of calibrations on engine RPM, engine load, and vehicle speed to determine when to shift gears. This is often done with hysteresis, as the shift points moving from second gear to third gear as from third gear to second gear may differ.
3.7 Microprocessor Input–Output Control Polling and Interrupts There are two basic methods for the microprocessor to control input and output. These are polling and interrupts. Polling is just that, the microprocessor periodically checking various peripheral devices to determine if input or output is waiting. If a peripheral device has some input or output that should be processed, a flag will be set. The problem is that a lot of processing time is wasted checking for inputs when they are not changing. Servicing an interrupt is an alternative method to control inputs and outputs. In this method, a register in the microprocessor must have set an interrupt enable (IE) bit for a particular peripheral device. When an interrupt is initiated by the peripheral, a flag is set for the microprocessor. The interrupt request (IRQ) line will go active, and the microprocessor will service the interrupt. Servicing an interrupt means that the normal processing of the microprocessor is halted (i.e., interrupted) while the input/output is completed. In order to resume normal processing, the microprocessor needs to store the contents of its registers before the interrupt is serviced. This process includes saving all active register contents to a stack, a part ©2002 CRC Press LLC
of RAM designated for this purpose, in a process known as a push. After a push, the microprocessor can then load the address of the Interrupt Service Routine and complete the input/output. When that portion of code is complete, the contents of the stack are reloaded to the registers in an operation known as a Pop (or Pull) and normal processing resumes.
Input and Output Transmission Once the input or output is ready for transmission, there are several modes that can be used. First, data can be moved in either parallel or serial mode. Parallel mode means that multiple bits (e.g., 16 bits) move in parallel down a multiple pathway or bus from source to destination. Serial mode means that the bits move one at a time, in a series, down a single pathway. Parallel mode traffic is faster in that multiple bits are moving together, but the number of pathways is a limiting factor. For this reason parallel mode is usually used for components located close to one another while serial transmission is used if any distance is involved. Serial data transmission can also be differentiated by being asynchronous or synchronous. Asynchronous data transmission uses separate clocks between the sender and receiver of data. Since these clocks are not synchronized, additional bits called start and stop bits are required to designate the boundaries of the bytes being sent. Synchronous data transmission uses a common or synchronized timing source. Start and stop bits are thus not needed, and overall throughput is increased. A third way of differentiating data transmission is by direction. A simplex line is a one direction only pathway. Data from a sensor to the microcontroller may use simplex mode. Half-duplex mode allows two-way traffic, but only one direction at a time. This requires a form of flow control to avoid data transmission errors. Full-duplex mode allows two-way simultaneous transmission of data. The agreement between sending and receiving units regarding the parameters of data transmission (including transmission speed) is known as handshaking.
HC12 Microcontroller Input–Output Subsystems There are four input–output subsystems on the Motorola HC12 microcontroller that can be used to exemplify the data transmission section above. The serial communications interface (SCI) is an asynchronous serial device available on the HC12. It can be either polled or interrupt driven and is intended for communication between remote devices. Related to SCI is the serial peripheral interface (SPI). SPI is a synchronous serial interface. It is intended for communication between units that support SPI like a network of multiple microcontrollers. Because of the synchronization of timing that is required, SPI uses a system of master/slave relationships between microcontrollers. The pulse width modulation (PWM) subsystem is often used for motor and solenoid control. Using registers that are mapped to both the PWM unit and the microprocessor, a PWM output can be commanded by setting values for the period and duty cycle in the proper registers. This will result in a particular on-time and off-time voltage command. Last, the serial in-circuit debugger (SDI) allows the microcontroller to connect to a PC for checking and modifying embedded software.
Microcontroller Network Systems There is one last topic that should be mentioned in this section on inputs and outputs. Mechatronic systems often work with other systems in a network. Data and commands are thus transmitted from one system to another. While there are many different protocols, both open and proprietary, that could be mentioned about this networking, two will serve our purposes. The first is the manufacturing automation protocol (MAP) that was developed by General Motors Corporation. This system is based on the ISO Open Systems Interconnection (OSI) model and is especially designed for computer integrated manufacturing (CIM) and multiple PLCs. The second is the controller area network (CAN). This standard for serial communications was developed by Robert Bosch GmbH for use among embedded systems in a car. ©2002 CRC Press LLC
Systems Engineering
Mechanical Engineering
Electrical Engineering
Software Engineering
FIGURE 3.10
Mechatronics engineering disciplines.
3.8 Software Control Systems Engineering Systems engineering is the systems approach to the design and development of products and systems. As shown in Fig. 3.10, a drawing that shows the relationships of the major engineering competencies with mechatronics, the systems engineering competency encompasses the mechanical, electrical, and software competencies. There are several important tasks for the systems engineers to perform, starting with requirements gathering and continuing through final product and system verification and validation. After requirements gathering and analysis, the systems engineers should partition requirements functionality between mechanical, electrical, and software components, in consultation with the three competencies involved. This is part of the implementation of concurrent engineering. As also shown by the figure, software is an equal partner in the development of a mechatronic system. It is not an add-on to the system and it is not free, the two opinions that were sometimes held in the past by engineering management. While the phrase “Hardware adds cost, software adds value” is not entirely true either, sometimes software engineers felt that their competency was not given equal weight with the traditional engineering disciplines. And one last comment—many mechatronic systems are safety related, such as an air bag system in a car. It is as important for the software to be as fault tolerant as the hardware.
Software Engineering Software engineering is concerned with both the final mechatronic “product” and the mechatronic development process. Two basic approaches are used with process, with many variations upon these approaches. One is called the “waterfall” method, where the process moves (falls) from one phase to another (e.g., analysis to design) with checkpoints along the way. The other method, the “spiral” approach, is often used when the requirements are not as well fixed. In this method there is prototyping, where the customers and/or systems engineers refine requirements as more information about the system becomes known. In either approach, once the requirements for the software portion of the mechatronic system are documented, the software engineers should further partition functionality as part of software design. Metrics as to development time, development cost, memory usage, and throughput should also be projected and recorded. Here is where the Software Engineering Institute’s Capability Maturity Model (SEI CMM) levels can be used for guidance. It is a truism that software is almost never developed as easily as estimated, and that a system can remain at the “90% complete” level for most of the development life cycle. The first solution attempted to solve this problem is often assigning more software engineers onto the project. This does not always work, however, because of the learning curve of the new people, as stated by Frederick Brooks in his important book The Mythical Man Month (Addison-Wesley 1995). ©2002 CRC Press LLC
s
System Requirements
Strategic Controls
Tactical Controls
Operational Controls
Hardware Service
Hardware Drivers
Hardware Interfaces
FIGURE 3.11
Mechatronic software layering.
Hardware Sensors, Actuators, and Peripherals
Software Design Perhaps the most important part of the software design for a mechatronic system can be seen from the hierarchy in Fig. 3.11. Ranging from requirements at the top to hardware at the bottom, this layering serves several purposes. The most important is that it separates mechatronic functionality from implementation. Quite simply, an upper layer should not be concerned with how a lower layer is actually performing a task. Each layer instead is directed by the layer above and receives a service or status from a layer below it. To cross more than one layer boundary is bad technique and can cause problems later in the process. Remember that this process abstraction is quite useful, for a mechatronic system has mechanical, electrical, and software parts all in concurrent development. A change in a sensor or actuator interface should only require a change at the layer immediately above, the driver layer. There is one last reason for using a hierarchical model such as this. In the current business climate, it is unlikely that the people working at the various layers will be collocated. Instead, it is not uncommon for development to be taking place in multiple locations in multiple countries. Without a crisp division of these layers, chaos can result. For more information on these and many other topics in software engineering such as coupling, cohesion, and software reuse, please refer to Chapter 49 of this handbook, Roger Pressman’s book Software Engineering: A Practitioner’s Approach 5th Edition (McGraw Hill 2000), and Steve McConnell’s book Code Complete (Microsoft Press 1993).
3.9 Testing and Instrumentation Verification and Validation Verification and validation are related tasks that should be completed throughout the life cycle of the mechatronic product or system. Boehm in his book Software Engineering Economics (Prentice-Hall 1988) describes verification as “building the product right” while validation is “building the right product.” In other words, verification is the testing of the software and product to make sure that it is built to the design. Validation, on the other hand, is to make sure the software or product is built to the requirements ©2002 CRC Press LLC
from the customer. As mentioned, verification and validation are life cycle tasks, not tasks completed just before the system is set for production. One of the simplest and most useful techniques is to hold hardware and software validation and verification reviews. Validation design reviews of hardware and software should include the systems engineers who have the best understanding of the customer requirements. Verification hardware design and software code reviews, or peer reviews, are an excellent means of finding errors upstream in the development process. Managers may have to decide whether to allocate resources upstream, when the errors are easier to fix, or downstream, when the ramifications can be much more drastic. Consider the difference between a code review finding a problem in code, and having the author change it and recompile, versus finding a problem after the product has been sold and in the field, where an expensive product recall may be required.
Debuggers Edsgar Dijkstra, a pioneer in the development of programming as a discipline, discouraged the terms “bug” and “debug,” and considered such terms harmful to the status of software engineering. They are, however, used commonly in the field. A debugger is a software program that allows a view of what is happening with the program code and data while the program is executing. Generally it runs on a PC that is connected to a special type of development microcontroller called an emulator. While debuggers can be quite useful in finding and correcting errors in code, they are not real-time, and so can actually create computer operating properly (COP) errors. However, if background debug mode (BDM) is available on the microprocessor, the debugger can be used to step through the algorithm of the program, making sure that the code is operating as expected. Intermediate and final variable values, especially those related to some analog input or output value, can be checked. Most debuggers allow multiple open windows, the setting of program execution break points in the code, and sometimes even the reflashing of the program into the microcontroller emulator. An example is the Noral debugger available for the Motorola HC12. The software in the microcontroller can also check itself and its hardware. By programming in a checksum, or total, of designated portions of ROM and/or EEPROM, the software can check to make sure that program and data are correct. By alternately writing and reading 0x55 and 0xAA to RAM (the “checkerboard test”), the program can verify that RAM and the bus are operating properly. These startup tasks should be done with every product operation cycle.
Logic Analyzer A logic analyzer is a device for nonintrusive monitoring and testing of the microcontroller. It is usually connected to both the microcontroller and a simulator. While the microcontroller is running its program and processing data, the simulator is simulating inputs and displaying outputs of the system. A “trigger word” can be entered into the logic analyzer. This is a bit pattern that will be on one of the buses monitored by the logic analyzer. With this trigger, the bus traffic around that point of interest can be captured and stored in the memory of the analyzer. An inverse assembler in the analyzer allows the machine code on the bus to be seen and analyzed in the form of the assembly level commands of the program. The analyzer can also capture the analog outputs of the microcontroller. This could be used to verify that the correct PWM duty cycle is being commanded. The simulator can introduce shorts or opens into the system, then the analyzer is used to see if the software correctly responds to the faults. The logic analyzer can also monitor the master loop of the system, making sure that the system completes all of its tasks within a designated time, e.g., 15 ms. An example of a logic analyzer is the Hewlett Packard HP54620.
3.10 Summary This chapter introduced a number of topics regarding a mechatronic system. These topics included not just mechatronic input, output, and processing, but also design, development, and testing. Future chapters will cover all of this material in much greater detail.
©2002 CRC Press LLC
4 Microprocessor-Based Controllers and Microelectronics Ondrej Novak Technical University Liberec
Ivan Dolezal Technical University Liberec
4.1 4.2 4.3 4.4 4.5 4.6
Introduction to Microelectronics Digital Logic Overview of Control Computers Microprocessors and Microcontrollers Programmable Logic Controllers Digital Communications
4.1 Introduction to Microelectronics The field of microelectronics has changed dramatically during the last two decades and digital technology has governed most of the application fields in electronics. The design of digital systems is supported by thousands of different integrated circuits supplied by many manufacturers across the world. This makes both the design and the production of electronic products much easier and cost effective. The permanent growth of integrated circuit speed, scale of integration, and reduction of costs have resulted in digital circuits being used instead of classical analog solutions of controllers, filters, and (de)modulators. The growth in computational power can be demonstrated with the following example. One singlechip microcontroller has the computational power equal to that of one 1992 vintage computer notebook. This single-chip microcontroller has the computational power equal to four 1981 vintage IBM personal computers, or to two 1972 vintage IBM 370 mainframe computers. Digital integrated circuits are designed to be universal and are produced in large numbers. Modern integrated circuits have many upgraded features from earlier designs, which allow for “user-friendlier” access and control. As the parameters of Integrated circuits (ICs) influence not only the individually designed IC, but all the circuits that must cooperate with it, a roadmap of the future development of IC technology is updated every year. From this roadmap we can estimate future parameters of the ICs, and adapt our designs to future demands. The relative growth of the number of integrated transistors on a chip is relatively stable. In the case of memory elements, it is equal to approximately 1.5 times the current amount. In the case of other digital ICs, it is equal to approximately 1.35 times the current amount. In digital electronics, we use quantities called logical values instead of the analog quantities of voltage and current. Logical variables usually correspond to the voltage of the signal, but they have only two values: log.1 and log.0. If a digital circuit processes a logical variable, a correct value is recognized because between the logical value voltages there is a gap (see Fig. 4.1). We can arbitrarily improve the resolution of signals by simply using more bits.
©2002 CRC Press LLC
FIGURE 4.1
Voltage levels and logical values correspondence.
FIGURE 4.2
A finite state automaton: X—input binary vector, Y—output binary vector, Q—internal state vector.
4.2 Digital Logic Digital circuits are composed of logic gates, such as elementary electronic circuits operating in only two states. These gates operate in such a way that the resulting logical value corresponds to the resulting value of the Boolean algebra statements. This means that with the help of gates we can realize every logical and arithmetical operation. These operations are performed in combinational circuits for which the resulting value is dependent only on the actual state of the inputs variables. Of course, logic gates are not enough for automata construction. For creating an automaton, we also need some memory elements in which we capture the responses of the arithmetical and logical blocks. A typical scheme of a digital finite state automaton is given in Fig. 4.2. The automata can be constructed from standard ICs containing logic gates, more complex combinational logic blocks and registers, counters, memories, and other standard sequential ICs assembled on a printed circuit board. Another possibility is to use application specific integrated circuits (ASIC), either programmable or full custom, for a more advanced design. This approach is suitable for designs where fast hardware solutions are preferred. Another possibility is to use microcontrollers that are designed to serve as universal automata, which function can be specified by memory programming.
4.3 Overview of Control Computers Huge, complex, and power-consuming single-room mainframe computers and, later, single-case minicomputers were primarily used for scientific and technical computing (e.g., in FORTRAN, ALGOL) and for database applications (e.g., in COBOL). The invention in 1971 of a universal central processing unit (CPU) in a single chip microprocessor caused a revolution in the computer technology. Beginning in ©2002 CRC Press LLC
FIGURE 4.3 Example of a small mechatronic system: The ALAMBETA device for measurement of thermal properties of fabrics and plastic foils (manufactured by SENSORA, Czech Republic). It employs a unique measuring method using extra thin heat flow sensors, sample thickness measurement incorporated into a head drive, microprocessor control, and connection with a PC.
1981, multi-boxes (desktop or tower case, monitor, keyboard, mouse) or single-box (notebook) microcomputers became a daily-used personal tool for word processing, spreadsheet calculation, game playing, drawing, multimedia processing, and presentations. When connected in a local area network (LAN) or over the Internet, these “personal computers (PCs)” are able to exchange data and to browse the World Wide Web (WWW). Besides these “visible” computers, many embedded microcomputers are hidden in products such as machines, vehicles, measuring instruments, telecommunication devices, home appliances, consumer electronic products (cameras, hi-fi systems, televisions, video recorders, mobile phones, music instruments, toys, air-conditioning). They are connected with sensors, user interfaces (buttons and displays), and actuators. Programmability of such controllers brings flexibility to the devices (function program choice), some kind of intelligence (fuzzy logic), and user-friendly action. It ensures higher reliability and easier maintenance, repairs, (auto)calibration, (auto)diagnostics, and introduces the possibility of their interconnection—mutual communication or hierarchical control in a whole plant or in a smart house. A photograph of an electrically operated instrument is given in Fig. 4.3. Embedded microcomputers are based on the Harvard architecture where code and data memories are split. Firmware (program code) is cross-compiled on a development system and then resides in a nonvolatile memory. In this way, a single main program can run immediately after a supply is switched on. Relatively expensive and shock sensitive mechanical memory devices (hard disks) and vacuum tube monitors have been replaced with memory cards or solid state disks (if an archive memory is essential) and LED segment displays or LCDs. A PC-like keyboard can be replaced by a device/function specifically labeled key set and/or common keys (arrows, Enter, Escape) completed with numeric keys, if necessary. Such key sets, auxiliary switches, large buttons, the main switch, and display can be located in water and dust resistant operator panels. Progress in circuit integration caused fast development of microcontrollers in the last two decades. Code memory, data memory, clock generator, and a diverse set of peripheral circuits are integrated with the CPU (Fig. 4.4) to insert such complete single-chip microcomputers into an application specific PCB. Digital signal processors (DSPs) are specialized embedded microprocessors with some on-chip peripherals but with external ADC/DAC, which represent the most important input/output channel. DSPs have a parallel computing architecture and a fixed point or floating point instruction set optimized for typical signal processing operations such as discrete transformations, filtering, convolution, and coding. We can find DSPs in applications like sound processing/generation, sensor (e.g., vibration) signal analysis, ©2002 CRC Press LLC
FIGURE 4.4
Block diagram of a microcontroller.
telecommunications (e.g., bandpass filter and digital modulation/demodulation in mobile phones, communication transceivers, modems), and vector control of AC motors. Mass production (i.e., low cost), wide-spread knowledge of operation, comprehensive access to software development and debugging tools, and millions of ready-to-use code lines make PCs useful for computing-intensive measurement and control applications, although their architecture and operating systems are not well suited for this purpose. As a result of computer expansion, there exists a broad spectrum of computing/processing means from powerful workstations, top-end PCs and VXI systems (64/32 bits, over 1000 MFLOPS/MIPS, 1000 MB of memory, input power over 100 W, cost about $10,000), downwards to PC-based computer cards/modules (32 bits, 100–300 MFLOPS/MIPS, 10–100 MB, cost less than $1000). Microprocessor cards/modules (16/8 bits, 10–30 MIPS, 1 MB, cost about $100), complex microcontroller chips (16/8 bits, 10–30 MIPS, 10–100 KB, cost about $10), and simple 8-pin microcontrollers (8 bits, 1–5 MIPS, 1 KB, 10 mW, cost about $1) are also available for very little money.
4.4 Microprocessors and Microcontrollers There is no strict border between microprocessors and microcontrollers because certain chips can access external code and/or data memory (microprocessor mode) and are equipped with particular peripheral components. Some microcontrollers have an internal RC oscillator and do not need an external component. However, an external quartz or ceramic resonator or RC network is frequently connected to the built-in, active element of the clock generator. Clock frequency varies from 32 kHz (extra low power) up to 75 MHz. Another auxiliary circuit generates the reset signal for an appropriate period after a supply is turned on. Watchdog circuits generate chip reset when a periodic retriggering signal does not come in time due to a program problem. There are several modes of consumption reduction activated by program instructions. Complexity and structure of the interrupt system (total number of sources and their priority level selection), settings of level/edge sensitivity of external sources and events in internal (i.e., peripheral) sources, and handling of simultaneous interrupt events appear as some of the most important criteria of microcontroller taxonomy. Although 16- and 32-bit microcontrollers are engaged in special, demanding applications (servo-unit control), most applications employ 8-bit chips. Some microcontrollers can internally operate with a 16-bit or even 32-bit data only in fixed-point range—microcontrollers are not provided with floating point unit (FPU). New microcontroller families are built on RISC (Reduced Instruction Set) core executing due to pipelining one instruction per few clock cycles or even per each cycle. ©2002 CRC Press LLC
One can find further differences in addressing modes, number of direct accessible registers, and type of code memory (ranging from 1 to 128 KB) that are important from the view of firmware development. Flash memory enables quick and even in-system programming (ISP) using 3–5 wires, whereas classical EPROM makes chips more expensive due to windowed ceramic packaging. Some microcontrollers have built-in boot and debug capability to load code from a PC into the flash memory using UART (Universal Asynchronous Receiver/Transmitter) and RS-232C serial line. OTP (One Time Programmable) EPROM or ROM appear effective for large production series. Data EEPROM (from 64 B to 4 KB) for calibration constants, parameter tables, status storage, and passwords that can be written by firmware stand beside the standard SRAM (from 32 B to 4 KB). The range of peripheral components is very wide. Every chip has bidirectional I/O (input/output) pins associated in 8-bit ports, but they often have an alternate function. Certain chips can set an input decision level (TTL, MOS, or Schmitt trigger) and pull-up or pull-down current sources. Output drivers vary in open collector or tri-state circuitry and maximal currents. At least one 8-bit timer/counter (usually provided with a prescaler) counts either external events (optional pulses from an incremental position sensor) or internal clocks, to measure time intervals, and periodically generates an interrupt or variable baud rate for serial communication. General purpose 16-bit counters and appropriate registers form either capture units to store the time of input transients or compare units that generate output transients as a stepper motor drive status or PWM (pulse width modulation) signal. A real-time counter (RTC) represents a special kind of counter that runs even in sleep mode. One or two asynchronous and optionally synchronous serial interfaces (UART/USART) 2 communicate with a master computer while other serial interfaces like SPI, CAN, and I C control other specific chips employed in the device or system. Almost every microcontroller family has members that are provided with an A/D converter and a multiplexer of single-ended inputs. Input range is usually unipolar and equal to supply voltage or rarely to the on-chip voltage reference. The conversion time is given by the successive approximation principle of ADC, and the effective number of bits (ENOB) usually does not reach the nominal resolution 8, 10, or 12 bits. There are other special interface circuits, such as field programmable gate array (FPGA), that can be configured as an arbitrary digital circuit. Microcontroller firmware is usually programmed in an assembly language or in C language. Many software tools, including chip simulators, are available on websites of chip manufacturers or third-party companies free of charge. A professional integrated development environment and debugging hardware (in-circuit emulator) is more expensive (thousands of dollars). However, smart use of an inexpensive ROM simulator in a microprocessor system or a step-by-step development cycle using an ISP programmer of flash microcontroller can develop fairly complex applications.
4.5 Programmable Logic Controllers A programmable logic controller (PLC) is a microprocessor-based control unit designed for an industrial installation (housing, terminals, ambient resistance, fault tolerance) in a power switchboard to control machinery or an industrial process. It consists of a CPU with memories and an I/O interface housed either in a compact box or in modules plugged in a frame and connected with proprietary buses. The compact box starts with about 16 I/O interfaces, while the module design can have thousands of I/O interfaces. Isolated inputs usually recognize industrial logic, 24 V DC or main AC voltage, while outputs are provided either with isolated solid state switches (24 V for solenoid valves and contactors) or with relays. Screw terminal boards represent connection facilities, which are preferred in PLCs to wire them to the controlled systems. I/O logical levels can be indicated with LEDs near to terminals. Since PLCs are typically utilized to replace relays, they execute Boolean (bit, logical) operations and timer/counter functions (a finite state automaton). Analog I/O, integer or even floating point arithmetic, PWM outputs, and RTC are implemented in up-to-date PLCs. A PLC works by continually scanning a program, such as machine code, that is interpreted by an embedded microprocessor (CPU). The scan time is the time it takes to check the input status, to execute all branches (all individual rungs of a ladder ©2002 CRC Press LLC
FIGURE 4.5 Example of PLC ladder diagram: 000.xx/ 010.xx—address group of inputs/outputs, TIM000—timer delays 5 s. 000.00—normally open input contact, 000.02— normally closed input contact.
diagram) of the program using internal (state) bit variables if any, and to update the output status. The scan time is dependent on the complexity of the program (milliseconds or tens of msec). The next scan operation either follows the previous one immediately (free running) or starts periodically. Programming languages for PLCs are described in IEC-1131-3 nomenclature: LD—ladder diagram (see Fig. 4.5) IL—instruction list (an assembler) SFC—sequential function chart (usually called by the proprietary name GRAFCET) ST—structured text (similar to a high level language) FBD—function block diagram PLCs are programmed using cross-compiling and debugging tools running on a PC or with programming terminals (usually using IL), both connected with a serial link. Remote operator panels can serve as a human-to-machine interface. A new alternate concept (called SoftPLC) consists of PLC-like I/O modules controlled by an industrial PC, built in a touch screen operator panel.
4.6 Digital Communications Intercommunication among mechatronics subsystems plays a key role in their engagement of applications, both of fixed and flexible configuration (a car, a hi-fi system, a fixed manufacturing line versus a flexible plant, a wireless pico-net of computer peripheral devices). It is clear that digital communication depends on the designers demands for the amount of transferred data, the distance between the systems, and the requirements on the degree of data reliability and security. The signal is represented by alterations of amplitude, frequency, or phase. This is accomplished by changes in voltage/current in metallic wires or by electromagnetic waves, both in radiotransmission and infrared optical transmission (either “wireless” for short distances or optical fibers over fairly long distances). Data rate or bandwidth varies from 300 b/s (teleprinter), 3.4 kHz (phone), 144 kb/s (ISDN) to tens of Mb/s (ADSL) on a metallic wire (subscriber line), up to 100 Mb/s on a twisted pair (LAN), about 30–100 MHz on a microwave channel, 1 GHz on a coaxial cable (trunk cable network, cable TV), and up to tens of Gb/s on an optical cable (backbone network). Data transmission employs complex methods of digital modulation, data compression, and data protection against loss due to noise interference, signal distortion, and dropouts. Multilayer standard protocols (ISO/OSI 7-layer reference model or Internet 4-layer group of protocols including well-known TCP/IP), “partly hardware, partly software realized,” facilitate an understanding between communication systems. They not only establish connection on a utilizable speed, check data transfer, format and compress data, but can make communication transparent for an application. For example, no difference can be seen between local and remote data sources. An example of a multilayer communication concept is depicted in Fig. 4.6. ©2002 CRC Press LLC
FIGURE 4.6
Example of multilayer communication.
Depending on the number of users, the communication is done either point-to-point (RS-232C from PC COM port to an instrument), point-to-multipoint (buses, networks), or even as a broadcasting (radio). Data are transferred using either switched connection (telephone network) or packet switching (computer networks, ATM). Bidirectional transmission can be full duplex (phone, RS-232C) or semiduplex (most of digital networks). Concerning the link topology, a star connection or a tree connection employs a device (“master”) mastering communication in the main node(s). A ring connection usually requires Token Passing method and a bus communication is controlled with various methods such as Master-Slave pooling, with or without Token Passing, or by using an indeterministic access (CSMA/CD in Ethernet). An LPT PC port, SCSI for computer peripherals, and GPIB (IEEE-488) for instrumentation serve as examples of parallel (usually 8-bit) communication available for shorter distances (meters). RS-232C, 2 RS-485, I C, SPI, USB, and Firewire (IEEE-1394) represent serial communication, some of which can bridge long distance (up to 1 km). Serial communication can be done either asynchronously using start and stop bits within transfer frame or synchronously using included synchronization bit patterns, if necessary. Both unipolar and bipolar voltage levels are used to drive either unbalanced lines (LPT, GPIB vs. RS-232C) or balanced twisted-pair lines (CAN vs. RS-422, RS-485).
©2002 CRC Press LLC
5 An Introduction to Micro- and Nanotechnology 5.1
Michael Goldfarb Vanderbilt University
Alvin Strauss Vanderbilt University
5.2
Microactuators Electrostatic Actuation • Electromagnetic Actuation
5.3
Microsensors Strain • Pressure • Acceleration • Force • Angular Rate Sensing (Gyroscopes)
Eric J. Barth Vanderbilt University
Introduction The Physics of Scaling • General Mechanisms of Electromechanical Transduction • Sensor and Actuator Transduction Characteristics
5.4
Nanomachines
5.1 Introduction Originally arising from the development of processes for fabricating microelectronics, micro-scale devices are typically classified according not only to their dimensional scale, but their composition and manufacture. Nanotechnology is generally considered as ranging from the smallest of these micro-scale devices down to the assembly of individual molecules to form molecular devices. These two distinct yet overlapping fields of microelectromechanical systems (MEMS) and nanosystems or nanotechnology share a common set of engineering design considerations unique from other more typical engineering systems. Two major factors distinguish the existence, effectiveness, and development of micro-scale and nanoscale transducers from those of conventional scale. The first is the physics of scaling and the second is the suitability of manufacturing techniques and processes. The former is governed by the laws of physics and is thus a fundamental factor, while the latter is related to the development of manufacturing technology, which is a significant, though not fundamental, factor. Due to the combination of these factors, effective micro-scale transducers can often not be constructed as geometrically scaled-down versions of conventional-scale transducers.
The Physics of Scaling The dominant forces that influence micro-scale devices are different from those that influence their conventional-scale counterparts. This is because the size of a physical system bears a significant influence on the physical phenomena that dictate the dynamic behavior of that system. For example, larger-scale systems are influenced by inertial effects to a much greater extent than smaller-scale systems, while smaller systems are influenced more by surface effects. As an example, consider small insects that can stand on the surface of still water, supported only by surface tension. The same surface tension is present when
©2002 CRC Press LLC
humans come into contact with water, but on a human scale the associated forces are typically insignificant. The world in which humans live is governed by the same forces as the world in which these insects live, but the forces are present in very different proportions. This is due in general to the fact that inertial forces typically act in proportion to volume, and surface forces typically in proportion to surface area. Since volume varies with the third power of length and area with the second, geometrically similar but smaller objects have proportionally more area than larger objects. Exact scaling relations for various types of forces can be obtained by incorporating dimensional analysis 3 techniques [1–5]. Inertial forces, for example, can be dimensionally represented as F i = rL x˙˙ , where Fi is a generalized inertia force, ρ is the density of an object, L is a generalized length, and x is a displacement. This relationship forms a single dimensionless group, given by
∏
Fi = ---------3 pL ˙x˙
Scaling with geometric and kinematic similarity can be expressed as
x L -----s = ----s = N, Lo xo
t ---s = 1 to
where L represents the length scale, x the kinematic scale, t the time scale, the subscript o the original system, and the s represents the scaled system. Since physical similarity requires that the dimensionless 4 group (P) remain invariant between scales, the force relationship is given by Fs /Fo = N , assuming that 4 the intensive property (density) remains invariant (i.e., ρs = ρo). An inertial force thus scales as N , where N is the geometric scaling factor. Alternately stated, for an inertial system that is geometrically smaller 4 by a factor of N, the force required to produce an equivalent acceleration is smaller by a factor of N . A 2 similar analysis shows that viscous forces, dimensionally represented by Fv = µ L x˙ , scale as N , assuming 2 the viscosity µ remains invariant, and elastic forces, dimensionally represented by Fe = ELx, scale as N , assuming the elastic modulus E remains invariant. Thus, for a geometrically similar but smaller system, inertial forces will become considerably less significant with respect to viscous and elastic forces.
General Mechanisms of Electromechanical Transduction The fundamental mechanism for both sensing and actuation is energy transduction. The primary forms of physical electromechanical transduction can be grouped into two categories. The first is multicomponent transduction, which utilizes “action at a distance” behavior between multiple bodies, and the second is deformation-based or solid-state transduction, which utilizes mechanics-of-material phenomena such as crystalline phase changes or molecular dipole alignment. The former category includes electromagnetic transduction, which is typically based upon the Lorentz equation and Faraday’s law, and electrostatic interaction, which is typically based upon Coulomb’s law. The latter category includes piezoelectric effects, shape memory alloys, and magnetostrictive, electrostrictive, and photostrictive materials. Although materials exhibiting these properties are beginning to be seen in a limited number of research applications, the development of micro-scale systems is currently dominated by the exploitation of electrostatic and electromagnetic interactions. Due to their importance, electrostatic and electromagnetic transduction is treated separately in the sections that follow.
Sensor and Actuator Transduction Characteristics Characteristics of concern for both microactuator and microsensor technology are repeatability, the ability to fabricate at a small scale, immunity to extraneous influences, sufficient bandwidth, and if possible, linearity. Characteristics typically of concern specifically for microactuators are achievable force, displacement, power, bandwidth (or speed of response), and efficiency. Characteristics typically of concern specifically for microsensors are high resolution and the absence of drift and hysteresis. ©2002 CRC Press LLC
5.2 Microactuators Electrostatic Actuation The most widely utilized multicomponent microactuators are those based upon electrostatic transduction. These actuators can also be regarded as a variable capacitance type, since they operate in an analogous mode to variable reluctance type electromagnetic actuators (e.g., variable reluctance stepper motors). Electrostatic actuators have been developed in both linear and rotary forms. The two most common configurations of the linear type of electrostatic actuators are the normal-drive and tangential or comb-drive types, which are illustrated in Figs. 5.1 and 5.2, respectively. Note that both actuators are suspended by flexures, and thus the output force is equal to the electrostatic actuation force minus the elastic force required to deflect the flexure suspension. The normal-drive type of electrostatic microactuator operates in a similar fashion to a condenser microphone. In this type of drive configuration, the actuation force is given by
εAv F x = ----------2 2x 2
where A is the total area of the parallel plates, ε is the permittivity of air, v is the voltage across the plates, and x is the plate separation. The actuation force of the comb-drive configuration is given by
εwv F x = ----------2d 2
where w is the width of the plates, ε is the permittivity of air, v is the voltage across the plates, and d is the plate separation. Dimensional examination of both relations indicates that force is independent of geometric and kinematic scaling, that is, for an electrostatic actuator that is geometrically and kinematically reduced by a factor of N, the force produced by that actuator will be the same. Since forces associated with most other physical phenomena are significantly reduced at small scales, micro-scale electrostatic forces become significant relative to other forces. Such an observation is clearly demonstrated by the fact that all intermolecular forces are electrostatic in origin, and thus the strength of all materials is a result of electrostatic forces [6]. The maximum achievable force of multicomponent electrostatic actuators is limited by the dielectric 6 breakdown of air, which occurs in dry air at about 0.8 x 10 V/m. Fearing [7] estimates that the upper 2 limit for force generation in electrostatic actuation is approximately 10 N/cm . Since electrostatic drives
FIGURE 5.1 actuator.
Schematic of a normal-drive electrostatic
FIGURE 5.2 Comb-drive electrostatic actuator. Energizing an electrode provides motion toward that electrode. ©2002 CRC Press LLC
do not have any significant actuation dynamics, and since the inertia of the moving member is usually small, the actuator bandwidth is typically quite large, on the order of a kilohertz. The maximum achievable stroke for normal configuration actuators is limited by the elastic region of the flexure suspension and additionally by the dependence of actuation force on plate separation, as given by the above stated equations. According to Fearing, a typical stroke for a surface micromachined normal configuration actuator is on the order of a couple of microns. The achievable displacement can be increased by forming a stack of normal-configuration electrostatic actuators in series, as proposed by Bobbio et al. [8,9]. The typical stroke of a surface micromachined comb actuator is on the order of a few microns, though sometimes less. The maximum achievable stroke in a comb drive is limited primarily by the mechanics of the flexure suspension. The suspension should be compliant along the direction of actuation to enable increased displacement, but must be stiff orthogonal to this direction to avoid parallel plate contact due to misalignment. These modes of behavior are unfortunately coupled, so that increased compliance along the direction of motion entails a corresponding increase in the orthogonal direction. The net effect is that increased displacement requires increased plate separation, which results in decreased overall force. The most common configurations of rotary electrostatic actuators are the variable capacitance motor and the wobble or harmonic drive motor, which are illustrated in Figs. 5.3 and 5.4, respectively. Both motors operate in a similar manner to the comb-drive linear actuator. The variable capacitance motor is characterized by high-speed low-torque operation. Useful levels of torque for most applications therefore require some form of significant micromechanical transmission, which do not presently exist. The rotor of the wobble motor operates by rolling along the stator, which provides an inherent harmonicdrive-type transmission and thus a significant transmission ratio (on the order of several hundred times). Note that the rotor must be well insulated to roll along the stator without electrical contact. The drawback to this approach is that the rotor motion is not concentric with respect to the stator, which makes the already difficult problem of coupling a load to a micro-shaft even more difficult. Examples of normal type linear electrostatic actuators are those by Bobbio et al. [8,9] and Yamaguchi et al. [10]. Examples of comb-drive electrostatic actuators are those by Kim et al. [11] and Matsubara et al. [12], and a larger-scale variation by Niino et al. [13]. Examples of variable capacitance rotary electrostatic motors are those by Huang et al. [14], Mehragany et al. [15], and Trimmer and Gabriel [16].
FIGURE 5.3 Variable capacitance type electrostatic motor. Opposing pairs of electrodes are energized sequentially to rotate the rotor.
FIGURE 5.4 Harmonic drive type electrostatic motor. Adjacent electrodes are energized sequentially to roll the (insulated) rotor around the stator. ©2002 CRC Press LLC
Examples of harmonic-drive motors are those by Mehragany et al. [17,18], Price et al. [19], Trimmer and Jebens [20,21], and Furuhata et al. [22]. Electrostatic microactuators remain a subject of research interest and development, and as such are not yet available on the general commercial market.
Electromagnetic Actuation Electromagnetic actuation is not as omnipresent at the micro-scale as at the conventional-scale. This probably is due in part to early skepticism regarding the scaling of magnetic forces, and in part to the fabrication difficulty in replicating conventional-scale designs. Most electromagnetic transduction is based upon a current carrying conductor in a magnetic field, which is described by the Lorentz equation:
dF = Idl x B where F is the force on the conductor, I is the current in the conductor, l is the length of the conductor, and B is the magnetic flux density. In this relation, the magnetic flux density is an intensive variable and thus (for a given material) does not change with scale. Scaling of current, however, is not as simple. The resistance of wire is given by
pl R = --A where ρ is the resistivity of the wire (an intensive variable), l is the length, and A the cross-sectional area. If a wire is geometrically decreased in size by a factor of N, its resistance will increase by a factor of N . 2 Since the power dissipated in the wire is I R, assuming the current remains constant implies that the power dissipated in the geometrically smaller wire will increase by a factor of N. Assuming the maximum power dissipation for a given wire is determined by the surface area of the wire, a wire that is smaller by 2 a factor of N will be able to dissipate a factor of N less power. Constant current is therefore a poor assumption. A better assumption is that maximum current is limited by maximum power dissipation, which is assumed to depend upon surface area of the wire. Since a wire smaller by a factor of N can 2 dissipate a factor of N less power, the current in the smaller conductor would have to be reduced by a 3/2 factor of N . Incorporating this into the scaling of the Lorentz equation, an electromagnetic actuator 5/2 that is geometrically smaller by a factor of N would exert a force that is smaller by a factor of N . Trimmer and Jebens have conducted a similar analysis, and demonstrated that electromagnetic forces 2 5/2 scale as N when assuming constant temperature rise in the wire, N when assuming constant heat 3 (power) flow (as previously described), and N when assuming constant current density [23,24]. In any of these cases, the scaling of electromagnetic forces is not nearly as favorable as the scaling of electrostatic forces. Despite this, electromagnetic actuation still offers utility in microactuation, and most likely scales more favorably than does inertial or gravitational forces. Lorentz-type approaches to microactuation utilize surface micromachined micro-coils, such as the one illustrated in Fig. 5.5. One configuration of this approach is represented by the actuator of Inoue et al. [25],
FIGURE 5.5 Schematic of surface micromachined microcoil for electromagnetic actuation. ©2002 CRC Press LLC
FIGURE 5.6 Microcoil array for planar positioning of a permanent micromagnet, as described by Inoue et al. [25]. Each coil produces a field, which can either attract or repel the permanent magnet, as determined by the direction of current. The magnet does not levitate, but rather slides on the insulated surface.
FIGURE 5.7 Cantilevered microcoil flap as described by Liu et al. [26]. The interaction between the energized coil and the stationary electromagnet deflects the flap upward or downward, depending on the direction of current through the microcoil.
which utilizes current control in an array of microcoils to position a permanent micro-magnet in a plane, as illustrated in Fig. 5.6. Another Lorentz-type approach is illustrated by the actuator of Liu et al. [26], which utilizes current control of a cantilevered microcoil flap in a fixed external magnetic field to effect deflection of the flap, as shown in Fig. 5.7. Liu reported deflections up to 500 µm and a bandwidth of approximately 1000 Hz [26]. Other examples of Lorentz-type nonrotary actuators are those by Shinozawa et al. [27], Wagner and Benecke [28], and Yanagisawa et al. [29]. A purely magnetic approach (i.e., not fundamentally electromagnetic) is the work of Judy et al. [30], which in essence manipulates a flexuresuspended permanent micromagnet by controlling an external magnetic field. Ahn et al. [31] and Guckel et al. [32] have both demonstrated planar rotary variable-reluctance type electromagnetic micromotors. A variable reluctance approach is advantageous because the rotor does not require commutation and need not be magnetic. The motor of Ahn et al. incorporates a 12-pole stator and 10-pole rotor, while the motor of Guckel et al. utilizes a 6-pole stator and 4-pole rotor. Both incorporate rotors of approximately 500 µm diameter. Guckel reports (no load) rotor speeds above 30,000 rev/min, and Ahn estimates maximum stall torque at 1.2 µN m. As with electrostatic microactuators, microfabricated electromagnetic actuators likewise remain a subject of research interest and development and as such are not yet available on the general commercial market.
5.3 Microsensors Since microsensors do not transmit power, the scaling of force is not typically significant. As with conventional-scale sensing, the qualities of interest are high resolution, absence of drift and hysteresis, achieving a sufficient bandwidth, and immunity to extraneous effects not being measured. Microsensors are typically based on either measurement of mechanical strain, measurement of mechanical displacement, or on frequency measurement of a structural resonance. The former two types ©2002 CRC Press LLC
are in essence analog measurements, while the latter is in essence a binary-type measurement, since the sensed quantity is typically the frequency of vibration. Since the resonant-type sensors measure frequency instead of amplitude, they are generally less susceptible to noise and thus typically provide a higher resolution measurement. According to Guckel et al., resonant sensors provide as much as one hundred times the resolution of analog sensors [33]. They are also, however, more complex and are typically more difficult to fabricate. The primary form of strain-based measurement is piezoresistive, while the primary means of displacement measurement is capacitive. The resonant sensors require both a means of structural excitation as well as a means of resonant frequency detection. Many combinations of transduction are utilized for these purposes, including electrostatic excitation, capacitive detection, magnetic excitation and detection, thermal excitation, and optical detection.
Strain Many microsensors are based upon strain measurement. The primary means of measuring strain is via piezoresistive strain gages, which is an analog form of measurement. Piezoresistive strain gages, also known as semiconductor gages, change resistance in response to a mechanical strain. Note that piezoelectric materials can also be utilized to measure strain. Recall that mechanical strain will induce an electrical charge in a piezoelectric ceramic. The primary problem with using a piezoelectric material, however, is that since measurement circuitry has limited impedance, the charge generated from a mechanical strain will gradually leak through the measurement impedance. A piezoelectric material therefore cannot provide reliable steady-state signal measurement. In constrast, the change in resistance of a piezoresistive material is stable and easily measurable for steady-state signals. One problem with piezoresistive materials, however, is that they exhibit a strong strain-temperature dependence, and so must typically be thermally compensated. An interesting variation on the silicon piezoresistor is the resonant strain gage proposed by Ikeda et al., which provides a frequency-based form of measurement that is less susceptible to noise [34]. The resonant strain gage is a beam that is suspended slightly above the strain member and attached to it at both ends. The strain gage beam is magnetically excited with pulses, and the frequency of vibration is detected by a magnetic detection circuit. As the beam is stretched by mechanical strain, the frequency of vibration increases. These sensors provide higher resolution than typical piezoresistors and have a lower temperature coefficient. The resonant sensors, however, require a complex three-dimensional fabrication technique, unlike the typical piezoresistors which require only planar techniques.
Pressure One of the most commercially successful microsensor technologies is the pressure sensor. Silicon micromachined pressure sensors are available that measure pressure ranges from around one to several thousand kPa, with resolutions as fine as one part in ten thousand. These sensors incorporate a silicon micromachined diaphragm that is subjected to fluid (i.e., liquid or gas) pressure, which causes dilation of the diaphragm. The simplest of these utilize piezoresistors mounted on the back of the diaphragm to measure deformation, which is a function of the pressure. Examples of these devices are those by Fujii et al. [35] and Mallon et al. [36]. A variation of this configuration is the device by Ikeda et al. Instead of a piezoresistor to measure strain, an electromagnetically driven and sensed resonant strain gage, as discussed in the previous section, is utilized [37]. Still another variation on the same theme is the capacitive measurement approach, which measures the capacitance between the diaphragm and an electrode that is rigidly mounted and parallel to the diaphragm. An example of this approach is by Nagata et al. [38]. A more complex approach to pressure measurement is that by Stemme and Stemme, which utilizes resonance of the diaphragm to detect pressure [39]. In this device, the diaphragm is capacitively excited and optically detected. The pressure imposes a mechanical load on the diaphragm, which increases the stiffness and, in turn, the resonant frequency. ©2002 CRC Press LLC
Acceleration Another commercially successful microsensor is the silicon microfabricated accelerometer, which in various forms can measure acceleration ranges from well below one to around a thousand meters per square second (i.e., sub-g to several hundred g ’s), with resolutions of one part in 10,000. These sensors incorporate a micromachined suspended proof mass that is subjected to an inertial force in response to an acceleration, which causes deflection of the supporting flexures. One means of measuring the deflection is by utilizing piezoresistive strain gages mounted on the flexures. The primary disadvantage to this approach is the temperature sensitivity of the piezoresistive gages. An alternative to measuring the deflection of the proof mass is via capacitive sensing. In these devices, the capacitance is measured between the proof mass and an electrode that is rigidly mounted and parallel. Examples of this approach are those by Boxenhorn and Greiff [40], Leuthold and Rudolf [41], and Seidel et al. [42]. Still another means of measuring the inertial force on the proof mass is by measuring the resonant frequency of the supporting flexures. The inertial force due to acceleration will load the flexure, which will alter its resonant frequency. The frequency of vibration is therefore a measure of the acceleration. These types of devices utilize some form of transduction to excite the structural resonance of the supporting flexures, and then utilize some other measurement technique to detect the frequency of vibration. Examples of this type of device are those by Chang et al. [43], which utilize electrostatic excitation and capacitive detection, and by Satchell and Greenwood [44], which utilize thermal excitation and piezoresistive detection. These types of accelerometers entail additional complexity, but typically offer improved measurement resolution. Still another variation of the micro-accelerometer is the force-balanced type. This type of device measures position of the proof mass (typically by capacitive means) and utilizes a feedback loop and electrostatic or electromagnetic actuation to maintain zero deflection of the mass. The acceleration is then a function of the actuation effort. These devices are characterized by a wide bandwidth and high sensitivity, but are typically more complex and more expensive than other types. Examples of force-balanced devices are those by Chau et al. [45], and Kuehnel and Sherman [46], both of which utilize capacitive sensing and electrostatic actuation.
Force Silicon microfabricated force sensors incorporate measurement approaches much like the microfabricated pressure sensors and accelerometers. Various forms of these force sensors can measure forces ranging on the order of millinewtons to newtons, with resolutions of one part in 10,000. Mechanical sensing typically utilizes a beam or a flexure support which is elastically deflected by an applied force, thereby transforming force measurement into measurement of strain or displacement, which can be accomplished by piezoresistive or capacitive means. An example of this type of device is that of Despont et al., which utilizes capacitive measurement [47]. Higher resolution devices are typically of the resonating beam type, in which the applied force loads a resonating beam in tension. Increasing the applied tensile load results in an increase in resonant frequency. An example of this type of device is that of Blom et al. [48].
Angular Rate Sensing (Gyroscopes) A conventional-scale gyroscope utilizes the spatial coupling of the angular momentum-based gyroscopic effect to measure angular rate. In these devices, a disk is spun at a constant high rate about its primary axis, so that when the disk is rotated about an axis not colinear with the primary (or spin) axis, a torque results in an orthogonal direction that is proportional to the angular velocity. These devices are typically mounted in gimbals with low-friction bearings, incorporate motors that maintain the spin velocity, and utilize strain gages to measure the gyroscopic torque (and thus angular velocity). Such a design would not be appropriate for a microsensor due to several factors, some of which include the diminishing effect of inertia (and thus momentum) at small scales, the lack of adequate bearings, the lack of appropriate micromotors, and the lack of an adequate three-dimensional microfabrication processes. Instead, microscale angular rate sensors are of the vibratory type, which incorporate Coriolis-type effects rather than ©2002 CRC Press LLC
FIGURE 5.8 Illustration of Coriolis acceleration, which results from translation within a reference frame that is rotating with respect to an inertial reference frame.
FIGURE 5.9
Schematic of a vibratory gyroscope.
the angular momentum-based gyroscopic mechanics of conventional-scale devices. A Coriolis acceleration results from linear translation within a coordinate frame that is rotating with respect to an inertial reference frame. In particular, if the particle in Fig. 5.8 is moving with a velocity v within the frame xyz, and if the frame xyz is rotating with an angular velocity of ω with respect to the inertial reference frame XYZ, then a Coriolis acceleration will result equal to ac = 2ω x v. If the object has a mass m, a Coriolis inertial force will result equal to Fc = -2mω x v (minus sign because direction is opposite ac). A vibratory gyroscope utilizes this effect as illustrated in Fig. 5.9. A flexure-suspended inertial mass is vibrated in the x-direction, typically with an electrostatic comb drive. An angular velocity about the z-axis will generate a Coriolis acceleration, and thus force, in the y-direction. If the “external” angular velocity is constant and the velocity in the x-direction is sinusoidal, then the resulting Coriolis force will be sinusiodal, and the suspended inertial mass will vibrate in the y-direction with an amplitude proportional to the angular velocity. The motion in the y-direction, which is typically measured capacitively, is thus a measure of the angular rate. Examples of these types of devices are those by Bernstein et al. [49] and Oh et al. [50]. Note that though vibration is an essential component of these devices, they are not technically resonant sensors, since they measure amplitude of vibration rather than frequency.
5.4 Nanomachines Nanomachines are devices that range in size from the smallest of MEMS devices down to devices assembled from individual molecules [51]. This section briefly introduces energy sources, structural hierarchy, and the projected future of the assembly of nanomachines. Built from molecular components performing individual mechanical functions, the candidates for energy sources to actuate nanomachines are limited to those that act on a molecular scale. Regarding manufacture, the assembly of nanomachines is by nature a one-molecule-at-a-time operation. Although microscopy techniques are currently used for the assembly of nanostructures, self-assembly is seen as a viable means of mass production. ©2002 CRC Press LLC
In a molecular device a discrete number of molecular components are combined into a supramolecular structure where each discrete molecular component performs a single function. The combined action of these individual molecules causes the device to operate and perform its various functions. Molecular devices require an energy source to operate. This energy must ultimately be used to activate the component molecules in the device, and so the energy must be chemical in nature. The chemical energy can be obtained by adding hydrogen ions, oxidants, etc., by inducing chemical reactions by the impingement of light, or by the actions of electrical current. The latter two means of energy activation, photochemical and electrochemical energy sources, are preferred since they not only provide energy for the operation of the device, but they can also be used to locate and control the device. Additionally, such energy transduction can be used to transmit data to report on the performance and status of the device. Another reason for the preference for photochemical- and electrochemical-based molecular devices is that, as these devices are required to operate in a cyclic manner, the chemical reactions that drive the system must be reversible. Since photochemical and electrochemical processes do not lead to the accumulation of products of reaction, they readily lend themselves to application in nanodevices. Molecular devices have recently been designed that are capable of motion and control by photochemical methods. One device is a molecular plug and socket system, and another is a piston-cylinder system [51]. The construction of such supramolecular devices belongs to the realm of the chemist who is adept at manipulating molecules. As one proceeds upwards in size to the next level of nanomachines, one arrives at devices assembled from (or with) single-walled carbon nanotubes (SWNTs) and/or multi-walled carbon nanotubes (MWNTs) that are a few nanometers in diameter. We will restrict our discussion to carbon nanotubes (CNTs) even though there is an expanding database on nanotubes made from other materials, especially bismuth. The strength and versatility of CNTs make them superior tools for the nanomachine design engineer. They have high electrical conductivity with current carrying capacity of a billion amperes per square centimeter. They are excellent field emitters at low operating voltages. Moreover, CNTs emit light coherently and this provides for an entire new area of holographic applications. The elastic modulus of CNTs is the highest of all materials known today [52]. These electrical properties and extremely high mechanical strength make MWNTs the ultimate atomic force microscope probe tips. CNTs have the potential to be used as efficient molecular assembly devices for manufacturing nanomachines one atom at a time. Two obvious nanotechnological applications of CNTs are nanobearings and nanosprings. Zettl and Cumings [53] have created MWNT-based linear bearings and constant force nanosprings. CNTs may potentially form the ultimate set of nanometer-sized building blocks, out of which nanomachines of all kinds can be built. These nanomachines can be used in the assembly of nanomachines, which can then be used to construct machines of all types and sizes. These machines can be competitive with, or perhaps surpass existing devices of all kinds. SWNTs can also be used as electromechanical actuators. Baughman et al. [54] have demonstrated that sheets of SWNTs generate larger forces than natural muscle and larger strains than high-modulus ferroelectrics. They have predicted that actuators using optimized SWNT sheets may provide substantially higher work densities per cycle than any other known actuator. Kim and Lieber [55] have built SWNT and MWNT nanotweezers. These nanoscale electromechanical devices were used to manipulate and interrogate nanostructures. Electrically conducting CNTs were attached to electrodes on pulled glass micropipettes. Voltages applied to the electrodes opened and closed the free ends of the CNTs. Kim and Lieber demonstrated the capability of the nanotweezers by grabbing and manipulating submicron clusters and nanowires. This device could be used to manipulate biological cells or even manipulate organelles and clusters within human cells. Perhaps, more importantly, these tweezers can potentially be used to assemble other nanomachines. A wide variety of nanoscale manipulators have been proposed [56] including pneumatic manipulators that can be configured to make tentacle, snake, or multi-chambered devices. Drexler has proposed telescoping nanomanipulators for precision molecular positioning and assembly work. His manipulator has a cylindrical shape with a diameter of 35 nm and an extensible length of 100 nm. A number of six ©2002 CRC Press LLC
degree of freedom Stewart platforms have been proposed [56], including one that allows strut lengths to be moved in 0.10 nm increments across a 100 nm work envelope. A number of other nanodevices including box-spring accelerometers, displacement accelerometers, pivoted gyroscopic accelerometers, and gimbaled nanogyroscopes have been proposed and designed [56]. Currently, much thought is being devoted to molecular assembly and self-replicating devices (selfreplicating nanorobots). Self-assembly is arguably the only way for nanotechnology to advance in an engineering or technological sense. Assembling a billion or trillion atom device—one atom at a time— would be a great accomplishment. It would take a huge investment in equipment, labor, and time. Freitas [56] describes the infrastructure needed to construct a simple medical nanorobot: a 1-µm spherical respirocyte consisting of about 18 billion atoms. He estimates that a factory production line deploying a coordinated system of 100 macroscale scanning probe microscope (SPM) assemblers, where each assembler is capable of depositing one atom per second on a convergently-assembled workpiece, would result in a manufacturing throughput of two nanorobots per decade. If one conjectures about enormous increases in assembler manufacturing rates even to the extent of an output of one nanorobot per minute, it would take two million years to build the first cubic centimeter therapeutic dosage of nanorobots. Thus, it is clear that the future of medical nanotechnology and nanoengineering lies in the direction of self-assembly and self-replication.
References 1. Bridgman, P. W., Dimensional Analysis, 2nd Ed., Yale University Press, 1931. 2. Buckingham, E., “On physically similar systems: illustrations of the use of dimensional equations,” Physical Review, 4(4):345–376, 1914. 3. Huntley, H. E., Dimensional Analysis, Dover Publications, 1967. 4. Langhaar, H. L., Dimensional Analysis and Theory of Models, John Wiley and Sons, 1951. 5. Taylor, E. S., Dimensional Analysis for Engineers, Oxford University Press, 1974. 6. Israelachvili, J. N., Intermolecular and Surface Forces, Academic Press, 1985, pp. 9–10. 7. Fearing, R. S., “Microactuators for microrobots: electric and magnetic,” Workshop on Micromechatronics, IEEE International Conference on Robotics and Automation, 1997. 8. Bobbio, S. M., Keelam, M. D., Dudley, B. W., Goodwin-Hohansson, S., Jones, S. K., Jacobson, J. D., Tranjan, F. M., Dubois, T. D., “Integrated force arrays,” Proceedings of the IEEE Micro Electro Mechanical Systems, 149–154, 1993. 9. Jacobson, J. D., Goodwin-Johansson, S. H., Bobbio, S. M., Bartlett, C. A., Yadon, L. N., “Integrated force arrays: theory and modeling of static operation,” Journal of Microelectromechanical Systems, 4(3):139–150, 1995. 10. Yamaguchi, M., Kawamura, S., Minami, K., Esashi, M., “Distributed electrostatic micro actuators,” Proceedings of the IEEE Micro Electro Mechanical Systems, 18–23, 1993. 11. Kim, C. J., Pisano, A. P., Muller, R. S., “Silicon-processed overhanging microgripper,” Journal of Microelectromechanical Systems, 1(1):31–36, 1992. 12. Matsubara, T., Yamaguchi, M., Minami, K., Esashi, M., “Stepping electrostatic microactuator,” International Conference on Solid-State Sensor and Actuators, 50–53, 1991. 13. Niino, T., Egawa, S., Kimura, H., Higuchi, T., “Electrostatic artificial muscle: compact, high-power linear actuators with multiple-layer structures,” Proceedings of the IEEE Conference on Micro Electro Mechanical Systems, 130–135, 1994. 14. Huang, J. B., Mao, P. S., Tong, Q. Y., Zhang, R. Q., “Study on silicon electrostatic and electroquasistatic micromotors,” Sensors and Actuators, 35:171–174, 1993. 15. Mehragany, M., Bart, S. F., Tavrow, L. S., Lang, J. H., Senturia, S. D., Schlecht, M. F., “A study of three microfabricated variable-capacitance motors,” Sensors and Actuators, 173–179, 1990. 16. Trimmer, W., Gabriel, K., “Design considerations for a practical electrostatic micromotor,” Sensors and Actuators, 11:189–206, 1987. ©2002 CRC Press LLC
17. Mehregany, M., Nagarkar, P., Senturia, S. D., Lang, J. H., “Operation of microfabricated harmonic and ordinary side-drive motors,” Proceeding of the IEEE Conference on Micro Electro Mechanical Systems, 1–8, 1990. 18. Dhuler, V. R., Mehregany, M., Phillips, S. M., “A comparative study of bearing designs and operational environments for harmonic side-drive micromotors,” IEEE Transactions on Electron Devices, 40(11):1985–1989, 1993. 19. Price, R. H., Wood, J. E., Jacobsen, S. C., “Modeling considerations for electrostatic forces in electrostatic microactuators,” Sensors and Actuators, 20:107–114, 1989. 20. Trimmer, W., Jebens, R., “An operational harmonic electrostatic motor,” Proceeding of the IEEE Conference on Micro Electro Mechanical Systems, 13–16, 1989. 21. Trimmer, W., Jebens, R., “Harmonic electrostatic motors,” Sensors and Actuators, 20:17–24, 1989. 22. Furuhata, T., Hirano, T., Lane, L. H., Fontanta, R. E., Fan, L. S., Fujita, H., “Outer rotor surface micromachined wobble micromotor,” Proceeding of the IEEE Conference on Micro Electro Mechanical Systems, 161–166, 1993. 23. Trimmer, W., Jebens, R., “Actuators for microrobots,” IEEE Conference on Robotics and Automation, 1547–1552, 1989. 24. Trimmer, W., “Microrobots and micromechanical systems,” Sensors and Actuators, 19:267–287, 1989. 25. Inoue, T., Hamasaki, Y., Shimoyama, I., Miura, H., “Micromanipulation using a microcoil array,” Proceedings of the IEEE International Conference on Robotics and Automation, 2208–2213, 1996. 26. Liu, C., Tsao, T., Tai, Y., Ho, C., “Surface micromachined magnetic actuators,” Proceedings of the IEEE Conference on Micro Electro Mechanical Systems, 57–62, 1994. 27. Shinozawa, Y., Abe, T., Kondo, T., “A proportional microvalve using a bi-stable magnetic actuator,” Proceedings of the IEEE Conference on Micro Electro Mechanical Systems, 233–237, 1997. 28. Wagner, B., Benecke, W., “Microfabricated actuator with moving permanent magnet,” Proceedings of the IEEE Conference on Micro Electro Mechanical Systems, 27–32, 1991. 29. Yanagisawa, K., Tago, A., Ohkubo, T., Kuwano, H., “Magnetic microactuator,” Proceedings of the IEEE Conference on Micro Electro Mechanical Systems, 120–124, 1991. 30. Judy, J., Muller, R. S., Zappe, H. H., “Magnetic microactuation of polysilicon flexure structures,” Journal of Microelectromechanical Systems, 4(4):162–169, 1995. 31. Ahn, C. H., Kim, Y. J., Allen, M. G., “A planar variable reluctance magnetic micromotor with fully integrated stator and wrapped coils,” Proceedings of the IEEE Conference on Micro Electro Mechanical Systems, 1–6, 1993. 32. Guckel, H., Christenson, T. R., Skrobis, K. J., Jung, T. S., Klein, J., Hartojo, K. V., Widjaja, I., “A first functional current excited planar rotational magnetic micromotor,” Proceedings of the IEEE Conference on Micro Electro Mechanical Systems, 7–11, 1993. 33. Guckel, H., Sneigowski, J. J., Christenson, T. R., Raissi, F., “The application of fine grained, tensile polysilicon to mechanically resonant transducers,” Sensor and Actuators, A21–A23:346–351, 1990. 34. Ikeda, K., Kuwayama, H., Kobayashi, T., Watanabe, T., Nishikawa, T., Yoshida, T., Harada, K., “Silicon pressure sensor integrates resonant strain gauge on diaphragm,” Sensors and Actuators, A21–A23:146–150, 1990. 35. Fujii, T., Gotoh, Y., Kuroyanagi, S., “Fabrication of microdiaphragm pressure sensor utilizing micromachining,” Sensors and Actuators, A34:217–224, 1992. 36. Mallon, J., Pourahmadi, F., Petersen, K., Barth, P., Vermeulen, T., Bryzek, J., “Low-pressure sensors employing bossed diaphragms and precision etch-stopping,” Sensors and Actuators, A21–23:89–95, 1990. 37. Ikeda, K., Kuwayama, H., Kobayashi, T., Watanabe, T., Nishikawa, T., Yoshida, T., Harada, K., “Three-dimensional micromachining of silicon pressure sensor integrating resonant strain gauge on diaphragm,” Sensors and Actuators, A21–A23:1007–1009, 1990.
©2002 CRC Press LLC
38. Nagata, T., Terabe, H., Kuwahara, S., Sakurai, S., Tabata, O., Sugiyama, S., Esashi, M., “Digital compensated capacitive pressure sensor using cmos technology for low-pressure measurements,” Sensors and Actuators, A34:173–177, 1992. 39. Stemme, E., Stemme, G., “A balanced resonant pressure sensor,” Sensors and Actuators, A21–A23: 336–341, 1990. 40. Boxenhorn, B., Greiff, P., “Monolithic silicon accelerometer,” Sensors and Actuators, A21–A23:273– 277, 1990. 41. Leuthold, H., Rudolf, F., “An ASIC for high-resolution capacitive microaccelerometers,” Sensors and Actuators, A21–A23:278–281, 1990. 42. Seidel, H., Riedel, H., Kolbeck, R., Muck, G., Kupke, W., Koniger, M., “Capacitive silicon accelerometer with highly symmetrical design,” Sensors and Actuators, A21–A23:312–315, 1990. 43. Chang, S. C., Putty, M. W., Hicks, D. B., Li, C. H., Howe, R. T., “Resonant-bridge two-axis microaccelerometer,” Sensors and Actuators, A21–A23:342–345, 1990. 44. Satchell, D. W., Greenwood, J. C., “A thermally-excited silicon accelerometer,” Sensors and Actuators, A17:241–245, 1989. 45. Chau, K. H. L., Lewis, S. R., Zhao, Y., Howe, R. T., Bart, S. F., Marchesilli, R. G., “An integrated force- balanced capacitive accelerometer for low-g applications,” Sensors and Actuators, A54:472–476, 1996. 46. Kuehnel, W., Sherman, S., “A surface micromachined silicon accelerometer with on-chip detection circuitry,” Sensors and Actuators, A45:7–16, 1994. 47. Despont, Racine, G. A., Renaud, P., de Rooij, N. F., “New design of micromachined capacitive force sensor,” Journal of Micromechanics and Microengineering, 3:239–242, 1993. 48. Blom, F. R., Bouwstra, S., Fluitman, J. H. J., Elwenspoek, M., “Resonating silicon beam force sensor,” Sensors and Actuators, 17:513–519, 1989. 49. Bernstein, J., Cho, S., King, A. T., Kourepenis, A., Maciel, P., Weinberg, M., “A micromachined comb-drive tuning fork rate gyroscope,” IEEE Conference on Micro Electro Mechanical Systems, 143–148, 1993. 50. Oh, Y., Lee, B., Baek, S., Kim, H., Kim, J., Kang, S., Song, C., “A surface-micromachined tunable vibratory gyroscope,” IEEE Conference on Micro Electro Mechanical Systems, 272–277, 1997. 51. Venturi, M., Credi, A., Balzani, V., “Devices and machines at the molecular level,” Electronic Properties of Novel Materials, AIP Conf. Proc., 544:489–494, 2000. 52. Ajayan, P. M., Charlier, J. C., Rinzler, A. G., “PNAS,” 96:14199–14200, 1999. 53. Zettl, A., Cumings, J., “Sharpened nanotubes, nanobearings and nanosprings,” Electronic Properties of Novel Materials, AIP Conf. Proc., 544:526–531, 2000. 54. Baughman, R. H., et al., “Carbon nanotube actuators,” Science, 284:1340–1344, 1999. 55. Kim, P., Lieber, C. M., “Nanotube nanotweezers,” Science, 286:2148–2150, 1999. 56. Freitas, R. A., “Nanomedicine,” Vol. 1, Landes Bioscience, Austin, 1999.
©2002 CRC Press LLC
6 Mechatronics: New Directions in Nano-, Micro-, and Mini-Scale Electromechanical Systems Design, and Engineering Curriculum Development 6.1 6.2
Sergey Edward Lyshevski Purdue University Indianapolis
Introduction Nano-, Micro-, and Mini-Scale Electromechanical Systems and Mechatronic Curriculum 6.3 Mechatronics and Modern Engineering 6.4 Design of Mechatronic Systems 6.5 Mechatronic System Components 6.6 Systems Synthesis, Mechatronics Software, and Simulation 6.7 Mechatronic Curriculum 6.8 Introductory Mechatronic Course 6.9 Books in Mechatronics 6.10 Mechatronic Curriculum Developments 6.11 Conclusions: Mechatronics Perspectives
6.1 Introduction Modern engineering encompasses diverse multidisciplinary areas. Therefore, there is a critical need to identify new directions in research and engineering education addressing, pursuing, and implementing new meaningful and pioneering research initiatives and designing the engineering curriculum. By integrating various disciplines and tools, mechatronics provides multidisciplinary leadership and supports the current gradual changes in academia and industry. There is a strong need for an advanced research in mechatronics and a curriculum reform for undergraduate and graduate programs. Recent research developments and drastic technological advances in electromechanical motion devices, power electronics, solid-state devices, microelectronics, micro- and nanoelectromechanical systems (MEMS and NEMS), materials and packaging, computers, informatics, system intelligence, microprocessors and
©2002 CRC Press LLC
Mechatronic Systems
Conventional Mechatronic Systems
Micromechatronic Systems
Fundamental Theories: Classical Mechanics Electromagnetics
Nanomechatronic Systems Fundamental Theories: Quantum Theory Nanoelectromechanics
FIGURE 6.1 Classification and fundamental theories applied in mechatronic systems.
DSPs, signal and optical processing, computer-aided-design tools, and simulation environments have brought new challenges to the academia. As a result, many scientists are engaged in research in the area of mechatronics, and engineering schools have revised their curricula to offer the relevant courses in mechatronics. Mechatronic systems are classified as: 1. conventional mechatronic systems, 2. microelectromechanical-micromechatronic systems (MEMS), and 3. nanoelectromechanical-nanomechatronic systems (NEMS). The operational principles and basic foundations of conventional mechatronic systems and MEMS are the same, while NEMS can be studied using different concepts and theories. In particular, the designer applies the classical mechanics and electromagnetics to study conventional mechatronic systems and MEMS. Quantum theory and nanoelectromechanics are applied for NEMS, see Fig. 6.1. One weakness of the computer, electrical, and mechanical engineering curricula is the well-known difficulties to achieving sufficient background, knowledge, depth, and breadth in integrative electromechanical systems areas to solve complex multidisciplinary engineering problems. Mechatronics introduces the subject matter, multidisciplinary areas, and disciplines (e.g., electrical, mechanical, and computer engineering) from unified perspectives through the electromechanical theory fundamentals (research) and designed sequence of mechatronic courses within an electromechanical systems (mechatronic) track or program (curriculum). This course sequence can be designed based upon the program objectives, strength, and goals. For different engineering programs (e.g., electrical, mechanical, computer, aerospace, material), the number of mechatronic courses, contents, and coverage are different because mechatronic courses complement the basic curriculum. However, the ultimate goal is the same: educate and prepare a new generation of students and engineers to solve a wide spectrum of engineering problems. Mechatronics is an important part of modern confluent engineering due to integration, interaction, interpretation, relevance, and systematization features. Efficient and effective means to assess the current trends in modern engineering with assessments analysis and outcome prediction can be approached through the mechatronic paradigm. The multidisciplinary mechatronic research and educational activities, combined with the variety of active student learning processes and synergetic teaching styles, will produce a level of overall student accomplishments that is greater than the achievements which can be produced by refining the conventional electrical, computer, and mechanical engineering curricula. The multidisciplinary mechatronic paradigm serves very important purposes because it brings new depth to engineering areas, advances students’ knowledge and background, provides students with the basic problem-solving skills that are needed to cope with advanced electromechanical systems controlled by microprocessors or DSPs, covers state-of-the-art hardware, and emphasizes and applies
©2002 CRC Press LLC
modern software environments. Through the mechatronic curriculum, important program objectives and goals can be achieved. The integration of mechatronic courses into the engineering curriculum is reported in this chapter. Our ultimate goal is to identify the role, examine the existing courses, refine and enhance mechatronic curriculum in order to improve the structure and content of engineering programs, recruit and motivate students, increase teaching effectiveness and improve material delivery, as well as assess and evaluate the desired engineering program outcomes. The primary emphasis is placed on enhancement and improvement in student knowledge, learning, critical thinking, depth, breadth, results interpretation, integration and application of knowledge, motivation, commitment, creativity, enthusiasm, and confidence. These can be achieved through the mechatronic curriculum development and implementation. This chapter reports the development of a mechatronic curriculum. The role of mechatronics in modern engineering is discussed and documented.
6.2 Nano-, Micro-, and Mini-Scale Electromechanical Systems and Mechatronic Curriculum Conventional, mini- and micro-scale electromechanical systems are studied from a unified perspective because operating features, basic phenomena, and dominant effects are based upon classical electromagnetics and mechanics (electromechanics). Electromechanical systems integrate subsystems and components. No matter how well an individual subsystem or component (electric motor, sensor, power amplifier, or DSP) performs, the overall performance can be degraded if the designer fails to integrate and optimize the electromechanical system. While electric machines, sensors, power electronics, microcontrollers, and DSPs should be emphasized, analyzed, designed, and optimized, the main focus is centered on integrated issues. The designer sometimes fails to grasp and understand the global picture because this requires extensive experience, background, knowledge, and capabilities to attain detailed assessment analysis with outcome prediction and overall performance evaluation. While the component-based divide-and-solve approach is valuable and applicable in the preliminary design phase, it is very important that the design and analysis of integrated electromechanical systems be accomplished in the context of global optimization with proper objectives, specifications, requirements, and bounds imposed. Novel electromechanical and VLSI technologies, computer-aided-design software, software-hardware co-design tools, high-performance software environments, and robust computational algorithms must be applied to design electromechanical systems. The main objective of the mechatronic curriculum development is to satisfy academia–industry–government demands as well as to help students develop in-depth fundamental, analytic, and experimental skills in analysis, design, optimization, control, and implementation of advanced integrated electromechanical systems. It is not possible to cover the full spectrum of mechatronics issues in a single course. Therefore, the mechatronic curriculum must be developed assuming that students already have sufficient fundamentals in calculus, physics, circuits, electromechanical devices, sensors, and controls. The engineering curriculum usually integrates general education, science, and engineering courses. The incorporation of multidisciplinary engineering science and engineering design courses represents a major departure from the conventional curriculum. Usually, even electrical engineering students have some deficiencies in advanced electromagnetics, electric machinery, power electronics, ICs, microcontrollers, and DSPs because several of these courses are elective. Mechanical engineering students, while advancing electrical engineering students in mechanics and thermodynamics, have limited access to electromagnetics, electric machines, power electronics, microelectronics, and DSP courses. In addition, there are deficiencies in computer science and engineering mathematics for both electrical and mechanical engineering students because these courses are usually required only for computer engineering students. The need for engineering mathematics, electromagnetics, power electronics, and electromechanical motion devices (electric machines, actuators, and sensors) has not diminished, rather strengthened. In addition, radically new advanced hardware has been developed using enabling
©2002 CRC Press LLC
fabrication technologies to fabricate nano- and micro-scale sensors, actuators, ICs, and antennas. Efficient software has emerged. To overcome the difficulties encountered, the mechatronic courses which cover the multidisciplinary areas must be introduced to the engineering curriculum. Mechatronics has been enthusiastically explored and supported by undergraduate and graduate, educational and researchoriented universities, high-technology industry, and government laboratories. However, there is a need to develop the long-term strategy in mechatronic research and education, define the role, as well as implement, commercialize, and market the mechatronic and electromechanics programs.
6.3 Mechatronics and Modern Engineering Many engineering problems can be formulated, attacked, and solved using the mechatronic paradigm. Mechatronics deals with benchmarking and emerging problems in integrated electrical–mechanical– computer engineering, science, and technologies. Many of these problems have not been attacked and solved; and sometimes, the existing solutions cannot be treated as the optimal one. This reflects obvious trends in fundamental, applied, and experimental research as well as curriculum changes in response to long-standing unsolved problems, engineering and technological enterprise, and entreaties of steady evolutionary demands. Mechatronics is the integrated design, analysis, optimization, and virtual prototyping of intelligent and high-performance electromechanical systems, system intelligence, learning, adaptation, decision making, and control through the use of advanced hardware (actuators, sensors, microprocessors, DSPs, power electronics, and ICs) and leading-edge software. Integrated multidisciplinary features approach quickly, as documented in Fig. 6.2. The mechatronic paradigm, which integrates electrical, mechanical, and computer engineering, takes place. The structural complexity of mechatronic systems has increased drastically due to hardware and software advancements, as well as stringent achievable performance requirements. Answering the demands of rising electromechanical system complexity, performance specifications, and intelligence, the mechatronic paradigm was introduced. In addition to the proper choice of electromechanical system components and subsystems, there are other issues which must be addressed in view of the constantly evolving nature of the electromechanical systems theory (e.g., analysis, design, modeling, optimization, complexity, intelligence, decision making, diagnostics, packaging). Competitive optimum-performance electromechanical systems must be designed within the advanced hardware and software concepts.
Electrical Engineering
CAD Electromechanics Actuators/Sensors
Mechanical Engineering
Mechatronics Analysis Electromagnetics Electronics and ICs Control and DSPs
Modeling Optimization
Computer Engineering
FIGURE 6.2 Mechatronics integrates electrical, mechanical, and computer engineering.
©2002 CRC Press LLC
6.4 Design of Mechatronic Systems One of the most challenging problems in mechatronic systems design is the system architecture synthesis, system integration, optimization, as well as selection of hardware (actuators, sensors, power electronics, ICs, microcontrollers, and DSPs) and software (environments, tools, computation algorithms to perform control, sensing, execution, emulation, information flow, data acquisition, simulation, visualization, virtual prototyping, and evaluation). Attempts to design state-of-the-art high-performance mechatronic systems and to guarantee the integrated design can be pursued through analysis of complex patterns and paradigms of evolutionary developed biological systems. Recent trends in engineering have increased the emphasis on integrated analysis, design, and control of advanced electromechanical systems. The scope of mechatronic systems has continued to expand, and, in addition to actuators, sensors, power electronics, ICs, antennas, microprocessors, DSPs, as well as input/output devices, many other subsystems must be integrated. The design process is evolutionary in nature. It starts with a given set of requirements and specifications. High-level functional design is performed first in order to produce detailed design at the subsystem and component level. Using the advanced subsystems and components, the initial design is performed, and the closed-loop electromechanical system performance is tested against the requirements. If requirements and specifications are not met, the designer revises or refines the system architecture, and other solutions are sought. At each level of the design hierarchy, the system performance in the behavioral domain is used to evaluate and refine the design process and solution devised. Each level of the design hierarchy corresponds to a particular abstraction level and has the specified set of activities and design tools that support the design at this level. For example, different criteria are used to design actuators and ICs due to different behavior, physical properties, operational principles, and performance criteria imposed for these components. It should be emphasized that the level of hierarchy must be defined, e.g., there is no need to study the behavior of millions of transistors on each IC chip because mechatronic systems integrate hundreds of ICs, and the end-to-end behavior of ICs is usually evaluated (ICs are assumed to be optimized, and these ICs are used as ready-to-use components). The design flow is illustrated in Fig. 6.3. Automated synthesis can be attained to implement this design flow. The design of mechatronic systems is a process that starts from the specification of requirements and progressively proceeds to perform a functional design and optimization that is gradually refined through a sequence of steps. Specifications typically include the performance requirements derived from systems functionality, operating envelope, affordability, and other requirements. Both top-down and bottom-up approaches should be combined to design high-performance mechatronic systems augmenting hierarchy, integrity, regularity, modularity, compliance, and completeness in the synthesis process. Even though the
Achieved System Performance: Behavioral Domain
Desired System Performance: Behavioral Domain
System Design, Synthesis, and Optimization System Synthesis in Structural/Architectural Domain
FIGURE 6.3 Design flow in synthesis of mechatronic systems.
©2002 CRC Press LLC
basic foundations have been developed, some urgent areas have been downgraded, less emphasized, and researched. The mechatronic systems synthesis reported guarantees an eventual consensus between behavioral and structural domains, as well as ensures descriptive and integrative features in the design. These were achieved applying the mechatronic paradigm which allows one to extend and augment the results of classical mechanics, electromagnetics, electric machinery, power electronics, microelectronics, informatics, and control theories, as well as to apply advanced integrated hardware and software. To acquire and expand the engineering core, there is the need to augment interdisciplinary areas as well as to link and place the multidisciplinary perspectives integrating actuators–sensors–power electronics–ICs–DSPs to attain actuation, sensing, control, decision making, intelligence, signal processing, and data acquisition. New developments are needed. The theory and engineering practice of highperformance electromechanical systems should be considered as the unified cornerstone of the engineering curriculum through mechatronics. The unified analysis of actuators and sensors (e.g., electromechanical motion devices), power electronics and ICs, microprocessors and DSPs, and advanced hardware and software, have barely been introduced into the engineering curriculum. Mechatronics, as the breakthrough concept in the design and analysis of conventional-, mini-, micro- and nano-scale electromechanical systems, was introduced to attack, integrate, and solve a great variety of emerging problems.
6.5 Mechatronic System Components Mechatronics integrates electromechanical systems design, modeling, simulation, analysis, softwarehardware developments and co-design, intelligence, decision making, advanced control (including selfadaptive, robust, and intelligent motion control), signal/image processing, and virtual prototyping. The mechatronic paradigm utilizes the fundamentals of electrical, mechanical, and computer engineering with the ultimate objective to guarantee the synergistic combination of precision engineering, electronic control, and intelligence in the design, analysis, and optimization of electromechanical systems. Electromechanical systems (robots, electric drives, servomechanisms, pointing systems, assemblers) are highly nonlinear systems, and their accurate actuation, sensing, and control are very challenging problems. Actuators and sensors must be designed and integrated with the corresponding power electronic subsystems. The principles of matching and compliance are general design principles, which require that the electromechanical system architectures should be synthesized integrating all subsystems and components. The matching conditions have to be determined and guaranteed, and actuators– sensors–power electronics compliance must be satisfied. Electromechanical systems must be controlled, and controllers should be designed. Robust, adaptive, and intelligent control laws must be designed, examined, verified, and implemented. The research in control of electromechanical systems aims to find methods for devising intelligent and motion controllers, system architecture synthesis, deriving feedback maps, and obtaining gains. To implement these controllers, microprocessors and DSPs with ICs (input-output devices, A/D and D/A converters, optocouplers, transistor drivers) must be used. Other problems are to design, optimize, and verify the analysis, control, execution, emulation, and evaluation software. It was emphasized that the design of high-performance mechatronic systems implies the subsystems and components developments. One of the major components of mechatronic systems are electric machines used as actuators and sensors. The following problems are usually emphasized: characterization of electric machines, actuators, and sensors according to their applications and overall systems requirements by means of specific computer-aided-design software; design of high-performance electric machines, actuators, and sensors for specific applications; integration of electric motors and actuators with sensors, power electronics, and ICs; control and diagnostic of electric machines, actuators, and sensors using microprocessors and DSPs.
©2002 CRC Press LLC
6.6 Systems Synthesis, Mechatronics Software, and Simulation Modeling, simulation, and synthesis are complementary activities performed in the design of mechatronic systems. Simulation starts with the model developments, while synthesis starts with the specifications imposed on the behavior and analysis of the system performance through analysis using modeling, simulation, and experimental results. The designer mimics, studies, analyzes, and evaluates the mechatronic system’s behavior using state, performance, control, events, disturbance, and other variables. The synthesis process was described in section 6.4. Modeling, simulation, analysis, virtual prototyping, and visualization are critical and urgently important aspects for developing and prototyping of advanced electromechanical systems. As a flexible high-performance modeling and design environment, MATLAB has become a standard, cost-effective tool. Competition has prompted cost and product cycle reductions. To speed up analysis and design with assessment analysis, facilitate enormous gains in productivity and creativity, integrate control and signal processing using advanced microprocessors and DSPs, accelerate prototyping features, generate real-time C code and visualize the results, perform data acquisition and R data intensive analysis, the MATLAB environment is used. In MATLAB, the following commonly used R toolboxes can be applied: SIMULINK , Real-Time Workshop™, Control System, Nonlinear Control Design, Optimization, Robust Control, Signal Processing, Symbolic Math, System Identification, Partial Differential Equations, Neural Networks, as well as other application-specific toolboxes (see the MATLAB demo typing demo in the Command Window). MATLAB capabilities should be demonstrated by attacking important practical examples in order to increase students’ productivity and creativity by demonstrating how to use the advanced software in electromechanical system applications. The MATLAB environment offers a rich set of capabilities to efficiently solve a variety of complex analysis, modeling, simulation, control, and optimization problems encountered in undergraduate and graduate mechatronic courses. A wide array of mechatronic systems can be modeled, simulated, analyzed, and optimized. The electromechanical systems examples, integrated within mechatronic courses, will provide the practice and educate students with the highest degree of comprehensiveness and coverage.
6.7 Mechatronic Curriculum The ultimate objective of the mechatronic curriculum is to educate a new generation of students and engineers, as well as to assist industry and government in the development of high-performance electromechanical systems augmenting conventional engineering curriculum with an ever-expanding electromechanics core. The emphasis should be focused on advancing the overall mission of the engineering curriculum, because through mechatronics it is possible to further define, refine, and expand the objectives into three fundamental areas, which are research, education, and service. Using the mechatronic paradigm, academia will perform world-class fundamental and applied research by • integrating electromagnetics, electromechanics, power electronics, ICs, and control; • devising advanced design, analysis, and optimization simulation and analytic tools and capabilities through development of specialized computer-aided-design software; • developing actuation-sensing-control hardware; • devising advanced paradigms, concepts, and technologies; • supporting research, internship, and cooperative multidisciplinary education programs for undergraduate and graduate students; • supporting, sustaining, and assisting faculty in emerging new areas. Mechatronic curriculum design includes development of goals and objectives, programs of study and curriculum guides, courses, laboratories, textbooks, instructional materials, manuals, experiments,
©2002 CRC Press LLC
instructional sequences, material delivery techniques, visualization and demonstration approaches, and other supplemental materials to accomplish a wide range of educational and research goals. There is an increase in the number of students whose good programming skills and theoretical background match with complete inability to solve simple engineering problems. The fundamental goal of mechatronic courses is to demonstrate the application of theoretical, applied, and experimental results in analysis, design, and deployment of complex electromechanical systems (including NEMS and MEMS), to cover emerging hardware and software, to introduce and deliver the rigorous theory of electromechanics, to help students develop strong problem-solving skills, as well as to provide the needed engineering practice. The courses in mechatronics are intended to develop a thorough understanding of integrated perspectives in analysis, modeling, simulation, optimization, design, and implementation of complex electromechanical systems. By means of practical, worked-out examples, students will be prepared and trained to use the results in engineering practice, research, and developments. Advanced hardware and software of engineering importance (electromechanical motion devices, actuators, sensors, solid-state devices, power electronics, ICs, microprocessors, and DSPs) must be comprehensively covered in detail from multidisciplinary integrated perspectives. At Purdue University Indianapolis, in the Department of Electrical and Computer Engineering, the following undergraduate courses are required in the Electrical Engineering plan of study: Linear Circuit Analysis I and II, Signals and Systems, Semiconductor Devices, Electric and Magnetic Fields, Microprocessor Systems and Interfacing , and Feedback Systems Analysis and Design. The following elective undergraduate courses assist the mechatronic area: Electromechanical Motion Devices, Computer Architecture, Digital Signal Processing, and Multimedia Systems. In addition to this set of core Electrical and Computer Engineering courses, there is a critical need to teach the courses in mechatronics. The mechatronic curriculum should emphasize and augment traditional engineering topics and the latest enabling technologies and developments to integrate and stimulate new advances in the analysis and design of advanced state-of-the-art mechatronic systems. For example, the following courses should be developed and offered: Mechatronic Systems, Smart Structures, Micromechatronics (Microelectromechanical Systems), and Nanomechatronics (Nanoelectromechanical Systems). The major goal is to ensure a deep understanding of the engineering underpinnings, integrate engineering– science–technology, and develop the modern picture of electromechanical engineering by using the bedrock fundamentals of mechatronics. It is recognized by academia, industry, and government that the most urgent areas of modern mechatronics needing development are MEMS and NEMS. Therefore, current developments should be concentrated to perform fundamental, applied, and experimental research in these emerging fields.
6.8 Introductory Mechatronic Course At Purdue University Indianapolis, in the Electrical and Computer Engineering and Mechanical Engineering departments, an Electrical/Mechanical Engineering senior-level undergraduate–junior graduate mechatronic course was developed and offered. The topics covered are given in Table 6.1. This course is developed to bridge the engineering–science–technology gap by bonding innovative multi-disciplinary developments, focusing on state-of-the-art hardware, and centering on high-performance software. The developed course dramatically reduces the time students need to establish basic skills for high-technology employability. The objective of this course is twofold: to bring recent developments of modern electromechanics and to integrate an interactive studio-based method of instruction and delivery. During the past decade, there has been a shift in engineering education from an instructorcentered lectures environment to a student-centered learning environment. We have developed a mechatronics studio that combines lectures, simulation exercises, and experiments in a single classroom in order to implement new teaching and delivery methods through an active learning environment, activity-based strategies, interactive multimedia, networked computer-based learning, multisynchronous delivery of supporting materials, and effective demonstration. Simulation-based assignments can be used to illustrate problems that cannot be easily studied and assessed using classical paper-and-pencil analytic solutions. ©2002 CRC Press LLC
TABLE 6.1
Mechatronic Course Contents
No.
Topic
Class
1 2
Introduction to electromechanical systems and mechatronics Electromagnetics and mechanics in mechatronic systems: Newtonian mechanics, the Lagrange equations of motion, and Kirchhoff ’s laws Energy conversion and electromechanical analogies Dynamics of mechatronic system The MATLAB environment in nonlinear analysis and modeling of mechatronic systems Permanent-magnet direct-current and synchronous servo-motors Transducers and smart structures: actuators and sensors Power electronics, driving circuitry, power converters and amplifiers Motion control of electromechanical systems and smart structures Microprocessors and DSPs in control and data acquisition of mechatronic systems Mechatronic systems: case-studies, modeling, analysis, control, and laboratory experiments Advanced project
1 2
3 4 5 6 7 8 9 10 11 12
2 2 2 4 2 4 3 2 3 1
Although simulation-based assignments provide much insight to practical problems, there is nothing that can take the place of hands-on experiments. The mechatronics is introduced through synergy of comprehensive systems design, high-fidelity modeling, simulation, hardware demonstration, and case studies. The assessment performed demonstrates that this course guarantees comprehensive, balanced coverage, satisfies the program objectives, and fulfills the goals. While students are familiar with some topics of advanced engineering and science (calculus and physics), it is clear that they do not have sufficient background in nonlinear dynamics and control, electric machinery, power electronics, solid-state devices, ICs, microprocessors, and DSPs. Therefore, the material is presented in sufficient details, and basic theory needed to fully understand, appreciate, and apply mechatronics is covered. In this course, most efficient and straightforward analysis, modeling, simulation, and synthesis methods are presented and demonstrated with ultimate objectives to address and solve the analysis, design, control, optimization, and virtual prototyping problems. A wide range of worked-out examples and qualitative illustrations, which are treated in-depth, bridge the gap between the theory, practical problems, and engineering practice. Step-by-step, the mechatronic course guides students from rigorous theoretical foundation to advanced applications and implementation. In addition to achieving a good balance between theory and application, state-of-the-art hardware and software are emphasized and demonstrated. In this course, mechatronic systems are thoroughly covered, and students can easily apply the results to attack real engineering problems.
6.9 Books in Mechatronics The demand for educational books in mechatronics far exceeds what was previously anticipated by academia and industry. Excellent textbooks in electric machinery [1–8], power electronics [9–11], microelectronics and ICs [12], and sensors [13,14] were published. Educational examples in analysis and design of linear electromechanical systems are available from control books [15–21]. Control Systems Theory With Engineering Applications [18], shown in Fig. 6.4, has a number of illustrative examples in modeling, simulation, and control of complex nonlinear electromechanical systems. In particular, analysis and control of nonlinear transducers, permanent-magnet DC and synchronous motors, squirrel-cage induction motors, servomechanisms, and power converters are thoroughly covered. The need for a comprehensive treatment of nonlinear electromechanical systems using the mechatronic paradigm is evident. Excellent books in conventional electromechanical motion devices [3,4,22], and textbooks for mechanical engineering students in mechatronics [23–27] have been used in Electrical and Mechanical Engineering departments, respectively. However, there is a critical need for modern books in mechatronics that are comprehensive in their coverage and global in their perspective for engineering departments. The time has come to target new frontiers using the developed engineering enterprise, ©2002 CRC Press LLC
FIGURE 6.4 Control book with coverage in analysis and control of electromechanical systems. http://www.birkhauser. com/cgi-win/ISBN/0-8176-4203-X.
FIGURE 6.5 Books in electromechanical and mechatronic systems.
emerging technologies, advanced hardware, and state-of-the-art software. The book Electromechanical Systems, Electric Machines, and Applied Mechatronics [28] was written by taking advantage of the modern engineering curriculum, see Fig. 6.5. In this book, the fundamental theory of electromechanics, new enabling technologies, basic engineering principles, system integration, modeling, analysis, simulation, control, as well as a spectrum of emerging engineering problems, were comprehensively covered. For NEMS and MEMS, the book Nano- and Micro-Electromechanical Systems: Fundamentals of Nano- and Micro-Engineering [29] can be effectively used. A wide number of demonstrations and examples of electromechanical systems are covered. ©2002 CRC Press LLC
6.10 Mechatronic Curriculum Developments The current mechatronic curriculum leaves much to be desired, and the following strategy, which can be modified and expanded, should be pursued by academia to integrate the mechatronic courses in the undergraduate and graduate curricula: • commercialize and market mechatronic program; • expand the mechatronic horizon to conventional and mini-scale mechatronic systems, as well as to MEMS and NEMS which are emerging areas in engineering; • revise the engineering curriculum. In particular, Electromagnetics, Electromechanical Motion Devices, Power Electronics, Control, Microelectronics, and DSP courses should be offered as the required core courses, and as prerequisites for advanced mechatronic courses; • emphasize mechatronics as the center of the undergraduate and graduate electromechanical engineering curriculum rather than at the periphery; • cover moderately complex electromechanical systems and case studies in the undergraduate mechatronic courses and relocate highly specialized topics to the graduate program; • develop an intellectually demanding, progressive, well-balanced mechatronic curriculum and mechatronic courses with laboratories; • fully integrate computer-aided-design tools and advanced high-performance simulation software; • extend mechatronics to the undergraduate senior design projects; • write and publish comprehensive books, textbooks, and handbooks in mechatronics; and • widely and timely disseminate the results. Manageable collaboration between engineering disciplines and departments can be achieved within the mechatronic program. The following basic courses sequence can be applied: • • • • • • • • • •
Electromechanical Motion Devices, Power Electronics and Microelectronics, Microprocessors and Interfacing, Digital Signal Processing, Electromechanical Systems, Introduction to Mechatronics, Control Systems Theory and Control of Mechatronic Systems, Mechatronic Systems and Smart Structures, Microelectromechancial Systems, Nanoelectromechanical Systems.
Due to the differences in the electrical and computer, mechanical, and aerospace engineering plans of study and the limited number of elective engineering courses counted towards the degree, the mechatronic courses sequence can be different. For example, for electrical engineering students, the coursework plan of study can be designed using fundamental electrical engineering and applied mechanical engineering; for mechanical engineering students, fundamental mechanical engineering and applied electrical engineering can be emphasized. The students will have fundamentals in one core area while accomplishing breadth and receiving applied knowledge in the other field.
6.11 Conclusions: Mechatronics Perspectives Far-reaching fundamental and technological advances in electromechanical motion devices (actuators and sensors), power electronics, solid-state devices, ICs, MEMS and NEMS, materials and packaging, computers and informatics, microprocessors and DSPs, digital signal and optical processing, as well as computer-aided-design tools and simulation software, have brought new challenges to academia, ©2002 CRC Press LLC
industry, and government. As a result, many engineering schools have revised their curricula in order to offer the relevant interdisciplinary courses such as Electromechanical Systems and Mechatronics. The basis of mechatronics is fundamental theory and engineering practice. The attempts to introduce mechatronics have been only partially successful due to the absence of a long-term strategy. Therefore, coordinated efforts are sought. Most engineering curricula provide a single elective course to introduce mechatronics to electrical, computer, mechanical, and aerospace engineering students. Due to the lack of time, it is impossible to comprehensively cover the material and thoroughly emphasize the crossdisciplinary nature of mechatronics in one introductory course. As a result, this undergraduate or duallevel course might not adequately serve the students’ professional needs and goals, and does not satisfy growing academia, industrial, and government demands. A set of core mechatronic courses should be integrated into the engineering curriculum, and laboratory- and project-oriented courses should be developed to teach and demonstrate advanced hardware and software with application to complex electromechanical systems. The relevance of fundamental theory, applied results, and experiments is very important and must be emphasized. The great power and versatility of mechatronics, not to mention the prime importance of the results it approaches in all areas of engineering, make it worthwhile for all engineers to be acquainted with the basic theory and engineering practice. There is no end to the application of mechatronics and to the further contribution to this interdisciplinary concept. We have just skimmed the surface of mechatronics application to advanced electromechanical systems. New trends will be researched and applied in the near future because mechatronics is an engineering–science–technology frontier. For example, novel phenomena and operating principles in NEMS and MEMS can be devised, studied, analyzed, and verified using nanomechatronics and nanoelectromechanics.
References 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18.
Chapman, S. J., Electric Machinery Fundamentals, McGraw-Hill, New York, 1999. Fitzgerald, A. E., Kingsley, C., and Umans, S. D., Electric Machinery, McGraw-Hill, New York, 1990. Krause, P. C., and Wasynczuk, O., Electromechanical Motion Devices, McGraw-Hill, New York, 1989. Krause, P. C., Wasynczuk, O., and Sudhoff, S. D., Analysis of Electric Machinery, IEEE Press, New York, 1995. Leonhard, W., Control of Electrical Drives, Springer, Berlin, 1996. Ong, C. M., Dynamic Simulation of Electric Machines, Prentice-Hall, Upper Saddle River, NJ, 1998. Novotny, D. W., and Lipo, T. A., Vector Control and Dynamics of AC Drives, Clarendon Press, Oxford, 1996. Slemon, G. R., Electric Machines and Drives, Addison-Wesley Publishing Company, Reading, MA, 1992. Hart, D. W., Introduction to Power Electronics, Prentice-Hall, Upper Saddle River, NJ, 1997. Kassakian, J. G., Schlecht, M. F., and Verghese, G. C., Principles of Power Electronics, Addison-Wesley Publishing Company, Reading, MA, 1991. Mohan, N. T., Undeland, M., and Robbins, W. P., Power Electronics: Converters, Applications, and Design, John Wiley and Sons, New York, 1995. Sedra, A. S., and Smith, K. C., Microelectronic Circuits, Oxford University Press, New York, 1997. Fraden, J., Handbook of Modern Sensors: Physics, Design, and Applications, AIP Press, Woodbury, NY, 1997. Kovacs, G. T. A., Micromachined Transducers Sourcebook, McGraw-Hill, New York, 1998. Dorf, R. C., and Bishop, R. H., Modern Control Systems, Addison-Wesley Publishing Company, Reading, MA, 1995. Franklin, J. F., Powell, J. D., and Emami-Naeini, A., Feedback Control of Dynamic Systems, AddisonWesley Publishing Company, Reading, MA, 1994. Kuo, B. C., Automatic Control Systems, Prentice-Hall, Englewood Cliffs, NJ, 1995. Lyshevski, S. E., Control Systems Theory With Engineering Applications, Birkhäuser, Boston, MA, 2001. http://www.birkhauser.com/cgi-win/ISBN/0-8176-4203-X
©2002 CRC Press LLC
19. Ogata, K., Discrete-Time Control Systems, Prentice-Hall, Upper Saddle River, NJ, 1995. 20. Ogata, K., Modern Control Engineering, Prentice-Hall, Upper Saddle River, NJ, 1997. 21. Phillips, C. L., and Harbor, R. D., Feedback Control Systems, Prentice-Hall, Englewood Cliffs, NJ, 1996. 22. White, D. C., and Woodson, H. H., Electromechanical Energy Conversion, Wiley, New York, 1959. 23. Auslander, D. M., and Kempf, C. J., Mechatronics: Mechanical System Interfacing, Prentice-Hall, Upper Saddle River, NJ, 1996. 24. Bolton, W., Mechatronics: Electronic Control Systems in Mechanical Engineering, Addison-Wesley Logman Publishing, New York, 1999. 25. Bradley, D. A., Dawson, D., Burd, N. C., and Loader, A. J., Mechatronics, Chapman and Hall, New York, 1996. 26. Fraser, C., and Milne, J., Electro-Mechanical Engineering, IEEE Press, New York, 1994. 27. Shetty, D., and Kolk, R. A., Mechatronics System Design, PWS Publishing Company, New York, 1997. 28. Lyshevski, S. E., Electromechanical Systems, Electric Machines, and Applied Mechatronics, CRC Press, Boca Raton, FL, 1999. http://www.crcpress.com/us/product.asp?sku=2275&dept%5Fid=1 29. Lyshevski, S. E., Nano- and Microelectromechanical Systems: Fundamentals of Nano- and Microengineering, CRC Press, Boca Raton, FL, 2000. http://www.crcpress.com/us/product.asp?sku= 0916&dept%5Fid=1
©2002 CRC Press LLC
II Physical System Modeling 7 Modeling Electromechanical Systems Francis C. Moon Introduction • Models for Electromechanical Systems • Rigid Body Models • Basic Equations of Dynamics of Rigid Bodies • Simple Dynamic Models • Elastic System Modeling • Electromagnetic Forces • Dynamic Principles for Electric and Magnetic Circuits • Earnshaw’s Theorem and Electromechanical Stability
8 Structures and Materials Eniko T. Enikov Fundamental Laws of Mechanics • Common Structures in Mechatronic Systems • Vibration and Modal Analysis • Buckling Analysis • Transducers • Future Trends
9 Modeling of Mechanical Systems for Mechatronics Applications Raul G. Longoria Introduction • Mechanical System Modeling in Mechatronic Systems • Descriptions of Basic Mechanical Model Components • Physical Laws for Model Formulation • Energy Methods for Mechanical System Model Formulation • Rigid Body Multidimensional Dynamics • Lagrange’s Equations
10 Fluid Power Systems Qin Zhang and Carroll E. Goering Introduction • Hydraulic Fluids • Hydraulic Control Valves • Hydraulic Pumps • Hydraulic Cylinders • Fluid Power Systems Control • Programmable Electrohydraulic Valves
11 Electrical Engineering Giorgio Rizzoni Introduction • Fundamentals of Electric Circuits • Resistive Network Analysis • AC Network Analysis
12 Engineering Thermodynamics Michael J. Moran Fundamentals • Extensive Property Balances • Property Relations and Data • Vapor and Gas Power Cycles
©2002 CRC Press LLC
13 Modeling and Simulation for MEMS Carla Purdy Introduction • The Digital Circuit Development Process: Modeling and Simulating Systems with Micro- (or Nano-) Scale Feature Sizes • Analog and Mixed-Signal Circuit Development: Modeling and Simulating Systems with Micro- (or Nano-) Scale Feature Sizes and Mixed Digital (Discrete) and Analog (Continuous) Input, Output, and Signals • Basic Techniques and Available Tools for MEMS Modeling and Simulation • Modeling and Simulating MEMS, i.e., Systems with Micro- (or Nano-) Scale Feature Sizes, Mixed Digital (Discrete) and Analog (Continuous) Input, Output, and Signals, Two- and Three-Dimensional Phenomena, and Inclusion and Interaction of Multiple Domains and Technologies • A “Recipe” for Successful MEMS Simulation • Conclusion: Continuing Progress in MEMS Modeling and Simulation
14 Rotational and Translational Microelectromechanical Systems: MEMS Synthesis, Microfabrication, Analysis, and Optimization Sergey Edward Lyshevski Introduction • MEMS Motion Microdevice Classifier and Structural Synthesis • MEMS Fabrication • MEMS Electromagnetic Fundamentals and Modeling • MEMS Mathematical Models • Control of MEMS • Conclusions
15 The Physical Basis of Analogies in Physical System Models Neville Hogan and Peter C. Breedveld Introduction • History • The Force-Current Analogy: Across and Through Variables • Maxwell’s Force-Voltage Analogy: Effort and Flow Variables • A Thermodynamic Basis for Analogies • Graphical Representations • Concluding Remarks
©2002 CRC Press LLC
0066_Frame_C07 Page 1 Wednesday, January 9, 2002 3:39 PM
7 Modeling Electromechanical Systems 7.1 7.2 7.3
Introduction Models for Electromechanical Systems Rigid Body Models Kinematics of Rigid Bodies • Constraints and Generalized Coordinates • Kinematic versus Dynamic Problems
7.4
Basic Equations of Dynamics of Rigid Bodies
7.5
Simple Dynamic Models
Newton–Euler Equation • Multibody Dynamics Compound Pendulum • Gyroscopic Motions
7.6
Elastic System Modeling Piezoelastic Beam
7.7 7.8
Electromagnetic Forces Dynamic Principles for Electric and Magnetic Circuits
7.9
Earnshaw’s Theorem and Electromechanical Stability
Lagrange’s Equations of Motion for Electromechanical Systems
Francis C. Moon Cornell University
7.1 Introduction Mechatronics describes the integration of mechanical, electromagnetic, and computer elements to produce devices and systems that monitor and control machine and structural systems. Examples include familiar consumer machines such as VCRs, automatic cameras, automobile air bags, and cruise control devices. A distinguishing feature of modern mechatronic devices compared to earlier controlled machines is the miniaturization of electronic information processing equipment. Increasingly computer and electronic sensors and actuators can be embedded in the structures and machines. This has led to the need for integration of mechanical and electrical design. This is true not only for sensing and signal processing but also for actuator design. In human size devices, more powerful magnetic materials and superconductors have led to the replacement of hydraulic and pneumatic actuators with servo motors, linear motors, and other electromagnetic actuators. At the material scale and in microelectromechanical systems (MEMS), electric charge force actuators, piezoelectric actuators, and ferroelectric actuators have made great strides. While the materials used in electromechanical design are often new, the basic dynamic principles of Newton and Maxwell still apply. In spatially extended systems one must solve continuum problems using the theory of elasticity and the partial differential equations of electromagnetic field theory. For many applications, however, it is sufficient to use lumped parameter modeling based on i) rigid body dynamics
©2002 CRC Press LLC
0066_Frame_C07 Page 2 Wednesday, January 9, 2002 3:39 PM
for inertial components, ii) Kirchhoff circuit laws for current-charge components, and iii) magnet circuit laws for magnetic flux devices. In this chapter we will examine the basic modeling assumptions for inertial, electric, and magnetic circuits, which are typical of mechatronic systems, and will summarize the dynamic principles and interactions between the mechanical motion, circuit, and magnetic state variables. We will also illustrate these principles with a few examples as well as provide some bibliography to more advanced references in electromechanics.
7.2 Models for Electromechanical Systems The fundamental equations of motion for physical continua are partial differential equations (PDEs), which describe dynamic behavior in both time and space. For example, the motions of strings, elastic beams and plates, fluid flow around and through bodies, as well as magnetic and electric fields require both spatial and temporal information. These equations include those of elasticity, elastodynamics, the Navier–Stokes equations of fluid mechanics, and the Maxwell–Faraday equations of electromagnetics. Electromagnetic field problems may be found in Jackson (1968). Coupled field problems in electric fields and fluids may be found in Melcher (1980) and problems in magnetic fields and elastic structures may be found in the monograph by Moon (1984). This short article will only treat solid systems. Many practical electromechanical devices can be modeled by lumped physical elements such as mass or inductance. The equations of motion are then integral forms of the basic PDEs and result in coupled ordinary differential equations (ODEs). This methodology will be explored in this chapter. Where physical problems have spatial distributions, one can often separate the problem into spatial and temporal parts called separation of variables. The spatial description is represented by a finite number of spatial or eigenmodes each of which has its modal amplitude. This method again results in a set of ODEs. Often these coupled equations can be understood in the context of simple lumped mechanical masses and electric and magnetic circuits.
7.3 Rigid Body Models Kinematics of Rigid Bodies Kinematics is the description of motion in terms of position vectors r, velocities v, acceleration a, rotation rate vector ω, and generalized coordinates {qk(t)} such as relative angular positions of one part to another in a machine (Fig. 7.1). In a rigid body one generally specifies the position vector of one point, such as the center of mass rc, and the velocity of that point, say vc. The angular position of a rigid body is specified by angle sets call Euler angles. For example, in vehicles there are pitch, roll, and yaw angles (see, e.g., Moon, 1999). The angular velocity vector of a rigid body is denoted by ω. The velocity of a point in a rigid body other than the center of mass, rp = rc + ρ, is given by
vP = vc + ω × ρ
(7.1)
where the second term is a vector cross product. The angular velocity vector w is a property of the entire rigid body. In general a rigid body, such as a satellite, has six degrees of freedom. But when machine elements are modeled as a rigid body, kinematic constraints often limit the number of degrees of freedom.
Constraints and Generalized Coordinates Machines are often collections of rigid body elements in which each component is constrained to have one degree of freedom relative to each of its neighbors. For example, in a multi-link robot arm shown in Fig. 7.2, each rigid link has a revolute degree of freedom. The degrees of freedom of each rigid link are constrained by bearings, guides, and gearing to have one type of relative motion. Thus, it is convenient ©2002 CRC Press LLC
0066_Frame_C07 Page 3 Wednesday, January 9, 2002 3:39 PM
FIGURE 7.1
Sketch of a rigid body with position vector, velocity, and angular velocity vectors.
FIGURE 7.2
Multiple link robot manipulator arm.
to use these generalized motions {qk: k = 1,…, K } to describe the dynamics. It is sometimes useful to define a vector or matrix, J(qk), called a Jacobian, that relates velocities of physical points in the machine to the generalized velocities { q˙k }. If the position vector to some point in the machine is rP(qk) and is determined by geometric constraints indicated by the functional dependence on the {qk(t)}, then the velocity of that point is given by
vP =
∂ rP
˙ ∑ --------q ∂q
r
= J ⋅ q˙
(7.2)
r
where the sum is on the number of generalized degrees of freedom K. The three-by-K matrix J is called a Jacobian and q˙ is a K × 1 vector of generalized coordinates. This expression can be used to calculate ©2002 CRC Press LLC
0066_Frame_C07 Page 4 Wednesday, January 9, 2002 3:39 PM
FIGURE 7.3
Example of a kinematic mechanism.
the kinetic energy of the constrained machine elements, and using Lagrange’s equations discussed below, derive the equations of motion (see also Moon, 1999).
Kinematic versus Dynamic Problems Some machines are constructed in a closed kinematic chain so that the motion of one link determines the motion of the rest of the rigid bodies in the chain, as in the four-bar linkage shown in Fig. 7.3. In these problems the designer does not have to solve differential equations of motion. Newton’s laws are used to determine forces in the machine, but the motions are kinematic, determined through the geometric constraints. In open link problems, such as robotic devices (Fig. 7.2), the motion of one link does not determine the dynamics of the rest. The motions of these devices are inherently dynamic. The engineer must use both the kinematic constraints (7.2) as well as the Newton–Euler differential equation of motion or equivalent forms such as Lagrange’s equation discussed below.
7.4 Basic Equations of Dynamics of Rigid Bodies In this section we review the equations of motion for the mechanical plant in a mechatronics system. This plant could be a system of rigid bodies such as in a serial robot manipulator arm (Fig. 7.2) or a magnetically levitated vehicle (Fig. 7.4), or flexible structures in a MEMS accelerometer. The dynamics of flexible structural systems are described by PDEs of motion. The equation for rigid bodies involves Newton’s law for the motion of the center of mass and Euler’s extension of Newton’s laws to the angular momentum of the rigid body. These equations can be formulated in many ways (see Moon, 1999): 1. 2. 3. 4.
Newton–Euler equation (vector method) Lagrange’s equation (scalar-energy method) D’Alembert’s principle (virtual work method) Virtual power principle (Kane’s equation, or Jourdan’s principle)
Newton–Euler Equation Consider the rigid body in Fig. 7.1 whose center of mass is measured by the vector rc in some fixed coordinate system. The velocity and acceleration of the center of mass are given by
r˙ c = v c ,
v˙ c = a c
(7.3)
The “over dot” represents a total derivative with respect to time. We represent the total sum of vector forces on the body from both mechanical and electromagnetic sources by F. Newton’s law for the motion
©2002 CRC Press LLC
0066_Frame_C07 Page 5 Wednesday, January 9, 2002 3:39 PM
FIGURE 7.4
Magnetically levitated rigid body (HSST MagLev prototype vehicle, 1998, Nagoya, Japan).
of the center of mass of a body with mass m is given by
mv˙ c = F
(7.4)
If r is a vector to some point in the rigid body, we define a local position vector ρ by rP = rc + ρ. If a force Fi acts at a point ri in a rigid body, then we define the moment of the force M about the fixed origin by
Mi = ri × Fi
(7.5)
The total force moment is then given by the sum over all the applied forces as the body
M =
∑r
i
× Fi = rc × F + Mc
where M c =
∑r
i
× Fi
(7.6)
We also define the angular momentum of the rigid body by the product of a symmetric matrix of second moments of mass called the inertia matrix Ic. The angular momentum vector about the center of mass is defined by
Hc = Ic ⋅ w
(7.7)
Since Ic is a symmetric matrix, it can be diagonalized with principal inertias (or eigenvalues) {Iic} about principal directions (eigenvectors) {e1, e2, e3}. In these coordinates, which are attached to the body, the angular momentum about the center of mass becomes
H c = I 1c w 1 e 1 + I 2c w 2 e 2 + I 3c w 3 e 3
(7.8)
where the angular velocity vector is written in terms of principal eigenvectors {e1, e2, e3} attached to the rigid body. Euler’s extension of Newton’s law for a rigid body is then given by
˙ c = Mc H
©2002 CRC Press LLC
(7.9)
0066_Frame_C07 Page 6 Wednesday, January 9, 2002 3:39 PM
This equation says that the change in the angular momentum about the center of mass is equal to the total moment of all the forces about the center of mass. The equation can also be applied about a fixed point of rotation, which is not necessarily the center of mass, as in the example of the compound pendulum given below. Equations (7.4) and (7.9) are known as the Newton–Euler equations of motion. Without constraints, they represent six coupled second order differential equations for the position of the center of mass and for the angular orientation of the rigid body.
Multibody Dynamics In a serial link robot arm, as shown in Fig. 7.2, we have a set of connected rigid bodies. Each body is subject to both applied and constraint forces and moments. The dynamical equations of motion involve the solution of the Newton–Euler equations for each rigid link subject to the geometric or kinematics a constraints between each of the bodies as in (7.2). The forces on each body will have applied terms F , c from actuators or external mechanical sources, and internal constraint forces F . When friction is absent, the work done by these constraint forces is zero. This property can be used to write equations of motion in terms of scalar energy functions, known as Lagrange’s equations (see below). Whatever the method used to derive the equation of motions, the dynamical equations of motion for multibody systems in terms of generalized coordinates {qk(t)} have the form
∑ m q˙˙ + ∑ ∑ m ij j
q˙ q˙ = Q i
ijk j k
(7.10)
The first term on the left involves a generalized symmetric mass matrix mij = mji. The second term includes Coriolis and centripetal acceleration. The right-hand side includes all the force and control terms. This equation has a quadratic nonlinearity in the generalized velocities. These quadratic terms usually drop out for rigid body problems with a single axis of rotation. However, the nonlinear inertia terms generally appear in problems with simultaneous rotation about two or three axes as in multi-link robot arms (Fig. 7.2), gyroscope problems, and slewing momentum wheels in satellites. In modern dynamic simulation software, called multibody codes, these equations are automatically derived and integrated once the user specifies the geometry, forces, and controls. Some of these codes are called ADAMS, DADS, Working Model, and NEWEUL. However, the designer must use caution as these codes are sometimes poor at modeling friction and impacts between bodies.
7.5 Simple Dynamic Models Two simple examples of the application of the angular momentum law are now given. The first is for rigid body rotation about a single axis and the second has two axes of rotation.
Compound Pendulum When a body is constrained to a single rotary degree of freedom and is acted on by the force of gravity as in Fig. 7.5, the equation of motion takes the form, where θ is the angle from the vertical,
IJ – ( m 1 L 1 – m 2 L 2 )g sin q = T ( t ) 2
2
(7.11)
where T(t) is the applied torque, I = m1 L 1 + m2 L 2 is the moment of inertia (properly called the second moment of mass). The above equation is nonlinear in the sine function of the angle. In the case of small motions about θ = 0, the equation becomes a linear differential equation and one can look for solutions of the form θ = A cos ωt, when T(t) = 0. For this case the pendulum exhibits sinusoidal motion with ©2002 CRC Press LLC
0066_Frame_C07 Page 7 Wednesday, January 9, 2002 3:39 PM
FIGURE 7.5
Sketch of a compound pendulum under gravity torques.
FIGURE 7.6
Sketch of a magnetically levitated flywheel on high-temperature superconducting bearings.
natural frequency
w = [ g ( m 2 L 2 – m 1 L 1 )/I ]
1/2
(7.12)
For the simple pendulum m1 = 0, and we have the classic pendulum relation in which the natural frequency depends inversely on the square root of the length:
w = ( g/L 2 )
1/2
(7.13)
Gyroscopic Motions Spinning devices such as high speed motors in robot arms or turbines in aircraft engines or magnetically levitated flywheels (Fig. 7.6) carry angular momentum, devoted by the vector H. Euler’s extension of Newton’s laws says that a change in angular momentum must be accompanied by a force moment M,
˙ M = H
(7.14)
In three-dimensional problems one can often have components of angular momentum about two different axes. This leads to a Coriolis acceleration that produces a gyroscopic moment even when the two angular motions are steady. Consider the spinning motor with spin f about an axis with unit vector e1 and ©2002 CRC Press LLC
0066_Frame_C07 Page 8 Wednesday, January 9, 2002 3:39 PM
FIGURE 7.7
Gyroscopic moment on a precessing, spinning rigid body.
let us imagine an angular motion of the e1 axis, y about a perpendicular axis ez called the precession axis in gyroscope parlance. Then one can show that the angular momentum is given by
H = I 1 fe 1 + I z ye z
(7.15)
and the rate of change of angular momentum for constant spin and presession rates is given by
˙ = y˙ e z × H H
(7.16)
There must then exist a gyroscopic moment, often produced by forces on the bearings of the axel (Fig. 7.7). This moment is perpendicular to the plane formed by e1 and ez, and is proportional to the product of the rotation rates:
M = I 1 fye z × e 1
(7.17)
This has the same form as Eq. (7.10), when the generalized force Q is identified with the moment M, i.e., the moment is the product of generalized velocities when the second derivative acceleration terms are zero.
7.6 Elastic System Modeling Elastic structures take the form of cables, beams, plates, shells, and frames. For linear problems one can use the method of eigenmodes to represent the dynamics with a finite set of modal amplitudes for generalized degrees of freedom. These eigenmodes are found as solutions to the PDEs of the elastic structure (see, e.g., Yu, 1996). The simplest elastic structure after the cable is a one-dimensional beam shown in Fig. 7.8. For small motions we assume only transverse displacements w(x, t), where x is a spatial coordinate along the beam. One usually assumes that the stresses on the beam cross section can be integrated to obtain stress vector resultants of shear V, bending moment M, and axial load T. The beam can be loaded with point or concentrated forces, end forces or moment or distributed forces as in the case of gravity, fluid forces, or electromagnetic forces. For a distributed transverse load f(x, t), the equation of motion is given by 4
2
2
∂ w ∂ w ∂ w D ---------4 – T ---------2 + rA --------= f ( x, t ) 2 ∂x ∂x ∂t ©2002 CRC Press LLC
(7.18)
0066_Frame_C07 Page 9 Wednesday, January 9, 2002 3:39 PM
FIGURE 7.8
Sketch of an elastic cantilevered beam.
where D is the bending stiffness, A is the cross-sectional area of the beam, and ρ is the density. For a beam 3 with Young’s modulus Y, rectangular cross section of width b, and height h, D = Ybh /12. For D = 0, one has a cable or string under tension T, and the equation takes the form of the usual wave equation. For a beam with tension T, the natural frequencies are increased by the addition of the second term in the equation. For T = −P, i.e., a compressive load on the end of the beam, the curvature term leads to a decrease of natural frequency with increase of the compressive force P. If the lowest natural frequency goes to zero with increasing load P, the straight configuration of the beam becomes unstable or undergoes buckling. The use of T or (−P) to stiffen or destiffen a beam structure can be used in design of sensors to create a sensor with variable resonance. This idea has been used in a MEMS accelerometer design (see below). Another feature of the beam structure dynamics is the fact that unlike the string or cable, the frequencies of the natural modes are not commensurate due to the presence of the fourth-order derivative term in the equation. In wave type problems this is known as wave dispersion. This means that waves of different wavelengths travel at different speeds so that wave pulse shapes change their form as the wave moves through the structure. In order to solve dynamic problems in finite length beam structures, one must specify boundary conditions at the ends. Examples of boundary conditions include
clamped end
w = 0,
∂w ------- = 0 ∂x
pinned end
w = 0,
∂ w ---------2 = 0 (zero moment) ∂x
2
free end
∂ w ---------2 = 0, ∂x
2
(7.19)
3
∂ w ---------3 = 0 (zero shear) ∂x
Piezoelastic Beam Piezoelastic materials exhibit a coupling between strain and electric polarization or voltage. Thus, these materials can be used for sensors or actuators. They have been used for active vibration suppression in elastic structures. They have also been explored for active optics space applications. Many natural materials exhibit piezoelasticity such as quartz as well as manufactured materials such as barium titanate, lead zirconate titanate (PZT), and polyvinylidene fluoride (PVDF). Unlike forces on charges and currents (see below), the electric effect takes place through a change in shape of the material. The modeling of these devices can be done by modifying the equations for elastic structures. The following work on piezo-benders is based on the work of Lee and Moon (1989) as summarized in Miu (1993). One of the popular configurations of a piezo actuator-sensor is the piezo-bender shown in Fig. 7.9. The elastic beam is of rectangular cross section as is the piezo element. The piezo element
©2002 CRC Press LLC
0066_Frame_C07 Page 10 Wednesday, January 9, 2002 3:39 PM
FIGURE 7.9
Elastic beam with two piezoelectric layers (Lee and Moon, 1989).
can be cemented on one or both sides of the beam either partially or totally covering the surface of the non-piezo substructure. In general the local electric dipole polarization depends on the six independent strain components produced by normal and shear stresses. However, we will assume that the transverse voltage or polarization is coupled to the axial strain in the plate-shaped piezo layers. The constitutive relations between axial stress and strain, T, S, electric field and electric displacement, E3, D3 (not to be confused with the bending stiffness D), are given by
T 1 = c 11 S 1 – e 31 E 3 ,
D 3 = e 31 S 1 + e 3 E 3
(7.20)
The constants c11, e31, ε3, are the elastic stiffness modulus, piezoelectric coupling constant, and the electric permittivity, respectively. If the piezo layers are polled in the opposite directions, as shown in the Fig. 7.9, an applied voltage will produce a strain extention in one layer and a strain contraction in the other layer, which has the effect of an applied moment on the beam. The electrodes applied to the top and bottom layers of the piezo layers can also be shaped so that there can be a gradient in the average voltage across the beam width. For this case the equation of motion of the composite beam can be written in the form 2
4 2 ∂ V3 ∂ w ∂ w D ---------4 + rA --------= – 2e 31 z o ----------2 2 ∂x ∂x ∂t
(7.21)
where zo = (hS + hP)/2. The z term is the average of piezo plate and substructure thicknesses. When the voltage is uniform, then the right-hand term results in an applied moment at the end of the beam proportional to the transverse voltage.
7.7 Electromagnetic Forces One of the keys to modeling mechatronic systems is the identification of the electric and magnetic forces. Electric forces act on charges and electric polarization (electric dipoles). Magnetic forces act on electric currents and magnetic polarization. Electric charge and current can experience a force in a uniform electric or magnetic field; however, electric and magnetic dipoles will only produce a force in an electric or magnetic field gradient. Electric and magnetic forces can also be calculated using both direct vector methods as well as from energy principles. One of the more popular methods is Lagrange’s equation for electromechanical systems described below. ©2002 CRC Press LLC
0066_Frame_C07 Page 11 Wednesday, January 9, 2002 3:39 PM
F
+Q
+Q
F
Magnetic Force Vector, F = I × B
Magnetic Field Vector B
Electric Current, I
FIGURE 7.10
Electric forces on two charges (top). Magnetic force on a current carrying wire element (bottom).
Electromagnetic systems can be modeled as either distributed field quantities, such as electric field E or magnetic flux density B or as lumped element electric and magnetic circuits. The force on a point charge Q is given by the vector equation (Fig. 7.10):
F = QE
(7.22)
When E is generated by a single charge, the force between charges Q1 and Q2 is given by
Q1 Q2 -2 F = --------------4pe 0 r
(7.23)
and is directed along the line connecting the two charges. Like charges repel and opposite charges attract one another. The magnetic force per unit length on a current element I is given by the cross product
F=I×B
(7.24)
where the magnetic force is perpendicular to the plane of the current element and the magnetic field vector. The total force on a closed circuit in a uniform field can be shown to be zero. Net forces on closed circuits are produced by field gradients due to other current circuits or field sources. Forces produced by field distributions around a volume containing electric charge or current can be calculated using the field quantities of E, B directly using the concept of magnetic and electric stresses, which was developed by Faraday and Maxwell. These electromagnetic stresses must be integrated over an area surrounding the charge or current distribution. For example, a solid containing a current 2 distribution can experience a magnetic pressure, P = B t /2µ0, on the surface element and a magnetic 2 tension, tn = B n /2µ0, where the magnetic field components are written in terms of values tangential and 2 normal to the surface. Thus, a one-tesla magnetic field outside of a solid will experience 40 N/cm pressure if the field is tangential to the surface. In general there are four principal methods to calculate electric and magnetic forces: • direct force vectors and moments between electric charges, currents, and dipoles; • electric field-charge and magnetic field-current force vectors; ©2002 CRC Press LLC
0066_Frame_C07 Page 12 Wednesday, January 9, 2002 3:39 PM
FIGURE 7.11
Two elastic beams with electric charges at the ends.
• electromagnetic tensor, integration of electric tension, magnetic pressure over the surface of a material body; and • energy methods based on gradients of magnetic and electric energy. Examples of the direct method and stress tensor method are given below. The energy method is described in the section on Lagrange’s equations. Example 1. Charge–Charge Forces Suppose two elastic beams in a MEMS device have electric charges Q1, Q2 coulombs each concentrated at their tips (Fig. 7.11). The electric force between the charges is given by the vector
Q1 Q2 r - ---F = -----------4pe 0 r 3
(newtons)
(7.25)
where 1/4pe 0 = 8.99 × 10 Nm /C . If the initial separation between the beams is d0, we seek the new separation under the electric force. For simplicity, we let Q1 = −Q2 = Q, where opposite charges create an attractive force between the beam tips. The deflection of the cantilevers is given by 9
2
2
3
FL 1 d = --------- = --F 3YI k
(7.26)
where L is the length, Y the Young’s modulus, I the second moment of area, and k the effective spring constant. Under the electric force, the new separation is d = d0 − 2δ, 2
Q 1 k δ = ----------- ------------------------2 4pe 0 ( d 0 – 2d )
(7.27)
For δ b
(8.26)
The torsional stiffness of rectangular cross-section beams can be obtained in terms of infinite power series [Hopkins 1987]. If the cross-section has dimension a × b, b < a, the first three term of this series result in an equation similar to (8.25)
M = 2KGα,
4
b b 3 1 where K = ab -- – 0.21 -- 1 – ----------4 . a 3 12a
(8.27)
Thin Plates Pressure sensors are one of the most popular electromechanical transducers. The basic structure used to convert mechanical pressure into electrical signal is a thin plate subjected to a pressure differential. Piezoresistive gauges are used to convert the strain in the membrane into change of resistance, which is ©2002 CRC Press LLC
0066_Frame_C08 Page 8 Wednesday, January 9, 2002 3:48 PM
TABLE 8.2 Deflection and Bending Moments of Clamped Plate Under Uniform Load q [Evans 1939] b/a
W(x = 0, y = 0)
Mx(x = a/2, y = 0)
My(x = 0, y = b/2)
1 1.5 2 ∞
0.00126qa /D 4 0.00220qa /D 4 0.00254qa /D 4 0.00260qa /D
−0.0513qa 2 −0.0757qa 2 −0.0829qa 2 −0.0833qa
−0.0513qa 2 −0.0570qa 2 −0.0571qa 2 −0.0571qa
FIGURE 8.4
4
2
2
Mx(x = 0, y = 0) 2
My(x = 0, y = 0) 2
0.0231qa 2 0.0368qa 2 0.0412qa 2 0.0417qa
0.0231qa 2 0.0203qa 2 0.0158qa 2 0.0125qa
Thin plate subjected to positive pressure q.
read out using a conventional resistive bridge circuit. The initial pressure sensors were fabricated via anisotropic etching of silicon, which results in a rectangular diaphragm. Figure 8.4 shows a thin-plate, subjected to normal pressure q, resulting in out-of-plane displacement w(x, y). The equilibrium condition for w(x, y) is given by the thin plate theory [Timoshenko 1959]:
q ∂ w ∂ w ∂ w ---------4 + 2 ---------------2 + ---------4 = ---- , 2 D ∂x ∂x ∂y ∂y 4
4
4
(8.28)
where D = Eh /12(1 − ν ) is the flexural rigidity, E is the Young’s modulus, ν is the Poisson ratio, and h is the thickness of the plate. The edge-moments (moments per unit length of the edge) and the small strains are 3
2
2
2
2
2
2
∂ w ∂ w ∂ w M x ( x, y ) = – D ---------2 – n ---------2 , e xx ( x, y, z ) = – z ---------2 ∂x ∂y ∂x ∂ w ∂ w M y ( x, y ) = – D ---------2 – n ---------2 , ∂y ∂x 2
∂ w M xy ( x, y ) = D(1 – n ) ------------ , ∂x∂y
2
∂ w e yy ( x, y, z ) = – z ---------2 ∂y
(8.29)
2
∂ w e xy ( x, y, z ) = – z -----------∂x∂y
Using (8.29), one can calculate the maximum strains occurring at the top and bottom faces of the plate in terms of the edge-moments:
12z max e xx ( x, y, z ) = --------3 ( M x – nM y ) Eh 12z max e yy ( x, y, z ) = --------3 ( M y – nM x ) Eh
z=h
z=h
12 = --------2 ( M x – nM y ) Eh 12 = --------2 ( M y – nM x ) Eh
(8.30)
In the case of a pressure sensor with a diaphragm subjected to a uniform pressure, the boundary conditions are built-in edges: w = 0, ∂ w/∂ x = 0 at x = ±a/2 and w = 0, ∂ w/∂ y = 0 at y = ±b/2, where the diaphragm has lateral dimensions a × b. The solution of this problem has been obtained by [Evans 1939], showing that the maximum strains are at the center of the edges. The values of the edge-moments and the displacement of the center of plate are listed in Table 8.2. ©2002 CRC Press LLC
0066_Frame_C08 Page 9 Wednesday, January 9, 2002 3:48 PM
8.3 Vibration and Modal Analysis As mentioned earlier, the time response of a continuum structure requires the solution of Eqs. (8.10) with the acceleration terms present. For linear systems this solution can be represented by an infinite superposition of characteristic functions (modes). Associated with each such mode is also a characteristic number (eigenvalue) determining the time response of the mode. The analysis of these modes is called modal analysis and has a central role in the design of resonant cantilever sensors, flapping wings for micro-air-vehicles (MAVs) and micromirrors, used in laser scanners and projection systems. In the case of a cantilever beam, the flexural displacements are described by a fourth-order differential equation
IE ∂ w ( x, t ) ∂ w ( x, t ) ------- ---------------------- + ---------------------- = 0 2 rA ∂x 4 ∂t 4
2
(8.31)
where I is the moment of inertia, E is the Young’s modulus, ρ is the density, and A is the area of the cross section. When the thickness of the cantilever is much smaller than the width, E should be replaced by 2 the reduced Young’s modulus E1 = E/(1 − ν ). For a rectangular cross section, (8.31) is reduced to
Eh ∂ w ( x, t ) ∂ w ( x, t ) --------- ---------------------- + ---------------------- = 0 2 12r ∂x 4 ∂t 2
4
2
(8.32)
where h is the thickness of the beam. The solution of (8.32) can be written in terms of an infinite series of characteristic functions representing the individual vibration modes ∞
w =
∑ Φ ( x ) sin ( w t + d ) i
i
i
(8.33)
i=1
where the characteristic functions Φi are expressed with the four Rayleigh functions S, T, U, and V:
Φi = ai S ( li x ) + bi T ( li x ) + ci U ( li x ) + di V ( li x ) 1 1 S ( x ) = -- ( cosh x + cos x ), T ( x ) = -- ( sinh x + sin x ) 2 2 1 1 4 2 rA U ( x ) = -- ( cosh x – cos x ), V ( x ) = -- ( sinh x – sin x ), l i = w i ------2 2 IE
(8.34)
The coefficients ai, bi, ci, di, ωi, and δi are determined from the boundary and initial conditions of (8.34). For a cantilever beam with a fixed end at x = 0 and a free end at x = L, the boundary conditions are
w ( 0, t ) = 0,
∂ w ( L, t ) ---------------------- = 0 2 ∂x
∂w ( 0, t ) -------------------- = 0, ∂x
∂ w ( L, t ) ---------------------- = 0 3 ∂x
2
(8.35) 3
Since (8.35) are to be satisfied by each of the functions Φi, it follows that ai = 0, bi = 0 and
cosh(λiL)cos(λiL) = −1 ©2002 CRC Press LLC
(8.36)
0066_Frame_C08 Page 10 Wednesday, January 9, 2002 3:48 PM
FIGURE 8.5
First four vibration modes of a cantilever beam.
From this transcendental equation the λi’s and the circular frequencies ωi are determined [Butt et al. 1995].
( 2i – 1 ) p Eh ( 2i – 1 ) p IE - ------- = ------------------------- --------w i = ------------------------2 2 rA 12r 4L 4L
( 2i – 1 )p l i L ≅ ---------------------- , 2
2
2
2
2
2
(8.37)
Figure 8.5 shows the first four vibrational modes of the cantilever. An important result of the modal analysis is the calculation of the amplitude of thermal vibrations of cantilevers. As the size of the cantilevers is reduced to nanometer scale, the energy of random thermal excitations becomes comparable with the energy of the individual vibration modes. This effect leads to a thermal noise in nanocantilevers. Using the equipartition theorem [Butt et al. 1995] showed that the root mean square of the amplitude of the tip of such cantilever is
zˆ = 2
0.64 Å kT ------ = --------------- , K K
3
Ewh K = -----------2 4L
(8.38)
Similar analysis can be performed on vibrations of thin plates such as micromirrors. The free lateral vibrations of such a plate are described by
∂ w ( x, y, t ) ∂ w ( x, y, t ) ∂ w ( x, y, t ) rh ∂ w ( x, y, t ) ---------------------------- + 2 ---------------------------- + ---------------------------- = – ------ ---------------------------4 2 2 4 2 D ∂x ∂x ∂y ∂y ∂t 4
4
4
2
(8.39)
The interested reader is referred to [Timoshenko 1959] for further details on vibrations of plates.
8.4 Buckling Analysis Structural instability can occur due to material failure, e.g., plastic flow or fracture, or it can also occur due to large changes in the geometry of the structure (e.g., buckling, wrinkling, or collapse). The latter is the scope of this section. When short columns are subjected to a compressive load, the stress in the cross section is considered uniform. Thus for short columns, failure will occur when the plastic yield stress of the material is reached. In the case of long and slender beams under compression, due to manufacturing imperfections, the applied load or the column will have some eccentricity. As a result the force will develop a bending moment proportional to the eccentricity, resulting in additional lateral deflection. While for small loads the lateral displacement will reach equilibrium, above certain critical ©2002 CRC Press LLC
0066_Frame_C08 Page 11 Wednesday, January 9, 2002 3:48 PM
TABLE 8.3
Critical Load Coefficients End Conditions
K coefficient
one end built-in, other free 1/4
both ends built-in 4
pin-joints at both ends 1
load, the beam will be unable to withstand the bending moment and will collapse. Consider the beam in Fig. 8.5, subjected to load F with eccentricity e, resulting in lateral displacement of the tip δ. According to the beam bending equation 2
∂ w EI ---------2 = M = F ( d + e + w ) ∂x
(8.40)
where the boundary conditions are w(0) = 0, ∂ w/∂ x |x=0 = 0. The corresponding solution is
w = ( e + d ) [ 1 – cos ( IE/Fx ) ]
(8.41)
From w(L) = δ one has δ = e(1/coskL − 1), where k = IE/F . This solution looses stability when δ grows out of bound, i.e., when coskL = 0, or kL = (2n + 1)π /2. From this condition the smallest critical load is
F
cr
= p IE/4L 2
2
(8.42)
The above analysis and Eq. (8.42) were developed by Euler. Similar conditions can be derived for other types of beam supports. A general formula for the critical load can be written as
F
cr
= Kp IE/L 2
2
(8.43)
where several values of the coefficient K are given in Table 8.3.
8.5 Transducers Transducers are devices capable of converting one type of energy into another. If the output energy is mechanical work the transducer is called an actuator. The rest of the transducers are called sensors, although in most cases, a mechanical transducer can also be a sensor and vice versa. For example the capacitive transducer can be used as an actuator or position sensor. In this section the most common actuators used in micromechatronics are reviewed.
Electrostatic Transducers The electrostatic transducers fall into two main categories—parallel plate electrodes and interdigitated comb electrodes. In applications where relatively large capacitance change or force is required, the parallel plate configuration is preferred. Conversely, larger displacements with linear force/displacement characteristics can be achieved with comb drives at the expense of reduced force. Parallel plate actuators are used in electrostatic micro-switches as illustrated in Fig. 8.1. In this case the electrodes form a parallel plate capacitor and the force is described by 2
2
Ae 0 e r V -2 F elec = -----------------------------------------2 [ t2 + er ( d0 – d ) ]
(8.44)
where A is the area of overlap between the two electrodes; t2 is the thickness of insulating layer (silicon dioxide, silicon nitride); le is the length of fixed electrode; εr is the relative permittivity of insulating layer; V is the applied voltage; d0 is the initial separation between the capacitor plates; and d is downward ©2002 CRC Press LLC
0066_Frame_C08 Page 12 Wednesday, January 9, 2002 3:48 PM
Deflection 2 g 2g 2c 2c
2c
V
V
x A
A
x > 0 Engaged x < 0 Seperated
2d
kV
(a)
FIGURE 8.6
(b)
Lateral comb transducers: (a) Dimensions; (b) two orthogonal Si combs.
deflection of the beam. The minimum voltage required to close the gap of a cantilever actuator is known as the threshold voltage [Petersen 1978], and can be approximated as
18 ( IE ) eff d 0 th V ≈ -------------------------4 5e 0 L w 3
(8.45)
where (IE)eff is given by (8.24). Comb drives also fall in two categories: symmetric and asymmetric. Symmetric comb drive is shown in Fig. 8.6(a). In this configuration the gaps between the individual fingers are equal. Figure 8.6(b) shows a pair of asymmetric comb capacitors, used in the force sensor shown in Fig. 8.2 [Enikov 2000a]. In any case, the force generated between the fingers is equal to the derivative of the total electrostatic energy with respect to the displacement
F
el
n ∂C 2 = --- ------- V 2 ∂x
(8.46)
where n is the number of fingers. Several authors have given approximate expressions for (8.46). One of the most accurate calculations of the force between the pair of fingers shown in Fig. 8.6(a) is given by [Johnson et al. 1995] using Schwartz transforms
F
el
2 2 1+c/g e0 V c pd c + g --------- – 1 1 + 2g ---ln + ------ – ---------- , + 1 p g c g x = e0 V 2 2 ( c + g ) – ----------- ------------------- , p x
x > ∆ + ( engaged ) (8.47) x < – ∆ − ( separated )
In the transition region x ∈[−∆−; ∆ +], ∆ +,− ≈ 2g, the force can be approximated with a tangential line between the two branches described by (8.47).
Electromagnetic Transducers Electromagnetic force has also been used extensively. It can be generated via planar coil as illustrated in Fig. 8.7. The cantilever and often the coils are made of soft ferromagnetic material. Using an equivalent magnetic circuit model, the magnetic force acting on the top cantilever can be estimated as
2n I ( 2A 2 + A 1 ) F mag = --------------------------------------------2 m 0 A 1 A 2 ( 2R 1 + R 2 ) 2 2
©2002 CRC Press LLC
(8.48)
0066_Frame_C08 Page 13 Wednesday, January 9, 2002 3:48 PM
d A2
FIGURE 8.7
Electromagnetic actuation.
FIGURE 8.8
Lateral thermal actuator.
A1
nI
where
h1 d R 1 = ----------- + -----------------, m0 A1 m0 mr A1
h1 h2 d R 2 = ----------- + ----------------+ ----------------m0 A2 m0 mr A2 m0 mr Ab
(8.49)
are the reluctances; h1 and h2 are the flux-path lengths inside the top and bottom permalloy layers.
Thermal Actuators Thermal actuators have been investigated for positioning of micromirrors [Liew et al. 2000], and microswitch actuation [Wood et al. 1998]. This actuator consists of two arms with different cross sections (see Fig. 8.8). When current is passed through the two arms, the higher current density occurs in the smaller cross-section beam and thus generates more heat per unit volume. The displacement is a result of the temperature differential induced in the two arms. For the actuator shown in Fig. 8.8, an approximate model for the deflection of the tip δ can be developed using the theory of thermal bimorphs [Faupel 1981]
3l ( T a ( T ) – T a ( T ) ) d ≈ ----------------------------------------------------------------------------4 ( wh + wf ) 2
hot
hot
cold
cold
(8.50)
where T and T are the average temperatures of the hot and cold arms and α(T ) is the temperature dependent thermal expansion coefficient. A more detailed analysis including the temperature distribution in the arms can be found in [Huang et al. 1999]. hot
cold
Electroactive Polymer Actuators Electroactive polymer-metal composites (EAPs) are promising multi-functional materials with extremely reach physics. Recent interest towards these materials is driven by their unique ability to undergo large deformations under very low driving voltages as well as their low mass and high fracture toughness. For comparison, Table 8.4 lists several characteristic properties of EAPs and other piezoelectric ceramics. EAPs are being tested for use in flapping-wing micro-air-vehicles (MAVs) [Rohani 1999], underwater swimming robots [Laurent 2001], and biomedical applications [Oguro 2000]. An EAP actuator consists ©2002 CRC Press LLC
0066_Frame_C08 Page 14 Wednesday, January 9, 2002 3:48 PM
TABLE 8.4
Comparative Properties of EAPs, Shape Memory Alloy, and Piezoceramic Actuators
Characteristic Property
EAP
Shape Memory Alloy
Piezoelectric Ceramics
Achievable strain Young’s modulus (GPa) Tensile strength (MPa) Response time 3 Mass density (g/cm ) Actuation voltage
more than 10% 0.114 (wet) 34 (wet) msec–min 2.0 1–10 V
up to 8% 75 850 sec–min 6.5 N/A
up to 0.3% 89 76 µsec–sec 7.5 50–1000 V
FIGURE 8.9
FIGURE 8.10
Polymer metal composite actuator.
Two-step Pt plating process.
of an ion-exchange membrane covered with a conductive layer as illustrated in Fig. 8.9(a). Upon application of a potential difference at points A and B the composite bends towards the anodic side as shown in Fig. 8.9(b). Among the numerous ion-exchange polymers, perfluorinated sulfonic acid (Nafion Du Pont, USA ) and perfluorinated carboxylic acid (Flemion, Asahi, Japan) are the most commonly used in actuator applications. The chemical formula of a unit chain of Nafion is
[ ( CF 2 –CF 2 ) n –CF–CF 2 – ] m −
O–CF–CF 2 –O–CF 2 –SO 3 M +
+
+
+
+
(8.51)
where M is the counterion (H , Na , Li , …). The ionic clusters are attached to side chains, which according to transmission electron microscopy (TEM) studies, segregate in hydrophilic nano-clusters with diameters ranging from 10 to 50 Å [Xue 1989]. In 1982, Gierke proposed a structural model [Gireke 1982] according to which, the clusters are interconnected via narrow channels. The size and distribution of these channels determine the transport properties of the membrane and thus the mechanical response. Metal-polymer composites can be produced by vapor or electrochemical deposition of metal over the surface of the membrane. The electrochemical platinization method [Fedkiw 1992], used by the author, is based on the ion-exchange properties of the Nafion. The method consists of two steps: step one—ion + 2+ 2+ exchange of the protons H with metal cations (e.g., Pt ); step two—chemical reduction of the Pt ions in the membrane to metallic Pt using NaBH4 solution. These steps are outlined in Fig. 8.10 and an SEM microphotograph of the resulting composite is shown in Fig. 8.11. The electrode surfaces are approximately 0.8 µm thick Pt deposits. Repeating the above steps several times results in dendritic growth of the electrodes into the polymer matrix [Oguro 1999] and has been shown to improve the actuation efficiency. ©2002 CRC Press LLC
0066_Frame_C08 Page 15 Wednesday, January 9, 2002 3:48 PM
Nafion membrane with Pt electrode.
H+
H2O D'Arcy Flow (osmotic pressure gradient)
Cathode
Anode
FIGURE 8.12
+
Li+
Electroosmotic Drag
− Li + OH → LiOH
e− Surface Electric Current (electrons)
6H2O(liq.) → 4H3O+ + 4e− + O2(gas)
H2O+
4H3O+ + 4e− → 4H2O(liq.) + 2H2(gas)
_
+
e− Surface Electric Current (electrons)
FIGURE 8.11
Ion transort in nafion.
The deformation of the polymer-metal composite can be attributed to several phenomena, the dominant one being differential swelling of the membrane due to internal osmotic pressure gradients [Eikerling 1998]. A schematic representation of the ionic processes taking place inside the polymer is shown in Fig. 8.12. Under the application of external electric field a flux of cations and hydroxonium ions is generated towards the cathode. At the cathode the ions pick up an electron and produce hydrogen and free water molecules. On the anodic side, the water molecules dissociate producing oxygen and hydroxonium ions. This redistribution of water within the membrane creates local expansion/contraction of the polymer matrix. Mathematically, the deformation can be described by introducing an additional strain (eigen strain) term in the expression of the total strain. Thus the total strain has two additive parts: elastic deformation of the polymer network due to external forces (mechanical, electrical) and chemical strain proportional to the compositional variables
e ij = e ij + r 0 elast
V
s
s
©2002 CRC Press LLC
s
-(c ∑ -------3M
s
– c 0 )d ij s
(8.52)
0066_Frame_C08 Page 16 Wednesday, January 9, 2002 3:48 PM
s
s
s
where c are the mass fractions, V are the partial molar volumes, M are the molar masses, and the index 0 refers to the initial value of a variable. Complete mathematical description of the polymer actuator requires the solution of mass transport (diffusion) equation, momentum balance, and Poisson equation for potential distribution, the discussion of which is beyond the scope of this book. An interesting consequence of the addition of the chemical strain in (8.46) is the explicit appearance of the pressure term in the electrochemical potential driving the diffusion. The total mass diffusion flux will have a component proportional to the negative gradient of the pressure, which for the case of water, will result in a relaxation phenomena observed experimentally. The total flux of component s is then given by s
s
s rc W s os s s - ∇ ( m ( T ) + pV + RT ln ( fc ) + z Φ ) J = – ------------s M s
s
(8.53) s
where W is the mobility of component s, z is the valence of component s, p is the pressure, f is the activity coefficient, and Φ is the electric potential. We have omitted the cross-coupling terms that would appear in a fully coupled Onsager-type formulation. Interested readers are referred to [Enikov 2000b] and the references therein for further details.
8.6 Future Trends The future MEMS are likely to be more heterogeneous in terms of materials and structures. Bio-MEMS for example, require use of nontoxic, noncorrosive materials, which is not a severe concern in standard IC components. Already departure from the traditional Si-based MEMS can be seen in the areas of optical MEMS using wide band-gap materials, nonlinear electro-optical polymers, and ceramics. As pointed earlier, the submicron size of the cantilever-based sensors brings the thermal noise issues in mechanical structures. Further reduction in size will require molecular statistic description of the interaction forces. For example, carbon nanotubes placed on highly oriented pyrolytic graphite (HOPG) experience increased adhesion force when aligned with the underlying graphite lattice [Falvo et al. 2000]. The future mechatronic systems are likely to become an interface between the macro and nano domains.
References Butt, H., Jaschke, M., “Calculation of thermal noise in atomic force microscopy,” Nanotechnology, 6, pp. 1–7, 1995. Eikerling, M., Kharkats, Y.I., Kornyshev, A.A., Volfkovich, Y.M., “Phenomenological theory of electroosmotic effect and water management in polymer proton-conducting membranes,” Journal of the Electrochemical Society, 145(8), pp. 2684–2698, 1998. Evans, T.H., Journal of Applied Mechanics, 6, p. A-7, 1939. Enikov, E.T., Nelson, B., “Three dimensional microfabrication for multi-degree of freedom capacitive force sensor using fiber chip coupling,” J. Micromech. Microeng., 10, pp. 492–497, 2000. Enikov, E.T., Nelson, B.J., “Electrotransport and deformation model of ion exhcange membrane based actuators,” in Smart Structures and Materials 2000, Newport Beach, CA, SPIE vol. 3987, March, 2000. Falvo, M.R., Steele, J., Taylor, R.M., Superfine, R., “Gearlike rolling motion mediated by commensurate contact: carbon nanotubes on HOPG,” Physical Review B, 62(6), pp. 665–667, 2000. Faupel, J.H., Fisher, F.E., Engineering Design: A Synthesis of Stress Analysis and Materials Engineering, 2nd Ed., Wiley & Sons, New York, 1981. Liu, R., Her, W.H., Fedkiw, P.S., “In situ electrode formation on a nafion membrane by chemical platinization,” Journal of the Electrochemical Society, 139(1), pp. 15–23, 1990. Gierke, T.D., Hsu, W.S., “The cluster-network model of ion clusturing in perfluorosulfonated membranes,” in Perfluorinated Ionomer Membranes, A. Eisenberg and H.L. Yeager, Eds., vol. 180, American Chemical Society, 1982. ©2002 CRC Press LLC
0066_Frame_C08 Page 17 Wednesday, January 9, 2002 3:48 PM
Johnson et al., “Electrophysics of micromechanical comb actuators,” Journal of Microelectromechanical Systems, 4(1), pp. 49–59, 1995. Hopkins, Design Analysis of Shafts and Beams, 2nd Ed., Malabar, FL: RE Kreiger, 1987. Huang, Q.A., Lee, N.K.S., “Analysis and design of polysilcon thermal flexture actuator,” Journal of Micromechanics and Microengineering, 9, pp. 64–70, 1999. Kittel, Ch., Introduction to Solid State Physics, John Wiley & Sons, Inc., New York, 1996. Laurent, G., Piat, E., “High efficiency swimming microrobot using ionic polymer metal composite actuators,” to appear in 2001. Liew, L. et al., “Modeling of thermal actuator in a bulk micromachined CMOS micromirror,” Microelectronics Journal, 31(9–10), pp. 791–790, 2000. Maugin, G., Continuum Mechanics of Electromagnetic Solids, Elsevier, Amsterdam, The Netherlands, 1988. Mendelson, Plasticity: Theory and Application, Macmillan, New York, 1968. Nye, J.F., Physical Properties of Crystals, Oxford University Press, London, 1960. Onishi, K., Sewa, Sh., Asaka, K., Fujiwara, N., Oguro, K., “Bending response of polymer electrolyte actuator,” in Smart Structures and Materials 2000, Newport Beach, CA, SPIE vol. 3987, March, 2000. Peterson, “Dynamic micromechanics on silicon: techniques and devices,” IEEE, 1978. Rohani, M.R., Hicks, G.R., “Multidisciplinary design and prototype of a micro air vehicle,” Journal of Aircraft, 36(1), p. 237, 1999. Timoshenko, S., Woinowsky-Krieger, S., Theory of Plates and Shells, McGraw-Hill, New York, 1959. Wood, R. et al., “MEMS microrelays,” Mechatronics, 8, pp. 535–547, 1998. Xue, T., Trent, Y.S., Osseo-Asare, K., “Characterization of nafion membranes by transmision electron microscopy,” Journal of Membrane Science, 45, p. 261, 1989. Zgonik et al., ‘‘Dielectric, elastic, piezoelectric, electro-optic and elasto-optic tensors of BaTiO3 crystals,” Physical Review B, 50(9), p. 5841, 1994.
©2002 CRC Press LLC
9 Modeling of Mechanical Systems for Mechatronics Applications 9.1 9.2
Introduction Mechanical System Modeling in Mechatronic Systems Physical Variables and Power Bonds • Interconnection of Components • Causality
9.3
Descriptions of Basic Mechanical Model Components Defining Mechanical Input and Output Model Elements • Dissipative Effects in Mechanical Systems • Potential Energy Storage Elements • Kinetic Energy Storage • Coupling Mechanisms • Impedance Relationships
9.4
Physical Laws for Model Formulation. Kinematic and Dynamic Laws • Identifying and Representing Motion in a Bond Graph • Assigning and Using Causality • Developing a Mathematical Model • Note on Some Difficulties in Deriving Equations
9.5
Energy Methods for Mechanical System Model Formulation Multiport Models • Restrictions on Constitutive Relations • Deriving Constitutive Relations • Checking the Constitutive Relations
9.6
Rigid Body Multidimensional Dynamics Kinematics of a Rigid Body • Dynamic Properties of a Rigid Body • Rigid Body Dynamics
9.7
Raul G. Longoria The University of Texas at Austin
Lagrange’s Equations Classical Approach • Dealing with Nonconservative Effects • Extensions for Nonholonomic Systems • Mechanical Subsystem Models Using Lagrange Methods • Methodology for Building Subsystem Model
9.1 Introduction Mechatronics applications are distinguished by controlled motion of mechanical systems coupled to actuators and sensors. Modeling plays a role in understanding how the properties and performance of mechanical components and systems affect the overall mechatronic system design. This chapter reviews methods for modeling systems of interconnected mechanical components, initially restricting the
©2002 CRC Press LLC
application to basic translational and rotational elements, which characterize a wide class of mechatronic applications. The underlying basis of mechanical motion (kinematics) is presumed known and not reviewed here, with more discussion and emphasis placed on a system dynamics perspective. More advanced applications requiring two- or three-dimensional motion is presented in section 9.6. Mechanical systems can be conceptualized as rigid and/or elastic bodies that may move relative to one another, depending on how they are interconnected by components such as joints, dampers, and other passive devices. This chapter focuses on those systems that can be represented using lumped-parameter descriptions, wherein bodies are treated as rigid and no dependence on spatial extent need be considered in the elastic effects. The modeling of mechanical systems in general has reached a fairly high level of maturity, being based on classical methods rooted in the Newtonian laws of motion. One benefits from the extensive and overwhelming knowledge base developed to deal with problems ranging from basic mass-spring systems to complex multibody systems. While the underlying physics are well understood, there exist many different means and ways to arrive at an end result. This can be especially true when the need arises to model a multibody system, which requires a considerable investment in methods for formulating and solving equations of motion. Those applications are not within the scope of this chapter, and the immediate focus is on modeling basic and moderately complex systems that may be of primary interest to a mechatronic system designer/analyst.
9.2 Mechanical System Modeling in Mechatronic Systems Initial steps in modeling any physical system include defining a system boundary, and identifying how basic components can be partitioned and then put back together. In mechanical systems, these analyses can often be facilitated by identifying points in a system that have a distinct velocity. For purposes of analysis, active forces and moments are “applied” at these points, which could represent energetic interactions at a system boundary. These forces and moments are typically applied by actuators but might represent other loads applied by the environment. A mechanical component modeled as a point mass or rigid body is readily identified by its velocity, and depending on the number of bodies and complexity of motion there is a need to introduce a coordinate system to formally describe the kinematics (e.g., see [12] or [15]). Through a kinematic analysis, additional (relative) velocities can be identified that indicate the connection with and motion of additional mechanical components such as springs, dampers, and/or actuators. The interconnection of mechanical components can generally have a dependence on geometry. Indeed, it is dependence of mechanical systems on geometry that complicates analysis in many cases and requires special consideration, especially when handling complex systems. A preliminary description of a mechanical system should also account for any constraints on the motional states, which may be functions of time or of the states themselves. The dynamics of mechanical systems depends, in many practical cases, on the effect of constraints. Quantifying and accounting for constraints is of paramount importance, especially in multibody dynamics, and there are different schools of thought on how to develop models. Ultimately, the decision on a particular approach depends on the application needs as well as on personal preference. It turns out that a fairly large class of systems can be understood and modeled by first understanding basic one-dimensional translation and fixed-axis rotation. These systems can be modeled using methods consistent with those used to study other systems, such as those of an electric or hydraulic type. Furthermore, building interconnected mechatronic system models is facilitated, and it is usually easier for a system analyst to conceptualize and analyze these models. In summary, once an understanding of (a) the system components and their interconnections (including dependence on geometry), (b) applied forces/torques, and (c) the role of constraints, is developed, dynamic equations fundamentally due to Newton can be formulated. The rest of this section introduces the selection of physical variables consistent with a power flow and energy-based approach to modeling basic mechanical translational and rotational systems. In doing so, a bond graph approach [28,3,17] is introduced for developing models of mechanical systems. This provides a basis for introducing the ©2002 CRC Press LLC
concept of causality, which captures the input–output relationship between power-conveying variables in a system. The bond graph approach provides a way to understand and mathematically model basic as well as complex mechanical systems that is consistent with other energetic domains (electric, electromechanical, thermal, fluid, chemical, etc.).
Physical Variables and Power Bonds Power and Energy Basis One way to consistently partition and connect subsystem models is by using power and energy variables to quantify the system interaction, as illustrated for a mechanical system in Fig. 9.1(a). In this figure, one port is shown at which power flow is given by the product of force and velocity, F · V, and another for which power is the product of torque and angular velocity, T · ω . These power-conjugate variables (i.e., those whose product yields power) along with those that would be used for electrical and hydraulic energy domains are summarized in Table 9.1. Similar effort (e) and flow ( f ) variables can be identified for other energy domains of interest (e.g., thermal, magnetic, chemical). This basis assures energetically correct models, and provides a consistent way to connect system elements together. In modeling energetic systems, energy continuity serves as a basis to classify and to quantify systems. Paynter [28] shows how the energy continuity equation, together with a carefully defined port concept, provides a basis for a generalized modeling framework that eventually leads to a bond graph approach. Paynter’s reticulated equation of energy continuity, l
– ∑P
m
i
=
n
∑-----dt + ∑( P ) dE j
(9.1)
d k
j =1
i =1
k =1
concisely identifies the l distinct flows of power, Pi, m distinct stores of energy, Ej, and the n distinct dissipators of energy, Pd . Modeling seeks to refine the descriptions from this point. For example, in a simple mass–spring–damper system, the mass and spring store energy, a damper dissipates energy, and TABLE 9.1
Power and Energy Variables for Mechanical Systems
Energy Domain General Translational Rotational Electrical Hydraulic
Effort, e
Flow, f
Power, P
e Force, F [N] Torque, T or τ [N m] Voltage, v [V] Pressure, P [Pa]
f Velocity, V [m/sec] Angular velocity, ω [rad/sec] Current, i [A] Volumetric flowrate, 3 Q [m /sec]
e · f [W] F · V [N m/sec, W] T · ω [N m/sec, W]
iin
Rm
v · i [W] P · Q [W]
Lm
Bm Tm
F
vm
vin
wm
T
V
w
Electrical
(a)
FIGURE 9.1
Basic interconnection of systems using power variables.
©2002 CRC Press LLC
EM
(b)
Jm Mechanical
the interconnection of these elements would describe how power flows between them. Some of the details for accomplishing these modeling steps are presented in later sections. One way to proceed is to define and categorize types of system elements based on the reticulated energy continuity Eq. (9.1). For example, consider a system made up only of rigid bodies as energy stores (in particular of kinetic energy) for which Pd = 0 (we can add these later), and in general there can be l ports that could bring energy into this purely (kinetic)energy-storing system which has m distinct ways to put energy into the rigid bodies. This is a very general concept, consistent with many other ways to model physical systems. Howevever, it is this foundation that provides for a generalized way to model and integrate different types of energetic systems. The schematic of a permanent-magnet dc (PMDC) motor shown in Fig. 9.1(b) illustrates how power variables would be used to identify inteconnection points. This example also serves to identify the need for modeling mechanisms, such as the electromechanical (EM) interaction, that can represent the exchange of energy between two parts of a system. This model represents a simplified relationship between electrical power flow, v · i, and mechanical power flow, T · ω , which forms the basis for a motor model. Further, this is an ideal power-conserving relationship that would only contain the power flows in the energy continuity equation; there are no stores or dissipators. Additional physical effects would be included later. Power and Signal Flow In a bond graph formulation of the PMDC motor, a power bond is used to identify flow of power. Power bonds quantify power flow via an effort-flow pair, which can label the bonds as shown in Fig. 9.2(a) (convention calls for the effort to take the position above for any orientation of bond). This is a word bond graph model, a form used to identify the essential components in a complex system model. At this stage in a model, only the interactions of multiport systems are captured in a general fashion. Adding half-arrows on power bonds defines a power flow direction between two systems (positive in the direction of the arrow). Signal bonds, used in control system diagrams, have full-arrows and can be used in bond graph models to indicate interactions that convey only information (or negligible power) between multiports. For example, the word bond graph in Fig. 9.2(b) shows a signal from the mechanical block to indicate an ideal measurement transferred to a controller as a pure signal. The controller has both signal and power flow signals, closing the loop with the electrical side of the model. These conceptual diagrams are useful for understanding and communicating the system interconnections but are not complete or adequate for quantifying system performance.
Controlled Electrical Power
v i
Electrical (Armature) Circuit
v i
T
EM Coupling
w
(a)
Controller
Controlled Electrical Power
Mechanical Rotational Dynamics
T
w
Mechanical Rotational Load
POWER bonds v i
PMDC Model
T
w
Mechanical Rotational Load
SIGNAL bond
(b) FIGURE 9.2 Power-based bond graph models: (a) PMDC motor word bond graph, (b) PMDC motor word bond graph with controller.
©2002 CRC Press LLC
While it is convenient to use power and energy in formulating system models for mechanical systems, a motional basis is critical for identifying interconnections and when formulating quantifiable mathematical models. For many mechanical, translational, and rotational systems, it is sufficient to rely on basic one-dimensional motion and relative motion concepts to identify the interrelation between many types of practical components. Identifying network-like structure in these systems has been the basis for building electrical analogies for some time. These methods, as well as signal-flow analysis techniques, are not presented here but are the method of choice in some approaches to system dynamics [33]. Bond graph models are presented, and it will be shown in later sections how these are consistent even with more complex mechanical system formulations of three-dimensional dynamics as well as with the use of Lagrangian models. Need for Motional Basis In modeling mechanical translational or rotational systems, it is important to identify how the configuration changes, and a coordinate system should be defined and the effect of geometric changes identified. It is assumed that the reader is familiar with these basic concepts [12]. Usually a reference configuration is defined from which coordinates can be based. This is essential even for simple one-dimensional translation or fixed-axis rotation. The minumum number of geometrically independent coordinates required to describe the configuration of a system is traditionally defined as the degrees of freedom. Constraints should be identified and can be used to choose the most convenient set of coordinates for description of the system. We distinguish between degrees of freedom and the minimum number of dynamic state variables that might be required to describe a system. These may be related, but they are not necessarily the same variables or the same in number (e.g., a second-order system has two states but is also referred to as a single degree of freedom system). An excellent illustration of the relevance of degrees of freedom, constraints, and the role these concepts play in modeling and realizing a practical system is shown in Fig. 9.3. This illustration (adapted from Matschinsky [22]) shows four different ways to configure a wheel suspension. Case (a), which also forms the basis for a 1/4-car model clearly has only one degree of freedom. The same is true for cases (b) and (c), although there are constraints that reduce the number of coordinates to just one in each of these designs. Finally, the rigid beam axle shows how this must have two degrees of freedom in vertical and rotational motion of the beam to achieve at least one degree of freedom at each wheel.
(a)
(b)
(c)
(d)
FIGURE 9.3 Wheel suspensions: (a) vertical travel only, 1 DOF; (b) swing-axle with vertical and lateral travel, 1 DOF; (c) four-bar linkage design, constrained motion, 1 DOF; (d) rigid beam axle, two wheels, vertical, and rotation travel, 2 DOF.
©2002 CRC Press LLC
Interconnection of Components In this chapter, we will use bond graphs to model mechanical systems. Like other graph representations used in system dynamics [33] and multibody system analysis [30,39], bond graphs require an understanding of basic model elements used to represent a system. However, once understood, graph methods provide a systematic method for representing the interconnection of multi-energetic system elements. In addition, bond graphs are unique in that they are not linear graph formulations: power bonds replace branches, multiports replace nodes [28]. In addition, they include a systematic approach for computational causality. Recall that a single line represents power flow, and a half-arrow is used to designate positive power flow direction. Nodes in a linear graph represent across variables (e.g., velocity, voltage, flowrate); however, the multiport in a bond graph represents a system element that has a physical function defined by an energetic basis. System model elements that represent masses, springs, and other components are discussed in the next section. Two model elements that play a crucial role in describing how model elements are interconnected are the 1-junction and 0-junction. These are ideal (power-conserving) multiport elements that can represent specific physical relations in a system that are useful in interconnecting other model elements. A point in a mechanical system that has a distinct velocity is represented by a 1-junction. When one or more model elements (e.g., a mass) have the same velocity as a given 1-junction, this is indicated by connecting them to the 1-junction with a power bond. Because the 1-junction is constrained to conserve power, it can be shown that efforts (forces, torques) on all the connected bonds must sum to zero; i.e., Â ei = 0. This is illustrated in Fig. 9.4(a). The 1-junction enforces kinematic compatibility and introduces a way to graphically express force summation! The example in Fig. 9.4(b) shows three systems (the blocks labeled 1, 2, and 3) connected to a point of common velocity. In the bond graph, the three systems would be connected by a 1-junction. Note that sign convention is incorporated into the sense of the power arrow. For the purpose of analogy with electrical systems, the 1-junction can be thought of as a series electrical connection. In this way, elements connected to the 1-junction all have the same current (a flow variable) and the effort summation implied in the 1-junction conveys the Kirchhoff voltage law. In mechanical systems, 1-junctions may represent points in a system that represent the velocity of a mass, and the effort summation is a statement of Newton’s law (in D’Alembert form), Â F - p˙ = 0. Figure 9.4 illustrates how components with common velocity are interconnected. Many physical components may be interconnected by virtue of a common effort (i.e., force or torque) or 0-junction. For example, two springs connected serially deflect and their ends have distinct rates of compression/ extension; however, they have the same force across their ends (ideal, massless springs). System components that have this type of relationship are graphically represented using a 0-junction. The basic 0-junction definition is shown in Fig. 9.5(a). Zero junctions are especially helpful in mechanical system modeling because they can also be used to model the connection of components having relative motion. For example, the device in Fig. 9.5(b), like a spring, has ends that move relative to one another, but the force e1
f1 e2 f2 e3
1
en fn
1 2
F1
V 3
F3
F2
V1 = V2 = V3 = V
f3
F1 + F2 − F3= 0
f1 = f2 = f3 =(etc.)= fn e1 + e2 + e3+ (etc.)+ en= 0 (a) FIGURE 9.4
F1 V1
1
F3 V3
F2 V2 (b)
Mechanical 1-junction: (a) basic definition, (b) example use at a massless junction.
©2002 CRC Press LLC
F1
e1
f1
F2 device
V1
e2 f2 e3
0
V2
en F1=F2= F3
fn 1
f3
F1 V1
0 F3 V3
f1 + f2 + f3 +(etc.)+ fn= 0 spring
e1 = e2 = e3= (etc.)= en
Vspring
1 V1 − V2 = V3
1 Same velocity
(a) FIGURE 9.5
F2 V2
(b)
Mechanical 0-junction: (a) basic definition, (b) example use at a massless junction.
Effort into S 2
S1
e f
(a)
S2
Flow into S 2
S1
e f
(b)
S2
S1
S2
S3
1
0
S4
(c)
FIGURE 9.6 (a) Specifying effort from S1 into S2. (b) Specifying flow from S1 into S2. (c) A contrived example showing the constraint on causality assignment imposed by the physical definitions of 0- and 1-junctions.
on each end is the same (note this assumes there is negligible mass). The definition of the 0-junction implies that all the bonds have different velocities, so a flow difference can be formed to construct a relative velocity, V3. All the bonds have the same force, however, and this force would be applied at the 1-junctions that identify the three distinct velocities in this example. A spring, for example, would be connected on a bond connected to the V3 junction, as shown in Fig. 9.5(b), and Vspring = V3. The 1- and 0-junction elements graphically represent algebraic structure in a model, with distinct physical attributes from compatibility of kinematics (1-junction) and force or torque (0-junction). The graph should reflect what can be understood about the interconnection of physical devices with a bond graph. There is an advantage in forming a bond graph, since causality can then be used to form mathematical models. See the text by Karnopp, Margolis, and Rosenberg [17] for examples. There is a relation to through and across variables, which are used in linear graph methods [33].
Causality Bond graph modeling was conceived with a consistent and algorithmic methodology for assignment of causality (see Paynter [28], p. 126). In the context of bond graph modeling, causality refers to the input– output relationship between variables on a power bond, and it depends on the systems connected to each end of a bond. Paynter identified the need for this concept having been extensively involved in analog computing, where solutions rely on well-defined relationships between signals. For example, if system S1 in Fig. 9.6(a) is a known source of effort, then when connected to a system S2, it must specify effort into S2, and S2 in turn must return the flow variable, f, on the bond that connects the two systems. In a bond graph, this causal relationship is indicated by a vertical stroke drawn on the bond, as shown in Fig. 9.6(a). The vertical stroke at one end of a bond indicates that effort is specified into the multiport element connected at that end. In Fig. 9.6(b), the causality is reversed from that shown in (a). ©2002 CRC Press LLC
The example in Fig. 9.6(c) illustrates how causality “propagates” through a bond graph of interconnected bonds and systems. Note that a 1-junction with multiple ports can only have one bond specifying flow at that junction, so the other bonds specify effort into the 1-junction. A 0-junction requires one bond to specify effort, while all others specify flow. Also note that a direction for positive power flow has not been assigned on these bonds. This is intentional to emphasize the fact that power sense and causality assignment on a bond are independent of each other. Causality assignment in system models will be applied in examples that follow. An extensive discussion of the successive cauality assignment procedure (sometimes referred to as SCAP) can be found in Rosenberg and Karnopp [32] or Karnopp, Margolis, and Rosenberg [17]. By using the defined bond graph elements, causality assignment is made systematically. The procedure has been programmed into several commercially available software packages that use bond graphs as formal descriptions of physical system models. Because it reveals the input–output relationship of variables on all the bonds in a system model, causality can infer computational solvability of a bond graph model. The results are used to indicate the number of dynamic states required in a system, and the causal graph is helpful in actually deriving the mathematical model. Even if equations are not to be derived, causality can be used to derive physical insight into how a system works.
9.3 Descriptions of Basic Mechanical Model Components Mechanical components in mechatronic systems make their presence known through motional response and by force and torque (or moment) reactions notably on support structures, actuators, and sensors. Understanding and predicting these response attributes, which arise due to combinations of frictional, elastic, and inertial effects, can be gained by identifying their inherent dissipative and energy storing nature. This emphasis on dissipation and energy storage leads to a systematic definition of constitutive relations for basic mechanical system modeling elements. These model elements form the basis for building complex nonlinear system models and for defining impedance relations useful in transfer function formulation. In the following, it is assumed that the system components can be well represented by lumped-parameter formulations. It is presumed that a modeling decision is made so that dissipative and energy storing (kinetic and potential) elements can be identified to faithfully represent a system of interest. The reticulation is an essential part of the modeling process, but sometimes the definition and interconnection of the elements is not easy or intuitive. This section first reviews mechanical system input and output model elements, and then reviews passive dissipative elements and energy-storing elements. The section also discusses coupling elements used for modeling gears, levers, and other types of power-transforming elements. The chapter concludes by introducing impedance relationships for all of these elements.
Defining Mechanical Input and Output Model Elements In dynamic system modeling, initial focus requires defining a system boundary, a concept borrowed from basic thermodynamics. In isolating mechanical systems, a system boundary identifies ports through which power and signal can pass. Each port is described either by a force–velocity or torque–angular velocity power conjugate pair. It is helpful, when focusing on the mechanical system modeling, to make a judgement on the causality at each port. For example, if a motor is to be attached to one port, it may be possible to define torque as the input variable and angular velocity as the output (back to the motor). It is important to identify that these are model assumptions. We define specific elements as sources of effort or flow that can be attached at the boundary of a system of interest. These inputs might be known and or idealized, or they could simply be “placeholders” where we will later attach a model for an actuator or sensor. In this case, the causality specified at the port is fixed so that the (internal) system model will not change. If the causality changes, it will be necessary to reformulate a new model. In bond graph terminology, the term effort source is used to define an element that specifies an effort, such as this force or torque. The symbol Se or E can be used to represent the effort source on a bond graph. ©2002 CRC Press LLC
Known force applied to a system
Force, F(t)
System
Known velocity input on one side and an attachment point with zero velocity on other
V(t)
System ground
Se
F(t)
System
V(t)
Sf
System
F, force back to ground
V=0
Sf (a) FIGURE 9.7
(b)
Two cases showing effort and flow sources on word bond graphs.
e
Total power dissipated = e f = heat generated
e = Φ( f )
V1
f (a) FIGURE 9.8
F
F = F1 = F2 F2
F1
translational dashpot
V = V1 − V2
V2 V = V1
−
V2
(b)
(a) Resistive constitutive relation. (b) Example dashpot resistive model.
A flow source is an element that specifies a flow on a bond, such as a translational velocity or angular or rotational velocity. The bond graph symbol is Sf or F. Two basic examples of sources are shown in Fig. 9.7. Note that each bond has a defined effort or flow, depending on the source type. The causality on these model elements is always known, as shown. Further, each bond carries both pieces of information: (1) the effort or flow variable specified by the source, and (2) the back reaction indicated by the causality. So, for example, at the ground connection in Fig. 9.7(b), the source specifies the zero velocity constraint into the system, and the system, in turn, specifies an effort back to the ground. The symbolic representation emphasizes the causal nature of bond graph models and emphasizes which variables are available for examination. In this case, the force back into the ground might be a critical output variable.
Dissipative Effects in Mechanical Systems Mechanical systems will dissipate energy due to friction in sliding contacts, dampers (passive or active), and through interaction with different energy domains (e.g., fluid loading, eddy current damping). These irreversible effects are modeled by constitutive functions between force and velocity or torque and angular velocity. In each case, the product of the effort-flow variables represents power dissipated, Pd = e · f, and the total energy dissipated is Ed = ∫ Pd dt = ∫(e · f ) dt. This energy can be determined given knowledge of the constitutive function, e = Φ(f ), shown graphically in Fig. 9.8(a). We identify this as a basic resistive constitutive relationship that must obey the restriction imposed by the second law of thermodynamics; namely that, e · f ≥ 0. A typical mechanical dashpot that follows a resistive-type model description is summarized in Fig. 9.8(b). In a bond graph model, resistive elements are symbolized by an R element, and a generalized, multiport R-element model is shown in Fig. 9.9(a). Note that the R element is distinguished by its ability to represent entropy production in a system. On the R element, a thermal port and bond are shown, and the power direction is always positive away from the R. In thermal systems, temperature, T, is the effort variable ©2002 CRC Press LLC
e 1
2
f1 e2 f2
e1
Resistive Causality
n
en fn
R e3 f3 3
e f
R
e = ΦR( f )
R
f = ΦR(e)
T e
fs Thermal port
Conductive Causality
e f
R
-1
f
(b)
(a)
FIGURE 9.9
R f
(a) Resistive bond graph element. (b) Resistive and conductive causality. V1 F1
friction
1 V1
F1 = F3
F2 V2
F3 = F1=F2 (a)
FIGURE 9.10
F3 = Φ(V3)
0
F2 = F3
F3 V3
1 V2
R (b)
(a) Two sliding surfaces. (b) Bond graph model with causality implying velocities as known inputs.
and entropy flow rate, fs is the flow variable. To compute heat generated by the R element, compose the calculation as Q (heat in watts) = T · fs = ∑i ei · fi over the n ports. The system attached to a resistive element through a power bond will generally determine the causality on that bond, since resistive elements generally have no preferred causal form.1 Two possible cases on a given R-element port are shown in Fig. 9.9(b). A block diagram emphasizes the computational aspect of causality. For example, in a resistive case the flow (e.g., velocity) is a known input, so power dissipated 2 is Pd = e · f = Φ(f ) · f. For the linear damper, F = b · V, so Pd = F · V = bV (W). In mechanical systems, many frictional effects are driven by relative motion. Hence, identifying how a dissipative effect is configured in a mechanical system requires identifying critical motion variables. Consider the example of two sliding surfaces with distinct velocities identified by 1-junctions, as shown in Fig. 9.10(a). Identifying one surface with velocity V1, and the other with V2, the simple construction shown in Fig. 9.10(b) shows how an R element can be connected at a relative velocity, V3. Note the relevance of the causality as well. Two velocities join at the 0-junction to form a relative velocity, which is a causal input to the R. The causal output is a force, F3, computed using the constitutive relation, F = Φ(V3). The 1-junction formed to represent V3 can be eliminated when there is only a single element attached as shown. In this case, the R would replace the 1-junction. When the effort-flow relationship is linear, the proportionality constant is a resistance, and in mechanical systems these quantities are typically referred to as damping constants. Linear damping may arise in cases where two surfaces separated by a fluid slide relative to one another and induce a viscous and strictly laminar flow. In this case, it can be shown that the force and relative velocity are linearly related, and the material and geometric properties of the problem quantify the linear damping constant. Table 9.2 summarizes both translational and rotational damping elements, including the linear cases. These components are referred to as dampers, and the type of damping described here leads to the term viscous friction in mechanical applications, which is useful in many applications involving lubricated surfaces. If the relative speed is relatively high, the flow may become turbulent and this leads to nonlinear damper behavior. The constitutive relation is then a nonlinear function, but the structure or interconnection of 1
This is true in most cases. Energy-storing elements, as will be shown later, have a causal form that facilitates equation formulation. ©2002 CRC Press LLC
TABLE 9.2
Mechanical Dissipative Elements
Physical System
Fundamental Relations Dissipation: e ⋅ f = ∑ ei f i = T ⋅ f s
Generalized Dissipative Element
Resistive law: e = Φ R ( f ) Conductive law: f = Φ R (e ) −1
R
Co-content: Pe = ∫ f ⋅ de
Mechanical Translation
Constitutive: F = Φ(V )
damping, b
F1
Content: PV = ∫ F ⋅ dV
F2 V2
damping, b
F1 = F2 = F V1 − V2 = V
Constitutive: T = Φ(ω )
damping, B
T2 ω1
Co-energy: PF = ∫ V ⋅ dF
Dissipation: Pd = PV + PF
Mechanical Rotation T1
e1
ω2
T1 = T2 = T
ω 1 − ω2 = ω Torsional damper damping, B
Content: Pω = ∫ T ⋅ d ω Co-energy: PT = ∫ ω ⋅ dT
Dissipation: Pd = Pω + PT
en fn
e2 f2
R ...
Content: Pf = ∫ e ⋅ df
Resistive element Resistance, R
Damper
f1
i
e f
V1
Bond Graph
e3
f3
Generalized multiport R-element
F V
R :b
Linear: F = b ⋅ V Dissipation: Pd = bV 2
T
ω
R :B
Linear: T = B ⋅ ω Dissipation: Pd = Bω
2
TABLE 9.3 Typical Coefficient of Friction Values. Note, Actual Values Will Vary Significantly Depending on Conditions Contacting Surfaces Steel on steel (dry) Steel on steel (greasy) Teflon on steel Teflon on teflon Brass on steel (dry) Brake lining on cast iron Rubber on asphalt Rubber on concrete Rubber tires on smooth pavement (dry) Wire rope on iron pulley (dry) Hemp rope on metal Metal on ice
Static, µs
Sliding or Kinetic, µk
0.6 0.1 0.04 0.04 0.5 0.4 — — 0.9 0.2 0.3 —
0.4 0.05 0.04 — 0.4 0.3 0.5 0.6 0.8 0.15 0.2 0.02
the model in the system does not change. Dampers are also constructed using a piston/fluid design and are common in shock absorbers, for example. In those cases, the force–velocity characteristics are often tailored to be nonlinear. The viscous model will not effectively model friction between dry solid bodies, which is a much more complex process and leads to performance bounds especially at lower relative velocities. One way to capture this type of friction is with the classic Coulomb model, which depends on the normal load between surfaces and on a coefficient of friction, typically denoted µ (see Table 9.3). The Coulomb model quantifies the friction force as F = µN, where N is the normal force. This function is plotted in Fig. 9.11(a) to illustrate how it models the way the friction force always opposes motion. This model still qualifies as a resistive constitutive function relating the friction force and a relative velocity of the surfaces. In this case, ©2002 CRC Press LLC
F3
dry friction V1
1 V1
F1
V3
F1 = F 3
F2
F3 = µΝsgn (V3)
V2
N
0
F2 = F3
F3 V3
1 V2
R
F3 = F1 = F 2 (a)
(b)
FIGURE 9.11 (a) Classic coulomb friction for sliding surfaces. (b) Bond graph showing effect of normal force as a modulation of the R-element law.
however, the velocity comes into effect only to determine the sign of the force; i.e., F = µN sgn(V), where sgn is the signum function (value of 1 if V > 0 and -1 if V < 0). This model requires a special condition when V → 0. Dry friction can lead to a phenomenon referred to as stick-slip, particularly common when relative velocities between contacting surfaces approach low values. Stick-slip, or stiction, friction forces are distinguished by the way they vary as a result of other (modulating) variables, such as the normal force or other applied loads. Stick-slip is a type of system response that arises due to frictional effects. On a bond graph, a signal bond can be used to show that the normal force is determined by an external factor (e.g., weight, applied load, etc.). This is illustrated in Fig. 9.11(b). When the basic properties of a physical element are changed by signal bonds in this way, they are said to be modulated. This is a modeling technique that is very useful, but care should be taken so it is not applied in a way that violates basic energy principles. Another difficulty with the standard dry friction model is that it has a preferred causality. In other words, if the causal input is velocity, then the constitutive relation computes a force. However, if the causal input is force then there is no unique velocity output. The function is not bi-unique. Difficulties of this sort usually indicate that additional underlying physical effects are not modeled. While the effortflow constitutive relation is used, the form of the constitutive relation may need to be parameterized by other critical variables (temperature, humidity, etc.). More detailed models are beyond the scope of this chapter, but the reader is referred to Rabinowicz (1995) and Armstrong-Helouvry (1991) who present thorough discussions on modeling friction and its effects. Friction is usually a dominant source of uncertainty in many predictive modeling efforts (as is true in most energy domains).
Potential Energy Storage Elements Part of the energy that goes into deforming any mechanical component can be associated with pure (lossless) storage of potential energy. Often the decision to model a mechanical component this way is identified through a basic constitutive relationship between an effort variable, e (force, torque), and a displacement variable, q (translational displacement, angular displacement). Such a relationship may be derived either from basic mechanics [29] or through direct measurement. An example is a translational spring in which a displacement of the ends, x, is related to an applied force, F, as F = F(x). In an energy-based lumped-parameter model, the generalized displacement variable, q, is used to define a state-determined potential energy function,
E = E(q) = Uq This energy is related to the constitutive relationship, e = F(q), by
∫
U ( q ) = qU = e dq =
∫ Φ ( q )d
It is helpful to generalize in this way, and to identify that practical devices of interest will have at least one connection (or port) in which power can flow to store potential energy. At this port the displacement ©2002 CRC Press LLC
TABLE 9.4
Mechanical Potential Energy Storage Elements (Integral Form)
Physical System
Fundamental Relations
Generalized Potential Energy Storage Element
State: q = displacement
stiffness, k = 1/C
V1 spring
F2 V2 F1 = F2 = F V1 − V2 = V
stiffness, k, compliance, C
Mechanical Rotation stiffness, K= 1/C T1 ω1
T2
ω2
T1 = T2 = T
ω1 − ω 2 = ω Torsional spring stiffness, K, compliance, C
C ...
f2 = q2
e3
f3 = q3
Generalized multiport C-element
State: x = displacement
F
Rate: x = V Constitutive: F = F ( x)
x =V
Linear: F = k ⋅ x
Energy: U x = ∫ F ⋅ dx
Energy: U x = 12 kx 2
Co-energy: U F = ∫ x ⋅ dF
Co-energy: U F = F
State: θ = angle
T C : 1/C=K θ =ω Linear: T = K ⋅ θ
Rate: θ = ω Constitutive: T = T (θ )
Co-energy: U T = T
Co-energy: U T = ∫ θ ⋅ dT
F x=V
x
θ T
C :1/C=k
2
2k
Energy: Uθ = 12 kθ 2
Energy: Uθ = ∫ T ⋅ dθ
F
2
2K
T
C
θ =ω k12
x
k21 k22
θ
k11
F
= T
(a)
en f n = qn
Co-energy: U e = ∫ q ⋅ de
Mechanical Translation
e1
e2
Energy: U q = ∫ e ⋅ dq
Capacitive element Capacitance, C
F1
f1 = q1
Rate: q = f Constitutive: e = Φ(q )
C
e f
Bond Graph
(b)
FIGURE 9.12 Example of two-port potential energy storing element: (a) cantilevered beam with translational and rotational end connections, (b) C-element, 2-port model.
variable of interest is either translational, x, or angular, θ, and the associated velocities are V = x˙ and ω = θ, respectively. A generalized potential energy storage element is summarized in Table 9.4, where examples are given for the translational and rotational one-port. The linear translational spring is one in which F = F(x) = kx = (1/C)x, where k is the stiffness and C ≡ 1/k is the compliance of the spring (compliance is a measure of “softness”). As shown in Table 9.4, the 1 2 potential energy stored in a linear spring is Ux = ∫ F dx = ∫ kx dx = --2 kx , and the co-energy is UF = ∫ 2 F dx = ∫ (F/k) dF = F /2k. Since the spring is linear, you can show that U x = UF . If the spring is nonlinear due to, say, plastic deformation or work hardening, then this would not be true. Elastic potential energy can be stored in a device through multiple ports and through different energy domains. A good example of this is the simple cantilevered beam having both tip force and moment (torque) inputs. The beam can store energy either by translational or rotational displacement of the tip. A constitutive relation for this 2-port C-element relates the force and torque to the linear and rotational displacments, as shown in Fig. 9.12. A stiffness (or compliance) matrix for small deflections is derived by linear superposition. ©2002 CRC Press LLC
Kinetic Energy Storage All components that constitute mechanical systems have mass, but in a system analysis, where the concern is dynamic performance, it is often sufficient to focus only on those components that may store relevant amounts of kinetic energy through their motion. This presumes that an energetic basis is used for modeling, and that the tracking of kinetic energy will provide insight into the system dynamics. This is the focus of this discussion, which is concerned for the moment with one-dimensional translation and fixed-axis rotation. Later it will be shown how the formulation presented here is helpful for understanding more complex systems. The concept of mass and its use as a model element is faciliated by Newton’s relationship between the rate of change of momentum of the mass to the net forces exerted on it, F = p˙ , where p is the momentum. The energy stored in a system due to translational motion with velocity V is the kinetic energy. Using the relation from Newton’s law, dp = Fdt, this energy is E(p) = T(p) = Tp = ∫Pdt = ∫FV dt = ∫V dp. If the velocity is expressed solely as a function of the momentum, p, this system is a pure translational mass, V = Φ(p). If the velocity is linearly proportional to the momentum, then V = p/m, where m is the mass. Similar basic definitions are made for a body in rotation about a fixed axis, and these elements are summarized in Table 9.5. For many applications of practical interest to engineering, the velocity–momentum relation, V = V(p) (the constitutive relation), is linear. Only in relativistic cases might there be a nonlinear relationship in the constitutive law for a mass. Nevertheless, this points out that for the general case of kinetic energy storage a constitutive relation is formed between the flow variable and the momentum variable, f = f(p). This should help build appreciation for analogies with other energy domains, particularly in electrical systems where inductors (the mass analog) can have nonlinear relationships between current (a flow) and flux linkage (momentum). The rotational motion of a rigid body considered here is constrained thus far to the simple case of planar and fixed-axis rotation. The mass moment of intertia of a body about an axis is defined as the sum of the products of the mass-elements and the squares of their distance from the axis. For the discrete case, I = ∑r2 ∆m, which for continuous cases becomes, I = ∫r2dm (units of kg m2). Some common shapes
TABLE 9.5
Mechanical Kinetic Energy Storage Elements (Integral Form)
Physical System
Fundamental Relations
Generalized Kinetic Energy Storage Element e f
State: p = momentum Rate: p = e Constitutive: f = Φ(p )
Inertive element Inertance, I
Co-energy: Tf = ∫ p ⋅ df
I
Mechanical Translation mass, M
F1 V1 Mass
mass, m
Energy: Tp = ∫ f ⋅ dp
State: p = momentum Rate: p = F Constitutive: V = V ( p )
F2
Energy: Tp = ∫ f ⋅ dp
V2 F1 − F2 = F V1 = V2 = V
Co-energy: TV = ∫ p ⋅ dV
Mechanical Rotation
State: h = angular momentum
inertia, J
Rate: h = T
ω2
ω1
T1
T2 T1 − T2 = T
ω1 = ω 2 = ω Rotational inertia mass moment of inertia, J
©2002 CRC Press LLC
Constitutive: ω = ω (h) Energy: Th = ∫ ω ⋅ dh Co-energy: Tω = ∫ h ⋅ dω
Bond Graph en = pn
e1 = p1 f1 e2 = p2 f2 e3 = p3
fn
I ... f3
Generalized multiport I-element
p=F
I: M
V Linear: V = p
M 2 p Energy: Tp =
2M Co-energy: TV = 12 MV 2 h =T I: J ω h Linear: ω = J 2 Energy: Th = h 2J Co-energy: Tω = 12 J ω 2
c
Point mass at radius r
J = mr 2
Cylindrical shell about axis c-c (inner radius r)
J = mr 2
c
If outer radius is R, and not a thin shell,
J = 12 m( R 2 + r 2)
Rod or bar about centroid
J=
L
mL2 12 c
Short bar about pivot
L d FIGURE 9.13
J=
Cylinder about axis c-c (radius r)
J = 12 mr 2 c
m 2 (d + 4l 2 ) 12
Slender bar case, d = 0
Mass moments of inertia for some common bodies.
and associated mass moments of inertia are given in Fig. 9.13. General rigid bodies are discussed in section “Inertia Properties.” There are several useful concepts and theorems related to the properties of rigid bodies that can be helpful at this point. First, if the mass moment of inertia is known about an axis through its center of mass (IG), then Steiner’s theorem (parallel axis theorem) relates this moment of inertia to that about 2 another axis a distance d away by I = IG + md , where m is the mass of the body. It is also possible to build a moment of inertia for composite bodies, in those situations where the individual motion of each body is negligible. A useful concept is the radius of gyration, k, which is the radius of an imaginary cylinder of infinitely small wall thickness having the same mass, m, and the same mass moment of inertia, I, as a body in question, and given by, k = I/m . The radius of gyration can be used to find an equivalent 2 mass for a rolling body, say, using meq = I/k .
Coupling Mechanisms Numerous types of devices serve as couplers or power transforming mechanisms, with the most common being levers, gear trains, scotch yokes, block and tackle, and chain hoists. Ideally, these devices and their analogs in other energy domains are power conserving, and it is useful to represent them using a 2-port model. In such a model element, the power in is equal to the power out, or in terms of effort-flow pairs, e1 f1 = e2 f2. It turns out that there are two types of basic devices that can be represented this way, based on the relationship between the power variables on the two ports. For either type, a relationship between two of the variables can usually be identified from geometry or from basic physics of the device. By imposing the restriction that there is an ideal power-conserving transformation inherent in the device, a second relationship is derived. Once one relation is established the device can usually be classified as a transformer or gyrator. It is emphasized that these model elements are used to represent the ideal power-conserving aspects of a device. Losses or dynamic effects are added to model real devices. A device can be modeled as a transformer when e1 = me2 and mf1 = f2. In this relation, m is a transformer modulus defined by the device physics to be constant or in some cases a function of states of the system. For example, in a simple gear train the angular velocities can be ideally related by the ratio of pitch radii, and in a slider crank there can be formed a relation between the slider motion and the crank angle. Consequently, the two torques can be related, so the gear train is a transformer. A device can be modeled as a gyrator if e 1 = rf2 and rf1 = e2, where r is the gyrator modulus. Note that this model can represent ©2002 CRC Press LLC
T
G V2
T1
w1
V1 w2 T 2
F1 F2
i F1
F2
V2
T
v w V1
V1 i1 F1
v1 P2 Q2
FIGURE 9.14
V2 F2
Common devices that can be modeled as transformers and gyrators in mechatronic systems.
the power-conserving transformation in devices for which a cross-relationship between power variables 2 (i.e., effort related to flow) has been identified. Some examples of transformers and gyrators are shown in Fig. 9.14. In a bond graph model, the transformer can be represented by a TF or T, while a gyrator is represented by a GY or G (note, the two letter symbol is common). The devices shown in Fig. 9.14 indicate a modulus m or r, which may or may not be a constant value. Many devices may have power-conserving attributes; however, the relationship between the effort-flow variables may not be constant, so the relationship is said to be modulated when the modulus is a function of a dynamic variable (preferably a state of the system). On a bond graph, this can be indicated using a signal bond directed into the T or G modulus. Examples of a modulated transformer and gyrator are given in Fig. 9.15. These examples highlight useful techniques in modeling of practical devices. In the slider crank, note that the modulation is due to a change in the angular position of the crank. We can get this information from a bond that is adjacent to the transformer in question; that is, if we integrate the angular velocity found on a neighboring bond, as shown in Fig. 9.15(a). For the field excited dc motor shown in Fig. 9.15(b), the torque–current relation in the motor depends on a flux generated by the field; however, this field is excited by a circuit that is powered independent of the armature circuit. The signal information for modulation does not come from a neighboring bond, as in the case for the slider crank. These two examples illustrate two ways that constraints are imposed in coupling mechanisms. The modulation in the slider crank might be said to represent a holonomic constraint, and along these same lines the field excitation in the motor imposes a non-holonomic constraint. We cannot relate torque and current in the latter case without solving for the dynamics of an independent system—the field circuit. In the slider crank, the angular position ˙ required for the modulation is obtained simply by integrating the velocity, since q = ω. Additional discussion on constraints can be found in section 9.7. The system shown in Fig. 9.16(a) is part of an all-mechanical constant-speed drive. A mechanical feedback force, F2, will adjust the position of the middle rotor, x2. The effect is seen in the bond graph 2
It turns out that the gyrator model element is essential in all types of systems. The need for such an element to represent gyroscopic effects in mechanical systems was first recognized by Thomson and Tait in the late 1900s. However, it was G. D. Birkhoff (1927) and B. D. H. Tellegen (1948) who independently identified the need for this element in analysis and synthesis of systems. ©2002 CRC Press LLC
ω2
V1
i1
θ
if
field excited
F1
T2
v1
T2
ω2
signal bond conveys modulation
1
T2
ω2
m (θ )
F1
T
V1
power into field circuit
1 power into armature circuit
signal information is extracted from either a 1 (flow) or 0 (effort) junction but there is no power transferred
v1 i1
MTF Another symbol for the Modulated Transformer
r(if )
G
signal bond conveys modulation
ω2
(b)
Concept of modulation in transformers and gyrators.
ω3
r3
ω2
x2 F2
output
1 ω3
r2
r2 T:m = r 3
r1
1 ω2 T:m =
input
FIGURE 9.16
T2
Field inductance
MGY Another symbol for the Modulated GYrator
(a) FIGURE 9.15
I
1
ω1
1 ω1
(a)
(b)
r1(x2) r2
x2
A nonholonomic constraint in a transformer model.
model of Fig. 9.16(b), which has two transformers to represent the speed ratio between the input (turntable) 1 and the mid-rotor 2, and the speed ratio between the mid-rotor and the output roller 3. The first transformer is a mechanical version of a nonholonomic transformation. Specifically, we would have to solve for the dynamics of the rotor position (x2) in order to transform power between the input and output components of this device.
Impedance Relationships The basic component descriptions presented so far are the basis for building basic models, and a very useful approach relies on impedance formulations. An impedance function, Z, is a ratio of effort to flow variables at a given system port of a physical device, and the most common application is for linear systems where Z = Z(s), where s is the complex frequency variable (sometimes called the Laplace operator). An admittance is the inverse of the impedance, or Y = 1/Z. For each basic element defined, a linear impedance relation can be derived for use in model development. First, recall that the derivative operator can be represented by the s operator, so that dx/dt in s-domain is simply sx and ∫x dt is x/s, and so on. ©2002 CRC Press LLC
0066-frame-C09 Page 18 Friday, January 18, 2002 10:59 AM
TABLE 9.6
Basic Mechanical Impedance Elements
System
Resistive, ZR
Capacitive, ZC
Inertive, ZI
b B
k/s K/s
m·s J·s
Translation Rotation Z1
Z1 Z2
Z Z3
e f
Z1
1
Z2
Z1
Z
Z2
Z3
e f
Z3
Z2
Z3
(a)
FIGURE 9.17
0
(b)
(a) Impedance of a series connection. (b) Admittance for a parallel combination.
T1 ω1
T1
J2
ω2
ω1
T2 m=
T1 r1
ω1
r2
..m T
T2
ω2
Z 2 ( s ) = sJ2
Z1 ( s ) = m 2 sJ 2
FIGURE 9.18 Rotational inertia attached to gear train, and corresponding model in impedance form. This example illustrates how a transformer can scale the gain of an impedance.
For the basic inertia element in rotation, for example, the basic rate law (see Table 9.5) is h˙ = T. In s-domain, sh = T. Using the linear constitutive relation, h = Jω , so sJω = T. We can observe that a rotation inertial impedance is defined by taking the ratio of effort to flow, or T/ω ≡ ZI = sJ. A similar exercise can be conducted for every basic element to construct Table 9.6. Using the basic concept of a 0 junction and a 1 junction, which are the analogs of parallel and series circuit connections, respectively, basic impedance formulations can be derived for bond graphs in a way analogous to that done for circuits. Specifically, when impedances are connected in series, the total impedance is the sum, while admittances connected in parallel sum to give a total admittance. These basic relations are illustrated in Fig. 9.17, for which
,
n impedances in series sum to form a total impedance
Y =
Y1 + Y2 + … + Yn
(9.2)
Z1 + Z2 + … + Zn
Z =
n admittances in parallel sum to form a total admittance
Impedance relations are useful when constructing transfer functions of a system, as these can be developed directly from a circuit analog or bond graph. The transformer and gyrator elements can also be introduced in these models. A device that can be modeled with a transformer and gyrator will exhibit impedance-scaling capabilities, with the moduli serving a principal role in adjusting how an impedance attached to one “side” of the device appears when “viewed” from the other side. For example, for a device having an impedance Z2 attached on port 2, the impedance as viewed from port 1 is derived as
e e Z 1 = ----1 = ----1 f1 e2
e2 ---f2
f2 2 --- = [ m ] [ Z 2 ( s ) ] [ m ] = m Z 2 ( s ) f1
(9.3)
This concept is illustrated by the gear-train system in Fig. 9.18. A rotational inertia is attached to the output shaft of the gear pair, which can be modeled as a transformer (losses, and other factors ignored here).
©2002 CRC Press LLC
i1
v1
ω 2 T2
i1
v1
v1
T2 =r i1
v1
ω2
J2
=r
i1
..r T2 G ω 2
Z 2 ( s ) = sJ 2
Z1 ( s ) = r 2Y2 ( s ) =
r2 sJ 2
FIGURE 9.19 Rotational inertial attached to a basic rotational machine modeled as a simple gyrator. This example illustrates how a gyrator can scale the gain but also convert the impedance to an admittance form.
The impedance of the inertial is Z2 = sJ2, where J2 is the mass moment of inertia. The gear train has an impedance-scaling capability, which can be designed through selection of the gear ratio, m. The impedance change possible with a transformer is only in gain. The gyrator can affect gain and in addition can change the impedance into an admittance. Recall the basic gyrator relation, e1 = r f2 and e2 = rf1, then for a similar case as before, 1
f1 =
e1 ---f2
f ---2e2
e2 ---f1
2
= [ r ] [ Y2 ( s ) ] [ r ] = r Y2 ( s
(9.4)
This functional capability of gyrators helps identify basic motor-generator designs as integral parts of a flywheel battery system. A very simplified demonstration is shown in Fig. 9.19, where a flywheel (rotational inertia) is attached to the mechanical port of a basic electromechanical gyrator. When viewed from the electrical port, you can see that the gyrator makes the inertia “look” like a potential energy storing device, since the impedance goes as 1/(sC), like a capacitive element, although here C is a mechanical inertia.
9.4 Physical Laws for Model Formulation This section will illustrate basic equation formulation for systems ranging in complexity from mass-springdamper models to slightly more complex models, showing how to interface with nonmechanical models. Previous sections of this chapter provide descriptions of basic elements useful in modeling mechanical systems, with an emphasis on a dynamic system approach. The power and energy basis of a bond graph approach makes these formulations consistent with models of systems from other energy domains. An additional benefit of using a bond graph approach is that a systematic method for causality assignment is available. Together with the physical laws, causal assignment provides insight into how to develop computational models. Even without formulating equations, causality turns out to be a useful tool.
Kinematic and Dynamic Laws The use of basic kinematic and dynamic equations imposes a structure on the models we build to represent mechanical translation and rotation. Dynamic equations are derived from Newton’s laws, and we build free-body diagrams to understand how forces are imposed on mechanical systems. In addition, we must use geometric aspects of a system to develop kinematic equations, relying on properly defined coordinate systems. If the goal is to analyze a mechanical system alone, typically the classical application of conservation of momentum or energy methods and/or the use of kinematic analysis is required to arrive at solutions to a given problem. In a mechatronic system, it is implied that a mechanical system is coupled to other types of systems (hydraulics, electromechanical devices, etc.). Hence, we focus here on how to build models that will be easily integrated into overall system models. A detailed classical discussion of kinematics and dynamics from a fundamental perspective can be found in many introductory texts such as Meriam and Kraige [23] and Bedford and Fowler [5], or in more advanced treatments by Goldstein [11] and Greenwood [12]. ©2002 CRC Press LLC
When modeling simple translational systems or fixed-axis rotational systems, the basic set of laws summarized below are sufficient to build the necessary mathematical models. Basic Dynamic and Kinematic Laws System
Dynamics
Kinematics
Translational
∑i F i = 0
∑i V i = 0
Rotational Junction type
∑ Ti = 0 1-junction
∑ wi = 0 0-junction
N
N
N i
N i
There is a large class of mechanical systems that can be represented using these basic equations, and in this form it is possible to see how: (a) bond graph junction elements can be used to structure these models and (b) how these equations support circuit analog equations, since they are very similar to the Kirchhoff circuit laws for voltage and current. We present here the bond graph approach, which graphically communicates these physical laws through the 0- and 1-junction elements.
Identifying and Representing Motion in a Bond Graph It is helpful when studying a mechanical system to focus on identifying points in the system that have distinct velocities (V or ω). One simply can associate a 1-junction with these points. Once this is done, it becomes easier to identify connection points for other mechanical components (masses, springs, dampers, etc.) as well as points for attaching actuators or sensors. Further, it is critical to identify and to define additional velocities associated with relative motion. These may not have clear, physically identifiable points in a system, but it is necessary to localize these in order to attach components that rely on relative motion to describe their operation (e.g., suspensions). Figure 9.20 shows how identifying velocities of interest can help identify 1-junctions at which mechanical components can be attached. For the basic mass element in part (a), the underlying premise is that a component of a system under study is idealized as a pure translational mass for which momentum and velocity are related through a constitutive relation. What this implies is that the velocity of the mass is the same throughout this element, so a 1-junction is used to identify this distinct motion. A bond attached to this 1-junction represents how any power flowing into this junction can flow into a kinetic energy storing element, I, which represents the mass, m. Note that the force on the bond is equal to the rate of change of momentum, p˙ , where p = mV.
V1
V m
1
V
m1
m2
I: m1
I: m2
J2
ω1
I: J1
1 V1
V1
0
V2
V3
1 relative velocity
(b)
x
1 V2
1
ω1
ω1
C: 1/K
ω2
I: J2
µ
I: m
Simple translating mass defines distinct velocity. Attach the I-element to the corresponding 1-junction.
(a)
J1
V2
K
0
ω2
ω3
1 relative velocity
ω
1
ω2
R
(c)
FIGURE 9.20 Identifying velocities in a mechanical system can help identify correct interconnection of components and devices: (a) basic translating mass, (b) basic two-degree of freedom system, (c) rotational frictional coupling between two rotational inertias.
©2002 CRC Press LLC
The two examples in Figs. 9.20(b) and 9.20(c) demonstrate how a relative velocity can be formed. Two masses each identify the two distinct velocity points in these systems. Using a 0-junction allows construction of a velocity difference, and in each case this forms a relative velocity. In each case the relative velocity is represented by a 1-junction, and it is critical to identify that this 1-junction is essentially an attachment point for a basic mechanical modeling element.
Assigning and Using Causality Bond graphs describe how modeling decisions have been made, and how model elements (R, C, etc.) are interconnected. A power bond represents power flow, and assigning power convention using a halfarrow is an essential part of making the graph useful for modeling. A sign convention is essential for expressing the algebraic summation of effort and flow variables at 0- and 1-junctions. Power is generally assigned positive sense flowing into passive elements (resistive, capacitive, inertive), and it is usually safe to always adopt this convention. Sign convention requires consistent and careful consideration of the reference conditions, and sometimes there may be some arbitrariness, not unlike the definition of reference directions in a free-body diagram. Causality involves an augmentation of the bond graph, but is strictly independent of power flow convention. As discussed earlier, an assignment is made on each bond that indicates the input–output relationship of the effort-flow variables. The assignment of causality follows a very consistent set of rules. A system model that has been successfully assigned causality on all bonds essentially communicates solvability of the underlying mathematical equations. To understand where this comes from, we can begin by examining the contents of Tables 9.4 and 9.5. These tables refer to the integral form of the energy storage elements. An energy storage element is in integral form if it has been assigned integral causality. Integral causality implies that the causal input variable (effort or flow) leads to a condition in which the state of the energy stored in that element can be determined only by integrating the fundamental rate law. As shown in Table 9.7, integral causality for an I element implies effort is the input, whereas integral causality for the C element implies flow is the input. TABLE 9.7
Table Summarizing Causality for Energy Storage Elements Integral Causality
e
C
CONSTITUTIVE
ΦC ( )
e
e
f q(t)
∫(
)dt
e
p
t
f
t
dt
I
INVERSE CONSTITUTIVE
e=p
−1
p = ΦI ( f )
f d dt
e
e
p
e= dp/dt
p
p(t)
− ΦI ( ) 1
ΦI ( ) f
©2002 CRC Press LLC
f = dq/dt
d dt
f = Φ I ( p)
f
q
q
CONSTITUTIVE
e=p
−1
q = Φ C (e )
f=q −1
q(t) )dt
INVERSE CONSTITUTIVE
e
ΦC ( )
f
q
I
C
e = Φ C (q )
f=q
∫(
Derivative Causality
t
f
t
TABLE 9.8
Table of Causality Assignment Guidelines
Sources
E
Ideal Coupling Elements
Junctions
e1
0
e(t)
e2
f1
Only one bond specifies effort.
e1
f2
F
f(t)
e 2 = rf1
e2
e1
e2
T
f1
Only one bond specifies flow.
f2 e 1 = rf2
mf1 = f2
e1
G
f1
e 1 = me2
1
e2
T
f2
G
f1
f2
ω (t) electric machine
F (a)
h
ω (t) (b)
I
electric machine
h ω (t)
(c)
FIGURE 9.21 Driving a rotational inertia with a velocity source: (b) simple bond graph with causality, (c) explanation of back effect.
As shown in this table, the alternative causality for each element leads to derivative causality, a condition in which the state of the energy storage element is known instantaneously and as such is said to be dependent on the input variable, and is in a state of dependent causality. The implication is that energy storage elements in integral causality require one differential equation (the rate law) to be solved in order to determine the value of the state variable (p or q). Energy storage elements in derivative causality don’t require a differential equation; however, they still make their presence known through the back reaction implied. For example, if an electric machine shown in Fig. 9.21(a) is assumed to drive a rotational inertial with a known velocity, ω, then the inertia is in derivative causality. There will also be losses, but the problem is simplified to demonstrate the causal implications. The energy is always known since, h = Jω, 2 so Th = h /2J. However, the machine will feel an inertial back torque, h˙ , whenever a change is made to ω. This effect cannot be neglected. Causality assignment on some of the other modeling elements is very specific, as shown in Table 9.8. For example, for sources of effort or flow, the causality is implied. On the two-port transformer and gyrator, there are two possible causality arrangements for each. Finally, for 0- and 1-junctions, the causality is also very specific since in each case only one bond can specify the effort or flow at each. With all the guidelines established, a basic causality assignment procedure can be followed that will make sure all bonds are assigned causality (see also Rosenberg and Karnopp [32] and Karnopp, Margolis, and Rosenberg [17]). 1. For a given system, assign causality to any effort or flow sources, and for each one assign the causality as required through 0- and 1-junctions and transformer and gyrator elements. The causality should be spread through the model until a point is reached where no assignment is implied. Repeat this procedure until all sources have been assigned causality. 2. Assign causality to any C or I element, trying to assign integral causality if possible. For each assignment, propagate the causality through the system as required. Repeat this procedure until all storage elements are assigned causality. ©2002 CRC Press LLC
3. Make any final assignments on R elements that have not had their causality assigned through steps 1 and 2, and again propagate causality as required. Any arbitrary assignment on an R element will indicate need for solving an algebraic equation. 4. Assign any remaining bonds arbitrarily, propagating each case as necessary. Causality can provide information about system operation. In this sense, the bond graph provides a picture of how inputs to a system lead to certain outputs. The use of causality with a bond graph replaces ad hoc assignment of causal notions in a system. This type of information is also useful for understanding how a system can be split up into modules for simulation and/or it can confirm the actual physical boundaries of components. Completing the assignment of causality on a bond graph will also reveal information about the solvability of the system model. The following are key results from causality assignment. • Causality assignment will reveal the order of the system, which is equal to the number of independent energy storage elements (i.e., those with integral causality). The state variable (p or q) for any such element will be a state of the system, and one first-order differential equation will be required to describe how this state propagates through time. • Any arbitrary assignment of causality on an R element indicates there is an algebraic loop. The number of arbitrary assignments can be related to the number of algebraic equations required in the model.
Developing a Mathematical Model Mathematical models for lumped-parameter mechanical systems will take the form of coupled ordinary differential equations or, for a linear or linearized system, transfer functions between variables of interest and system inputs. The form of the mathematical model should match the application, and one can readily convert between the different forms. A classical approach to developing the mathematical model will involve applying Newton’s second law directly to each body, taking account of the forces and torques. Commonly, the result is a second-order ordinary differential equation for each body in a system. An alternative is to use Lagrange’s equations, and for multidimensional dynamics, where bodies may have combined translation and rotation, additional considerations are required as will be discussed in Section 9.6. At this point, consider those systems where a given body is either under translation or rotation. Mass-Spring-Damper: Classical Approach A basic mechanical system that consists of a rigid body that can translate in the z-direction is shown in Fig. 9.22(a). The system is modeled using a mass, a spring, and a damper, and a force, F(t), is applied Rigid body, mass, m
F(t)
z
F(t) V
1 degree of freedom (DOF) dp dt Spring, with stiffness, k
Damper, with coefficient, b
Fixed Base (zero velocity)
W Fk
Fb
Fk
Fb V = 0
(a)
FIGURE 9.22
(b)
Basic mass-spring-damper system: (a) schematic, (b) free-body diagram.
©2002 CRC Press LLC
directly to the mass. A free-body diagram in part (b) shows the forces exerted on the system. The spring and damper exert forces Fk and Fb on the mass, and these same forces are also exerted on the fixed base since the spring and damper are assumed to be massless. A component of the weight, W, resolved along the axis of motion is included. The sum of applied forces is then, ∑F = F(t) + W - Fk - Fb. The dashed arrow indicates the “inertial force” which is equal to the rate of change of the momentum in the z-direction, pz, or, dpz /dt = p˙ z = mV˙ z. This term is commonly used in a D’Alembert formulation, one can think of this force as opposing or resisting the effect of applied forces to accelerate the body. It is common to use the inertial force as an “applied force,” especially when performing basic analysis (e.g., see Chapter 3 or 6 of [23]). Newton’s second law relates rate of change of momentum to applied forces, p˙ = ∑F, so, p˙z = F(t) + W - Fk - Fb. To derive a mathematical model, form a basic coordinate system with the z-axis positive upward. Recall the constitutive relations for each of the modeling elements, assumed here to be linear, pz = mVz, Fk = kzk, and Fb = bVb. In each of these elements, the associated velocity, V, or displacement, z, must be identified. The mass has a velocity, Vz = z˙ , relative to the inertial reference frame. The spring and damper have the same relative velocity since one end of each component is attached to the mass and the other to the base. The change in the spring length is z and the velocity is z˙ - Vbase. However, Vbase = 0 since the base is fixed, so putting this all together with Newton’s second law, m˙z˙ = F(t) + W - kz - b z˙ . A second order ordinary differential equation (ODE) is derived for this single degree of freedom (DOF) system as
m ˙z˙ + bz˙ + kz = F ( t ) + W In this particular example, if W is left off, z is the “oscillation” about a position established by static equilibrium, zstatic = W/k. If a transfer function is desired, a simple Laplace transform leads to (assuming zero initial conditions for motion about zstatic)
Z(s) 1 ---------- = ----------------------------2 F(s) ms + bs + k The simple mass-spring-damper example illustrates that models can be readily derived for mechanical systems with direct application of kinematics and Newton’s laws. As systems become more complex either due to number of bodies and geometry, or due to interaction between many types of systems (hydraulic, electromechanical, etc.), it is helpful to employ tools that have been developed to facilitate model development. In a subsequent section, multibody problems and methods of analysis are briefly discussed. It has often been argued that the utility of bond graphs can only be seen when a very complex, multienergetic system is analyzed. This need not be true, since a system (or mechatronics) analyst can see that a consistent formulation and efficacy of causality are very helpful in analyzing many different types of physical systems. This should be kept in mind, as these basic bond graph methods are used to re-examine the simple mass-spring-damper system. Mass-Spring-Damper: Bond Graph Approach Figure 9.23 illustrates the development of a bond graph model for a mass-spring-damper system. In part (a), the distinct velocity points are identified and 1-junctions are used to represent them on a bond graph. Even though the base has zero velocity, and there will be no power flow into or out of that point, it is useful to identify it at this point. A relative velocity is formed using a 0-junction, and note that all bonds have sign convention applied, so at the 0-junction, Vmass - Vrelative - Vbase = 0, which gives, Vrelative = Vmass Vbase as required. The model elements needed to represent the system are connected to the 1-junctions, as shown in Fig. 9.23(b). Two sources are required, one to represent the applied force (effort, Se) due to weight, and a second to represent the fixed based velocity (a flow source, Sf ). The flow source is directly attached to ©2002 CRC Press LLC
Vmass Vmass
1
Se
Ma s s
Se
I:m
1 Vz
C :k -1
7
1
8
C :k -1
V r e la t ive
0
1
I:m
6 5
0
V r e la t ive
1
0
3
1 4
R :b
R :b 2
Vba se
1
Ba s e
1
Sf
1
Vba se V = 0 (fix e d b a s e ) (a )
(b )
1
Sf
(c)
FIGURE 9.23 Basic mass-spring-damper system: (a) identifying velocity 1-junctions, (b) attaching model elements, (c) assignment of causality.
FIGURE 9.24 Equation derivation for mass-springdamper. The ‘*’ indicates these relations are reduced to functions of state or input. A ‘**’ shows an intermediate variable has been reached that has elsewhere been reduced to ‘*’.
the 1-junction (the extra bond could be eliminated). An I element represents mass, a C represents the spring, and an R represents the losses in the damper. Note how the mass and the source of effort are attached to the 1-junction representing the mass velocity (the weight is always applied at that velocity). The spring and damper are attached via a power bond to the relative velocity between the mass and base. Finally, in Fig. 9.23(c) the eight bonds are labeled and causality is assigned. First, the fixed base source fixes the causality on bond 1, specifying the velocity at the 1-junction, and thus constraining the causality of bond 2 to have effort into the 1-junction. Since bond 2 did not specify effort into the 0-junction, causality assignment should proceed to other sources, and the effort source fixes causality on bond 7. This bond does not specify the flow at the adjoining 1-junction, so at this point we could look for other specified sources. Since there are none, we assign causality to any energy-storing elements which have a preferred integral causality. The bond 8 is assigned to give the I element integral causality (see Table 9.7), which then specifies the velocity at the 1-junction and thus constrains bond 6. At this point, bonds 6 and 2 both specify flow into the 0-junction, so the remaining bond 3 must specify the effort. This works out well because now bond 3 specifies flow into the remaining 1-junction (the relative velocity), which specifies velocity into the C and R elements. For the C element, this gives integral causality. In summary, the causality is assigned and there are no causal conflicts (e.g., two bonds trying to specify velocity into a 1-junction). Both energy-storing elements have integral causality. This indicates that the states for the I (mass) and C (spring) will contribute to the state variables of the system. This procedure assures a minimum-size state vector, which in this case is of order 2 (a 2nd-order system). Figure 9.24 shows a fully annotated bond graph, with force-velocity variables labeling each bond. The state for an I element is a momentum, in this case the translational momentum of the mass, p8. For a C element, a ©2002 CRC Press LLC
Se Sprung mass
F 14 14
13
V 15
m15
1
F 15 = p 15 V 15
15
I:m V 12 = z 1 2
12
0
1
10
F 11
11 Un s p ru n g mass
V 11
V8
m8 T ir e s t iffn e s s a n d d a m p in g m ode l
C :k -1
F 12
Ac t ive s u s p e n s io n s ys t e m
Se
F7
7
9
1 6
F8 = p 8 V8
8
I:m C :k -1
F5
V1
0 The causality assignment shows that the mechanical system (including tire) has 4 dynamic states.
F3 3 V 3
Ac t ive s u s p e n s io n
5
V5 = z5
1 4
T ir e s t iffn e s s a n d d a m p in g m ode l
F4 V4
R :b
2 Ve r t ic a l ve lo c it y a t 1 1 V1 g r o u n d -t ir e in t e r fa c e
Sf
FIGURE 9.25 Example of model for vertical vibration in a quarter-car suspension model with an active suspension element. This example builds on the simple mass-spring-damper model, and shows how to integrate an actuator into a bond graph model structure.
displacement variable is the state z5, which here represents the change in length of the spring. The state T vector is x = [p8, z5]. A mathematical model can be derived by referring to this bond graph, focusing on the independent energy storage elements. The rate law (see Tables 9.4 and 9.5) for each energy storage element in integral causality constitutes one first-order ordinary differential state equation for this system. In order to formulate these equations, the right-hand side of each rate law must be a function only of states or inputs to the system. The process is summarized in the table of Fig. 9.24. Note that the example assumes linear constitutive relations for the elements, but it is clear in this process that this is not necessary. Of course, in some cases nonlinearity complicates the analysis as well as the modeling process in other ways. Quarter-car Active Suspension: Bond Graph Approach The simple mass-spring-damper system forms a basis for building more complex models. A model for the vertical vibration of a quarter-car suspension is shown in Fig. 9.25. The bond graph model illustrates the use of the mass-spring-damper model, although there are some changes required. In this case, the base is now moving with a velocity equal to the vertical velocity of the ground-tire interface (this requires knowledge of the terrain height over distance traveled as well as the longitudinal velocity of the vehicle). The power direction has changed on many of the bonds, with many now showing positive power flowing from the ground up into the suspension system. The active suspension system is isolated to further illustrate how bond graph modeling promotes a modular approach to the study of complex systems. Most relevant is that the model identifies the required causal relation at the interface with the active suspension, specifying that the relative velocity is a causal input, and force is a causal output of the active suspension system. The active force is exerted in an equal and opposite fashion onto the sprung and unsprung mass elements. The causality assignment identifies four states (two momentum states and two spring displacement states). Four first-order state equations can be derived using the rate laws of each of the independent energy-storing elements (C5, I8, C12, I15). At this point, depending on the goals of the analysis, either the nonlinear equations could be derived (which might include an active suspension force that depends on the velocity input), or a linearized model could be developed and impedance methods applied to derive a transfer function directly. ©2002 CRC Press LLC
e
R2 2 Se
1
1
(a)
FIGURE 9.26
modeled effort-flow characteristic
3 f
f
Se
(b)
1
Resistive load curve operating point
2
e
e3
R2
1
e 3 f
(c)
R3
f3 (d)
Algebraic loop in a simple source-load model.
Note on Some Difficulties in Deriving Equations There are two common situations that can lead to difficulties in the mathematical model development. These issues will arise with any method, and is not specific to bond graphs. Both lead to a situation that may require additional algebraic manipulation in the equation derivation, and it may not be possible to accomplish this in closed form. There are also some ways to change the model in order to eliminate these problems, but this could introduce additional problems. The two issues are (1) derivative causality, and (2) algebraic loops. Both of these can be detected during causality assignment, so that a problem can be detected before too much time has been spent. The occurence of derivative causality can be described in bond graph terms using Table 9.7. The issue is one in which the state of an energy-storing element (I or C) is dependent on the system to which it is attached. This might not seem like a problem, particularly since this implies that no differential equation need be solved to find the state. It is necessary to see that there is still a need to compute the back-effect that the system will feel in forcing the element into a given state. For example, if a mass is to be driven by a velocity, V, then it is clear that we know the energy state, p = mV, so all is known. However, there is an inertial force computed as p˙ = mV˙ = ma. Many times, it is possible to resolve this problem by performing the algebraic manipulations required to include the effect of this element (difficulty depends on complexity of the system). Sometimes, these dependent states arise because the system is not modeled in sufficient detail, and by inserting a compliance between two gears, for example, the dependence is removed. This might solve the problem, costing only the introduction of an additional state. A more serious drawback to this approach would occur if the compliance was actually very small, so that numerical stiffness problems are introduced (with modern numerical solver routines, even this problem can be tolerated). Yet another way to resolve the problem of derivative causality in mechanical systems is to employ a Lagrangian approach for mechanical system modeling. This will be discussed in section 9.7. Another difficulty that can arise in developing solvable systems of equations is the presence of an algebraic loop. Algebraic loops are relatively easy to generate, especially in a block diagram modeling environment. Indeed, it is often the case that algebraic loops arise because of modeling decisions, and in this way a bond graph’s causality provides quick feedback regarding the system solvability. Algebraic loops imply that there is an arbitrary way to make computations in the model, and in this way they reveal 3 themselves when an arbitrary decision must be made in assigning causality to an R element. As an example, consider the basic model of a Thevenin source in Fig. 9.26(a). This model uses an effort source and a resistive element to model an effort-flow (steady-state) characteristic curve, such as a motor or engine torque-speed curve or a force-velocity curve for a linear actuator. A typical characteristic is shown in Fig. 9.26(b). When a resistive load is attached to this source as shown in Fig. 9.26(c), the model is purely algebraic. When the causality is assigned, note that after applying the effort causality on bond 1, there are two resistive elements remaining. The assignment of causality is arbitrary. The solution 3
The arbitrary assignment on an R element is not unlike the arbitrariness in assigning integral or derivative causality to energy-storing elements. An “arbitrary” decision to assign integral causality on an energy-storing element leads to a requirement that we solve a differential equation to find a state of interest. In the algebraic loop, a similar arbitary decision to assign a given causality on an R element implies that at least one algebraic equation must be solved along with any other system equations. In other words, the system is described by differential algebraic equations (DAEs). ©2002 CRC Press LLC
requires analytically solving algebraic relations for the operating point, or by using a graphical approach as shown in Fig. 9.26(d). This is a simple example indicating how algebraic loops are detected with a bond graph, and how the solution requires solving algebraic relations. In complex systems, this might be difficult to achieve. Sometimes it is possible to introduce or eliminate elements that are “parasitic,” meaning they normally would be neglected due to their relatively small effect. However, such elements can relieve the causal bind. While this might resolve the problem, as in the case of derivative causality there are cases where such a course could introduce numerical stiffness problems. Sometimes a solution is reached by using energy methods to resolve some of these problems, as shown in the next section.
9.5 Energy Methods for Mechanical System Model Formulation This section describes methods for using energy functions to describe basic energy-storing elements in mechanical systems, as well as a way to describe collections of energy-storing elements in multiport fields. Energy methods can be used to simplify model development, providing the means for deriving constitutive relations, and also as a basis for eliminating dependent energy storage (see last section). The introduction of these methods provides a basis for introducing the Lagrange equations in section 9.7 as a primary approach for system equation derivation or in combination with the bond graph formulation.
Multiport Models The energy-storing and resistive models introduced in section 9.3 were summarized in Tables 9.2, 9.4, and 9.5 as multiport elements. In this section, we review how multiport elements can be used in modeling mechanical systems, and outline methods for deriving the constitutive relations. Naturally, these methods apply to the single-port elements as well. An example of a C element with two-ports was shown in Fig. 9.12 as a model for a cantilevered beam that can have both translational and rotational deflections at its tip. A 2-port is required in this model because there are two independent ways to store potential energy in the beam. A distinguishing feature in this example is that the model is based on relationships between efforts and displacement variables (for this case of a capacitive element). Multiport model elements developed in this way are categorized as explicit fields to distinguish them from implicit fields [17]. Implicit fields are formed by assembling energystoring 1-port elements with junction structure (i.e., 1, 0, and TF elements) to form multiport models. Explicit fields are often derived using physical laws directly, relying on an understanding of how the geometric and material properties affect the basic constitutive relation between physical variables. Geometry and material properties always govern the parametric basis of all constitutive relations, and for some cases these properties may themselves be functions of state. Indeed, these cases require the multiport description, which finds extensive use in modeling of many practical devices, especially sensors and actuators. Multiport models should follow a strict energetic basis, as described in the following.
Restrictions on Constitutive Relations Energy-storing multiports must follow two basic restrictions, which are also useful in guiding the derivation of energetically-correct constitutive relations. The definition of the energy-storing descriptions summarized in Tables 9.4 and 9.5 specifies that there exists an energy state function, E = E(x), where x is either a generalized displacement, q, for capacitive (C) elements or a generalized momentum, p, for inertive (I) elements. For the multiport energy-storing element, the specification requires the following specifications [2,3]. 1. There exists a rate law, x˙ i = ui, where ui as input specifies integral causality on port i. 2. The energy stored in a multiport is determined by n
E (x) =
∫ ∑ y dxxi i
i=1
©2002 CRC Press LLC
(9.5)
3. A first restriction on a multiport constitutive relation requires that the causal output at any port is given by
∂E ( x ) y i = Φ si ( x ) = ------------∂x i
(9.6)
where Fsi() is a single-valued function. 4. A second restriction on a multiport constitutive relation requires that the constitutive relations obey Maxwell reciprocity, or 2 ∂y ∂y ∂ E(x) -------i = ---------------- = -------j ∂x j ∂x i ∂x j ∂x i
(9.7)
Deriving Constitutive Relations The first restriction on the constitutive relations, Eq. (9.6), establishes how constitutive relations can be derived for a multiport if an energy function can be formulated. This restriction forms the basis for a method used in many practical applications to find constitutive relationships from energy functions (e.g., strain-energy, electromechanics, etc.). In these methods, it is assumed that at least one of the constitutive relations for an energy-storing multiport is given. Then, the energy function is formed using Eq. (9.5) where, after interchanging the integral and sum, n
(x)
= ∑ ∫ y dx i
i
∫
=
y 1 dx 1 + º +
∫
y n dx
(9.8)
i=1
Presume that y1 is a known function of the states, y1 = Φsi(x). Since the element is conservative, any energetic state can be reached via a convenient path where dxi = 0 for all i except i = 1. This allows the determination of E(x). To illustrate, consider the simple case of a rack and pinion system, shown in Fig. 9.27. The pinion has rotational inertia, J, about its axis of rotation, and the rack has mass, m. The kinetic co-energy is easily formulated here, considering that the pinion angular velocity, ω , and the rack velocity, V, are constrained by the relationship V = Rω , where R is the pinion base radius. If this basic subsystem is modeled directly, it will be found that one of the inertia elements (pinion, rack) will be in derivative causality. Say, it is desired to connect to this system through the rotational port, T - ω. To form a single-port I element that 2 2 includes the rack, form the kinetic co-energy as T = T(ω , V) = Jω /2 + mV /2. Use the constraint relation 2 2 to write, T = T(ω ) = (J + mR )ω /2. To find the constitutive relation for this 1-port rotational I element, 2 2 let h = ∂ T(ω )/∂ω = (J + mR )ω , where we can now define an equivalent rotational inertia as Jeq = J + mR . Pinion Dependent
J T ω
T, ω Rack
(a)
I:m
I:J 1
ω
R T
V
1
I:Jeq T ω
T ω
1
I:Jeq
m (b)
(c)
FIGURE 9.27 (a) Rack and pinion subsystem with torque input. (b) Direct model, showing dependent mass. (c) Equivalent model, derived using energy principles.
©2002 CRC Press LLC
The rack and pinion example illustrates a basic method for relieving derivative causality, which can be used to build basic energy-storing element models. Some problems might arise when the kinetic coenergy depends on system configuration. In such a case, a more systematic method employing Lagrange’s equations may be more suitable (see Section 9.7). The approach described here for deriving constitutive relations is similar to Castigliano’s theorom [6,9]. Castigliano’s theorem relies on formulation of a strain-energy function in terms of the forces or moments, and as such employs a potential co-energy function. Specifically, the results lead to displacements (translational, rotational) as functions of efforts (forces, torques). As in the case above, these functions are found by taking partial derivatives of the co-energy with respect to force or moment. Castigliano’s theorem is especially well-suited for finding force-displacment functions for curved and angled beam structures (see [6]). Formulations using energy functions to derive constitutive relations are found in other application areas, and some references include Lyshevski [21] for electromechanics, and Karnopp, Margolis, and Rosenberg [17] for examples and applications in the context of bond graph modeling.
Checking the Constitutive Relations The second restriction on the constitutive relations, Eq. (9.7), provides a basis for testing or checking if the relationships are correct. This is a reciprocity condition that provides a check for energy conservation in the energy-storing element model, and a quick check for linear mechanical systems shows that either the inertia or stiffness matrix must be symmetrical. Recall the example of the 2-port cantilevered beam, shown again in Fig. 9.12. For small deflections, the total tip translational and angular deflections due to a tip force and torque can be added (using flexibility influence coefficients), which can be expressed in matrix form,
x θ
1 = ---EI
1 3 -3l
1 2 -2l
1 2 -2l
l
F T
F = C T
= K
F T
–1
where C and K are the compliance and stiffness matrices, respectively. This constitutive relation satisfies the Maxwell reciprocity since, ∂ x/∂ T = ∂θ /∂ F. This 2-port C element is used to model the system shown in Fig. 9.28(a), which consists of a bar-bell rigidly attached to the tip of the beam. Under small deflection, a bond graph shown in Fig. 9.28(b) is assembled. Causality applied to this system reveals that each port of the 2-port C element has integral causality. On a multiport energy storing element, each port is independently assigned causality following the same rules as for 1-ports. It is possible that a multiport could have a mixed causality, where some of the ports are in derivative causality. If a multiport has mixed causality, part of the state equations will have to be inverted. This algebraic difficulty is best avoided by trying to assign integral causality to all multiport elements in a system model if possible. In the present example, causality assignment on the I elements is also integral. In all, there are four independent energy-storing elements, so there are four state variables, x = [x, θ , p, h] . Four state equations can be derived using the rate laws indicated in Fig. 9.28.
m, J
x
θ (a)
m:I
p=F
1
F x=V
Cθ
T =ω
1
h =T
I:J
(b)
FIGURE 9.28 Model of beam rigidly supporting a bar- or dumb-bell: (a) schematic, (b) bond graph model using a 2-port C to represent beam. Dumb-bell is represented by translational mass, m, and rotational inertia, J. ©2002 CRC Press LLC
9.6 Rigid Body Multidimensional Dynamics The modeling of bodies in mechanical systems presumes adoption of a “rigid body” that can involve rotation as well as translation, and in this case the dynamic properties are more complex than those for a point mass. In earlier sections of this chapter, a simple rigid body has already been introduced, and it is especially useful for a large class of problems with rotation about a single fixed axis. In the rigid body, the distance between any two elements of mass within a body is a constant. In some cases, it is convenient to consider a continuous distribution of mass while in others a system of discrete mass particles rigidly fixed together helps conceptualize the problem. In the latter, the rigid body properties can be found by summing over all the discrete particles, while in the continuous mass concept an integral formulation is used. Either way, basic concepts can be formulated and relations derived for use in rigid body dynamic analysis. Finally, the modeling in most engineering systems is restricted to classical Newtonian mechanics, where the linear velocity–momentum relation holds (so energy and coenergy are equal).
Kinematics of a Rigid Body In this section, a brief overview is given of three-dimensional motion calculations for a rigid body. The focus here is to present methods for analyzing rotation of a rigid body about a fixed axis and methods for analyzing relative motion of a rigid body using translating and rotating axes. These concepts introduce the basis for understanding more complex formulations. While vector descriptions (denoted using an arrow over the symbol, a ) are useful for understanding basic problems, more complex multibody systems usually adopt a matrix formulation. The presentation here is brief and included for reference. A more extensive discussion and examples can be found in introductory dynamics textbooks (e.g., [23]), where a separate discussion is usually given on the special case of plane motion. Rotation of a Body About a Fixed Point Basic concepts are introduced here in relation to rotation of a rigid body about a fixed point. This basic motion specifies that any point on the body lies on the surface of a sphere with a radius centered at the fixed point. The body can be said to have spherical motion. Euler’s Theorem. Euler’s theorem states that any displacement of a body in spherical motion can be expressed as a rotation about a line that passes through the center of the spherical motion. This axis can be referred to as the orientational axis of rotation [26]. For example, two rotations about different axes passing through a fixed point of rotation are equivalent to a single resultant rotation about an axis passing through that point. Finite Rotations. If the rotations used in Euler’s theorem are finite, the order of application is important because finite rotations do not obey the law of vector addition. Infinitesimal Rotations. Infinitesimally small rotations can be added vectorially in any manner, and these are generally considered when defining rigid body motions. Angular Velocity. A body subjected to rotation dθ about a fixed point will have an angular velocity w defined by the time derivative dθ /dt, in a direction collinear with dθ . If the body is subjected to two component angular motions that define w 1 and w 2, then the body has a resultant angular velocity, w = w 1 + w 2. Angular Acceleration. A body’s angular acceleration is found from the time derivative of the angular velocity, α = ω , and in general the acceleration is not collinear with velocity. Motion of Points in the Body. Given ω , the velocity of a point on the body is v = ω × r , where r is a position vector to the point as measured relative to the fixed point of rotation. The acceleration of a point on the body is then, α = α × r + ω × ( ω × r). Relating Vector Time Derivatives in Coordinate Systems It is often the case that we need to determine the time rate of change of a vector such as A in Fig. 9.29 relative to different coordinate systems. Specifically, it may be easier to determine A in xa, ya, za, but we ©2002 CRC Press LLC
0066-frame-C09 Page 32 Friday, January 18, 2002 11:00 AM
za A
Ω zo
ya
^
ka ^
ja
^
ia xa O
yo
xo
FIGURE 9.29 Often it is necessary to find the time derivative of vector A relative to a axes, xo, yo, zo, given its value in the translating-rotating system xa, ya, za.
need to find its value in xo, yo, zo. The vector A is expressed in the axes xa, ya, za using the unit vectors shown as
A = A xˆi a + A yˆj a + A z kˆ a To find the time rate of change, we identify that in the moving reference the time derivative of A is
dA dA dA dA ------- = ---------x ˆi a + --------y ˆj a + --------z kˆ a dt a dt dt dt Relative to the xo, yo, zo axes, the direction of the unit vectors iˆa , ˆj a , and kˆ a change only due to rotation Ω, so,
dA dA diˆ djˆ dkˆ ------- = ------- + A x ------a + A y ------a + A z --------a dt dt dt dt dt diˆ djˆ dkˆ ------a = Ω × ˆi a , ------a = Ω × ˆj a , --------a = Ω × kˆ a dt dt dt then,
dA dA ------- = ------- + Ω × A dt dt a
(9.9)
This relationship is very useful not only for calculating derivatives, as derived here, but also for formulating basic bond graph models. This is shown in the section titled “Rigid Body Dynamics.” Motion of a Body Relative to a Coordinate System Translating Coordinate Axes The origin of a set of axes xa , ya , za is fixed in a rigid body at A as shown in Fig. 9.30(a), and translates without rotation relative to the axes xo , yo , zo with known velocity and acceleration. The rigid body is subjected to angular velocity ω and angular acceleration α in three dimensions. Motion of Point B Relative to A. The motion of point B relative to A is the same as motion about a fixed point, so v B/A = ω × v B/A , and a B/A = α × r B/A + ω × ( ω × r B/A). ©2002 CRC Press LLC
instantaneous axis of rotation
ω
za
za
B
rB/A rB/A
zo
vA
B
zo
rA ^
xa
ko yo
O
i^o xo
^
ja
ia
aA
O
A ^
α xa
ya
ka
rB
ya
A
Ω
^
yo
^
jo
xo
(b)
(a)
FIGURE 9.30 General rigid body motion: (a) rigid body with translating coordinate system, (b) translating and rotating coordinate system.
Motion of Point B Relative to O. For translating axes with no rotation, the velocity and acceleration of point B relative to system 0 is simply, v B = v A + v B/A and a B = a A + a B/A respectively, or,
v B = v A + ω × r B/A
(9.10)
aB = a A + α × r B/A + ω × ( ω × r B/A )
(9.11)
Translating and Rotating Coordinate Axes A general way of describing the three-dimensional motion of a rigid body uses a set of axes that can translate and rotate relative to a second set of axes, as illustrated in Fig. 9.30(b). Position vectors specify the locations of points A and B on the body relative to xo, yo, zo, and the axes xa, ya, za have angular · velocity Ω and angular acceleration Ω . With the position of point B given by
r B = r A + r B/A
(9.12)
the velocity and acceleration are found by direct differentiation as
v B = v A + Ω × r B /A + (v B/A ) a
(9.13)
and
B
˙ = a A + Ω × r B /A + Ω ¥ ( Ω × r B /A ) + 2Ω × (v B/A ) a + (a B/A )
(9.14)
where (vB/A)a and (aB/A)a are the velocity and acceleration, respectively, of B relative to A in the xa, ya, za coordinate frame. These equations are applicable to plane motion of the rigid body for which the analysis is simplified · · since Ω and Ω have a constant direction. Note that for the three-dimensional case, Ω must be computed by using Eq. (9.9). ©2002 CRC Press LLC
0066-frame-C09 Page 34 Friday, January 18, 2002 11:00 AM
Matrix Formulation and Coordinate Transformations A vector in three-dimensional space characterized by the right-handed reference frame xa, ya, za, A = A x iˆa + A y jˆa + A z kˆ a , can be represented as an ordered triplet,
Ax A = Ay Az
= Ax Ay Az
T a
a
where the elements of the column vector represent the vector projections on the unit axes. Let A a denote the column vector relative to the axes xa, ya, za. It can be shown that the vector A can be expressed in another right-handed reference frame xb, yb, zb, by the transformation relation
A b = C ab A a
(9.15)
cx a x b cx a y b cx a z b C ab = cy a x b cy a y b cy a z b
(9.16)
where C ab is a 3 × 3 matrix,
cz a x b
cz a y b
cz a z b
The elements of this matrix are the cosines of the angles between the respective axes. For example, cza yb is the cosine of the angle between za and yb . This is the rotational transformation matrix and it must be orthogonal, or T
–1
C ab = C ab = C ba and for right-handed systems, let Cab = +1. Angle Representations of Rotation The six degrees of freedom needed to describe general motion of a rigid body are characterized by three degrees of freedom each for translation and for rotation. The focus here is on methods for describing rotation. Euler’s theorem (11) confirms that only three parameters are needed to characterize rotation. Two parameters define an axis of rotation and another defines an angle about that axis. These parameters define three positional degrees of freedom for a rigid body. The three rotational parameters help construct a rotation matrix, C . The following discussion describes how the rotation matrix, or direction cosine matrix, can be formulated. General Rotation. Unit vectors for a system a, uˆ a , are said to be carried into b, as uˆ b = C bauˆ a . It can be shown that a direction cosine matrix can be formulated by [30]
C = λλ + (E – λλ ) cos ψ – S ( λ ) sin ψ T
T
(19.17)
where E is the identity matrix, and λ represents a unit vector, λ = [λ1, λ2, λ3] , which is parallel to the axis of rotation, and ψ is the angle of rotation about that axis [30]. In this relation, S ( λ ) is a skewsymmetric matrix, which is defined by the form T
S(λ) =
©2002 CRC Press LLC
0
–λ3
λ3 –λ2
0
λ1
λ2 –λ1 0
0066-frame-C09 Page 35 Friday, January 18, 2002 11:00 AM
za
zb ψ
yb ψ
FIGURE 9.31 axis x.
An elementary rotation by angle φ about xa
ya
O
ψ
xb
The matrix elements of C can be found by expanding the relation given above, using S (λ), to give
( 1 – cos ψ ) λ 1 + cos ψ 2
C = ( 1 – cos ψ ) λ 2 λ 1 + λ 3 sin ψ
( 1 – cos ψ ) λ 1λ 2 + λ 3 sin ψ
( 1 – cos ψ ) λ 1λ 3 + λ 2 sin ψ
( 1 – cos ψ ) λ + cos ψ
( 1 – cos ψ ) λ 2λ 3 + λ 1 sin ψ
2 2
( 1 – cos ψ ) λ 3λ 1 + λ 2 sin ψ ( 1 – cos ψ ) λ 3λ 2 + λ 1 sin ψ
(9.18)
( 1 – cos ψ )λ + cos ψ 2 3
The value of this formulation is in identifying that there are formally defined principle axes, characterized by the λ , and angles of rotation, ψ, that taken together define the body orientation. These rotations describe classical angular variables formed by elementary (or principle) rotations, and it can be shown that there are two cases of particular and practical interest, formed by two different axis rotation sequences. Elementary Rotations. Three elementary rotations are formed when the rotation axis (defined by the eigenvector) coincides with one of the base vectors of a defined coordinate system. For example, letting λ = [1, 0, 0]T define an axis of rotation x, as in Fig. 9.31, with an elementary rotation of φ gives the rotation matrix,
1 0 C x,φ = 0 cos φ 0 – sin φ
0 sin φ cos φ
The two elementary rotations about the other two axes, y and z, are
C y,θ =
cos θ 0 – sin θ 0 1 0 sin θ 0 cos θ
and
cos ψ C z,ψ = – sin ψ 0
sin ψ 0 cos ψ 0 0 1
These three elementary rotation matrices can be used in sequence to define a direction cosine matrix, for example,
C = C z,ψ C y,θ C x,φ and the elementary rotations and the direction cosine matrix are all orthogonal; i.e.,
C C
T
T
= C C= E
where E is the identity matrix. Consequently, the inverse of the rotation or coordinate transformation −1 T matrix can be found by C = C . ©2002 CRC Press LLC
0066-frame-C09 Page 36 Friday, January 18, 2002 11:00 AM
z, za
ya y φ x
xa (a)
z
z
ya za
za , zb
θ
xb
y x
φ
x
y
φ
xa
xa
(b)
FIGURE 9.32
ya
yb θ
(c)
The rotations defining the Euler angles (adapted from Goldstein [11]).
It can be shown that there exist two sequences that have independent rotation sequences, and these lead to the well known Euler angle and Tait-Bryan or Cardan angle rotation descriptions [30]. Euler Angles. Euler angles are defined by a specific rotation sequence. Consider a right-handed axes system defined by the base vectors, x, y, z, as shown in Fig. 9.32(a). The rotation sequence of interest involves rotations about the axes in the following sequence: (1) φ about z, (2) θ about xa, then (3) ψ about zb . This set of rotation sequences is defined by the elementary rotation matrices,
cos φ C z,φ = – sin φ 0
sin φ 0 cos φ 0 , 0 1
1 0 C xa,θ = 0 cos θ 0 – sin θ
0 sin θ , cos θ
cos ψ C zb,ψ = – sin ψ 0
sin ψ 0 cos ψ 0 0 1
where the subscript on each C denotes the axis and angle of rotation. Using these transformations relates the quantity A in x, y, z to A b in xb , yb , zb , or
A b = C Euler A = C zb,ψ C xa,θ C z,φ A where C Euler is given by
C Euler =
cos ψ cos φ – sin ψ cos θ sin φ – sin ψ cos φ – cos ψ cos θ sin φ sin θ sin φ
cos ψ sin φ + sin ψ cos θ cos φ – sin ψ sin φ + cos ψ cos θ cos φ – sin θ cos φ
sin ψ sin θ cos ψ sin θ cos θ
(9.19)
Since C Euler is orthogonal, transforming between the two coordinate systems is relatively easy since the inverse can be found simply by the transpose of Eq. (9.19). In some applications, it is desirable to derive the angles given the direction cosine matrix. So, if the (3,3) element of C Euler is given, then θ is easily found, but there can be difficulties in discerning small angles. Also, if θ goes to zero, there is a singularity in solving for φ and ψ , so determining body orientation becomes difficult. The problem also makes itself known when transforming angular velocities between the coordinate systems. If the problem at hand avoids this case (i.e., θ never approaches zero), then Euler angles are a viable solution. Many applications that cannot tolerate this problem adopt other representations, such as the Euler parameters to be discussed later. ©2002 CRC Press LLC
0066-frame-C09 Page 37 Friday, January 18, 2002 11:00 AM
In classical rigid body dynamics, φ is called the precession angle, θ is the nutation angle, and ψ is the T spin angle. The relationship between the time derivative of the Euler angles, ϕ˙ = [ φ˙ , θ˙ , ψ˙ ] , and the T body angular velocity, ω = [ωx , ωy , ωz] b , is given by [11]
ω b = T ( ϕ ) ϕ˙
(9.20)
where the transformation matrix, T (ϕ ), is given by
sin θ sin ψ cos ψ 0 T ( ϕ ) = sin θ cos ψ – sin ψ 0 cos θ 0 1 Note here again that T (ϕ ) will become singular at θ = ±π /2. Tait-Bryan or Cardan Angles. The Tait-Bryan or Cardan angles are formed when the three rotation sequences each occur about a different axis. This is the sequence preferred in flight and vehicle dynamics. Specifically, these angles are formed by the sequence: (1) φ about z (yaw), (2) θ about ya (pitch), and (3) φ about the final xb axis (roll), where a and b denote the second and third stage in a three-stage sequence or axes (as used in the Euler angle description). These rotations define a transformation,
A b = C A = C xb,ψ C ya,θ C z,φ A where
cos φ C z,φ = – sin φ 0
sin φ 0 cos φ 0 , 0 1
C ya, θ =
cos θ 0 – sin θ , 0 1 0 sin θ 0 cos θ
1 0 C xb,θ = 0 cos ψ 0 – sin ψ
0 sin ψ cos ψ
and the final coordinate transformation matrix for Tait-Bryan angles is
cos θ cos φ C Tait-Bryan = sin ψ sin θ cos φ – cos ψ sin φ cos ψ sin θ cos φ + sin ψ sin φ
cos θ sin φ sin ψ sin θ sin φ + cos ψ cos φ cos ψ sin θ sin φ – sin ψ cos φ
– sin θ cos θ sin ψ cos θ cos ψ
(9.21)
A linearized form of C Trait-Bryan gives a form preferred to that derived for Euler angles, making it useful in some forms of analysis and control. There remains the problem of a singularity, in this case when θ approaches ±π /2. For the Tait-Bryan angles, the transformation matrix relating ϕ˙ to ω b is given by
– sin θ 0 1 T ( ϕ ) = cos θ sin ψ cos ψ 0 cos θ cos ψ – sin ψ 0 which becomes singular at θ = 0, π . Euler Parameters and Quaternions The degenerate conditions in coordinate transformations for Euler and Tait-Bryan angles can be avoided by using more than a minimal set of parameterizing variables (beyond the three angles). The most notable ©2002 CRC Press LLC
0066-frame-C09 Page 38 Friday, January 18, 2002 11:00 AM
set are referred to as Euler parameters, which are unit quaternions. There are many other possibilities, but this four-parameter method is used in many areas, including spacecraft/flight dynamics, robotics, and computational kinematics and dynamics. The term “quaternion” was coined by Hamilton in about 1840, but Euler himself had devised the use of Euler parameters 70 years before. Quaternions are discussed by Goldstein [11], and their use in rigid body dynamics and attitude control dates back to the late 1950s and early 1960s [13,24]. Application of quaternions is common in control applications in aerospace applications [38] as well as in ocean vehicles [10]. More recently (past 20 years or so), these methods have found their way into motion and control descriptions for robotics [34] and computational kinematics and dynamics [14,25,26]. An overview of quaternions and Euler parameters is given by Wehage [37]. Quaternions and rotational sequences and their role in a wide variety of applications areas, including sensing and graphics, are the subject of the book by Kuipers [19]. These are representative references that may guide the reader to an application area of interest where related studies can be found. In the following only a brief overview is given. Quaternion. A quaternion is defined as the sum of a scalar, q0, and a vector, q , or,
q = q 0 + q = q 0 + q 1 iˆ + q 2 jˆ + q 3 kˆ A specific algebra and calculus exists to handle these types of mathematical objects [7,19,37]. The conjugate is defined as q = q 0 – q. Euler Parameters. Euler parameters are normalized (unit) quaternions, and thus share the same properties, algebra and calculus. A principal eigenvector of rotation has an eigenvalue of 1 and defines the Euler axis of rotation (see Euler’s theorem discussion and [11]), with angle of rotation α. Let this T eigenvector be e = [e1, e2, e3] . Recall from Eq. (9.17), the direction cosine matrix is now
C = ee T + ( I – ee T ) cos α − S ( e ) sin α where S ( e ) is a skew-symmetric matrix. The Euler parameters are defined as
cos ( α /2 ) e 1 sin ( α /2 )
q0 q1
q =
=
q2
e 2 sin ( α /2 ) e 3 sin ( α /2 )
q3 where 2
2
2
2
q0 + q1 + q2 + q3 = 1 Relating Quaternions and the Coordinate Transformation Matrix. The direction cosine matrix in terms of Euler parameters is now T
T
2
C q = ( q 0 – q q ) E + 2qq − 2q0 S ( q ) T
where q = [q1, q2, q3] , and E is the identity matrix. The direction cosine matrix is now written in terms of quaternions 2
2
2
2
q0 + q1 – q2 – q3
©2002 CRC Press LLC
2 ( q1 q2 + q3 q0 )
C q = 2 ( q1 q2 – q3 q0 )
q –q +q –q
2 ( q1 q3 + q2 q0 )
2 ( q1 q2 + q3 q0 )
2 0
2 1
2 2
2 3
2 ( q1 q3 – q2 q4 ) 2 ( q2 q3 + q1 q4 ) 2
2
2
2
q0 – q1 – q2 + q3
0066-frame-C09 Page 39 Friday, January 18, 2002 11:00 AM
It is possible to find the quaternions and the elements of the direction cosine matrix independently by integrating the angular rates about the principal axes of a body. Given the direction cosine matrix elements, we can find the quaternions, and vice versa. For a more extended discussion and application, the reader is referred to the listed references.
Dynamic Properties of a Rigid Body Inertia Properties The moments and products of inertia describe the distribution of mass for a body relative to a given coordinate system. This description relies on the specific orientation and reference frame. It is presumed that the reader is familiar with basic properties such as mass center, and the focus here is on those properties essential in understanding the general motion of rigid bodies, and particularly the rotational dynamics. Moment of Inertia. For the rigid body shown in Fig. 9.33(a), the moment of inertia for a differential element, dm, about any of the three coordinate axes is defined as the product of the mass of the differential element and the square of the shortest distance from the axis to the element. As shown, r x = y 2 + z 2 , so the contribution to the moment of inertia about the x-axis, Ixx, from dm is 2
2
2
dI xx = r x = ( y + z )dm The total Ixx , Iyy , and Izz are found by integrating these expressions over the entire mass, m, of the body. In summary, the three moments of inertia about the x, y, and z axes are
I xx =
∫
r x dm =
I yy =
∫
r y dm =
I zz =
∫
r z dm =
m
m
m
2
2
2
∫
( y + z ) dm
∫
( x + z ) dm
∫
( x + y ) dm
m
m
m
2
2
2
2
2
2
(9.22)
Note that the moments of inertia, by virtue of their definition using squared distances and finite mass elements, are always positive quantities.
za
z
dm z
O rx
G
x
zG
xa
O yG
(a)
ya
y
x
xG
y
(b)
FIGURE 9.33 Rigid body properties are defined by how mass is distributed throughout the body relative to a specified coordinate system. (a) Rigid body used to describe moments and products of inertia. (b) Rigid body and axes used to describe parallel-axis and parallel-plane theorem.
©2002 CRC Press LLC
0066-frame-C09 Page 40 Friday, January 18, 2002 11:00 AM
Product of Inertia. The product of inertia for a differential element dm is defined with respect to a set of two orthogonal planes as the product of the mass of the element and the perpendicular (or shortest) distances from the planes to the element. So, with respect to the y − z and x − z planes (z common axis to these planes), the contribution from the differential element to Ixy is dIxy and is given by dIxy = xydm. As for the moments of inertia, by integrating over the entire mass of the body for each combination of planes, the products of inertia are
I xy = I yx =
∫
xy dm
I yz = I zy =
∫
yz dm
I xz = I zx =
∫
m
(9.23)
m
xz dm
m
The product of inertia can be positive, negative, or zero, depending on the sign of the coordinates used to define the quantity. If either one or both of the orthogonal planes are planes of symmetry for the body, the product of inertia with respect to those planes will be zero. Basically, the mass elements would appear as pairs on each side of these planes. Parallel-Axis and Parallel-Plane Theorems. The parallel-axis theorem can be used to transfer the moment of inertia of a body from an axis passing through its mass center to a parallel axis passing through some other point (see also the section “Kinetic Energy Storage”). Often the moments of inertia are known for axes fixed in the body, as shown in Fig. 9.33(b). If the center of gravity is defined by the coordinates (xG , yG , zG ) in the x, y, z axes, the parallel-axis theorem can be used to find moments of inertia relative to the x, y, z axes, given values based on the body-fixed axes. The relations are 2
2
2
2
2
2
I xx = ( I xx ) a + m ( y G + z G ) I yy = ( I yy ) a + m ( x G + z G ) I zz = ( I zz ) a + m ( x G + y G ) where, for example, (Ixx)a is the moment of inertia relative to the xa axis, which passes through the center of gravity. Transferring the products of inertia requires use of the parallel-plane theorem, which provides the relations
I xy = ( I xy ) a + mx G y G I yz = ( I yz ) a + my G z G I zx = ( I zx ) a + mz G x G Inertia Tensor. The rotational dynamics of a rigid body rely on knowledge of the inertial properties, which are completely characterized by nine terms of an inertia tensor, six of which are independent. The inertia tensor is
I xx – I xy – I xz I = –I I yy – I yz yx – I zx – I zy
©2002 CRC Press LLC
I zz
0066-frame-C09 Page 41 Friday, January 18, 2002 11:01 AM
ω i z
VA
G ρA A
rA O y
FIGURE 9.34 Rigid body in general motion relative to an inertial coordinate system, x, y, z.
x
and it relies on the specific location and orientation of coordinate axes in which it is defined. For a rigid body, an origin and axes orientation can be found for which the inertia tensor becomes diagonalized, or
Ix 0 I = 0 Iy
0
0
Iz
0
0
The orientation for which this is true defines the principal axes of inertia, and the principal moments of inertia are now Ix = Ixx , Iy = Iyy , and Iz = Izz (one should be a maximum and another a minimum of the three). Sometimes this orientation can be determined by inspection. For example, if two of the three orthogonal planes are planes of symmetry, then all of the products of inertia are zero, so this would define principal axes of inertia. The principal axes directions can be interpreted as an eigenvalue problem, and this allows you to find the orientation that will lead to principal directions, as well as define (transform) the inertia tensor into any orientation. For details on this method, see Crandall et al. [8]. Angular Momentum For the rigid body shown in Fig. 9.34, conceptualized to be composed of particles, i, of mass, mi , the angular momentum about the point A is defined as
( hA )i = ρA × mi Vi where V i is the velocity measured relative to the inertial frame. Since V i = V A + ω × ρ A , then
( hA )i = ρA × mi Vi = mi ρA × VA + mi ρA × ( ω × ρA ) Integrating over the mass of the body, the total angular momentum of the body is
hA = (
∫
m
ρ A dm ) × V A + ∫ ρ A × ( ω × ρ A ) dm
(9.24)
m
This equation can be used to find the angular momentum about a point of interest by setting the point A: (1) fixed, (2) at the center of mass, and (3) an arbitrary point on the mass. A general form arises in cases 1 and 2 that take the form
h =
©2002 CRC Press LLC
∫
m
ρ × (ω × ρ ) dm
0066-frame-C09 Page 42 Friday, January 18, 2002 11:01 AM
When this form is expanded for either case into x, y, z components, then
h = h x iˆ + h y ˆj + h z kˆ =
∫
m
( xiˆ + yjˆ + zkˆ ) × [ ( ω x iˆ + ω yˆj + ω z kˆ ) × ( xiˆ + yjˆ + zkˆ ) ] dm
which can be expanded to
h x iˆ + h y ˆj + h z kˆ = ω x
∫
( y + z ) dm – ω y 2
m
2
∫
m
xy dm – ω z
∫
= –ωx
∫
xy dm + ω y
∫
( x + z ) dm – ω z
= –ωx
∫
xy dm – ω y
∫
zy dm – ω z
m
m
2
m
m
2
∫
m
xz dm iˆ
m
∫
m
yz dm jˆ
2 2 ( x + y ) dm kˆ
The expression for moments and products of inertia can be identified here, and then this expression leads to the three angular momentum components, written in matrix form
I xx – I xy – I xz h = – I yx I yy – I yz – I zx – I zy
I zz
ωx ω y = Iω ωz
(9.25)
Note that the case where principal axes are defined leads to the much simplified expression
h = I xx ω x iˆ + I yy ω yˆj + I zz ω z kˆ This shows that when the body rotates so that its axis of rotation is parallel to a principal axis, the angular momentum vector, h, is parallel to the angular velocity vector. In general, this is not true (this is related to the discussion at the end of the section “Inertia Properties”). The angular momentum about an arbitrary point, Case 3, is the resultant of the angular momentum about the mass center (a free vector) and the moment of the translational momentum through the mass center,
p = mV x iˆ + mV y jˆ + mV z kˆ = mV or
h = hG + r × p where r is the position vector from the arbitary point of interest to the mass center, G. This form can also be expanded into its component forms, as in Eq. (9.25). Kinetic Energy of a Rigid Body Several forms of the kinetic energy of a rigid body are presented in this section. From the standpoint of a bond graph formulation, where kinetic energy storage is represented by an I element, Eq. (9.25) demonstrates that the rigid body has at least three ports for rotational energy storage. Adding the three translational degrees of freedom, a rigid body can have up to six independent energy storage “ports.” ©2002 CRC Press LLC
0066-frame-C09 Page 43 Friday, January 18, 2002 11:01 AM
A 3-port I element can be used to represent the rotational kinetic energy for the case of rotation about a fixed point (no translation). The constitutive relation is simply Eq. (9.25). The kinetic energy is then
1 T = -- ω ⋅ h 2 where h is the angular momentum with an inertia tensor defined about the fixed point. If the axes are aligned with principal axes, then
1 1 2 1 2 2 T = --I x ω x + --I y ω y + --I z ω z 2 2 2 The total kinetic energy for a rigid body that can translate and rotate, with angular momentum defined with reference to the center of gravity, is given by
1 1 2 T = --mVG + -- ω ⋅ hG 2 2 2
2
2
2
where VG = V x + V y + V z .
Rigid Body Dynamics Given descriptions of inertial properties, translational and angular momentum, and kinetic energy of a rigid body, it is possible to describe the dynamics of a rigid body using the equations of motion using Newton’s laws. The classical Euler equations are presented in this section, and these are used to show how a bond graph formulation can be used to integrate rigid body elements into a bond graph model. Basic Equations of Motion The translational momentum of the body in Fig. 9.30 is p = mV , where m is the mass, and V is the velocity of the mass center with three components of velocity relative to the inertial reference frame xo , yo , zo . In three-dimensional motion, the net force on the body is related to the rate of change of momentum by Newton’s law, namely,
d F = ----- p dt which can be expressed as (using Eq. (9.9)),
∂p F = ------ + Ω × p ∂ t rel with p now relative to the moving frame xa , ya , za , and Ω is the absolute angular velocity of the rotating axes. A similar expression can be written for rate of change of the angular momentum, which is related to applied torques T by
∂h T = -----∂t where h is relative to the moving frame xa , ya , za . ©2002 CRC Press LLC
+Ω×h rel
0066-frame-C09 Page 44 Friday, January 18, 2002 11:01 AM
In order to use these relations effectively, the motion of the axes xa , ya , za , must be chosen to fit the problem at hand. This choice usually comes down to three cases described by how Ω relates to the body angular velocity ω . 1. Ω = 0. If the body has general motion and the axes are chosen to translate with the center of mass, then this case will lead to a simple set of equations with Ω = 0, although it will be necessary to describe the inertia properties of the body as functions of time. 2. Ω ≠ 0 ≠ ω . In this case, axes have an angular velocity different from that of the body, a form convenient for bodies that are symmetrical about their spinning axes. The moments and products of inertia will be constant relative to the rotating axes. The equations become
F x = mV˙ x – mV y Ω z + mV z Ω y F y = mV˙ y – mV z Ω x + mV x Ω z F z = mV˙ z – mV x Ω y + mV y Ω x T x = I x ω˙ x – I y ω y Ω z + I z Ω y ω z
(9.26)
T y = I y ω˙ y – I z ω z Ω x + I x Ω z ω x T z = I z ω˙ z – I x ω x Ω y + I y Ω x ω y 3. Ω = ω . Here the axes are fixed and moving with the body. The moments and products of intertia relative to the moving axes will be constant. A particularly convenient case arises if the axes are chosen to be the principal axes of inertia (see the section titled “Inertia Properties”), which leads 4 to the Euler equations,
F x = mV˙ x – mV y ω z + mV z ω y F y = mV˙ y – mV z ω x + mV x ω z F z = mV˙ z – mV x ω y + mV y ω x T x = I x ω˙ x – ( I y – I z ) ω y ω z
(9.27)
T y = I y ω˙ y – ( I z – I x ) ω z ω x T z = I z ω˙ z – ( I x – I y ) ω x ω y These equations of motion can be used to determine the forces and torques, given motion of the body. Textbooks on dynamics [12,23] provide extensive examples on this type of analysis. Alternatively, these can be seen as six nonlinear, coupled ordinary differential equations (ODEs). Case 3 (the Euler equations) could be solved in such a case, since these can be rewritten as six first-order ODEs. A numerical solution may need to be implemented. Modern computational software packages will readily handle these equations, and some will feature a form of these equations in a form suitable for immediate use. Case 2 requires knowledge of the axes’ angular velocity, Ω . If the rotational motion is coupled to the translational motion such that the forces and torques, say, are related, then a dynamic model is required. In some, it may be desirable to formulate the problem in a bond graph form, especially if there are actuators and sensors and other multienergetic systems to be incorporated. 4
First developed by the Swiss mathematician L. Euler.
©2002 CRC Press LLC
0066-frame-C09 Page 45 Friday, January 18, 2002 11:01 AM
z
mVyωz
I:m
y
Fx
px Vx
mωz
1 mVz ωy
mVyωz
mVxωz
Vy
x
(a)
Vx G
(c)
(b)
FIGURE 9.35 (a) Rigid body with angular velocity components about x, y, z axes. (b) x-direction translational dynamics in bond graph form. (c) Gyrator realization of coupling forces.
I:Ix
I:m Fx mωz
Vx
G
G
FIGURE 9.36
1
G
G
hy
Ty
Fz 1
I:m
hz
mωy
Fy Vy
ωx
Tx
1
Tz
G
1
1
G
mωx
Vz
ωy
hx
I:m
I:Iy
Translational
Rotational
(a)
(b)
1
ωz
I:Iz
(a) Bond graph for rigid body translation. (b) Bond graph for rigid body rotation.
Rigid Body Bond Graph Formulation Due to the body’s rotation, there is an inherent coupling of the translational and rotational motion, which can be summarized in a bond graph form. Consider the case of Euler’s equations, given in Eqs. (9.27). For the x-direction translational dynamics,
F x = p˙x – mV y ω z + mV z ω y where px = mVx , and Fx is the net “external” applied forces in the x-direction. This equation, a summation of forces (efforts) is represented in bond graph form in Fig. 9.35(b). All of these forces are applied at a common velocity, Vx , represented by the 1-junction. The I element represents the storage of kinetic energy in the body associated with motion in the x-direction. The force mVyωz in Fig. 9.35(b) is induced by the y-direction velocity, Vy , and by the angular velocity component, ωz . This physical effect is gyrational in nature, and can be captured by the gyrator, as shown in Fig. 9.35(c). Note that this is a modulated gyrator (could also be shown as MGY) with a gyrator modulus of r = mωz (verify that the units are force). The six equations of motion, Eqs. (9.27), can be represented in bond graph form as shown in Fig. 9.36. Note that these two bond graph ring formations, first shown by Karnopp and Rosenberg [18], capture the Euler equations very efficiently and provide a graphical mnemonic for rigid body motion. Indeed, Euler’s equations can now be “drawn” simply in the following steps: (1) lay down three 1-junctions representing angular velocity about x, y, z (counter clockwise labeling), with I elements attached, (2) between each 1-junction place a gyrator, modulated by the momentum about the axis represented by the ©2002 CRC Press LLC
0066-frame-C09 Page 46 Friday, January 18, 2002 11:01 AM
ωz I:Ix Tx
x side view
hz
back view
y z
FIGURE 9.37
hzωy
z Induced torque
hx ωx
Ty hy
1
G
ωy
hyωz hy G Tz
ωz
1
G
ωy
hx
1
ωz
I:Iy
I:Iz
A cart with a rigid and internally mounted flywheel approaches a ramp.
1-junction directly opposite in the triangle, (3) draw power arrows in a counter clockwise direction. This sketch will provide the conventional Euler equations. The translational equations are also easily sketched. These bond graph models illustrate the inherent coupling through the gyrator modulation. There are six I elements, and each can represent an independent energetic state in the form of the momenta [px , py , pz , hx , hy , hz ] or alternatively the analyst could focus on the associated velocities [Vx , Vy , Vz , ωx , ωy , ωz ]. If forces and torques are considered as inputs, through the indicated bonds representing Fx , Fy , Fz , Tx , Ty , Tz , then you can show that all the I elements are in integral causality, and the body will have six independent states described by six first-order nonlinear differential equations. Example: Cart-Flywheel A good example of how the rigid body bond graphs represent the basic mechanics inherent to Eqs. (9.27) and of how the graphical modeling can be used for “intuitive” gain is shown in Fig. 9.37. The flywheel is mounted in the cart, and spins in the direction shown. The body-fixed axes are mounted in the vehicle, with the convention that z is positive into the ground (common in vehicle dynamics). The cart approaches a ramp, and the questions which arise are whether any significant loads will be applied, what their sense will be, and on which parameters or variables they are dependent. The bond graph for rotational motion of the flywheel (assume it dominates the problem for this example) is shown in Fig. 9.37. If the flywheel momentum is assumed very large, then we might just focus on its effect. At the 1-junction for ωx , let Tx = 0, and since ωz is spinning in a negative direction, you can see that the torque hzωy is applied in a positive direction about the x-axis. This will tend to “roll” the vehicle to the right, and the wheels would feel an increased normal load. With the model shown, it would not be difficult to develop a full set of differential equations. Need for Coordinate Transformations In the cart-flywheel example, it is assumed that as the front wheels of the cart lift onto the ramp, the flywheel will react because of the direct induced motion at the bearings. Indeed, the flywheel-induced torque is also transmitted directly to the cart. The equations and basic bond graphs developed above are convenient if the forces and torques applied to the rigid body are moving with the rotating axes (assumed to be fixed to the body). The orientational changes, however, usually imply that there is a need to relate the body-fixed coordinate frames or axes to inertial coordinates. This is accomplished with a coordinate transformation, which relates the body orientation into a frame that makes it easier to interpret the motion, apply forces, understand and apply measurements, and apply feedback controls. Example: Torquewhirl Dynamics Figure 9.38(a) illustrates a cantilevered rotor that can exhibit torquewhirl. This is a good example for illustrating the need for coordinate transformations, and how Euler angles can be used in the modeling process. The whirling mode is conical and described by the angle θ. There is a drive torque, Ts , that is ©2002 CRC Press LLC
0066-frame-C09 Page 47 Friday, January 18, 2002 11:01 AM
φ
ω z,b
ωs z, z a
ψ
Bearing axis
I:Ix
zb
0 x xa
θ
ωx
Tx
φ yb
ψ
φ ψ y
θ
Driving or shaft torque (aligned with z)
G
G
hy
Ty
ya
Τs
xb
hz
1
All mass assumed concentrated at rotor.
ψ
1 T L
Tz 1
G
ωy
hx
I:Iy
1
ωz
Load torque model
I:Iz
Load torque
Whirling mode of disk is described by θ. Disk center, C
ωz
ΤL
(a)
(b)
FIGURE 9.38 (a) Cantilevered rotor with flexible joint and rigid shaft (after Vance [36]). (b) Bond graph representing rigid body rotation of rotor.
aligned with the bearing axis, z, where x, y, z is the inertial coordinate frame. The bond graph in Fig. 9.38(b) captures the rigid body motion of the rotor, represented in body-fixed axes xb , yb , zb , which represent principal axes of the rotor. The first problem seen here is that while the bond graph leads to a very convenient model formulation, the applied torque, Ts, is given relative to the inertial frame x, y, z. Also, it would be nice to know how the rotor moves relative to the inertial frame, since it is that motion that is relevant. Other issues arise, including a stiffness of the rotor that is known relative to the angle θ. These problems motivate the use of Euler angles, which will relate the motion in the body fixed to the inertial frame, and provide three additional state equations for φ, θ, and ψ (which are needed to quantify the motion). In this example, the rotation sequence is (1) x, y, z (inertial) to xa, yb, zc, with φ about the z-axis, so note, φ˙ = ωs , (2) xa , ya , za to xb , yb , zb , with θ about xa, (3) ψ rotation about zb . Our main interest is in the overall transformation from x, y, z (inertia) to xb , yb , zb (body-fixed). In this way, we relate the body angular velocities to inertial velocities using the relation from Eq. (9.20),
ωx ωy ωz
φ˙ sin θ sin ψ + θ˙ cos ψ = φ˙ sin θ cos ψ – θ˙ sin ψ b
φ˙ cos θ + ψ˙
where the subscript b on the left-hand side denotes velocities relative to the xb , yb , zb axes. A full and complete bond graph would include a representation of these transformations (e.g., see Karnopp, Margolis, and Rosenberg [17]). Explicit 1-junctions can be used to identify velocity junctions at which torques and forces are applied. For example, at a 1-junction for φ˙ = ωz, the input torque Ts is properly applied. Once the bond graph is complete, causality is applied. The preferred assignment that will lead to integral causality on all the I elements is to have torques and forces applied as causal inputs. Note that in transforming the expression above which relates the angular velocities, a problem with Euler angles arises related to the singularity (here at θ = π /2, for example). An alternative way to proceed in the analysis is using a Lagrangian approach as in Section 9.7, as done by Vance [36] (see p. 292). Also, for advanced multibody systems, a multibond formulation can be more efficient and may provide insight into complex problems (see Breedveld [4] or Tiernego and Bos [35]).
©2002 CRC Press LLC
0066-frame-C09 Page 48 Friday, January 18, 2002 11:01 AM
9.7 Lagrange’s Equations The discussion on energy methods focuses on deriving constitutive relations for energy-storing multiports, and this can be very useful in some modeling exercises. For some cases where the constraint relationships between elements are primarily holonomic, and definitely scleronomic (not an explicit function of time), implicit multiport fields can be formulated (see Chapter 7 of [17]). The principal concern arises because of dependent energy storage, and the methods presented can be a solution in some practical cases. However, there are many mechanical systems in which geometric configuration complicates the matter. In this section, Lagrange’s equations are introduced to facilitate analysis of those systems. There are several ways to introduce, derive, and utilize the concepts and methods of Lagrange’s equations. The summary presented below is provided in order to introduce fundamental concepts, and a thorough derivation can be found either in Lanczos [20] or Goldstein [11]. A derivation using energy and power flow is presented by Beaman, Paynter, and Longoria [3]. Lagrange’s equations are also important because they provide a unified way to model systems from different energy domains, just like a bond graph approach. The use of scalar energy functions and minimal geometric reasoning is preferred by some analysts. It is shown in the following that the particular benefits of a Lagrange approach that make it especially useful for modeling mechanical systems enhance the bond graph approach. A combined approach exploits the benefits of both methods, and provides a methodology for treating complex mechatronic systems in a systematic fashion.
Classical Approach A classical derivation of Lagrange’s equations evolves from the concept of virtual displacement and virtual work developed for analyzing static systems (see Goldstein [11]). To begin with, the Lagrange equations can be derived for dynamic systems by using Hamilton’s principle or D’Alembert’s principle. For example, for a system of particles, Newton’s second law for the i mass, Fi = pi, is rewritten, Fi − (a) pi = 0. The forces are classified as either applied or constraint, Fi = F i + fi. The principle of virtual work is applied over the system, recognizing that constraint forces fi, do no work and will drop out. This leads to the D’Alembert principle [11],
∑ (F
(a) i
– p˙ i ) ⋅ δ r i = 0
(9.28)
i
The main point in presenting this relation is to show that: (a) the constraint forces do not appear in this formulative equation and (b) the need arises for transforming relationships between, in this case, the N coordinates of the particles, ri, and a set of n generalized coordinates, qi, which are independent of each other (for holonomic constraints), i.e.,
r i = r i(q 1, q 2, …, qn, t)
(9.29)
By transforming to generalized coordinates, D’Alembert’s principle becomes [11]
∑ j
d ∂T ∂T - ------- – ------- – Q j δ q j = 0 --- dt ∂ q˙j ∂ q j
(9.30)
where T is the system kinetic energy, and the Qj are components of the generalized forces given by
Qj =
∂ ri
∑ F ⋅ -----∂q i
i
©2002 CRC Press LLC
j
0066-frame-C09 Page 49 Friday, January 18, 2002 11:01 AM
If the transforming relations are restricted to be holonomic, the constraint conditions are implicit in the transforming relations, and independent coordinates are assured. Consequently, all the terms in Eq. (9.30) must vanish for independent virtual displacements, δ q j, resulting in the n equations:
d ∂T ∂T ----- ------- – ------- = Q j dt ∂ q˙j ∂ q j
(9.31)
These equations become Lagrange’s equations through the following development. Restrict all the applied forces, Qj, to be derivable from a scalar function, U, where in general, U = U(qj, q˙j ), and
∂U d ∂U Q j = – ------- + ----- ------- ∂ q j dt ∂ q˙j The Lagrangian is defined as L = T − U, and substituted into Eq. (9.31) to yield the n Lagrange equations:
d ∂L ∂L ----- ------- – ------- = Q j dt ∂ q˙j ∂ q j
(9.32)
This formulation yields n second-order ODEs in the qj.
Dealing with Nonconservative Effects The derivation of Lagrange’s equations assumes, to some extent, that the system is conservative, meaning that the total of kinetic and potential energy remains constant. This is not a limiting assumption because the process of reticulation provides a way to extract nonconservative effects (inputs, dissipation), and then to assemble the system later. It is necessary to recognize that the nonconservative effects can be integrated into a model based on Lagrange’s equations using the Qi’s. Associating these forces with the generalized coordinates implies work is done, and this is in accord with energy conservation principles (we account for total work done on system). The generalized force associated with a coordinate, qi, and due to external forces is then derived from Qi = δ Wi /δ qi, where Wi is the work done on the system by all external forces during the displacement, δ qi.
Extensions for Nonholonomic Systems In the case of nonholonomic constraints, the coordinates qj are not independent. Assume you have m nonholonomic constraints (m ≤ n). If the equations of constaint can be put in the form
∂ al
- dq ∑ ------∂q k
k
k
∂a + -------l dt = ∂t
∑a
lk
dq k + a lt dt = 0
(9.33)
k
where l indexes up to m such constraints, then the Lagrange equations are formulated with Lagrange undetermined multipliers, λl. We maintain n coordinates, qk, but the n Lagrange equations are now expressed [11] as
d ∂L ∂L ----- -------- – -------- = dt ∂ q˙k ∂ q k
∑λ a
l lk
,
k = 1, 2,…,n
(9.34)
l
However, since there are now m unknown Lagrange multipliers, λl, it is necessary to solve an additional m equations:
∑a k
©2002 CRC Press LLC
q˙ + a lt = 0
lk k
(9.35)
0066-frame-C09 Page 50 Friday, January 18, 2002 11:01 AM
The terms ∑l λlalk can be interpreted as generalized forces of constraint. These are still workless constraints. The Lagrange equations for nonholonomic constraints can be used to study holonomic systems, and this analysis would provide a solution for the constraint forces through evaluation of the Lagrange multipliers. The use of Lagrange’s equations with Lagrange multipliers is one way to model complex, constrained multibody systems, as discussed in Haug [14].
Mechanical Subsystem Models Using Lagrange Methods The previous sections summarize a classical formulation and application of Lagrange’s equations. When formulating models of mechanical systems, these methods are well proven. Lagrange’s equations are recognized as an approach useful in handling systems with complex mechanical systems, including systems with constraints. The energy-basis also makes the method attractive from the standpoint of building multienergetic system models, and Lagrange’s equations have been used extensively in electromechanics modeling, for example. For conservative systems, it is possible to arrive at solutions sometimes without worrying about forces, especially since nonconservative effects can be handled “outside” the conservative dynamics. Developing transformation equations between the coordinates, say x, used to describe the system and the independent coordinates, q, helps assure a minimal formulation. However, it is possible sometimes to lose insight into cause and effect, which is more evident in other approaches. Also, the algebraic burden can become excessive. However, it is the analytical basis of the method that makes it especially attactive. Indeed, with computer-aided symbolic processing techniques, extensive algebra becomes a non-issue. In this section, the advantages of the Lagrange approach are merged with those of a bond graph approach. The concepts and formulations are classical in nature; however, the graphical interpretation adds to the insight provided. Further, the use of bond graphs assures a consistent formulation with causality so that some insight is provided into how the conservative dynamics described by the energy functions depend on inputs, which typically arrive from the nonconservative dynamics. The latter are very effectively dealt with using bond graph methods, and the combined approach is systematic and yields first-order differential equations, rather than the second-order ODEs in the classical approach. Also, it will be shown that in some cases the combined approach makes it relatively easy to model certain systems that would be very troublesome for a direct approach by either method independently. A Lagrange bond graph subsystem model will capture the elements summarized with a word bond graph in Fig. 9.39. The key elements are identified as follows: (a) conservative energy storage captured by kinetic and potential energy functions, (b) power-conserving transforming relations, and (c) coupling/ interconnections with nonconservative and non-Lagrange system elements. Note that on the nonconservative side of the transforming relations, there are m coordinates that can be identified in the modeling, but these are not independent. The power-conserving transforming relations reduce the coordinates to a set of n independent coordinates, qi. Associated with each independent coordinate or velocity, q˙i, there is an associated storage of kinetic and potential energy which can be represented by the coupled IC in Fig. 9.40(a) [16]. An alternative is the single C element used to capture all the coupled energy storage [3], where the gyrator has a modulus of 1 (this is called a symplectic gyrator). In either case, this structure shows that there will be one common flow junction associated with each independent coordinate. Recall the efforts at a 1-junction sum, and at this ith junction,
E qi = p˜˙ i + e qi Connection Structure to/and Nonconservative Effects
Power-Conserving Transforming Relations m dependent coordinates
FIGURE 9.39
Block diagram illustrating the Lagrange subsystem model.
©2002 CRC Press LLC
(9.36)
Conservative Energy Storage n independent coordinates
0066-frame-C09 Page 51 Friday, January 18, 2002 11:01 AM
pq Eq
eq
1 f=q
I C
pq Eq
1 f=q
(a)
GY eq
C
(b)
FIGURE 9.40 Elementary formulation of a flow junction in a Lagrange subsystem model. The efforts at the 1-junction for this ith independent flow variable, q˙i , represent Lagrange’s equations.
where E qi is the net nonconservative effort at q˙i , e qi is a generalized conservative effort that will be determined by the Lagrange system, and the effort p˜˙i is a rate of change of an ith generalized momentum. These terms will be defined in the next section. However, note that this effort sum is simply Newton’s laws derived by virtue of a Lagrange formulation. In fact, this equation is simply a restatement of the ith Lagrange equation, as will be shown in the following. These effort sum equations give n first-order ODEs by solving for p˙i . The other n equations will be for the displacement variables, qi. The following methodology is adapted from Beaman, Paynter, and Longoria [3].
Methodology for Building Subsystem Model Conduct Initial Modeling. Isolate the conservative parts of the system, and make sure that any constraints are holonomic. This reticulation will identify ports to the system under study, including points in the system (typically velocities) where forces and/or torques of interest can be applied (e.g., at flow junctions). These forces and torques are either nonconservative, or they are determined by a system external to the Lagrange-type subsystem. This is a modeling decision. For example, a force due to gravity could be included in a Lagrange subsystem (being conservative) or it could be shown explicity at a velocity junction corresponding to motion modeled outside of the Lagrange subsystem. This will be illustrated in one of the examples that follow. Define Generalized Displacement Variables. In a Lagrange approach, it is necessary to identify variables that define the configuration of a system. In mechanical system, these are translational and rotational displacements. Further, these variables are typically associated with the motion or relative motion of bodies. To facilitate a model with a minimum and independent set of coordinates, develop transforming relations between the m velocities or, more generally, flows x˙ , and n independent flows, q˙ . The form is [3],
x˙ = T ( q )q˙
(9.37)
explicity showing that the matrix T(q) can depend on q. This can be interpreted, in bond graph modeling terms, as a modulated transformer relationship, where q contains the modulating variables. The independent generalized displacements, q, will form possible state variables of the Lagrange subsystem. The transforming relationships are commonly derived from (holonomic) constraints, and from considerations of geometry and basic kinematics. The matrix T is m × n and may not be invertible. The bond graph representation is shown in Fig. 9.41. Formulate the Kinetic Energy Function. Given the transforming relationships, it is now possible to express the total kinetic energy of the Lagrange subsystem using the independent flow variables, q˙ . First, the kinetic energy can be written using the x˙ (this is usually easier), or T = T x˙ (x˙ ). Then the relations in Eq. (9.37) are used to transform this kinetic energy function so it is expressed as a function of the q and q˙ variables, T x˙ (x˙ ) → T q˙ q (q˙ , q). For brevity, this can be indicated in the subscript, or just T q˙ q . For example, a kinetic energy function that depends on x, θ, and θ˙ is referred to as T θ˙ θ x (if the number of variables is very high, certainly such a convention would not be followed). ©2002 CRC Press LLC
0066-frame-C09 Page 52 Friday, January 18, 2002 11:01 AM
q
1 x1
q x1 xm
TF
q1
1
qn
x2
TF
q1 1 1 q2
1 x3
(a)
FIGURE 9.41 and n = 2.
(b)
(a) Bond graph representation of the transforming relations. (b) Example for the case where m = 3
Define Generalized Momentum Variables. With the kinetic energy function now in terms of the independent flows, q˙ , generalized momenta can be defined as [3,20],
∂ Tq˙ q p˜ = ---------∂ q˙
(9.38)
where the “tilde” ( p˜ ) notation is used to distinguish these momentum variables from momentum variables defined strictly through the principles summarized in Table 9.5. In particular note that these generalized momentum variables may be functions of flow as well as of displacement (i.e., they may be configuration dependent). Formulate the Potential Energy Function. In general, a candidate system for study by a Lagrange approach will store potential energy, in addition to kinetic energy, and the potential energy function, U, should be expressed in terms of the dependent variables, x. Using the tranforming relations in Eq. (9.37), the expression is then a function of q, or U = U(q) = Uq. In mechanical systems, this function is usually formed by considering energy stored in compliant members, or energy stored due to a gravitational potential. In these cases, it is usually possible to express the potential energy function in terms of the displacement variables, q. Derive Generalized Conservative Efforts. A conservative effort results and can be found from the expression
∂ T q˙ q ∂ U q e˜ q = – ---------- + --------∂q ∂q
(9.39)
where the q subscript is used to denote these as conservative efforts. The first term on the right-hand side represents an effect due to dependence of kinetic energy on displacement, and the second term will be recognized as the potential energy derived effort. Identify and Express Net Power Flow into Lagrange Subsystem. At the input to the Lagrange subsystem on the “nonconservative” side, the power input can be expressed in terms of effort and flow products. Since the transforming relations are power-conserving, this power flow must equal the power flow on the “conservative” side. This fact is expressed by
1×m
m×n n×1
1×n
q˙ n ×1
{
{
T ( q ) q˙ = E q
{
1×m m×1
= ex
{
x˙
{
{
Px = ex
(9.40)
where the term Eq is the nonconservative effort transformed into the q coordinates. This term can be computed as shown by
Eq = ex T ( q )
(9.41)
Summary of the Method. In summary, all the terms for a Lagrange subsystem can be systematically derived. There are some difficulties that can arise. To begin with, the first step can require some geometric reasoning, and often this can be a problem in some cases, although not insurmountable. The n ©2002 CRC Press LLC
0066-frame-C09 Page 53 Friday, January 18, 2002 11:01 AM
1 x1
1
~ pq1
ex1
exm
q
Eq1
TF
GY eq1
q1 1 ~ pqn
Eqn
1 qn
GY eqn
C
xm
FIGURE 9.42
Lagrange subsystem model.
momentum state equations for this Lagrange subsystem are given by
p˙˜ = – e i + E i
(9.42)
and the state equations for the qi must be found by inverting the generalized momentum equations, (9.38). In some cases, these n equations are coupled and must be solved simultaneously. In the end, there are 2n first-order state equations. In addition, the final bond graph element shown in Fig. 9.42 can be coupled to other systems to build a complex system model. Note that in order to have the 2n equations in integral causality, efforts (forces and torques) should be specified as causal inputs to the transforming relations. Also, this subsystem model assumes that only holonomic constraints are applied. While this might seem restrictive, it turns out that, for many practical cases, the physical effects that lead to nonholonomic constraints can be dealt with “outside” of the Lagrange model, along with dissipative effects, actuators, and so on.
References 1. Arczewski, K. and Pietrucha, J., Mathematical Modelling of Complex Mechanical Systems, Ellis Horwood, New York, 1993. 2. Beaman, J.J. and Rosenberg, R.C., “Constitutive and modulation structure,” Journal of Dynamic Systems, Measurement, and Control (ASME), Vol. 110, No. 4, pp. 395–402, 1988. 3. Beaman, J.J., Paynter, H.M., and Longoria, R.G., Modeling of Physical Systems, Cambridge University Press, in progress. 4. Breedveld, P.C., “Multibond graph elements in physical systems theory,” Journal of the Franklin Institute, Vol. 319, No. 1–2, pp. 1–36, 1985. 5. Bedford, A. and Fowler, W., Engineering Mechanics. Dynamics, 2nd edition, Addison Wesley Longman, Menlo Park, CA, 1999. 6. Burr, A.H., Mechanical Analysis and Design, Elsevier Science Publishing, Co., New York, 1981. 7. Chou, J.C.K, “Quaternion kinematic and dynamic differential equations,” IEEE Transactions on Robotics and Automation, Vol. 8, No. 1, February, 1992. 8. Crandall, S., Karnopp, D.C., Kurtz, E.F., and Pridmore-Brown, D.C., Dynamics of Mechanical and Electromechanical Systems, McGraw-Hill, New York, 1968 (Reprinted by Krieger Publishing Co., Malabar, FL, 1982). 9. Den Hartog, J.P., Advanced Strength of Materials, McGraw-Hill, New York, 1952. 10. Fjellstad, O. and Fossen, T.I., “Position and attitude tracking of AUVs: a quaternion feedback approach,” IEEE Journal of Oceanic Engineering, Vol. 19, No. 4, pp. 512–518, 1994. 11. Goldstein, D., Classical Mechanics, 2nd edition, Addison-Wesley, Reading, MA, 1980. 12. Greenwood, D.T., Principles of Dynamics, Prentice-Hall, Englewood Cliffs, NJ, 1965. 13. Harding, C.F., “Solution to Euler’s gyrodynamics-I,” Journal of Applied Mechanics, Vol. 31, pp. 325– 328, 1964. ©2002 CRC Press LLC
0066-frame-C09 Page 54 Friday, January 18, 2002 11:01 AM
14. Haug, E.J., Computer Aided Kinematics and Dynamics of Mechanical Systems, Allyn and Bacon, Needham, MA, 1989. 15. Kane, T.R. and Levinson, D.A., Dynamics: Theory and Applications, McGraw-Hill Publishing Co., New York, 1985. 16. Karnopp, D., “An approach to derivative causality in bond graph models of mechanical systems,” Journal of the Franklin Institute, Vol. 329, No. 1, pp. 65–75, 1992. 17. Karnopp, D.C., Margolis, D., and Rosenberg, R.C., System Dynamics: Modeling and Simulation of Mechatronic Systems, Wiley, New York, 2000, 3rd edition, or System Dynamics: A Unified Approach, 1990, 2nd edition. 18. Karnopp, D. and Rosenberg, R.C., Analysis and Simulation of Multiport Systems. The Bond Graph Approach to Physical System Dynamics, MIT Press, Cambridge, MA, 1968. 19. Kuipers, J.B., Quaternions and Rotation Sequences, Princeton University Press, Princeton, NJ, 1998. 20. Lanczos, C., The Variational Principles of Mechanics, 4th edition, University of Toronto Press, Toronto, 1970. Also published by Dover, New York, 1986. 21. Lyshevski, S.E., Electromechanical Systems, Electric Machines, and Applied Mechatronics, CRC Press, Boca Raton, FL, 2000. 22. Matschinsky, W., Road Vehicle Suspensions, Professional Engineering Publishing Ltd., Suffolk, UK, 1999. 23. Meriam, J.L. and Kraige, L.G., Engineering Mechanics. Dynamics, 4th edition, John Wiley and Sons, New York, 1997. 24. Mortensen, R.E., “A globally stable linear regulator,” International Journal of Control, Vol. 8, No. 3, pp. 297–302, 1968. 25. Nikravesh, P.E. and Chung, I.S., “Application of Euler parameters to the dynamic analysis of threedimensional constrained mechanical systems,” Journal of Mechanical Design (ASME), Vol. 104, pp. 785–791, 1982. 26. Nikravesh, P.E., Wehage, R.A., and Kwon, O.K., “Euler parameters in computational kinematics and dynamics, Parts 1 and 2,” Journal of Mechanisms, Transmissions, and Automation in Design (ASME), Vol. 107, pp. 358–369, 1985. 27. Nososelov, V.S., “An example of a nonholonomic, nonlinear system not of the Chetaev type,” Vestnik Leningradskogo Universiteta, No. 19, 1957. 28. Paynter, H., Analysis and Design of Engineering Systems, MIT Press, Cambridge, MA, 1961. 29. Roark, R.J. and Young, W.C., Formulas for Stress and Strain, McGraw-Hill, New York, 1975. 30. Roberson, R.E. and Schwertassek, Dynamics of Multibody Systems, Springer-Verlag, Berlin, 1988. 31. Rosenberg, R.M., Analytical Dynamics of Discrete Systems, Plenum Press, New York, 1977. 32. Rosenberg, R. and Karnopp, D., Introduction to Physical System Dynamics, McGraw-Hill, New York, 1983. 33. Rowell, D. and Wormley, D.N., System Dynamics, Prentice-Hall, Upper Saddle River, NJ, 1997. 34. Siciliano, B. and Villani, L., Robot Force Control, Kluwer Academic Publishers, Norwell, MA, 1999. 35. Tiernego, M.J.L. and Bos, A.M., “Modelling the dynamics and kinematics of mechanical systems with multibond graphs,” Journal of the Franklin Institute, Vol. 319, No. 1–2, pp. 37–50, 1985. 36. Vance, J.M., Rotordynamics of Turbomachinery, John Wiley and Sons, New York, 1988. 37. Wehage, R.A., “Quaternions and Euler parameters—a brief exposition,” in Proceedings of the NATO Advanced Study Institute on Computer Aided Analysis and Optimization of Mechanical System Dynamics, E.J. Haug (ed.), Iowa City, IA, August 1–12, 1983, pp. 147–182. 38. Wie, B. and Barba, P.M., “Quaternion feedback for spacecraft large angle maneuvers,” Journal of Guidance, Control, and Dynamics, Vol. 8, pp. 360–365, May–June 1985. 39. Wittenburg, J., Dynamics of Systems of Rigid Bodies, B.G. Teubner, Studttgart, 1977.
©2002 CRC Press LLC
10 Fluid Power Systems 10.1
Introduction Fluid Power Systems • Electrohydraulic Control Systems
10.2
Hydraulic Fluids Density • Viscosity • Bulk Modulus
10.3
Hydraulic Control Valves Principle of Valve Control • Hydraulic Control Valves
10.4
Hydraulic Pumps Principles of Pump Operation • Pump Controls and Systems
10.5
Hydraulic Cylinders Cylinder Parameters
Qin Zhang
10.6
University of Illinois
Carroll E. Goering University of Illinois
Fluid Power Systems Control System Steady-State Characteristics • System Dynamic Characteristics • E/H System Feedforward-Plus-PID Control • E/H System Generic Fuzzy Control
10.7
Programmable Electrohydraulic Valves
10.1 Introduction Fluid Power Systems A fluid power system uses either liquid or gas to perform desired tasks. Operation of both the liquid systems (hydraulic systems) and the gas systems (pneumatic systems) is based on the same principles. For brevity, we will focus on hydraulic systems only. A fluid power system typically consists of a hydraulic pump, a line relief valve, a proportional direction control valve, and an actuator (Fig. 10.1). Fluid power systems are widely used on aerospace, industrial, and mobile equipment because of their remarkable advantages over other control systems. The major advantages include high power-to-weight ratio, capability of being stalled, reversed, or operated intermittently, capability of fast response and acceleration, and reliable operation and long service life. Due to differing tasks and working environments, the characteristics of fluid power systems are different for industrial and mobile applications (Lambeck, 1983). In industrial applications, low noise level is a major concern. Normally, a noise level below 70 dB is desirable and over 80 dB is excessive. Industrial systems commonly operate in the low (below 7 MPa or 1000 psi) to moderate (below 21 MPa or 3000 psi) pressure range. In mobile applications, the size is the premier concern. Therefore, mobile hydraulic systems commonly operate between 14 and 35 MPa (2000–5000 psi). Also, their allowable temperature operating range is usually higher than in industrial applications.
©2002 CRC Press LLC
0066_frame_C10 Page 2 Wednesday, January 9, 2002 4:10 PM
FIGURE 10.1
Schematic of a fluid power system.
Electrohydraulic Control Systems The application of electronic controls to fluid power systems resulted in electrohydraulic control systems. Electrohydraulics has been widely used in aerospace, industrial, and mobile fluid power systems. Electrohydraulic controls have a few distinguishable advantages over other types of controls. First, an electrohydraulic system can be operated over a wide speed range, and its speed can be controlled continuously. More importantly, an electrohydraulic system can be stalled or operated under very large acceleration without causing its components to be damaged. A hydraulic actuator can be used in strong magnetic field without having the electromagnetic effects degrade control performance. In addition, hydraulic fluid flow can transfer heat away from system components and lubricate all moving parts continuously.
10.2 Hydraulic Fluids Many types of fluids, e.g., mineral oils, biodegradable oils, and water-based fluids, are used in fluid power systems, depending on the task and the working environment. Ideally, hydraulic fluids should be inexpensive, noncorrosive, nontoxic, noninflammable, have good lubricity, and be stable in properties. The technically important properties of hydraulic fluids include density, viscosity, and bulk modulus.
Density The density, ρ, of a fluid is defined as its mass per unit volume (Welty et al., 1984).
m r = ---V
(10.1)
Density is approximately a linear function of pressure (P) and temperature (T) (Anderson, 1988).
r = r 0 ( 1 + aP – bT )
(10.2)
In engineering practice, the manufacturers of the hydraulic fluids often provide the relative density (i.e., the specific gravity) instead of the actual density. The specific gravity of a fluid is the ratio of its actual density to the density of water at the same temperature.
Viscosity The viscosity of a fluid is a measure of its resistance to deformation rate when subjected to a shearing force (Welty et al., 1984). Manufacturers often provide two kinds of viscosity values, namely the dynamic viscosity ( µ) and the kinematic viscosity (ν). The dynamic viscosity is also named the absolute viscosity ©2002 CRC Press LLC
0066_frame_C10 Page 3 Wednesday, January 9, 2002 4:10 PM
and is defined by the Newtonian shear stress equation:
t m = --dv
(10.3)
-----dy
where dv is the relative velocity between two parallel layers dy apart, and τ is the shear stress. The kinematic viscosity is the ratio of the dynamic viscosity to the density of the fluid and is defined using the following equation:
m n = --r
(10.4)
In the SI system, the unit of dynamic viscosity is Pascal-seconds (Pa s), and the unit of kinematic viscosity 2 is square meter per second (m /s). Both the dynamic and kinematic vary strongly with temperature.
Bulk Modulus Bulk modulus is a measure of the compressibility or the stiffness of a fluid. The basic definition of fluid bulk modulus is the fractional reduction in fluid volume corresponding to unit increase of applied pressure, expressed using the following equation (McCloy and Martin, 1973):
∂P b = – V ------- ∂V
(10.5)
The bulk modulus can either be defined as the isothermal tangent bulk modulus if the compressibility is measured under a constant temperature or as the isentropic tangent bulk modulus if the compressibility is measured under constant entropy. In analyzing the dynamic behavior of a hydraulic system, the stiffness of the hydraulic container plays a very important role. An effective bulk modulus, b e , is often used to consider both the fluid’s compressibility, b f , and container stiffness, b c , at the same time (Watton, 1989).
1 1 1 ---- = ---- + ---bf bc be
(10.6)
10.3 Hydraulic Control Valves Principle of Valve Control In a fluid power system, hydraulic control valves are used to control the pressure, flow rate, and flow direction. There are many ways to define a hydraulic valve so that a given valve can be named differently when it is used in different applications. Commonly, hydraulic valves can be classified based on their functions, such as pressure, flow, and directional control valves, or based on their control mechanisms, such as on-off, servo, and proportional electrohydraulic valves, or based on their structures, such as spool, poppet, and needle valves. A hydraulic valve controls a fluid power system by opening and closing the flow-passing area of the valve. Such an adjustable flow-passing area is often described using an orifice area, Ao , in engineering practice. Physically, an orifice is a controllable hydraulic resistance, Rh. Under steady-state conditions, a hydraulic resistance can be defined as a ratio of pressure drop, ∆ p , across the valve to the flow rate, q, through the valve.
d ( ∆p ) R h = --------------dq
(10.7)
Control valves make use of many configurations of orifice to realize various hydraulic resistance characteristics for different applications. Therefore, it is essential to determine the relationship between the ©2002 CRC Press LLC
Discharge Coefficient
0066_frame_C10 Page 4 Wednesday, January 9, 2002 4:10 PM
Spool Position
FIGURE 10.2
Discharge coefficient versus spool position in a spool valve.
pressure drop and the flow rate across the orifice. An orifice equation (McCloy and Martin, 1973) is often used to describe this relationship.
2 q = C d A o --- ∆P r
(10.8)
The pressure drop across the orifice is a system pressure loss in a fluid power system. In this equation, the orifice coefficient, Cd , plays an important role, and is normally determined experimentally. It has been found that the orifice coefficient varies greatly with the spool position, but does not appear to vary much with respect to the pressure drop across the orifice in a spool valve (Fig. 10.2, Viall and Zhang, 2000). Based on analytical results obtained from computational fluid dynamics simulations, the valve spool and sleeve geometries have little effect on the orifice coefficient for large spool displacements (Borghi et al., 1998).
Hydraulic Control Valves There are many ways to classify hydraulic control valves. For instance, based on their structural configurations, hydraulic control valves can be grouped as cartridge valves and spool valves. This section will provide mathematical models of hydraulic control valves based on their structural configurations. A typical cartridge valve has either a poppet or a ball to control the passing flow rate. Representing the control characteristics of a cartridge valve without loss of generality, a poppet type cartridge is analyzed (Fig. 10.3). The control characteristics of a poppet type cartridge valve can be described using an orifice equation and a force balance equation. As shown in Fig. 10.3, the valve opens by lifting the poppet. Because of the cone structure of the poppet, the flow-passing area can be determined using the following equation:
A x = pdx sin a
(10.9)
Therefore, the passing flow can be calculated using the orifice equation. For a poppet type valve, it is recommended to use a relative higher orifice coefficient of cd = 0.77∼ 0.82 (Li et al., 2000).
2 q = c d A x --- ( P B – P A ) r
(10.10)
The forces acting on the poppet include the pressure, spring, and hydraulic forces. The pressure force can be determined based on the upstream, downstream, and spring chamber pressures.
pd p(D – d ) pD F P = P A -------- + P B ------------------------- – P C --------4 4 4 2
©2002 CRC Press LLC
2
2
2
(10.11)
0066_frame_C10 Page 5 Wednesday, January 9, 2002 4:10 PM
PC D PB x
PA d
FIGURE 10.3
Operation principle of a puppet type cartridge valve.
The spring force biases the poppet towards closing. When the poppet is in the closed position, the spring force reaches its minimum value. The force increases as the poppet lifts to open the flow passage.
FS = k ( x0 + x )
(10.12)
The steady-state flow force tends to open the poppet in this valve. The flow force is a function of the flow rate and fluid velocity passing through the valve orifice.
F F = rqv cos a
(10.13)
The flow control characteristics of a spool valve are similar to those of a cartridge valve and can be described using an orifice equation. The only difference is that spool valve flow-passing area is determined by its wet perimeter, w, and spool displacement, x.
2 q = c d w x --- ∆P r
(10.14)
If the orifice is formed by the edge of the spool and the valve body, the wet perimeter is w = πd. If the orifice is formed by n slots cut on the spool and the perimeter of each slot is n, the corresponding wet perimeter is w = nb. The orifice coefficient for a spool valve normally uses cd = 0.60∼0.65. The forces acting on the spool also include the pressure, spring, and flow forces (Merritt, 1967). The pressure force is either balanced on the spool, because of its symmetric structure in a direct-actuator valve (actuated by a solenoid directly), or the pressure force to actuate the spool movement in a pilot actuated valve. The spring force tends to keep the spool in the central (neutral) position and can be described using Eq. (10.12). The flow forces acting on the spool can be calculated using Eq. (10.14). The flow velocity angle, α , is normally taken as 69°.
10.4 Hydraulic Pumps Principles of Pump Operation The pump is one of the most important components in a hydraulic system because it supplies hydraulic flow to the system. Driven by a prime mover, a hydraulic pump takes the fluid in at atmospheric pressure to fill an expanding volume of space inside the pump through an inlet port and delivers pressurized ©2002 CRC Press LLC
0066_frame_C10 Page 6 Wednesday, January 9, 2002 4:10 PM
fluids to the outlet due to the reduction in internal volume near the output port. The pump capacity is determined by pump displacement (D) and operating speed (n). The displacement of a pump is defined as the theoretical volume of fluid that can be delivered in one complete revolution of the pump shaft.
Q = Dn
(10.15)
The pump output pressure is determined by the system load, which is the combined resistance to fluid flow in the pipeline and the resistance to move an external load. Unless the pump flow has egress either by moving a load or by passing through a relief valve back to the reservoir, excessive pressure build-up can cause serious damage to the pump and/or the connecting pipeline (Reed and Larman, 1985). Based on their ability to change displacement, hydraulic pumps can be categorized as fixed-flow or variable-flow pumps. Based on their design, hydraulic pumps can be categorized as gear pumps, vane pumps, and piston pumps. Normally, gear pumps are fixed-flow pumps, and vane pumps and piston pumps can be either fixed-flow pumps or variable-flow pumps. The choice of pump design varies from industry to industry. For example, the machine tool manufacturers often select vane pumps because of their low noise, and their capability to deliver a variable flow at a constant pressure. Mobile equipment manufacturers like to use piston pumps due to their high power-to-weight ratio. Some agricultural equipment manufacturers prefer gear pumps for their low cost and robustness (Reed and Larman, 1985), but piston pumps are also popular.
Pump Controls and Systems Pumps are energy conversion devices that convert mechanical energy into fluid potential energy to drive various hydraulic actuators to do work. To meet the requirements of different applications, there are many types of fluid power system controls from which to choose. The design of the directional control valve must be compatible with the pump design. Normally, an open-center directional control valve is used with a fixed displacement pump and a closed-center directional control valve is used in a circuit equipped with a variable displacement pump. A fluid power system including a fixed displacement pump and an open-center directional control valve (Fig. 10.1) is an open-loop open-center system. Such a system is also called a load-sensitive system because the pump delivers only the pressure required to move the load, plus the pressure drop to overcome line losses. The open-loop open-center system is suitable for simple “on-off ” controls. In such operations, the hydraulic actuator either moves the load at the maximum velocity or remains stationary with the pump unloaded. If a proportional valve is used, the open-loop open-center system can also achieve velocity control of the actuator. However, such control will increase the pressure of the extra flow for releasing it back to the tank. Such control causes significant power loss and results in low system efficiency and heat generation. To solve this problem, an open-loop closed-center circuit is constructed using a variable displacement pump and a closed-center directional control valve. Because a variable displacement pump is commonly equipped with a pressure-limiting control or “pressure compensator,” the pump displacement will be automatically increased or decreased as the system pressure decreases or increases. If the metering position of the directional control valve is used to control the actuator velocity, constant velocity can be achieved if the load is constant. However, if the load is changing, the “pressure-compensating” system will not be able to keep a constant velocity without adjusting the metering position of the control valve. To solve this problem, a “load-sensing” pump should be selected for keeping a constant velocity under changing load. The reason for a “load-sensing” pump being able to maintain a constant velocity for any valve-metering position is that it maintains a constant pressure drop across the metering orifice of the directional control valve, and automatically adjusts the pump outlet pressure to compensate for the changes in pressure caused by external load. The constant pressure drop across the valve maintains constant flow, and therefore, constant load velocity.
©2002 CRC Press LLC
0066_frame_C10 Page 7 Wednesday, January 9, 2002 4:10 PM
10.5 Hydraulic Cylinders A hydraulic cylinder transfers the potential energy of the pressurized fluid into mechanical energy to drive the operating device performing linear motions and is the most common actuator used in hydraulic systems. A hydraulic cylinder consists of a cylinder body, a piston, a rod, and seals. Based on their structure, hydraulic cylinders can be classified as single acting (applying force in one direction only), double acting (exerts force in either direction), single rod (does not have a rod at the cap side), and double rod (has a rod at both sides of the piston) cylinders.
Cylinder Parameters A hydraulic cylinder transfers energy by converting the flow rate and pressure into the force and velocity. The velocity and the force from a double-acting double-rod cylinder can be determined using the following equations:
4q v = ------------------------2 2 p(D – d )
(10.16)
p 2 2 F = --- ( D – d ) ( P 1 – P 2 ) 4
(10.17)
The velocity and the force from a double-acting single-rod cylinder should be determined differently for extending and retracting motions. In retraction, the velocity can be determined using Eq. (10.16), and the force can be determined using the following equation:
p (D – d ) pD F = P 1 -------------------------- – P 2 --------4 4 2
2
2
(10.18)
In extension, the velocity and exerting forces can be determined using the following equations:
4q v = ---------2 pD
(10.19) 2
2
pD pd F = ( P 1 – P 2 ) ---------- + P 2 -------4 4
(10.20)
The hydraulic stiffness, kh , of the cylinder plays an important role in the dynamic performance of a hydraulic system. It is a function of fluid bulk modulus ( β ), piston areas (A1, A2), cylinder chamber volumes (V1, V2 ), and the volume of hydraulic hoses connected to both chambers (VL1, VL2). For a doubleacting single-rod cylinder, the stiffness on both sides of the piston acts in parallel (Skinner and Long, 1998). The total stiffness of the cylinder is given by the following equation: 2
2
A1 A1 - + ------------------k h = b ------------------ V L1 + V 1 V L2 + V 2
(10.21)
The natural frequency, ωn, of a hydraulic system is determined by the combined mass, m, of the cylinder and the load using the following equation:
wn =
©2002 CRC Press LLC
kh ---m
(10.22)
0066_frame_C10 Page 8 Wednesday, January 9, 2002 4:10 PM
10.6 Fluid Power Systems Control System Steady-State Characteristics The steady-state characteristics of a fluid power system determine loading performance, speed control capability, and the efficiency of the system. Modeling a hydraulic system without loss of generality, a system consisting of an open-center four-way directional control valve and a single-rod double acting cylinder is used to analyze the steady-state characteristics of the system (Fig. 10.1). In this system, the orifice area of the cylinder-to-tank (C-T) port in the control valve is always larger than that of the pumpto-cylinder (P-C) port. Therefore, it is reasonable to assume that the P-C orifice controls the cylinder speed during extension (Zhang, 2000). Based on Newton’s Law, the force balance on the piston is determined by the head-end chamber pressure, P1 , the head-end piston area, A1, the rod-end chamber pressure, P2, the rod-end piston area, A2, and the external load, F, when the friction and leakage are neglected.
P1 A1 – P2 A2 = F
(10.23)
If neglecting the line losses from actuator to reservoir, the rod-end pressure equals zero. Then, the head-end pressure is determined by the external load to the system.
F P 1 = ----A1
(10.24)
In order to push the fluid passing the control valve and entering the head-end of the cylinder, the discharge pressure, PP , of the hydraulic pump has to be higher than the cylinder chamber pressure. The difference between the pump discharge pressure and the cylinder chamber pressure is determined by the hydraulic resistance across the control valve. Based on the orifice equation, the flow rate entering the cylinder head-end chamber is
2 q = C d A o --- ( P P – P 1 ) r
(10.25)
Using a control coefficient, K, to represent Cd and ρ , the cylinder speed can be described using the following equation:
KA F v = ---------o P P – ----A1 A1
(10.26)
Equation (10.13) describes the speed-load relationship of a hydraulic cylinder under a certain fluid passing area (orifice area) of the control valve. Depicted in Fig. 10.4, the cylinder speed decreases as the external load applied to the cylinder increases. When there is no external load, the cylinder speed reaches a maximum. Conversely, when the external load researches the valve of F = PP A1, then the cylinder will stall. The stall load is independent of the size of the fluid passing area in the valve. Such characteristics of a fluid power system eliminate the potential of overloading, which makes it a safer power transmission method. In system analysis, the speed stiffness, kv , is often used to describe the consistency of the cylinder speed under changing system load (Li et al., 2000).
2 ( PP A1 – F ) 1 k v = – ---- = ---------------------------∂v v ------∂F
©2002 CRC Press LLC
(10.27)
0066_frame_C10 Page 9 Wednesday, January 9, 2002 4:10 PM
Cylinder Speed
AO 3 > AO 2 > AO 1 AO 3 AO 2 AO1
Fmax
External Load
FIGURE 10.4
Hydraulic cylinder load-speed relationship under the same system pressure.
Equation (10.27) indicates that the increase in speed stiffness can be achieved either by increasing the system pressure or the cylinder size, or by decreasing the speed.
System Dynamic Characteristics To analyze the dynamic characteristics of this hydraulic cylinder actuation system, one can use flow continuity and system momentum equations to model the cylinder motion. Neglecting system leakage, friction, and line loss, the following are the governing equations for the hydraulic system:
dy V dP q = kx P P – P 1 = A 1 ----- + -----1 --------1 dt b dt
(10.28)
d2y P 1 A 1 = m -------2- + F dt
(10.29)
To perform dynamic analysis on this hydraulic system, it is essential to derive its transfer function based on the above nonlinear equation, which can be obtained by taking the Laplace transform on the linearized form of the above equations (Watton, 1989). 1 - s + ------------- dF ( s ) – ------- A 21 b A 21 k 3 R o dv ( s ) = --------------------------------------------------------------------------V1 1 2 ------------------- ms + 1 2 ms + 2
k1 Ki ---------- di ( s ) A1 A1 b
V
1
(10.30)
A1 k2 Ro
Making 2
wn =
A1 b ----------, V1 m
1 mb z = ------------- ------------2 , 2k 2 R o V 1 A 1
and
k1 Ki K s = --------A1
Equation (10.30) can be represented as 1 V ----2 -----1 s A1 b
+ -------- d F ( s ) k 3 R o K s di ( s ) dv ( s ) = -------------------------------- – ----------------------------------------------1 2 2z 1 2 2z ------2 s + ------ s + 1 ------2 s + ------ s + 1 w w wn
©2002 CRC Press LLC
n
wn
1
n
(10.31)
Based on the stability criterion for a second-order system, it should satisfy
1 2z -----2 s 2 + ------ s + 1 = 0 wn wn
(10.32)
The speed control coefficient, Ks , is the gain between the control signal current and the cylinder speed. A higher gain can increase the system sensitivity in speed control.
E/H System Feedforward-Plus-PID Control Equation (10.31) indicates that the speed control of a hydraulic cylinder is a third-order system. Its dynamic behaviors are affected by spool valve characteristics, system pressure, and cylinder size. Therefore, it is a challenging job to realize accurate and smooth speed control on a hydraulic cylinder. A feedforward plus proportional integral derivative (FPID) controller has proven capable of achieving highspeed control performance of a hydraulic cylinder (Zhang, 1999). An FPID controller consists of a feedforward loop and a PID loop (Fig. 10.5). The feedforward loop is designed to compensate for the nonlinearity of the hydraulic system, including the deadband of the system and the nonlinear flow gain of the control valve. It uses a feedforward gain to determine the basic control input based on demand speed. This feedforward gain is scheduled based on the inverse valve transform, which provides the steady-state control characteristics of the E/H valve in terms of cylinder speed and control-current to valve PWM driver. The PID loop complements the feedforward control via the speed tracking error compensation. The PID controller is developed based on the transfer function of the linearized system for the hydraulic cylinder speed control system.
KI ˆ G ( s ) = Ê K P + ---s + K D s¯ Ë
(10.33)
The robustness of the FPID control was evaluated based on its performance and stability. Performance robustness deals with unexpected external disturbances and stability robustness deals with internal structural or parametric changes in the system. The design of this FPID controller was based on a worstcase scenario of system operating conditions in tuning both the PID gains and the feedforward gain.
G F (s )
GPID (s)
G H (s )
H C (s )
FIGURE 10.5 Schematic block diagram of the feedforward-plus-PID controller. GF (s) is the feedforward gain, GPID(s) is the overall gain of the feedback PID controller, GH(s) is hydraulic system gain, and HC(s) is the sensor gain. ©2002 CRC Press LLC
E/H System Generic Fuzzy Control Fuzzy control is an advanced control technology that can mimic a human’s operating strategy in controlling complex systems and can handle systems with uncertainty and nonlinearity (Pedrycz, 1993). One common feature of fuzzy controllers is that most such controllers are designed based on natural language control laws. This feature makes it possible to design a generic controller for different plants if the control of those plants can be described using the same natural language control laws (Zhang, 2001). The speed control on a hydraulic cylinder actually is achieved by regulating the supplied flow rate to the cylinder. In different hydraulic systems, the size of the cylinder and the capability of hydraulic system are usually different, but the control principles are very similar. Representing cylinder speed control operation, using natural language without loss of generality, the control laws are the same for all systems: To have a fast motion, open the valve fully. To make a slow motion, keep the valve open a_little. To hold the cylinder at its current position, return the valve to the center. To make a reverse motion, operate the valve to the other direction. This natural language model represents the general roles in controlling the cylinder speed via an E/H control valve on all hydraulic systems. The differences in system parameters on different systems can be handled by redefining the domain of the fuzzy variable, such as fully, a_lot, and a_little, using fuzzy membership functions (Passino and Yurkovich, 1998). This model provides the basis for designing a generic fuzzy controller for E/H systems. The adoption of the generic controller on different systems can be as easy as redefining the fuzzy membership function based on its system parameters. Figure 10.6 shows the block diagram of a generic fuzzy controller consisting of two input variable fuzzifiers, a control rule base, and a control command defuzzifier. The two input fuzzifiers were designed to convert real-valued input variables into linguistic variables with appropriate fuzzy memberships. Each fuzzifier consists of a set of fuzzy membership functions defining the domain for each linguistic input variable. A real-valued input variable is normally converted into two linguistic values with associated memberships. The definitions of these fuzzy values play a critical role in the design of generic fuzzy controllers and are commonly defined based upon hydraulic system parameters. The fuzzy controller uses fuzzy control rules to determine control actions according to typical behaviors in the speed control of hydraulic cylinders. The control outputs are also linguistic values and associated with fuzzy memberships. For example, if the demanding speed is negative_small (NS) and the error in speed was positive_small (PS), the appropriate valve control action will be positive_small (PS). The appropriate control actions were determined based on predefined control rules. Since each realvalued variable commonly maps into two fuzzy values, the fuzzy inference engine fires at least two control rules containing these fuzzy values to determine the appropriate control action. Therefore, at least two appropriate fuzzy-valued control actions will be selected. However, the E/H controller can only implement one specific real-value control command at a given time. It is necessary to convert multiple fuzzy-valued control commands into one real-valued control signal in this fuzzy controller.
Commands fuzzifier Status fuzzifier
Control Rules
Signal Defuzzifier
G H (s )
H C (y )
FIGURE 10.6 Block diagram of fuzzy E/H control system. The fuzzy controller consists of input variable fuzzifiers, control rules, and a signal defuzzifier. ©2002 CRC Press LLC
0066_frame_C10 Page 12 Wednesday, January 9, 2002 4:10 PM
The defuzzification process converts two or more fuzzy-valued outputs to one real-valued output. There are many defuzzification methods, such as center of gravity (COG) and center of area (COA), available for different applications (Passino and Yurkovich, 1998). By COA approach, the real-valued control signal, u, was determined by the domain and the memberships of the selected fuzzy control commands, µ(ui ), using the following equation:
∑ i=1 u i m ( u i )du u = ---------------------------------n ∑ i=1 m ( u i )du n
(10.34)
The COA method naturally averages the domains of selected fuzzy control commands, and thus reduces the sensitivity of the system to noise. The use of a COA approach increased the robustness and accuracy of the control. The performance of the fuzzy controller depends on the appropriation of domain definition for both input and output fuzzy variables. Properly defined fuzzy variables for a specific E/H system will improve the stability, accuracy, and nonlinearity compensation of the fuzzy controller. Normally, a triangular fuzzy membership function, µFV , was defined by domain values of a i , a j , and ak , for each fuzzy value (FV) in the fuzzy controller.
mA =
m NL
a1 a1 a2
m NM
a1 a2 a3
m NS
a2 a3 a4
m ZE = a 3 a 4 a 5 m PS
a4 a5 a6
m PM
a5 a6 a7
m PL
a6 a7 a7
(10.35)
where µA is a set of fuzzy membership functions for each fuzzy input or output variable; at , ak are the boundaries; and aj is the full membership point of the fuzzy value. Equation (10.35) uses a set of seven domain values to define seven fuzzy values in the real-valued operating range. The tuning of the fuzzy controller was to determine the domain values for each of the fuzzy values. The following vector presents the domains of fuzzy membership functions for a particular variable:
A = { a1 a2 a3 a4 a5 a6 a7 }
(10.36)
10.7 Programmable Electrohydraulic Valves Proportional directional control valves are by far the most common means for motion control of hydraulic motors or cylinders in fluid power systems (McCloy, 1973). Normally, a proportional direction control valve uses a sliding spool to control the direction and the amount of fluid passing through the valve. For different applications, the spool in a proportional direction control valve is often specially designed to provide the desired control characteristics. As a result, valves are specific and cannot be interchangeable even if they are exactly of the same size. The multiplicity of such specific valves make them inconvenient and costly to manufacture, distribute, and service. To provide a solution to these problems, researchers at the University of Illinois at Urbana-Champaign (Book and Goering, 1999; Hu et al., 2001) developed a generic programmable electrohydraulic (E/H) control valve. A generic programmable valve is a set of individually
©2002 CRC Press LLC
Valve 1
Valve 2 M Valve 3 Valve 4
Controller Valve 5
FIGURE 10.7
System schematic of a hydraulic system using generic programmable E/H valves.
controlled E/H valves capable of fulfilling flow and pressure control requirements. One set of such generic valves can replace a proportional direction control valve and other auxiliary valves, such as line release valves, in a circuit. A generic programmable E/H valve is normally constructed using five bi-directional, proportional flow control sub-valves, three pressure sensors, and an electronic controller. Figure 10.7 shows the schematic of the generic valve circuit. Sub-valves 1 and 2 connect the pump and the head-end or the rod-end chambers of the cylinder and provide equilibrium ports of P-to-A and P-to-B as in a conventional direction control valve, while sub-valves 3 and 4 connect cylinder chambers A or B to the tank and provide equilibrium ports of A-to-T and B-to-T of a direction control valve. Sub-valve 5 connects the pump and the tank directly and provides a dual-function of line release and an equilibrium port of Pto-T of a direction control valve. By controlling the opening and closing of these sub-valves, the basic functions of the generic valve can be realized. In operation, the controller output control signals for each sub-valve are based on a predefined control logic. With proper logic in the on-off control of all five sub-valves, the generic programmable valve was capable of realizing several basic functions, including open-center, closed-center, float-center, make-up, and pressure release functions. By applying modulation control, the generic valve can realize proportional functions such as meter-in/meter-out, load sensing, regeneration, and anti-cavitation. For example, in a conventional tandem-center or closed-center direction control valve, the ports A and B are normally closed for holding the pressure in cylinder chambers, while the ports P and T are either normally open or closed. To fulfill this function, the generic valve keeps sub-valves 1–4 closed to hold the cylinder chamber pressure, and fully opens sub-valve 5 to bleed the flow back to the tank, either at low pressure (tandem-center function) or when the system pressure exceeds a preset level (closed-center function). In conventional open-center direction control valves, all ports are normally connected. To fulfill this function, the generic valve keeps all sub-valves open. Similarly, to provide float-center function, the generic valve needs to open sub-valves 3 and 4 to release pressure in both the head-end and the rod-end chambers of the cylinder. In both cases, sub-valve 5 will be opened only when the system pressure exceeds a preset level. It is almost impossible to achieve the regeneration function from a conventional direction control valve. In achieving this function, a generic valve needs to open sub-valves 1 and 2 to lead the returning flow of the rod-end chamber back to the head-end chamber to provide additional flow for increasing the extending speed. Make-up function in a conventional hydraulic system is provided by a separate make-up valve for supplying fluid directly from the tank in case of cavitation. The generic valve can also provide this function by actuating the corresponding cylinder-to-tank sub-valves open when the system pressure is below a certain level.
©2002 CRC Press LLC
References 1.Anderson, W.R., Controlling Electrohydraulic Systems, Marcel Dekker, New York, NY, 1988. 2.Book, R. and Goering, C.E., Programmable electrohydraulic valve, SAE 1999 Transactions, Journal of Commercial Vehicles (1997), Section 2, 108:346–352. 3.Borghi, M.G., Cantore, G., Milani, M., and Paoluzzi, R., Analysis of hydraulic components using computational fluid dynamics models, Proceedings of the Institution of Mechanical Engineers, Journal C (1998), 212:619–629. 4.Lambeck, R.P., Hydraulic Pumps and Motors: Selection and Application for Hydraulic Power Control Systems, Marcel Dekker, New York, NY, 1983. 5.Li, Z., Ge, Y., and Chen, Y., Hydraulic Components and Systems (in Chinese), Mechanical Industry Publishing, Beijing, China, 2000. 6.Hu, H., Zhang, Q., and Alleyne, A., Multi-function realization of a generic programmable E/H valve using flexible control logic, Proceedings of the Fifth International Conference on Fluid Power Transmission and Control (2001), International Academic Publishers, Beijing, China, pp. 107–110. 7.Merritt, H.E., Hydraulic Control Systems, John Wiley & Sons, New York, NY, 1967. 8.McCloy, D. and Martin, H.R., The Control of Fluid Power, John Wiley & Sons, New York, NY, 1973. 9.Passino, K.M. and Yurkovich, S., Fuzzy Control, Addition-Wesley, Menlo Park, CA, 1998. 10. Pedrycz, W., Fuzzy Control and Fuzzy Systems, 2nd edition, Wiley, New York, NY, 1993. 11. Reed, E.W. and Larman, I.S., Fluid Power with Microprocessor Control: An Introduction, PrenticeHall, New York, NY, 1985. 12. Skinner, S.C. and Long, R.J., Closed Loop Electrohydraulic Systems Manual, 2nd edition, Vickers, Rochester Hills, MI, 1998. 13. Viall, E.N. and Zhang, Q., Determining the discharge coefficient of a spool valve, Proceedings of the American Control Conference (2000), Chicago, IL, pp. 3600–3604. 14. Watton, J., Fluid Power Systems, Modeling, Simulation, Analog and Microcomputer Control, PrenticeHall, New York, NY, 1989. 15. Welty, J.R., Wicks, C.E., and Wilson, R.E., Fundamentals of Momentum, Heat, and Mass Transfer, 3rd edition, John Wiley & Sons, New York, NY, 1984. 16. Zhang, Q., Hydraulic linear actuator velocity control using a feedforward-plus-PID control, International Journal of Flexible Automation and Integrated Manufacturing (1999), 7:275–290. 17. Zhang, Q., Design of a generic fuzzy controller for electrohydraulic steering, Proceedings of the American Control Conference (2001), (in press).
©2002 CRC Press LLC
11 Electrical Engineering 11.1 11.2
Introduction Fundamentals of Electric Circuits Electric Power and Sign Convention • Circuit Elements and Their i-v Characteristics • Resistance and Ohm’s Law • Practical Voltage and Current Sources • Measuring Devices
11.3
Resistive Network Analysis The Node Voltage Method • The Mesh Current Method • One-Port Networks and Equivalent Circuits • Nonlinear Circuit Elements
11.4
Giorgio Rizzoni Ohio State University
AC Network Analysis Energy-Storage (Dynamic) Circuit Elements • TimeDependent Signal Sources • Solution of Circuits Containing Dynamic Elements • Phasors and Impedance
11.1 Introduction The role played by electrical and electronic engineering in mechanical systems has dramatically increased in importance in the past two decades, thanks to advances in integrated circuit electronics and in materials that have permitted the integration of sensing, computing, and actuation technology into industrial systems and consumer products. Examples of this integration revolution, which has been referred to as a new field called Mechatronics, can be found in consumer electronics (auto-focus cameras, printers, microprocessor-controlled appliances), in industrial automation, and in transportation systems, most notably in passenger vehicles. The aim of this chapter is to review and summarize the foundations of electrical engineering for the purpose of providing the practicing mechanical engineer a quick and useful reference to the different fields of electrical engineering. Special emphasis has been placed on those topics that are likely to be relevant to product design.
11.2 Fundamentals of Electric Circuits This section presents the fundamental laws of circuit analysis and serves as the foundation for the study of electrical circuits. The fundamental concepts developed in these first pages will be called on through the chapter. The fundamental electric quantity is charge, and the smallest amount of charge that exists is the charge carried by an electron, equal to
q e = – 1.602 × 10
– 19
coulomb
(11.1)
As you can see, the amount of charge associated with an electron is rather small. This, of course, has to do with the size of the unit we use to measure charge, the coulomb (C), named after Charles Coulomb. However, the definition of the coulomb leads to an appropriate unit when we define electric current,
©2002 CRC Press LLC
since current consists of the flow of very large numbers of charge particles. The other charge-carrying particle in an atom, the proton, is assigned a positive sign and the same magnitude. The charge of a proton is
q p = +1.602 × 10
– 19
coulomb
(11.2)
Electrons and protons are often referred to as elementary charges. Electric current is defined as the time rate of change of charge passing through a predetermined area. If we consider the effect of the enormous number of elementary charges actually flowing, we can write this relationship in differential form:
dq i = ----dt ( C/sec )
(11.3)
The units of current are called amperes (A), where 1 A = 1 C/sec. The electrical engineering convention states that the positive direction of current flow is that of positive charges. In metallic conductors, however, current is carried by negative charges; these charges are the free electrons in the conduction band, which are only weakly attracted to the atomic structure in metallic elements and are therefore easily displaced in the presence of electric fields. In order for current to flow there must exist a closed circuit. Figure 11.1 depicts a simple circuit, composed of a battery (e.g., a dry-cell or alkaline 1.5-V battery) and a light bulb. Note that in the circuit of Fig. 11.1, the current, i, flowing from the battery to the resistor is equal to the current flowing from the light bulb to the battery. In other words, no current (and therefore no charge) is “lost” around the closed circuit. This principle was observed by the German scientist G.R. Kirchhoff and is now known as Kirchhoff ’s current law (KCL). KCL states that because charge cannot be created but must be conserved, the sum of the currents at a node must equal zero (in an electrical circuit, a node is the junction of two or more conductors). Formally: N
∑i
n
= 0 Kirchhoff’s current law
(11.4)
n=1
The significance of KCL is illustrated in Fig. 11.2, where the simple circuit of Fig. 11.2 has been augmented by the addition of two light bulbs (note how the two nodes that exist in this circuit have been emphasized by the shaded areas). In applying KCL, one usually defines currents entering a node as being negative and currents exiting the node as being positive. Thus, the resulting expression for the circuit of Fig. 11.2 is
i + i1 + i2 + i3 = 0 Charge moving in an electric circuit gives rise to a current, as stated in the preceding section. Naturally, it must take some work, or energy, for the charge to move between two points in a circuit, say, from point a to point b. The total work per unit charge associated with the motion of charge between two
FIGURE 11.1
A simple electrical circuit.
©2002 CRC Press LLC
FIGURE 11.2
Illustration of Kirchhoff ’s current law.
FIGURE 11.3
Voltages around a circuit.
points is called voltage. Thus, the units of voltage are those of energy per unit charge:
1 joule 1 volt = -------------------coulomb
(11.5)
The voltage, or potential difference, between two points in a circuit indicates the energy required to move charge from one point to the other. As will be presently shown, the direction, or polarity, of the voltage is closely tied to whether energy is being dissipated or generated in the process. The seemingly abstract concept of work being done in moving charges can be directly applied to the analysis of electrical circuits; consider again the simple circuit consisting of a battery and a light bulb. The circuit is drawn again for convenience in Fig. 11.3, and nodes are defined by the letters a and b. A series of carefully conducted experimental observations regarding the nature of voltages in an electric circuit led Kirchhoff to the formulation of the second of his laws, Kirchhoff ’s voltage law, or KVL. The principle underlying KVL is that no energy is lost or created in an electric circuit; in circuit terms, the sum of all voltages associated with sources must equal the sum of the load voltages, so that the net voltage around a closed circuit is zero. If this were not the case, we would need to find a physical explanation for the excess (or missing) energy not accounted for in the voltages around a circuit. KVL may be stated in a form similar to that used for KCL: N
∑v
n
= 0 Kirchhoff’s voltage law
(11.6)
n=1
where the vn are the individual voltages around the closed circuit. Making reference to Fig. 11.3, we can see that it must follow from KVL that the work generated by the battery is equal to the energy dissipated in the light bulb to sustain the current flow and to convert the electric energy to heat and light:
v ab = – v ba or
v1 = v2 ©2002 CRC Press LLC
FIGURE 11.4
Sources and loads in an electrical circuit.
One may think of the work done in moving a charge from point a to point b and the work done moving it back from b to a as corresponding directly to the voltages across individual circuit elements. Let Q be the total charge that moves around the circuit per unit time, giving rise to the current i. Then the work done in moving Q from b to a (i.e., across the battery) is
W ba = Q × 1.5 V
(11.7)
Similarly, work is done in moving Q from a to b, that is, across the light bulb. Note that the word potential is quite appropriate as a synonym of voltage, in that voltage represents the potential energy between two points in a circuit: if we remove the light bulb from its connections to the battery, there still exists a voltage across the (now disconnected) terminals b and a. A moment’s reflection upon the significance of voltage should suggest that it must be necessary to specify a sign for this quantity. Consider, again, the same dry-cell or alkaline battery, where, by virtue of an electrochemically induced separation of charge, a 1.5-V potential difference is generated. The potential generated by the battery may be used to move charge in a circuit. The rate at which charge is moved once a closed circuit is established (i.e., the current drawn by the circuit connected to the battery) depends now on the circuit element we choose to connect to the battery. Thus, while the voltage across the battery represents the potential for providing energy to a circuit, the voltage across the light bulb indicates the amount of work done in dissipating energy. In the first case, energy is generated; in the second, it is consumed (note that energy may also be stored, by suitable circuit elements yet to be introduced). This fundamental distinction required attention in defining the sign (or polarity) of voltages. We shall, in general, refer to elements that provide energy as sources, and to elements that dissipate energy as loads. Standard symbols for a generalized source-and-load circuit are shown in Fig. 11.4. Formal definitions will be given in a later section.
Electric Power and Sign Convention The definition of voltage as work per unit charge lends itself very conveniently to the introduction of power. Recall that power is defined as the work done per unit time. Thus, the power, P, either generated or dissipated by a circuit element can be represented by the following relationship:
work charge work --------------------------- --------------Power = ----------time = unit charge time = voltage × current
(11.8)
Thus, the electrical power generated by an active element, or that dissipated or stored by a passive element, is equal to the product of the voltage across the element and the current flowing through it.
P = VI
(11.9)
It is easy to verify that the units of voltage (joules/coulomb) times current (coulombs/second) are indeed those of power (joules/second, or watts). ©2002 CRC Press LLC
FIGURE 11.5
The passive sign convention.
It is important to realize that, just like voltage, power is a signed quantity, and that it is necessary to make a distinction between positive and negative power. This distinction can be understood with reference to Fig. 11.5, in which a source and a load are shown side by side. The polarity of the voltage across the source and the direction of the current through it indicate that the voltage source is doing work in moving charge from a lower potential to a higher potential. On the other hand, the load is dissipating energy, because the direction of the current indicates that charge is being displaced from a higher potential to a lower potential. To avoid confusion with regard to the sign of power, the electrical engineering community uniformly adopts the passive sign convention, which simply states that the power dissipated by a load is a positive quantity (or, conversely, that the power generated by a source is a positive quantity). Another way of phrasing the same concept is to state that if current flows from a higher to a lower voltage (+ to –), the power dissipated will be a positive quantity.
Circuit Elements and Their i-v Characteristics The relationship between current and voltage at the terminals of a circuit element defines the behavior of that element within the circuit. In this section, we shall introduce a graphical means of representing the terminal characteristics of circuit elements. Figure 11.6 depicts the representation that will be employed throughout the chapter to denote a generalized circuit element: the variable i represents the current flowing through the element, while v is the potential difference, or voltage, across the element. Suppose now that a known voltage were imposed across a circuit FIGURE 11.6 Generalized repreelement. The current that would flow as a consequence of this voltage, sentation of circuit elements. and the voltage itself, form a unique pair of values. If the voltage applied to the element were varied and the resulting current measured, it would be possible to construct a functional relationship between voltage and current known as the i-v characteristic (or volt-ampere characteristic). Such a relationship defines the circuit element, in the sense that if we impose any prescribed voltage (or current), the resulting current (or voltage) is directly obtainable from the i-v characteristic. A direct consequence is that the power dissipated (or generated) by the element may also be determined from the i-v curve. The i-v characteristics of ideal current and voltage sources can also be useful in visually representing their behavior. An ideal voltage source generates a prescribed voltage independent of the current drawn from the load; thus, its i-v characteristic is a straight vertical line with a voltage axis intercept corresponding to the source voltage. Similarly, the i-v characteristic of an ideal current source is a horizontal line with a current axis intercept corresponding to the source current. Figure 11.7 depicts this behavior.
Resistance and Ohm’s Law When electric current flows through a metal wire or through other circuit elements, it encounters a certain amount of resistance, the magnitude of which depends on the electrical properties of the material. Resistance to the flow of current may be undesired—for example, in the case of lead wires and connection ©2002 CRC Press LLC
0066_Frame_C11 Page 6 Wednesday, January 9, 2002 4:14 PM
FIGURE 11.7
i-v characteristics of ideal sources.
FIGURE 11.8
The resistance element.
cable—or it may be exploited in an electrical circuit in a useful way. Nevertheless, practically all circuit elements exhibit some resistance; as a consequence, current flowing through an element will cause energy to be dissipated in the form of heat. An ideal resistor is a device that exhibits linear resistance properties according to Ohm’s law, which states that
V = IR
(11.10)
that is, that the voltage across an element is directly proportional to the current flow through it. R is the value of the resistance in units of ohms (Ω), where
1 Ω = 1 V/A
(11.11)
The resistance of a material depends on a property called resistivity, denoted by the symbol ρ; the inverse of resistivity is called conductivity and is denoted by the symbol σ. For a cylindrical resistance element (shown in Fig. 11.8), the resistance is proportional to the length of the sample, l, and inversely proportional to its cross-sectional area, A, and conductivity, σ.
1 v = -------i sA
(11.12)
It is often convenient to define the conductance of a circuit element as the inverse of its resistance. The symbol used to denote the conductance of an element is G, where
1 G = --- siemens (S), where 1 S = 1 A/V R ©2002 CRC Press LLC
(11.13)
0066_Frame_C11 Page 7 Wednesday, January 9, 2002 4:14 PM
TABLE 11.1
1
1
1
Common Resistor Values ( /8-, /4-, /2-, 1-, 2-W Rating)
Ω
Code
Ω
Multiplier
kΩ
Multiplier
kΩ
Multiplier
kΩ
Multiplier
10 12 15 18 22 27 33 39 47 56 68 82
Brn-blk-blk Brn-red-blk Brn-grn-blk Brn-gry-blk Red-red-blk Red-vlt-blk Org-org-blk Org-wht-blk Ylw-vlt-blk Grn-blu-blk Blu-gry-blk Gry-red-blk
100 120 150 180 220 270 330 390 470 560 680 820
Brown Brown Brown Brown Brown Brown Brown Brown Brown Brown Brown Brown
1.0 1.2 1.5 1.8 2.2 2.7 3.3 3.9 4.7 5.6 6.8 8.2
Red Red Red Red Red Red Red Red Red Red Red Red
10 12 15 18 22 27 33 39 47 56 68 82
Orange Orange Orange Orange Orange Orange Orange Orange Orange Orange Orange Orange
100 120 150 180 220 270 330 390 470 560 680 820
Yellow Yellow Yellow Yellow Yellow Yellow Yellow Yellow Yellow Yellow Yellow Yellow
FIGURE 11.9
Resistor color code.
Thus, Ohm’s law can be rested in terms of conductance, as
I = GV
(11.14)
Ohm’s law is an empirical relationship that finds widespread application in electrical engineering because of its simplicity. It is, however, only an approximation of the physics of electrically conducting materials. Typically, the linear relationship between voltage and current in electrical conductors does not apply at very high voltages and currents. Further, not all electrically conducting materials exhibit linear behavior even for small voltages and currents. It is usually true, however, that for some range of voltages and currents, most elements display a linear i-v characteristic. The typical construction and the circuit symbol of the resistor are shown in Fig. 11.8. Resistors made –5 of cylindrical sections of carbon (with resistivity ρ = 3.5 × 10 Ω m) are very common and are commercially available in a wide range of values for several power ratings (as will be explained shortly). Another commonly employed construction technique for resistors employs metal film. A common power rating for resistors used in electronic circuits (e.g., in most consumer electronic appliances such as radios and television sets) is 1--4 W. Table 11.1 lists the standard values for commonly used resistors and the color code associated with these values (i.e., the common combinations of the digits b1b2b3 as defined in Fig. 11.9. For example, if the first three color bands on a resistor show the colors red (b1 = 2), violet (b2 = 7), and yellow (b3 = 4), the resistance value can be interpreted as follows:
R = 27 × 10 = 270,000 Ω = 270 kΩ 4
In Table 11.1, the leftmost column represents the complete color code; columns to the right of it only show the third color, since this is the only one that changes. For example, a 10-Ω resistor has the code brown-black-black, while a 100-Ω resistor has brown-black-brown. ©2002 CRC Press LLC
0066_Frame_C11 Page 8 Wednesday, January 9, 2002 4:14 PM
In addition to the resistance in ohms, the maximum allowable power dissipation (or power rating) is typically specified for commercial resistors. Exceeding this power rating leads to overheating and can cause the resistor to literally start on fire. For a resistor R, the power dissipated is given by 2
V 2 P = VI = I R = ----R
(11.15)
That is, the power dissipated by a resistor is proportional to the square of the current flowing through it, as well as the square of the voltage across it. The following example illustrates a common engineering application of resistive elements: the resistance strain gauge. Example 11.1 Resistance Strain Gauges A common application of the resistance concept to engineering measurements is the resistance strain gauge. Strain gauges are devices that are bonded to the surface of an object, and whose resistance varies as a function of the surface strain experienced by the object. Strain gauges may be used to perform measurements of strain, stress, force, torque, and pressure. Recall that the resistance of a cylindrical conductor of cross-sectional area A, length L, and conductivity σ is given by the expression
L R = ------sA If the conductor is compressed or elongated as a consequence of an external force, its dimensions will change, and with them its resistance. In particular, if the conductor is stretched, its cross-sectional area will decrease and the resistance will increase. If the conductor is compressed, its resistance decreases, since the length, L, will decrease. The relationship between change in resistance and change in length is given by the gauge factor, G, defined by
∆R/R G = ------------∆L/L and since the strain ε is defined as the fractional change in length of an object by the formula
∆L e = ------L the change in resistance due to an applied strain ε is given by the expression
∆R = R 0 Ge where R0 is the resistance of the strain gauge under no strain and is called the zero strain resistance. The value of G for resistance strain gauges made of metal foil is usually about 2. Figure 11.10 depicts a typical foil strain gauge. The maximum strain that can be measured by a foil gauge is about 0.4–0.5%; that is, ∆L/L = 0.004 to 0.005. For a 120-Ω gauge, this corresponds to a change in resistance of the order of 0.96–1.2 Ω. Although this change in resistance is very small, it can be detected by means of suitable circuitry. Resistance strain gauges are usually connected in a circuit called the Wheatstone bridge, which we analyze later in this section. Open and Short Circuits Two convenient idealizations of the resistance element are provided by the limiting cases of Ohm’s law as the resistance of a circuit element approaches zero or infinity. A circuit element with resistance approaching zero is called a short circuit. Intuitively, one would expect a short circuit to allow for unimpeded flow of current. In fact, metallic conductors (e.g., short wires of large diameter) approximate the behavior of a short circuit. Formally, a short circuit is defined as a circuit element across which the voltage is zero, regardless of the current flowing through it. Figure 11.11 depicts the circuit symbol for an ideal short circuit. ©2002 CRC Press LLC
0066_Frame_C11 Page 9 Wednesday, January 9, 2002 4:14 PM
TABLE 11.2
Resistance of Copper Wire
AWG Size
Number of Strands
Diameter per Strand
Resistance per 1000 ft (Ω)
24 24 22 22 20 20 18 18 16 16
Solid 7 Solid 7 Solid 7 Solid 7 Solid 19
0.0201 0.0080 0.0254 0.0100 0.0320 0.0126 0.0403 0.0159 0.0508 0.0113
28.4 28.4 18.0 19.0 11.3 11.9 7.2 7.5 4.5 4.7
FIGURE 11.10
The resistance strain gauge.
FIGURE 11.11
The short circuit.
FIGURE 11.12
The open circuit.
Physically, any wire or other metallic conductor will exhibit some resistance, though small. For practical purposes, however, many elements approximate a short circuit quite accurately under certain conditions. For example, a large-diameter copper pipe is effectively a short circuit in the context of a residential electrical power supply, while in a low-power microelectronic circuit (e.g., an FM radio) a short length of 24 gauge wire (refer to Table 11.2 for the resistance of 24 gauge wire) is a more than adequate short circuit. A circuit element whose resistance approaches infinity is called an open circuit. Intuitively, one would expect no current to flow through an open circuit, since it offers infinite resistance to any current. In an open circuit, we would expect to see zero current regardless of the externally applied voltage. Figure 11.12 illustrates this idea. ©2002 CRC Press LLC
0066_Frame_C11 Page 10 Wednesday, January 9, 2002 4:14 PM
FIGURE 11.13
Voltage divider rule.
In practice, it is not too difficult to approximate an open circuit; any break in continuity in a conducting path amounts to an open circuit. The idealization of the open circuit, as defined in Fig. 11.12, does not hold, however, for very high voltages. The insulating material between two insulated terminals will break down at a sufficiently high voltage. If the insulator is air, ionized particles in the neighborhood of the two conducting elements may lead to the phenomenon of arcing; in other words, a pulse of current may be generated that momentarily jumps a gap between conductors (thanks to this principle, we are able to ignite the air-fuel mixture in a spark-ignition internal combustion engine by means of spark plugs). The ideal open and short circuits are useful concepts and find extensive use in circuit analysis. Series Resistors and the Voltage Divider Rule Although electrical circuits can take rather complicated forms, even the most involved circuits can be reduced to combinations of circuit elements in parallel and in series. Thus, it is important that you become acquainted with parallel and series circuits as early as possible, even before formally approaching the topic of network analysis. Parallel and series circuits have a direct relationship with Kirchhoff’s laws. The objective of this section and the next is to illustrate two common circuits based on series and parallel combinations of resistors: the voltage and current dividers. These circuits form the basis of all network analysis; it is therefore important to master these topics as early as possible. For an example of a series circuit, refer to the circuit of Fig. 11.13, where a battery has been connected to resistors R1, R2, and R3. The following definition applies. Definition Two or more circuit elements are said to be in series if the same current flows through each of the elements. The three resistors could thus be replaced by a single resistor of value REQ without changing the amount of current required of the battery. From this result we may extrapolate to the more general relationship defining the equivalent resistance of N series resistors: N
R EQ =
∑R
n
(11.16)
n=1
which is also illustrated in Fig. 11.13. A concept very closely tied to series resistors is that of the voltage divider. ©2002 CRC Press LLC
0066_Frame_C11 Page 11 Wednesday, January 9, 2002 4:14 PM
FIGURE 11.14
Parallel circuits.
The general form of the voltage divider rule for a circuit with N series resistors and a voltage source is
Rn -v v n = -----------------------------------------------------------------R1 + R2 + … + Rn + … + RN S
(11.17)
Parallel Resistors and the Current Divider Rule A concept analogous to that of the voltage may be developed by applying Kirchhoff ’s current law to a circuit containing only parallel resistances. Definition Two or more circuit elements are said to be in parallel if the same voltage appears across each of the elements. (See Fig. 11.14.) N resistors in parallel act as a single equivalent resistance, REQ , given by the expression
1 1 1 1 -------- = ----- + ----- + … + -----R EQ R1 R2 RN
(11.18)
1 R EQ = ---------------------------------------------------------1/R 1 + 1/R 2 + … + 1/R N
(11.19)
or
Very often in the remainder of this book we shall refer to the parallel combination of two or more resistors with the following notation:
R 1 || R 2 || … where the symbol || signifies “in parallel with.” The general expression for the current divider for a circuit with N parallel resistors is the following:
1/R n - i Current divider i n = ---------------------------------------------------------------------------------------1/R 1 + 1/R 2 + … + 1/R n + … + 1/R N S
(11.20)
Example 11.2 The Wheatstone Bridge The Wheatstone bridge is a resistive circuit that is frequently encountered in a variety of measurement circuits. The general form of the bridge is shown in Fig. 11.15(a), where R1, R2, and R3 are known, while Rx is an unknown resistance, to be determined. The circuit may also be redrawn as shown in Fig. 11.15(b). The latter circuit will be used to demonstrate the use of the voltage divider rule in a mixed series-parallel circuit. ©2002 CRC Press LLC
0066_Frame_C11 Page 12 Wednesday, January 9, 2002 4:14 PM
FIGURE 11.15
Wheatstone bridge circuits.
The objective is to determine the unknown resistance Rx. 1. Find the value of the voltage vad = vad – vbd in terms of the four resistances and the source voltage, vS. Note that since the reference point d is the same for both voltages, we can also write vab = va – vb. 2. If R1 = R2 = R3 = 1 kΩ, vS = 12 V, and vab = 12 mV, what is the value of Rx? Solution 1. First, we observe that the circuit consists of the parallel combination of three subcircuits: the voltage source, the series combination of R1 and R2, and the series combination of R3 and Rx. Since these three subcircuits are in parallel, the same voltage will appear across each of them, namely, the source voltage, vS. Thus, the source voltage divides between each resistor pair, R1-R2 and R3-Rx, according to the voltage divider rule: va is the fraction of the source voltage appearing across R2, while vb is the voltage appearing across Rx:
R2 Rx - and v b = v S ---------------v a = v S ---------------R1 + R2 R3 + Rx Finally, the voltage difference between points a and b is given by
R2 Rx v ab = v a – v b = v S ---------------- – ---------------- R1 + R2 R3 + Rx This result is very useful and quite general, and it finds application in numerous practical circuits. 2. In order to solve for the unknown resistance, we substitute the numerical values in the preceding equation to obtain
Rx 1000 - 0.012 = 12 ----------- – ---------------------- 2000 1000 + R x which may be solved for Rx to yield
R x = 996 Ω
Practical Voltage and Current Sources Idealized models of voltage and current sources fail to take into consideration the finite-energy nature of practical voltage and current sources. The objective of this section is to extend the ideal models to models that are capable of describing the physical limitations of the voltage and current sources used in practice. Consider, for example, the model of an ideal voltage source. As the load resistance (R) decreases, the source is required to provide increasing amounts of current to maintain the voltage vS (t) across ©2002 CRC Press LLC
0066_Frame_C11 Page 13 Wednesday, January 9, 2002 4:14 PM
FIGURE 11.16
Practical voltage source.
FIGURE 11.17
Practical current source.
its terminal:
vS ( t ) i ( t ) = ---------R
(11.21)
This circuit suggests that the ideal voltage source is required to provide an infinite amount of current to the load, in the limit as the load resistance approaches zero. Figure 11.16 depicts a model for a practical voltage source; this is composed of an ideal voltage source, vS, in series with a resistance, rS. The resistance rS in effect poses a limit to the maximum current the voltage source can provide:
v i S max = ----S rS
(11.22)
It should be apparent that a desirable feature of an ideal voltage source is a very small internal resistance, so that the current requirements of an arbitrary load may be satisfied. A similar modification of the ideal current source model is useful to describe the behavior of a practical current source. The circuit illustrated in Fig. 11.17 depicts a simple representation of a practical current source, consisting of an ideal source in parallel with a resistor. Note that as the load resistance approaches infinity (i.e., an open circuit), the output voltage of the current source approaches its limit,
v S max = i S r S
(11.23)
A good current source should be able to approximate the behavior of an ideal current source. Therefore, a desirable characteristic for the internal resistance of a current source is that it be as large as possible. ©2002 CRC Press LLC
0066_Frame_C11 Page 14 Wednesday, January 9, 2002 4:14 PM
Measuring Devices The Ammeter The ammeter is a device that, when connected in series with a circuit element, can measure the current flowing through the element. Figure 11.18 illustrates this idea. From Fig. 11.18, two requirements are evident for obtaining a correct measurement of current: 1. The ammeter must be placed in series with the element whose current is to be measured (e.g., resistor R2). 2. The ammeter should not resist the flow of current (i.e., cause a voltage drop), or else it will not be measuring the true current flowing the circuit. An ideal ammeter has zero internal resistance. The Voltmeter The voltmeter is a device that can measure the voltage across a circuit element. Since voltage is the difference in potential between two points in a circuit, the voltmeter needs to be connected across the element whose voltage we wish to measure. A voltmeter must also fulfill two requirements: 1. The voltmeter must be placed in parallel with the element whose voltage it is measuring. 2. The voltmeter should draw no current away from the element whose voltage it is measuring, or else it will not be measuring the true voltage across that element. Thus, an ideal voltmeter has infinite internal resistance. Figure 11.19 illustrates these two points. Once again, the definitions just stated for the ideal voltmeter and ammeter need to be augmented by considering the practical limitations of the devices. A practical ammeter will contribute some series resistance to the circuit in which it is measuring current; a practical voltmeter will not act as an ideal open circuit but will always draw some current from the measured circuit. Figure 11.20 depicts the circuit models for the practical ammeter and voltmeter.
FIGURE 11.18
Measurement of current.
FIGURE 11.19
Measurement of voltage.
©2002 CRC Press LLC
0066_Frame_C11 Page 15 Wednesday, January 9, 2002 4:14 PM
FIGURE 11.20 Models for practical ammeter and voltmeter.
FIGURE 11.21
Measurement of power.
All of the considerations that pertain to practical ammeters and voltmeters can be applied to the operation of a wattmeter, a measuring instrument that provides a measurement of the power dissipated by a circuit element, since the wattmeter is in effect made up of a combination of a voltmeter and an ammeter. Figure 11.21 depicts the typical connection of a wattmeter in the same series circuit used in the preceding paragraphs. In effect, the wattmeter measures the current flowing through the load and, simultaneously, the voltage across it multiplies the two to provide a reading of the power dissipated by the load.
11.3 Resistive Network Analysis This section will illustrate the fundamental techniques for the analysis of resistive circuits. The methods introduced are based on Kirchhoff ’s and Ohm’s laws. The main thrust of the section is to introduce and illustrate various methods of circuit analysis that will be applied throughout the book.
The Node Voltage Method Node voltage analysis is the most general method for the analysis of electrical circuits. In this section, its application to linear resistive circuits will be illustrated. The node voltage method is based on defining the voltage at each node as an independent variable. One of the nodes is selected as a reference node (usually—but not necessarily—ground), and each of the other node voltages is referenced to this node. Once each node voltage is defined, Ohm’s law may be applied between any two adjacent nodes in order to determine the current flowing in each branch. In the node voltage method, each branch current is expressed in terms of one or more node voltages; thus, currents do not explicitly enter into the equations. Figure 11.22 illustrates how one defines branch currents in this method. ©2002 CRC Press LLC
0066_Frame_C11 Page 16 Wednesday, January 9, 2002 4:14 PM
FIGURE 11.22 analysis.
Branch current formulation in nodal
FIGURE 11.23
Use of KCL in nodal analysis.
Once each branch current is defined in terms of the node voltages, Kirchhoff ’s current law is applied at each node. The particular form of KCL employed in the nodal analysis equates the sum of the currents into the node to the sum of the currents leaving the node:
∑i
in
=
∑i
out
(11.24)
Figure 11.23 illustrates this procedure. The systematic application of this method to a circuit with n nodes would lead to writing n linear equations. However, one of the node voltages is the reference voltage and is therefore already known, since it is usually assumed to be zero. Thus, we can write n – 1 independent linear equations in the n – 1 independent variables (the node voltages). Nodal analysis provides the minimum number of equations required to solve the circuit, since any branch voltage or current may be determined from knowledge of nodal voltages. The nodal analysis method may also be defined as a sequence of steps, as outlined below. Node Voltage Analysis Method 1. Select a reference node (usually ground). All other node voltages will be referenced to this node. 2. Define the remaining n – 1 node voltages as the independent variables. 3. Apply KCL at each of the n – 1 nodes, expressing each current in terms of the adjacent node voltages. 4. Solve the linear system of n – 1 equations in n – 1 unknowns. In a circuit containing n nodes we can write at most n – 1 independent equations.
The Mesh Current Method In the mesh current method, we observe that a current flowing through a resistor in a specified direction defines the polarity of the voltage across the resistor, as illustrated in Fig. 11.24, and that the sum of the voltages around a closed circuit must equal zero, by KVL. Once a convention is established regarding the direction of current flow around a mesh, simple application of KVL provides the desired equation. Figure 11.25 illustrates this point. ©2002 CRC Press LLC
0066_Frame_C11 Page 17 Wednesday, January 9, 2002 4:14 PM
FIGURE 11.24
Basic principle of mesh analysis.
FIGURE 11.25
Use of KVL in mesh analysis.
FIGURE 11.26
One-port network.
The number of equations one obtains by this technique is equal to the number of meshes in the circuit. All branch currents and voltages may subsequently be obtained from the mesh currents, as will presently be shown. Since meshes are easily identified in a circuit, this method provides a very efficient and systematic procedure for the analysis of electrical circuits. The following section outlines the procedure used in applying the mesh current method to a linear circuit. Mesh Current Analysis Method 1. Define each mesh current consistently. We shall always define mesh currents clockwise, for convenience. 2. Apply KVL around each mesh, expressing each voltage in terms of one or more mesh currents. 3. Solve the resulting linear system of equations with mesh currents as the independent variables. In mesh analysis, it is important to be consistent in choosing the direction of current flow. To avoid confusion in writing the circuit equations, mesh currents will be defined exclusively clockwise when we are using this method.
One-Port Networks and Equivalent Circuits This general circuit representation is shown in Fig. 11.26. This configuration is called a one-port network and is particularly useful for introducing the notion of equivalent circuits. Note that the network of Fig. 11.26 is completely described by its i-v characteristic. Thévenin and Norton Equivalent Circuits This section discusses one of the most important topics in the analysis of electrical circuits: the concept of an equivalent circuit. It will be shown that it is always possible to view even a very complicated circuit in terms of much simpler equivalent source and load circuits, and that the transformations leading to equivalent circuits are easily managed, with a little practice. In studying node voltage and mesh current analysis, you may have observed that there is a certain correspondence (called duality) between current sources and voltage sources, on the one hand, and parallel and series circuits, on the other. This duality appears again very clearly in the analysis of equivalent circuits: it will shortly be shown that equivalent circuits fall into one of two classes, involving either voltage or current sources and (respectively) either ©2002 CRC Press LLC
0066_Frame_C11 Page 18 Wednesday, January 9, 2002 4:14 PM
FIGURE 11.27 Illustration of Thévenin theorem.
FIGURE 11.28 Illustration of Norton theorem.
FIGURE 11.29
Computation of Thévenin resistance.
series or parallel resistors, reflecting this same principle of duality. The discussion of equivalent circuits begins with the statement of two very important theorems, summarized in Figs. 11.27 and 11.28. The Thévenin Theorem As far as a load is concerned, any network composed of ideal voltage and current sources, and of linear resistors, may be represented by an equivalent circuit consisting of an ideal voltage source, vT , in series with an equivalent resistance, RT . The Norton Theorem As far as a load is concerned, any network composed of ideal voltage and current sources, and of linear resistors, may be represented by an equivalent circuit consisting of an ideal current source, iN, in parallel with an equivalent resistance, RN . Determination of Norton or Thévenin Equivalent Resistance The first step in computing a Thévenin or Norton equivalent circuit consists of finding the equivalent resistance presented by the circuit at its terminals. This is done by setting all sources in the circuit equal to zero and computing the effective resistance between terminals. The voltage and current sources present in the circuit are set to zero as follows: voltage sources are replaced by short circuits, current sources by open circuits. We can produce a set of simple rules as an aid in the computation of the Thévenin (or Norton) equivalent resistance for a linear resistive circuit. Computation of Equivalent Resistance of a One-Port Network: 1. Remove the load. 2. Zero all voltage and current sources 3. Compute the total resistance between load terminals, with the load removed. This resistance is equivalent to that which would be encountered by a current source connected to the circuit in place of the load. For example, the equivalent resistance of the circuit of Fig. 11.29 as seen by the load is:
Req = ((2 || 2) + 1) || 2 = 1 Ω. ©2002 CRC Press LLC
0066_Frame_C11 Page 19 Wednesday, January 9, 2002 4:14 PM
FIGURE 11.30
Equivalence of open-circuit and Thévenin voltage.
FIGURE 11.31
Illustration of Norton equivalent circuit.
Computing the Thévenin Voltage The Thévenin equivalent voltage is defined as follows: the equivalent (Thévenin) source voltage is equal to the open-circuit voltage present at the load terminals with the load removed. This states that in order to compute vT , it is sufficient to remove the load and to compute the opencircuit voltage at the one-port terminals. Figure 11.30 illustrates that the open-circuit voltage, vOC , and the Thévenin voltage, vT , must be the same if the Thévenin theorem is to hold. This is true because in the circuit consisting of vT and RT , the voltage vOC must equal vT , since no current flows through RT and therefore the voltage across RT is zero. Kirchhoff’s voltage law confirms that
v T = R T ( 0 ) + v OC = v OC
(11.25)
Computing the Norton Current The computation of the Norton equivalent current is very similar in concept to that of the Thévenin voltage. The following definition will serve as a starting point. Definition The Norton equivalent current is equal to the short-circuit current that would flow were the load replaced by a short circuit. An explanation for the definition of the Norton current is easily found by considering, again, an arbitrary one-port network, as shown in Fig. 11.31, where the one-port network is shown together with its Norton equivalent circuit. It should be clear that the current, iSC , flowing through the short circuit replacing the load is exactly the Norton current, iN, since all of the source current in the circuit of Fig. 11.31 must flow through the short circuit. Experimental Determination of Thévenin and Norton Equivalents Figure 11.32 illustrates the measurement of the open-circuit voltage and short-circuit current for an arbitrary network connected to any load and also illustrates that the procedure requires some special attention, because of the nonideal nature of any practical measuring instrument. The figure clearly illustrates that in the presence of finite meter resistance, rm, one must take this quantity into account in the computation of the short-circuit current and open-circuit voltage; vOC and iSC appear between quotation marks in the figure specifically to illustrate that the measured “open-circuit voltage” and “short-circuit current” are, in fact, affected by the internal resistance of the measuring instrument and are not the true quantities. ©2002 CRC Press LLC
0066_Frame_C11 Page 20 Wednesday, January 9, 2002 4:14 PM
FIGURE 11.32
Measurement of open-circuit voltage and short-circuit current.
FIGURE 11.33
i-v characteristic of exponential resistor.
The following are expressions for the true short-circuit current and open-circuit voltage.
rm i N = i SC 1 + ---- R T R v T = v OC 1 + -----T- rm
(11.26)
where iN is the ideal Norton current, vT the Thévenin voltage, and RT the true Thévenin resistance.
Nonlinear Circuit Elements Description of Nonlinear Elements There are a number of useful cases in which a simple functional relationship exists between voltage and current in a nonlinear circuit element. For example, Fig. 11.33 depicts an element with an exponential i-v characteristic, described by the following equations:
i = I0 e , v > 0 av
i = –I0 , ©2002 CRC Press LLC
v≤0
(11.27)
0066_Frame_C11 Page 21 Wednesday, January 9, 2002 4:14 PM
FIGURE 11.34 Representation of nonlinear element in a linear circuit.
There exists, in fact, a circuit element (the semiconductor diode) that very nearly satisfies this simple relationship. The difficulty in the i-v relationship of Eq. (11.27) is that it is not possible, in general, to obtain a closed-form analytical solution, even for a very simple circuit. One approach to analyzing a circuit containing a nonlinear element might be to treat the nonlinear element as a load, and to compute the Thévenin equivalent of the remaining circuit, as shown in Fig. 11.34. Applying KVL, the following equation may then be obtained:
vT = RT ix + vx
(11.28)
To obtain the second equation needed to solve for both the unknown voltage, vx, and the unknown current, ix, it is necessary to resort to the i-v description of the nonlinear element, namely, Eq. (11.27). If, for the moment, only positive voltages are considered, the circuit is completely described by the following system:
ix = I0 e
an x
, v > 0
vT = RT ix + vx
(11.29)
The two parts of Eq. (11.29) represent a system of two equations in two unknowns. Any numerical method of choice may now be applied to solve the system of Eqs. (11.29).
11.4 AC Network Analysis In this section we introduce energy-storage elements, dynamic circuits, and the analysis of circuits excited by sinusoidal voltages and currents. Sinusoidal (or AC) signals constitute the most important class of signals in the analysis of electrical circuits. The simplest reason is that virtually all of the electric power used in households and industries comes in the form of sinusoidal voltages and currents.
Energy-Storage (Dynamic) Circuit Elements The ideal resistor was introduced through Ohm’s law in Section 11.2 as a useful idealization of many practical electrical devices. However, in addition to resistance to the flow of electric current, which is purely a dissipative (i.e., an energy-loss) phenomenon, electric devices may also exhibit energy-storage properties, much in the same way a spring or a flywheel can store mechanical energy. Two distinct mechanisms for energy storage exist in electric circuits: capacitance and inductance, both of which lead to the storage of energy in an electromagnetic field. The Ideal Capacitor A physical capacitor is a device that can store energy in the form of a charge separation when appropriately polarized by an electric field (i.e., a voltage). The simplest capacitor configuration consists of two parallel ©2002 CRC Press LLC
0066_Frame_C11 Page 22 Wednesday, January 9, 2002 4:14 PM
FIGURE 11.35
Structure of parallel-plate capacitor. ∗
conducting plates of cross-sectional area A, separated by air (or another dielectric material, such as mica or Teflon). Figure 11.35 depicts a typical configuration and the circuit symbol for a capacitor. The presence of an insulating material between the conducting plates does not allow for the flow of DC current; thus, a capacitor acts as an open circuit in the presence of DC currents. However, if the voltage present at the capacitor terminals changes as a function of time, so will the charge that has accumulated at the two capacitor plates, since the degree of polarization is a function of the applied electric field, which is time-varying. In a capacitor, the charge separation caused by the polarization of the dielectric is proportional to the external voltage, that is, to the applied electric field:
Q = CV
(11.30)
where the parameter C is called the capacitance of the element and is a measure of the ability of the device to accumulate, or store, charge. The unit of capacitance is the coulomb/volt and is called the farad −6 (F). The farad is an unpractically large unit; therefore, it is common to use microfarads (1 µF = 10 F) –12 or picofarads (1 pF = 10 F). From Eq. (11.30) it becomes apparent that if the external voltage applied to the capacitor plates changes in time, so will the charge that is internally stored by the capacitor:
q ( t ) = Cv ( t )
(11.31)
Thus, although no current can flow through a capacitor if the voltage across it is constant, a time-varying voltage will cause charge to vary in time. The change with time in the stored charge is analogous to a current. The relationship between the current and voltage in a capacitor is as follows:
dv ( t ) i ( t ) = C -----------dt
(11.32)
If the above differential equation is integrated, one can obtain the following relationship for the voltage across a capacitor:
1 v C ( t ) = --C
∫
t0
–∞
i C dt
(11.33)
Equation (11.33) indicates that the capacitor voltage depends on the past current through the capacitor, up until the present time, t. Of course, one does not usually have precise information regarding the flow ∗
A dielectric material contains a large number of electric dipoles, which become polarized in the presence of an electric field. ©2002 CRC Press LLC
0066_Frame_C11 Page 23 Wednesday, January 9, 2002 4:14 PM
FIGURE 11.36
Defining equation for the ideal capacitor, and analogy with force-mass system.
FIGURE 11.37
Combining capacitors in a circuit.
of capacitor current for all past time, and so it is useful to define the initial voltage (or initial condition) for the capacitor according to the following, where t0 is an arbitrary initial time:
1 V 0 = v C ( t = t 0 ) = --C
∫
t
–∞
i C dt
(11.34)
The capacitor voltage is now given by the expression
1 v C ( t ) = --C
∫
t
t0
i C dt + V 0 t ≥ t 0
(11.35)
The significance of the initial voltage, V0, is simply that at time t0 some charge is stored in the capacitor, giving rise to a voltage, vC (t0), according to the relationship Q = CV. Knowledge of this initial condition is sufficient to account for the entire past history of the capacitor current. (See Fig. 11.36.) From the standpoint of circuit analysis, it is important to point out that capacitors connected in series and parallel can be combined to yield a single equivalent capacitance. The rule of thumb, which is illustrated in Fig. 11.37, is the following: capacitors in parallel add; capacitors in series combine according to the same rules used for resistors connected in parallel. Physical capacitors are rarely constructed of two parallel plates separated by air, because this configuration yields very low values of capacitance, unless one is willing to tolerate very large plate areas. In order to increase the capacitance (i.e., the ability to store energy), physical capacitors are often made of tightly rolled sheets of metal film, with a dielectric (paper or Mylar) sandwiched in-between. Table 11.3 illustrates typical values, materials, maximum voltage ratings, and useful frequency ranges for various ©2002 CRC Press LLC
0066_Frame_C11 Page 24 Wednesday, January 9, 2002 4:14 PM
TABLE 11.3
Capacitors
Material
Capacitance Range
Maximum Voltage (V)
1 pF to 0.1 µF 10 pF to 1 µF 0.001 to 10 µF 1000 pF to 50 µF 0.1 µF to 0.2 F
100–600 50–1000 50–500 100–105 3–600
Mica Ceramic Mylar Paper Electrolytic
Frequency Range (Hz) 3
10
10 –10 3 10 10 –10 2 8 10 –10 2 8 10 –10 4 10–10
types of capacitors. The voltage rating is particularly important, because any insulator will break down if a sufficiently high voltage is applied across it. The energy stored in a capacitor is given by
1 2 W C ( t ) = --Cv C ( t ) ( J ) 2 Example 11.3 Capacitive Displacement Transducer and Microphone As shown in Fig. 11.26, the capacitance of a parallel-plate capacitor is given by the expression
eA C = -----d where ε is the permittivity of the dielectric material, A the area of each of the plates, and d their separa–12 2 tion. The permittivity of air is ε0 = 8.854 × 10 F/m, so that two parallel plates of area 1 m , separated –3 by a distance of 1 mm, would give rise to a capacitance of 8.854 × 10 µF, a very small value for a very large plate area. This relative inefficiency makes parallel-plate capacitors impractical for use in electronic circuits. On the other hand, parallel-plate capacitors find application as motion transducers, that is, as devices that can measure the motion or displacement of an object. In a capacitive motion transducer, the air gap between the plates is designed to be variable, typically by fixing one plate and connecting the other to an object in motion. Using the capacitance value just derived for a parallel-plate capacitor, one can obtain the expression
8.854 × 10 A C = ---------------------------------x –3
where C is the capacitance in picofarad, A is the area of the plates in square millimeter, and x is the (variable) distance in milimeter. It is important to observe that the change in capacitance caused by the displacement of one of the plates is nonlinear, since the capacitance varies as the inverse of the displacement. For small displacements, however, the capacitance varies approximately in a linear fashion. The sensitivity, S, of this motion transducer is defined as the slope of the change in capacitance per change in displacement, x, according to the relation
dC 8.854 × 10 A S = ------- = – ---------------------------------( pF/mm ) 2 dx 2x –3
Thus, the sensitivity increases for small displacements. This behavior can be verified by plotting the capacitance as a function of x and noting that as x approaches zero, the slope of the nonlinear C(x) curve becomes steeper (thus the greater sensitivity). Figure 11.38 depicts this behavior for a transducer with 2 area equal to 10 mm . ©2002 CRC Press LLC
0066_Frame_C11 Page 25 Wednesday, January 9, 2002 4:14 PM
FIGURE 11.38
Response of a capacitive displacement transducer.
FIGURE 11.39
Capacitive pressure transducer and related bridge circuit.
This simple capacitive displacement transducer actually finds use in the popular capacitive (or condenser) microphone, in which the sound pressure waves act to displace one of the capacitor plates. The change in capacitance can then be converted into a change in voltage or current by means of a suitable circuit. An extension of this concept that permits measurement of differential pressures is shown in simplified form in Fig. 11.39. In the figure, a three-terminal variable capacitor is shown to be made up of two fixed surfaces (typically, spherical depressions ground into glass disks and coated with a conducting material) and of a deflecting plate (typically made of steel) sandwiched between the glass disks. Pressure inlet orifices are provided, so that the deflecting plate can come into contact with the fluid whose pressure it is measuring. When the pressure on both sides of the deflecting plate is the same, the capacitance between terminals b and d, Cbd, will be equal to that between terminals b and c, Cbc. If any pressure differential exists, the two capacitances will change, with an increase on the side where the deflecting plate has come closer to the fixed surface and a corresponding decrease on the other side. This behavior is ideally suited for the application of a bridge circuit, similar to the Wheatstone bridge circuit illustrated in Example 11.2, and also shown in Fig. 11.39. In the bridge circuit, the output voltage, vout, is precisely balanced when the differential pressure across the transducer is zero, but it will deviate from zero whenever the two capacitances are not identical because of a pressure differential across the transducer. We shall analyze the bridge circuit later in Example 11.4. The Ideal Inductor The ideal inductor is an element that has the ability to store energy in a magnetic field. Inductors are typically made by winding a coil of wire around a core, which can be an insulator or a ferromagnetic material, shown in Fig. 11.40. When a current flows through the coil, a magnetic field is established, as ©2002 CRC Press LLC
0066_Frame_C11 Page 26 Wednesday, January 9, 2002 4:14 PM
FIGURE 11.40
Iron-core inductor.
you may recall from early physics experiments with electromagnets. In an ideal inductor, the resistance of the wire is zero, so that a constant current through the inductor will flow freely without causing a voltage drop. In other words, the ideal inductor acts as a short circuit in the presence of DC currents. If a time-varying voltage is established across the inductor, a corresponding current will result, according to the following relationship:
di v L ( t ) = L -------L dt
(11.36)
where L is called the inductance of the coil and is measured in henry (H), where
1 H = 1 V sec/A
(11.37)
Henrys are reasonable units for practical inductors; millihenrys (mH) and microhenrys (µH) are also used. The inductor current is found by integrating the voltage across the inductor:
1 i L ( t ) = --L
∫
t
–∞
v L dt
(11.38)
If the current flowing through the inductor at time t = t0 is known to be I0, with
1 I 0 = i L ( t = t 0 ) = --L
∫
t0
–∞
v L dt
(11.39)
then the inductor current can be found according to the equation
1 i L ( t ) = --L
∫
t
t0
v L dt + I 0 t ≥ t 0
(11.40)
Inductors in series add. Inductors in parallel combine according to the same rules used for resistors connected in parallel. See Figs. 11.41–11.43. Table 11.4 and Figs. 11.36, 11.41, and 11.43 illustrate a useful analogy between ideal electrical and mechanical elements. ©2002 CRC Press LLC
0066_Frame_C11 Page 27 Wednesday, January 9, 2002 4:14 PM
TABLE 11.4 Analogy Between Electrical and Mechanical Variables Mechanical System Force, f (N) Velocity, µ (m/sec) Damping, B (N sec/m) Compliance, 1/k (m/N) Mass, M (kg)
Electrical System Current, i (A) Voltage, v (V) Conductance, 1/R (S) Inductance, L (H) Capacitance, C (F)
FIGURE 11.41 Defining equation for the ideal inductor and analogy with force-spring system.
FIGURE 11.42
Combining inductors in a circuit.
FIGURE 11.43
Analogy between electrical and mechanical elements.
©2002 CRC Press LLC
0066_Frame_C11 Page 28 Wednesday, January 9, 2002 4:14 PM
Time-Dependent Signal Sources Figure 11.44 illustrates the convention that will be employed to denote time-dependent signal sources. One of the most important classes of time-dependent signals is that of periodic signals. These signals appear frequently in practical applications and are a useful approximation of many physical phenomena. A periodic signal x(t) is a signal that satisfies the following equation:
x ( t ) = x ( t + nT ) n = 1, 2, 3, …
(11.41)
where T is the period of x(t). Figure 11.45 illustrates a number of the periodic waveforms that are typically encountered in the study of electrical circuits. Waveforms such as the sine, triangle, square, pulse, and sawtooth waves are provided in the form of voltages (or, less frequently, currents) by commercially available signal (or waveform) generators. Such instruments allow for selection of the waveform peak amplitude, and of its period. As stated in the introduction, sinusoidal waveforms constitute by far the most important class of timedependent signals. Figure 11.46 depicts the relevant parameters of a sinusoidal waveform. A generalized sinusoid is defined as follows:
x ( t ) = A cos ( wt + f )
FIGURE 11.44
Time-dependent signal sources.
FIGURE 11.45
Periodic signal waveforms.
©2002 CRC Press LLC
(11.42)
0066_Frame_C11 Page 29 Wednesday, January 9, 2002 4:14 PM
FIGURE 11.46
Sinusoidal waveforms.
where A is the amplitude, ω the radian frequency, and φ the phase. Figure 11.46 summarizes the definitions of A, ω, and φ for the waveforms
x 1 ( t ) = A cos ( wt ) and x 2 ( t ) = A cos ( wt + f ) where
1 f = natural frequency = --- ( cycles/sec, or Hz ) T w = radian frequency = 2pf ( radians/sec ) ∆T ∆T f = 2p ------- ( radians ) = 360 ------- ( degrees ) T T
(11.43)
The phase shift, φ, permits the representation of an arbitrary sinusoidal signal. Thus, the choice of the reference cosine function to represent sinusoidal signals—arbitrary as it may appear at first—does not restrict the ability to represent all sinusoids. For example, one can represent a sine wave in terms of a cosine wave simply by introducing a phase shift of π/2 radians:
p A sin ( wt ) = A cos wt – --- 2
(11.44)
It is important to note that, although one usually employs the variable ω (in units of radians per second) to denote sinusoidal frequency, it is common to refer to natural frequency, f, in units of cycles per second, or hertz (Hz). The relationship between the two is the following:
w = 2pf
(11.45)
Average and RMS Values Now that a number of different signal waveforms have been defined, it is appropriate to define suitable measurements for quantifying the strength of a time-varying electrical signal. The most common types of measurements are the average (or DC) value of a signal waveform, which corresponds to just measuring the mean voltage or current over a period of time, and the root-mean-square (rms) value, which takes into account the fluctuations of the signal about its average value. Formally, the operation of computing the average value of a signal corresponds to integrating the signal waveform over some (presumably, suitably chosen) period of time. We define the time-averaged value of a signal x(t) as
1 〈 x ( t )〉 = --T
T
∫
x ( t ) dt
(11.46)
0
where T is the period of integration. Figure 11.47 illustrates how this process does, in fact, correspond to computing the average amplitude of x(t) over a period of T seconds.
〈 A cos ( wt + f )〉 = 0 ©2002 CRC Press LLC
0066_Frame_C11 Page 30 Wednesday, January 9, 2002 4:14 PM
FIGURE 11.47
Averaging a signal waveform.
FIGURE 11.48 Circuit containing energy-storage element.
A useful measure of the voltage of an AC waveform is the rms value of the signal, x(t), defined as follows:
1 x rms --T
T
∫
x ( t ) dt 2
(11.47)
0
Note immediately that if x(t) is a voltage, the resulting xrms will also have units of volts. If you analyze Eq. (11.47), you can see that, in effect, the rms value consists of the square root of the average (or mean) of the square of the signal. Thus, the notation rms indicates exactly the operations performed on x(t) in order to obtain its rms value.
Solution of Circuits Containing Dynamic Elements The major difference between the analysis of the resistive circuits and circuits containing capacitors and inductors is now that the equations that result from applying Kirchhoff ’s laws are differential equations, as opposed to the algebraic equations obtained in solving resistive circuits. Consider, for example, the circuit of Fig. 11.48 which consists of the series connection of a voltage source, a resistor, and a capacitor. Applying KVL around the loop, we may obtain the following equation:
vS ( t ) = vR ( t ) + vC ( t )
(11.48)
Observing that iR = iC , Eq. (11.48) may be combined with the defining equation for the capacitor (Eq. 4.6.6) to obtain
1 v S ( t ) = Ri C ( t ) + --C
∫
t
–∞
i C dt
(11.49)
Equation (11.49) is an integral equation, which may be converted to the more familiar form of a differential equation by differentiating both sides of the equation, and recalling that
d ---- dt ©2002 CRC Press LLC
∫
t
–∞
i C dt = i C ( t )
(11.50)
0066_Frame_C11 Page 31 Wednesday, January 9, 2002 4:14 PM
to obtain the following differential equation:
di C 1 dv 1 ------- + -------i C = --- -------S R dt dt RC
(11.51)
where the argument (t) has been dropped for ease of notation. Observe that in Eq. (11.51), the independent variable is the series current flowing in the circuit, and that this is not the only equation that describes the series RC circuit. If, instead of applying KVL, for example, we had applied KCL at the node connecting the resistor to the capacitor, we would have obtained the following relationship:
vS – vC dv = i C = C -------Ci R = --------------R dt
(11.52)
dv C 1 1 -------- + -------v C = -------v S dt RC RC
(11.53)
or
Note the similarity between Eqs. (11.51) and (11.53). The left-hand side of both equations is identical, except for the dependent variable, while the right-hand side takes a slightly different form. The solution of either equation is sufficient, however, to determine all voltages and currents in the circuit. We can generalize the results above by observing that any circuit containing a single energy-storage element can be described by a differential equation of the form
dy ( t ) a 1 ------------ + a 0 ( t ) = F ( t ) dt
(11.54)
where y(t) represents the capacitor voltage in the circuit of Fig. 11.48 and where the constants a0 and a1 consist of combinations of circuit element parameters. Equation (11.54) is a first-order ordinary differential equation with constant coefficients. Consider now a circuit that contains two energy-storage elements, such as that shown in Fig. 11.49. Application of KVL results in the following equation:
di ( t ) 1 Ri ( t ) + L ----------- + --dt C
∫
t
–∞
i ( t ) dt = v S ( t )
(11.55)
Equation (11.55) is called an integro-differential equation because it contains both an integral and a derivative. This equation can be converted into a differential equation by differentiating both sides, to obtain: 2 dv S ( t ) di ( t ) d i(t) 1 R ----------- + L ------------+ ---i ( t ) = -------------2 dt C dt dt
FIGURE 11.49
Second-order circuit.
©2002 CRC Press LLC
(11.56)
0066_Frame_C11 Page 32 Wednesday, January 9, 2002 4:14 PM
or, equivalently, by observing that the current flowing in the series circuit is related to the capacitor voltage by i(t) = CdvC /dt, and that Eq. (11.55) can be rewritten as
d vC ( t ) dv - + vC ( t ) = vS ( t ) RC -------C- + LC ----------------2 dt dt 2
(11.57)
Note that although different variables appear in the preceding differential equations, both Eqs. (11.55) and (11.57) can be rearranged to appear in the same general form as follows:
d y(t) dy ( t ) a 2 -------------+ a 1 ------------ + a 0 y ( t ) = F ( t ) 2 dt dt 2
(11.58)
where the general variable y(t) represents either the series current of the circuit of Fig. 11.49 or the capacitor voltage. By analogy with Eq. (11.54), we call Eq. (11.58) a second-order ordinary differential equation with constant coefficients. As the number of energy-storage elements in a circuit increases, one can therefore expect that higher-order differential equations will result.
Phasors and Impedance In this section, we introduce an efficient notation to make it possible to represent sinusoidal signals as complex numbers, and to eliminate the need for solving differential equations. Phasors Let us recall that it is possible to express a generalized sinusoid as the real part of a complex vector whose argument, or angle, is given by (ω t + φ) and whose length, or magnitude, is equal to the peak amplitude of the sinusoid. The complex phasor corresponding to the sinusoidal signal Acos(ω t + φ) jφ is therefore defined to be the complex number Ae :
Ae
jf
= complex phasor notation for A cos ( wt + f )
(11.59)
1. Any sinusoidal signal may be mathematically represented in one of two ways: a time-domain form
v ( t ) = A cos ( wt + f ) and a frequency-domain (or phasor) form
V ( jw ) = Ae
jf
2. A phasor is a complex number, expressed in polar form, consisting of a magnitude equal to the peak amplitude of the sinusoidal signal and a phase angle equal to the phase shift of the sinusoidal signal referenced to a cosine signal. 3. When using phasor notation, it is important to make a note of the specific frequency, ω, of the sinusoidal signal, since this is not explicitly apparent in the phasor expression. Impedance We now analyze the i-v relationship of the three ideal circuit elements in light of the new phasor notation. The result will be a new formulation in which resistors, capacitors, and inductors will be described in the same notation. A direct consequence of this result will be that the circuit theorems of section 11.3 will be extended to AC circuits. In the context of AC circuits, any one of the three ideal circuit elements
©2002 CRC Press LLC
0066_Frame_C11 Page 33 Wednesday, January 9, 2002 4:14 PM
FIGURE 11.50
The impedance element.
defined so far will be described by a parameter called impedance, which may be viewed as a complex resistance. The impedance concept is equivalent to stating that capacitors and inductors act as frequencydependent resistors, that is, as resistors whose resistance is a function of the frequency of the sinusoidal excitation. Figure 11.50 depicts the same circuit represented in conventional form (top) and in phasorimpedance form (bottom); the latter representation explicitly shows phasor voltages and currents and treats the circuit element as a generalized “impedance.” It will presently be shown that each of the three ideal circuit elements may be represented by one such impedance element. Let the source voltage in the circuit of Fig. 11.50 be defined by
v S ( t ) = A cos wt or V S ( jw ) = Ae
j0 °
(11.60)
without loss of generality. Then the current i(t) is defined by the i-v relationship for each circuit element. Let us examine the frequency-dependent properties of the resistor, inductor, and capacitor, one at a time. The impedance of the resistor is defined as the ratio of the phasor voltage across the resistor to the phasor current flowing through it, and the symbol ZR is used to denote it:
V S ( jw ) - = R Z R ( jw ) = ----------------I ( jw )
(11.61)
The impedance of the inductor is defined as follows:
V S ( jw ) j90° - = wLe = jwL Z L ( jw ) = ----------------I ( jw ) ©2002 CRC Press LLC
(11.62)
0066_Frame_C11 Page 34 Wednesday, January 9, 2002 4:14 PM
FIGURE 11.51 plex plane.
Impedances of R, L, and C in the com-
Note that the inductor now appears to behave like a complex frequency-dependent resistor, and that the magnitude of this complex resistor, ωL, is proportional to the signal frequency, ω. Thus, an inductor will “impede” current flow in proportion to the sinusoidal frequency of the source signal. This means that at low signal frequencies, an inductor acts somewhat like a short circuit, while at high frequencies it tends to behave more as an open circuit. Another important point is that the magnitude of the impedance of an inductor is always positive, since both L and ω are positive numbers. You should verify that the units of this magnitude are also ohms. The impedance of the ideal capacitor, ZC(j ω), is therefore defined as follows:
V S ( jw ) –j 1 1 –j 90° - = -------- e = -------- = ---------Z C ( jw ) = ----------------I ( jw ) wC wC jwC
(11.63)
–j90°
where we have used the fact that 1/j = e = –j. Thus, the impedance of a capacitor is also a frequencydependent complex quantity, with the impedance of the capacitor varying as an inverse function of frequency, and so a capacitor acts like a short circuit at high frequencies, whereas it behaves more like an open circuit at low frequencies. Another important point is that the impedance of a capacitor is always negative, since both C and ω are positive numbers. You should verify that the units of impedance for a capacitor are ohms. Figure 11.51 depicts ZC (jω) in the complex plane, alongside ZR(j ω) and ZL(j ω). The impedance parameter defined in this section is extremely useful in solving AC circuit analysis problems, because it will make it possible to take advantage of most of the network theorems developed for DC circuits by replacing resistances with complex-valued impedances. In its most general form, the impedance of a circuit element is defined as the sum of a real part and an imaginary part:
Z ( jw ) = R ( jw ) + jX ( jw )
(11.64)
where R is called the AC resistance and X is called the reactance. The frequency dependence of R and X has been indicated explicitly, since it is possible for a circuit to have a frequency-dependent resistance. The examples illustrate how a complex impedance containing both real and imaginary parts arises in a circuit. Example 11.4 Capacitive Displacement Transducer In Example 11.3, the idea of a capacitive displacement transducer was introduced when we considered a parallel-plate capacitor composed of a fixed plate and a movable plate. The capacitance of this variable capacitor was shown to be a nonlinear function of the position of the movable plate, x (see Fig. 11.39). ©2002 CRC Press LLC
0066_Frame_C11 Page 35 Wednesday, January 9, 2002 4:14 PM
In this example, we show that under certain conditions the impedance of the capacitor varies as a linear function of displacement—that is, the movable-plate capacitor can serve as a linear transducer. Recall the expression derived in Example 11.3:
8.854 × 10 A C = --------------------------------x –3
where C is the capacitance in picofarad, A is the area of the plates in square millimeter, and x is the (variable) distance in millimeter. If the capacitor is placed in an AC circuit, its impedance will be determined by the expression
1 Z C = ---------jwC so that
x Z C = -------------------------8.854 jw A Thus, at a fixed frequency ω, the impedance of the capacitor will vary linearly with displacement. This property may be exploited in the bridge circuit of Example 11.3, where a differential pressure transducer was shown as being made of two movable-plate capacitors, such that if the capacitance of one increased as a consequence of a pressure differential across the transducer, the capacitance of the other had to decrease by a corresponding amount (at least for small displacements). The circuit is shown again in Fig. 11.52 where two resistors have been connected in the bridge along with the variable capacitors (denoted by C(x)). The bridge is excited by a sinusoidal source. Using phasor notation, we can express the output voltage as follows:
Z Cbc ( x ) R2 V out ( jw ) = V S ( jw ) ---------------------------------– --------------- Z C ( x ) + Z C ( x ) R 1 + R 2 db bc If the nominal capacitance of each movable-plate capacitor with the diaphragm in the center position is given by
eA C = -----d where d is the nominal (undisplaced) separation between the diaphragm and the fixed surfaces of the capacitors (in mm), the capacitors will see a change in capacitance given by
eA eA C db = ----------- and C bc = -----------d–x d+x
FIGURE 11.52 Bridge circuit for capacitive displacement transducer.
©2002 CRC Press LLC
0066_Frame_C11 Page 36 Wednesday, January 9, 2002 4:14 PM
when a pressure differential exists across the transducer, so that the impedances of the variable capacitors change according to the displacement
d–x d+x Z Cdb = ------------------------ and Z Cbc = -----------------------8.854 jwA 8.854 jwA and we obtain the following expression for the phasor output voltage, if we choose R1 = R2. d+x -----------------------R2 8.854 jwA - – ----------------- V out ( jw ) = V S ( jw ) ------------------------------------------------------d–x d+x ---------------------- - R1 + R2 8.854 jwA- + ---------------------- 8.854 jwA
R2 1 x = V S ( jw ) -- + ------ – --------------- 2 2d R 1 + R 2 x = V S ( jw ) -----2d Thus, the output voltage will vary as a scaled version of the input voltage in proportion to the displacement.
References Irwin, J.D., 1989. Basic Engineering Circuit Analysis, 3rd ed., Macmillan, New York. Nilsson, J.W., 1989. Electric Circuits, 3rd ed., Addison-Wesley, Reading, MA. Rizzoni, G., 2000. Principles and Applications of Electrical Engineering, 3rd ed., McGraw-Hill, Burr Ridge, IL. Smith, R.J. and Dorf, R.C., 1992. Circuits, Devices and Systems, 5th ed., John Wiley & Sons, New York. 1993. The Electrical Engineering Handbook, CRC Press, Boca Raton, FL. Budak, A., Passive and Active Network Analysis and Synthesis, Houghton Mifflin, Boston. Van Valkenburg, M.E., 1982, Analog Filter Design, Holt, Rinehart & Winston, New York.
©2002 CRC Press LLC
12 Engineering Thermodynamics 12.1
Fundamentals Basic Concepts and Definitions • Laws of Thermodynamics
12.2
Extensive Property Balances Mass Balance • Energy Balance • Entropy Balance • Control Volumes at Steady State • Exergy Balance
Michael J. Moran The Ohio State University
12.3 12.4
Property Relations and Data Vapor and Gas Power Cycles
Although various aspects of what is now known as thermodynamics have been of interest since antiquity, formal study began only in the early nineteenth century through consideration of the motive power of heat: the capacity of hot bodies to produce work. Today the scope is larger, dealing generally with energy and entropy, and with relationships among the properties of matter. Moreover, in the past 25 years engineering thermodynamics has undergone a revolution, both in terms of the presentation of fundamentals and in the manner that it is applied. In particular, the second law of thermodynamics has emerged as an effective tool for engineering analysis and design.
12.1 Fundamentals Classical thermodynamics is concerned primarily with the macrostructure of matter. It addresses the gross characteristics of large aggregations of molecules and not the behavior of individual molecules. The microstructure of matter is studied in kinetic theory and statistical mechanics (including quantum thermodynamics). In this chapter, the classical approach to thermodynamics is featured.
Basic Concepts and Definitions Thermodynamics is both a branch of physics and an engineering science. The scientist is normally interested in gaining a fundamental understanding of the physical and chemical behavior of fixed, quiescent quantities of matter and uses the principles of thermodynamics to relate the properties of matter. Engineers are generally interested in studying systems and how they interact with their surroundings. To facilitate this, engineers have extended the subject of thermodynamics to the study of systems through which matter flows. System In a thermodynamic analysis, the system is the subject of the investigation. Normally the system is a specified quantity of matter and/or a region that can be separated from everything else by a well-defined surface. The defining surface is known as the control surface or system boundary. The control surface may be movable or fixed. Everything external to the system is the surroundings. A system of fixed mass is
©2002 CRC Press LLC
referred to as a control mass or closed system. When there is flow of mass through the control surface, the system is called a control volume or open system. An isolated system is a closed system that does not interact in any way with its surroundings. State, Property The condition of a system at any instant of time is called its state. The state at a given instant of time is described by the properties of the system. A property is any quantity whose numerical value depends on the state, but not the history of the system. The value of a property is determined in principle by some type of physical operation or test. Extensive properties depend on the size or extent of the system. Volume, mass, energy, entropy, and exergy are examples of extensive properties. An extensive property is additive in the sense that its value for the whole system equals the sum of the values for its parts. Intensive properties are independent of the size or extent of the system. Pressure and temperature are examples of intensive properties. Process, Cycle Two states are identical if, and only if, the properties of the two states are identical. When any property of a system changes in value there is a change in state, and the system is said to undergo a process. When a system in a given initial state goes through a sequence of processes and finally returns to its initial state, it is said to have undergone a thermodynamic cycle. Phase and Pure Substance The term phase refers to a quantity of matter that is homogeneous throughout in both chemical composition and physical structure. Homogeneity in physical structure means that the matter is all solid, or all liquid, or all vapor (or equivalently all gas). A system can contain one or more phases. For example, a system of liquid water and water vapor (steam) contains two phases. A pure substance is one that is uniform and invariable in chemical composition. A pure substance can exist in more than one phase, but its chemical composition must be the same in each phase. For example, if liquid water and water vapor form a system with two phases, the system can be regarded as a pure substance because each phase has the same composition. The nature of phases that coexist in equilibrium is addressed by the phase rule (for discussion see Moran and Shapiro, 2000). Equilibrium Equilibrium means a condition of balance. In thermodynamics the concept includes not only a balance of forces, but also a balance of other influences. Each kind of influence refers to a particular aspect of thermodynamic (complete) equilibrium. Thermal equilibrium refers to an equality of temperature, mechanical equilibrium to an equality of pressure, and phase equilibrium to an equality of chemical potentials (for discussion see Moran and Shapiro, 2000). Chemical equilibrium is also established in terms of chemical potentials. For complete equilibrium the several types of equilibrium must exist individually. Temperature A scale of temperature independent of the thermometric substance is called a thermodynamic temperature scale. The Kelvin scale, a thermodynamic scale, can be elicited from the second law of thermodynamics. The definition of temperature following from the second law is valid over all temperature ranges and provides an essential connection between the several empirical measures of temperature. In particular, temperatures evaluated using a constant-volume gas thermometer are identical to those of the Kelvin scale over the range of temperatures where gas thermometry can be used. On the Kelvin scale the unit is the kelvin (K). The Celsius temperature scale (also called the centigrade scale) uses the degree Celsius (∞C), which has the same magnitude as the kelvin. Thus, temperature differences are identical on both scales. However, the zero point on the Celsius scale is shifted to 273.15 K, the triple point of water (Fig. 12.1b), ©2002 CRC Press LLC
as shown by the following relationship between the Celsius temperature and the Kelvin temperature:
T( ˚C ) = T ( K ) – 273.15
(12.1)
Two other temperature scales are commonly used in engineering in the U.S. By definition, the Rankine scale, the unit of which is the degree rankine (˚ R), is proportional to the Kelvin temperature according to
T ( ˚R ) = 1.8T ( K )
(12.2)
The Rankine scale is also an absolute thermodynamic scale with an absolute zero that coincides with the absolute zero of the Kelvin scale. In thermodynamic relationships, temperature is always in terms of the Kelvin or Rankine scale unless specifically stated otherwise. A degree of the same size as that on the Rankine scale is used in the Fahrenheit scale, but the zero point is shifted according to the relation
T ( ˚F ) = T ( ˚R ) – 459.67
(12.3)
Substituting Eqs. (12.1) and (12.2) into Eq. (12.3) gives
T ( ˚F ) = 1.8T ( ˚C ) + 32
(12.4)
This equation shows that the Fahrenheit temperature of the ice point (0˚ C) is 32˚ F and of the steam point (100˚ C) is 212˚ F. The 100 Celsius or Kelvin degrees between the ice point and steam point corresponds to 180 Fahrenheit or Rankine degrees. To provide a standard for temperature measurement taking into account both theoretical and practical considerations, the International Temperature Scale of 1990 (ITS-90) is defined in such a way that the temperature measured on it conforms with the thermodynamic temperature, the unit of which is the kelvin, to within the limits of accuracy of measurement obtainable in 1990. Further discussion of ITS-90 is provided by Preston-Thomas (1990). Irreversibilities A process is said to be reversible if it is possible for its effects to be eradicated in the sense that there is some way by which both the system and its surroundings can be exactly restored to their respective initial states. A process is irreversible if both the system and surroundings cannot be restored to their initial states. There are many effects whose presence during a process renders it irreversible. These include, but are not limited to, the following: heat transfer through a finite temperature difference; unrestrained expansion of a gas or liquid to a lower pressure; spontaneous chemical reaction; mixing of matter at different compositions or states; friction (sliding friction as well as friction in the flow of fluids); electric current flow through a resistance; magnetization or polarization with hysteresis; and inelastic deformation. The term irreversibility is used to identify effects such as these. Irreversibilities can be divided into two classes, internal and external. Internal irreversibilities are those that occur within the system, while external irreversibilities are those that occur within the surroundings, normally the immediate surroundings. As this division depends on the location of the boundary there is some arbitrariness in the classification (by locating the boundary to take in the immediate surroundings, all irreversibilities are internal). Nonetheless, valuable insights can result when this distinction between irreversibilities is made. When internal irreversibilities are absent during a process, the process is said to be internally reversible. At every intermediate state of an internally reversible process of a closed system, all intensive properties are uniform throughout each phase present: the temperature, pressure, specific volume, and other intensive properties do not vary with position. ©2002 CRC Press LLC
Laws of Thermodynamics The first steps in a thermodynamic analysis are definition of the system and identification of the relevant interactions with the surroundings. Attention then turns to the pertinent physical laws and relationships that allow the behavior of the system to be described in terms of an engineering model, which is a simplified representation of system behavior that is sufficiently faithful for the purpose of the analysis, even if features exhibited by the actual system are ignored. Thermodynamic analyses of control volumes and closed systems typically use, directly or indirectly, one or more of three basic laws. The laws, which are independent of the particular substance or substances under consideration, are • the conservation of mass principle, • the conservation of energy principle, • the second law of thermodynamics. The second law may be expressed in terms of entropy or exergy. The laws of thermodynamics must be supplemented by appropriate thermodynamic property data. For some applications a momentum equation expressing Newton’s second law of motion also is required. Data for transport properties, heat transfer coefficients, and friction factors often are needed for a comprehensive engineering analysis. Principles of engineering economics and pertinent economic data also can play prominent roles.
12.2 Extensive Property Balances The laws of thermodynamics can be expressed in terms of extensive property balances for mass, energy, entropy, and exergy. Engineering applications are generally analyzed on a control volume basis. Accordingly, the control volume formulations of the mass energy, entropy, and exergy balances are featured here. They are provided in the form of overall balances assuming one-dimensional flow. Equations of change for mass, energy, and entropy in the form of differential equations are also available in the literature (Bird et al., 1960).
Mass Balance For applications in which inward and outward flows occur, each through one or more ports, the extensive property balance expressing the conservation of mass principle takes the form
dm -------- = dt
∑m˙ – ∑ m˙ i
e
(12.5)
e
i
where dm/dt represents the time rate of change of mass contained within the control volume, m˙ i denotes the mass flow rate at an inlet port, and m˙ e denotes the mass flow rate at an exit port. The volumetric flow rate through a portion of the control surface with area dA is the product of the velocity component normal to the area, vn, times the area: vndA. The mass flow rate through dA is ρ(vndA), where ρ denotes density. The mass rate of flow through a port of area A is then found by integration over the area
m˙ =
∫
A
ρvn dA
For one-dimensional flow the intensive properties are uniform with position over area A, and the last equation becomes
vA m˙ = ρvA = -----v ©2002 CRC Press LLC
(12.6)
0066_frame_C12 Page 5 Wednesday, January 9, 2002 4:22 PM
where v denotes the specific volume (the reciprocal of density) and the subscript n has been dropped from velocity for simplicity.
Energy Balance Energy is a fundamental concept of thermodynamics and one of the most significant aspects of engineering analysis. Energy can be stored within systems in various macroscopic forms: kinetic energy, gravitational potential energy, and internal energy. Energy also can be transformed from one form to another and transferred between systems. Energy can be transferred by work, by heat transfer, and by flowing matter. The total amount of energy is conserved in all transformations and transfers. The extensive property balance expressing the conservation of energy principle takes the form
d ( U + KE + PE ) --------------------------------------- = Q˙ – W˙ + dt
∑ i
2
v m˙ i h i + ----i + gz i – 2
∑ e
2
v m˙ e h e + ----e + gz e 2
(12.7a)
where U, KE, and PE denote, respectively, the internal energy, kinetic energy, and gravitational potential energy of the overall control volume. The right side of Eq. (12.7a) accounts for transfers of energy across the boundary of the control volume. Energy can enter and exit control volumes by work. Because work is done on or by a control volume when matter flows across the boundary, it is convenient to separate the work rate (or power) into two contributions. One contribution is the work rate associated with the force of the fluid pressure as mass is introduced at the inlet and removed at the exit. Commonly referred to as flow work, this contribution is accounted for by m˙ i (p i v i ) and m˙ e (p e v e ), respectively, where p denotes pressure and v denotes specific ˙ in Eq. (12.7a), includes all other work effects, such as volume. The other contribution, denoted by W ˙ is considered those associated with rotating shafts, displacement of the boundary, and electrical effects. W positive for energy transfer from the control volume. Energy also can enter and exit control volumes with flowing streams of matter. On a one-dimensional 2 flow basis, the rate at which energy enters with matter at inlet i is m˙ i (u i + v i /2 + gz i ), where the three terms in parentheses account, respectively, for the specific internal energy, specific kinetic energy, and specific gravitational potential energy of the substance flowing through port i. In writing Eq. (12.7a) the sum of the specific internal energy and specific flow work at each inlet and exit is expressed in terms of the specific enthalpy h(=u + pv). Finally, Q˙ accounts for the rate of energy transfer by heat and is considered positive for energy transfer to the control volume. By dropping the terms of Eq. (12.7a) involving mass flow rates an energy rate balance for closed systems is obtained. In principle the closed system energy rate balance can be integrated for a process between two states to give the closed system energy balance:
( U 2 – U 1 ) + ( KE 2 – KE 1 ) + ( PE 2 – PE 1 ) = Q – W (closed systems)
(12.7b)
where 1 and 2 denote the end states. Q and W denote the amounts of energy transferred by heat and work during the process, respectively.
Entropy Balance Contemporary applications of engineering thermodynamics express the second law, alternatively, as an entropy balance or an exergy balance. The entropy balance is considered here. Like mass and energy, entropy can be stored within systems and transferred across system boundaries. However, unlike mass and energy, entropy is not conserved, but generated (or produced) by irreversibilities ©2002 CRC Press LLC
0066_frame_C12 Page 6 Wednesday, January 9, 2002 4:22 PM
within systems. A control volume form of the extensive property balance for entropy is
Q˙ j
∑ ----T- + ∑ m˙ s – ∑ m˙ s
dS ------ = dt
i i
j
j
e e
i
+ S˙gen
(12.8)
e
------------------------------ ---rates of entropy transfer
rate of entropy generation
where dS/dt represents the time rate of change of entropy within the control volume. The terms m˙ i s i and m˙ e s e account, respectively, for rates of entropy transfer into and out of the control volume accompanying mass flow. Q˙ j represents the time rate of heat transfer at the location on the boundary where the instantaneous temperature is Tj, and Q˙ j /T j accounts for the accompanying rate of entropy transfer. S˙gen denotes the time rate of entropy generation due to irreversibilities within the control volume. An entropy rate balance for closed systems is obtained by dropping the terms of Eq. (12.8) involving mass flow rates. When applying the entropy balance in any of its forms, the objective is often to evaluate the entropy generation term. However, the value of the entropy generation for a given process of a system usually does not have much significance by itself. The significance normally is determined through comparison: the entropy generation within a given component would be compared with the entropy generation values of the other components included in an overall system formed by these components. This allows the principal contributors to the irreversibility of the overall system to be pinpointed.
Control Volumes at Steady State Engineering systems are often idealized as being at steady state, meaning that all properties are unchanging in time. For a control volume at steady state, the identity of the matter within the control volume changes continuously, but the total amount of mass remains constant. At steady state, the mass rate balance Eq. (12.5) reduces to
∑ m˙
=
i
i
∑ m˙
(12.9a)
e
e
At steady state, the energy rate balance Eq. (12.7a) becomes 2
0 = Q˙ – W˙ +
vi
∑ m˙ h + ---2- + gz – ∑ m˙ h i
i
e
i
e
i
2
e
v + ----e + gz e 2
(12.9b)
At steady state, the entropy rate balance Eq. (12.8) reads
0 =
Q˙ j
∑ ----T- + ∑ m˙ s – ∑ m˙ s i i
j
j
i
e e
+ S˙gen
(12.9c)
e
Mass and energy are conserved quantities, but entropy is not generally conserved. Equation (12.9a) indicates that the total rate of mass flow into the control volume equals the total rate of mass flow out of the control volume. Similarly, Eq. (12.9b) states that the total rate of energy transfer into the control volume equals the total rate of energy transfer out of the control volume. However, Eq. (12.9c) shows that the rate at which entropy is transferred out exceeds the rate at which entropy enters, the difference being the rate of entropy generation within the control volume owing to irreversibilities. Many applications involve control volumes having a single inlet and a single exit. For such cases the mass rate balance, Eq. (12.9a), reduces to m˙ i = m˙ e . Denoting the common mass flow rate by m˙ , ©2002 CRC Press LLC
0066_frame_C12 Page 7 Wednesday, January 9, 2002 4:22 PM
Eqs. (12.9b) and (12.9c) give, respectively, 2
2
vi – ve - + g ( zi – ze ) 0 = Q˙ – W˙ + m˙ ( h i – h e ) + ------------- 2
(12.10a)
Q˙ 0 = ----- + m˙ ( s i – s e ) + S˙gen Tb
(12.11a)
where for simplicity Tb denotes the temperature, or a suitable average temperature, on the boundary where heat transfer occurs. When energy and entropy rate balances are applied to particular cases of interest, additional simplifications are usually made. The heat transfer term Q˙ is dropped when it is insignificant relative to other energy transfers across the boundary. This may be the result of one or more of the following: (1) the outer surface of the control volume is insulated; (2) the outer surface area is too small for there to be effective heat transfer; (3) the temperature difference between the control volume and its surroundings is small enough that the heat transfer can be ignored; (4) the gas or liquid passes through the control volume so ˙ drops out quickly that there is not enough time for significant heat transfer to occur. The work term W of the energy rate balance when there are no rotating shafts, displacements of the boundary, electrical effects, or other work mechanisms associated with the control volume being considered. The effects of kinetic and potential energy are frequently negligible relative to other terms of the energy rate balance. The special forms of Eqs. (12.10a) and (12.11a) listed in Table 12.1 are obtained as follows: When there is no heat transfer, Eq. (12.11a) gives
S˙gen -≥0 s e – s i = ------m˙
(12.11b)
(no heat transfer)
Accordingly, when irreversibilities are present within the control volume, the specific entropy increases as mass flows from inlet to outlet. In the ideal case in which no internal irreversibilities are present, mass passes through the control volume with no change in its entropy—that is, isentropically. For no heat transfer, Eq. (12.10a) gives 2
2
vi – ve - + g ( zi – ze ) W˙ = m˙ ( h i – h e ) + ------------- 2
(12.10b)
( no heat transfer )
A special form that is applicable, at least approximately, to compressors, pumps, and turbines results from dropping the kinetic and potential energy terms of Eq. (12.10b), leaving
W˙ = m˙ ( h i – h e ) ( compressors, pumps, and turbines )
(12.10c)
In throttling devices a significant reduction in pressure is achieved by introducing a restriction into a line ˙ = 0 and Eq. (12.10c) reduces further to read through which a gas or liquid flows. For such devices W
hi ≅ he ( throttling process )
That is, upstream and downstream of the throttling device, the specific enthalpies are equal. ©2002 CRC Press LLC
(12.10d)
0066_frame_C12 Page 8 Wednesday, January 9, 2002 4:22 PM
TABLE 12.1 Energy and Entropy Balances for One-Inlet, One-Outlet Control Volumes at Steady State and No Heat Transfer Energy balance 2
2
vi – ve - + g ( zi – ze ) W˙ = m˙ ( h i – h e ) + ------------- 2
(12.10b)
a
Compressors, pumps, and turbines W˙ = m˙ ( h i – h e )
(12.10c)
Throttling Nozzles, diffusers
he ≅ hi
(12.10d)
vi + 2 ( hi – he )
(12.10e)
b
ve =
2
Entropy balance S˙gen -≥0 s e – s i = ------m˙
(12.11b)
a
For an ideal gas with constant cp , Eq. (1′) of Table 12.4 allows Eq. (12.10c) to be written as (12.10c′) W˙ = m˙ c p ( T i – T e ) The power developed in an isentropic process is obtained with Eq. (5′) of Table 12.4 as ( k−1 )/k ] (s = c) W˙ = m˙ c p T i [ 1 – ( p e /p i ) (12.10c′′) where cp = kR/(k−1). b For an ideal gas with constant cp, Eq. (1′) of Table 12.4 allows Eq. (12.10e) to be written as 2 (12.10e′) v e = v i + 2c p ( T i – T e ) The exit velocity for an isentropic process is obtained with Eq. (5′) of Table 12.4 as
ve =
v i + 2c p T i [ 1 – ( p e /p i ) 2
( k – 1 )/k
] (s = c)
where cp = kR/(k − 1).
(12.10e′′)
A nozzle is a flow passage of varying cross-sectional area in which the velocity of a gas or liquid increas es in the direction of flow. In a diffuser, the gas or liquid decelerates in the direction of flow. For such ˙ = 0. The heat transfer and potential energy change are generally negligible. Then Eq. devices, W (12.10b) reduces to 2
2
vi – ve 0 = h i – h e + -------------2 Solving for the exit velocity
ve =
vi + 2 ( hi – he ) 2
( nozzle, diffuser )
(12.10e)
The steady-state forms of the mass, energy, and entropy rate balances can be applied to control volumes with multiple inlets and/or exits, for example, cases involving heat-recovery steam generators, feedwater heaters, and counterflow and crossflow heat exchangers. Transient (or unsteady) analyses can be conducted with Eqs. (12.5), (12.7a), and (12.8). Illustrations of all such applications are provided by Moran and Shapiro (2000). ©2002 CRC Press LLC
0066_frame_C12 Page 9 Wednesday, January 9, 2002 4:22 PM
Exergy Balance Exergy provides an alternative to entropy for applying the second law. When exergy concepts are combined with principles of engineering economy, the result is known as thermoeconomics. Thermoeconomics allows the real cost sources to be identified: capital investment costs, operating and maintenance costs, and the costs associated with the destruction and loss of exergy. Optimization of systems can be achieved by a careful consideration of such cost sources. From this perspective thermoeconomics is exergy-aided cost minimization. Discussions of exergy analysis and thermoeconomics are provided by Moran (1989), Bejan et al. (1996), Moran and Tsatsaronis (2000), and Moran and Shapiro (2000). In this section salient aspects are presented. Defining Exergy An opportunity for doing work exists whenever two systems at different states are placed in communication because, in principle, work can be developed as the two are allowed to come into equilibrium. When one of the two systems is a suitably idealized system called an environment and the other is some system of interest, exergy is the maximum theoretical useful work (shaft work or electrical work) obtainable as the system of interest and environment interact to equilibrium, heat transfer occurring with the environment only. (Alternatively, exergy is the minimum theoretical useful work required to form a quantity of matter from substances present in the environment and bring the matter to a specified state.) Exergy is a measure of the departure of the state of the system from that of the environment, and is therefore an attribute of the system and environment together. Once the environment is specified, however, a value can be assigned to exergy in terms of property values for the system only, so exergy can be regarded as an extensive property of the system. Exergy can be destroyed and, like entropy, generally is not conserved. Models with various levels of specificity are employed for describing the environment used to evaluate exergy. Models of the environment typically refer to some portion of a system’s surroundings, the intensive properties of each phase of which are uniform and do not change significantly as a result of any process under consideration. The environment is regarded as composed of common substances existing in abundance within the Earth’s atmosphere, oceans, and crust. The substances are in their stable forms as they exist naturally, and there is no possibility of developing work from interactions—physical or chemical— between parts of the environment. Although the intensive properties of the environment are assumed to be unchanging, the extensive properties can change as a result of interactions with other systems. Kinetic and potential energies are evaluated relative to coordinates in the environment, all parts of which are considered to be at rest with respect to one another. For computational ease, the temperature T0 and pressure p0 of the environment are often taken as typical ambient values, such as 1 atm and 25°C (77°F). However, these properties may be specified differently depending on the application. When a system is in equilibrium with the environment, the state of the system is called the dead state. At the dead state, the conditions of mechanical, thermal, and chemical equilibrium between the system and the environment are satisfied: the pressure, temperature, and chemical potentials of the system equal those of the environment, respectively. In addition, the system has no motion or elevation relative to coordinates in the environment. Under these conditions, there is no possibility of a spontaneous change within the system or the environment, nor can there be an interaction between them. The value of exergy is zero. Another type of equilibrium between the system and environment can be identified. This is a restricted form of equilibrium where only the conditions of mechanical and thermal equilibrium must be satisfied. This state of the system is called the restricted dead state. At the restricted dead state, the fixed quantity of matter under consideration is imagined to be sealed in an envelope impervious to mass flow, at zero velocity and elevation relative to coordinates in the environment, and at the temperature T0 and pressure p0. Exergy Transfer and Exergy Destruction Exergy can be transferred by three means: exergy transfer associated with work, exergy transfer associated with heat transfer, and exergy transfer associated with the matter entering and exiting a control volume. All such exergy transfers are evaluated relative to the environment used to define exergy. Exergy also is ©2002 CRC Press LLC
0066_frame_C12 Page 10 Wednesday, January 9, 2002 4:22 PM
destroyed by irreversibilities within the system or control volume. Exergy balances can be written in various forms, depending on whether a closed system or control volume is under consideration and whether steady-state or transient operation is of interest. Owing to its importance for a wide range of applications, an exergy rate balance for control volumes at steady state is presented alternatively as Eqs. (12.12a) and (12.12b).
0 =
∑ E˙
q, j
– W˙ +
j
∑ E˙ – ∑ E˙ i
i
e
– E˙D
(12.12a)
e
------------------------------- --rates of exergy transfer
0 =
T0
rate of exergy destruction
∑ 1 – ----T- Q˙ – W˙ + ∑ m˙ e – ∑ m˙ e j
i
j
j
e e
i
i
– E˙D
(12.12b)
e
W˙ has the same significance as in Eq. (12.7a): the work rate excluding the flow work. Q˙ j is the time rate of heat transfer at the location on the boundary of the control volume where the instantaneous temperature is Tj . The associated rate of exergy transfer is
T E˙q, j = 1 – -----0 Q˙ j Tj
(12.13)
As for other control volume rate balances, the subscripts i and e denote inlets and exits, respectively. The exergy transfer rates at control volume inlets and exits are denoted, respectively, as E˙i = m˙ i e i and E˙e = m˙ e e e . Finally, E˙D accounts for the time rate of exergy destruction due to irreversibilities within the control volume. The exergy destruction rate is related to the entropy generation rate by
E˙D = T 0 S˙gen
(12.14)
The specific exergy transfer terms ei and ee are expressible in terms of four components: physical exergy PH KN PT CH e , kinetic exergy e , potential exergy e , and chemical exergy e :
e = e
+e
PH
KN
+e
PT
+e
CH
(12.15a)
The first three components are evaluated as follows:
e
PH
= ( h – h0 ) – T0 ( s – s0 )
(12.15b)
1 2 = --v 2
(12.15c)
= gz
(12.15d)
e
KN
e
PT
In Eq. (12.15b), h0 and s0 denote, respectively, the specific enthalpy and specific entropy at the restricted dead state. In Eqs. (12.15c) and (12.15d), v and z denote velocity and elevation relative to coordinates in the environment, respectively. To evaluate the chemical exergy (the exergy component associated with the departure of the chemical composition of a system from that of the environment), alternative models of the environment can be employed depending on the application; see for example Moran (1989) and Kotas (1995). Exergy analysis is facilitated, however, by employing a standard environment and a corresponding table of standard ©2002 CRC Press LLC
0066_frame_C12 Page 11 Wednesday, January 9, 2002 4:22 PM
chemical exergies. Standard chemical exergies are based on standard values of the environmental temperature T0 and pressure p0 — for example, 298.15 K (25°C) and 1 atm, respectively. Standard environments also include a set of reference substances with standard concentrations reflecting as closely as possible the chemical makeup of the natural environment. Standard chemical exergy data is provided by Szargut et al. (1988), Bejan et al. (1996), and Moran and Shapiro (2000). Guidelines for Improving Thermodynamic Effectiveness To improve thermodynamic effectiveness it is necessary to deal directly with inefficiencies related to exergy destruction and exergy loss. The primary contributors to exergy destruction are chemical reaction, heat transfer, mixing, and friction, including unrestrained expansions of gases and liquids. To deal with them effectively, the principal sources of inefficiency not only should be understood qualitatively, but also determined quantitatively, at least approximately. Design changes to improve effectiveness must be done judiciously, however, for the cost associated with different sources of inefficiency can be different. For example, the unit cost of the electrical or mechanical power required to provide for the exergy destroyed owing to a pressure drop is generally higher than the unit cost of the fuel required for the exergy destruction caused by combustion or heat transfer. Chemical reaction is a significant source of thermodynamic inefficiency. Accordingly, it is generally good practice to minimize the use of combustion. In many applications the use of combustion equipment such as boilers is unavoidable, however. In these cases a significant reduction in the combustion irreversibility by conventional means simply cannot be expected, for the major part of the exergy destruction introduced by combustion is an inevitable consequence of incorporating such equipment. Still, the exergy destruction in practical combustion systems can be reduced by minimizing the use of excess air and by preheating the reactants. In most cases only a small part of the exergy destruction in a combustion chamber can be avoided by these means. Consequently, after considering such options for reducing the exergy destruction related to combustion, efforts to improve thermodynamic performance should focus on components of the overall system that are more amenable to betterment by cost-effective measures. In other words, some exergy destructions and energy losses can be avoided, others cannot. Efforts should be centered on those that can be avoided. Nonidealities associated with heat transfer also typically contribute heavily to inefficiency. Accordingly, unnecessary or cost-ineffective heat transfer must be avoided. Additional guidelines follow: • The higher the temperature T at which a heat transfer occurs in cases where T > T0, where T0 denotes the temperature of the environment, the more valuable the heat transfer and, consequently, the greater the need to avoid heat transfer to the ambient, to cooling water, or to a refrigerated stream. Heat transfer across T0 should be avoided. • The lower the temperature T at which a heat transfer occurs in cases where T < T0, the more valuable the heat transfer and, consequently, the greater the need to avoid direct heat transfer with the ambient or a heated stream. • Since exergy destruction associated with heat transfer between streams varies inversely with the temperature level, the lower the temperature level, the greater the need to minimize the streamto-stream temperature difference. Although irreversibilities related to friction, unrestrained expansion, and mixing are often less significant than combustion and heat transfer, they should not be overlooked, and the following guidelines apply: • Relatively more attention should be paid to the design of the lower temperature stages of turbines and compressors (the last stages of turbines and the first stages of compressors) than to the remaining stages of these devices. For turbines, compressors, and motors, consider the most thermodynamically efficient options. • Minimize the use of throttling; check whether power recovery expanders are a cost-effective alternative for pressure reduction. ©2002 CRC Press LLC
0066_frame_C12 Page 12 Wednesday, January 9, 2002 4:22 PM
TABLE 12.2
Symbols and Definitions for Selected Properties
Property
Symbol
Definition
Property
Symbol
Definition ( ∂u/∂T ) v ( ∂h/∂T ) p 1 -- ( ∂v/∂T ) p v 1 – -- ( ∂v/∂p ) T v 1 – -- ( ∂v/∂p ) s v – v ( ∂p/∂v ) T – v ( ∂p/∂v ) s ( ∂T/∂p ) h ( ∂T/∂v ) u
Pressure Temperature
p T
Specific heat, constant volume Specific heat, constant pressure
cv cp
Specific volume
v
Volume expansivity
β
Specific internal energy
u
Isothermal compressivity
κ
Isentropic compressibility
α
Isothermal bulk modulus Isentropic bulk modulus Joule–Thomson coefficient Joule coefficient
B Bs µJ η
Velocity of sound
c
Specific entropy
s
Specific enthalpy Specific Helmholtz function Specific Gibbs function Compressibility factor
h ψ g Z
u + pv u − Ts h − Ts pv/RT
Specific heat ratio
k
cp /cv
– v ( ∂p/∂v ) s 2
• Avoid processes using excessively large thermodynamic driving forces (differences in temperature, pressure, and chemical composition). In particular, minimize the mixing of streams differing significantly in temperature, pressure, or chemical composition. • The greater the mass flow rate the greater the need to use the exergy of the stream effectively. Discussion of means for improving thermodynamic effectiveness also is provided by Bejan et al. (1996) and Moran and Tsatsaronis (2000).
12.3 Property Relations and Data Engineering thermodynamics uses a wide assortment of thermodynamic properties and relations among these properties. Table 12.2 lists several commonly encountered properties. Pressure, temperature, and specific volume can be found experimentally. Specific internal energy, entropy, and enthalpy are among those properties that are not so readily obtained in the laboratory. Values for such properties are calculated using experimental data of properties that are more amenable to measurement, together with appropriate property relations derived using the principles of thermodynamics. Property data are provided in the publications of the National Institute of Standards and Technology (formerly the U.S. Bureau of Standards), of professional groups such as the American Society of Mechanical Engineers (ASME), the American Society of Heating, Refrigerating, and Air Conditioning Engineers (ASHRAE), and the American Chemical Society, and of corporate entities such as Dupont and Dow Chemical. Handbooks and property reference volumes such as included in the list of references for this chapter are readily accessed sources of data. Property data also are retrievable from various commercial online data bases. Computer software increasingly is available for this purpose as well. P-v-T Surface Considerable pressure, specific volume, and temperature data have been accumulated for industrially important gases and liquids. These data can be represented in the form p = f(v, T), called an equation of state. Equations of state can be expressed in graphical, tabular, and analytical forms. Figure 12.1(a) shows the p-v-T relationship for water. Figure 12.1(b) shows the projection of the p-v-T surface onto the pressure-temperature plane, called the phase diagram. The projection onto the p-v plane is shown in Fig. 12.1(c). Figure 12.1(a) has three regions labeled solid, liquid, and vapor where the substance exists only in a single phase. Between the single phase regions lie two-phase regions, where two phases coexist in equilibrium. The lines separating the single-phase regions from the two-phase regions are saturation lines. Any state represented by a point on a saturation line is a saturation state. The line separating the liquid
©2002 CRC Press LLC
0066_frame_C12 Page 13 Wednesday, January 9, 2002 4:22 PM
FIGURE 12.1
Pressure-specific volume-temperature surface and projections for water (not to scale).
phase and the two-phase liquid-vapor region is the saturated liquid line. The state denoted by f is a saturated liquid state. The saturated vapor line separates the vapor region and the two-phase liquidvapor region. The state denoted by g is a saturated vapor state. The saturated liquid line and the saturated vapor line meet at the critical point. At the critical point, the pressure is the critical pressure pc, and the temperature is the critical temperature Tc . Three phases can coexist in equilibrium along the line labeled triple line. The triple line projects onto a point on the phase diagram: the triple point. When a phase change occurs during constant pressure heating or cooling, the temperature remains constant as long as both phases are present. Accordingly, in the two-phase liquid-vapor region, a line of constant pressure is also a line of constant temperature. For a specified pressure, the corresponding temperature is called the saturation temperature. For a specified temperature, the corresponding pressure is called the saturation pressure. The region to the right of the saturated vapor line is known as the superheated vapor region because the vapor exists at a temperature greater than the saturation temperature for its pressure. The region to the left of the saturated liquid line is known as the compressed liquid region because the liquid is at a pressure higher than the saturation pressure for its temperature. ©2002 CRC Press LLC
0066_frame_C12 Page 14 Wednesday, January 9, 2002 4:22 PM
When a mixture of liquid and vapor coexists in equilibrium, the liquid phase is a saturated liquid and the vapor phase is a saturated vapor. The total volume of any such mixture is V = Vf + Vg ; or, alternatively, mv = m f v f + m g v g , where m and v denote mass and specific volume, respectively. Dividing by the total mass of the mixture m and letting the mass fraction of the vapor in the mixture, mg /m, be symbolized by x, called the quality, the apparent specific volume v of the mixture is
v = ( 1 – x )v f + xv g = v f + xv fg
(12.16a)
where v fg = v g – v f . Expressions similar in form can be written for internal energy, enthalpy, and entropy:
u = ( 1 – x )u f + xu g = u f + xu fg
(12.16b)
h = ( 1 – x )h f + xh g = h f + xh fg
(12.16c)
s = ( 1 – x )s f + xs g = s f + xs fg
(12.16d)
Thermodynamic Data Retrieval Tabular presentations of pressure, specific volume, and temperature are available for practically important gases and liquids. The tables normally include other properties useful for thermodynamic analyses, such as internal energy, enthalpy, and entropy. The various steam tables included in the references of this chapter provide examples. Computer software for retrieving the properties of a wide range of substances is also available, as, for example, the ASME Steam Tables (1993) and Bornakke and Sonntag (1996). Increasingly, textbooks come with computer disks providing thermodynamic property data for water, certain refrigerants, and several gases modeled as ideal gases—see, e.g., Moran and Shapiro (2000). The sample steam table data presented in Table 12.3 are representative of data available for substances commonly encountered in engineering practice. The form of the tables and how they are used are assumed to be familiar. In particular, the use of linear interpolation with such tables is assumed known. Specific internal energy, enthalpy, and entropy data are determined relative to arbitrary datums and such datums vary from substance to substance. Referring to Table 12.3a, the datum state for the specific internal energy and specific entropy of water is seen to correspond to saturated liquid water at 0.01°C (32.02°F), the triple point temperature. The value of each of these properties is set to zero at this state. If calculations are performed involving only differences in a particular specific property, the datum cancels. When there are changes in chemical composition during the process, special care must be exercised. The approach followed when composition changes due to chemical reaction is considered in Moran and Shapiro (2000). Liquid water data (see Table 12.3d) suggests that at fixed temperature the variation of specific volume, internal energy, and entropy with pressure is slight. The variation of specific enthalpy with pressure at fixed temperature is somewhat greater because pressure is explicit in the definition of enthalpy. This behavior for v, u, s, and h is exhibited generally by liquid data and provides the basis for the following set of equations for estimating property data at liquid states from saturated liquid data:
©2002 CRC Press LLC
v (T , p ) ≈ vf (T )
(12.17a)
u ( T, p ) ≈ u f (T )
(12.17b)
h ( T, p ) ≈ h f ( T ) + v f [ p – p sat ( T ) ]
(12.17c)
s ( T, p ) ≈ s f (T )
(12.17d)
0066_frame_C12 Page 15 Wednesday, January 9, 2002 4:22 PM
The subscript f denotes the saturated liquid state at the temperature T, and psat is the corresponding saturation pressure. The underlined term of Eq. (12.17c) is usually negligible, giving h(T, p) ≈ h f (T). Graphical representations of property data also are commonly used. These include the p-T and p-v diagrams of Fig. 12.1, the T-s diagram of Fig. 12.2, the h-s (Mollier) diagram of Fig. 12.3, and the p-h diagram of Fig. 12.4. The compressibility charts considered next use the compressibility factor as one of the coordinates. Compressibility Charts The p-v-T relation for a wide range of common gases is illustrated by the generalized compressibility chart of Fig. 12.5. In this chart, the compressibility factor, Z, is plotted vs. the reduced pressure, pR, reduced temperature, TR , and pseudoreduced specific volume, v′R where
pv Z = ------RT
(12.18) 3
In this expression v is the specific volume on a molar basis (m /kmol, for example) and R is the universal gas constant ( 8314 N ⋅ m /kmol ⋅ K, for example). The reduced properties are
p p R = ---- , pc
T T R = ----- , Tc
v v R′ = -------------------( RT c p c )
(12.19)
where pc and Tc denote the critical pressure and temperature, respectively. Values of pc and Tc are obtainable from the literature—see, for example, Moran and Shapiro (2000). The reduced isotherms of Fig. 12.5 represent the best curves fitted to the data of several gases. For the 30 gases used in developing the chart, the deviation of observed values from those of the chart is at most on the order of 5% and for most ranges is much less. Analytical Equations of State Considering the isotherms of Fig. 12.5, it is plausible that the variation of the compressibility factor might be expressed as an equation, at least for certain intervals of p and T. Two expressions can be written that enjoy a theoretical basis. One gives the compressibility factor as an infinite series expansion in pressure, 2 3 Z = 1 + Bˆ ( T )p + Cˆ ( T )p + Dˆ ( T )p + …
(12.20a)
and the other is a series in 1/ v ,
B(T) C(T) D(T) … - + ------------+ Z = 1 + ------------ + ----------v v3 v2
(12.20b)
ˆ … and B, C, D… Such equations of state are known as virial expansions, and the coefficients Bˆ , Cˆ , D are called virial coefficients. In principle, the virial coefficients can be calculated using expressions from statistical mechanics derived from consideration of the force fields around the molecules. Thus far the first few coefficients have been calculated for gases consisting of relatively simple molecules. The coefficients also can be found, in principle, by fitting p-v-T data in particular realms of interest. Only the first few coefficients can be found accurately this way, however, and the result is a truncated equation valid only at certain states. Over 100 equations of state have been developed in an attempt to portray accurately the p-v-T behavior of substances and yet avoid the complexities inherent in a full virial series. In general, these equations exhibit little in the way of fundamental physical significance and are mainly empirical in character. Most are developed for gases, but some describe the p-v-T behavior of the liquid phase, at least qualitatively. ©2002 CRC Press LLC
Sample Steam Table Data (a)
Properties of Saturated Water (Liquid-Vapor): Temperature Table 3
Specific Volume (m /kg) Temp (°C)
Pressure (bar)
Saturated Liquid 3 (vf × 10 )
.01
0.00611 0.00813 0.00872 0.00935 0.01072
1.0002 1.0001 1.0001 1.0001 1.0002
4 5 6 8
Internal Energy (kJ/kg)
Enthalpy (kJ/kg)
Saturated Vapor (vg)
Saturated Liquid (uf )
Saturated Vapor (ug)
Saturated Liquid (hf )
206.136 157.232 147.120 137.734 120.917
0.00 16.77 20.97 25.19 33.59
2375.3 2380.9 2382.3 2383.6 2386.4
0.01 16.78 20.98 25.20 33.60
(b)
Entropy (kJ/kg · K)
Evap. (hfg)
Saturated Vapor (hg)
Saturated Liquid (sf )
Saturated Vapor (sg)
2501.3 2491.9 2489.6 2487.2 2482.5
2501.4 2508.7 2510.6 2512.4 2516.1
0.0000 0.0610 0.0761 0.0912 0.1212
9.1562 9.0514 9.0257 9.0003 8.9501
Properties of Saturated Water (Liquid-Vapor): Pressure Table 3
Specific Volume (m /kg)
Internal Energy (kJ/kg)
Enthalpy (kJ/kg)
Entropy (kJ/kg · K)
Pressure (bar)
Temp (°C)
Saturated Liquid 3 (vf × 10 )
Saturated Vapor (vg)
Saturated Liquid (uf )
Saturated Vapor (ug)
Saturated Liquid (hf )
Evap. (hfg)
Saturated Vapor (hg)
Saturated Liquid (sf )
Saturated Vapor (sg)
0.04 0.06 0.08 0.10 0.20
28.96 36.16 41.51 45.81 60.06
1.0040 1.0064 1.0084 1.0102 1.0172
34.800 23.739 18.103 14.674 7.649
121.45 151.53 173.87 191.82 251.38
2415.2 2425.0 2432.2 2437.9 2456.7
121.46 151.53 173.88 191.83 251.40
2432.9 2415.9 2403.1 2392.8 2358.3
2554.4 2567.4 2577.0 2584.7 2609.7
0.4226 0.5210 0.5926 0.6493 0.8320
8.4746 8.3304 8.2287 8.1502 7.9085
©2002 CRC Press LLC
0066_frame_C12 Page 16 Wednesday, January 9, 2002 4:22 PM
TABLE 12.3
v(m /kg)
Sat. 80 120 160 200
23.739 27.132 30.219 33.302 36.383
T(°C)
v × 10 3 (m /kg)
20 80 140 200 Sat.
1.0006 1.0280 1.0784 1.1555 1.1973
Properties of Superheated Water Vapor
u(kJ/kg) h(kJ/kg) s(kJ/kg · K) p = 0.06 bar = 0.006 MPa (Tsat 36.16°C) 2425.0 2487.3 2544.7 2602.7 2661.4
2567.4 2650.1 2726.0 2802.5 2879.7 (d)
8.3304 8.5804 8.7840 8.9693 9.1398
3
v(m /kg)
u(kJ/kg) h(kJ/kg) s(kJ/kg · K) p = 0.35 bar = 0.035 MPa (Tsat = 72.69°C)
4.526 4.625 5.163 5.696 6.228
2473.0 2483.7 2542.4 2601.2 2660.4
2631.4 2645.6 2723.1 2800.6 2878.4
7.7158 7.7564 7.9644 8.1519 8.3237
Properties of Compressed Liquid Water
3
v × 10 3 (m /kg) 3
u(kJ/kg) h(kJ/kg) s(kJ/kg · K) p = 25 bar = 2.5 MPa (Tsat 223.99°C) 83.80 334.29 587.82 849.9 959.1
86.30 336.86 590.52 852.8 962.1
0.2961 1.0737 1.7369 2.3294 2.5546
0.9995 1.0268 1.0768 1.1530 1.2859
u(kJ/kg) h(kJ/kg) s(kJ/kg · K) p = 50 bar = 5.0 MPa (Tsat = 263.99°C) 83.65 333.72 586.76 848.1 1147.8
88.65 338.85 592.15 853.9 1154.2
0.2956 1.0720 1.7343 2.3255 2.9202
Source: Moran, M.J. and Shapiro, H.N. 2000. Fundamentals of Engineering Thermodynamics, 4th ed. Wiley, New York, as extracted from Keenan, J.H., Keyes, F.G., Hill, P.G., and Moore, J.G. 1969. Steam Tables. Wiley, New York.
©2002 CRC Press LLC
0066_frame_C12 Page 17 Wednesday, January 9, 2002 4:22 PM
(c) 3
T(°C)
0066_frame_C12 Page 18 Wednesday, January 9, 2002 4:22 PM
FIGURE 12.2 Temperature-entropy diagram for water. (Source: Jones, J.B. and Dugan, R.E. 1996. Engineering Thermodynamics, PrenticeHall, Englewood Cliffs, NJ, based on data and formulations from Haar, L., Gallagher, J.S., and Kell, G.S. 1984. NBS/NRC Steam Tables. Hemisphere, Washington, D.C.)
©2002 CRC Press LLC
0066_frame_C12 Page 19 Wednesday, January 9, 2002 4:22 PM
FIGURE 12.3 Enthalpy-entropy (Mollier) diagram for water. (Source: Jones, J.B. and Dugan, R.E. 1996. Engineering Thermodynamics. Prentice-Hall, Englewood Cliffs, NJ, based on data and formulations from Haar, L., Gallagher, J.S., and Kell, G.S. 1984. NBS/NRC Steam Tables. Hemisphere, Washington, D.C.)
Every equation of state is restricted to particular states. The realm of applicability is often indicated by giving an interval of pressure, or density, where the equation can be expected to represent the p-v-T behavior faithfully. For further discussion of equations of state see Reid and Sherwood (1966) and Reid et al. (1987). Ideal Gas Model Inspection of the generalized compressibility chart, Fig. 12.5, shows that when pR is small, and for many states when TR is large, the value of the compressibility factor Z is close to 1. In other words, for pressures that are low relative to pc , and for many states with temperatures high relative to Tc , the compressibility factor approaches a value of 1. Within the indicated limits, it may be assumed with reasonable accuracy that Z = 1—i.e.,
p v = RT
or
pv = RT
(12.21a)
Other forms of this expression in common use are
pV = nRT,
pV = mRT
(12.21b)
In these equations, n = m/M, v = M v, and the specific gas constant is R = R/M , where M denotes the molecular weight. ©2002 CRC Press LLC
0066_frame_C12 Page 20 Wednesday, January 9, 2002 4:22 PM
FIGURE 12.4 Pressure-enthalpy diagram for water. (Source: Jones, J.B. and Dugan, R.E. 1996. Engineering Thermodynamics. Prentice-Hall, Englewood Cliffs, NJ, based on data and formulations from Haar, L., Gallagher, J.S., and Kell, G.S. 1984. NBS/NRC Steam Tables. Hemisphere, Washington, D.C.) ©2002 CRC Press LLC
0066_frame_C12 Page 21 Wednesday, January 9, 2002 4:22 PM
FIGURE 12.5 Generalized compressibility chart (TR = T/Tc, pR = p/pc, v′R = vp c /RT c ) for pR ≤ 10. (Source: Obert, E.F. 1960 Concepts of Thermodynamics. McGrawHill, New York.) ©2002 CRC Press LLC
0066_frame_C12 Page 22 Wednesday, January 9, 2002 4:22 PM
TABLE 12.4
Ideal Gas Expressions for ∆h, ∆u, and ∆s
Variable Specific Heats h ( T2 ) – h ( T1 ) =
T2
∫
T1
c p ( T ) dT
s ( T2 , p2 ) – s ( T1 , p1 ) = u ( T2 ) – u ( T1 ) =
T2
∫
T1
vr ( T2 ) v -------------= ----2 v1 vr ( T1 ) a b
T2
∫
T1
p2 cp ( T ) ------------ dT – R ln ---p1 T
T2
∫
T1
v2 cv ( T ) -----------dT + R ln --v1 T
b
h ( T2 ) – h ( T1 ) = cp ( T2 – T1 )
(1′)
p2 T s ( T 2 , p 2 ) – s ( T 1 , p 1 ) = c p ln -----2 – R ln ---p1 T1
(2′)
(3)
u ( T2 ) – u ( T1 ) = cv ( T2 – T1 )
(3′)
(4)
T2 v ----2 s ( T 2 , v 2 ) – s ( T 1 , v 1 ) = c v ln ---T + R ln v
(1)
c v ( T ) dT
s ( T2 , v2 ) – s ( T1 , v1 ) = s 2 = s1 pr ( T2 ) p -------------- = ----2 p1 pr ( T1 )
Constant Specific Heats
(2)
a
1
(4′)
1
s 2 = s1 (5)
p ( k−1 ) /k T -----2 = ----2 p 1 T1
(5′)
(6)
v k−1 T2 ----- = ----2 v 1 T1
(6′)
p2 Alternatively, s ( T 2 ,p 2 ) – s ( T 1 ,p 1 ) = s° ( T 2 ) – s° ( T 1 ) – R ln ---p. 1
cp and cv are average values over the temperature interval from T1 to T2.
It can be shown that (∂u/∂v )T vanishes identically for a gas whose equation of state is exactly given by Eq. (12.21), and thus the specific internal energy depends only on temperature. This conclusion is supported by experimental observations beginning with the work of Joule, who showed that the internal energy of air at low density depends primarily on temperature. The above considerations allow for an ideal gas model of each real gas: (1) the equation of state is given by Eq. (12.21) and (2) the internal energy, enthalpy, and specific heats (Table 12.2) are functions of temperature alone. The real gas approaches the model in the limit of low reduced pressure. At other states the actual behavior may depart substantially from the predictions of the model. Accordingly, caution should be exercised when invoking the ideal gas model lest error is introduced. Specific heat data for gases can be obtained by direct measurement. When extrapolated to zero pressure, ideal gas-specific heats result. Ideal gas-specific heats also can be calculated using molecular models of matter together with data from spectroscopic measurements. The following ideal gas-specific heat relations are frequently useful:
cp ( T ) = cv ( T ) + R kR c p = ----------- , k–1
R c v = ----------k–1
(12.22a) (12.22b)
where k = cp /c v . For processes of an ideal gas between states 1 and 2, Table 12.4 gives expressions for evaluating the changes in specific enthalpy, ∆h, specific entropy, ∆s, and specific internal energy, ∆u. Relations also are provided for processes of an ideal gas between states having the same specific entropy: s2 = s1. Property relations and data required by the expressions of Table 12.4: h, u, cp , cv , pr , vr , and s° are obtainable from the literature—see, for example, Moran and Shapiro (2000).
12.4 Vapor and Gas Power Cycles Vapor and gas power systems develop electrical or mechanical power from sources of chemical, solar, or nuclear origin. In vapor power systems the working fluid, normally water, undergoes a phase change from liquid to vapor, and conversely. In gas power systems, the working fluid remains a gas throughout, although the composition normally varies owing to the introduction of a fuel and subsequent combustion. ©2002 CRC Press LLC
0066_frame_C12 Page 23 Wednesday, January 9, 2002 4:22 PM
The processes taking place in power systems are sufficiently complicated that idealizations are typically employed to develop tractable thermodynamic models. The air standard analysis of gas power systems considered in the present section is a noteworthy example. Depending on the degree of idealization, such models may provide only qualitative information about the performance of the corresponding real-world systems. Yet such information frequently is useful in gauging how changes in major operating parameters might affect actual performance. Elementary thermodynamic models also can provide simple settings to assess, at least approximately, the advantages and disadvantages of features proposed to improve thermodynamic performance. Work and Heat Transfer in Internally Reversible Processes Expressions giving work and heat transfer in internally reversible processes are useful in describing the themodynamic performance of vapor and gas cycles. Important special cases are presented in the discussion to follow. For a gas as the system, the work of expansion arises from the force exerted by the system to move the boundary against the resistance offered by the surroundings: 2
2
1
1
∫ F dx = ∫ pA dx
W =
where the force is the product of the moving area and the pressure exerted by the system there. Noting that Adx is the change in total volume of the system,
W =
2
∫ p dV 1
This expression for work applies to both actual and internal expansion processes. However, for an internally reversible process p is not only the pressure at the moving boundary but also the pressure throughout the system. Furthermore, for an internally reversible process the volume equals mv, where the specific volume v has a single value throughout the system at a given instant. Accordingly, the work of an internally reversible expansion (or compression) process per unit of system mass is
W ----- int = m rev
2
∫ p dv
(12.23)
1
When such a process of a closed system is represented by a continuous curve on a plot of pressure vs. specific volume, the area under the curve is the magnitude of the work per unit of system mass: area ab-c′-d′ of Fig. 12.6. For one-inlet, one-exit control volumes in the absence of internal irreversibilities, the following expression gives the work developed per unit of mass flowing: 2 2 e ˙ vi – ve W ----- int = – v dp + -------------- + g ( zi – ze ) m˙ rev 2 i
∫
(12.24a)
where the integral is performed from inlet to exit (see Moran and Shapiro (2000) for discussion). If there is no significant change in kinetic or potential energy from inlet to exit, Eq. (12.24a) reads e ˙ W ----- int = – v dp ( ∆ke = ∆pe = 0 ) m˙ rev i
∫
©2002 CRC Press LLC
(12.24b)
0066_frame_C12 Page 24 Wednesday, January 9, 2002 4:22 PM
FIGURE 12.6
Internally reversible process on p-v coordinates.
The specific volume remains approximately constant in many applications with liquids. Then Eq. (12.24b) becomes
˙ W ----- int = – v ( p e – p i) ( v = constant ) m˙ rev
(12.24c)
When the states visited by a unit of mass flowing without irreversibilities from inlet to outlet are described by a continuous curve on a plot pressure vs. specific volume, as shown in Fig. 12.6, the magnitude of the integral ∫vdp of Eqs. (12.24a) and (12.24b) is represented by the area a-b-c-d behind the curve. For an internally reversible process of a closed system between state 1 and state 2, the heat transfer per unit of system mass is
Q --- int = m rev
2
∫ T ds
(12.25)
1
For a one-inlet, one-exit control volume in the absence of internal irreversibilities, the following expression gives the heat transfer per unit of mass flowing from inlet i to exit e:
Q˙ --- int = m˙ rev
e
∫ T ds
(12.26)
i
When any such process is represented by a continuous curve on a plot of temperature vs. specific entropy, the area under the curve is the magnitude of the heat transfer per unit of mass. Polytropic Processes An internally reversible process described by the expression pv = constant is called a polytropic process and n is the polytropic exponent. In certain applications n can be obtained by fitting pressure-specific volume data. Although this expression can be applied when real gases are considered, it most generally appears in practice together with the use of the ideal gas model. Table 12.5 provides several expressions applicable to polytropic processes and the special forms they take when the ideal gas model is assumed. The expressions for ∫p dv and ∫v dp have application to work evaluations with Eqs. (12.23) and (12.24), respectively. n
©2002 CRC Press LLC
0066_frame_C12 Page 25 Wednesday, January 9, 2002 4:22 PM
TABLE 12.5
Polytropic Processes: pv = Constant n
a
General
Ideal Gas p2 v n ---- = ----2 v 1 p1
b
p2 T n/ ( n−1 ) v n ---- = ----1 = -----2 v 2 T 1 p1
(1)
n = 0: constant pressure n = ±∞: constant specific volume
n = 0: constant pressure n = ±∞: constant specific volume n = 1: constant temperature n = k: constant specific entropy when k is constant
n=1
n=1 v2 ∫1 p dv = p1 v1 ln ---v-1
(2)
2 p2 – ∫ v dp = – p 1 v 1 ln ---p1 1
(3)
2
n≠1
∫
2
1
v2 p dv = RT ln ---v1
2 p2 – ∫ v dp = – R T ln ---p1 1
(1′)
(2′)
(3′)
n≠1
p2 v2 – p1 v1 ∫1 p dv = -----------------------1–n 2
p ( n−1 )/n p1 v1 - 1 – ----2 = ---------- n–1 p 1
∫ (4)
2 n – ∫ v dp = ------------ ( p 2 v 2 – p 1 v 1 ) 1–n 1
p ( n−1 )/n np 1 v 1 - 1 – ----2 = ----------- p 1 n–1
2 1
R ( T2 – T1 ) p dv = ------------------------1–n p ( n−1 )/n RT = -----------1- 1 – ----2 n–1 p 1
(4′)
2 nR – ∫ v dp = ------------ ( T 2 – T 1 ) 1–n 1
(5)
p ( n−1 )/n nRT = -------------1 1 – ----2 p 1 n–1
(5′)
a
For polytropic processes of closed systems where volume change is the only work mode, Eqs. (2), (4), and (2′), (4′) are applicable with Eq. (12.23) to evaluate the work. When each unit of mass passing through a one-inlet, one-exit control volume at steady state undergoes a polytropic process, Eqs. (3), (5), and (3′), (5′) are applicable 2 2 with Eqs. (12.24a) and (12.24b) to evaluate the power. Also note that generally, – ∫ 1 vdp = n∫ 1 pdv. b
Rankine and Brayton Cycles In their simplest embodiments vapor power and gas turbine power plants are represented conventionally in terms of four components in series, forming, respectively, the Rankine cycle and the Brayton cycle shown schematically in Table 12.6. The thermodynamically ideal counterparts of these cycles are composed of four internally reversible processes in series: two isentropic processes alternated with two constant pressure processes. Table 12.6 provides property diagrams of the actual and corresponding ideal cycles. Each actual cycle is denoted 1-2-3-4-1; the ideal cycle is 1-2s-3-4s-1. For simplicity, pressure drops through the boiler, condenser, and heat exchangers are not shown. Invoking Eq. (12.26) for the ideal cycles, the heat added per unit of mass flowing is represented by the area under the isobar from state 2s to state 3: area a-2s-3-b-a. The heat rejected is the area under the isobar from state 4s to state 1: area ©2002 CRC Press LLC
0066_frame_C12 Page 26 Wednesday, January 9, 2002 4:22 PM
TABLE 12.6
Rankine and Brayton Cycles
Rankine Cycle
Brayton Cycle
W˙ p = m˙ ( h 2 – h 1 ) W˙ c Q˙ in = m˙ ( h 3 – h 2 ) W˙ t = m˙ ( h 3 – h 4 ) Q˙ out = m˙ ( h 1 – h 4 )
(>0)
(1)
(>0)
(2)
(>0)
(3)
(>0)
(4)
a-1-4s-b-a. Enclosed area 1-2s-3-4s-1 represents the net heat added per unit of mass flowing. For any power cycle, the net heat added equals the net work done. Expressions for the principal energy transfers shown on the schematics of Table 12.6 are provided by Eqs. (1) to (4) of the table. They are obtained by reducing Eq. (12.10a) with the assumptions of negligible heat loss and negligible changes in kinetic and potential energy from the inlet to the exit of each component. All quantities are positive in the directions of the arrows on the figure. The thermal efficiency of a power cycle is defined as the ratio of the net work developed to the total energy added by heat transfer. Using expressions (1)–(3) of Table 12.6, the thermal efficiency is
( h3 – h4 ) – ( h2 – h1 ) h = ----------------------------------------------h3 – h2 h4 – h1 = 1 – --------------h3 – h2
(12.27)
To obtain the thermal efficiency of the ideal cycle, h2s replaces h2 and h4s replaces h4 in Eq. (12.27). ©2002 CRC Press LLC
0066_frame_C12 Page 27 Wednesday, January 9, 2002 4:22 PM
Decisions concerning cycle operating conditions normally recognize that the thermal efficiency tends to increase as the average temperature of heat addition increases and/or the temperature of heat rejection decreases. In the Rankine cycle, a high average temperature of heat addition can be achieved by superheating the vapor prior to entering the turbine and/or by operating at an elevated steam-generator pressure. In the Brayton cycle an increase in the compressor pressure ratio p2 /p1 tends to increase the average temperature of heat addition. Owing to materials limitations at elevated temperatures and pressures, the state of the working fluid at the turbine inlet must observe practical limits, however. The turbine inlet temperature of the Brayton cycle, for example, is controlled by providing air far in excess of what is required for combustion. In a Rankine cycle using water as the working fluid, a low temperature of heat rejection is typically achieved by operating the condenser at a pressure below 1 atm. To reduce erosion and wear by liquid droplets on the blades of the Rankine cycle steam turbine, at least 90% steam quality should be maintained at the turbine exit: x4 > 0.9. The back work ratio, bwr, is the ratio of the work required by the pump or compressor to the work developed by the turbine:
h2 – h1 bwr = --------------h3 – h4
(12.28)
As a relatively high specific volume vapor expands through the turbine of the Rankine cycle and a much lower specific volume liquid is pumped, the back work ratio is characteristically quite low in vapor power plants—in many cases on the order of 1–2%. In the Brayton cycle, however, both the turbine and compressor handle a relatively high specific volume gas, and the back ratio is much larger, typically 40% or more. The effect of friction and other irreversibilities for flow through turbines, compressors, and pumps is commonly accounted for by an appropriate isentropic efficiency. Referring to Table 12.6 for the states, the isentropic turbine efficiency is
h3 – h4 η t = ---------------h 3 – h 4s
(12.29a)
h 2s – h 1 η c = ---------------h2 – h1
(12.29b)
The isentropic compressor efficiency is
In the isentropic pump efficiency, h p, which takes the same form as Eq. (12.29b), the numerator is frequently approximated via Eq. (12.24c) as h2s − h1 ≈ v1∆p, where ∆p is the pressure rise across the pump. Simple gas turbine power plants differ from the Brayton cycle model in significant respects. In actual operation, excess air is continuously drawn into the compressor, where it is compressed to a higher pressure; then fuel is introduced and combustion occurs; finally the mixture of combustion products and air expands through the turbine and is subsequently discharged to the surroundings. Accordingly, the low-temperature heat exchanger shown by a dashed line in the Brayton cycle schematic of Table 12.6 is not an actual component, but included only to account formally for the cooling in the surroundings of the hot gas discharged from the turbine. Another frequently employed idealization used with gas turbine power plants is that of an air-standard analysis. An air-standard analysis involves two major assumptions: (1) As shown by the Brayton cycle schematic of Table 12.6, the temperature rise that would be brought about by combustion is effected instead by a heat transfer from an external source. (2) The working fluid throughout the cycle is air, which behaves as an ideal gas. In a cold air-standard analysis the specific heat ratio k for air is taken as constant. Equations (1) to (6) of Table 12.4 apply generally to air-standard analyses. Equations (1′) to (6′) ©2002 CRC Press LLC
0066_frame_C12 Page 28 Wednesday, January 9, 2002 4:22 PM
of Table 12.4 apply to cold air-standard analyses, as does the following expression for the turbine power obtained from Table 12.1 (Eq. (10c′′)):
kRT ( k – 1 )k W˙ t = m˙ ------------3 [ 1 – ( p 4 p 3 ) ] k–1
(12.30)
An expression similar in form can be written for the power required by the compressor. Otto, Diesel, and Dual Cycles Although most gas turbines are also internal combustion engines, the name is usually reserved to reciprocating internal combustion engines of the type commonly used in automobiles, trucks, and buses. Two principal types of reciprocating internal combustion engines are the spark-ignition engine and the compression-ignition engine. In a spark-ignition engine a mixture of fuel and air is ignited by a spark plug. In a compression ignition engine air is compressed to a high-enough pressure and temperature that combustion occurs spontaneously when fuel is injected. In a four-stroke internal combustion engine, a piston executes four distinct strokes within a cylinder for every two revolutions of the crankshaft. Figure 12.7 gives a pressure-displacement diagram as it might be displayed electronically. With the intake valve open, the piston makes an intake stroke to draw a fresh charge into the cylinder. Next, with both valves closed, the piston undergoes a compression stroke raising the temperature and pressure of the charge. A combustion process is then initiated, resulting in a highpressure, high-temperature gas mixture. A power stroke follows the compression stroke, during which the gas mixture expands and work is done on the piston. The piston then executes an exhaust stroke in which the burned gases are purged from the cylinder through the open exhaust valve. Smaller engines operate on two-stroke cycles. In two-stroke engines, the intake, compression, expansion, and exhaust operations are accomplished in one revolution of the crankshaft. Although internal combustion engines undergo mechanical cycles, the cylinder contents do not execute a thermodynamic cycle, since matter is introduced with one composition and is later discharged at a different composition. A parameter used to describe the performance of reciprocating piston engines is the mean effective pressure, or mep. The mean effective pressure is the theoretical constant pressure that, if it acted on the
FIGURE 12.7
Pressure-displacement diagram for a reciprocating internal combustion engine.
©2002 CRC Press LLC
0066_frame_C12 Page 29 Wednesday, January 9, 2002 4:22 PM
piston during the power stroke, would produce the same net work as actually developed in one cycle. That is,
net work for one cycle mep = ----------------------------------------------------displacement volume
(12.31)
where the displacement volume is the volume swept out by the piston as it moves from the top dead center to the bottom dead center. For two engines of equal displacement volume, the one with a higher mean effective pressure would produce the greater net work and, if the engines run at the same speed, greater power. Detailed studies of the performance of reciprocating internal combustion engines may take into account many features, including the combustion process occurring within the cylinder and the effects of irreversibilities associated with friction and with pressure and temperature gradients. Heat transfer between the gases in the cylinder and the cylinder walls and the work required to charge the cylinder and exhaust the products of combustion also might be considered. Owing to these complexities, accurate modeling of reciprocating internal combustion engines normally involves computer simulation. To conduct elementary thermodynamic analyses of internal combustion engines, considerable simplification is required. A procedure that allows engines to be studied qualitatively is to employ an airstandard analysis having the following elements: (1) a fixed amount of air modeled as an ideal gas is the system; (2) the combustion process is replaced by a heat transfer from an external source and represented in terms of elementary thermodynamic processes; (3) there are no exhaust and intake processes as in an actual engine: the cycle is completed by a constant-volume heat rejection process; (4) all processes are internally reversible. The processes employed in air-standard analyses of internal combustion engines are selected to represent the events taking place within the engine simply and mimic the appearance of observed pressure-displacement diagrams. In addition to the constant volume heat rejection noted previously, the compression stroke and at least a portion of the power stroke are conventionally taken as isentropic. The heat addition is normally considered to occur at constant volume, at constant pressure, or at constant volume followed by a constant pressure process, yielding, respectively, the Otto, Diesel, and Dual cycles shown in Table 12.7. Reducing the closed system energy balance, Eq. (12.7b), gives the following expressions for work and heat applicable in each case shown in Table 12.7:
W 12 -------- = u1 – u2 , m
W 34 --------- = u 3 – u 4 , m
Q 41 -------- = u 1 – u 4 m
(12.32)
Table 12.7 provides additional expressions for work, heat transfer, and thermal efficiency identified with each case individually. All expressions for work and heat adhere to the respective sign conventions of Eq. (12.7b). Equations (1) to (6) of Table 12.4 apply generally to air-standard analyses. In a cold airstandard analysis the specific heat ratio k for air is taken as constant. Equations (1′) to (6′) of Table 12.4 apply to cold air-standard analyses, as does Eq. (4′) of Table 12.5, with n = k for the isentropic processes of these cycles. Referring to Table 12.7, the ratio of specific volumes v1/v2 is the compression ratio, r. For the Diesel cycle, the ratio v3/v2 is the cutoff ratio, rc. Figure 12.8 shows the variation of the thermal efficiency with compression ratio for an Otto cycle and Diesel cycles having cutoff ratios of 2 and 3. The curves are determined on a cold air-standard basis with k = 1.4 using the following expression: k
rc – 1 1 - ------------------η = 1 – ------k −1 k ( r – 1 ) c r where the Otto cycle corresponds to rc = 1.
©2002 CRC Press LLC
( constant k )
(12.33)
Otto, Diesel, and Dual Cycles (a) Otto Cycle
W 23 -------- = 0 m Q 23 ------- = u3 – u2 m u4 – u1 h = 1 – --------------u3 – u2
©2002 CRC Press LLC
(b) Diesel Cycle
W 23 --------- = p 2 ( v 3 – v 2 ) m Q 23 -------- = h 3 – h 2 m u4 – u1 h = 1 – --------------h3 – h2
(c) Dual cycle
Q 2x W 2x --------- = 0 , ------- = ux – u2 m m W x3 Q x3 --------- = p 3 ( v 3 – v 2 ) , ------- = h3 – hx m m u4 – u1 h = 1 – ----------------------------------------------( ux – u2 ) + ( h3 – hx )
0066_frame_C12 Page 30 Wednesday, January 9, 2002 4:22 PM
TABLE 12.7
0066_frame_C12 Page 31 Wednesday, January 9, 2002 4:22 PM
FIGURE 12.8
Thermal efficiency of the cold air-standard Otto and Diesel cycles, k = 1.4.
As all processes are internally reversible, areas on the p-v and T-s diagrams of Table 12.7 can be interpreted, respectively, as work and heat transfer. Invoking Eq. (12.23) and referring to the p-v diagrams, the areas under process 3-4 of the Otto cycle, process 2-3-4 of the Diesel cycle, and process x-3-4 of the Dual cycle represent the work done by the gas during the power stroke, per unit of mass. For each cycle, the area under the isentropic process 1-2 represents the work done on the gas during the compression stroke, per unit of mass. The enclosed area of each cycle represents the net work done per unit mass. With Eq. (12.25) and referring to the T-s diagrams, the areas under process 2-3 of the Otto and Diesel cycles and under process 2-x-3 of the Dual cycle represent the heat added per unit of mass. For each cycle, the area under the process 4-1 represents the heat rejected per unit of mass. The enclosed area of each cycle represents the net heat added, which equals the net work done, each per unit of mass.
References ASHRAE Handbook 1993 Fundamentals. 1993. American Society of Heating, Refrigerating, and Air Conditioning Engineers, Atlanta. ASME Steam Tables, 6th ed., 1993. ASME Press, Fairfield, NJ. Bejan, A., Tsatsaronis, G., and Moran, M. 1996. Thermal Design and Optimization, John Wiley & Sons, New York. Bird, R.B., Stewart, W.E., and Lightfoot, E.N. 1960. Transport Phenomena, John Wiley & Sons, New York. Bolz, R.E. and Tuve, G.L. (Eds.). 1973. Handbook of Tables for Applied Engineering Science, 2nd ed., CRC Press, Boca Raton, FL. Bornakke, C. and Sonntag, R.E. 1996. Tables of Thermodynamic and Transport Properties, John Wiley & Sons, New York. Gray, D.E. (Ed.). 1972. American Institute of Physics Handbook, McGraw-Hill, New York. Haar, L., Gallagher, J.S., and Kell, G.S. 1984. NBS/NRC Steam Tables, Hemisphere, New York. Handbook of Chemistry and Physics, annual editions, CRC Press, Boca Raton, FL. JANAF Thermochemical Tables, 3rd ed., 1986. American Chemical Society and the American Institute of Physics for the National Bureau of Standards. Jones, J.B. and Dugan, R.E. 1996. Engineering Thermodynamics, Prentice-Hall, Englewood Cliffs, NJ. Keenan, J.H., Keyes, F.G., Hill, P.G., and Moore, J.G. 1969 and 1978. Steam Tables, John Wiley & Sons, New York (1969, English Units; 1978, SI Units).
©2002 CRC Press LLC
0066_frame_C12 Page 32 Wednesday, January 9, 2002 4:22 PM
Keenan, J.H., Chao, J., and Kaye, J. 1980 and 1983. Gas Tables—International Version, 2nd ed., John Wiley & Sons, New York (1980, English Units; 1983, SI Units). Knacke, O., Kubaschewski, O., and Hesselmann, K. 1991. Thermochemical Properties of Inorganic Substances, 2nd ed., Springer-Verlag, Berlin. Kotas, T.J. 1995. The Exergy Method of Thermal Plant Analysis, Krieger, Melbourne, FL. Liley, P.E. 1987. Thermodynamic Properties of Substances, In Marks’ Standard Handbook for Mechanical Engineers, E.A. Avallone and T. Baumeister (Eds.), 9th ed., McGraw-Hill, New York, Sec. 4.2. Liley, P.E., Reid, R.C., and Buck, E. 1984. Physical and chemical data. In Perrys’ Chemical Engineers, Handbook, R.H. Perry and D.W. Green (Eds.), 6th ed., McGraw-Hill, New York, Sec. 3. Moran, M.J. 1989. Availability Analysis—A Guide to Efficient Energy Use, ASME Press, New York. Moran, M.J. 1998. Engineering Thermodynamics. In The CRC Handbook of Mechanical Engineering, F. Kreith (Ed.), CRC Press, Boca Raton, FL, Chap. 2. Moran, M.J. and Shapiro, H.N. 2000. Fundamentals of Engineering Thermodynamics, 4th ed., John Wiley & Sons, New York. Moran, M.J. and Shapiro, H.N. 2000. IT: Interactive Thermodynamics, Computer Software to Accompany Fundamentals of Engineering Thermodynamics, 4th ed., Intellipro, John Wiley & Sons, New York. Moran, M.J. and Tsatsaronis, G. 2000. Engineering Thermodynamics. In The CRC Handbook of Thermal Engineering, F. Kreith (Ed.), CRC Press, Boca Raton, FL, Chap. 1. Obert, E.F. 1960. Concepts of Thermodynamics, McGraw-Hill, New York. Preston-Thomas, H. 1990. The International Temperature Scale of 1990 (ITS-90). Metrologia. 27: 3–10. Reid, R.C. and Sherwood, T.K. 1966. The Properties of Gases and Liquids, 2nd ed., McGraw-Hill, New York. Reid, R.C., Prausnitz, J.M., and Poling, B.E. 1987. The Properties of Gases and Liquids, 4th ed., McGrawHill, New York. Reynolds, W.C. 1979. Thermodynamic Properties in SI—Graphs, Tables and Computational Equations for 40 Substances. Department of Mechanical Engineering, Stanford University, Palo Alto, CA. Stephan, K. 1994. Tables. In Dubbel Handbook of Mechanical Engineering, W. Beitz and K. H. Kuttner (Eds.), Springer-Verlag, London, Sec. C11. Szargut, J., Morris, D.R., and Steward, F.R. 1988. Exergy Analysis of Thermal, Chemical and Metallurgical Processes, Hemisphere, New York. Van Wylen, G.J., Sonntag, R.E., and Bornakke, C. 1994. Fundamentals of Classical Thermodynamics, 4th ed., John Wiley & Sons, New York. Zemansky, M.W. 1972. Thermodynamic Symbols, Definitions, and Equations. In American Institute of Physics Handbook, D.E. Gray (Ed.), McGraw-Hill, New York, Sec. 4b.
©2002 CRC Press LLC
13 Modeling and Simulation for MEMS 13.1 13.2 13.3
13.4
Introduction The Digital Circuit Development Process: Modeling and Simulating Systems with Micro- (or Nano-) Scale Feature Sizes Analog and Mixed-Signal Circuit Development: Modeling and Simulating Systems with Micro(or Nano-) Scale Feature Sizes and Mixed Digital (Discrete) and Analog (Continuous) Input, Output, and Signals Basic Techniques and Available Tools for MEMS Modeling and Simulation Basic Modeling and Simulation Techniques • A Catalog of Resources for MEMS Modeling and Simulation
13.5
Carla Purdy University of Cincinnati
13.6 13.7
Modeling and Simulating MEMS, i.e., Systems with Micro- (or Nano-) Scale Feature Sizes, Mixed Digital (Discrete) and Analog (Continuous) Input, Output, and Signals, Two- and Three-Dimensional Phenomena, and Inclusion and Interaction of Multiple Domains and Technologies A “Recipe” for Successful MEMS Simulation Conclusion: Continuing Progress in MEMS Modeling and Simulation
13.1 Introduction Accurate modeling and efficient simulation, in support of greatly reduced development cycle time and cost, are well established techniques in the miniaturized world of integrated circuits (ICs). Simulation accuracies of 5% or less for parameters of interest are achieved fairly regularly [1], although even much less accurate simulations (25–30%, e.g.) can still be used to obtain valuable information [2]. In the IC world, simulation can be used to predict the performance of a design, to analyze an already existing component, or to support automated synthesis of a design. Eventually, MEMS simulation environments should also be capable of these three modes of operation. The MEMS developer is, of course, most interested in quick access to particular techniques and tools to support the system currently under development. In the long run, however, consistently achieving acceptably accurate MEMS simulations will depend both on the ability of the CAD (computer-aided design) community to develop robust, efficient, user-friendly tools which will be widely available both to cutting-edge researchers and to production engineers and on the existence of readily accessible standardized processes. In this chapter we focus on fundamental approaches which will eventually lead to successful MEMS simulations becoming routine.
©2002 CRC Press LLC
We also survey available tools which a MEMS developer can use to achieve good simulation results. Many of these tools build MEMS development systems on platforms already in existence for other technologies, thus leveraging the extensive resources which have gone into previous development and avoiding “reinventing the wheel.” For our discussion of modeling and simulation, the salient characteristics of MEMS are: 1. 2. 3. 4.
inclusion and interaction of multiple domains and technologies, both two- and three-dimensional behaviors, mixed digital (discrete) and analog (continuous) input, output, and signals, and micro- (or nano-) scale feature sizes.
Techniques for the manufacture of reliable (two-dimensional) systems with micro- or nano-scale feature sizes (Characteristic 4) are very mature in the field of microelectronics, and it is logical to attempt to extend these techniques to MEMS, while incorporating necessary changes to deal with Characteristics 1–3. Here we survey some of the major principles which have made microelectronics such a rapidly evolving field, and we look at microelectronics tools which can be used or adapted to allow us to apply these principles to MEMS. We also discuss why applying such strategies to MEMS may not always be possible.
13.2 The Digital Circuit Development Process: Modeling and Simulating Systems with Micro- (or Nano-) Scale Feature Sizes A typical VLSI digital circuit or system process flow is shown in Fig. 13.1, where the dotted lines show the most optimistic point to which the developer must return if errors are discovered. Option A, for a “mature” technology, is supported by efficient and accurate simulators, so that even the first actual implementation (“first silicon”) may have acceptable performance. As a process matures, the goal is to have better and better simulations, with a correspondingly smaller chance of discovering major performance flaws after implementation. However, development of models and simulators to support this goal is in itself a major task. Option B (immature technology), at its extreme, would represent an experimental technology for which not enough data are available to support even moderately robust simulations. In modern software and hardware development systems, the emphasis is on tools which provide increasingly good support for the initial stages of this process. This increases the probability that conceptual or design errors will be identified and modifications made as early in the process as possible and thus decreases both development time and overall development cost. At the microlevel, the development cycle represented by Option A is routinely achieved today for many digital circuits. In fact, the entire process can in some cases be highly automated, so that we have “silicon compilers” or “computers designing computers.” Thus, not only design analysis, but even design synthesis is possible. This would be the case for well-established silicon-based CMOS technologies, for example. There are many characteristics of digital systems which make this possible. These include: • Existence of a small set of basic digital circuit elements. All Boolean functions can be realized by combinations of the logic functions AND, OR, NOT. In fact, all Boolean functions can be realized by combinations of just one gate, a NAND (NOT-AND) gate. So if a “model library” of basic gates (and a few other useful parts, such as I/O pins, multiplexors, and flip-flops) is developed, systems can be implemented just by combining suitable library elements. • A small set of standardized and well-understood technologies, with well-characterized fabrication processes that are widely available. For example, in the United States, the MOSIS service [3] provides access to a range of such technologies. Similar services elsewhere include CMP in France [4], Europractice in Europe [5], VDEC in Japan [6], and CMC in Canada [7]. • A well-developed educational infrastructure and prototyping facilities. These are provided by all of the services listed above. These types of organization and educational support had their origins in the work of Mead and Conway [8] and continue to produce increasingly sophisticated VLSI engineers. ©2002 CRC Press LLC
Product Requirements
Product Specifications
Design
Simulation
A
Implementation
B
FIGURE 13.1
Testing
Product design process. A: mature technology, B: immature technology.
An important aspect of this infrastructure is that it also provides, at relatively low cost, access to example devices and systems, made with stable fabrication processes, whose behavior can be tested and compared to simulation results, thereby enabling improvements in simulation techniques. • “Levels and views” (abstraction and encapsulation or “information hiding”) (see [9]). This concept is illustrated in Fig. 13.2(a). For the VLSI domain, we can identify at least five useful levels of abstraction, from the lowest (layout geometry) to the highest (system specification). We can also “view” a system behaviorally, structurally, or physically. In the behavioral domain we describe the functionality of the circuit without specifying how this functionality will be achieved. This allows us to think clearly about what the system needs to do, what inputs are needed, and what outputs will be provided. Thus we can view the component as a “black box” that has specified responses to given inputs. The current through a MOS field effect transistor (MOSFET), given as a function of the gate voltage, is a (low-level) behavioral description, for example. In the physical domain we specify the actual physical parts of the circuit. At the lowest levels in this domain, we must choose what material each piece of the circuit will be made from (for example, which pieces of wire will lie in each of the metal layers usually provided in a CMOS circuit) and exactly where each piece will be placed in the actual physical layout. The physical description will be translated directly into mask layouts for the circuit. The structural domain is intermediate between physical and behavioral. It provides an interface between the functionality specified in the behavioral domain, which ignores geometry, and the geometry specified in the physical domain, which ignores functionality. In this intermediate domain, we can carry out logic optimization and state minimization, for example. ©2002 CRC Press LLC
(a)
Levels Behavioral
Physical Partitions
ALUs, MUXs, Registers
Floorplans
4
Performance Specifications
3
Algorithms
2
Register Transfers
1
Gates, Boolean Equations, Flip-flops FSMs Transfer Functions, Transistors, Wires, Contacts, Vias Timing
0
(b)
Views Structural CPUs, Memory, Switches, Controllers, Buses Modules, Data Structures
Levels
Views Structural Sensors, Performance Actuators, Specifications Systems Multiple Energy Domain Components Domain-Domain Components Single Energy Domain Components Beams, Transfer Functions, Membranes, Holes, Timing Grooves, Joints Behavioral
4
3
2 1
0
Physical
Clusters
Cells, Modules Layout Geometry
Physical Physical Partitions Clusters Floorplans Cells, Modules Layout Geometry
FIGURE 13.2 A taxonomy for component development (“levels and views”): (a) standard VLSI classifications, (b) a partial classification for MEMS components.
A schematic diagram is an example of a structural description. Of course, not all circuit characteristics can be completely encapsulated in a single one of these views. For example, if we change the physical size of a wire, we will probably affect the timing, which is a behavioral property. The principle of encapsulation leads naturally to the development of extensive IP (intellectual property), i.e., libraries of increasingly sophisticated components that can be used as “black boxes” by the system developer. • Well-developed models for basic elements that clearly delineate effects due to changes in design, fabrication process, or environment. For example, in [10], the factors in the basic first-order equations for Ids, the drain-to-source current in an NMOS transistor, can clearly be divided into those under the control of the designer (W/L, the width-to-length ratio for the transistor channel), those dependent on the fabrication process (ε, the permittivity of the gate insulator, and tox, the thickness of the gate insulator), those dependent on environmental factors (Vds and Vgs, the drain-to-source and gate-to-source voltages, respectively), and those that are a function of both the fabrication process and the environment (µ, the effective surface mobility of the carriers in the channel, and Vt, the threshold voltage). More detailed information on modeling MOSFETs can be found in [11]. Identification of fundamental parameters in one stage of the development process can be of great value in other stages. For example, the minimum feature size λ for a given technology can be used to develop a set of “design rules” that express mandatory overlaps and spacings for the different physical materials. A design tool can then be developed to “enforce” these rules, and the consequences can be used to simplify, to some extent, the modeling and simulation stages. The parameter λ can also be used to express effects due to scaling when scaling is valid. ©2002 CRC Press LLC
• Mature tools for design and simulation, which have evolved over many generations and for which moderately priced versions are available from multiple sources. For example, many of today’s tools incorporate versions of the design tool MAGIC [12] and the simulator SPICE (Simulation Program with Integrated Circuit Emphasis) [13], both of which were originally developed at the University of California, Berkeley. Versions of the SPICE simulator typically support several device models (currently, for example, six or more different MOS models and five different transmission line models), so that a developer can choose the level of device detail appropriate to the task at hand. Free or low-cost versions of both MAGIC and SPICE, as well as extended versions of both tools, are widely available. Many different techniques, such as model binning (optimizing models for specific ranges of model parameters) and inclusion of proprietary process information, are employed to produce better models and simulation results, especially in the HSPICE version of SPICE and in other high-end versions of these tools [11]. • Integrated development systems that are widely available and that provide support for a variety of levels and views, extensive component libraries, user-friendly interfaces and online help, as well as automatic translation between domains, along with error and constraint checking. In an integrated VLSI development system, sophisticated models, simulators, and translators keep track of circuit information for multiple levels and views, while allowing the developer to focus on one level or view at a time. Many development systems available today also support, at the higher levels of abstraction, structured “programming” languages such as VHDL (Very Large Scale Integrated Circuit Hardware Description Language) [14,15] or Verilog [16]. A digital circuit developer has many options, depending on performance constraints, number of units to be produced, desired cost, available development time, etc. At one extreme the designer may choose to develop a “custom” circuit, creating layout geometries, sizing individual transistors, modeling RC effects in individual wires, and validating design choices through extensive low-level SPICE-based simulations. At the other extreme, the developer can choose to produce a PLD (programmable logic device), with a predetermined basic layout geometry consisting of cells incorporating programmable logic and storage (Fig. 13.3) that can be connected as needed to produce the desired device functionality. A high end PLD may contain as many as 100,000 (100 K) cells similar to the one in Fig. 13.3 and an additional 100 K bytes of RAM (random access memory) storage. In an integrated development system, such as those
CARRY-IN
IN BUS
GLOBAL BUS
OUT BUS
LOCAL BUS
LOGIC (LOOK-UP TABLE)
CLOCK RESET MEM IN
MEMORY (1-BIT) MEM OUT CARRY-OUT
(a) GENERIC PLD CELL
FIGURE 13.3
A generic programmable logic device architecture.
©2002 CRC Press LLC
(b) BLOCK OF PLD CELLS
provided by [17] and [18], the developer enters the design in either schematic form or a high level language, and then the design is automatically “compiled” and mapped to the PLD geometry, and functional and timing simulations can be run. If the simulation results are acceptable, an actual PLD can then be programmed directly, as a further step in the development process, and even tested, to some extent, with the same set of test data as was used for the simulation step. This “rapid prototyping” [19] for the production of a “chip” is not very different from the production of a working software program (and the PLD can be reprogrammed if different functionality is later desired). Such a system, of course, places many constraints on achievable designs. In addition, the automated steps, which rely on heuristics rather than exact techniques to find acceptable solutions to the many computationally complex problems that need to be solved during the development process, sacrifice performance for ease of development, so that a device designed in such a system will never achieve the ultimate performance possible for the given technology. However, the trade-offs include ease of use, much shorter development times, and the management of much larger numbers of individual circuit elements than would be possible if each individual element were tuned to its optimum performance. In addition, if a high-level language is used for input, an acceptable design can often be translated, with few changes, to a more powerful design system that will allow implementation in more flexible technologies and additional fine tuning of circuit performance. In Fig. 13.4 we see some of the levels of abstraction which are present in such a development TRANSISTOR (PHYSICAL VIEW)
LIBRARY COMPONENT (PHYS. / BEHAV./ STRUCT.)
NETLIST (STRUCTURAL) n1: a b o1 n2: a c o2 n3: o1 o2 o3
VHDL entity HALFADDER is port (A,B: in bit; S,COUT: out bit); end ADDER; architecture A of HALFADDER is component XOR port (X1,X2: in bit; O: out bit); end component; component AND port (X1,X2: in bit; O: out bit); end component; begin G1: XOR port map (A,B,S); G2: AND Port map (A,B,COUT); end A;
FIGURE 13.4
Levels of abstraction–half adder.
©2002 CRC Press LLC
process, with the lowest level being detailed transistor models and the highest a VHDL description of a half adder.
13.3 Analog and Mixed-Signal Circuit Development: Modeling and Simulating Systems with Micro- (or Nano-) Scale Feature Sizes and Mixed Digital (Discrete) and Analog (Continuous) Input, Output, and Signals At the lowest level, digital circuits are in fact analog devices. A CMOS inverter, for example, does not “switch” instantaneously from a voltage level representing binary 0 to a voltage level representing binary 1. However, by careful design of the inverter’s physical structures, it is possible to make the switching time from the range of voltage outputs which are considered to be “0” to the range considered to be “1” (or vice versa) acceptably short. In MOSFETs, for example, the two discrete signals of interest can be identified with the transistor, modeled as a switch, being “open” or “closed,” and the “switching” from one state to another can be ignored except at the very lowest levels of abstraction. In much design and simulation work, the analog aspects of the digital circuit’s behavior can thus be ignored. Only at the lower levels of abstraction will the analog properties of VLSI devices or the quantum effects occurring, e.g., in a MOSFET need to be explicitly taken into account, ideally by powerful automated development tools supported by detailed models. At higher levels this behavior can be encapsulated and expressed in terms of minimum and maximum switching times with respect to a given capacitive load and given voltage levels. Even in digital systems, however, as submicron feature sizes become more common, more attention must be paid to analog effects. For example, at small feature sizes, wire delay due to RC effects and crosstalk in nearby wires become more significant factors in obtaining good simulation results [20]. It is instructive to examine how simulation support for digital systems can be extended to account for these factors. Typically, analog circuit devices are much more likely to be “hand-crafted” than digital devices. SPICE and SPICE-like simulations are commonly used to measure performance at the level of transistors, resistors, capacitors, and inductors. For example, due to the growing importance of wireless and mobile computing, a great deal of work in analog design is currently addressing the question of how to produce circuits (digital, analog, and mixed-signal) that are “low-power,” and simulations for devices to be used in these circuits are typically carried out at the SPICE level. Unless a new physical technology is to be employed, the simulations will mostly rely on the commonly available models for transistors, transmission lines, etc., thus encapsulating the lowest level behaviors. Let us examine the factors given above for the success of digital system simulation and development to see how the analog domain compares. We assume a development cycle similar to that shown in Fig. 13.1. • Is there a small set of basic circuit elements? In the analog domain it is possible to identify sets of components, such as current mirrors, op-amps, etc. However, there is no “universal” gate or small set of gates from which all other devices can be made, as is true in the digital domain. Another complicating factor is that elementary analog circuit elements are usually defined in terms of physical performance. There is no clean notion of 0/1 behavior. Because analog signals are continuous, it is often much more difficult to untangle complex circuit behaviors and to carry out meaningful simulations where clean parameter separations give clear results. Once a preliminary analog device or circuit design has been developed, the process of using simulations to decide on exact parameter values is known as “exploring the design space.” This process necessarily exhibits high computational complexity. Often heuristic methods such as simulated annealing, neural nets, or a genetic algorithm can be used to perform the necessary search efficiently [21]. • Is there a small set of well-understood technologies? In this area, the analog and mixed signal domain is similar to the digital domain. Much analog development activity focuses on a few standard and well-parameterized technologies. In general, analog devices are much more sensitive to variations in process parameters, and this must be accounted for in analog simulation. ©2002 CRC Press LLC
Statistical techniques to model process variation have been included, for example, in the APLAC tool [22], which supports object-oriented design and simulation for analog circuits. Modeling and simulation methods, which incorporate probabilistic models, will become increasingly important as nanoscale devices become more common and as new technologies depending on quantum effects and biology-based computing are developed. Several current efforts, for example, are aimed at developing a “BIOSPICE” simulator, which would incorporate more stochastic system behavior [23]. • Is there a well-developed educational infrastructure and prototyping facilities? All the organizations, which support education and prototyping in the digital domain [3–7], provide similar support for analog and mixed-signal design. • Are encapsulation and abstraction widely employed? In the past few years, a great deal of progress has been made in incorporating these concepts into analog and mixed-signal design systems. The wide availability of very powerful computers, which can perform the necessary design and simulation tasks in reasonable amounts of time, has helped to make this progress possible. In [24], for example, top-down, constraint-driven methods are described, and in [25] a rapid prototyping method for synthesizing analog and mixed signal systems, based on the tool suite VASE (VHDLAMS Synthesis Environment), is demonstrated. These methods rely on classifications similar to those given for digital systems in Fig. 13.2(a). • Are there well-developed models, mature tools, and integrated development systems which are widely available? In the analog domain, there is still much more to be done in these areas than in the digital domain, but prototypes do exist. In particular, the VHDL and Verilog languages have been extended to allow for analog and mixed-signal components. The VHDL extension, e.g., VHDL-AMS [14], will allow the inclusion of any algebraic or ordinary differential equation in a simulation. However, there does not exist a completely functional VHDL-AMS simulator, although a public domain version, incorporating many useful features, is available at [26] and many commercial versions are under development (e.g., [27]). Thus, at present, expanded versions of MAGIC and SPICE are still the most widely-used design and simulation tools. While there have been some attempts to develop design systems with configurable devices similar to the digital devices shown in Fig. 13.3, these have not so far been very successful. Currently, more attention is being focused on component-based development with design reuse for SOC (systems on a chip) through initiatives such as [28].
13.4 Basic Techniques and Available Tools for MEMS Modeling and Simulation Before trying to answer the above questions for MEMS, we need to look specifically at the tools and techniques the MEMS designer has available for the modeling and simulation tasks. As pointed out in [29,30], the bottom line is, in any simulator, all models are not created equal. The developer must be very clear about what parameters are of greatest interest and then must choose the models and simulation techniques (including implementation in a tool or tools) that are most likely to give the most accurate values for those parameters in the least amount of simulation time. For example, the model used to determine static behavior may be different from the model needed for an adequate determination of dynamic behavior. Thus, it is useful to have a range of models and techniques available.
Basic Modeling and Simulation Techniques We need to make the following choices: • What kind of behavior are we interested in? IC simulators, for example, typically support DC operating analysis, DC sweep analysis (stepping current or voltage source values) and transient sweep analysis (stepping time values), along with several other types of transient analysis [30]. ©2002 CRC Press LLC
• Will the computation be symbolic or numeric? • Will use of an exact equation, nodal analysis, or finite element analysis be most appropriate? Currently, these are the techniques which are favored by most MEMS developers. To show what these choices entail, let us look at a simple example that combines electrical and mechanical parts. The cantilever beam in Fig. 13.5(a), fabricated in metal, polysilicon, or a combination, may be combined with an electrically isolated plate to form a parallel plate capacitor. If a mechanical force or a varying voltage is applied to the beam (Fig. 13.5(b1)), an accelerometer or a switch can be obtained [31]. If instead the plate can be moved back and forth, a more efficient accelerometer design results (Fig. 13.5(b2)); this is the basic design of Analog Devices’ accelerometer, probably the first truly successful commercial MEMS device [32,33]. If several beams are combined into two “combs,” a comb-drive sensor or actuator results, as in Fig. 13.5(b3) [34]. Let us consider just the simplest case, as shown in Fig. 13.5(b1). If we assume the force on the beam is concentrated at its end point, then we can use the method of [35] to calculate the “pull-in” voltage, i.e., the voltage at which the plates are brought together, or to a stopper which keeps the two plates from touching. We model the beam as a dampened spring-mass system and look for the force F, which, when translated into voltage, will give the correct x value for the beam to be “pulled in.”
F = mx¢¢ + Bx¢ + kx Here mass m = ρWTL, where ρ is the density of the beam material, I = WT /12 is the moment of inertia, 3 1/4 k = 3EI/L , E is the Young’s modulus of the beam material, and B = (k/EI) . This second-order linear differential equation can be solved numerically to obtain the pull-down voltage. In this case, since a closed form expression can be obtained for x, symbolic computation would also be an option. In [36] it is shown that for this simple problem several commonly used methods and tools will give the same result, as is to be expected. To obtain a more accurate model of the beam we can use the method of nodal analysis, that treats the beam as a graph consisting of a set of edges or “devices,” linked together at “nodes.” Nodal analysis assumes that at equilibrium the sum of all values around each closed loop (the “across” quantities) will 3
“nodes”
(a) Width W P1
P2
P3
P4
Thickness T P5
Height H
Length L
(b)
displacement x
(b1) Vertical
(b2) Horizontal
(b3) Side by Side
FIGURE 13.5 Cantilever beam and beam–capacitor options: (a) cantilever beam dimensions, (b) basic beam– capacitor designs. ©2002 CRC Press LLC
be zero, as will the sum of all values entering or leaving a given node (the “through” quantities). Thus, for example, the sum of all forces and moments on each node must be zero, as must the sum of all currents flowing into or out of a given node. This type of modeling is sometimes referred to as “lumped parameter,” since quantities such as resistance and capacitance, which are in fact distributed along a graph edge, are modeled as discrete components. In the electrical domain Kirchhoff’s laws are examples of these rules. This method, which is routinely applied to electrical circuits in elementary network analysis courses (see, e.g., [37]), can easily be applied to other energy domains by using correct domain equivalents (see, e.g., [38]). A comprehensive discussion of the theory of nodal analysis can be found in [39]. In Fig. 13.5(a), the cantilever beam has been divided into four “devices,” subbeams between node i and i + 1, i = 1, 2, 3, 4, where the positions of nodes i and i + 1 are described by (xi, yi, θi) and (xi+1, yi+1, θi+1) the coordinates and slope at Pi and Pi+1. The beam is assumed to have uniform width W and thickness T, and each subbeam is treated as a two-dimensional structure free to move in three-space. In [40] a modified version of nodal analysis is used to develop numerical routines to simulate several MEMS behaviors, including static and transient behavior of a beam-capacitor actuator. This modified method also adds position coordinates zi and zi+1 and replaces the slope θi at each node with a vector of slopes, θix, θiy , and θiz, giving each node six degrees of freedom. Since nodal analysis is based on linear elements represented as the edges in the underlying graph, it cannot be used to model many complex structures and phenomena such as fluid flow or piezoelectricity. Even for the cantilever beam, if the beam is composed of layers of two different materials (e.g., polysilicon and metal), it cannot be adequately modeled using nodal analysis. The technique of finite element analysis (FEA) must be used instead. For example, in some follow-up work to that reported in [36], nodal analysis and symbolic computation gave essentially the same results, but the FEA results were significantly different. Finite element analysis for the beam begins with the identification of subelements, as in Fig. 13.5(a), but each element is treated as a true three-dimensional object. Elements need not all have the same shape, for example, tetrahedral and cubic “brick” elements could be mixed together, as appropriate. In FEA, one cubic element now has eight nodes, rather than two (Fig. 13.6), so computational complexity is increased. Thus, developing efficient computer software to carry out FEA for a given structure can be a difficult task in itself. But this general method can take into account many features that cannot be adequately addressed using nodal analysis, including, for example, unaligned beam sections, and surface texture (Fig. 13.7). FEA, which can incorporate static, transient, and dynamic behavior, and which can treat heat and fluid flow, as well as electrical, mechanical, and other forces, is explained in detail in [41]. The basic procedure is as follows: • Discretize the structure or region of interest into finite elements. These need not be homogeneous, either in size or in shape. Each element, however, should be chosen so that no sharp changes in geometry or behavior occur at an interior point. • For each element, determine the element characteristics using a “local” coordinate system. This will represent the equilibrium state (or an approximation if that state cannot be computed exactly) for the element. • Transform the local coordinates to a global coordinate system and “assemble” the element equations into one (matrix) equation. • Impose any constraints implied by restricted degrees of freedom (e.g., a fixed node in a mechanical problem). • Solve (usually numerically) for the nodal unknowns. • From the global solution, calculate the element resultants.
A Catalog of Resources for MEMS Modeling and Simulation To make our discussion of the state-of-the-art of MEMS simulation less confusing, we first list some of the tools and products available. This list is by no means comprehensive, but it will provide us with a range of approaches for comparison. It should be noted that this list is accurate as of July 2001, but the MEMS development community is itself developing, with both commercial companies and university ©2002 CRC Press LLC
nodes
(a) Nodal analysis/Modified nodal analysis (“Linear” elements)
nodes
(b) Finite element analysis (Three-dimensional elements)
FIGURE 13.6
Nodal analysis and finite element analysis.
(a) Ideal beam
rough surface unaligned sections
(b) Actual beam
FIGURE 13.7
Ideal and actual cantilever beams (side view).
©2002 CRC Press LLC
research sites frequently taking on new identities and partners and also expanding the range of services they offer. A. Widely Available Tools for General Numeric and Symbolic Computation These tools are relatively easy to learn to use. Most engineering students will have mastered at least one before obtaining a bachelor’s degree. They can be used to model a device “from scratch” and to perform simple simulations. For more complex simulations, they are probably not appropriate for two reasons. First, neither is optimized to execute long computations efficiently. Second, developing the routines necessary to carry out a complex nodal or finite element analysis will in itself be a time-consuming task and will in most cases only replicate functionality already available in other tools listed here. • Mathematica [42]. In [36] Mathematica simulation results for a cantilever beam-capacitor system are compared with results from several other tools. • Matlab (integrated with Maple) [43]. In [44], for example, Matlab simulations are shown to give good approximations for a variety of parameters for microfluidic system components. B. Tools Originally Developed for Specific Energy Domains Low-cost easy to use versions of some of these tools (e.g., SPICE, ANSYS) are also readily available. Phenomena from other energy domains can be modeled using domain translation. • SPICE (analog circuits) [13]. SPICE is the de facto standard for analog circuit simulators. It is also used to support simulation of transistors and other components for digital systems. SPICE implements numerical methods for nodal analysis. Several authors have used SPICE to simulate MEMS behavior in other energy domains. In [35], for example, the equation for the motion of a damped spring, which is being used to calculate pull-in voltage, is translated into the electrical domain and reasonable simulation accuracy is obtained. In [45] steady-state thermal behavior for flow-rate sensors is simulated by dividing the device to be modeled into three-dimensional “bricks,” modeling each brick as a set of thermal resistors, and translating the resulting conduction and convection equations into electrical equivalents. • APLAC [22]. This object-oriented analog and mixed-signal simulator incorporates routines, which allow statistical modeling of process variation. • VHDL-AMS [14,26,27]. The VHDL-AMS language, designed to support digital, analog, and mixedsignal simulation, will in fact support simulation of general algebraic and ordinary differential equations. Thus mixed-energy domain simulations can be carried out. VHDL-AMS, which is typically built on a SPICE kernel, uses the technique of nodal analysis. Some VHDL-AMS MEMS models have been developed (see, e.g., [46,47]). Additional information about VHDL-AMS is available at [48]. • ANSYS [49]. Student versions of the basic ANSYS software are widely available. ANSYS is now partnering with MemsPro (see below). ANSYS models both mechanical and fluidic phenomena using FEA techniques. A survey of the ANSYS MEMS initiative can be found at [50]. • CFD software [51]. This package, which also uses FEA, was developed to model fluid flow and temperature phenomena. C. Tools Developed Specifically for MEMS The tools in this category use various simplifying techniques to provide reasonably accurate MEMS simulations without all the computational overhead of FEA. • SUGAR [40,52]. This free package is built on a Matlab core. It uses nodal analysis and modified nodal analysis to model electrical and mechanical elements. Mechanical elements must be built from a fixed set of components including beams and gaps. ©2002 CRC Press LLC
• NODAS v 1.4 [53]. This downloadable tool provides a library of parameterized components (beams, plate masses, anchors, vertical and horizontal electrostatic comb drives, and horizontal electrostatic gaps) that can be interconnected to form MEMS systems. The tool outputs parameters that can be used to perform electromechanical simulations with the Saber simulator [27]. A detailed example is available at [54], and a description of how the tool works (for v 1.3) is also available [55]. Useful information is also available in [70]. D. “Metatools” Which Attempt to Integrate Two or More Domain-Specific Tools into One Package • MEMCAD, currently being supported by the firm Coventor [56]. This product was previously supported by Microcosm, Inc. It provides low-level simulation capability by integrating domainspecific FEA tools into one package to support coupled energy domain simulations. It also supports process simulation. Much of the extensive research underlying this tool is summarized in [57]. • MemsPro [58], which currently incorporates links to ANSYS. MemsPro itself is an offshoot of Tanner Tools, Inc. [59], which originally produced a version of MAGIC [12] that would run on PCs. The MemsPro system provides integrated design and simulation capability. Process “design rules” can be defined by the user. SPICE simulation capability is integrated into the toolset, and a data file for use with ANSYS can also be generated. MemsPro does not do true energy domain coupling at this time. Some library components are also available. E. Other Useful Resources • The MEMS Clearinghouse website [60]. This website contains links to products, research groups, and conference information. One useful link is the Material Properties database [61], which includes results from a wide number of experiments by many different research groups. Information from this database can be used for initial “back of the envelope” calculations for component feasibility, for example. • The Cronos website [62]. This company provides prototyping and production-level fabrication for all three process approaches (surface micromachining, bulk micromachining, and high aspect ratio manufacturing). It is also attempting to build a library of MEMS components for both surface micromachining (MUMPS, or the Multi-User MEMS Process [63]) and bulk micromachining.
13.5 Modeling and Simulating MEMS, i.e., Systems with Micro(or Nano-) Scale Feature Sizes, Mixed Digital (Discrete) and Analog (Continuous) Input, Output, and Signals, Two- and Three-Dimensional Phenomena, and Inclusion and Interaction of Multiple Domains and Technologies In preceding sections we briefly described the current state-of-the-art in modeling and simulation in both the digital and analog domains. While the digital tools are much more developed, in both the digital and analog domains there exist standard, well-characterized technologies, standard widely available tools, and stable educational and prototyping programs. In the much more complex realm of MEMS, this is not the case. Let us compare MEMS, point by point, with digital and analog circuits. • Is there a small set of basic elements? The answer to this question is emphatically no. Various attempts have been made by researchers to develop a comprehensive basic set of building blocks, beginning with Petersen’s identification of the fundamental component set consisting of beams, membranes, holes, grooves, and joints [64]. Most of these efforts focus on adding mechanical and electromechanical elements. In the SUGAR system, for example, the basic elements are the beam and the electrostatic gap. In the Carnegie Mellon tool MEMSYN [65], which is supported by the ©2002 CRC Press LLC
NODAS simulator, basic elements include beams and gaps, as well as plate masses, anchors, and electrostatic comb drives (vertical and horizontal). For the MUMPS process there is the Consolidated Micromechanical Element Library (CaMEL), which contains both a nonparameterized cell database and a library of parameterized elements (which can be accessed through a component “generator,” but not directly by the user). CaMEL supports the creation of a limited set of components, including motors and resonators, in a fixed surface-micromachined technology. But the bottom line for MEMS is that no set of basic building blocks has yet been identified which can support all the designs, in many different energy domains and in a variety of technologies, which researchers are interested in building. Moreover, there is no consensus as to how to effectively limit design options so that such a fundamental set could be identified. In addition, the continuous nature of most MEMS behavior presents the same kinds of difficulties that are faced with analog elements. Development of higher level component libraries, however, is a fairly active field, with, for example, ANSYS, CFD, MEMCAD, Carnegie Mellon, and MemsPro all providing libraries of previously designed and tested components for systems developers to use. Most of these components are in the electromechanical domain. As mentioned above, a few VHDL-AMS models are also available, but these will not be of practical value until more robust and complete VHDL-AMS simulators are developed and more experimental results can be obtained to validate these models. • Is there a small set of well-understood technologies? Again the answer must be no. Almost all digital and analog circuits are essentially two-dimensional, but, in the case of MEMS, many designs can be developed either in the “2.5-dimensional” technology known as micromachining or in the true three-dimensional technology known as bulk micromachining. Thus, before doing any modeling or simulation, the MEMS developer must first choose not only among very different fabrication techniques but also among actual processes. Both the Carnegie Mellon and Cronos tools, for example, are based on processes that are being developed in parallel with the tools. MOSIS does provide central access to technology in which all but the final steps of surface micromachining can be done, but no other centrally maintained processing is available to the community of MEMS researchers in general. For surface micromachining, the fact that the final processing steps are performed in individual research labs is problematic for producing repeatable experimental results. For bulk micromachining examples, fabrication in small research labs rather than in a production environment is more the norm than the exception, so standardization for bulk processes is difficult to achieve. In addition, because much MEMS work is relatively low-volume, most processes are not well enough characterized for low-level modeling to be very effective. In such circumstances it is very difficult to have reliable process characterizations on which to build robust models. • Is there a well-developed educational infrastructure and prototyping facilities? Again we must answer no. Introductory MEMS courses, especially, are much more likely to emphasize fabrication techniques than modeling and simulation. In [66] a set of teaching modules for a MEMS course emphasizing integrated design and simulation is described. However, this course requires the use of devices previously fabricated for validating design and simulation results, rather than expecting students to complete the entire design-simulate-test-fabricate sequence in one quarter or semester. In addition, well-established institutional practices make it difficult to provide the necessary support for multidisciplinary education which MEMS requires. • Are encapsulation and abstraction widely employed? In the 1980s many researchers believed that multiple levels of abstraction were not useful for MEMS devices. Currently, however, the concept of intermediate-level “macromodels” has gained much support [57,70], and increasing emphasis is being placed on developing macromodels for MEMS components that will be a part of larger systems. In addition, there are several systems in development that are based on sets of more primitive components. But this method of development is not the norm, in large part because of the rich set of possibilities inherent in MEMS in general. In Fig. 13.2(b) we have given a partial classification of MEMS corresponding to the classification for digital devices in Fig. 13.2(a). At this point it is not
©2002 CRC Press LLC
Simulation Tool
Levels Supported
Mathematica, Matlab MEMCAD
all low
SPICE
low to medium
APLAC
low to medium
ANSYS, CFD SUGAR, NODAS MemsPro
low to medium low to medium low to medium medium to high
VHDL-AMS
*Because MEMCAD incorporates process simulations, it supports both physical and behavioral views. All other tools support the behavioral view.
FIGURE 13.8
Available MEMS simulation tools, by level and view.
clear what the optimum number of levels of abstraction for MEMS would be. In Fig. 13.8 we have attempted to classify some of the tools from Section 13.4 in terms of their ability to support various levels (since these are simulators, they all support the “behavioral” view. MEMCAD, which allows fabrication process simulation, also supports the “physical” view). Note that VHDL-AMS is the only tool, besides the general-purpose Mathematica and Matlab, that supports a high-level view of MEMS. • Are there well-developed models, mature tools, and integrated development systems which are widely available? While such systems do not currently exist, it is predicted that some examples should become available within the next ten years [57].
13.6 A “Recipe” for Successful MEMS Simulation A useful set of guidelines for analog simulation can be found in [67]. From this we can construct a set of guidelines for MEMS simulation. 1. Be sure you have access to the necessary domain-specific knowledge for all energy domains of interest before undertaking the project. 2. Never use a simulator unless you know the range of answers beforehand. 3. Never simulate more of the system than is necessary. 4. Always use the simplest model that will do the job. 5. Use the simulator exactly as you would do the experiment. 6. Use a specified procedure for exploring the design space. In most cases this means that you should change only one parameter at a time. 7. Understand the simulator you are using and all the options it makes available. 8. Use the correct multipliers for all quantities. 9. Use common sense. 10. Compare your results with experiments and make them available to the MEMS community. 11. Be sensitive to the possibility of microlevel phenomena, which may make your results invalid. The last point is particularly important. Many phenomena, which can be ignored at larger feature sizes, will need to be taken into account at the micro level. For example, at the micro scale, fluid flow can behave in dramatically different ways [44]. Many other effects of scaling feature sizes down to the microlevel, including an analysis of why horizontal cantilever beam actuators are “better” than vertical cantilever beam actuators, are discussed in Chapter 9 of [68]. Chapters 4 and 5 of [68] also provide important information for low-level modeling and simulation.
©2002 CRC Press LLC
13.7 Conclusion: Continuing Progress in MEMS Modeling and Simulation In the past fifteen years, much progress has been made in providing MEMS designers with simulators and other tools which will give them the ability to make MEMS as useful and ubiquitous as was predicted in [64]. While there is still much to be done, the future is bright for this flexible and powerful technology. One of the main challenges remaining for modeling and simulation is to complete the design and development of a high-level MEMS description language, along with supporting models and simulators, both to speed prototyping and to provide a common user-friendly language for designers. One candidate for such a language is VHDL-AMS. In [69], the strengths and weaknesses of VHDL-AMS as a tool for MEMS development are discussed. Strengths include the ability to handle both discrete and continuous behavior, smooth transitions between levels of abstraction, the ability to handle both conservative and nonconservative systems simultaneously, and the ability to import code from other languages. Major drawbacks include the inability to do symbolic computation, the limitation to ordinary differential equations, lack of support for frequency domain simulations, and inability to do automatic unit conversions. It remains to be seen whether VHDL-AMS will eventually be extended to make it more suitable to support the MEMS domain. But it is highly likely that VHDL-AMS or some similar language will eventually come to be widely used and appreciated in the MEMS community.
References 1. Kielkowski, R.M., SPICE: Practical Device Modeling, McGraw-Hill, 1995. 2. Leong, S.K., Extracting MOSFET RF SPICE models, http://www.polyfet.com/MTT98.pdf (accessed July 20, 2001). 3. http://www.mosis.edu (accessed July 20, 2001). 4. http://cmp.imag.fr (accessed July 20, 2001). 5. http://www.imec.be/europractice/europractice.html (accessed July 20, 2001). 6. http://www.vdec.u-tokyo.ac.jp/English (accessed July 20, 2001). 7. http://www.cmc.ca (accessed July 20, 2001). 8. Mead, C. and Conway, L., Introduction to VLSI Systems, Addison-Wesley, 1980. 9. Gajski, D. and Thomas, D., Introduction to silicon compilation, in Silicon Compilation, D. Gajski, Ed., Addison-Wesley, 1988, 1–48. 10.Weste, N. and Esraghian, K., Principles of CMOS VLSI Design: A Systems Perspective, 2nd ed., AddisonWesley, 1993. 11.Foty, D., MOSFET Modeling with SPICE, Prentice Hall, 1997. 12.http://www.research.compaq.com/wrl/projects/magic/magic.html (accessed July 20, 2001). 13.http://bwrc.eecs.berkeley.edu/Classes/IcBook/SPICE (accessed July 20, 2001). 14.Design Automation Standards Committee, IEEE Computer Society, IEEE VHDL Standard Language Reference Manual (Integrated with VHDL-AMS Changes), Standard 1076.1, IEEE, 1997. 15.Ashenden, P., The Designer’s Guide to VHDL, 2nd ed., Morgan Kauffman, 2001. 16.Bhasker, J., A Verilog HDL Primer, 2nd ed., Star Galaxy Pub., 1999. 17.http://www.altera.com (accessed July 20, 2001). 18.http://www.xilinx.com (accessed July 20, 2001). 19.Hamblen, J.O. and Furman, M.D., Rapid Prototyping of Digital Systems, A Tutorial Approach, Kluwer, 1999. 20.Uyemura, J.P., Introduction to VLSI Circuits and Systems, John Wiley & Sons, Inc., 2002. 21.Sobecks, B., Performance Modeling of Analog Circuits via Neural Networks: The Design Process View, Ph.D. Dissertation, University of Cincinnati, 1998. 22.http://www.aplac.hut.fi (accessed July 20, 2001). 23.Weiss, R., Homsy, G., and Knight, T., Toward in vivo digital circuits, http://www.swiss.ai.mit.edu/ ~rweiss/bio-programming/dimacs99-evocomp-talk/ (accessed July 20, 2001). ©2002 CRC Press LLC
24.Chang, H., Charbon, E., Choudhury, U., Demir, A., Liu, Felt E., Malavasi, E., Sangiovanni-Vincentelli, A., Charbon, E., and Vassiliou, I., A Top-down, Constraint-Driven Design Methodology for Analog Integrated Circuits, Kluwer Academic Publishers, 1996. 25.Ganesan, S., Synthesis and Rapid Prototyping of Analog and Mixed Signal Systems, Ph.D. Dissertation, University of Cincinnati, 2001. 26.SEAMS simulator project, University of Cincinnati ECECS Department, Distributed Processing Laboratory, http://www.ececs.uc.edu/~hcarter (accessed July 20, 2001). 27.http://www.analogy.com/products/Simulation/simulation.htm#Saber (accessed July 20, 2001). 28.www.design-reuse.com (accessed July 20, 2001). 29.S. M. Sandler and Analytical Engineering Inc., The SPICE Handbook of 50 Basic Circuits, http://dacafe. ibsystems.com/DACafe/EDATools/EDAbooks/SpiceHandBook (accessed July 20, 2001). 30.Kielkowski, R.M., Inside Spice, 2nd ed., McGraw Hill, 1998. 31.Gibson, D., Hare, A., Beyette, F., Jr., and Purdy, C., Design automation of MEMS systems using behavioral modeling, Proc. Ninth Great Lakes Symposium on VLSI, Ann Arbor Mich. (Eds. R.J. Lomax and P. Mazumder), March 1999, pp. 266–269. 32.http://www.analog.com/industry/iMEMS (accessed July 20, 2001). 33.http://www-ccrma.stanford.edu/CCRMA/Courses/252/sensors/node6.html (accessed July 20, 2001). 34.Tang, W., Electrostatic Comb Drive for Resonant Sensor and Actuator Applications, Ph.D. Dissertation, UC Berkeley, 1990. 35.Lo, N.R., Berg, E.C., Quakkelaar, S.R., Simon, J.N., Tachiki, M., Lee, H.-J., and Pister, S.J., Parameterized layout synthesis, extraction, and SPICE simulation for MEMS, ISCAS 96, May 1996, pp. 481–484. 36.Gibson, D., and Purdy, C.N., Extracting behavioral data from physical descriptions of MEMS for simulation, Analog Integrated Circuits and Signal Processing 20, 1999, pp. 227–238. 37.Hayt, W.H., Jr. and Kemmerly, J.E., Engineering Circuit Analysis, 5th ed., McGraw-Hill, 1993, pp. 88–95. 38.Dewey, A., Hanna, J., Hillman, B., Dussault, H., Fedder, G., Christen, E., Bakalar, K., Carter, H., and Romanowica, B., VHDL-AMS Modeling Considerations and Styles for Composite Systems, Version 2.0, http://www.ee.duke.edu/research/IMPACT/documents/model_g.pdf (accessed July 20, 2001). 39.McCalla, W.J., Fundamentals of Computer-Aided Circuit Simulation, Kluwer Academic, 1988. 40.Clark, J.V., Zhou, N., and Pister, K.S.J., Modified nodal analysis for MEMS with multi-energy domains, International Conference on Modeling and Simulation of Microsystems, Semiconductors, Sensors and Actuators, San Diego, CA, March 27–29, 2000, pp. 31–34. 41.Stasa, F.L., Applied Finite Element Analysis for Engineers, Holt, Rinehart and Winston, 1985. 42.http://www.wolfram.com/products/mathematica (accessed July 20, 2001). 43.http://www.mathworks.com/products/matlab (accessed July 20, 2001). 44.Mehta, A., Design and Control Oriented Approach to the Modeling of Microfluidic System Components, M.S. Thesis, University of Cincinnati, 1999. 45.Swart, N., Nathan, A., Shams, M., and Parameswaran, M., Numerical optimisation of flow-rate microsensors using circuit simulation tools, Transducers ’91, 1991, pp. 26–29. 46.http://www.ee.duke.edu/research/IMPACT/vhdl-ams/index.html (accessed July 20, 2001). 47.Gibson, D., Carter, H., and Purdy, C., The use of hardware description languages in the development of microelectromechanical systems, International Journal of Analog Integrated Circuits and Signal Processing, 28(2), August 2001, pp. 173–180. 48.http://www.vhdl-ams.com/ (accessed July 20, 2001). 49.http://www.ansys.com/action/MEMSinitiative/index.htm (accessed July 20, 2001). 50.http://www.ansys.com/action/pdf/MEMS_WP.pdf (accessed July 20, 2001). 51.http://www.cfdrc.com (accessed July 20, 2001). 52.Pister, K., SUGAR V2.0, http://www-bsac.EECS.Berkeley.edu/~cfm/ mainpage.html (accessed July 20, 2001). 53.http://www.ece.cmu.edu/~mems/projects/memsyn/nodasv1_4/index.shtml (accessed July 20, 2001). 54.http://www2.ece.cmu.edu/~mems/projects/memsyn/nodasv1_4/tutorial.html (accessed July 20, 2001). ©2002 CRC Press LLC
55.Jing, Q. and Fedder, G.K., NODAS 1.3-nodal design of actuators and sensors, IEEE/VIUF International Workshop on Bahavioral Modeling and Simulation, Orlando, Fla., October 27–28, 1998. 56.http://www.coventor.com/software/coventorware/index.html (accessed July 20, 2001). 57.Senturia, S.D., Simulation and design of microsystems: a 10-year perspective, Sensors and Actuators A, 67, 1998, pp. 1–7. 58.www.memscap.com/index2.html (accessed July 20, 2001). 59.http://www.tanner.com/ (accessed July 20, 2001). 60.http://mems.isi.edu (accessed July 20, 2001). 61.http://mems.isi.edu/mems/materials/index.html (accessed July 20, 2001). 62.http://www.memsrus.com (accessed July 20, 2001). 63.http://www.memsrus.com/cronos/svcsmumps.html (accessed July 20, 2001). 64.Petersen, K., Silicon as a mechanical material, IEEE Proceedings, 70(5), May 1982, pp. 420–457. 65.http://www.ece.cmu.edu/~mems/projects/memsyn/index.shtml (accessed July 20, 2001). 66.Beyette, F., Jr. and C.N. Purdy, Teaching modules for a class in mechatronics, European Workshop on Microelectronics Education (EWME2000), May 2000. 67.Allen, P.E. and Holberg, D.R., CMOS Analog Circuit Design, Oxford University Press, 1987, pp. 142–144. 68.Madou, M., Fundamentals of Microfabrication, CRC Press, Boca Raton, FL, 1997. 69.Gibson, D. and Purdy, C., The strengths and weaknesses of VHDL-AMS as a tool for MEMS development, white paper, 2000, http://www.ececs.uc.edu/~cpurdy/csl.html/pub.html/weakvhdl. pdf (accessed July 20, 2001). 70.Mukherjee, T. and Fedder, G.K., Hierarchical mixed-domain circuit simulation, synthesis and extraction methodology for MEMS, Journal of VLSI Signal Processing, 21, 1999, pp. 233–249.
©2002 CRC Press LLC
14 Rotational and Translational Microelectromechanical Systems: MEMS Synthesis, Microfabrication, Analysis, and Optimization 14.1 14.2 14.3
Introduction MEMS Motion Microdevice Classifier and Structural Synthesis MEMS Fabrication Bulk Micromachining • Surface Micromachining • LIGA and LIGA-Like Technologies
14.4 14.5
MEMS Electromagnetic Fundamentals and Modeling MEMS Mathematical Models Example 14.5.1: Mathematical Model of the Translational Microtransducer • Example 14.5.2: Mathematical Model of an Elementary Synchronous Reluctance Micromotor • Example 14.5.3: Mathematical Model of Two-Phase Permanent-Magnet Stepper Micromotors • Example 14.5.4: Mathematical Model of Two-Phase Permanent-Magnet Synchronous Micromotors
14.6
Proportional-Integral-Derivative Control • Tracking Control • Time-Optimal Control • Sliding Mode Control • Constrained Control of Nonlinear MEMS: Hamilton–Jacobi Method • Constrained Control of Nonlinear Uncertain MEMS: Lyapunov Method • Example 14.6.1: Control of Two-Phase Permanent-Magnet Stepper Micromotors
Sergey Edward Lyshevski Purdue University Indianapolis
©2002 CRC Press LLC
Control of MEMS
14.7
Conclusions
14.1 Introduction Electromagnetic-based MEMS are widely used in various sensing and actuation applications. For these MEMS, rotational and translational motion microdevices are needed to be devised, designed, and controlled. We introduce the classifier paradigm to perform the structural synthesis of MEMS upon electromagnetic features. As motion microdevices are devised, the following issues are emphasized: modeling, analysis, simulation, control, optimization, and validation. Innovative results are researched and studied applying the classifier, structural synthesis, design, analysis, and optimization concepts developed. The need for innovative integrated methods to perform the comprehensive analysis, high-fidelity modeling, and design of MEMS has facilitated theoretical developments within the overall spectrum of engineering and science. This chapter provides one with viable tools to perform structural synthesis, modeling, analysis, optimization, and control of MEMS. Microelectromechanical systems integrate motion microstructures and devices as well as ICs on a single chip or on a hybrid chip. To fabricate MEMS, modified advanced microelectronics fabrication technologies, techniques, processes, and materials are used. Due to the use of complementary metal oxide semiconductor (CMOS) lithography-based technologies in fabrication microstructures, microdevices, and ICs, MEMS leverage microelectronics. The following definition for MEMS was given in [1]: Batch-fabricated microscale devices (ICs and motion microstructures) that convert physical parameters to electrical signals and vice versa, and in addition, microscale features of mechanical and electrical components, architectures, structures, and parameters are important elements of their operation and design. The scope of MEMS has been further expanded towards devising novel paradigms, system-level integration high-fidelity modeling, data-intensive analysis, control, optimization, fabrication, and implementation. Therefore, we define MEMS as: Batch-fabricated microscale systems (motion and radiating energy microdevices/microstructures— driving/sensing circuitry—controlling/processing ICs) that 1. convert physical stimuli, events, and parameters to electrical and mechanical signals and vice versa, 2. perform actuation and sensing, 3. comprise control (intelligence, decision making, evolutionary learning, adaptation, self-organization, etc.), diagnostics, signal processing, and data acquisition features, and microscale features of electromechanical, electronic, optical, and biological components (structures, devices, and subsystems), architectures, and operating principles are basics of their operation, design, analysis, and fabrication. The integrated design, analysis, optimization, and virtual prototyping of intelligent and high-performance MEMS, system intelligence, learning, adaptation, decision making, and self-organization can be addressed, researched, and solved through the use of advanced electromechanical theory, state-of-the-art hardware, novel technologies, and leading-edge software. Many problems in MEMS can be formulated, attacked, and solved using the microelectromechanics. In particular, microelectromechanics deals with benchmarking and emerging problems in integrated electrical–mechanical–computer engineering, science, and technologies. Microelectromechanics is the integrated design, analysis, optimization, and virtual prototyping of high-performance MEMS, system intelligence, learning, adaptation, decision making, and control through the use of advanced hardware, leading-edge software, and novel fabrication technologies and processes. Integrated multidisciplinary features approach quickly, and the microelectromechanics takes place. The computer-aided design tools are required to support MEMS analysis, simulation, design, optimization, and fabrication. Much effort has been devoted to attain the specified steady-state and dynamic performance of MEMS to meet the criteria and requirements imposed. Currently, MEMS are designed, optimized, and analyzed using available software packages based on the linear and steady-state analysis. ©2002 CRC Press LLC
However, highly detailed nonlinear electromagnetic and mechanical modeling must be performed to design high-performance MEMS. Therefore, the research is concentrated on high-fidelity mathematical modeling, data intensive analysis, and nonlinear simulations, as well as control (design of control algorithms to attain the desired performance). The reported synthesis, modeling, analysis, simulation, optimization, and control concepts, tools, and paradigms ensure a cost-effective solution and can be used to guarantee rapid prototyping of high-performance state-of-the-art MEMS. It is often very difficult, and sometimes impossible, to solve a large array of nonlinear analysis and design problems for motion microdevices using conventional methods. Innovative concepts, methods, and tools that fully support the analysis, modeling, simulation, control, design, and optimization are needed. The fabrication technologies used in MEMS were developed [2,3], and micromachining technologies are discussed in this chapter. This chapter solves a number of long-standing problems for electromagnetic-based MEMS.
14.2 MEMS Motion Microdevice Classifier and Structural Synthesis It was emphasized that the designer must design MEMS by devising novel high-performance motion microdevices, radiating energy microdevices, microscale driving/sensing circuitry, and controlling/processing ICs. A step-by-step procedure in the design of motion microdevices is: • define application and environmental requirements, • specify performance specifications, • devise motion microstructures and microdevices, radiating energy microdevices, microscale driving/sensing circuitry, and controlling/processing ICs, • develop the fabrication process using micromachining and CMOS technologies, • perform electromagnetic, energy conversion, mechanical, and sizing/dimension estimates, • perform electromagnetic, mechanical, vibroacoustic, and thermodynamic design with performance analysis and outcome prediction, • verify, modify, and refine design with ultimate goals and objectives to optimize the performance. In this section, the design and optimization of motion microdevices is reported. To illustrate the procedure, consider two-phase permanent-magnet synchronous slotless micromachines as documented in Fig. 14.1. It is evident that the electromagnetic system is endless, and different geometries can be utilized as shown in Fig. 14.1. In contrast, in translational (linear) synchronous micromachines, the open-ended electromagnetic system results. The attempts to classify microelectromechanical motion devices were made in [1,4,5]; however, the qualitative and quantitative comprehensive analysis must be researched. Motion microstructure geometry and electromagnetic systems must be integrated into the synthesis, analysis, design, and optimization. Motion microstructures can have the plate, spherical, torroidal, conical, cylindrical, and asymmetrical geometry. Using these distinct geometry and electromagnetic systems, we propose to classify MEMS. This idea is extremely useful in the study of existing MEMS as well as in the synthesis of an infinite number of innovative motion microdevices. In particular, using the possible geometry and electromagnetic systems (endless, open-ended, and integrated), novel high-performance MEMS can be synthesized. The basic electromagnetic micromachines (microdevices) under consideration are direct- and alternatingcurrent, induction and synchronous, rotational and translational (linear). That is, microdevices are classified using a type classifier
Y = {y : y ∈ Y} Motion microdevices are categorized using a geometric classifier (plate P, spherical S, torroidal T, conical N, cylindrical C, or asymmetrical A geometry) and an electromagnetic system classifier (endless E, open-ended O, or integrated I). The microdevice classifier, documented in Table 14.1, is partitioned ©2002 CRC Press LLC
TABLE 14.1 Classification of Electromagnetic Microdevices Using the Electromagnetic System–Geometry Classifier Geometry
G M
Spherical, S
Torroidal, T
Conical, N
Cylindrical, C
Electromagnetic System
Integrated, I
Open-Ended (Open), O
Endless (Closed), E
Plate, P
as
N Endless Electromagnetic System and Spherical Geometry
as
Stator as
bs
S Rotor Endless Electromagnetic System and Conical Geometry
Endless Electromagnetic System and Cylindrical Geometry
N bs as Stator as bs S Rotor
bs
Stator as
bs
S Rotor
FIGURE 14.1
Rotor S as bs Stator
bs
as
N Rotor S
as
bs Stator
as
N as
bs N
bs
bs N
Rotor S as bs Stator
Permanent-magnet synchronous micromachines with different geometry.
©2002 CRC Press LLC
Asymmetrical, A
into three horizontal and six vertical strips, and contains 18 sections, each identified by ordered pairs of characters, such as (E, P) or (O, C). In each ordered pair, the first entry is a letter chosen from the bounded electromagnetic system set
M = { E, O, I } The second entry is a letter chosen from the geometric set
G = { P, S, T, N, C, A } That is, for electromagnetic microdevices, the electromagnetic system–geometric set is
M × G = { (E, F ), ( E, S ), ( E, T ),..., (I, N ),(I, C), ( I, A) } In general, we have
M × G = { (m, g ) : m ∈ M and g ∈ G } Other categorization can be applied. For example, single-, two-, three-, and multi-phase microdevices are classified using a phase classifier
H = {h : h ∈ H} Therefore, Y × M × G × H = {( y, m, g, h) : y ∈ Y, m ∈ M, g ∈ G and h ∈ H} Topology (radial or axial), permanent magnets shaping (strip, arc, disk, rectangular, triangular, or other shapes), permanent magnet characteristics (BH demagnetization curve, energy product, hysterisis minor loop), commutation, emf distribution, cooling, power, torque, size, torque-speed characteristics, as well as other distinct features of microdevices can be easily classified. That is, the devised electromagnetic microdevices can be classified by an N-tuple as {microdevice type, electromagnetic system, geometry, topology, phase, winding, connection, cooling}. Using the classifier, which is given in Table 14.1 in terms of electromagnetic system–geometry, the designer can classify the existing motion microdevices as well as synthesize novel high-performance microdevices. As an example, the spherical, conical, and cylindrical geometries of a two-phase permanentmagnet synchronous microdevice are illustrated in Fig. 14.2. This section documents new results in structural synthesis which can be used to optimize the microdevice performance. The conical (existing) and spherical-conical (devised) microdevice geometries are illustrated in Fig. 14.2. Using the innovative spherical-conical geometry, which is different compared to the existing conical geometry, one increases the active length Lr and average diameter Dr . For radial flux microdevices, the electromagnetic torque Te is proportional to the squared rotor diameter and axial 2 length. In particular, T e = k T D r L r , where kT is the constant. From the above relationship, it is evident Endless Electromagnetic System
Spherical Geometry
N as bs Stator
as bs N Rotor S
S Rotor
FIGURE 14.2
Stator
Conical Geometry
Cylindrical Geometry
Spherical-Conical Geometry
N
as bs
as bs
N
Stator Stator Rotor S
Rotor Stator S Stator
Assymetrical Geometry
N bs as Stator S Rotor
as
bs N
Rotor S Stator
N as
bs
Stator
S Rotor
as bs N Rotor S Stator
N as
bs
Stator Stator S Rotor
as bs N Rotor S Stator
Two-phase permanent-magnet synchronous microdevice (micromachine) geometry.
©2002 CRC Press LLC
that the spherical-conical micromotors develop higher electromagnetic torque compared with the conventional design. In addition, improved cooling, reduced undesirable torques components, as well as increased ruggedness and robustness contribute to the viability of the proposed solution. Thus, using the classifier paradigm, novel microdevices with superior performance can be devised.
14.3 MEMS Fabrication Microelectromechanics, which integrates micromechanics and microelectronics, requires affordable, lowcost, high-yield fabrication technologies which allow one to fabricate 3-D microscale structures and devices. Micromachining is a key fabrication technology for microscale structures, devices, and MEMS. Microelectromechanical systems fabrication technologies fall into three broad categories: bulk machining, surface machining, and LIGA (LIGA-like) techniques [1–3].
Bulk Micromachining Bulk and surface micromachining are based on the modified CMOS and specifically designed micromachining processes. Bulk micromachining of silicon uses wet and dry etching techniques in conjunction with etch masks and etch-stop-layers to develop microstructures from the silicon substrate. Microstructures are fabricated by etching areas of the silicon substrate to release the desired 3-D microstructures. The anisotropic and isotropic wet etching processes, as well as concentration dependent etching techniques, are widely used in bulk micromachining. The microstructures are formed by etching away the bulk of the silicon wafer to fabricate the desired 3-D structures. Bulk machining with its crystallographic and dopant-dependent etch processes, when combined with wafer-to-wafer bonding, produces complex 3-D microstructures with the desired geometry. Through bulk micromachining, one fabricates microstructures by etching deeply into the silicon wafer. There are several ways to etch the silicon wafer. The anisotropic etching uses etchants that etch different crystallographic directions at different rates. Through anisotropic etching, 3-D structures (cons, pyramids, cubes, and channels into the surface of the silicon wafer) are fabricated. In contrast, the isotropic etching etches all directions in the silicon wafer at same (or close) rate, and, therefore, hemisphere and cylinder structures can be made. Deep reactive ion etching uses plasma to etch straight walled structures (cubes, rectangular, triangular, etc.).
Surface Micromachining Surface micromachining has become the major fabrication technology in recent years because complex 3-D microscale structures and devices can be fabricated. Surface micromachining with single-crystal silicon, polysilicon, silicon nitride, silicon oxide, and silicon dioxide (as structural and sacrificial materials which deposited and etched) is widely used to fabricate microscale structures and devices on the surface of a silicon wafer. This affordable low-cost high-yield technology is integrated with IC fabrication processes guaranteeing the needed microstructures-IC fabrication compatibility. The techniques for depositing and patterning thin films are used to produce complex microstructures and microdevices on the surface of silicon wafers (surface silicon micromachining) or on the surface of other substrates. Surface micromachining technology allows one to fabricate the structure as layers of thin films. This technology guarantees the fabrication of 3-D microdevices with high accuracy, and the surface micromachining can be called a thin film process. Each thin film is usually limited to thickness up to 5 µm, which leads to fabrication of high-performance planar-type microscale structures and devices. The advantage of surface micromachining is the use of standard CMOS fabrication processes and facilities, as well as compliance with ICs. Therefore, this technology is widely used to manufacture microscale actuators and sensors (microdevices). Surface micromachining is based on the application of sacrificial (temporary) layers that are used to maintain subsequent layers and are removed to reveal (release) fabricated (released or suspended) microstructures. This technology was first demonstrated for ICs and applied to fabricate microstructures in the 80s. On the surface of a silicon wafer, thin layers of structural and sacrificial materials are deposited ©2002 CRC Press LLC
Sacrificial Layer
Sacrificial Layer
Silicon Substrate
Structural Layer Sacrificial Layer Sacrificial Layer Silicon Substrate
1. Deposition and patterning of the sacrificial layer
2. Deposition and patterning of the structural layer
Micromachined Structure Structural Layer 3. Etching of the sacrificial layer
Silicon Substrate
FIGURE 14.3
Surface micromachining.
r
Stator Insulating
Rotor
Bearing Flange Bearing Post
Silicon Substrate
Permanent Stator Magnet Windings
Rotor
Stator Insulating
ICs
FIGURE 14.4
Cross-section schematics for slotless permanent-magnet brushless micromotor with ICs.
and patterned. Then, the sacrificial material is removed, and a micromechanical structure or device is fabricated. Figure 14.3 illustrates a typical process sequence of the surface micromachining fabrication technology. Usually, the sacrificial layer is made of silicon dioxide (SiO2), phosphorous-doped silicon dioxide, or silicon nitride (Si3N4). The structural layers are then typically formed with polysilicon, and the sacrificial layer is removed. In particular, after fabrication of the surface microstructures and microdevices (micromachines), the silicon wafer can be wet bulk etched to form cavities below the surface components, which allows a wider range of desired motion for the device. The wet etching can be done using hydrofluoric and buffered hydrofluoric acids, potassium hydroxide, ethylene-diamene-pyrocatecol, tetramethylammonium hydroxide, or sodium hydroxide. Surface micromachining technology was used to fabricate rotational micromachines [6]. For example, heavily-phosphorous-doped polysilicon can be used to fabricate rotors and stators, and silicon nitride can be applied as the structural material to attain electrical insulation. The cross-section of the slotless micromotor fabricated on the silicon substrate with polysilicon stator with deposited windings, polysilicon rotor with deposited permanent-magnets, and bearing is illustrated in Fig. 14.4. The micromotor is controlled by the driving/sensing and controlling/processing ICs. To fabricate micromotor and ICs on a single- or double-sided chip (which significantly enhances the performance), similar fabrication technologies and processes are used, and the compatibility issues are addressed and resolved. The surface micromachining processes were integrated with the CMOS technology (e.g., similar materials, lithography, etching, and other techniques). To fabricate the integrated MEMS, post-, mixed-, and pre-CMOS/micromachining techniques can be applied [1–3].
LIGA and LIGA-Like Technologies There is a critical need to develop the fabrication technologies allowing one to fabricate high-aspectratio microstructures. The LIGA process, which denotes Lithography–Galvanoforming–Molding (in German words, Lithografie–Galvanik–Abformung), is capable of producing 3-D microstructures of up to centimeter high with the aspect ratio (depth versus lateral dimension) more than 100 [2,7,8]. The LIGA technology is based upon X-ray lithography, which guarantees shorter wavelength (in order from ©2002 CRC Press LLC
0066_frame_C14.fm Page 8 Wednesday, January 9, 2002 1:39 PM
few to 10 Å, which leads to negligible diffraction effects) and larger depth of focus compared with optical lithography. The ability to fabricate microstructures and microdevices in the centimeter range is particularly important in the actuators and drives applications since the specifications are imposed on the rated force and torque developed by the microdevices, and due to the limited force and torque densities, the designer faces the need to increase the actuator dimensions.
14.4 MEMS Electromagnetic Fundamentals and Modeling The MEMS classifier, structural synthesis, and optimization were reported in Section 14.2. The classification and optimization are based on the consideration and synthesis of the electromagnetic system, analysis of the magnetomotive force, design of the MEMS geometry and topology, and optimization of other quantities. Different rotational (radial and axial) and translational motion microdevices are classified using endless (closed), open-ended (open), and integrated electromagnetic systems. Our goal is to approach and solve a wide range of practical problems encountered in nonlinear design, modeling, analysis, control, and optimization of motion microstructures and microdevices with driving/ sensing circuitry controlled by ICs for high-performance MEMS. Studying MEMS, the emphases are placed on: • design of high-performance MEMS through devising innovative motion microdevices with radiating energy microdevices, microscale driving/sensing circuitry, and controlling/signal processing ICs, • optimization and analysis of rotational and translation motion microdevices, • development of high-performance signal processing and controlling ICs for microdevices devised, • development of mathematical models with minimum level of simplifications and assumptions in the time domain, • design of optimal robust control algorithms, • design of intelligent systems through self-adaptation, self-organization, evolutionary learning, decision-making, and intelligence, • development of advanced software and hardware to attain the highest degree of intelligence, integration, efficiency, and performance. In this section, our goal is to perform nonlinear modeling, analysis, and simulation. To attain these objectives, we apply the MEMS synthesis paradigm, develop nonlinear mathematical models to model complex electromagnetic-mechanical dynamics, perform optimization, design closed-loop control systems, and perform data-intensive analysis in the time domain. To model electromagnetic motion microdevices, using the magnetic vector and electric scalar potentials A and V, respectively, one usually solves the partial differential equations
∂A ∂A 2 – ∇ A + µσ ------- + µ e --------2- = – µσ ∇V ∂t ∂t 2
using finite element analysis. Here, µ, σ, and ε are the permeability, conductivity, and permittivity. However, to design electromagnetic MEMS as well as to perform electromagnetic–mechanical analysis and optimization, differential equations must be solved in the time domain. In fact, basic phenomena cannot be comprehensively modeled, analyzed, and assessed applying traditional finite element analysis, which gives the steady-state solutions and models. There is a critical need to develop the modeling tools that will allow one to augment nonlinear electromagnetics and mechanics in a single electromagnetic– mechanical modeling core to attain high-fidelity analysis with performance assessment and outcome prediction. Operating principles of MEMS are based upon electromagnetic principles. A complete electromagnetic model is derived in terms of five electromagnetic field vectors. In particular, three electric field vectors ©2002 CRC Press LLC
0066_frame_C14.fm Page 9 Wednesday, January 9, 2002 1:39 PM
and two magnetic field vectors are used. The electric field vectors are the electric field intensity, E , the electric flux density, D, and the current density, J . The magnetic field vectors are the magnetic field intensity H and the magnetic field density B. The differential equations for microelectromechanical motion device are found using Maxwell’s equations, constitutive (auxiliary) equations, and classical mechanics. Maxwell’s partial differential equations in the E- and H -domain in the point form are
∂ H ( x, y, z, t ) ∇ × E ( x, y, z, t ) = – µ ------------------------------∂t ∂ E ( x, y, z, t ) ∂ E ( x, y, z, t ) ∇ × H ( x, y, z, t ) = ε ------------------------------ + J ( x, y, z, t ) = ε ------------------------------ + σ E ( x, y, z, t ) ∂t ∂t ρ v ( x, y, z, t ) ∇ ⋅ E ( x, y, z, t ) = ---------------------------ε ∇ ⋅ H ( x, y, z, t ) = 0 where ε is the permittivity, µ is the permeability, σ is the conductivity, and ρv is the volume charge density. The constitutive (auxiliary) equations are given using the permittivity ε, permeability tensor µ, and conductivity σ. In particular, one has
D = εE
or
D = εE + P
B = µH
or
B = µ(H + M)
J = σE
or
J = ρν v
The Maxwell’s equations can be solved using the boundary conditions on the field vectors. In tworegion media, we have
a N × ( E2 – E1 ) = 0,
a N × ( H 2 – H 1 ) = J s,
a N ⋅ ( D2 – D1 ) = ρ s ,
a N ⋅ ( B2 – B1 ) = 0
where J s is the surface current density vector, a N is the surface normal unit vector at the boundary from region 2 into region 1, and ρ s is the surface charge density. The constitutive relations that describe media can be integrated with Maxwell’s equations, which relate the fields in order to find two partial differential equations. Using the electric and magnetic field intensities E and H to model electromagnetic fields in MEMS, one has
∂J ∂ D ∂E ∂ E 2 - = – µσ ------ – µε --------2∇ × ( ∇ × E ) = ∇ ( ∇ ⋅ E ) – ∇ E = − µ ------ – µ --------2 ∂t ∂t ∂t ∂t 2
2
∂H ∂ H 2 ∇ × ( ∇ × H ) = ∇ ( ∇ ⋅ H ) – ∇ H = – µσ ------- – µε --------2 ∂t ∂t 2
The following pair of homogeneous and inhomogeneous wave equations
ρ ∂E ∂ E 2 ∇ E – µσ ------ – µε --------2- = ∇ -----v ∂t ε ∂t 2
∂H ∂ H 2 - = 0 ∇ H – µσ ------- – µε --------2 ∂t ∂t 2
©2002 CRC Press LLC
0066_frame_C14.fm Page 10 Wednesday, January 9, 2002 1:39 PM
is equivalent to four Maxwell’s equations and constitutive relations. For some cases, these two equations can be solved independently. It must be emphasized that it is not always possible to use the boundary conditions using only E and H , and thus, the problem not always can be simplified to two electromagnetic field vectors. Therefore, the electric scalar and magnetic vector potentials are used. Denoting the magnetic vector potential as A and the electric scalar potential as V, we have
∇ × A = B = µH
∂A E = – ------- – ∇V ∂t
and
The electromagnetic field is derivative from the potentials. Using the Lorentz equation
∂V ∇ ⋅ A = – ------∂t the inhomogeneous vector potential wave equation to be solved is
∂A ∂ A 2 – ∇ A + µσ ------- + µε --------2- = – µσ ∇V ∂t ∂t 2
To model motion microdevices, the mechanical equations must be used, and Newton’s second law is usually applied to derive the equations of motion. Using the volume charge density ρv , the Lorenz force, which relates the electromagnetic and mechanical phenomena, is found as
F = ρv ( E + v × B ) = ρv E + J × B The electromagnetic force can be found by applying the Maxwell stress tensor method. This concept employs a volume integral to obtain the stored energy, and stress at all points of a bounding surface can be determined. The sum of local stresses gives the net force. In particular, the electromagnetic stress is
F =
∫ ( ρ E + J × B ) dv v
ν
1 = --- T αβ ⋅ ds µ s
°∫
↔
The electromagnetic stress energy tensor (the second Maxwell stress tensor) is
0
Ex
Ey
Ez
T αβ = – E x 0 –Ey –Bz
Bz
–By
0
Bx
–Bx
0
↔
–Ez
By
In general, the electromagnetic torque developed by motion microstructures is found using the electromagnetic field. In particular, the electromagnetic stress tensor is given as
Ts = Ts + Ts E
M
E 1 D 1 – 1--2 E j D j =
E2 D1 E3 D1
©2002 CRC Press LLC
E1 D2 E2 D2 –
1 -- E j D j 2
E3 D2
B 1 H 1 – 1--2 B j H j
E1 D3 E2 D3 E 3 D 3 – 1--2 E j D j
+
B2 H1 B3 H1
B1 H2 B2 H2 –
1 -- B j H j 2
B3 H2
B1 H3 B2 H3 B 3 H 3 – 1--2 B j H j
0066_frame_C14.fm Page 11 Wednesday, January 9, 2002 1:49 PM
For the Cartesian, cylindrical, and spherical coordinate systems, which can be used to develop the mathematical model, we have
Ex = E1 , Ey = E2 , Ez = E3 ,
Dx = D1 , Dy = D2 , Dz = D3 ,
Hx = H1 , Hy = H2 , Hz = H3 , Er = E1 , Eθ = E2 , Ez = E3 ,
Bx = B1 , By = B2 , Bz = B3
Dr = D1 , Dθ = D2 , Dz = D3 ,
Hr = H1 , Hθ = H2 , Hz = H3 , Eρ = E1 , Eθ = E2 , Eφ = E3 ,
Br = B1 , Bθ = B2 , Bz = B3
Dρ = D1 , Dθ = D2 , Dφ = D3 ,
Hρ = H1 , Hθ = H2 , Hφ = H3 ,
Bρ = B1 , Bθ = B2 , Bφ = B3
Maxwell’s equations can be solved using the MATLAB environment. In motion microdevices, the designer analyzes the torque or force production mechanisms. Newton’s second law for rotational and translational motions is
d ωr 1 --------- = -- T Σ , dt J dv 1 ----- = ---- F Σ , dt m
∑
∑
d θr -------- = ω r dt dx ------ = v dt
where ωr and θr are the angular velocity and displacement, v and x are the linear velocity and displacement, ∑TΣ is the net torque, ∑FΣ is the net force, J is the equivalent moment of inertia, and m is the mass.
14.5 MEMS Mathematical Models The problems of modeling and control of MEMS are very important in many applications. A mathematical model is a mathematical description (in the form of functions or equations) of MEMS, which integrate motion microdevices (microscale actuators and sensors), radiating energy microdevices, microscale driving/sensing circuitry, and controlling/signal processing ICs. The purpose of the model development is to understand and comprehend the phenomena, as well as to analyze the end-to-end behavior. To model MEMS, advanced analysis methods are required to accurately cope with the involved highly complex physical phenomena, effects, and processes. The need for high-fidelity analysis, computationallyefficient algorithms, and simulation time reduction increases significantly for complex microdevices, restricting the application of Maxwell’s equations to problems possible to solve. As was illustrated in the previous section, nonlinear electromagnetic and energy conversion phenomena are described by the partial differential equations. The application of Maxwell’s equations fulfills the need for data-intensive analysis capabilities with outcome prediction within overall modeling domains as particularly necessary for simulation and analysis of high-performance MEMS. In addition, other modeling and analysis methods are applied. The lumped mathematical models, described by ordinary differential equations, can be used. The process of mathematical modeling and model development is given below. The first step is to formulate the modeling problem: • examine and analyze MEMS using a multilevel hierarchy concept, develop multivariable inputoutput subsystem pairs, e.g., motion microstructures (microscale actuators and sensors), radiating energy microdevices, microscale circuitry, ICs, controller, input/output devices; • understand and comprehend the MEMS structure and system configuration; • gather the data and information; • develop input-output variable pairs, identify the independent and dependent control, disturbance, output, reference (command), state and performance variables, as well as events; ©2002 CRC Press LLC
0066_frame_C14.fm Page 12 Wednesday, January 9, 2002 1:49 PM
• making accurate assumptions, simplify the problem to make the studied MEMS mathematically tractable (mathematical models, which are the idealization of physical phenomena, are never absolutely accurate, and comprehensive mathematical models simplify the reality to allow the designer to perform a thorough analysis and make accurate predictions of the system performance). The second step is to derive equations that relate the variables and events: • define and specify the basic laws (Kirchhoff, Lagrange, Maxwell, Newton, and others) to be used to obtain the equations of motion. Mathematical models of electromagnetic, electronic, and mechanical microscale subsystems can be found and augmented to derive mathematical models of MEMS using defined variables and events; • derive mathematical models; The third step is the simulation, analysis, and validation: • identify the numerical and analytic methods to be used in analysis and simulations; • analytically and/or numerically solve the mathematical equations (e.g., differential or difference equations, nonlinear equations, etc.); • using information variables (measured or observed) and events, synthesize the fitting and mismatch functionals; • verify the results through the comprehensive comparison of the solution (model input-state-outputevent mapping sets) with the experimental data (experimental input-state-output-event mapping sets); • calculate the fitting and mismatch functionals; • examine the analytical and numerical data against new experimental data and evidence. If the matching with the desired accuracy is not guaranteed, the mathematical model of MEMS must be refined, and the designer must start the cycle again. Electromagnetic theory and classical mechanics form the basis for the development of mathematical models of MEMS. It was illustrated that MEMS can be modeled using Maxwell’s equations and torsionalmechanical equations of motion. However, from modeling, analysis, design, control, and simulation perspectives, the mathematical models as given by ordinary differential equations can be derived and used. Consider the rotational microstructure (bar magnet, current loop, and microsolenoid) in a uniform magnetic field, see Fig. 14.5. The microstructure rotates if the electromagnetic torque is developed. The electromagnetic field must be studied to find the electromagnetic torque. The torque tends to align the magnetic moment m with B, and
T = m×B
FIGURE 14.5
Clockwise rotation of the motion microstructure.
©2002 CRC Press LLC
0066_frame_C14.fm Page 13 Wednesday, January 9, 2002 1:49 PM
For a microstructure with outside diameter Dr , the magnet strength is Q. Hence, the magnetic moment is m = QDr , and the force is found as F = QB. The electromagnetic torque is
1 T = 2F --D r sin α = QD r B sin α = mB sin α 2 Using the unit vector in the magnetic moment direction am , one obtains
T = m × B = a m m × B = QD r a m × B For a current loop with the area A, the torque is found as
T = m × B = a m m × B = iAa m × B For a solenoid with N turns, one obtains
T = m × B = a m m × B = iANa m × B As the electromagnetic torque is found, using Newton’s second law, one has
d ωr 1 --------- = -J dt
∑T
Σ
1 = -- ( T – T L ), J
d θr -------- = ω r dt
where T L is the load torque. The electromotive (emf ) and magnetomotive (mmf ) forces can be used in the model development. We have
emf =
°∫ E ⋅ dl l
=
∂B
-ds °∫ ( v × B ) ⋅ dl – ∫ ----∂t l
s
motional induction generation
transformer induction
and
mmf =
∫ H ⋅ dl l
=
∂D
- ds °∫ J ⋅ ds + °∫ -----∂t s
s
For preliminary design, it is sufficiently accurate to apply Faraday’s or Lenz’s laws, which give the electromotive force in term of the time-varying magnetic field changes. In particular,
dψ ∂ψ ∂ψ d θ ∂ψ ∂ψ emf = – ------- = – ------- – -------- --------r = – ------- – -------- ω r dt ∂ t ∂θ r dt ∂ t ∂θ r ------- is the transformer term. where ∂ψ ∂t The total flux linkages are
1 ψ = -- π N S Φ p 4 where NS is the number of turns and Φp is the flux per pole. For radial topology micromachines, we have
µ iN S - R in st L Φ p = ----------2 P ge
©2002 CRC Press LLC
0066_frame_C14.fm Page 14 Wednesday, January 9, 2002 1:49 PM
where i is the current in the phase microwinding (supplied by the IC), Rin st is the inner stator radius, L is the inductance, P is the number of poles, and ge is the equivalent gap, which includes the airgap and radial thickness of the permanent magnet. Denoting the number of turns per phase as NS, the magnetomotive force is
iN mmf = --------S cos P θ r P The simplified expression for the electromagnetic torque for radial topology brushless micromachines is
1 T = --PB ag i s N S L r D r 2 where Bag is the air gap flux density, Bag = (µiNS/2Pge)cosPθr , is is the total current, Lr is the active length (rotor axial length), and Dr is the outside rotor diameter. The axial topology brushless micromachines can be designed and fabricated. The electromagnetic torque is given as
T = k ax B ag i s N S D a
2
where kax is the nonlinear coefficient, which is found in terms of active conductors and thin-film permanent magnet length; and Da is the equivalent diameter, which is a function of windings and permanent-magnet topography.
Example 14.5.1: Mathematical Model of the Translational Microtransducer Figure 14.6 illustrates a simple translational microstructure with a stationary member and movable translational microstructure (plunger), which can be fabricated using continuous batch-fabrication process [2]. The winding can be ‘‘printed” using the micromachining/CMOS technology. We apply Newton’s second law of motion to study the dynamics. Newton’s law states that the acceleration of an object is proportional to the net force. The vector sum of all forces is found as 2
dx dx 2 F ( t ) = m -------2- + B v ------ + ( k s1 x + k s2 x ) + F e ( t ) dt dt
Winding
ICs
Spring, ks ua(t )
Magnetic force, Fe (t ) Translational Motion Microstructure: Plunger
x (t )
Damper, Bv Winding
FIGURE 14.6
Microtransducer schematics with translational motion microstructure.
©2002 CRC Press LLC
0066_frame_C14.fm Page 15 Wednesday, January 9, 2002 1:49 PM
where x is the displacement of a translational microstructure (plunger), m is the mass of a movable plunger, Bv is the viscous friction coefficient, ks1 and ks2 are the spring constants (the spring can be made ∂ W c ( i, x ) . from polysilicon), and Fe(t) is the magnetic force which is found using the coenergy Wc , Fe(i, x) = ----------------------∂x The stretch and restoring forces are not directly proportional to the displacement, and these forces are different on either side of the equilibrium position. The restoring/stretching force exerted by the 2 polysilicon spring is expressed as (ks1x + ks2x ). Assuming that the magnetic system is linear, the coenergy is expressed as
1 2 W c ( i, x ) = --L ( x )i 2 Then
1 2 dL ( x ) F e ( i, x ) = --i -------------2 dx The inductance is found as 2 N µf µ0 Af Ag N L ( x ) = ------------------ = ------------------------------------------------ℜf + ℜg A g l f + 2A f µ f (x + 2d ) 2
where ℜf and ℜg are the reluctances of the ferromagnetic material and air gap, Af and Ag are the associated cross section areas, and lf and (x + 2d) are the lengths of the magnetic material and the air gap. Hence 2
2
2
2N m f m 0 A f A g dL ------ = – --------------------------------------------------------2 dx [ A g l f + 2A f µ f ( x + 2d ) ] Using Kirchhoff ’s law, the voltage equation for the phase microcircuitry is
dψ u a = ri + ------dt where the flux linkage ψ is expressed as ψ = L(x)i. One obtains
di dL ( x ) dx u a = ri + L ( x )----- + i -------------- -----dt dx dt and thus
2N µ f µ 0 A f A g r di 1 ----- = – ----------- i + --------------------------------------------------------------------iv + ----------- u a dt L ( x ) L ( x ) [A g l f + 2A f µ f (x + 2d ) ] 2 L(x) 2
2
2
Augmenting this equation with differential equation 2
dx dx 2 F ( t ) = m -------2- + B v ------ + (k s1 x + k s2 x ) + F e ( t ) dt dt ©2002 CRC Press LLC
0066_frame_C14.fm Page 16 Wednesday, January 9, 2002 1:49 PM
three nonlinear differential equations for the studied translation microdevise are found as
A g l f + 2A f µ f ( x + 2d ) r [ A g l f + 2A f µ f ( x + 2d ) ] 2 µ f Af di -iv + ---------------------------------------------------- = – --------------------------------------------------------i -u a + -----------------------------------------------2 2 A l + 2A µ ( x + 2d ) dt g f f f N µ f µ 0 A f Ag N µ f µ 0 A f Ag dx ------ = v dt N µf µ 0 Af Ag B dv 1 2 2 ----- = -------------------------------------------------------------2 i – ---- ( k s1 x + k s2 x ) – -----v v dt m m m [ A g l f + 2A f µ f ( x + 2d ) ] 2
2
2
Example 14.5.2: Mathematical Model of an Elementary Synchronous Reluctance Micromotor Consider a single-phase reluctance micromotor, which can be straightforwardly fabricated using conventional CMOS, LIGA, and LIGA-like technologies. Ferromagnetic materials are used to fabricate microscale stator and rotor, and windings can be deposited on the stator, see Fig. 14.7. The quadrature and direct magnetic axes are fixed with the microrotor, which rotates with angular velocity ωr . These magnetic axes rotate with the angular velocity ω. Assume that the initial conditions are zero. Hence, the angular displacements of the rotor θr and the angular displacement of the quadrature magnetic axis θ are equal, and
θr = θ =
∫
t
t0
ω r ( τ ) dτ =
∫
t
t0
ω ( τ ) dτ .
The magnetizing reluctance ℜm is a function of the rotor angular displacement θr . Using the number of turns NS, the magnetizing inductance is 2
NS L m ( θ r ) = ----------------. ℜm ( θr ) This magnetizing inductance varies twice per one revolution of the rotor and has minimum and maximum values, and 2
NS L m min = -----------------------ℜ m max ( θ r )
2
, θ r =0, π ,2 π ,…
NS L m max = -----------------------ℜ m min ( θ r )
1 3 5 θ r = -- π , -- π , -- π ,… 2 2 2
Stator ICs
Quadrature Magnetic Axis ias uas (t )
Direct Magnetic Axis r , Te
Ns rs , Ls
Rotor
t r
r ( )d
r
r0
t0
as
FIGURE 14.7
Microscale single-phase reluctance motor with rotational motion microstructure (microrotor).
©2002 CRC Press LLC
0066_frame_C14.fm Page 17 Wednesday, January 9, 2002 1:49 PM
Lm Lm max Lm Lm L m Lm min
0
FIGURE 14.8
3 2
2
r
Magnetizing inductance Lm(θr).
Assume that this variation is a sinusoidal function of the rotor angular displacement. Then,
L m ( θ r ) = L m – L ∆m cos 2 θ r where L m is the average value of the magnetizing inductance and L∆m is half of the amplitude of the sinusoidal variation of the magnetizing inductance. The plot for Lm(θr) is documented in Fig. 14.8. The electromagnetic torque, developed by single-phase reluctance motors is found using the expression 2 for the coenergy Wc(ias, θr). From Wc(ias, θr) = 1--(L ls + L m – L ∆m cos 2 θ r )i as , one finds 2
∂ [ 1--2 i as ( L ls + L m – L ∆m cos 2 θ r ) ] ∂ W c ( i as , θ r ) 2 - = ---------------------------------------------------------------------T e = -------------------------= L ∆m i as sin 2 θ r ∂θ r ∂θ r 2
The electromagnetic torque is not developed by synchronous reluctance motors if IC feeds the 2 dc current or voltage to the motor winding because T e = L ∆m i as sin 2θ r . Hence, conventional control algorithms cannot be applied, and new methods, which are based upon electromagnetic features must be researched. The average value of Te is not equal to zero if the current is a function of θr . As an illustration, let us assume that the following current is fed to the motor winding:
i as = i M Re ( sin 2 θ r ) Then, the electromagnetic torque is 2
T e = L ∆m i as sin 2 θ r = L ∆m i M ( Re sin 2 θ r ) sin2 θ r ≠ 0 2
2
and
1 T e av = --π
π
1 2 2 L ∆m i as sin2 θ r d θ r = --L ∆m i M 4 0
∫
The mathematical model of the microscale single-phase reluctance motor is found by using Kirchhoff’s and Newton’s second laws
d ψ as u as = r s i as + ---------dt d θr T e – B m ω r – T L = J --------2 dt
(circuitry equation)
2
©2002 CRC Press LLC
( torsional-mechanical equation )
0066_frame_C14.fm Page 18 Wednesday, January 9, 2002 1:49 PM
From ψ as = (L ls + L m – L ∆m cos2 θ r )i as , one obtains a set of three first-order nonlinear differential equations. In particular, we have
rs di as 2L ∆m 1 -------- = ------------------------------------------------ i as – ------------------------------------------------ i as ω r sin2 θ r + ------------------------------------------------- u as dt L ls + L m – L ∆m cos2 θ r L ls + L m – L ∆m cos2 θ r L ls + L m – L ∆m cos2 θ r dω 1 2 ---------r = -- ( L ∆m i as sin 2 θ r – B m ω r – T L ) dt J d θr -------- = ω r dt
Example 14.5.3: Mathematical Model of Two-Phase Permanent-Magnet Stepper Micromotors For two-phase permanent-magnet stepper micromotors, we have
d ψ as u as = r s i as + ---------dt d ψ bs u bs = r s i bs + ---------dt where the flux linkages are ψas = Lasasias + Lasbsibs + ψasm and ψbs = Lbsasias + Lbsbsibs + ψbsm. Here, uas and ubs are the phase voltages in the stator microwindings as and bs; ias and ibs are the phase currents in the stator microwindings; ψas and ψbs are the stator flux linkages; rs are the resistances of the stator microwindings; Lasas, Lasbs, Lbsas, and Lbsbs are the mutual inductances. The electrical angular velocity and displacement are found using the number of rotor tooth RT,
ω r = RT ω rm θ r = RT θ rm where ωr and ωrm are the electrical and rotor angular velocities, and θr and θrm are the electrical and rotor angular displacements. The flux linkages are functions of the number of the rotor tooth RT, and the magnitude of the flux linkages produced by the permanent magnets ψm. In particular,
ψ asm = ψ m cos ( RT θ rm )
and
ψ bsm = ψ m sin ( RT θ rm )
The self-inductance of the stator windings is
L ss = L asas = L bsbs = L ls + L m The stator microwindings are displaced by 90 electrical degrees. Hence, the mutual inductances between the stator microwindings are zero, Lasbs = Lbsas = 0. Then, we have
ψ as = L ss i as + ψ m cos ( RT θ rm ) ©2002 CRC Press LLC
and
ψ bs = L ss i bs + ψ m sin ( RT θ rm )
0066_frame_C14.fm Page 19 Wednesday, January 9, 2002 1:49 PM
Taking note of the circuitry equations, one has
d [ L ss i as + ψ m cos ( RT θ rm ) ] di - = r s i as + L ss -------as- – RT ψ m ω rm sin ( RT θ rm ) u as = r s i as + ------------------------------------------------------------dt dt d [ L ss i bs + ψ m sin ( RT θ rm ) ] di u bs = r s i bs + ------------------------------------------------------------= r s i bs + L ss -------bs- + RT ψ m ω rm cos ( RT θ rm ) dt dt Therefore, we obtain
di RT ψ r 1 -------as- = – ----s- i as + --------------m- ω rm sin ( RT θ rm ) + ----- u as dt L ss L ss L ss di bs RT ψ r 1 -------- = – ----s- i bs – --------------m- ω rm cos ( RT θ rm ) + ----- u bs dt L ss L ss L ss Using Newton’s second law, we have
d ω rm 1 ------------ = -- ( T e – B m ω rm – T L ) dt J d θ rm ----------- = ω rm dt The expression for the electromagnetic torque developed by permanent-magnet stepper micromotors must be found. Taking note of the relationship for the coenergy
1 2 2 W c = -- ( L ss i as + L ss i bs ) + ψ m i as cos ( RT θ rm ) + ψ m i bs sin ( RT θ rm ) + W PM 2 one finds the electromagnetic torque:
∂W T e = -----------c = – RT ψ m [ i as sin ( RT θ rm ) – i bs cos ( RT θ rm ) ] ∂θ rm Hence, the transient evolution of the phase currents ias and ibs, rotor angular velocity ωrm, and displacement θrm, is modeled by the following differential equations:
r RT ψ di as 1 -------- = – ----s-i as + --------------m- ω rm sin ( RT θ rm ) + -----u as dt L ss L ss L ss r RT ψ di 1 -------bs- = – ----s-i bs – --------------m- ω rm cos ( RT θ rm ) + -----u bs dt L ss L ss L ss d ω rm RT ψ B 1 ------------ = – --------------m- [ i as sin ( RT θ rm ) – i bs cos ( RT θ rm ) ] – -----m- ω rm – --T L dt J J J d θ rm ----------= ω rm dt ©2002 CRC Press LLC
0066_frame_C14.fm Page 20 Wednesday, January 9, 2002 1:49 PM
These four nonlinear differential equations are rewritten in the state-space form as di as -------dt di bs -------dt d ω rm -------------dt d θ rm ------------dt
r
s – ----L
0
0
0
0
=
s – ----L
0
0
0
0
B – -----Jm-
0
0
1
r
ss
1 ----L ss
0
+ 0
1 ----L ss
0 0
0 0
u as u bs
–
i bs
ω rm 0 θ rm 0
0 0 1 -J
RT ψ m --------------- ω rm sin ( RT θ rm ) L ss
i as
ss
RT ψ
m - ω rm cos ( RT θ rm ) – -------------L
+
ss
RT ψ m - [ i as sin ( RT θ rm ) – -------------J
– i bs cos ( RT θ rm ) ]
0
TL
0
The analysis of the torque equation
T e = – RT ψ m [ i as sin ( RT θ rm ) – i bs cos ( RT θ rm ) ] guides one to the conclusion that the expressions for a balanced two-phase current sinusoidal set is
i as = – 2i M sin ( RT θ rm )
and
i bs =
2i M cos ( RT θ rm )
If these phase currents are fed, the electromagnetic torque is a function of the current magnitude iM, and
Te =
2RT ψ m i M
The phase currents needed to be fed are the functions of the rotor angular displacement. Assuming that the inductances are negligibly small, we have the following phase voltages needed to be supplied:
u as = – 2u M sin ( RT θ rm )
and
u bs =
2u M cos ( RT θ rm )
Example 14.5.4: Mathematical Model of Two-Phase Permanent-Magnet Synchronous Micromotors Consider two-phase permanent-magnet synchronous micromotors. Using Kirchhoff’s voltage law, we have
dψ u as = r s i as + ---------asdt dψ u bs = r s i bs + ---------bsdt where the flux linkages are expressed as ψas = Lasasias + Lasbsibs + ψasm and ψbs = Lbsasias + Lbsbsibs + ψbsm. The flux linkages are periodic functions of the angular displacement (rotor position), and let
ψ asm = ψ m sin θ rm ©2002 CRC Press LLC
and
ψ bsm = – ψ m cos θ rm
0066_frame_C14.fm Page 21 Wednesday, January 9, 2002 1:50 PM
The self-inductances of the stator windings are found to be
L ss = L asas = L bsbs = L ls + L m The stator windings are displaced by 90 electrical degrees, and hence, the mutual inductances between the stator windings are Lasbs = Lbsas = 0. Thus, we have
ψ as = L ss i as + ψ m sin θ rm
and
ψ bs = L ss i bs – ψ m cos θ rm
Therefore, one finds
d ( L ss i as + ψ m sin θ rm ) di - = r s i as + L ss -------as- + ψ m ω rm cos θ rm u as = r s i as + -----------------------------------------------dt dt d ( L ss i bs – ψ m cos θ rm ) di bs u bs = r s i bs + -------------------------------------------------- = r s i bs + L ss -------- – ψ m ω rm sin θ rm dt dt Using Newton’s second law
d θ rm T e – B m ω rm – T L = J ------------2 dt 2
we have
d ω rm 1 -----------= -- ( T e – B m ω rm – T L ) dt J d θ rm ----------- = ω rm dt The expression for the electromagnetic torque developed by permanent-magnet motors can be obtained by using the coenergy
1 2 2 W c = -- ( L ss i as + L ss i bs ) + ψ m i as sin θ rm – ψ m i bs cos θ rm + W PM 2 Then, one has
Pψ ∂W T e = -----------c = ----------m- ( i as cos θ rm + i bs sin θ rm ) ∂θ rm 2 Augmenting the circuitry transients with the torsional-mechanical dynamics, one finds the mathematical model of two-phase permanent-magnet micromotors in the following form:
r ψ di 1 -------as- = – ----s-i as – ------m- ω rm cos θ rm + -----u as dt L ss L ss L ss di bs r ψ 1 -------- = – ----s-i bs + ------m- ω rm sin θ rm + -----u bs dt L ss L ss L ss d ω rm Pψ B 1 ------------ = ----------m- ( i as cos θ rm + i bs sin θ rm ) – -----m- ω rm – --T L dt 2J J J d θ rm ----------- = ω rm dt ©2002 CRC Press LLC
0066_frame_C14.fm Page 22 Wednesday, January 9, 2002 1:50 PM
1 0.8 0.6 0.4 0.2 0 -0.2 -0.4 -0.6 -0.8 -1 0
FIGURE 14.9
1
2
3
4
5
6
7
8
9
10
Air-gap mmf and the phase current waveforms.
For two-phase motors (assuming the sinusoidal winding distributions and the sinusoidal mmf waveforms), the electromagnetic torque is expressed as
Pψ T e = ----------m- ( i as cos θ rm + i bs sin θ rm ) 2 Hence, to guarantee the balanced operation, one feeds
i as =
2i M cos θ rm
and
i bs =
2i M sin θ rm
to maximize the electromagnetic torque. In fact, one obtains
Pψ Pψ Pψ 2 2 T e = ----------m- ( i as cos θ rm + i bs sin θ rm ) = ----------m- 2i M ( cos θ rm + sin θ rm ) = ----------m- i M 2 2 2 The air-gap mmf and the phase current waveforms are plotted in Fig. 14.9.
14.6 Control of MEMS Mathematical models of MEMS can be developed with different degrees of complexity. It must be emphasized that in addition to the models of microscale motion devices, the fast dynamics of ICs should be examined. Due to the complexity of complete mathematical models of ICs, impracticality of the developed equations, and very fast dynamics, the IC dynamics can be modeled using reduced-order differential equation or as unmodeled dynamics. For MEMS, modeled using linear and nonlinear differential equations
x˙( t ) = Ax + Bu,
u min ≤ u ≤ u max , y = Hx
x˙( t ) = F z ( t, x, r, z ) + B p ( t, x, p )u,
u min ≤ u ≤ u max , y = H ( x )
different control algorithms can be designed. Here, the state, control, output, and reference (command) vectors are denoted as x, u, y, and r; parameter uncertainties (e.g., time-varying coefficients, unmodeled dynamics, unpredicted changes, etc.) are modeled using z and p vectors. ©2002 CRC Press LLC
0066_frame_C14.fm Page 23 Wednesday, January 9, 2002 1:50 PM
The matrices of coefficients are A, B, and H. The smooth mapping fields of the nonlinear model are denoted as Fz(⋅), Bp(⋅), and H(⋅). It should be emphasized that the control is bounded. For example, using the IC duty ratio dD as the control signal, we have 0 ≤ dD ≤ 1 or −1 ≤ dD ≤ +1. Four-quadrant ICs are used due to superior performance, and −1 ≤ dD ≤ +1. Hence, we have −1 ≤ u ≤ +1. However, in general, umin ≤ u ≤ umax.
Proportional-Integral-Derivative Control Many MEMS can be controlled by the proportional-integral-derivative (PID) controllers, which, taking note of control bounds, are given as [9] u e, e dt , de ----- u ( t ) = sat umax min dt
∫
= sat
u max u min
2j+1 ς ------------ k pj e 2 β +1 + j=0 proportional
∑
σ
∑k ∫e
2j+1 ------------2 µ +1
ij
2j+1 ------------e˙2 γ +1 , j=0 derivative
α
dt +
j=0
integral
∑k
dj
u min ≤ u ≤ u max
where kpj, kij, and kdj are the matrices of the proportional, integral, and derivative feedback gains; ς, β, σ, µ, α, and γ are the nonnegative integers. In the nonlinear PID controllers, the tracking error is used. In particular,
– y(t)
r(t)
e(t) =
reference/command
output
Linear bounded controllers can be straightforwardly designed. For example, letting ς = β = σ = µ = 0, we have the following linear PI control law: u k e ( t ) + k et dt u ( t ) = sat umax i0 min p0
∫
The PID controllers with the state feedback extension can be synthesized as u
( e, x ) u ( t ) = sat umax min 2j+1 ς ------------2 β +1 u max k pj e + = sat umin j=0 proportional
∑
σ
∑k ∫e
2j+1 ------------2 µ +1
ij
α
dt +
∑k
dj
2j+1 ------------2 γ +1
e˙
j=0
j=0
integral
derivative
∂ V ( e, x ) + G ( t )B --------------------, ∂ e x
u min ≤ u ≤ u max
where V(e, x) is the function that satisfies the general requirements imposed on the Lyapunov pair [9], e.g., the sufficient conditions for stability are used. It is evident that nonlinear feedback mappings result, and the nonquadratic function V(e, x) can be synthesized and used to obtain the control algorithm and feedback gains.
Tracking Control Tracking control is designed for the augmented systems, which are modeled using the state variables and the reference dynamics. In particular, from
x˙( t ) = Ax + Bu, ©2002 CRC Press LLC
x˙ ( t ) = r ( t ) – y ( t ) = r ( t ) – Hx ( t ) ref
0066_frame_C14.fm Page 24 Wednesday, January 9, 2002 1:50 PM
one finds
x˙Σ ( t ) = A Σ x Σ + B Σ u + N Σ r,
y = Hx,
x ref , x
xΣ =
A 0 , –H 0
AΣ =
BΣ =
B , 0
NΣ =
0 I
Minimizing the quadratic performance functional
1 J = -2
tf
∫
( x Σ Qx Σ + u Gu ) dt T
t0
T
one finds the control law using the first-order necessary condition for optimality. In particular, we have T ∂V –1 T ∂ V –1 B -------u = – G B Σ -------- = – G 0 ∂ xΣ ∂ xΣ
Here, Q is the positive semi-definite constant-coefficient matrix, and G is the positive weighting constantcoefficient matrix. The solution of the Hamilton–Jacobi equation
1 T ∂V T 1 ∂V T ∂V –1 T ∂ V – ------- = --x Σ Qx Σ + -------- Ax Σ – -- -------- B Σ G B Σ ------- ∂ x Σ 2 ∂ xΣ 2 ∂ x Σ ∂t is satisfied by the quadratic return function V = 1-- x Σ Kx Σ . Here, K is the symmetric matrix, which must 2 be found by solving the nonlinear differential equation T
– K˙ = Q + A Σ K + K A Σ – K B Σ G B Σ K, T
T
T
–1
T
K ( tf ) = Kf
The controller is given as
u = – G B Σ Kx Σ = – G –1
T
–1
T
B Kx Σ 0
From x˙ref ( t ) = e ( t ) , one has
x ref ( t ) =
∫ e ( t ) dt
Therefore, we obtain the integral control law
u ( t ) = –G
–1
T x(t) B K 0 e ( t ) dt
In this control algorithm, the error vector is used in addition to the state feedback. As was illustrated, the bounds are imposed on the control, and umin ≤ u ≤ umax. Therefore, the bounded controllers must be designed. Using the nonquadratic performance functional [9]
J =
©2002 CRC Press LLC
tf
∫
t0
x T Qx + G tan –1 u du dt Σ Σ
∫
0066_frame_C14.fm Page 25 Wednesday, January 9, 2002 1:50 PM
with positive semi-definite constant-coefficient matrix Q and positive-definite matrix G, one finds
u ( t ) = – tanh G
T T x(t) x(t) +1 –1 B B K ≈ – sat –1 G K , 0 0 e ( t ) dt e ( t ) dt
–1
–1 ≤ u ≤ 1
This controller is obtained assuming that the solution of the functional partial differential equation can be approximated by the quadratic return function
1 T V = --x Σ Kx Σ 2 where K is the symmetric matrix.
Time-Optimal Control A time-optimal controller can be designed using the functional
1 J = -2
tf
∫
t0
( x Σ Qx Σ ) dt T
Taking note of the Hamilton–Jacobi equation
∂V 1 T ∂V T – ------- = min --x Σ Qx Σ + -------- ( Ax Σ + B Σ u ) ∂ x Σ ∂t – 1≤u≤1 2 the relay-type controller is found to be T ∂V u = – sgn B Σ -------- , ∂ x Σ
–1 ≤ u ≤ 1
This “optimal” control algorithm cannot be implemented in practice due to the chattering phenomenon. Therefore, relay-type control laws with dead zone T ∂V u = – sgn B Σ -------- ∂ x Σ
,
–1 ≤ u ≤ 1
dead zone
are commonly used.
Sliding Mode Control Soft-switching sliding mode control laws are synthesized in [9]. Sliding mode soft-switching algorithms provide superior performance, and the chattering effect is eliminated. To design controllers, we model the states and errors dynamics as
x˙( t ) = Ax + Bu,
–1 ≤ u ≤ 1
e˙( t ) = Nr˙( t ) – HAx – HBu The smooth sliding manifold is
M = { ( t, x, e ) ∈ R ≥0 × X × E υ ( t, x, e ) = 0 } m
=
∩ { ( t, x, e ) ∈ R j=1
©2002 CRC Press LLC
≥0
× X × E υ j ( t, x, e ) = 0 }
0066_frame_C14.fm Page 26 Wednesday, January 9, 2002 1:50 PM
The time-varying nonlinear switching surface is υ(t, x, e) = Kυxe(t, x, e) = 0. The soft-switching control law is given as
u ( t, x, e ) = – G φ ( υ ),
–1 ≤ u ≤ 1 , G > 0
where φ(⋅) is the continuous real-analytic function of class C ( ≥ 1), for example, tanh and erf.
Constrained Control of Nonlinear MEMS: Hamilton–Jacobi Method Constrained optimization of MEMS is a topic of great practical interest. Using the Hamilton–Jacobi theory, the bounded controllers can be synthesized for continuous-time systems modeled as
x˙
MEMS
( t ) = Fs ( x
MEMS
) + Bs ( x
MEMS
u min ≤ u ≤ u max ,
x
)u
2w+1
MEMS
y = Hx
,
MEMS
( t0 ) = x0
MEMS
∈ Xs is the state vector; u ∈ U is the vector of control inputs: y ∈ Y is the measured output; Here, x Fs(⋅), Bs(⋅) and H(⋅) are the smooth mappings; Fs(0) = 0, Bs(0) = 0, and H(0) = 0; and w is the nonnegative integer. To design the tracking controller, we augment the MEMS dynamics MEMS
MEMS
x˙
( t ) = Fs ( x
MEMS
) + Bs ( x
MEMS
u min ≤ u ≤ u max ,
x
)u
MEMS
)
MEMS
ref
x
MEMS
( t0 ) = x0
with the exogenous dynamics x˙ ( t ) = Nr – y = Nr – H ( x Using the augmented state vector
x=
y = H(x
2w+1
MEMS
).
MEMS
x
ref
∈X
one obtains 2w+1 x˙( t ) = F ( x, r ) + B ( x )u ,
F ( x, r ) =
Fs ( x
MEMS
u min ≤ u ≤ u max , )
+ 0 r, MEMS N –H ( x )
x ( t0 ) = x0 ,
B(x) =
x =
x
MEMS
x
Bs ( x
MEMS
ref
)
0
The set of admissible control U consists of the Lebesgue measurable function u(⋅), and a bounded controller should be designed within the constrained control set
U = { u ∈ u imin ≤ u i ≤ u imax , i = 1,…,m } . m
We map the control bounds imposed by a bounded, integrable, one-to-one, globally Lipschitz, vector valued continuous function Φ ∈C ( ≥ 1). Our goal is to analytically design the bounded admissible statefeedback controller in the closed form as u = Φ(x). The most common Φ are the algebraic and transcendental (exponential, hyperbolic, logarithmic, trigonometric) continuously differentiable, integrable, oneto-one functions. For example, the odd one-to-one integrable function tanh with domain (−∞, +∞) maps −1 the control bounds. This function has the corresponding inverse function tanh with range (−∞, +∞). The performance cost to be minimized is given as
J = −1
∞
∫
t0
[ W x ( x ) + W u ( u ) ] dt =
m ×m
where G ∈
∞
∫
t0
is the positive-definite diagonal matrix.
©2002 CRC Press LLC
∫
T
W x ( x ) + ( 2w + 1 ) ( Φ ( u ) ) G diag ( u ) du dt –1
–1
2w
0066_frame_C14.fm Page 27 Wednesday, January 9, 2002 1:50 PM
Performance integrands Wx(⋅) and Wu(⋅) are real-valued, positive-definite, and continuously differen−1 tiable integrand functions. Using the properties of Φ one concludes that inverse function Φ is integrable. Hence, integral
∫ (Φ
–1
T
( u ) ) G diag ( u ) du –1
2w
exists. Example Consider a nonlinear dynamic system
dx 3 ------ = ax + bu , dt
u min ≤ u ≤ u max
Taking note of
∫
T
W u ( u ) = ( 2w + 1 ) ( Φ ( u ) ) G diag ( u ) du –1
–1
2w
one has the positive-definite integrand
1 2 1 1 3 –1 –1 2 –1 2 W u ( u ) = 3 tanh uG u du = --u tanh u + --u + -- ln ( 1 – u ) , 6 3 6
∫
G
–1
1 = -3
In general, if the hyperbolic tangent is used to map the saturation effect, for the single-input case, one has 2w+1
u 2w –1 u 2w+1 –1 u du W u ( u ) = ( 2w + 1 ) u tanh --- du = u tanh --- – k --------------2 2 k k k –u
∫
∫
Necessary conditions that the control function u(·) guarantees a minimum to the Hamiltonian T –1 ∂V(x) –1 2w 2w+1 H = W x ( x ) + ( 2w + 1 ) ( Φ ( u ) ) G diag ( u ) du + ----------------- [ F ( x, r ) + B ( x )u ] ∂x T
∫
are: first-order necessary condition n1,
∂H ------- = 0 ∂u and second-order necessary condition n2,
∂ H --------------------T- > 0 ∂u × ∂u 2
κ
The positive-definite return function V(·), V ∈ C , κ ≥ 1, is
V ( x 0 ) = inf J ( x 0 , u ) = inf J ( x 0 , Φ ( · ) ) ≥ 0 u∈U
The Hamilton–Jacobi–Bellman equation is given as T T –1 ∂V(x) ∂V –1 2w 2w+1 – ------- = min W x ( x ) + ( 2w + 1 ) ( Φ ( u ) ) G diag ( u ) du + ----------------- [ F ( x, r ) + B ( x )u ] ∂x ∂t u∈U
∫
©2002 CRC Press LLC
0066_frame_C14.fm Page 28 Wednesday, January 9, 2002 1:50 PM
The controller should be derived by finding the control value that attains the minimum to nonquadratic functional. The first-order necessary condition (n1) leads us to an admissible bounded control law. In particular, T ∂V(x) u = – Φ GB ( x ) --------------- , ∂x
u ∈U −1
The second-order necessary condition for optimality (n2) is met because the matrix G is positivedefinite. Hence, a unique, bounded, real-analytic, and continuous control candidate is designed. If there exists a proper function V(x) which satisfies the Hamilton–Jacobi equation, the resulting closedloop system is robustly stable in the specified state X and control U sets, and robust tracking is ensured in the convex and compact set XY(X0,U,R,E0). That is, there exists an invariant domain of stability
S = { x ∈ , e ∈ : x ( t ) ≤ c
b
x
( x0 , t ) +
u
( u ), e ( t ) ≤
( e0 , t ) +
e
r
( r )+
y
( y ),
∀x ∈ X ( X 0 ,U ), ∀t ∈ [t 0 , ∞), ∀e ∈ E ( E 0 , R, Y ) } ⊂ × , c
b
and control u(·), u ∈U steers the tracking error to the set
S E ( δ ) = { e ∈ : e 0 ∈ E 0 , x ∈ X ( X 0 ,U ), r ∈ R, y ∈ Y, t ∈ [ t 0 , ∞ ) b
e(t) ≤
e
( e 0 ,t ) + δ , δ ≥ 0, ∀e ∈ E ( E 0 ,R,Y ), ∀t ∈ [ t 0 ,∞ ) } ⊂
b
Here x and e are the KL-functions; and u , r , and y are the K-functions. The solution of the functional equation should be found using nonquadratic return functions. To obtain V(·), the performance cost must be evaluated at the allowed values of the states and control. Linear and nonlinear functionals admit the final values, and the minimum value of the nonquadratic cost is given by power-series forms [9]. That is, η
J min =
∑
v ( x0 )
2 ( i+ γ +1 ) ----------------------2 γ +1
,
η = 0, 1, 2, …, γ = 0, 1, 2,…
i=0
The solution of the partial differential equation is satisfied by a continuously differentiable positivedefinite return function η
V(x) =
∑ i=0
i+ γ +1 T
i+ γ +1
----------------------------2γ + 1 2 γ +1 2 γ +1 ---------------------------- x Ki x 2(i + γ + 1)
where matrices Ki are found by solving the Hamilton–Jacobi equation. T The quadratic return function in V(x) = 1-- x K0x is found by letting η = γ = 0. This quadratic candidate 2 may be employed only if the designer enables to neglect the high-order terms in Taylor’s series expansion. Using η = 1 and γ = 0, one obtains
1 T 1 2 T 2 V ( x ) = --x K 0 x + -- ( x ) K 1 x 2 4 while for η = 4 and γ = 1, we have the following function:
1 T 3 5/3 T 1 2 T 3 2/3 T 3 4/3 T 2/3 4/3 5/3 2 V ( x ) = -- ( x ) K 0 x + --x K 1 x + -- ( x ) K 2 x + ----- ( x ) K 3 x + -- ( x ) K 4 x 4 2 10 4 8 ©2002 CRC Press LLC
0066_frame_C14.fm Page 29 Friday, January 18, 2002 4:36 PM
The nonlinear bounded controller is given as η
i− γ
i+ γ +1
--------------------------- T 2 γ +1 2 γ +1 u = – Φ GB ( x ) diag x ( t ) K i ( t )x ( t ) , i=0
∑
i− γ ------------2 γ +1
x1 diag x ( t )
i− γ ------------2 γ +1
i− γ ------------2 γ +1 2
L
0
0
L
0
0
M
M
O
M
M
0
0
L x
0 =
0
0
x
0
i− γ ------------2 γ +1 c−1
M
0
0
x
i− γ ------------2 γ +1 c
If matrices Ki are diagonal, we have the following control algorithm:
T u = – Φ GB ( x )
η
∑K x
2i+1 ------------2 γ +1
i
i=0
Constrained Control of Nonlinear Uncertain MEMS: Lyapunov Method Over the horizon [t0, ∞) we consider the dynamics of MEMS modeled as
x˙( t ) = F z ( t, x, r, z ) + B p ( t, x, p )u,
y = H ( x ),
u min ≤ u ≤ u max ,
x ( t0 ) = x0
where t ∈ ≥0 is the time; x ∈ X is the state-space vector; u ∈ U is the vector of bounded control inputs; r ∈ R and y ∈ Y are the measured reference and output vectors; z ∈ Z and p ∈ P are the parameter uncertainties, functions z(·) and p(·) are Lebesgue measurable and known within bounds; Z and P are the known nonempty compact sets; and Fz(·), Bp(·), and H(·) are the smooth mapping fields. Let us formulate and solve the motion control problem by synthesizing robust controllers that guarantee stability and robust tracking. Our goal is to design control laws that robustly stabilize nonlinear systems with uncertain parameters and drive the tracking error e(t) = r(t) − y(t), e ∈ E robustly to the compact set. For MEMS modeled by nonlinear differential equations with parameter variations, the robust tracking of the measured output vector y ∈ Y must be accomplished with respect to the measured uniformly bounded reference input vector r ∈ R. The nominal and uncertain dynamics are mapped by F(·), B(·), and Ξ(·). Hence, the system evolution is described as
x˙( t ) = F ( t, x, r ) + B ( t, x )u + Ξ ( t, x, u, z, p ),
y = H ( x ),
u min ≤ u ≤ u max ,
x ( t0 ) = x0
There exists a norm of Ξ(t , x , u , z , p ), and Ξ ( t, x, u, z, p ) ≤ ρ (t , x ), where ρ(·) is the continuous Lebesgue measurable function. Our goal is to solve the motion control problem, and tracking controllers must be synthesized using the tracking error vector and the state variables. Furthermore, to guarantee robustness and to expand stability margins, to improve dynamic performance, and to meet other requirements, nonqudratic Lyapunov functions V (t , e , x ) will be used in stability analysis and design of robust tracking control laws. ©2002 CRC Press LLC
0066_frame_C14.fm Page 30 Friday, January 18, 2002 4:36 PM
Suppose that a set of admissible control U consists of the Lebesgue measurable function u(·). It was demonstrated that the Hamilton–Jacobi theory can be used to find control laws, and the minimization of nonquadratic performance functionals leads one to the bounded controllers. Letting u = Φ(t, e, x), one obtains a set of admissible controllers. Applying the error and state feedback we define a family of tracking controllers as T 1 ∂ V ( t, e, x ) T ∂ V ( t, e, x ) u = Ω ( x )Φ ( t, e, x ) = – Ω ( x )Φ G E ( t )B E ( t, x ) -- ------------------------- + G X ( t )B ( t, x ) ------------------------- , s ∂e ∂x
d s = ----dt
where Ω(·) is the nonlinear function; GE(·) and GX(·) are the diagonal matrix-functions defined on [t0,∞); BE(·) is the matrix-function; and V(·) is the continuous, differentiable, and real-analytic function. Let us design the Lyapunov function. This problem is a critical one and involves well-known difficulties. The quadratic Lyapunov candidates can be used. However, for uncertain nonlinear systems, nonquadratic functions V(t, e, x) allow one to realize the full potential of the Lyapunov-based theory and lead us to the nonlinear feedback maps which are needed to achieve conflicting design objectives. We introduce the following family of Lyapunov candidates: ς
V ( t, e, x ) =
∑ i=0
i+ β +1 T
i+ β +1
------------------------------2β + 1 2 β +1 2 β +1 ---------------------------- e K Ei ( t )e + 2(i + β + 1)
η
∑ i=0
i+ γ +1 T
i+ γ +1
----------------------------2γ + 1 2 γ +1 2 γ +1 ---------------------------- x K Xi ( t )x 2(i + γ + 1)
where K Ei(·) and K Xi(·) are the symmetric matrices; ζ, β, η, and γ are the nonnegative integers; ζ = 0, 1, 2,…; β = 0, 1, 2,…; η = 0, 1, 2,…; and γ = 0, 1, 2,… The well-known quadratic form of V(t, e, x) is found by letting ζ = β = η = γ = 0, and we have
1 T 1 T V ( t, e, x ) = --e K E0 ( t )e + --x K X0 ( t )x 2 2 By using ζ = 1, β = 0, η = 1, and γ = 0, one obtains a nonquadratic candidate:
1 2T 1 T 1 2T 1 T 2 2 V ( t, e, x ) = --e K E0 ( t )e + --e K E1 ( t )e + --x K X0 ( t )x + --x K X1 ( t )x 2 4 2 4 One obtains the following tracking control law:
T u = – Ω ( x )Φ G E ( t )B E ( t, x )
ς
∑ diag
T
∑
i+ β +1
---------------1 2 β +1 K Ei ( t ) --e ( t ) s
i=0
η
+ G X ( t )B ( t, x )
e(t)
i− β -------------2 β +1
diag x ( t )
i− γ ------------2 γ +1
K Xi ( t )x ( t )
i+ γ +1 --------------2 γ +1
i=0
i− β ------------2 β +1
e1 diag e ( t )
i− β ------------2 β +1
0
0
L
0
0
M
O
M
M
0
0
L e
0 ©2002 CRC Press LLC
L
M
0 =
0 i− β ------------2 β +1 2
e
0
M
i− β ------------2 β +1 b−1
0
0 e
i− β ------------2 β +1 b
0066_frame_C14.fm Page 31 Friday, January 18, 2002 4:36 PM
and
x
diag x ( t )
i− γ ------------2 γ +1
i− γ ------------2 γ +1 1
0 =
0 x
i− γ ------------2 γ +1 2
L
0
0
L
0
0
M
M
M
M
O
0
0
L x
0
0
M
i− γ ------------2 γ +1 n−1
0
0 x
i− γ ------------2 γ +1 n
If matrices KEi and KXi are diagonal, we have
T u = – Ω ( x )Φ G E ( t )B E ( t, x )
ς
∑ i=0
2i+1
------------1 2 β +1 T K Ei ( t ) --e ( t ) + G X ( t )B ( t, x ) s
η
∑K i=0
Xi
( t )x ( t )
2i+1 ------------2 γ +1
A closed-loop uncertain system is robustly stable in X(X0, U, Z, P) and robust tracking is guaranteed in the convex and compact set E(E0, Y, R) if for reference inputs r ∈R and uncertainties in Z and P there κ exists a C (κ ≥ 1) function V(·), as well as K ∞-functions ρX1(·), ρX2(·), ρE1(·), ρE2(·) and K-functions ρX3(·), ρE3(·), such that the following sufficient conditions:
ρ X1 ( x ) + ρ E1 ( e ) ≤ V ( t, e, x ) ≤ ρ X2 ( x ) + ρ E2 ( e ) dV ( t, e, x ) ------------------------- ≤ – ρ X3 ( x ) – ρ E3 ( e ) dt are guaranteed in an invariant domain of stability S, and XE(X0, E0, U, R, Z, P) ⊆ S. The sufficient conditions under which the robust control problem is solvable were given. Computing the derivative of the V(t, e, x), the unknown coefficients of V(t , e, x) can be found. That is, matrices KEi(·) and KXi(·) are obtained. This problem is solved using the nonlinear inequality concept [9].
Example 14.6.1: Control of Two-Phase Permanent-Magnet Stepper Micromotors High-performance MEMS with permanent-magnet stepper micromotors have been designed and manufactured. Controllers are needed to be designed to control permanent-magnet stepper micromotors, and the angular velocity and position are regulated by changing the magnitude of the voltages applied or currents fed to the stator windings (see Example 14.5.3). The rotor displacement is measured or observed in order to properly apply the voltages to the phase windings. To solve the motion control problem, the controller must be designed. It is illustrated that novel control algorithms are needed to be deployed to maximize the torque developed. In fact, conventional controllers –1 T ∂ V u = – G B ------∂x
and
–1 T ∂ V u = – Φ G B -------- ∂x
cannot be used. Using the coenergy concept, one finds the expression for the electromagnetic torque as given by
T e = – RT ψ m [ i as sin ( RT θ rm ) – i bs cos ( RT θ rm ) ] and thus, one must fed the phase currents as sinusoidal and cosinusoidal functions of the rotor displacement. ©2002 CRC Press LLC
0066_frame_C14.fm Page 32 Wednesday, January 9, 2002 1:51 PM
The mathematical model of permanent-magnet stepper micromotor was found in Example 14.5.3 as
r di as RT ψ 1 ------- = – -----s- i as + --------------m ω rm sin ( RT θ rm ) + -----u as dt L ss L ss L ss r di RT ψ 1 ------bs- = – -----s- i bs – --------------m ω rm cos ( RT θ rm ) + -----u bs dt L ss L ss L ss d ω rm RT ψ B 1 ----------- = – --------------m [ i as sin ( RT θ rm ) – i bs cos ( RT θ rm ) ] – -----m- ω rm – --T L dt J J J d θ rm ---------- = ω rm dt The rotor resistance is a function of temperature because the resistivity is ρT = ρ0[(1 + αρ(T° − 20°)]. Hence, rs(·) ∈[rs min rs max]. The susceptibility of the permanent magnets (thin films) decreases with increasing temperature. Other servo-system parameters also vary; in particular, Lss(·) ∈[Lss min Lss max] and Bm(·) ∈[Bm min Bm max]. The following equation of motion in vector form results:
x˙( t ) = F z ( t, x, r, d, z ) + B p ( p )u,
u min ≤ u ≤ u max
i as x ( t0 ) = x0 ,
i bs
x =
ω rm θ rm
,
u =
u as u bs
,
y = θ rm
Here, x ∈X and u ∈U are the state and control vectors, r ∈R and y ∈Y are the measured reference and output, d ∈D is the disturbance, d = TL, and z ∈Z and p ∈P are the unknown and bounded parameter uncertainties. Our goal is to design the bounded control u(·) within the constrained set U = { u ∈ : u min ≤ u ≤ u max, u min < 0, u max > 0} ⊂ 2
2˙
An admissible control law, which guarantees a balanced two-phase voltage applied to the ab windings and ensures the maximal electromagnetic torque production, is synthesized as
u =
u as u bs
=
– sin ( RT θ rm )
0
0
cos ( RT θ rm )
T ∂ V ( t, x, e ) T 1 ∂ V ( t, x, e ) T ∂ V ( t, x, e ) × Φ G x ( t )B ------------------------- + G e ( t )B e ------------------------- + G i ( t )B e -- ------------------------- ∂x ∂e s ∂e
where e ∈E is the measured tracking error, e(t) = r(t) − y(t); Φ(·) is the bounded function (erf, sat, tanh), and Φ ∈ U, |Φ(·)| ≤ Vmax, Vmax is the rated voltage; Gx(·), Ge(·), and Gi(·) are bounded and symmetric, κ Gx > 0, Ge > 0, Gi > 0; and V(·) is the C (κ ≥ 1) continuously differentiable, real-analytic function. For X 0 ⊆ X , u ∈U, r ∈R, d ∈D, z ∈Z, and p ∈P, we obtain the state evolution set X. The state-output set is
XY ( X 0 ,U, R, D, Z, P ) = { ( x, y ) ∈ X × Y : x 0 ∈ X 0 , u ∈ U, r ∈ R, d ∈ D, z ∈ Z, p ∈ P, t ∈ [t 0 , ∞) } ©2002 CRC Press LLC
0066_frame_C14.fm Page 33 Wednesday, January 9, 2002 1:51 PM
and a reference-output map can be found. Our goal is to find the bounded controller such that the tracking error e(⋅):[t0,∞)→E with E 0 ⊆ E evolves in the specified closed set
S e ( δ ) = { e ∈ : e 0 ∈ E 0 , x ∈ X ( X 0 ,U, R, D, Z, P ), t ∈ [t 0 , ∞) 1
e ( t ) ≤ ρ e ( t, e 0 ) + ρ r ( r ) + ρ d ( d ) + ρ y ( y ) + δ , δ ≥ 0, ∀e ∈ E ( E 0 , R, D, Y ), ∀ t ∈ [t 0 , ∞) } Here, ρe(⋅) is the KL-function; ρr(⋅), ρd(⋅) and ρy(⋅) are the K-functions. A positive-invariant domain of stability is found for the closed-loop system with x0 ∈X0, e0 ∈Ε 0, u ∈U, r ∈R, d ∈D, z ∈Z and p ∈P. In particular,
S s = { x ∈ , e ∈ : x ( t ) ≤ ρ x ( t, x 0 ) + ρ r ( r ) + ρ d ( d ) + δ , 4
1
∀x ∈ X ( X 0 ,U, R, D, Z, P ), ∀t ∈ [t 0 , ∞), e ( t ) ≤ ρ e ( t, e 0 ) + ρ r ( r ) + ρ d ( d ) + ρ y ( y ) + δ , ∀e ∈ E ( E 0 , R, D, Y ), ∀t ∈ [t 0 , ∞) } , where ρx(⋅) is the KL-function. To study the robustness, tracking, and disturbance rejection, we consider a state-error set
XE ( X 0 , E 0 ,U, R, D, Z, P ) = { ( x, e ) ∈ X × E : x 0 ∈ X 0 , e 0 ∈ E 0 , u ∈ U, r ∈ R, d ∈ D, z ∈ Z, p ∈ P, t ∈ [t 0 , ∞) } The robust tracking, stability, and disturbance rejection are guaranteed if XE ⊆ S s . The admissible set Ss is found by using the Lyapunov stability theory [9], and
S s = x ∈ 4 ,e ∈ 1 : x 0 ∈ X 0 , e 0 ∈ E 0 , u ∈ U, r ∈ R, d ∈ D, z ∈ Z, p ∈ P dV ( t, x, e ) r 1 x + r 2 e ≤ V ( t, x, e ) ≤ r 3 x + r 4 e , ------------------------- ≤ – r 5 x – r 6 e , dt ∀x ∈ X ( X 0 ,U, R, P, Z, P ), ∀e ∈ E ( E 0 , R, D, Y ), ∀t ∈ [t 0 , ∞) where ρ1(⋅), ρ2(⋅), ρ3(⋅) and ρ4(⋅) are the K∞-functions; and ρ5(⋅) and ρ6(⋅) are the K-functions. κ If in XE there exists a C Lyapunov function V(t, x, e) such that for all x 0 ∈ X 0 , e 0 ∈ E 0 , u ∈ U, r ∈ R, d ∈ D, z ∈ Z, and p ∈ P on [t 0 , ∞) sufficient condition for stability (s1)
r 1 x + r 2 e ≤ V ( t, x, e ) ≤ r 3 x + r 4 e and inequality
dV ( t, x, e ) ------------------------- ≤ – r 5 x – r 6 e dt which is the sufficient condition for stability s2, hold, then 1. solution x(⋅):[t0,∞)→X for closed-loop system is robustly bounded and stable, 2. convergence of the error vector e(⋅):[t0, ∞)→E to Se is ensured in XE, 3. XE is convex and compact, and XE ⊆ S s . That is, if criteria (s1) and (s2) are guaranteed, we have XE ⊆ S s . ©2002 CRC Press LLC
0066_frame_C14.fm Page 34 Wednesday, January 9, 2002 1:51 PM
Using the nonquadratic Lyapunov candidate h
V ( t, x, e ) =
∑ j=0
j+ γ +1 T
σ
+
j+ γ +1
----------------------------2γ + 1 2 γ +1 2 γ +1 ---------------------------- x K xj ( t )x + 2(j + γ + 1)
2µ + 1
-e ∑ 2--------------------------(j + µ + 1)
j+ µ +1 T ---------------2 µ +1
K ( t )e ij
ς
∑ j=0
j+ β +1 T
j+ β +1
------------------------------2β + 1 2 β +1 2 β +1 ---------------------------- e K ej ( t )e 2(j + β + 1)
j+ µ +1 ---------------2 µ +1
i=0
one obtains the bounded controller as
u=
u as u bs
=
– sin ( RT θ rm ) 0 ς
+ G e ( t )B
T e
∑K
η
j− γ
j+ γ +1
-------------------------- 2 γ +1 T 2 γ +1 Φ G x ( t )B diag x K xj ( t )x cos ( RT θ rm ) j=0
∑
0
ej
( t )e
2j+1 ------------2 β +1
σ
+ G i ( t )B
T e
∑
j=0
j=0
2j+1 -------------
1 2 µ +1 K ij ( t ) --e s
Here, Kxj(⋅) are the unknown matrix-functions, and Kej(⋅) and Kij(⋅) are the unknown coefficients; η = 0, 1, 2,…; γ = 0, 1, 2,…; ς = 0, 1, 2,…; β = 0, 1, 2,…; σ = 0, 1, 2,…; and µ = 0, 1, 2,…. Under the assumption that X0, E0, R, D, Z, and P are admissible, the robust tracking problem is solvable in XE. That is, the bounded real-analytic control u(⋅) guarantees the robust stability and steers the tracking error to Se. Furthermore, stability is guaranteed, disturbance rejection is ensured, and specified inputoutput tracking performance can be achieved. Applying the controller designed, one maximizes the electromagnetic torque developed by permanentmagnet stepper micromotors. This can be easily shown by using the expression for the electromagnetic torque, the balanced two-phase sinusoidal voltage set (applied phase voltages uas and ubs), as well as the 2 2 trigonometric identity sin a + cos a = 1. The tracking controller can be designed using the tracking error. In particular, we have
u=
u as u bs
=
– sin ( RT θ rm ) 0
ς
σ
2j+1
------------------------ 1 2 µ +1 T T 2 β +1 Φ G e ( t )B e K ei ( t )e + G i ( t )B e K ij ( t ) --e s cos ( RT θ rm ) i=0 j=0
0
∑
2j+1
∑
The controller design, implementation, and experimental verification are reported in [9].
14.7 Conclusions This chapter reports the current status, documents innovative results, and researches novel paradigms in synthesis, modeling, analysis, simulation, control, and optimization of high-performance MEMS. These results are obtained applying reported nonlinear modeling, analysis, synthesis, control, and optimization methods which allow one to attain performance assessment and predict outcomes. Novel MEMS were devised. The application of the plate, spherical, torroidal, conical, cylindrical, and asymmetrical motor geometry, as well as endless, open-ended, and integrated electromagnetic systems, allows one to classify MEMS. This idea is extremely useful in the studying of existing MEMS as well as in the synthesis of innovative high-performance MEMS. For example, asymmetrical (unconventional) geometry and integrated electromagnetic system can be applied. Optimization can be performed, and the classifier paradigm serves as a starting point from which advanced configurations can be synthesized and straightforwardly interpreted. Microscale motion devices geometry and electromagnetic systems, which play a central role, are related. Structural synthesis and optimization of MEMS are formalized and interpreted using innovative ideas. The MEMS classifier paradigm, in addition to being qualitative, leads one to quantitative analysis. In fact, using the cornerstone laws of electromagnetics and mechanics (e.g., Maxwell’s,
©2002 CRC Press LLC
0066_frame_C14.fm Page 35 Wednesday, January 9, 2002 1:51 PM
Kirchhoff and Newton equations), the differential equations to model electromagnetic and mechanical phenomena and effects can be derived and applied to attain the performance analysis with outcome prediction. Mathematical models for MEMS are found. Making use of these mathematical models, analysis and optimization were performed, and nonlinear control algorithms were designed. The electromagnetics features and phenomena were integrated into the analysis, modeling, synthesis, and optimization. It is shown that to meet the specified level of performance, novel high-performance MEMS should be synthesized, high-fidelity modeling must be performed, advanced controllers have to be synthesized, and highly detailed dynamic nonlinear simulations must be carried out. The results reported have direct application to the analysis and design of high-performance MEMS. Different MEMS can be devised, synthesized, defined, and designed, and a number of long-standing issues related to geometrical variability and electromagnetics are studied. These benchmarking results allow one to reformulate and refine extremely important problems in MEMS theory, and solve a number of very complex issues in design and optimization with the ultimate goal to synthesize innovative high-performance, high torque, and power densities MEMS.
References 1. Lyshevski, S. E., Nano- and Micro-Electromechanical Systems: Fundamentals of Nano- and MicroEngineering, CRC Press, Boca Raton, FL, 2000. 2. Madou, M., Fundamentals of Microfabrication, CRC Press, Boca Raton, FL, 1997. 3. Campbell, S. A., The Science and Engineering of Microelectronic Fabrication, Oxford University Press, New York, 2001. 4. Lyshevski, S. E., Electromechanical Systems, Electric Machines, and Applied Mechatronics, CRC Press, Boca Raton, FL, 1999. 5. Lyshevski, S. E. and Lyshevski, M. A., “Analysis, dynamics, and control of micro-electromechanical systems,” Proc. American Control Conference, Chicago, IL, pp. 3091–3095, 2000. 6. Mehregany, M. and Tai, Y. C., “Surface micromachined mechanisms and micro-motors,” J. Micromechanics and Microengineering, vol. 1, pp. 73–85, 1992. 7. Becker, E. W., Ehrfeld, W., Hagmann, P., Maner, A., and Mynchmeyer, D., “Fabrication of microstructures with high aspect ratios and great structural heights by synchrotron radiation lithography, galvanoformung, and plastic molding (LIGA process),” Microelectronic Engineering, vol. 4, pp. 35–56, 1986. 8. Guckel, H., Christenson, T. R., Skrobis, K. J., Klein, J., and Karnowsky, M., “Design and testing of planar magnetic micromotors fabricated by deep X-ray lithography and electroplating,” Technical Digest of International Conference on Solid-State Sensors and Actuators, Transducers 93, Yokohama, Japan, pp. 60–64, 1993. 9. Lyshevski, S. E., Control Systems Theory with Engineering Applications, Birkhäuser, Boston, MA, 2001.
©2002 CRC Press LLC
15 The Physical Basis of Analogies in Physical System Models 15.1 15.2 15.3
Introduction History The Force-Current Analogy: Across and Through Variables Drawbacks of the Across-Through Classification • Measurement as a Basis for Analogies • Beyond One-Dimensional Mechanical Systems • Physical Intuition
15.4
Neville Hogan Massachusetts Institute of Technology
Peter C. Breedveld University of Twente
Maxwell’s Force-Voltage Analogy: Effort and Flow Variables Systems of Particles • Physical Intuition • Dependence on Reference Frames
15.5
A Thermodynamic Basis for Analogies Extensive and Intensive Variables • Equilibrium and Steady State • Analogies, Not Identities • Nodicity
15.6 15.7
Graphical Representations Concluding Remarks
15.1 Introduction One of the fascinating aspects of mechatronic systems is that their function depends on interactions between electrical and mechanical behavior and often magnetic, fluid, thermal, chemical, or other effects as well. At the same time, this can present a challenge as these phenomena are normally associated with different disciplines of engineering and physics. One useful approach to this multidisciplinary or “multiphysics” problem is to establish analogies between behavior in different domains—for example, resonance due to interaction between inertia and elasticity in a mechanical system is analogous to resonance due to interaction between capacitance and inductance in an electrical circuit. Analogies can provide valuable insight about how a design works, identify equivalent ways a particular function might be achieved, and facilitate detailed quantitative analysis. They are especially useful in studying dynamic behavior, which often arises from interactions between domains; for example, even in the absence of elastic effects, a mass moving in a magnetic field may exhibit resonant oscillation. However, there are many ways that analogies may be established and, unfortunately, the most appropriate analogy between electrical circuits, mechanical and fluid systems remains unresolved: is force like current, or is force more like voltage? In this contribution we examine the physical basis of the analogies in common use and how they may be extended beyond mechanical and electrical systems.
©2002 CRC Press LLC
15.2 History It is curious that one of the earliest applications of analogies between electrical and mechanical systems was to enable the demonstration and study of transients in electrical networks that were otherwise too fast to be observed by the instrumentation of the day by identifying mechanical systems with equivalent dynamic behavior; that was the topic of a series of articles on “Models and analogies for demonstrating electrical principles” (The Engineer, 1926). Improved methods capable of observing fast electrical transients directly (especially the cathode ray oscilloscope, still in use today) rendered this approach obsolete but enabled quantitative study of nonelectrical systems via analogous electrical circuits (Nickle, 1925). Although that method had considerably more practical importance at the time than it has today (we now have the luxury of vastly more powerful tools for numerical computation of electromechanical system responses), in the late ’20s and early ’30s a series of papers (Darrieus, 1929; Hähnle, 1932; Firestone, 1933) formulated a rational method to use electrical networks as a framework for establishing analogies between physical systems.
15.3 The Force-Current Analogy: Across and Through Variables Firestone identified two types of variable in each physical domain—“across” and “through” variables— which could be distinguished based on how they were measured. An ‘‘across’’ variable may be measured as a difference between values at two points in space (conceptually, across two points); a ‘‘through’’ variable may be measured by a sensor in the path of power transmission between two points in space (conceptually, it is transmitted through the sensor). By this classification, electrical voltage is analogous to mechanical velocity and electrical current is analogous to mechanical force. Of course, this classification of variables implies a classification of network elements: a mass is analogous to a capacitor, a spring is analogous to an inductor and so forth. The “force-is-like-current” or “mass-capacitor” analogy has a sound mathematical foundation. Kirchhoff’s node law or current law, introduced in 1847 (the sum of currents into a circuit node is identically zero) can be seen as formally analogous to D’Alembert’s principle, introduced in 1742 (the sum of forces on a body is identically zero, provided the sum includes the so-called “inertia force,” the negative of the body mass times its acceleration). It is the analogy used in linear-graph representations of lumpedparameter systems, proposed by Trent in 1955. Linear graphs bring powerful results from mathematical graph theory to bear on the analysis of lumped-parameter systems. For example, there is a systematic procedure based on partitioning a graph into its tree and links for selecting sets of independent variables to describe a system. Graph-theoretic approaches are closely related to matrix methods that in turn facilitate computer-aided methods. Linear graphs provide a unified representation of lumped-parameter dynamic behavior in several domains that has been expounded in a number of successful textbooks (e.g., Shearer et al., 1967; Rowell & Wormley, 1997). The mass-capacitor analogy also appears to afford some practical convenience. It is generally easier to identify points of common velocity in a mechanical system than to identify which elements experience the same force; and it is correspondingly easier to identify the nodes in an electrical circuit than all of its loops. Hence with this analogy it is straightforward to identify an electrical network equivalent to a mechanical system, at least in the one-dimensional case.
Drawbacks of the Across-Through Classification Despite the obvious appeal of establishing analogies based on practical measurement procedures, the force-current analogy has some drawbacks that will be reviewed below: (i) on closer examination, measurement-based classification is ambiguous; (ii) its extension to more than one-dimensional mechanical systems is problematical; and (iii) perhaps most important, it leads to analogies (especially between mechanical and fluid systems) that defy common physical insight. ©2002 CRC Press LLC
Measurement as a Basis for Analogies Even a cursory review of state-of-the-art measurement technologies shows that the across-through classification may be an anachronism or, at best, an over-simplification. Velocity (an “across” variable) may be measured by an integrating accelerometer that is attached only to the point where velocity is measured—that’s how the human inner ear measures head velocity. While the velocity is measured with respect to an inertial reference frame (as it should be), there is no tangible connection to that frame. As a further example, current in a conductor (a “through” variable) may be measured without inserting an ammeter in the current path; sensors that measure current by responding to the magnetic field next to the conductor are commercially available (and preferred in some applications). Moreover, in some cases similar methods can be applied to measure both “across” and “through” variables. For example, fluid flow rate is classified as a through variable, presumably by reference to its measurement by, for example, a positive-displacement meter in the flow conduit; that’s the kind of fluid measurement commonly used in a household water meter. However, optical methods that are used to measure the velocity of a rigid body (classified as an across variable) are often adapted to measure the volumetric flow rate of a fluid (laser doppler velocimetry is a notable example). Apparently the same fundamental measurement technology can be associated with an across variable in one domain and a through variable in another. Thus, on closer inspection, the definition of across and through variables based on measurement procedures is, at best, ambiguous.
Beyond One-Dimensional Mechanical Systems The apparent convenience of equating velocities in a mechanical system with voltages at circuit nodes diminishes rapidly as we go beyond translation in one dimension or rotation about a fixed axis. A translating body may have two or three independent velocities (in planar and spatial motion, respectively). Each independent velocity would appear to require a separate independent circuit node, but the kinetic energy associated with translation can be redistributed at will among these two or three degrees of freedom (e.g., during motion in a circle at constant speed the total kinetic energy remains constant while that associated with each degree of freedom varies). This requires some form of connection between the corresponding circuit nodes in an equivalent electrical network, but what that connection should be is not obvious. The problem is further exacerbated when we consider rotation. Even the simple case of planar motion (i.e., a body that may rotate while translating) requires three independent velocities, hence three independent nodes in an equivalent electrical network. Reasoning as above we see that these three nodes must be connected but in a different manner from the connection between three nodes equivalent to spatial translation. Again, this connection is hardly obvious, yet translating while rotating is ubiquitous in mechanical systems—that’s what a wheel usually does. Full spatial rotation is still more daunting. In this case interaction between the independent degrees of freedom is especially important as it gives rise to gyroscopic effects, including oscillatory precession and nutation. These phenomena are important practical considerations in modern mechatronics, not arcane subtleties of classical mechanics; for example, they are the fundamental physics underlying several designs for a microelectromechanical (MEMS) vibratory rate gyroscope (Yazdi et al., 1998).
Physical Intuition In our view the most important drawback of the across-through classification is that it identifies force as analogous to fluid flow rate as well as electrical current (with velocity analogous to fluid pressure as well as voltage). This is highly counter-intuitive and quite confusing. By this analogy, fluid pressure is not analogous to force despite the fact that pressure is commonly defined as force per unit area. Furthermore, stored kinetic energy due to fluid motion is not analogous to stored kinetic energy due to motion of a rigid body. Given the remarkable similarity of the physical processes underlying these two forms of energy storage, it is hard to understand why they should not be analogous. ©2002 CRC Press LLC
Insight is the ultimate goal of modeling. It is a crucial factor in producing innovative and effective designs and depends on developing and maintaining a “physical intuition” about the way devices behave. It is important that analogies between physical effects in different domains can be reconciled with the physical intuition and any method that requires a counter-intuitive analogy is questionable; at a minimum it warrants careful consideration.
15.4 Maxwell’s Force-Voltage Analogy: Effort and Flow Variables An alternative analogy classifies variables in each physical domain that (loosely speaking) describe motion or cause it. Thus fluid flow rate, electrical current, and velocity are considered analogous (sometimes generically described as “flow” variables). Conversely, fluid pressure, electrical voltage, and force are considered analogous (sometimes generically described as “effort” variables). The “force-is-like-voltage” analogy is the oldest drawn between mechanical and electrical systems. It was first proposed by Maxwell (1873) in his treatise on electricity and magnetism, where he observed the similarity between the Lagrangian equations of classical mechanics and electromechanics. That was why Firestone (1933) presented his perspective that force is like current as “A new analogy between mechanical and electrical systems” (emphasis added). Probably because of its age, the force-voltage analogy is deeply embedded in our language. In fact, voltage is still referred to as “electromotive force” in some contexts. Words like “resist” or “impede” also have this connotation: a large resistance or impedance implies a large force for a given motion or a large voltage for a given current. In fact, Maxwell’s classification of velocity as analogous to electrical current (with force analogous to voltage) has a deeper justification than the similarity of one mathematical form of the equations of mechanics and electromechanics; it can be traced to a similarity of the underlying physical processes.
Systems of Particles Our models of the physical world are commonly introduced by describing systems of particles distributed in space. The particles may have properties such as mass, charge, etc., though in a given context we will deliberately choose to neglect most of those properties so that we may concentrate on a single physical phenomenon of interest. Thus, to describe electrical capacitance, we consider only charge, while to describe translational inertia, we consider only mass and so forth. Given that this common conceptual model is used in different domains, it may be used to draw analogies between the variables of different physical domains. From this perspective, quantities associated with the motion of particles may be considered analogous to one another; thus mechanical velocity, electrical current, and fluid flow rate are analogous. Accordingly, mechanical displacement, displaced fluid volume, and displaced charge are analogous; and thus force, fluid pressure, and voltage are analogous. This classification of variables obviously implies a classification of network elements: a spring relates mechanical displacement and force; a capacitor relates displaced charge and voltage. Thus a spring is analogous to a capacitor, a mass to an inductor, and for this reason, this analogy is sometimes termed the “mass-inductor” analogy.
Physical Intuition The “system-of-particles” models naturally lead to the “intuitive” analogy between pressure, force, and voltage. But, is such a vague and ill-defined concept as “physical intuition” an appropriate consideration in drawing analogies between physical systems? After all, physical intuition might largely be a matter of usage and familiarity, rooted in early educational and cultural background. We think not; instead we speculate that physical intuition may be related to conformity with a mental model of the physical world. That mental model is important for thinking about physical systems and, if shared, for communicating about them. Because the “system-of-particles” model is widely assumed ©2002 CRC Press LLC
(sometimes explicitly, sometimes implicitly) in the textbooks and handbooks of basic science and engineering we speculate that it may account for the physical intuition shared by most engineers. If so, then conforming with that common “system-of-particles” mental model is important to facilitate designing, thinking, and communicating about mechatronic systems. The force-voltage analogy does so; the forcecurrent analogy does not.
Dependence on Reference Frames The “system-of-particles” model also leads to another important physical consideration in the choice of analogies between variables: the way they depend on reference frames. The mechanical displacement that determines the elastic potential energy stored in a spring and the displaced charge that determines the electrostatic potential energy stored in a capacitor may be defined with respect to any reference frame (whether time-varying or stationary). In contrast, the motion required for kinetic energy storage in a rigid body or a fluid must be defined with respect to an inertial frame. Though it may often be overlooked, the motion of charges required for magnetic field storage must also be defined with respect to an inertial frame (Feynman et al., 1963). To be more precise, the constitutive equations of energy storage based on motion (e.g., in a mass or an inductor) require an inertial reference frame (or must be modified in a non-inertial reference frame). In contrast, the constitutive equations of energy storage based on displacement (e.g., in a spring or a capacitor) do not. Therefore, the mass-inductor (force-voltage) analogy is more consistent with fundamental physics than the mass-capacitor (force-current) analogy. The modification of the constitutive equations for magnetic energy storage in a non-inertial reference frame is related to the transmission of electromagnetic radiation. However, Kirchhoff ’s laws (more aptly termed “Kirchhoff ’s approximations”), which are the foundations of electric network theory, are equivalent to assuming that electromagnetic radiation is absent or negligible. It might, therefore, be argued that the dependence of magnetic energy storage on an inertial reference frame is negligible for electrical circuits, and hence is irrelevant for any discussion of the physical basis of analogies between electrical circuits and other lumped-parameter dynamic-system models. That is undeniably true and could be used to justify the force-current analogy. Nevertheless, because of the confusion that can ensue, the value of an analogy that is fundamentally inconsistent with the underlying physics of lumped-parameter models is questionable.
15.5 A Thermodynamic Basis for Analogies Often in the design and analysis of mechatronic systems it is necessary to consider a broader suite of phenomena than those of mechanics and electromechanics. For instance, it may be important to consider thermal conduction, convection, or even chemical reactions and more. To draw analogies between the variables of these domains it is helpful to examine the underlying physics. The analogous dynamic behavior observed in different physical domains (resonant oscillation, relaxation to equilibrium, etc.) is not merely a similarity of mathematical forms, it has a common physical basis which lies in the storage, transmission, and irreversible dissipation of energy. Consideration of energy leads us to thermodynamics; we show next that thermodynamics provides a broader basis for drawing analogies and yields some additional insight. All of the displacements considered to be analogous above (i.e., mechanical displacement, displaced fluid volume, and displaced charge) may be associated with an energy storage function that requires equilibrium for its definition, the displacement being the argument of that energy function. Generically, these may be termed potential energy functions. To elaborate, elastic energy storage requires sustained but recoverable deformation of a material (e.g., as in a spring); the force required to sustain that deformation is determined at equilibrium, defined when the time rate of change of relative displacement of the material particles is uniformly zero (i.e., all the particles are at rest relative to each other). Electrostatic energy storage requires sustained separation of mobile charges of opposite sign (e.g., as in ©2002 CRC Press LLC
a capacitor); the required voltage is determined at equilibrium, defined when the time rate of change of charge motion is zero (i.e., all the charges are at rest relative to each other).
Extensive and Intensive Variables In the formalism of thermodynamics, the amount of stored energy and the displacement that determines it are extensive variables. That is, they vary with the spatial extent (i.e., size or volume) of the object storing the energy. The total elastic energy stored in a uniform rod of constant cross-sectional area in an idealized uniform state of stress is proportional to the length (and hence volume) of the rod; so is the total relative displacement of its ends; both are extensive variables. The total electrostatic energy stored in an idealized parallel-plate capacitor (i.e., one with no fringe fields) is proportional to the area of the plates (and hence, for constant gap, the volume they enclose); so is the total separated charge on the plates; both are extensive variables (cf., Breedveld, 1984). Equilibrium of these storage elements is established by an intensive variable that does not change with the size of the object. This variable is the gradient (partial derivative) of the stored energy with respect to the corresponding displacement. Thus, at equilibrium, the force on each cross-section of the rod is the same regardless of the length or volume of the rod; force is an intensive variable. If the total charge separated in the capacitor is proportional to area, the voltage across the plates is independent of area; voltage is an intensive variable. Dynamics is not solely due to the storage of energy but arises from the transmission and deployment of power. The instantaneous power into an equilibrium storage element is the product of the (intensive) gradient variable (force, voltage) with the time rate of change of the (extensive) displacement variable (velocity, current). Using this thermodynamics-based approach, all intensive variables are considered analogous, as are all extensive variables and their time rates of change, and so on. Drawing analogies from a thermodynamic classification into extensive and intensive variables may readily be applied to fluid systems. Consider the potential energy stored in an open container of incompressible fluid: The pressure at any specified depth is independent of the area at that depth and the volume of fluid above it; pressure is an intensive variable analogous to force and voltage, as our common physical intuition suggests it should be. Conversely, the energy stored in the fluid above that depth is determined by the volume of fluid; energy and volume are extensive variables, volume playing the role of displacement analogous to electrical charge and mechanical displacement. Pressure is the partial derivative of stored energy with respect to volume and the instantaneous power into storage is the product of pressure with volumetric flow rate, the time rate of change of volume flowing past the specified depth. An important advantage of drawing analogies from a classification into extensive and intensive variables is that it may readily be generalized to domains to which the ‘‘system-of-particles’’ image may be less applicable. For example, most mechatronic designs require careful consideration of heating and cooling but there is no obvious flow of particles associated with heat flux. Nevertheless, extensive and intensive variables associated with equilibrium thermal energy storage can readily be identified. Drawing on classical thermodynamics, it can be seen that (total) entropy is an extensive variable and plays the role of a displacement. The gradient of energy with respect to energy is temperature, an intensive variable, which should be considered analogous to force, voltage, and pressure. Equality of temperature establishes thermal equilibrium between two bodies that may store heat (energy) and communicate it to one another. A word of caution is appropriate here as a classification into extensive and intensive variables properly applies only to scalar quantities such as pressure, volume, etc. As outlined below, the classification can be generalized in a rigorous way to nonscalar quantities, but care is required (cf., Breedveld, 1984).
Equilibrium and Steady State In some (though not all) domains energy storage may also be based on motion. Kinetic energy storage may be associated with rigid body motion or fluid motion; magnetic energy storage requires motion of charges. The thermodynamics-based classification properly groups these different kinds of energy storage as analogous to one another and generically they may be termed kinetic energy storage elements. ©2002 CRC Press LLC
All of the motion variables considered to be analogous (i.e., velocity, fluid flow rate, current) may be associated with an energy storage function that is defined by steady state (rather than by equilibrium). For a rigid body, steady motion requires zero net force, and hence constant momentum and kinetic energy. For the magnetic field that stores energy in an inductor, steady current requires zero voltage, and hence constant magnetic flux and magnetic energy. It might reasonably be argued that any distinction between equilibrium and steady state is purely a matter of perspective and common usage, rather than a fundamental feature of the physical world. For example, with an alternative choice of reference frames, “sustained motion” could be redefined as “rest” or “equilibrium.” From this perspective, a zero-relative-velocity “equilibrium” between two rigid bodies (or between a rigid body and a reference frame) could be defined by zero force. Following this line of reasoning any distinction between the mass-inductor and mass-capacitor analogies would appear to be purely a matter of personal choice. However, while the apparent equivalence of “equilibrium” and “steady state” may be justifiable in the formal mathematical sense of zero rate of change of a variable, in a mechanical system, displacement (or position) and velocity (or momentum) are fundamentally different. For example, whereas velocity, force, and momentum may be transformed between reference frames as rank-one tensors, position (or displacement) may not be transformed as a tensor of any kind. Thus, a distinction between equilibrium and steady state reflects an important aspect of the structure of physical system models.
Analogies, Not Identities It is important to remember that any classification to establish analogies is an abstraction. At most, dynamic behavior in different domains may be similar; it is not identical. We have pointed out above that if velocity or current is used as the argument of an energy storage function, care must be taken to identify an appropriate inertial reference frame and/or to understand the consequences of using a noninertial frame. However, another important feature of these variables is that they are fundamentally vectors (i.e., they have a definable spatial orientation). One consequence is that the thermodynamic definition of extensive and intensive variables must be generalized before it may be used to classify these variables (cf., Breedveld, 1984). In contrast, a quantity such as temperature or pressure is fundamentally a scalar. Furthermore, both of these quantities are intrinsically “positive” scalars insofar as they have welldefined, unique and physically meaningful zero values (absolute zero temperature, the pressure of a perfect vacuum). Quite aside from any dependence on inertial reference frames, the across-through analogy between velocity (a vector with no unique zero value) and pressure (a scalar with a physically important zero) will cause error and confusion if used without due care. This consideration becomes especially important when similar elements of a model are combined (for example, a number of bodies moving with identical velocity may be treated as a single rigid body) to simplify the expression of dynamic equations or improve their computability. The engineering variables used to describe energy storage can be categorized into two groups: (i) positive-valued scalar variables and (ii) nonscalar variables. Positive-valued scalar variables have a physically meaningful zero or absolute reference; examples include the volume of stored fluid, the number of moles of a chemical species, entropy, 1 etc. Nonscalar variables have a definable spatial orientation. Even in the one-dimensional case they can be positive or negative, the sign denoting direction with respect to some reference frame; examples include displacement, momentum, etc. These variables generally do not have a physically meaningful zero or absolute reference, though some of them must be defined with respect to an inertial frame. Elements of a model that describe energy storage based on scalar variables can be combined in only one way: they must be in mutual equilibrium; their extensive variables are added, while the corresponding intensive variables are equal, independent of direction, and determine the equilibrium condition. For model elements that describe energy storage based on nonscalar variables there are usually two options. 1
The term “vector variables” suggests itself but these variables may include three-dimensional spatial orientation, which may not be described as a vector. ©2002 CRC Press LLC
Electrical capacitors, for instance, may be combined in parallel or in series and the resulting equivalent capacitor may readily be determined. In a parallel connection, equilibrium is determined by voltage (an intensive variable) and the electric charges (extensive variables) are added as before. However, a series connection is the “dual” in the sense that the roles of charge and voltage are exchanged: equality of charges determines equilibrium and the voltages are added. Mechanical springs may also be combined in two ways. However, that is not the case for translational masses and rotational inertias; they may only be combined into a single equivalent rigid body if their velocities are equal and in that case their momenta are added. The existence of two “dual” ways to combine some, but not all, of the energy storage elements based on nonscalar quantities is somewhat confusing. It may have contributed to the lengthy debate (if we date its beginning to Maxwell, lasting for over a century!) on the best analogy between mechanical and electrical systems. Nevertheless, the important point is that series and parallel connections may not be generalized in a straightforward way to all domains.
Nodicity As insight is the foremost goal of modeling, analogies should be chosen to promote insight. Because there may be fundamental differences between all of the physical domains, care should be exercised in drawing analogies to ensure that special properties of one domain should not be applied inappropriately to other domains. This brings us to what may well be the strongest argument against the across-through classification. History suggests that it originated with the use of equivalent electrical network representations of nonelectrical systems. Unfortunately, electrical networks provide an inappropriate basis for developing a general representation of physical system dynamics. This is because electrical networks enjoy a special property, nodicity, which is quite unusual among the physical system domains (except as an approximation). Nodicity refers to the fact that any sub-network (cut-set) of an electrical network behaves as a node in the sense that a Kirchhoff current balance equation may be written for the entire sub-network. As a result of nodicity, electrical network elements can be assembled in arbitrary topologies and yet still describe a physically realizable electrical network. This property of “arbitrary connectability” is not a general property of lumped-parameter physical system models. Most notably, mass elements cannot be connected arbitrarily; they must always be referenced to an inertial frame. For that reason, electrical networks can be quite misleading when used as a basis for a general representation of physical system dynamics. This is not merely a mathematical nicety; some consequences of non-nodic behavior for control system analysis have recently been explored (Won and Hogan, 1998). By extension, because each of the physical domains has its unique characteristics, any attempt to formulate analogies by taking one of the domains (electrical, mechanical, or otherwise) as a starting point is likely to have limitations. A more productive approach is to begin with those characteristics of physical variables common to all domains and that is the reason to turn to thermodynamics. In other words, the best way to identify analogies between domains may be to “step outside” all of them. By design, general characteristics of all domains such as the extensive nature of stored energy, the intensive nature of the variables that define equilibrium, and so forth, are not subject to the limitations of any one (such as nodicity). That is the main advantage of drawing analogies based on thermodynamic concepts such as the distinction between extensive and intensive variables.
15.6 Graphical Representations Analogies are often associated with abstract graphical representations of multi-domain physical system models. The force-current analogy is usually associated with the linear graph representation of networks introduced by Trent (1955); the force-voltage analogy is usually associated with the bond graph representation introduced by Paynter (1960). Bond graphs classify variables into efforts (commonly force, voltage, pressure, and so forth) and flows (commonly velocity, current, fluid flow rate, and so forth). Bond graphs extend all the practical benefits of the force-current (across-through) analogy to the force-voltage (effortflow) analogy: they provide a unified representation of lumped-parameter dynamic behavior in several ©2002 CRC Press LLC
domains that has been expounded in a number of successful textbooks (e.g., Karnopp et al., 1975, 1999), there are systematic methods for selecting sets of independent variables to describe a system, ways to take advantage of the ease of identifying velocities and voltages, and matrix methods to facilitate computer analysis. In fact, several computer-aided modeling support packages using the bond-graph language are now available. Furthermore, bond graphs have been applied successfully to describe the dynamics of spatial mechanisms (including gyroscopic effects) while, to the authors’ knowledge, linear graphs have not. Although the force-voltage analogy is most commonly used with bond graphs, the force-current analogy can be used just as readily; the underlying mathematical formalism is indifferent to the choice of which variables are chosen as analogous. In fact, pursuing this line of thought, the choice is unnecessary and may be avoided; doing so affords a way to clarify the potential confusion over the role of intensive variables and the dual types of connection available for some elements in some domains. In the Generalized Bond Graph (GBG) approach (Breedveld, 1984) all energy storage becomes analogous and only one type of storage element, a (generalized) capacitor, is identified. Its displacement is an extensive variable; the gradient of its energy storage function with respect to that displacement is an intensive variable. In some (but not all) domains a particular kind of coupling known as a gyrator is found that gives rise to the appearance of a dual type of energy storage, a (generalized) inertia as well as the possibility of dual ways to connect elements. The GBG representation emphasizes the point that the presence of dual types of energy storage and dual types of connection is a special property (albeit an important one) of a limited number of domains. In principle, either a “mass-capacitor” analogy or a “mass-inductor” analogy can be derived from a GBG representation by choosing to associate the gyrating coupling with either the “equilibrium” or “steady-state” energy storage elements. The important point to be taken here is that the basis of analogies between domains does not depend on the use of a particular abstract graphical representation. The practical value of establishing analogies between domains and the merits of a domain-independent approach based on intensive vs. extensive variables remains regardless of which graph-theoretic tools (if any) are used for analysis.
15.7 Concluding Remarks In the foregoing we articulated some important considerations in the choice of analogies between variables in different physical domains. From a strictly mathematical viewpoint there is little to choose; both analogies may be used as a basis for rigorous, self-consistent descriptions of physical systems. The substantive and important factors emerge from a physical viewpoint—considering the structured way physical behavior is described in the different domains. Summarizing: • The “system-of-particles” model that is widely assumed in basic science and engineering naturally leads to the intuitive analogy between force and voltage, velocity and current, a mass and an inductor, and so on. • The measurement procedures used to motivate the distinction between across and through variables at best yield an ambiguous classification. • Nodicity (the property of “arbitrary connectability”) is not a general property of lumpedparameter physical system models. Thus, electrical networks, which are nodic, can be quite misleading when used as a basis for a general representation of physical system dynamics. • The intuitive analogy between velocity and current is consistent with a thermodynamic classification into extensive and intensive variables. As a result, the analogy can be generalized to dynamic behavior in domains to which the “system-of-particles” image may be less applicable. • The force-voltage or mass-inductor analogy reflects an important distinction between equilibrium energy-storage phenomena and steady-state energy-storage phenomena: the constitutive equations of steady-state energy storage phenomena require an inertial reference frame (or must be modified in a non-inertial reference frame) while the constitutive equations of equilibrium energy storage phenomena do not. ©2002 CRC Press LLC
Our reasoning is based on an assumption that models of physical system dynamics should properly reflect the way descriptions of physical phenomena depend on reference frames and should be compatible with thermodynamics. The across-through classification of variables does not meet these requirements. By contrast, the classification of variables based on the system-of-particles point of view that leads to an analogy between force, pressure, and voltage on the one hand and velocity, fluid flow, and current on the other not only satisfies these criteria, but is the least artificial from a common-sense point of view. We believe this facilitates communication and promotes insight, which are the ultimate benefits of using analogies.
Acknowledgments Neville Hogan was supported in part by grant number AR40029 from the National Institutes of Health.
References (1926). Models and analogies for demonstrating electrical principles, parts I-XIX. The Engineer, 142. Breedveld, P.C. (1984). Physical Systems Theory in Terms of Bond Graphs, University of Twente, Enschede, Netherlands, ISBN 90-9000599-4 (distr. by author). Darrieus, M. (1929). Les modeles mecaniques en electrotechnique. Leur application aux problemes de stabilite. Bull. Soc. Franc. Electric., 36:729–809. Feynman, R.P., Leighton, R.B., and Sands, M. (1963). The Feynman Lectures on Physics, Volume II: Mainly Electromagnetism and Matter, Addison-Wesley Publishing Company. Firestone, F.A. (1933). A new analogy between mechanical and electrical system elements. Journal of the Acoustic Society of America, 3:249–267. Hähnle, W. (1932). Die darstellung elektromechanischer gebilde durch rein elektrsiche schaltbilder. Wissenschaftliche Veroffentl. Siemens Konzern, 11:1–23. Karnopp, D.C. and Rosenberg, R.C. (1975). System Dynamics: A Unified Approach, John Wiley. Karnopp, D.C., Margolis, D.L., and Rosenberg, R.C. (1999). System Dynamics: Modeling and Simulation of Mechatronic Systems, 3rd edition, John Wiley. Maxwell, J.C. (1873). Treatise on Electricity and Magnetism. Nickle, C.A. (1925). Oscillographic solutions of electro-mechanical systems. Trans. A.I.E.E., 44:844–856. Rowell, D. and Wormley, D.N. (1997). System Dynamics: An Introduction, Prentice-Hall, NJ. Shearer, J.L., Murphy, A.T., and Richardson, H.H. (1967). Introduction to System Dynamics, AddisonWesley Publishing Company. Trent, H.M. (1955). Isomorphisms between oriented linear graphs and lumped physical systems. Journal of the Acoustic Society of America, 27:500–527. Won, J. and Hogan, N. (1998). Coupled stability of non-nodic physical systems. IFAC Symposium on Nonlinear Control Systems Design. Yazdi, N., Ayazi, F., and Najafi, K. (1998). Micromachined inertial sensors. Proc. IEEE, 86(8), 1640–1659.
©2002 CRC Press LLC
III Sensors and Actuators 16 Introduction to Sensors and Actuators M. Anjanappa, K. Datta, and T. Song Sensors • Actuators
17 Fundamentals of Time and Frequency Michael A. Lombardi Introduction • Time and Frequency Measurement • Time and Frequency Standards • Time and Frequency Transfer • Closing
18 Sensor and Actuator Characteristics Joey Parker Range • Resolution • Sensitivity • Error • Repeatability • Linearity and Accuracy • Impedance • Nonlinearities • Static and Coulomb Friction • Eccentricity • Backlash • Saturation • Deadband • System Response • First-Order System Response • Underdamped Second-Order System Response • Frequency Response
19 Sensors Kevin M. Lynch, Michael A. Peshkin, Halit Eren, M. A. Elbestawi, Ivan J. Garshelis, Richard Thorn, Pamela M. Norris, Bouvard Hosticka, Jorge Fernando Figueroa, H. R. (Bart) Everett, Stanley S. Ipson, and Chang Liu Linear and Rotational Sensors • Acceleration Sensors • Force Measurement • Torque and Power Measurement • Flow Measurement • Temperature Measurements • Distance Measuring and Proximity Sensors • Light Detection, Image, and Vision Systems • Integrated Microsensors
20 Actuators George T.-C. Chiu, C. J. Fraser, Ramutis Bansevicius, Rymantas Tadas Tolocka, Massimo Sorli, Stefano Pastorelli, and Sergey Edward Lyshevski Electromechanical Actuators • Electrical Machines • Piezoelectric Actuators • Hydraulic and Pneumatic Actuation Systems • MEMS: Microtransducers Analysis, Design, and Fabrication
©2002 CRC Press LLC
16 Introduction to Sensors and Actuators M. Anjanappa University of Maryland Baltimore County
K. Datta University of Maryland Baltimore County
16.1
Classification • Principle of Operation • Selection Criteria • Signal Conditioning • Calibration
T. Song University of Maryland Baltimore County
Sensors
16.2
Actuators Classification • Principle of Operation • Selection Criteria
Sensors and actuators are two critical components of every closed loop control system. Such a system is also called a mechatronics system. A typical mechatronics system as shown in Fig. 16.1 consists of a sensing unit, a controller, and an actuating unit. A sensing unit can be as simple as a single sensor or can consist of additional components such as filters, amplifiers, modulators, and other signal conditioners. The controller accepts the information from the sensing unit, makes decisions based on the control algorithm, and outputs commands to the actuating unit. The actuating unit consists of an actuator and optionally a power supply and a coupling mechanism.
16.1 Sensors Sensor is a device that when exposed to a physical phenomenon (temperature, displacement, force, etc.) produces a proportional output signal (electrical, mechanical, magnetic, etc.). The term transducer is often used synonymously with sensors. However, ideally, a sensor is a device that responds to a change in the physical phenomenon. On the other hand, a transducer is a device that converts one form of energy into another form of energy. Sensors are transducers when they sense one form of energy input and output in a different form of energy. For example, a thermocouple responds to a temperature change (thermal energy) and outputs a proportional change in electromotive force (electrical energy). Therefore, a thermocouple can be called a sensor and or transducer.
Classification Table 16.1 lists various types of sensors that are classified by their measurement objectives. Although this list is by no means exhaustive, it covers all the basic types including the new generation sensors such as smart material sensors, microsensors, and nanosensors.
©2002 CRC Press LLC
TABLE 16.1
Type of Sensors for Various Measurement Objectives
Sensor
Features Linear/Rotational sensors
Linear/Rotational variable differential transducer (LVDT/RVDT) Optical encoder Electrical tachometer Hall effect sensor Capacitive transducer
Strain gauge elements Interferometer Magnetic pickup Gyroscope Inductosyn
High resolution with wide range capability Very stable in static and quasi-static applications Simple, reliable, and low-cost solution Good for both absolute and incremental measurements Resolution depends on type such as generator or magnetic pickups High accuracy over a small to medium range Very high resolution with high sensitivity Low power requirements Good for high frequency dynamic measurements Very high accuracy in small ranges Provides high resolution at low noise levels Laser systems provide extremely high resolution in large ranges Very reliable and expensive Output is sinusoidal Very high resolution over small ranges Acceleration sensors
Seismic accelerometer Piezoelectric accelerometer
Good for measuring frequencies up to 40% of its natural frequency High sensitivity, compact, and rugged Very high natural frequency (100 kHz typical) Force, torque, and pressure sensor
Strain gauge Dynamometers/load cells Piezoelectric load cells Tactile sensor Ultrasonic stress sensor
Good for both static and dynamic measurements They are also available as micro- and nanosensors Good for high precision dynamic force measurements Compact, has wide dynamic range, and high Good for small force measurements Flow sensors
Pitot tube Orifice plate Flow nozzle, venturi tubes Rotameter Ultrasonic type Turbine flow meter Electromagnetic flow meter
Widely used as a flow rate sensor to determine speed in aircrafts Least expensive with limited range Accurate on wide range of flow More complex and expensive Good for upstream flow measurements Used in conjunction with variable inductance sensor Good for very high flow rates Can be used for both upstream and downstream flow measurements Not suited for fluids containing abrasive particles Relationship between flow rate and angular velocity is linear Least intrusive as it is noncontact type Can be used with fluids that are corrosive, contaminated, etc. The fluid has to be electrically conductive Temperature sensors
Thermocouples Thermistors Thermodiodes, thermo transistors RTD—resistance temperature detector
This is the cheapest and the most versatile sensor Applicable over wide temperature ranges (-200∞C to 1200∞C typical) Very high sensitivity in medium ranges (up to 100∞C typical) Compact but nonlinear in nature Ideally suited for chip temperature measurements Minimized self heating More stable over a long period of time compared to thermocouple Linear over a wide range (continued)
©2002 CRC Press LLC
TABLE 16.1
Type of Sensors for Various Measurement Objectives (Continued)
Sensor
Features
Infrared type Infrared thermography
Noncontact point sensor with resolution limited by wavelength Measures whole-field temperature distribution Proximity sensors
Inductance, eddy current, hall effect, photoelectric, capacitance, etc.
Robust noncontact switching action The digital outputs are often directly fed to the digital controller
Photoresistors, photodiodes, photo transistors, photo conductors, etc. Charge-coupled diode
Measure light intensity with high sensitivity Inexpensive, reliable, and noncontact sensor Captures digital image of a field of vision
Light sensors
Smart material sensors Optical fiber As strain sensor
Alternate to strain gages with very high accuracy and bandwidth Sensitive to the reflecting surface’s orientation and status Reliable and accurate High resolution in wide ranges High resolution and range (up to 2000∞C)
As level sensor As force sensor As temperature sensor Piezoelectric As strain sensor As force sensor As accelerometer Magnetostrictive As force sensors
Distributed sensing with high resolution and bandwidth Most suitable for dynamic applications Least hysteresis and good setpoint accuracy Compact force sensor with high resolution and bandwidth Good for distributed and noncontact sensing applications Accurate, high bandwidth, and noncontact sensor
As torque sensor
Micro- and nano-sensors Micro CCD image sensor Fiberscope Micro-ultrasonic sensor Micro-tactile sensor
Small size, full field image sensor Small (0.2 mm diameter) field vision scope using SMA coil actuators Detects flaws in small pipes Detects proximity between the end of catheter and blood vessels
SENSING UNIT
CONTROLLED SYSTEM
CONTROLLER
ACTUATING UNIT
\
FIGURE 16.1
A typical mechatronics system.
Sensors can also be classified as passive or active. In passive sensors, the power required to produce the output is provided by the sensed physical phenomenon itself (such as a thermometer) whereas the active sensors require external power source (such as a strain gage). Furthermore, sensors are classified as analog or digital based on the type of output signal. Analog sensors produce continuous signals that are proportional to the sensed parameter and typically require ©2002 CRC Press LLC
analog-to-digital conversion before feeding to the digital controller. Digital sensors on the other hand produce digital outputs that can be directly interfaced with the digital controller. Often, the digital outputs are produced by adding an analog-to-digital converter to the sensing unit. If many sensors are required, it is more economical to choose simple analog sensors and interface them to the digital controller equipped with a multi-channel analog-to-digital converter.
Principle of Operation Linear and Rotational Sensors Linear and rotational position sensors are two of the most fundamental of all measurements used in a typical mechatronics system. The most common type position sensors are listed in Table 16.1. In general, the position sensors produce an electrical output that is proportional to the displacement they experience. There are contact type sensors such as strain gage, LVDT, RVDT, tachometer, etc. The noncontact type includes encoders, hall effect, capacitance, inductance, and interferometer type. They can also be classified based on the range of measurement. Usually the high-resolution type of sensors such as hall effect, fiber optic inductance, capacitance, and strain gage are suitable for only very small range (typically from 0.1 mm to 5 mm). The differential transformers on the other hand, have a much larger range with good resolution. Interferometer type sensors provide both very high resolution (in terms of microns) and large range of measurements (typically up to a meter). However, interferometer type sensors are bulky, expensive, and requires large set up time. Among many linear displacement sensors, strain gage provides high resolution at low noise level and is least expensive. A typical resistance strain gage consists of resistive foil arranged as shown in the Fig. 16.2. A typical setup to measure the normal strain of a member loaded in tension is shown in Fig. 16.3. Strain gage 1 is bonded to the loading member whereas strain gage 2 is bonded to a second member made of same material, but not loaded. This arrangement compensates for any temperature effect. When the member is loaded, the gage 1 elongates thereby changing the resistance of the gage. The change in resistance is transformed into a change in voltage by the voltagesensitive wheatstone bridge circuit. Assuming that the resistance of FIGURE 16.2 Bonded strain gage. all four arms are equal initially, the change in output voltage (Dvo) due to change in resistance (DR1) of gage 1 is
Dv o DR 1 /R -------- = --------------------------------vi 4 + 2 ( DR 1 /R ) Acceleration Sensors Measurement of acceleration is important for systems subject to shock and vibration. Although acceleration can be derived from the time history data obtainable from linear or rotary sensors, the accelerometers whose output is directly proportional to the acceleration is preferred. Two common types include
1
vo
FIGURE 16.3 Experimental setup to measure normal strain using strain gages. ©2002 CRC Press LLC
R
R
vi
2
CONTROL UNIT R
T
FIGURE 16.4
R
T
Ultrasonic flow sensor arrangement.
the seismic mass type and the piezoelectric accelerometer. The seismic mass type accelerometer is based on the relative motion between a mass and the supporting structure. The natural frequency of the seismic mass limits its use to low to medium frequency applications. The piezoelectric accelerometer, however, is compact and more suitable for high frequency applications. Force, Torque, and Pressure Sensors Among many type of force/torque sensors, the strain gage dyanamometers and piezoelectric type are most common. Both are available to measure force and/or torque either in one axis or multiple axes. The dynamometers make use of mechanical members that experiences elastic deflection when loaded. These types of sensors are limited by their natural frequency. On the other hand, the piezoelectric sensors are particularly suitable for dynamic loadings in a wide range of frequencies. They provide high stiffness, high resolution over a wide measurement range, and are compact. Flow Sensors Flow sensing is relatively a difficult task. The fluid medium can be liquid, gas, or a mixture of the two. Furthermore, the flow could be laminar or turbulent and can be a time-varying phenomenon. The venturi meter and orifice plate restrict the flow and use the pressure difference to determine the flow rate. The pitot tube pressure probe is another popular method of measuring flow rate. When positioned against the flow, they measure the total and static pressures. The flow velocity and in turn the flow rate can then be determined. The rotameter and the turbine meters when placed in the flow path, rotate at a speed proportional to the flow rate. The electromagnetic flow meters use noncontact method. Magnetic field is applied in the transverse direction of the flow and the fluid acts as the conductor to induce voltage proportional to the flow rate. Ultrasonic flow meters measure fluid velocity by passing high-frequency sound waves through fluid. A schematic diagram of the ultrasonic flow meter is as shown in Fig. 16.4. The transmitters (T) provide the sound signal source. As the wave travels towards the receivers (R), its velocity is influenced by the velocity of the fluid flow due to the doppler effect. The control circuit compares the time to interpret the flow rate. This can be used for very high flow rates and can also be used for both upstream and downstream flow. The other advantage is that it can be used for corrosive fluids, fluids with abrasive particles, as it is like a noncontact sensor. Temperature Sensors A variety of devices are available to measure temperature, the most common of which are thermocouples, thermisters, resistance temperature detectors (RTD), and infrared types. Thermocouples are the most versatile, inexpensive, and have a wide range (up to 1200∞C typical). A thermocouple simply consists of two dissimilar metal wires joined at the ends to create the sensing junction. When used in conjunction with a reference junction, the temperature difference between the reference junction and the actual temperature shows up as a voltage potential. Thermisters are semiconductor devices whose resistance changes as the temperature changes. They are good for very high sensitivity measurements in a limited range of up to 100∞C. The relationship between the temperature and the resistance is nonlinear. The RTDs use the phenomenon that the resistance of a metal changes with temperature. They are, however, linear over a wide range and most stable. ©2002 CRC Press LLC
Infrared type sensors use the radiation heat to sense the temperature from a distance. These noncontact sensors can also be used to sense a field of vision to generate a thermal map of a surface. Proximity Sensors They are used to sense the proximity of an object relative to another object. They usually provide a on or off signal indicating the presence or absence of an object. Inductance, capacitance, photoelectric, and hall effect types are widely used as proximity sensors. Inductance proximity sensors consist of a coil wound around a soft iron core. The inductance of the sensor changes when a ferrous object is in its proximity. This change is converted to a voltage-triggered switch. Capacitance types are similar to inductance except the proximity of an object changes the gap and affects the capacitance. Photoelectric sensors are normally aligned with an infrared light source. The proximity of a moving object interrupts the light beam causing the voltage level to change. Hall effect voltage is produced when a current-carrying conductor is exposed to a transverse magnetic field. The voltage is proportional to transverse distance between the hall effect sensor and an object in its proximity. Light Sensors Light intensity and full field vision are two important measurements used in many control applications. Phototransistors, photoresistors, and photodiodes are some of the more common type of light intensity sensors. A common photoresistor is made of cadmium sulphide whose resistance is maximum when the sensor is in dark. When the photoresistor is exposed to light, its resistance drops in proportion to the intensity of light. When interfaced with a circuit as shown in Fig. 16.5 and balanced, the change in light intensity will show up as change in voltage. These sensors are simple, reliable, and cheap, used widely for measuring light intensity. Smart Material Sensors There are many new smart materials that are gaining more applications as sensors, especially in distributed sensing circumstances. Of these, optic fibers, piezoelectric, and magnetostrictive materials have found applications. Within these, optic fibers are most used. Optic fibers can be used to sense strain, liquid level, force, and temperature with very high resolution. Since they are economical for use as in situ distributed sensors on large areas, they have found numerous applications in smart structure applications such as damage sensors, vibration sensors, and cure-monitoring sensors. These sensors use the inherent material (glass and silica) property of optical fiber to sense the environment. Figure 16.6 illustrates the basic principle of operation of an embedded optic fiber used to sense displacement, force, or temperature. The relative change in the transmitted intensity or spectrum is proportional to the change in the sensed parameter. POTENTIOMETER 5V
vOUT PHOTO RESISTOR
FIGURE 16.5
Host material
Optical fiber
Known source of light Environmental disturbance, e.g., deflection, or temperature, or force
FIGURE 16.6
LIGHT
Light sensing with photoresistors.
Principle of operation of optic fiber sensing.
©2002 CRC Press LLC
Relative change in Intensity or Spectrum or Phase
Micro- and Nanosensors Microsensors (sometimes also called MEMS) are the miniaturized version of the conventional macrosensors with improved performance and reduced cost. Silicon micromachining technology has helped the development of many microsensors and continues to be one of the most active research and development topics in this area. Vision microsensors have found applications in medical technology. A fiberscope of approximately 0.2 mm in diameter has been developed to inspect flaws inside tubes. Another example is a microtactile sensor, which uses laser light to detect the contact between a catheter and the inner wall of blood vessels during insertion that has sensitivity in the range of 1 mN. Similarly, the progress made in the area of nanotechnology has fuelled the development of nanosensors. These are relatively new sensors that take one step further in the direction of miniaturization and are expected to open new avenues for sensing applications.
Selection Criteria A number of static and dynamic factors must be considered in selecting a suitable sensor to measure the desired physical parameter. Following is a list of typical factors: Range—Difference between the maximum and minimum value of the sensed parameter Resolution—The smallest change the sensor can differentiate Accuracy—Difference between the measured value and the true value Precision—Ability to reproduce repeatedly with a given accuracy Sensitivity—Ratio of change in output to a unit change of the input Zero offset—A nonzero value output for no input Linearity—Percentage of deviation from the best-fit linear calibration curve Zero Drift—The departure of output from zero value over a period of time for no input Response time—The time lag between the input and output Bandwidth—Frequency at which the output magnitude drops by 3 dB Resonance—The frequency at which the output magnitude peak occurs Operating temperature—The range in which the sensor performs as specified Deadband—The range of input for which there is no output Signal-to-noise ratio—Ratio between the magnitudes of the signal and the noise at the output Choosing a sensor that satisfies all the above to the desired specification is difficult, at best. For example, finding a position sensor with micrometer resolution over a range of a meter eliminates most of the sensors. Many times the lack of a cost-effective sensor necessitates redesigning the mechatronic system. It is, therefore, advisable to take a system level approach when selecting a sensor and avoid choosing it in isolation. Once the above-referred functional factors are satisfied, a short list of sensors can be generated. The final selection will then depend upon the size, extent of signal conditioning, reliability, robustness, maintainability, and cost.
Signal Conditioning Normally, the output from a sensor requires post processing of the signals before they can be fed to the controller. The sensor output may have to be demodulated, amplified, filtered, linearized, range quantized, and isolated so that the signal can be accepted by a typical analog-to-digital converter of the controller. Some sensors are available with integrated signal conditioners, such as the microsensors. All the electronics are integrated into one microcircuit and can be directly interfaced with the controllers.
Calibration The sensor manufacturer usually provides the calibration curves. If the sensors are stable with no drift, there is no need to recalibrate. However, often the sensor may have to be recalibrated after integrating it with a signal conditioning system. This essentially requires that a known input signal is provided to ©2002 CRC Press LLC
the sensor and its output recorded to establish a correct output scale. This process proves the ability to measure reliably and enhances the confidence. If the sensor is used to measure a time-varying input, dynamic calibration becomes necessary. Use of sinusoidal inputs is the most simple and reliable way of dynamic calibration. However, if generating sinusoidal input becomes impractical (for example, temperature signals) then a step input can substitute for the sinusoidal signal. The transient behavior of step response should yield sufficient information about the dynamic response of the sensor.
16.2 Actuators Actuators are basically the muscle behind a mechatronics system that accepts a control command (mostly in the form of an electrical signal) and produces a change in the physical system by generating force, motion, heat, flow, etc. Normally, the actuators are used in conjunction with the power supply and a coupling mechanism as shown in Fig. 16.7. The power unit provides either AC or DC power at the rated voltage and current. The coupling mechanism acts as the interface between the actuator and the physical system. Typical mechanisms include rack and pinion, gear drive, belt drive, lead screw and nut, piston, and linkages.
Classification Actuators can be classified based on the type of energy as listed in Table 16.2. The table, although not exhaustive, lists all the basic types. They are essentially of electrical, electromechanical, electromagnetic, hydraulic, or pneumatic type. The new generations of actuators include smart material actuators, microactuators, and Nanoactuators. Actuators can also be classified as binary and continuous based on the number of stable-state outputs. A relay with two stable states is a good example of a binary actuator. Similarly, a stepper motor is a good example of continuous actuator. When used for a position control, the stepper motor can provide stable outputs with very small incremental motion.
Principle of Operation Electrical Actuators Electrical switches are the choice of actuators for most of the on-off type control action. Switching devices such as diodes, transistors, triacs, MOSFET, and relays accept a low energy level command signal from the controller and switch on or off electrical devices such as motors, valves, and heating elements. For example, a MOSFET switch is shown in Fig. 16.8. The gate terminal receives the low energy control signal from the controller that makes or breaks the connection between the power supply and the actuator load. When switches are used, the designer must make sure that switch bounce problem is eliminated either by hardware or software. Electromechanical Actuators The most common electromechanical actuator is a motor that converts electrical energy to mechanical motion. Motors are the principal means of converting electrical energy into mechanical energy in industry. Broadly they can be classified as DC motors, AC motors, and stepper motors. DC motors operate on DC ACTUATING UNIT POWER SUPPLY
FROM CONTROLLER
FIGURE 16.7
A typical actuating unit.
©2002 CRC Press LLC
ACTUATOR
COUPLING MECHANISM
TO CONTROLLED SYSTEM
TABLE 16.2
Type of Actuators and Their Features
Actuator
Features Electrical
Diodes, thyristor, bipolar transistor, triacs, diacs, power MOSFET, solid state relay, etc.
Electronic type Very high frequency response Low power consumption
Electromechanical DC motor
Wound field
Separately excited Shunt Series Compound
Permanent magnet
Conventional PM motor Moving-coil PM motor Torque motor
Electronic commutation (brushless motor)
AC motor
AC induction motor AC synchronous motor
Universal motor
Stepper motor
Hybrid Variable reluctance
Speed can be controlled either by the voltage across the armature winding or by varying the field current Constant-speed application High starting torque, high acceleration torque, high speed with light load Low starting torque, good speed regulation Instability at heavy loads High efficiency, high peak power, and fast response Higher efficiency and lower inductance than conventional DC motor Designed to run for a long periods in a stalled or a low rpm condition Fast response High efficiency, often exceeding 75% Long life, high reliability, no maintenance needed Low radio frequency interference and noise production The most commonly used motor in industry Simple, rugged, and inexpensive Rotor rotates at synchronous speed Very high efficiency over a wide range of speeds and loads Need an additional system to start Can operate in DC or AC Very high horsepower per pound ratio Relatively short operating life Change electrical pulses into mechanical movement Provide accurate positioning without feedback Low maintenance
Electromagnetic Solenoid type devices Electromagnets, relay
Large force, short duration On/off control Hydraulic and Pneumatic
Cylinder Hydraulic motor
Air motor Valves
Gear type Vane type Piston type Rotary type Reciprocating Directional control valves Pressure control valves Process control valves
Suitable for liner movement Wide speed range High horsepower output High degree of reliability No electric shock hazard Low maintenance
Smart Material actuators Piezoelectric & Electrostrictive
High frequency with small motion High voltage with low current excitation High resolution (continued)
©2002 CRC Press LLC
TABLE 16.2
Type of Actuators and Their Features (Continued)
Actuator
Features
Magnetostrictive
High frequency with small motion Low voltage with high current excitation Low voltage with high current excitation Low frequency with large motion Very high voltage excitation Good resistance to mechanical shock and vibration Low frequency with large force
Shape Memory Alloy Electrorheological fluids
Micro- and Nanoactuators Micromotors Microvalves
Suitable for micromechanical system Can use available silicon processing technology, such as electrostatic motor Can use any smart material
Micropumps
Power Supply Source Controller
Gate Drain
Load
FIGURE 16.8
n-channel power MOSFET.
voltage and varying the voltage can easily control their speed. They are widely used in applications ranging from thousands of horsepower motors used in rolling mills to fractional horsepower motors used in automobiles (starter motors, fan motors, windshield wiper motors, etc.). Although they are costlier, they need DC power supply and require more maintenance compared to AC motors. The governing equation of motion of a DC motor can be written as:
dω T = J -----dt + T L + T loss where T is torque, J is the total inertia, ω is the angular mechanical speed of the rotor, TL is the torque applied to the motor shaft, and Tloss is the internal mechanical losses such as friction. AC motors are the most popular since they use standard AC power, do not require brushes and commutator, and are therefore less expensive. AC motors can be further classified as the induction motors, synchronous motors, and universal motors according to their physical construction. The induction motor is simple, rugged, and maintenance free. They are available in many sizes and shapes based on number of phases used. For example, a three-phase induction motor is used in large-horsepower applications, such as pump drives, steel mill drives, hoist drives, and vehicle drives. The two-phase servomotor is used extensively in position control systems. Single-phase induction motors are widely used in many household appliances. The synchronous motor is one of the most efficient electrical motors in industry, so it is used in industry to reduce the cost of electrical power. In addition, synchronous motors rotate at synchronous speed, so they are also used in applications that require synchronous operations. The universal motors operate with either ©2002 CRC Press LLC
S N
2
N S
2
AC or DC power supply. They are normally used in fractional horsepower application. The DC universal motor has the highest horsepower-per-pound ratio, but has a relatively short operating life. The stepper motor is a discrete (incremental) positioning device that moves one step at a time for each pulse command input. Since they accept direct digital commands and produce a mechanical motion, the stepper motors are used widely in industrial control applications. They are mostly used in fractional horsepower applications. With the rapid progress in low cost and high frequency solid-state drives, they are finding increased applications. Figure 16.9 shows a simplified unipolar stepper motor. The winding-1 is between the top and bottom stator pole, and the 1 winding-2 is between the left and right motor poles. The rotor is N a permanent magnet with six poles resulting in a single step angle S of 30∞. With appropriate excitation of winding-1, the top stator pole becomes a north pole and the bottom stator pole becomes N a south pole. This attracts the rotor into the position as shown. Now if the winding-1 is de-energized and winding-2 is energized, the rotor will turn 30∞. With appropriate choice of current flow FIGURE 16.9 Unipolar stepper motor. through winding-2, the rotor can be rotated either clockwise or counterclockwise. By exciting the two windings in sequence, the motor can be made to rotate at a desired speed continuously. 1 S
Electromagnetic Actuators The solenoid is the most common electromagnetic actuator. A DC solenoid actuator consists of a soft iron core enclosed within a current carrying coil. When the coil is energized, a magnetic field is established that provides the force to push or pull the iron core. AC solenoid devices are also encountered, such as AC excitation relay. A solenoid operated directional control valve is shown in Fig. 16.10. Normally, due to the spring force, the soft iron core is pushed to the extreme left position as shown. When the solenoid is excited, the soft iron core will move to the right extreme position thus providing the electromagnetic actuation. Another important type is the electromagnet. The electromagnets are used extensively in applications that require large forces. Hydraulic and Pneumatic Actuators Hydraulic and pneumatic actuators are normally either rotary motors or linear piston/cylinder or control valves. They are ideally suited for generating very large forces coupled with large motion. Pneumatic actuators use air under pressure that is most suitable for low to medium force, short stroke, and highspeed applications. Hydraulic actuators use pressurized oil that is incompressible. They can produce very large forces coupled with large motion in a cost-effective manner. The disadvantage with the hydraulic actuators is that they are more complex and need more maintenance. The rotary motors are usually used in applications where low speed and high torque are required. The cylinder/piston actuators are suited for application of linear motion such as aircraft flap control. Control valves in the form of directional control valves are used in conjunction with rotary motors and cylinders to control the fluid flow direction as shown in Fig. 16.10. In this solenoid operated directional control valve, the valve position dictates the direction motion of the cylinder/piston arrangement. Supply
FIGURE 16.10 valve.
Solenoid operated directional control
©2002 CRC Press LLC
Core Solenoid
PROGRAMMED SHAPE AUSTENITE PHAE
AT ROOM TEMPERATURE STRAIGHTENED MARTENSITE PHASE
REGAINS SHAPE WHEN HEATED AUSTENITE PHASE
FIGURE 16.11
Phase changes of Shape Memory Alloy.
+ V _
_ V +
FIGURE 16.12
Piezoelectric actuator.
Smart Material Actuators Unlike the conventional actuators, the smart material actuators typically become part of the load bearing structures. This is achieved by embedding the actuators in a distributed manner and integrating into the load bearing structure that could be used to suppress vibration, cancel the noise, and change shape. Of the many smart material actuators, shape memory alloys, piezoelectric (PZT), magnetostrictive, Electrorheological fluids, and ion exchange polymers are most common. Shape Memory Alloys (SMA) are alloys of nickel and titanium that undergo phase transformation when subjected to a thermal field. The SMAs are also known as NITINOL for Nickel Titanium Naval Ordnance Laboratory. When cooled below a critical temperature, their crystal structure enters martensitic phase as shown in Fig. 16.11. In this state the alloy is plastic and can easily be manipulated. When the alloy is heated above the critical temperature (in the range of 50–80∞C), the phase changes to austenitic phase. Here the alloy resumes the shape that it formally had at the higher temperature. For example, a straight wire at room temperature can be made to regain its programmed semicircle shape when heated that has found applications in orthodontics and other tensioning devices. The wires are typically heated by passing a current (up to several amperes), 0 at very low voltage (2–10 V typical). The PZT actuators are essentially piezocrystals with top and bottom conducting films as shown in Fig. 16.12. When an electric voltage is applied across the two conducting films, the crystal expands in the transverse direction as shown by the dotted lines. When the voltage polarity is reversed, the crystal contracts thereby providing bidirectional actuation. The interaction between the mechanical and electrical behavior of the piezoelectric materials can be expressed as: E
T = c S - eE E
where T is the stress, c is the elastic coefficients at constant electric field, S is the strain, e is the dielectric permitivity, and E is the electric field. ©2002 CRC Press LLC
+
_
FIGURE 16.13
_
+
Vibration of beam using piezoelectric actuators. Magnetostrictive rod
Coil
Magnetic Field
FIGURE 16.14
Magnetostrictive rod actuator.
One application of these actuators is as shown in Fig. 16.13. The two piezoelectric patches are excited with opposite polarity to create transverse vibration in the cantilever beam. These actuators provide high bandwidth (0–10 kHz typical) with small displacement. Since there are no moving parts to the actuator, it is compact and ideally suited for micro and nano actuation. Unlike the bidirectional actuation of piezoelectric actuators, the electrostriction effect is a second-order effect, i.e., it responds to an electric field with unidirectional expansion regardless of polarity. Magnetostrictive material is an alloy of terbium, dysprosium, and iron that generates mechanical strains up to 2000 microstrain in response to applied magnetic fields. They are available in the form of rods, plates, washers, and powder. Figure 16.14 shows a typical magnetostrictive rod actuator that is surrounded by a magnetic coil. When the coil is excited, the rod elongates in proportion to the intensity of the magnetic field established. The magnetomechanical relationship is given as:
ε = S σ + dH H
where, ε is the strain, S the compliance at constant magnetic filed, σ the stress, d the magnetostriction constant, and H the magnetic field intensity. Ion exchange polymers exploit the electro-osmosis phenomenon of the natural ionic polymers for purposes of actuation. When a voltage potential is applied across the cross-linked polyelectrolytic network, the ionizable groups attain a net charge generating a mechanical deformation. These types of actuators have been used to develop artificial muscles and artificial limbs. The primary advantage is their capacity to produce large deformation with a relatively low voltage excitation. H
Micro- and Nanoactuators Microactuators, also called micromachines, microelectromechanical system (MEMS), and microsystems are the tiny mobile devices being developed utilizing the standard microelectronics processes with the integration of semiconductors and machined micromechanical elements. Another definition states that any device produced by assembling extremely small functional parts of around 1–15 mm is called a micromachine. In electrostatic motors, electrostatic force is dominant, unlike the conventional motors that are based on magnetic forces. For smaller micromechanical systems the electrostatic forces are well suited as an actuating force. Figure 16.15 shows one type of electrostatic motor. The rotor is an annular disk with uniform permitivity and conductivity. In operation, a voltage is applied to the two conducting parallel ©2002 CRC Press LLC
FIGURE 16.15
Electrostatic motor: 1-rotor, 2-stator electrodes.
plates separated by an insulation layer. The rotor rotates with a constant velocity between the two coplanar concentric arrays of stator electrodes.
Selection Criteria The selection of the proper actuator is more complicated than selection of the sensors, primarily due to their effect on the dynamic behavior of the overall system. Furthermore, the selection of the actuator dominates the power needs and the coupling mechanisms of the entire system. The coupling mechanism can sometimes be completely avoided if the actuator provides the output that can be directly interfaced to the physical system. For example, choosing a linear motor in place of a rotary motor can eliminate the need of a coupling mechanism to convert rotary motion to linear motion. In general, the following performance parameters must be addressed before choosing an actuator for a specific need: Continuous power output—The maximum force/torque attainable continuously without exceeding the temperature limits Range of motion—The range of linear/rotary motion Resolution—The minimum increment of force/torque attainable Accuracy—Linearity of the relationship between the input and output Peak force/torque—The force/torque at which the actuator stalls Heat dissipation—Maximum wattage of heat dissipation in continuous operation Speed characteristics—Force/torque versus speed relationship No load speed—Typical operating speed/velocity with no external load Frequency response—The range of frequency over which the output follows the input faithfully, applicable to linear actuators Power requirement—Type of power (AC or DC), number of phases, voltage level, and current capacity In addition to the above-referred criteria, many other factors become important depending upon the type of power and the coupling mechanism required. For example, if a rack- and-pinion coupling mechanism is chosen, the backlash and friction will affect the resolution of the actuating unit.
©2002 CRC Press LLC
17 Fundamentals of Time and Frequency 17.1
Introduction Coordinated Universal Time (UTC)
17.2
Time and Frequency Measurement
17.3
Time and Frequency Standards
Accuracy • Stability Quartz Oscillators • Rubidium Oscillators • Cesium Oscillators
17.4
Fundamentals of Time and Frequency Transfer • Radio Time and Frequency Transfer Signals
Michael A. Lombardi National Institute of Standards and Technology
Time and Frequency Transfer
17.5
Closing
17.1 Introduction Time and frequency standards supply three basic types of information: time-of-day, time interval, and frequency. Time-of-day information is provided in hours, minutes, and seconds, but often also includes the date (month, day, and year). A device that displays or records time-of-day information is called a clock. If a clock is used to label when an event happened, this label is sometimes called a time tag or time stamp. Date and time-of-day can also be used to ensure that events are synchronized, or happen at the same time. Time interval is the duration or elapsed time between two events. The standard unit of time interval is the second(s). However, many engineering applications require the measurement of shorter time -3 -6 -9 intervals, such as milliseconds (1 ms = 10 s), microseconds (1 µ s = 10 s), nanoseconds (1 ns = 10 s), -12 and picoseconds (1 ps = 10 s). Time is one of the seven base physical quantities, and the second is one of seven base units defined in the International System of Units (SI). The definitions of many other physical quantities rely upon the definition of the second. The second was once defined based on the earth’s rotational rate or as a fraction of the tropical year. That changed in 1967 when the era of atomic time keeping formally began. The current definition of the SI second is: The duration of 9,192,631,770 periods of the radiation corresponding to the transition between two hyperfine levels of the ground state of the cesium-133 atom. Frequency is the rate of a repetitive event. If T is the period of a repetitive event, then the frequency f is its reciprocal, 1/T. Conversely, the period is the reciprocal of the frequency, T = 1/f. Since the period is a time interval expressed in seconds (s), it is easy to see the close relationship between time interval and frequency. The standard unit for frequency is the hertz (Hz), defined as events or cycles per second. The frequency of electrical signals is often measured in multiples of hertz, including kilohertz (kHz), 3 megahertz (MHz), or gigahertz (GHz), where 1 kHz equals one thousand (10 ) events per second, 1 MHz
©2002 CRC Press LLC
TABLE 17.1 Uncertainties of Physical Realizations of the Base SI Units SI Base Unit Candela Kelvin Mole Ampere Kilogram Meter Second
Physical Quantity
Uncertainty
Luminous intensity Temperature Amount of substance Electric current Mass Length Time interval
6
1× 3× 8× 4× 1× 1× 1×
-4
10 -7 10 -8 10 -8 10 -8 10 -12 10 -15 10 9
equals one million (10 ) events per second, and 1 GHz equals one billion (10 ) events per second. A device that produces frequency is called an oscillator. The process of setting multiple oscillators to the same frequency is called syntonization. Of course, the three types of time and frequency information are closely related. As mentioned, the standard unit of time interval is the second. By counting seconds, we can determine the date and the time-of-day. And by counting events or cycles per second, we can measure frequency. Time interval and frequency can now be measured with less uncertainty and more resolution than any other physical quantity. Today, the best time and frequency standards can realize the SI second with – 15 uncertainties of ≅ 1 × 10 . Physical realizations of the other base SI units have much larger uncertainties, as shown in Table 17.1 [1–5].
Coordinated Universal Time (UTC) The world’s major metrology laboratories routinely measure their time and frequency standards and send the measurement data to the Bureau International des Poids et Measures (BIPM) in Sevres, France. The BIPM averages data collected from more than 200 atomic time and frequency standards located at more than 40 laboratories, including the National Institute of Standards and Technology (NIST). As a result of this averaging, the BIPM generates two time scales, International Atomic Time (TAI), and Coordinated Universal Time (UTC). These time scales realize the SI second as closely as possible. UTC runs at the same frequency as TAI. However, it differs from TAI by an integral number of seconds. This difference increases when leap seconds occur. When necessary, leap seconds are added to UTC on either June 30 or December 31. The purpose of adding leap seconds is to keep atomic time (UTC) within ±0.9 s of an older time scale called UT1, which is based on the rotational rate of the earth. Leap seconds have been added to UTC at a rate of slightly less than once per year, beginning in 1972 [3,5]. Keep in mind that the BIPM maintains TAI and UTC as ‘‘paper’’ time scales. The major metrology laboratories use the published data from the BIPM to steer their clocks and oscillators and generate realtime versions of UTC. Many of these laboratories distribute their versions of UTC via radio signals, which are discussed in section 17.4. You can think of UTC as the ultimate standard for time-of-day, time interval, and frequency. Clocks synchronized to UTC display the same hour, minute, and second all over the world (and remain within one second of UT1). Oscillators syntonized to UTC generate signals that serve as reference standards for time interval and frequency.
17.2 Time and Frequency Measurement Time and frequency measurements follow the conventions used in other areas of metrology. The frequency standard or clock being measured is called the device under test (DUT ). A measurement compares the DUT to a standard or reference. The standard should outperform the DUT by a specified ratio, called the test uncertainty ratio (TUR). Ideally, the TUR should be 10:1 or higher. The higher the ratio, the less averaging is required to get valid measurement results. ©2002 CRC Press LLC
FIGURE 17.1
An oscillating sine wave.
FIGURE 17.2
Measurement using a time interval counter.
The test signal for time measurements is usually a pulse that occurs once per second (1 pps). The pulse width and polarity varies from device to device, but TTL levels are commonly used. The test signal for frequency measurements is usually at a frequency of 1 MHz or higher, with 5 or 10 MHz being common. Frequency signals are usually sine waves, but can also be pulses or square waves. If the frequency signal is an oscillating sine wave, it might look like the one shown in Fig. 17.1. This signal produces one cycle (360∞ or 2π radians of phase) in one period. The signal amplitude is expressed in volts, and must be compatible with the measuring instrument. If the amplitude is too small, it might not be able to drive the measuring instrument. If the amplitude is too large, the signal must be attenuated to prevent overdriving the measuring instrument. This section examines the two main specifications of time and frequency measurements—accuracy and stability. It also discusses some instruments used to measure time and frequency.
Accuracy Accuracy is the degree of conformity of a measured or calculated value to its definition. Accuracy is related to the offset from an ideal value. For example, time offset is the difference between a measured on-time pulse and an ideal on-time pulse that coincides exactly with UTC. Frequency offset is the difference between a measured frequency and an ideal frequency with zero uncertainty. This ideal frequency is called the nominal frequency. Time offset is usually measured with a time interval counter (TIC), as shown in Fig. 17.2. A TIC has inputs for two signals. One signal starts the counter and the other signal stops it. The time interval between the start and stop signals is measured by counting cycles from the time base oscillator. The resolution of a low cost TIC is limited to the period of its time base. For example, a TIC with a 10-MHz time base oscillator would have a resolution of 100 ns. More elaborate TICs use interpolation schemes to detect parts of a time base cycle and have much higher resolution—1 ns resolution is commonplace, and 20 ps resolution is available. ©2002 CRC Press LLC
FIGURE 17.3
Measurement using a frequency counter.
FIGURE 17.4
Phase comparison using an oscilloscope.
Frequency offset can be measured in either the frequency domain or time domain. A simple frequency domain measurement involves directly counting and displaying the frequency output of the DUT with a frequency counter. The reference for this measurement is either the counter’s internal time base oscillator, or an external time base (Fig. 17.3). The counter’s resolution, or the number of digits it can display, limits its ability to measure frequency offset. For example, a 9-digit frequency counter can detect a frequency -8 offset no smaller than 0.1 Hz at 10 MHz (1 × 10 ). The frequency offset is determined as
f measured – f nominal f ( offset ) = -------------------------------------f nominal where fmeasured is the reading from the frequency counter, and fnominal is the frequency labeled on the oscillator’s nameplate, or specified output frequency. Frequency offset measurements in the time domain involve a phase comparison between the DUT and the reference. A simple phase comparison can be made with an oscilloscope (Fig. 17.4). The oscilloscope will display two sine waves (Fig. 17.5). The top sine wave represents a signal from the DUT, and the bottom sine wave represents a signal from the reference. If the two frequencies were exactly the same, their phase relationship would not change and both would appear to be stationary on the oscilloscope display. Since the two frequencies are not exactly the same, the reference appears to be stationary and the DUT signal moves. By measuring the rate of motion of the DUT signal we can determine its frequency offset. Vertical lines have been drawn through the points where each sine wave passes through zero. The bottom of the figure shows bars whose width represents the phase difference between the signals. In this case the phase difference is increasing, indicating that the DUT is lower in frequency than the reference. Measuring high accuracy signals with an oscilloscope is impractical, since the phase relationship between signals changes very slowly and the resolution of the oscilloscope display is limited. More precise phase comparisons can be made with a TIC, using a setup similar to Fig. 17.2. If the two input signals have the same frequency, the time interval will not change. If the two signals have different frequencies, ©2002 CRC Press LLC
FIGURE 17.5
Two sine waves with a changing phase relationship.
the time interval will change, and the rate of change is the frequency offset. The resolution of a TIC determines the smallest frequency change that it can detect without averaging. For example, a low cost -7 TIC with a single-shot resolution of 100 ns can detect frequency changes of 1 × 10 in 1 s. The current -11 limit for TIC resolution is about 20 ps, which means that a frequency change of 2 × 10 can be detected in 1 s. Averaging over longer intervals can improve the resolution to 7 years) -12 1 × 10 1 × 10 3 5 (τ = 10 to 10 s) -13 ~ 1 × 10 -12 1 × 10 to -13 1 × 10
V T
©2002 CRC Press LLC
and
i D = VDD /R D V DS ≈ i D ⋅ R ON ( V DS ) < V GS – V T
(20.14)
0066_Frame_C20 Page 25 Wednesday, January 9, 2002 5:41 PM
FIGURE 20.41
MOSFET as a voltage controlled switch.
In this mode, the transistor can be viewed as a closed switch between the terminals D and S with a voltage controlled resistance RON . The drain current iD is controlled (determined) by the drain circuit. At rate current, the VDS drop during saturation ranges from 2 to 5 V. When operating in the enhancement mode, a MOSFET behaves very similar to a BJT. Instead of base current, the MOSFET behavior is determined by the gate voltage. When carefully controlling the gate voltage of a MOSFET, the transistor can be made to operate as a voltage controlled switch (Fig. 20.41) that operates between the cutoff (point A) and the Ohmic (point B) region. One advantage of a MOSFET device is that the MOSFET has significantly larger input impedance as compared to BJT. This simplifies the circuit that is needed to drive the MOSFET since the magnitude of the gate current is not a factor. This also implies that a MOSFET is much more efficient than BJTs as well as it can be switching at a much higher frequency. Typical MOSFET switching frequency is between 20 and 200 kHz, which is an order of magnitude higher than BJTs. Power MOSFETs can carry drain currents up to several hundreds of amperes and VDS up to around 500 V. Field effect is one of the key reasons why MOSFET has better switching performance than BJT. However, static field is also one of its main failure modes. MOSFETs are very sensitive to static voltage. Since the oxide insulating the gate and the substrate is only a thin film (in the order of a fraction to a few micrometer), high static voltage can easily break down the oxide insulation. A typical gate breakdown voltage is about 50 V. Therefore, static electricity control or insulation is very important when handling MOSFET devices. Comparing BJT with MOSFET, we can conclude the following: • Both can be used as current amplifiers. • BJT is a current-controlled amplifier where the collector current iC is proportional to the base current iB . • MOSFET is a voltage-controlled amplifier where the drain current iD is proportional to the square of the gate voltage VG . • Both can be used as three terminal switches or voltage inverters. • BJT: switching circuit give rise to TTL logics. • MOSFET: switching circuit give rise to CMOS logics. • BJT usually has larger current capacity than similar sized MOSFET. • MOSFET has much higher input impedance than BJT and is normally off, which translates to less operating power. • MOSFETs are more easily fabricated into integrated circuit. • MOSFETs are less prone to go into thermal runaway. • MOSFETs are susceptible to static voltage (exceed gate breakdown voltage ∼50 V). • BJT has been replaced by MOSFET in low-voltage ( 3W > 3T
Generated Voltage, V
Displacement, ∆L (∆T)
Capacitance, C
g 31 -F V = ----W
d 31 L -V ∆l = --------T
ε 3 LW C = ------------T
4Tg V = ------------233- F πD
∆T = d 33 V
πε 3 D C = -------------4T
Not applied
d 31 D -V ∆D = ---------T
π T D C = --- K 3 ε 0 -----4 T
4L V = ---------g F 2 33 pD
∆L = d 33 V
πD T C = --------- K 3 ε 0 4L
g 15 -F V = ----W
∆x = d 15 V
LW T C = --------- K 1 ε 0 T
T
3 S 2
1
Thickness extension mode: D > 5T
T
2
3 S 2 1
Radial mode: D > 5T
2
3 S 2 1
Longitudinal mode: L > 3D
2
3 S
2 1
Thickness shear mode: W > 5T, L > 5T 3
S
2
1
Note: F is the force and ε 3 is dielectric permittivity of the material at constant stress in direction 3, K i is T T relative dielectric constant ( K i = ε i / ε 0), and ε0 is dielectric permittivity in vacuum. T
T
This way of connection allows greater travel at lower voltage. Usually these wafers are 0.3–1 mm thick. The stack is often referred to operating mode d33. Total travel up to 200 µm can be achieved, and in this case it is in proportion to the number of wafers, if no external load is applied:
∆l = Vnd33 where n is the number of elements. ©2002 CRC Press LLC
(20.37)
0066_Frame_C20 Page 56 Wednesday, January 9, 2002 5:49 PM
TABLE 20.7 Standard Part No.
Properties of Some Stacked (Multilayer) Actuators
Material
Shape
Length × Width × Thickness (mm) or Ext. Diam. × Intern. Diam. × Thickness (mm)
Pz26 Pz26 Pz27 Pz26 Pz26 Pz27
Rectangle Square Square Ring Ring Ring
2.5 × 2.0 × 2.0 10 × 10 × 2.0 10 × 10 × 2.0 6.0 × 2.0 × 2.0 25 × 15 × 2.0 25 × 15 × 2.0
A01 A06 A16 A21 A27 A37
Vmax (V)
Stroke (µm)
Fmax (kN)
200 200 200 200 200 200
1.8 2.0 3.2 1.7 2.2 3.4
0.5 10 5.0 2.5 31 16
Due to stacked design, strong pushing force is developed:
∆lA F = ------------Ls 33 Y
(20.38)
where L is the length of the stack, A is the area of elements, and s33, Y are compliance and Young’s modulus, respectively. For reference, Ferroperm Piezoceramics’ multilayer actuator supply catalog [6] extract is presented in Table 20.7. If long travel is required, piezoelement expansion can be amplified by using bimorph or levers. Bimorph is a composite cantilever of two layers (Fig. 20.82(b)). One of them is of structural material and the other of piezomaterial. Piezomaterials can be used for both layers. In this case, first layer will expand, the second one contract. However, this results in low stiffness.
Application Areas Due to inherent properties in piezomaterials, actuators with a lot of engineering advantages can be developed. Some examples are compact and lightweight, large force, broad operating frequency range, high stability, solid state, displacement proportional to applied voltage, 50% energy conversion efficiency. They are used in micromanipulation, noise and vibration suppression systems, valves, laser and optics, ultrasonic motors, positioning devices, relays, pumps, in automotive industry, industrial automation systems, telecommunications, computers, etc. Some of the applications are shown in Fig. 20.83. (a) Suppression of oscillations. Piezoactive materials-based dampers convert mechanical oscillations into electrical energy. Generated energy is then shunted to dissipate the energy as heat, i.e., oscillation energy is eliminated. The principle scheme is given in [2]. (b) Microrobot. Robot platform legs are piezoactuators. By applying voltage to the electrodes, piezolegs are lengthened, shortened, or bent in any direction in a fine movement. (c) Micropump. Diaphragm is actuated by piezoactuator, input and output check valves are subsequently opened for liquid or gas pumping. Advantages are fast switching and high compression rate. (d) Microgripper. Piezoactuator works on contraction for gripping motion based on the compliant mechanism. Gripper is of very small size and almost any required geometrical shape. (e) Micromanipulator. Due to the unlimited resolution, piezoactuators are used in numerous positioning applications. (f) Microdosage device. Piezoactuators allow high precision dosage of a wide variety of liquids in a range of nanoliters for various applications.
©2002 CRC Press LLC
0066_Frame_C20 Page 57 Wednesday, January 9, 2002 5:49 PM
Diaphragm
Electrodes
PZT
PZT
Platform
Valves c
L
Input
PZT
R
(a)
(b)
Flexible
Output (c)
Platform PZT
Channel to reservoir
PZT
PZT (d)
(e)
Dossage chamber
Nozzle
(f)
FIGURE 20.83
Piezomotors (Ultrasonic Motors) Vibromotors [4] find wider and wider application as actuators based on the conversion of high frequency mechanical oscillations (dozens of kHz) into continuous motion [7,8]. Piezoactivating elements can be used as oscillators, and in this case vibromotors are called piezomotors [5,7,8]. Advantages of piezomotors are large torque, high resolution, excellent controllability, small time constant, compactness, high efficiency, silent operation, and no electromagnetic induction. Main Types of Piezomotors Piezomotors differ with respect to the methods of oscillations conversion into continuous motion. Basic ideas are given in Table 20.8. Piezomotors producing elliptical motion in the contact area between input and output links are mainly used. For this purpose oblique impact upon the output link or traveling wave is made use of. In piezomotors, making use of oblique impact, friction force transmits motion and energy between input and output links. This may be realized by two oscillatory motions (normal and tangential components) uy and ux in the contact area with phase difference ϕ , which is used to change output link motion direction. Both motions can be realized by one or two active links oscillating resonantly. Various oscillations offer possibilities to develop different kinds of piezomotors: longitudinal, transversal, shear, and torsional. Piezomotors employing oblique impacts possess a very wide frequency range. Its lower limit is at lower ultrasound frequencies (for elimination of acoustic action), 16–20 kHz, and its upper limit is at several megahertz. Traveling wave motion piezomotors are based on frictional interaction between the traveling wave motion in the elastic body and the output link, i.e., its principle of operation is similar to the harmonic traction transmission. Wave propagating along the surface (Rayleigh wave) of the input link forms the elliptical motion in the contact area. Rayleigh wave is a coupled wave of longitudinal and shear waves; thus each surface point in elastic medium moves along an elliptical locus. Flexural, shear, torsional, and longitudinal waves are used in piezomotors. Traveling wave in piezoceramic is excited by electrical field. Traveling wave motion piezomotor characteristics (ABB Corporate Research ITCRC/AS) are shown in the Table 20.9.
©2002 CRC Press LLC
0066_Frame_C20 Page 58 Friday, January 18, 2002 5:27 PM
TABLE 20.8
Piezomotors Operating Principles
Basic Idea
Schematic of Realization
A. Elliptic motion in the contact: two motion components with phase difference
Remarks u y = u y0 sin ( ω t + ϕ ) u x = u x0 sin ω t
1. One active link
Y
Input link
Output link Ux
X Eliptic motion
Input link
Uy
w Output link
u y = u y0 sin ( ω t + ϕ ) u x = u x0 sin ω t where uy0, ux0, ω, and ϕ are amplitudes, angular frequency, and phase of oscillatory motions of piezoelements, respectively
2. Two active links V
Output link
Ux Pad
Uy
Uy
V
Ux
c
B. Elliptic motion in the contact area: traveling wave
∗
u = u 0 cos 2 π / λ ( u – ct ) where u0, λ, and c are amplitude, length, and velocity of wave, respectively
Z V
wave
c
l
Y U*
X
C. Frictional anisotropy of contact
τ T
a)
Usually ---c ≥ 0.05 where τc and T are the duration of contact and oscillation period, respectively
Z
Y
b) Y′
Y
c) Z, X
Y
©2002 CRC Press LLC
0066_Frame_C20 Page 59 Wednesday, January 9, 2002 5:49 PM
TABLE 20.8
Piezomotors Operating Principles (Continued)
Basic Idea
Schematic of Realization
D. Asymmetrical oscillations cycles
Remarks
a) 2 1
b) f ϕ ϕ′
TABLE 20.9
Properties of Some Traveling Wave Piezomotors
Motor
Unit
USR60
USR45
USR30
Operating frequency Operating voltage Rated torque Rated output Rated rotational speed Mechanical time constant Weight Rotation irregularity Lifetime Operating temp. range
kHz Vrms Nm W rpm ms g % h °C
40 100 0.38 4 100 1 175 2 1000 −10 + 50
43 100 0.15 2.3 150 1 69 2 1000 −10 + 50
42 100 0.04 1.0 250 1 33 2 1000 −10 + 50
Traveling wave excitation is achieved simultaneously by excitating different phase oscillations of the same frequency and mode. This is accomplished by dividing the electrodes of the converters into n equal parts and connecting them to the n-phase generator of electrical vibrations, where n ≥ 3 phases are shifted between adjacent electrodes being 2π /n, or by using discrete converters. Piezomotors with frictional anisotropy of contact are based on oscillatory motion variations in normal active links contact direction in the cycle of oscillations. This is achieved by superposing additional periodic actions in the contact. The distinguishing feature is time τc /T ratio of the reduced duration of the contact to the oscillations period in contact parameter. The contact anisotropy can be achieved in two ways: (a) by locking the active link in a specified segment of the trajectory (Table 20.8, case C, a), (b) by superimposing oscillations of higher frequencies (Table 20.8, case C, b), in the direction of basic oscillations, or in perpendicular direction of basic oscillations (Table 20.8, case C, c) normal or tangential plane. Piezomotors with asymmetrical oscillations are based on the asymmetry of inertia forces in nonharmonic high frequency oscillations, multiple frequency oscillations (Table 20.8, case D, a), or forces of dry friction with nonlinear relationship between force and velocity (Table 20.8, case D, b). Asymmetric cycles of oscillations are generated by summing harmonics of multiple frequencies. The amplitude of each harmonic is chosen by variating electrode shape and area of divided electrodes or variating amplitude of the voltage supplied. Shift in voltage supply phases is used. Piezomotor efficiency in this case is lower, but designs of devices are characterized by higher—up to 0,002 µm—resolution in translational drive. Besides, this permits piezomotors of limited dimensions in both coordinates, which, in turn, is very important in a number of applications. ©2002 CRC Press LLC
0066_Frame_C20 Page 60 Wednesday, January 9, 2002 5:49 PM
Piezomotors are easily miniaturized; thus, micromotors are successfully developed. The rotational motor [5] of this type is a good example. It is 2 mm in diameter, 0.3 mm in height, and its volume is 3 0.49 mm . The motor stably rotates at any posture and the starting torque is about 3.2 µNm.
Piezoactuators with Several Degrees of Freedom Piezoelectric actuators with several degrees of freedom allow new class of mechanisms, capable of changing their parameters or kinematic structure under control. If one or both links of the kinematic pair are made from piezoactive material, it is possible to generate static displacement of its elements and quasi-static or resonant oscillations, resulting in generating forces or torque in contact area of links. Motion of one link relative to the other is obtained. Such kinematic pairs can be defined as active. Active kinematic pairs are characterized by • Control of number of degrees of freedom. The simplest one is to control friction in the pair, usually when the elements of the pair are closed by force. Here either the friction coefficient or magnitude of the force executing the closure can be varied. This is achieved by excitation of high frequency tangential or normal vibrations in the contact area of the pair. • Generation of forces or torque in the contact area between links. The direction of generated forces or torque is controlled by special shift of oscillations, e.g., by activating specific by sectioned electrodes of the transducer. • Possibilities to realize additional features: self-diagnostics, multifunctionality, self-repair, selfadaptation. The example is a robot’s eye (Fig. 20.84(a)) in which miniature CCD camera 1 is fixed in the passive sphere 2, contacting with piezoelectric ring 3. Constant pressure in the contact zone is realized by 1
2
3
4 5
U (t)
Electrodes
(a) 1 Contact points with link 1 pD b′ B b ′′
A
2
p/3
D
(b)
©2002 CRC Press LLC
Contact points with link 3
b ′ = b ′′ = p/4
3
FIGURE 20.84
Sectioned electrodes
0066_Frame_C20 Page 61 Wednesday, January 9, 2002 5:49 PM
Piezoelectric transducer
1
2
X
3
jx
4
x
Shaft 7
5
6
8
9
(a) Outer ring
Inductive transducer Rb
w
h1 dy Piezoelectric transducer
dz
(b)
FIGURE 20.85
permanent magnet 4. The system is a kinematic pair possessing three degrees of freedom. Electrodes 5 in the piezoelectric ring are sectioned (in this case - into three symmetric parts); activating any of them with AC of resonant frequency results in the rotation of the sphere around its axis, position of which is controlled by changing the activated electrode. Traveling wave oscillations generated in the ring (by applying three-phase AC to all three electrodes) result in the rotation of the sphere around the axis of the ring. Such type actuators possess approximately two angular seconds resolution in every direction–– higher than the requirements for robot vision systems. The existing methods to control types and forms of resonant oscillations make it possible to design mechanisms with the same active link being used in two kinematic pairs to increase redundancy in the system. A piezoelectric robot, based on active kinematic pairs, is shown in the Figure 20.84(b). It consists of passive material (e.g., steel) spheres 1 and 3, with piezoelectric transducer 2 between them. Springs ensure contact between all links. A robot with two spherical kinematic pairs possess six degrees of freedom. Kinematic pairs move due to piezomotor design methods. The electrodes on active links are sectioned. Figure 20.84(b) shows their form and the distribution of the three component oscillations in the contact area. High frequency multicomponent oscillations generated at the contact points (certain electrodes “A” of link 2 are actuated) rotate link 2 in relation to link 1. A π /3 change in the position of oscillation pattern (a change of position of vibration nodes in contact points) results in the rotation of link 3 in relation to link 2. Using direct piezoeffect, it is possible to extract additional information (with the help of electrodes “B”) on forces and torque, acting on link 2 and on the state of contacting surfaces. This information is used to reduce positioning errors and to correct motion trajectory. Classically, by increasing accuracy and stiffness of system elements, static and dynamic errors in bearings, supports, and guides are decreased or eliminated completely. By integrating unique properties of piezoactive transducers and actuators in the control system it is possible to sharply reduce or even fully
©2002 CRC Press LLC
0066_Frame_C20 Page 62 Wednesday, January 9, 2002 5:49 PM
eliminate most errors in bearings, supports, and guides used in high precision measuring devices. This is due to active bearings and supports possessing several degrees of freedom, in which one or both contacting elements are made from piezoactive material with predetermined excitation zones. Radial or axial play, backlash and dead zones—traditional errors—are minimized in these devices. The schematic of active bearing is shown in Fig. 20.85(a) where number of axial n and radial m electrode sectors is n = m = 3. Active bearings are used in precision component surface and profile measuring systems to scan the surface. The example is outer ring errors evaluation in high precision ball bearings. Here rotating the component simultaneous measurements of profile and surface are obtained. This is possible due to piezoelectric transducers (Fig. 20.85(b)) contacting with the component in two areas with the same pattern of oscillation distribution and phase shift between normal and tangential components of oscillations. There being no external forces, it is evident that errors caused by torque, generated in the contact zone, are negligible.
References 1. Cady, W. G., Piezoelectricity, Dover Publications, New York, 1964. 2. Volkov, V., Some Theoretical Problems in Modern Techniques of Diagnostics in Mechanical Systems, in Proc. Int. AMSE Conf. Systems Analysis, Control and Design, Lyon, France, 205. 3. Uchino, K., Piezoelectric Actuators and Ultrasonic Motors, Kluwer Academic Publishers, MA, 1997, 349. 4. Ragulskis, K., Bansevicius, R., Barauskas, R., Kulvietis, G., Vibromotors for Precision Microrobots, Hemisphere Publishing Corporation, 1988, 310. 5. Suzuki, Y., Tani, K., Sakuhara, T., Development of new type piezoelectric micromotor, J. Sensors & Actuators, 83, 244, 2000. 6. Catalog Ceramic Multilayer Actuator CMA d33 & d31, July 2000. 7. Sashida, T., Kenjo T., An Introduction to Ultrasonic Motors, Oxford Science Publications, 1993, Oxford University Press, New York, 242. 8. Ueha S., Tomikawa Y., Ultrasonic Motors, Theory and Application, Oxford Science Publications, Oxford Press, Oxford, 1993, 298.
20.4 Hydraulic and Pneumatic Actuation Systems Massimo Sorli and Stefano Pastorelli Introduction The primary function of an actuation system is to influence the controlled system so as to obtain the desired movement or action. This objective is made possible by the actuation system, which converts the primary energy with which the actuator operates into the final mechanical energy. There are three main types of power with which actuation systems work: electric power, hydraulic power, and pneumatic power. The first envisages the use of electric actuators such as motors, solenoids, and electromagnets. The remaining two envisage the use of cylinders (linear motors) and rotary motors, substantially similar in form and dimensions, the motion of which is respectively governed by a fluid considered uncompressible in an initial approximation (a hydraulic liquid, mineral oil generally, or a liquid with lower viscosity) and by a compressible fluid (compressed air or a generic gas). Other types of energy are available but are fairly unusual in automatic systems. Chemical energy and thermal energy, which cause a change of phase in a material or the thermodynamic expansion of the systems into a mechanical movement, can be considered in this category. The characteristics of fluid servosystems are examined below, with particular reference to systems which permit continuous control of one of the two physical magnitudes which express the fluid power: pressure and flow rate. In general, pressure control is carried out in cases in which it is necessary to create a determined force or torque law, while flow rate control is used to carry out controls on kinematic magnitudes such as position, speed, and acceleration.
©2002 CRC Press LLC
0066_Frame_C20 Page 63 Wednesday, January 9, 2002 5:49 PM
Continuous control of a force or of a speed can be effectively realized with a fluid actuation device, with evident advantages compared with electric actuation, such as the possibility of maintaining the system under load without any limitation and with the aid of adequate control devices, the possibility of carrying out linear movements directly at high speeds, without devices for transforming rotary motion to linear, and the possibility of having high bandwidths, in particular in hydraulic systems, as these have limited dimensions and therefore low inertia.
Fluid Actuation Systems An actuation system, which is part of an automatic machine, consists of a power part and a control part as illustrated in Fig. 20.86. The power part comprises all the devices for effecting the movements or actions. The control part provides for the processing of the information and generates the automated cycle and the laws of variation of the reference signals, in accordance with the governing procedures implemented and with the enabling and feedback signals arriving from the sensors deployed on the operative part. The order signals coming from the control part are sent to the operative part by means of the interface devices which convert and amplify the signals, where necessary, so that they can be used directly by the actuators. These interfaces can be the speed drives or the contactors of the electric motors, the distributor valves in hydraulic and pneumatic actuators. Figure 20.87 illustrates a fluid actuation system. The power part consists of the actuator—a doubleacting cylinder in the case in the figure—the front and rear chambers of which are fed by a 4/2 distributor valve, which constitutes the fluid power adjustment interface. The valve switching command is the order from the control part. This order is sent in accordance with the movement strategy, determined by the desired operating cycle of the cylinder in the control part, on the basis of the feedback signals from the sensors in the cylinder, represented in the figure by the limit switches. Then there are discontinuous actuation systems and continuous actuation systems, depending on the type of automation realized, while retaining the control part and the actuation part. The first are effective when used in discontinuous automation, typical of assembly lines and lines for the alternating handling of machine parts or components; on the other hand, continuous actuation systems are found in continuous process plants and as continuous or analog control devices for the desired magnitudes, and constitute fluid servosystems.
FIGURE 20.86
Actuation system.
FIGURE 20.87
Fluid power actuation system.
©2002 CRC Press LLC
0066_Frame_C20 Page 64 Wednesday, January 9, 2002 5:49 PM
FIGURE 20.88
Scheme of a fluid power servosystem.
Fluid actuators, whether they are linear (cylinders) or rotary (motors) are continuous systems as they can determine the positioning of the mobile component (of the rod with respect to the cylinder liner; of the shaft with respect to the motor casing) at any point in the stroke. Performance of the usual cylinders and motors is currently highly influenced by the action of friction (static and dynamic) developed by contacts between mobile parts. This action, in pneumatic systems in particular, gives rise to the wellknown phenomenon of stick-slip, or intermittent motion at very low movement speeds, due to the alternation of conditions of friction and adherence in the motion of the mobile element in the actuator. Given the nature of the friction itself, the presence of devices suitable for sustaining the mobile components of the actuator and maintaining the correct pressure conditions, such as supports and gaskets, gives rise to nonlinear conditions in the equilibrium of the actuator, increasing the level of difficulty in obtaining high precision in positioning the system. To overcome these problems in specific applications it is necessary to use actuators without seals, for example, with fluid static and/or fluid dynamic bearings. The interface element, indicated as a distributor in the figure, takes on a crucial role in the definition of the operating mode of the actuator. Indeed, in the case in which it is only necessary to create reciprocating movements, with positioning of the actuator at the end of its stroke, it is only necessary to use a two- or three-position distributor valve, with digital operation. This is the solution shown in Fig. 20.87. If, on the other hand, it is necessary to have continuous control of the position and force transmitted, it is necessary to use devices which are not digital now, but which are continuous, such as proportional valves and servovalves, or it is necessary to use digital devices operating with control signal modulation, for example those of the PWM (Pulse Width Modulation) type. The actuation system therefore becomes a fluid servosystem, such as the one outlined in Fig. 20.88, for example. A practical construction of a hydraulic linear servoactuator having the same working scheme of Fig. 20.88 is shown in Fig. 20.89. It consists of a cylinder, a valve, and a position transducer integrated in a single device. A controlled, fluid-actuated system is a classical mechatronic system, as it combines mechanical and fluid components, and control and sensing devices, and normally requires a simulation period for defining the size and characteristics of the various elements so as to comply with the desired specifications. The standardized symbols for the different components of hydraulic and pneumatic fluid systems, and the definitions of the associated circuits, are defined in the standard, ISO 1219 “Fluid power systems and components—Graphic symbols and circuit diagrams; Part 1: Graphics symbols, Part 2: Circuit diagrams.” Fluid Servosystems Fluid servosystems are devices for controlling a generically mechanical output power, either by controlling a kinematic magnitude (servosystems for controlling position or speed) or by controlling an action (servosystems for controlling the force, torque, or pressure). The output magnitude control action is obtained by controlling the fluid power, that is, by the power of the fluid passing through the components of the servosystem. Two large classes of fluid servosystems are usually present in current applications: hydraulic servosystems, in which the operating fluid is a liquid, and pneumatic servosystems, in which the fluid used is compressed air. The working pressure in hydraulic servosystems is typically comprised between 150 and 300 bar, while in the case of pneumatic systems, the pressure values are generally below 10 bar. ©2002 CRC Press LLC
0066_Frame_C20 Page 65 Wednesday, January 9, 2002 5:49 PM
FIGURE 20.89
Hydraulic servocylinder (Hanchen).
The first group obviously includes hydraulic oils, that is, fluid with high viscosity, now traditionally used in servosystems in which a high controlled pressure is requested, but also combustible fluids, such as automotive or aeronautical petrols (JPA, JPB,…), used in all the applications found in the fuel circuits of combustion engines. Other servosystems include those which use both industrial and seawater as the working fluid. The latter solution has unquestionable advantages in all naval and off-shore applications. Pneumatic servosystems include all the industrial applications for automation of production and process automation, and also the vehicular applications on means of air, sea, road, and rail transport. The compressed air in these applications is generated by compressors using air drawn in from the environment. Further applications include those in which the working fluid is not compressed air but a particular gas. In this regard, there are servosystems with refrigerant fluids in the gaseous stage, in both vehicular and industrial cryogenic systems, with fuel gases (LPG, methane, propane) in domestic applications, and with nitrogen in high-pressure applications. It can be seen from this preliminary analysis that fluid servosystems are present both in the realization of a product, being integral parts of the automated production process, along with the electric servomechanisms, and as controlled actuation devices integrated in the product itself; in this regard we can mention generic servoactuators installed on aeroplanes and increasingly in road vehicles today.
Hydraulic Actuation Systems The components of a hydraulic actuation system are: • • • • • • • •
the pump, that is, the hydraulic power generation system; the actuator, that is, the element which converts hydraulic power into mechanical power; the valve, that is, the hydraulic power regulator; the pipes for connecting the various components of the actuation system; the filters, accumulators, and reservoirs; the fluid, which transfers the power between the various circuit elements; the sensors and transducers; the system display, measurement, and control devices.
©2002 CRC Press LLC
0066_Frame_C20 Page 66 Wednesday, January 9, 2002 5:49 PM
FIGURE 20.90
Pumps classification.
Pumps Pumps transform electrical or mechanical energy into hydraulic energy. They constitute the fluid flow generator of the hydraulic system, as the pressure is determined by the fluid resistance downstream from the generator. The main types of pumps are shown in Fig. 20.90. Centrifugal pumps permit high deliveries with low pressures. They do not have internal valves but have a large clearance between the rotary part and stator part and guarantee a sufficiently stationary flow. Vice versa, hydrostatic or positive displacement pumps, which are those most commonly used, guarantee high pressures with limited deliveries. They have elements such as valves and caps, which permit separation of the delivery zone from the intake zone, and they may introduce pulses in the flow in the delivery line and generally require the use of a fluid with sufficient lubricating properties and load capacity, so as to reduce the friction between the sliding parts of the pump. There are constant displacement and variable displacement pumps. The main positive displacement pumps belong to the gear, rotary vane, and piston types. Gear Pumps Gear pumps are subdivided into pumps with external gears, pumps with internal gears, and screw pumps. In all cases, the pump is made up of two toothed wheels inserted into a casing with little slack so as to minimize leakage. Figure 20.91 is a photograph of a pump with external gears. The opposed rotation of the wheels causes the transfer of the oil trapped in the space between the teeth and walls of the gear from the intake to the outlet. Depending on the form of the teeth, there are external gear pumps of the spur gear, helical gear, and lobe gear types. Pumps with internal gears are functionally similar to the above, but in this case the gears rotate in the same direction. Figure 20.92 is a section plane of a two-stage pump. In screw pumps, which may have one or more rotors, the elements have helical toothing similar to a threaded worm screw. Transfer of the fluid takes place in an axial direction following rotation of the screw. These types of pump guarantee very smooth transfer of the flow, with reduced pulsation and low noise levels. The usual rotation speeds are between 1000 and 3000 rpm, with powers between 1 and 100 kW. Delivery pressures can reach 250 bar, with higher values in the case of the pumps with external gears. The flow transferred is a function of the pump displacement and the angular input speed, with values 2 comprised between 0.1 and 1000 cm /rev. Double pumps can be used to increase these values. Gear pumps have high performance levels, with values around 90%. Rotary Vane Pumps Vane pumps (Fig. 20.93) generally consist of a stator and a rotor, which can rotate eccentrically with respect to one another. Vanes can move in special slits placed radially in the stator or in the rotor and ©2002 CRC Press LLC
0066_Frame_C20 Page 67 Wednesday, January 9, 2002 5:49 PM
FIGURE 20.91
External spur gear pump (Casappa).
FIGURE 20.92
Internal gear pump (Truninger).
delimit appropriate variable volumes. In Fig. 20.93, as in most constructions, the vanes are borne by the rotor which can rotate inside the stator. Rotation leads to the displacement of volumes of fluid enclosed between two consecutive vanes from the intake environment to input into the delivery environment. This type of pump permits a range of working pressures up to 100 bar and, compared with gear pumps, guarantees lower pulsing of the delivery flow and greater silence.
©2002 CRC Press LLC
0066_Frame_C20 Page 68 Wednesday, January 9, 2002 5:49 PM
FIGURE 20.93
Rotary vane pump.
FIGURE 20.94
Axial piston swash plate pump (Bosch Rexroth).
Piston Pumps Volumetric piston pumps can have one or more cylinders; that is, there may be one or more cylinders with a piston sliding in each of them. Transfer of the volume of fluid from intake to delivery is determined by the displacement of the piston inside the cylinder, which is provided with input and output valves or shutters. Depending on the geometrical arrangement of the cylinders with respect to the rotating motor shaft, piston pumps are subdivided into axial pumps (bent axis type and swash plate type) and radial pumps. Figure 20.94 shows the plan of a fixed-displacement axial piston pump, of the swash plate type. The working pressure range available with the aid of piston pumps is greater than in the previous cases, being able to reach pressures in the order of 400–500 bar but with the disadvantage of more uneven flow. Motion Actuators Motion actuators convert the hydraulic energy of the liquid under pressure into mechanical energy. These actuators are therefore volumetric hydraulic motors and are distinguished, on the basis of the type of movement generated, similar to what has been said about pumps, into rotary motors, semi-rotary motors or oscillating ones, which produce limited rotation by the output shaft, and into linear reciprocating motors, that is hydraulic cylinders. Rotary and Semi-rotary Motors In construction terms, rotary motors are identical to rotary pumps. Therefore gear, vane, and piston motors, radial or axial, are available. Obviously, the operating principle is the opposite of what has been said for pumps. The symbols of hydraulic rotary motors are shown in Fig. 20.95. Semi-rotary motors generate the oscillating motion either directly, by means of the rotation of a vane connected to the output shaft, or indirectly, by coupling with a rack, driven by a piston, with a toothed wheel connected to the output shaft, as in the example in Fig. 20.96. The semi-rotary vane motors produce high instantaneous torsional torque on the output shaft; for this reason they are also called hydraulic torque-motors.
©2002 CRC Press LLC
0066_Frame_C20 Page 69 Wednesday, January 9, 2002 5:49 PM
FIGURE 20.95
Symbols of hydraulic rotary motors.
FIGURE 20.96
Hydraulic rotary actuator (Parker Hannifin).
Linear Actuators Linear hydraulic motors constitute the most commonly used type of actuator. They provide a rectilinear movement realized by the stroke of a rod connected to a piston sliding inside the cylinder. A distinction is made between single acting and double acting cylinders. The former only permit a single work stroke and therefore the pressure of the fluid is exerted on the surface of the piston in one single direction; the retract stroke is made by means of the force applied externally to the cylinder rod, or with the aid of a helical spring incorporated with the actuator inside a chamber. The latter permit both strokes, so that the fluid acts alternately on both faces of the piston, generating both the advance and retract strokes. Double acting cylinders may have a single rod or a double through rod. These are composed of a tube closed at the ends by two heads, and a mobile piston inside the barrel bearing one or two rods connected externally to the load to move. As it is fitted with sealing gaskets, the piston divides the cylinder into two chambers. By sending the oil under pressure into one of the chambers through special pipes in the heads, a pressure difference is generated between the two surfaces of the piston and a thrust transmitted to the outside by the rod. Figure 20.97 shows the constructional solution of a hydraulic double acting cylinder with a single rod. Single rod actuators are also known as asymmetrical cylinders because the working area on the rod side is smaller than the area of the piston, as it is reduced by the section of the rod itself.
©2002 CRC Press LLC
0066_Frame_C20 Page 70 Wednesday, January 9, 2002 5:49 PM
FIGURE 20.97
FIGURE 20.98
Single rod double-acting piston actuator (Atos).
Actuators simbols.
This involves actuating forces and feed speeds which are different in the two directions, with the same feed pressure in the two thrust chambers. Hydraulic actuators are able to support external overloads, as, if the load exceeds the available thrust force, the rod stops or reverses, but generally does not suffer any damage. Cylinders may get damaged however, or at least suffer a drop in performance, when they have to support loads which are not applied along the axis of the rod, that is, with components in the radial direction, as reactions are generated on the rod supports and piston bearings, which leads to fast wear of the same and reduces the tightness with oil leakage as a result. The main features of a linear actuator are its bore, its stroke, its maximum working pressure, the type of working fluid, and the way its connections are fitted. The symbols of the different types of actuators can be seen in Fig. 20.98. Valves Valves are the components in hydraulic circuits that carry out the task of regulating the hydraulic power sent to the actuator. Their role is to turn the oil flow on or off or to divert it according to needs, thereby permitting adjustment of the two fundamental physical magnitudes of fluid transmission: pressure and flow rate. They are subdivided as follows on the basis of the operations they carry out: • • • •
directional valves on-off valves pressure regulator valves flow-rate regulator valves
In servomechanism applications valves with the continuous positioning of the moving components in them, said flow proportional valves or servovalves, and pressure proportional valves are used. Directional Valves Directional valves determine the passage and the flow direction of the oil current by means of the movement of appropriate moving parts contained in them, actuated from outside. Directional valves, ©2002 CRC Press LLC
0066_Frame_C20 Page 71 Wednesday, January 9, 2002 5:49 PM
a)
FIGURE 20.99
b)
Scheme of four-way two-position valve.
also known as distributors, are distinguished according to the type of mobile element and therefore of their internal structure, by the number of possible connections with external pipes and by the number of switching positions. The mobile element can be a poppet type or a spool type. Poppet valves are indifferent to fluid type and are not affected by impurities in the fluid, but require high actuating forces as it is not possible to compensate for the hydraulic forces of the oil pressure. Spool valves permit simultaneous connection to several ways and different switching schemes and therefore are more common because of their variability. The number of possible connections is defined by the number of hydraulic connections or ways present on the external body of the valve. The number of switching positions corresponds to the number of connection schemes which a valve makes it possible to obtain by means of appropriate movements of the mobile element. Figure 20.99 shows the operating scheme of a four-way, two-position spool valve (indicated as 4/2) connected to a double acting linear actuator. In the first position (Fig. 20.99(a)) the supply is in communication through output A with the rear chamber of the cylinder, while the front chamber discharges through port B. In this configuration, the piston effects an advance stroke with the rod coming out. In the second position, (Fig. 20.99(b)), the result of the movement of the slide valve is that the feed and discharge conditions of the two chambers are inverted, and therefore, a retract stroke is effected. A directional valve with several positions is represented symbolically by means of quadrants side by side depicting the connections made by each position. Figure 20.100, for example, shows some directional valve symbols in accordance with ISO standards. The central configuration of the three-position valves, which is normally the rest position, is linked with the geometry of the valve spool and of the associated seats. Directional valves can be controlled in various ways (Fig. 20.100): manually, by applying muscle power; mechanically, by means of devices such as cams, levers, etc.; hydraulically and pneumatically, by means of fluids under pressure; and electromagnetically, directly or piloted, depending on whether the positioning force is generated directly by the electromagnet placed in line with the slide valve, or by means of a hydraulic fluid, the direction of which is managed by a pilot valve which is smaller than the main controlled valve. On-Off Valves On-off valves are unidirectional valves, which permit the fluid to flow in one direction only. Because they impede flow in the opposite direction they are also called nonreturn or check valves. On-off valves are normally placed in the hydraulic circuit between the pump and the actuator so that, when the generator stops, the fluid contained in the system is not discharged into the reservoir but remains in the piping. This prevents a waste of energy for subsequent refilling and guarantees positioning of the actuator under load. Constructively, check valves consist of an actuator, with ball or piston, which in the impeded flow configuration is maintained in contact against its seat by the thrust of a spring (nonreturn valve), or by the pressure difference between inlet and outlet (unidirectional valve). Pressure Regulator Valves There are essentially two types of pressure regulator valves: pressure limiter valves or relief valves, and pressure reduction valves. ©2002 CRC Press LLC
0066_Frame_C20 Page 72 Wednesday, January 9, 2002 5:49 PM
FIGURE 20.100
Valves symbols.
Relief valves guarantee correct operation of the system, preventing the pressure from exceeding danger levels in the system itself. There is always one maximum pressure valve in a hydraulic circuit to discharge any excess flow not used by the system back towards the reservoir. This is because the generator, or positive-displacement pump, provides a continuous flow of fluid which, if not absorbed by the user and in the absence of a relief or maximum pressure valve, would let the pressure in the system increase to unacceptable values. Pressure limiter valves can be direct-acting or piloted. The first provides the force of a spring with a fixed preload as the force contrasting the pressure of an obturator or an adjustable one, which guarantees the maximum opening pressure. The latter replaces the action of the spring with that of the hydraulic control fluid managed by a pilot valve. The function of the pressure regulator valves is to maintain a constant pressure valve downstream from them, independently from variations in the upstream pressure. The regulated pressure value can be set manually, by means of a pilot signal, or by an electrical analog command. In the latter case, pressure regulator valves may operate in closed electrical loops, as they have an internal transducer to measure the controlled pressure. Flow-rate Regulator Valves A flow-rate regulator valve makes it possible to control the intensity of the flow of fluid passing through it. Functionally it operates as a simple restriction, similar to an orifice, with a variable area. The flow passing through a restriction is a function of the area of passage and of the difference in the pressures upstream and downstream from the component. The simple restriction is therefore sensitive to the load, as the flow rate also depends on the pressure drop at its ends, which is established by the other components in the circuit. In the case of a pressure-compensated flow regulator valve, the flow rate is found to be maintained sufficiently constant above a minimum pressure stage (typically 10 bar) as an exclusive function of the external manual or electrical set-point. In this case, the valve has two restrictions in series, one of which is fixed and the other automatically variable, so as to maintain the pressure drop constant on the fixed restriction and guarantee the constancy of the flow rate. The symbols for flow regulator valves in accordance with ISO standards are given in Fig. 20.101. ©2002 CRC Press LLC
0066_Frame_C20 Page 73 Wednesday, January 9, 2002 5:49 PM
FIGURE 20.101
Symbols of flow control valves.
Proportional Valves and Servovalves Servovalves began to appear at the end of the 1930s and were mainly used in the military and aeronautical fields. The first commercial versions appeared in the mid-50s. Servovalves and proportional valves are widely used today in the civil field, in the aeronautical, aerospace, automotive, and industrial sectors. In general, they are used for the continuous control of the displacement, speed, and force of a hydraulic actuator from which high performance is requested in terms of positioning precision, or accuracy in up and running conditions, and of working frequency bandwidth amplitude, both in open and closed loop control configurations. A servovalve or proportional valve is a fluid component capable of producing a controlled output as a function of an input of electrical type. The device converting the electric signal into an action of the spool or poppet of the valve is electromagnetic, of the torque motor or proportional solenoid type. The torque motor converts a small DC current into torque acting on the rotor plate, in bipolar mode. Proportional solenoids produce a unidirectional force on the mobile armature function of the current circulating in the winding, with the characteristic of maintaining this force approximately constant within the cursor work displacement range. The torque motor, with lower current and inductance values, has shorter response times than the servosolenoid, which operates with notably higher currents, but generates lower mechanical power outputs. The torque motor, therefore, constitutes the pilot stage usually found in servovalves, while the servosolenoid used in proportional valves acts directly on the valve spools. The magnitude directly controlled by the servovalve or proportional valve can be a flow rate or a pressure difference, depending on the type. Servovalves and proportional valves are usually distinguished on the basis of the following characteristics: • • • • • •
input signals precision hysteresis linearity between input and output dead band bandwidth
Input signals are characterized by the type of signal and range of variation. Current signals (±10 mA or 4–20 mA) or voltage ones (0–10 V) are typical. Precision is intended as the difference between the desired value and the value effectively achieved. It is provided as a percentage of the full scale value. The hysteresis derives from the different behavior shown by the component with ascending settings and corresponding points descending. Its value expresses the percentage ratio between the maximum deviation and the full scale value. Linearity by nature is a characteristic that can be assessed over the entire working range. It can be expressed in an absolute manner as the maximum percentage deviation of the input/output relation of its linear regression. In general, better linearity is requested in position control compared with the cases of speed, pressure, or force controls. The dead band determines the minimum input value at which an output variation is obtained. Unlike the above, bandwidth is a ©2002 CRC Press LLC
0066_Frame_C20 Page 74 Wednesday, January 9, 2002 5:49 PM
TABLE 20.11
Main Typical Differences Between Servovalves and Proportional Hydraulic Valves
Electromechanical converter Input current Flow rate Hysteresis Bandwidth
Radial clearance of the spool Dead band of the spool
Servovalve
Proportional Valve
Bidirectional torque motor (0.1 ÷ 0.2 W) with nozzle-flapper or jet pipe 100 ÷ 200 mA 2 ÷ 200 l/min (two stage type) with valve pressure drop = 70 bar 0, ∀t. ©2002 CRC Press LLC
0066_Frame_C24 Page 6 Thursday, January 10, 2002 3:43 PM
i(t)
f(t)
h(t)
+
R
L
e(t)
v(t)
mg
FIGURE 24.2
Magnetic levitation system.
The attraction force on the sphere, f(t), depends on the distance h(t) and the current, i(t). This relation can be approximately described by
K1 - i(t) f ( t ) = --------------------h ( t ) + K2
(24.27)
where K1 and K2 are positive constants. Using first principles we can write
di ( t ) e ( t ) = Ri ( t ) + L ----------dt
(24.28)
dh ( t ) v ( t ) = – ------------dt
(24.29)
K1 dv ( t ) - i ( t ) = mg + m -----------f ( t ) = --------------------h ( t ) + K2 dt
(24.30)
We next choose as state variables: the current i(t), the sphere position h(t), and the sphere speed v(t), i.e.,
x ( t ) = [ x1 ( t ) x2 ( t ) x3 ( t ) ] = [ i ( t ) h ( t ) v ( t ) ] T
T
(24.31)
Then, from (24.28)–(24.30) we can set the system description as in (24.1) yielding
dx 1 ( t ) di ( t ) 1 R ----------- = -------------- = – --- x 1 ( t ) + --- e ( t ) dt dt L L
(24.32)
dx 2 ( t ) dh ( t ) ------------- = -------------- = –x3 ( t ) dt dt
(24.33)
dx 3 ( t ) K1 dv ( t ) ------------ = -------------- = ---------------------------------x (t) – g dt dt m ( x2 ( t ) + K2 ) 1
(24.34)
Before one can build the linearized model, an equilibrium point has to be computed. The driving input in this system is the source voltage e(t). Say that the equilibrium point is obtained with e(t) = EQ.
©2002 CRC Press LLC
0066_Frame_C24 Page 7 Thursday, January 10, 2002 3:43 PM
Hence, the state in equilibrium can be computed from (24.32) to (24.34), setting all the derivatives equal to zero, i.e.,
E R 1 − ---x 1Q + --- E Q = 0 ⇒ x 1Q = -----QL R L
(24.35)
– x 3Q = 0 ⇒ x 3Q = 0
(24.36)
K1 K K1 EQ -----------------------------x – g = 0 ⇒ x 2Q = ------1- x 1Q – K 2 = ----------- – K2 m ( x 2Q + K 2 ) 1Q mg mgR
(24.37)
The setting now is adequate to build the linearized model in the incremental input ∆e(t) and the T incremental state ∆x(t) = [∆x1(t) ∆x2(t) ∆x3(t)] . The result is
d∆ x 1 ( t ) R 1 -------------------- = – ---∆ x 1 ( t ) + --- ∆e ( t ) dt L L
(24.38)
d∆ x 2 ( t ) -------------------- = – ∆ x 3 ( t ) dt
(24.39)
2 d∆ x 3 ( t ) Rg Rmg -------------------- = ------ ∆ x 1 ( t ) – ------------- ∆ x 2 ( t ) K1 EQ dt EQ
(24.40)
If we define as the system output, the sphere position h(t), we can then compare the above equations with (24.23) and (24.24) to obtain
A =
– R--L-
0
0
0
0
–1 ,
Rg -----EQ
B =
2
-------------– Rmg K E
0
1 --L
0 0
,
0 C = 1 , 0
D = 0
(24.41)
1 Q
In the sequel we will drop the prefix ∆, but the reader should bear in mind that the model above is linear in the incremental components of the state, the inputs and the outputs around a chosen equilibrium point.
Linear State Space Models Our starting point is now the linear time invariant state space model
dx ( t ) ------------- = Ax ( t ) + Bu ( t ) dt
(24.42)
y ( t ) = Cx ( t ) + Du ( t )
(24.43)
The solution to Eq. (24.42), subject to x(to) = x o, is given by
x(t) = e
©2002 CRC Press LLC
A ( t−t o )
xo +
∫
t
to
e
A ( t−t )
Bu ( t ) dt
∀t ≥ t o
(24.44)
0066_Frame_C24 Page 8 Thursday, January 10, 2002 3:43 PM
At
where the transition matrix e satisfies
e
At
= I+
∞
∑ ---k!- A t 1
k k
(24.45)
k=1
The interested reader can check that (24.44) satisfies (24.43). To do that he/she should use the Leibnitz’s rule for the derivative of an integral. With the above result, the solution for (24.43) is given by
y ( t ) = Ce
A ( t−t o )
xo + C
∫
t
to
e
A ( t−t )
Bu ( t ) dt + Du ( t )
(24.46)
System Dynamics The state of the system has two components: the unforced component, x u(t), and the forced component, x f (t), where
xu ( t ) = e
A ( t−t o )
∫
xf ( t ) =
t
to
xo
(24.47)
e A ( t−t ) Bu ( t ) dt
(24.48)
To gain insight into the state space model and its solution, consider the case when to = 0 and u(t) = 0 ∀t ≥ 0, i.e., the state has only the unforced part. Then
x ( t ) = e At x o
(24.49)
Further assume that A ∈ and that, for simplicity, it has distinct eigenvalues λ1, λ2,…, λn with n (linearly independent) eigenvectors v1, v2,…, vn. Then there always exists a set of constants α1, α2,…, αn such that n
n
xo =
∑a v ,
a ∈
(24.50)
=1
k
k
k
k
A well-known result from linear algebra tells us that the eigenvalues of A are l 1 , l 2 ,…, l n with corresponding eigenvectors v1, v2,…, vn. The application of this result yields
At
∞
n
∑ ∑ a
=1
1 k ---- A k v t = k! k=1
x ( t ) = e xo = I +
k l v
n
∑a e
l t
v
(24.51)
=1
This equation shows that the unforced component of the state is a linear combination of natural modes, l t {e }, each of which is associated with an eigenvalue of A. Hence the matrix A determines: • the structure of the unforced response • the stability (or otherwise) of the system • the speed of response When the matrix A does not have a set of n independent eigenvectors, Jordan forms can be used (see, e.g., [9,10]). ©2002 CRC Press LLC
0066_Frame_C24 Page 9 Thursday, January 10, 2002 3:43 PM
Structure of the Unforced Response In the absence of input, the state evolves as a combination of natural modes which belong to a defined class of functions: all those generated by exponentials with either real or complex exponents. Hence these modes include constants, real exponentials, pure sine waves, exponentially modulated sine waves, and some other specials functions arising from repeated eigenvalues. To illustrate these ideas and their physical interpretation consider the system in Example 24.1. For that system
A =
0
1
K – ---M
D – ---M
(24.52)
Hence, the system eigenvalues are solutions to the equation
D K 2 det ( lI – A ) = l + ----- l + ----- = 0 M M
(24.53)
i.e., 2
D D K l 1,2 = − -------- ± ----------2 – ----2M 4M M
(24.54)
Hence, when the damping is zero (D = 0), the system eigenvalues are a couple of conjugate imaginary numbers, and the two natural (complex) modes combine to yield a sustained oscillation with angular frequency ωo = K/M . This is in agreement with our physical intuition, since we expect a sustained oscillation to appear when the system has nonzero initial conditions even if the external force, f(t), is zero. 2 When the system is slightly damped (D < 4KM), the matrix eigenvalues are conjugate complex numbers, and the associated complex natural modes combine to yield an exponentially damped sine wave. This also agrees with intuition, since the energy initially stored in the mass and the spring will periodically go from the mass to the spring and vice versa but, at the end, it will completely dissipate, as heat, in the viscous friction. 2 Finally if the damping is high (D > 4KM), the matrix eigenvalues are a couple of negative real numbers, and the natural modes are two decaying exponentials. The heavy damping will preclude oscillations and the initial energy will dissipate quickly. The three different situation are illustrated in Fig. 24.3. For this simulation we have used three different values of the viscous friction constant D and
M = 2 kg,
K = 0.1 N/m,
d ( 0 ) = 0.3 m,
v ( 0 ) = 0.05 m/s
(24.55)
Note that, except when there is no friction (D = 0), the mass comes to rest asymptotically.
Mass displacement [m]
0.4
0.2
0
-0.2
-0.4
FIGURE 24.3
D=0 D=0.2 D=2
0
5
10
15
20
25 Time [s]
Unforced response of a mass-spring system.
©2002 CRC Press LLC
30
35
40
45
50
0066_Frame_C24 Page 10 Thursday, January 10, 2002 3:43 PM
Structure of the Forced Response When the initial state is zero, the state will exhibit only the forced component. The forced component of the state will include natural modes and some additional forced or particular modes, which depend on the nature of the system input u(t). In general the forcing modes in the input will also appear in the state. However, some special cases arise when some of the forcing modes in u(t) coincide with some system natural modes. System Stability Stability in linear, time-invariant systems can also be analyzed using the state matrix A. All systems variables can be expressed as linear functions of the state and the system input. When the system input u(t) is a vector of bounded time functions, then the boundeness of the system variables depends on the state to be bounded. We then have the following result: Theorem 24.1 Consider a system with the state description (24.42) and (24.43) where B, C, and D have bounded elements. Then the system state (and hence the system output) is bounded for all bounded inputs if and only if the eigenvalues of A have negative real parts. To illustrate this theorem we again consider the magnetic levitation system from Example 24.2. For that system the matrix A (in the linearized model) is given by
A =
R – --L
0
0
0
Rg -----EQ
0 (24.56)
–1 2
Rmg – -------------K1 EQ
0
and its eigenvalues are the roots of det(λI − A) = 0, where 2
2
R Rmg Rmg det ( lI – A ) = l + --- l – ------------- l + ------------- K1 EQ K1 EQ L
(24.57)
One can then see that the set of matrix eigenvalues includes one which is real and greater than zero. This implies that the system is unstable. This is in agreement with physical reasoning. Indeed, at least theoretically, we can position the sphere in equilibrium (this is described by x2Q in (24.37)). However, this is an unstable equilibrium point, since as soon as we slightly perturb the sphere, it accelerates either towards the ground or towards the magnet. Speed of Response and Resonances Even if the system is stable there are still some questions regarding other fundamental properties. To start with, in stable systems the real part of the eigenvalues determines the speed at which the associated mode converges to zero. The slowest modes, the dominant modes, determine the speed at which the system output settles at its steady state value, i.e., determine the system speed of response. For example, if the system dominant eigenvalues are λ 1,2 = −σ ± jw o , σ > 0, the combined natural modes generate an exponentially −st damped sine wave y(t) = Ae sin(ωot + α). We then observe that this signal decays faster for a larger σ. A second issue, of special importance for flexible structures, is the presence of resonances, which have associated complex eigenvalues. In physical systems, the existence of complex eigenvalues is intimately connected to the presence of two forms of energy. The resonance describes the (poorly damped) oscillation between those two forms of energy. In electric circuits those energies are the electrostatic energy in capacitors and the electromagnetic energy in inductors. In mechanical systems we have the kinetic energy of moving masses and the potential energy in springs. Flexible structures may have many resonant modes. One of the main problems with resonances occurs when the input contains energy at a frequency ©2002 CRC Press LLC
0066_Frame_C24 Page 11 Thursday, January 10, 2002 3:44 PM
close to the resonant frequency. For example, if a system has eigenvalues λ1,2 = −0.05 ± j, i.e., the resonant frequency is 1 rad/s and, additionally, one of the input components is a sine wave of frequency 0.9 rad/s, then the system output exhibits a very large (forced) oscillation with amplitude initially growing almost linearly and later, stabilizing to a constant value. In real situations this phenomenon may destroy the system (recall the Tacoma bridge case).
State Similarity Transformation We have already said that the choice of state variables is nonunique. Say that we have a system with input n u(t), output y(t), and two different choices of state vectors: x(t) ∈ with an associated 4-tuple (A, B, n C, D), and x (t) ∈ with an associated 4-tuple ( A, B, C, D ). Then there exists a nonsingular matrix n×n T ∈ such that
x ( t ) = Tx ( t ) ⇔ x ( t ) = T –1 x ( t )
(24.58)
This leads to the following equivalences:
A = TAT , –1
B = TB,
C = CT
–1
(24.59)
Different choices of state variables may or may not respond to different phenomenological approaches to the system analysis. Sometimes it is just a question of mathematical simplicity, as we shall see in section 24.6. In other occasions, the decision is made considering relative facility to measure certain system variables. However, what is important is that, no matter which state description is chosen, certain fundamental system characteristics do not change. They are related to the fact that the system eigenvalues are invariant with respect to similarity transformations, since
det ( lI – A ) = det ( lTT – TAT ) = det ( T )det ( lI – A )det ( T ) –1
–1
–1
= det ( lI – A )
(24.60) (24.61)
Hence, stability, nature of the unforced response, and speed of response are invariants with respect to similarity transformations. Example 24.3 Consider the electric network shown in Fig. 24.4 T T We choose the state vector x(t) = [x1(t) x2(t)] = [iL(t) vc(t)] . Also u(t) = vf (t). Using first principles we have that
dx ( t ) ------------- = dt
0 1 – --C
1 --L R1 + R2 – ----------------R1 R2 C
x(t) +
i (t)
0 1 ---------R1 C
u(t)
(24.62)
i2 (t)
R1 + vf (t)
FIGURE 24.4
Electric network.
©2002 CRC Press LLC
C
L iL (t)
R2
vC (t)
0066_Frame_C24 Page 12 Thursday, January 10, 2002 3:44 PM
An alternative state vector is x ( t ) = [ x 1 ( t ) that
T
x2 ( t ) ] = [ i ( t )
1 1
T
x(t)
(24.63)
1 R2 x ( t ) = ---R2 0
i 2 ( t ) ] . It is straightforward to show
T
State Space and Transfer Functions The state space description of linear time invariant systems is an alternative description to that provided by transfer functions. Strictly speaking, the state space description has a wider scope, as we shall see in this subsection. m p For a linear time invariant system with input u(t) and output y(t) , the transfer function, p ×m H(s) C , is defined by the equation
Y ( s ) = H ( s )U ( s ),
Yi ( s ) [ H ( s ) ] ij = ----------Uj ( s )
where
(24.64) th
i.e., the (i, j) element in matrix H(s) is the Laplace transformation of the response in the i output when th a unit impulse is applied at the j input, with zero initial conditions and with the remaining inputs equal to zero for all t ≥ 0. On the other hand, if we Laplace-transform (24.42) and (24.43) with zero initial conditions, we obtain
X ( s ) = ( sI – A ) BU ( s ) –1
(24.65)
Y ( s ) = CX ( s ) + DU ( s ) = ( C ( sI – A ) B + D ) U ( s )
(24.66)
–1
H(s)
For simplicity, and to be able to go deeper into the analysis, in the remaining part of this section we will focus our attention on the class of scalar systems, i.e., systems with a single input and a single output (SISO systems). This means that m = p = 1, B becomes a column vector, C is a row vector, and D = H(∞) (in real systems it usually holds that D = H(∞) = 0). For SISO systems, H(s) is a quotient of polynomials in s, i.e.,
C Adj ( sI – A )B + D det ( sI – A ) H ( s ) = ---------------------------------------------------------------------------det ( sI – A )
(24.67)
where Adj(o) denotes the adjoint matrix of (o). A key issue is that the transfer function poles are eigenvalues of matrix A. However, it is not true, in general, that the set of transfer function poles is identical to the set of matrix A eigenvalues. This can be appreciated through the following example. Example 24.4 Let
A = –2 1 , 0 –3 ©2002 CRC Press LLC
B =
1 , 0.5
C = 0
1 ,
D = 0
(24.68)
0066_Frame_C24 Page 13 Thursday, January 10, 2002 3:44 PM
Then
1 –1 H ( s ) = C ( sI – A ) B = -------------------------------- 0 (s + 2)(s + 3)
1
s+3 1 1 0 s + 2 0.5
0.5 ( s + 2 ) 0.5 = -------------------------------- = --------------(s + 2)(s + 3) (s + 3)
(24.69)
(24.70)
Therefore, the transfer function has only one pole, although matrix A has two eigenvalues. We observe that there is a pole–zero cancellation in H(s). This phenomenon is closely connected to the question of system properties, which is the central topic in section 24.6. To acquire a phenomenological feeling on this issue, consider again the magnetic levitation system in Example 24.2. If we define the current i(t) as the system output we can immediately see that the transfer function from the input e(t) to this output has only one pole. This contrasts with the fact that the dimension of the state is equal to three. The explanation for this is that, in our simplified physical model, the current i(t) is unaffected by the position and the speed of the metallic sphere (note that we have neglected the changes in the inductance due to changes in the sphere position). The key result is that the transfer function may not provide the same amount of information than the state space model for the same system. An interesting problem is to obtain a state space description from a given transfer function. The reader must be aware that the resulting state space model does not reveal pole-zero cancellations; for that reason, the obtained description is known as a minimal realization. There are many methods to go from the transfer function to a state space model. We present below one of those methods. Consider a transfer function given by n−1 n−2 Bo ( s ) b n−1 s + b n−2 s + … + b 1 s + b 0 H T ( s ) = -----------+ H T ( ∞ ) = ------------------------------------------------------------------------------ + HT ( ∞ ) n n−1 Ao ( s ) s + a n−1 s + … + a 1 s + a 0
(24.71)
We first recall that D = HT(∞). We can thus concentrate on the transfer function H(s) = HT(s) − HT(∞), which is a strictly proper transfer function. Consider next a variable v ( t ) ∈ whose Laplace transform, V(s), satisfies −1
s V ( s ) = ------------U ( s ), Ao ( s )
∈ { 1, 2,…, n }
(24.72)
This implies that
dv −1 ( t ) -, v ( t ) = -----------------dt Y(s) =
n
∑b
−1
∈ { 2,…, n }
(24.73)
V ( s )
(24.74)
=1
n n −1 Ao ( s ) s s U ( s ) = ------------U ( s ) = ------------U ( s ) + a −1 ------------U ( s ) Ao ( s ) Ao ( s ) A0 ( s ) =1
sV n ( s )
©2002 CRC Press LLC
∑
V ( s )
(24.75)
0066_Frame_C24 Page 14 Thursday, January 10, 2002 3:44 PM
Now choose as state variables,
x (t) = v(t)
(24.76)
The above equations yield
0 1 0 ⋅⋅⋅ 0 0 0 0 1 ⋅⋅⋅ 0 0 A = , – a 0 – a 1 – a 2 ⋅⋅⋅ – a n−2 – a n−1 C = [ b0
b1
b2
…
b n−1 ],
0 0 B = 0 1
D = HT ( ∞ )
(24.77)
(24.78)
Example 24.5 The transfer function of a system is given by
4s – 10 4s – 10 - = ------------------------H ( s ) = --------------------------------2 3 2 s + 3s – 4 (s + 2) (s – 1)
(24.79)
Then a minimal realization for this system is
0 1 0 A = 0 0 1 , 4 0 –3 C = – 10 4 0 ,
0 B = 0 1
(24.80)
D = 0
(24.81)
A key result is that a system transfer function is invariant with respect to state similarity transformations.
24.4 State Space Description for Discrete-Time and Sampled Data Systems In this section we will present an overview of the state space description for discrete time systems, mainly based on the results presented for the continuous time case. Discrete time models may arise from two different sources: • From a pure discrete-time system, usually nonlinear, whose variables are defined only at specific time instants tk. Systems like that can be found in economic systems, stochastic process theory, etc. • From a discretization of a continuous-time system. In this case, we are only concerned with the value of some system variables at specific time instants. These models are useful when digital systems, such as microcontrollers, computers, PLCs, or others, interact with continuous-time real 1 systems such as mechanical structures, valves, tanks, analog circuits or a whole industrial process . These are called sampled data systems. In both cases our analysis will be focused on the class of linear and time invariant models. 1
Through digital-to-analog and analog-to-digital converters (DAC and ADC, respectively).
©2002 CRC Press LLC
0066_Frame_C24 Page 15 Thursday, January 10, 2002 3:44 PM
Linearization of Discrete Time Systems The discrete time equivalents to (24.3) and (24.4) are given by the nonlinear equations
x [ t + 1 ] = F d ( x [ t ], u [ t ] )
(24.82)
y [ t ] = G d ( x [ t ], u [ t ] )
(24.83)
The linearization of models for discrete time systems follows along the same lines to that for continuous ones. Consider firstly an equilibrium point given by {xQ, uQ, yQ}:
xQ = Fd ( xQ , uQ )
(24.84)
yQ = Gd ( xQ , uQ )
(24.85)
Note that an equilibrium point is defined by a set of constant values of the state and constant values of the input which satisfy (24.82) and (24.83). This yields a constant system output. The discrete model can then be linearized around this equilibrium point. Defining
∆x [ t ] = x [ t ] – x Q ,
∆u [ t ] = u [ t ] – u Q ,
∆y [ t ] = y [ t ] – y Q
(24.86)
we have the state space model
∆x [ t + 1 ] = A d ∆x [ t ] + B d ∆u [ t ]
(24.87)
∆y [ t ] = C d ∆x [ t ] + D d ∆u [ t ]
(24.88)
where
∂F d A d = -------∂x
x=x Q u=u Q
,
∂F d B d = -------∂u
x=x Q u=u Q
,
∂ Gd C d = ---------∂x
x=x Q u=u Q
,
∂G d D d = --------∂u
x=x Q u=u Q
(24.89)
Sampled Data Systems As we have already said, discrete time models are frequently obtained by sampling inputs and outputs in continuous-time systems. When a digital device is to be used to act upon a continuous-time system, the command signals need only to be defined at specific instants, and not at all time. However, to be able to act upon the continuous-time system, we need a continuous-time signal. This is usually built with a zero order hold, which generates a staircase signal. Also, when we want to digitally measure a system variable this is done at some specific time instants. This means that we must sample the output signals. Figure 24.5 illustrates these concepts. If we assume a periodic sampling, with period ∆, we are only interested in the signals at time k∆. In the sequel we will drop ∆ from the arguments, using u(k∆) = u[t] for the input, y(k∆) = y[t] for the output, and x(k∆) = x[t] for the system state.
Hold u[t]
FIGURE 24.5
u s(t)
Continuous Time System
Schematic representation of a sampled data system.
©2002 CRC Press LLC
Sample y(t)
y[t]
0066_Frame_C24 Page 16 Thursday, January 10, 2002 3:44 PM
If we consider the continuous, time-invariant, and linear state space model defined by equations (24.42) and (24.43), with initial state x(k 0 ∆) = x0, we can use Eq. (24.44) to calculate the next value of the state:
x ( k0 ∆ + ∆ ) = e
A ( k 0 ∆+∆−k 0 ∆ )
∫
x ( k0 ∆ ) +
k 0 ∆+∆ A ( k ∆+∆−t ) 0
e
k0 ∆
B u ( t ) dt
(24.90)
Furthermore, if a zero order hold is used, i.e., u(t) = u(k0∆) for k 0 ∆ ≤ t < k 0 ∆ + ∆, we obtain
x ( k0 ∆ + ∆ ) = e x ( k0 ∆ ) + A∆
∫
∆
0
e dhB u ( k 0 ∆ ) Ah
(24.91)
And, if we know the state and the input at time k 0 ∆, the output is defined by Eq. (24.43):
y ( k 0 ∆ ) = Cx ( k 0 ∆ ) + D u ( k 0 ∆ )
(24.92)
We can now conclude that given a continuous-time model with state space matrices {A, B, C, D}, and we sample inputs and outputs every ∆ seconds then, the equivalent sampled data systems will be described by the discrete-time state space model:
x ( k∆ + ∆ ) = A d x ( k∆ ) + B d u ( k∆ )
(24.93)
y ( k∆ ) = C d x ( k∆ ) + D d u ( k∆ )
(24.94)
where
A d = e A∆ ,
Bd =
∫
∆
C d = C,
Ah
e dhB,
0
Dd = D
(24.95)
There are different methods to obtain Ad defined in (24.95), but a simple way to calculate this matrix is to use Laplace transformation. This yields
Ad = e
A∆
= L { ( sI – A ) } –1
–1
(24.96)
t =∆
Example 24.6 Consider the mechanical system of Example 24.1 on the page 4, that was described by the state space model:
x˙1 ( t ) x˙2 ( t )
=
0
1
K D - – ----– ---M M
x1 ( t )
+
x2 ( t )
0 1 – ---M
f (t)
(24.97)
where f(t) is the external force, and where we can choose either the mass position, x1(t), or the mass velocity, x2(t), of the mass, as the system output. For the purpose of a numerical illustration, we set M = 1 kg, D = 1.2 N s/m, and K = 0.32 N/m. The matrix Ad is obtained from (24.96), applying inverse Laplace transformation
–1 Ad = L s 0.32 s + 1.2 –1
©2002 CRC Press LLC
–1
= t =∆
2e
– 0.4∆
0.8 ( e
–e
– 0.4∆
2.5 ( e
– 0.8∆
–e
– 0.8∆
)
–e
– 0.4∆
– 0.4∆
–e
+ 2e
– 0.8∆
– 0.8∆
)
(24.98)
0066_Frame_C24 Page 17 Thursday, January 10, 2002 3:44 PM
and the Bd matrix is obtained from (24.95):
Bd =
∫
∆
0
2e
– 0.4h
0.8 ( e
⇒ B d = – 6.25 e
–e
– 0.4h
2.5 ( e
– 0.8h
–e
– 0.8h
)
+ 3.125e
– 0.4∆
2.5 ( e
– 0.4∆
–e
–e
– 0.8∆
– 0.8∆
– 0.4h
– 0.4h
–e
+ 2e
– 0.8h
– 0.8h
) dh 0 1 (24.99)
+ 3.125 )
Note that both, Ad and Bd are functions of ∆. Thus, the sampling period, ∆, has a strong presence in the dynamic behavior of the sampled system, as we shall observe in the following subsections.
Linear State Space Models We will analyze the linear time invariant state space model
x [ t + 1 ] = Ad x [ t ] + Bd u [ t ]
(24.100)
y [ t ] = Cd x [ t ] + Dd u [ t ]
(24.101)
This can be a linearized discrete time model like (24.87) and (24.88), or a sampled data system like (24.93) and (24.94) where ∆ has been dropped from the time argument. The solution to Eqs. (24.100) and (24.101), subject to x[to] = x o, is given by ( t−t o )
x [ t ] = Ad
( t−t o )−1
xo +
∑
( t−t o )−i−1
Ad
Bd u [ i + to ]
∀t ≥ t o
(24.102)
i=0
( t−t o )
where A d is the transition matrix. The reader can check easily that (24.102) satisfies (24.100). With the above result, the solution for (24.101) is given by ( t−t o )
y [ t ] = Cd Ad
( t−t o )−1
xo + Cd
∑
( t−t o )−i−1
( Ad
Bd u [ i + to ] ) + Dd u [ t ]
(24.103)
i=0
System Dynamics The state of the system has two components: the unforced component, x u[t], and the forced component, x f[t], where ( t−t o )
xu [ t ] = Ad
( t−t o )−1
xf [ t ] =
∑
xo
(24.104)
( t−t o )−i−1
Ad
Bd u [ i + to ]
(24.105)
t =0
To gain insight into the state space model and its solution consider the case when to = 0 and u[t] = 0,
∀t ≥ 0, i.e., the state has only the unforced part. Then
x [ t ] = Ad xo t
©2002 CRC Press LLC
(24.106)
0066_Frame_C24 Page 18 Thursday, January 10, 2002 3:44 PM
Further assume that A d ∈ and that, for simplicity, it has n distinct eigenvalues h, with n linearly independent eigenvectors v. Then there always exists a set of n constants a such that n×n
xo =
n
∑a v ,
a ∈ C
(24.107)
=1
A well known result from linear algebra tells us that the eigenvalues of A d are h , for k ∈ , with corresponding eigenvectors v. The application of this result yields k
t
t
n
∑
a v =
=1
x[t] =
n
n
∑a =1
t
Ad V t h v
∑a h v
(24.108)
x [ t ] = Ad xo = Ad
k
t
(24.109)
=1
This equation shows that the unforced component of the state is a linear combination of natural t modes, {h }, and each one is associated with an eigenvalue of Ad, which are also known as natural frequencies of the model. Thus, we again have that the matrix Ad determines: • the structure of the unforced response • the stability (or otherwise) of the system • the speed of response Structure of the Unforced Response In the absence of input, the state evolves as a combination of natural modes which belong to a defined class of functions: the powers of the model eigenvalues, either real or complex. These modes are discrete functions related to constants, real exponentials, pure sine waves, exponentially modulated sine waves, and some other specials functions arising from repeated eigenvalues. To illustrate these ideas and their physical interpretation consider the sampled system in Example 24.6. If ∆ = 1, the state space matrices are
Ad =
0.8913 0.5525 , – 0.1768 0.2283
B d = 0.3397 0.5525
(24.110)
Hence, the system eigenvalues are solutions to the equation
det ( hI – A d ) = det h – 0.8913 – 0.5525 0.1768 h – 0.2283
(24.111)
= ( h – 0.6703 ) ( h – 0.4493 ) = 0
(24.112)
i.e., h1 = 0.6703, h2 = 0.4493, and the unforced response is
x u [ t ] = C 1 ( 0.6702 ) + C 2 ( 0.4493 ) t
t
(24.113)
where C1and C2 depend on the initial conditions only. We can observe that, when t tends to infinity, xu[t] decays to zero, because |h1,2| < 1. Also these eigenvalues are positive real numbers, so there is no oscillation ©2002 CRC Press LLC
0066_Frame_C24 Page 19 Thursday, January 10, 2002 3:44 PM
in the natural modes. This last observation is consistent with the parameter choice in Example 1.6, which made the mass-spring system to be overdamped. Structure of the Forced Response Consider the Eq. (24.102). Then, when the initial state is zero, the state will only exhibit the forced component. However, the forced component will still include natural modes plus some additional forced or particular modes, which depend on the nature of the system input u[t]. In general, the forcing modes in the input will also appear in the state. However, special cases arise when a forcing mode in u[t] coincides with a system natural mode. System Stability Stability in linear time-invariant systems can also be analyzed using the state matrix Ad. As we said, all systems variables can be expressed as linear functions of the state and the system input. When the system input u[t] is a vector of bounded time functions, then the boundedness of the system variables depends on the state to be bounded. We then have the following result: Theorem 24.2 Consider a system with the state description (24.100) and (24.101) where Bd, Cd, and Dd have bounded elements. Then the system state is bounded for all bounded inputs if and only if the eigenvalues of A d lies inside the unit disc, i.e., |h| < 1, ∀. Speed of Response and Resonances We recall that the natural modes of discrete-time systems are the powers of the eigenvalues h. Since those eigenvalues can always be described as complex quantities, we can then write the natural modes as jq
t
t jq t
( h ) = ( |h |e ) = |h | e t
,
where q = ∠h
(24.114)
Therefore, we have that • 0 < |h| < ∞ determines the speed at which the mode decays to zero for stable systems (|h| < 1), or grows to infinity for unstable systems (|h| > 1) • −p < q ≤ p determines the frequency of the natural mode, measured in radians. Although the natural modes of stable systems decay to zero, their nature determines the system transient response. To illustrate these issues the step response, with zero initial conditions, is frequently used. Example 24.7 Consider the first order, single-input single-output discrete-time system
x [ t + 1 ] = h x [ t ] + u [ t ] y [ t ] = ( 1 – h )x [ t ]
(24.115) (24.116)
To obtain the step response, we can use the Eq. (24.103), where xo = 0, u[t] = 1, ∀t ≥ 0.
t−1 t−i−1 y [ t ] = Cd Ad Bd i=0
∑
–t t−1 t−i−1 t−1 1 – h = ( 1 – h ) h = ( 1 – h )h --------------–1 1 – h i=0
(24.118)
= 1 – h
(24.119)
∑
t
©2002 CRC Press LLC
(24.117)
0066_Frame_C24 Page 20 Thursday, January 10, 2002 3:44 PM
1
y [t ]
0.8 0.6 η = 0.2 η = 0.6 η = 0.8
0.4 0.2 0
FIGURE 24.6
0
1
2
3
4
5 discrete time t
6
7
8
9
10
Step response of the system for different eigenvalues.
The output signal, y[t] = yh[t] + yp[t], is shown in Fig. 24.6, for different values of the eigenvalue h. The transient is given by yh[t] = −h t, and the steady state response by yp[t] = 1. We observed in Eq. (24.114) that the system eigenvalues define the damping of its transient response, but also determine its frequency of oscillation (when the eigenvalues have a nonzero imaginary part). The potential problem when resonant modes exist is the same problem we found in the context of continuous-time systems, i.e., the system input contains a sine wave or another kind of signal, with energy at a frequency close to one of the natural frequencies of the system. The system output still remains bounded, although it grows to undesirable amplitudes. Example 24.8 Consider the discrete-time system described by the state space model
x [ t + 1 ] = 1.2796 – 0.81873 x [ t ] + 1 u [ t ] 1 0 0 y [ t ] = 0 0.5391 x [ t ]
(24.120) (24.121)
The eigenvalues of the system are obtained from Ad:
h 1,2 = 0.6398 ± j0.6398 = 0.9048 ( e
jp/4
)
(24.122)
And the associated natural modes, present in the transient response, are
h 1,2 = 0.9048 e t
t
p j --- t 4
p p t = 0.9048 cos --- t ± j sin --- t 4 4
(24.123)
The natural modes are slightly damped, because |h1,2| is close to 1, and they show an oscillation of frequency p/4. In the plots shown in Fig. 24.7 we appreciate a strongly resonant output. The upper plot corresponds to an input u[t] = sin( p--- t), i.e., the input frequency coincides with the frequency of the natural modes. 4 In the lower plot the input is a square wave of frequency input signal p/12. In this case, the input third harmonic has a frequency equal to the frequency of the natural modes. Effect of Different Sampling Periods We observe in Eq. (24.95) that Ad and Bd depend on the choice of the sampling period ∆. This choice determines the position of the eigenvalues of the system too. If we look at the Eq. (24.96), assuming that A has been diagonalized, we have that
Ad = e ©2002 CRC Press LLC
diag { l 1 ,…,l n }∆
= diag { e
l1 ∆
,…, e
ln ∆
}
(24.124)
0066_Frame_C24 Page 21 Thursday, January 10, 2002 3:45 PM
5
y [t ] u [t ]
0
-5
0
5
10
15
20 25 discrete time t
30
35
40
10
15
20 25 discrete time t
30
35
40
3
y [t ] u [t ]
2 1 0 -1 -2 -3
FIGURE 24.7
0
5
Resonant effect in the system output. Sampling time ∆ = 0.5
x1[t ]
1
0.5
0
0
2
4
6
8
10
12
14
16
18
20
14
16
18
20
14
16
18
20
Sampling time ∆ = 1
x1[t ]
1
0.5
0
0
2
4
6
8
10
12
Sampling time ∆ = 2
x1[t ]
1
0.5
0
0
2
4
6
8
10
12
discrete time t
FIGURE 24.8
Effect of sampling in natural modes.
where { l 1 ,…, l n }are the eigenvalues of the underlying continuous-time systems. Then, these eigenvalues are mapped to the eigenvalues of the sampled-data system by equation:
h = e
l ∆
(24.125)
In Fig. 24.8 we observe the response of the sampled system of Example 24.6, choosing x1[t] as the T system output, when the initial condition is xo = [1 0] , for different values of ∆. Observe that the horizontal axis corresponds to t, so the real instants times are t∆. ©2002 CRC Press LLC
0066_Frame_C24 Page 22 Thursday, January 10, 2002 3:45 PM
u(t)
Heat Source
y(t) Temperature Sensor
flow direction
FIGURE 24.9
Heating system with time delay.
A fundamental issue regarding sampling of continuous-time signals is that the sampling period has to be chosen small enough to capture the essential nature of the signal to be sampled. To exemplify an ill-chosen ∆, assume that the signal f (t) = A sin(wot) is sampled every ∆ seconds, with ∆ = 2p/wo , ∈ . Then the resulting discrete time signal is f [t] = 0, ∀t ∈ . Sampled Data Systems and Time Delays We said in section 24.3 that one cannot use continuous-time state space models to describe systems with time delays, because they are infinite dimensional systems. It was also said there that we would be able to tackle this problem using sampled signals. This is done using the following example. Example 24.9 Consider the heating system sketched in Fig. 24.9. The measured temperature, y (t), of the flow depends on the power injected by the heat source. This source is commanded by a control signal u(t). Changes in u(t) yield changes in the temperature y(t), but with a significant time delay. The linearized system can thus be represented by the transfer function:
Y(s) e K ----------- = H ( s ) = ----------U(s) s+l – ts
(24.126)
where U(s) and Y(s) are the Laplace transforms of u(t) and y(t), respectively. We next assume that the input and output signals are sampled every ∆[s]. The time delay t, in seconds, is a function of the flow velocity and we can assume, for simplicity, that t it is a multiple of the sampling + m interval ∆, i.e., t = m∆, m ∈ . These delays translate in a factor z in the denominator of the Z-transform transfer function. In other words, the delay gives rise to a set of m poles at the origin. Furthermore, the −l∆ continuous-time system eigenvalue at s = −l becomes a discrete-time system eigenvalue at z = e (see Eq. (24.125)). The resulting transfer function is
Y[z] K 1–e ----------- = H [ z ] = --- --------------------------U[z] l z m ( z – e –l∆ ) – l∆
(24.127)
And this transfer function can be expressed as the discrete state space model
x1 [ t + 1 ] = x2 [ t ]
(24.128)
x2 [ t + 1 ] = x3 [ t ]
(24.129)
x m [ t + 1 ] = x m+1 [ t ] x m+1 [ t + 1 ] = e
– l∆
K – l∆ x m+1 [ t ] + --- ( 1 – e )u [ t ] l
y [ t ] = x1 [ t ] ©2002 CRC Press LLC
(24.130) (24.131) (24.132)
0066_Frame_C24 Page 23 Thursday, January 10, 2002 3:45 PM
We can then think of the states variables xm+1[t], …, x1[t] as the temperature at equally spaced points, between the heat source and the temperature sensor. When the time delay t is not a multiple of the sampling period ∆, an additional pole at the origin and an additional zero appear in the discrete transfer function. The details can be found elsewhere, e.g., in [7].
State Similarity Transformation The idea of transforming the state via a similarity transformation equally applies to discrete-time systems. The system properties also remain unchanged.
State Space and Transfer Functions For discrete-time systems the relation between state space and transfer function models is basically the same as in the continuous-time case (see section “State Space and Transfer Functions”). As we said then, the state space description of linear time invariant systems is an alternative description to that provided by transfer functions, although in some situations it provides more information on the system. m p For a linear discrete-time invariant system with input u[t] ∈ and output y[t] ∈ , the transfer p×m function, H[z]∈ C , is defined by the equation
Y [ z ] = H [ z ]U [ z ],
Yi [ z ] [ H [ z ] ] ij = -----------Uj [ z ]
where
(24.133) th
i.e., the (i, j) element in matrix H[z] is the Zeta transformation of the response in the i output when th a unit Kronecker’s delta is applied at the j input, with zero initial conditions and with the remaining inputs equal to zero for all t ≥ 0. On the other hand, if we apply Zeta transform to the discrete time state space model (24.100) and (24.101), with zero initial conditions, we have
X [ z ] = ( zI – A d ) B d U [ z ]
(24.134)
Y [ z ] = Cd X [ z ] + Dd U [ z ]
(24.135)
C d ( zI – A d ) B d + D d = H [ z ]
(24.136)
–1
leading to –1
T
In the following analysis, we will focus on the class of scalar systems, i.e., m = p = 1, Bd, C d are column vectors, and Dd = H[∞]. We can then see that H[z] is a quotient of polynomials in z, i.e.,
C d Adj ( zI – A d )B d + D d det ( zI – A d ) H [ z ] = --------------------------------------------------------------------------------------det ( zI – A d )
(24.137)
where Adj(o) denotes the adjoint matrix of (o). We have again, paralleling the continuous-time case, that the transfer function poles are eigenvalues of Ad. However, it is not true in general that the set of transfer function poles is identical to the set of eigenvalues of the matrix. It is important to realize that transfer function models can hide cancellations between poles and zeros, with the consequences described in subsections “Controllability, Reachability and Stabilizability” and “Observability, Reconstructability and Detectability.” A key result for discrete-time system is the same for continuous-time systems: the transfer function may not provide the same amount of information than the state space model for the same system. ©2002 CRC Press LLC
0066_Frame_C24 Page 24 Thursday, January 10, 2002 3:45 PM
One way to obtain the state space model is to use the same method proposed in section “State Space and Transfer Functions,” applying Zeta transformation instead of Laplace transformation, and using the fact that
F [ z ] = Z { f [ t ] } ⇔ zF [ z ] = Z { f [ t + 1 ] }
(24.138)
Example 24.10 The transfer function of a system is given by
1.8z + 0.04 2z – z + 1 -+2 H [ z ] = ----------------------------------------- = ----------------------------------2 ( z – 0.8 ) ( z – 0.6 ) z – 1.4z + 0.48 2
(24.139)
Then a minimal realization for this system is
Ad =
0 1 , – 0.48 – 1.4
C d = [ 0.04 1.8 ],
Bd = 0 1
(24.140)
Dd = 2
(24.141)
In discrete-time models it also happens that the system transfer function is invariant with respect to state similarity transformations.
24.5 State Space Models for Interconnected Systems To build state space models for complex systems it is sometimes useful (and possible) to describe them as the interconnection of simpler systems. That interconnection is usually a combination of three basic interconnection structures: series, parallel, and feedback. In those three basic cases our aim is to obtain a state space model for the composite system. In the following analysis we will use two systems, which are defined by
System 1:
System 2:
dx 1 ( t ) --------------- = A 1 x 1 ( t ) + B 1 u 1 ( t ) dt
(24.142)
y1 ( t ) = C1 x1 ( t ) + D1 u1 ( t )
(24.143)
dx 2 ( t ) --------------- = A 2 x 2 ( t ) + B 2 u 2 ( t ) dt
(24.144)
y2 ( t ) = C2 x2 ( t ) + D2 u2 ( t )
(24.145)
Series Connection The system interconnection shown in Fig. 24.10 is known as a series or cascade connection. To build the desired state space model, we first observe that y2(t) = u1(t). Also, the composite system input is u(t) = u2(t),
u(t) u2(t) FIGURE 24.10
Series connection.
©2002 CRC Press LLC
x2(t)
u1(t) y2(t)
x1(t)
y1(t)
y(t)
0066_Frame_C24 Page 25 Thursday, January 10, 2002 3:45 PM
and the composite system output is y(t) = y1(t). We thus obtain
x˙ 1 ( t ) x˙ 2 ( t )
=
A1 B1 C2 x1 ( t ) 0
A2
x2 ( t ) x1 ( t )
y ( t ) = [ C1 D1 C2 ]
x2 ( t )
B1 D2
+
B2
u(t)
(24.146)
+ [ D1 D2 ] u ( t )
(24.147)
Parallel Connection The system interconnection shown in Fig. 24.11 is known as a parallel connection. To obtain the desired state space model we observe that the input is u(t) = u1(t) = u2(t) and the output for the whole system is y(t) = y1(t) + y2(t). We obtain
x˙ 1 ( t ) x˙ 2 ( t )
=
x1 ( t )
A1
0
0
A2 x2 ( t )
y ( t ) = [ C1 C2 ]
u1(t)
x1 ( t ) x2 ( t )
+
B1 B2
u(t)
(24.148)
+ [ D1 + D2 ] u ( t )
x1(t)
u(t)
(24.149)
y1(t) y(t)
+ + u2(t)
FIGURE 24.11
x2(t)
y2(t)
Parallel connection.
Feedback Connection The system interconnection shown in Fig. 24.12 is known as feedback connection (with unit negative feedback), and it corresponds to the basic structure of a control loop, where S1 is the plant and S2 is the controller. To build the composite state space model we observe that the overall system input satisfies the equation u(t) = u2(t) + y1(t), and the overall system output is y(t) = y1(t). Furthermore, we assume
u(t)
u2(t) +
FIGURE 24.12
−
Feedback connection.
©2002 CRC Press LLC
x2(t)
y2(t) u1(t)
x1(t)
y1(t)
y(t)
0066_Frame_C24 Page 26 Thursday, January 10, 2002 3:45 PM
that the system S1 (the plant) is strictly proper, i.e., D1 = 0. We then obtain
x˙ 1 ( t ) x˙ 2 ( t )
=
A1 – B1 D2 C1 B1 C2 x1 ( t ) –B2 C1
A2
y ( t ) = [ C1 0 ]
x2 ( t )
+
B1 D2 B2
x1 ( t ) x2 ( t )
u(t)
(24.150)
(24.151)
The same results apply, mutatis mutandis, to discrete-time interconnected systems. More details can be found elsewhere, e.g., in [15].
24.6 System Properties Controllability, Reachability, and Stabilizability A very important question that we must be interested in regarding control systems using state space models is whether or not we can steer the state via the control input to certain locations in the state space. We must remember that the states of a system frequently are internal variables like temperature, pressure, level of tanks, or others. These are sometimes critical variables that we want to keep between specific values. Controllability The issue of controllability is concerned with whether or not a given initial state x 0 can be steered to the origin in finite time using the input u(t). Example 24.11 If we examine the model defined in (24.152), we note that the input u(t) has no effect over the state x2(t).
x1 ( t ) x˙ 1 ( t ) = 0 1 + 1 u(t) x˙ 2 ( t ) 0 0 x2 ( t ) 0
(24.152)
T
Given an initial state [x1(0), x2(0)] , the input u(t) can be chosen to steer x1(t) to zero, while x2(t) remains unchanged. Formally, we have the following definition: Definition 24.1 A state x o is said to controllable if there exists a finite interval [0, T] and an input {u(t), t ∈ [0, T]} such that x(T) = 0. If all states are controllable, then the system is said to be completely controllable. Reachability A related concept is that of reachability, used sometimes in discrete-time systems. It is formally defined as follows: Definition 24.2 A state x ≠ 0 is said to be reachable, from the origin, if given x(0) = 0, there exists a finite time interval [0, T] and an input {u(t), t ∈ [0, T]} such that x(T) = x . If all states are reachable the system is said to be completely reachable. For continuous, time-invariant, linear systems, there is no distinction between complete controllability and reachability. However, the following example illustrates that there is a subtle difference in the ©2002 CRC Press LLC
0066_Frame_C24 Page 27 Thursday, January 10, 2002 3:45 PM
discrete-time case. Consider the system and the output
1 1 x[0] x [ t ] ⇒ x [ t ] = 0.5 – 0.5 – 0.25 – 0.5
(24.153)
x[t + 1] =
t
0.5 – 0.25 Ad
We can see that this system is completely controllable since x[t] = 0, ∀t ≥ 2 and ∀x [ 0 ] ∈ . This implies that every initial state is controllable. However, no nonzero state is reachable. In view of the distinction between controllability and reachability in discrete time, we will use the term controllability in the sequel to cover the stronger of the two concepts. Usually, in the context of linear time invariant systems, controllability and reachability are used interchangeably. 2
Controllability Test We now present a systematic way to determine the complete controllability of a system. Theorem 24.3 Consider the linear, time-invariant, state space model where A ∈
n×n
:
x˙ ( t ) = Ax ( t ) + Bu ( t )
(24.154)
y ( t ) = Cx ( t ) + Du ( t )
(24.155)
i) The set of all controllable states is the range space of the controllability matrix Γc[A, B] where
Γ c [ A, B ] ∆ = [B
AB
2
AB
…
A
n−1
B]
(24.156)
ii) The model is completely controllable if and only if Γc[A, B] has full row rank. Example 24.12 Consider the state space model given in (24.152), with state space matrices
A = 0 1 , 0 0
B = 1 0
(24.157)
AB ] = 1 0 0 0
(24.158)
The controllability matrix for this system, is given by
Γ c [ A, B ] = [ B
Clearly, rank Γc[A, B] = 1, thus the system is not completely controllable. The result above applies to continuous-time models, and it holds equally well for reachability of discretetime models. Also we can see that the controllability of a system is a property that does not depend on the choice of state variables. To see that, consider the similarity transformation defined in subsection “State Similarity i –1 i Transformation.” Then, observing that A = T A T, we have
Γ c [ A, B ] = T Γ c [ A, B ] –1
which implies that Γ c [ A, B ] and Γ c [ A, B ] have the same rank. ©2002 CRC Press LLC
(24.159)
0066_Frame_C24 Page 28 Thursday, January 10, 2002 3:45 PM
iR1(t)
R1
Op.Amp. v+ (t)
+ −
vi (t)
FIGURE 24.13
C1
v− (t)
R3
− C3
R2
vC3(t)
vo (t)
Electronic circuit.
The reader may wish to check that the state space models used to describe signals in subsection “Signals and State Space Description” are uncontrollable. Indeed, it is always true that any state space model where B = 0 is completely uncontrollable. Loss of Controllability Lack of controllability is sometimes a structural feature. However, in some other cases, it depends on the numerical value of certain parameters. We illustrate this in the following example. Example 24.13 Consider the electronic circuit shown in Fig. 24.13. We first build a state space model for the circuit. We choose, as state variables, x1(t) = iR1(t) and x2(t) = vC3(t). Using first principles on the left half of the circuit we have that
d i C1 = C 1 ----- ( v i – v + ), dt
vi – v+ -, i R1 = ------------R1
v i R2 = ----+-, R2
i C1 = i R2 – i R1
(24.160)
This yields
( R1 + R2 ) di R1 ( t ) 1 --------------- = − --------------------- i ( t ) + -----------------v i ( t ) dt C 1 R 1 R 2 R1 C1 R1 R2
(24.161)
v + ( t ) = −R 1 i R1 ( t ) + v i ( t )
(24.162)
And, similarly, from the right half of the circuit we obtain
dv C3 ( t ) 1 1 ----------------- = − -----------v C3 ( t ) + -----------v − ( t ) dt R3 C3 R3 C3
(24.163)
v o ( t ) = v C3 ( t )
(24.164)
The (ideal) operational amplifier ensures that v+(t) = v−(t), so we can combine the state space models given in Eqs. (24.161)–(24.164) to obtain di R1 ( t ) ----------------dt dv C3 ( t ) -----------------dt
(R + R )
=
1 2 – ---------------------C R R 1
1
R
1 – ----------R C 3
0
i R1 ( t )
2
3
v C3 ( t ) 1 – R----------C 3
3
vo ( t ) = [ 0 1 ]
©2002 CRC Press LLC
i R1 ( t ) v C3 ( t )
+
1 -----------------C1 R1 R2 1 -----------C3 R3
vi ( t )
(24.165)
(24.166)
0066_Frame_C24 Page 29 Thursday, January 10, 2002 3:45 PM
The controllability matrix is then given by
Γ c [ A, B ] = [ B
AB ] =
1 -----------------R1 R2 C1
–( R1 + R1 ) -------------------------2( R1 R2 C1 )
1 -----------R3 C3
–( R2 C1 + R3 C3 ) -------------------------------------2 ( R3 C3 ) R2 C1
(24.167)
and
R2 -2 ( −R 1 C 1 + R 3 C 3 ) det ( Γ c [ A, B ] ) = -----------------------------------( R1 R2 R3 C1 C2 )
(24.168)
where we can observe that the system is completely controllable if, and only if, R 1 C 1 ≠ R 3 C 3 . This issue has a very important interpretation if we analyze it from the transfer function point of view. Applying Laplace transform to Eqs. (24.161)–(24.164), the transfer function from vi(t) to vo(t) (recall that V+(s) = V−(s)) is given by 1 1 s + ----------------------- R1 C1 R3 C3 Vo ( s ) V+ ( s ) Vo ( s ) ------------------------------------ = ------------- ------------- = --------------------⋅ R1 + R2 1 Vi ( s ) V− ( s ) Vi ( s ) s + ----------- s + ------------------ R C 3 3
(24.169)
R 1 R 2 C 1
where we can observe that the loss of complete controllability, when R1C1 = R3C3 obtained from (24.168), means that there is a zero-pole cancellation in the transfer function, i.e., the zero from the left half of the circuit in Fig. 24.13 is cancelled by the pole from the other part of the circuit. This issue will be discussed in more detail in section “Canonical Decomposition.” Controllability Gramian The test of controllability gives us a yes or no answer about the controllability of a system model. However, to conclude that a system is completely controllable says nothing about the degree of controllability. For stable systems, we can quantify the effort to control the system state through the energy involved in the input signal u(t) applied from t = −∞ to reach the state x(0) = x 0 at t = 0:
J(u) =
∫
0
||u ( t )|| dt = 2
–∞
∫
0
–∞
u ( t ) u ( t ) dt T
(24.170)
It can be shown that the minimal control energy is
J ( u opt ) = x o P x o T
–1
(24.171)
where
P =
∫
∞
At
T
T A t
e BB e
dt
(24.172)
0
The matrix P is called the controllability gramian, and it measures the controllability of the state vector x(0). If this matrix is small, it means that we need a lot of energy in the control input u(t) to steer the state vector to x 0. Indeed, we can appreciate the necessary effort for each one of the state variables, T making, for example x0 = [0,…, 0, 1, 0,…, 0] .
©2002 CRC Press LLC
0066_Frame_C24 Page 30 Thursday, January 10, 2002 3:45 PM
It is important to emphasize that the existence of the integral defined in (24.172) is guaranteed only if the eigenvalues of A have negative real part, i.e., the system must be stable. Also, the controllability gramian P defined in (24.172) satisfies the Lyapunov equation
AP + PA + BB = 0 T
T
(24.173)
For discrete-time systems we have the following equations for the controllability gramian: ∞
∑ A B B (A
Pd =
k d
d
T d
T k d
)
(24.174)
k=0
which satisfies
Ad Pd Ad – Pd + Bd Bd = 0 T
T
(24.175)
The sum defined in (24.174) is bounded if and only if the discrete-time system is stable, i.e., its eigenvalues lie inside the unit disc. Example 24.14 We can analyze the model of the Example 24.13, where the electronic circuit was described by the state space models (24.165) and (24.166). If we want to appreciate the information that we can obtain from the controllability gramian, defined in (24.172), when the model is close to losing complete controllability, we can choose suitable values of the parameters that ensure R1C1 ≈ R3C3. If we choose
R 1 = R 2 = R 3 = 10 Ω,
C 1 = 0.9 × 10 mF ,
3
C 3 = 10 mF
3
3
(24.176)
the model will be described by
i˙R1 ( t ) v˙C3 ( t )
----– 20 9
=
– 10
0
i R1 ( t )
– 1 v C3 ( t )
3
vo ( t ) = [ 0 1 ]
+
0.01 ---------9
vi ( t )
(24.177)
1
i R1 ( t )
(24.178)
v C3 ( t )
If we look at the relative magnitude of the elements of B, we can a priori say that the effect of the input u(t) upon the state iR1(t) will be much weaker than its effect upon the state vC3(t). To verify this we can compute the controllability gramian defined in (24.172), solving
0 = AP + PA + BB T
0 =
----– 20 9
– 10 ©2002 CRC Press LLC
3
T
0
p 11 p 12
–1
p 21 p 22
(24.179)
+
3 p 11 p 12 – 20 ----- – 10 9 + p 21 p 22 0 –1
0.01 ---------9
1
0.01 ---------9
1
(24.180)
0066_Frame_C24 Page 31 Thursday, January 10, 2002 3:45 PM
We have
0.000258620 , P = 0.28 ×10 0.000258620 0.99999948 -6
P
–1
= 4736624.0 – 1224.9 – 1224.9 1.3
(24.181)
So we can obtain the minimal control energy to steer the state x(t), from 0 in t = −∞ to x 0 in t = 0, from Eq. (24.171).
x 0 = [ 1, 0 ] ⇒ J ( u opt ) = 4736624.0
(24.182)
x 0 = [ 0, 1 ] ⇒ J ( u opt ) = 1.3
(24.183)
T
T
We can thus verify that the control energy to attain iR1(0) = 1 is six orders of magnitude greater than the necessary energy to attain vC3(0) = 1. Also, if we substitute the parameter values in Eq. (24.169), we have that the transfer function is given by 1
Vo ( s ) 1 s + 1 + --9 ------------ = ----------- ⋅ ------------------Vi ( s ) s + 1 s + 20 -----
(24.184)
95
from where we observe a zero-pole quasi cancellation. The idea of gramian has been extended to include the unstable case; see [16]. Canonical Decomposition and Stabilizability If we have a system which is not completely controllable, it can be decomposed into a controllable subsystem and a completely uncontrollable subsystem in the following way. Γc[A, B]} = k < n. Then there exists a similarity transforLemma 24.1 Consider a system having rank {Γ –1 mation T such that x = T x ,
A = T –1 AT,
B = T B
(24.185)
B = Bc 0
(24.186)
–1
and A, B have the form
A = A c A 12 , 0 A nc
where A c has dimension k and ( A c , B c ) is completely controllable. The above result tells us what states we can and what states we cannot steer to zero. To appreciate this, we express the state and output equations in the form
x˙ c x˙ nc
=
A c A 12 0
A nc x nc
y = C c C nc
©2002 CRC Press LLC
xc
xc x nc
+
Bc
u
(24.187)
0 + Du
(24.188)
0066_Frame_C24 Page 32 Friday, January 18, 2002 5:36 PM
The controllable subspace of a state space model is composed of all states generated through every possible linear combination of the states in x c . The stability of this subspace is determined by the location of the eigenvalues of A c . On the other hand, the uncontrollable subspace is composed of all states generated through every possible linear combination of the states in x nc . The stability of this subspace is determined by the location of the eigenvalues of A nc. Hence, the input will have no effect over the uncontrollable subspace, so the best we can hope is that this uncontrollable subspace is stable, since then the state in this subspace will go to the origin. In this case the state space model is said to be stabilizable. A key feature of the descriptions (24.187) and (24.188) arises from the fact that the transfer function is given by −1
H ( s ) = C c ( sI – A c ) B c + D
(24.189)
Equation (24.189) says that the eigenvalues of the uncontrollable subspace do not belong to the set of poles of the system transfer function. This implies that there is a cancellation of all poles corresponding to the roots of (sI – A nc). Controllability Canonical Form Lemma 24.2 Consider a completely reachable state space model for a SISO system. Then, there exists a similarity transformation which converts the state space model into the following controllability canonical form:
0 0
… 0
–α0
1 0
… 0
–α1
… 0
–α2
A′ = 0 1 0 0 n−1
where λ + αn−1λ n
1 0 B′ = 0 0
,
O … 1 – α n−1
(24.190)
+ ⋅⋅⋅ + α1λ + α0 = det (λ I − A) is the characteristic polynomial of A.
Lemma 24.3 Consider a completely controllable state space model for a SISO system. Then, there exists a similarity transformation which converts the state space model into the following controller canonical form:
– α n−1 – α n−2 A″ =
n−1
where λ + αn−1λ n
1 0 0
0 1 0
… –α1 –α0 … … O …
0 0 1
0 0 , 0
1 0 B″ = 0 0
(24.191)
+ ⋅⋅⋅ + α1λ + α0 = det (λ I − A) is the characteristic polynomial of A.
Observability, Reconstructibility, and Detectability If we consider the state space model of a system, one might conjecture that if one observes the output over some time interval then this might tell us some information about the state. The associated model property is called observability (or reconstructibility).
©2002 CRC Press LLC
0066_Frame_C24 Page 33 Friday, January 18, 2002 5:37 PM
Observability Observability is concerned with the issue of what can be said on the state if we measure the plant output. Example 24.15 If we look at the system defined by state space model
x˙1 ( t )
x1 ( t ) = –1 0 , 1 –1 x2 ( t ) x˙2 ( t )
y(t) = [1 0]
x1 ( t ) x2 ( t )
(24.192)
we can see that the output y(t) only is determined by x1(t), and the other state variable x2(t) has no influence on the output. So the system is not completely observable. A formal definition is as follows: Definition 24.3 The state x o ≠ 0 is said to be unobservable if given x(0) = x o, and u(t) = 0 for t ≥ 0, then y(t) = 0 for t ≥ 0, i.e., we cannot see any effect of x o on the system output. The system is said to be completely observable if there exists no nonzero initial state that it is unobservable. Reconstructibility There is another concept, closely related to observability, called reconstructibility. Reconstructibility is concerned with what can be said about x(T), having observed the past values of the output, y, for 0 ≤ t ≤ T . For linear time invariant, continuous-time systems, the distinction between observability and reconstructibility is unnecessary. However, the following example illustrates that in discrete time, the two concepts are different. Consider
x [ t + 1 ] = 0,
x [ 0 ] = xo
y[t] = 0
(24.193) (24.194)
This system is clearly reconstructible for all T ≥ 1, since we know for certain that x[T] = 0 for T ≥ 1. However, it is completely unobservable since y[t] = 0, ∀k irrespective of x o. In view of the subtle difference between observability and reconstructibility, we will use the term observability in the sequel to cover the stronger of the two concepts. Observability Test A test for observability of a system is established in the following theorem. Theorem 24.4 Consider the linear, continuous, time-invariant, state space model where A ∈
n×n
x˙ ( t ) = Ax ( t ) + Bu ( t )
(24.195)
y ( t ) = Cx ( t ) + Du ( t )
(24.196)
i) The set of all unobservable states is equal to the null space of the observability matrix Γo[A, C] where
Γ o [ A, C ] ∆ =
C CA M CA
n−1
ii) The system is completely observable if and only if Γo[A, C] has full column rank n.
©2002 CRC Press LLC
(24.197)
0066_Frame_C24 Page 34 Thursday, January 10, 2002 3:45 PM
Example 24.16 Consider the following state space model:
A = –3 –2 , 1 0
B = 1 , 0
C = [1
–1 ]
(24.198)
The observability matrix is given by
Γ o [ A, C ] =
C = 1 –1 CA –4 –2
(24.199)
Hence rank Γo[A, C] = 2, which says that the system is completely observable. Example 24.17 If we look at the model defined in (24.192), we have
A = –1 0 , 1 –1
C = [1
0]
(24.200)
The observability matrix is
Γ o [ A, C ] =
1 0 –1 0
(24.201)
Hence rank Γo[A, C] = 1 < 2 and the system is not completely observable. The above result also applies to discrete-time models. The observability is a system property that does not depend on the choice of state variables. It can be proved that the rank of the matrix defined in Eq. (24.197) does not change when a similarity transformation T is used (see subsection “State Similarity Transformation”). Loss of Observability Lack of observability may arise from structural system features. However, it is also possible that lack of observability occurs when certain system parameters take some specific numerical values. This is the same phenomenon, for controllability, we analyzed in the subsection “Controllability, Reachability, and Stabilizability.” We expect that those parameters will affect the complete observability of the model in a 2 similar way. Let us look at the following example. Example 24.18 Consider the electronic circuit in Fig. 24.14. We can see this is the same as that in Fig. 24.13 where the left and right halves were swaped, so we can use similar equations to obtain a state space model. The state variables have been chosen to be x1(t) = vC3(t) and x2(t) = iR1(t). For the left half of the circuit, we have
dv C3 ( t ) 1 1 ----------------- = − -----------v C3 ( t ) + -----------v i ( t ) dt R3 C3 R3 C3 v + ( t ) = v C3 ( t ) 2
Which is the dual of Example 24.13.
©2002 CRC Press LLC
(24.202) (24.203)
0066_Frame_C24 Page 35 Thursday, January 10, 2002 3:45 PM
Op.Amp. R3
v+ (t)
R1
iR1(t)
+
v- (t)
− vi (t)
FIGURE 24.14
C3
vC3(t)
C1
R2
vo (t)
Electronic circuit.
And for the right half, we have
di R1 ( t ) R 1 + R 2 1 ---------------- = – ----------------i ( t ) + -----------------v _ ( t ) C 1 R 1 R 2 R1 dt C1 R1 R2
(24.204)
v o ( t ) = – R 1 i R1 ( t ) + v _ ( t )
(24.205)
The operational amplifier, in voltage follower connection, ensures that v+(t) = v−(t), so we can combine the state space models given in Eqs. (24.202)–(24.205): dv C3 ( t ) ----------------dt di R1 ( t ) ---------------dt
=
1 – -----------R C
0
3 3
v C3 ( t )
1 ------------------C1 R1 R2
R1 + R2 i ( t ) R1 – -----------------C R R
vo ( t ) = [ 1 – R1 ]
+
1 -----------R3 C3
vi ( t )
(24.206)
0
1 1 2
v C3 ( t )
(24.207)
i R1 ( t )
The observability matrix is given by
Γ c [ C, A ] =
1 C = 1 1 - – -----------CA − R----------C R C 3
3
2
1
–R1 R1 + R2 -----------------R2 C1
(24.208)
To determine the complete observability, or otherwise, we need to compute the matrix determinant
1 det ( Γ c [ C, A ] ) = ------------------ ( – R 1 C 1 + R 3 C 3 ) R3 C3 C1
(24.209)
from where we conclude that the model system is completely observable if and only if, R 1 C 1 ≠ R 3 C 3, which is the same condition we obtained in Example 24.13. Applying Laplace transform to Eqs. (24.204)–(24.203) we obtain the transfer function from Vi(s) to Vo(s): 1
1
-----------s + ----------R1 C1 R3 C3 Vo ( s ) V+ ( s ) Vo ( s ) ------------ = ------------ ------------- = ---------------------- ⋅ ----------------R1 + R2 1 Vi ( s ) Vi ( s ) V− ( s ) s + R----------s + R-----------------C R C 1
©2002 CRC Press LLC
2
1
3
3
(24.210)
0066_Frame_C24 Page 36 Thursday, January 10, 2002 3:45 PM
The condition R1C1 = R3C3 produces the loss of complete observability, leading to a pole-zero cancellation in the model transfer function, i.e., the pole from the left half of the circuit in Fig. 24.14 is cancelled by the zero from the right half. There is subtle difference between the transfer functions in (24.210) and (24.169). The final result is the same, but the order the cancellation is different in each case. The zeropole cancellation is connected to the loss of complete observability and the pole-zero cancellation is connected to the loss of complete controllability. These issues will be discussed in more detail in subsection “Canonical Decomposition.” Observability Gramian The observability test in Theorem 24.4 answers yes or no to the question about completely observability of a model. However, sometimes we are interested in the degree of observability for a particular model. So we can quantify the energy of the output signal y(t), when there is no input (u(t) = 0) and the state is x(0) = x 0 at t = 0
∫
E ( x0 ) =
∞
0
∫
y ( t ) dt = 2
∞
y ( t ) y ( t ) dt T
(24.211)
0
It can be proved that the ouput energy is
E ( x0 ) =
∫
∞
y ( t ) dt = x 0 Qx 0 T
2
0
(24.212)
where
Q =
∫
∞
T
e
A t
T
At
C C e dt
(24.213)
0
The matrix Q is called observability gramian, and it measures the observability of the state vector x(0). If this matrix is small, it means that we have a weak contribution of the initial state x 0 in the energy of the output y(t). Indeed, we can appreciate the effect of each one of the state variables taking, for T example, x 0 = [0,…, 0, 1, 0,…, 0] . Note that the existence of the integral defined in (24.213) is guaranteed if and only if the system is stable, i.e., if and only if the eigenvalues of A have negative real part. Also, the observability gramian Q defined in (24.213) satisfies the Lyapunov equation
A Q + QA + C C = 0 T
T
(24.214)
For stable discrete-time systems, the controllability gramian is defined by
Qd =
∞
∑ (A
T k d
) Cd Cd Ad T
k
(24.215)
k=0
which satisfies T
T
Ad Qd Ad – Qd + Cd Cd = 0
(24.216)
Example 24.19 We will use the model of Example 24.18, described by the state space models (24.206) and (24.207), to appreciate the utility of the observability gramian (24.213), especially when the model is close to losing complete observability, i.e., when R1C1 ≈ R3C3. ©2002 CRC Press LLC
0066_Frame_C24 Page 37 Thursday, January 10, 2002 3:45 PM
Assuming the same component values as in Example 24.14 for R1, R2, R3, C1, and C3 we have
–1 0 v C3 ( t ) v˙C3 ( t ) = + 1 vi ( t ) –3 20 ˙i R1 ( t ) ( t ) 10 – ----9- i R1 0 v o ( t ) = [ 1 – 10 ] 3
(24.217)
v C3 ( t )
(24.218)
i R1 ( t )
If we look at the relative magnitude of the components of C matrix, we can foretell a priori that the output vo(t) will be mainly determined by state iR1(t). To verify this we compute the observability gramian defined in (24.172), solving
0 = A Q + QA + C C T
0 =
– 1 10 0
–3
----– 20 9
q 11 q 12 q 21 q 22
+
q 11 q 12
T
–1
q 21 q 22 10
–3
(24.219) 0 ----– 20 9
+
1 – 10
[ 1 10 ] –3
3
(24.220)
We have
Q =
0.57 69.83 69.83 225000
(24.221)
From there we can compute the contribution of each state to the total energy in the output. Doing this, we verify that the state variable iR1(t) has an effect over the output greater than the effect of vC3(t), as defined in Eq. (24.212):
x 0 = [ 1, 0 ] ⇒ E ( x 0 ) = 0.57
(24.222)
x 0 = [ 0, 1 ] ⇒ E ( x 0 ) = 225000
(24.223)
1 s + 1 + -Vo ( s ) 1 ------------ = -------------------9- ⋅ ----------20 Vi ( s ) s + 1 s + ----9
(24.224)
T
T
The transfer function is
We observe that there is a pole-zero quasi-cancellation. Duality Principle We observe a remarkable similarity between the results in Theorem 24.3 and in Theorem 24.4, and also for the definitions of the gramians (24.172) and (24.213). This is known as the duality principle, and it can be formalized as follows: Theorem 24.5 (Duality) Consider a state space model described by the 4-tuple (A, B, C, D). Then the T T T T system is completely controllable if and only if the dual system (A , C , B , D ) is completely observable. Canonical Decomposition and Detectability The above theorem can often be used to go from a result on controllability to one on observability and vice versa. The dual of Lemma 24.1 is: ©2002 CRC Press LLC
0066_Frame_C24 Page 38 Friday, January 18, 2002 5:38 PM
Γo[A, C]} = k < n, there exists a similarity transformation T such that with Lemma 24.4 If rank {Γ –1 –1 x = T x, A = T AT, C = CT , then C and A take the form
Ao
A =
A 21
0 , A no
C = [ Co 0 ]
(24.225)
where A o has dimension k and the pair (C o , A o ) is completely observable. This result has a relevance similar to that of the controllability property and the associated decomposition. To appreciate this, we apply the dual of Lemma 24.1 to express the (transformed) state and output equations in partitioned form as
x˙ o ( t ) x˙ no ( t )
=
Ao
xo ( t )
0
A 21 A no x no ( t ) xo ( t )
y ( t ) = Co 0
x no ( t )
+
Bo
u(t)
(24.226)
B no + Du ( t )
(24.227)
The above description reveals why one can be in trouble when trying to control a system using only the system output. The output has no information on the state x no . The observable subspace of a model is the space composed of all states generated through every possible linear combination of the states in x o. The stability of this subspace is determined by the location of the eigenvalues of A o. The unobservable subspace of a model is the space composed of all states generated through every possible linear combination of the states in x no. The stability of this subspace is determined by the location of the eigenvalues of A no . If the unobservable subspace is stable we say that the system is detectable. A key feature of the descriptions (24.226) and (24.227) arises from the fact that the transfer function is given by –1
H ( s ) = C 0 ( sI – A o ) B o + D
(24.228)
Equation (24.228) says that the eigenvalues of the unobservable subspace do not belong to the set of poles of the system transfer function. This implies that there is a cancellation of all poles corresponding to the roots of ( sI – A no ). Observability Canonical Form There are also duals of the canonical forms given in Lemmas 24.2 and 24.3. For example, the dual of Lemma 24.3 is: Lemma 24.5 Consider a completely observable SISO system. Then there exists a similarity transformation that converts the model to the observer canonical form:
– α n−1 1 x˙ ( t ) =
–α0
y(t) = [1 0 ©2002 CRC Press LLC
b n−1 O 1 0
0 …
x(t) +
u(t) b0
0 ]x ( t ) + Du ( t )
(24.229)
(24.230)
0066_Frame_C24 Page 39 Thursday, January 10, 2002 3:45 PM
Canonical Decomposition Further insight into the structure of linear dynamical systems is obtained by considering those systems which are only partially observable or controllable. These systems can be separated into completely observable and completely controllable systems. The two results of Lemmas 24.1 and 24.4 can be combined for those systems, which are neither completely observable nor completely controllable. We can see it as follows. Theorem 24.6 (Canonical Decomposition Theorem) Consider a system described in state space form. –1 Then, there always exists a similarity transformation T such that the transformed model for x = T x takes the form
A co
0
A 13
0
B1
A = A 21 A 22 A 23 A 24 , 0 0 A 33 0 0
0
A 34 A 44
B = B2 , 0 0
C = [ C1 0 C2 0 ]
(24.231)
where i) The subsystem [ A co , B 1 , C 1] is both completely controllable and completely observable and has the same transfer function as the original system (see Lemma 24.6). ii) The subsystem
A co A 21
0 , A 22
B1
,
[ C1 0 ]
(24.232)
[ C1 C2 ]
(24.233)
B2
is completely controllable. iii) The subsystem
A co A 13 , 0 A 33
B1
,
0
is completely observable. The canonical decomposition described in Theorem 24.6 leads to an important consequence for the transfer function of the model, which will take only the completely observable and completely controllable subspace. Lemma 24.6 Consider the transfer function matrix H(s) given by
Y ( s ) = H ( s )U ( s )
(24.234)
Then –1
H = C ( sI – A ) B + D = C 1 ( sI – A co ) B 1 + D –1
(24.235)
where C 1 , A co , and B 1 are as in Eq. (24.231). This state description is a minimal realization of the transfer function. ©2002 CRC Press LLC
0066_Frame_C24 Page 40 Thursday, January 10, 2002 3:45 PM
If M is any square matrix and we denote by Λ{M} the set of eigenvalues of M, then
Λ { A } = Λ { A co } ∪ Λ { A 22 } ∪ Λ { A 33 } ∪ Λ { A 44 }
(24.236)
where
Λ { A } = eigenvalues of the system, Λ { A co } = eigenvalues of the controllable and observable subsystem, Λ { A 22 } = eigenvalues of the controllable but unobservable subsystem, Λ { A 33 } = eigenvalues of the uncontrollable but observable subsystem, Λ { A 44 } = eigenvalues of the uncontrollable and unobservable subsystem.
We observe that controllability for a given system depends on the structure of the input ports, i.e., where, in the system, the manipulable inputs are applied. Thus, the states of a given subsystem may be uncontrollable for a given input, but completely controllable for another. This distinction is of fundamental importance in control system design since not all plant inputs can be manipulated (consider, for example, disturbances) and, therefore, cannot be used to steer the plant to reach certain states. Similarly, the observability property depends on which outputs are being considered. Certain states may be unobservable from a given output, but they may be completely observable from some other output. This also has a significant impact on output feedback control systems, since some states may not appear in the plant output being measured and feeded back. However, they may appear in crucial internal variables and thus be important to the control problem.
PBH Test An alternative test for controllability and observability is provided by the following lemma known as PBH test. Lemma 24.7 Consider a state space model (A, B, C). Then n (i) The system is not completely observable if and only if there exists a nonzero vector x ∈ and a scalar l ∈ such that
Ax = lx,
Cx = 0
(24.237)
(ii) The system is not completely controllable if and only if there exists a nonzero vector x ∈ and a scalar l ∈ such that n
x A = lx , T
T
x B=0 T
(24.238)
24.7 State Observers Basic Concepts When the state variables have to be measured for monitoring, implementing control systems, or other purposes, there are hard technical and economical issues to face. Observers are a way to estimate the state variables based upon a system model, measurements of the plant output y(t), and measurements of the plant input u(t). This problem is a generalization of that of indirectly measuring a system variable using a system model and the measurement of some other easier-to-measure variable.
Observer Dynamics Assume that the system has a state space model given by (24.42) and (24.43) with D = 0 (a strictly proper system has been assumed). Then, the general structure of a classic observer for the system state is as shown in Fig. 24.15, where the matrix J is the observer gain. ©2002 CRC Press LLC
0066_Frame_C24 Page 41 Thursday, January 10, 2002 3:46 PM
u(t)
y(t) System
B
+
(sI-A) -1
x^(t)
+
C
-
+
J
FIGURE 24.15
Classic state observer.
Therefore, the observer equation is
dxˆ ( t ) ------------- = Axˆ ( t ) + Bu ( t ) + J ( y ( t ) – Cxˆ ( t ) ) dt
(24.239)
An obvious question is: if we know an exact system model and the system input, why do we need to feed the system output? The answer is that we need the output measurement since we do not know the system initial state. This can be appreciated from the equation for the state estimation error, x˜ ( t ) = x ( t ) – xˆ ( t ). That equation can be obtained subtracting (24.239) from (24.42). This leads to
dx˜ ( t ) ------------- = ( A – JC )x˜ ( t ) dt
(24.240)
From (24.240) we observe that the estimation error will converge to zero for a nonzero initial error if and only if all the eigenvalues of the matrix A − JC have negative real parts, i.e., if the observer polynomial E(s) = det(sI − A + JC) is strictly Hurwitz. Discussion • Equation (24.240) is valid only if the model is a perfect representation of the system under study. Modelling errors will impact the observer. This will normally lead to nonzero state estimation errors. • If the pair (A, C) is completely observable, then the eigenvalues of A − JC can be arbitrarily located (in the stability region). Thus, the speed of the estimation convergence is a designer’s choice. Those eigenvalues are known as the observer poles. • If the pair (A, C) is detectable, then the observer will yield zero steady state error asymptotically, although not all the eigenvalues of A − JC can be placed at will. • If the system is not completely observable, and the unobservable subspace contains unstable modes, then the observer will never converge. To illustrate the observer techniques we refer to Example 24.5. Example 24.20 Assume that we want the observer poles for the state model in Example 24.5 to be located at s = −4, s = −6, and s = −8. We can then compute the observer gain, J, using a software such as MATLAB. This yields
J = [ – 4.5247 – 7.5617 – 4.1543 ]
T
(24.241)
To appreciate the observer dynamics, assume that the initial system state is x(0) = [−1 2 1] and that the system input is a square wave of amplitude 1, and frequency equal to 1 rad/s. The observer is initialized with xˆ (0) = 0. Then the norm of the estimation error, || xˆ (t)||, evolves as shown in Fig. 24.16. It is important T
©2002 CRC Press LLC
0066_Frame_C24 Page 42 Thursday, January 10, 2002 3:46 PM
Estimation error norm
12 10 8 6 4 2 0 0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
Time [s]
FIGURE 24.16
State estimation error.
D1
θ1 I ω1 τ1 1 r1
τ
D2
K2
r2 I2 FIGURE 24.17
τ 2 ω2 θ2
ω3 θ3
I3
Rotational system.
to point out that, in this example, the plant is unstable. This means that the state and the state estimation grow unbounded. However, under the assumption of perfect modelling, the estimation error converges to zero. To gain physical insight into the observer philosophy, we consider the following application. Example 24.21 Figure 24.17 shows the schematics of a rotational system driven by a torque t(t). The system power is transmitted through a gear system built with two wheels with radii r1 and r2 and inertias I1 and I2, respectively. The rotation of both shafts is damped by viscous friction with coefficients D1 and D2, and a significant torsional spring in shaft 2 has also been modelled. The system load is modelled as an inertia I3. We want to estimate the load speed w3 based on the measurement of the speed in shaft 1, w1. We first need to build a state space model. To do that we choose a minimum set of system variables, which quantify the energy stored in the system. The system has four components able to store energy: three inertias and a spring. Nevertheless, the energy stored in I1 and I2 can be computed either from w1 or from w2, i.e., we need only one of these speeds, since they satisfy
r w1 ( t ) ------------- = ----2 r1 w2 ( t )
and
t 1 ( t )w 1 ( t ) = t 2 ( t )w 2 ( t )
(24.242)
Thus, a physically oriented choice of state variables is
©2002 CRC Press LLC
x1 ( t ) = w1 ( t )
(24.243)
x2 ( t ) = q2 ( t ) – q3 ( t )
(24.244)
x3 ( t ) = w3 ( t )
(24.245)
0066_Frame_C24 Page 43 Thursday, January 10, 2002 3:46 PM
From first principles we have
dw 1 ( t ) - + t1 ( t ) t ( t ) = D 1 w 1 ( t ) + I 1 --------------dt
(24.246)
dw 2 ( t ) r - + K2 ( q2 ( t ) – q3 ( t ) ) t ( t ) = ----2 t 1 ( t ) = D 2 w 2 ( t ) + I 2 --------------r1 dt
(24.247)
dw 3 ( t ) 0 = K 2 ( q 3 ( t ) – q 2 ( t ) ) + I 3 --------------dt
(24.248)
Since we have chosen w1(t) as the measurable system variable, we finally obtain
2
2
2
r1 D2 + r2 D1 – ---------------------------2 2 r1 I2 + r2 I1
r1 r2 K2 – ----------------------2 2 r1 I2 + r2 I1
r1 ---r2
0
0
K2 -----I3
0 –1 x ( t ) +
0
0
0
t(t)
(24.249)
dx ( t ) ------------- = dt
r2 ----------------------2 2 r1 I2 + r2 I1
A
B
0
0] x(t)
(24.250)
w1 ( t ) = [ 1
C
To evaluate the observability properties of this system, numerical values for the parameters are chosen as follows:
r 1 = 0.25 m, K 2 = 30 Nm/rad,
r 2 = r 3 = 0.50 m, I 1 = 2.39 Nms /rad, 2
D 1 = D 2 = 10 Nms/rad
(24.251)
I 2 = I 3 = 38.29 Nms /rad
(24.252)
2
With these values we have that
A =
– 1.045 – 1.254 0 0.5 0 –1 , 0 0.784 0
B =
0.084 0 0
(24.253)
We next use the test presented in the subsection “Observability, Reconstructibility, and Detectability.” This yields
Γo =
C CA CA
©2002 CRC Press LLC
2
1.0000 0 0 = – 1.0450 – 1.2540 0 0.4650 1.3104 1.2540
(24.254)
0066_Frame_C24 Page 44 Thursday, January 10, 2002 3:46 PM
From this expression we see that Γo is a full rank matrix. Thus, the system state is completely observable from w1(t). Once we have a state estimate, xˆ ( t ), an estimate, w 3 ( t ) for w3, is obtained from
w 3(t) = [0
1 ] xˆ ( t )
(24.255)
0
T
K3
where w 3 (t) can be obtained from (24.239). This yields
(24.256)
ˆ dw 3 ( t ) ˆ(t) T dx T T ---------------- = K 3 ------------- = K 3 ( A – JC )xˆ ( t ) + K T3 B t ( t ) + K 3 Jw 1 ( t ) dt dt 0
Observers and Measurement Noise In the theory above we have assumed that both the system input, u(t), and the system output, y(t), are available with no errors. This assumption is usually correct with regard to u(t), since the same equipment generating u(t) is normally used to estimate the state. However, that assumption is not usually valid with respect to y(t), since the measurement of this variable is normally corrupted with noise. To analyze the effect of this error, let us denote by ym(t) the noisy measurement, i.e., ym(t) = y(t) + v(t), where v(t) is the additive measurement noise. Therefore, the state estimation error satisfies
dx˜ ( t ) ------------- = ( A – JC )x˜ ( t ) + Jv ( t ) dt
(24.257)
–1 –1 X˜ ( s ) = ( sI – A + JC ) x˜ ( 0 ) + ( sI – A + JC ) JV ( s )
(24.258)
We then have that
−1
Hence, the error is small if the transfer function (sI − A + JC) J filters out the noise. Consider the following example. Example 24.22 A system has a state space model given by
A =
–2
1
1
–3
,
B =
1 0.5
,
C = [ 1 – 1 ],
D = 0
(24.259)
Assume that we want to estimate a system variable z(t) = g x(t), where g = [1 1]. Then, a suitable observer-based estimate is zˆ ( t ), which is given by T
T
T zˆ ( t ) = g xˆ ( t )
(24.260)
Then, the noise term in the estimation of z(t) is zv(t), whose Laplace transform satisfies
Z v ( s ) = H v ( s )V ( s ), where H v ( s ) = g ( sI – A + JC ) J T
©2002 CRC Press LLC
–1
(24.261)
0066_Frame_C24 Page 45 Thursday, January 10, 2002 3:46 PM
40
|H2( jω)|
Magnitude [dB]
20 0 -20
|H ( jω)| 1
-40 -60 -1 10
FIGURE 24.18
0
10
1
10 Frequency [rad/s]
2
10
3
10
Observer filtering characteristics.
We next consider two different choices for the observer polynomial E(s). They are
E 1 ( s ) = ( s + 0.5 ) ( s + 0.75 ) and E 2 ( s ) = ( s + 10 ) ( s + 20 )
(24.262)
The reader can appreciate that the resulting observers will have very different speeds, the first observer being much slower than the second one. With those choices we compute the observer gains, J1 and J2, and the corresponding filter functions
1.875s + 5.625 T –1 H 1 ( s ) = g ( sI – A + J 1 C ) J 1 = ----------------------------------------2 s + 1.25s + 0.375
(24.263)
144s + 432 T –1 H 2 ( s ) = g ( sI – A + J 2 C ) J 2 = -------------------------------2 s + 30s + 200
(24.264)
To compare both cases we compute and plot the frequency response of each filter. The result is shown in Fig. 24.18. From Fig. 24.18 we observe that for a high frequency noise, the slowest filter is more immune to noise than the fast filter. The above case exemplifies the trade-off between observer speed and noise immunity. A systematic way to face this dilemma is to use an optimal filter theory, such as Kalman–Bucy filtering. The interested reader is referred to [2].
24.8 State Feedback Basic Concepts When all the system states can be measured, and the system is completely reachable (in the sense explained in subsection “Controllability, Reactability, and Stabilizability”), we can control the system using state feedback to achieve full command of the loop dynamics. This idea is captured in Fig. 24.19. Figure 24.19 shows the most basic form of state feedback: the plant input has a component that is proportional to the state (the other component is an external signal r (t)). State feedback is a very simple, almost naive idea. A careful analysis shows that this idea has some shortcomings and potentially dangerous features, such as • It requires as many sensors as state variables. This is not only very expensive but also, in some cases, its implementation may become impossible. • Each state measurement is a source of error because of its limited accuracy. • Each measurement introduces noise, which has deleterious effect on the control system performance.
©2002 CRC Press LLC
0066_Frame_C24 Page 46 Thursday, January 10, 2002 3:46 PM
r (t) +
y(t) -
System x(t) K
FIGURE 24.19
State feedback.
• The correct overall performance relies on the correct functioning of a complex set of equipments. This poses several questions regarding performance degradation and system integrity. In spite of these weak points, state feedback is by itself a powerful concept, since it works as a basis for more sophisticated and robust control schemes. The key reason for this is that any linear controller can be explained as the combination of a state observer and state feedback.
Feedback Dynamics Assume that the system to be controlled has a transfer function H(s) and a state space representation given by (24.42) and (24.43), with D = 0. If the plant input is generated according to
u ( t ) = – Kx ( t ) + r ( t )
(24.265)
then the state space representation for the complete control loop is given by
dx ( t ) ------------- = Ax ( t ) + B ( – Kx ( t ) + r ( t ) ) dt
(24.266)
y ( t ) = Cx ( t )
(24.267)
It can be shown that the relationship between R (s) and Y(s) is given by
Y(s) =
–1
–1 C ( sI – A ) B ( I + K ( sI – A ) B ) R ( s )
(24.268)
–1
H(s)
This shows that the state feedback loop preserves the system zeros and shifts the poles to the roots of det (sI − A + BK).
Optimal State Feedback. The Optimal Regulator Consider a linear time invariant system having a state space representation given by (24.42) and (24.43), with D = 0, subject to the initial state x(0) = xo. Assume that the control objective is to steer the plant from the the initial state, xo, to the smallest possible value as soon as possible in the interval [0, tf ]. We additionally require that the steering process does not demand too much control effort. Then, the optimal regulator problem is defined as the problem of finding an optimal control u(t) over the interval [0, tf ] such that a quadratic cost function is minimized. This cost function is chosen as
Ju ( xo ) =
©2002 CRC Press LLC
tf
∫
0
[ x ( t ) Qx ( t ) + u ( t ) Ru ( t ) ] dt + x ( t f ) Q f x ( t f ) T
T
T
(24.269)
0066_Frame_C24 Page 47 Thursday, January 10, 2002 3:46 PM
where Q ∈ , Qf ∈ are symmetric nonnegative definite matrices and R ∈ is a symmetric positive definite matrix. The requirements on the weighting matrices are set so that the cost function makes sense. For instance, if Q is allowed to be negative, then the optimal cost could even be negative while the state could grow unbounded in magnitude. Also, if we allow R to have eigenvalues at the origin (i.e., R is allowed to be a nonnegative definite matrix, instead of requiring it to be a strictly positive definite matrix) then the control u(t) could also grow unbounded (in the directions of the associated eigenvectors) without that situation being revealed by the cost function. A time invariant linear control law is asymptotically obtained when t f → ∞. Under this condition, the optimal control law is given by n×n
n×n
m×m
u ( t ) = –K x ( t ) o
o
(24.270)
with −1
K = –R B P∞ o
T
(24.271)
and where P∞ is the only nonnegative solution of the algebraic Riccati equation −1
0 = Q – P ∞ BR B P ∞ + P ∞ A + A P ∞ T
T
(24.272)
For this solution to exist, it is necessary that certain technical conditions are satisfied (for a detailed discussion of these issues see, for instance, [5]). Discussion • The solution for the LQR problem minimizes the cost function (24.269) and, when t f → ∞, always stabilizes the plant. T • A key issue is how to choose the weighting matrices Q and R. A frequent choice for Q is Q = C C. With this choice, the magnitude of the plant output is directly introduced into the cost function. • For a given Q, the size of R strongly influences the location of the closed loop poles. The larger R is, the slower is the control loop. Further reading on optimal quadratic regulators can be found in the literature. See, e.g., [1,3,4,8,9].
24.9 Observed State Feedback Separation Strategy Due to the drawbacks inherent in the measuring of the state, feedback of the estimated state can be used instead. The resulting control system integrates an observer and a feedback mechanism for the observed states. The combination of a state observer and the feedback of the estimated state conform the structure shown in Fig. 24.20. In Fig. 24.20, the (matrix) transfer functions T1(s) and T2(s) can be obtained from Fig. 24.15. This yields −1
T 1 ( s ) = ( sI – A o + JC o ) B o −1
T 2 ( s ) = ( sI – A o + JC o ) J
©2002 CRC Press LLC
(24.173) (24.174)
0066_Frame_C24 Page 48 Thursday, January 10, 2002 3:46 PM
u(t)
r (t)
y(t) System
+
T2
T1 +
+
^ x(t) K
FIGURE 24.20
Estimated state feedback.
r(t)
P(s)
r (t)
E(s)
E(s)
+ -
u(t)
L(s)
y(t) System
P(s) E(s) FIGURE 24.21
Equivalent control loop.
Transfer Function Interpretation for the Single-Input Single-Output Case Consider a SISO plant having transfer function
No ( s ) −1 G o ( s ) = C ( sI – A o ) B = ------------Mo ( s )
(24.275)
where Mo(s) and No(s) are polynomials in s. First, a state feedback gain, K, is chosen to obtain a closed loop polynomial F(s), where F(s) = det (sI − Ao + BoK). Next, an observer gain, J, is computed to obtain an observer polynomial E(s) = det (sI − Ao + JCo). If the observer and the observed state feedback are combined, the resulting control loop can be made equivalent (by a suitable choice of r (t)) to the classical control loop shown in Fig. 24.21. In Fig. 24.21 the polynomials P(s) and L(s) satisfy the Diophantine equation
M o ( s )L ( s ) + N o ( s )P ( s ) = E ( s )F ( s )
(24.276)
This result says that the set of closed loop poles is the union of the set of observer poles and the set of state feedback poles.
References 1. 2. 3. 4.
Anderson, B.D.O. and Moore, J., Linear optimal Control. Prentice-Hall, Englewood Cliffs, NJ, 1971. Anderson, B.D.O. and Moore, J., Optimal Filtering. Prentice-Hall, Englewood Cliffs, NJ, 1979. Athans, M. and Falb, P., Optimal Control. McGraw HIll, 1966. Dennis Bernstein and Wassim Haddad. LQG control with an H∞ performance bound: A Riccati equation approach. IEEE Transactions on Automatic Control, 34(3): L293–305, 1989. 5. Bittanti, S., Laub, A.J., and Willems, J.C., The Riccati Equation. Springer Verlag, Berlin, 1996. 6. Dorf, R.C. and Bishop, R., Modern Control Systems. Prentice-Hall, Englewood Cliffs, NJ, 1997. ©2002 CRC Press LLC
0066_Frame_C24 Page 49 Thursday, January 10, 2002 3:46 PM
7. 8. 9. 10. 11. 12. 13. 14. 15. 16.
Franklin, G.F. and Powel, J.D., Digital Control of Dynamics Systems. 2nd ed., Addison-Wesley, 1990. Goodwin, G.C., Graebe, S., and Salgado, M.E., Control System Design. Prentice-Hall, NJ, 2001. Kwakernaak, H. and Sivan, R., Linear Optimal Control System. Wiley–Interscience, New York, 1972. Ogata, K., State Space Analysis of Control Systems. Prentice-Hall, Englewood Cliffis, NJ, 1967. Rosenbrock, H.H., State Space and Multivariable Theory. John Wiley and Sons, New York, 1970. Schultz, D.G. and Melsa, J.L., State Function and Linear Control Systems. McGraw Hill, New York, 1967. Wiberg, D.W., Theory and Problems of State Space and Linear Systems. McGraw Hill, New York, 1971. Zadeh, L.A. and Desoer, C.A., Linear System Theory: The State Space Approach. McGraw Hill, New York, 1963. Zhou, K., Essentials of Robust Control. Prentice-Hall, Englewood Cliffs, NJ, 1998. Zhou, K., Salomon, G., and Wu, E., Balanced realization and model reduction for unstable systems. International Journal of Robust and Nonlinear Control, 9:183–198, 1999.
©2002 CRC Press LLC
0066_Frame_C25 Page 1 Wednesday, January 9, 2002 7:05 PM
25 Response of Dynamic Systems 25.1
System and Signal Analysis Continuous Time Systems • Discrete Time Systems • Laplace and z-Transform • Transfer Function Models
25.2
Dynamic Response Pulse and Step Response • Sinusoid and Frequency Response
Raymond de Callafon
25.3
Performance Indicators for Dynamic Systems Step Response Parameters • Frequency Domain Parameters
University of California
25.1 System and Signal Analysis In dynamic system design and analysis it is important to predict and understand the dynamic behavior of the system. Examining the dynamic behavior can be done by using a mathematical model that describes the relevant dynamic behavior of the system in which we are interested. Typically, a model is formulated to describe either continuous or discrete time behavior of a system. The corresponding equations that govern the model are used to predict and understand the dynamic behavior of the system. A rigorous analysis can be done for relatively simple models of a dynamic system by actually computing solutions to the equations of the model. Usually, this analysis is limited to linear first and second order models. Although limited to small order models, the solutions tend to give insight in the typical responses of a dynamic system. For more complicated, higher order and possibly nonlinear models, numerical simulation tools provide an alternative for the dynamic system analysis. In the following we review the analysis of linear models of discrete and continuous time dynamic systems. The equations that describe and relate continuous and discrete time behavior are presented. For the analysis of continuous time systems extensive use is made of the Laplace transform that converts linear differential equations into algebraic expressions. For similar purposes, a z-transform is used for discrete time systems.
Continuous Time Systems Models that describe the linear continuous time dynamical behavior of a system are usually given in the form of differential equations that relate an input signal u(t) to an output signal y(t). The differential equation of a time invariant linear continuous time model has the general format na
∑
j
d a j ------j y ( t ) = dt j=0
©2002 CRC Press LLC
nb
∑
k
d b j ------j u ( t ) dt j=0
(25.1)
0066_Frame_C25 Page 2 Wednesday, January 9, 2002 7:05 PM
j
j
in which a linear combination is taken using the jth order time derivatives d /dt of a single output y(t) and a single input u(t). In (25.1), the scalar real valued numbers aj for j = 0,…na, a na ≠ 0 and bj for j = 0,…, nb, b nb ≠ 0, respectively, are called the denominator and numerator coefficients. The input u(t) is distinguished from the output y(t) in (25.1) by requiring na ≥ nb. As a result, the nath derivative is the highest derivative of the output y(t) and na is used to indicate the order of the differential equation. An alternative representation of a model of a continuous time system can be obtained by rewriting the nath order differential equation in (25.1) into a set of (coupled) first order differential equations. This can be done by introducing a state variable x(t) and rewriting the higher order differential equation into
d ----- x ( t ) = Ax ( t ) + Bu ( t ) dt y ( t ) = Cx ( t ) + Du ( t )
(25.2)
where A, B, C, and D are real valued matrices. The set of first order differential equations given in (25.2) is referred to as a state space representation. The state variable x(t) is a column vector and contains na variables, where na is the order of the differential equation. The size of the matrices in (25.2) corresponds to the order of differential equation from which the state space realization is derived. For generalization purposes, consider multiple inputs and outputs rearranged in m × 1 input column vector u(t) and a p × 1 output column vector y(t). Given the na × 1 size of the state vector, the state matrix A has size na × na, the input matrix has size na × m, the output matrix C has size p × na , and the feedthrough matrix D has size m × p. From these size considerations it can be observed that the state space realization in (25.2) easily generalizes the model description of multi-input multi-output systems. To illustrate the concepts, consider the differential equation 2
d d m -------2 y ( t ) + c ----- y ( t ) + ky ( t ) = u ( t ) dt dt
(25.3)
that describes the dynamical behavior of the one cart system given in Fig. 25.1. The differential equation (25.3) is found by writing Newton’s second law for the cart mass m with position output y(t), spring force ky(t), damper force c(d / dt)y(t), and force input u(t). Comparing with (25.1) it can be seen that na = 2 ≥ nb = 0, making (25.3) a second order differential equation. The differential equation can be rewritten into a state space representation (25.2) by defining the state variable
x ( t ) :=
y(t) d ----- y ( t ) dt
FIGURE 25.1 One cart system representing a single mass dynamical system with cart mass m, spring constant k, and damping constant c. ©2002 CRC Press LLC
0066_Frame_C25 Page 3 Wednesday, January 9, 2002 7:05 PM
that consists the position and velocity of the mass. With this state variable (25.3) can be rewritten into
d ----- x ( t ) = dt
0
1
k – ---m
d – ---m
x(t) +
0
u(t)
1 ---m
y ( t ) = 1 0 x ( t ) + 0u ( t ) which yields a state space model similar to (25.2). In this case, the size of the state matrix A is 2 × 2, the input matrix B is 2 × 1, the output matrix C is 1 × 2, and the feedthrough matrix D = 0 is scalar.
Discrete Time Systems Discrete time models approximate and describe the sampled data behavior of a continuous time dynamical system. In some applications, such as digital control, the dynamical control system is inherently discrete time. In these situations, analysis with discrete time equivalent models in necessary. For analysis purposes, both input u(t) and output y(t) are assumed to be sampled on a regular discrete time interval
t = k∆T,
k = 0,1,2,…
where ∆T indicates the sampling time. To maintain uniform notation throughout the analysis, the sampling time ∆T is normalized to ∆T = 1 and the time dependency t is assumed to be discrete with t = k = 0,1,2,…. Given sampled or discrete time input/output data, a linear discrete time model can be formulated in the form of a difference equation nc
nd
∑ c y(k + j) = ∑ d u(k + j) k
(25.4)
k
j=0
j=0
in which a linear combination is taken of positive time shifted inputs u(k) and outputs y(k). To distinguish the differential equation from the differential equation (25.1), different scalar real valued numbers cj for j = 0,…,nc , c nc ≠ 0 and dj for j = 0,…,nd , d nd ≠ 0 are used. The input u(k) is distinguished from the output y(k) in (25.1) by requiring nc ≥ nd for causality purposes. As a result, the nc is the largest time shift of the output y(k) and nc is used to indicate the order of the difference equation. The simplicity with which the difference equation can be represented also allows an algebraic representation of (25.4). Introducing the time shift operator
qu ( k ) := u ( k + 1 )
(25.5)
allows (25.4) to be rewritten into the algebraic expression nc
y(k)
∑
nd
cj q = u ( k )
j=0
j
∑d q
j
j
j=0
Following this analysis, the discrete time output y(k) can be represented by the difference model n
y ( k ) = G ( q )u ( k ), ©2002 CRC Press LLC
d ∑ j=0 dj q with G ( q ) = ------------------nc j ∑ j=0 c j q
j
(25.6)
0066_Frame_C25 Page 4 Wednesday, January 9, 2002 7:05 PM
where the scalar real valued numbers cj for j = 0,…,nc , c nc ≠ 0 and dj for j = 0,…,nd , d nd ≠ 0, respectively, indicate the denominator and numerator coefficients. Similar to the continuous time system representation, the higher order difference equation (25.4) can also be rewritten into a set of (coupled) first order difference equations for analysis purposes. This can be done by introducing a state variable x(k) and rewriting the higher order difference equation into
qx ( k ) = Fx ( k ) + Gu ( k ) y ( k ) = Hx ( k ) + Ju ( k )
(25.7)
where qx(k) = x(k + 1), according to (25.5). The state variable x(k) is a column vector and contains nc variables, where nc is the order of the difference equation. The state space matrices in (25.7) are labeled differently to distinguish them from the continuous time state space model.
Laplace and z-Transform An important mathematical concept for the analysis of models described by linear differential equations such as (25.1) and (25.2) is the Laplace transform. As indicated before, the Laplace transform converts linear differential equations into algebraic expressions. With this conversion, proper algebraic manipulation can be used to recover solutions of the differential equation. In a similar manner, the z-transform is used for discrete time models described by difference equations. Although it was shown in (25.6) that a difference equation can be written as an algebraic expression, the z-transform allows complex analysis of the discrete time models. The Laplace transform of a signal u(t) is defined to be
L { u ( t ) } := u ( s ) =
∫
∞
u ( t )e
– st
dt
(25.8)
t=0
where the integration over t eliminates the time dependency and the transform u(s) is a function of the Laplace variable only. This is indicated in the transform u(s) where the dependency of t has been dropped, and u(s) is a function of the (complex valued) Laplace variable s only. The integral (25.8) exists for most commonly used signals u(t), provided certain conditions on s are imposed. To illustrate the transform, consider a (unity) step signal
0, t < 0 u ( t ) := 1, t ≥ 0 where the shape of u(t) resembles a stepwise change of an input signal. With the definition of the Laplace transform in (25.8) the transform of the step signal becomes
u(s) =
∫
∞
t=0
u ( t )e
– st
dt =
∫
∞
e
– st
t=0
– st ∞
e dt = – ------s
0
1 = -s
(25.9) −st
where it is assumed that the real part of s is greater than zero so that limt→∞ e = 0. If a signal u(k) is given at discrete time samples k = 0, 1, 2…, the integral expression of (25.8) cannot be applied. Instead, a transform similar to the Laplace transform can be used and denoted by the z-transform. The z-transform of a discrete time signal u(k) is defined as ∞
L { u ( k ) } := u ( z ) =
∑ u ( k )z k=0
©2002 CRC Press LLC
–k
(25.10)
0066_Frame_C25 Page 5 Wednesday, January 9, 2002 7:05 PM
The series (25.10) converges if it is assumed that there exist values rl and ru with rl < |z| < ru as bounds on the magnitude of the complex variable z. The z-transform has the same role in discrete time systems that the Laplace transform has in continuous time systems. In case of sampling, the complex variable z of the z-transform is related to the complex variables s in the Laplace transform via
z=e
s∆T
(25.11)
where ∆Τ is the sampling time used for sampling. Both the Laplace and z-transform are linear operators and satisfy
L { au ( t ) + by ( t ) } = aL { u ( t ) } + b { y ( t ) }
(25.12)
Using the definition in (25.8) and the linearity property in (25.12), the transform of most commonly used functions has been precalculated and tabulated. Of particular interest for the analysis of linear differential equations such as (25.1) and (25.2) is the Laplace transform of a derivative:
d L ----- u ( t ) = dt
∫
∞
t=0
d – st ----- u ( t )e dt dt
= u ( t )e
– st ∞ 0
+s
∫
∞
u ( t )e
– st
dt
t=0
= su ( s ) – u ( 0 ) With u(0) = 0 it can be seen that the Laplace transform of the derivative of u(t) is simply s times the Laplace transform of u(s). This result can be extended to higher order derivatives and the result for the nth derivative is given by
dn n L -------n u ( t ) = s u ( s ) – dt
n
∑
s
j=1
n−j
j−1
d -----------u (t) j−1 dt
t=0
In case the signal u(t) satisfies the initial zero conditions j−1
d -----------u(t) j−1 dt
=0
for j = 1, …, n
t=0
the formula reduces to
dn n L -------n u ( t ) = s u ( s ) dt n
and the Laplace transform of an nth order derivative is simply s times the transform u(s). For discrete time systems the interest lies in the z-transform of a time-shifted signal. Similar to the Laplace transform, the z-transform of an n time-shifted signal can be computed and is given by n−1
L{q u(k)} = z u(z) – n
n
∑z j=0
©2002 CRC Press LLC
n−j
u(j)
0066_Frame_C25 Page 6 Wednesday, January 9, 2002 7:05 PM
In case the discrete time signal u(k) satisfies the initial zero conditions u( j) = 0 for j = 0,…,n − 1, the formula reduces to
L{q u(k)} = z u(z) n
n
n
and the z-transform of an n time-shifted discrete time signal is simply z times the transform u(z).
Transfer Function Models The results of the Laplace and z-transform can be used to reduce linear differential equations (25.1) and difference equation (25.4) to the algebraic expressions. Starting with the differential equations for continuous time models and assuming zero initial conditions for both the input u(t) and output signal y(t), the Laplace transform of (25.1) yields na
y(s)
∑a s
nb
j
j
= u(s)
j=0
∑b s
j
j
j=0
which can be written in transfer function format n
b ∑ j=0 bj s with G ( s ) = -----------------na j ∑ j=0 a j s
y ( s ) = G ( s )u ( s ),
j
(25.13) nb
In (25.13), the transfer function G(s) is the ratio of the numerator polynomial ∑ j=0 b j s and the denomna j inator polynomial ∑ j=0 a j s . As indicated before, the scalar real valued numbers aj for j = 0,…,na, a na ≠ 0 and bj for j = 0, …,n b, b nb ≠ 0, respectively, are called the denominator and numerator coefficients. Similarly for the discrete time model, assuming zero initial conditions for both the input u(k) and output signal y(k), the z-transform of (25.4) yields nc
y(z)
∑
j
nd
cj z = u ( z ) j
j=0
∑b z
j
j
j=0
which can be written in transfer function format n
y ( z ) = G ( z )u ( z ),
c ∑ j=0 cj z with G ( z ) = ------------------na j ∑ j=0 a j z
j
(25.14)
From the transfer function representations, poles and zeros of the dynamic system can be computed for dynamic system analysis. The poles of the system are defined as the roots of the denominator polynomial. The zeros of the system are defined as the roots of the numerator polynomial. The Laplace and z-transform can also be used to reduce the state space representation to a set of algebraic expressions that consists of (coupled) first order polynomials. Assuming zero initial conditions for the state vector x(t), application of the Laplace transform to (25.2) yields
sx ( s ) = Ax ( s ) + Bu ( s ) y ( s ) = Cx ( s ) + Du ( s ) −1
in which the state vector x(s) can be eliminated. Solving for x(s) gives x(s) = (sI − A) Bu(s) and the above transform can be rewritten into a transfer function representation
y ( s ) = G ( s )u ( s ), ©2002 CRC Press LLC
with G ( s ) = D + C ( sI – A ) B –1
(25.15)
0066_Frame_C25 Page 7 Wednesday, January 9, 2002 7:05 PM
Under mild technical conditions involving controllability and observability of the state space model, the transfer function representations in (25.13) and (25.15) are similar in case the state space model in (25.2) is derived from the differential equation (25.1) and vice versa.
25.2 Dynamic Response The Laplace and z-transform offer the possibility to compute the dynamic response of a dynamic system by means of algebraic manipulations. The analysis of the dynamic response gives insight into the dynamic behavior of the system by addressing the response to typical test signals such as impulse, step, and sinusoid excitation of the system. The response can be computed for relatively simple continuous or discrete dynamical systems given by low order differential or difference equations. Both the state space model and the transfer function descriptions provide helpful representations in the analysis of a dynamic system. The result are presented in the following.
Pulse and Step Response A possible way to evaluate the response of a dynamic system is by means of pulse and step based test signals. For continuous time systems an input impulse signal is defined as a δ function
∞, u imp ( t ) := d ( t ) = 0,
t=0 t≠0
with the property
∫
∞
f ( t )d ( t ) = f ( 0 )
t=−∞
where f(t) is an integrable function over (−∞, ∞). Although an impulse signal is not practical from an experiment point of view, the computation or simulation of the impulse response gives insight into the transient behavior of the dynamical system. With the properties of the impulse function δ(t) mentioned above, the Laplace transform of the impulse function is given by
L{d(t)} = d(s) =
∫
∞
d ( t )e
– st
dt = e
– s0
= 1
t=0
Hence the output y(s) due to an impulse input is given by yimp(s) = G(s)uimp(s) = G(s)δ (s) = G(s). As a result, an immediate inverse Laplace transform of the continuous time transfer function G(s),
y imp ( t ) = L { G ( s ) } –1
gives the dynamic response yimp(t) of the system to an impulse input response. The computation of the step response is done in a similar way. In (25.9), the Laplace transform of the step signal
0, t < 0 u step ( t ) := 1, t ≥ 0 ©2002 CRC Press LLC
0066_Frame_C25 Page 8 Wednesday, January 9, 2002 7:05 PM
is given as ustep(s) = 1/s. Consequently, with ystep(s) = G(s)ustep(s) = G(s)/s, the inverse Laplace transform of G(s)/s –1 G ( s ) y step ( t ) = L ----------- s
will yield the dynamic response ystep(t) of the system to a step input response. From a practical point of view, the computation of an inverse Laplace transform is limited to low order models of first or second order. However, the results give insight into the dominant behavior of most dynamic systems. This is illustrated in the following examples. • Consider a first order continuous model given by the transfer function
K G ( s ) = -------------ts + 1 where K and τ indicate, respectively, the static gain and the time constant of the system. Such a transfer function may arise from a simple RC network with τ = RC. In order to compute the step response of the system, the inverse Laplace transform of G(s)/s needs to be computed. This inverse Laplace transform is given by
K –1 G ( s ) – t /t y step ( t ) = L ----------- = --- ( 1 – e ) s t and it can be seen that the step response is an exponential function. For stability the time constant τ needs to satisfy τ > 0. It can also be observed that the smaller the time constant, the faster the response. • Consider a second order continuous time model given by the transfer function 2
wn -2 G ( s ) = -------------------------------------2 s + 2bw n s + w n
(25.16)
where ωn and β, respectively, indicate the undamped resonance frequency and the damping coefficient of the system. This model can be derived from the dynamical behavior of the one cart system depicted in Fig. 25.1 and given in (25.3). For β < 1 (underdamped), the inverse Laplace transform of G(s) is given by
w m –bwn t 2 -e sin ( w n 1 – b t ) y imp ( t ) = ----------------2 1–b From this expression it can be observed that the response is a decaying sinusoid with a resonance 2 frequency of w n 1 – b . For stability, both ωn > 0 and β > 0 and the larger ωn , the faster the decay of the sinusoid and the higher is the frequency of the response yimp(t). Illustration of the impulse response of this second order system have been depicted in Figs. 25.2 and 25.3 where variations in the undamped resonance frequency ωn and the damping coefficient β illustrate the dynamic behavior of the system. For discrete systems, the analysis of the pulse response is based on the discrete time pulse function
1, k = 0 u imp ( k ) := d ( k ) = 0, k ≠ 0 ©2002 CRC Press LLC
0066_Frame_C25 Page 9 Wednesday, January 9, 2002 7:05 PM
FIGURE 25.2 Variations in impulse response yimp(t) of second order system with ωn = 6 and β = 0.1(), 0.2(), 0.4(+), 0.6 (*), 0.8().
FIGURE 25.3 Variations in impulse response yimp(t) of second order system with β = 0.4 and ωn = 2(), 4(), 6(+), 8(*), 10().
which has a value of 1 at k = 0 and zero anywhere else. The step signal is similar to the continuous time signal and is given by
0, k < 0 u step ( k ) := 1, k ≥ 1 In order to characterize the discrete time pulse and step response a similar procedure as for the continuous time model can be followed by using the z-transform. It is easy to show that the z-transform uimp(z) = 1 and the z-transform of the step signal equals ustep z = z/(z − 1). Hence, the response of the discrete time system to a pulse or step signal can be computed with
y imp ( k ) = L { G ( z ) }, –1
©2002 CRC Press LLC
– 1 G ( z )z y step ( k ) = L -------------- z–1
0066_Frame_C25 Page 10 Wednesday, January 9, 2002 7:05 PM
In addition to the approach using a z-transform, the ratio of the polynomials in the difference model (25.6) can be written in a series expansion: n
∞
d ∑ j=0 dj q - = G ( q ) = -----------------nc j ∑ j=0 c j q
j
∑g q
–k
k
j=0
With the discrete time pulse function uimp(k) as an input, it can be observed that ∞
y imp ( k ) =
∑g q k
–k
d ( k ) = gk
j=0
and it can be concluded that the pulse response yimp(k) equals the coefficients in the series expansion of the difference equation. Similarly, with the discrete time step function ustep(k) as an input, it can be observed that ∞
y imp ( k ) =
∑g q k
k
–k
∑g
u step ( k ) =
j=0
k
j=0
and it can be concluded that the step response ystep(k) values are computed as a finite sum of the coefficients in the series expansion of the difference equation. The computation of a discrete time pulse response for a first order discrete time model is given in the following example. • Consider a first order discrete model given by the difference model
1 G ( q ) = -----------q+d where d indicates the discrete time constant of the system. The series expansion of the difference model can be computed as follows:
1 G ( q ) = ----------- = q–d
∞
∑d
j
j=0
and it can be seen that the discrete time pulse response
y imp(k) = d
k
is an exponential function. For stability the discrete constant d needs to satisfy |d| < 1. Similar as in the continuous time model it can be observed that the smaller the time constant, the faster the response. Additionally, the first order discrete time model may exhibit an oscillation in case −1 < d < 0.
Sinusoid and Frequency Response So far we have considered transient effects caused by step, pulse, and impulse inputs to investigate the dynamic properties of a dynamical system. However, periodic inputs occur frequently in practical situations and the analysis of a dynamic system to periodic inputs and especially sinusoidal inputs can yield more insight into the behavior of the system.
©2002 CRC Press LLC
0066_Frame_C25 Page 11 Wednesday, January 9, 2002 7:05 PM
The response of a linear system to a sinusoidal input is referred to as the frequency response of the system. An input signal, u(t) = U sin ω t, that is, a sine wave with amplitude U and frequency ωj , has a Laplace transform
Uw -2 . u ( s ) = --------------2 s +w Consequently, the response of the system is given by
Uw -2 y ( s ) = G ( s ) --------------2 s +w and a partial fraction expansion of y(s) will result in terms that represent the (stable) transient behavior of y(s) and the term associated to the sinusoidal input u(s). Elimination of the transient effects and performing an inverse Laplace transform will yield a periodic time response y(t) of the same frequency ωj given by
y ( t ) = AU sin ( wt + f ) where the amplitude magnification A and the phase shift φ are given by
A = G(s)
s=iw
,
f = ∠G ( s )
s=iw
(25.17)
By evaluating the transfer function G(s) along the imaginary axis s = iω, ω ≥ 0, the magnitude |G(iω)| gives information on the relative amplification of the sinusoidal input, whereas the phase ∠G (iω) gives information on the relative phase shift between input and output. This analysis can be easily extended to discrete time systems by employing the relation between the Laplace variable s and the z-transform variable in (25.11) to obtain the discrete time sinusoidal response
y ( k ) = AU sin ( wk + f ) where the amplitude magnification A and the phase shift φ are given by
A = G(z)
z=e
i∆Tw
,
f = ∠G ( z )
z=e
i∆Tw
(25.18)
Due to the sampling nature of the discrete time system, the transfer function G(z) is now evaluated on the unit circle
e
i∆Tw
p , 0 ≤ w < ------∆T
to attain information of the magnitude and phase shift of the sinusoidal response. Plotting the frequency response of a dynamical system gives insight in the pole locations (resonance modes) and zero locations of the dynamical system. As an example, the frequency response of the second order system given in (25.16) has been depicted in Fig. 25.4. It can be seen from the figure that, as expected, the second order system is less damped for smaller damping coefficients β and this results in a larger amplitude response of the second order system at the resonance frequency ωn = 6 rad/s. It can also be observed that the phase change at the resonance frequency becomes more abrupt for smaller damping coefficients.
©2002 CRC Press LLC
0066_Frame_C25 Page 12 Wednesday, January 9, 2002 7:05 PM
FIGURE 25.4 Variations in frequency response of second order system G(s) with ωn = 6 and β = 0.1(), 0.2(), 0.4(+), 0.6(*), 0.8().
25.3 Performance Indicators for Dynamic Systems Step Response Parameters Specifications for dynamic systems often involve requirements on the transient behavior of the system. Transient behavior requirements can be formulated on the basis of a step response and the most significant parameters have been summarized below and illustrated in Fig. 25.5. • Steady state or DC value ys of step response output. • The steady state error yse is the error between steady state value ys and desired DC value of step response output. • The maximum overshoot Am is the maximum deviation of the step response output above its steady state value ys. • The peak time tp is the time at which the maximum overshoot occurs. • Settling time ts is the time at which the step response input stays within some small percentage rage of the steady state value ys. Typically, a percentage of 2% or 5% is chosen to determine the settling time. • The rise time tr is usually defined as the time required for the step response output to rise from 10% to 90% of the steady state value ys. • The delay time td is defined as the time required to reach 50% of the steady state value ys. ©2002 CRC Press LLC
0066_Frame_C25 Page 13 Wednesday, January 9, 2002 7:05 PM
FIGURE 25.5 Parameters for step-response behavior: steady state value ys , steady state error yse, maximum overshoot Am, peak time tp , settling time ts, rise time tr , and delay time td .
Most of the above value can be obtained from an experimentally determined step response. In general, they cannot be obtained in an analytical form, except for low order models. For the second order model of the one mass system given in (25.3), some analytical results can be obtained. For a second order model of (25.3), the maximum overshoot Am is determined by
A m = 100e
– pb
A 100 2 / 1 – x , where x = ---------------------- , A = ln -------- Am 2 2 p +A
The peak time tp can be computed by
p t p = -----------------------2 wn 1 – x whereas the delay time td can be approximated by
1 + 0.7x t d ≈ ------------------wn As the maximum overshoot increases with a smaller damping coefficient β in the system, the maximum overshoot is often used to indicate the relative stability of the system.
Frequency Domain Parameters With the frequency domain analysis of dynamic systems, specifications for the dynamic properties of a system can also be stated in the frequency domain. Frequency domain specifications in filter design often address ripple, bandwidth, roll-off, and phase lag parameters. Similar characteristics can also be specified for dynamic systems in case the model of the system is analyzed in the frequency domain. The most significant parameters have been summarized below and illustrated in Fig. 25.6. • The bandwidth ω b is a notion for the maximum frequency at which the output will track a sinusoidal input in a satisfactory manner. By convention, the bandwidth is defined as the frequency at which the output is attenuated −3 dB (0.707). • The resonant frequency ωr is the first frequency at which a significant resonance mode with low damping occurs. The resonance mode can, if uncontrolled, negatively influence the settling time of the dynamic system and plays an important role in characterization of performance. ©2002 CRC Press LLC
0066_Frame_C25 Page 14 Wednesday, January 9, 2002 7:05 PM
FIGURE 25.6 Parameters for frequency response behavior: bandwidth ωb , resonance frequency ωr , resonant peak Mr , steady state error Me , and roll-off Rd .
• The resonant peak Mr is the height of a resonance mode. The resonant peak is a measure for the damping. As illustrated in Fig. 25.2 for a second order model, the resonance mode increases at lower damping coefficients. • Steady state errors Me can also be analyzed in the frequency response of a system. Using the final value theorem for continuous time systems
lim y (t ) = y s = lim sy ( s )
t→∞
s→0
the presence of steady state errors can be inspected in the frequency domain by evaluation |G(s)| at s = iω = 0 or for small values of the frequency vector ω. This can be seen as follows. As the Laplace transform ustep(s) of a step input signal ustep(t) is ustep(s) = 1/s,
1 lim y step ( t ) = lim sy step ( s ) = lim sG ( s ) -- = lim G ( s ) s t→∞ s→0 s→0 s→0 By evaluating G(iw) for small frequencies ω, the steady state behavior of G(s) can be studied. A similar result exist for discrete time systems, where the final value theorem reads as follows. If u(z) converges for z > 1 and all poles of (z − 1)u(z) are inside the unit circle, then
lim u ( k ) = lim ( z – 1 )u ( z ) k→∞
z→1
Hence, for discrete time systems the steady state behavior of a transfer function G(z) can be studied iω∆T by evaluating |G(e )| for small frequencies ω . • Roll-off Rd at high frequencies is defined as the negative slope of the frequency response at higher frequencies. The roll-off determines the performance of the dynamic system as high frequent disturbances can be amplified if a dynamic system does not have enough high frequent roll-off.
©2002 CRC Press LLC
26 The Root Locus Method 26.1 26.2 26.3
Introduction Desired Pole Locations Root Locus Construction Root Locus Rules • Root Locus Construction • Design Examples
26.4 26.5
Stability of Delay Systems • Dominant Roots of a QuasiPolynomial • Root Locus Using Padé Approximations
Hitay Özbay The Ohio State University
Complementary Root Locus Root Locus for Systems with Time Delays
26.6
Notes and References
26.1 Introduction The root locus technique is a graphical tool used in feedback control system analysis and design. It has been formally introduced to the engineering community by W. R. Evans [3,4], who received the Richard E. Bellman Control Heritage Award from the American Automatic Control Council in 1988 for this major contribution. In order to discuss the root locus method, we must first review the basic definition of bounded input bounded output (BIBO) stability of the standard linear time invariant feedback system shown in Fig. 26.1, 1 where the plant, and the controller, are represented by their transfer functions P(s) and C(s), respectively. The plant, P(s), includes the physical process to be controlled, as well as the actuator and the sensor dynamics. The feedback system is said to be stable if none of the closed-loop transfer functions, from external inputs r and v to internal signals e and u, have any poles in the closed right half plane, + := { s Œ : Re ( s ) ≥ 0 }. A necessary condition for feedback system stability is that the closed right half plane zeros of P(s) (respectively C(s)) are distinct from the poles of C(s) (respectively P(s)). When this condition holds, we say that there is no unstable pole–zero cancellation in taking the product P(s)C(s) =: G(s), and then checking feedback system stability becomes equivalent to checking whether all the roots of
1 + G(s) = 0
(26.1)
are in the open left half plane, - := { s ∈ : Re(s) < 0 }. The roots of (26.1) are the closed-loop system poles. We would like to understand how the closed-loop system pole locations vary as functions of a real parameter of G(s). More precisely, assume that G(s) contains a parameter K, so that we use the notation 1
Here we consider the continuous time case; there is essentially no difference between the continuous time case and the discrete time case, as far as the root locus construction is concerned. In the discrete time case the desired closed-loop pole locations are defined relative to the unit circle, whereas in the continuous time case desired pole locations are defined relative to the imaginary axis.
©2002 CRC Press LLC
066_Frame_C26 Page 2 Wednesday, January 9, 2002 1:58 PM
v(t) r(t)
e(t)
C(s)
+ -
FIGURE 26.1
+
+ u(t)
y(t) P(s)
Standard unity feedback system.
G(s) = GK(s) to emphasize the dependence on K. The root locus is the plot of the roots of (26.1) on the complex plane, as the parameter K varies within a specified interval. The most common example of the root locus problem deals with the uncertain (or adjustable) gain as the varying parameter: when P(s) and C(s) are fixed rational functions, except for a gain factor, G(s) can be written as G(s) = GK(s) = KF(s), where K is the uncertain/adjustable gain, and m
N(s) =
N(s) F ( s ) = ----------D(s)
∏ (s – z ) j
j=1
where
n
D(s) =
n≥m
(26.2)
∏ ( s – p ), i
i=1
with z1,…, zm, and p1,…, pn being the open-loop system zeros and poles. In this case, the closed-loop system poles are the roots of the characteristic equation
c ( s ) : = D ( s ) + KN ( s ) = 0
(26.3)
The usual root locus is obtained by plotting the roots r1(K ),…, rn(K ) of the characteristic polynomial χ(s) on the complex plane, as K varies from 0 to + ∞. The same plot for the negative values of K gives the complementary root locus. With the help of the root locus plot the designer identifies the admissible values of the parameter K leading to a set of closed-loop system poles that are in the desired region of the complex plane. There are several factors to be considered in defining the “desired region” of the complex plane in which all the roots r1(K ),…, rn(K ) should lie. Those are discussed briefly in the next section. Section 26.3 contains the root locus construction procedure, and design examples are presented in section 26.4. The root locus can also be drawn with respect to a system parameter other than the gain. For example, the characteristic equation for the system G(s) = Gλ(s), defined by
G l ( s ) = P ( s )C ( s ),
( 1 – ls ) 1 P ( s ) = ---------------------, C ( s ) = K c 1 + ------- s ( 1 + ls ) T I s
can also be transformed into the form given in (26.3). Here Kc and TI are given fixed PI (Proportional plus Integral) controller parameters, and λ > 0 is an uncertain plant parameter. Note that the phase of the plant is
p −1 ∠P ( jw ) = – --- – 2 tan ( lw ) 2 so the parameter λ can be seen as the uncertain phase lag factor (for example, a small uncertain time delay in the plant can be modeled in this manner, see [9]). It is easy to see that the characteristic equation is
1 2 s ( ls + 1 ) + K c ( 1 – ls ) s + ----- = 0 T I ©2002 CRC Press LLC
066_Frame_C26 Page 3 Wednesday, January 9, 2002 1:58 PM
Root Locus for N(s) = s2 + s + 0.4, D(s) = s(s2 − s − 0.4) 1.5
arrows show the increasing direction of K = 1/λ from 0 to +∞
1
Imag Axis
0.5
0
−0.5
−1
−1.5
−2
−1.5
−1
−0.5
0
0.5
1
1.5
2
Real Axis
FIGURE 26.2
The root locus with respect to K = 1/l.
and by rearranging the terms multiplying λ this equation can be transformed to
1 ( s + K c s + K c /T I ) - = 0 1 + --- ------------------------------------------l s ( s 2 – K c s – K c /T I ) 2
−1
By defining K = λ , N(s) = (s + Kc s + Kc /TI), and D(s) = s(s − Kc s − Kc /TI), we see that the characteristic equation can be put in the form of (26.3). The root locus plot can now be obtained from the data N(s) −1 and D(s) defined above; that shows how closed-loop system poles move as λ varies from 0 to + ∞, for a given fixed set of controller parameters Kc and TI. For the numerical example Kc = 1 and TI = 2.5, the root locus is illustrated in Fig. 26.2. The root locus construction procedure will be given in section 26.3. Most of the computations involved in each step of this procedure can be performed by hand calculations. Hence, an approximate graph representing the root locus can be drawn easily. There are also several software packages to generate the root locus automatically from the problem data z1,…,zm, and p1,…,pn. If a numerical computation program is available for calculating the roots of a polynomial, we can also obtain the root locus with respect to a parameter which enters into the characteristic equation nonlinearly. To illustrate this point let us consider the following example: G(s) = G wo (s) where 2
G wo ( s ) = P ( s )C ( s ),
2
( s – 0.1 ) ( s – 0.2 ) - , C ( s ) = ------------------P ( s ) = --------------------------------------------------------------2 2 (s + 2) ( s + 1.2w o s + w o ) ( s + 0.1 )
Here ωo ≥ 0 is the uncertain plant parameter. Note that the characteristic equation
w o ( 1.2s + w o ) ( s + 0.1 ) ( s + 2 ) - = 0 1 + -------------------------------------------------------------------------------------2 s ( s + 0.1 ) ( s + 2 ) + ( s – 0.2 ) ( s – 0.1 )
(26.4)
cannot be expressed in the form of D(s) + KN(s) = 0 with a single parameter K. Nevertheless, for each ωo we can numerically calculate the roots of (26.4) and plot them on the complex plane as ωo varies within a range of interest. Figure 26.3 illustrates all the four branches, r1(K),…,r4(K), of the root locus for this system as ωo increases from zero to infinity. The figure is obtained by computing the roots of (26.4) for a set of values of ωo by using MATLAB. ©2002 CRC Press LLC
066_Frame_C26 Page 4 Wednesday, January 9, 2002 1:58 PM
Root Locus 2
x : ω o = zero
1.5
o : ω o = infinity 1
0.5
0 −0.5 −1 −1.5 −2 −2.5
FIGURE 26.3
−2
−1.5
−1
−0.5
0
The root locus with respect to wo.
26.2 Desired Pole Locations The performance of a feedback system depends heavily on the location of the closed-loop system poles ri(K) = 1,…,n. First of all, for stability we want ri(K) − for all i = 1,…,n. Clearly, having a pole “close” to the imaginary axis poses a danger, i.e., “small” perturbations in the plant might lead to an unstable feedback system. So the desired pole locations must be such that stability is preserved under such perturbations (or in the presence of uncertainties) in the plant. For second-order systems, we can define certain stability robustness measures in terms of the pole locations, which can be tied to the characteristics of the step response. For higher order systems, similar guidelines can be used by considering the dominant poles only. In the standard feedback control system shown in Fig. 26.1, assume that the closed-loop transfer function from r(t) to y(t) is in the form 2
wo -2 , T ( s ) = -----------------------------------2 s + 2zw o s + w o
0 < z < 1, w o ∈
and r(t) is the unit step function. Then, the output is −zw t
e o y ( t ) = 1 – ------------------ sin ( w d t + θ ), 2 1–z
t≥0
−1
where w d := w o 1 – ζ and θ := cos (ζ ). For some typical values of ζ, the step response y(t) is as shown in Fig. 26.4. The maximum percent overshoot is defined to be the quantity 2
y p – y ss - × 100% PO := --------------y ss where yp is the peak value. By simple calculations it can be seen that the peak value of y(t) occurs at the time instant tp = π /ωd, and
PO = e ©2002 CRC Press LLC
−pz/ 1−z
2
× 100%
066_Frame_C26 Page 5 Wednesday, January 9, 2002 1:58 PM
Step response of a second order system 1.4
1.2
Output
1
0.8
0.6
0.4 ζ = 0.3 ζ = 0.5 ζ = 0.9
0.2
0 0
FIGURE 26.4
5
10
t *ωo
15
Step response of a second-order system. 100 90 80 70
PO
60 50 40 30 20 10 0 0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
ζ
FIGURE 26.5
PO versus z.
Figure 26.5 shows PO versus ζ. The settling time is defined to be the smallest time instant ts, after which the response y(t) remains within 2% of its final value, i.e.,
t s : = min { t′: y ( t ) – y ss ≤ 0.02y ss ∀t ≥ t′ } Sometimes 1% or 5% is used in the definition of settling time instead of 2%; conceptually, there is no difference. For the second-order system response, we have
4 t s ≈ --------zw o So, in order to have a fast settling response, the product zωo should be large. The closed-loop system poles are
r1,2 = – z w o ± jw o 1 – z
2
Therefore, once the maximum allowable settling time and PO are specified, we can define the region of desired pole locations by determining the minimum allowable ζ and ζωo. For example, let the desired PO and ts be bounded by
PO ≤ 10% ©2002 CRC Press LLC
and
ts ≤ 8 s
066_Frame_C26 Page 6 Wednesday, January 9, 2002 1:58 PM
FIGURE 26.6
Region of the desired closed-loop poles.
The PO requirement implies that ζ ≥ 0.6, equivalently θ ≤ 53° (recall that cos(θ) = ζ ). The settling time requirement is satisfied if and only if Re(r1,2) ≤ −0.5. Then, the region of desired closed-loop poles is the shaded area shown in Fig. 26.6. The same figure also illustrates the region of desired closed-loop poles for similar design requirements in the discrete time case. If the order of the closed-loop transfer function T(s) is higher than two, then, depending on the location of its poles and zeros, it may be possible to approximate the closed-loop step response by the response of a second-order system. For example, consider the third-order system 2
wo T ( s ) = -------------------------------------------------------------2 2 ( s + 2zw o s + w o ) ( 1 + s/r )
where r >> zw o −zw o t
−rt
of the sinusoidal term, The transient response contains a term e . Compared with the envelope e −rt e decays very fast, and the overall response is similar to the response of a second-order system. Hence, the effect of the third pole r3 = −r is negligible. Consider another example,
w o [ 1 + s/ ( r + ) ] - where 0 < 0 for which the root locus is at a given point r. By using the definition of F(s), (26.8) can be rewritten as n
( 2 + 1 ) × 180° =
∑
m
∠( r – p i ) –
i=1
∑ ∠( r – z ) j
(26.9)
j=1
Similarly, (26.7) is equivalent to n
∏ i=1 r – p i K = ------------------------m ∏ j=1 r – z j ©2002 CRC Press LLC
(26.10)
066_Frame_C26 Page 8 Wednesday, January 9, 2002 1:58 PM
Root Locus Construction There are several software packages available for generating the root locus automatically for a given F = N/D. In particular, the related MATLAB commands are rlocus and rlocfind. In many cases, approximate root locus can be drawn by hand using the rules given below. These rules are determined from the basic definitions (26.5), (26.7), and (26.8). 1. The root locus has n branches: r1(K),…,rn(K). 2. Each branch starts (K ≅ 0 ) at a pole pi and ends (as K → ∞) at a zero zj, or converges to an ja asymptote, Me , where M → ∞ and
2 + 1 a = --------------- × 180° , n–m
= 0,…, ( n – m – 1 )
3. There are (n − m) asymptotes with angles α. The center of the asymptotes (i.e., their intersection point on the real axis) is n
∑ i=1 p i – ∑ j=1 z j s a = --------------------------------n–m m
4. A point x ∈ is on the root locus if and only if the total number of poles pi’s and zeros zj’s to the right of x (i.e., total number of pi’s with Re(pi) > x plus total number of zj’s with Re(zj) > x) is odd. Since F(s) is a rational function with real coefficients, poles and zeros appear in complex conjugates, so when counting the number of poles and zeros to the right of a point x ∈ we just need to consider the poles and zeros on the real axis. 5. The values of K for which the root locus crosses the imaginary axis can be determined from the Routh–Hurwitz stability test. Alternatively, we can set s = jω in (26.5) and solve for real ω and K satisfying
D ( jw ) + KN ( jw ) = 0 Note that there are two equations here, one for the real part and one for the imaginary part. 6. The break points (intersection of two branches on the real axis) are feasible solutions (satisfying rule 4) of
d ----- F ( s ) = 0 ds
(26.11)
7. Angles of departure (K ≅ 0) from a complex pole, or arrival (K → +∞ ) to a complex zero, can be determined from the phase rule. See example below. Let us now follow the above rules step by step to construct the root locus for
(s + 3) F ( s ) = -------------------------------------------------------------------------------------( s – 1 ) ( s + 5 ) ( s + 4 + j2 ) ( s + 4 – j2 ) First, enumerate the poles and zeros as p1 = −4 + j2, p2 = −4 − j2, p3 = −5, p4 = 1, z1 = −3. So, n = 4 and m = 1. 1. The root locus has four branches. 2. Three branches converge to the asymptotes whose angles are 60°, 180°, and −60°, and one branch converges to z1 = −3. ©2002 CRC Press LLC
066_Frame_C26 Page 9 Wednesday, January 9, 2002 1:59 PM
Im -4+j2 1
∆ 4 5 3
-5
-3
1
Re
2
-4-j2
FIGURE 26.7
Angle of departure from −4 + j2.
3. The center of the asymptotes is s = (−12 + 3)/3 = −3. 4. The intervals (−∞, −5] and [−3, 1] are on the root locus. 5. The imaginary axis crossings are the feasible roots of
( w – j12w – 47 w + j40w – 100 ) + K ( jw + 3 ) = 0 4
3
2
(26.12)
for real ω and K. Real and imaginary parts of (26.12) are
w – 47w – 100 + 3K = 0 4
2
jw ( −12w + 40 + K ) = 0 2
They lead to two feasible pairs of solutions (K = 100/3, ω = 0) and (K = 215.83, ω = ±4.62). 6. Break points are the feasible solutions of
3s + 36s + 155s + 282s + 220 = 0 4
3
2
Since the roots of this equation are −4.55 ± j1.11 and −1.45 ± j1.11, there is no solution on the real axis, hence no break points. 7. To determine the angle of departure from the complex pole p1 = −4 + j 2, let ∆ represent a point on the root locus near the complex pole p1, and define vi, i = 1,…,5, to be the vectors drawn from pi, for i = 1,…,4, and from z1 for i = 5, as shown in Fig. 26.7. Let θ1,…, θ5 be the angles of v1,…, v5. The phase rule implies
(q 1 + q 2 + q 3 + q 4 ) – q 5 = ± 180 °
(26.13)
As ∆ approaches p1, θ1 becomes the angle of departure and the other θi’s can be approximated by the angles of the vectors drawn from the other poles, and from the zero, to the pole p1. Thus θ1 –1 –1 can be solved from (26.13), where q 2 ≈ 90°, q 3 ≈ tan ( 2 ), q 4 ≈ 180° – tan 2--5 , and q 5 ≈ 90° + – 1 1 tan --2 . That yields q 1 ≈ – 15°. The exact root locus for this example is shown in Fig. 26.8. From the results of item 5 above, and the shape of the root locus, it is concluded that the feedback system is stable if
33.33 < K < 215.83 i.e., by simply adjusting the gain of the controller, the system can be made stable. In some situations we need to use a dynamic controller to satisfy all the design requirements. ©2002 CRC Press LLC
066_Frame_C26 Page 10 Wednesday, January 9, 2002 1:59 PM
Root Locus for F(s) = (s + 0.3)/(s4 + 12s3 + 47s2 + 40s − 100) 6
4
Imag Axis
2
0
−2
−4
−6 −8
−6
−4
−2
0
2
Real Axis
FIGURE 26.8
(s + 3) ( s – 1 ) ( s + 5 ) ( s + 4 + j2 ) ( s + 4 – j2 )
Root locus for F(s) = --------------------------------------------------------------------------------------- .
Design Examples Example 1 Consider the standard feedback system with a plant
1 1 P ( s ) = ---------- -------------------------------0.72 ( s + 1 ) ( s + 2 ) and design a controller such that • the feedback system is stable, • PO ≤ 10 % , t s ≤ 4 s, and steady state error is zero when r(t) is unit step, • steady state error is as small as possible when r(t) is unit ramp. It is clear that the second design goal cannot be achieved by a simple proportional controller. To satisfy this condition, the controller must have a pole at s = 0, i.e., it must have integral action. If we try an integral control of the form C(s) = Kc /s, with Kc > 0, then the root locus has three branches, the interval [−1, 0] is on the root locus; three asymptotes have angles {60°, 180°, −60°} with a center at sa = −1; and 1 -, see Fig. 26.9. From the location of the break point, center, and there is only one break point at –1 + -----3 angles of the asymptotes, it can be deduced that two branches (one starting at p1 = −1, and the other one starting at p3 = 0) always remain to the right of p1. On the other hand, the settling time condition implies that the real parts of the dominant closed-loop system poles must be less than or equal to −1. So, a simple integral control does not do the job. Now try a PI controller of the form
s–z C ( s ) = K c -----------c , K c > 0 s In this case, we can select zc = −1 to cancel the pole at p1 = −1 and the system effectively becomes a second-order system. The root locus for F(s) = 1/s(s + 2) has two branches and two asymptotes, with center σa = −1 and angles {90°, −90°}; the break point is also at −1. The branches leave −2 and 0, and go toward each other, meet at −1, and tend to infinity along the line Re(s) = −1. Indeed, the closed-loop system poles are
r1,2 = – 1 ± 1 – K , ©2002 CRC Press LLC
where K = K c /0.72
066_Frame_C26 Page 11 Wednesday, January 9, 2002 1:59 PM
rlocus(1,[1,3,2,0]) 3
2
Imag Axis
1
0 −1 −2 −3 −4
−3
−2
−1
0
1
2
Real Axis
FIGURE 26.9
Root locus for Example 1.
The steady state error, when r(t) is unit ramp, is 2/K. So K needs to be as large as possible to meet the third design condition. Clearly, Re(r1,2) = −1 for all K ≥ 1, which satisfies the settling time requirement. The percent overshoot is less than 10% if ζ of the roots r1,2 is greater than 0.6. A simple algebra shows that z = 1/ K , hence the design conditions are met if K = 1/0.36, i.e. Kc = 2. Thus a PI controller that solves the design problem is
s+1 C ( s ) = 2 ----------- s The controller cancels a stable pole (at s = −1) of the plant. If there is a slight uncertainty in this pole location, perfect cancellation will not occur and the system will be third-order with the third pole at r 3 ≅ – 1. Since the zero at zo = −1 will approximately cancel the effect of this pole, the response of this system will be close to the response of a second-order system. However, we must be careful if the pole–zero cancellations are near the imaginary axis because in this case small perturbations in the pole location might lead to large variations in the feedback system response, as illustrated with the next example. Example 2 A flexible structure with lightly damped poles has transfer function in the form 2
w1 P ( s ) = ---------------------------------------------2 2 2 s ( s + 2zw 1 s + w 1 ) By using the root locus, we can see that the controller
( s + 2zw 1 s + w 1 ) ( s + 0.4 ) C ( s ) = K c -------------------------------------------------------------2 (s + r) (s + 4) 2
2
stabilizes the feedback system for sufficiently large r and an appropriate choice of Kc . For example, let 2 ω1 = 2, ζ = 0.1, and r = 10. Then the root locus of F(s) = P(s)C(s)/K, where K = Kcw 1, is as shown in Fig. 26.10. For K = 600, the closed-loop system poles are
{ – 10.78 ± j2.57, – 0.94 ± j1.61, – 0.2 ± j1.99, – 0.56 } ©2002 CRC Press LLC
066_Frame_C26 Page 12 Wednesday, January 9, 2002 1:59 PM
10 8 6 4
Imag Axis
2 0 −2 −4 −6 −8 −10
−12
−10
−8
−6
−4
−2
0
2
4
Real Axis
FIGURE 26.10
Root locus for Example 2(a).
4
3
2
Imag Axis
1
0 −1 −2 −3 −4
−10
−8
−6
−4
−2
0
Real Axis
FIGURE 26.11
Root locus for Example 2(b).
Since the poles −0.2 ± j1.99 are canceled by a pair of zeros at the same point in the closed-loop system −1 transfer function T = G(1 + G) , the dominant poles are at −0.56 and −0.94 ± j1.61 (they have relatively large negative real parts and the damping ratio is about 0.5). Now, suppose that this controller is fixed and the complex poles of the plant are slightly modified by taking ζ = 0.09 and ω1 = 2.2. The root locus corresponding to this system is as shown in Fig. 26.11. Since lightly damped complex poles are not perfectly canceled, there are two more branches near the imaginary axis. Moreover, for the same value of K = 600, the closed-loop system poles are
{ – 10.78 ± j2.57, – 1.21 ± j1.86, 0.05 ± j1.93, – 0.51 } In this case, the feedback system is unstable. Example 3 One of the most important examples of mechatronic systems is the DC motor. An approximate transfer function of a DC motor [8, pp. 141–143] is in the form
Km -, P m ( s ) = ------------------------s ( s + 1/t m ) ©2002 CRC Press LLC
tm > 0
066_Frame_C26 Page 13 Wednesday, January 9, 2002 1:59 PM
Also note that if τm is large, then P m (s) ≈ P b (s), where P b (s) = K b /s is the transfer function of a rigid beam. In this example, the general class of plants Pm(s) will be considered. Assuming that pm = −1/τm and Km are given, a first-order controller 2
s–z C ( s ) = K c ------------c s – p c
(26.14)
will be designed. The aim is to place the closed-loop system poles far from the Im-axis. Since the order of F(s) = Pm(s)C(s)/Km Kc is three, the root locus has three branches. Suppose the desired closed-loop poles are given as p1, p2, and p3. Then, the pole placement problem amounts to finding {Kc, zc, pc} such that the characteristic equation is
c ( s ) = ( s – p1 ) ( s – p2 ) ( s – p3 ) = s – ( p 1 + p 2 + p 3 )s + ( p 1 p 2 + p 1 p 3 + p 2 p 3 )s – p 1 p 2 p 3 3
2
But the actual characteristic equation, in terms of the unknown controller parameters, is
χ ( s ) = s ( s – pm ) ( s – pc ) + k ( s – zc ) = s – ( p m + p c )s + ( p m p c + K )s – Kz c 3
2
where K := KmKc. Equating the coefficients of the desired χ(s) to the coefficients of the actual χ(s), three equations in three unknowns are obtained:
pm + pc = p1 + p2 + p3 pm pc + K = p1 p2 + p1 p3 + p2 p3 Kz c = p 1 p 2 p 3 From the first equation pc is determined, then K is obtained from the second equation, and finally zc is computed from the third equation. For different numerical values of pm, p1, p2, and p3 the shape of the root locus is different. Below are some examples, with the corresponding root loci shown in Figs. 26.12–26.14. (a) pm = −0.05, p1 = p2 = p3 = −2 ⇒
K = 11.70,
p c = −5.95,
zc = −0.68
4
Imag Axis
2
0
−2
−4 −8
−6
−4
−2 Real Axis
FIGURE 26.12
Root locus for Example 3(a).
©2002 CRC Press LLC
0
2
066_Frame_C26 Page 14 Wednesday, January 9, 2002 1:59 PM
4 3 2
Imag Axis
1 0 −1 −2 −3 −4 −6
−5
−4
−3
−2
−1
0
1
Real Axis
FIGURE 26.13
Root locus for Example 3(b). 6
4
Imag Axis
2
0 −2 −4 −6 −16
−14
−12
−10
−8
−6
−4
−2
0
2
Real Axis
FIGURE 26.14
Root locus for Example 3(c).
(b) pm = −0.5, p1 = −1, p2 = −2, p3 = −3 ⇒
K = 8.25,
p c = −5.50,
zc = −0.73
(c) pm = −5, p1 = −11, p2 = −4 + j1, p3 = −4 − j1 ⇒
K = 35,
p c = −14,
zc = −5.343
Example 4 Consider the open-loop transfer function
( s – 3s + 3 ) ( s – z c ) P ( s )C ( s ) = K c -----------------------------------------------2 s ( s + 3s + 3 ) ( s – p c ) 2
where Kc is the controller gain to be adjusted, and zc and pc are the controller zero and pole, respectively. Observe that the root locus has four branches except for the non-generic case zc = pc . Let the desired dominant closed-loop poles be r1,2 = −0.4. The steady state error for unit ramp reference input is
pc e ss = -------Kc zc ©2002 CRC Press LLC
066_Frame_C26 Page 15 Wednesday, January 9, 2002 1:59 PM
Accordingly, we want to make the ratio Kc zc /pc as large as possible. The characteristic equation is
c ( s ) = s ( s + 3s + 3 ) ( s – p c ) + K c ( s – 3 s + 3 ) ( s – z c ) 2
2
and it is desired to be in the form
c ( s ) = ( s + 0.4 ) ( s – r 3 ) ( s – r 4 ) 2
for some r3,4 with Re(r3,4) < 0, which implies that
c(s)
s=−0.4
= 0,
d ----- c ( s ) ds
s=−0.4
= 0
(26.15)
Conditions (26.15) give two equations:
0.784 ( 0.4 + p c ) – 4.36K c ( 0.4 + z c ) = 0 4.36K c – 0.784 – 1.08 ( 0.4 + p c ) + 3.8K c ( 0.4 + z c ) = 0 from which zc and pc can be solved in terms of Kc. Then, by simple substitutions, the ratio to be maximized, Kc zc /pc, can be reduced to
Kc zz 3.4776K c – 0.784 --------- = --------------------------------------------pc 24.2469K c – 3.4776 The maximizing value of Kc is 0.1297; it leads to pc = −0.9508 and zc = −1.1637. For this controller, the feedback system poles are
{ −1.64 + j0.37, – 1.64 – j0.37, – 0.40, – 0.40 } The root locus is shown in Fig. 26.15. 1.5
1
Imag Axis
0.5
0 −0.5 −1 −1.5 −3
−2
−1
0 Real Axis
FIGURE 26.15
Root locus for Example 4.
©2002 CRC Press LLC
1
2
066_Frame_C26 Page 16 Wednesday, January 9, 2002 1:59 PM
26.4 Complementary Root Locus In the previous section, the root locus parameter K was assumed to be positive and the phase and magnitude rules were established based on this assumption. There are some situations in which controller gain can be negative as well. Therefore, the complete picture is obtained by drawing the usual root locus (for K > 0) and the complementary root locus (for K < 0). The complementary root locus rules are n
× 360° =
∑
m
∠( r – p i ) –
i=1
∑ ∠( r – z ), j
= 0, ± 1, ± 2,…
(26.16)
j=1
∏ i=1 r – p i K = ------------------------m ∏ j=1 r – z j n
(26.17)
Since the phase rule (26.16) is the 180° shifted version of (26.9), the complementary root locus is obtained by simple modifications in the root locus construction rules. In particular, the number of asymptotes and their center are the same, but their angles α’s are given by
2 a = ------------------ × 180°, (n – m)
= 0,…, ( n – m – 1 )
Also, an interval on the real axis is on the complementary root locus if and only if it is not on the usual root locus. Example 3 (revisited) In the Example 3 given above, if the problem data is modified to pm = −5, p1 = −20, and p2,3 = −2 ± j, then the controller parameters become
K = – 10,
p c = – 19,
z c = 10
Note that the gain is negative. The roots of the characteristic equation as K varies between 0 and −∞ form the complementary root locus; see Fig. 26.16.
Complementary Root Locus 10 8 arrows indicate increasing direction 6 of K from ∞ to 0
Imag Axis
4 2 0 −2 −4 −6 −8 −10 −25
−20
−15
−10
−5
0 Real Axis
FIGURE 26.16
Complementary root locus for Example 3.
©2002 CRC Press LLC
5
10
15
20
25
066_Frame_C26 Page 17 Wednesday, January 9, 2002 1:59 PM
Complete Root Locus for −∞ < K < +∞ 5 4 3 2
Imag Axis
1 0 −1 −2 −3 −4 −5 −4
−2
0
2
4
6
8
Real Axis
FIGURE 26.17
Complementary and usual root loci for Example 4.
Example 4 (revisited) In this example, if K increases from – ∞ to +∞, the closed-loop system poles move along the complementary root locus, and then the usual root locus, as illustrated in Fig. 26.17.
26.5 Root Locus for Systems with Time Delays The standard feedback control system considered in this section is shown in Fig. 26.18, where the controller C and plant P are in the form
Nc ( s ) C ( s ) = -----------Dc ( s ) and
P ( s ) = e P0 ( s ) – hs
Np ( s ) where P 0 ( s ) = -----------Dp ( s ) 2
−hs
with (Nc, Dc) and (Np, Dp) being coprime pairs of polynomials with real coefficients. The term e is the transfer function of a pure delay element (in Fig. 26.18 the plant input is delayed by h seconds). In general, time delays enter into the plant model when there is • a sensor (or actuator) processing delay, and/or • a software delay in the controller, and/or • a transport delay in the process. In this case the open-loop transfer function is
G ( s ) = Gh ( s ) = e G0 ( s ) – hs
where G0(s) = P0(s)C(s) corresponds to the no delay case, h = 0. Note that magnitude and phase of G( jw) are determined from the identities
2
G ( jw ) = G 0 ( jw )
(26.18)
∠G ( jw ) = – hw + ∠G 0 ( jw )
(26.19)
A pair of polynomials is said to be coprime pair if they do not have common roots.
©2002 CRC Press LLC
066_Frame_C26 Page 18 Wednesday, January 9, 2002 1:59 PM
e (t )
r (t ) + −
FIGURE 26.18
C (s )
v (t )
P (s)
+ − u (t )
u(t-h)
e-hs
P0(s)
y (t )
Feedback system a with time delay.
Stability of Delay Systems Stability of the feedback system shown in Fig. 26.18 is equivalent to having all the roots of −hs
c(s) = D(s) + e N(s)
(26.20)
in the open left half plane, −, where D(s) = Dc(s)Dp(s) and N(s) = Nc(s)Np(s). We assume that there is no unstable pole–zero cancellation in taking the product P0(s)C(s), and that deg(D) > deg(N ) (here N and D need not be monic polynomials). Strictly speaking, χ(s) is not a polynomial because it is a transcendental function of s. The functions of the form (26.20) belong to a special class of functions called quasi-polynomials. The closed-loop system poles are the roots of (26.20). Following are known facts (see [1,10]): (i) If rk is a root of (20), then so is rk (i.e., roots appear in complex conjugate pairs as usual). (ii) There are infinitely many poles r k ∈ , k = 1, 2,…,satisfying χ(rk) = 0. (iii) And rk’s can be enumerated in such a way that Re(r k + 1 ) ≤ Re(r k ); moreover, Re(r k ) → −∞ as k → ∞. Example −hs
If Gh(s) = e /s, then the closed-loop system poles rk, for k = 1, 2,…, are the roots of −hs
−jhw
e k e k ±j2kp 1 + ----------------------- e =0 s k + jw k ±j2kπ
where rk = σk + jωk for some s k ,w k ∈ . Note that e to the following set of equations:
e
−hs k
(26.21)
= 1 for all k = 1, 2,…. Equation (26.1) is equivalent
= σ k + jw k
± ( 2k – 1 )p = hw k + ∠( σ k + jw k ), k = 1,2,…
(26.22) (26.23)
It is quite interesting that for h = 0 there is only one root r = −1, but even for infinitesimally small h > 0 there are infinitely many roots. From the magnitude condition (26.22), it can be shown that
σk ≥ 0 ⇒ wk ≤ 1
(26.24)
Also, for s k ≥ 0, the phase (s k + jw k ) is between −p/2 and +p/2, therefore (26.23) leads to
p σ k ≥ 0 ⇒ h w k ≥ --2 ©2002 CRC Press LLC
(26.25)
066_Frame_C26 Page 19 Wednesday, January 9, 2002 1:59 PM
By combining (26.24) and (26.25), it can be proven that the feedback system has no roots in the closed right half plane when h < π /2. Furthermore, the system is unstable if h ≥ π /2. In particular, for h = p/2 there are two roots on the imaginary axis, at ± j1. It is also easy to show that, for any h > 0 as k → ∞, the roots converge to
1 2kp r k → --- − ln --------- ± j2kp h h As h → 0, the magnitude of the roots converge to ∞. As illustrated by the above example, property (iii) implies that for any given real number s there are only finitely many rk’s in the region of the complex plane
s : = { s ∈ : Re ( s ) ≥ σ } In particular, with σ = 0, this means that the quasi-polynomial χ(s) can have only finitely many roots in the right half plane. Since the effect of the closed-loop system poles that have very large negative real parts is negligible (as far as closed-loop systems’ input–output behavior is concerned), only finitely many “dominant” roots rk, for k = 1,…,m, should be computed for all practical purposes.
Dominant Roots of a Quasi-Polynomial Now we discuss the following problem: given N(s), D(s), and h ≥ 0, find the dominant roots of the quasipolynomial −hs
χ(s) = D(s) + e N(s) For each fixed h > 0, it can be shown that there exists σmax such that χ(s) has no roots in the region smax, see [11] for a simple algorithm to estimate σmax, based on Nyquist criterion. Given h > 0 and a region of the complex plane defined by σmin ≤ Re(s) ≤ smax, the problem is to find the roots of χ(s) in this region. Clearly, a point r = σ + jω in is a root of χ(s) if and only if
D ( s + jw ) = – e
−hs −jhω
e
N ( s + jw )
Taking the magnitude square of both sides of the above equation, χ(r) = 0 implies
A s ( x ) : = D ( s + x )D ( s – x ) – e
−2hs
N ( s + x )N ( s – x ) = 0
where x = jω. The term D(s + x) stands for the function D(s) evaluated at σ + x. The other terms of Aσ(x) are calculated similarly. For each fixed σ, the function Aσ(x) is a polynomial in the variable x. By symmetry, if x is a zero of Aσ, then (−x) is also a zero. If Aσ(x) has a root x whose real part is zero, set r = s + x. Next, evaluate the magnitude of χ(r); if it is zero, then n is a root of χ(s). Conversely, if Aσ(x) has no root on the imaginary axis, then χ(s) cannot have a root whose real part is the fixed value of σ from which Aσ is constructed. Algorithm Given N(s), D(s), h, σmin, and σmax: Step 1. Pick σ values σ1,…,σM between σmin and smax such that σmin = σ1, σi < si+1, and σM = σmax. For each σi perform the following. ©2002 CRC Press LLC
066_Frame_C26 Page 20 Wednesday, January 9, 2002 1:59 PM
Step 2. Construct the polynomial Ai(x) according to
A i ( x ) : = D ( s i + x )D ( s i – x ) – e
−2hs i
N ( s i + x )N ( s i – x )
Step 3. For each imaginary axis roots x of Ai, perform the following test: Check if |χ(σi + x)| = 0; if yes, then r = σi + x is a root of χ(s); if not, discard x. Step 4. If i = M, stop; else increase i by 1 and go to Step 2. Example We will find the dominant roots of −hs
e 1 + -------- = 0 s
(26.26)
for a set of critical values of h. Recall that (26.26) has a pair of roots ± j1 when h = π /2 = 1.57. Moreover, dominant roots of (26.26) are in the right half plane if h > 1.57, and they are in the left half plane if h < 1.57. So, it is expected that for h ∈ (1.2, 2.0) the dominant roots are near the imaginary axis. Take σmin = −0.5 and σmax = 0.5, with M = 400 linearly spaced σi’s between them. In this case
Ai ( x ) = s i – e 2
Whenever e
−2hs i
−2hs i
–x
2
2
≥ s i , Ai(x) has two roots:
x = ±j e
−2hs i
= 1, 2
2
– si ,
For each fixed σi satisfying this condition, let r = σi + x (note that x is a function of si, so r is a function of σi) and evaluate −hr
e f ( s i ) : = 1 + ---------r If f(σi) = 0, then r is a root of (26.26). For 10 different values of h ∈(1.2, 2.0), the function f(σ) is plotted in Fig. 26.19. This figure shows the feasible values of σi for which r (defined from si) is a root of (26.26). Detection of the Roots
1
10
0
f (σ )
10
10
−1
h = 1.2 10
−2
−0.4
h = 2.0 h = 1.29
−0.3
−0.2
−0.1
0
σ
FIGURE 26.19
Detection of the dominant roots.
©2002 CRC Press LLC
0.1
0.2
0.3
066_Frame_C26 Page 21 Wednesday, January 9, 2002 1:59 PM
Locus of dominant roots for 1.2 < h < 2.0 1.5
1
h = π/2
h = 1.2
h = 2.0 0.5
0
−0.5
h = 2.0 −1
−1.5 −0.2
FIGURE 26.20
h = 1.2
h = π/2
−0.1
0
0.1
Dominant roots as h varies from 1.2 to 2.0.
The dominant roots of (26.26), as h varies from 1.2 to 2.0, are shown in Fig. 26.20. For h < 1.57, all the roots are in C – . For h > 1.57, the dominant roots are in C +, and for h = 1.57, they are at ± j1.
Root Locus Using Padé Approximations In this section we assume that h > 0 is fixed and we try to obtain the root locus, with respect to uncertain/adjustable gain K, corresponding to the dominant poles. The problem can be solved by numerically calculating the dominant roots of the quasi-polynomial
χ ( s ) = D ( s ) + KN ( s )e
−hs
(26.27)
for varying K, by using the methods presented in the previous section. In this section an alternative −hs method is given that uses Padé approximation of the time delay term e . More precisely, the idea is to find polynomials Nh(s) and Dh(s) satisfying
e
−hs
Nh ( s ) ≈ -----------Dh ( s )
(26.28)
so that the dominant roots
D ( s )D h ( s ) + KN ( s )N h ( s ) = 0
(26.29)
closely match the dominant roots of χ(s), (26.27). How should we do the approximation (26.28) for this match? By using the stability robustness measures determined from the Nyquist stability criterion, we can show that for our purpose we may consider the following cost function in order to define a meaningful measure for the approximation error:
K max N ( jw ) −jhw N h ( jw ) ∆ h = : sup -------------------------– ------------------ e w D h ( jw ) D ( jw ) where Kmax is the maximum value of interest for the uncertain/adjustable parameter K.
©2002 CRC Press LLC
066_Frame_C26 Page 22 Wednesday, January 9, 2002 1:59 PM
The th order Padé approximation is defined as follows:
Nh ( s ) =
∑ ( –1 ) c h s k
k k
k
k=0
Dh ( s ) =
∑c h s
k k
k
k=0
where coefficients ck’s are computed from
( 2 – k )!! c k = -------------------------------- , 2!k! ( – k )!
k = 0, 1,…,
First- and second-order approximations are in the form
1 – hs/2 =1 -------------------, 1 + hs/2 Nh ( s ) ------------- = 2 Dh ( s ) 1 – hs/2 + ( hs ) /12 ---------------------------------------------, = 2 1 + hs/2 + ( hs ) 2 /12 Given the problem data {h, Kmax, N(s), D(s)}, how do we find the smallest degree, , of the Padé approximation, so that ∆ h ≤ d (or ∆ h /K max ≤ d ′ ) for a specified error d, or a specified relative error d¢ ? The answer lies in the following result [7]: for a given degree of approximation we have
ehw 2+1 2 ---------- , N h ( jw ) 4 −jhw – ------------------ ≤ e D h ( jw ) 2,
4 w ≤ -----eh 4 w ≥ -----eh
In light of this result, we can solve the approximation order selection problem by using the following procedure: 1. Determine the frequency wx such that
K max N ( jw ) ≤ d--, --------------------------- 2 D ( jw )
for all w ≥ w x
and initialize = 1. 2. For each ≥ 1 define
4 w = max w x , ------ eh and plot the function
2 Φ ( w ) : = 2 ©2002 CRC Press LLC
2+1 K max N ( jw ) ehw - , -------------------------- -------- 4 D ( jw )
4 for w ≤ -----eh
K max N ( jw ) , -------------------------D ( jw )
4 for w ≥ w ≥ -----eh
066_Frame_C26 Page 23 Wednesday, January 9, 2002 1:59 PM
Root Loci with Pade Approximations of Orders 1, 2, and 3 25
l=1
K = 20.6
20
l=3 15 10
l=2 K = 16.1
5 0 −5 −10 −15 −20 −25 −12
FIGURE 26.21
−10
−8
−6
−4
−2
0
2
Dominant root for = 1.
3. Check If
max Φ ( w ) ≤ d
w ∈[ 0,w x ]
(26.30)
If yes, stop, this value of satisfies the desired error bound: ∆h ≤ d. Otherwise, increase by 1, and go to Step 2. Note that the left-hand side of the inequality (26.30) is an upper bound of ∆h. Since we assumed deg(D) > deg(N), the algorithm will pass Step 3 eventually for some finite ≥ 1. At each iteration, we have to draw the error function Φ(w) and check whether its peak value is less than d. Typically, as d decreases, wx increases, and that forces to increase. On the other hand, for very large values of , the relative magnitude c0 /c of the coefficients becomes very large, in which case numerical difficulties arise in analysis and simulations. Also, as time delay h increases, should be increased to keep the level of the approximation error d fixed. This is a fundamental difficulty associated with time delay systems. Example 2
Let N(s) = s + 1, D(s) = s + 2s + 2 and h = 0.1, and Kmax = 20. Then, for d′ = 0.05, applying the above procedure we calculate = 2 as the smallest approximation degree satisfying ∆h/Kmax < d′. Therefore, a second-order approximation of the time delay should be sufficient for predicting the dominant poles for K ∈ [ 0, 20 ]. Figure 26.21 shows the approximate root loci obtained from Padé approximations of degrees = 1, 2, 3. There is a significant difference between the root loci for = 1 and = 2. In the region Re ( s ) ≥ – 12, the predicted dominant roots are approximately the same for = 2, 3, for K ∈ [ 0, 20 ]. So, we can safely say that using higher order approximations will not make any significant difference as far as predicting the behavior of the dominant poles for the given range of K.
26.6 Notes and References This chapter in the handbook is an edited version of related parts of the author’s book [9]. More detailed discussions of the root locus method can be found in all the classical control books, such as [2, 5, 6, 8]. As mentioned earlier, extension of this method to discrete time systems is rather trivial: the method to find the roots of a polynomial as a function of a varying real parameter is independent of the variable s (in the continuous time case) or z (in the discrete time case). The only difference between these two cases is the definition of the desired region of the complex plane: for the continuous time systems, this is defined relative to the imaginary axis, whereas for the discrete time systems the region is defined with respect to the unit circle, as illustrated in Fig. 26.6.
©2002 CRC Press LLC
066_Frame_C26 Page 24 Wednesday, January 9, 2002 1:59 PM
References 1. Bellman, R. E., and Cooke, K. L., Differential Difference Equations, Academic Press, New York, 1963. 2. Dorf, R. C., and Bishop, R. H., Modern Control Systems, 9th ed., Prentice-Hall, Upper Saddle River, NJ, 2001. 3. Evans, W. R., “Graphical analysis of control systems,” Transac. Amer. Inst. Electrical Engineers, vol. 67 (1948), pp. 547–551. 4. Evans, W. R., “Control system synthesis by root locus method,” Transac. Amer. Inst. Electrical Engineers, vol. 69 (1950), pp. 66–69. 5. Franklin, G. F., Powell, J. D., and Emami-Naeini, A., Feedback Control of Dynamic Systems, 3rd ed., Addison Wesley, Reading, MA, 1994. 6. Kuo, B. C., Automatic Control Systems, 7th ed., Prentice-Hall, Upper Saddle River, NJ, 1995. 7. Lam, J., “Convergence of a class of Padé approximations for delay systems,” Int. J. Control, vol. 52 (1990), pp. 989–1008. 8. Ogata, K., Modern Control Engineering, 3rd ed., Prentice-Hall, Upper Saddle River, NJ, 1997. 9. Özbay, H., Introduction to Feedback Control Theory, CRC Press LLC, Boca Raton, FL, 2000. 10. Stepan, G., Retarded Dynamical Systems: Stability and Characteristic Functions, Longman Scientific & Technical, New York, 1989. 11. Ulus, C., “Numerical computation of inner-outer factors for a class of retarded delay systems,” Int. J. Systems Sci., vol. 28 (1997), pp. 897–904.
©2002 CRC Press LLC
0066_frame_C27 Page 1 Wednesday, January 9, 2002 7:10 PM
27 Frequency Response Methods 27.1 27.2 27.3 27.4 27.5
Jyh-Jong Sheen National Taiwan Ocean University
27.6 27.7
Introduction Bode Plots Polar Plots Log-Magnitude Versus Phase plots Experimental Determination of Transfer Functions The Nyquist Stability Criterion Relative Stability
27.1 Introduction The analysis and design of industrial control systems are often accomplished utilizing frequency response methods. By the term frequency response, we mean the steady-state response of a linear constant coefficient system to a sinusoidal input test signal. We will see that the response of the system to a sinusoidal input signal is also a sinusoidal output signal at the same frequency as the input. However, the magnitude and phase of the output signal differ from those of the input signal, and the amount of difference is a function of the input frequency. Thus, we will be investigating the relationship between the transfer function and the frequency response of linear stable systems. jωt Consider a stable linear constant coefficient system shown in Fig. 27.1. Using Euler’s formula, e = cos ω t + j sin ω t, let us assume that the input sinusoidal signal is given by
u ( t ) = U0 e
jwt
= U 0 cos wt + jU 0 sin wt
(27.1)
Taking the Laplace transform of u(t) gives
U0 U0 s U0 w s + jw -2 = ---------------2 + j ---------------2 U ( s ) = ------------= U 0 --------------2 2 2 s – jw s +w s +w s +w
(27.2)
The first term in Eq. (27.2) is the Laplace transform of U0 cos ω t, while the second term, without the imaginary number j, is the Laplace transform of U0 sin ω t. Suppose that the transfer function G(s) can be written as
n(s) n(s) G ( s ) = ---------- = -----------------------------------------------------------d(s) ( s + p1 ) ( s + p2 ) … ( s + pn )
©2002 CRC Press LLC
(27.3)
0066_frame_C27 Page 2 Wednesday, January 9, 2002 7:10 PM
FIGURE 27.1
A stable linear constant coefficient system.
where pi, i = 1, 2,…, n, are assumed to be distinct poles. The Laplace transform of the output Y(s) is then
U0 Y ( s ) = G ( s )U ( s ) = G ( s ) ------------s – jw
(27.4)
Taking the partial fraction expansion of Y(s) gives
k1 kn a - + … + ------------ + ------------Y ( s ) = -----------s + p1 s + p n s – jw
(27.5)
The coefficient α can be determined by
a = [ ( s – jw )Y ( s ) ]
s=jw
= [ U0 G ( s ) ]
s=jw
= U 0 G ( jw )
Therefore, the inverse Laplace transform of Y(s) yields
y ( t ) = k1 e
−p 1 t
+ … + kn e
–pn t
+ U 0 G ( jw )e
jwt
, t≥0
For a stable system, all −pi have negative nonzero real parts and, therefore, all the terms k i e 2,…, n, approach zero as t approaches infinity. Thus, at steady state, the output y(t) becomes
y ss ( t ) = lim y ( t ) = U 0 G ( jw )e
jwt
t→∞
= U 0 G ( jw ) e
j ( wt+f )
(27.6) –pi t
, i = 1,
(27.7)
The sinusoidal transfer function, G( jω), is written in exponential form
G ( jw ) = G ( jw ) e
jf
where
G ( jw ) =
{ Re [ G ( jw ) ] } + { Im [ G ( jw ) ] } 2
2
(27.8a)
and – 1 Im [ G ( jw ) ] f = ∠G ( jw ) = tan ---------------------------Re [ G ( jw ) ]
(27.8b)
Equation (27.7) shows that for a stable system subject to a sinusoidal input, the steady-state response is a sinusoidal output of the same frequency as the input. The amplitude of the output is that of the input times G ( jw ) , and the phase angle differs from that of the input by the amount f = ∠G ( jw ). Example 1 A first-order low-pass filter is shown in Fig. 27.2. The transfer function of this filter is
Vo ( s ) 1 G ( s ) = -----------= ------------------Vi ( s ) RCs + 1 ©2002 CRC Press LLC
0066_frame_C27 Page 3 Wednesday, January 9, 2002 7:10 PM
FIGURE 27.2
A first-order low-pass filter.
1.5 Transient response
Steady–state response
Amplitude (V)
1
0.5 Output
|G( jw)|
0 ∠ G( jw)
Input
−0.5
−1 0
FIGURE 27.3
1
2
3
4 Time (s)
5
6
7
8
Frequency response of G(s) = 1/(0.5s + 1) to u(t) = sin 2t.
The sinusoidal transfer function is given by
1 1 G ( jw ) = ---------------------------- = ----------------------------jw ( RC ) + 1 j ( w /w 1 ) + 1 where ω1 = 1/RC. The magnitude and phase angle of the frequency response are
1 G ( jw ) = ---------------------------------2 1 + ( w /w 1 )
and
–1 w f ( w ) = – tan -----w1
Figure 27.3 shows the response of the system with RC = 0.5 to the input u = sin2t. It can be seen that the steady-state response is irrelevant to the initial conditions, and the steady-state amplitude of the output is 1/ 2 and the phase angle is −45°.
27.2 Bode Plots There are three commonly used displays of frequency response of a system. They are: 1. the Bode diagram or logarithmic plot, 2. the polar plot, and 3. the log-magnitude versus phase plot or Nichols chart. We will present Bode diagrams of sinusoidal transfer functions in this section, followed by the sections on polar plots and log-magnitude versus phase plots. The main advantages in using the logarithmic plot are the capability of plotting low and high frequency characteristics of the transfer function in one diagram, and the relative ease of adding the separate terms ©2002 CRC Press LLC
0066_frame_C27 Page 4 Wednesday, January 9, 2002 7:10 PM
of a high-order transfer function graphically. The basic types of factors that may occur in a transfer function are as follows: 1. 2. 3. 4.
constant gain K, ±n poles (or zeros) at the origin (jω) , ±1 poles (or zeros) on the real axis (jωτ + 1) , and 2 ±1 complex conjugate poles (or zeros) [(jω /ωn) + 2ς( jω /ωn) + 1] .
The curves of logarithmic magnitude and phase angle for these four factors can easily be drawn and then added together graphically to obtain the curves for the complete transfer function. The process of drawing the logarithmic plot can be further simplified by using asymptotic approximations to these curves and obtaining the actual curves at specific important frequencies. Constant Gain K The logarithmic gain for the constant gain K is
20 log K = constant in decibel,
if K > 0 0°, ∠K = – 180° , if K < 0
The gain and phase curves are simply horizontal lines on the Bode diagram. Poles (or Zeros) at the Origin (jω)
±n
Since
20 log jw
±n
= ± 20n log w,
∠( jw )
±n
= ± n × 90° ±n
the slopes of the magnitude curves are ±20n dB/decade for the factor (jω) and the phase angles are constants equal to ±n × 90°. Poles (or Zeros) on the Real Axis (jωτ + 1)
±1
−1
For a pole factor (jωτ + 1) ,
1 1 ------------------- = ------------------------2 2 jwt + 1 w t +1 The magnitude of the pole factor is 1 when ω > 1/τ. Thus, there are two asymptotic curves for the pole factor,
1 0 dB, when w > --t The slope of the asymptotic curve when ω >>1/τ is −20 dB/decade for the pole factor. The two asymptotes intersect at ω = 1/τ, the break frequency or the corner frequency. The actual logarithmic gain at ω = 1/τ −1 is −3 dB. The phase angle is φ(ω) = −tan ωτ. The Bode diagram of a zero factor (jωτ + 1) is obtained in the same manner. However, the slope of −1 the magnitude asymptotic curve when ω >> 1/τ is +20 dB/decade, and the phase angle is φ(ω) = +tan ωτ. The Bode diagrams of first-order factors are shown in Fig. 27.4. Linear approximations to the phase angle curves are also presented. ©2002 CRC Press LLC
0066_frame_C27 Page 5 Wednesday, January 9, 2002 7:10 PM
Magnitude (dB)
20 10
First—order pole factor First—order zero factor
20 dB/dec
Asymptotic curves
0
−20 dB/dec
−10 −20 90
Phase (deg)
45 deg/dec 45 0 −45 −90
FIGURE 27.4
−45 deg/dec 0.1/t
1/t Frequency w
10/t
±1
Bode diagrams for the first-order factors (jωτ + 1) . 20 z = 0.1 0.2 0.3
Magnitude (dB)
10 0 −10
z = 0.5 0.7 1.0
−20 −30 0
Phase (deg)
−45
z = 0.1 0.2 0.3
z = 0.5 0.7 1.0
−90 −135 −180 0.1wn
10 wn
wn Frequency w
FIGURE 27.5
−1
Bode diagram for the quadratic pole factor [(jω /ωn) + 2ζ(jω /ωn) + 1)] . 2
Complex Conjugate Poles (or Zeros) [(jω /ωn) + 2ς ( jω /ωn) + 1] 2
±1 −1
The magnitude and phase angle of the complex conjugate poles [(jω /ωn) + 2ζ(jω /ωn) + 1] are 2
w2 w j ----- + 2V j ------ + 1 w n w n 2
w w ∠ j ------ + 2V j ------ + 1 w n w n
–1
2 2
w 2 w = 1 – ------2 + 2V ------ w w n
– 1/2
n
–1
– 1 2Vw/w n = – tan ----------------------2 2 1 – w /w n −2
The magnitude of the complex conjugate pole factor is 1 when ω > ωn. Therefore, the two asymptotic curves for the complex conjugate pole factor are
w 2 w 20 log j ------ + 2V j ------ + 1 w n w n
–1
0 dB, when w > w n
The slope of the asymptotic curve when ω >> ωn is −40 dB/decade for the complex conjugate pole factor. The magnitude asymptotes intersect at ω = ωn, the natural frequency. The actual gain at ω = ωn is G(jω n) = 1/2ζ. The Bode diagram of a complex conjugate pole factor is shown in Fig. 27.5. It is seen from Fig. 27.5 that the ©2002 CRC Press LLC
0066_frame_C27 Page 6 Wednesday, January 9, 2002 7:10 PM
difference between the actual magnitude curve and the asymptotic approximation is a function of damping ratio. The resonant frequency ωr is defined as the frequency where the peak value of the frequency response Mr occurs. When the damping ratio approaches zero, ωr approaches ωn. The resonant frequency can be determined by taking the derivative of the magnitude with respect to the frequency, and setting it equal to zero. The resonant frequency and the peak value of the magnitude are represented by
w r = w n 1 – 2V ,
ς < 0.707
(27.9a)
1 M r = -----------------------, 2 2V 1 – V
V < 0.707
(27.9b)
2
and
Example 2 Let us consider the transfer function
10 ( s/5 + 1 ) G ( s ) = --------------------------------------------------------------------2 s ( s + 1 ) [ ( s/10 ) + ( s/10 ) + 1 ] We first list the basic factors of G(s) in Table 27.1 in the order of increasing corner or natural frequencies. The complete asymptotic magnitude curve for G(jω) is produced by adding together the asymptotic logarithmic magnitudes of each factor, as shown by the solid line in Fig. 27.6. Since the dc gain of each factor is 1, these factors have no effect on the asymptotic magnitude until the frequency approaches their corner or natural frequencies. Thus, the asymptotic magnitude can be quickly obtained by plotting each asymptote in order as frequency increases. The asymptotic curve intersects 20 dB at ω = 1 with the slope −20 dB/decade due to the pole at the origin and the constant gain K = 10. At ω = 1 the slope further decreases to −40 dB/decade due to the pole at ω = 1. Then at ω = 5 the slope increases to −20 dB/decade The Basic Factors of G( jω)
TABLE 27.1 Type of Factors
Corner frequency Order
Magnitude (dB)
40
Constant Gain
Pole
Pole
Zero
Complex Poles
K = 10 0
0 −1
1 −1
5 +1
10 −2
−20 dB/dec
Exact curve
20
Exact curve
0
−40 dB/dec
−20
−60 dB/dec
Asymptotic curve −20 dB/dec
−40 −60 −80
Phase (deg)
−90 −135 −180
−45 deg/dec 0 deg/dec
−90 deg/dec
−45 deg/dec −90 deg/dec
Asymptotic curve
−225 −270 0.1
Exact curve
1
10 Frequency (rad/s)
FIGURE 27.6
The Bode plot of the transfer function in Exmple 2.
©2002 CRC Press LLC
100
0066_frame_C27 Page 7 Wednesday, January 9, 2002 7:10 PM
due to the zero at ω = 5. Finally at ω = 10 the slope becomes −60 dB/decade due to the complex conjugate poles at ωn = 10. The exact magnitude is obtained by calculating the actual magnitude at important frequencies such as the corner or natural frequencies of each factor. The phase curve can be obtained by adding the phase due to each factor. Although the linear approximation of the phase characteristic for a single pole or zero is suitable for initial analysis, the error between the exact phase curve and the linear approximation of complex conjugate poles can be large, as seen in Fig. 27.6. Hence, if the accurate phase angle curve is required, a computer program such as Matlab or Ctrl-C can be utilized to generate the actual phase curve.
27.3 Polar Plots The polar plot of a sinusoidal transfer function G(jω) is a plot of both the magnitude and the phase of the frequency response in polar coordinates as the frequency ω varies from zero to infinity. Since the sinusoidal transfer function G(jω) can be expressed as
G ( jw ) = Re [ G ( jw ) ] + j Im [ G ( jw ) ] = G ( jw ) e
jf
the polar plot of G(jω) is a plot of Re[G(jω)] on the horizontal axis versus Im[G(jω)] on the vertical axis in the complex G(s)-plane as ω varies from zero to infinity. Hence, for each value of ω, a polar plot of G(jω) is defined by a vector of length |G(jω)| and a phase angle f = ∠G ( jw ), as in Eq. (27.8). We can investigate the general shapes of polar plots according to the system types and relative degrees of transfer functions. Relative degree of a transfer function is defined as the difference between the degree of the denominator polynomial and that of the numerator. Consider a transfer function of the form
K ( 1 + jwt a ) ( 1 + jwt b ) … G ( jw ) = ---------------------------------------------------------------------N ( jw ) ( 1 + jwt 1 ) ( 1 + jwt 2 ) … m m−1 b 0 ( jw ) + b 1 ( jw ) +… = -------------------------------------------------------------n n−1 a 0 ( jw ) + b 1 ( jw ) + …
where K > 0 and the relative degree n − m ≥ 0. The magnitudes and phase angles of G(jω) as ω approaches zero and infinity are presented in Table 27.2. The general shapes of the polar plots of various system types in the low-frequency portion are shown in Fig. 27.7. The high-frequency portions of the polar plots of various relative degrees are shown in Fig. 27.8. It can be seen that the G(jω) loci are parallel to + either the horizontal or the vertical axes with infinite magnitude as w → 0 for system types greater than zero. If the relative degree is greater than zero, the G(jω) loci converge to the origin clockwise and are tangent to one or the other axes. Note that the polar plot curves can be very complicated due to the numerator and denominator dynamics over the intermediate frequency range. Therefore, the polar plot of G(jω) in the frequency range of interest must be accurately determined. TABLE 27.2 G( jω) vs. System Type and Relative Degree + as ω → 0 and ∞
©2002 CRC Press LLC
System Type N
ω → 0+
Relative Degree n−m
ω→∞
0 1 2 3
K ∠ 0° ∞ ∠ −90° ∞ ∠ −180° ∞ ∠ −270°
0 1 2 3
b0 /a0 ∠ 0° 0 ∠ −90° 0 ∠ −180° 0 ∠ −270°
0066_frame_C27 Page 8 Wednesday, January 9, 2002 7:10 PM
FIGURE 27.7
Polar plots of system with various system types as ω → 0.
FIGURE 27.8
Polar plots of system with various relative degrees as ω → ∞.
We will see that for a closed-loop system, the polar plot of the loop transfer function is useful in determining the stability of the system. The polar plots of some simple systems are shown in Fig. 27.9.
27.4 Log-Magnitude Versus Phase Plots Another approach to presenting the frequency response of a system by a single graph is to plot its logarithmic magnitude versus the phase angle over a frequency range of interest. The resulting curve is a function of the frequency ω. Such log-magnitude versus phase plots are called Nichols charts. Advantages of the Nichols chart are that the relative stability of the closed-loop system can be determined quickly and that the process of closed-loop compensation can be carried out easily. The Nichols charts of the systems in Fig. 27.9 are depicted in Fig. 27.10 for comparison. Figure 27.11 displays three different frequency-response curves of the second-order system
ωn -2 G ( s ) = -----------------------------------2 s + 2Vw n s + ω n 2
©2002 CRC Press LLC
0066_frame_C27 Page 9 Wednesday, January 9, 2002 7:10 PM
FIGURE 27.9
Polar plots of simple transfer functions.
27.5 Experimental Determination of Transfer Functions We can obtain a transfer function model from frequency-response measurements of a stable system. First, the Bode diagram of the frequency response is plotted from the measurements. Then the open-loop transfer function can be deduced from the magnitude and phase plots based on the relationships of the basic pole and zero factors. A wave analyzer is a device to measure the amplitudes and phases of the steady-state response as the frequency of the input sinusoidal wave is altered. A transfer function analyzer can be used to measure the open-loop and closed-loop transfer functions. We will use a computer program combined with an analog-to-digital and digital-to-analog (AD and DA) card to generate the sinusoidal input signal and to measure the frequency response of a system. Consider the second-order Sallen-Key low-pass filter in Fig. 27.12. The transfer function of the filter is given by
Vo ( s ) K G ( s ) = -----------= -----------------------------------------------2 2 Vi ( s ) s /w n + 2V ( s/w n ) + 1 ©2002 CRC Press LLC
(27.10)
0066_frame_C27 Page 10 Wednesday, January 9, 2002 7:10 PM
20
10 1
G ( jw) = (1+ j wT ) (1+ j wT ) (1+ j w T3 ) 1 2 10
0
jw T G ( jw) =
ω=0 Gain (dB)
Gain (dB)
1+ jw T
0 ω=0
−10
−10
−20 ω
ω
−20 −180
∞
∞ −90
0 Phase (deg)
90
−30 −270
180
−180
−90
0
90
Phase (deg)
20 0 w
Gain (dB)
0
−20
w
G ( jw) =
−40
2 n
j ω [( jω)2 + 2ζωn ( jω) + ωn2]
ω ∞ −60 −270
FIGURE 27.10
−180
−90 Phase (deg)
0
90
Nichols charts of simple transfer functions.
where
R1 + R2 -, K = ---------------R2
1 w n = -----------------------------RA RB CA CB
and
1 V = -2
C RA + RB RA CA - + ( 1 – K ) ----------------B- ----------------CA RA RB RB CB
The Real-Time Windows Target in Matlab is used with an Advantech PCL-818L AD and DA card. The sampling time is 0.001 s. The measured magnitudes and phase angles are shown in Fig. 27.13. From the Bode plot, we can find that the dc gain is equal to 1.995 and the natural frequency ωn = 17.90 rad/s. From Eq. (27.9b) and Mr = 1.993, we have ζ = 0.26. An alternative to estimating the transfer function is to use an excitation signal that is sufficiently rich in the frequency contents of interest and to measure the corresponding output. System identification technique is then applied to find the order and parameters of the transfer function. Suitable excitation signals are the impulse signal, sweep sine signal, random sequence, and so forth. Figure 27.14 presents the sweep sine input and the corresponding output. The Matlab System Identification Toolbox is then ©2002 CRC Press LLC
0066_frame_C27 Page 11 Wednesday, January 9, 2002 7:10 PM
20
Gain (dB)
10
Mr 0 w
−10
r
−20
(a)
Phase (deg)
0 −45 −90 −135 −180 0.2wn
wn
0.5 wn
2 wn
Frequency w
3
2
(b)
Imaginary Axis
1 w=∞
w=0
0
−1
Mr
−2
wn
−3 −3
−2
−1
• wr
•
0
1
2
3
Real Axis 10 wn
•
•
wr
Mr
(c)
Gain (dB)
0 w=0
−10
ω
−20 −180
∞ −90
0
90
Phase (deg)
FIGURE 27.11 Three frequency response representations of G(s) = w 2n /(s + 2V ωns + w 2n): (a) Bode diagram, (b) polar plot, and (c) Nichols chart. 2
©2002 CRC Press LLC
0066_frame_C27 Page 12 Wednesday, January 9, 2002 7:10 PM
Sallen-Key low-pass filter.
Magnitude
FIGURE 27.12
100
Mr ´ dc gain
dc gain
10-1
100
101
102
0 Phase (deg)
-30 -60 n
-90 -120 -150 -180
100
FIGURE 27.13
101 Frequency (rad/s)
102
Frequency response of the Sallen-Key filter from experimental data.
Input Amplitude (Volts)
5 4 3 2 1 0
0
1
2
3
4
5
6
7
8
9
10
6
7
8
9
10
Output Amplitude (Volts)
5 4 3 2 1 0
FIGURE 27.14
0
1
2
3
4
5 Time (s)
Sweep sine response of the Sallen-Key filter.
©2002 CRC Press LLC
0066_frame_C27 Page 13 Wednesday, January 9, 2002 7:10 PM
TABLE 27.3
Estimated Transfer Functions for the Second-Order Low-Pass Filter
1.997 1. Ideal op-amp circuit: G ( s ) = -----------------------------------------------------------------------------------2 ( s /18.09 ) + 2 × 0.271 ( s /18.09 ) + 1 where the measured values of resistors and capacitors are substituted in Eq. (27.10) with R1 = 98.4 kΩ, R2 = 98.7 kΩ, RA = 51.3 kΩ, RB = 98.5 kΩ, CA = 1.083 µF, and CB = 0.564 µF. 1.995 2. From the Bode plot: G ( s ) = -----------------------------------------------------------------------------------2 ( s /17.90 ) + 2 × 0.259 ( s /17.90 ) + 1 1.997 3. System identification: G ( s ) = ----------------------------------------------------------------------------------2 ( s /17.78 ) + 2 × 0.255 ( s /17.78 ) + 1
utilized to estimate the transfer function. The resulting transfer functions from the ideal op-amp circuit in Eq.(27.10), the Bode plot, and system identification are shown in Table 27.3 for comparison. It is seen that the differences among the three transfer functions are very small. However, the task of determining transfer functions from Bode plots can be very difficult as various pole or zero factors of close corner frequencies can complicate the magnitude and phase plots for high-order systems. Thus, it is recommended that system identification technique be used for determination of high-order transfer functions.
27.6 The Nyquist Stability Criterion The Nyquist stability criterion provides a graphical procedure for determining the closed-loop stability from the open-loop frequency-response curves. The criterion is based on a result from complex variables theory known as the argument principle, due to Cauchy. Suppose F(s) is a rational function of s with real coefficients that are analytic everywhere in the s-plane except at its poles. Let Γs be a closed, clockwise contour in the s-plane that does not pass through any zeros or poles of F(s). The contour map ΓF is defined by substituting the values of s on the contour Γs for s in F(s). The resulting map is also a closed continuous contour in the F(s)-plane. The principle of the argument can be stated as follows: A contour map ΓF of a complex function F(s) defined on Γs in the s-plane will only encircle the origin of the F(s)-plane if the contour contains a pole or zero of the function. The net number that ΓF encircles the origin in the clockwise direction is
N = Z–P
(27.11)
where Z and P are, respectively, the numbers of zeros and poles of F(s) enclosed by a closed clockwise contour Γs in the s-plane. Example 3 To illustrate the argument principle, consider a rational function
(s + 3)(s + 4) F ( s ) = -------------------------------(s + 1)(s + 2) which has zeros at s = −3, −4 and poles at s = −1, −2. The various contour maps of F(s) are shown in Fig. 27.15, where Γr denotes the contour map of a clockwise circular contour of radius r in the s-plane. We have the following observations from Fig. 27.15: 1. The contour map Γ0.5 does not encircle the origin of the F(s)-plane as the contour in the s-plane does not encircle any pole or zero. 2. Γ1.99 encircles the origin once in the counterclockwise direction as the contour encircles the pole at s = −1 in the clockwise direction in the s-plane, and from Eq. (27.11), N = Z − P = 0 − 1 = −1. Note that Γ1.99 is a closed contour with two loops and only the one encircling the origin is shown in Fig. 27.15. ©2002 CRC Press LLC
0066_frame_C27 Page 14 Wednesday, January 9, 2002 7:10 PM
Im
3
F(s)-plane
Γ1.99 2 Γ2.5 1 Γ0.5 Γ 4.5
Γ3.5 0
Re
−1 −2 −3 −4
−3
−2
−1
FIGURE 27.15
The contour maps of F(s) in Example 3.
FIGURE 27.16
Closed-loop system.
0
1
2
3
3. Γ2.5 encircles the origin twice in the counterclockwise direction as the contour contains two poles at s = −1, −2 and N = Z − P = 0 − 2 = −2. 4. When the radius of the contour is increased to contain the poles at s = −1, −2 and the zero at s = −3, then N = Z − P = 1 − 2 = −1 and a contour map like Γ3.5 encircles the origin once in the counterclockwise direction. 5. When the radius of the contour is further increased to encircle the two poles and two zeros, then N = 2 − 2 = 0 and the contour map like Γ4.5 does not encircle the origin. We now apply Cauchy’s principle of argument to develop the Nyquist stability criterion. Suppose that the characteristic equation of the closed-loop system in Fig. 27.16 is
F ( s ) = 1 + G ( s )H ( s ) = 0 Let L(s) = G(s)H(s), the loop transfer function. Using the argument principle, let us assume that none of the poles or zeros of F(s) lie on the imaginary axis in the s-plane. We now define the Nyquist path, Γs, that is composed of the imaginary axis and a semicircle of infinite radius. This contour completely encloses the entire complex right-half plane as depicted in Fig. 20.17(a). The corresponding contour map ΓF is shown in Fig. 27.17(b). It follows from the argument principle that N corresponds to the net number of clockwise encirclements of the origin of the 1 + L(s)-plane by ΓF . P is the number of poles of F(s) in the right-half s-plane and thus is the number of poles of the loop transfer function L(s) in the right-half s-plane. Z is the number of zeros of the characteristic equation F(s) of the closed-loop system in the right-half s-plane. Therefore, Z must be zero for the closed-loop system to be stable. In practice, a modification is made to simplify the application of the Nyquist criterion. Instead of plotting ΓF in the 1 + L(s)-plane, we plot just L(s) evaluated along the contour Γs. The resulting contour map ΓL is in the L(s)-plane and has the same shape as ΓF but is shifted 1 unit to the left, as shown in Fig. 27.17(c). It thus follows that N is the net number of encirclements of the −1 point in the L(s)-plane. ©2002 CRC Press LLC
0066_frame_C27 Page 15 Wednesday, January 9, 2002 7:10 PM
FIGURE 27.17
Nyquist diagram.
FIGURE 27.18
Nyquist diagram and root locus of Example 4.
The Nyquist stability criterion can now be stated as follows: A necessary and sufficient condition for the closed-loop stability of a system defined by the loop transfer function L(s) is that
Z = N+P
(27.12)
be equal to zero, where N is the net number of encirclements of the −1 point in the L(s)-plane, and P is the number of unstable poles of the loop transfer function L(s). Example 4 Consider the system with the loop transfer function
s – 2s + 2 KL ( s ) = KG ( s )H ( s ) = K ---------------------------------s(s + 1)(s + 2) 2
(27.13)
Let us determine the range of the gain K such that the closed-loop system is stable. Since there is a pole at s = 0, we need to modify the Nyquist path to detour around the origin. The contour is shown in Fig. 27.18(a), where the detour is chosen to be a semicircle of radius approaching zero in the limit. We use the following procedure to sketch the Nyquist plot in Fig. 27.18(b): +
1. Determine L(jω) as ω → 0 : L(s) is of system type 1 and thus
1 L ( jw ) ≈ ----- = ∞ ∠– 90° jw according to Table 27.2. ©2002 CRC Press LLC
0066_frame_C27 Page 16 Wednesday, January 9, 2002 7:10 PM
2. Determine L(jω) as ω → ∞ : L(s) has a relative degree of 1 and
1 L ( jw ) ≈ ----- = 0 ∠– 90° jw according to Table 27.2. + 3. From the Bode plot, draw the polar plot of L(jω) as ω varies from 0 to ∞. Although the magnitude 2 2 2 curve of the factor (s − 2s + 2) is the same as the factor (s + 2s + 2), the phase of the factor (s − 2s + 2) changes from 0° to −180°. Thus, a sketch of the Bode diagram shows that the magnitude curve varies from infinity to zero and the phase changes from −90° to −450°. Since there are two points at which the phases are −180° and −360°, there will be two intersections of the L(jω) locus with the real axis in the L(s)-plane. − 4. Draw the polar plot of L(jω) as ω varies from 0 to −∞ by reflecting the curve of L(jω) in procedure 3 with respect to the real axis in the L(s)-plane. 5. Determine the contour map of the small detour around the origin of the s-plane to complete the plot. On the detour,
s = lim ee , jq
e→0
– 90° ≤ q ≤ 90°
The contour map of the detour can then be determined by jq 2
( ee ) – 2ee + 2 1 jq - = lim --------jq- = lim 1-- ∠– q lim L ( ee ) = lim -------------------------------------------------------e→0 e→0 ee jq ( ee jq + 1 ) ( ee jq + 2 ) e→0 ee e→0 e jq
The resulting map is a large semicircle of radius approaching infinity. This semicircle starts at the − + point L(j0 ) and swings 180° in the counterclockwise direction to connect the point L(j0 ) in the L(s)-plane. 6. Calculate the intersections of the L(jω) locus with the real-axis, for these points are related to the relative stability of the system. Suppose that the L(jω) locus intersects the real axis for some critical frequency ωcr . Then
180° + k360°, L ( jw cr ) = 0° + k360°,
for K > 0 for K < 0
where k = 0, ±1, ±2, ±3,…. This phase condition at the critical frequency is directly related to the angle condition of the root locus when the root locus crosses the imaginary axis. Therefore, we can utilize the Routh–Hurwitz criterion to determine the points where the L(jω) locus crosses the real axis. The characteristic equation of the system (27.13) can be written as
s + ( K + 3 )s + ( 2 – 2K )s + 2K = 0 3
2
Thus, the Routh array is 3
s 1
2 – 2K
s K + 3 2K 2 1
s c 0 s 2K
where
( K + 3 ) ( 2 – 2K ) – 2K c = ---------------------------------------------------K+3 ©2002 CRC Press LLC
0066_frame_C27 Page 17 Wednesday, January 9, 2002 7:10 PM
Let c = 0, and solving for K, we get the critical gains
– 3 ± 21 K cr = ---------------------- = 0.79, – 3.79 2 Substituting the values of Kcr in the auxiliary equation
( K cr + 3 )s + 2K cr = 0 2
we obtain the critical frequencies
w cr =
0.65, 2K cr --------------- = K cr + 3 3.10,
when K cr = 0.79 when K cr = – 3.79
At the critical frequency, we have the characteristic equation
1 + K cr L ( jw cr ) = 0 Hence the points of the L(jω) locus that cross the real-axis are
1 1 1 L ( jw cr ) = – ------- = – ---------- , ---------K cr 0.79 3.79 The complete Nyquist plot is shown not to scale in Fig. 27.18(b). The range of the gain K for which the system is stable can be determined using Nyquist criterion. For different values of K, the Nyquist diagram needs to be redrawn in order to count the number of encirclement of the −1 point. We can avoid this by counting the number of encirclement of −1/K point instead. From the Nyquist criterion, Z = N + P, where P = 0. It can be seen from Fig. 27.18(b) that there are four cases of the encirclements of the −1/K point. 1. K > 0 and −1/K < −1/0.79 ⇒ 0 < K < 0.79, and N = 0. We have Z = 0 and the system is stable. 2. K > 0 and −1/K > −1/0.79 ⇒ K > 0.79 , and N = 2. We have Z = 2 and the system has two unstable poles. 3. K < 0 and −1/K < 1/3.79 ⇒ K < – 3.79, and N = 3. We have Z = 3 and the system has three unstable poles. 4. K < 0 and −1/K > 1/3.79 ⇒ – 3.79 < K < 0 and N = 1. We have Z = 1 and the system has one unstable pole. The root locus of system (27.13) is also shown in Fig. 27.18(c) for comparison.
27.7 Relative Stability In designing a control system, it is required that the system be stable. In addition to stability, there are important concerns such as acceptable transient response and capability to deal with model uncertainty. Since the model used in the design and analysis of a control system is never exact, it may suggest a stable system; but the physical system turns out to be unstable. Therefore, it is required that the system not only be stable but also have some stability margin or adequate relative stability. Suppose that the sinusoidal loop transfer function L(jω) locus intersects the −1 point for some critical frequency ωcr . Then
L ( jw cr ) = G ( jw cr )H ( jw cr ) = −1 ©2002 CRC Press LLC
0066_frame_C27 Page 18 Friday, January 18, 2002 5:45 PM
FIGURE 27.19
Gain and phase margins.
or
1 + L ( j ω cr ) = 1 + G ( j ω cr )H ( j ω cr ) = 0 This indicates that the closed-loop system has a pair of complex poles at s = ±jωcr . Hence, the system is marginally stable and oscillates with the frequency ωcr, provided that all other closed-loop system poles are in the left half s-plane. In general, the closer the L( jω) locus comes to the −1 + j0 point in the Nyquist plot, the more oscillatory is the system response. For this reason, the closeness of the L( jω) locus to the −1 point can be used as a measure of the stability margin. Two traditional measures of the stability margin are gain margin and phase margin. Gain margin and phase margin are usually defined for stable closed-loop systems that are characterized by a minimum phase, loop transfer function L(s). The gain margin is the factor by which the open-loop gain of a stable closed-loop system can be increased before the system goes unstable. The phase margin is the amount of additional phase lag at the gain crossover frequency required to make the stable closedloop system marginally stable. Thus we have the following definitions: Gain margin (GM): The gain margin is the reciprocal of the magnitude |L( jω)| at the phase crossover frequency ωφ, where the phase of L( jωφ) reaches −180°. The gain margin is given by
1 GM = -------------------L ( j ωφ )
or
GM ( dB ) = – 20 log L ( j ω φ )
Phase margin (PM): The phase margin is defined as the angle between the phase of the loop transfer at the gain crossover frequency ωg where L ( j ω g ) = 1 and the angle −180°, or PM = ∠L(j ω g ) + 180° . The gain and phase margins are shown in Fig. 27.19. Gain and phase margins are stability margins for single-input single-output systems. They cannot apply for multi-input multi-output systems. In addition, they can be a poor indication of stability margin in the face of combined gain and phase variations, as shown in Fig. 27.20. This is due to the fact that gain and phase margins are measures of stability margin in terms of only pure gain and phase variations, but not a combination of both. As a consequence, a system may have good gain and phase margins, but it is close to instability, as indicated in Fig. 27.20. To make up for the insufficiencies of gain and phase margins, a third stability margin, return difference, is used in modern control theory. We will only consider single-input single-output systems. ©2002 CRC Press LLC
0066_frame_C27 Page 19 Friday, January 18, 2002 5:45 PM
FIGURE 27.20
Insufficiency of gain and phase margins.
Minimum return difference: The minimum return difference is the minimum value of |1 + L( jω)|, for 0 < ω < ∞. It can be seen from Fig. 27.20 that the minimum return difference is the minimum distance from the Nyquist plot to the −1 point. Therefore, the gain and phase margins are special cases of the minimum return difference. The gain margin is directly related to the case when the minimum return difference occurs at the phase crossover frequency, and the phase margin is corresponding to the case that the minimum return difference occurs at the gain crossover frequency. Although the minimum return difference is a better measure of stability margin than the gain and phase margins, it is seldom used in the classical control theory. This is because the classical control analysis and design is usually carried out using the Bode diagram or the Nichols chart instead of the Nyquist plot. The gain and phase margins are more easily determined from the Bode diagram or the Nichols chart than the Nyquist plot. Despite the fact that the minimum return difference can be easily evaluated from the Nyquist plot, it is difficult to determine the minimum return difference from the Bode plot or the Nichols chart. We now correlate the phase margin and the damping ratio ζ of an underdamped second-order system. Consider the standard second-order system
ωn -2 T ( s ) = -----------------------------------2 s + 2 ςω n s + ω n 2
(27.14)
We assume that the transfer function T(s) comes from a unity feedback configuration and can be rewritten as
G(s) T ( s ) = -------------------1 + G(s) where the open-loop transfer function G(s) is given by
ωn G ( s ) = --------------------------s ( s + 2 ςω n ) 2
©2002 CRC Press LLC
(27.15)
0066_frame_C27 Page 20 Friday, January 18, 2002 5:45 PM
The phase margin occurs at the gain crossover frequency ωc when |G( jωc)| = 1, or
ωn ------------------------------------------ = 1 2 2 2 1/2 ωc ( ωc + 4 ς ωn ) 2
This equation can be rewritten as 2 2
( ωc ) + 4 ς ωn ( ωc ) – ωn = 0 2
2
2
4
Solving for positive ωc, we obtain
ω 1/2 4 2 ------2c = ( 4 ς + 1 ) – 2 ς ωn 2
Substituting s = jωc into Eq. (27.15), the phase margin for the system is
PM = 180° + ∠G ( j ω c )
ωc –1 = 180° – 90° – tan ---------- 2 ςω n 1/2 –1 1 4 2 1/2 = 90° – tan ----- [ ( 4 ς + 1 ) – 2 ς ] 2ς
1 –1 = tan 2 ς ----------------------------------------2 1/2 4 (4ς + 1) – 2ς
1/2
(27.16)
Equation (27.16) relates the damping ratio of the standard second-order system (27.14) to the phase margin of its corresponding open-loop system (27.15) in a unity feedback configuration. This equation provides a correlation between the frequency response and the time response. A plot of ζ versus PM is shown in Fig. 27.21. The curve of ζ versus PM can be approximated by a dashed line in Fig. 27.21. The linear approximation can be expressed as
ς = 0.01 PM
(27.17)
0.8 0.7
Damping ratio z
0.6 0.5 z = 0.01 PM 0.4 0.3 0.2 0.1 0
FIGURE 27.21
0
10
20
30 40 50 Phase margin (deg)
60
Damping ratio vs. phase margin for a second-order system.
©2002 CRC Press LLC
70
0066_frame_C27 Page 21 Friday, January 18, 2002 5:45 PM
This approximation is reasonably accurate for ζ ≤ 0.7 and is useful in relating the frequency response to the transient performance of a second-order system. Equation (27.17) may also be used for higher-order systems if the system can be assumed to have a pair of dominant underdamped complex poles.
References 1. 2. 3. 4.
Dorf, R.C., and Bishop, R.H., Modern Control Systems, 9th ed., Prentice-Hall, 2001. Ogata, K., Modern Control Engineering, 2nd ed., Prentice-Hall, 1990. Kuo, B.C., Control Systems, 7th ed., Prentice-Hall, 1995. Franklin, G.F., Powell, J.D., and Emami-Naeini, A., Feedback Control of Dynamic Systems, 3rd ed., Addison-Wesley, 1994. 5. Phillips, C.L., and Harbor, R.D., Feedback Control Systems, 4th ed., Prentice-Hall, 2000. 6. Wolovich, W.A., Automatic Control Systems: Basic Analysis and Design, Harcourt Brace College Publishing, 1994.
©2002 CRC Press LLC
0066_Frame_C28 Page 1 Wednesday, January 9, 2002 7:19 PM
28 Kalman Filters as Dynamic System State Observers 28.1
The Discrete-Time Linear Kalman Filter Linearization of Dynamic and Measurement System Models • Linear Kalman Filter Error Covariance Propagation • Linear Kalman Filter Update
28.2
Other Kalman Filter Formulations The Continuous–Discrete Linear Kalman Filter • The Continuous–Discrete Extended Kalman Filter
Timothy P. Crain II NASA Johnson Space Center
28.3 28.4
Formulation Summary and Review Implementation Considerations
28.1 The Discrete-Time Linear Kalman Filter Distilled to its most fundamental elements, the Kalman filter [1] is a predictor-corrector estimation algorithm that uses a dynamic system model to predict state values and a measurement model to correct this prediction. However, the Kalman filter is capable of a great deal more than just state observation in such a manner. By making certain stochastic assumptions, the Kalman filter carries along an internal metric of the statistical confidence of the estimate of individual state elements in the form of a covariance matrix. The essential properties of the Kalman filter are derived from the requirements that the state estimate be • a linear combination of the previous state estimate and current measurement information • unbiased with respect to the true state • and optimal in terms of having minimum variance with respect to the true state. Starting with these basic requirements an elegant and efficient formulation for the implementation of the Kalman filter may be derived. The Kalman filter processes a time series of measurements to update the estimate of the system state and utilizes a dynamic model to propagate the state estimate between measurements. The observed measurement is assumed to be a function of the system state and can be represented via
Y ( t ) = h ( X ( t ), β ,t ) + v ( t )
(28.1)
where Y(t) is an m dimensional observable, h is the nonlinear measurement model, X(t) is the n dimensional system state, β is a vector of modeling parameters, and v(t) is a random process accounting for measurement noise.
©2002 CRC Press LLC
0066_Frame_C28 Page 2 Wednesday, January 9, 2002 7:19 PM
Reference Trajectory
State Estimate
True Trajectory
Estimation Error
FIGURE 28.1 LKF tracking of a two-dimensional trajectory.
The true dynamic system is described by a general first-order, ordinary differential equation
˙ ( t ) = f ( X ( t ), α ,t ) + w ( t ) X
(28.2)
where f is the nonlinear dynamics function that incorporates all significant deterministic effects of the environment, α is a vector of parameters used in the model, and w(t) is a random process that accounts for the noise present from mismodeling in f or from the quantum uncertainty of the universe, depending on the accuracy of the deterministic model in use. With these general models available, a linear Kalman filter (LKF) may be derived in a discrete-time formulation. The dynamics and measurement functions are linearized about a known reference state, ˜ (t), which is related to the true environment state, X(t), via X
˜ (t) + x(t) = X(t) X
(28.3)
The LKF state estimate is related to the true difference by (±)
xˆ k
(±)
= x k + dx k
(28.4)
(±)
where the “ˆ” denotes the state estimate (or filter state), dx k is the estimation error, and “±” indicates whether the estimate and error are evaluated instantaneously before (−) or after (+) measurement update at discrete time tk. It is important to emphasize that the LKF filter state is the estimate of the difference between the environment and the reference state. The LKF mode of operation will therefore carry along a reference state and the filter state between measurement updates. Only the filter state is at the time of measurement update. Figure 28.1 illustrates the generalized relationship between the true, reference, and filter states in an LKF estimating a two-dimensional trajectory.
Linearization of Dynamic and Measurement System Models ˜ (t), The dynamics and measurement functions may be linearized about the known reference state, X according to
©2002 CRC Press LLC
˜ ( t ), α , t ) + F ( X ˜ ( t ), α , t )x ( t ) + w ( t ) f ( X, α , t ) f ( X
(28.5)
˜ ( t ), β , t ) + H ( X ˜ ( t ), β , t )x ( t ) + v ( t ) h ( X, α , t ) h ( X
(28.6)
0066_Frame_C28 Page 3 Wednesday, January 9, 2002 7:19 PM
where F is the dynamics partial derivative matrix and H is the measurement partial derivative matrix defined by
˜ ( t ), α , t ) = ∂f F(X ------∂X
˜ X=X
˜ ( t ), β , t ) = ∂h H(X ------∂X
˜ X=X
(28.7) (28.8)
and x(t) is the true state to be estimated representing the difference between the environment and reference states
˜ (t) x(t) = X(t) – X
(28.9)
After linearizing the dynamic and measurement models, the effect of neglecting the higher order terms is assumed to be included in the random processes w(t) and v(t). The linearization is an acceptable approximation if x(t) is sufficiently small. The reference and filter states are propagated according to the discrete-time linear relationship
˜ ˜ X k+1 = Φ ( t k+1 , t k )X k (−)
(−) xˆ k+1 = Φ ( t k+1 , t k )xˆ k
(28.10) (28.11)
where Φ(tk+1, tk) is the state transition matrix from time tk to time tk+1 and has the following properties:
Φ ( tk , tk ) = I ˜ ( t ), α , t )Φ ˙ ( t k+1 , t k ) = F ( X Φ ( t k+1 , t k ) Φ
(28.12)
Φ ( t k+1 , t k ) Φ ( t k+2 , t k ) = Φ ( t k+2 , t k+1 )Φ Note that the system dynamics are now incorporated into the propagation of the reference and filter states by the integration of the dynamics partial derivative in Eq. (28.13). Mathematically, the true difference state is propagated in a similar fashion with the addition of a process noise random value
x k+1 = Φ ( t k+1 , t k )x k + w k
(28.13)
In general, it is not required that the reference dynamic model be exactly the same as the truth dynamics or that the modeling parameter α be equivalent to the true modeling vector. This notation is left in place to simplify the derivation of the Kalman filter formulation. A number of innovative approaches have been developed for adapting reference model parameters to improve fidelity with the unknown real-world system model [2–6] and can be used to enhance filter operation. ˜ , modeled by The LKF also requires a linearized measurement, yk = Yk − Y k
yk = Hk xk + vk
(28.14)
For the development of the Kalman filters presented here, the random contributions vk and wk are assumed to be discrete realizations of the continuous zero mean Gaussian process in Eqs. (28.1) and (28.2) and are defined by T
= R k d ki
(28.15)
T
= Q k d ki
(28.16)
E vk vi
E wk wi
©2002 CRC Press LLC
0066_Frame_C28 Page 4 Wednesday, January 9, 2002 7:19 PM
Generally, it is assumed that the process noise and measurement noise sequences are uncorrelated so that T
E wk vi
= 0
∀k, ∀i
(28.17)
However, the Kalman filter can be configured to operate in systems where this assumption does not apply [7].
Linear Kalman Filter Error Covariance Propagation The propagation of the filter and reference states in the LKF were outlined in the previous section in Eqs. (28.11) and (28.13). However, all Kalman filter formulations must also propagate a confidence metric of the state estimate in the form of a state error covariance matrix. The state error covariance, P, is defined as the expectation of the outer product of the estimation error vector (±)
Pk
±
±T
= E dx k dx k
(28.18)
The state error covariance matrix is n × n and symmetric, and must remain positive definite to retain filter stability. The mechanism for propagating the covariance can be derived by taking the covariance just before measurement update at time tk+1 (−)
(−)
( − )T
P k+1 = E dx k+1 dx k+1
(28.19)
and substituting the estimation error and propagation definitions in Eqs. (28.4), (28.11), and (28.13) to yield T
(−) P k+1 = E Φ ( t k+1 , t k ) xˆ (k+ ) – x k xˆ (k+ ) – x k Φ ( t k+1 , t k ) T + w k w Tk
(28.20)
Utilizing the definitions of process noise covariance in Eq. (28.16) and state error covariance in Eq. (28.18) the propagation equation reduces to (−) (+) T P k+1 = Φ ( t k+1 , t k )P k Φ ( t k+1 , t k ) + Q k
(28.21)
The propagation equation can be interpreted as the sum of the mapping of the previous post-update error covariance through the system dynamics and the system process noise induced uncertainty. Thus, process noise acts to increase the state error covariance between measurement updates.
Linear Kalman Filter Update The linear Kalman filter (LKF) seeks an unbiased, minimum variance solution for the difference state, xk, by combining previous state information with available measurements. The state estimate after measurement update is therefore assumed to be a linear combination of the pre-update state and the linearized measurement information (+)
xˆ k
∗ (−)
= K k xˆ k + K k z k
(28.22)
Substituting Eqs. (28.4) and (28.14) into Eq. (28.22) and solving for the estimation error yields (+)
dx k ©2002 CRC Press LLC
∗
∗
(−)
= ( K k + K k H k – I )x k + K k dx k + K k v k
(28.23)
0066_Frame_C28 Page 5 Wednesday, January 9, 2002 7:19 PM
(−)
By definition Ε[vk] = 0 and E[ dx k ] = 0 by assumption of unbiased estimation. Therefore, the updated state estimation error is unbiased (+)
= 0
E dx k
(28.24)
only if ∗
Kk + Kk Hk – I = 0
(28.25)
Substitution of Eq. (28.25) into Eq. (28.22) results in an expression for the updated state estimate (+)
(−) (−) = xˆ k + K k z k – H k xˆ k
(+)
= ( I – K k H k )dx k + K k v k
xˆ k
(28.26)
with estimation error
dx k
(−)
(28.27)
The post-measurement error covariance in Eq. (28.18) may be expanded to (+)
Pk
(−)
= ( I – K k H k )P k ( I – K k H k ) + K k R k K k
T
T
(28.28)
by substitution of Eq. (28.27) and applying the conditions of uncorrelated process and measurement noise, zero mean measurement noise, and the definition of the pre-measurement state estimation error covariance. At this point, only the requirement that the Kalman filter be an unbiased estimator has been satisfied, so now we will select the Kalman gain Kk that delivers the minimum summed variance on the post-measurement state estimation error. In other words, we seek the gain that will minimize (+)
J k = trace P k
(28.29)
The necessary condition for minimality of Jk is that its partial derivative with respect to the Kalman gain is zero. By employing the following relationship
∂ T ------- [ trace ( ABA ) ] = 2AB ∂A
(28.30)
where B is a symmetric matrix, on the components of Eq. (28.28) with respect to Kk results in (−)
( I – K k H k )P k H k + K k R k = 0 T
(28.31)
The optimal gain (the Kalman gain) is therefore (−)
T
T
−1
(−) T Kk = Pk Hk Hk Pk Hk + Rk
–1
(28.32)
which is sometimes written as (−)
Kk = Pk Hk Wk
(28.33)
where the term Wk is referred to as the innovations covariance (−)
T
Hk Pk Hk + Rk ©2002 CRC Press LLC
(28.34)
0066_Frame_C28 Page 6 Wednesday, January 9, 2002 7:19 PM
28.2 Other Kalman Filter Formulations In addition to the LKF, there are several other formulations of the Kalman filter that may be employed to more closely follow the characteristics of specific state observation scenarios. The LKF may be varied according to the temporal nature of the dynamic and measurement systems to be continuous in dynamics and measurements or continuous in dynamics and discrete in measurements [12 ]. Also, there are applications when the dynamic system is energetic or the measurement quality is poor that may cause the reference state in the LKF to quickly leave the region of linearity about the environment state. In such systems, the reference state can be updated through addition of the filter state into an implementation known as the extended Kalman filter (EKF). The EKF is highly suited to real-time applications but is nonlinear in the sense that the reference state is essentially reinitialized at the time of each measurement update. Both the continuous–discrete LKF and EKF will be developed in the following sections.
The Continuous–Discrete Linear Kalman Filter There may quite naturally arise an application where the reference state, filter state, and state error covariance are more suitably propagated in a continuous fashion than through the linear application of the state transition matrix. Also, it is common for the measurement system to deliver discrete-time observations even when the dynamics are best modeled continuously. In such a situation the update mechanization is unchanged from the previous LKF derivation while the propagation between updates is carried out through continuous integration. Without loss of generality, it may be stated that the reference dynamics of a continuous Kalman filter may be represented by
˜˙ ( t ) = f ( X ˜ ( t ), α , t ) X
(28.35)
Furthermore, by taking time derivatives of the filter state and covariance propagation (Eqs. (28.11) and (28.21)) and substituting in Eq. (28.13) for the derivative of the state transition matrix, the continuoustime filter state and covariance relations are found to be (−) ˜ ( t ), α , t ) + F ( X ˜ ( t ), α , t )[ xˆ ( − ) ( t ) – X ˜ ( t )] x˙ˆ ( t ) = f ( X
(28.36)
T P˙ ( t ) = F ( t )P ( t ) + P ( t )F ( t ) + Q ( t )
(28.37)
where Q(t) is the spectral density of the dynamic process noise at time t and the explicit functional dependency of F was dropped for notational convenience. In this mechanization of the LKF, the state transition matrix need not be calculated as the dynamics are included directly via the partial derivative matrix and the reference state, filter state, and error covariance are propagated continuously. The process and measurement noise representations in this formulation are continuous and discrete for the respective models, and are again assumed to be zero mean processes governed by the continuous dynamic process noise covariance
E [ w ( t )w ( t ) ] = Q ( t )d ( t – t ) T
(28.38)
and the discrete measurement noise covariance T
E vk vj
= R k d kj
(28.39)
It is also assumed here that the process and measurement noises are uncorrelated so that
E w ( t )v k
T
= 0
(28.40)
although the formulation can be modified to accommodate process and measurement noise correlations if necessary [7]. ©2002 CRC Press LLC
0066_Frame_C28 Page 7 Wednesday, January 9, 2002 7:19 PM
The Continuous–Discrete Extended Kalman Filter In applications where the reference state may quickly deviate beyond the linear region of the environment state, the reference may be directly updated at the time of measurement update by adding the LKF filter state to the reference in an EKF. The EKF is similar to the LKF, in that measurements are processed to provide an estimate of the difference between the true state and reference state of the spacecraft. Also, the EKF evaluates dynamics and measurement partials with respect to the reference state in a manner similar to the LKF. However, the reference state about which these partials are evaluated is modified through the addition of measurement information
˜ ( t )(+) = X ˜ ( t ) ( − ) + xˆ ( t ) X k k k
(28.41)
The reference state dynamics model used in the EKF formulation is given by Eq. (28.35), but the measurement model is the discrete form given by Eq. (28.1). The filter state representing the estimated difference between the true state and the reference state is only calculated at the time of measurement update via dropping the previous estimate information term from Eq. (28.26):
xˆ k = K k Z k
(28.42)
where the innovation is now the actual measurement residual
˜ (−) , β , t Zk = Yk – h X k k
(28.43)
Therefore, in the EKF there is not a separate filter state that needs to be propagated to the time of the next measurement, as the filter state has been incorporated into the updated reference state. As before, the error covariance at each measurement is updated by (+)
Pk
(−)
= ( I – K k H k )P k ( I – K k H k ) + K k R k K k , T
T
(28.44)
and the EKF Kalman gain and innovations covariance are analogous to their LKF counterparts (−)
−1
Kk = Pk Hk Wk (−)
Wk = Hk Pk Hk + Rk .
(28.45) (28.46)
The difference between EKF operation and LKF operation is illustrated by revisiting the two-dimensional trajectory illustration in Fig. 28.2. The reference trajectory can now be seen to respond to measurement information availability and tracks the true environment trajectory. Estimated/Reference Trajectory
True Trajectory
Estimation Error
FIGURE 28.2
EKF tracking of a two-dimensional trajectory.
©2002 CRC Press LLC
0066_Frame_C28 Page 8 Wednesday, January 9, 2002 7:19 PM
28.3 Formulation Summary and Review The LKF discrete–discrete formulation was given by the following propagation equations:
˜ ˜ X k+1 = Φ ( t k+1 , t k )X k (−)
(−)
xˆ k+1 = Φ ( t k+1 , t k )xˆ k
(−) (−) T P k+1 = Φ ( t k+1 , t k )P k Φ ( t k+1 , t k ) + Q k
and update equations (−)
(+)
= xˆ k + K k z k – H k xˆ k
(−)
(+)
= ( I – K k H k )P k ( I – K k H k ) + K k R k K k
xˆ k
(−)
Pk
(−)
(−)
T
T
T
−1
T
Kk = Pk Hk Hk Pk Hk + Rk In the discrete time LFK mechanization, the reference state is unaffected by the incorporation of measurement information into the filter state. In a slight variation of this approach, the dynamics of the LKF may be made continuous, and the filter state, reference state, and covariance propagated without the use of a state transition matrix.
˙˜ ˜ ( t ), α , t ) X (t) = f(X (−) ˜ ( t ), α , t )xˆ ( − ) ( t ) x˙ˆ ( t ) = F ( X T P˙ ( t ) = F ( t )P ( t ) + P ( t )F ( t ) + Q ( t )
When the application requires that the reference state be modified to remain in the linear vicinity of the environment state, the EKF continuous–discrete formulation may be appropriate. In the continuous– discrete EKF formulation, the propagation is carried out according to
˙˜ ˜ ( t ), α , t ) X (t) = f(X T P˙ ( t ) = F ( t )P ( t ) + P ( t )F ( t ) + Q ( t ) and the measurement update according to
˜ ( t )(+) = X ˜ ( t ) ( − ) + xˆ ( t ) X k k k ˜ (−) , β , t xˆ k = K k Y k – h X k k (+)
Pk
(−)
= ( I – K k H k )P k ( I – K k H k ) + K k R k K k (−)
T
(−)
T
T
T
−1
Kk = Pk Hk Hk Pk Hk + Rk The reference state will change with the incorporation of measurement information into the EKF and the partials evaluated along this changing reference. ©2002 CRC Press LLC
0066_Frame_C28 Page 9 Wednesday, January 9, 2002 7:19 PM
28.4 Implementation Considerations It is commonly held among designers of Kalman filters that the implementation of the formulas listed above represent only a portion of the effort required to develop an accurate and robust Kalman filter application. Once the dynamics, measurements, and partial derivatives have been coded, the task remains to tune the noise magnitudes represented in the process noise covariance Q and the measurement noise covariance R. While the measurement noise can be based in realistic hardware performance specifications, the process noise is often used as a tuning parameter to ensure that the filter operates correctly. This process of tuning the filter crosses over into the area of design and is nearly an art form of such myriad approaches that it is beyond the scope of this work to outline. However, a Kalman filter checklist is provided for the newcomer to the field to reduce the time of the implementation and tuning learning curve: • Because the linear Kalman filter does not change the reference state in the presence of measurement information, the reference state and partial derivatives for an LKF application may be computed prior to operation. This makes the LKF more amenable to computationally restricted applications or hypothesis testing where differing process noise and measurement noise parameters are being evaluated in parallel [8]. • Process noise serves to keep the filter from becoming overconfident in its estimate (i.e., a covariance with near zero diagonal values) and converging prematurely. Examining the propagation equations for the Kalman filters presented previously, it can easily be seen how the addition of process noise increases the magnitude of the state error covariance between measurements. • The innovations covariance should ideally converge to describe the variance in the filter measurement residuals. Adaptive techniques have been implemented where the filter noise parameters are tuned according to a metric linking residual statistics with the innovations covariance [5]. In an ideal filter, the innovations covariance should approach the measurement noise covariance as the process noise magnitude approaches zero. • When multiple measurements are available at the same time, they may be processed as a series of scalar observations as long as they are uncorrelated (i.e., R is a diagonal matrix). The effect of processing scalar measurements is that the innovations covariance becomes a scalar, and a numerical division rather than a matrix inversion is required to calculate the Kalman gain. • Measurement editing may be employed to prevent spurious data from causing filter divergence in a number of ways. One of the most common is to reject measurements when the ratio of the measurement residual squared to the scalar innovations covariance 2
rk -----Wk
(28.47)
is above a user-defined threshold. The threshold value may either be a constant or may be time varying after long propagation periods to allow for a smooth transition to a steady state innovations covariance. • The covariance should always be positive definite. If filter divergence is a chronic problem in a particular application, the numerical integrity of the covariance may provide insight into the nature of the divergence. There are also several numerical implementations of the covariance update equation that take advantage of its symmetry and positive definiteness to enhance its stability while reducing computational load [9]. • Process noise may be enhanced by including time correlated states such as first-order Gauss–Markov processes to the filter to account for specific dynamic effects. The biases associated with these processes can be included in the filter state for estimation. As a final note it should be stressed that the Kalman filter is not the state observer algorithm best suited for all applications. Its strengths lie in light computational requirements and real-time availability ©2002 CRC Press LLC
0066_Frame_C28 Page 10 Wednesday, January 9, 2002 7:19 PM
of a state estimate in the presence of accurate measurement information. However, batch estimation techniques such as least-squares estimation may be more appropriate in applications where the dynamic process is modeled to a high degree of fidelity, measurements are not uniformly accurate, and real-time operation is not an issue. A number of quality texts [10–12] have been written on the subject of stochastic estimation in general and specifically Kalman filtering that the the reader is encouraged to pursue for more detailed information.
References 1. Kalman, R. E., “A new approach to linear filtering and prediction problems,” Transactions of the ASME, Ser. D, Journal of Basic Equations, March 1960, pp. 35–45. 2. Burkhart, P. and Bishop, R., “Adaptive orbit determination for interplanetary spacecraft,” Journal of Guidance, Control, and Dynamics, Vol. 19, No. 3, 1997, pp. 693–701. 3. Chaer, W., Bishop, R., and Ghosh, J., “Hierarchical adaptive Kalman filtering for interplanetary orbit determination,” IEEE Transactions on Aerospace and Electronic Systems, Vol. 34, No. 3, 1998, pp. 1–14. 4. Crain, T. and Bishop, R., “The mixture-of-experts gating network: integration into the ARTSN extended Kalman filter,” Technical Memorandum CSR-TM-99-01, Center for Space Research, March 1999. 5. Ely, T., Bishop, R., and Crain, T., “Adaptive interplanetary navigation using genetic algorithms,” The Journal of Astronautical Sciences, 2000, Accepted for Publication. 6. Crain, T. and Bishop, R., “Unmodeled impulse detection and identification during Mars pathfinder cruise,” Technical Memorandum CSR-TM-00-01, Center for Space Research, March 2000. 7. Chaer, W. and Bishop, R., “Adaptive Kalman filtering with genetic algorithms,” Advances in the Astronautical Sciences, edited by R. Proulx, J. Liu, P. Siedelmann, and S. Alfano, Vol. 89, Univelt, San Diego, CA, 1995, pp. 141–156, Pt. 1. 8. Gholson, N. and Moose, R., “Maneuvering target tracking using adaptive state estimation,” IEEE Transactions on Aerospace and Electronic Systems, Vol. 13, No. 3, May 1997, pp. 310–317. 9. Bierman, G., Factorization Methods for Discrete Sequential Estimation, Academic Press, 1977. 10. Brown, R. G. and Huang, P. Y. C., Introduction to Random Signals and Applied Kalman Filtering, John Wiley and Sons, 1992. 11. Lewis, F., Applied Optimal Control and Estimation, Prentice-Hall, Englewood Clifis, NJ, 1992. 12. Gelb, A., Applied Optimal Estimation, The M.I.T. Press, Cambridge, MA, 1974.
©2002 CRC Press LLC
29 Digital Signal Processing for Mechatronic Applications 29.1 29.2
Introduction Signal Processing Fundamentals Continuous-Time Signals • Discrete-Time Signals
29.3
Continuous-Time to Discrete-Time Mappings Discretization • s-Plane to z-Plane Mappings • Frequency Domain Mappings
Bonnie S. Heck
29.4
Thomas R. Kurfess Georgia Institute of Technology
Digital Filter Design IIR Filter Design • FIR Filter Design • Computer-Aided Design of Digital Filters • Filtering Examples
Georgia Institute of Technology
29.5
Digital Control Design Digital Control Example
29.1 Introduction Most engineers work in the world of mechatronics as there are relatively few systems that are purely mechanical or electronic. There are a variety of means by which electrical systems augment mechanical systems and vise versa. For example, most microprocessors found in a computer today have some sort of heat sink and perhaps a fan attached to them to keep them within their operational temperature zone. Electrical systems are widely employed to monitor and control a wide variety of mechanical systems. With the advent of inexpensive digital processing chips, digital filtering and digital control for mechanical systems is becoming commonplace. Examples of this can be seen in every automobile and most household appliances. For example, sensor signals used in monitoring and controlling of mechanical systems require some form of signal processing. This signal processing can range from simply “cleaning-up” the signal using a low pass filter to more advanced analyses such as torque and power monitoring in a DC servo motor. This chapter presents a brief overview of digital signal processing methods suitable for mechanical systems. Since this chapter is limited in space, it does not give any derivation or details of analysis. For a more detailed discussion, see references [1,2].
29.2 Signal Processing Fundamentals A few fundamental concepts on signal processing must be introduced before a discussion of filtering or control can be undertaken.
©2002 CRC Press LLC
0066-frame-C29 Page 2 Wednesday, January 9, 2002 7:23 PM
Continuous-Time Signals Laplace transforms are used for system analysis of continuous-time systems, solving for system response, and control design. The single-sided Laplace transform of a continuous-time signal, x(t), is given by
X(s) =
∫
∞
x ( t )e
– st
dt
0
A transfer function of a linear system, H(s), can be found as the ratio of the Laplace transforms of the output over that of the input (with zero initial conditions). The Fourier transform is used to determine the frequency content of a signal. The Fourier transform of x(t) is given by
X(w) =
∞
∫
−∞
x ( t )e
– jw t
dt
(29.1)
where ω is in units of radians per second. Notice that when x(t) = 0 for t ≤ 0, the Laplace transform is equivalent to the Fourier transform by setting s = jω. (It should be noted that there are some additional convergence considerations for the Fourier transform.) The frequency response of a system is defined as the ratio of the Fourier transforms of the output over that of the input. Equivalently, it can be found from the transfer function as H(ω) ≡ H( jω) = H(s)|s =jω . For simplicity of notation, the j is usually not shown in the argument list, giving rise to the notation H(ω) to represent the frequency response. The bandwidth of a system is defined as the frequency at which H(ω) = 0.707H(0).
Discrete-Time Signals The z-transform is useful for solving a difference equation and for performing system analysis. The z-transform of a discrete-time signal, x[n], is defined as ∞
∑ x [ n ]z
X(z) =
−n
n=−∞
The discrete-time Fourier transform (DTFT) is used to determine the frequency content of a signal. The DTFT and the inverse DTFT of a signal are defined by ∞
X(Ω) =
∑ x [ n ]e
−jΩn
(29.2)
n=−∞
and
1 x [ n ] = -----2p
∫
p
−p
X ( Ω )e
jΩn
dΩ
(29.3) jΩ
Note that the DTFT can be derived from the z-transform by setting z = e . (Again, there are some assumptions on convergence in this derivation.) Since the DTFT is periodic with period 2π, it is typically displayed over the range [−π, π] or [0, 2π], where the frequencies of general interest are from Ω = 0 (low frequency) to Ω = π (high frequency). The frequency response of a discrete-time system can be found as the ratio of the DTFT of the output signal over that of the input signal. Alternatively, it can be found jΩ jΩ from the transfer function as H(Ω) ≡ H(e ) = H(z)| z=e jΩ . The notation H(Ω) is preferred over H(e ) for its simplicity. As in the continuous-time case, the bandwidth is defined as the frequency at which H(Ω) = 0.707H(0). ©2002 CRC Press LLC
0066-frame-C29 Page 3 Wednesday, January 9, 2002 7:23 PM
While the DTFT is continuous with respect to the frequency variable Ω, the discrete Fourier transform (DFT) contains points that are discrete with respect to a parameter k. Consider a finite duration sequence x[n], where x[n] = 0 for n < 0 and for n ≥ N. The DFT of x[n] and the inverse DFT are defined as N−1
Xk =
∑ x [ n ]e
−j2pnk/N
, k = 0, 1,…, N – 1
(29.4)
n=0
and
1 x n = ---N
N−1
∑X e
j2pnk/N
k
, n = 0, 1,…, N – 1
k=0
Note that the DFT is a discretized version of the DTFT where Xk = X(Ω)| Ω=2pk/N over the range Ω = 0 to Ω = 2π. Calculating a closed-form solution for the DTFT can be done only for simple signals such as a square pulse or a triangular pulse. Therefore, the DFT is generally used as a numerical method to calculate the DTFT at discrete points in frequency in the range 0 ≤ Ω ≤ 2π. In particular, to obtain a plot of the DTFT, plot Xk versus k where k is scaled by 2π/N. For an arbitrary signal, such as obtained from measurements of a physical device, computing the DFT instead of the DTFT is the preferred method to find the frequency content of the signal. To get more resolution in plotting a DTFT from the points calculated by a DFT, zeros can be added to the end of the sequence so that the value of N is increased. Suppose a time domain signal is not finite in duration, so that there is no value of N such that x[n] = 0 for n ≥ N. In order to perform the DFT, the signal must be truncated. There are two cases to be considered: the case where x[n] is decaying to zero and the case where x[n] has periodic components. The case when x[n] decays to zero is handled by choosing N to be large enough so that the signal is negligible beyond that value. The resulting DFT is an approximation (not a discretized version) of the DTFT. If the signal is periodic, the DTFT cannot be computed numerically since the resulting DTFT would have impulses in it. However, the frequencies present in the signal could still be determined if the value of N used for the truncation is chosen so that the truncated signal goes through an integer number of cycles. If this not done, the resulting DFT will have leakage in the frequency plot when compared to the DTFT of the true signal. For example, consider a signal x[n] = cos(0.4π n). This is periodic with period n = 5 and has DTFT given by X(Ω) = π[δ (Ω + 0.4π) + δ (Ω − 0.4π)] for −π ≤ Ω ≤ π. All the frequency content is located at Ω = 0.4p and Ω = −0.4π. Since the DTFT is periodic with 2π, there is also an impulse at Ω = 2π − 0.4π. The DFT is computed for two truncations of the signal, one at N = 20 (four complete cycles) and the other at N = 22. The DFT for N = 20 is plotted in Fig. 29.1(a) where the independent variables k are scaled by 2π /N for the plot. This plot shows zero frequency content except at Ω = 0.4π (=1.2566) and Ω = 2π − 0.4π (=5.0265), giving the correct location of the impulses in the DTFT. Similarly, the DFT for N = 22 is plotted in Fig. 29.1(b), notice the resulting leakage in the frequency characteristics.
10
10 |X (Ω)|
15
|X (Ω)|
15
5
0 0
5
2
Ω
(a)
FIGURE 29.1
4
6
0 0
2
Ω
4
6
(b)
DFT of periodic signal (a) truncated after 4 complete cycles and (b) truncated after 4.4 cycles.
©2002 CRC Press LLC
0066-frame-C29 Page 4 Wednesday, January 9, 2002 7:23 PM
If a signal has periodic content, but is not periodic, such as x[n] = cos(0.5π n) + cos(0.2n), then leakage cannot be avoided by a selection of N. An alternate means of reducing leakage is to first taper the signal to zero at the initial and end points of the sequence prior to computing the DFT. This process, known as windowing the data, is accomplished by multiplying x[n] by a window function w[n] and then performing the DFT on the product x[n]w[n]. Three common windows are the rectangular window, which is a sharp truncation, the Hanning window, and the Hamming window [1]. Rectangular Window:
w[n] = 1,
0≤n≤N−1
Hanning Window:
1 2p n w [ n ] = -- 1 – cos ------------- , 0 ≤ n ≤ N – 1 N – 1 2 Hamming Window:
2pn w [ n ] = 0.54 – 0.46 cos ------------- , 0 ≤ n ≤ N – 1 N – 1 If the value of N in a DFT is a power of 2, there is a fast method to compute the DFT called the fast Fourier transform (FFT). If the value of N is not a power of 2, zeros can be padded to the end of the signal in order to use the FFT. This does not affect the accuracy of the result, but it does improve the resolution of the resulting plot when the DFT (or FFT) is used to compute the DTFT. In many cases, the expression used in Eq. (29.4) suffices to compute the DFT since the added computational power of today’s processors lessens the need for the numerical efficiency of the FFT. The details of the algorithm for the FFT are beyond the scope of this handbook. See [1] or [2] for details.
29.3 Continuous-Time to Discrete-Time Mappings While most physical systems operate in continuous-time, computers operate in discrete-time. Therefore, in order to use computers to process measurements taken from continuous-time systems, there must be ways of mapping between the continuous-time world to the discrete-time world.
Discretization Before an analog signal can be analyzed using digital techniques, it must be discretized (that is, converted into a discrete-time signal). The ideal method for discretization is sampling, where the values of the signal are determined at discrete points in time. Generally, the signal is sampled at a fixed rate known as the sampling period. The sampling rate (in hertz) is the inverse of the sampling period. Figure 29.2 depicts a 1 Hz signal that has been sampled at two rates. The dark points are sampled at 15 ms intervals, while the lighter points are sampled at 250 ms intervals. From Fig. 29.2, the waveform approximation clearly degrades as the sampling frequency is reduced and approaches the signal frequency. In fact, it can be shown that a signal must be sampled at a frequency that is higher than twice its maximum frequency content. This is known as the Nyquist Sampling Theorem. For example, if the signal in Fig. 29.2 is sampled at 0.5 Hz, it is possible for every sample to have a value of 0 as at 0, 500, 1000 ms, etc… the value of the signal is 0. The erroneous interpretation of the signal due to a sample frequency that is too low is known as aliasing. There are two means by which the Nyquist Sampling Theorem can be satisfied. The first is by employing a sample frequency that is more than twice the highest frequency content of the signal being sampled. This value frequency is known as the Nyquist frequency. As one never is sure of the actual frequency content of a real signal, a low pass filter may be used to ensure that a signal does not possess frequencies above a certain cut-off level. Such a filter is commonly ©2002 CRC Press LLC
0066-frame-C29 Page 5 Wednesday, January 9, 2002 7:23 PM
1 0.5 0 −0.5 −1 0
FIGURE 29.2
500
1000 Time (ms)
1500
2000
A 1-Hz signal. Y(t )
t
FIGURE 29.3
A signal sampled and reconstructed using a zero order hold (ZOH).
called an anti-aliasing filter. This is the second and most practical method that is used to satisfy the Nyquist Sampling Theorem. Thus, a combination of a well-designed anti-aliasing filter as well as a sampling frequency that is well above the cut-off frequency of the filter will ensure that the Nyquist Sampling Theorem is satisfied. There are two important points that should be noted when using an anti-aliasing filter. First, it is important that the anti-aliasing filter be used before the signal is sampled as sampling is what causes aliasing. Basically, this requires that the anti-aliasing filter is implemented using an analog filter prior to the signal being digitized. Once a signal has been aliased during sampling, it cannot be corrected using digital filtering. The second point is that, in practice, the cutoff frequency of the anti-aliasing filter should be a factor of 5–10 below the value of the Nyquist frequency. It should be noted that an anti-aliasing filter adds phase lag to the measurement, which might deteriorate stability and performance in a feedback loop unless the bandwidth of the anti-aliasing filter is much higher than that of the closed loop system. Commercially available devices that perform sampling are analog-to-digital converters (ADCs), and the anti-aliasing filter is used before this device. The converse of sampling is reconstruction where a discrete-time signal is converted into a continuoustime signal. The Nyquist sampling rate ensures that if a continuous-time signal is sampled at a rate that is at least twice the highest frequency component in the signal, then the continuous-time signal can be reconstructed exactly from the samples. However, this theorem assumes that an ideal reconstruction process is available, which is not practical. The most common practical means to reconstruct a signal is a zero-order hold (ZOH). The ZOH assumes that the value of the signal is constant between samples. This approximation is quite reasonable if the sampled signal does not change substantially between individual samples. Figure 29.3 is an example of a signal and its ZOH representation. The gray, smooth line represents the original analog signal. The black points along the signal indicate sample values of the signal. Each black ©2002 CRC Press LLC
0066-frame-C29 Page 6 Wednesday, January 9, 2002 7:23 PM
point is connected to the next via a horizontal then vertical straight line. The horizontal line is representative of the ZOH assumption that the value of the signal remains constant between samples. The vertical line is the reality that the signal does not remain constant over the sample period. As the time between sample points is increased, the accuracy of the ZOH decreases. Conversely, as the sample period is decreased, the accuracy of the ZOH is improved. Commercially available devices that perform reconstruction are digitalto-analog converters (DACs), which generally use the ZOH method.
s-Plane to z-Plane Mappings One method to relate the s-plane to the z-plane is to derive a continuous-time mathematical representation of the sampled signal for x(t) and compute its Laplace transform. The resulting Laplace transform sT of the sampled signal can be related to the z-transform of x[n] by setting z = e where T is the sampling sT period. The relationship z = e is commonly termed the exact mapping between the z-plane and the s-plane. (For details of this derivation, see [1]). For example, a digital representation, Hd (z), of a continuous-time system, H(s), can be obtained using this mapping Hd(z) = H(s)| z=esT . However, this mapping results in a nonrational function for Hd(z). Approximate mappings between the s-plane and the z-plane are commonly used that do result in a rational function for Hd(z). Three such mappings are the bilinear transformation, forward transformation, and backward transformation. Bilinear transformation:
2(z – 1) s = -------------------T(z + 1) Forward transformation:
1 s = --- ( z – 1 ) T Backward transformation:
1 s = ------ ( z – 1 ) Tz The bilinear transformation (also known as Tustin’s rule or the trapezoidal rule) is the most accurate of these mappings. It maps the entire left-hand side of the s-plane into the unit circle of the z-plane, so that it preserves stability. Consider a first-order example of H(s) = 1/(s + 2). The discrete-time representation of this transfer function is
H d ( z ) = H ( s )|
2 ( z −1 ) s= -----------------T ( z +1 )
T(z + 1) = ---------------------------2z – 2 + 2T
Note that the resulting transfer function is rational in z. An alternate method of mapping transfer functions between the continuous-time and the discretetime domains is the response-matching mapping. Response-matching: Suppose x(t) is the input to a system H(s) with the resulting output y(t). Let x[n] and y[n] be the sampled versions of x(t) and y(t). Then, Hd (z) is found from the ratio of z-transforms of x[n] and y[n]. The most common response matching is step-response matching where x(t) is a step function, x(t) = 1 for t ≥ 0 and x(t) = 0 for t < 0. An expression for Hd (z) is found from the following operation:
H(s) −1 H d ( z ) = ( 1 – z )Z ----------s ©2002 CRC Press LLC
0066-frame-C29 Page 7 Wednesday, January 9, 2002 7:23 PM
where Z[H(s)/s] represents the z-transform of the sampled version of the step response of the continuoustime system. The form for a generic first-order system is given below: −aT
−1
a ( 1 – e )z H ( s ) = ----------- ⇔ H d ( z ) = ----------------------------−aT −1 s+a 1–e z The response matching method (especially with step inputs) is commonly used to map a continuoustime plant to discrete-time when designing a digital controller in the discrete-domain. Since most digital controllers are implemented using a ZOH on the output of the digital controller, the plant sees a stepped signal, one that looks like a sum of delayed step signals. Therefore, the step-response matching method is the most accurate way to map a plant that has a ZOH on its input.
Frequency Domain Mappings The continuous-time Fourier transform can be related to the DTFT through the expression:
X (w ) = TX ( Ω )| Ω=w T for −p ≤ Ω ≤ p where X(ω) is defined in Eq. (29.1) and represents the continuous-time Fourier transform of x(t), while X(Ω) is defined in Eq. (29.2) and represents the DTFT of the sampled signal x[n]. This mapping is very useful for computing the Fourier transform of measured data. In particular, suppose a continuous-time signal is measured by sampling it through an ADC and storing it as a discrete-time sequence. If the signal x(t) is finite in duration, the DTFT of x[n] can be computed at discrete points in frequency by using the DFT, Xk, as given in Eq. (29.4). Using the relationships ω = Ω/T, Ω = 2π k/N, and Xk = X(Ω)| Ω=2pk/N , where N is the length of the sequence for x[n] and T is the sampling period, gives the relationship:
X (w )|w =2pk/NT = TX k for 0 ≤ w ≤ w s /2, 0 ≤ k ≤ ( N – 1 )/2 where ωs = 2π /T is the sampling frequency in radian per second. Accuracy can be improved by decreasing the sampling period T, and the resolution in the plot can be increased by increasing NT. If the signal x(t) is not finite in duration, it must be truncated in order to use this numerical method to calculate the continuous-time Fourier transform. As discussed in the section “Discrete-Time Signals,” if the sampled signal x[n] decays to zero, choose the number of sampled points N to be large enough so that x(t) is negligible beyond that value. If the sampled signal x[n] is periodic, choose the sampling period T and the number of points N such that the sampled signal x[n] goes through an integer number of cycles. For example, consider the signal x(t) = cos(π t). If the sampling period is chosen as T = 0.4 s, the discretized signal would be x[n] = x(nT) = cos(0.4π n), which is the same signal analyzed in the section “Discrete-Time Signals.” Choosing N = 5, 10, 15, etc. would yield correct results in the DFT while any other value would result in leakage. If the signal x(t) has periodic content, but does not appear to be periodic, then use a windowing function as discussed in the section “Discrete-Time Signals” to reduce leakage when computing the DFT. Note that the DFT can also be used to determine the Fourier coefficients of periodic signals. Consider a Fourier series in the form ∞
x(t) =
∑ce
jw kt
k
k=−∞
Sample the signal x(t) by first making sure that the sampled signal goes through an integer number of cycles. The coefficients ck for k = 0,…,(N − 1)/2 can be found as ck = Xk /N where Xk is found from the ∗ DFT. The rest of the coefficients are obtained from c−k = c k . ©2002 CRC Press LLC
0066-frame-C29 Page 8 Wednesday, January 9, 2002 7:23 PM
Since the frequency response of a system is the ratio of the Fourier transforms of the output over the input, a mapping between a continuous-time system, H(ω), and a corresponding discrete-time system, Hd(Ω), can be derived from the previous mapping as
H (w ) = H d ( Ω )| Ω=w T
for −p ≤ Ω ≤ p
This mapping is useful for the design of both digital filters and digital controllers.
29.4 Digital Filter Design The frequency response function of a discrete-time system describes how the system processes input signals of different frequencies. Consider an input signal x[n] = A cos(Ω 0n) to a system with frequency response H(Ω) where 0 ≤ Ω0 ≤ 2π. The corresponding output is given by
y [ n ] = |H ( Ω 0 )| cos ( Ω 0 n + ∠H ( Ω 0 ) ) For aperiodic signals, the filtering property of Fourier transforms gives the relationship:
Y ( Ω ) = H ( Ω )X ( Ω ) Thus, if H ( Ω ) is small over a certain range of frequencies, then input signals with frequency content in that range are attenuated as they pass through the system. It is often convenient to filter continuous-time signals through a digital filter as shown in Fig. 29.4. The analog-to-digital converter (ADC) samples the continuous-time signal creating a sequence of discretetime signals for processing by the computer or digital signal processing board. The filtered signal can be stored digitally for further study or it can be sent through a digital-to-analog converter (DAC). The digital filter can be implemented in software by a recursive equation obtained from the difference equation. Consider a digital filter with transfer function: N N−1 −1 −N b 1 z + b 2 z + … + b N+1 b 1 + b 2 z + … + b N+1 z - = ----------------------------------------------------------H ( z ) = ----------------------------------------------------------N N−1 −1 −N a 1 z + a 2 z + … + a N+1 a 1 + a 2 z + … + a N+1 z
The recursion used to calculate the current value of the output y[n] is given by the difference equation:
1 y [ n ] = ---- ( b 1 x [ n ] + b 2 x [ n – 1 ] + … + b N+1 x [ n – N ] – a 2 y [ n – 1 ] – … – a N+1 y [ n – N ] ) (29.5) a1 Notice that the past values of y and x must be stored for use in the recursion. Now consider the impulse response of a digital filter, where y[n] is calculated for an input x[n] equal to an impulse (i.e., δ[n] = 1 when n = 0 and δ[n] = 0 otherwise). The recursion shown above results in a response for y[n] that has infinite duration (i.e., there is no value of M so that y[n] = 0 for all n > M). This type of filter is called an infinite impulse response (IIR) filter.
Analog to Digital Converter (ADC)
FIGURE 29.4
Computer or Digital Signal Processing (DSP) Board
Configuration for standard digital signal processing hardware.
©2002 CRC Press LLC
Digital to Analog Converter (DAC)
0066-frame-C29 Page 9 Wednesday, January 9, 2002 7:23 PM
Now consider the case where the coefficients of the filter am = 0 for m > 1. The resulting expression for y[n] from Eq. (29.5) would no longer be recursive since it would depend only on present and past values of x, and not on past values of y. As a result, the impulse response would have duration N. This type of filter is called a finite impulse response (FIR) filter. FIR filters are sometimes preferred over IIR filters since they have linear phase in the frequency response. Linear phase means that the angle of the frequency response is given by −θ Ω, where θ is a constant. This corresponds to a delay in the time domain. Design methods for both types of filters are described in the next two sections.
IIR Filter Design The two methods for designing IIR filters are termed analog emulation (or indirect design) and direct design. Analog emulation involves designing an analog filter first and then using one of the mapping techniques described in the section “s-Plane to z-Plane Mappings” to convert it to a digital filter. This method has advantages in that there is a wealth of design techniques for analog filters that can be used in digital filter design. Direct design methods generally involve numerical techniques, and they are often preferred over analog emulation when the sampling period is not very small. Direct design is beyond the scope of this handbook; consult reference [2] for more information on the topic. Analog filter design begins by selecting a bandwidth, a prototype of filter, and an order of the filter. Additional specifications may be set on the amount of ripple that is allowed in the passband or stopband. Two common analog prototypes are the Butterworth filters and the Chebyshev filters. Butterworth filter: The Butterworth filter is characterized by having no zeros and having poles that are situated on a semicircle in the left-half of the s-plane. The distance of the poles to the origin is the bandwidth frequency and is denoted as ωb. The angle of the poles can be determined by equally spacing out twice the number of poles around a full circle with radius ωb and then keeping only the poles in the left-half plane, as shown in Fig. 29.5. An Nth order Butterworth filter is given by N
wb H ( s ) = -----------------------------∏k ( s – wb pk ) where
+1 3N – 1 e jkp/N , k = N ------------- to ---------------- for N odd 2 2 pk = 3N – 2 e j ( k+0.5 )p/N , k = N ---- to ---------------- for N even 2 2 jw
s
FIGURE 29.5
Pole distribution of a fourth-order Butterworth filter.
©2002 CRC Press LLC
0066-frame-C29 Page 10 Wednesday, January 9, 2002 7:23 PM
1.5
Magnitude
2 pole 5 pole
1
10 pole
0.5
0 0
0.2
0.4
0.6
0.8
1 w
1.2
1.4
1.6
1.8
2
0.2
0.4
0.6
0.8
1 w
1.2
1.4
1.6
1.8
2
Angle (degrees)
0 -200 -400 -600 -800 0
FIGURE 29.6
Comparison of analog Butterworth filters.
This filter is lowpass in that the magnitude of the frequency response is reasonably flat and close to a value of 1 for w < ω b and drops off sharply beyond the bandwidth frequency. The larger the order of the filter, the sharper the drop off. Three filters are compared in Fig. 29.6. Notice that the sharp transitions offered by the larger order filters do come with a price: the phase is also decreased dramatically. The phasing becomes important in real-time measurement systems such as that required by feedback controllers. Chebyshev filter: Unlike the monotonic behavior of the Butterworth filter, the Chebyshev filter allows some ripple in the magnitude plot for either the passband or the stopband. The Type 1 Chebyshev filter allows for ripple in the passband while the Type 2 Chebyshev filter allows for ripple in the stopband. Allowing for a ripple results in the Chebyshev filters having sharper transitions near the bandwidth than are achievable by a Butterworth filter of the same order. In Chebyshev design, the cutoff frequency ωc is usually specified as opposed to the bandwidth. The cutoff frequency is the frequency at which the magnitude of the filter decays to a preset ratio of the DC value. When this ratio is 0.707, the cutoff frequency is the bandwidth. Often, in Chebyshev design, this ratio is chosen to correspond to the amount of ripple allowed in the passband. A Type 1 Chebyshev lowpass filter is defined by the relationships:
1 |H (w )| = -----------------------------------------2 2 1 + e CN (w /w c ) and
C N ( x ) = 2xC N−1 ( x ) – C N−2 ( x ) The CN(x) expression is called the Nth order Chebyshev polynomial, and it is calculated recursively starting with C0(x) = 1 and C1(x) = x. The value of ε > 0 determines the amount of ripple allowed in the 2 passband; in particular, the ripple exists between the values of 1 and 1/ 1 + e . Consider, for example, the Type 1 Chebyshev filters shown in Fig. 29.7; these filters were designed to have 1 dB of ripple in the passband (ε = 0.51). Note that ε = 1 for 3 dB of ripple. As mentioned above, these prototype filters are lowpass. To design another type of filter, first the lowpass filter is designed, H(s), with a cutoff frequency ω c (typically chosen to be 1). Then a frequency transformation is used to convert the filter to the desired type. The standard frequency transformations are given below. Lowpass to lowpass: To obtain a lowpass filter with cutoff frequency ω1, replace s in the original H(s) by sωc /ω1. ©2002 CRC Press LLC
0066-frame-C29 Page 11 Wednesday, January 9, 2002 7:23 PM
1.5
Magnitude
2 pole 5 pole
1
10 pole
0.5
0 0
0.2
0.4
0.6
0.8
1 w
1.2
1.4
1.6
1.8
2
0.2
0.4
0.6
0.8
1 w
1.2
1.4
1.6
1.8
2
0 Angle (degrees)
-200 -400 -600 -800 -1000 0
FIGURE 29.7
Comparison of analog Type I Chebyshev filters.
Lowpass to highpass: To obtain a highpass filter with a passband running from ω1 to ∞, replace s in the original H(s) by ω1ωc /s. Lowpass to bandpass: To obtain a bandpass filter with a passband running from ω1 to ω 2, replace s in the original H(s) by
s + w2 w1 ------------------------. s ( w2 – w1 ) 2
Lowpass to bandstop: To obtain a bandstop filter with stopband running from ω 1 to ω 2, replace s in the original H(s) by
s ( w2 – w1 ) ------------------------. 2 s + w2 w1
FIR Filter Design One way to obtain an FIR filter is to truncate the impulse response of an ideal IIR filter. For example, an ideal IIR lowpass filter has the frequency response:
A, −Ω c ≤ Ω ≤ Ω c H(Ω) = 0, otherwise where A is a constant and Ωc is the cutoff frequency. The impulse response of this filter is found from taking the inverse DTFT using Eq. (29.3):
AΩ jnΩ /2 Ω c n h [ n ] = ----------c e c sinc ------- p p Notice that this has infinite duration for both n < 0 and n > 0. Creating an FIR filter would entail truncating the impulse response for n < −N and for n > N. However, the original IIR filter and the resulting truncated FIR filter are both noncausal; that is, the impulse response is nonzero for n < 0. ©2002 CRC Press LLC
0066-frame-C29 Page 12 Wednesday, January 9, 2002 7:23 PM
Noncausal filters need future values of the input in order to calculate the present value of the output; hence, they cannot be implemented in real-time. For this reason, typical IIR design uses nonideal filters (often based on analog prototypes) that approximate the ideal frequency response. When filtering a signal off-line that has been stored, causality is no longer required since all of the values of the signal are available (including “future” values). In order to perform real-time implementation of an FIR filter that was generated by truncating an ideal IIR filter, the filter must be delayed so that all of the significant information of the impulse response occurs for n ≥ 0. This delay in the time domain is equivalent to a linear phase lag in the frequency domain. Thus, an FIR filter can be designed by first selecting an ideal IIR filter (lowpass, highpass, etc.), then taking the inverse DTFT to find the impulse response, and then truncating the impulse response, and finally, delaying it in time. An equivalent and more preferred method is to rearrange the steps described above. First, add a phase lag in the frequency response of the ideal IIR filter. This is done by multiplying the j(N − 1)/2 . Then, take the inverse DTFT and truncate it for n < 0 and n > N − 1. The frequency response by e result is a causal FIR filter with order N. The following are generic FIR filters of order N that have been generated using the method described above. Let m = (N − 1)/2. Lowpass FIR filter with cutoff frequency Ωc :
Ω ------c , n = 0 p h [ n ] = Ωc Ωc ( n – m ) - , for 0 < n ≤ N – 1 - sinc ----------------------- ----p p 0, otherwise where sinc(x) = sin(π x)/π x. Highpass FIR filter with passband from Ω1:
Ω1 1 – ------, for n = 0 p h [ n ] = Ω1 Ω1 ( n – m ) - 0, for 0 < n ≤ N – 1 -sinc ----------------------- − ----p p 0, otherwise Bandpass FIR filter with passband from Ω1 to Ω2: 2 – Ω1 Ω ------------------ , for N = 0 p h [ n ] = Ω2 Ω - sinc [ Ω 2 ( n – m ) /p ] – ------1 sin [ Ω 1 ( n – m ) /p ] , for 0 < n ≤ N – 1 ----p p 0, otherwise
To implement these filters, the coefficients in Eq. (29.5) are set to bm = h[m − 1], a1 = 1, and am = 0 for m > 1. The FIR filters designed using this method have frequency responses that have rather sharp transitions between the passband and the stopband (the larger the order, the sharper the transition), but they tend to give rise to a ripple in the passband and stopband. This ripple results from the sharp truncation of the IIR filter’s impulse response. A more gradual truncation using a window can be performed that smooths the ripple in the frequency response. The windows discussed in the section “s-Plane to z-Plane Mappings” ©2002 CRC Press LLC
0066-frame-C29 Page 13 Wednesday, January 9, 2002 7:23 PM
that are employed in data collection are also used in FIR filter design, where the modified filter is given as h[n]w[n]. FIR design using different windows is discussed in further detail in [1,2].
Computer-Aided Design of Digital Filters TM
Matlab is a common software package for signal processing analysis and design. The signal processing toolbox contains several commands for designing and simulating digital filters. For example, the commands butter and cheby1 automatically design a prototype analog filter for an IIR and then use the bilinear transformation to map the filter to the discrete-time domain. Lowpass, highpass, bandstop, and bandpass filters can be designed using these commands as long as the digital cutoff frequencies, normalized by π, are specified. To design a digital lowpass filter based on the analog Butterworth filter with cutoff frequency w1, use the command [b, a] = butter(N, w1∗T/pi) where N is the number of poles, T is the sampling period, and w1∗T is digital cutoff frequency. This command puts the coefficients of the filter, defined in Eq. (29.5), in vectors b and a in ascending order. To design a digital highpass filter with analog cutoff frequency w1, use the commands [b, a] = butter(N, w1∗T/pi, ‘high’). To design a digital bandpass filter with analog passband from w1 to w2, define w = [w1, w2] and use the command [b, a] = butter (N, w ∗T/pi). To design a digital bandstop filter with stopband from w1 to w2, define w = [w1, w2] and use the command [b, a] = butter(N, w ∗T/pi, ‘stop’). The design for an Nth order Type I Chebyshev filter is accomplished using the same methods as for butter except that “butter” is replaced by “cheby1.” The signal processing toolbox also provides commands for designing FIR filters. To obtain a lowpass FIR filter with length N and analog cutoff frequency w1, use the command h = fir1(N − 1, w1∗T/pi). The resulting vector h contains the impulse response of the FIR where h(1) is the value of h[0]. The values in the vector h also equal the coefficients of b in Eq. (29.5) in ascending order. (Recall, that a1 = 1 and am = 0 for m > 1.) A length N highpass FIR filter with analog cutoff frequency w1 is designed by using the command h = fir1(N − 1, w1∗T/pi, ‘high’). A bandpass FIR filter with passband from w1 to w2 is obtained by typing h = fir1(N − 1, w ∗T/pi) where w = [w1, w2]. A bandstop FIR filter with stopband from w1 to w2 is obtained by typing h = fir1(N − 1, w ∗T/pi, ‘stop’) where w = [w1, w2]. The fir1 command uses the Hamming window by default. Other windows are obtained by adding an option of “hanning” or “boxcar” (which is the rectangular window) to the arguments; for example, h = fir1(N − 1, w1∗T/ pi, ‘high,’ boxcar(N)) creates a highpass FIR filter with analog cutoff frequency w1 using a rectangular window. The filter command in Matlab is used to compute an output of a digital filter given its input sequence. An example of its use is y = filter(b, a, x) where b and a are the coefficients of the filter and x is the input sequence.
Filtering Examples Quite often, 60 Hz noise is encountered in measurements of electromechanical systems due to standard line voltage. (Note, in Europe noise at a 50-Hz frequency is typically encountered.) For demonstration purposes, a 60-Hz signal is superimposed on a lower frequency signal shown in Fig. 29.8. To alleviate the detrimental effects of the 60-Hz noise, a bandstop filter may be employed. Typically, most systems 1.5
Raw Data
1 0.5 0 -0.5 0
FIGURE 29.8
0.2
0.4
0.6
0.8
1 Time (s)
Measurement corrupted with 60-Hz noise.
©2002 CRC Press LLC
1.2
1.4
1.6
1.8
2
0066-frame-C29 Page 14 Wednesday, January 9, 2002 7:23 PM
Magnitude
1.5
1
0.5
0
FIGURE 29.9
-3
-2
-1
0 Ω
1
2
3
Bandstop filter.
Filtered Data
1.5 1 0.5 0 -0.5 0
FIGURE 29.10
0.2
0.4
0.6
0.8
1 Time (s)
1.2
1.4
1.6
1.8
2
Filtered measurement.
have a bandstop filter designed around 60 Hz to avoid the type of response seen in Fig. 29.8. The following Matlab commands can be employed to design an eighth-order digital Butterworth bandstop filter whose break frequencies are 50 and 70 Hz. Thus, the filter should reject the 60-Hz noise. T = 0.001; %Sample period n = 4; % half the order of filter low_freq = 50 * (2*pi); %Stop signals between 50 and 70 Hz high_freq = 70 * (2*pi); w1 = low_freq*(T/pi); % normalized digital break frequencies w2 = high_freq*(T/pi); w = [w1 w2]; [b,a] = butter(n,w,‘stop’); % filter coefficients W = -pi:pi/200:pi; % define a digital frequency vector H = freqz(b,a,W); % computes the frequency response for plotting Figure 29.9 shows the magnitude of the frequency response for the resulting IIR filter. Note that the frequency variable is plotted for the range [−π, π] where DC frequency corresponds to Ω = 0 and the highest frequency allowable is Ω = π. In this example, the digital break frequencies correspond to Ω1 = 50(2π)T = 0.314 and Ω2 = 70(2π)T = 0.44. Figure 29.10 shows the result of applying this filter to the noisy signal. For all practical purposes, the 60-Hz noise is completely attenuated. As can be seen in Fig. 29.10, there are some initial system transients during the first 100 ms of the step response. This is a combination of the fourthorder Butterworth filter and the initial system transients to the 60-Hz signal. It should be noted that the sample frequency of 1000 kHz is fast enough to accurately capture the 60-Hz signal. If a sample frequency of less than 120 Hz is used, the 60-Hz signal will be aliased, and no amount of digital filtering would be able to eliminate the effects of the 60-Hz disturbance. Another application of digital filtering in mechatronics is used when estimating displacement from an acceleration measurement. A simplistic approach to calculating the displacement is to integrate the accel2 eration twice. In the s-domain, this double integration is equivalent to multiplying by 1/s . Using the ©2002 CRC Press LLC
0066-frame-C29 Page 15 Wednesday, January 9, 2002 7:23 PM
5
Acceleration
1
x 10
0.5 0 -0.5 -1 0
FIGURE 29.11
0.1
0.2
0.3 Time (s)
0.4
0.5
0.6
0.3 Time (s)
0.4
0.5
0.6
0.3 Time (s)
0.4
0.5
0.6
Acceleration measurement.
Displacement
2 1 0 -1 -2 0
0 -50 -100 -150 -200 0
FIGURE 29.13
0.2
Actual displacement.
Estimated Displacement
FIGURE 29.12
0.1
0.1
0.2
Estimated displacement without use of a prefilter. 2
bilinear transformation to convert 1/s to the z-domain yields the following transfer function,
H ( z ) = H ( s )|
2 ( z −1 ) s= -----------------T ( z +1 )
1 = ---2 s
2
2 ( z −1 ) s= -----------------T ( z +1 )
−1
−2
T 1 + 2z + z T z 2 + 2z + 1 - = ----- ------------------------------= ------ ----------------------- 4 z 2 – 2z + 1 4 1 – 2z −1 + z −2 2
The corresponding difference equation used to calculate the displacement y[•] from the acceleration 2 ydd[•] is 4(y[n] − 2y[n − 1] + y[n − 2]) = T (ydd[n] + 2ydd[n − 1] + ydd[n − 2]). However, accelerometers generally do not have good response at low frequencies; in fact, they often insert a bias in the data yielding a drift in the calculated displacement. They also are very sensitive to random vibrations. An alternate approach is to process the acceleration data through a bandpass filter before using the difference equation to integrate it numerically. The bandpass range must contain the natural frequencies in the system. Consider, for example, the acceleration data shown in Fig. 29.11, which has some random noise. This signal is sampled at a rate of 6400 Hz, where the natural frequency of the system is 50 Hz. Figure 29.12 shows the actual displacement, while Fig. 29.13 shows the estimated displacement calculated by numerically integrating the acceleration data, using the difference equation given above. This estimation is very poor. Alternatively, an analog eighth-order Chebyshev Type I bandpass filter with passband 25–500 Hz ©2002 CRC Press LLC
Estimated Displacement
0066-frame-C29 Page 16 Wednesday, January 9, 2002 7:23 PM
2 1 0 -1 -2 0
0.3 Time (s)
0.4
0.5
0.6
0.4
0.5
0.6
2 1 0 -1 -2 0
FIGURE 29.15
0.2
Estimated displacement with IIR prefilter. Estimated Displacement
FIGURE 29.14
0.1
0.1
0.2
0.3 Time (s)
Estimated displacement with FIR prefilter. 1.5
Magnitude
Magnitude
1.5
1
0.5
0
1
0.5
0
-2
0 Ω
2
-2
(a)
FIGURE 29.16
0 Ω
2
(b)
Digital bandpass filters: (a) Chebyshev IIR and (b) FIR filter.
is designed and then discretized using the bilinear transformation. The acceleration data is processed through this filter first, and then the filtered data are numerically integrated with the result shown in Fig. 29.14. Notice that the estimate is much better than that obtained without the bandpass filter. A 500th order FIR bandpass is also designed for this example with passband 25–500 Hz. After passing the data through the FIR filter, it is then numerically integrated resulting in the estimated displacement shown in Fig. 29.15. Due to the linear phase characteristic of the FIR filter, it has less transient distortion than the IIR filter, but it adds a larger lag. The larger the order, the more accurate the result, since less significant information is lost in truncating the impulse response of the ideal IIR bandpass filter, but the lag is larger. The magnitudes of the IIR filter and the FIR bandpass filters are shown in Fig. 29.16. Two observations on this example should be mentioned: 1. The unfiltered calculation was extremely sensitive to bias in the data (as expected from the double integration). Therefore, the bias was removed from the acceleration before processing. Both filters effectively removed bias, so the results were virtually unchanged if the bias was present. 2. The FIR filter shows some drift. Presumably, the cause of the drift is that the filter seems to have some difficulty with the small stopband region near the origin. Increasing the stopband region ©2002 CRC Press LLC
0066-frame-C29 Page 17 Wednesday, January 9, 2002 7:23 PM
does reduce the drift. This can be done by decreasing the sample frequency or by increasing the passband frequency. Both of these remedies decrease the drift but increase other errors in the signal. Increasing the length of the filter decreases the drift error without introducing other errors. Some of the Matlab commands used to design the filters and generate the results are: [num,den] = c2dm(1,[1 0 0],T,‘tustin’); %digitize 1/s^2 y1 = filter(num,den,ydd); % double integration of ydd Wbreak = [2*pi*25*T, 2*pi*500*T}; % digital break frequencies [b,a] = cheby1(4,1,Wbreak); % design IIR filter with 1dB ripple W = -pi:pi/200:pi; % define digital frequency range for plot H = freqz(b,a,W); % get frequency response plot(W,abs(H)); % plot magnitude of frequency response yddfilt = filter(b,a,ydd); % calculate output of IIR filter y2 = filter(num,den,yddfilt); % double integration of yddfilt hfir = fir1(500,Wbreak); % design FIR filter of order 500 yddfilt = filter(hfir,1,ydd); % calculate output of FIR filter y3 = filter(num,den,yddfilt); % double integration of yddfilt
29.5 Digital Control Design As in the digital filter design case, there are two general methods for designing a digital controller: an indirect method that is based on discretizing an analog design, and a direct method that is based on discretizing a plant (usually using the step-response matching method) and then designing the controller directly in the discrete domain. Most engineers learn classical continuous-time controls, and it is common for them to have more training in continuous-time control design than in discrete-time or digital control design. Fortunately, continuous-time control tools can often be used when designing digital control systems. To make use of controllers designed in the continuous-time domain, an s-plane to z-plane mapping is used. Any of the mappings discussed in this chapter can be used for a variety of controllers. It is always best to determine the mapping that is most efficient for a particular control or filter. Even though the bilinear approximation is more complex than the forward or backward approximations, it is used for most mechatronic systems. This is due to the fact that most modern controllers have enough computational power to manage the increased complexity at the required bandwidth of the mechatronic system. As an example of the indirect design method, consider a PD (proportional derivative) controller that may be used to enhance the performance of a system. The derivative and proportional gains for the controller are Kd and Kp, respectively. The PD controller, K(s), is given by
K ( s ) = Kd s + Kp .
(29.6)
Equation (29.6) can be implemented digitally using any of the s-plane to z-plane mappings discussed earlier in this chapter. As an example, the bilinear transformation is used generating the digital controller, K(z).
K ( z ) = K ( s )|
2 ( z −1 ) s= -----------------T ( z +1 )
( 2K d + TK p )z + ( TK p − 2K d ) = --------------------------------------------------------------------Tz + T
(29.7)
Besides the control gains, the only factor that is needed for Eq. (29.7) is T, the sample time. As previously stated, the sample time should be at least a factor of 5–10 times the fastest system time constant. ©2002 CRC Press LLC
0066-frame-C29 Page 18 Wednesday, January 9, 2002 7:23 PM
However, sampling times are often chosen to be several hundred times faster than the fastest system time constant. An alternative strategy for a feedback system is to choose the sample rate to be at least 20 times the desired closed loop bandwidth. Having sampling times that are substantially faster than the actual system mitigates any differences between the controller as it is designed in the continuous domain and the implementation in the discrete domain. It should be noted that as the sampling frequency becomes higher, the control gains become smaller. For example, in Eq. (29.7), as the sampling time becomes smaller, T becomes smaller requiring better numerical resolution for the controller gains. If T becomes smaller than the controller’s numerical gain resolution, it may be erroneously implemented at a value of 0 (zero) yielding an incorrect control law.
Digital Control Example Consider a high speed position motor with motor dynamics governed by the first-order equation
Km w(s) G ( s ) = -------------- = ----------------Tm s + 1 V in ( s ) where Km is the motor gain constant, Tm is the motor time constant, ω(s) is the Laplace transform of the motor velocity, and Vin(s) is the Laplace transform of the motor input voltage. To determine the values of Tm and Km, the velocity step response of the motor is used. Figure 29.17 is the response of the motor to a 1-V step input. The motor gain, Km, is the steady-state value of the final motor speed and is 5. This result can also be determined using the Final Value Theorem as
limw ( t ) = lim sw ( s ) = lim sG ( s )V in ( s ) t→∞
s→0
s→0
Km 1 1 - -- = K m = lim sG ( s ) -- = lim s ----------------s s→0 s→0 T m s + 1 s The motor time constant, Tm, can be computed by determining the motor velocity for the step response at time t = Tm as follows:
w (t = T m ) = K m ( 1 – e
−t/Tm
−1
) = K m ( 1 – e ) = 0.632K m
So the time required for the motor to reach 63.2% of its steady-state step response is its time constant. From Fig. 29.18, the time constant of this motor is 0.05 s. Thus, the transfer function for the motor is given by
Km w(s) 5 - = --------------------G ( s ) = -------------- = ----------------V in ( s ) Tm s + 1 0.05s + 1
(29.8)
Motor Velocity (deg/s)
5 4 3 2 1 0 0
FIGURE 29.17
0.05
0.1
Motor velocity step response.
©2002 CRC Press LLC
0.15 0.2 Time (s)
0.25
0.3
0.35
0066-frame-C29 Page 19 Wednesday, January 9, 2002 7:23 PM
Motor Position (deg)
10 8 6 4 2 0 0
FIGURE 29.18
0.2
0.4
0.6 0.8 Time (s)
1
1.2
1.4
Closed-loop position response.
For this example, the motor is used in position control mode. Since the motor position is the integral of its velocity, Eq. (29.8) can be augmented with an integrator to generate the transfer function of the motor relating the input voltage to the output position, θ(s):
Km q(s) G p ( s ) = -------------- = -----------------------V in ( s ) s ( Tm s + 1 )
(29.9)
A PD controller is chosen for use in this example in order to enhance the system performance. To achieve a fast response with no overshoot, the derivative gain, Kd, and the proportional gain, Kp, are chosen to be 0.05 and 1, respectively, yielding the following control law:
K ( s ) = K d s + K p = 0.05s + 1
(29.10)
Nominally, this design cancels the high frequency pole of the motor dynamics given in Eq. (29.9). A sample period of 1 ms is chosen for this example as it is significantly faster than the system’s time constants, and it is not an unreasonable value given modern digital controllers. As previously discussed, using a 1-kHz (1 ms) sample frequency mitigates any differences between the controller as it is designed in the continuous domain and its implementation is in the discrete domain. Using the bilinear transformation given in the section “s-Plane to z-Plane Mappings” results in a digital controller of the form:
101z – 99 K D ( z ) = ----------------------z+1 In fact, the closed-loop response of the system using the digital controller cannot be easily distinguished from that of the system using the analog controller given by Eq. (29.10). The closed-loop position response of the motor for a 10° command input is shown in Fig. 29.18. As mentioned in section the “Filtering Examples,” 60 Hz noise is often present in measurements of electro-mechanical systems, so a bandstop filter is often used to attenuate the noise. In the closed-loop operation, the digital bandpass filter is cascaded with the digital PD controller.
References 1. Kamen, E.W., and Heck, B.S., Signals and Systems Using the Web and Matlab, 2nd ed., Prentice-Hall, Englewood Cliffs, NJ, 2000. 2. Britton Rorabaugh, C., Digital Filter Designer’s Handbook: with C++ Algorithms, 2nd ed., McGraw-Hill, New York, 1997.
©2002 CRC Press LLC
0066_Frame_C30 Page 1 Thursday, January 10, 2002 4:43 PM
30 Control System Design 2 Via H Optimization 30.1 30.2
Introduction General Control System Design Framework Central Idea: Design Via Optimization • The 2 Signals • General H Optimization Problem • Generalized Plant • Closed Loop Transfer Function 2 Matrices • Overview of H Optimization Problems to Be Considered
30.3
2
H Output Feedback Problem Hamiltonian Matrices
30.4
2
H State Feedback Problem Generalized Plant Structure for State Feedback • State Feedback Assumptions
30.5
Generalized Plant Structure for Output Injection • Output Injection Assumptions
Armando A. Rodriguez Arizona State University
2
H Output Injection Problem
30.6
Summary
30.1 Introduction 2
This chapter addresses control system design via H (quadratic) optimization. A unifying framework based on the concept of a generalized plant and weighted optimization permits designers to address state feedback, state estimation, dynamic output feedback, and more general structures in a similar fashion. The framework permits one to easily incorporate design parameters and/or weighting functions that may be used to influence the outcome of the optimization, satisfy desired design specifications, and systematize the design process. Optimal solutions are obtained via well-known Riccati equations; e.g., Control Algebraic Riccati Equation (CARE) and Filter Algebraic Riccati Equation (FARE). While dynamic weighting functions increase the dimension of the Riccati equations being solved, solutions are readily obtained using today’s computer-aided design software (e.g., MATLAB, robust control toolbox, µ-synthesis toolbox, etc.). 2 In short, H optimization generalizes all of the well-known quadratic control and filter design methodologies: • Linear Quadratic Regulator (LQR) design methodology [7,11], • Kalman–Bucy Filter (KBF) design methodology [5,6], • Linear Quadratic Gaussian (LQG) design methodology [4,10,11]. 2
H optimization may be used to systematically design constant gain state feedback control laws, state estimators, dynamic output controllers, and much more.
©2002 CRC Press LLC
0066_Frame_C30 Page 2 Thursday, January 10, 2002 4:43 PM
FIGURE 30.1
Generalized feedback system.
30.2 General Control System Design Framework In this section, we present a general framework for control system (and estimator) design. Toward this end, we consider the generalized feedback system in Fig. 30.1. In this figure, G represents a generalized plant. G contains a model for the actual plant P (physical system) to be controlled. It may also contain additional (frequency dependent) weighting functions that are used to address closed loop design objectives. K represents a controller or compensator to be designed.
Central Idea: Design Via Optimization The central idea here is that many important problems that arise in controls, estimation, filtering, and other areas of engineering may be cast in terms of a generalized plant G and a controller K to be designed 2 by minimizing some norm (e.g., H ) on the closed loop transfer function matrix Twz from the signals w to the signals z.
The Signals To appreciate the flexibility of our generalized feedback system structure, it suffices to consider the nature of the signals z, u, w, and y in the figure. These signals may be described as follows: nz
• Regulated Signals. The signals z ∈ R represent regulated signals or signals that we would like to keep “small” in some sense, which depends on the application and desired performance objectives. Such signals might include tracking errors, actuator or control inputs, signal estimation errors, etc. nu • Control Signals. The signals u ∈ R represent control signals or manipulated variables that are generated by the controller K. Control signals might include fuel flow to an engine, voltage applied to a dc motor, etc. They might also include state estimates provided by K. The idea is for K to manipulate and coordinate control signals u in a manner which keeps the regulated signals z “small.” In practice, we typically have more signals that require “regulation” than controls (i.e., nz ≥ nu). It should be noted, however, that generally if we want to independently control m quantities, then we need at least m independent controls. This basic tenet must be adhered to in practice. The more independent controls u that are available, the easier (in principle) it is to influence the signals z to be regulated. nw • Exogenous Signals. The signals w ∈ R represent exogenous (or external) signals that act upon the system. Exogenous signals may include reference commands issued to the control system, disturbances acting on the system, sensor noise, etc.
©2002 CRC Press LLC
0066_Frame_C30 Page 3 Thursday, January 10, 2002 4:43 PM
ny
• Measurement Signals. The signals y ∈ R represent measurements or signals that are directly available to the controller K. Measurements may include a portion of or all of the plant state variables, measurable plant “outputs,” measurable control signals, measurable exogenous signals, etc. In practice, we typically have more exogenous signals than measurements (i.e., nw ≥ ny). Generally, the more independent measurements we have the better—since, in theory, more useful information can be extracted. Comment 30.1 (Toward a Separation Principle) It is natural to associate the controls u with the regulated signals z. One might argue that the pair implicitly defines a regulation or control problem. This is analogous to the situation addressed in classical LQR problems. In such problems, one trades off control action (size) versus speed of regulation. Similarly, it is natural to associate the exogenous signals w with the measurements y. One might argue that the pair implicitly defines an information extraction or estimation problem. This is analogous to the situation addressed in classical KBF problems. In such problems, one trades off sensor cost (or immunity to noise) versus speed of estimate construction. Such associations suggest that just as in classical LQG problems, our surprisingly general structure 2 may give rise to a natural separation principle. Indeed, this will be the case for the so-called H output feedback problem that we consider. 2
General H Optimization Problem 2
The so-called general H optimization problem may be stated as follows: • Find a proper real-rational (finite dimensional) controller K that internally stabilizes G such that 2 the H norm of the closed loop system transfer function matrix Twz(K ) is minimized:
min ||T wz ( K )|| H 2
(30.1)
K
where
||F|| H 2 =
def
=
1 -----2p
∫
∞
∫
∞
–∞
trace { F ( j ω )F ( jw ) } dw H
trace { f ( t )f ( t ) } dt H
(30.2)
(30.3)
0
= || f ||L 2 ( R
+)
(30.4)
and f is the impulse response matrix associated with the transfer function matrix F. Comment 30.2 (Use of Two Norm: Wide Band Exogenous Signals) Noting that the two norm measures the energy of the response to an impulse and noting that the transform of unit Dirac delta function δ is unity, it follows that the two norm is appropriate when the exogenous signals w are wide band in nature. This can always be justified by introducing appropriate (low pass) filters within G. It should be noted that these ideas have stochastic interpretations as well. Instead of unit delta functions, one instead deals with white noise with unit intensity. Comment 30.3 (Control and Estimation Problems) 2
Although we are seeking an H optimal controller, it must be noted that the generalized plant framework will enable the design of state estimators as well as dynamic and constant gain control laws. Given the above problem statement, it is appropriate to recall the following elementary result:
©2002 CRC Press LLC
0066_Frame_C30 Page 4 Thursday, January 10, 2002 4:43 PM
Lemma 30.1 (Two Norm of a Stable System) Consider a causal stable LTI strictly proper system F = [A, B, C]. It follows that
||F|| H 2 = ||f || L2 ( R+ ) =
CL c C
=
H
H
B Lo B
(30.5)
where Lc is the system controllability gramian and Lo is the system observability gramian. The controllability gramian def
Lc =
∫
∞
H
At
H A t
e BB e
dt
(30.6)
0
is the unique symmetric (at least) positive semi-definite solution of the algebraic Lyapunov equation H
AL c + L c A + BB
H
= 0
(30.7)
Lc is positive definite if and only if (A, B) is controllable. The observability gramian def
Lo =
∫
∞
H
e
A t
H
At
C Ce dt
(30.8)
0
is the unique symmetric (at least) positive semi-definite solution of the algebraic Lyapunov equation H
H
A Lo + Lo A + C C = 0 Lo is positive definite if and only if (A, C) is observable.
(30.9)
∞
2
Comment 30.4 (H Norm May Mislead—L Norm Is Important) It is important to note that the H /L norm (or energy) of a function may be very small, while the function itself may be very large in amplitude. Consider a tall thin pulse, for example. This observation is critical because there are many important cases in which we are very concerned with the height of a function— more so than its energy. A good example of this comes from classical Nyquist stability theory [2,8]. Nyquist taught us that the peak magnitude of the sensitivity function S = 1/(1 + L) associated with a standard negative feedback loop is very important in terms of the feedback loop’s stability robustness. A large sensitivity means that the Nyquist plot comes close to the critical −1 point—implying that a small perturbation (or unanticipated modeling error) may cause the closed loop system to go unstable. To assist us with this fundamental issue we may use frequency dependent weighting functions, but what we ∞ ∞ really need is a norm that directly addresses such concerns. This motivates the so-called H and L ∞ ∞ norms as well as H /L control theory [4,11]. 2
2
2
Comment 30.5 (Computation of H Norm in MATLAB) The H norm of a system F = [A, B, C, D] may be computed using the following MATLAB command sequence: 2
lc = lyap (a, b∗b’) twonorm = sqrt (trace(c∗lc∗c’)) or
lo = lyap (a’, c∗c’) twonorm = sqrt (trace(b’∗lo∗b)). ©2002 CRC Press LLC
0066_Frame_C30 Page 5 Thursday, January 10, 2002 4:43 PM
Generalized Plant The generalized plant G is assumed to possess the following two-port state space structure:
G =
–1
D 21 ∈ R
B1
= C 1 0 nz ×nw
G 21 G 22
where G ij ( s ) = C i ( sI – A ) B j , A ∈R n u ×n z
A
G 11 G 12
C2 , B 1 ∈R
n×n
D 21 n×n w
B2
= A B C D
D 12 0 ny ×nu
, B2 ∈R
n×n u
, C1 ∈R
n z ×n
, C 2 ∈R
(30.10)
n y ×n
, D 12 ∈R
n z ×n u
,
.
Comment 30.6 (Weighting Functions: Satisfying Closed Loop Design Specifications) As stated earlier, the generalized plant G may contain frequency dependent weighting functions as well as a model for the physical system P (plant) being controlled. Typically P = G22 = [A, B2, C2]. Weighting functions within G may be viewed as design parameters (mathematical knobs) that may be manipulated 3 by a designer to influence the H problem in a manner which results in a controller that is not just optimal—a notion that is often irrelevant in practical applications—but which satisfies desired closed loop design specifications. Weighting functions may be used to weight (penalize) tracking errors, actuator and other signal levels, state estimation errors, etc. By making the weight on a signal large in a specific frequency range, we are indirectly telling the optimization problem to find a controller that makes the signal small in that frequency range. By making the weight on a signal small in a specific frequency range, we are indirectly conveying our willingness to tolerate a signal which is large in that frequency range. This idea can be illustrated via example. Comment 30.7 (D11 = 0 Necessary, D22 = 0 Not Necessary) D11 = 0 Necessary. Note that we have assumed that D11 = 0; i.e., there is no direct path from the exogenous 2 signals w to the regulated signals z. This assumption is essential for the H norm of the closed loop 2 transfer function Twz to be finite. If D11 ≠ 0, then T wz 2 will be infinite and the H problem will be H ill-posed; i.e., make no sense. If we have a nonzero D11, adding strictly proper filters on either w or z (e.g., [1000/(s + 1000)]I) will result in D11 = 0. In this sense, the assumption is not restrictive. D22 = 0 Not Necessary. It has also been assumed that D22 = 0; i.e., the transfer function matrix D22 from controls u to measurements y is strictly proper. This assumption is very realistic since G22 (our plant P) is typically strictly proper in practice. If not, high frequency dynamics (e.g., actuator dynamics, flexible modes, parasitics, etc.) may be included to make it strictly proper. One might even include a simple high bandwidth low pass filter (e.g., 1000/(s + 1000)) to make G22 strictly proper. If this is not desirable because of the increased dimension, there is an alternative that does not increase the dimension of G.
ˆ with D ˆ 22 = 0. The term • One can always remove D22 from G22 to obtain a new generalized plant G ˆ by noting that u is related to y as follows: D22 is then absorbed into an augmented controller K −1
u = K[y + D22u] = [I − KD22] Ky
(30.11)
ˆ , is given by Noting this, it follows that the augmented controller, denoted K –1 Kˆ = [ I – KD 22 ] K
(30.12)
ˆ and Kˆ (without regard to D ). When the optimal The H problem can then be carried out for G 22 ˆ for G ˆ is obtained, one can compute the optimal controller K for G using the relationship controller K 2
–1 K = Kˆ [ I + D 22 Kˆ ]
With this stated, the assumption D22 = 0 is made without any loss of generality. ©2002 CRC Press LLC
(30.13)
0066_Frame_C30 Page 6 Thursday, January 10, 2002 4:43 PM
Closed Loop Transfer Function Matrices Given the structure for the generalized plant G, we have the following closed loop relationships:
u = Ky
(30.14)
= K ( G 21 w + G 22 u )
(30.15)
= [ I – KG 22 ] KG 21 w
(30.16)
= K [ I – G 22 K ] G 21 w
(30.17)
–1
–1
y = [ I – G 22 K ] G 21 w –1
(30.18)
z = G 11 w + G 12 u
(30.19) (30.20)
= G 11 w + G 12 Ky = [ G 11 + G 12 K [ I – G 22 K ] G 21 ]w –1
(30.21)
From this, we have the following closed loop transfer function matrices:
T wu = K [ I – G 22 K ] G 21
(30.22)
T wy = [ I – G 22 K ] G 21
(30.23)
–1
–1
T wz = G 11 + G 12 K [ I – G 22 K ] G 21 –1
(30.24)
We say that each of these is a linear fractional transformation (LFT) involving K. Comment 30.8 (Well Posedness of Closed Loop System) −l
In the above manipulation, it has been assumed that the inverse [I − G22K] is well defined. This well posedness condition is guaranteed by our assumption that D22 = 0. This assumption implies that G22(j∞) = D22 = 0 and hence that the inverse is well defined. 3 The following example shows how to formulate a so-called Weighted H Mixed Sensitivity Problem to address feedback control system design issues. 2
Example 30.1 (Weighted H Mixed Sensitivity Problem: Design Philosophy) This example considers the design of a controller K for a plant P = [Ap , Bp , Cp , Dp] as shown in Fig. 30.2. 2 To obtain K, we will formulate an H optimization that considers (directly or indirectly) various issues that are of importance in the design of a good feedback loop.
FIGURE 30.2
Standard negative feedback loop.
©2002 CRC Press LLC
0066_Frame_C30 Page 7 Thursday, January 10, 2002 4:43 PM
Feedback System Performance Issues. Generally, in designing a feedback controller K as shown in Fig. 30.2, a designer must consider each of the following closed loop performance issues: • Closed Loop Stability. The closed loop system should be stable. This involves all closed loop transfer function matrices since we generally want all of them to be stable. A stricly proper closed loop 2 transfer function matrix whose H norm is infinite, for example, implies that the transfer function matrix is unstable (or marginally stable). Stable strictly proper transfer function matrices neces3 sarily have a finite H norm. • Command Following. The closed loop system should exhibit good low frequency reference command following; i.e., the output y (not to be confused with generalized plant measurements) should track low frequency reference commands r that are issued to the feedback system. This typically requires that the sensitivity transfer function matrix def
S = [ I + PK ]
–1
(30.25)
be small at low frequencies. • Disturbance Attenuation. The closed loop system should exhibit good low frequency disturbance attenuation. For disturbances do modeled at the plant output, this requires that the sensitivity transfer function matrix be small at low frequencies. For disturbances di modeled at the plant input, this requires that def
T di y = SP
(30.26)
be small at low frequencies. • Sensor Noise Attenuation. The closed loop system should exhibit good high frequency noise n attenuation. This typically requires that the complementary sensitivity transfer function matrix def
T = I–S
(30.27)
be small at high frequencies. • Stability Robustness. The closed loop system should exhibit robustness with respect to high frequency unmodeled dynamics (e.g., flexible modes, parasitic dynamics, time delays, etc.); This typically requires that the “peak” of some closed loop transfer function matrix be small at high frequencies. • Multiplicative Modeling Error. For a plant modeled as
P act = [ I + ∆ ]P
(30.28)
where Pact represents the actual plant, P represents a nominal model, and ∆ represents a stable multiplicative perturbation at the plant output, the relevant closed loop transfer function matrix (that seen by ∆) is T. • Additive Modeling Error. For a plant modeled as
P act = P + ∆
©2002 CRC Press LLC
(30.29)
0066_Frame_C30 Page 8 Thursday, January 10, 2002 4:43 PM
FIGURE 30.3
Negative feedback system for weighted mixed sensitivity problem.
where Pact represents the actual plant, P represents a nominal model, and ∆ represents a stable additive perturbation, the relevant closed loop transfer function matrix (that seen by ∆) is KS. • Reasonable Control Action. The closed loop system should exhibit reasonably sized control action for typical reference commands and sensor noise. This typically requires that the “size” of KS be controlled. Too much lead (i.e., derivative action) in K may help in terms of stabilization, achieving a high bandwidth and phase margin, but it may result in controls that are unnecessarily large in the presence of typical reference commands r and sensor noise n. The above list suggests that there are many important issues that impact the control system design process. Part of a designer’s job, however, is to prioritize and select issues that are most important. Toward this end, we turn our attention away from Fig. 30.2 and consider instead the “fictitious” (mathematical) system depicted in Fig. 30.3. Weighting Functions and Closed Loop Transfer Function Matrix 2 Figure 30.3 includes specific weighting functions that will help us formulate an H optimization that (directly or indirectly) addresses some of the issues mentioned above. The figure shows a weighting W1 on the signal y (the tracking error), a weighting W2 on the controls u, and a weighting W3 on the plant outputs zˆ 3 . From the figure, it follows that regulated signals
z1 z = z2 z3 are related to the exogenous signals w as follows:
z 1 = W 1 zˆ 1 = W 1 Sw
(30.30)
z 2 = W 2 zˆ 2 = W 2 KSw
(30.31)
z 3 = W 3 zˆ 3 = W 3 Tw
(30.32)
From this, it follows that the closed loop transfer function matrix from w to z is given by
W1 S T wz = W 2 KS W3 T ©2002 CRC Press LLC
(30.33)
0066_Frame_C30 Page 9 Thursday, January 10, 2002 4:43 PM
Since Twz involves various “sensitivity” transfer function matrices, we say that we have a weighted mixed sensitivity problem. Selection of Weighting Functions Typically, the weighting functions W1, W2, W3 are selected to be stable transfer function matrices that are (at least initially) diagonally structured. • Sensitivity Weighting. One might select the sensitivity weighting W1 on the sensitivity S as follows:
k1 W 1 = ---------I s + e ny × ny
(30.34)
where k1, > 0. The parameter k1 is typically selected to be large. The parameter is typically selected to be small. Such selections are made so that S is heavily penalized at low frequencies— precisely where we want K to make S small. • Control Weighting. One might select the control weighting W2 on KS as follows:
W 2 = k 2 I nu × nu
(30.35)
where k2 > 0 provides a nonsingular penalty on the controls u (i.e., on KS). • Output Weighting. One might select the output weighting W3 on T as follows:
k3 ( s + z3 ) - I ny × ny W 3 = --------------------s + p3
(30.36)
with k3 > 0 and z3 < p3. Such a weighting would penalize T more heavily at higher frequencies. In general, care must be taken in selecting the structure of weighting functions. Inappropriate selections may result in an ill-posed problem and a very arduous design process. For example, W1 must be strictly 2 2 proper for H problems—otherwise the H norm of W1S makes no sense (since S approaches the identity at high frequencies). While there exists no precise systematic method for the selection of weighting functions, the above structures seem to work well (as starting points) in many applications. Input–Output Representation for Generalized Plant G To obtain an input–output (transfer function matrix) description for our generalized plant, we must express the regulated signals z1, z2, z3 and the measurements y in terms of the exogenous signals w and the controls u. Doing so yields
z 1 = W 1 zˆ 1 = W 1 ( w – Pu ) = W 1 w – W 1 Pu
(30.37)
z 2 = W 2 zˆ 2 = W 2 u
(30.38)
z 3 = W 3 zˆ 3 = W 3 Pu
(30.39)
y = w – zˆ 3 = w – Pu
(30.40)
From this, we obtain the following input–output (transfer function matrix) description for our generalized plant G:
z = G 11 G 12 w y G 21 G 22 u ©2002 CRC Press LLC
(30.41)
0066_Frame_C30 Page 10 Thursday, January 10, 2002 4:43 PM
or
W1 –W1 P
z1 z2 z3 y
=
0
W2
0
W3 P
I
–P
w u
(30.42)
State Space Representation for Generalized Plant G Next we obtain a two-port state space representation for G. To do so, we assume the following state space representations:
P = [Ap, Bp, Cp, D p]
with state x p
(30.43)
W 1 = [A1, B1, C1, D1]
with state x1
(30.44)
W 2 = [A2, B2, C2, D2]
with state x2
(30.45)
W 3 = [A3, B3, C3, D3]
with state x3
(30.46) 3
To obtain the desired state space representation for G, we need to express the signals ( { x˙ i } i=1, x˙p , { z i } i=1, y ) 3 in terms of the signals ( { x i } i=1 , x p , w, u ). This is just a matter of simple bookkeeping. Doing so yields the following: 3
x˙1 = A 1 x 1 + B 1 y = A 1 x 1 + B 1 ( w – C p x p – D p u ) = A 1 x 1 – B 1 C p x p – B 1 D p u
(30.47)
x˙2 = A 2 x 2 + B 2 u
(30.48)
x˙3 = A 3 x 3 + B 3 zˆ 3 = A 3 x 3 + B 3 ( C p x p + D p u ) = A 3 x 3 + B 3 C p x p + B 3 D p u
(30.49)
x˙p = A p x p + B p u
(30.50)
z 1 = C 1 x 1 + D 1 y = C 1 x 1 + D 1 ( w – C p x p – D p u ) = C 1 x 1 – D 1 C p x p + D 1 w – D 1 D p u (30.51) z2 = C2 x2 + D2 u
(30.52)
z 3 = C 3 x 3 + D 3 zˆ 3 = C 3 x 3 + D 3 ( C p x p + D p u ) = C 3 x 1 + D 3 C p x p + D 3 D p u
(30.53)
y = w – Cp xp – Dp u = – Cp xp + w – Dp u
(30.54)
The above equations may be written in standard two-port form:
A B 11 B 12 x x˙ = C 11 D 11 D 12 w z C 21 D 21 D 22 u y
©2002 CRC Press LLC
(30.55)
0066_Frame_C30 Page 11 Thursday, January 10, 2002 4:43 PM
as follows:
x˙1
A1
–B1 Cp
–B1 Dp B2
x1
B3 Dp
x2
A2
x˙2
A3
x˙3 x˙p = z1
Ap Bp x3 –D1 Cp D1 –D1 Dp xp D2 w
C1 C2
z2
B3 Cp
C3
z3
D3 Cp
D3 Dp
–Cp
y
I
(30.56)
u
–Dp
Checking Assumptions 2 In selecting the weights, W1, W2, W3, one must make sure that none of the “standard” H problem assumptions are violated. Thus far, we require that D11 = 0 and D22 = 0. To ensure that D11 = 0, we need
D1 = 0
(30.57)
D p = 0.
(30.58)
To ensure that D22 = 0, we need
This results in
x˙1
A1
x˙2
–B1 Cp
B2
A2
x1 A3
x˙3
B3 Cp
x2
Ap
x˙p =
Bp x3
C1
z1
C2
z2
(30.59)
xp D2 w u
C3 ∆3 Cp
z3
–Cp
y
I
In subsequent sections, additional assumptions will be imposed on the two-port state space representation 2 for the generalized plant G. The additional assumptions imposed will depend upon the specific H problem being considered. 2
Weighted H Optimal Mixed Sensitivity Problem 2 Given the above, the weighted H optimal mixed sensitivity problem is then to find a real-rational (finitedimensional) proper internally stabilizing controller K that minimizes T wz 2 ; i.e., H
min T wz K
H
2
W1 S = min W 2 KS K W3 T
©2002 CRC Press LLC
(30.60) H
2
0066_Frame_C30 Page 12 Thursday, January 10, 2002 4:43 PM
We will show how this optimal control problem—and problems like it—can be readily solved using computer-aided design soflware (e.g., MATLAB, robust control toolbox, m-tools). Comment 30.9 (Construction of Generalized Plant G) Generalized plants G are very easy to construct within SIMULINK. Input port blocks may be used to specify exogenous signals w and controls u. Output port blocks may be used to specify regulated signals z and measurements y. The “linmod” command may be applied to the constructed block diagram (SIMULINK file) to obtain a two-port state space (A, B = [B1 B2], C = [C1; C2], D = [D11 D12; D21 D22]) representation for G. The syntax for the command is as follows:
[ a, b, c, d ] = linmod (‘filename’) This method enables one to create generalized plant models quickly.
2
Overview of H Optimization Problems to Be Considered Three fundamental problems are considered in this chapter: 2
1. H Output Feedback Problem. The solution to this problem is an optimal model-based dynamic compensator possessing the structure
K opt =
A – B2 Gc – Hf C2
Hf
–Gc
O nu ×n
(30.61)
where Gc, is a control gain (state feedback) matrix and Hf is a filter gain (observer) matrix. Gc is found by using the solution of a Control Algebraic Riccati Equation (CARE)—similar to that found in Linear Quadratic Regulator (LQR) problems. Hf is found by using the solution of a Filter Algebraic Riccati Equation (FARE)—similar to that found in Kalman–Bucy Filtering (KBF) problems. The structure of Kopt, Gc, and Hf can be thought of as the solution to a classical Linear Quadratic Gaussian (LQG) control problem which gives rise to the well known separation principle: closed loop poles are the eigenvalues of A − B2Gc, and the eigenvalues of A − Hf C2. 2 2. H State Feedback Problem. The solution to this problem is an optimal constant gain (state feedback) compensator possessing the structure
K opt = – G c
(30.62)
where Gc is a control gain (state feedback) matrix found by using the solution to a CARE—similar to that found in LQR problems. The poles of the resulting closed loop system are the eigenvalues of A− B2Gc. In short, this problem should be viewed as a mechanism for computing control gain matrices Gc that may be used in a state feedback application or in a model-based compensator application. 2 3. H Output Injection Problem. The solution to this problem is an optimal constant gain (static) compensator possessing the structure
K opt = – H f
(30.63)
where Hf is a filter gain (observer) matrix found by using the solution to a FARE—similar to that found in KBF problems. The poles of the resulting closed loop system are the eigenvalues of A − Hf C2. In short, this problem should be viewed as a mechanism for computing filter gain matrices Hf that may be used in a state estimation application or in a model-based compensator application. ©2002 CRC Press LLC
0066_Frame_C30 Page 13 Thursday, January 10, 2002 4:43 PM
2
30.3 H Output Feedback Problem 2
In this section, we consider the H output feedback problem. This problem results in model-based (dynamic) compensators involving a control gain (state feedback) matrix Gc and a filter gain (observer) matrix Hf. As such, the problem generalizes the ideas presented in classical LQG theory. 2 The following “standard” H output feedback problem assumption is now made. 2
Assumption 30.1 (H Output Feedback Problem) Throughout this section, it will be assumed that 1. Plant G22 Assumption. (A, B2, C2) stabilizable and detectable. • This assumption is necessary and suficient for the existance of a proper internally stabilizing controller K. With this assumption, the following model based (observer based) controller stabilizes the feedback loop in Fig. 30.1:
K =
A – B 2 G c – H f ( C 2 – D 22 G c )
Hf
–Gc
O nu ×n
(30.64)
provided that (A − B2Gc) and (A − Hf C2) are stable, as suggested by the classical separation principle from the theory of linear systems. This assumption mandates that all of the “bad” open loop poles (right half plane and imaginary) must be controllable through the controls u and observable through the measurements y. Suppose that G satisfies the assumption. Consider the augmentation of an integrator I/s (weighting function). Such an augmentation can result in the assumption being violated. Absorbing an integrator I/s (weighting function) on the exogenous signals w into G, for example, would violate the stabilizability assumption since it would introduce an open loop pole on the imaginary axis that is not controllable through the controls u. Absorbing an integrator on the regulated signals z into G would violate the detectability assumption since it would introduce an open loop pole on the imaginary axis that is not observable through the measurements y. Using I/(s + )( > 0) instead of I/s––in either case—would result in a G that does not violate the assumption. T 2. Nonsingular Control Weighting Assumption. R = D 12 D 12 > 0. nz × nu • This assumption implies that D 12 ∈ R has full column rank (i.e., rank D12 = nu) and hence that every control (direction) u influences the regulated signals z through D12 (i.e., D12 has no right null space). The matrix D12 must therefore be “tall” and “thin;” i.e.,
(number of regulated signals) n z ≥ nu (number of control signals) nu × nu
(30.65)
The matrix R = D 21 D 12 ∈ R may be interpreted as a weighting on the controls u—just like the control weighting matrix “R” in LQR problems. As in the LQR problem, we might say that the control weighting R on u is nonsingular. The larger R, the smaller we want our controls to be—sacrificing speed of regulation. A large R results in a low “regulation” bandwidth. The smaller R, the larger we will permit our controls u to be—in order to speed up regulation. A small R results in a high “regulation” bandwidth. 3. Regulator Assumption. jwI – A –B2 has full column rank (n + nu) for all w. C1 D 12 • This assumption implies that transfer function matrix from control signals u to regulated signals z has no (right) zero on the imaginary axis. Together with (1) and (2), it will guarantee that the Hamiltonian Hcon involving (A, B2, C1, D12, R)—that is, associated with the controls u and regulated signals z—will belong to dom(Ric). This, in turn, guarantees that the solution of the n ×n associated CARE results in a control gain matrix G c ∈ R u such that A − B2Gc is stable. T
©2002 CRC Press LLC
0066_Frame_C30 Page 14 Thursday, January 10, 2002 4:43 PM
The assumption implies that G has no imaginary modes that are unobservable through the regulated signals z; that is, all open loop poles on the imaginary axis must be observable through the regulated signals z. (A,C1), therefore, cannot possess unobservable imaginary modes. This is a necessary condition. It is not suficient. An integrator hanging on the measurements y, for example, would violate this. Since D12 has full column rank, the assumption is equivalent to the pair
( A – B 2 R D 12 C 1 , ( I – D 12 R D 12 )C 1 ) –1
T
T
–1
(30.66)
having no unobservable imaginary modes. −1 T • If D12 is square, then it is invertible and the assumption is equivalent to A − B2R D 12C1 having no imaginary modes. T • If D 12 C 1 = 0 (no cross penalty between controls and states), then the assumption is equivalent to (A, C1) having no unobservable imaginary modes. T 4. Nonsingular Measurement Weighting Assumption. Θ = D 21 D 12 > 0. ny × nw • This assumption implies that D 21 ∈ R has full row rank (i.e., rank D2l = ny) and hence that the measurements y are linearly independent through D21 (i.e., D21 has no left null space). The matrix D21 must therefore be “short” and “fat;” i.e.,
(number of measurements) ny ≤ n (number of exogenous signals)
(30.67)
ny × ny
The matrix Θ = D 21 D 21 ∈ R may be interpreted as the intensity of sensor noise impacting the measurements y—just like the sensor noise intensity matrix “Θ” found in KBF problems. As in the KBF problem, we say that the intensity matrix Θ associated with the measurements y is nonsingular. The larger Θ, the more we want to low pass filter the measurements y— sacrificing speed of estimation. A large Θ results in a low bandwidth for the associated estimator (observer). The smaller Θ, the less we want to low pass filter the measurements y—trading off our immunity to noise for speed of estimation. A small Θ results in a high bandwidth for the associated estimator (observer). 5. Filter Assumption. jwI – A – B 1 has full row rank (n + ny) for all w. D 21 C2 • This assumption implies that transfer function matrix from exogenous signals w to measurements y has no (left) zero on the imaginary axis. Together with (1) and (3), it will guarantee that the Hamiltonian Hfil involving (A, B1, C2, D21, Θ)—that is, involving exogenous signals z and measurements y—will belong to dom(Ric). This, in turn, guarantees that the solution of n × ny the associated FARE results in a filter gain matrix H f ∈ R such that A − Hf C2 is stable. The assumption implies that G has no imaginary modes that are uncontrollable through the exogenous signals w; that is, all open loop poles on the imaginary axis must be controllable through the exogenous signals w. (A, B1), therefore, cannot possess uncontrollable imaginary modes. This is a necessary condition. It is not suficient. An integrator hanging on the controls u, for example, would violate this. Since D21 has full row rank, the assumption is equivalent to the pair T
( A – B 1 D 21 Θ C 2 , B 1 ( I – D 21 Θ D 21 ) ) T
–1
T
–1
(30.68)
having no uncontrollable imaginary modes. T −1 • If D21 is square, then it is invertible and the assumption is equivalent to A − B1D 21Θ C2 having no imaginary modes. T • If B 1 D 21 = 0 (uncorrelated process and sensor noise), then the assumption is equivalent to (A, B1) having no uncontrollable imaginary modes. ©2002 CRC Press LLC
0066_Frame_C30 Page 15 Thursday, January 10, 2002 4:43 PM
Comment 30.10 (Duality Relationships) In the above discussion, we note the following dual relationships:
A ←→ A
T
(30.69)
B 2 ←→ C
T 2
(30.70)
C 1 ←→ B 1
(30.71)
D 12 ←→ D 21
(30.72)
T
T
R = D 12 D 12 ←→ Θ = D 21 D 21 T
T
(30.73)
These imply that • controls u are dual to measurements y • Regulated signals z are dual to exogenous signals w.
Hamiltonian Matrices 2
Associated with our H optimal control problem are the following two Hamiltonian matrices:
H con =
=
H fil =
A
–C C1 –A
T
–1
B2
–
T 1
R [ D 12 C 1 –1
–C D
T 12
T
T
–1
B2 ] T
–B2 R B2
– C 1 ( I – D 12 R D 12 )C 1
– ( A – B 2 R D 12 C 1 )
T
T
T
0
A
T 1
–1
T
–A
C2
–B1 D
( A – B 1 D 21 Θ C 2 ) T
–1
T 21
Θ
T
T
D 21 B 1
T
T
–1
–1
T
C2
–C2 Θ C2
– B 1 ( I – D 21 Θ D 21 )B 1 T
T
–1
T
–
(30.74)
T
A – B 2 R D 12 C 1
–B1 B =
0
T 1
(30.75)
(30.76)
–1
– ( A – B 1 D 21 Θ C 2 ) T
(30.77)
–1
The first Hamiltonian is associated with an optimal state feedback control or regulator problem. The second is associated with an optimal filtering or estimation problem. 2 The solution to the H output feedback problem is now given [11, pp. 261–262]. 2
Theorem 30.1 (Solution to H Output Feedback Problem Subject to Standard Assumptions) 2
Suppose that G satisfies the assumptions given in Assumption 30.1—the so-called standard H output feedback problem assumptions. Given this, we have the following. 2 The unique minimizing H optimal controller is n dimensional (like generalized plant G) and is given by
K opt =
©2002 CRC Press LLC
A – B2 Gc – Hf C2
Hf
–Gc
O nu × n y
(30.78)
0066_Frame_C30 Page 16 Thursday, January 10, 2002 4:43 PM
where the control gain matrix G c ∈ R
nu × n
is given by
G c = R [ B 2 X + D 12 C 1 ] T
–1
T
(30.79)
X = Ric(Hcon) ≥ 0 is the unique (at least) positive semi-definite solution of the CARE: T
( A – B 2 R D 12 C 1 ) X + X ( A – B 2 R D 12 C 1 ) + C 1 ( 1 – D 12 R D 12 )C 1 – XB 2 R B 2 X = 0 –1
T
–1
and the filter gain matrix H f ∈ R
n × ny
T
T
T
–1
–1
T
T
(30.80)
is given by
H f = [ YC 2 + B 1 D 21 ]Θ T
T
–1
(30.81)
Y = Ric(Hfil ) ≥ 0 is the unique (at least) positive semi-definite solution of the FARE: T
( A – B 1 D 12 Θ C 2 )Y + Y ( A – B 1 D 21 Θ C 2 ) + B 1 ( I – D 21 Θ D 21 )B 1 – YC 2 Θ C 2 Y = 0 T
T
–1
–1
T
T
–1
T
–1
(30.82)
Moreover, the minimum norm is given by
T wz ( K opt )
L
2
Mc B1
=
2 L
+ R Gc Mf 1/2
2
2 L
(30.83)
2
trace ( B 1 XB 1 ) + trace ( RG c YG c ) T
(30.84)
M c = [ A – B 2 G c , I n × n , C 1 – D 12 G c ]
(30.85)
M f = [ A – H f C 2 , I n × n , B 1 – H f D 21 ]
(30.86)
=
T
where
Finally, the closed loop poles are the eigenvalues of A − B2Gc and A − Hf C2.
2
Comment 30.11 (Computing Optimal H Controller in MATLAB) 2
The following MATLAB command sequence may be used to compute the optimal H controller Kopt and the resulting closed loop transfer function matrix Twz: tss_g = mksys(a, [b1 b2], [c1; c2], [0∗ones(nz, nw) d12; d21 0∗ones(ny, nu),‘tss’) [ss_k ss_twz] = h21qg(tss_g, ‘schur’) [a_k, b_k, d_k] = branch(ss_k, ‘a,b,c,d’) The “mksys” command packs the two-port state space data for the generalized plant G into a column vector data structure (called a tree) possessing the “tss” (two-port state space) variable designation. All dimension information is encoded into the column vector. The “h21qg” command computes the optimal 2 H controller Kopt and the associated closed loop system from the exogenous signals w to the regulated signals z. An eigenvalue-eigenvector method is the default method used to solve the two relevant algebraic Riccati equations. A Schur method—based on Schur’s unitary transformation of a matrix to upper triangular form—may be used by including the “schur” option. The results are stored in the tree vectors ss_k and ss_twz, respectively. The ‘branch’ command is then used to retrieve the state space represen tation for Kopt from the tree vector ss_k. Comment 30.12 (Relationship to LQG, Stability Robustness Margins) 2
Theorem 30.1 shows that the optimal H output feedback controller is identical in structure to that found in classical LQG problems. While certain LQR, KBF, and LQG/LTR problem formulations do result in feedback loops possessing stability robustness margins, LQG controllers need not possess margins [3].
©2002 CRC Press LLC
0066_Frame_C30 Page 17 Thursday, January 10, 2002 4:43 PM
2
2
The same is true for H output feedback designs. We will show how the H framework presented can be manipulated to solve LQG/LTR problems which yield model-based controllers with desirable stability robustness margins—comparable to those found in feedback designs resulting from suitably formulated LQR and KBF problems (e.g., infinite upward gain margin, at least 6 dB downward gain margin, at least ±60° phase margin). 2 The following example shows how weighted H mixed sensitivity optimization may be used to design a controller for an unstable system with a time delay. 2
Example 30.2 (Weighted H Mixed Sensitivity Design for Unstable System with Time Delay) In this example, we consider an unstable system with a time delay ∆ = 0.05 s (50 ms). The system is modeled (approximately) as follows:
1 2/∆ – s 1 40 – s P ≈ ---------- ----------------- = ---------- -------------s – 1 2/∆ + s s – 1 40 + s
(30.87)
Design Specifications. The objective is to design a controller K that satisfies the following closed loop specifications: (1) closed loop stability, (2) sensitivity below −60 dB for all frequencies below 0.1 rad/s, (3) sensitivity gain crossover between 2 and 3 rad/s, (4) peak sensitivity below 5 dB, (5) peak complementary sensitivity below 10 dB. 2 Weighted H Mixed Sensitivity Problem. To achieve the above specifications, we formulated a weighted 2 H mixed sensitivity problem—with a weighting W1 on the sensitivity S and a weighting W2 on KS; i.e.,
min T wz K
H
2
= min K
W1 S W 2 KS
(30.88) H
2
The weighting functions used were as follows:
k1 10 W 1 = ------------ = -----------------s + p1 s + 0.01
(30.89)
k2 ( s + z2 ) 0.1 ( s + 40 ) W 2 = --------------------- = -------------------------s+2 s + p2
(30.90)
WI penalizes the sensitivity S heavily at low frequencies (e.g., below 0.001 rad/s). Above 0.1 rad/s, WI is small and W2 penalizes KS (with magnitude greater than unity) until about 4 rad/s. Since the solution 2 of our H optimization depends in a very complex manner on the parameters that define WI and W2, it should be no surprise that it took a while to determine suitable parameters. Construction of Generalized Plant. The generalized plant G was assembled using SIMULINK and the “linmod” command. The resulting two-port state space representation is as follows:
0 –W1 P
A
B1
B2
G = 0
W2
= C 1 D 11 D 12
1
–P
C 2 D 21 D 22
©2002 CRC Press LLC
– 0.01 0 – 40 1 0 –2 0 0 0 0 0 1 = 0 0 40 – 39 10 0 0 0 0 3 0 0 0 0 – 40 1
1 0 0 0 0 0 1
0 1 0 1 0 0.1 0
(30.91)
0066_Frame_C30 Page 18 Thursday, January 10, 2002 4:43 PM
2
Computation of H Optimal Controller. The “mksys” command was used to pack the above two-port state space into a tree vector data structure. The “h2lqg” command was then used to obtain the optimal controller. Note that the generalized plant is 4th order (two for plant P, one for sensitivity weighting W1, one for control weighting W2). The optimal controller:
191.0813 ( s + 40 ) ( s + 2 ) ( s + 0.526 ) K opt = ------------------------------------------------------------------------------------------------2 ( s + 1.915 ) ( s + 0.01 ) ( s + 84.15s + 2133 )
(30.92)
is also 4th order—the order of the generalized plant G. The pole at s = −0.01 is an approximate integrator—a consequence of the heavy weighting that WI places on the sensitivity at low frequencies. Closed Loop Analysis. The resulting closed loop poles (two plant P = G22, four from controller Kopt) are as follows:
s = – 1, – 2.0786 ± j0.8302, – 40, – 40, – 39.9216
(30.93)
The resulting sensitivity, KS, and complementary sensitivity frequency responses are shown in Figs.30.4–30.6, respectively. The figures show that all of the design specifications are met (or nearly met). The peak sensitivity is about 4.855 dB. The peak complementary sensitivity is about 8.71 dB. The KS response shows the impact of the compensators’ lead between 0.1 and 10 rad/s. 2 Computation of Minimum H Norm. The minimum two-norm was computed using the following MATLAB command sequence:
lc = lyap(acl, bcl∗bcl) minnorm = sqrt( trace( cc1∗c∗c’)) The minimum two-norm was found to be 9.0648. 2 The following simple example illustrates how the H output feedback problem solution can be used to solve classical LQG problems. Sensitivity Frequency Response 20
0
Mag (dB)
−20
−40
−60
−80
−100 −2 10
FIGURE 30.4
2
10
−1
H Design sensitivity frequency response.
©2002 CRC Press LLC
0
10 Frequency (rad/sec)
1
10
2
10
0066_Frame_C30 Page 19 Thursday, January 10, 2002 4:43 PM
KS Frequency Response 35
30
Mag (dB)
25
20
15
10
5
0 −2 10
FIGURE 30.5
−1
10
0
10 Frequency (rad/sec)
1
10
2
10
2
H Design KS frequency response. Complementary Sensitivity Frequency Response 10
0 −10 −20
Mag (dB)
−30 −40 −50 −60 −70 −80 −90
−1
10
FIGURE 30.6
0
10 Frequency (rad/sec)
1
10
2
10
2
H Design complementary sensitivity frequency response.
Example 30.3 (LQG/LTR Design for First Order Unstable Missile Model) We consider an unstable missile described by a simple first order model with state x (pitch attitude), control input u (fin elevator deflection), process noise wI = x (angular wind gust), and sensor noise w2 = θ. It is assumed that the missile’s center of gravity (c.g.) is aft of its center of pressure (c.p.)—where lift is concentrated. This assumption results in a missile pitch instability. It is also assumed that the missile’s ©2002 CRC Press LLC
0066_Frame_C30 Page 20 Thursday, January 10, 2002 4:43 PM
moment of inertia about its c.g. is very small. This assumption leads to a simple first order model. The missile’s angular velocity x˙ is assumed to be proportional to its attitude x and the process noise wI = ξ. T Regulated signals z = [zl z2 ] include the vehicle’s pitch attitude zl = x and a weighted control input z2 = ru . Here, r > 0 is a design parameter to be selected below. The vehicle’s pitch attitude is measured. The pitch attitude measurement y includes additive sensor noise w2 = q. Missile Model. The (generalized) missile model is given as follows:
x˙ = x + x + u
(30.94)
x
z =
(30.95)
ru y = x + mq
(30.96)
where µ > 0 is design parameter to be selected below. 2 Design Specifications. The goal is to design a real-rational proper model-based H optimal compensator (i.e., minimizes T wz 2 ) which results in a stable closed loop system with a dominant closed loop pole H at s = −5 (settling time ts ≈ 1 s). Construction of Generalized Plant. The above model may be rewritten as follows:
x˙ = x + 1 0 x + u q 0
z = 1 x + 02 × 2 x + 0 q y = x+ 0
m
(30.97)
u
(30.98)
s
x +0 u 1×1 q
(30.99)
B2 = 1
(30.100)
From this, it follows that
A = 1, C1 = 1 , 0 C 2 = 1,
B1 = 1 0 , D 11 = 0 2 × 2 , D 21 = 0
2
D 12 =
0
D 22 = 0 1 × 1
m ,
(30.101)
r (30.102)
2
H Problem Assumptions. We now check each of the H output feedback problem assumptions, as stated in Assumption 30.2. From the above data, it follows that D11 = 02 × 2, D22 = 01 × 1, and (A, B2, C2) is stabilizable and detectable, and
R = D 12 D 12 = r > 0
(30.103)
Θ = D 21 D 21 = m > 0
(30.104)
T
T
©2002 CRC Press LLC
0066_Frame_C30 Page 21 Thursday, January 10, 2002 4:44 PM
Since
D 12 C 1 = 0
(30.105)
= 0
(30.106)
T
B1 D
T 21
the imaginary axis rank conditions involving (A, B2, Cl, D12) and (A, B1, C2, D21) in Assumption 30.2 become equivalent to (A, Cl) having no imaginary unobservable modes and (A, B1) having no imaginary uncontrollable modes. These are clearly satisfied since A = 1 has no imaginary modes. Given this, it 2 follows that all of the H output feedback problem assumptions in Assumption 30.2 are satisfied. Plant. Finally, we note that the so-called plant (or missile) transfer function P = G22 is given by −1
P = G 22 = C 2 ( sI – A ) B 2
(30.107)
1 = ---------s–1
(30.108)
G22 is unstable with a right half plane pole at s = 1. G22 is also minimum phase (i.e., no zeros in Res > 0). T Filter Gain Matrix Hf . Since B 1 D 21 = 0 , the associated FARE is given by
1 2 T T –1 T AY + YA + B 1 B 1 – YC 2 Θ C 2 Y = Y + Y + 1 – --- Y = 0 m
(30.109)
or 2
Y – 2mY – m = 0
(30.110)
Application of the quadratic formula and selecting the positive (stabilizing) root yields:
Y = m+ m +m 2
(30.111)
This yields the following filter gain matrix:
H f = YC 2 Θ T
–1
1 = 1 + 1 + --µ
(30.112)
We now select m to achieve the given dominant pole specification:
1 A – H f C 2 = 1 – 1 – 1 + --- = – 5 m
(30.113)
1 m = ----24
(30.114)
This yields
The associated KBF open loop transfer function is given by −1
G KF = – C 2 ( sI – A ) H f –6 = ---------s–1 ©2002 CRC Press LLC
(30.115) (30.116)
0066_Frame_C30 Page 22 Thursday, January 10, 2002 4:44 PM
We will see below that this will be the approximate open loop transfer function PKopt for the final design. In this sense, GKF represents our target open loop transfer function. Control Gain Matrix Gc. Since D T12 C 1 = 0 , the associated CARE is given by
1 2 T T –1 A X + XA + C 1 C 1 – XB 2 R B 2 X = X + X + 1 – --- X = 0 r
(30.117)
or 2
X – 2rX – r = 0
(30.118)
Application of the quadratic formula and selecting the positive (stabilizing) root yields:
X = r+ r +r 2
(30.119)
This yields the following control gain matrix:
1 −1 T G c = R B 2 X = 1 + 1 + --r
(30.120)
This results in a closed loop (regulator) pole at
1 1 A – B 2 G c = 1 – 1 – 1 + --- = – 1 + --r r
(30.121)
Note that for large r (referred to as expensive control in LQR problems) we have a closed loop pole at s = −1, at the left half plane reflection of the plant pole at s = 1. We will select the design parameter r to be small (referred to as cheap control in LQR problems) so that this closed loop (regulator) pole s ≈ − 1/ r is fast and the closed loop filter pole at s = −5 at is the dominant closed loop pole. 2 2 H Optimal Output Feedback Model-Based Compensator. The resulting H optimal output feedback model-based compensator is given by
K opt =
A – B2 Gc – Hf C2
Hf
–Gc
0 nu × ny
(30.122)
where
1 1 A – B 2 G c – H f C 2 = 1 – 1 – 1 + --- – 1 – 1 + --r m
(30.123)
1 = 1 – 1 – 1 + --- – 1 – 1 + 24 r
(30.124)
1 = – 6 – 1 + --r
(30.125)
1 H f = 1 + 1 + --m = 1 + 1 + 24
(30.127)
= 6
(30.128)
1 G c = 1 + 1 + --r ©2002 CRC Press LLC
(30.126)
(30.129)
0066_Frame_C30 Page 23 Thursday, January 10, 2002 4:44 PM
Given this, the compensator transfer function is given by −1
K opt = – G c ( sI – A + B 2 G c + H f C 2 ) H f
(30.130)
– 6 ( 1 + 1 + 1/r ) = -----------------------------------------s + 6 + 1 + 1/r
(30.131)
For small ρ (cheap control), this yields
– 6 ( 1/ r ) K opt ≈ -----------------------s + 1/ r
(30.132)
Open Loop Transfer Function. The associated open loop transfer function is given by −1
PK opt = – C 2 ( sI – A ) B 2
−1
G c ( sI – A + B 2 G c + H f C 2 ) H f
1 – 6 ( 1 + 1 + 1/r ) = ---------- -----------------------------------------s – 1 s + 6 + 1 + 1/r
(30.133) (30.134)
For small ρ (cheap control), this becomes
1 – 6 ( 1/ r ) PK opt ≈ ---------- -----------------------s – 1 s + 1/ r
(30.135)
Loop Transfer Recovery (LTR). From this, we see that as control weighting parameter r approaches zero (cheap control), the open loop transfer function approaches the KBF open loop transfer function GKF; i.e.,
–6 lim G 22 K opt = ---------+ s–1
(30.136)
r→0
= G KF
(30.137)
This shows that as r approaches zero (cheap control), the actual open loop transfer function PKopt approaches the target open loop transfer function GKF . The above procedure of recovering a target open loop transfer function (with desirable closed loop properties) using an LQG controller is called LQG with loop transfer recovery or LQG/LTR. Selection of Far Away Closed Loop Regulator Pole. For small r, the closed loop system is stable with closed loop poles at s = −5 and s ≈ – 1/ r . A good selection for ρ might be r = 1/2500. This results in a fast closed loop pole at s ≈ −50 and makes the closed loop filter pole at s = −5 the dominant closed loop pole, as required. 2 Stability Robustness Margins. It is well known that H and LQG designs need not possess good stability robustness margins. In fact, they can be arbitrarily bad [3]. LQG/LTR designs for minimum phase plants (such as ours: P = 1/(s − 1) have guaranteed stability robustness margins. LQG/LTR designs provide margins that approach those associated with LQR and KBF designs; i.e., infinite upward gain margin, at least 6 dB downward gain margin, and at least ±60° phase margin. Our final LQG/LTR design
–6 50 PK opt = ---------- ------------s – 1 s + 50 ©2002 CRC Press LLC
(30.138)
0066_Frame_C30 Page 24 Thursday, January 10, 2002 4:44 PM
offers an infinite upward gain margin and a downward gain margin of 1/6 (−15.56 dB). The resulting unity gain crossover frequency is wg = 35 = 5.92 rad/s and the associated phase margin is about 99.59°. Not bad. The following example extends the LQG/LTR ideas presented in Example 30.3 to the general MIMO 2 setting—enabling the design of feedback loops (with nominal robustness margins) via H optimization. 2
Example 30.4 (MIMO LQG and LQG/LTR Control Design Via H Optimization) We consider a MIMO plant P defined by the state space representation
x˙ = Ax + Bu
(30.139)
y = Cx
(30.140)
It is assumed that the plant P = [A, B, C] is stabilizable and detectable. 2 The goal is to demonstrate how the H optimal output feedback solution that has been presented may be used to solve MIMO LQG control problems. We specifically would like to present a method which lends itself to the concept of LTR—whereby we use a model-based LQG controller to recover a target loop transfer function matrix with desirable closed loop properties. Our motivation is not optimal stochastic LQG control problems; it is the design of control laws with desirable closed loop properties. Construction of Generalized Plant G. With our final objective being a model-based compensator defined by a control gain matrix Gc and a filter gain matrix Hf , we consider the following generalized plant:
x˙ = Ax + Lξ + Bu
(30.141)
Mx z = --------------------rI nu × nu
(30.142)
y = Cx + µ q
(30.143)
where u is the control, x is the (generalized) plant state, w1 = ξ represents process noise in the state n×n u n×n u n×n ,B∈R , equation, w2 = q represents sensor noise in the measurement equation, A ∈R , L ∈ R n y ×n n y ×n M ∈ R , C ∈ R , ny = nu, r > 0, µ > 0. Design Parameter Assumptions. It is assumed that either: (A, L) has no imaginary uncontrollable modes and (A, M) is detectable, or (A, L) is stabilizable and (A, M) has no imaginary unobservable modes. Here, L, M, m, and r should be viewed as “design parameters” that are selected in order to obtain control and filter gain matrices G, and Hf such that the resulting model-based compensator exhibits desirable closed loop properties. Two-Port State Space Representation for Generalized Plant G. The above model may be rewritten in two-port state space form as follows
A x˙ z y
=
M 0 nu × n C
©2002 CRC Press LLC
L
0 n × ny
B x
0 ny × nu
0 ny × ny
0 ny × nu
0 nu × nu
0 nu × ny
rI nu × nu
x q u
0 ny × nu
mI ny × ny
(30.144)
0066_Frame_C30 Page 25 Thursday, January 10, 2002 4:44 PM
2
2
Check on H Output Feedback Assumptions. We now make sure that all of the H output feedback problem assumptions in Assumption 30.2 are satisfied. • Plant P = G22 Assumptions. Since the plant P = G22 = [ A, B, C ] is stabilizable and detectable, it follows that (A, B2 = B, C2 = C) is stabilizable and detectable. • Regulator Assumptions. Since
0 ny × nu
D 12 =
rI nu × nu has full column rank, it follows that the control weighting matrix R = D 12 D 12 = rI nu × nu > 0 is nonsingular. T
T
Since D 12 C 1 = 0, it follows that the imaginary axis (column) rank condition involving (A, B2, –1 T −1 T C1, D12) in Assumption 30.2 is equivalent to (A – B 2 R D 12 C 1 , (I – D 12 R D 12 )C 1 ) = (A,C 1 ) having no unobservable imaginary modes. Since (A, M) is either detectable or has no imaginary unobservable modes, it follows that
A,C 1 =
M 0 nu × n
has no unobservable imaginary modes. The associated Hamiltonian Hcon will, therefore, yield a Riccati solution and control gain matrix Gc such that A − BGc is stable. • Filter Assumptions. Since D21 = [ 0 ny × nu mI ny × ny ] has full row rank, it follows that the measurement T weighting matrix Θ = D 21 D 21 = mI ny × ny > 0 is nonsingular. Since B 1 D 21 = 0, it follows that the imaginary axis (row) rank condition involving (A, B1, C2, T −1 −1 D21) in Assumption 30.2 is equivalent to (A – B 1 D 21 Θ C 2 , B 1 (I – D 21 Θ D 21 )) = ( A, B 1 ) having no uncontrollable imaginary modes. Since (A, L) is either stabilizable or has no uncontrollable imaginary modes, it follows that (A, B 1 = [L 0 n × ny ]) has no uncontrollable imaginary modes. The associated Hamiltonian Hfil will therefore yield a Riccati solution and filter gain matrix Hf such that A − Hf C is stable. T
2
Given the above, it follows that all of the H output feedback problem assumptions in Assumption 30.2 are satisfied. Control Gain Matrix. It follows that the control gain matrix Gc is given by −1
Gc = R B X T
(30.145)
where X ≥ 0 is the unique (at least) positive semi-definite solution of the CARE: −1
A X + XA + C C – XBR BX = 0 T
T
(30.146)
Moreover, A − BG is stable. Filter Gain Matrix. It follows that the filter gain matrix Hf is given by
H f = YC Θ T
©2002 CRC Press LLC
−1
(30.147)
0066_Frame_C30 Page 26 Thursday, January 10, 2002 4:44 PM
FIGURE 30.7
Negative feedback loop with LQG model-based compensator and plant.
where Y > 0 is the unique (at least) positive semi-definite solution of the FARE: −1
AY + YA + LL – Y C Θ CY = 0 T
T
T
(30.148)
Moreover, A − HC is stable. 2 2 2 H Optimal (LQG) Compensator. The H optimal compensator that minimizes the H norm of the Cx x transfer function matrix from the exogenous signals w = to the regulated signals z = is rI n × n q u u then given by
K opt =
A – BG c – H f C
Hf
Gc
0 nu × n
(30.149)
Note that the minus sign on Gc (lower left hand entry of Kopt) has been removed in anticipation of the negative feedback system implementation shown in Fig. 30.7. By the separation principle, the closed loop poles are the eigenvalues of A − BGc and A − Hf C. Stability Robustness Margins. It should be emphasized that the resulting controller Kopt, although stabilizing, may possess arbitrarily bad stability robustness margins [3]. This is despite the fact that the associated regulator loop −1
G LQ = G c ( sI – A ) B
(30.150)
and filter loop −1
G KF = C ( sI – A ) H f
(30.151)
when viewed as MIMO open loop transfer function matrices within their own negative feedback loops, possess the following well-known stability robustness margins: infinite upward gain margin, at least 6 dB downward gain margin, and at least ±60° phase margin. This gives rise to the following natural question: Is there a way that we can select the control gain matrix Gc and the filter gain matrix Hf so that the resulting model-based compensator Kopt results in a feedback loop which possesses the above nice margins? Fortunately, the answer to this is a definitive yes! Two methods which result in comparable stability margins at the plant input or at the plant output (but not both simultaneously) are now presented. Loop Transfer Recovery (LTR) Methods. The approach we take to achieve a feedback design with good stability margins is as follows. The process involves two steps. 1. Target Loop Design. The first step is to design a target open loop transfer function matrix that possesses desired closed loop properties. The target loop may be associated with the plant output. If so, we denote it Lo. In such a case, Lo represents our desired PKopt. If associated with the plant input, we denote it Li. In such a case, Li represents our desired Kopt. (In general, PKoptP ≠ KoptP.)
©2002 CRC Press LLC
0066_Frame_C30 Page 27 Thursday, January 10, 2002 4:44 PM
2. Target Loop Recovery Via Model-Based Compensator. The second step is to use a model-based compensator Kopt = [A − BGc − Hf C, H, G] to recover the target loop (either Lo or Li). If we want to recover Lo (i.e., good properties at that plant output), then we want PKopt ≈ Lo. This is called loop transfer recovery at the plant output (LTRO). If we want to recover Li (i.e., good properties at that plant input), then we want KoptP ≈ Li,. This is called loop transfer recovery at the plant input (LTRI). Note: In general, the properties associated with breaking the loop at the plant output (properties of PKopt) are different (perhaps very different) from those associated with breaking the loop at the plant input (properties of KoptP). It is usually very difficult for PKopt and KoptP to both possess great properties (e.g., margins, etc.). Typically, a designer must trade off nice properties at the plant output for nice properties at the plant input, or vice versa. 2 H -based methods for LTRO and LTRI are now presented. • Loop Transfer Recovery at Plant Output (LTRO). −l 1. Design of Target Loop Lo. The first step is to design a target loop Lo = C(sI − A) Hf with desirable closed loop properties (e.g., stability, sensitivity, complementary sensitivity, stability robustness margins, etc). This may be done using any method! (Any method you feel comfortable enough with.) One procedure that results in good properties at the plant output is based on KBF methods. −l The idea is to select the design (shaping) matrix L so that the singular values GFOL = C(sI − A) L look nice; e.g., large minimum singular value at low frequencies, small maximum singular value at high frequencies, singular values cross 0 dB with slopes of −20 dB/dec, etc. We then solve the FARE with A, L, C, Θ = mI ny ×ny—using m > 0 to adjust the bandwidth of −l our target loop Lo = GKF = C(sI − A) Hf . A smaller (larger) m results in a larger (smaller) bandwidth. Guidelines for Shaping of Target Loop Lo = GKF . • The so-called Kalman Frequency Domain Equality (KFDE) guides our loop shaping:
[ I + G KF ( jw ) ] [ I + G KF ( jw ) ]
H
1 1 = I + -------G FOL ( jw ) -------G FOL ( jw ) m m
H
(30.152)
From this, it follows that
s i [ I + G KF ( jw ) ] =
1 2 1 + --- s i [ G FOL ( jw ) ] m
(30.153)
This suggests that by shaping GFOL, we can shape the target loop Lo = GKF . Specifically, if GFOL is large at low frequencies, then we expect
1 G KF ( jw ) ≈ -------G FOL ( jw ) m
(30.154)
at low frequencies. This shows that the matrix L should be used for shaping the target loop Lo = GKF while m > 0 is used to adjust the target loop bandwidth—decreasing/increasing m to raise/lower the target loop bandwidth. The resulting loop Lo = GKF is guaranteed to possess nice closed loop properties as described below. • The above singular value relation implies that
s min [ I + G KF ( jw ) ] ≥ 1 ©2002 CRC Press LLC
(30.155)
0066_Frame_C30 Page 28 Thursday, January 10, 2002 4:44 PM
for all w. This, in turn, implies that the associated sensitivity singular values satisfy
1 -≤1 s max [ S KF ( jw ) ] = ------------------------------------−1 s min [ S KF ( jw ) ]
( 0dB )
(30.156)
for all w, where
S KF ( jw ) = [ I + G KF ( jw ) ]
−1
(30.157)
• From the above sensitivity singular value relationship, we obtain the follow celebrated KBF loop margins: infinite upward gain margin, at least 1-- (6 dB) downward gain margin, 2 at least ±60° phase margin. The above gain margins apply to simultaneous and independent gain perturbations when the loop is broken at the output. The same holds for the above phase margins. The above margins are NOT guaranteed for simultaneous gain and phase perturbations. It should be noted that these margins can be easily motivated using elementary SISO Nyquist stability arguments [2,8]. • From the above sensitivity singular value relations, we obtain the following complementary sensitivity singular value relationship:
s max [ T KF ( jw ) ] = s max [ I – S KF ( jw ) ] ≤ 1 + s max [ S KF ( jw ) ] ≤ 2
( 6dB )
(30.158)
for all w, where
T KF = I – S KF = G KF [ 1 + G KF ]
−1
(30.159)
2. Recovery of Target Loop Lo Using Model-Based Compensator. The second step is to use a modelbased compensator Kopt = [ A − BGc − Hf C, Hf , Gc ] where Gc is found by solving the CARE with A, B, M = C, R = rI nu × nu with ρ a small positive scalar. Since r is small, we call this a cheap control problem. • If the plant P = [A, B, C] is minimum phase, then it can be shown that
lim X = 0
r → 0+
lim
r → 0+
rG c = WC
(30.160) (30.161)
for some orthonormal W (i.e., W W = WW = I ) T
T
lim PK opt = L o
r → 0+
(30.162)
In such a case, PKopt ≈ Lo for small ρ and hence PKopt will possess stability margins that are close to those of Lo (at the plant output)—whatever method was used to design Lo. It must be noted that the minimum phase condition on the plant P is a suficient condition. It is not necessary. Moreover, Gc need not be computed using a CARE. In fact, any Gc which (1) rG c = WC for some invertible matrix W and which (2) satisfies a limiting condition rlim → 0+ ensures that A − BGc is stable (for small r), will result in LTR at the plant output. This result ©2002 CRC Press LLC
0066_Frame_C30 Page 29 Thursday, January 10, 2002 4:44 PM
is a consequence of the structure of model-based compensators and has nothing to do with optimal control and filtering problems. rG c = WC holds for some invertible matrix W, • Assuming that a limiting condition rlim → 0+ −l loop transfer recovery of the target loop Lo = C(sI − A) Hf may be proven as follows: For small r we have
WC G c ≈ --------r
(30.163)
which gives yields the following: −1
PK opt = PG c ( sI – A + BG c + H f C ) H f
(30.164)
WC WC −1 ≈ P --------- sI – A + B --------- H f r r
(30.165)
WC WC −1 −1 ≈ P --------- ( sI – A ) I + B --------- ( sI – A ) r r −1
−1
−1
WC ( sI – A ) ≈ P I + --------------------------------- B r −1
(30.166)
Hf
(30.167)
−1 −1
WC ( sI – A ) WC ( sI – A ) ≈ P --------------------------------- I + B --------------------------------r r
WP ≈ P --------r
Hf
−1
−1
WC ( sI – A ) --------------------------------- H f r
(30.168)
−1
C ( sI – A ) H W ---------------------------------f r
(30.169)
−1
≈ C ( sI – A ) H f = L o
(30.170)
The central idea (underneath the algebra) is that as r goes to zero, the C feedback path within the compensator Kopt = [A − BGc − Hf C, Gc , Hf ] is broken (see Fig.30.7 ) and the nice properties that hold at the so-called innovations v (e.g., open loop transfer function matrix −l at v is Lo = C(sI − A) Hf ) in Fig. 30.7 get transferred to the error signal e (compensator input, or plant output) within the feedback loop. • Loop Transfer Recovery at Plant Input (LTRI). −1
1. Design of Target Loop Li. The first step is to design a target loop Li = GC(sI − Α) B with desirable closed loop properties (e.g., stability, sensitivity, complementary sensitivity, stability robustness margins, etc). This may be done using any method! (Any method you feel comfortable enough with.) One procedure that results in good properties at the plant input is based on LQR methods. The idea is to select the design (shaping) matrix M so that the singular values of GOL = M(sI − −l Α) B look nice; e.g., large minimum singular value at low frequencies, small maximum singular value at high frequencies, singular values cross 0 dB with slopes of −20 dB/dec, etc. We then solve the CARE with A, B, M, R = rI nu × nu , using r > 0 to adjust the bandwidth −l of our target loop Li = GLQRGc(sI − A) B. A smaller (larger) r results in a larger (smaller) bandwidth. Guidelines for Shaping of Target Loop Li = GLQ. • The so-called LQ frequency domain equality (LQFDE) guides our loop shaping:
1 H [ I + G LQ ( jw ) ] [ I + G LQ ( jw ) ] = I + ------- G OL ( jw ) r ©2002 CRC Press LLC
H
1 ------- G OL ( jw ) r
(30.171)
0066_Frame_C30 Page 30 Thursday, January 10, 2002 4:44 PM
From this, it follows that
s i [ I + G LQ ( jw ) ] =
1 2 I + --- s i [ G OL ( jw ) ] r
(30.172)
This suggests that by shaping GOL, we can shape the target loop Li = GLQ. Specifically, if GOL is large at low frequencies, then we expect
1 G LQ ( jw ) ≈ ------- G OL ( jw ) r
(30.173)
at low frequencies. This shows that the matrix M should be used for shaping the target loop Li = GLQ while r > 0 is used to adjust the target loop bandwidth—decreasing/increasing r to raise/ lower the target loop bandwidth. The resulting loop Li = GLQ is guaranteed to possess nice closed loop properties as described below. • The above singular value relation implies that
s min [ I + G LQ ( jw ) ] ≥ 1
(30.174)
for all ω. This, in turn, implies that the associated sensitivity singular values satisfy
1 -≤1 s max [ S LQ ( jw ) ] = ------------------------------------−1 s min [ S LQ ( jw ) ]
( 0dB )
(30.175)
for all ω, where
S LQ = [ I + G LQ ]
−1
(30.176)
• From the above sensitivity singular value relationship, we obtain the follow celebrated LQR loop margins: infinite upward gain margin, at least 1-- (6 dB) downward gain margin, 2 at least ±60° phase margin. The above gain margins apply to simultaneous and independent gain perturbations when the loop is broken at the input. The same holds for the above phase margins. The above margins are NOT guaranteed for simultaneous gain and phase perturbations. It should be noted that these margins can be easily motivated using elementary SISO Nyquist stability arguments [2,8]. • From the above sensitivity singular value relations, we obtain the following complementary sensitivity singular value relationship:
s max [ T LQ ( jw ) ] = s max [ I – S LQ ( jw ) ] ≤ 1 + s max [ S LQ ( jw ) ] ≤ 2
( 6dB )
(30.177)
for all w, where
T LQ = I – S LQ = G LQ [ 1 + G LQ ]
−1
(30.178)
2. Recovery of Target Loop Li Using Model-Based Compensator. The second step is to use Kopt = [A − BGc, − Hf C, Hf ,Gc ] where Hf is found by solving the FARE with A, L = B, C, Θ = mI ny × ny with µ a small positive scalar. Since m is small, we call this an expensive sensor problem. ©2002 CRC Press LLC
0066_Frame_C30 Page 31 Thursday, January 10, 2002 4:44 PM
• If the plant P = [A, B, C] is minimum phase, then it can be shown that
lim Y = 0
(30.179)
m → 0+
mH f = BV
lim
m → 0+
(30.180)
for some orthonormal V (i.e., V V = VV = I) T
T
lim K opt P = L i
(30.181)
m → 0+
In such a case, Kopt P ≈ Li for small m and hence Kopt P will possess stability margins that are close to those of Li (at the plant input)—whatever method was used to design Li. It must be noted that the minimum phase condition on the plant P is a suficient condition. It is not necessary. Moreover, Hf need not be computed using a FARE. In fact, any Hf which m H f = BV for some invertible matrix V and which (1) satisfies a limiting condition mlim → 0+ (2) ensures that A − Hf C is stable (for small m), will result in LTR at the plant input; i.e., lim K opt P = L i . This result is a consequence of the structure of model-based compensators m → 0+ and has nothing to do with optimal control and filtering problems. • Assuming that a limiting condition lim+ mH f = BV holds for some invertible matrix V, loop m→0 −1 transfer recovery of the target loop Li = Gc(sI − A) B may be proven as follows. For small m we have
BV H f ≈ ------m
(30.182)
which gives the following: −1
K opt P = G c ( sI – A + BG c + H f C ) H f P
(30.183)
BV −1 BV ≈ G c sI – A + BG c + -------C -------P m m
(30.184)
BV −1 BV ≈ G c sI – A + -------C -------P m m
(30.185)
BV −1 −1 ≈ G c ( sI – A ) + I + -------C ( sI – A ) m
−1
−1 BV −1 BV ≈ G c ( sI – A ) ------- I + C ( sI – A ) ------m m −1 BV −1 BV ≈ G c ( sI – A ) ------- C ( sI – A ) ------m m
V V −1 ≈ G c ( sI – A ) B ------- P ------m m −1
≈ G c ( sI – A ) B = L i
BV -------P m
(30.186)
−1
P
(30.187)
−1
P
(30.188)
−1
P
(30.189) (30.190)
The central idea (underneath the algebra) is that as µ goes to zero, the B feedback path within the compensator Kopt = [A − BGc − Hf C, Gc , Hf ] is broken (see Fig. 30.7) and the nice properties ©2002 CRC Press LLC
0066_Frame_C30 Page 32 Thursday, January 10, 2002 4:44 PM
−1
that hold at uˆ (e.g., open loop transfer function matrix at uˆ is L i = G c (sI – A) B ) in Fig. 30.7 get transferred to the plant input u (compensator output) within the feedback loop. Comment 30.13 (Stability Margins and Peak Sensitivity) The peak on the sensitivity plot is very important in the design of a feedback system. A large peak, for example, may be due to a closed loop pole near the imaginary axis. This certainly is undesirable. We thus want the peak to be “small.” It can be shown that the peak necessarily establishes gain and phase margin bounds. Suppose that the peak sensitivity is bounded above by a ≥ 1; i.e., smax S(jw) < a for all w. It can be shown that the feedback loop then enjoys the following nominal multivariable stability robustness (gain and phase) margin bounds:
a ↑GM > -----------a–1
(30.191)
a ↓GM < -----------a+1
(30.192)
−1 1 PM > 2 sin ------- 2a
(30.193)
These bounds may be easily motivated using SISO Nyquist [2,8] ideas as follows. If
S ( jw ) < a
(30.194)
1 --- < 1 + L ( j ω ) α
(30.195)
for all ω, then it follows that
for all ω. This, however, implies that the Nyquist plot associated with L cannot penetrate a circle centered at −1 with radius 1/α, left most end point at −[(α+1)/a], and right most end point at −[(α −1)/a]. The upward gain margin bound follows from the right most point of the circle. The downward gain margin bound follows from the left most point of the circle. The phase margin bound can be obtained with a little geometry. 2 The following example considers the application of H theory to a robotic manipulator. 2
Example 30.5 (H -LQG/LTR Design for PUMA 560 Robotic Manipulator) 2
In this example, we show how H optimization may be used to design an LQG/LTR controller for a PUMA 560 robotic manipulator. The manipulator is shown in Fig. 30.8. A two degree-of-freedom (dof) linear model P = [Ap, Bp, Cp] was used to initiate the design process. Linearizing the PUMA’s nonlinear model [9] about the equilibrium point θ1 = 90° θ2 = 0° (both links vertical), results in the following linear model:
x˙ p = A p x p + B p m p
(30.196)
yp = Cp xp
(30.197)
up = [ t1 t2 ]
©2002 CRC Press LLC
T
(30.198)
T x p = [ q 1 q 2 q˙1 q˙2 ]
(30.199)
yp = [ q1 q2 ]
(30.200)
T
0066_Frame_C30 Page 33 Thursday, January 10, 2002 4:44 PM
FIGURE 30.8 manipulator.
Two degree-of-freedom PUMA 560 robotic
where
0.0000 0.0000 0.0000 0.0000 Ap = 31.7613 – 33.0086 – 56.9381 187.7089
1.0000 0.0000 0.0000 0.0000
0.0000 1.0000 0.0000 0.0000
(30.201)
0.0000 0.0000 0.0000 0.0000 Bp = 1037.7259 – 3919.6674 – 3919.6674 2030.8306
(30.202)
Cp = [ I2 × 2 02 × 2 ]
(30.203)
The system poles are s = ±14.1050, s = ±4.5299. Eigenvector analysis shows that the fast instability at s = 14.1050 is primarily associated with the upper (shorter) link, while the slower instability at s = 4.5299 is primarily associated with the lower (longer) link. The system does not possess any natural integrators (i.e., no zero eigenvalues) and, as expected, the singular values σi[P(jω)] are flat at low frequencies (see Fig. 30.9). Closed Loop Objectives A controller to be implemented within a negative feedback loop is sought. The closed loop system should exhibit the following properties: (1) closed loop stability, (2) zero steady state error to step reference commands, (3) good low frequency reference command following (step commands followed with little overshoot within 3 s), (4) good low frequency disturbance attenuation, (5) good high frequency noise attenuation, (6) good stability robustness margins at the plant output. Each step of the control system design process is now described. A central idea is the formation of a 2 so-called design plant Pd from the original plant P. The design plant Pd is what is submitted to our H LQG/LTR design machinery. Step 1: Augment Plant P with Integrators to Get Design Plant Pd = [A, B, C] In order to guarantee zero steady-state error to step reference commands, we begin by augmenting the plant P = [Ap, Bp, Cp] with integrators—one in each control channel—to form the design plant Pd = [A, B, C]; i.e., Pd = P(I2×2/s). This is done as follows:
A =
©2002 CRC Press LLC
0 2×2 0 2×4 Bp
Ap
(30.204)
0066_Frame_C30 Page 34 Thursday, January 10, 2002 4:44 PM
Outputs: θ1, θ2 (deg);
Inputs: τ1, τ2 (lb–ft)
30
20
10
Singular Values (dB)
0
−10
−20
−30
−40
−50
−60 −1 10
0
1
10
2
10
10
Frequency (rad/sec)
FIGURE 30.9
PUMA 560 robotic manipulator singular values.
B =
1 2×2
(30.205)
0 4×2
C = [ 0 2×2 C p ]
(30.206)
x
The state of this system is x = x i where xi is the integrator state and xp is the plant state. The singular p values for the augmented system Pd exhibit a slope of −20 dB/dec at low frequencies as expected (see Fig. 30.10). The minimum singular value crosses zero dB just above 1 rad/s. The maximum singular value crosses zero dB at about 8 rad/s. −l
Step 2: Design Target Open Loop Transfer Function Matrix Lo = GKF = C(sI − A) Hf −l Next we design a target open loop transfer function matrix Lo = GKF = C(sI − A) Hf that has desirable closed loop properties (e.g., sensitivity singular values, pole locations, stability margins, etc.) at the output. To do this, we use Kalman Filtering ideas. Like LQR loops designed without a cross-state-control-coupling penalty, Kalman Filter loops designed in similar fashion exhibit desirable stability robustness margins (e.g., infinite upward gain margin, at least 6 dB downward gain margin, at least ±60° phase margin). This target loop design is carried out as follows: • Consider the augmented system shown in Fig. 30.11. It will be used to design a target loop transfer function matrix Lo = GKF with desirable closed loop −l properties at the output. To do so, we begin by forming an augmented system GFOL = C(sI − A) L with
L =
LL
(30.207)
LH
LL = [ Cp ( –Ap ) Bp ] –1
LH = ( –Ap ) Bp LL –1
©2002 CRC Press LLC
–1
(30.208) (30.209)
0066_Frame_C30 Page 35 Thursday, January 10, 2002 4:44 PM
Design Plant Singular Values 50
Singular Values (dB)
0
−50
−100 −1 10
0
1
10
2
10
10
Frequency (rad/sec)
FIGURE 30.10
PUMA 560 robotic manipulator design plant singular values.
FIGURE 30.11
Augmented system used for designing target loop. −l
The matrix LL matches the singular values of GFOL = C(sI − A) L at low frequencies. The matrix LH matches the singular values at high frequencies. Together, LL and LH match the singular values −l of GFOL = C(sI − A) L at all frequencies (see Fig. 30.12). Why is this? This selection for LL and LH results in
I –1 –1 G FOL = C p ( sI – A p ) L H + C p ( sI – A p ) B p - L L s I LH + Bp - LL s
(30.211)
I ( – A p ) –1 B p L L + B p - L L s
(30.212)
I –1 = C p ( sI – A p ) [ sI – A p ] ( – A p ) –1 B p L L - s
(30.213)
= C p ( sI – A p )
–1
= C p ( sI – A p )
–1
I –1 = Cp ( –Ap ) Bp LL - s I = s The resulting gain crossover frequency in Fig. 30.12 is 1 rad/s, as expected. ©2002 CRC Press LLC
(30.210)
(30.214) (30.215)
0066_Frame_C30 Page 36 Thursday, January 10, 2002 4:44 PM
GFOL Singular Values 30
20
Singular Values (dB)
10
0
−10
−20
−30
−40 −1 10
0
1
10
10
2
10
Frequency (rad/sec)
FIGURE 30.12
PUMA 560 robotic manipulator GFOL singular values.
Why match the singular values of GFOL in this manner? From the so-called Kalman Frequency Domain Equality (KFDE), it follows that
s i [ I + G KF ( jw ) ] =
1 2 1 + --- s i [ G FOL ( jw ) ] m
(30.216)
This suggests that by shaping GFOL, we can shape the target Lo = GKF . Specifically, if GFOL is large at low frequencies, then we expect (from KFDE)
1 L o ( jw ) = G KF ( jw ) ≈ -------G FOL ( jw ) m
(30.217)
at low frequencies. This shows that the matrix L should be used for shaping the target loop Lo = GKF while µ > 0 is used to adjust the target loop bandwidth—decreasing/increasing m to raise/lower the target loop bandwidth. Note that through our selection of L, we have made all of the plant’s unstable modes uncontrollable through L. Hence, (A, L) is NOT stabilizable! While this might appear to be troublesome, it is not. What matters is that the associated Hamiltonian belongs to dom(Ric) so that a stabilizing Hf exists. A necessary and suficient condition for this, however, is that (A, C) be detectable and (A, L) has no unobservable modes on the imaginary axis. Since each of these conditions are indeed satisfied, we can use the “are” command to find a stabilizing solution to the FARE. • Next we solved the FARE with Θ = µI2×2 (m = 0.1):
AY + YA + LL – YC Θ CY = 0 T
©2002 CRC Press LLC
T
T
–1
(30.218)
0066_Frame_C30 Page 37 Thursday, January 10, 2002 4:44 PM
Target Open Loop Singular Values at Output 40
30
Singular Values (dB)
20
10
0
−10
−20 −1 10
0
1
10
10
2
10
Frequency (rad/sec)
FIGURE 30.13
PUMA 560 robotic manipulator target loop GKF singular values.
for Y ≥ 0. The “are” command was used to do this, as it returns a stabilizing solution (provided that one exists). We then formed the filter gain matrix
H f = YC Θ T
–1
2.3635 0.0384 0.4085 0.3091 – 4.2300 = 13.1371 – 4.2300 30.4572 90.2377 – 83.4384 – 100.9668 467.7679
(30.219)
(30.220)
Doing so results in the following target closed loop poles (λi(A − Hf C)):
s = −3.1623, −3.1623, −4.5299, −4.5299, −14.1050, −14.1050
(30.221) −l
The singular values for the resulting target open loop transfer function matrix Lo = GKF = C(sI − A) Hf are shown in Fig. 30.13. The target open loop singular values—as expected from the KFDE—are matched at low frequencies with a slope of −20 dB/dec. They remain matched til about 1 rad/s, then they separate. This is expected since GFOL = I/s is not an achievable loop. (Not if closed loop stability matters!) The resulting filter gain matrix provides the necessary bandwidth to stabilize the unstable robotic manipulator, with open loop instabilities at s = 14.1050, 4.5299. One singular value crosses 0 dB just above 10 rad/s, the other just below 30 rad/s. µ was used to adjust the bandwidth. −1 The corresponding target sensitivity SKF = [I + GKF] singular values and complementary sensitivity −1 TKF = GKF[I + GKF] singular values are shown in Figs. 30.14 and 30.15, respectively. The associated
©2002 CRC Press LLC
0066_Frame_C30 Page 38 Thursday, January 10, 2002 4:44 PM
Target Sensitivity Singular Values at Output 0
−5
Singular Values (dB)
−10
−15
−20
−25
−30
−35 −1 10
0
1
10
2
10
10
Frequency (rad/sec)
FIGURE 30.14
−1
PUMA 560 robotic manipulator target sensitivity SKF = [I + GKF] singular values.
Target Comp Sensitivity Singular Values at Output 10
5
Singular Values (dB)
0
−5
−10
−15
−20 −1 10
0
1
10
10
2
10
Frequency (rad/sec)
FIGURE 30.15 values.
PUMA 560 robotic manipulator target complementary sensitivity TKF = GKF[I + GKF]
©2002 CRC Press LLC
−1
singular
0066_Frame_C30 Page 39 Thursday, January 10, 2002 4:44 PM
sensitivity and complementary sensitivity singular values are desirable in that they suggest that the target loop will possess: • • • •
good low frequency command following properties, good low frequency disturbance attenuation properties, good high frequency sensor noise attenuation properties, and good MIMO stability margins (nearly infinite upward gain margin, at least 6 dB downward gain margin, and at least ±60° phase margin) at the output.
The complementary sensitivity singular values suggest that a reference command prefilter W would reduce overshoot due to step reference commands. The design of such a filter will be considered below. Step 3: Solve Cheap Control Problem to Recover Target Loop at Plant Output Next we solve an appropriately formulated “cheap LQR control problem” that would produce a control 2 gain matrix Gc such that the H optimal model-based compensator Kd = [A − BGc − Hf C, Hf , Gc] with Pd = [A, B, C] approximates (“recovers”) the target loop transfer function matrix Lo = GKF; i.e.,
P d K d ≈ L o = G KF
(30.222) −13
This was done by solving the following CARE (using the “lqr” command) with R = ρI2×2(ρ = 10 ):
XA + A X + C C – XBR B X = 0 T
T
–1
T
(30.223)
for X ≥ 0 and forming the control gain matrix
Gc = R B X –1
=
T
(30.224)
987.9832 – 543.0034 3162945.2928 56.9921 13941.9005 2069.8324 – 543.0034 3657.5891 11.7867 3162634.3919 2069.7987 3765.7978
(30.225)
Doing so yields the following closed loop regulator poles (li(A − BGc)):
s = −440.8808, −220.4404 ± j381.7871, −1881.9053, −940.9527 ± j1629.7168 (30.226) All have damping factors greater than or equal to ζ = 0.5. As a practical note to facilitate real-time implementation of the resulting controller, one might use model reduction techniques [10] to remove some of the very high frequency poles in the compensator. Doing so would permit using a larger integration step size in any real-time embedded system or microprocessor implementation. Step 4: Construct Final Controller K Next we form the final controller as follows:
K K = -----d s
(30.227)
[ A – BG c – H f C, H f , G c ] = ---------------------------------------------------------s
(30.228)
= [ Ak , Bk , Ck ]
(30.229)
A state space representation for this controller is given by
AK =
02 × 2
0 6 × 2 A – BG c – H f C
CK = I2 × 2 02 × 6 ©2002 CRC Press LLC
Gc
,
BK =
02 × 2 Hf
(30.230) (30.231)
0066_Frame_C30 Page 40 Thursday, January 10, 2002 4:44 PM
With this selection, we have
K PK = P -----d s
(30.232)
I2 × 2 -K = P -------s d
(30.233)
= Pd Kd
(30.234)
≈ L o = G KF
(30.235)
Through this selection of K, we have recovered the target loop transfer function matrix Lo = GKF . That is, K has approximately inverted P (from the right) in order to achieve PK ≈ Lo = GKF . An examination of the singular values for the actual loop PK shows that the actual singular values agree with the target singular values up to and beyond 100 rad/s. Loop Transfer Recovery. Why were we able to recover the target loop? The recovery was permitted by the model-based structure of the compensator K, the Riccati equations used to obtain the gain matrices Gc and Hf , and the fact that the plant P = [Ap, Bp, Cp] (and hence the design plant P d = [A, B, C] = P(I/s) is minimum phase. The minimum phase condition, specifically, is a suficient condition which guarantees T T that there exists an orthonormal matrix U(U U = UU = I) such that
lim r →0
+
rG c = UC
(30.236)
This limiting behavior relating the control gain matrix and the design plant’s C matrix, however, can be used to prove that loop transfer recovery takes place; i.e.,
lim P d K d = lim PK = L o = G KF
r→0
+
r →0
+
(30.237)
Step 5: Design Command Pre-filter W The MATLAB command
t 0 ( a – b ∗ g – h ∗ c, h, g )
(30.238)
can be used to find the compensator’s transmission zeros. These are also zeros of the closed loop transfer function matrix from r to y. The final compensator (as well as the target loop GKF) has zeros near s ≈ −1.2. Given this, a reference command prefilter
1.2 W = ---------------- I 2 × 2 s + 1.2
(30.239)
was added outside the loop to filter reference commands. By so doing, we ensure that step reference commands for θ1 and θ2 are followed in the steady state (due to integrators in controller) without excessive overshoot during the transient. Sensitivity Frequency Response The resulting sensitivity singular values are plotted in Fig. 30.16. The plot suggests that low frequency reference commands r will be followed and low frequency output disturbances do will be attenuated. More precisely, reference commands r with frequency content below 0.3 rad/s should be followed to within about 20 dB; that is, with a steady-state error of about 10%. Similarly, output disturbances do with frequency content below 0.3 rad/s should be attenuated by approximately 20 dB. ©2002 CRC Press LLC
0066_Frame_C30 Page 41 Thursday, January 10, 2002 4:45 PM
Sensitivity Singular Values at Error 5
0
Singular Values (dB)
−5
−10
−15
−20
−25
−30 −1 10
0
1
10
10
2
10
Frequency (rad/sec)
FIGURE 30.16
PUMA 560 sensitivity frequency response at error. Closed Loop Singular Values (r to y) 10
0
Singular Values (dB)
−10
−20
−30
−40
−50
−60 −1 10
0
1
10
10
2
10
Frequency (rad/sec)
FIGURE 30.17
PUMA 560 reference to output frequency response.
Reference to Output Frequency Response The transfer function matrix from reference commands r to link angles y is
T ry = [ I + PK ] PKW –1
(30.240)
Its singular values are plotted in Fig. 30.17. The plot suggests that low frequency reference commands will be followed in the steady state and that little overshoot will result during the transient. ©2002 CRC Press LLC
0066_Frame_C30 Page 42 Thursday, January 10, 2002 4:45 PM
Response to Step Reference Command for θ1 1.2
1
Outputs (deg)
0.8
0.6
0.4
0.2
0
−0.2
FIGURE 30.18
0
0.2
0.4
0.6
0.8
1 1.2 Time (seconds)
1.4
1.6
1.8
2
1.6
1.8
2
PUMA 560 outputs: response to θ1 reference command. Response to Step Reference Command for θ1 0.6
0.4
Controls (lb–ft)
0.2
0
−0.2
−0.4
−0.6
−0.8 0
FIGURE 30.19
0.2
0.4
0.6
0.8
1 1.2 Time (seconds)
1.4
PUMA 560 controls: response to θ1 reference command.
Response to Θ1 Step Reference Command The response to a unit step θ1 command is plotted in Fig. 30.18. As expected, θ1 follows the step command well, with no overshoot and settling in about 1.6 s. The associated θ2 response is small, indicating little cross coupling in the final closed loop system. The corresponding controls are plotted in Fig. 30.19. They are acceptable in size. ©2002 CRC Press LLC
0066_Frame_C30 Page 43 Thursday, January 10, 2002 4:45 PM
Response to Step Reference Command for θ2 1.2
1
Outputs (deg)
0.8
0.6
0.4
0.2
0
−0.2
FIGURE 30.20
0
0.2
0.4
0.6
0.8
1 1.2 Time (seconds)
1.4
1.6
1.8
2
1.6
1.8
2
PUMA 560 outputs: response to θ2 reference command. Response to Step Reference Command for θ
2
0.1
Controls (lb–ft)
0.05
0
−0.05
−0.1
−0.15
FIGURE 30.21
0
0.2
0.4
0.6
0.8
1 1.2 Time (seconds)
1.4
PUMA 560 controls: response to θ2 reference command.
Response to Θ2 Step Reference Command The response to a unit step θ2 command is plotted in Fig. 30.20. As expected, θ2 follows the step command well, with no overshoot and settling in about 3 s. The associated q1 response is small, indicating little cross coupling in the final closed loop system. The corresponding controls are plotted in Fig. 30.21. They are acceptable in size. ©2002 CRC Press LLC
0066_Frame_C30 Page 44 Thursday, January 10, 2002 4:45 PM
2
30.4 H State Feedback Problem This section shows that the methods presented for output feedback may be readily adopted to permit 2 the design of H optimal constant gain state feedback control laws (control gain matrices Gc) as well.
Generalized Plant Structure for State Feedback For this case, the generalized plant G (including plant P and weighting functions) takes the following form:
G =
G 11 G 12 G 21 G 22
=
A
B1
B2
C1
0 nz × nw
D 12
I n × n 0 ny × nw 0 ny × nu
= A B C D
(30.241)
This implies that the measured signals y are the states x of the generalized plant G. As such, all of the modes of A are observable through C2 = In × n.
State Feedback Assumptions The standard state feedback assumptions are a subset of those required for the output feedback problem formulation. The state feedback assumptions are as follows. 2
Assumption 30.2 (H State Feedback Problem) Throughout this section, it will be assumed that 1. Plant G22 Assumption. (A, B2) stabilizable. T 2. Nonsingular Control Weighting Assumption. R = D 12 D 12 > 0 (D12 full column rank). jwI – A – B 2 has full column rank for all ω. 3. Regulator Assumption. C1
D 12
It should be noted that if D 12 C 1 = 0, then (3) is equivalent to (A, C1) having no unobservable imaginary modes. If (A, C1) is detectable, then this is satisfied. T
H 2 Optimal State Feedback Control Law 2
The H optimal controller is given by
K opt = – G c where the control gain matrix G c ∈R
nu × n
(30.242)
is given by
G c = R [ B 2 X + D 12 C 1 ] T
–1
T
(30.243)
where X ≥ 0 is the unique (at least) positive semi-definite solution of the CARE: T
( A – B 2 R D 12 C 1 ) X + X ( A – B 2 R D 12 C 1 ) + C 1 ( I – D 12 R D 12 )C 1 – XB 2 R B 2 X = 0 (30.244) –1
T
–1
T
T
T
–1
T
–1
T
The closed loop poles that result from the above constant gain state feedback control law are the eigenvalues of A − B2Gc. The minimum closed loop norm is given by
min T wz K
©2002 CRC Press LLC
H
2
=
trace ( B 1 XB 1 ) T
(30.245)
0066_Frame_C30 Page 45 Thursday, January 10, 2002 4:45 PM
State Feedback Loop Shaping If one selects
B2 = B C1 =
D 12 =
(30.246)
M 0 nu × n
(30.247)
0 ny × nu
(30.248)
rI nu × nu
R = rI nu × nu
(30.249)
1 T G c = --- B 2 X r
(30.250)
then D 12 C 1 = 0 and we have T
where X ≥ 0 is the unique (at least) positive semi-definite solution of the CARE:
1 T T T A X + XA + M M – XB --- B X = 0 r
(30.251)
The following LQFDE may be derived from the CARE:
1 H [ I + G LQ ( jw ) ] [ I + G LQ ( jw ) ] = I + ------- G OL ( jw ) r
H
1 ------- G OL ( jw ) r
(30.252)
where
G OL = M ( sI – A ) B
(30.253)
G LQ = G c ( sI – A ) B
(30.254)
–1
–1
Given this, the loop shaping ideas discussed earlier are applicable. A designer may use the matrix M and the scalar ρ > 0 to shape GOL in an effort to get a desirable loop GLQ. The matrix M, specifically, may be used to match singular values at low frequencies, high frequencies, all frequencies, etc. Assuming that (A, B) is stabilizable and (A, M) has no imaginary modes that are unobservable, a stabilizing solution is guaranteed to exist. Moreover, the resulting GLQ loop will possess nominal sensitivity and stability robustness properties—a consequence of the LQFDE. The resulting control gain matrix Gc may be used within a state feedback loop, a modified state feedback loop, or within a model-based compensator.
©2002 CRC Press LLC
0066_Frame_C30 Page 46 Thursday, January 10, 2002 4:45 PM
2
30.5 H Output Injection Problem This section shows how the methods presented for output feedback may be readily adopted to permit 2 the design of H optimal state estimators (filter gain matrices Hf ) as well.
Generalized Plant Structure for Output Injection For this case (dual to the state feedback case), the generalized plant G (including plant P and weighting functions) takes the following form:
A
G 11 G 12
G =
B1
In × n
0 nz × nu = A B C D 0 ny × nu
= C 1 0 nz × nw
G 21 G 22
C2
D2
(30.255)
This implies that the control signals u directly impact all of the generalized plant states x. As such, all of the modes of A are controllable through B2 = I n × n .
Output Injection Assumptions The standard output injection assumptions are a subset of those required for the output feedback problem formulation. The output injection assumptions are as follows. 2
Assumption 30.3 (H Output Injection Problem) Throughout this section, it will be assumed that 1. Plant G22 Assumption. (A, C2) detectable. T 2. Nonsingular Measurement Weighting Assumption. Θ = D 21 D 21 > 0 (D21 full row rank). 3. Filter Assumption. jwI – A – B has full row rank for all ω. C1
D 21
It should be noted that if B 1 D 21 = 0, then (3) is equivalent to (A, B1) having no uncontrollable imaginary modes. If (A, B1) is stabilizable, then this is satisfied. T
H 2 Optimal Output Injection Law 2
The H optimal controller is then given by
K opt = – H f where the filter gain matrix H f ∈ R
n × ny
(30.256)
is given by
H f = [ YC 2 + B 1 D 21 ]Θ T
T
–1
(30.257)
where Y ≥ 0 is the unique (at least) positive semi-definite solution of the FARE: –1
( A – B 1 D 21 Θ C 2 )Y + Y ( A – B 1 D 21 Θ C 2 ) + B 1 ( I – D 21 Θ D 21 )B 1 – YC 2 Θ C 2 Y = 0 (30.258) T
T
–1
T
T
–1
T
T
–1
The closed loop poles that result from the above output injection law are the eigenvalues of A − Hf C2. The minimum closed loop norm is given by
min T wz K
where Y is the solution to the FARE. ©2002 CRC Press LLC
H
2
=
T trace C 1 YC 1
(30.259)
0066_Frame_C30 Page 47 Thursday, January 10, 2002 4:45 PM
Estimator (Filter) Loop Shaping If one selects
B 1 = [ L 0 n × ny ] D 21 = [ 0 ny × nu
(30.260) mI ny × ny ]
(30.261)
C2 = C
(30.262)
Θ = mI ny × ny
(30.263)
then B 1 D 21 = 0 and we have T
T1 H f = YC 2 --m
(30.264)
where Y ≥ 0 is the unique (at least) positive semi-definite solution of the FARE:
YA + AY + LL – YC Θ CY = 0 T
T
T
–1
(30.265)
Given this, the following KFDE may be derived from the FARE:
[ I + G KF ( jw ) ] [ I + G KF ( jw ) ]
H
1 1 = I + -------G FOL ( jw ) -------G FOL ( jw ) m m
H
(30.266)
where −1
G FOL = C ( sI – A ) L
(30.267)
−1
G KF = C ( sI – A ) H f
(30.268)
Given this, the loop shaping ideas discussed earlier are applicable. A designer may use the matrix L and the scalar µ > 0 to shape GFOL in an effort to get a desirable loop GKF . The matrix L, specifically, may be used to match singular values at low frequencies, high frequencies, all frequencies, etc. Assuming that (A, C) is detectable and (A, L) has no imaginary modes that are uncontrollable, then a stabilizing solution is guaranteed to exist. Moreover, the resulting GKF loop will possess nominal sensitivity and stability robustness properties—a consequence of the KFDE. The resulting filter (output injection) gain matrix Hf may be used within an estimator (feedback) loop, a modified estimator (feedback) loop, or within a model-based compensator.
30.6 Summary 2
This chapter has presented a general framework for control system design via H optimization. While the focus has been on continuous time LTI systems, the methods are very flexible and have wide application. They may be used to design constant gain state feedback control laws, constant gain state estimators, dynamic output feedback controllers, and much more. Weighting functions are easily accommodated within the generalized plant framework presented. Such functions may be used to achieve closed loop design objectives. All of the ideas presented may be extended with subtle (all be it very important) ©2002 CRC Press LLC
0066_Frame_C30 Page 48 Thursday, January 10, 2002 4:45 PM
∞
modifications, to accommodate control system design via H optimization. Additional details may be found in [8,11]. The methods presented in this chapter may be extended to discrete time linear shift invariant (LSI) systems. Extensions to sampled data systems are also possible [1].
References 1. Chen, T. and Francis, B., Optimal Sampled-Data Control Systems, Springer, London, 1995. 2. Dorf, R.C. and Bishop, R.H., Modern Control Systems, Addison Wesley, 8th edition, CA, 1998. 3. Doyle, J.C., “Guaranteed margins for LQG regulators,” IEEE Transactions on Automatic Control, Vol. AC-23, No. 4, August 1978, pp. 756–757. 2 4. Doyle, J.C., Glover, K., Khargonekar, P.P., and Francis, B.A., “State-space solutions to standard H ∞ and H control problems,” IEEE Transactions on Automatic Control, Vol. AC-34, No. 8, 1989, pp. 831– 847. Also see Proceedings of the 1988 American Control Conference, Atlanta, Georgia, June, 1988. 5. Kalman, R.E., “A new approach to linear filtering and prediction problems,” ASME Journal of Basic Engineering, Vol. 85, 1960, pp. 34–45. 6. Kalman, R.E. and Bucy, R.S., “New results in linear filtering and prediction problems,” ASME Journal of Basic Engineering, 1960, pp. 95–108. 7. Kwakernaak, H. and Sivan, R., Linear Optimal Control Systems, Wiley-Interscience, New York, 1972. 8. Rodriguez, A.A., A Practical Neo-Classical Approach to Feedback Control System Analysis and Design, Control3D, 2000. 9. Spong, M.W. and Vidyasagar, M., Robot Dynamics and Control, John Wiley and Sons, New York, 1989. 10. Zhou, K., Doyle, J.C., and Glover, K., Robust and Optimal Control, Prentice-Hall, NJ, 1996. 11. Zhou, K. and Doyle, J.C., Essentials of Robust Control, Prentice-Hall, NJ, 1998.
©2002 CRC Press LLC
31 Adaptive and Nonlinear Control Design 31.1 31.2 31.3 31.4
Introduction Lyapunov Theory for Time-Invariant Systems Lyapunov Theory for Time-Varying Systems Adaptive Control Theory Regulation and Tracking Problems • Certainty Equivalence Principle • Direct and Indirect Adaptive Control • Model Reference Adaptive Control (MRAC) • Self-Tuning Controller (STC)
Maruthi R. Akella The University of Texas at Austin
31.5 31.6 31.7 31.8 31.9
Nonlinear Adaptive Control Systems Spacecraft Adaptive Attitude Regulation Example Output Feedback Adaptive Control Adaptive Observers and Output Feedback Control Concluding Remarks
31.1 Introduction The most important challenge for modern control theory is that it should deliver acceptable performance while dealing with poor models, high nonlinearities, and low-cost sensors under a large number of operating conditions. The difficulties encountered are not peculiar to any single class of systems and they appear in virtually every industrial application. Invariably, these systems contain such a large amount of model and parameter uncertainty that “fixed”controllers can no longer meet the stability and performance requirements. Any reasonable solution for such problems must be a suitable amalgamation between nonlinear control theory, adaptive elements, and information processing. Such are the factors behind the birth and evolution of the field of adaptive control theory, strongly motivated by several practical applications such as chemical process control and design of autopilots for high-performance aircraft, which operate with proven stability over a wide variety of speeds and altitudes. A commonly accepted definition for an adaptive system is that it is any physical system that is designed 1 from an adaptive standpoint! All existing stability and convergence results, in the field of adaptive control theory, hinge on the crucial assumption that the unknown parameters must occur linearly within the plant containing known nonlinearities. Conceptually, the overall process makes the parameter estimates themselves as state variables, thus enlarging the dimension of the state space for the original system. By nature, adaptive control solutions for both linear and nonlinear dynamical systems lead to nonlinear time-varying formulations wherein the estimates of the unknown parameters are updated using input–output data. A parameter adaptation mechanism (typically nonlinear) is used to update the parameters within the control law. Given the nonlinearity due to adaptive feedback, there is the need to ensure that the closed-loop stability is preserved. It is thus an unmistakable fact that the fields of adaptive control and nonlinear system stability are intrinsically related to one another and any new insights gained in one
©2002 CRC Press LLC
0066_frame_C31.fm Page 2 Wednesday, January 9, 2002 7:49 PM
field would be of potential benefit to the other. Many formalisms in nonlinear stability theory can be employed such as the Lyapunov direct method and passivity-based methods. We will first present some important mathematical and analytical tools for studying the stability of nonlinear dynamical systems.
31.2 Lyapunov Theory for Time-Invariant Systems The Lyapunov direct method is a commonly adopted and arguably one of the most popular methods for proving closed-loop stability in the adaptive control area. It is not restricted to local system behavior and determines the stability properties of the nonlinear system by considering the time evolution of the system solutions with respect to an “energy-like” scalar function, often known as the Lyapunov function. Consider any dynamical system represented by the following nonlinear autonomous differential equation
x˙ = f ( x ),
f(0) = 0
(31.1)
Obviously x(t) = 0 is a solution. A sufficient condition for the existence and uniqueness of solutions for Eq. (31.1) is that f (x) be locally Lipschitz, that is,
f(x) – f(y) ≤ L x – y
(31.2)
for all x and y in a finite neighborhood of the origin. We are interested in the stability of the solutions of Eq. (31.1) in the presence of perturbations. Before discussing the main Lyapunov stability theorems, we present some important definitions. Definition: Lyapunov stability The solution x(t) = 0 of Eq. (31.1) is called stable in the sense of Lyapunov if for all > 0, there exists a δ() > 0 such that for all initial conditions satisfying x ( 0 ) < δ, we have x ( 0 ) < for t ∈ [0, ∞). The solution is unstable if it is not stable. The solution is asymptotically stable if it is stable and there exists a δ > 0 such that every initial condition that satisfies x ( 0 ) < δ has the property
lim x ( t ) = 0 t→∞
The solution is globally asymptotically stable if it is asymptotically stable for all initial conditions. These definitions refer to stability of particular solutions of Eq. (31.1) with respect to initial conditions and not to the stability of differential equations. Definition: Positive definite and semidefinite functions n Any continuously differentiable function V : R → R is called positive definite if (i)V(0) = 0 and (ii) V(x) > 0 for all x ≠ 0. A function is positive semidefinite if condition (ii) is replaced by V(x) ≥ 0 for all x ≠ 0. Theorem: Lyapunov’s stability theorem for time-invariant systems n If there exists a positive definite function V : R → R such that the time derivative of V along the solution of x˙ = f (x) given by
d ∂V ----- V = ------dt ∂x
T
∂V T x˙ = ------- f ( x ) ∂x
is negative semidefinite, then the solution x(t) = 0 of Eq. (31.1) is stable. In this case, the solution converges n to the set {x ∈ R : V˙ (x) = 0}. If V˙ is negative definite, then the solution is asymptotically stable. Furthermore, if V˙ is negative definite and V(x) → ∞ as x → ∞, then the solution is globally asymptotically stable. The function V(x) is called a Lyapunov function for the system described by Eq. (31.1). ©2002 CRC Press LLC
0066_frame_C31.fm Page 3 Wednesday, January 9, 2002 7:49 PM
Remark: Lyapunov’s theorem, though simple to state, has powerful applications in the stability analysis of nonlinear systems. However, since the theorem provides only a sufficient condition in terms of the Lyapunov function, we are often encountered with the difficult problem of finding a suitable Lyapunov function. In the special case when Eq. (31.1) is a stable linear system,
x˙ = A m x a quadratic Lyapunov function V = x Px exists where P is a symmetric positive definite matrix satisfying the so-called Lyapunov equation T
A m P + PA m = – Q T
(31.3)
for any symmetric positive definite Q matrix. On the other hand, there is no general recipe for construction of Lyapunov functions for nonlinear systems. As a rule of thumb, in the case of mechanical systems, “energy-like”quantities are good candidates for a first attempt.
31.3 Lyapunov Theory for Time-Varying Systems We are now ready to consider the stability of solutions for a time-varying (nonautonomous) differential equation
x˙ = g ( x,t ),
g ( 0,t ) = 0 ∀t ≤ 0
(31.4)
The function g is assumed to be piecewise continuous with respect to t and locally Lipschitz in x about a neighborhood of the solution x(t) = 0. This would guarantee that the origin is an equilibrium for Eq. (31.4). In order to investigate the stability of equilibrium for this nonautonomous system, it is important to recognize that any solution of Eq.(31.4) depends not only on time t but also on the initial time t0. Thus, we need to revisit our previous definitions of stability. Definition: Uniform Lyapunov stability The solution x(t) = 0 for Eq.(31.4) is uniformly stable if for every > 0, there exists a δ() > 0 that is independent of the initial time t0 such that
x ( t0 ) < d
implies
x(t) <
∀t ≥ t 0 ≥ 0
The solution is uniformly asymptotically stable if it is uniformly stable and there is a positive constant ρ independent of t0 such that x ( t ) → 0 as t → ∞ for all x ( t 0 ) < ρ. The solution is globally uniformly asymptotically stable if it is uniformly asymptotically stable for all initial conditions. The main stability theorem for nonautonomous systems requires the definition of certain class K functions. Definition: Class K functions A continuous function α : [0, a) → [0, ∞) is said to belong to class K if it is strictly increasing and α(0) = 0. It is said to belong to class K∞, or radially unbounded, if a = ∞ in such a way that α(r) → ∞ as r → ∞. Theorem: Lyapunov’s stability theorem for time-varying systems n Consider a set D = {x ∈R : x ≤ R} about the equilibrium x(t) = 0 for Eq. (31.4). If there exists a scalar n + function V: R × R → R with continuous partial derivatives such that (i) a 1 ( x ) ≤ V ( x, t ) ≤ a 2 ( x ) positive definite and decrescent
∂V ∂t
∂V ∂x
T
(ii) V˙ = ------ + ------ g ( x, t ) ≤ a 3 ( x ) for all t ≥ 0, where a1, a 2, and a 3 are class K functions, then the equilibrium point x = 0 is uniformly asymptotically stable. ©2002 CRC Press LLC
0066_frame_C31.fm Page 4 Wednesday, January 9, 2002 7:49 PM
Remark: Note that in order to show stability for nonautonomous systems, it is necessary to bound the function V(x, t) by the class K functions that do not depend upon time t. A detailed treatment of all the 2 3 definitions and proof for this theorem can be found in Slotine and Li and Khalil. Remark: In the recent years, several interesting converse Lyapunov results have been obtained. In particular, for every uniformly stable (or uniformly asymptotic stable) system, there exists a positive definite 4 Lyapunov function with a negative semidefinite time derivative (see Sastry and Bodson ). These results are particularly useful from a closed-loop performance point of view because they allow us to explicitly estimate the convergence rates in some cases of nonlinear adaptive control systems. The application of Lyapunov’s stability theorem for nonautonomous systems arising out of adaptive control often leads us to negative semidefinite time derivatives of the Lyapunov function. Therefore, asymptotic stability analysis is a much harder problem and the following result, known as Barbalat’s Lemma, is extremely useful in such situations. Lemma: Barbalat. Consider a uniformly continuous function f : R → R defined at all real values of t ≥ 0. If
lim
∫
t
t→∞ 0
f ( s ) ds
exists and is finite, then f(t) → 0 as t → ∞. Remark: A consequence of this result is that if f ∈L 2 and f ∈L∞, then f(t) → 0 as t → ∞ (see Slotine 2 5 and Li and Tao for discussion and proof).
31.4 Adaptive Control Theory In contrast to a fixed or ordinary controller, an adaptive controller is one with adjustable parameters and an adjustment mechanism. The following are some basic concepts that are necessary for any discussion of adaptive control theory.
Regulation and Tracking Problems The desired objective for any control problem is to maintain the plant output either at its desired value or within specified/acceptable bounds of the desired value. If these desired values are constant with respect to time, we have a regulation problem, otherwise it is a tracking problem.
Certainty Equivalence Principle This principle has been the bedrock of most adaptive control design methods and has received consid4, 6, 7 Adaptive controllers based on this approach are obtained erable attention during the past two decades. by independently designing a control law that meets the control objective assuming complete knowledge of all the unknown plant parameters (deterministic case), along with a parameter update law, which is usually a differential equation that generates online parameter estimates that are used to replace the unknown parameters within the control law. Such a controller would have perfect output tracking capability in the case when the plant parameters are exactly known. In the presence of parameter uncertainty, the adaptation mechanism will adjust the controller parameters so that the tracking objective is asymptotically achieved. The main issue, thus, in adaptive controller design is to synthesize the adaptation mechanism (parameter update law) that will guarantee that the control system remains stable and the output tracking error converges to zero as the parameter values are updated. ©2002 CRC Press LLC
0066_frame_C31.fm Page 5 Wednesday, January 9, 2002 7:49 PM
Direct and Indirect Adaptive Control There exist two philosophically distinct approaches within adaptive control for plants containing unknown or uncertain parameters. The first of those is the so-called direct approach where the controller parameters are directly adjusted by the adaptation mechanism in such a way to optimize some pre-specified performance index based on the output. The second approach is the indirect approach wherein plant parameters are directly estimated and updated by the adaptation law and these estimated values are then used to compute the controller parameters. Direct adaptive control eliminates the need for this additional computation. Consequently, indirect adaptive control is plant parameter adaptive, whereas direct adaptive control is output performance adaptive. The plant parameter identification process is explicit within the direct approach while implicit in the direct approach. Hence, they have also been referred to as explicit and implicit approaches. In both of these cases, the controller structure remains the same and is determined from the certainty equivalence principle.
Model Reference Adaptive Control (MRAC) The MRAC framework consists of four parts: (i) the plant containing the unknown parameters, (ii) a suitable reference model for specifying the desired output characteristics, (iii) a feedback control law that contains adjustable parameters, and (iv) an adaptation mechanism that updates the adjustable parameters within the control law. A schematic sketch for this framework is shown in Fig. (31.1). The plant is assumed to have a known structure with unknown parameters. For the case of linear systems, this means that the number of poles and zeros are assumed to be known, but the exact locations of poles and zeros are unknown. In the case of nonlinear systems, the structure of the governing equations of motion is assumed to be known, but some of the parameters appearing linearly within those equations can be unknown. The reference model specifies the desired output behavior expected from the plant as a result of the external reference input. It provides the ideal plant response which the adaptation mechanism should seek to track while updating the parameter estimates. The choice of the reference plant lies at the heart of any MRAC design and any acceptable selection must essentially satisfy two crucial requirements. The first of these requirements is that the reference model must accurately reflect the closed-loop performance specifications such as rise time, settling time, overshoot, and other transient performance characteristics. The other requirement is that given the assumed structure of the plant dynamics, the reference model’s output behavior should be asymptotically achievable by the adaptive control system implying certain extra conditions on the relative degree of the reference model and persistent excitation conditions on the reference input. The controller structure is dictated by the certainty equivalence
Reference Model
r (t ) reference input
Controller
ym(t )
u (t )
controller parameters
parameter estimates
FIGURE 31.1
Adaptive Update Mechanism
The model reference adaptive control framework.
©2002 CRC Press LLC
Plant unknown parameters
−
y (t ) +
e (t )
0066_frame_C31.fm Page 6 Wednesday, January 9, 2002 7:49 PM
Controller
r (t ) reference input
u (t )
controller parameters
parameter estimates
FIGURE 31.2
Plant
y (t )
unknown parameters
Adaptive Update Mechanism
The self-tuning control architecture.
principle and both direct and indirect parameter update procedures can be adopted within the MRAC framework. Much of the work in this area deals with continuous time systems.
Self-Tuning Controller (STC) In contrast to MRAC, there is no reference model in the STC design. A schematic sketch is shown in Fig. 31.2. In this formulation, the controller parameters of the plant parameters are estimated in real time, depending on whether it is a direct or indirect approach. These estimates are then used as if they are equal to the true parameters (certainty equivalence design). Parameter estimation involves finding the best-fit set of parameters based on the plant input–output data. This is different from the MRAC parameter adaptation scheme, where the parameter estimates are updated in such a way to achieve asymptotic tracking between the tracking error between the plant and the reference model. In several STC estimation schemes, it is also possible to quantify a measure of the quality of the parameter estimates, which can be used in the design of the controller. Many different combinations of the estimation methods can be adopted and can be applied to both continuous time and discrete time plants. Due to the “separation” between parameter estimation and control in STC, there is greater fiexibility in design. However, stability and convergence are difficult to prove and stronger conditions on input signals are required (persistent excitation) to guarantee parameter convergence. Historically speaking, STC designs arose in the study of the stochastic regulation problem and much of the literature is devoted to discrete time plants using an indirect approach. In spite of the seeming difference between MRAC and STC, a 8 direct correspondence exists between problems from both the areas.
31.5 Nonlinear Adaptive Control Systems For the most general case of nonlinear systems, there exists very limited theory in the field of adaptive control. Even though there is great interest in this area due to potential applications in a wide variety of complex machanical systems, theoretical diffculties exist because of the lack of general analysis tools. However, some important special cases are well understood by now, and we summarize the conditions that these classes of systems satisfy: 1. The unknown parameters within the nonlinear plant are linearly parameterized. 2. The complete state vector is measured. 3. When the unknown parameters are assumed known, the control input can cancel all the nonlinearities in a feedback-linearization sense and any remaining internal dynamics should be stable. The adaptive design is then accomplished by certainty equivalence. We now show a typical nonlinear MRAC methodology to deal with a situation in which the nonlinear plant model has unknown parameters. Consider the nonlinear system
x˙ = q f ( x ) + u
©2002 CRC Press LLC
(31.5)
0066_frame_C31.fm Page 7 Friday, January 18, 2002 5:51 PM
where θ is a constant and unknown matrix parameter, and f is a known and differentiable nonlinear vector function. In analogy with the MRAC methodology, we assume that it is desired to have the state x asymptotically track the state xm of a reference system that satisfies
x˙ m = A m x m + r
(31.6)
where r(t) is any piecewise continuous and bounded reference input and Am is a Hurwitz matrix. Introduce an error vector e = x − xm so that the error dynamics can be established by taking the difference between Eqs. (31.5) and (31.6) as follows:
e˙ = θ f ( x ) – A m x m – r + u
(31.7)
If the parameter θ is assumed to be known, selecting the control input u = Am x + r − θ f(x) would render the following structure for the error dynamics:
e˙ = A m e which would achieve the control objective. However, such a choice of control law is not impossible because θ is unknown. Hence we retain the same structure for the control law except for replacing θ by its time-varying estimate θˆ so that the certainty-equivalence-based adaptive control law is given by
u = A m x + r – θˆ f ( x )
(31.8)
Application of the control law in Eq. (31.7) leads us to the following closed-loop error dynamics:
e˙ = A m e – θ˜ f ( x )
(31.9)
where we have introduced the variable θ˜ (t) to represent the parameter estimation error θˆ (t) − θ. There are two things remaining to be done: (i) to show the stability and asymptotic convergence of e(t) to zero as t → ∞, (ii) to provide an appropriate parameter adaptation mechanism for θˆ (t). We accomplish both these tasks by adopting the Lyapunov method. Given that Am is Hurwitz, for any choice of symmetric and positive definite matrix Q, there exists a symmetric, positive definite matrix P that satisfies the Lyapunov equation given in Eq. (31.3). Choosing a Lyapunov function in terms of such a P matrix, T –1 T V = e Pe + tr [θ˜ Γ θ˜ ]
(31.10)
where Γ is a symmetric positive definite learning rate matrix. Taking the time derivative of V along the solutions of Eq. (31.9) we find that T –1 ˙ T T T V˙ = e ( PA m + A m P )e – 2e P θ˜ f ( x ) + 2 tr [θ˜ Γ θ˜ ]
(31.11)
9
Using several matrix trace identities, it is possible to show that T
e Pθ˜ f ( x ) = tr [ Pθ˜ f ( x )e ] = tr [θ˜ f ( x )e P ] = tr [ θ˜ Pe f ( x ) ] T
T
T
T
so that we can combine the last two terms on the right-hand side of Eq. (31.11) as follows:
T T T –1 ˙ T V˙ = e ( PA m + A m P ) e + 2 tr [ θ˜ { Γ θ˜ – Pef ( x ) } ]
–Q
©2002 CRC Press LLC
(31.12)
0066_frame_C31.fm Page 8 Friday, January 18, 2002 5:51 PM
˙
Since θ is constant, θ˙ = 0 and θˆ = θ˙˜ . Thus, if the adaptive law for updating θˆ is chosen as T ˙ θˆ = ΓPe f ( x )
(31.13)
then the derivative of the Lyapunov function in Eq. (31.12) becomes T V˙ = – e Qe
(31.14)
which is negative semidefinite, but not negative definite. This implies that V(t) ≤ V(0) for all t ≥ 0, and thus, e and θˆ must be bounded. This further implies that x = e + xm also is bounded. Also, V ≥ 0 and V˙ ≤ 0, which means limt→∞V(t) =˙ V∞ exists and is finite. Now,
∫
∞
0
V˙ ( τ ) dτ = –
∫
∞
0
e ( τ )Qe ( τ ) dτ = V ∞ – V ( 0 ) T
implying that e ∈L 2 ∩ L∞. From Eq. (31.9), it is obvious that e˙ ∈L∞ . Thus, we can invoke Barbalat’s lemma to claim that e(t) → 0 as t → ∞. Notice, however, that the parameter error θ˜ = θˆ − θ will not necessarily converge to zero. True parameter convergence can occur only when the reference input r(t) 4 satisfies certain uniform observability and persistent excitation conditions . Remark: Note in the above MRAC design that while stability and tracking error convergence are guaranteed for any value of Am , Q, and Γ, the performance of the controller will depend critically on the learning rate Γ. “Smaller” learning rates mean that the adaptation will be slow leading to large tracking errors and large transients. Conversely, the upper limit on the learning rate is limited by the presence of unmodeled dynamics, because too large a value for the learning rate will lead to highly oscillatory parameter estimates that can adversely excite the high frequency unmodeled plant dynamics. Remark: The controller design methodology is based upon three crucial steps: (i) finding the appropriate controller structure in the spirit of feedback linearization, (ii) derivation of the tracking error dynamics that depend upon the parameter error terms, and (iii) finding a suitable Lyapunov function that can be used to derive the parameter update law such that the tracking error will go to zero. Determining the controller structure for the known parameter case is probably the most crucial step within any adaptive design because it turns out that adaptive feedback linearization cannot be alway applied to systems that are linearizable by feedback in the known parameter case. This happens because higher derivatives of the parameter estimates appear in the control law for systems of higher order, making difficult the application of the certainty equivalence principle. Other relatively new approaches deviate from the conventional certainty equivalence principles by adopting integrator backstepping, nonlinear damping, and tuning 10 functions. In these methods, the adaptive law estimates the unknown plant parameters directly, thereby permitting full utilization of any prior knowledge and therefore eliminating the possibility for overparameterization introduced by traditional direct MRAC methods. The design methodology and stability 10,11 an overview for which can be obtained from proof are obtained through a recursive process, 12 Kokotovic and subsequent results by his research group. Remark: Given the fact that there always exist model errors and other unknown disturbance effects in addition to the unknown parameters, adaptive control solutions would have to address the robustness question. Since the parameter error is always unknown, the Lyapunov function time derivative is always negative semidefinite. This implies that the closed-loop equations are not exponentially stable, nor even uniformly asymptotically stable. Any external or unmodeled disturbance would immediately make V˙ indefinite, and most methods that modify the stability proof for robustness are fixed to ensure V˙ to be negative outside a compact neighborhood of the equilibrium state. By introducing an additional term 7 in the adaptive law Eq. (31.13), (referred to as σ-modification), Ioannou accomplishes robust stability. This method, though very popular, suffered from the drawback that when the disturbance is absent, the tracking error would not converge to zero. To overcome this problem, other schemes such as the 6 modification have been suggested to ensure robustness within the adaptive designs. ©2002 CRC Press LLC
0066_frame_C31.fm Page 9 Wednesday, January 9, 2002 7:49 PM
31.6 Spacecraft Adaptive Attitude Regulation Example Consider the problem of a rigid spacecraft with an initial nonzero attitude and body angular velocity vector that has to be brought to rest at a zero attitude vector. This rigid body adaptive attitude regulation problem 13 based on the feedback linearization approach has been derived by Schaub, Akella, and Junkins. The governing equations are described by Euler’s rotational equations of motion and the desired linear closed13, 14 Only a crude estimate of the moment of loop dynamics (LCLD) can be of either PD or PID form. inertia matrix is assumed to be known. An adaptive control law is presented, which includes an integral feedback term in the desired closed-loop dynamics and achieves asymptotic stability even in the presence of unmodeled external disturbances. The resulting simulation is illustrated in Fig. 31.3. The attitude vector is specified in terms of the modified Rodrigues parameter (MRP) whose components si are shown in Fig. 31.3(a). Without any adaptation, the open-loop control is still asymptotically stable. However, the transient attitude errors don’t match those of the desired LCLD well at all. With adaptation turned on, the performance matches that of the ideal LCLD very closely. 0.3 10-1
0.2
10-2
0.1
10-3 0.0
10-4
-0.1 Ideal LCLD No Adaptation Adaptation with Disturbance Learning
-0.2 -0.3
.
Ideal LCLD
10-5
No Adaptation
10-6
Adaptation without Disturbance Learning Adaptation with Disturbance Learning
.
10-7 .
10-8
-0.4 0
10
20
30
0
40
20
40
60
80
100
time [s]
time [s]
(b) MRP attitude vector magnitude |s |
(a) MRP attitude vector s
4 Ideal LCLD
5.0
3 .
2
No Adaptation Adaptation with Disturbance Learning
0.0 1 Ideal LCLD
-5.0
No Adaptation
-10.0 0
10
.
Adaptation without Disturbance Learning
.
Adaptation with Disturbance Learning
20
0 -1
30
40
-2 0
20
40
time [s] (c) Control vector u (N m)
10-1 .
10-2 10
.
-3
No Adaptation Adaptation without Disturbance Learning Adaptation with Disturbance Learning
10-2
10-6
20
40
60
time [s] (e) Performance error s − sr
80
100
.
10-4
10-5 -6
.
10-3
10-5
0
80
100
(d) Adaptive external torque estimate (N m)
10-4
10
60
time [s]
No Adaptation Adaptation without Disturbance Learning Adaptation with Disturbance Learning
10-7 0
20
40
60
80
100
time [s]
. . (f) Performance error s − sr
FIGURE 31.3 Rigid body stabilization while enforcing LCLD in the presence of large inertia and external disturbance ignorance. ©2002 CRC Press LLC
0066_frame_C31.fm Page 10 Wednesday, January 9, 2002 7:49 PM
Figure 31.3(b) shows the magnitude of the MRP attitude error vector s on a logarithmic scale. Again the large transient errors of the open-loop, adaptation-free control law are visible during the first 20 s of the maneuver along with the good final convergence characteristics. The ideal LCLD performance is indicated again through the dotted line. Two versions of the adaptive control law are compared here, which differ only by whether or not the external disturbance is adaptively estimated too. On this figure both adaptive laws appear to enforce the desired LCLD very well for the first 40 s of the maneuver. After this the adaptive law without disturbance learning starts to decay at a slower rate, slower even than the open-loop (nonadaptive) solution. Including the external disturbance, adaptation clearly improves the final convergence rate. Note, however, that neither adaptive case starts to deviate from the ideal LCLD −3 case until the MRP attitude error magnitude has decayed to roughly 10 . This corresponds to having a principal rotation error of roughly 0.23°. With external disturbance adaptation, the tracking error at which the LCLD deviations appear is about two orders of magnitude smaller. The performance of the adaptive control law can be greatly varied by choosing different learning rates. However, since large initial inertia matrix and external disturbance model errors are present, the adaptive learning rates were reduced to avoid radical transient torques. The control torque vector components ui for various cases are shown in Fig. 31.3(c). The open-loop torques don’t approach the ideal LCLD torque during the transient part of the maneuver. The torques required by either adaptive case are very similar. The difference is that the case with external disturbance learning is causing some extra oscillation of the control about the LCLD case. However, note that with the chosen adaptive learning rates neither control law exhibits any radical transient torques about the ideal LCLD torque profile. Figure 31.3(d) illustrates that the adaptive external disturbance estimate Fe indeed asymptotically approaches the true ∗ external disturbance F e . By reducing the external disturbance adaptive learning rate g Fe the transient adaptive estimate errors are kept within a reasonable range. Figure 31.3(f) shows the absolute performance error in attitude rates. Both cases with adaptation added show large reductions in attitude rate errors compared to the nonadaptive case. The purpose of the adaptive control discussed in this example is to enforce the desired LCLD. The previous figures illustrate that the resulting overall system remains asymptotically stable. Figure 31.3(e) illustrates the absolute performance error between the actual motion s(t) and the desired linear reference motion sr(t). This figure demonstrates again the large performance error that results from using the open-loop control law with the incorrect system model. Adding adaptation improves the transient performance tracking by up to two orders of magnitude. Without including the external disturbance learning, the final performance error decay rate flattens out. This error will decay to zero. However, with the given learning gains, it does so at a slower rate than if no adaptation is taking place. Adding the external disturbance learning greatly improves the final performance error decay since the system is obtaining an accurate model of the actual constant disturbance. If the initial model estimates were more accurate, more aggressive adaptive learning rates could be used, resulting in even better LCLD performance tracking. This simulation illustrates though that even in the presence of large system uncertainty it is possible to track the desired LCLD very well.
31.7 Output Feedback Adaptive Control In contrast to the state-space approaches, the input–output approach treats the plant as a black box that transforms the applied inputs into the corresponding output space. Stability theory for nonlinear systems from an input–output viewpoint is important in the context of adaptive output feedback control design. Solution to the problem of adaptive observer design involving state estimation of systems with unknown parameters is often the stepping stone towards resolving the output feedback control problem. There has been fairly recent breakthroughs in this area where the nonlinear adaptive observer design procedure has been extended to a slightly more general case of systems where the coefficients of the unknown 15 parameters can depend on the entire state, and not just on the measured part. To a large extent, some powerful results have been made possible by exploiting certain “passivitylike”conditions coupled with the usual persistent excitation conditions. Crucial to this discussion is the ©2002 CRC Press LLC
0066_frame_C31.fm Page 11 Wednesday, January 9, 2002 7:49 PM
concept of passivity, which is really an abstract representation of the idea of energy dissipation in both linear and nonlinear systems. Passive systems are most common in mechanical and electrical engineering applications. A mechanical system consisting of masses, springs, and viscous dashpots is a common example for a passive system. We now give the following definitions. Definition: Truncation of a signal Let Y be the space of real-valued functions defined on [0, ∞). Let x be an element of Y. Then the truncation of x at some T > 0 is defined by
x(t) xT ( t ) = 0
for 0 ≤ t ≤ T for t > T
Definition: Extended space If X is a normed linear subspace of Y, then the extended space Xe is defined by the set
{ x ∈ Y : x T ∈ X for some fixed T ≥ 0 } The extended L 2 space is denoted by L 2e. Definition: Scalar product between two signals The scalar product between two real-valued time signals x, y ∈L 2e is defined as
〈 x | y〉 =
∫
∞
x ( t )y ( t ) dt = T
0
∫
T
x ( t )y ( t ) dt T
0
Definition: Passive systems A system with input u(t) and output y(t) is passive if
〈 y | u〉 ≥ 0 The system is input strictly passive if ∃ > 0 such that
〈 y| u〉 ≥ u
2
The system is said to be output strictly passive if ∃ > 0 such that
〈 y | u〉 ≥ y
2
31.8 Adaptive Observers and Output Feedback Control 15
We now state the nonlinear adaptive observer problem formulated by Besancon :
x˙ = f ( x, u, t ) + g ( x, u, t )q y = h(x) ∞
(31.15)
where functions f and g are C with respect to all their arguments and q is a constant and unknown parameter. Variables x, u, and y respectively denote the state, input, and output vectors. The input signals may be assumed to belong to some set of measurable and bounded functions. By the phrase adaptive observer, we imply the problem of reconstructing a state estimate xˆ (t) using the input u and output y in the presence of the unknown parameter q such that lim t→∞ xˆ ( t ) – x ( t ) = 0. The conditions for the ©2002 CRC Press LLC
0066_frame_C31.fm Page 12 Friday, January 18, 2002 5:52 PM
15
existence of such an observer are now available, which can be stated as follows. If a corresponding observer exists in the case when θ is known, and if this deterministic case observer is such that when a parameter error θ˜ =˙ θˆ – θ is made and the state estimation error system is passive between the “input” θ˜ and the output error h( xˆ ) − y, then an asymptotic state observer can be designed even when θ is unknown. In addition to this passivity requirement, parameter error convergence, as usual, would further need persistence of excitation with respect to u. This powerful result finds immediate applications within the problem of spacecraft attitude tracking in 16 the absence of angular velocity measurements. It is now well known that the governing equations of the 17, 18 rigid-body attitude control problem in terms of the MRP vector satisfy certain passivity conditions between the angular velocity vector and the MRP vector. A very important consequence of passivity in this context is the fact that feedback control laws for attitude control can be implemented in a Lyapunovbased construction without requiring angular velocity measurements. In such a case, the only signal needed for feedback purposes would be the attitude vector. The resulting control laws provide almost 18 global asymptotic stability in the sense of Tsiotras.
31.9 Concluding Remarks Historically speaking, the development and application of modern adaptive control theory for generic nonlinear systems adopted the philosophical approach of extending existing linear system methodologies. In some limited cases such as regulator theory, this approach of paralleling linear system methods has been highly successful. However, obtaining the same degree of success has been elusive in other research areas such as trajectory tracking, controller synthesis, and state reconstruction. It is not difficult to fathom the reason for this bottleneck. Nonlinear systems occur in a vast variety of ways, and not all of them can be handled by simple extensions to existing linear adaptive control methodologies. One promising approach for the purpose of future research would be to specialize the study to mechanical systems, thereby restricting the class of nonlinear systems considered, and thus enabling the introduction of “structure” and additional constraints. Whereas in the case of output feedback control for general nonlinear systems, separate designs of stable observers and controllers do not necessarily guarantee stability for their combination (no separation principle), some structured approaches utilizing state trans15 formations have already been shown to help recover the separation properties in some cases. As a result, these so-called structured approaches also enabled the formulation of global and semi-global tracking controllers based on output (partial state) feedback. It is quite possible that a focused pursuit of the same approach has the potential for providing a key to solving several other problems arising out of electromechanical systems that are otherwise intractable.
References 1. Narendra, K. S., “Parameter adaptive control—The End … or The Beginning?,” Proceedings of the 33rd Conference on Decision and Control. Lake Buena Vista, Florida, December 1994. 2. Slotine, J. E. and Li, W., Applied Nonlinear Control. Prentice-Hall, Englewood Cliffs, NJ, 1991. 3. Khalil, H. K., Nonlinear Systems. Macmillan, New York, NY, 1992. 4. Sastry, S. and Bodson, M., Adaptive Control: Stability, Convergence and Robustness. Prentice-Hall, 1989. 5. Tao, G., “A simple alternative proof to the Barbalat Lemma,” IEEE Transactions on Automatic Control, Vol. 42, No. 5, May 1997, p. 698. 6. Narendra, K. S. and Annaswamy, A. M., Stable Adaptive Systems. Prentice-Hall, 1989. 7. Ioannou, P. A. and Sun, J., Stable and Robust Adaptive Control. Prentice-Hall, Upper Saddle River, NJ, 1995, pp. 85–134. 8. Astrom, K. J. and Wittenmark, B., Adaptive Control. Addison-Wesley, Reading, MA, 1995. 9. Gantmacher. The Theory of Matrices, Vol I. Chelsea Publishing Company, NY, 1977, pp. 353–354. 10. Krstic´ , M., Kanellakopoulos, I., and Kokotovic´ , P. V., “Transient performance improvement with a new class of adaptive controllers,” Systems & Control Letters, Vol. 21, 1993, pp. 451–461. ©2002 CRC Press LLC
0066_frame_C31.fm Page 13 Wednesday, January 9, 2002 7:49 PM
11. Krtic´ , M., Kanellakopoulos, I., and Kokotovic´ , P. V., “Nonlinear design of adaptive controllers for linear systems,” IEEE Transactions on Automatic Control, Vol. 39, 1994, pp. 738–752. 12. Kokotovic, P. V., “The joy of feedback: nonlinear and adaptive control,” IEEE Control Systems Magazine, Vol. 12, No. 3, 1992, pp. 7–17. 13. Schaub, H., Akella, M. R., and Junkins, J. L., “Adaptive control of nonlinear attitude motions realizing linear closed loop dynamics,” Journal of Guidance, Control and Dynamics, Vol. 24, No. 1, Jan.–Feb. 2001. 14. Akella, M. R., Schaub, H., and Junkins, J. L., “Adaptive realization of linear closed loop tracking dynamics in the presence of large system model errors,” Journal of Astronautical Sciences, Vol. 48, No. 4, 2000. 15. Besançon, G., “Global output feedback tracking control for a class of Lagrangian systems,” Automatica, Vol. 36, 2000, pp. 1915–1921. 16. Akella, M. R., “Rigid body attitude tracking without angular velocity feedback,” Systems & Control Letters, Vol. 42, No. 4, 2001. 17. Lizarralde, F. and Wen, J. T., “Attitude control without angular velocity measurement: a passivity approach,” IEEE Transactions on Automatic Control, Vol. 41, No. 3, 1996, pp. 468–472. 18. Tsiotras, P., “Further passivity results for the attitude control problem,” IEEE Transactions on Automatic Control, Vol. 43, No. 11, 1998, pp. 1597–1600.
©2002 CRC Press LLC
32 Neural Networks and Fuzzy Systems 32.1 32.2 32.3 32.4
Neural Networks and Fuzzy Systems Neuron Cell Feedforward Neural Networks Learning Algorithms for Neural Networks Hebbian Learning Rule • Correlation Learning Rule • Instar Learning Rule • Winner Takes All (WTA) • Outstar Learning Rule • Widrow–Hoff LMS Learning Rule • Linear Regression • Delta Learning Rule • Error Backpropagation Learning
32.5
Special Feedforward Networks Functional Link Network • Feedforward Version of the Counterpropagation Network • WTA Architecture • Cascade Correlation Architecture • Radial Basis Function Networks
32.6
Recurrent Neural Networks Hopfield Network • Autoassociative Memory • Bidirectional Associative Memories (BAM)
32.7
Fuzzy Systems Fuzzification • Rule Evaluation • Defuzzification • Design Example
Bogdan M. Wilamowski University of Wyoming
32.8
Genetic Algorithms Coding and Initialization • Selection and Reproduction • Reproduction • Mutation
32.1 Neural Networks and Fuzzy Systems New and better electronic devices have inspired researchers to build intelligent machines operating in a fashion similar to the human nervous system. Fascination with this goal started when McCulloch and Pitts (1943) developed their model of an elementary computing neuron and when Hebb (1949) introduced his learning rules. A decade later Rosenblatt (1958) introduced the perceptron concept. In the early 1960s Widrow and Holf (1960, 1962) developed intelligent systems such as ADALINE and MADALINE. Nillson (1965) in his book Learning Machines summarized many developments of that time. The publication of the Mynsky and Paper (1969) book, with some discouraging results, stopped for some time the fascination with artificial neural networks, and achievements in the mathematical foundation of the backpropagation algorithm by Werbos (1974) went unnoticed. The current rapid growth in the area of neural networks started with the Hopfield (1982, 1984) recurrent network, Kohonen (1982) unsupervised training algorithms, and a description of the backpropagation algorithm by Rumelhart et al. (1986).
©2002 CRC Press LLC
0066_Frame_C32.fm Page 2 Wednesday, January 9, 2002 7:54 PM
32.2 Neuron Cell A biological neuron is a complicated structure, which receives trains of pulses on hundreds of excitatory and inhibitory inputs. Those incoming pulses are summed with different weights (averaged) during the time period of latent summation. If the summed value is higher than a threshold, then the neuron itself is generating a pulse, which is sent to neighboring neurons. Because incoming pulses are summed with time, the neuron generates a pulse train with a higher frequency for higher positive excitation. In other words, if the value of the summed weighted inputs is higher, the neuron generates pulses more frequently. At the same time, each neuron is characterized by the nonexcitability for a certain time after the firing pulse. This so-called refractory period can be more accurately described as a phenomenon where after excitation the threshold value increases to a very high value and then decreases gradually with a certain time constant. The refractory period sets soft upper limits on the frequency of the output pulse train. In the biological neuron, information is sent in the form of frequency modulated pulse trains. This description of neuron action leads to a very complex neuron model, which is not practical. McCulloch and Pitts (1943) show that even with a very simple neuron model, it is possible to build logic and memory circuits. Furthermore, these simple neurons with thresholds are usually more powerful than typical logic gates used in computers. The McCulloch–Pitts neuron model assumes that incoming and outgoing signals may have only binary values 0 and 1. If incoming signals summed through positive or negative weights have a value larger than threshold, then the neuron output is set to 1. Otherwise, it is set to 0.
if net ≥ T if net < T
1, T = 0,
(32.1)
where T is the threshold and net value is the weighted sum of all incoming signals: n
net =
∑w x
(32.2)
i i
i=1
Examples of McCulloch–Pitts neurons realizing OR, AND, NOT, and MEMORY operations are shown in Fig. 32.1. Note that the structure of OR and AND gates can be identical. With the same structure, other logic functions can be realized, as Fig. 32.2 shows. The perceptron model has a similar structure. Its input signals, the weights, and the thresholds could have any positive or negative values. Usually, instead of using variable threshold, one additional constant input with a negative or positive weight can added to each neuron, as Fig. 32.3 shows. In this case, the MEMORY
A B (a)
+1 +1 +1
A
OR
T = 0.5
A+B+C
C
FIGURE 32.1
(b)
+1 +1
AND
T = 2.5
NOT
ABC
C
−1
A
+1
T = −0.5
NOT A
WRITE 1 +1 (d)
(c)
WRITE 0
−2
T = 0.5
OR, AND, NOT, and MEMORY operations using networks with McCulloch–Pitts neuron model. A B (a)
FIGURE 32.2
B
+1
C
+1 +1 +1
A T = 1.5
AB + BC + CA
B (b)
+1 +1 +2
T = 1.5
C
Other logic function realized with McCulloch–Pitts neuron model.
©2002 CRC Press LLC
AB + C
0066_Frame_C32.fm Page 3 Wednesday, January 9, 2002 7:54 PM
x1 x1
x2
x2
x3
x3
T=t
wn+1 = − T
xn
x4 (a)
T=0
x4
xn
(b)
+1
FIGURE 32.3 Threshold implementation with an additional weight and constant input with +1 value: (a) neuron with threshold T, (b) modified neuron with threshold T = 0 and additional weight equal to −T.
threshold is always set to be zero and the net value is calculated as n
net =
∑w x + w i i
n+1
(32.3)
i=1
where wn+1 has the same value as the required threshold and the opposite sign. Single-layer perceptrons were successfully used to solve many pattern classification problems. The hard threshold activation functions are given by
sgn ( net ) + 1 1, if net ≥ 0 o = f ( net ) = ------------------------------ = 2 0, if net < 0
(32.4)
1, if net ≥ 0 o = f ( net ) = sgn ( net ) = – 1 , if net < 0
(32.5)
for unipolar neurons and
for bipolar neurons. For these types of neurons, most of the known training algorithms are able to adjust weights only in single-layer networks. Multilayer neural networks usually use continuous activation functions, either unipolar
1 o = f ( net ) = ------------------------------------1 + exp ( – lnet )
(32.6)
2 o = f ( net ) = tanh ( 0.5lnet ) = ------------------------------------- – 1 1 + exp ( – lnet )
(32.7)
or bipolar
These continuous activation functions allow for the gradient-based training of multilayer networks. Typical activation functions are shown in Fig. 32.4. In the case when neurons with additional threshold input are used (Fig. 32.3(b)), the λ parameter can be eliminated from Eqs. (32.6) and (32.7) and the steepness of the neuron response can be controlled by the weight scaling only. Therefore, there is no real need to use neurons with variable gains. Note, that even neuron models with continuous activation functions are far from an actual biological neuron, which operates with frequency modulated pulse trains. ©2002 CRC Press LLC
0066_Frame_C32.fm Page 4 Wednesday, January 9, 2002 7:54 PM
λ
(a)
(c)
(b)
λ
(d)
FIGURE 32.4 Typical activation functions: (a) hard threshold unipolar, (b) hard threshold bipolar, (c) continuous unipolar, (d) continuous bipolar. HIDDEN LAYER #2
HIDDEN LAYER #1
INPUTS
OUTPUTS
OUTPUT LAYER
+1
+1
+1
FIGURE 32.5 An example of the three-layer feedforward neural network, which is sometimes known also as the backpropagation network.
32.3 Feedforward Neural Networks Feedforward neural networks allow only one-directional signal flow. Furthermore, most feedforward neural networks are organized in layers. An example of the three-layer feedforward neural network is shown in Fig. 32.5. This network consists of input nodes, two hidden layers, and an output layer. A single neuron is capable of separating input patterns into two categories, and this separation is linear. For example, for the patterns shown in Fig. 32.6, the separation line is crossing x1 and x2 axes at points x10 and x20. This separation can be achieved with a neuron having the following weights: w1 = 1/x10, w2 = 1/x20, and w3 = −1. In general for n dimensions, the weights are
1 w i = -----x i0
for w n+1 = – 1
(32.8)
One neuron can divide only linearly separated patterns. To select just one region in n-dimensional input space, more than n + 1 neurons should be used. If more input clusters are to be selected, then the number of neurons in the input (hidden) layer should be properly multiplied. If the number of neurons in the input (hidden) layer is not limited, then all classification problems can be solved using the three-layer network. An example of such a neural network, classifying three clusters in the two-dimensional space, is shown in Fig. 32.7. Neurons in the first hidden layer create the separation lines between input clusters. ©2002 CRC Press LLC
0066_Frame_C32.fm Page 5 Wednesday, January 9, 2002 7:54 PM
x1
x10
x1
w1
x2
w2 w3
+1
x2
x20
w1 =
1 x10
w2 =
1 x20
w3 = −1
FIGURE 32.6 neuron.
Illustration of the property of linear separation of patterns in the two-dimensional space by a single
HIDDEN LAYER #2 AND
HIDDEN LAYER #1
OR OUTPUT
INPUTS
+1 +1
+1
FIGURE 32.7 An example of the three-layer neural network with two inputs for classification of three different clusters into one category. This network can be generalized and can be used for solution of all classification problems.
Neurons in the second hidden layer perform the AND operation, as shown in Fig. 32.1(b). Output neurons perform the OR operation, as shown in Fig. 32.1(a), for each category. The linear separation property of neurons makes some problems especially difficult for neural networks, such as exclusive OR, parity computation for several bits, or to separate patterns laying on two neighboring spirals. The feedforward neural network is also used for nonlinear transformation (mapping) of a multidimensional input variable into another multidimensional variable in the output. In theory, any input–output mapping should be possible if the neural network has enough neurons in hidden layers. (size of output layer is set by the number of outputs required). In practice, this is not an easy task. Presently, there is no satisfactory method to define how many neurons should be used in hidden layers. Usually, this is found by the trial-and-error method. In general, it is known that if more neurons are used, more complicated shapes can be mapped. On the other hand, networks with large numbers of neurons lose their ability for generalization, and it is more likely that such networks will also try to map noise supplied to the input.
32.4 Learning Algorithms for Neural Networks Similarly to the biological neurons, the weights in artificial neurons are adjusted during a training procedure. Various learning algorithms were developed, and only a few are suitable for multilayer neuron networks. Some use only local signals in the neurons, others require information from outputs; some require a supervisor who knows what outputs should be for the given patterns, and other unsupervised algorithms need no such information. Common learning rules are described in the following sections. ©2002 CRC Press LLC
0066_Frame_C32.fm Page 6 Wednesday, January 9, 2002 7:54 PM
Hebbian Learning Rule The Hebb (1949) learning rule is based on the assumption that if two neighbor neurons must be activated and deactivated at the same time, then the weight connecting these neurons should increase. For neurons operating in the opposite phase, the weight between them should decrease. If there is no signal correlation, the weight should remain unchanged. This assumption can be described by the formula
∆w ij = cx i o j
(32.9)
where wij = weight from ith to jth neuron, c = learning constant, xi = signal on the ith input, oj = output signal. The training process starts usually with values of all weights set to zero. This learning rule can be used for both soft and hard threshold neurons. Since desired responses of neurons are not used in the learning procedure, this is the unsupervised learning rule. The absolute values of the weights are usually proportional to the learning time, which is undesired.
Correlation Learning Rule The correlation learning rule is based on a similar principle as the Hebbian learning rule. It assumes that weights between simultaneously responding neurons should be largely positive, and weights between neurons with opposite reaction should be largely negative. Contrary to the Hebbian rule, the correlation rule is the supervised learning. Instead of actual response, oj, the desired response, dj, is used for the weight change calculation
∆w ij = cx i d j
(32.10)
This training algorithm usually starts with initialization of weights to zero values.
Instar Learning Rule If input vectors and weights are normalized, or they have only binary bipolar values ( −1 or +1 ), then the net value will have the largest positive value when the weights and the input signals are the same. Therefore, weights should be changed only if they are different from the signals
∆w i = c ( x i – w i )
(32.11)
Note, that the information required for the weight is taken only from the input signals. This is a very local and unsupervised learning algorithm.
Winner Takes All (WTA) The WTA is a modification of the instar algorithm where weights are modified only for the neuron with the highest net value. Weights of remaining neurons are left unchanged. Sometimes this algorithm is modified in such a way that a few neurons with the highest net values are modified at the same time. Although this is an unsupervised algorithm because we do not know what are desired outputs, there is a need for a “judge” or “supervisor” to find a winner with a largest net value. The WTA algorithm, developed by Kohonen (1982), is often used for automatic clustering and for extracting statistical properties of input data.
©2002 CRC Press LLC
0066_Frame_C32.fm Page 7 Wednesday, January 9, 2002 7:54 PM
Outstar Learning Rule In the outstar learning rule, it is required that weights connected to a certain node should be equal to the desired outputs for the neurons connected through those weights
∆w ij = c ( d j – w ij )
(32.12)
where dj is the desired neuron output and c is the small learning constant, which further decreases during the learning procedure. This is the supervised training procedure because desired outputs must be known. Both instar and outstar learning rules were developed by Grossberg (1969).
Widrow–Hoff LMS Learning Rule Widrow and Hoff (1960, 1962) developed a supervised training algorithm, which allows training a neuron for the desired response. This rule was derived so the square of the difference between the net and output value is minimized. P
Error j =
∑ ( net
jp
– d jp )
2
(32.13)
p=1
where Errorj = error for jth neuron, P = number of applied patterns, djp = desired output for jth neuron when pth pattern is applied, net = given by Eq. (32.2). This rule is also known as the least mean square (LMS) rule. By calculating a derivative of Eq. (32.13) with respect to wij, a formula for the weight change can be found: P
∆w ij = cx i
∑ (d
jp
– net jp )
(32.14)
p=1
Note that weight change ∆wij is a sum of the changes from each of the individual applied patterns. Therefore, it is possible to correct the weight after each individual pattern was applied. This process is known as incremental updating; cumulative updating is when weights are changed after all patterns have been applied. Incremental updating usually leads to a solution faster, but it is sensitive to the order in which patterns are applied. If the learning constant c is chosen to be small, then both methods give the same result. The LMS rule works well for all types of activation functions. This rule tries to enforce the net value to be equal to desired value. Sometimes this is not what the oberver is looking for. It is usually not important what the net value is, but it is important if the net value is positive or negative. For example, a very large net value with a proper sign will result in correct output and in large error as defined by Eq. (32.13) and this may be the preferred solution.
Linear Regression The LMS learning rule requires hundreds or thousands of iterations, using formula (32.14), before it converges to the proper solution. Using the linear regression rule, the same result can be obtained in only one step. Considering one neuron and using vector notation for a set of the input patterns X applied through weight vector w, the vector of net values net is calculated using
Xw = net ©2002 CRC Press LLC
(32.15)
0066_Frame_C32.fm Page 8 Wednesday, January 9, 2002 7:54 PM
where X = rectangular array (n + 1) × p, n = number of inputs, p = number of patterns. Note that the size of the input patterns is always augmented by one, and this additional weight is responsible for the threshold (see Fig. 32.3(b)). This method, similar to the LMS rule, assumes a linear activation function, and so the net values net should be equal to desired output values d
Xw = d
(32.16)
Usually p > n + 1, and the preceding equation can be solved only in the least mean square error sense. Using the vector arithmetic, the solution is given by –1
w = (X X) X d T
T
(32.17)
When traditional method is used, the set of p equations with n + 1 unknowns, Eq. (32.16), has to be converted to the set of n + 1 equations with n + 1 unknowns
Yw = z
(32.18)
where elements of the Y matrix and the z vector are given by P
y ij =
∑
P
zi =
x ip x jp ,
p=1
∑x
d
(32.19)
ip p
p=1
Weights are given by Eq. (32.17) or they can be obtained by a solution of Eq. (32.18).
Delta Learning Rule
x2 x1
=1
x1
LMS
2 1
−2 −1 −1
2.5
3
DELTA
5 4
1.41
−
6
24
x2
=1
The LMS method assumes linear activation function net = o, and the obtained solution is sometimes far from optimum, as is shown in Fig. 32.8 for a simple two-dimensional case, with four patterns belonging to two categories. In the solution obtained using the LMS algorithm, one pattern is misclassified. If error
1
2
3
x1 4
5
6
7
−2
FIGURE 32.8 An example with a comparison of results obtained using LMS and delta training algorithms. Note that LMS is not able to find the proper solution. ©2002 CRC Press LLC
0066_Frame_C32.fm Page 9 Wednesday, January 9, 2002 7:54 PM
is defined as P
Error j =
∑ (o
jp
– d jp )
2
(32.20)
p=1
then the derivative of the error with respect to the weight wij is
d Error j ------------------ = 2 dw ij
P
∑ (o
jp
p=1
df ( net jp ) -x – d jp ) --------------------d net jp i
(32.21)
since o = f (net) and the net is given by Eq. (32.2). Note that this derivative is proportional to the derivative of the activation function f ′(net). Thus, this type of approach is possible only for continuous activation functions and this method cannot be used with hard activation functions (32.4) and (32.5). In this respect the LMS method is more general. The derivatives’ most common continuous activation functions are
f ′ = o(1 – o)
(32.22)
f ′ = 0.5 ( 1 – o )
(32.23)
for the unipolar, Eq. (32.6), and 2
for the bipolar, Eq. (32.7). Using the cumulative approach, the neuron weight wij should be changed with a direction of gradient P
∆w ij = cx i
∑ (d
jp
– o jp )f ′j p
(32.24)
p=1
In case of the incremental training for each applied pattern
∆w ij = cx i f j′ ( d j – o j )
(32.25)
the weight change should be proportional to input signal xi, to the difference between desired and actual outputs djp − ojp, and to the derivative of the activation function f ′j p. Similar to the LMS rule, weights can be updated in both the incremental and the cumulative methods. In comparison to the LMS rule, the delta rule always leads to a solution close to the optimum. As it is illustrated in Fig. 32.8, when the delta rule is used, all four patterns are classified correctly.
Error Backpropagation Learning The delta learning rule can be generalized for multilayer networks. Using an approach similiar to the delta rule, the gradient of the global error can be computed with respect to each weight in the network. Interestingly,
∆w ij = cx i f j′ E j where c = learning constant, xi = signal on the ith neuron input, f j′ = derivative of activation function. ©2002 CRC Press LLC
(32.26)
0066_Frame_C32.fm Page 10 Wednesday, January 9, 2002 7:54 PM
o1
xi wij
d netj
netj
ok oj
j th
Ej
OUTPUTS
INPUTS
Ajk =
dok
+1
oK
+1
FIGURE 32.9
Illustration of the concept of gain computation in neural networks.
The cumulative error Ej on neuron output is given by
1 E j = ---fj ′
K
∑ (o
k
– d k )A jk
(32.27)
k=1
where K is the number of network outputs and Ajk is the small signal gain from the input of the jth neuron to the kth network output, as Fig. 32.9 shows. The calculation of the backpropagating error starts at the output layer and cumulative errors are calculated layer by layer to the input layer. This approach is not practical from the point of view of hardware realization. Instead, it is simpler to find signal gains from the input of the jth neuron to each of the network outputs (Fig. 32.9). In this case, weights are corrected using K
∆w ij = cx i
∑ (o
k
– d k )A jk
(32.28)
k=1
Note that this formula is general, regardless of whether the neurons are arranged in layers or not. One way to find gains Ajk is to introduce an incremental change on the input of the jth neuron and observe the change in the kth network output. This procedure requires only forward signal propagation, and it is easy to implement in a hardware realization. Another possible way is to calculate gains through each layer and then find the total gains as products of layer gains. This procedure is equally or less computationally intensive than a calculation of cumulative errors in the error backpropagation algorithm. The backpropagation algorithm has a tendency for oscillation. To smooth the process, the weights increment ∆wij can be modified according to Rumelhart, Hinton, and Wiliams (1986):
w ij ( n + 1 ) = w ij ( n ) + ∆w ij ( n ) + a∆w ij ( n – 1 )
(32.29)
or according to Sejnowski and Rosenberg (1987),
w ij ( n + 1 ) = w ij ( n ) + ( 1 – a )∆w ij ( n ) + a∆w ij ( n – 1 ) where a is the momentum term. ©2002 CRC Press LLC
(32.30)
0066_Frame_C32.fm Page 11 Wednesday, January 9, 2002 7:54 PM
f (net) OUTPUT
ACTUAL DERIVATIVE +1
net VA
RI
D FIE
DE
E TIV
DI
MO
DESIRED OUTPUT
−1
FIGURE 32.10 Illustration of the modified derivative calculation for faster convergency of the error backpropagation algorithm.
The backpropagation algorithm can be significantly sped up, when, after finding components of the gradient, weights are modified along the gradient direction until a minimum is reached. This process can be carried on without the necessity of a computationally intensive gradient calculation at each step. The new gradient components are calculated once a minimum is obtained in the direction of the previous gradient. This process is only possible for cumulative weight adjustment. One method of finding a minimum along the gradient direction is the tree step process of finding error for three points along gradient direction and then, using a parabola approximation, jump directly to the minimum. The fast learning algorithm using the described approach was proposed by Fahlman (1988) and is known as the quickprop. The backpropagation algorithm has many disadvantages, which lead to very slow convergency. One of the most painful is that in the backpropagation algorithm, the learning process almost perishes for neurons responding with the maximally wrong answer. For example, if the value on the neuron output is close to +1 and desired output should be close to −1, then the neuron gain f ′(net) ≈ 0 and the error signal cannot backpropagate, and so the learning procedure is not effective. To overcome this difficulty, a modified method for derivative calculation was introduced by Wilamowski and Torvik (1993). The derivative is calculated as the slope of a line connecting the point of the output value with the point of the desired value, as shown in Fig. 32.10.
o desired – o actual f modif = --------------------------------------net desired – net actual
(32.31)
Note that for small errors, Eq. (32.31) converges to the derivative of activation function at the point of the output value. With an increase of system dimensionality, the chances for local minima decrease. It is believed that the described phenomenon, rather than a trapping in local minima, is responsible for convergency problems in the error backpropagation algorithm.
32.5 Special Feedforward Networks The multilayer backpropagation network, as shown in Fig. 32.5, is a commonly used feedforward network. This network consists of neurons with the sigmoid type continuous activation function presented in Figs. 32.4(c) and 32.4(d). In most cases, only the one hidden layer is required, and the number of neurons in the hidden layer are chosen to be proportional to the problem complexity. The number of neurons in the hidden layer is usually found by a trial-and-error process. The training process starts with all weights randomized to small values, and the error backpropagation algorithm is used to find a solution. When the learning process does not converge, the training is repeated with a new set of randomly chosen weights. ©2002 CRC Press LLC
0066_Frame_C32.fm Page 12 Wednesday, January 9, 2002 7:54 PM
Nguyen and Widrow (1990) proposed an experimental approach for the two-layer network weight initialization. In the second layer, weights are randomly chosen in the range from −0.5 to +0.5. In the first layer, initial weights are calculated from
bz w ij = -------ij- , zj
w ( n+1 )j = random ( −b, +b )
(32.32)
where zij is the random number from −0.5 to +0.5 and the scaling factor b is given by
b = 0.7P
1/N
(32.33)
where n is the number of inputs and N is the number of hidden neurons in the first layer. This type of weight initialization usually leads to faster solutions. For adequate solutions with backpropagation networks, typically many tries are required with different network structures and different initial random weights. It is important that the trained network gains a generalization property. This means that the trained network also should be able to handle correctly patterns that were not used for training. Therefore, in the training procedure, often some data are removed from the training patterns and then these patterns are used for verification. The results with backpropagation networks often depend on luck. This encouraged researchers to develop feedforward networks, which can be more reliable. Some of those networks are described in the following sections.
Functional Link Network
FIGURE 32.11
The functional link network.
©2002 CRC Press LLC
OUTPUTS
NONLINEAR ELEMENTS
INPUTS
One-layer neural networks are relatively easy to train, but these networks can solve only linearly separated problems. One possible solution for nonlinear problems was presented by Nilsson (1965) and was then elaborated by Pao (1989) using the functional link network shown in Fig. 32.11. Using nonlinear terms with initially determined functions, the actual number of inputs supplied to the one-layer neural network is increased. In the simplest case, nonlinear elements are higher order terms of input patterns. Note that the functional link network can be treated as a one-layer network, where additional input data are generated off-line using nonlinear transformations. The learning procedure for one-layer is easy and fast. Figure 32.12 shows an X OR problem solved using functional link networks. Note that when the functional link approach is used, this difficult problem becomes a trivial one. The problem with the functional link network is that proper selection of nonlinear elements is not an easy task. In many practical cases, however, it is not difficult to predict what kind of transformation of input data may linearize the problem, and so the functional link approach can be used.
+1
0066_Frame_C32.fm Page 13 Wednesday, January 9, 2002 7:54 PM
UNIPOLAR NEURON +1 +1
x1
+1
−0.5
x1
OUTPUT
+1
x2
BIPOLAR NEURON
XOR
OUTPUT
−0.5
XOR
x2
−3
+1
x1x2
x1x2
(a)
(b)
FIGURE 32.12 Functional link networks for solution of the X OR problem: (a) using unipolar signals, (b) using bipolar signals. KOHONEN LAYER
0
GROSSBERG LAYER
OUTPUTS
NORMALIZED INPUTS
1
0
0
0 SUMMING CIRCUITS UNIPOLAR NEURONS
FIGURE 32.13
The counterpropagation network.
Feedforward Version of the Counterpropagation Network The counterpropagation network was originally proposed by Hecht-Nilsen (1987). In this section a modified feedforward version as described by Zurada (1992) is discussed. This network, which is shown in Fig. 32.13, requires numbers of hidden neurons equal to the number of input patterns, or more exactly, to the number of input clusters. The first layer is known as the Kohonen layer with unipolar neurons. In this layer only one neuron, the winner, can be active. The second is the Grossberg outstar layer. The Kohonen layer can be trained in the unsupervised mode, but that need not be the case. When binary input patterns are considered, the input weights must be exactly equal to the input patterns. In this case,
net = x w = [ n – 2HD ( x, w ) ] t
where n = number of inputs, w = weights, x = input vector, HD (w, x) = Hamming distance between input pattern and weights. ©2002 CRC Press LLC
(32.34)
0066_Frame_C32.fm Page 14 Wednesday, January 9, 2002 7:54 PM
For a neuron in the input layer to be reacting just for the stored pattern, the threshold value for this neuron should be
w ( n+1 ) = – ( n – 1 )
(32.35)
If it is required that the neuron must also react for similar patterns, then the threshold should be set to wn +1 = −[n − (1 + HD)], where HD is the Hamming distance defining the range of similarity. Since for a given input pattern only one neuron in the first layer may have the value of 1 and remaining neurons have 0 values, the weights in the output layer are equal to the required output pattern. The network, with unipolar activation functions in the first layer, works as a lookup table. When the linear activation function (or no activation function at all) is used in the second layer, then the network also can be considered as an analog memory. For the address applied to the input as a binary vector, the stored set of analog values, as weights in the second layer, can be accurately recovered. The feedforward counterpropagation network may also use analog inputs, but in this case all input data should be normalized,
xi w i = xˆ i = -------xi
(32.36)
The counterpropagation network is very easy to design. The number of neurons in the hidden layer is equal to the number of patterns (clusters). The weights in the input layer are equal to the input patterns, and the weights in the output layer are equal to the output patterns. This simple network can be used for rapid prototyping. The counterpropagation network usually has more hidden neurons than required. However, such an excessive number of hidden neurons are also used in more sophisticated feedforward networks such as the probabilistic neural network (PNN) Specht (1990) or the general regression neural networks (GRNN) Specht (1992).
WTA Architecture The winner take all (WTA) network was proposed by Kohonen (1988). This is basically a one-layer network used in the unsupervised training algorithm to extract a statistical property of the input data, Fig. 32.14(a). At the first step, all input data are normalized so that the length of each input vector is the same and, usually, equal to unity, Eq. (32.36). The activation functions of neurons are unipolar and continuous. The learning process starts with a weight initialization to small random values. During the learning process the weights are changed only for the neuron with the highest value on the output—the winner:
∆w w = c ( x – w w )
(32.37)
where ww = weights of the winning neuron, x = input vector, c = learning constant. Usually, this single-layer network is arranged into a two-dimensional layer shape, as shown in Fig. 32.14(b). The hexagonal shape is usually chosen to secure strong interaction between neurons. Also, the algorithm is modified in such a way that not only the winning neuron but also neighboring neurons are allowed for the weight change. At the same time, the learning constant c in Eq. (32.37) decreases with the distance from the winning neuron. After such an unsupervised training procedure, the Kohonen layer is able to organize data into clusters. Output of the Kohonen layer is then connected to the one- or two-layer feedforward network with the error backpropagation algorithm. This initial data organization in the WTA layer usually leads to rapid training of the following layer or layers. ©2002 CRC Press LLC
0066_Frame_C32.fm Page 15 Wednesday, January 9, 2002 7:54 PM
KOHONEN LAYER
NORMALIZED INPUTS
WINNER
(a)
w
(b)
FIGURE 32.14 A winner take all architecture for cluster extracting in the unsupervised training mode: (a) network connections, (b) single-layer network arranged into a hexagonal shape. HI AAADDEN NEURONS
+1
OUTPUT NEURONS
OUTPUTS
+1
INPUTS
+1
WEIGHTS ADJUSTED EVERY STEP +1 ONCE ADJUSTED WEIGHTS AND THEN FROZEN
FIGURE 32.15
The cascade correlation architecture.
Cascade Correlation Architecture The cascade correlation architecture was proposed by Fahlman and Lebiere (1990). The process of network building starts with a one-layer neural network and hidden neurons are added as needed. The network architecture is shown in Fig. 32.15. In each training step, a new hidden neuron is added and its weights are adjusted to maximize the magnitude of the correlation between the new hidden neuron output and the residual error signal on the network output to be eliminated. The correlation parameter S must be maximized: O
S =
P
∑ ∑ (V o=1 p=1
©2002 CRC Press LLC
p
– V ) ( E po – E o )
(32.38)
0066_Frame_C32.fm Page 16 Wednesday, January 9, 2002 7:54 PM
where O P Vp Epo
= number of network outputs, = number of training patterns, = output on the new hidden neuron, = error on the network output.
V and E o are average values of Vp and Epo, respectively. By finding the gradient, dS/dwi, the weight, adjustment for the new neuron can be found as O
∆w i =
P
∑ ∑ s (E o
po
– E o )f ′p x ip
(32.39)
o=1 p=1
where so = sign of the correlation between the new neuron output value and network output, f p′ = derivative of activation function for pattern p, xip = input signal. The output neurons are trained using the delta or quickprop algorithms. Each hidden neuron is trained just once and then its weights are frozen. The network learning and building process is completed when satisfactory results are obtained.
Radial Basis Function Networks The structure of the radial basis network is shown in Fig. 32.16. This type of network usually has only one hidden layer with special neurons. Each of these neurons responds only to the inputs signals close to the stored pattern. The output signal hi of the ith hidden neuron is computed using formula 2
x – si h i = exp – ----------------- 2s 2
(32.40)
HIDDEN "NEURONS"
s1 STORED
0
y1 1
x IS CLOSE TO s2
w 0 s3 STORED
y2
D
3
s4 STORED
y2
OUTPUTS
2
w
INPUTS
s2 STORED
y1 D
w1
0
y3
y3 D
D SUMMING CIRCUIT
FIGURE 32.16
A typical structure of the radial basis function network.
©2002 CRC Press LLC
OUTPUT NORMALIZATION
0066_Frame_C32.fm Page 17 Wednesday, January 9, 2002 7:54 PM
where x = input vector, si = stored pattern representing the center of the i cluster, si = radius of the cluster. Note that the behavior of this “neuron” significantly differs form the biological neuron. In this “neuron,” excitation is not a function of the weighted sum of the input signals. Instead, the distance between the input and stored pattern is computed. If this distance is zero, the neuron responds with a maximum output magnitude equal to one. This neuron is capable of recognizing certain patterns and generating output signals that are functions of a similarity. Features of this neuron are much more powerful than a neuron used in the backpropagation networks. As a consequence, a network made of such neurons is also more powerful. If the input signal is the same as a pattern stored in a neuron, then this neuron responds with 1 and remaining neurons have 0 on the output, as is illustrated in Fig. 32.16. Thus, output signals are exactly equal to the weights coming out from the active neuron. This way, if the number of neurons in the hidden layer is large, then any input–output mapping can be obtained. Unfortunately, it may also happen that for some patterns several neurons in the first layer will respond with a nonzero signal. For a proper approximation, the sum of all signals from the hidden layer should be equal to one. To meet this requirement, output signals are often normalized, as shown in Fig. 32.16. The radial-based networks can be designed or trained. Training is usually carried out in two steps. In the first step, the hidden layer is usually trained in the unsupervised mode by choosing the best patterns for cluster representation. An approach similar to that used in the WTA architecture can be used. Also in this step, radii si must be found for a proper overlapping of clusters. The second step of training is the error backpropagation algorithm carried on only for the output layer. Since this is a supervised algorithm for one layer only, the training is very rapid, 100–1000 times faster than in the backpropagation multilayer network. This makes the radial basis-function network very attractive. Also, this network can be easily modeled using computers; however, its hardware implementation would be difficult.
32.6 Recurrent Neural Networks In contrast to feedforward neural networks, with recurrent networks neuron outputs can be connected with their inputs. Thus, signals in the network can continuously circulate. Until recently, only a limited number of recurrent neural networks were described.
Hopfield Network The single-layer recurrent network was analyzed by Hopfield (1982). This network, shown in Fig. 32.17, has unipolar hard threshold neurons with outputs equal to 0 or 1. Weights are given by a symmetrical square matrix W with zero elements (wij = 0 for i = j) on the main diagonal. The stability of the system is usually analyzed by means of the energy function
1 E = – -2
N
N
∑∑W v v
ij i j
(32.41)
i=1 j=1
It has been proved that during signal circulation the energy E of the network decreases and the system converges to the stable points. This is especially true when the values of system outputs are updated in the asynchronous mode. This means that at a given cycle, only one random output can be changed to the required values. Hopfield also proved that those stable points, which the system converges, can be
©2002 CRC Press LLC
0066_Frame_C32.fm Page 18 Wednesday, January 9, 2002 7:54 PM
v1
v1
W
v2
v2
v3
v3
v4
v4
v5
FIGURE 32.17
v5
A Hopfield network or autoassociative memory.
programmed by adjusting the weights using a modified Hebbian rule,
∆w ij = ∆w ji = ( 2v i – 1 ) ( 2v j – 1 )c
(32.42)
Such memory has limited storage capacity. Based on experiments, Hopfield estimated that the maximum number of stored patterns is 0.15N, where N is the number of neurons. Later the concept of energy function was extended by Hopfield (1984) to one-layer recurrent networks having neurons with continuous activation functions. These types of networks were used to solve many optimization and linear programming problems.
Autoassociative Memory Hopfield (1984) extended the concept of his network to autoassociative memories. In the same network structure as shown in Fig. 32.17, the bipolar hard-threshold neurons were used with outputs equal to −1 or +1. In this network, pattern sm are stored into the weight matrix W using the autocorrelation algorithm M
W =
∑s
T m m
s – MI
(32.43)
m=1
where M is the number of stored patterns and I is the unity matrix. Note that W is the square symmetrical matrix with elements on the main diagonal equal to zero (wji for i = j). Using a modified formula (32.42), new patterns can be added or subtracted from memory. When such memory is exposed to a binary bipolar pattern by enforcing the initial network states, after signal circulation the network will converge to the closest (most similar) stored pattern or to its complement. This stable point will be at the closest minimum of the energy
1 T E ( v ) = – --v Wv 2
(32.44)
Like the Hopfield network, the autoassociative memory has limited storage capacity, which is estimated to be about Mmax = 0.15N. When the number of stored patterns is large and close to the memory capacity, the network has a tendency to converge to spurious states, which were not stored. These spurious states are additional minima of the energy function.
©2002 CRC Press LLC
0066_Frame_C32.fm Page 19 Wednesday, January 9, 2002 7:54 PM
a a
a
b
W
b
W
WT
(b)
(a)
WT
FIGURE 32.18 An example of the bidirectional autoassociative memory: (a) drawn as a two-layer network with circulating signals, (b) drawn as two-layer network with bidirectional signal flow.
Bidirectional Associative Memories (BAMs) The concept of the autoassociative memory was extended to bidirectional associative memories (BAM) by Kosko (1987, 1988). This memory, shown in Fig. 32.18, is able to associate pairs of the patterns a and b. This is the two-layer network with the output of the second layer connected directly to the input of the T first layer. The weight matrix of the second layer is W and W for the first layer. The rectangular weight matrix W is obtained as a sum of the cross-correlational matrices M
W =
∑a
m
bm
(32.45)
m=1
where M is the number of stored pairs, and am and bm are the stored vector pairs. If the nodes a or b are initialized with a vector similar to the stored one, then after signal circulations, both stored patterns am and bm should be recovered. The BAM has limited memory capacity and memory corruption problems similar to the autoassociative memory. The BAM concept can be extended for association of three or more vectors.
32.7 Fuzzy Systems The main applications of neural networks are related to the nonlinear mapping of n-dimensional input variables into m-dimensional output variables. Such a function is often required in control systems, where, for specific measured variables, certain control variables must be generated. Another approach for nonlinear mapping of one set of variables into another set of variables is the fuzzy controller. The principle of operation of the fuzzy controller significantly differs from neural networks. The block diagram of a fuzzy controller is shown in Fig. 32.19. In the first step, analog inputs are converted into a set of fuzzy variables. In this step, for each analog input, 3–9 fuzzy variables typically are generated. Each fuzzy variable has an analog value between zero and one. In the next step, a fuzzy logic is applied to the input fuzzy variables and a resulting set of output variables is generated. In the last step, known as defuzzification, from a set of output fuzzy variables, one or more output analog variables are generated, which are used as control variables.
©2002 CRC Press LLC
0066_Frame_C32.fm Page 20 Wednesday, January 9, 2002 7:54 PM
ANALOG INPUTS
FUZZIFICATION INPUT FUZZY VARIABLES RULE EVALUATION OUTPUT FUZZY VARIABLES DEFUZZIFICATION
FIGURE 32.19 troller.
The block diagram of the fuzzy conANALOG OUTPUTS
57O F
T (a)
20
30
40
50
60
70
80
90
100
110
O
F
WARM NORMAL COOL COLD
HOT
0 0 0.3 0.5 0
80O F
FUZZIFICATION
HOT
HOT
FUZZIFICATION
80OF 57O F WARM COOL NORMAL
COLD
WARM NORMAL COOL COLD
0 0.7 0.2 0 0
FIGURE 32.20 Fuzzification process: (a) typical membership functions for the fuzzification and the defuzzification processes, (b) example of converting a temperature into fuzzy variables.
Fuzzification The purpose of fuzzification is to convert an analog variable input into a set of fuzzy variables. For higher accuracy, more fuzzy variables will be chosen. To illustrate the fuzzification process, consider that the input variable is the temperature and is coded into five fuzzy variables: cold, cool, normal, warm, and hot. Each fuzzy variable should obtain a value between zero and one, which describes a degree of association of the analog input (temperature) within the given fuzzy variable. Sometimes, instead of the term degree of association, the term degree of membership is used. The process of fuzzification is illustrated in Fig. 32.20. Using Fig. 32.20 we can find the degree of association of each fuzzy variable with the given temperature. For example, for a temperature of 57°F, the following set of fuzzy variables is obtained: [0, 0.5, 0.2, 0, 0], and for T = 80°F, it is [0, 0, 0.25, 0.7, 0]. Usually only one or two fuzzy variables have a value other than zero. In the example, trapezoidal functions are used for calculation of the degree of association. Various different functions such as triangular or Gaussian can also be used, as long as the computed value is in the range from zero to one. Each membership function is described by only three or four parameters, which have to be stored in memory. For proper design of the fuzzification stage, certain practical rules should be used: • Each point of the input analog variable should belong to at least one and no more than two membership functions. • For overlapping functions, the sum of two membership functions must not be larger than one. This also means that overlaps must not cross the points of maximum values (ones). • For higher accuracy, more membership functions should be used. However, very dense functions lead to frequent system reaction and sometimes to system instability.
Rule Evaluation In contrary to boolean logic where variables can have only binary states, in fuzzy logic all variables may have any values between zero and one. The fuzzy logic consists of the same basic: ∧—AND, ∨—OR, and NOT operators: A∧B∧C A∨B∨C
A
⇒ min{A, B, C}—smallest value of A or B or C ⇒ max{A, B, C}—largest value of A or B or C ⇒ 1 1–A—one minus value of A
©2002 CRC Press LLC
0066_Frame_C32.fm Page 21 Wednesday, January 9, 2002 7:54 PM
(a)
FIGURE 32.21
y1
y2
y3
y1
y2
y3
x1
z1
z1
z2
x1
t11
t12
t13
x2
z1
z3
z3
x2
t21
t22
t23
t31
t32
t33
x3
z2
z4
z4
x3
x4
z1
z2
z3
x4
t41
t42
t43
x5
z1
z2
z4
x5
t51
t52
t53
(b)
Fuzzy tables: (a) table with fuzzy rules, (b) table with the intermediate variables tij.
1
z 0
FIGURE 32.22
Illustration of the defuzzification process.
For example, 0.1 ∧ 0.7 ∧ 0.3 = 0.1, 0.1∨0.7 ∨ 0.3 = 0.7, and 0.3 = 0.7. These rules are also known as Zadeh AND, OR, and NOT operators (Zadeh, 1965). Note that these rules are true also for classical binary logic. Fuzzy rules are specified in the fuzzy table as it is shown for a given system. Consider a simple system with two analog input variables x and y, and one output variable z. The goal is to design a fuzzy system generating z as f (x, y). After fuzzification, the analog variable x is represented by five fuzzy variables: x1, x2, x3, x4, x5 and an analog variable y is represented by three fuzzy variables: y1, y2, y3. Assume that an analog output variable is represented by four fuzzy variables: z1, z2, z3, z4. The key issue of the design process is to set proper output fuzzy variables zk for all combinations of input fuzzy variables, as shown in the table in Fig. 32.21. The designer has to specify many rules such as if inputs are represented by fuzzy variables xi and yj, then the output should be represented by fuzzy variable zk . Once the fuzzy table is specified, the fuzzy logic computation proceeds in two steps. First, each field of the fuzzy table is filled with intermediate fuzzy variables tij, obtained from AND operator tij = min{xi, yj}, as shown in Fig. 32.21(b). This step is independent of the required rules for a given system. In the second step, the OR (max) operator is used to compute each output fuzzy variable zk. In the given example in Fig. 32.21, z1 = max{t11, t12, t21, t41, t51}, z2 = max{t13, t31, t42, t52}, z3 = max{t22, t23, t43,}, z4 = max{t32, t34, t53}. Note that the formulas depend on the specifications given in the fuzzy table shown in Fig. 32.21(a).
Defuzzification As a result of fuzzy rule evaluation, each analog output variable is represented by several fuzzy variables. The purpose of defuzzification is to obtain analog outputs. This can be done by using a membership function similar to that shown in Fig. 32.20. In the first step, fuzzy variables obtained from rule evaluations are used to modify the membership function employing the formula
m∗k ( z ) = min { m k ( z ), z k }
(32.46)
For example, if the output fuzzy variables are 0, 0.2, 0.7, 0.0, then the modified membership functions have shapes shown by the thick line in Fig. 32.22. The analog value of the z variable is found as a center ©2002 CRC Press LLC
0066_Frame_C32.fm Page 22 Wednesday, January 9, 2002 7:54 PM
of gravity of modified membership functions m ∗k ( z ), n
z analog
∫
+∞
∑ k=1 m∗k ( z )z dz ∞ = -----------------------------------------+∞ n ∑ k=1 m∗k ( z ) dz
(32.47)
∫
∞
In the case where shapes of the output membership functions mk(z) are the same, the equation can be simplified to
∑ k=1 z k zc k z analog = --------------------n ∑ k=1 z k n
(32.48)
where n = number of membership function of zanalog output variable, zk = fuzzy output variables obtained from rule evaluation, zck = analog values corresponding to the center of kth membership function. Equation (32.47) is usually too complicated to be used in a simple microcontroller based system; therefore, in practical cases, Eq. (32.48) is used more frequently.
Design Example Consider the design of a simple fuzzy controller for a sprinkler system. The sprinkling time is a function of humidity and temperature. Four membership functions are used for the temperature, three for humidity, and three for the sprinkle time, as shown in Fig. 32.23. Using intuition, the fuzzy table can be developed, as shown in Fig. 32.24(a). Assume a temperature of 60°F and 70% humidity. Using the membership functions for temperature and humidity, the following fuzzy variables can be obtained for the temperature: [0, 0.2, 0.5, 0], and for the humidity: [0, 0.4, 0.6]. Using the min operator, the fuzzy table can be now filled with temporary fuzzy variables, as shown in Fig. 32.24(b). Note that only four fields have nonzero values. Using fuzzy rules, as shown in Fig. 32.24(a), the max operator can be applied in order to obtain fuzzy output variables: short → o1 = max{0, 0, 0.2, 0.5, 0} = 0.5, medium → o2 = max{0, 0, 0.2, 0.4, 0} = 0.4, long → o3 = max{0, 0} = 0.
COLD
COOL
HOT
NORMAL
DRY
0.6 0.4
0.5 0.2
H
T 0
0 (a)
WET
NORMAL
1
1
20
40
60
SHORT
80
100
120
0
20
LONG
MEDIUM
1
(b)
40
60
SHORT
100 [%]
80
MEDIUM
1
LONG
TIME
TIME 0
0 (c)
0
20
40
60
80
100 [min]
(d)
0
20
40
60
80
100 [min]
FIGURE 32.23 Membership functions for the presented example: (a) and (b) are membership functions for input variables, (c) and (d) are two possible membership functions for the output variable.
©2002 CRC Press LLC
0066_Frame_C32.fm Page 23 Wednesday, January 9, 2002 7:54 PM
(a)
(b)
FIGURE 32.24 example.
DRY
NORMAL
WET
COLD
M
S
S
COOL
M
M
S
WARM
L
M
S
HOT
L
M
S
DRY
NORMAL
WET
0
0.4
0.6
COLD 0
0
0
0
COOL 0.2
0
0.2
0.2
WARM 0.5
0
0.4
0.5
HOT
0
0
0
0
Fuzzy tables: (a) fuzzy rules for the design example, (b) fuzzy temporary variables for the design
Using Eq. (32.47) and Fig. 32.23(c), a sprinkle time of 28 min is determined. When the simplified approach is used with Eq. (32.46) and Fig. 32.23(d), then sprinkle time is 27 min.
32.8 Genetic Algorithms The success of the artificial neural networks encouraged researchers to search for other patterns in nature to follow. The power of genetics through evolution was able to create such sophisticated machines as the human being. Genetic algorithms follow the evolution process in nature to find better solutions to some complicated problems. The foundations of genetic algorithms are given by Holland (1975) and Goldberg (1989). After initialization, the steps selection, reproduction with a crossover, and mutation are repeated for each generation. During this procedure, certain strings of symbols, known as chromosomes, evaluate toward a better solution. The genetic algorithm method begins with coding and an initialization. All significant steps of the genetic algorithm will be explained using a simple example of finding a 2 2 maximum of the function (sin (x) − 0.5 ∗ x) with the range of x from 0 to 1.6. Note that in this range, the function has a global maximum at x = 1.309, and a local maximum at x = 0.262.
Coding and Initialization At first, the variable x has to be represented as a string of symbols. With longer strings, the process usually converges faster, so the fewer symbols for one string field that are used, the better. Although this string may be the sequence of any symbols, the binary symbols 0 and 1 are usually used. In our example, 6-bit binary numbers are used for coding, having a decimal value of 40x. The process starts with a random generation of the initial population given in Table 32.1.
Selection and Reproduction Selection of the best members of the population is an important step in the genetic algorithm. Many different approaches can be used to rank individuals. In this example the ranking function is given. Highest rank has member number 6, and lowest rank has member number 3. Members with higher rank should have higher chances to reproduce. The probability of reproduction for each member can be obtained as a fraction of the sum of all objective function values. This fraction is shown in the last column
©2002 CRC Press LLC
0066_Frame_C32.fm Page 24 Wednesday, January 9, 2002 7:54 PM
TABLE 32.1 Initial Population String Number 1 2 3 4 5 6 7 8 Total
String
Decimal Value
Variable Value
Function Value
Fraction of Total
101101 101000 010100 100101 001010 110001 100111 000100
45 40 20 37 10 49 39 4
1.125 1.000 0.500 0.925 0.250 1.225 0.975 0.100
0.0633 0.0433 0.0004 0.0307 0.0041 0.0743 0.0390 0.0016 0.2568
0.2465 0.1686 0.0016 0.1197 0.0158 0.2895 0.1521 0.0062 1.0000
of Table 32.1. Note that to use this approach, our objective function should always be positive. If it is not, the proper normalization should be introduced at first.
Reproduction The numbers in the last column of Table 32.1 show the probabilities of reproduction. Therefore, most likely members numbers 3 and 8 will not be reproduced, and members 1 and 6 may have two or more copies. Using a random reproduction process, the following population, arranged in pairs, could be generated:
101101 → 45 100111 → 39
110001 → 49 101101 → 45
100101 → 37 110001 → 49
110001 → 49 101000 → 40
If the size of the population from one generation to another is the same, two parents should generate two children. By combining two strings, two other strings should be generated. The simplest way to do this is to split in half each of the parent strings and exchange substrings between parents. For example, from parent strings 010100 and 100111, the following child strings will be generated: 010111 and 100100. This process is known as the crossover. The resultant children are
101111 → 47 100101 → 37
110101 → 53 101001 → 41
100001 → 33 110101 → 53
110000 → 48 101001 → 41
In general, the string need not be split in half. It is usually enough if only selected bits are exchanged between parents. It is only important that bit positions are not changed.
Mutation In the evolutionary process, reproduction is enhanced with mutation. In addition to the properties inherited from parents, offspring acquire some new random properties. This process is known as mutation. In most cases mutation generates low-ranked children, which are eliminated in the reproduction process. Sometimes, however, the mutation may introduce a better individual with a new property. This prevents the process of reproduction from degeneration. In genetic algorithms, mutation usually plays a secondary role. For very high levels of mutation, the process is similar to random pattern generation, and such a searching algorithm is very inefficient. The mutation rate is usually assumed to be at a level well below 1%. In this example, mutation is equivalent to the random bit change of a given pattern. In this simple case, with short strings and a small population, and with a typical mutation rate of 0.1%, the patterns remain practically unchanged by the mutation process. The second generation for this example is shown in Table 32.2. ©2002 CRC Press LLC
0066_Frame_C32.fm Page 25 Wednesday, January 9, 2002 7:54 PM
TABLE 32.2 Population of Second Generation String Number 1 2 3 4 5 6 7 8 Total
String
Decimal Value
Variable Value
Function Value
Fraction of Total
010111 100100 110101 010001 100001 110101 110000 101001
47 37 53 41 33 53 48 41
1.175 0.925 1.325 1.025 0.825 1.325 1.200 1.025
0.0696 0.0307 0.0774 0.0475 0.0161 0.0774 0.0722 0.0475 0.4387
0.1587 0.0701 0.1766 0.1084 0.0368 0.1766 0.1646 0.1084 1.0000
Note that two identical highest ranking members of the second generation are very close to the solution x = 1.309. The randomly chosen parents for the third generation are:
010111 → 47 110101 → 53
110101 → 53 110000 → 48
110000 → 48 101001 → 41
101001 → 41 110101 → 53
110001 → 49 101000 → 40
101101 → 45 110001 → 49
which produces the following children:
010101 → 21 110111 → 55
110000 → 48 110101 → 53
The best result in the third population is the same as in the second one. By careful inspection of all strings from the second or third generation, it may be concluded that using crossover, where strings are always split in half, the best solution 110100 → 52 will never be reached, regardless of how many generations are created. This is because none of the population in the second generation has a substring ending with 100. For such crossover, a better result can be only obtained due to the mutation process, which may require many generations. Better results in the future generation also can be obtained when strings are split in random places. Another possible solution is that only randomly chosen bits are exchanged between parents. The genetic algorithm is very rapid, and it leads to a good solution within a few generations. This solution is usually close to global maximum, but not the best.
Defining Terms Backpropagation: Training technique for multilayer neural networks. Bipolar neuron: Neuron with output signal between −1 and +1. Feedforward network: Network without feedback. Perceptron: Network with hard threshold neurons. Recurrent network: Network with feedback. Supervised learning: Learning procedure when desired outputs are known. Unipolar neuron: Neuron with output signal between 0 and +1. Unsupervised learning: Learning procedure when desired outputs are unknown.
References Fahlman, S.E. 1988. Faster-learning variations on backpropagation: An empirical study. Proceedings of the Connectionist Models Summer School, D. Touretzky, G. Hinton, and T. Sejnowski, Eds., Morgan Kaufmann, San Mateo, CA. Fahlman, S.E. and Lebiere, C. 1990. The cascade correlation learning architecture. Adv. Ner. Inf. Proc. Syst., 2, D.S. Touretzky, ed., pp. 524–532. Morgan Kaufmann, Los Altos, CA. ©2002 CRC Press LLC
0066_Frame_C32.fm Page 26 Wednesday, January 9, 2002 7:54 PM
Goldberg, D.E. 1989. Genetic Algorithm in Search, Optimization and Machine Learning. Addison–Wesley, Reading, MA. Grossberg, S. 1969. Embedding fields: a theory of learning with physiological implications. Journal of Mathematical Psychology 6:209–239. Hebb, D.O. 1949. The Organization of Behavior, a Neuropsychological Theory. John Wiley, New York. Hecht-Nielsen, R. 1987. Counterpropagation networks. Appl. Opt. 26(23):4979–4984. Hecht-Nielsen, R. 1988. Applications of counterpropagation networks. Neural Networks 1:131–139. Holland, J.H. 1975. Adaptation in Natural and Artificial Systems. Univ. of Michigan Press, Ann Arbor, MI. Hopfield, J.J. 1982. Neural networks and physical systems with emergent collective computation abilities. Proceedings of the National Academy of Science 79:2554–2558. Hopfield, J.J. 1984. Neurons with graded response have collective computational properties like those of two-state neurons. Proceedings of the National Academy of Science 81:3088–3092. Kohonen, T. 1988. The neural phonetic typerater. IEEE Computer 27(3):11–22. Kohonen, T. 1990. The self-organized map. Proc. IEEE 78(9):1464–1480. Kosko, B. 1987. Adaptive bidirectional associative memories. App. Opt. 26:4947–4959. Kosko, B. 1988. Bidirectional associative memories. IEEE Trans. Sys. Man, Cyb. 18:49–60. McCulloch, W.S. and Pitts., W.H., 1943. A logical calculus of the ideas imminent in nervous activity. Bull. Math. Biophys. 5:115–133. Minsky, M. and Papert, S. 1969. Perceptrons. MIT Press, Cambridge, MA. Nilsson, N.J. 1965. Learning Machines: Foundations of Trainable Pattern Classifiers. McGraw-Hill, New York. Nguyen, D. and Widrow, B. 1990. Improving the learning speed of 2-layer neural networks, by choosing initial values of the adaptive weights. Proceedings of the International Joint Conference on Neural Networks (San Diego), CA, June. Pao, Y.H. 1989. Adaptive Pattern Recognition and Neural Networks. Addison–Wesley, Reading, MA. Rosenblatt, F. 1958. The perceptron: a probabilistic model for information storage and organization in the brain. Psych. Rev. 65:386–408. Rumelhart, D.E., Hinton, G.E., and Williams, R.J. 1986. Learning internal representation by error propagation. Parallel Distributed Processing. Vol. 1, pp. 318–362. MIT Press, Cambridge, MA. Sejnowski, T.J. and Rosenberg, C.R. 1987. Parallel networks that learn to pronounce English text. Complex Systems 1:145–168. Specht, D.F. 1990. Probalistic neural networks. Neural Networks 3:109–118. Specht, D.F. 1992. General regression neural network. IEEE Trans. Neural Networks 2:568–576. Wasserman, P.D. 1989. Neural Computing Theory and Practice. Van Nostrand Reinhold, New York. Werbos, P., 1974. Beyond regression: new tools for prediction and analysis in behavioral sciences. Ph.D. diss., Harvard University. Widrow, B. and Hoff, M.E. 1960. Adaptive switching circuits. 1960 IRE Western Electric Show and Convention Record, Part 4 (Aug. 23):96–104. Widrow, B. 1962. Generalization and information storage in networks of adaline Neurons. In Selforganizing Systems, M.C. Jovitz, G.T. Jacobi, and G. Goldstein, eds., pp. 435–461. Sparten Books, Washington, D.C. Wilamowski, M. and Torvik, L., 1993. Modification of gradient computation in the back-propagation algorithm. ANNIE’93 - Artificial Neural Networks in Engineering. November 14–17, 1993, St. Louis, Missou.; also in C.H Dagli, ed. 1993. Intelligent Engineering Systems Through Artificial Neural Networks Vol. 3, pp. 175–180. ASME Press, New York. Zadeh, L.A. 1965. Fuzzy sets. Information and Control 8:338–353. Zurada, J. 1992. Introduction to Artificial Neural Systems. West Publ.
©2002 CRC Press LLC
33 Advanced Control of an Electrohydraulic Axis 33.1 33.2 33.3
Introduction Generalities Concerning ROBI_3, a Cartesian Robot with Three Electrohydraulic Axes Mathematical Model and Simulation of Electrohydraulic Axes The Extended Mathematical Model • Nonlinear Mathematical Model of the Servovalve • Nonlinear Mathematical Model of Linear Hydraulic Motor
33.4
Conventional Controllers Used to Control the Electrohydraulic Axis PID, PI, PD with Filtering • Observer • Simulation Results of Electrohydraulic Axis with Conventional Controllers
33.5
Florin Ionescu
33.6
Neural Control Techniques
University of Applied Sciences
Crina Vlad
33.7
Politeknica University of Bucharest
Dragos Arotaritei Aalborg University Esbjerg
Control of Electrohydraulic Axis with Fuzzy Controllers Neural Techniques Used to Control the Electrohydraulic Axis Neuro-Fuzzy Techniques Used to Control the Electrohydraulic Axis C ontrol Structure
33.8 33.9
Software Considerations Conclusions
33.1 Introduction Due to the development of technology in the last few years, robots are seen as advanced mechatronic systems which require knowledge from mechanics, actuators, and control in order to perform very complex tasks. Different kinds of servo-systems, especially electrohydraulic, could be met at the executive level of the robots. Taking into account the most advanced control approaches, this paper deals with the implementation of advanced controllers besides conventional ones which are used in an electrohydraulic system. The considered electrohydraulic system is one of the axes of a robot. These robots possess three or more electrohydraulic axes, which are identical with the axis studied in this chapter. An electrohydraulic axis whose mathematical model (MM) is described in this chapter presents a multitude of nonlinearities. Conventional controllers are becoming increasingly inappropriate to control the systems with an imprecise model where many nonlinearities are manifested. Therefore, advanced techniques such as neural networks and fuzzy algorithms are deeply involved in the control of such systems. Neural networks, initially proposed by McCulloch and Pitts, Rosenblatt, Widrow, had several
©2002 CRC Press LLC
limitations that restricted the domain of applications. An important change took place in the 1980s when Hopfield’s theory regarding recurrent neural networks, the model of self-organization developed by Kohonen, and cellular neural networks (Chua) relaunched this research field. The development of some efficient algorithms dedicated specifically to the architecture of neural networks, and the application of these networks in control, represents an interesting area of research in the contemporary world of science. Fuzzy systems, in conjunction with neural networks, hold an important place in advanced techniques of control. These systems have origins in fuzzy set theory initiated by L. Zadeh. One essential feature of fuzzy systems is the approximate reasoning in which the variables are described in a qualitative manner. Due to the capability of fuzzy systems to deal with imprecise information, they are strongly recommended in order to express knowledge in the form of linguistic rules. In this way, the human operator’s knowledge, which is linguistic or numerical, is used to generate the set of fuzzy if-then rules as a basis for a fuzzy controller. A main drawback of fuzzy systems is the difficulty to design them on the basis of a systematic methodology. To overcome this drawback, the learning procedures from neural networks are applied successfully in order to tune the parameters of membership functions. The merging of these two fields has led to the emergence of neuro-fuzzy systems, which have been applied with promising results in the field of control-engineering. In order to improve dynamic and static performances of the systems characterized by nonlinearities and uncertainties, neuro-fuzzy controllers are used. The present contribution is organized as follows. An introduction of the electrohydraulic systems with an emphasis on the control of such devices is realized in Section 33.2. Section 33.3 is devoted to the MM of electrohydraulic axes, and the subsequent sections treat the control of electrohydraulic axes through conventional methods (Section 33.4), fuzzy systems (Section 33.5), neural networks (Section 33.6), and neuro-fuzzy techniques (Section 33.7). Conclusions are given in Section 33.8.
33.2 Generalities Concerning ROBI_3, a Cartesian Robot with Three Electrohydraulic Axes The automated installation, which uses electrohydraulic axes, whose mathematical model is described in section 33.3, is a Cartesian robot named ROBI_3. ROBI_3 has three identical electrohydraulic axes and is built from aluminium profiles [21]. The slides are actuated by hydraulic servoactuators (Rexroth). Slades move on the linear guideways with balls and two recirculation paths. The hydraulic supply installation is placed under the robot table and has a cooling and controlling installation with air. The mechanical structure of the robot is depicted in Fig. 33.1. The three axes of ROBI_3 are identically controlled by the controlling software named TORCH, which runs in Windows. The 32-bit dSPACE controlling hardware endowed with 10 A/D and D/A interfaces is plugged into the PC and serves as the interface between the PC and each of the axes. An electrohydraulic axis consists of a servovalve and a hydraulic cylinder and has a nonlinear structure. The control system of one axis consists of: 1. 2. 3. 4. 5.
the controller represented by a personal computer endowed with a process card; the electrohydraulic converter; the actuator (a linear hydraulic servomotor (LHM)); the mechanical process to be controlled, characterized by the slade position; the position transducer.
The control system of robot ROBI_3 is illustrated in Fig. 33.2, where the presence of three electrohydraulic axes, as well as the structure of one axes, identical to the others, can be observed. The corresponding mathematical model for one axis, on the basis of which the control of the robot is achieved, is described in section 33.3. Through numerical simulations of the three axes of the robot, the necessary mechanical structure interface data is obtained. Preliminary experiments with driven and controlled variable: position and velocity are made in order to achieve experience (Figs. 33.2 and 33.3). The diagram of a closed-loop position control with ©2002 CRC Press LLC
Z X Y
Mass Cylinder Transducer Servovalve
FIGURE 33.1
ROBI_3, a Cartesian robot with three axes [21]. (a) Design; (b) practical allignment.
Servovalve
Slade
Position Transducer
LHM Guideway
X Axis Personal Computer
Y Axis
Z Axis
FIGURE 33.2
The control system of the robot [21,24].
x
x x
x x
FIGURE 33.3
Diagram of a closed-loop position control with direct measurement.
direct measurement (driven by means of a servovalve) is shown in Fig. 33.3, and the closed-loop position control with indirect measurement at spindle (actuated by means of a servovalve) is shown in Fig. 33.4. A volumetric Q-rate regulation with constant pressure (Q ≠ const; p @ const) is shown in Fig. 33.5. However, this classic model, useful for application, was used only for preliminary results in simulation. One of the main reasons to use this is because we need a well-known mathematical model with wellstudied behavior in order to test the controllers (neural and neuro-fuzzy, namely). ©2002 CRC Press LLC
x
FIGURE 33.4
Closed loop-position control with indirect measurement. Other Users
(Servo)
Servovalve
p = konst.
P
A
T
B
Cylinder
QM2A pM2A
QM2B pM2B
Accumulator y, v, a High Pressure Filter
FL
QM1A pM1A
QP
ϕ,ω , α
ωP εU Σ
- Uactual Uprescribed
Tank Return Line Filter Electro Motor
Pressure Reduction Valve
ML QM1B pM1B
Tacho Generator Servovalve
(Servo)
Tank Rotary Motor
Load
Variable Displacement Pump
FIGURE 33.5
Volumetric Q-rate regulation with constant pressure.
33.3 Mathematical Model and Simulation of Electrohydraulic Axes Section 33.3 deals with the analytical findings of the mathematical model (MM) of an electrohydraulic axis, a component part of robot ROBI_3. This method of analysis is advantageous because it offers the possibility to use this MM for other electrohydraulic axes as well, regardless of the different number of stages, and also allows the testing of dynamic performances of the axis at the design level. In this section, the following were realized: 1. 2. 3. 4. 5.
the static models of electrohydraulic system components (servovalve, hydraulic linear motor); the parameters involved in MM, based on constructive and flowing regime characteristics; the nonlinear MM of the proposed electrohydraulic system; the structural scheme of the hydraulic axis in order to simulate its behavior (SIMULINK); the investigations regarding MM, which certify the stability of the system and the fact that the modelled process is a rapid one.
Values of parameters that describe the MM are set based on hydraulic characteristics and on constructive parameters of the considered system.
The Extended Mathematical Model The studied system consists of a servovalve and an asymmetric motor. In most cases, the control of an electrohydraulic axis is directed towards position control, velocity control, pressure control, or force control. The position control of the axis is studied. The position control loop for the proposed installation is illustrated in Fig. 33.6, together with the denomination of some data. ©2002 CRC Press LLC
FIGURE 33.6
Control scheme of the servosystem.
Nonlinear Mathematical Model of the Servovalve As previously mentioned, the servovalve used at the proposed electrohydraulic axis has four paths and three positions. The servovalve has four active control edges at the second hydraulic stage. Three stages could be distinguished by this servovalve: the electromechanical, the mechanohydraulical, and the hydromechanical one. Regarded as a system, a servovalve is complex, with various types of nonlinearities being manifested. Different static and dynamic nonlinearities such as dead zone, jump in origin, saturation, Coulombian and Newtonian frictions with hysteresis, and asymmetry appear in each of these three levels and also in the actuator of the electrohydraulic motor. These were taken into account in the modeling of the servovalve and of the cylinder behavior. For the studied servovalve, the circulation of the fluid is considered directed from the pump to the admission chamber A (QA) and from the discharge chamber B to the reservoir (QB). Figure 33.6 presents the control loop where the transducer is placed on the feedback path and the controller R and the amplifier A are on the direct path. Electrical signal (±10 V or ±300 mA) is converted into the displacement xv of the valve, and in this way in a flow Q, which is transmitted to the linear hydraulic motor. From the point of view of control characteristics, the number of active edges serves as a method of classification of slide valves [3]. A servovalve with four active control edges was considered. The lightly simplified mathematical model, which describes the functionality of the servovalve, consists of the following equations:
d (t) . u ( t ) = L . ----------dt + R i ( t )
(33.1)
where L [H], the inductance of electrical level; R [W], the resistance of electrical level; u(t) [V], the control voltage; i(t) [A], the control intensity.
m . x v (t ) + d . x v (t ) + c . x v (t ) =
∑F
(33.2)
where m [kg], the mass of valve; d [N/(m/s)], the linearized gradient of viscous friction for the piston of the valve; c[N/m], the coefficient of hydraulic elasticity; xv [m], the spool displacement; ∑F [N], the ©2002 CRC Press LLC
0066_frame_Ch33.fm Page 6 Wednesday, January 9, 2002 8:00 PM
U ref
+
e
Σ
KUI
I
K IF
F
w02/ c
−
F/m +
Σ
.. xv
. xv
. + xv max −
+ x v max −
xv
− − 2Dv w 0v2
w 0v2
FIGURE 33.7
Nonlinear MM of the first stages of the servovalve.
resulting force, which actuates on the valve spool.
∑F 2 x˙˙v (t ) + 2 . D v . w 0v . x˙v ( t ) + w 0v . x v ( t ) = ------m 2 x˙˙v ( t ) = k∗ – 2 . D v . w 0v . x˙v ( t ) – w 0v . x v ( t )
∑F m
where k∗ = -------
(33.3)
The displacement xv , obtained based upon the mentioned equations, is implemented in SIMULINK using the scheme from Fig. 33.7. This module of nonlinear MM includes two stages of electrohydraulic axis: the electrohydraulic and the hydromechanical one. The corresponding equations for the four flows that go through the servovalve are
2 Q PA = a D . p . D v . --- . ( x 0 + x v ( t ) ) . p P – p A ( t ) , r
x v ∈ [ – x 0 , x max ]
2 Q AT = a D . p . D v . --- . ( x 0 – x v ( t ) ) . p A ( t ) – p T , r
x v ∈ [ – x max , x 0 ]
2 = a D . p . D v . --- . ( x 0 – x v ( t ) ) . p P – p B ( t ) , r
x v ∈ [ – x max , x 0 ]
Q PB
2 Q BT = a D . p . D v . --- . ( x 0 + x v ( t ) ) . p B ( t ) – p T , r
(33.4)
x v ∈ [ – x 0 , x max ]
3
3
where QPA [m /s], the flow to the hydraulic motor, from pump to the chamber A of the motor; QAT [m /s], 3 the flow from the chamber A to reservoir; QPB [m /s], the flow from pump to the chamber B of the 3 motor; QBT [m /s], the flow from the chamber B to reservoir; αD [-], the discharge coefficient; Dv [m], the spool’s diameter; x0 [m], the dimension of the lap of the spool; xv [m], the spool’s displacement; 2 2 3 pA [N/m ], the fluid pressure in chamber A; pB [N/m ], the fluid pressure in chamber B [kg/m ] fluids density. The flows, which are transmitted to LHM and evacuated from LHM, are QA and QB , which are computed as following:
Q A = Q PA – Q AT ,
Q B = Q BT – Q PB
(33.5)
The lap of the spool is considered to be zero (x0 = 0), and, therefore, the static characteristic is linear around the origin and also in the rest. With Q0 = αD ⋅ π ⋅ Dv ⋅ 2/r , the flow equations become
Q PA = Q 0 . x v . p P – p A ,
Q AT = Q 0 . ( – x v ) . p A – p T
Q PB = Q 0 . ( – x v ) . p P – p B ,
Q BT = Q 0 . x v . p B – p T
(33.6)
Nonlinear Mathematical Model of Linear Hydraulic Motor The differential equations, based on which the MM of the linear hydraulic motor (LHM) was achieved, are i. the equation of the dynamic equilibrium of the forces reduced to the motor’s rod, and ii. the equation of movement and flow continuity. ©2002 CRC Press LLC
0066_frame_Ch33.fm Page 7 Wednesday, January 9, 2002 8:00 PM
N
Fc1
pA A K
Ff
pB A R
Fd1 FT
FIGURE 33.8
D’Alembert’s principle applied to the cylinder.
. .. x, x, x
Ff pA A K
pB A R
FL
FT N3 Ff 3
FIGURE 33.9
D’Alembert’s principle applied to the rod, piston, and load.
Modeling the LHM, several simplifications (most of them concerning the Coulombian and Newtonian friction) were used. The forces that actuate on the LHM cylinder are depicted in Fig. 33.8: Applying D’Alembert’s principle, the equation of dynamic equilibrium of forces for the cylinder of LHM is
p B . A R – p A . A k + c 1 . ( x 1 – x 2 ) + d 1 . ( x˙1 – x˙2 ) + c fu . N . sgn ( x˙ – x˙2 ) + d z . ( x˙ – x˙2 ) x˙2 = ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------m2 . s
(33.7)
where c1 [N/m], the elasticity; d1 [N/(m/s)], the linearized coefficient of the viscous Newtonian friction in the connection actuators’ cylinder and wall; cfu [-], the coefficient of the dry Coulombian friction in the cylinder and rod seals; dz [N/(m/s)], the coefficient of Newtonian friction in the piston and rod seals; 2 m2 [kg], the cylinder mass; pA [N/m ], the fluid pressure in the admission chamber A of the actuator; pB 2 2 [N/m ], the fluid pressure in the discharge chamber B of the actuator; AK [m ], the piston active area in 2 chamber A; AR [m ], the piston active area in chamber B; N [N], the normal force, which determines the friction force between piston and cylinder; x [m], the piston displacement; x1 [m], the wall displacement; and x2 [m], the cylinder displacement. The forces acting on the rod, piston, and working element are illustrated in Fig. 33.9 The velocity corresponding to the rod, piston, and mass m3 (slade, guideway, and loading are considered stiff fastened) is inferred from the equilibrium equation:
p A . A K – p B . A R – F L – c fu . N . sgn ( x˙ – x˙2 ) – d z . ( x˙ – x˙2 ) – c fu3 . N 3 . sgn ( x˙ – x˙1 ) – d 3 . ( x˙ – x˙1 ) - (33.8) x˙ = -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------( m p + m T + m 3 )⋅s where mp [kg], the piston mass; mT [kg], the rod mass; m3 [kg], load mass (reduced at the rod of piston); cfu3 [-], the coefficient of Coulombian friction between guide ways and slade; d3 [N/(m/s)], the coefficient of Newtonian friction between guideways and slade; N3 [N], the normal force which appears between loading and table; FL [N], the loading force. ©2002 CRC Press LLC
0066_frame_Ch33.fm Page 8 Wednesday, January 9, 2002 8:00 PM
FIGURE 33.10
Electrohydraulic axis implemented in SIMULINK.
From the equations of continuity the pressures pA and pB are inferred:
E ers p˙A = [ Q A – A K . ( x˙ – x˙2 ) – a 11 . ( p A – p B ) ] . -----------------------------------------V 0K + A K . ( x – x 2 ) E ers p˙B = [ A R . ( x˙ – x˙2 ) + a 11 . ( p A – p B ) – a 12 . ( p B – p 0 ) – Q B ] . -----------------------------------------------------------------( V 0R + A R . h ) – A R . ( x – x 2 ) 2
3
(33.9)
(33.10)
3
where a11, a12 [(N/m )/(m /s)], the gradients of leakages; V0K,0R [m ], the initial average volume of 2 2 chambers A and B, respectively; Eers [N/m ], the equivalent bulk modulus of oil; pA,B [N/m ], the fluid pressure in chambers A and B, respectively; and h [m], the stroke of the piston-rod. The LHM operation is based on the equations described above, namely (33.7)–(33.10). The MM proposed in this section is implemented in SIMULINK 2.1/ MATLAB 5.1 and has the structure presented in Fig. 33.10. The signal generator icon from the above figure generates the displacement of the wall x1, which has a sinusoidal form with the frequency 0.5 Hz and amplitude 0.0001 m. The subsystems Ssys1 and Ssys2 have as outputs the valve displacement xv , and the flows QA and QB, respectively. Ssys3 is the block that implemented Eq. (33.9), while the subsystem Ssys4 modelled Eq. (33.10). The equations that describe the displacement of the wall cylinder and the LHM piston are modelled by subsystem Ssys5. The reference signal is a step one whose values are in the range 0–10 V.
33.4 Conventional Controllers Used to Control the Electrohydraulic Axis This section is organized as follows: the first part presents the bibliographic research concerning the traditional directions of the control system, and the second one contains the testing of several classic control structures (PID and control algorithms with Luenberger observer) through simulations of the electrohydraulic axis endowed with these controllers. The testing of the MM is performed with SIMULINK and has a goal of the achievement of reference experimental results in order to perform a comparative study of classical controllers and advanced control structures applied to the electrohydraulic axis. ©2002 CRC Press LLC
0066_frame_Ch33.fm Page 9 Wednesday, January 9, 2002 8:00 PM
PID, PI, PD with Filtering The conventional control structures used in this chapter are PI (proportional-integral), PID (proportionalintegral-derivative), and PD (proportional-derivative) with filtering coefficient. The transfer function of the PI controller has the following expression:
Ti . s + 1 1 U(s) - = K R . ------------------H PI = ----------- = K R . 1 + --------. T i s Ti . s e(s)
(33.11)
KR is the proportional factor, and Ti is the time constant of the integrative component. The transfer function of the PID controller is described by the following equation:
Ti . Td . s + Ti . s + 1 U(s) 1 - + T d . s = K R . ----------------------------------------------H PID = ----------- = K R . 1 + -------- e(s) Ti . s Ti . s 2
(33.12)
KR and Ti have the same significance as previously mentioned, and Td is the time constant of derivative component. The transfer function corresponding to PD with filtering has the expression:
1 + Td . s U(s) H PDF ( s ) = ----------- = K R . -------------------------e(s) 1 + a . Td . s
(33.13)
where the coefficient α could have values in the range 0.1–0.125. Generally speaking, PID controllers are commonly used in industrial control systems and, therefore, are well established. Nevertheless, the results obtained using a PID controller for complex control loops are not very satisfactory because it could be costly and time consuming to retune such regulators. PI controller is enough in situations where derivative action is not frequently used.
Observer The theory of observers, started with the work of Luenberger and Ackermann, is fairly complete and comprehensive. For the proposed axis, an (n − m − 1) order structure of the observer is adopted, where n = 5 represents the order of the system and m = 1 is the number of outputs [25]. The model of the servodrive is described by five state variables: two of them for the second-order model of the servovalve and the other three for the third-order servoactuator. The use of a linear observer as a parallel model reconstitutes the state-variables of the installation and delivers them to the controller. Two possibilities could be followed: with partial and with global reconstruction. The solution chosen was with partial reconstruction [12]. The complete system consists of the installation with nonlinearities, a parallel second-order model for the servovalve, a third-order linear servoactuator, a correction matrix for the observer, and a controller with five loops for the five state variables [23,25,26]. The block diagram of an electrohydraulic axis controlled with a third-order observer is shown in T Fig. 33.11, where A, b, c are the characteristic matrices of the linear system (electrohydraulic axis), k is the correction matrix, and R represents the matrix corresponding to the controller. The simulation diagram of the electrohydraulic axis, controlled by a third-order observer, as it is depicted in SIMULINK, is illustrated in Fig. 33.12. The algorithm used to compute the matrix k and r consists of the following steps: i. ii. iii. iv.
achievement of the MM for servovalve and servoactuator; setting the state-variables of the process; obtaining the controller upon the dynamics of the closed-loop system; computing the correction matrix by using the desired poles for the observer [12].
©2002 CRC Press LLC
0066_frame_Ch33.fm Page 10 Wednesday, January 9, 2002 8:00 PM
Uref + e Σ _ U
K UI
I
H sv
. x^ b
Observer
Q
H zyl
y
x
k ∫
x^
cT
_ y^
A
Controller R
FIGURE 33.11
Block diagram of the control loop using the observer.
FIGURE 33.12
Control structure with observer for the electrohydraulic axis with SIMULINK.
The Linear Mathematical Models (LMM) The LMM of the servovalve and of the servoactuator are obtained by using the appropriate transfer functions HSV , HZ:
QV ( s ) k Vw V H SV ( s ) =ˆ ------------- = -----------------------------------------2 I V ( s ) s + 2DV w V s + w 2V
(33.14)
YZ ( s ) kZ wZ - = -----------------------------------------------H Z ( s ) =ˆ -------------2 Q V ( s ) ( s + 2D Z wZ s + w 2Z )s
(33.15)
2
2
with the following meanings: QV , the servovalve’s flow; IV , the current intensity, YZ , the rod’s position. ©2002 CRC Press LLC
0066_frame_Ch33.fm Page 11 Wednesday, January 9, 2002 8:00 PM
LMM in the State of Space The used variables are: x1, the rod position; x2, the rod velocity; x3, the rod acceleration; x4, the spool position; and x5, the spool velocity.
x˙1 = x 2 ( t ),
x˙2 = x 3 ( t ),
x˙4 = x 5 ( t )
x˙3 = – w Z x 2 ( t ) – 2D Z w Z x 3 ( t ) + k Z w Z x 4 ( t ) 2
2
(33.16)
x˙5 = – w x ( t ) – 2D V w V x 5 ( t ) + k V w u ( t ) 2 V 4
2 V
Thus the MM of the axis in state-space form becomes
x˙ ( t ) = Ax ( t ) + bu ( t )
(33.17)
y(t) = c x(t) T
where
A =
0 0
1 0
0
–wZ
0
0
0
0
0
0
0
–wV
2
0 1
, 0 1 – 2D V w V
0 0
– 2D Z w Z
0 0
kZ 2
0 0 b= 0 0 k
V
,
c = (1 0 0 0 0) T
(33.18)
Controller Design The characteristic polynomial is obtained from det[sI − (A C − bC r )] = 0, where A C and bC are the controllable forms of the matrices A and b. If A ≠ A C , the use of transformation matrix T is advisable, −1 T in order to obtain A C and bC. Thus A C = TAT , and bC = Tb. The matrix F = A C − bC r has the form T
0 0 . F = 0 −a – r 0
1 0 . 0 −a 1 – r 2
1
. . . . .
. . . . .
0 0 . 1
−a n−1 – r n
(33.19)
The characteristic polynomial of the matrix F is
s + ( a n−1 + r n )s n
n−1
+ … + ( a 1 + r 2 )s + ( a 0 + r 1 )
(33.20)
The poles chosen for the closed-loop determine the polynomial
s + p n−1 s n
n−1
+ p n−2 s
n−2
+ … + p1 s + p0
(33.21) T
The polynomials (33.20) and (33.21) are identical; therefore, the coefficients of matrix r R are
r v = p v−1 – a v−1 ,
v = 1,…, n
If
A = Ac, ©2002 CRC Press LLC
r = rR T
T
0066_frame_Ch33.fm Page 12 Wednesday, January 9, 2002 8:00 PM
otherwise
r = rR T T
T
(33.22)
Correction Matrix Design ∗
∗
The matrix F is F = A −Kc , where A is the matrix of the observer. For F the chosen poles are s1, s2,…, sn, and T
det [ sI-F ] = ( s – s 1 ) ( s – s 2 ) … ( s – s n ) det [ sI-F ] = s + f n−1 s n
n−1
(33.23)
+ … + f1 s + f0
(33.24)
From these two equations, the coefficients k1, k2,…, kn are obtained. T In this case, c = (1 0 0) and the matrix of the third observer is
1 0
0 A = 0 0 ∗
–w
0 1
– 2D Z w Z
2 Z
(33.25)
The correction matrix influences the transient behavior; the further the poles of F from the poles of ∗ A the quicker the response.
Simulation Results of Electrohydraulic Axis with Conventional Controllers Based on the above algorithm in order to determine the correction matrix and the controller matrix, the SIMULINK implementation of the observer involves the following values:
r1 = 19.95854,
r2 = 0.069481,
r4 = −3.158688 × 10 , 2
−4
r3 = −7.06024 × 10 ,
r5 = −3.451209 × 10
−1
for the controller, and −2
k1 = 1.67 × 10 , k 2 = 3.7028 × 10 , 4
k 3 = −6.969698 × 10 for the correction matrix. 6
When the reference signal is a step signal with U = 10 V, the simulation results are shown in Figs. 33.13 and 33.14
FIGURE 33.13
Position of servovalve for MM with observer.
©2002 CRC Press LLC
FIGURE 33.14
Cylinder position.
FIGURE 33.15
Electrohydraulic axis control with a fuzzy controller with two inputs.
33.5 Control of Electrohydraulic Axis with Fuzzy Controllers Section 33.5 of this contribution is devoted to the presentation and the testing of nontraditional controllers based on fuzzy sets, which model the behavior of a human operator in the control process. The simulation results of an electrohydraulic axis with SUGENO and MAMDANI controllers are depicted. For the same number of inference rules extracted from the knowledge base, simulations proved that dynamic performances are improved for a fuzzy controller with two inputs. The scheme achieved with SIMULINK to control the electrohydraulic axis with two inputs fuzzy controller and a MAMDANI or SUGENO inference is depicted in Fig. 33.15. The results presented concern the simulation of the hydraulic axis endowed with a fuzzy controller, which is based on MAMDANI inference [59]. “Fuzzy Logic” toolbox gives the user the possibility to create MAMDANI or SUGENO fuzzy systems using graphic interfaces. FIS (Fuzzy Inference System) Editor, Membership Function Editor, and Inference Rules Editor are several of the tools available in SIMULINK. For instance, the corresponding FIS editor and the Membership Function Editor of each input for the proposed fuzzy controller with MAMDANI inference and two inputs are illustrated in Figs. 33.16 and 33.17 ©2002 CRC Press LLC
FIGURE 33.16
FIS Editor for fuzzy system based on MAMDANI inference.
FIGURE 33.17
Membership function associated to the inputs.
For this fuzzy controller there were chosen nine inference rules, which could be visualized using the Inference Rules Editor of SIMULINK. Several simulation results of electrohydraulic axes obtained with the proposed fuzzy controller are shown in Figs. 33.18 and 33.19 and depict graphically the position and the velocity of the cylinder.
33.6 Neural Techniques Used to Control the Electrohydraulic Axis Section 33.6 has as its goals: to emphasize MATLAB’s possibilities of using its resources in order to design control systems based on advanced control techniques such as neural networks; to test through simulation these neural algorithms; and to verify performances of the neural control architecture applied to the studied electrohydraulic axis. There are two main research directions involved in the neural control. One of these implies the developing of one controller going from a neural network, and the other one embeds several controllers ©2002 CRC Press LLC
FIGURE 33.18
LHM position.
FIGURE 33.19
LHM velocity.
inside a neural network [50]. This section deals with the control of an electrohydraulic axis using a neural controller that has a widely spread structure, namely, multilayer perceptron (MLP).
Neural Control Techniques Learning Based on Mimic Inspired from biological systems, learning by mimic is applied to control systems. A supervised neural network can mimic the behavior of another system. A first method to develop a neural controller is to replicate a human controller. The neural controller tries to behave like the human operator. Neural training means learning the correspondence between the information received by the human operator and the control input (Fig. 33.20). Inverse Learning The purpose of inverse control is to control a system by using its inverse dynamic. In this case, the neural network receives the output of the system as input and has the input of the system as output. The system works in open loop and has to be in the region where the controller will operate. Inverse learning (Fig. 33.21) is an indirect approach to minimize the network output error instead of the overall system error. Specialized Inverse Learning According to Psaltis, who proposed in 1988 a specialized inverse learning, the neural network should be trained online in order to minimize the control error ey = r - y (see Fig. 33.22). ©2002 CRC Press LLC
Sensor Inputs
−
+ Σ
e
BP
Diagram for learning based on mimic.
X
u −
BP
FIGURE 33.21
Σ
u
Y
System
+
e
Training phase at inverse learning. r
u X
BP
FIGURE 33.22
Y
System
um
X
FIGURE 33.20
u
Human operator
Y System
ey − +
Σ
Specialized inverse control architecture (after [50]).
The neural controller used to control the position of an electrohydraulic axis is a feed-forward multilayer neural network, whose learning algorithm is back-propagation. In order to adapt the weights which preserve the learned information, two steps are gone through with: a forward propagation procedure of the useful signal and a backward propagation of the error. The control structure is implemented in SIMULINK as it is shown in Fig. 33.23. The neural control of the electrohydraulic axis and the achievement of controller parameters are performed online. A neural network with four layers, having two neurons on the first layer, a neuron on the last layer, and five neurons on each hidden layer, is proposed. The graphic characteristic corresponding to the axis position and obtained using the neural network described above is illustrated in Fig. 33.24.
33.7 Neuro-Fuzzy Techniques Used to Control the Electrohydraulic Axis This chapter deals with several computer-aided design techniques of hybrid control algorithms. This paper concentrates on these types of algorithms, because the performances achieved through simulation of an electrohydraulic axis with a neuro-fuzzy controller are comparable or superior to those yielded by other control algorithms. Taking into account the novelty of neuro-fuzzy algorithms and the absence in ©2002 CRC Press LLC
Mux
contr
In1 Out1
K−
controller
Scope Memory
Plant
+ −
inv 1
Mux
inverse model
Scope1
t3
FIGUGE 33.23 The control structure for proposed controllers.
FIGURE 33.24
The axis position for U = 8 V input voltage.
SIMULINK of a toolbox devoted to them, the research was oriented to the achievement of a library of C++ programs, which can afford the use of SIMULINK in the design of such controllers. Thus, online adaptation procedures of fuzzy controller parameters are implemented. The comparative study of different classic and advanced algorithms is performed on the basis of integral squared error computed on the transitory horizon. Because of the capability of fuzzy systems to treat imprecise information, they are strongly recommended in order to express knowledge in the form of linguistic rules. In this way, the human operator’s knowledge, which is linguistic or numerical, is used to generate the set of fuzzy if-then rules as a basis for a fuzzy controller. A main drawback of fuzzy systems is the difficulty to design them based on a systematic methodology. To overcome this drawback, the learning procedures from neural networks are successfully applied in order to tune the parameters of membership functions. The merger of neural networks and fuzzy logic has led to the existence of neuro-fuzzy controllers. It can be asserted that neurofuzzy controllers embed essential features of both fuzzy systems and neural networks. The proposed neuro-fuzzy controller has a structure based on the Takagi-Sugeno method and it is depicted in Fig. 33.25. A learning procedure in fact represents a parameter estimation problem. The learning procedure for the proposed neuro-fuzzy controller is gradient-descendent. The method applied to design such a controller is called inverse learning in which an online technique is used to model the inverse dynamics of the plant. The obtained neuro-fuzzy model—the inverse dynamics of the plant—is used to generate control actions. ©2002 CRC Press LLC
0066_frame_Ch33.fm Page 18 Wednesday, January 9, 2002 8:00 PM
Fuzzification Product-norm Normalization
A11
x1
Defuzzification
11
z1
z1
z2
z2
A12 12
w1
A1n
21
w2
S
22
y
A21
x2
wn
A22
1n
zn A2n
FIGURE 33.25
zn
2n
Structure of the neuro-fuzzy controller.
The neuro-fuzzy controller is a multilayer connectionist system, a multi-input and single-output fuzzy logic system. The network has three layers: one input layer with n × m units, one hidden layer with n units, and one output layer with one unit [15]. The partition used for this model is a scatter partition [33]. Figure 33.25 presents a particular case where the fuzzy controller has only two inputs and one output. In a general case, the fuzzy controller has m inputs and one output. The fuzzy rule base contains a set of n linguistic rules in the form: Ri: If x1 is A1i and x2 is A2i and… and xm is Ami then y is wi, i = 1, 2,…, n where i is the index of the rule; Aji is a fuzzy set for the jth linguistic variable and the ith rule; and wi is a number that represents the consequent part. The membership functions assigned to each input are Gaussian functions. The centers of the membership functions are chosen such that these functions are uniformly distributed over the universe of discourse:
µ ji = e
2
2
– ( x j – a ji ) /2b ji
(33.26)
The fuzzy inference involved in this neuro-fuzzy controller is the product operator T-norm defined as an and conjunction. The firing strength of every rule is
z i = µ 1i . µ 2i . … . µ mi ,
©2002 CRC Press LLC
i = 1,…,n
(33.27)
0066_frame_Ch33.fm Page 19 Wednesday, January 9, 2002 8:00 PM
The output is a crisp value obtained as a result of the evaluation of a center of gravity:
z2 z1 zn . ∑ i=1 z i ⋅ w i - = ------------wn = y = ---------------------⋅ w 1 + ------------⋅ w 2 + … + ------------n n n n ∑ i=1 z i ∑ i=1 z i ∑ i=1 z i ∑ i=1 z i n
n
∑z ⋅ w i
i
(33.28)
i=1
The parameters to be estimated are obtained by finding the minimum of the following cost function:
1 2 J ( k ) = -- . ( y ( k ) – y d ( k ) ) 2
(33.29)
where yd(k) is the desired output and y(k) is the obtained response at time k. To minimize this cost function, the stochastic approximation method is used. The learning procedure means the estimation of parameters and is based on the least-mean square algorithm. The parameters to be estimated are
p = ( a 11 ,…, a nm, b 11, … , b nm, w 1, …, w n )
(33.30)
The equations to adapt the parameters are the following:
zi x j – a ji ( t ) - . ( y – y d ) . ( w i – y ) . --------------------a ji ( t + 1 ) = a ji ( t ) – λ a ------------n 2 ∑ l=1 z 1 b ji zi . ( x j – a ji ( t ) ) - ( y – y d ) . ( w i – y ) . ---------------------------b ji ( t + 1 ) = b ji ( t ) – λ b ------------n 3 ∑ l=1 z 1 b ji 2
(33.31)
zi . - ( y – yd ) w i ( t + 1 ) = w i ( t ) – λ w ------------n ∑ l=1 z 1 where the learning factors λa, λb, λw are predefined. In the learning process, parameters that could be modified are (aji, bji) which describe Gaussian functions, and wi, the conclusion values. If the structure of the membership function is established, the only values that could be modified are wi.
Control Structure In order to design the neuro-fuzzy controller proposed above, the inverse learning method is applied. The control of an electrohydraulic axis involves the use of an online technique to model the inverse dynamics of the plant. The block diagram for online inverse learning is presented in Fig. 33.26. This scheme is in open loop and it is also found by the Controller Output Error Method (COEM) [1] to online tune or adapt the parameters of a fuzzy controller. This method does not require the plant output error to be propagated at the input. There is another constraint, namely the controller has to be capable of stabilizing the plant before the commencement of tuning. To avoid this requirement, a modified COEM (MCOEM) [2] is used. The diagram block in this case is depicted in Fig. 33.27. A proportional feedback controller P is introduced and in this situation the plant input is the sum of u′(k) and up(k). The consequent singletons are initialized to zero and the controller P is chosen in such a way that it stabilizes the plant. The structure and the parameters of inverse model and of neuro-fuzzy controller are identical.
©2002 CRC Press LLC
0066_frame_Ch33.fm Page 20 Wednesday, January 9, 2002 8:00 PM
r (k )
y (k + 1)
u (k)
Neuro-fuzzy controller
y (k)
Plant
+
eu
Σ −
u^(k)
y (k + 1) Inverse model
FIGURE 33.26
y (k)
Diagram of control based on inverse learning. r (k) y (k)
Neural controller
−
P
up(k)
y (k + 1)
Electrohydraulic axis
+ Σ + +
+ Σ
u (k)
Σ
eu
− u^(k) Inverse model
y (k + 1) y (k)
FIGURE 33.27
Block diagram for inverse learning with proportional controller.
FIGURE 33.28
The position control with neuro-fuzzy controller.
There are two phases in the design of such a controller: the control and the adaptation. In the control phase, the plant output and the reference signal determine a control command u(k). The plant input becomes u(k), the sum of the u(k) and up(k). In the adaptation phase, the inverse model, which has as inputs y(k + 1) and y(k), produces the signal uˆ (k) as an output. This signal is used to compute the error eu(k), which determines the value of the cost function J(k) that has to be minimized. 2 1 1 2 J ( k ) = -- . e u ( k ) = -- . ( u ( k ) – uˆ ( k ) ) 2 2
(33.32)
This procedure was used at the control of the electrohydraulic axis position, where the controller parameters are determined online. The actuator position obtained when the reference signal is changed from U = 4 V to U = 8 V is depicted in Fig. 33.28. ©2002 CRC Press LLC
0066_frame_Ch33.fm Page 21 Wednesday, January 9, 2002 8:00 PM
TABLE 33.1 Regulator PID (chapter 4) PI (chapter 4) PD (chapter 4) Neural (chapter 6) Neuro-fuzzy (chapter 7)
IAE
ISE
0.8042 0.8006 0.7928 0.8027 0.7911
3.4754 3.4618 3.4537 3.4622 3.4501
FIGURE 33.29 (a) Membership functions before learning for the variable x1, (b) Membership functions before learning for the variable x2.
In order to achieve a comparison of the modern control algorithms (included in this thesis) to the conventional structures, two spread integral criteria, namely, the integral of absolute error (IAE) performance index and the integral of squared error (ISE), are used. The results obtained applying these criteria are included in Table 33.1. According to previous results, it can be inferred that the described neuro-fuzzy controller exhibits superior performances compared to those obtained with the neural controller based on MLP, or with the classic controllers (PID, PI, PD with filtering) presented in this paper. The simulation results emphasize the neuro-fuzzy controller, arguing that it represents a very useful tool for practical applications with many nonlinearities. Optimized results were obtained through variation of data sets and number of iterations. In order to test the performance of the proposed neuro-fuzzy controller, one nonlinear function given by an analytical equation was approximated. The membership functions of input variables x1 and x2 before learning are shown in Figs. 33.29(a,b). The surface obtained after simulation is depicted in Fig. 33.30(c). One may observe the accuracy of the reconstruction after 300 learning iterations by comparison with the surface to be obtained. Sets of intermediary results obtained with different simulation data sets are presented below. Different data sets of simulations were used in order to achieve optimized results. Some of them are presented in Figs. 33.30–33.34 without comment. In order to obtain good performances from the model, 10 membership functions are used for each input variable. The learning factors λa, λb, λw were chosen as 0.01. The control algorithm is capable of handling the change in operating range. The results of the electrohydraulic axis simulation with the proposed neuro-fuzzy controller are obtained for various inputs. Those in time domain, results presented in Figs. 33.35(a,b), correspond to input voltages of 8 and 10 V.
©2002 CRC Press LLC
0066_frame_Ch33.fm Page 22 Wednesday, January 9, 2002 8:00 PM
1st set: gw = 0.1; ga = 0.05; gb = 0.05; nepoc = 100; nesant = 100; niter = 200; threshold error = 0.001; Vmax = 0.04.
FIGURE 33.30 (a) The surface obtained after the first iteration, (b) Membership functions after learning for the variable x2, (c) The surface obtained after simulation.
2nd set: gw = 0.1; ga = 0.07; gb = 0.05; nepoc = 100; nesant = 21; niter = 200; threshold error = 0.001; Vmax = 0.0475.
FIGURE 33.31
The surface obtained after the first iteration.
©2002 CRC Press LLC
0066_frame_Ch33.fm Page 23 Wednesday, January 9, 2002 8:00 PM
3rd set: gw = 0.5; ga = 0.07; gb = 0.03; nepoc = 200; nesant = 21; niter = 200; threshold error = 0.001; Vmax = 0.047515.
FIGURE 33.32
Membership functions after learning for the variable x2.
FIGURE 33.33
The surface obtained after learning.
33.8
Software Considerations
The MM of electrohydraulic axis studied in this thesis is supported by a physical installation existing in the mechatronics laboratory of UAS-Konstanz (see Fig. 33.1b). Two variants of nonlinear MM are set forth in Section 33.3 and add in static and dynamic nonlinearities that arise in the function of electrohydraulic axis [23, 58]. The MM of hydraulic drive presented in the structure of ROBI_3 was implemented in SIMULINK in order to study the dynamic behavior of the axis [26, 27]. The extended variant of MM hydraulic axis was done taking into account the relative motion of the constituent parts of this servodrive. The neural and neuro-fuzzy controller (Takagi-Sugeno) was developed in Borland C++ and implemented in SIMULINK for controlling the electrohydraulic axis. SIMULINK offers the user a FUZZY LOGIC library that allows the designing and modeling of SUGENO or MAMDANI fuzzy inference systems. The lack of a dedicated software to design neuro-fuzzy controllers persuaded the implementation of such a controller in C++ and afterwards the use of it in SIMULINK [26,27,28]. The support for simulation, SIMULINK 2.1 and MATLAB 5.2 (under Windows), offers solutions to implement our controllers as modules and corresponding icon in a specialized toolbox. In our experiments, we used the facility offered by S-functions and C MEX in conjunction with Borland C++ 5.0 to compile them. We have chosen the C S-function because of the speed necessary to process the information in our block that implement the controller. The block that implements the controller has two inputs (even three inputs are available, though the adaptation process is more complicated) and one output. ©2002 CRC Press LLC
0066_frame_Ch33.fm Page 24 Wednesday, January 9, 2002 8:00 PM
FIGURE 33.34 (a) The surface obtained after first iteration, (b) Membership functions after learning for the variable x1, (c) Membership functions after learning for the variable x2, (d) The surface after learning.
FIGURE 33.35 (a) The position control with neuro-fuzzy controller (U = 8 V), (b) The position control with neuro-fuzzy controller (U = 10 V).
The adapting parameters (weights, centers, and spread for Gaussian function) must be persistent. Declaring global, static or using the workspace in order to store the are useful techniques to accomplish the task. The newest version of Simulink offers the possibility to write wrapper S-function, to use the callbacks functions, and as an alternative ADA or Fortran programming language. ©2002 CRC Press LLC
0066_frame_Ch33.fm Page 25 Wednesday, January 9, 2002 8:00 PM
FIGURE 33.36
3-Axes Cartesian robot modeled, controlled, and simulated in SDS [21,24].
33.9 Conclusions The research achieved as part of this chapter has, as an essential purpose, the development of improved control structure based on advanced techniques (neural and fuzzy), in relation to the conventional one. The studied electrohydraulic axis is a component of the Cartesian robot ROBI_3 implemented in the mechatronics laboratory of UAS-Constance. 3D-simulations with direct and inverse dynamics and implemented controllers by using the SDS-Modelling and Simulation software of the real installation were performed [21,23,25,28]. Model and simulation results are presented in Fig. 33.36. As an overview, Section 33.1 deals with the introduction of this chapter. In Section 33.2, the most important aspects of electrohydraulic system control and of nonlinearities that arise with this type of installation are pointed out. The robot, ROBI_3, is presented from both a component and control perspective. The mathematical model (MM) of ROBI_3’s hydraulic axis is described in Section 33.3. The nonlinear MM is achieved based upon technical data of different components of installation and also taking into account theoretic assessments of electrohydraulic installation functionality. Simulation results of nonlinear MM placed into a position loop are obtained with simulation environment SIMULINK/MATLAB. As a general remark, it should be mentioned that all simulations included in this chapter are achieved by using MATLAB/SIMULINK, while the advanced control algorithms (neural and neuro-fuzzy) are developed in Borland C++ 5.0. Section 33.4 contains a short overview of the theory devoted to conventional controllers PID, PD, PI, and observer, followed by simulation results of the electrohydraulic axis endowed with the above control structures. Following the scientific goal of this contribution, Section 33.5 reviews fuzzy system theory and presents simulations of electrohydraulic axis with fuzzy controllers. Fuzzy system theory has contributed greatly to system modeling, and the development of a theoretical frame appropriate to implement the qualitative reasoning specific to human beings. This kind of reasoning is very useful to model complex systems, which are characterized by nonlinearities or imprecise information. Simulation results of hydraulic axis are obtained using SUGENO and MAMDANI fuzzy controllers. A short introduction of neural networks theory, the most widespread neural structures and also neural control techniques are presented in the beginning of Section 33.6. Neural networks work quantitatively, numerically. If fuzzy logic has an inference based on uncertainty, then neural networks learn by training, at the end of which the network will approximate a desired function. The analysis of trained NN involves many challenges, and as a result, the rules are usually not extracted from trained NN. Simulation results included in Section 33.6 are obtained with a multilayer NN. Neuro-fuzzy systems preserve the characteristics of NN and also of fuzzy systems, and have been used successfully in control in recent years. Section 33.7 is devoted to the neuro-fuzzy system theory, to the presentation of neuro-fuzzy controller implemented in Borland C++ and applied in SIMULINK to ©2002 CRC Press LLC
0066_frame_Ch33.fm Page 26 Wednesday, January 9, 2002 8:00 PM
electrohydraulic axis, to the simulation results achieved in this case, and to the comparative study of conventional and modern controllers. Section 33.8 contains a concise presentation of this chapter, the main contributions to the subject area presented, as well as a listing of perspective areas of interest in order to pursue further research in this direction. Without intending to confine the parameters of this chapter, following is a listing of possible research directions and development perspectives that may be followed in future research endeavors: • applying various controllers implemented in SIMULINK not only to control the electrohydraulic axis discussed, but also for systems with very complex structure which are involved in large hydraulic installations, offering the user a neuro-fuzzy controller’s library; • the hardware implementation of described neuro-fuzzy controller; • continued research in the development of an optimal controller, systemically based (through the further study of stability utilizing linear matrix inequalities—LMI); • the integration of presented controllers in software packages dedicated to hydraulic and pneumatic fields (for instance in HYPAS[23], DSH, etc.); • the development of controller design in order to promote those controllers, which allow a better symbiosis between classical and advanced methods (neuro-fuzzy, genetic algorithms); • the extension of preoccupations and extrapolation of research results regarding control of velocity, acceleration, pressure, flow, force, moment, and power.
References 1. Andersen, H.C., Lotfi, A., Tsoi, A.C. A new approach to adaptive fuzzy control: the controller output error method, IEEE Trans. on Systems, Man, and Cybernetics, SMC-27-B(4), August 1997. 2. Abonyi, J., Nagy, L., Szeifert, F. Indirect adaptive Sugeno fuzzy control, Proceedings in Artificial Intelligence, FNS’98, München, Germany,19–20 martie. 3. Backé, W. Systematik der hydraulischen Widerstandsschaltungen in Ventilen und Regelkreisen. Krauskopf-Verlag, Mainz, 1974. 4. Costa Branco, P.J., Dente, J.A. Inverse-Model Compensation Using Fuzzy Modeling and Fuzzy Learning Schemes. Intelligent Engineering Systems through Artificial Neural Networks, Smart Engineering Systems: Fuzzy Logic and Evolutionary Programming, Ed. C.H. Dagli, M. Akay et al. Vol. 6, ASME Press, New York, pp. 237–242, 1996. 5. Brown, M., Harris, C. Neuro-fuzzy Adaptive Modelling and Control, Prentice-Hall, Englewood Cliffs, NJ, 1994. 6. Catana, I., Vasiliu, D., Vasiliu, N. Servomecanisme electrohidraulice. Constructie, functionare, modelare, simulare si proiectare asistata de calculator. U.P.B. Bucuresti, 1995. 7. Cybenko, G. Mathematical Problems in Neural Computing. Signal Processing Scattering and Operator Theory and Numerical Processing, Vol. 3, Kashoek, M.A., van Schupper, J.H., Ram, A.C. Ed., 1989, pp. 47–64. 8. Driankov, D., Hellendoorn, H., Reinfrank, M. An Introduction to Fuzzy Control. Springer-Verlag, Berlin, 1993. 9. Dubois, D., Prade, H., Ughetto, L. Checking the coherence and redundancy of fuzzy knowledge bases, IEEE Trans. on Fuzzy Systems, 5(5):398–417, 1997. 10. Dumitrache, I. sa. Automatizari electronice. Editura Didactica si Pedagogica, Bucuresti, 1993. 11. Dumitrache, I., Catana, I., Militaru, A. Fuzzy Controller for Hydraulic Servosystems. IFAC International Workshop on Trends in H& P Components & Systems, Chicago, IL, 1994. 12. Föllinger, O. Regelungstechnick. Dr. A. Hütig Verlag, Heidelberg, Germany, 1978. 13. Friedrich, A. Logik und Fuzzy-Logik. Expert-Verlag,1997.
©2002 CRC Press LLC
0066_frame_Ch33.fm Page 27 Wednesday, January 9, 2002 8:00 PM
14. Ghaoui, L. El. Reduced-order multimodel control using linear matrix inequalities: sufficient conditions, Proc. Od ACC 1993, 1993, pp. 633–634. 15. Godjevac, J., Steele, N. Adaptive neuro-fuzzy controller for navigation of mobile robot, International Symposium on Neuro-Fuzzy Systems AT’96, Conf. Report, EPFL-Lausanne, 1996. 16. Gupta, M.M. Fuzzy Logic and Neural Networks, Proc. of the 2nd International Conference on Fuzzy Logic & Neural networks, Iizuka, Japan, 17–22 July, 1992, pp. 187–188. 17. Healey, M. Principles of Automatic Control. The English Universities Press Ltd., 1975. 18. Haykin, S. Neural Networks, MacMillan College Publishing Company, New York, 1994. 19. Ionescu, Fl. Computer aided design of hydraulic and electrohydraulic drive installations, Proceed. 9th Triennial World IFAC Congress, Budapesta, Ungaria, Pergamon Press, Vol. 1, 1984, pp. 569–574. 20. Ionescu, Fl., Stoffel, B. Contribution to the Automatic Generation of Mathematical Models for the Computer Assisted Analysis and Synthesis of Hydraulic Drive Systems. Proceed. of the 2nd Intern. Conf. on Fluid Power, 19–21 March 1991, Tampere, Finland, pp. 469–482. 21. Ionescu, Fl., Haszler, Fl. TORCH: A Control Software for Electrohydraulic Cartesians Robots. Proceed. of the 6th Intern. IMEKO Symposium on Measurement and Control in Robotics, ICMR’96, Bruxelles, Belgium, 9–11 May, 1996, pp. 484–489. 22. Ionescu, Fl. Non-Linear Problems in the Hydraulic Drive Systems. 2nd World Congress of Nonlinear Analysts, Athena, Greece, 10–17 July 1996, Pergamon Press, Vol. 30, part 3, pp. 1447–1461. 23. Ionescu, Fl., Vlad, C.I. Tools of HYPAS for the control of electrohydraulic drive installations, Proc. of 7th Symposium on Computer Aided Control Systems Design, Gent, Belgia, 1997, pp. 311–316. 24. Ionescu, Fl., Borangiu, Th., Vlad, C.I. High integrated CAD strategies for control design of electrohydraulic systems, Proc. 3rd IFAC Conference SSC, Bucharest, 1997, pp. 390–395. 25. Ionescu, Fl., Vlad, C.I. Hypas tools for the control of electro-hydraulic drive installations Journal a, Vol. 38, No. 3, Belgium, 1997, pp. 38–41. 26. Ionescu, Fl., Vlad, C.I. Sugeno and hypas fuzzy-control solutions for electro-hydraulic drive installations, Proceedings EUFIT’97, Aachen, Germany, 8–11 Sept., Vol. 2, 1997, pp. 1238–1242. 27. Ionescu, Fl., Vlad, C.I., Arotaritei, D. Fuzzy and neuro-fuzzy HYPAS controllers implemented for an electro-hydraulic axis, International ICSC Symposium on Engineering of Intelligent Systems EIS’98, Teneriffe, Spain, Feb. 11–13, 1998. 28. Ionescu, Fl., Arotaritei, D., Vlad, C.I. Modelling of Nonlinearities, Signal Reconstruction and Predictive Solutions Applied in Mechatronics Systems by Using Neuro-Fuzzy Systems, Internal Report, Department of Mechatronics, FH-University of Applied Sciences-Konstanz, 1998. 29. Ionescu,V., Varga, A. Teoria Sistemelor. Sinteza robusta. Metode numerice de calcul. Editura ALL, Bucuresti, 1995. 30. Isermann, R. Digitale Regelsysteme, Springer-Verlag, Berlin, 1987. 31. Isermann, R. Zur Anwendung der Fuzzy-Logik in der Regelungstechnik. Automatisierungstechnische Praxis (atp) Fuzzy-Control, 38, Oldenbourg Verlag, Germany, 1996. 32. Isermann, R. On fuzzy logic application for automatic control, supervision, and fault diagnosis, IEEE Transactions on Systems, Man, and Cybernetics—Part A: Systems and Humans, Vol. 28, No. 2, March 1998, pp. 221–235. 33. Jang, J.-S.R., Sun, C.-T., Mizutani, E. Neuro-fuzzy and soft computing, A Computational Approach to Learning and Machine Intelligence, Prentice-Hall, Englewood Cliffs, NJ, 1997. 34. Joh, J., Hong, S.K., Nam, Y., Chung, W.J. On the systematic design of Takagi-Sugeno fuzzy control systems, International ICSC Symposium on Engineering of Intelligent Systems EIS’98, Tenerife, Feb. 1998. 35. Kandel, E.R. Nerves Cell and Behavior, Principles of Neural Sciences, 3rd ed., 1992, pp. 18–36. 36. Knappe, H. Comparison of conventional and fuzzy-control of non-linear systems, In: Kruse, R., Fuzzy Systems in Computer Science, Verlag Vieweg, Wiesbaden, Germany, 1994. 37. Kokotovic, P.V. Lectures Notes in Control and Information Sciences. Springer-Verlag, Berlin, 1991. 38. Kosko, B. Neural Networks and Fuzzy Systems. Prentice-Hall, Englewood Cliffs, NJ, 1992.
©2002 CRC Press LLC
0066_frame_Ch33.fm Page 28 Wednesday, January 9, 2002 8:00 PM
39. Kovacic, Z., Balenovic, M., Bogdan, S. Sensitivity-based self-learning fuzzy logic for a servo-system, IEEE Control Systems, June, 1998. 40. Lippmman, R. An introduction to computing with neural nets, IEEE ASSPMagazine, April 1987, pp. 4–22. 41. MATLAB 5.2. MathWorks Corp, USA. 1998. 42. Miller, Th., Sutton, R., Werbos, P.J. Neural Networks for Control, MIT Press, 1990. 43. Nauck, D., Klawonn, F., Kruse, R. Neuronale Netze und Fuzzy-Systeme. Grundlagen des Konnektionismus, Neuronaler Fuzzy-Systeme und der Kopplung mit wissensbasierten Methoden, Vieweg, 1994, Germany. 44. Nesterov, Y., Nemirovski, A. Interior Point Polynomial Methods in Convex Programming: Theory and Applications, SIAM, Philadelphia, 1994. 45. Pedrycz, W. Fuzzy Control and Fuzzy Systems, Wiley, New York, 2nd ed., 1993. 46. Piechnik, M., Feuser, A. Simulation mit Komfort - HYVOS 4.0 und MOSIHS 1.0, Ö & P, 38, 1994. 47. Postlethwaite, B.E. A model-based fuzzy controller, Trans IChemE, Vol. 72, Part A, Jan. 1994. 48. Postlethwaite, B.E. Building a model-based fuzzy controller, Fuzzy Sets and Systems, 79(1996), Elsevier. 49. Rehfeldt, K., Shöne, A., Büngener, N. Einsatz von Fuzzy-Reglern zur Drehzahlregelung einer Hydraulikpumpe, Ölhydraulik und Pneumatic, 36, Nr. 6, pp. 397–402, 1992. 50. Ronco, E., Gawthrop, P.J. Neural Networks for Modelling and Control. Technical Report: csc97008, Centre for System and Control, Dept. of Mechanical Engineering, Univ. of Glasgow, 10 Nov. 1997. 51. Simulink, Dynamic System Simulation for MATLAB, Writing S-functions, The Math Works Inc., 1998. 52. Sontag, E.D. Mathematical control theory, Deterministic Finite Dimensional Systems. Springer-Verlag, Berlin, 1990. 53. Takagi, T., Sugeno, M. Fuzzy identification of systems and its applications to modeling and control, IEEE Trans. Systems, Man, and Cybernetics, Vol SMC-15, No. 1, pp. 116–132, 1985. 54. Tanaka, K., Sugeno, M. Stability analysis and design of fuzzy control systems, Fuzzy Sets and Systems, Vol. 45, 1992, pp. 135–156. 55. Teodorescu, H.N. Sisteme Fuzzy si Aplicatii. Institutul Politehnic Iasi, Romania,1989. 56. Tertisco, M., Penescu, C., Ionescu, G., Ceanga, E. Identificarea Experimentala a Proceselor Automatizate. Editura Tehnica, Bucuresti, 1971. 57. Viersma, T. J. Analysis, Synthesis and Design of Hydraulic Servosystems and Pipelines. Elsevier, AmsterdamNew York, 1980. 58. Vlad, C.I. Contributions to the Direct Computer Control of Electrohydraulic Axes for Industrial Robots. Technical University “Politehnica”, Bucharest, Romania, 1998. 59. Wang, L., Liu, G.P., Harris, C.J., Brown, M. Advanced Adaptive Control, Pergamon, 1997. 60. Werbos, B. Overview of Design and Capabilities. In Neural Networks for Control, pp. 59–65, MIT Press, MA, 1990. 61. Westcott, J.H. The minimum-moment-of-error-squared criterion: a new performance criterion for servo mechanisms, Proc. of IEE., Measurements Section, pp. 471–480, 1954. 62. Yager, R., Zadeh, L. Fuzzy Sets, Neural Networks and Soft Computing, 1994. 63. Zadeh, Lotfi. Fuzzy sets, Information & Control, No. 8, pp. 338–353, 1965. 64. Zadeh, L., King-Sun Fu, Tanaka, K., Shimura, M. Fuzzy Sets and their Applications to Cognitive and Decision Processes. Academic Press, 1975. 65. Zimmermann, H.-J. Fuzzy Sets Theory - and Its Applications, Kluwer Academic Publishers, Dordrecht, The Netherlands, 1990.
©2002 CRC Press LLC
34 Design Optimization of Mechatronic Systems 34.1 34.2
Tomas Brezina Technical University of Brno
Principles of Optimization • Parametric Optimization • General Aspects of the Optimization Process • Types of Optimization Methods • Selection of a Suitable Optimization Method
34.3
Technical University of Brno
Technical University of Brno
Optimum Design of Induction Motor (IM) IM Design Introduction • Classical IM Design Evaluation • Description of a Solved Problem • Achieved Results
Ctirad Kratochvil Cestmir Ondrusek
Introduction Optimization Methods
34.4
The Use of a Neuron Network for the Identification of the Parameters of a Mechanical Dynamic System Practical Application
34.1 Introduction Electromechanical systems form an integral part of mechanical and mechatronic systems. Their optimization is a necessary condition for a product to be competitive. In engineering practice, a large number of optimization and identification problems exist that could not be solved without the use of computers [5]. The present level of technological development is characterized by increasing the performance of machines with the production costs kept at a satisfactory level. The demands on the reliability and safety of operation of the designed machines are also considerable. From practical experience we know that the dynamic properties of electromechanical systems have a considerable influence on their reliability and safety. On the other hand, the tendency to push the price of a machine down often leads to unfavorable dynamic properties that result in increased vibrations and noise during operation. Also, electrical properties dramatically deteriorate as the amount of active materials in a machine is reduced. The increased load leads to, among other things, excessive heat formation, which, in turn, has a negative effect on insulation, shortening the service life of a machine.
34.2 Optimization Methods Principles of Optimization The properties of electromechanical systems can be described mathematically using physical quantities. The degree of these properties is then described using mathematically formulated objective (preference) functions. Structural parameters ranging between limit values given as satisfying secondary conditions are the independent variables of these functions. The particular form of the functions depends on the type of machine and its mathematical description. The solutions of a mathematically formulated optimization
©2002 CRC Press LLC
problem together with optimization methods allow a considerable number of different design variants of a machine to be calculated in a relatively short time. They also make it possible to perform these calculations at production planning stages for a prototype to possess the qualities given by a chosen criteria function. In this way, the design of a machine is not only analyzed but also modified and reconstructed in terms of its electromechanical properties with the aim to improve these properties as much as possible (or optimize them). From a physical point of view, these are actually problems that, to a certain degree, are inverse to those of calculus. A problem of calculus assumes a fixed, mathematically described model of a real machine to be used for deriving its resulting properties. In problems of calculus, we define properties and try to find out which parameters of a chosen mathematical model possess those properties. In problems of parametric optimization, we look for those parameters that, by a chosen preference function, provide the best properties. It is clear that problems of synthesis and optimization are much more sophisticated than those of calculus.
Parametric Optimization As the aim is to find the values of certain structural parameters of a machine, we shall deal with this notion in more detail. By a parametric optimization of electromechanical systems, we mean the process of finding those parameters of a mathematical description of the system (arranged in a vector p) from a set P of admissible parameters at which a suitably selected objective (preference) function ψ (p) of these parameters reaches its extreme. The objective function ψ (p) quantifies the degree of the properties of an electromagnetic system that has to be made extreme (the parameters with the best degree of this property have to be chosen). When defining an admissible set P, we are guided by the structural possibilities of changes in individual parameters (variables), or we can introduce secondary criteria of the type “the degree of properties may not exceed given critical limits.” The possibility of taking into consideration the structural changes of d h d parameters leads to the so-called trivial (natural) constraints of the type p i ≤ p i ≤ p i , where p i is the h lower and p i the upper bound of the ith optimization variable. The introduction of secondary criteria d h leads to the definition of limiting functions qi of optimization variables for which we have q i £ qi(p) £ q i , d h where q i is the lower and q i is the upper bound of the relevant function. Thus, from the mathematical point of view, parametric optimization of electromechanical systems is formulated as the problem of finding a point p in the admissible set P, at which the preference function ψ reaches its global extreme value (maximum or minimum) with regard to P. The admissible set is s generally described by m inequalities defined by functions qj(p), where j = 1, 2, ..., m. If P = R , where s is the number of variables to be optimized, we say that the optimization is unconditional. In all other cases we say that the optimization is conditional. To solve the problem of optimizing the selected properties of a system, the following has to be done: • • • • • • • •
a mathematical description has to be formulated, it has to be analyzed at the starting point, the desired form of the objective function ψ has to be specified, the optimization variables have to be selected, the desired form of the constraining functions qj has to be specified, a suitable optimization method has to be selected, the resulting mathematically formulated optimization problem has to be solved, and using the mathematical model, the results have to be transformed back into the dynamic model (for dynamic problems only).
General Aspects of the Optimization Process If the aim of an optimization process is to optimize several properties that simultaneously affect the system (such as minimizing the size values while respecting the electrical properties), we obtain a multi-criteria objective function. The objective function then takes the form of a weighted sum of single-criterion ©2002 CRC Press LLC
...
0066_frame_C34.fm Page 3 Wednesday, January 9, 2002 8:07 PM
functions. Each of these functions generally assumes its local minima at different points of the optimization parameter spaces. This is the reason why a multi-criteria function can have a large number of shallow local minima or is insensitive to changes in the optimization parameters. Due to this fact, the selection of an optimization method is of great importance. The result is averaged in the sense that several criteria may participate simultaneously in a reduction of the multi-criteria function, while some other criteria may increase. A more suitable method may be to select a single-criterion objective function, including all criteria in the constraints. Only the most significant criterion is chosen for the objective function to be specified in the subsequent process. All other criteria included in the constraints are kept within specified limits without being optimized. Thus, the results of an optimization process are dependent on the degree of reduction of the admissible set given by the inequality-type constraints. Generally, we specify the constraints in a form similar to the objective function
qi ( p ) = fi ( p ) – fi , h
i = 1, 2,…, m
∗
(34.1)
h
Here fi are suitable functions of a vector variable and f i their maximum admissible values. The selection of optimization variables is given by the sensitivity of the objective function to changes of relevant optimization variables. This sensitivity is described by the gradient vector of the objective function.
dy ( p ) dy ( p ) grad y ( p ) = --------------- ,…, --------------dp 1 dp s
T
(34.2)
Types of Optimization Methods Standard Optimization Methods Most practical problems lead to nonlinear (transcendental) systems of equations. These may only be solved using numerical optimization methods. According to the order of the derivatives used in the application of a method, numerical methods of finding local minima of functions of several variables may be divided into: 1. zero-order methods (comparative) • methods of co-ordinate comparison • simplex methods • stochastic methods 2. first-order methods (gradient and quasi-gradient) • methods of associated directions • variable-metric methods 3. second-order method (Newton method) Stochastic Methods These methods consist of calculating the values of the objective function at a large number of selected points. The points are selected by such criteria that each point in the space has an equal probability of being selected. The best points are then determined by comparing the function values. From the outlined strategy, it follows that these methods lead to computing the function values at a large number of points, which may protract the calculation. On the other hand, we can more easily reach the global optimum of the function to be optimized. These methods also comprise the evolution methods since the first solution population is generated completely by random. The difference only consists in the strategy of selecting better solutions. ©2002 CRC Press LLC
Evolutional Optimization Methods Since some problems are difficult to solve by standard numeric optimization methods, even if they converge to an acceptable optimum in a reasonable time, new approaches had to be developed. Therefore, a number of new methods have been designed based on the laws of natural genetics copying them in various degrees. These methods employ random generation of input parameters and so can be thought of as stochastic methods. In general, stochastic optimizing algorithms (including virtually all the evolutional algorithms) optimize using multi-parameter function with “wild” behavior, that is, with many minima or with an unknown gradient. Stochastic optimization methods are necessarily slower than heuristic approaches, which take advantage of the fact that they know the type and details of the function to be optimized. Unless the conditions for the global optimum are previously known, we can never be sure whether we have reached the global optimum to be able to terminate the optimization process. However, stochastic optimization methods also bring numerous benefits. They are generally very well specified and thus applicable virtually to any problem, and they can get out of the trap of a local minimum. The evolutional process of searching the space of potential solutions requires an equilibrium of two objectives: • to find the nearest (mostly local) minimum as quickly as possible, and • to search the space of all potential solutions in the optimum manner. The methods differ in their orientation towards these two objectives and they can be roughly ordered in a sequence starting with methods tending to local minima to methods searching a large number of potential solutions: 1. 2. 3. 4.
Stochastic “hill climbing” algorithms, Tabu search algorithms, Simulated annealing algorithms, and Genetic algorithms.
Hill Climbing Algorithm This is the simplest optimization algorithm being a variant of the gradient method “without gradient” where the direction of the steepest climb is determined by searching the neighborhood. This algorithm also has all the drawbacks of gradient methods, in that it is very likely to end up in a local extreme without reaching the global minimum. Here the starting solution is generated at random. For the currently designed solution, a certain neighborhood is generated using a finite set of transformations and the best minimum is chosen from this neighborhood. The local solution obtained in this way is then used as the center of a new neighborhood in which the optimization is repeated. This process is iterated a specified number of times. In the course of this process the subsequent best solutions are recorded to be finally used as the resulting minimum. The basic drawback of this algorithm is that, after a number of iterations, it may revert to a local minimum that has already been passed in a previous step (the problem of looping). This problem can be avoided by running the algorithm several times with different randomly generated initial values to eventually choose the best result achieved. Tabu Search Algorithm At the end of the 1980s, Professor Fred Glover designed a new approach to solving the problem of finding the global minimum, which he called tabu search. At present, this method is among those used most frequently to solve combinatorial problems and problems of finding the global minimum. Based on the hill-climbing algorithm, it tries to eliminate the problem of looping. The hill-climbing algorithm is equipped with a so-called short-time memory, which, for a short previous interval of the algorithm history, remembers the inverse transformations to locally optimal solution transformations used to obtain the new centers in iterations. These inverse transformations are prohibited (tabu) when the new neighborhood is created for a given current solution. In this way, the looping caused by falling into the trap of a local minimum may substantially be reduced. A hill-climbing algorithm modified in this way systematically searches the entire area in which the global minimum of a function is to be found. ©2002 CRC Press LLC
Simulated Annealing Algorithm Apart from the stochastic methods and methods based on natural evolution, there is another possibility of simulating the evolution of systems based on the physical evolution of macroscopic systems. The annealing of a solid body in order to remove the internal stress is a simple example of this kind of evolution. For a physical interpretation of this process, consider a body that is heated until it reaches a high temperature. The temperature is then gradually lowered. The atoms of a body heated to a high temperature can easily overcome the local energetic barriers to reach equilibrium states. When the temperature is lowered, atoms are fixed in this state and the cooled off body is without internal stress. This principle was used to design the method of simulated annealing. First, an initial temperature Tmax is set, whose value is important for the method to be efficient. The simulated annealing algorithm then searches the space of all potential solutions in a strongly stochastic way, also accepting the states that correspond to solutions worse than the current one. This property of simulated annealing is a characteristic feature of this method and provides a way of escaping from a local minimum trap, thus allowing the search of another area of the entire solution space. However, as the annealing temperature T is lowered, the probability of accepting worse states as well is diminishing. For small temperature values then, only solutions better than the current one are considered. Genetic Algorithm (GA) Genetic algorithms (GAs) are most frequently used to optimize the parameters of an unknown system whose mathematical description is either too complicated or unknown [5]. When applying a GA, it is mostly sufficient to know a function assigning a price to each individual in the population. This may be the error of the solution for randomly selected parameters during GA. Since a GA is looking for a maximum, the error, which, on the contrary, is being minimized, must be transformed into looking for a maximum. This may be done in several different ways: by subtracting the error from the maximum error occurring, by calculating the inverted value of the error, or by using another transforming function that approaches zero as the error approaches one. Increased attention should be paid to setting up the program implementing the pricing function since it consumes the most computing time compared with the other GA components. Apart from general optimization problems, GAs are mostly applied to neural networks. Here the tendency is to employ GAs at two different levels. First, for finding suitable weights for a neural network and second, when optimizing the structure of a neural network, that is, when selecting the algorithm, the number of input neurons in the hidden layers, the number of hidden layers, etc. Using a genetic algorithm to optimize the parameters of another genetic algorithm (the size of the population, the number of crossbreedings, the extent of mutations, the frequency of mutations) is a very revolutionary idea (optimization of the computation time where the computation time is a pricing function of the GA). As far as applications of GAs to problems encountered in research of electric machines are concerned, GAs have been used to identify the parameters of the substitution diagram of an induction motor. By way of conclusion, it may be added that genetic algorithms perform surprisingly well when all other algorithms fail, such as for incomplete problems where the computation time is an exponential or factorial function of the number of variables. There is no point in using GAs to optimize relatively simple functions or functions for which special algorithms exist for their description. Considering the necessity to calculate the function values for tens or hundreds of genetic chains in a population and the necessity to evaluate hundreds or even thousands of populations during a single run of the program, GAs are rather time-consuming. Despite the positive results achieved by using GAs, it is clear that nature must use even more intricate and, at the same time, not very sophisticated methods. The GAs described above only correspond to very primitive examples observed in nature, particularly those related to asexual reproduction with a single chromosome. Since nature has taken billions of years to test its algorithms, it is highly efficient to further learn from it. It is interesting that it needs no mathematics to solve complicated problems of optimization. Nevertheless there are other optimization methods suitable to solve the problems of the design [2–4]. ©2002 CRC Press LLC
Selection of a Suitable Optimization Method The standard gradient method is still one of the most frequently used methods. Gradient methods or even the standard non-gradient methods (such as the simplex method) are not suitable if the finding of the global minimum is required of a function with many local minima. Mostly, these methods only reach an insignificant minimum close to the starting point (the initial solution) in which they are trapped. This deficiency is mostly removed by repeatedly selecting at random the initial solution of an optimization problem and taking the best result for the solution. The stochastic character of this process can only be seen in the random selection of the initial solution. The subsequent optimization algorithm then proceeds without any randomness. Then the evolutional optimization methods are thought of as stochastic ones despite their employing of a certain strategy when choosing the getter points. The following are the main differences between a genetic algorithm and the more frequently used gradient method: • GA performs no gradient computation, which might be difficult and time consuming particularly for large systems, and • GA works with randomly generated solutions and may converge more quickly to the global minimum. To optimize the draft design of an induction motor, an optimization method was employed using a genetic algorithm. This method is described in more detail in the following chapter.
34.3 Optimum Design of Induction Motor (IM) IM Design Introduction Actual design of an induction motor usually depends on the requirements of individual customers, who specifically define parameters which a designed machine should accomplish. In this way, with the same machine output, we can obtain different implementations that meet individual conditions more or less. It is possible to require a good quality of one parameter only with the deterioration of other parameters. We are going to deal with a design of motors of (0,6–200) kW outputs. Motors are designed for permanent load and with the project assignment the following input values are required: Machine output Pn [kW], voltage U1n [V], winding connection Y/D, number of poles 2p or rotation -1 speed n [min ], grid frequency f [Hz], efficiency η[%], power factor cos ϕ, insulation class, IP implementation, and the shape of the machine. We consider squirrel-cage motors in closed implementation with framework and cooling ribs. There is a cast aluminum rotor cage. For the design, data such as conductors and slots dimension or magnetic characteristics deducted from tables and graphs that are given by the standard or by the manufacturer’s measurement, are needed. The actual design is a compromise between individual design parameters, so that a resulting machine would have the best possible operating characteristics with a perfect heat and material utilization. The actual motor design is described in the following section.
Classical IM Design Evaluation An induction motor design, when carried out manually, represents hundreds of calculations, which can last tens of hours even with an experienced constructor. As computers made their way into practically all branches of design and analysis, a series of programs which co-operate with a designer in an interactive fashion and speed up a calculation were created. In spite of indisputable advantages of this design process, we have to realize that there is a remarkable quantity of various design implementations of the given motor which, more or less, achieve the required motor operating characteristics. This approximates the global minimum of an objective function, which evaluates the design quality. Thus, the idea to create a program for searching the whole state space of all possible solutions and selecting such a variant, which is the most appropriate to an evaluating objective function (the required ©2002 CRC Press LLC
0066_frame_C34.fm Page 7 Wednesday, January 9, 2002 8:07 PM
TABLE 34.1
Generated Parameters List and Setup of Their Limits
Parameter Name
Symbol
Dimension
High Limit
Low Limit
De D li Bδ kdr1 d σ1 σt σk Bz q1
mm mm mm T — mm −2 A mm −2 A mm −2 A mm T —
User optional User optional User optional 0.5 0.6 0.2 3.0 2.0 2.0 1.6 2.0
User optional User optional User optional 1.0 0.75 (0.8) 0.4 15.0 6.0 4.0 2.0 5.0
Stator outside diameter Stator inside diameter Ideal iron length Air gap induction Stator slot filling Air gap size Stator current density Rotor rod current density Rotor ring current density Teeth magnetic induction Slot number per pole and stator phase
motor characteristics) using some of the optimization methods, was developed. The stochastic evolutionary method genetic algorithm was selected, because it searches the whole state space of all possible solution in a best way.
Description of a Solved Problem Generated Parameters The values given in Table 34.1 are recommended only, and, for the motors of outputs below 200 kW, they are mostly limiting values. Varying the parameter values or substituting one parameter for another is possible only by intervention in the program source text. Diameter limits De and D from the input file are considered only in the case that a motor design without regard to standardized axis height is required. In the case that standardized axis height is entered, these limits are calculated. Limits of an ideal rotor length are appropriate to enter as narrow as possible for faster convergence to a limit. But this is not a required condition. Generally, the lower the range of individual parameters, the faster the convergence to a global minimum, and the number of local minimums is lower. Objective (Criterion) Function It is not just the form of the objective function, but also the selection of optimized parameters that is important for good optimization results. Selected parameters must sufficiently describe a quality solution to the given problem. In the case of an induction motor design optimization task, the following parameters were selected: Motor volume Motor temperature rise Motor nominal power factor Motor nominal efficiency Torque overload capacity
3
V [dm ] ϑn [K] cos ϕn [−] ηn [−] mpn [−]
These parameters are most important for the quality of the design and describe the design sufficiently. The total error is based on the relation given in Eq. (34.1), a sum of individual partial errors of each controlled parameter. If we put more emphasis on some parameter, we increase a corresponding weight coefficient, thus achieving its improvement in the final design. At the same time, values of other parameters will decrease. Finding an optimal setup of gain coefficients is one of the most important and difficult problems. The term “optimal setup” means that the designed motor has the highest power factor, efficiency, and torque overload capacity values at the minimal volume and simultaneously does not exceed a permitted temperature rise for a selected insulation class. We have the relationship
e ( GR i ) = abs ( kV ⋅ V ) + abs ( kJ ( 0.89J d – J n ) ) + abs ( k cos j ( 1 – cos j n ) ) + abs ( kh ( 1 – h n ) ) + abs ( k mp ( m p + 1 – m pn ) ) ©2002 CRC Press LLC
(34.1)
TABLE 34.2
Input Values of 5.5 kW, 380 V Motor
Quantity Name Nominal power output Nominal voltage Required power factor Required efficiency Grid frequency Motor axis height Number of pole pairs Temperature class of insulation Torque overload capacity
Symbol
Dimension
Value
Pn U1n cosj η f H p TT mp
W V — — Hz mm — — —
5500 380 0.81 0.86 50 132 3 F 2
where kV is the volume weight coefficient, kϑ is the temperature factor weight coefficient, kcosϕ is the power factor weight coefficient, kh is the efficiency weight coefficient, kmp is the torque overload capacity weight coefficient.
Achieved Results 5.5 kW, 380 V Motor Design Description During program development and tuning, an optimization was performed on the motor described in Table 34.2. In this section we describe the results and problems encountered in the optimization process. The symbols and quantities, which are not explained in detail, were either used in the previous text or are listed at the list of used quantities at the beginning of the document. The motor input parameters are given in Table 34.2. Other Results It follows from the physical principle that optimized quantities are closely related. Increase of a gain of one quantity results in a disadvantage of the quantities. Based on the performed optimizations, it can be concluded that two kinds of motors exist, depending on the content of iron and copper: 1. Motor with prevailing iron content, high stator current density, good power factor, for a price of worse efficiency of the motor and with slightly worse torque overload capacity than the second motor. 2. Motor with high copper content and conversely low stator current density, good efficiency, and worse power factor value. Torque overload capacity is good. The type of motor is determined based on the setting of gain coefficients. A sum of temperature and power factor errors on one side impacts the sum of volume and efficiency errors on the other side. The torque overload capacity can be good for both kinds of motors. Results of individual optimizations are listed in Table 34.3, ordered by volume value from smallest to largest. Different varieties of motors were obtained, depending on values of gain coefficients. It is difficult to determine which solutions are good or bad, because the selections depend on actual customers’ requirements. The solution that gives the best value of optimized quantity is marked in bold. Solution numbers 1, 5, 8, 23, and 25 can be considered successful from this perspective. The motor described above (solution no. 2) serves for depicting of the task. Previously-mentioned relations between individual quantities can be observed in Table 34.3, which lists the optimization results without limiting the generated parameter, thus using the requirements in Table 34.1. Next, a motor optimization was performed with just one optimized parameter, when the gain of the other parameters was set equal to zero. 1. Volume optimization. In this case, the algorithm selected as the best solution motors with minimal dimensions, when parameters De, D, and li were converging to minimum preset limits. 2. Temperature optimization. The algorithm reached first reached a local minimum with temperature at the maximum based on the required insulation class, and mostly stayed on this value. ©2002 CRC Press LLC
TABLE 34.3 Motor P = 5.5 kW, U = 380 V Solutions List, Without Generated Parameters Limited Number 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
V [dm ]
ϑ [K]
cosϕ [-]
η [-]
mp [-]
Directory
3.96 4.20 4.31 4.32 4.33 4.50 4.51 4.54 4.56 4.58 4.63 4.69 4.70 4.73 4.78 4.78 4.81 4.97 5.08 5.12 5.96 6.35 6.40 6.57 7.05 7.39
88.1 86.9 74.9 88.8 75.1 89.0 86.8 90.0 84.6 86.5 68.2 88.4 73.4 61.0 78.1 71.0 70.6 54.5 55.5 88.2 44.0 42.4 87.5 59.0 42.3 52.9
0.798 0.818 0.787 0.836 0.690 0.836 0.818 0.884 0.857 0.836 0.792 0.862 0.845 0.799 0.853 0.767 0.703 0.804 0.762 0.879 0.784 0.803 0.887 0.747 0.793 0.714
0.834 0.843 0.865 0.817 0.973 0.834 0.818 0.812 0.816 0.817 0.858 0.808 0.830 0.871 0.858 0.870 0.934 0.883 0.877 0.806 0.870 0.882 0.853 0.956 0.865 0.986
1.72 1.90 1.77 1.78 1.07 1.79 1.93 1.98 1.74 1.77 2.10 1.80 2.25 1.90 1.67 1.80 1.28 1.90 2.20 2.05 2.55 2.69 2.27 1.16 3.00 1.03
Motor1 Motor2 Motor3 Motor4 Motor5 Motor6 Motor7 Motor8 Motor9 Motor10 Motor11 Motor12 Motor13 Motor14 Motor15 Motor16 Motor17 Motor18 Motor19 Motor20 Motor21 Motor22 Motor23 Motor24 Motor25 Motor26
3
3. Power factor optimization. An effort to achieve the first type of motor (see above discussion) with low copper content, high current density σ1, worse value of efficiency. Torque overload capacity was good. 4. Efficiency optimization. The designed motor corresponded to the second type of motor (see above discussion) with prevailing copper content, low current density σ1, and good efficiency, however, with worse power factor values. Torque overload capacity was good. 5. Torque overload capacity optimization. The motor is designed with high number of slots for pole and phase, resulting in gradual spread of conductors on the perimeter. The motor can have prevailing iron or copper content depending on a local solution, to which it converged. It can have good values of power factor and efficiency for a price of machine volume increase.
34.4 The Use of a Neuron Network for the Identification of the Parameters of a Mechanical Dynamic System The basic step used to solve the dynamic tasks by means of any type of modeling is to create a set of important quantities that include both the quantities describing structure, conditions, and the interactions of technical objects and the quantities that characterize the consequences (i.e., their demonstration and behavior). The methods of creating the mathematical models in drive systems, in general an interactive process, utilize • the applications of well-known physical principles that describe the phenomena in drive systems (e.g., the second Newton’s principle, Kirchhoff ’s laws, etc.), or • the applications of the methods based on artificial intelligence algorithms (e.g., genetic algorithms [1] and artificial neuron networks [6, 7]). ©2002 CRC Press LLC
The theories on which the methods of artificial intelligence are based replace the “standard” analytical and numerical methods when • these are the only theories which can solve the problem, • they exhibit better properties from the point of view of the problem solution (e.g., a better conditionality considering the changes of input values), and • they allow the problems to be solved more effectively. The last case is typical when we want to approach the real operational conditions as close as possible. From various methods of artificial intelligence, the stochastic evolution algorithms and the artificial neuron networks are being increasingly utilized in the field of the modelling of drive interactive systems. In the following section, two methods are shown that are applied to the problems of the analysis of dynamic properties in drive systems. The solution of dynamics by means of the algorithms of artificial intelligence represents a solution of the following partial problems: • Specifying the set of important (relevant) quantities, • Selecting the theory which is suitable to solve the problems, • Arranging the relations among relevant quantities so that they allow the selected algorithm of artificial intelligence to be used, • Generating the training data, and the selection of the method of teaching, for example, in neuron networks, and • Testing the quality of the results reached and their evaluation.
Practical Application Many identification methods are known and very often verified quite well in practical terms. The limit factors that make these procedures more difficult (e.g., the assumptions about system linearity, stationarity, and normality of the phenomena which occur in the systems, etc.) are also known. Hence, we have used an untraditional approach to the problem f identifying the dynamic properties in mechanical systems for which the use of neuron systems seems to be promising, and at the same time available for engineers’ thinking. A Practical Application—Gearbox The first case that was analyzed is a vehicle gearbox. Inputs (engine load), outputs (frequency-amplitude spectra of torsional oscillations), and the gearbox structure were known. The ilete information was related to the selected parameters of stiffness and damping in the drive. Due to variable operational conditions, the magnitude of damping may vary enough to significantly affect output characteristics. If many experimental results are evaluated, some typical failures can be identified and their possible occurrence can be anticipated from output files. We have used the data that were measured in the real system. The frequency-amplitude spectrum of torsional oscillations was measured at the gearbox shaft, which is seated on four bearings with five speed gears (Fig. 34.1). Originally, the measurement was carried out to determine the resonance of frequency systems with the goal to reduce noise. The following parameters were set in the system: Stiffness K ∈ {0.3, 12.0, •}, Damping B ∈ {-, 0, 0.3, 12.0}. The measurements were done with testing frequencies f = 512 Hz and f =1024 Hz. To record significant oscillation harmonics, the excitation frequency was flexible in both cases: 1. from 2.5 to 14.0 Hz in steps of 0.5 Hz, and 2. from 14.0 to 40.0 Hz in steps of 1.0 Hz. ©2002 CRC Press LLC
FIGURE 34.1
Five speed gear. TABLE 34.4
Expected Natural and Excitation Frequencies for the Gearbox
Table of Expected Frequencies Low frequencies Operational frequency (OF) (speed)
Interharmonic frequency (IHF)
Natural frequency (NF)
Combination frequency (CF)
Tooth frequency (TF) {TF = z.OF}
[Hz] OF 2 ¥ OF 3 ¥ OF 0.5 ¥ OF 1.5 ¥ OF 2.5 ¥ OF I.NF 0.5 ¥ I.NF 2 ¥ I.NF II.NF 0.5 ¥ II.NF 2.0 ¥ II.NF 2 ¥ OF + 0.5 ¥ I.NF OF + I.NF 2 ¥ OF + I.NF 2 ¥ OF + 2 ¥ I.NF 1st speed gear 2nd speed gear 3rd speed gear 4th speed gear
up to 5.0 14.16 28.32 42.48 7.08 21.25 35.42 43.91 21.96 87.82 322.1 161.1 644.2 50.28 58.07 72.23 116.1 184.1 325.7 424.9 580.6
The spectrum always included 512 spectral lines. The measurement was repeated 360 times for different variations of the parameters K and B (the system adjustment). The values of natural and excitation frequencies, which are expected for the gearbox to be analyzed, are shown in Table 34.4. Task Definition The task was originally defined in the following way: to estimate the corresponding magnitudes of parameters K and B (this means, to recognize the adjustment of parameters used in the mechanical dynamic system) by means of the artificial neuron network on the basis of the frequency-amplitude ©2002 CRC Press LLC
FIGURE 34.2
Stimulus vectors normalization (top, before normalization; bottom, after normalization).
spectrum of torsional shaft oscillations in the given system. A multilayer perceptron with three layers (i.e., input, hidden, and output) is used as the configuration of the neuron network. Select the signal -x neuron functions as the linear, hidden, and output layers of the logistic function, f(x) = 1/(1 + e ). According to this definition, this is to identify the system parameters on the basis of the measured frequency-amplitude spectra. However, the parameters are taken from discrete sets (and very low), and the task could be redefined as the “standard” task of the spectrum classification according to seven attributes (each attribute corresponded to one of the possible values of the parameters K and B). The application of neuron networks to solve such a problem is more successful when compared to the solution of the original task. The amplitudes of spectral lines were expressed in logarithm scale, and a reduction of spectral dynamics with an increase of their informative quality has been achieved. Considering the nonlinear nature of the activation neuron functions used, which extends beyond the saturation range for the input interval ·0.5, 0.95 〉, the network cannot respond well to stimulous vectors with a high range of the values in the individual components. This is illustrated in Fig. 34.2. The input network layer was configured to 512 input neurons. The amplitude logarithmic value of one spectral line was entered into each input. The individual neurons in the output layer correspond to the classification attributes. Because there are seven attributes, seven neurons were configured in the output layer. The only-hidden layer was set as the arithmetic mean of the number of input and output neurons. Two hundred sixty neurons were configured to the only-hidden layer, as illustrated in Fig. 34.3. Each item corresponded to one measurement of the frequency spectrum (a stimulus vector) with a corresponding attribute vector (a vector of the required responses). The specific variation of the parameters was expressed by the required network response to two corresponding output neurons equal to 1, and the remaining output neurons equal to 0. From the original 360 items, 36 items were randomly separated (10% of total) for the future tests. We ensured that the network tests would be carried out with the items that have not passed the training network process (the network was not trained to these situations). This is necessary to verify the generalization model properties. The training set was formed by the remaining 324 items. The sequential strategy of teaching was used, i.e., the items from the training set were used in the teaching process with the fixed sequence (cyclic passages through the training set). Taking into consideration the size of the neuron network to be configured, the method of feedback moment propagation has been selected as the teaching method that exploits only the information up to the first-order inclusively (the values of a special function—a teacher and his gradient), and it has not used Hessian or its estimate, which, in this case, would be very demanding.
©2002 CRC Press LLC
Output layer y0
X0
y1
X1
X2
y2
y3
X3
X4
X5
Input layer FIGURE 34.3
Network configuration (hidden layer contains neurons without labels).
FIGURE 34.4
Successful response of neural net.
Results The neuron model of the mechanical system has manifested a high rate of success during the verification by test sets. The network was taught with random selections of the test items. During testing of the individual models, the responses of the network were successful in 85–95% of all cases (see Figs. 34.4 and 34.5). Moreover, the estimate of the values K and B that correspond to the parameters is available within a couple of seconds for the frequency spectrum in the active mode. However, it is possible that a model with higher quality will be achieved if special optimizing techniques are used in the future. In summary, the neuron model of the mechanical system described above can be assessed as usable in practical terms.
©2002 CRC Press LLC
FIGURE 34.5
Failure response of neural net.
References 1.Goldberg, D., Genetic Algorithms in Searching, Optimisation and Machine Learning, Reading, MA: Addison-Wesley, 1989. 2.Glover, F., Lagunai, M., Marti, R., Fundamentals of scatter search and path relinking, Control and Cybernetics, pp. 653–684, 2000. 3.Glover, F., Scatter Search and Star-Paths—Beyond the Genetic Metaphor, pp. 125–137, New York: Springer-Verlag, September 1995. 4.Glover, F., Kelly, J.P., Langunai, M., Genetic algorithm and tabu search—hybrids for optimization, Computers and Operations Research, pp. 111–134, January 1995. 5.Lee, J., Hajela, P., Parallel genetic algorithm implementation in multidisciplinary rotor blade design, Journal of Aircraft, Vol. 33, No.5, pp. 962–969, September–October 1996. 6.Hagan, M.T., Demuth, H., Beale, M., Neural Network Design, Boston: PWS Publishing, 1996. 7.Kosko, B., Neural Networks and Fuzzy Systems, Englewood Cliffs, NJ: Prentice-Hall, 1992. 8.Ye, X., Loh, N., Dynamic system identification using recurrent radial basis function network, Neural Networks Theory, Technology, and Applications, New York: IEEE Technology Update Series, 1996.
©2002 CRC Press LLC
V Computers and Logic Systems 35 Introduction to Computers and Logic Systems Kevin Craig and Fred Stolfi Introduction: The Mechatronic Use of Computers • Mechatronics and Computer Modeling and Simulation • Mechatronics, Computers, and Measurement Systems • Mechatronics and the Real-Time Use of Computers • The Synergy of Mechatronics
36 Digital Logic Concepts and Combinational Logic Design George I. Cohn Introduction • Digital Information Representation • Number Systems • Number Representation • Arithmetic • Number Conversion from One Base to Another • Complements • Codes • Boolean Algebra • Boolean Functions • Switching Circuits • Expansion Forms • Realization • Timing Diagrams • Hazards • K-Map Formats • K-Maps and Minimization • Minimization with K-Maps • Quine–McCluskey Tabular Minimization
37 System Interfaces M.J. Tordon and J. Katupitiya Background • TIA/EIA Serial Interface Standards • IEEE 488—The General Purpose Interface Bus (GPIB)
38 Communications and Computer Networks Mohammad Ilyas A Brief History • Introduction • Computer Networks • Resource Allocation Techniques • Challenges and Issues • Summary and Conclusions
39 Fault Analysis in Mechatronic Systems Leila Notash and Thomas N. Moore Introduction • Tools Used for Failure/Reliability Analysis • Failure Analysis of Mechatronic Systems • Intelligent Fault Detection Techniques • Problems in Intelligent Fault Detection • Example Mechatronic System: Parallel Manipulators/Machine Tools • Concluding Remarks
40 Logic System Design M. K. Ramasubramanian Introduction to Digital Logic • Semiconductor Devices • Logic Gates • Logic Design • Logic Gate Technologies • Logic Gate Integrated Circuits • Programmable Logic Devices (PLD) • Mechatronics Application Example
41 Synchronous and Asynchronous Sequential Systems Sami A. Al-Arian Overview and Definitions • Synchronous Sequential System Synthesis • Asynchronous Sequential System Synthesis • Design of Controllers’ Circuits and Datapaths • Concluding Remarks
©2002 CRC Press LLC
42 Architecture Daniel A. Connors and Wen-mei W. Hwu Introduction • Types of Microprocessors • Major Components of a Microprocessor • Instruction Set Architecture • Instruction Level Parallelism • Industry Trends
43 Control with Embedded Computers and Programmable Logic Controllers Hugh Jack and Andrew Sterian Introduction • Embedded Computers • Programmable Logic Controllers • Conclusion
©2002 CRC Press LLC
35 Introduction to Computers and Logic Systems 35.1 35.2
Kevin Craig Rennselear Polytechnic Institute
35.3 35.4
Fred Stolfi Rennselear Polytechnic Institute
35.5
Introduction: The Mechatronic Use of Computers Mechatronics and Computer Modeling and Simulation Mechatronics, Computers, and Measurement Systems Mechatronics and the Real-Time Use of Computers The Synergy of Mechatronics
35.1 Introduction: The Mechatronic Use of Computers Mechatronics is the synergistic combination of mechanical engineering, electronics, control systems, and computers. The key element in mechatronics is the integration of these areas through the design process. Synergism and integration in design set a mechatronic system apart from a traditional, multidisciplinary system. In a mechatronic system, computer, electronic, and control technology allow changes in design philosophy, which lead to better performance at lower cost: accuracy and speed from controls, efficiency and reliability from electronics, and functionality and flexibility from computers. Automotive enginecontrol systems are a good example. Here a multitude of sensors measure various temperatures, pressures, flow rates, rotary speeds, and chemical composition and send this information to a microcomputer. The computer integrates all this data with preprogrammed engine models and control laws and sends commands to various valves, actuators, fuel injectors, and ignition systems so as to manage the engine’s operation for an optimum combination of acceleration, fuel economy, and pollution emissions. In mechatronics, balance is paramount. The essential characteristic of a mechatronics engineer and the key to success in mechatronics design is a balance between two sets of skills: • Modeling (physical and mathematical), analysis (closed-form and numerical simulation), and control design (analog and digital) of dynamic physical systems • Experimental validation of models and analysis and understanding the key issues in hardware implementation of designs In mechatronic systems, computers play a variety of roles. First, computers are used to model, analyze, and simulate mechatronic systems and mechatronic system components and, as such, are useful for control design. Second, computers, as part of measurement systems, are used to measure the performance
©2002 CRC Press LLC
FIGURE 35.1
Pneumatic servomechanism.
of mechatronic systems, to determine the value of component parameters, and to experimentally validate models. Finally, computers or microcomputers form the central component in digital control systems for mechatronic designs. Thus, computers play an essential role in the two essential characteristics of the mechatronics balance and comprise a key component to mechatronic system designs. This is illustrated by the following example. Consider the schematic of a pneumatic servomechanism, a computer-controlled, closed-loop positioning system, shown in Fig. 35.1. Pneumatic servomechanisms have the advantages of low cost, high power-to-weight ratio, ease of maintenance, cleanliness, and a readily-available and cheap power source. However, the disadvantages are high, nonlinear friction forces, deadband due to stiction, and dead time due to the compressibility of air. The design goal is to implement a fast, accurate, and inexpensive pneumatic-actuator system using inexpensive on/off solenoid valves, rather than expensive continuouslyvariable servo valves. To accomplish this task, one must completely understand the physical system, develop a physical model on which to base analysis and design, and experimentally determine and/or validate model parameters. One must then develop a mathematical model of the system, analyze the system, and compare the results of the analysis to experimental measurements to validate the model. One must then design a closed-loop position control system utilizing on/off, modified on/off, or pulsewidth modulated control. Finally, one must implement the control system and experimentally validate its predicted performance. A MatLab/Simulink model of this system is shown in Fig. 35.2. The mathematical model is highly nonlinear, as are the various control schemes. A computer numerical simulation is needed to understand the behavior of the system and the various control schemes. A data acquisition system is needed to take measurements of the various system inputs and outputs and validate the numerical simulation. And, a computer (a microcontroller in this case) is needed for the real-time implementation of the various control schemes. There are a variety of computer numerical simulation tools available, some requiring the detailed mathematical model while others enable virtual prototyping where the various system components are assembled on the computer screen with the component mathematical models given hidden in the background. There are also a variety of computer platforms on which to run the control algorithm, e.g., high-end PC using a DSP board and a real-time control-code generator; a microcontroller programmable in C or Basic with an analog-to-digital (A/D) converter and numerous digital input/output (I/O) ports; and a microchip implementation needed for product development. ©2002 CRC Press LLC
FIGURE 35.2
MatLab/Simulink model of the pneumatic servomechanism.
35.2 Mechatronics and Computer Modeling and Simulation In design, balance is the key to success, i.e., balance between theory and practice and balance between modeling/analysis skills and hardware-implementation/measurement skills. Figure 35.3 illustrates the steps in a dynamic system investigation, which is the process that would be utilized to design a mechatronic system. The distinction between physical modeling and mathematical modeling is emphasized, as is the importance of both analytical and numerical solutions to the model equations. To generate a physical model, approximations must be made to the actual physical system. Small effects are neglected. The influence of the environment is ignored. Elements are assumed to be lumped instead of distributed. The dynamics are assumed to be linear. Parameters are assumed to be constant. Noise and uncertainty is ignored. These approximations have a direct influence on the mathematical model. Neglecting small effects limits the number of equations. Environmental independence reduces the complexity of the equations. Other approximations result in linear ordinary differential equations with constant coefficients. Neglecting uncertainty avoids the use of statistics in the model. In most cases, a design consideration is to develop the simplest model which adequately depicts the complexity of the system dynamics. The predicted dynamic behavior of the model is only half the story, for these results, without experimental verification, are at best questionable, and at worst useless. Comparing the predicted dynamic behavior with the actual measured dynamic behavior is the key step in the dynamic system investigation process. The steps in the dynamic system investigation process should be applied not only when an actual physical system exists (as in reverse engineering) and one desires to understand and predict its behavior, but also when the physical system is a concept in the design process that needs to be analyzed and evaluated. After recognizing a need for a new product or service, one uses past experience (personal and vicarious), awareness of existing hardware, understanding of physical laws, and creativity to generate design concepts. The importance of modeling and analysis in the design process has never been more important than in this situation. These design concepts can no longer be evaluated by the build-and-test approach because it is too costly and time consuming. Validating the predicted dynamic behavior in this case, when no actual physical system exists, becomes even more dependent on one’s past hardware and experimental experience. In physical modeling, one first specifies the physical system to be studied along with the system boundaries, input variables, and output variables. In modeling dynamic systems, we use engineering judgment and simplifying assumptions to develop a physical model. The complexity of the physical model depends on the particular need, e.g., system design iteration, control system design, control design ©2002 CRC Press LLC
FIGURE 35.3
Dynamic system investigation process.
verification, physical understanding. The intelligent use of simple physical models requires that we have some understanding of what we are missing when we choose the simpler model over the more complex model. The astuteness with which these approximations are made at the onset of an investigation is the very crux of engineering analysis. A variety of engineering models may be developed based on the particular need. Always ask the question: “Why am I modeling the physical system and what is the range of operation that I wish my model to be valid for?” If the need is system-design iteration or control-system design, then a “design model” is needed, i.e., a physical model whose mathematical model is a linear ordinary differential equation with constant coefficients and, therefore, useful with a broad, highly-developed assortment of linear design techniques. If the need is design verification before actual hardware implementation, then a “truth model” is needed, i.e., a physical model that is as close to reality as possible; with nonlinear simulation tools available, almost any mathematical model can now be simulated. Iterations can then be performed using, as a starting point, the results of the work performed with the design model. Models only need to be valid for the particular range of operation of interest; low-order models then can often represent very complex, higher-order models very effectively. In practice, you may need a hierarchy of models of varying complexity: a very detailed truth model for final performance evaluation before hardware implementation, several less complex truth models for use in evaluating particular effects, and one or more design models.
35.3 Mechatronics, Computers, and Measurement Systems Measurement systems or data acquisition systems may be used for a variety of purposes, and a computer plays an integral role in each. 1. Monitoring of Processes and Operations. Certain applications of measuring instruments may be characterized as having essentially a monitoring function, e.g., thermometers, barometers, and water, gas, and electric meters. 2. Control of Processes and Operations. An instrument can serve as a component of a control system. To control any variable in a feedback control system, it is first necessary to measure it. A single control system may require information from many measuring instruments, e.g., industrial machine and process controllers, aircraft control systems. 3. Experimental Engineering Analysis. In solving engineering problems, two general methods are available: theoretical and experimental. Many problems require the application of both methods and theory and experiment should be thought of as complementing each other. Further, all models need validation, and measurement systems offer a means to collect the data required for model validation. The distinction among monitoring, control, and analysis functions is not clear-cut; the category that a given application may fit may depend somewhat on the engineer’s point of view and the apparent looseness of the classifications should not cause any difficulty. Rather it should be realized that computers, ©2002 CRC Press LLC
FIGURE 35.4
Input–output configuration of a measurement system.
as general purpose processing elements, can serve many functions in the processing of measured parameters from mechatronic systems and that these processing functions can be related to or unrelated to the modeling and control of such systems. Special purpose digital signal processing electronics are also used in measurement systems. High-speed digital signal processors (DSPs), for example, are used to collect input and output signals in the determination of transfer functions for mechatronic systems. The high speed allows the processing of simultaneous samples of the input and output for minimal phase error. The primary application for DSPs in mechatronic systems, however, is real-time control, discussed below. Figure 35.4 is the input–output configuration of a measurement system. Input quantities are classified into three categories: 1. Desired Inputs. These are quantities that the instrument is specifically intended to measure. 2. Interfering Inputs. These are quantities to which the instrument is unintentionally sensitive. FD and FI are input–output relations, i.e., the mathematical operations necessary to obtain the output from the input. They represent different concepts depending on the particular input–output characteristic being described, e.g., a constant, a mathematical function, a differential equation, a statistical distribution function. 3. Modifying Inputs. These are quantities that cause a change in the input–output relations for the desired and interfering inputs, i.e., they cause a change in FD and/or FI. FM,I and FM,D represent the specific manner in which iM affects FI and FD , respectively. There are several methods for canceling or reducing the effects of spurious inputs. One method which relies upon computer processing of the signals is the method of calculated output corrections. This method requires one to measure or estimate the magnitudes of the interfering and/or modifying inputs and to know quantitatively how they affect the output. Then it is possible to calculate corrections, which may be added to or subtracted from the indicated output so as to leave (ideally) only that component associated with the desired input. Since many measurement systems today can afford to include a computer to carry out various functions, if sensors for the spurious inputs are provided, the computer can implement the method of calculated output corrections on an automatic basis.
35.4 Mechatronics and the Real-Time Use of Computers We turn to the field of closed-loop control using a digital computer as the controller. Several comments are in order. First, a mechatronic system typically involves continuous variables. Elements rotate or translate in space. Fluids or gasses flow. Heat or energy is transferred. Computers are, by their nature, digital elements. Variables are represented in a computer by discrete values or simply by collections of zeroes and ones. For a computer to be used as the controller for a mechatronic system, therefore, the ©2002 CRC Press LLC
continuous variables must be converted to discrete variables for processing and then back again to continuous variables. This might seem obvious. What is not so apparent is that the computer algorithm forms an inherent separation between the processing of the signals and the signals themselves, which is not true of other mechatronic system components. Even if digital logic elements are used (as discussed in this chapter) the signals are converted to discrete form, but the flow of information is still continuous through the elements. When a computer is used for the control element, this information flow is broken and buried in the computer algorithm. As an example, computer algorithms sometimes mimic continuous proportional-integral-derivative (PID) control laws. When the execution of this algorithm is analyzed, even if the effects of sampling and quantization are included, it is assumed that the signals are processed just as if they were being determined by continuous processing elements. In reality, if the computer code is examined at the machine level (i.e., not in the high level language in which it may be written), it would bear very little resemblance to a differential equation representation of the PID algorithm. This has practical implications both for modeling the exact operation of the computer as a control element and for validating that the computer code actually produces the desired response to signals. Other issues are involved when the mechatronic system controller is implemented in software. Software execution is often asynchronous to the other time constants in the system (i.e., the software execution and system response are often not synchronized). Software can be made synchronous by syncing it to the sampler period, but this typically limits performance and is difficult if the computer is to be used for other tasks than control. Once a computer is contained as an element in a mechatronic system, there is a tendency to use some of the processing power to provide additional functionality or ease of use for the product. This additional code can affect, sometimes adversely, the operation of the real time controller execution. Testing of the code and safety of the code are also issues. The engineer has to determine that his system operates deterministically and safely for all possible combinations of input signals and for all possible states in the execution of the algorithm. For real-time systems, execution order for the code is often not predictable since it can be dependent on the particular combination of input signals. Simplicity of the code, providing for testability of the code, using established software quality assurance practices, and developing extensive documentation are ways to achieve system determinism and safety. Often, a hardware interlock, that is, a safety system utilizing electronic or mechanical hardware, is often included in software controlled systems. Code operation has to be further verified as the code is modified and as the code is reused for systems other than that for which it was developed. Unlike other controllers, computer code is portable, but this requires more thought for its possible reuse. Using standard software packages, standard processors, modular code, and commercial real-time environments increases the possibility for reuse. Besides the issues inherent in using computer code as the controller, there are issues involved whenever a digital processing component is incorporated into a mechatronic system. Further, there are considerations that must be taken into account whenever digital signals are processed. Figure 35.5 shows a configuration useful for this discussion. The computer is important, but the computer “component” of many mechatronic machines and processes is often not the critical system element in terms of either technical or economic factors. Rather, components external to the computer, the actuators and sensors, the sampling system, and the anti-aliasing filter are more often the limiting factors in the system design. Since both continuous (analog) and digital signals exist in computer-controlled systems, the signals in such a system can be classified as shown in the table below. Signal Classification Discrete in amplitude Continuous in amplitude
Discrete in Time
Continuous in Time
D-D (digital) C-D
D-C C-C (analog)
For analog signals, the precise value of the quantity (voltage, rotation angle, etc.) carrying the information is significant, meaning that the specific waveform of input and output signals is of vital importance. Conversely, digital signals are binary (on/off) in nature, and variations in numerical value are associated ©2002 CRC Press LLC
FIGURE 35.5
General computer-control configuration.
with changes in the logical state (true/false) of some combination of switches, for example, +2 V to +5 V represents ON state, 0 V to +0.8 V represents OFF state. In digital devices, it is simply the presence (logical 1) or absence (logical 0) of a voltage within some wide range that matters; the precise value of the signal is of no consequence. Digital devices are therefore very tolerant of noise voltages and need not be individually very accurate, even though the overall system can be extremely accurate. When combined analog/digital systems are used, the digital portions need not limit system accuracy; these limitations generally are associated with analog portions and/or the analog-to-digital (A/D) conversion devices. Since most mechatronic systems are analog in nature, it is necessary to have both A/D converters and digital-to-analog (D/A) converters, which serve as translators that enable the computer to communicate with the outside analog world. In most cases, the sensor and the final control element are analog devices, requiring, respectively, A/D and D/A conversion at the computer input and output. There are, of course, exceptions, e.g., stepper motor and optical encoder. In most cases, however, the sensors can be thought of as providing analog voltage output and the final control element will accept an analog voltage input. The current trend toward using dedicated, computer-based, and often decentralized (distributed) digital control systems in mechatronic applications can be rationalized in terms of the major advantages of digital control: • Digital control is less susceptible to noise or parameter variation in instrumentation because data can be represented, generated, transmitted, and processed as binary words, with bits possessing two identifiable states. • Very high accuracy and speed are possible through digital processing. However, hardware implementation is usually faster than software implementation. Determining the time required to develop a system in software is notoriously difficult to estimate. • Digital control can handle repetitive tasks extremely well, through programming. • Complex control laws and signal conditioning methods that might be impractical to implement using analog devices can be programmed. Very sophisticated algorithms can be implemented digitally. • High product reliability can be achieved by minimizing analog hardware components and through decentralization using dedicated computers for various control tasks. ©2002 CRC Press LLC
FIGURE 35.6
Simulation of a continuous and 4-bit quantized signal.
• Digital systems are more easily “programmed” and offer the ability to time-share a single processing unit among a number of different functions. • Large amounts of data can be stored using compact high-density data storage methods. • Data can be stored or maintained for very long periods of time without drift and without being affected by adverse environmental conditions. Digital control has easy and fast data retrieval capabilities. • Fast data transmission is possible over long distances without introducing dynamic delays, as in analog systems. • Digital processing uses low operational voltages (e.g., 0–12 V DC). • Digital control has low overall component cost. Further, from the standpoint of the mechatronic product, the inclusion of a computer means that additional system functions can be provided. The user can select from a range of operations. Additional features can be included. A user interface providing indications of operation can be added with minimal cost. In a real sense, some of the problems of analysis and design of digital control systems (beyond the issues associated with software) are concerned with taking into account the effects of the sampling period, T, and the quantization size, q. If both T and q are extremely small (i.e., sampling frequency 50 or more times the system bandwidth with a 32-bit word size), digital signals are nearly continuous, and continuous methods of analysis and design can be used. It is most important to understand the effects of all sample rates, fast and slow, and the effects of quantization for large and small word sizes. Lower cost computers are typically slower and have a smaller word size. Figure 35.6 shows the effects of having too few quantization levels, i.e., too small a word size. The signal that will be processed by the controller has large errors over the original analog signal. Figure 35.7 shows the effects of sampling. It is worthy to note that the single most important impact of implementing a control system digitally is often the delay associated with the D/A converter, i.e., T/2. This pure delay results in a substantial phase shift in the closed-loop feedback system and often limits the control operation. ©2002 CRC Press LLC
FIGURE 35.7
Continuous and D/A converter output.
In a feedback system, the analog signal coming from the sensor contains useful information related to controllable disturbances (relatively low frequency), but also may often include higher frequency “noise” due to uncontrollable disturbances (too fast for control system correction), measurement noise, and stray electrical pickup. Such noise signals cause difficulties in analog systems and low-pass filtering is often needed to allow good control performance. The phase shift from this filter also adversely affects control system stability. Finally, in digital systems, a phenomenon called aliasing introduces some new aspects to the area of noise problems. If a signal containing high frequencies is sampled too infrequently, the output signal of the sampler contains low-frequency (“aliased”) components not present in the signal before sampling. This is illustrated in Fig. 35.8. If the higher frequency signal is sampled too infrequently, the result will be exactly the same values as the low frequency signal. From the standpoint of the controller, there is no way for the system to distinguish which signal is present. If we base our control actions on these false low-frequency components, they will, of course, result in poor control. The theoretical absolute minimum sampling rate to prevent aliasing is two samples per cycle; however, in practice, rates of about 10 are more commonly used. A high-frequency signal, inadequately sampled, can produce a reconstructed function of a much lower frequency, which cannot be distinguished from that produced by adequate sampling of a low-frequency function. In all of the above, the word computer was used for the digital processing element. In electronics literature, a distinction is usually drawn between a microprocessor, microcomputer, DSP, and computer. There is no standard for what each of these terms can mean, but some insight can be gained by examining Fig. 35.9, which is a general block diagram for a computer. All computers have a means of getting input, a means of generating output, a means of controlling the flow of signals and operations, memory for data storage, and an arithmetic logic unit (ALU) which executes the instructions. The ALU and control elements are often called the central processing unit (CPU). Small computers, which just contain a CPU, are often called microprocessors. Memory for these computers is often attached to the microprocessor but in distinct electronic packages. Input and output to the microprocessor is often handled by electronics called peripherals. If the memory is included in the same package, the computer is called either a microcomputer or computer depending on its physical size. CPU and memory on a single electronics chip is ©2002 CRC Press LLC
FIGURE 35.8
Simulation of continuous and sampled signal: aliasing.
FIGURE 35.9
Elements of a computer.
often called a microcomputer. The reader should be aware that a single electronics package can contain many “chips,” which are connected by fine wires within the package. The overall package is still called a chip. Finally, if the A/D and D/A functions are provided in the same package, the computer is often called a DSP. However, these functions can also be contained in something which is called a microcomputer. DSPs are also computers which have a special instruction in the ALU called a multiply-accumulate (MAC) instruction even if the A/D and D/A are not present. Digital signal processing algorithms often involve MAC instructions and a computer, which can execute this instruction very effectively (in one instruction cycle of the computer), and are often called DSPs. To further complicate the situation, electronic devices called application specific integrated circuits (ASICs) exist. These devices can be custom made to perform a specific operation (such as a PID algorithm). ASICs can contain a CPU or memory or peripheral functions or even a MAC cell as part of its makeup. If the reader is thoroughly confused by this explanation, he probably has the proper grasp of the situation. However, he should be aware that diagrams like the one shown in Fig. 35.9 often accompany the electronic component so the internal capabilities can be determined. Before leaving computers, one final point will be made. Memory in a computer can often be divided between program space and data space, as shown in Fig. 35.10. This representation is meant to be pictorial ©2002 CRC Press LLC
FIGURE 35.10
Computer memory organization.
rather than to define a specific computer architecture. In a von Neumann architecture, for example, the program memory and data memory share the same space and information busses. Whereas in a Harvard architecture, program memory and data memory are distinct (looking more like the figure). In either case, for a mechatronic system, one can think of the program (in program memory) as the set of instructions which tells the CPU how to manipulate data (in data memory) to produce an output. This view should emphasize the earlier point that the flow of signals in a mechatronic system becomes confused if a computer is to be used for real-time control. Because of the low cost of modern microcomputers, the use of logic elements as discrete components in a mechatronic system has diminished. Microcomputers are often programmed to perform logic functions, which has the advantage that the operation can be altered in software rather than requiring electronic hardware changes. In analyzing this logic, of course, any of the traditional methods can be employed. The logic can be minimized via Karnaugh maps, for example. The only difference lies in the implementation of the algorithm. ASICs are also used to implement logic functions.
35.5 The Synergy of Mechatronics As stated at the beginning of this section, mechatronics is the synergistic combination of mechanical engineering, electronics, control systems, and computers and the key element in mechatronics is the integration of these areas through the design process. The use of computers and logic elements as components in mechatronic systems will produce successful designs only if this synergy is achieved. The system must be designed as a system. Computers should never be an add-on component included when the design is complete. When computers are synergistically incorporated in the system, the power of the mechatronics approach to design is realized.
©2002 CRC Press LLC
36 Digital Logic Concepts and Combinational Logic Design
George I. Cohn California State University, Fullerton
36.1 36.2 36.3 36.4 36.5 36.6 36.7 36.8 36.9 36.10 36.11 36.12 36.13 36.14 36.15 36.16 36.17 36.18 36.19
Introduction Digital Information Representation Number Systems Number Representation Arithmetic Number Conversion from One Base to Another Complements Codes Boolean Algebra Boolean Functions Switching Circuits Expansion Forms Realization Timing Diagrams Hazards K-Map Formats K-Maps and Minimization Minimization with K-Maps Quine–McCluskey Tabular Minimization
36.1 Introduction Digital logic deals with the representation, transmission, manipulation, and storage of digital information. A digital quantity has only certain discrete values in contrast with an analog quantity, which can have any value in an allowed continuum. The enormous advantage digital has over analog is its immunity to degradation by noise, if that noise does not exceed a tolerance threshold.
36.2 Digital Information Representation Information can be characterized as qualitative or quantitative. Quantitative information requires a number system for its representation. Qualitative does not. In either case, however, digitalized information is represented by a finite set of different characters. Each character is a discrete quanta of information. The set of characters used constitutes the alphabet.
©2002 CRC Press LLC
TABLE 36.1
Notation for Numbers Juxtaposition
Polynomial n-1
Integer
N = Nn-1 Nn-2 º N1N0
N =
∑N R
k
k
k=0 -1
Fraction
F = F-1F-2 º F-m+1F-m
F =
∑F R
k
k
k=-m n-1
Real
X = Xn-1 Xn-2 º X1X0 ◊ X-1X-1 º X-m+1 X-m
X =
∑X R
k
k
k=-m
36.3 Number Systems Quantitative information is represented by a number system. A character that represents quantitative information is called a digit. The number of different values which a digit may have is called the radix, designated by R. The symbols that designate the different values a digit can have are called numeric characters. The most conventionally used numeric characters are 0, 1, 2,..., etc., with 0 representing the smallest value. The largest value that a digit may have in a number system is the reduced radix, r = R - 1. Different radix values characterize different number systems: with R different numeric character values the number system is Rnary, with 2 it is binary, with 3 it is ternary, with 8 it is octal, with 10 it is decimal, and with 16 it is hexadecimal. Any value that can be expressed solely in terms of digits is an integer. A negative integer is any integer obtained by subtracting a positive integer from a smaller integer. Any number obtained by dividing a number by a larger number is a fraction. A number that has both an integer part and a fraction part is a real number. All of the digits in a number system have the same radix. The radix is the base of the number system. Presumably, the possession of 10 fingers has made the decimal number system the most convenient for humans to use. The characters representing the 10 values a decimal digit can have are 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. The binary number system is the most natural for digital electronic systems because a desired reliability for a system can be most economically achieved using elements with two stable states. The characters normally used to represent the two values a binary digit may have are 0 and 1. The hexadecimal number system (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F; R = 16) is of importance because it shortens by a factor of four the string of digits representing the binary information stored and manipulated in digital computers.
36.4 Number Representation Numbers that require more than one digit can be represented in different formats, as shown in Table 36.1. Different formats facilitate execution of different procedures. Arithmetic is most conveniently done with the juxtaposition format. Theoretical developments are facilitated by the polynomial format.
36.5 Arithmetic The most common arithmetic processes, addition, subtraction, multiplication, and division are conveniently implemented using multidiget notation. Development of formulation procedures is facilitated using the polynomial notation. Since the numbers are digital representations, the logic used to maniputate the numbers is digital logic. However, this is different than the logic of boolean algebra, which is what is usually meant by the term digital logic. The logic of the former is implemented in hardware by using the logic of the latter. The four basic arithmetic operations can be represented as functional procedures in equation form or in arithmetic manipulation form, as shown in Table 36.2. The arithmetic processes in the binary system are based on the binary addition and multiplication tables given in Table 36.3. Table 36.4 gives binary examples for each of the basic arithmetic operations. ©2002 CRC Press LLC
TABLE 36.2
Arithmetic Operations Arithmetic Form
Algebraic Form
Addition
Sum = Augend + Addend
Subtraction
Difference = Minuend − Subtrahend
Multiplication Product = Multiplicand × Multiplier
Augend + Addend Sum Minuend − Subtrahend Difference Multiplicand × Multiplier Product
Quotient Remainder Dividend /Divisor = Quotient Dividend Divisor + Remainder /Divisor
Division
TABLE 36.3 Single Digit Binary Arithmetic Table (a) Addition 0 00
1 1
11
10
TABLE 36.4
carries augend addend sum
Subtraction, borrow method: 10
101 −10 11
borrows minuend subtrahend difference
Subtraction, payback method: 10
101 −1 −10 11
©2002 CRC Press LLC
1 0
1
Binary Arithmetic Operation Examples
Addition: 1100 11100 +1101 101001
(b) Multiplication 0 1 0 0 0
borrows minuend payback subtrahend difference
Multiplication: 1101 ×1 1 0 0000 1101 11 0 1 1 0 01 1 1 0
multiplicand multiplier partial product 1 partial product 2 partial product 3 product
Division, with fraction remainder: remainder 111 quotient 1011 10010 1 0 1 1 1 1 0 0 1 1 0 1 dividend divisor 1 0 1 1 0111 0 101 1 01 11 Division, with remainder in quotient: quotient .1 0 1 0 0 0 1 ... 1 0 1 1 1 1 1.0 0 0 0 0 0 0 dividend divisor 1 0 1 1 1100 1011 010000 1011
36.6 Number Conversion from One Base to Another The method of using series polynomial expansions for converting numbers from one base to another is illustrated in Table 36.5. Evaluation of polynomials is more efficiently done with the nested form. The nested form is obtained from the series form by successive factoring of the variable from all terms in which it appears as shown in Table 36.6. The number of multiplications to evaluate the nested form increases linearly with the order of the polynomial, whereas the number of multiplications to evaluate the series form increases with the square of the order. Conversion of integers between bases is more easily done using the lower order polynomials, Table 36.6(b), obtained by nesting. The least significant digit of the number in the new base is the remainder obtained after dividing the number in the old base by the new radix. The next least significant digit is the remainder obtained by dividing the first reduced polynomial by the new radix. The process is repeated until the most significant digit in the new base is obtained as the remainder, when the new radix no longer fits into the last reduced polynomial. This is more compactly represented with the arithmetic notation shown in Table 36.7 along with the same examples used to illustrate the polynomial series method. TABLE 36.5
Series Polynomial Method for Converting Numbers Between Bases Sample Conversion From
Method
A Lower to a Higher Base
1. Express number in polynomial form in the given base 2. Convert radix and coefficients to the new base 3. Evaluate terms in the new base 4. Add the terms
TABLE 36.6
101.12 = 1 x 2 + 0 × 2 + 1 × 2 + 1 × 2 2
1
0
A Higher to a Lower Base -1
1
0
= 11 × 1010 + 110 × 1010 + 101 × 1010
= 4 + 0 + 1 + 0.5 101.12 = 5.510
= 11 × 1010 + 110 + 101/1010 = 11110 + 110 + .1 36.510 = 100100.12
1
0
Nested Polynomials
R n−1
+ Nn− 2
Rn − 2
+ · · · + N2
(b) Lower Order Polynomials
R2
+ N1 R + N0
N = N (1) R + N0
N = (Nn − 1 R n−2 + Nn−2 R n − 3 + · · · + N2 R + N1 )R + N0
N (1) = N (2) R + N1
N = ((Nn − 1 R n−3 + Nn−2 R n− 4 + · · · + N2 )R + N1 )R + N0
N (2) = N (3) R + N2 ·· · N (n − 2) = N (n − 3)R + Nn − 2
.. . N = (· · · (Nn −1 ) R + Nn− 2 )R + · · · + N2 )R + N1 )R + N0
TABLE 36.7
N N (1) N (2) N (3) ·· ·
Sample Conversion From A Lower to a Higher Base A Higher to a Lower Base N0 N1 N2
R N (n−1) Nn − 2 R0 Nn −1
©2002 CRC Press LLC
N (n − 1) = Nn −1
Radix Divide Method for Converting Numbers Between Bases
Method R R R R
-1
= 1 × 4 + 0 × 2 + 1 × 1 + 1 × 0.5
(a) Nested Polynomial via Iterated Factoring N = Nn −1
36.510 = 3 × 10 + 6 × 10 + 5 × 10
2 2 2 2 2 2
3610 18 9 4 2 1 0 3610 =
0 0 1 0 0 1 1001002
12 20123 12 102 11 1 12 2 12 0 2 20123 = 2145
-1
TABLE 36.8
Radix Multiply Number Convertion Method (Terminating Case) Formalism
Algebraic F = F− 1 F− 2 F− 3 · · · F− m R ∗ F = F −1 · F − 2 F − 3 · · · F − m = F − 1 · F (1) R ∗ F (1) = F − 2 · F − 3 F − 4 · · · F − m = F − 2 · F (2) R ∗ F (2) = F − 3 · F − 4 F − 5 · · · F − m = F − 2 ·F (3) ·· ·
R ∗ F (m − 2) = F − m + 1 · F − m = F − m +1 · F (m−1) R ∗ F (m − 1) = F − m
Arithmetic
Sample Conversion Between Bases Higher to Lower Lower to Higher
F− 1 F− 2 F− 3 · · · F− m ×R
0.12510 ×2 0 .25 ×2 0 .5 ×2 1 .0
F −1 · F − 2 F − 3 · · · F −m ×R F− 2 · F− 3 · · · F− m ×R ·· ·
F − m + 1 · F −m ×R F− m ·
0.1001012 ×1010 101 .11001 ×1010 111 .1101 ×1010 1000 .001 × 1010 1 .10 ×1010 10 .1 ×1010 101 .
.125 10 = .0012 .1001012 = .57812510
TABLE 36.9 Nonterminating Fraction Conversion Example 0.110 = 0.000110011 . . . 2 ×2 or more compactly 0 .2 ×2 0 .4 0.110 = 0.000112 ×2 0 .8 ×2 1 .6 ×2 1 .2 ×2 0 .4 ×2 0 .8 ×2 1 .6
Conversion of a fraction from one base to another can be done by successive multiplications of the fraction by the radix of the number system to which the fraction is to be converted. Each multiplication by the radix gives a product that has the digits shifted to the left by one position. This moves the most significant digit of the fraction to the left of the radix point, placing that digit in the integer portion of the product, thereby isolating it from the fraction. This process is illustrated in algebraic form in the left column of Table 36.8 and in arithmetic form in the next column. Two sample numeric conversions are shown in the next two columns of Table 36.8. Table 36.8 deals only with terminating fractions, that is, the remaining fractional part vanishes after a finite number of steps. For a nonterminating case the procedure is continued until a sufficient number of digits have been obtained to give the desired accuracy. A nonterminating case is illustrated in Table 36.9. A set of digits, which repeat ad infinitum, are designated by an underscore, as shown in Table 36.9. ©2002 CRC Press LLC
TABLE 36.10 Conversions Between Systems Where One Base Is an Integer Power of the Other Base (a) Conversion from high base to lower base B2. C516 = 1011 0010 .1100 01012 62.758 = 110 010 .111 1012 (b) Conversion from lower base to high base 11 0010 0100.0001 1100 012 = 324.1C416 10 110 001.011111 012 = 261.3728
Conversion to base 2 from a base, which is an integer power of 2, can be most simply accomplished by independent conversion of each successive digit, as illustrated in Table 36.10(a). Inversely, conversion k from base 2 to a base 2 can be simply accomplished by grouping the bits into sets of k bits, each starting with the least significant bit for the integer portion and with the most significant bit for the fraction portion, as shown by the examples in Table 36.10(b).
36.7 Complements Each number system has two conventionally used complements:
radix complement of N = N
RC
= R –N
n
reduced radix complement of N = N
rC
= N
RC
–1
where R is the radix and n is the number of digits in the number N. These equations provide complements for numbers having the magnitude N. A positive number can be represented by a code in the two character machine language alphabet, 0 and 1, which is simply the positive number expressed in the base 2, that is, the code for the number is the number itself. A negative number requires that the sign be coded in the binary alphabet. This can be done by separately coding the sign and the magnitude or by coding the negative number as a single entity. Table 36.11 illustrates four different code types for negative numbers. Negative numbers can be represented in the sign magnitude form by using the leftmost digit as the code for the sign (0 for + and 1 for -) and the rest of the digits as the code for the magnitude. Complements and biasing provide the means for coding the negative number as a single entity instead of having a discrete separate coding for the sign. The use of complements provides for essentially equal ranges of values for both positive and negative numbers. The biased representation can also provide essentially equal ranges for positive and negative values by choosing the biasing value to be essentially half of the largest binary number that could be represented with the available number of digits. The bias code is obtained by subtracting the biasing value from the code considered as a positive number, as shown in the rightmost column of Table 36.11. Complements enable subtraction to be done by addition of the complement. If the result fits into the available field size the result is automatically correct. A diagnostic must be provided to show that the result is incorrect if overflow occurs, that is, the number does not fit in the available field. Table 36.12 illustrates arithmetic operations with and without complements. The two rightmost columns illustrate cases where the result overflows the 3-b field size for the magnitude. The overflow condition can be represented in terms of two carry parameters: • C0, the output carry from the leftmost digit position • C1, the output carry from the second leftmost digit position (the output carry from the magnitude field if sign magnitude representation is used) If both of these carries are coincident (i.e., have the same value) the result fits in the available field and, hence, is correct. If these two carries are not coincident, the result is incorrect. ©2002 CRC Press LLC
TABLE 36.11
Number Representations Signed Numbers Having the Specified Codes
Available Codes
Positive Numbers
Sign Magnitude
One’s Complement
Two’s Complement
111 bias
1111 1110 1101 1100 1011 1010 1001 1000 0111 0110 0101 0100 0011 0010 0001 0000
-111 -110 -101 -100 -011 -010 -001 -000 +111 +110 +101 +100 +011 +010 +001 +000
-000 -001 -010 -011 -100 -101 -110 -111 +111 +110 +101 +100 +011 +010 +001 +000
-001 -010 -011 -100 -101 -110 -111 -1000 +111 +110 +101 +100 +011 +010 +001 +000
+1000 +111 +110 +101 +100 +011 +010 +001 000 -001 -010 -011 -100 -101 -110 -111
1111 1110 1101 1100 1011 1010 1001 1000 0111 0110 0101 0100 0011 0010 0001 0000
TABLE 36.12
Comparison of Arithmetic With and Without Complements
Sample Illustrations Pencil and paper arithmetic (without complements)
Computer arithmetic with 2’s complement 4-binary digit working field (accommodates 3-b magnitude)
N = 7− 5 = 2 111 − 101 10
N = 5− 7 = −2
0111 +1011 10010
0101 +1001 1110
↓ Designates positive number
(−111) −(−101) −10
↓ Designates negative number
N = 5+ 7 = 12 101 +111 1100 0101 + 0111 1100 ↓ Designates negative number
N = −5 − 7 = − 12 (−101) + (−111) − 1100 1011 +1001 10100 ↓ Designates positive number
Result Veracity
+010 True
−010 True
−100 False
−100 False
Significant carries
C0 = 1 C1 = 1
C0 = 0 C1 = 0
C0 = 0 C1 = 1
C0 = 1 C1 = 0
Veracity condition or equivalently
C0 ≡ C1 C0 . C1 = 1
C0 ≡ C1 C0 . C1 = 1
C 0 ≡/ C 1 C0 . C1 = 0
C 0 ≡/ C 1 C0 . C1 = 0
36.8 Codes Various types of codes have been developed for serving different purposes. There are codes that enable characters in an alphabet to be individually expressed in terms of codes in a smaller alphabet. For example, the alphabet of decimal numeric symbols can be expressed in terms of the binary alphabet by the binarycoded decimal (BCD) or 8421 code shown in Table 36.13. The 8421 designation represents the weight given to each of the binary digits in the coding process. There are codes that facilitate doing arithmetic. The 2421 code can also be used to represent the decimal numeric symbols. The 2421 code has the advantage that the code for the reduced radix complement is ©2002 CRC Press LLC
TABLE 36.13
Sample Codes Parity
Gray
Decimal Digits
BCD 8421
2421
2-outof-5
Even
Odd
1-bit
2-bit
3-bit
0 1 2 3 4 5 6 7 8 9
0000 0001 0010 0011 0100 0101 0110 0111 1000 1001
0000 0001 0010 0011 0100 1011 1100 1101 1110 1111
00011 00101 00110 01001 01010 01100 10001 10010 10100 11000
0000 0 0001 1 0010 1 0011 0 0100 1 0101 0 0100 1 0111 1 1000 1 1001 0
0000 1 0001 0 0010 0 0011 1 0100 0 0101 1 0110 0 0111 0 1000 0 1001 1
0 1
00 01 11 10
000 001 011 010 110 111 101 100
000
001
010
011
100
101
110
111
2
3
4
5
6
7
SEGMENT
0
1
INSULATOR CONDUCTOR
x2 x1 x0 0 0 0 1
(a)
000
001
011
1 1 0 0
010
1 0 0 0
SEGMENT INDICATED AS INDICATOR MOVES FROM SEG-3 TO SEG-4 3 2 GROSS ERROR (x0 misalignment) 0 GROSS ERROR (x2 misalignment) 4
110
111
101
100
4
5
6
7
SEGMENT
0
1
2
INSULATOR CONDUCTOR
(b)
3
x2 x1 x0 0 0 1 1
1 1 1 1
0 0 0 0
SEGMENT INDICATED AS INDICATOR MOVES FROM SEG-3 TO SEG-4 3 3 4 4
FIGURE 36.1 Eight-segment position sensor with slightly misaligned contacts: (a) binary code physical configuration, (b) Gray code physical configuration.
the same as the reduced radix complement of the code, and this is not true of the BCD code. Thus, the 2421 code facilitates arithmetic with multiple individually coded digit numbers. There are codes designed to detect errors that may occur in storage or transmission. Examples are the even and odd parity codes and the 2-out-of-5 code shown in Table 36.13. The 2-out-of-5 error detection code is such that each decimal value has exactly two high digit values. Parity code attaches an extra bit having a value such that the total number of high bits is odd if odd parity is used, and the total number of high bits is even if even parity is used. An even number of bit errors are not detectable by a single bit parity code. Hence, single bit parity codes are adequate only for sufficiently low bit error rates. Including a sufficient number of parity bits enables the detection and correction of all errors. There are codes designed to prevent measurement misrepresentation due to small errors in sensor alignment. Gray codes are used for this purpose. A Gray code is one in which the codes for physically adjacent positions are also logically adjacent, that is, they differ in only one binary digit. Gray codes can be generated for any number of digits by reflecting the Gray code for the case with one less digit, as shown in Table 36.13, for the case of 1, 2, and 3-bit codes. The advantage of a Gray scale coded lineal position sensor is illustrated in Fig. 36.1 for the eight-segment case.
©2002 CRC Press LLC
36.9 Boolean Algebra Boolean algebra provides a means to analyze and design binary systems and is based on the seven postulates given in Table 36.14. All other Boolean relationships are derived from these seven postulates. Expressed in graphical form, called Venn diagrams, the postulates appear more natural and logical. This benefit results from the two-dimensional pictorial representation freeing the expressions from the onedimensional constraints imposed by lineal language format. The OR and AND operations are normally designated by the arithmetic operator symbols + and ◊ and referred to as sum and product operators in basic digital logic literature. However, in digital systems that perform arithmetic operations this notation is ambiguous and the symbols for OR and L for AND eliminates the ambiguity between arithmetic and boolean operators. Understanding the conceptual meaning of these boolean operations is probably best provided by set theory, which uses the union operator for OR and the intersection operator for AND. An element in a set that is the union of sets is a member of one set OR another of the sets in the union. An element in a set that is the intersection of sets is a member of one set AND a member of the other set in the intersection. A set of theorems derived from the postulates facilitates further developments. The theorms are summarized in Table 36.15. Use of the postulates is illustrated by the proof of a theorem in Fig. 36.2. TABLE 36.14
Boolean Postulates Forms
1
Name
Meaning ∃ a set {K } = {a, b, . . .} of two or more elements and two binary operators 像{K} = {a, b,a + b, a · b, . . .}
Definition
2
Substitution Law
expression1 = expression2 If one replaced by the other does not alter the value
3
Identity Element Commutativity Associativity Distributivity Complement
∃ identity elements for each operator For every a and b in K For every a, b, and c in K For every a, b, and c in K For every a in K ∃ a complement in K 像
4 5 6 7
TABLE 36.15
(a)
(b)
OR
AND
+
V
Postulate
傼
傽
a + 0= a
a 1=a
a a a a
+ + + +
b = b+a (b + c ) = (a + b) + c (b · c ) = (a + b) · (a + c ) a- = 1
a b = b a a · (b · c ) = (a · b) · c a · (b + c ) = (a · b) + (a · c) a a- = 0
Boolean Theorems Forms
Theorem 8 9 10 11 12 13 14 15 16
(a) Idempotency Complement Theorem Absorption Extra Element Elimination De Morgan’s Theorem Concensus Complement Theorem 2 Concensus 2 Concensus 3
©2002 CRC Press LLC
(b)
a+a=a a+1=1
a◊a=a a◊0=0
a + ab = a a+ ab=a+b
a(a + b) = a a (a + b) = ab
a+ b = a ◊ b ab + a c + bc = ab + a c ab + a b = a
ab = a + b (a + b) (a + c)(b + c) = (a + b) (a + c) (a + b)(a + b) = a
ab + a b c = ab + ac ab + a c = (a + c) (a + b)
(a + b)(a + b + c) = (a + b)(a + c) (a + b) (a + c) = ac + a b
TABLE 36.16 Number of Different Boolean Functions Variables n
Arguments n 2
Functions n 2 2
0 1 2 3 4 5
1 2 4 8 16 32
2 4 16 256 65,536 4,194,304
‘
‘
1) 2) 3) 4) 5) 6)
FIGURE 36.2
x+x=x+x = (x + x).1 = (x + x).(x + x) = x + x .x =x+0 =x
IDENTITY P3b IDENTITY ELEMENT EXISTENCE P7a COMPLEMENT EXISTENCE P6a DISTRIBUTIVITY P7b COMPLEMENT EXISTENCE P3a IDENTITY ELEMENT EXISTENCE
Proof of Theorem 8: Idempotency (a): x + x = x.
(a)
(b)
f (A, B, C ) = AB + AC + AC
f (0, 0, 1) = 0.0 + 0.1 + 0.1 = 0.0 + 0.0 + 1.1 =0+0+1 =1
(c)
A 0 0 0 0 1 1 1 1
B 0 0 1 1 0 0 1 1
C f (A, B, C) 0 0 1 1 0 0 1 1 1 0 0 1 1 0 1 1
FIGURE 36.3 Example of forms for defining boolean functions: (a) boolean expression definition, (b) boolean expression evaluation, (c) truth table definition.
36.10 Boolean Functions Boolean functions can be defined and represented in terms of boolean expressions and in terms of truth tables as illustrated in Fig. 36.3(a,c). Each form can be converted into the other form. The function values needed for the construction of the truth table can be obtained by evaluating the function as illustrated in Fig. 36.3(b). The reverse conversion will be illustrated subsequently. For a given number of variables there are a finite number of boolean functions. Since each boolean n variable can have two values, 0 or 1, a set of n variables has 2 different values. A boolean function has a specific value for each of the possible values that the independent variables can have. Since there are n 2 two possible values for each value of the independent variables there are 2 different boolean functions of n variables. The number of functions increases very rapidly with the number of independent variables, as shown in Table 36.16. The 16 different boolean functions of the two independent variables are defined in algebraic form in Table 36.17 and in truth table form in Table 36.18.
36.11 Switching Circuits Boolean functions can be performed by digital circuits. Circuits that perform complicated boolean functions can be subdivided into simpler circuits that perform simpler boolean functions. The circuits that perform the simplest boolean functions are taken as basic elements, called gates and are represented ©2002 CRC Press LLC
TABLE 36.17
Functions of Two Variables Defined as Boolean Expressions
Name
Expression
0 1 2 3 4
ALWAYS NEVER 1st Var 2nd Var NOT 1st Var
5
NOT 2nd Var
Circuit Representation
1 0 a b ab
1 0 a b a
6
MIN-0/NOR
a- b = a ↓ b
7
MIN-1
a b
8
MIN-2
a- b
9
MIN-3/AND
a b
10
MAX-0/OR
a∨ b
11
MAX-1
a∨ b
12
MAX-2
a- ∨ b
13
MAX-3/NAND
14
EXOR
a- ∨ b = a ↑ b A 丣 b = a b ∨ a- b
15
COIN
aΘb = a 丣 b
1 0 a b ab
b a b a b a b a b a b a b a b a b a b a b
a b
a b
V
V
V
V
V
V
TABLE 36.18 Truth Tables for Two Variable Functions a
b
NOR m0
m1
m2
AND m3
0 0 1 1
0 1 0 1
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
OR M0 M1 0 1 1 1
1 0 1 1
M2 1 1 0 1
NAND M3 XOR 1 1 1 0
0 1 1 0
COIN
a
b
a
b
LO
HI
1 0 0 1
0 0 1 1
0 1 0 1
1 1 0 0
1 0 1 0
0 0 0 0
1 1 1 1
by specialized symbols. The circuit symbols for the gates that perform functions of two independent variables are shown in Table 36.17. The gates are identified by the adjective representing the operation they perform. The most common gates are the AND, OR, NAND, NOR, XOR, and COIN gates. The only nontrivial single input gate is the invertor or NOT gate. Gates are the basic elements from which more complicated digital logic circuits are constructed. A logic circuit whose steady-state outputs depend only on the present steady-state inputs (and not on any prior inputs) is called a combinational logic circuit. To depend on previous inputs would require memory, thus a combinational logic circuit has no memory elements. Boolean algebra allows any combinational logic circuit to be constructed soley with AND, OR, and NOT gates. Any combinational logic circuit may also be constructed solely with NAND gates, as well as solely with NOR gates.
36.12 Expansion Forms The sum of products (SP) is a basic form in which all boolean functions can be expressed. The product of sums (PS) is another basic form in which all boolean functions can be expressed. An illustrative example is given in Figs. 36.4(b,c) for the example given in Fig. 36.4(a). ©2002 CRC Press LLC
TRUTH TABLE
f (A, B, C) = A(B + C ) + (A + B)C
(a)
A 0 0 0 0 1 1 1 1
B 0 0 1 1 0 0 1 1
C f(A, B, C) 0 0 1 1 0 0 1 1 1 0 0 1 1 0 1 1
P6b → f (A, B, C) = AB + AC + AC + BC T13a → f (A, B, C) = AB + AC + AC (b)
(c) P7a → f (A, B, C) = AB(C + C) + A(B + B)C + A(B + B)C P6b → f (A, B, C) = ABC + ABC + ABC + ABC + ABC + ABC
(d)
P7b → f (A, B, C) = A(A + B + C) + (A + B + C)C P6b → f (A, B, C) = (A +C)(A + B + C)
P7b → f (A, B, C) = (A + C + BB)(A + B + C) P6a → f (A, B, C) = (A + B + C)(A + B + C)(A + B + C) (e)
T8a → f (A, B, C) = ABC + ABC + ABC + ABC + ABC
f (A, B, C) = m111 + m110 + m100 + m011 + m001
f(A, B, C) = M000 + M010 + M101
f (A, B, C) = ∑m(1, 3, 4, 6, 7) (f)
f(A, B, C) = Π(0, 2, 5) (g)
FIGURE 36.4 Examples of converting boolean functions between forms: (a) given example, (b) conversion to SP form, (c) conversion to PS form, (d) conversion to canonical SP form, (e) conversion to canonical PS form, (f) minterm notation/canoncial SP form, (g) maxterm notation/canonical PS form.
Minterms are a special set of functions, none of which can be expressed in terms of the others. Each minterm has each of the variables in the complemented or the uncomplemented form ANDed together. An SP expansion in which only minterms appear is a canonical SP expansion. Figure 36.4(d) shows the development of the canonical SP expansion for the previous example. The canonical SP expansion may also be simply expressed by enumerating the minterms as shown in Fig. 36.4(f). Comparison of the truth table with the minterm expansion shows that each function value of 1 represents a minterm of the function and vice versa. All other function values are 0. Maxterms are a special set of functions, none of which can be expressed in terms of the others. Each maxterm has each of the variables in the complemented or the uncomplemented form ORed together. A PS expansion in which only maxterms appear is a canonical PS expansion. Figure 36.4(e) shows the development of the canonical PS expansion for the previous example. The canonical PS expansion may also be simply expressed by enumerating the maxterms as shown in Fig. 36.4(g). Comparison of the truth table with the maxterm expansion shows that each function value of 0 represents a maxterm of the function and vice versa. All other function values are 1.
36.13 Realization The different types of boolean expansions provide different circuits for implementing the generation of the function. A function expressed in the SP form is directly realized as an AND–OR realization, as illustrated in Fig. 36.5(a). A function expressed in the PS form is directly realized as an OR–AND realization as illustrated in Fig. 36.5(b). By using involution and deMorgan’s theorm the SP expansion can be expressed in terms of NAND–NAND and the PS expansion can be expressed in terms of NOR–NOR, as shown in Figs. 36.5(c,d). The variable inversions specified in the inputs can be supplied by either NAND or NOR gates, as shown in Figs. 36.5(g,h), which then provide the NAND–NAND–NAND and the NOR–NOR–NOR circuits shown in Figs. 36.5(i,j).
©2002 CRC Press LLC
a
(a)
(b)
c b c d a
a b
f
b c d
d INVOLUTION GIVES
(c)
(d)
INVOLUTION GIVES f(a, b, c, d) = (a + b)(a + c)(b + c + d) DEMORGAN'S THEOREM GIVES f(a, b, c, d) = (a + b) + (a + c) + (b + c + d) OR IN TERMS OF THE NOR OPERATOR f(a, b, c, d) = (a↓b)↓(a↓c)↓(b↓c↓d)
f(a, b, c, d) = ac + bcd + ad DEMORGAN'S THEOREM GIVES f(a, b, c, d) = ac . bcd . ad OR IN TERMS OF THE NAND OPERATOR f(a, b, c, d) = (a↑c )↑(b↑c↑d )↑(a↑d ) a
(e)
f
a c
(f)
c b c d a
a b
f
f
a c b c d
d
(g)
aa=a
a
a
(h)
a
a
a
(i)
(j)
a+a=a a
a b
c b c d a
a
f
f
a c b c d
d
FIGURE 36.5 Examples of realizations based on various expansion forms: (a) AND-OR realization of f(a, b, c, d) = a c + bcd + ad, (b) OR-AND realization of f(a, b, c, d) = (a + b)(a + c)(b + c + d), (c) AND-OR conversion to NANDNAND, (d) OR-AND conversion to NOR-NOR, (e) NAND-NAND realization of f(a, b, c, d) = a c + bcd + ad, (f) NOR-NOR realization of f(a, b, c, d) = (a + b)(a + c)(b + c + d), (g) NAND gate realization of NOT gate, (h) NOR gate realization of NOT gate, (i) NAND-NAND-NAND realization of f(a, b, c, d) = a c + bcd + ad, (j) NOR-NORNOR realization of f(a, b, c, d) = (a + b)(a + c)(b + c + d). a
a t
b
(a)
FIGURE 36.6
aΛb
t
b
t
t
t
t
(b)
aΛb
t
t
Timing diagrams for the AND gate circuit: (a) microtiming diagram, (b) macrotiming diagram.
36.14 Timing Diagrams Timing diagrams are of two major types. A microtiming diagram has a time scale sufficiently expanded in space to display clearly the gate delay, such as shown in Fig. 36.6(a) for an AND gate. A macrotiming diagram has a time scale sufficiently contracted in space so that the gate delay is not noticeable, as shown in Fig. 36.6(b) for an AND gate.
©2002 CRC Press LLC
a t
a t b b
t
t
t1 + t2
x=avb x=avb z
a b (a)
2 t1
x
t2
3
z=avx
t3 (b)
x=avx
t
t
t
(c)
t3
t3 t1 + t2
t HAZARD
FIGURE 36.7 Example of a hazard (output variation) caused by unequal delay paths: (a) circuit for illustrating a hazard, (b) ideal case, no delays, τ1 = τ2 = τ3 = 0, no hazard introduced; (c) signal paths with different delays, τ1 + τ2 + τ3 > τ3, hazard introduced.
The advatange of the macrotiming diagram is that larger time intervals can be represented in a given spatial size and they can be more quickly developed. The disadvantage is that they do not display the information required for speed limitation considerations.
36.15 Hazards The variation in signal delays through different circuit elements in different paths may cause the output signal to fluctuate from that predicted by non-time-dependent truth tables for the elements. This fluctuation can cause an undesired result and, hence, is a hazard. This is illustrated in Fig. 36.7.
36.16 K-Map Formats In a truth table the values of a boolean function are displayed in a one-dimensional array. A K-map contains the same information arranged in as many effective dimensions as there are independent variables in the function. The special form of the representation provides a simple procedure for minimizing the expression and, hence, the number of components required for realizing the function in a given form. The function is represented in a space that in a Venn diagram is called the universal set. The K-map is a special form of Venn diagram. The space is divided into two halves for each of the independent variables. The division of the space into halves is different for each independent variable. For one independent variable the space is divided into two different identical size regions, each of which represents n a minterm of the function. For n independent variables the space is divided into 2 different identical n size regions, one for each of the 2 minterms of the function. This and associated considerations are illustrated in a sequence of figures from Figs. 36.8–36.15. Figure 36.8 shows one-variable K-map formats. Figure 36.8(a) shows the space divided into two equal areas, one for each of the two minterms possible for a single variable. The squares could also be identified by the variable placed external to the space to designate the region that is the domain of the variable, with the unlabeled space being the domain of the complement of the variable, as shown in Fig. 36.8(b). Another way of identifying the regions is by means of the minterm number the area is for, as shown in Fig. 36.8(c). Still another way is to place the values the variable can have as a scale alongside the space, as shown in Fig. 36.8(d). The composite labeling, shown in Fig. 36.8(e), appears redundant but is often useful because of the different modes of thought used with the different label types. Putting the actual minterm expressions inside each square is too cluttering and is rarely used except as an aid in teaching the theory of K-maps. The use of minterm numbers, although widely used, also clutters up the diagram, and the methodology presented here makes their use superfluous once the concepts are understood.
©2002 CRC Press LLC
a a
a
(a)
a
a
1
0
a 1
0 0
(d)
1
0
(c)
(b)
1
(e)
FIGURE 36.8 One vartiable K-map forms: (a) internal minterm labels, (b) external domain label, (c) internal minterm number labels, (d) external scale label, (e) composite labeling. a b (a)
FIGURE 36.9
a
ab
ab
ab
ab
b
(b)
(c)
Two-variable K-map format construction: (a) domains for a, (b) domains for b, composite. b ab
ab
ab
ab
(a)
a (b)
a
(e)
b
00
01
10
11
(c) 0
1
a
1
2
3
(d)
b
0
0
1
a1
(f)
0
b 1
0 0
1
2
3
FIGURE 36.10 Two variable K-map formats: (a) minterm labels, (b) domain labels, (c) minterm binary labels, (d) minterm decimal labels, (e) scale labels, (f) composite labeling.
a
a
FIGURE 36.11 composite.
b
b
b
(b)
(a)
ab
ab
ab
Two-variable K-map alternate format construction: (a) domains for a, (b) domains for b, (c)
a
ab ab (a)
FIGURE 36.12
ab
(c)
ab
ab
00 0
ab (b)
01 1
11 3
10 2
b
Two-variable K-map alternate format: (a) minterm labels, (b) composite labeling.
The organization of a two-variable K-map format is illustrated in Fig. 36.9. The space is subdivided vertically into two domains for the variable a and its complement, and is subdivided horizontally for the variable b and its complement, as shown in Figs. 36.9(a,b). The composite subdivisions for both variables together with the expressions for the two-variable minterms are shown in Fig. 36.9(c). The different formats for identifying the areas for the two-variable case are shown in Fig. 36.10. Of particular interest is the comparison of the binary and decimal minterm number labels. The binary minterm number is simply the catenation of the vertical and horizontal scale number for the position. It is the use of this identity that makes internal labels in the square totally superfluous. ©2002 CRC Press LLC
b b
a
a c
(a)
(b)
c
c
b
a (c)
c
FIGURE 36.13 Three-variable K-map formats: (a) three-dimensional, (b) three-dimensional left and right halves, (c) two-dimensional.
a
bc
11
01
00
10
0
abc abc abc abc a1 abc abc abc abc
FIGURE 36.14
c
(b)
(a)
Three variable two-dimensional K-map formats: (a) minterm labels, (b) composite scale labels.
c cde d ab 000 001 011 010 2 3 1 0 00 b
a
0 (a)
0
1
2
3
a
a1
9
11
10
12
13
15
14
11 24
25
27
26
28
29
31
30
10 16
17
19
18
20
21
23
22
01
b 1
0
8
d 100 101 111 110 7 5 4 6
(d)
e
b
e d
a
0 (b)
a1
def e 000 001 011 010 abc 0 1 3 2 000
b
bc 0
1
11 3
4
5
7
01
00
10 2 6
001 011
c cd
1
4
5
7
6
11 12
13
15
14
10 8
9
11
10
01
(c)
010
0
00
a
b
c 11 3
ab
01
00
10 2 100
d
101
a
b
111
b 110 (e)
e 100 101 111 110 6 4 5 7
8
9
11
10
12
13
15
14
24
25
27
26
28
29
31
30
16
17
19
18
20
21
23
22
32
33
35
34
36
37
39
38
40
41
43
42
44
45
47
46
56
57
59
58
60
61
63
62
48
49
51
50
52
53
55
54
f
c
c
f
FIGURE 36.15 Formats for K-maps for functions of 2–6 independent variables with conformal coordinate scales: (a) two-variable case f(a, b), three-variable case f (a, b, c); (c) four-variable case f (a, b, c, d); (d) five-variable case f(a, b, c, d, e); (e) six-variable case f(a, b, c, d, e, f ).
©2002 CRC Press LLC
An alternate way of subdividing the space for the two-variable case is illustrated in Fig. 36.11 and labeling alternatives in Fig. 36.12. The configuration employed in Fig. 36.9 uses two dimensions for two variables, whereas the configuration employed in Fig. 36.11 uses one-dimension for two variables. The two-dimensional configuration appears to be more logical and is more convenient to use than the one-dimensional configuration for the case of two variables. For the case of a larger number of variables the configuration in Fig. 36.12 offers special advantages, as will be shown. The organization of three-variable K-map formats is illustrated in Fig. 36.13. It is logical to introduce an additional space dimension for each additional independent variable as depicted in Fig. 36.13(a); however, the excessive inconvenience of working with such formats makes them impractical. To make the mapping process practical it must be laid out in two dimensions. This can be done in two ways. One way is to take the individual slices of the three-dimensional configuration and place them adjacent to each other as illustrated in Fig. 36.13(b). Another way is to use the one-dimensional form for two variables, illustrated in Fig. 36.12, as shown in Fig. 36.13(c). For the case of three and four independent variables the format given in Fig. 36.13(c) is more convenient and for further independent variables that of Fig. 36.13(b) is convenient. These are all illustrated in Fig. 36.15. Labeling for three independent variables is given in Fig. 36.14. The independent boolean variables in conformal coordinate scales have exactly the same order as in the boolean function argument list, as depicted in Fig. 36.15. Conformal assignment of the independent variables to the K-map coordinate scales makes the catenated position coordinates for a minterm (or maxterm) identical to the minterm (or max-term) number. Utilization of this identity eliminates the need for the placement of minterm identification numbers in each square or for a separate position identification table. This significantly decreases the time required to construct Kmaps and makes their construction less error prone. The minterm number, given by the catenation of the vertical and horizontal coordinate numbers, is obvious if the binary or octal number system is used.
36.17 K-Maps and Minimization A function is mapped into the K-map format by entering the value for each of the minterms in the space for that minterm. The function values can be obtained in various ways such as from the truth table for the function, the Boolean expression for the function, or from other means by which the function may be defined. An example is given for the truth table given in Fig. 36.4(a), which is repeated here in Fig. 36.16(a) and whose K-map is shown in various forms in Figs. 36.16(b–d). The function can also be mapped into a conformally scaled K-map directly from the canonical expansion, this being essentially the same process as entering the minterms (or maxterms) from the truth table. The function may also be directly mapped from any PS or SP expansion form. Another means of obtaining the K-map is to formulate it as a function table, as illustrated for the multiplication of 1- and 2-b numbers in Fig. 36.17.
(a)
A 0 0 0 0 1 1 1 1
B 0 0 1 1 0 0 1 1
C F(A, B, C) 0 0 1 1 0 0 1 1 1 0 0 1 1 0 1 1
BC 00 A
(b)
BC 00 A
B 01
11
10
1
0
0
1
1
A 1
0
0
1
A 1
1
0
C
(c)
BC 00 A
B 01
11
1
1 1
1
C
10
0 1
A 1 (d)
B 01
11
0
10 0
0
C
FIGURE 36.16 Three-variable K-map example: (a) truth table, (b) K-map with all values shown, (c) minterm K-map, (d) maxterm K-map.
©2002 CRC Press LLC
y1y0 x1x0 00
0
y 1
0
0
0
x 1
0
1
y x
(a)
y 1y 0 x1x0 00
01
11
10
x 1x 0
0000 0000 0000 0000
01 0000 0001 0011 0010
0000 0010 0110 0100
x1 10
11
(c)
y0 y1y0 x1x0 00
10
11
10
00
00
1
1
x1 10 (d)
1
y0
y1 01
11
01
1
1
11
1
1
x0
x0 11
1
1
11
1
1
x1 10
1
(e)
10
00
01
01
10
y0 y1y0 00 x 1x 0
y1 01
y1
x0
x1 (b)
11
01
x0
11
10
01
00
11 0000 0011 1001 0110
y1 01
y1y0 00
y1 00
x0
1
x1 10
1
y0
(f)
y0
FIGURE 36.17 Examples of K-maps formulated as function tables: (a) K-map for the product of two 1-b numbers P = x * y; (b) composite K-map for the product of two 2-b numbers, P3 P2 P1 P0 = x1 x0 * y1 y0; (c) K-map for the digit P3 of the product of two 2-b numbers; (d) K-map for the digit P2 of the product of two 2-b numbers; (e) K-map for the digit P1 of the product of two 2-b numbers; (f) K-map for the digit P0 of the product of two 2-b numbers.
36.18 Minimization with K-Maps The key feature of K-maps that renders them convenient for minimization is that minterms, which are spatially adjacent in the horizontal or vertical directions, are logically adjacent. Logically adjacent minterms are identical in all variables except one. This allows the two minterms to be combined into a single terms with one less variable. This is illustrated in Fig. 36.18. Two adjacent minterms combine into a firstorder implicant. A first-order implicant is the combination of all of the independent variables but one. In this example, the first-order implicant expressed in terms of minterms contains eight literals but the minimized expression contains only three literals. The circuit realization for the OR combination of the two minterms has two AND gates and one OR gate, whereas the realization for the equivalent implicant requires only a single AND gate. The combination of minterms into first-order implicants can be represented more compactly by using the single symbol minterm notation with the subscript that identifies the particular minterm expressed in binary, as illustrated in Fig. 36.18(d). Two adjacent first-order implicants can be combined into a second-order implicant as illustrated in Fig. 36.19. A second-order implicant contains all of the independent variables except two. In general, an nthn order implicant contains all of the variables except n and requires an appropriately grouped set of 2 minterms. Minterms that are at opposite edges of the same row or column are logically adjacent since they differ in only one variable. If the plane space is rolled into a cylinder with opposite edges touching, then the logically adjacent edge pairs become physically adjacent. For larger numbers of variables using K-maps with parallel sheets, the corresponding positions on different sheets are logically adjacent. If the sheets are considered as overlaid, the corresponding squares are physcally adjacent. The minimized expression is obtained by covering all of the minterms with the fewest number of largest possible implicants. A minterm is a zero-order implicant. Figure 36.20 illustrates a variety of examples. A don’t care is a value that never occurs or if it does occur it is not used, and hence, it does not matter what its value is. Don’t cares are also included to illustrate that they can be used to simplify expressions by taking their values to maximize the order of the implicants. Maxterm K-maps can also be utilized to obtain minimized expressions by combining maxterms into higher order implicants, as illustrated for the example in Fig. 36.21. ©2002 CRC Press LLC
y1y0 00
y1 01
x1x0
11
(b) F (x1, x0, y1, y0) = x1x0y1y0 + x1x0y1y0
10
00 FACTORING GIVES F(x1, x0, y1, y0) = (x1 + x1)x0y1y0 HENCE F(x1, x0, y1, y0) = x0y1y0
1
01
(c)
x0 1
11 x1 10 (a)
F = m0111 + m1111 (d) F = I−111
y0
FIGURE 36.18 Example of minimization with a K-map: (a) sample K-map, (b) expression in minterms of function definition in (a), (c) simplification of the expression in (b), (d) simplification of the expression in (b) using single symbol minterm and implicant notation.
y1y0 00
y1
x1x0 m0101
00
I−101
01
01
11
1
1
10
m0111 I−111 x0
m1101
1
11 x1 10
1
m1111
y0
FIGURE 36.19
F = I−1−1
Example of minimization with K-map.
def abc
e 000 001 011 010
0 1
b
1
1
d e 100 101 111 110 1
d
1
d
abde 1
3
1
1
2
1
1
1
1
1
1
abcf c
bef
4 5
c
a b
7 6
f f F = bef + abcf + abde
FIGURE 36.20
Example of minimization with six-variable K-map.
BC A 0
B A
1
01
00 0
0
0
0
11
A+C
F = B (A + C )
Three-variable maxterm K-map example.
©2002 CRC Press LLC
10 0
c
FIGURE 36.21
B
36.19 Quine–McCluskey Tabular Minimization The K-map minimization method is too cumbersome for more than six variables and does not readily lend itself to computerization. A tabular method, which can be implemented for any number of variables and which lends itself to computer program implementation, consists of the following steps: 1. List all the minterms in the boolean function (with their binary code) organized into groups having the same number of 1s. The groups must be listed in consecutive order of the number of 1s. 2. Construct the list of first-order implicants. Use flags to indicate which minterms, don’t cares, or implicants go with which functions. (Only minterms in adjacent groups have the possibility of being adjacent and, hence, this ordering method significantly reduces the labor of compiling the implicants.) 3. Construct the list of second-order implicants and the lists of all higher order implicants, until no higher order implicants can be constructed. 4. Construct the prime implicant chart. The prime implicant chart shows what prime implicants cover which minterms. 5. Select the minimum number of largest prime implicants that cover the minterms. This procedure is illustrated in Fig. 36.22 for the simultaneous minimization of two boolean functions. GIVEN F(A, B, C, D) = Σm(2, 6, 7, 8) + d(0, 4, 5, 12, 13) and G(A, B, C, D) = Σm(2, 4, 5) + d(6, 7, 8, 10) ZERO-ORDER IMPLICANT LIST.
FIRST-ORDER IMPLICANT LIST.
NO. OF 1s
MIN-TERM
0
0
0000
F-
√
2
0010
FG
√
4
0100
FG
√
8
1000
FG
√
5
0101
FG
√
1
2
3
CODE ABCD FLAGS PI
6
0110
FG
√
10
1010
-G
√
12
1100
F-
√
7
0111
FG
√
13
1101
F-
√
IMPLICANTS CODE ABCD FLAGS F00-0 0, 2
*
3 4
**
5
FLAGS
PI
√
0, 2, 4, 6
0-0
F-
1
0, 4, 8, 12 4, 5, 6, 7
-00 01-
FFG
2 3
4, 5, 12, 13
-10-
F-
4
0-00
F-
√
-000
F-
√
2, 6 2, 10
0-10
FG
-010
-G
5 6
4, 5 4, 6
010-
FG
√
01-0
FG
√
4, 12 8, 10 8, 12
-100
F-
√
10-0
-G
7
1-00
F-
√
5, 7
01-1
FG
√
5, 13 6, 7 12, 13
-101
F-
√
011-
FG
√
110-
F-
√
F G m PI 2 6 7 8 2 4 5 1 2
IMPLICANTS CODE ABCD
0, 4 0, 8
PRIME IMPLICANT CHART
*
SECOND-ORDER IMPLICANT LIST PI
MINIMUM SP EXPANSIONS
F = PI2 + PI3 + PI5 = CD + AB + ACD
G = PI3 + PI5 = AB + ACD
6 7
FIGURE 36.22
Illustration of the Quine–McClusky method of simultaneous minimization.
Defining Terms Base: The number of different values a single digit may have. The number a digit must be multiplied by to move it one digit to the left, also called the radix. Binary-coded decimal (BCD): Each decimal digit is expressed individually in binary form. Catenation: Symbols strung together to form a larger sequence, as the characters in a word and the digits in a number. Code: The representation in one alphabet of something in another alphabet. Complement: The quantity obtained by subtracting a number from the largest quantity that can be expressed in the specified number of digits in a given number system. ©2002 CRC Press LLC
Conformal: The same arrangment of a set of quantities in two different contexts. Digit: A character that represents quantitative information. Don’t care: A value that can be represented either as a minterm or a maxterm. Gray code: A set of codes having the property of logical adjacency. Implicant: A first-order implicant is a pair of logically adjacent minterms. A second-order implicant is a set of logically adjacent first-order implicants and so on. Integer: Any number that can be expressed solely in terms of digits. Fraction: Any number divided by a larger number. K-map: An arrangment of space into equal size units, each of which represents a minterm (or maxterm) such that each physically adjacent square is also logically adjacent. Logically adjacent: Any two codes having the same number of digits for which they differ in the value of only one of the digits. Macrotiming diagram: A graphical display showing how the waveforms vary with time, but with a time scale that does not have sufficient resolution to display the delays introduced by the individual basic elements of the digital circuit. Maxterm: A function of a set of boolean variables that has a low value for only one combination of variable values and has a high value for all other combinations of the variable values. Microtiming diagram: A graphical display showing how the waveforms vary with time, but with a time scale that has sufficient resolution to display clearly the delays introduced by the individual basic elements of the digital circuit. Minterm: A function of a set of boolean variables that has a high value for only one combination of variable values and has a low value for all other combinations of the variable values. Overflow: That part of a numerical operation result that does not fit into the allocated field. Parity bit: An extra bit catenated to a code and given a value such that the total number of high bits is even for even parity and odd for odd parity. Product of sums (PS): The AND combination of terms, which are OR combinations of boolean variables. Prime implicant: An implicant that is not part of a larger implicant. Radix: The number of different values that a digit can have in a number system. Reduced radix: The largest value a digit can have in a number system. It is one less than the radix. Real number: A number that has a fractional part and an integer part. Realization: A circuit that can produce the value of a function. Sum of products (SP): The OR combination of terms, which are AND combinations of Boolean variables. Truth table: The table of values that a boolean function can have for which the independent variables considered as a multidigit number are arranged in consecutive order.
References Hayes, J.P. 1993. Introduction of Digital Logic Design. Addison-Wesley, Reading, MA. Humphrey, W.S., Jr. 1958. Switching Circuits with Computer Applications. McGraw-Hill, New York. Hill and Peterson. 1974. Introduction to Switching Theory and Logical Design, 2nd ed. Wiley, New York. Johnson and Karim. 1987. Digital Design a Pragmatic Approach. Prindle, Weber and Schmidt, Boston. Karnaugh, M. 1953. The map method for synthesis of combinational logic circuits. AIEE Trans. Comm. Elec. 72 (Nov.): 593–599. Mano, M.M. 1991. Digital Design. Prentice-Hall, Englewood Cliffs, NJ. McClusky, E.J. 1986. Logic Design Principles. Prentice-Hall, Englewood Cliffs, NJ. Mowle, F.J. 1976. A Systematic Approach to Digital Logic Design. Addison-Wesley, Reading, MA. Nagle, Carrol, and Irwin. 1975. An Introduction to Computer Logic, 2nd ed. Prentice-Hall, Englewood Cliffs, NJ. Pappas, N.L. 1994. Digital Design West, St. Paul, MN. Roth, C.H., Jr. 1985. Fundamentals of Logic Design, 3rd ed. West, St. Paul, MN. Sandige, R.S. 1990. Modern Digital Design. McGraw-Hill, New York. ©2002 CRC Press LLC
Shaw, A.W. 1991. Logic Circuit Design. Saunders, Fort Worth, TX. Wakerly, 1990. Digital Design Principles and Practices. Prentice-Hall, Englewood Cliffs, NJ.
Further Information Further information on basic logic concepts and combinational logic design can be found in occasional articles in the following journals: Lecture Notes in Computer Science (annual) International Journal of Electronics (monthly) IEEE Transactions on Education (quarterly) IEEE Transactions on Computers (monthly) IEEE Transactions on Software Engineering (monthly) IEEE Transactions on Circuits and Systems 1. Fundamental Theory and Applications (monthly)
©2002 CRC Press LLC
37 System Interfaces 37.1
Background Terminology and Definitions • Serial vs. Parallel • Bit Rate vs. Baud Rate • Synchronous vs. Asynchronous • Data Flow-Control • Handshaking • Communication Protocol • Error Handling • Simplex, Half-Duplex, Full-Duplex • Unbalanced vs. Balanced Transmission • Point-to-Point vs. Multi-Point • Serial Asynchronous Communications • The Universal Asynchronous Receiver Transmitter (UART)
37.2
TIA/EIA Serial Interface Standards RS-232 Serial Interface • Functional Description of Selected Interchange Circuits • RS-422 and RS-485 Interfaces
37.3
M.J. Tordon The University of New South Wales
J. Katupitiya The University of New South Wales
IEEE 488—The General Purpose Interface Bus (GPIB) Introduction • GPIB Hardware • Controllers, Talkers, and Listeners • Interface Management Lines • Handshake Lines • Data Lines DIO1-DIO8 (8 lines) • Addressing of GPIB Devices
This chapter deals with asynchronous serial interfaces described by interface standards RS-232, RS-422, and RS-485 and with the general-purpose parallel interface bus described by IEEE-488 standard. The chapter also provides background information, terminology and parameters, which are important in the design of system interfaces for mechatronic systems.
37.1 Background Modern mechatronic systems comprise a number of subsystems, which rely heavily on digital data communications. Different levels of complexity of these systems means that the requirement for data communications range from a simple communication between two devices to systems with a large number of subsystems, where each subsystem communicates directly or indirectly with other subsystems using a communication network. Depending on the proximity of subsystems, different requirements are placed on data communication channels, the physical implementation of channels, and interfaces between these devices. Figure 37.1 shows a schematic diagram of a simple data communication system connecting two devices. A data source creates the data to be transmitted to the destination system and may convert the data into a specific form. The originating system usually does not create the data in a form suitable for transmission over transmission lines. This is left to the transmitter, which transforms the data into a signal suitable for transmission over a specific type of transmission line. The transmission line is generally implemented using electrical wiring but can involve a variety of physical medium including radio frequency, infrared, and sound signals. A transmission line provides a physical medium connecting the two systems. A receiver accepts the
©2002 CRC Press LLC
Data Source
FIGURE 37.1
Transmitter
Transmission Lines
Receiver
Data Destination
A schematic diagram of a simple data communication system.
signal and converts it to the data form suitable to be passed onto the destination system. A data destination processes the data in order to recover the original information. From the previous information, it follows that even in the case of a simple data communication system a number of subsystems is involved in the communication task.
Terminology and Definitions Interface: The common boundary between two subsystems is called an interface, and as can be seen in Fig. 37.1, a number of interfaces can be involved even in a simple communication system. Bit: The simplest form of data is one bit, which can take one of the two values 0 or 1, and hence is called binary data. All information in modern digital computers is stored in binary form. Byte: A fixed number of bits (usually 8), which can be treated by a computer as a unit. Character: Historically, the information is expressed in terms of characters. A character is a member of a character set. An example of a character set is the set of characters in the English language. Character code: Individual characters from the selected character set are encoded in digital computers as binary numbers. One of the most widely used character set codes is the American Standard Code for Information Interchange (ASCII).
Serial vs. Parallel The basic unit of information to be transferred between subsystems is usually a character. For short distances, multiple parallel lines can be used to carry out simultaneous transmission of all the bits of a character. For the transmission of data over long distances, the cost of multiple data lines is often prohibitive and it is normal to serialize the data so that it can be passed over a single data path as a stream of bits.
Bit Rate vs. Baud Rate The speed of data transmission is usually expressed as a number of data bits transmitted per second and is called an effective bit rate with a unit bps. Larger units like kbps (1,000 bps) and Mbps (1,000,000 bps) are commonly used. The baud rate is a signaling rate and is expressed as a number of times per second that the signal transmitted over a data transmission line changes state. For systems using only two states, the signaling bit rate is equivalent to the baud rate. Distinction should be made between the effective data transmission bit rate and the signaling bit rate. In asynchronous serial communications, the effective data transmission bit rate can be significantly lower than the signaling bit rate because of the inclusion of start, stop, and parity bits. To maximize the transmission speed over a serial line, modern communication systems use signals with more than two states, thus achieving higher signaling bit rates. For example, if the transmission signal uses 16 states, then the signaling bit rate is four times higher than the baud rate. The terms baud rate, signaling bit rate, and effective data transmission rate are often used interchangeably which leads to confusion.
Synchronous vs. Asynchronous For both parallel and serial interface, the problem of synchronization must be solved. The communication over a transmission line can be done either in synchronous or asynchronous communication mode. In synchronous communication mode, the transmission of data is synchronized with a clock; thus, the transmission is occurring at regular time intervals. Since the data transmission takes place at fixed times, the ©2002 CRC Press LLC
completion of data transfer does not have to be acknowledged. In asynchronous transmission mode, the two systems are using clocks, that are not synchronized and may run at frequencies slightly out of step. Thus, for asynchronous systems, data validation requires a separate scheme called handshaking.
Data Flow-Control Another problem in asynchronous communication systems is the speed of data processing. If one system is significantly slower in processing the data, a flow-control must be implemented to avoid data loss. Data flow-control may require additional handshaking. Similar problems may arise in multitasking systems in which, due to other tasks, the system is unable to handle incoming data during the period of high workload.
Handshaking In order to ensure efficient transmission of data without errors, the sending system will use a separate signal to indicate that valid data has been presented to the interface. Because the instant at which the receiving device can process the data is not known, the sending device must wait for an acknowledgment signal before presenting new data to the interface. The handshaking can be implemented in either hardware or software.
Communication Protocol Operation of a communication system is governed by a set of rules which must ensure reliable data transfer without errors and data loss. Such a set of rules is called a communication protocol.
Error Handling Data transmitted over a communication line are subjected to noise and can thus be corrupted. Since it is essential to maintain the integrity of data, a number of different schemes for error detection have been developed. The simplest remedy after error detection is retransmission of the corrupted data. More sophisticated communication protocols can involve complex error correction schemes implemented at protocol level.
Simplex, Half-Duplex, Full-Duplex In its simplest form, communication can be established with a single pair of wires. The data transmission mode, in which data can pass in one direction only, is called simplex or unidirectional channel. In most applications it is required that the communication takes place in both directions. If the cost of the data transmission line is high, it can be arranged that signals can pass in either direction over a single transmission line using additional circuitry on both ends of the transmission line but only in one direction at a time. This type of data communication mode is called half-duplex. Additional handshaking is required to implement the time sharing of the transmission line. If signals can pass in either direction over a single transmission line simultaneously, the data communication mode is called full-duplex. An example of a full-duplex is a telephone line where the two channels are created as separate frequency bands. Cost permitting, two separate transmission lines can be established in which case the full-duplex communication is conducted over two simplex channels. This requires duplication of all the functions of a simple data communication system as shown in Fig. 37.1.
Unbalanced vs. Balanced Transmission Implementation of the electrical transmission line can take two basic forms, unbalanced (single-ended) or balanced (differential). For unbalanced operation, a single conductor is used to carry the signal voltage, which is referenced to a signal ground. The signal ground is usually common return for all signals in the interface. Figure 37.2 shows an example of an unbalanced data transmission system with two channels and three wires. Symbol D represents driver and symbol R receiver. Unbalanced data transmission is ©2002 CRC Press LLC
R
D
R
FIGURE 37.2
D
Example of an unbalanced data transmission.
D
T
R
FIGURE 37.3
T
R
D
Example of a balanced data transmission.
relatively inexpensive because, for multiple signal lines, only one common line is required; however, this type of interface is susceptible to induced and ground noise and is not suitable for high-speed communication over long distances. The ground noise is associated with voltage drop in a common return line, while the induced noise comes from interfering electromagnetic fields. Both types of noise can come from external sources or from neighboring transmission circuits. A remedy can be the use of coaxial cable, shielded cable, and/or the use of separate return lines for individual signals. These additional measures tend to increase the cost of the interface. The balanced (differential) transmission mode has much better noise immunity than the unbalanced mode. Two complementary signal lines carry the data signal. The implementation often involves two singleended drivers driving a twisted-pair transmission line. Figure 37.3 shows an example of balanced data transmission with two channels and five wires. As in Fig. 37.2, symbol D represents driver and symbol R receiver. Symbol T represents termination resistor. Use of a termination resistor at the receiver end of the transmission line is critical for high-speed communications over long distances as unterminated transmission lines can cause severe distortion of signals. Both induced and ground noises appear on both conductors as common-mode signals that are rejected by the differential receiver. The differential signals carrying data are amplified while the common-mode noise signals are suppressed. As a result, the balanced data transmission lines can be used for longer distances with higher transmission rates. Both unbalanced and balanced interfaces shown in Figs. 37.2 and 37.3 represent two simplex interfaces, which can form one full-duplex point-to-point (see below) communication channel. A good source of information on individual drivers and receivers is provided in the data sheets and application notes of semiconductor manufacturers [1,2].
Point-to-Point vs. Multi-Point If communication takes place between two devices, we call such a communication link a point-to-point link. In mechatronic systems, it is often required for the master system to communicate with a number of subsystems. Cost permitting, a number of point-to-point data transmission lines can be implemented. In a point-to-point arrangement, the master system has a point-to-point connection to each individual subsystem, i.e., there is a separate port and communication line for each subsystem. This type of arrangement is shown in Fig. 37.4. The connection can also be arranged as a multi-point connection in which ©2002 CRC Press LLC
Master System Slave System 1
FIGURE 37.4
Slave System 3
Slave System 4
A point-to-point communication system with four subsystems.
System 1
FIGURE 37.5
Slave System 2
System 2
System 3
System 4
A multi-point communication system. Ideal Sampling points (center of bit)
1
0 Start Bit
FIGURE 37.6
Data Bit 0
Data Bit 1
Data Bit 2
Data Bit 3
Data Bit 4
Data Bit 5
Data Bit 6
Data Bit 7
Stop Bit
Start Bit
Asynchronous serial data format.
all devices are connected to a single transmission line, as shown in Fig. 37.5. This arrangement is a data communication network arrangement where data can be transmitted from any device to any other device on the network. All devices on the network must be equipped with a receiver and a transmitter. Transmitters must have a tri-state (high output impedance) capability so that they do not provide additional load to the line. When transmitters are not transmitting, they are virtually disconnected from the transmission line. Complex communication protocol is required to manage individual transmitters on the network. The major advantage of a multi-point arrangement is usually the lower cost of the network compared to the individual communication links. The disadvantage is a more complex communication protocol (which must deal with the identity of the transmitting and receiving devices) and a more complex interface.
Serial Asynchronous Communications In asynchronous serial communications, the data are transmitted at irregular intervals as a bit stream. Individual characters coded as binary numbers are converted to serial data streams, which are framed with start and stop bits. Optionally, a parity bit is added to the stream. In general, a computer represents information in parallel form such as bytes and words while the majority of communications with external devices takes place serially. The task of the parallel-to-serial and serial-to-parallel conversion is performed by a special integrated circuit called a universal asynchronous receiver transmitter (UART) as described later (see Fig. 37.7). Figure 37.6 shows an example of a typical data stream for asynchronous transmission. During idle time the line is in logical state 1 (for historical reasons also called “MARK”). The start of the data stream ©2002 CRC Press LLC
is always indicated by the start bit, which has logical value 0 (also called “SPACE”). The start bit is followed by 5–8 data bits representing a character. The data bits are followed by an optional parity bit. The stream is terminated by one or two stop bits with logical value 1, which can be followed by idle line or the start bit of the next character. The idle line corresponds to logical state 1. A parity bit is an extra bit inserted after the data bits and before the stop bit(s). It is set according to the parity information of the data in the stream. For example, if an even parity is used, the parity bit is set such that total number of ones in the data stream including the parity bit is even. The parity bit is used by the receiver for error checking. The task of the receiver is to detect the start of the data stream and to correctly sample individual bits in the stream. After the detection of the start bit the receiver should sample individual bits, ideally at the mid point of each bit, as shown in Fig. 37.6. In the case of an ideal sampling, as shown in Fig. 37.6, the receiver is said to have distortion tolerance of 50%. In practice, the receiver of a UART is sampling incoming signals using the Baud Rate Generator frequency, which is 16 times higher than the corresponding baud rate used for transmission. The uncertainty in the detection of the start bit will reduce the distortion tolerance by 6.25% (1/16) to 43.75% [3]. If, for example, the receiver clock is 1% slower than the clock of the corresponding transmitter, the sampling time of the first data bit will be delayed by 1.5% of the bit time and the sampling time of the stop bit will be delayed by 9.5%. In this case, the distortion tolerance would be further reduced to 34.25%. If the receiver clock is slower by 5%, then the receiver may detect the start bit of the next character instead of the stop bit of the current character. This results in a framing error. The above example shows the significance of the accuracy of the clock speed and the reason why the data stream must be kept short in asynchronous transmission. Other factors affecting the error-free communications include length and type of transmission line, speed of communications, parameters of line drivers, termination of transmission line, and the level of noise in the communication system.
The Universal Asynchronous Receiver Transmitter (UART) The basic function of the UART is to facilitate parallel-to-serial and serial-to-parallel data conversion. The UART usually contains one transmitter and one receiver. The receiver and transmitter can operate simultaneously and independently. The UART can operate in full-duplex or half-duplex mode. Parallel data from the host computer are converted to an asynchronous serial bit stream. The UART automatically adds a start bit, an optional parity bit, and the programmed number of stop bits, and sends the stream out through the transmitter serial data output (TxD) output pin. The parallel data are converted to a serial stream with the least significant bit shifted out first. Figure 37.7 shows a typical arrangement for UART. As can be seen, the UART uses TTL (transistor transistor logic) compatible interface. The TIA/EIA (see later) transmission line drivers and receivers are specific to a particular interface; thus, changing system interface means changing the transmission medium and the relevant drivers and receivers. The use of UART is independent of the transmission medium. Serial data received on the receiver serial data input (RxD) pin is converted to parallel data. In the process the UART checks the start bit, parity bit (if any), and stop bit and reports any error conditions. Note that the UART is capable of generating all signals required for successful bit-serial asynchronous communications. The UART can also report a number of error conditions, including receiver overrun, parity error, framing error, and break error. Receiver overrun error occurs when the bytes are received faster than the computer
Computer
Parallel Interface TTL
Serial Interface TTL UART
CPU
FIGURE 37.7
Typical arrangement for the UART.
©2002 CRC Press LLC
TIA/EIA Drivers or Receivers
TIA/EIA Interface (Serial)
processes them. The parity error is indicated if the parity of the bit stream changed during the communication process. Framing error is reported if the sampled stop bit is not at logic 1 level. The break error is reported if the communication line is idle for the time equivalent to the duration of at least one character. Older types of UART devices such as 8250, 16450 had only one byte FIFO (first in first out) buffer and thus it was easy to overrun the receiver buffer. More recent devices are equipped with larger buffers providing more efficient communications. For example, device 16550D from National Semiconductor has a 16-byte receiver buffer and a 16-byte transmitter buffer and can operate at speeds up to 1.5 Mbps. Modern UARTs can also automatically handle tasks pertaining to multi-drop systems on a network.
37.2 TIA/EIA Serial Interface Standards RS-232 Serial Interface The RS-232 (Recommended Standard) was originally developed in 1962 by the Electronic Industries Association (EIA) as an interface between a computer and communication equipment. It is now jointly maintained by the Telecommunication Industries Association (TIA) and the EIA. The current version is designated as TIA/EIA 232-F (sixth revision) [4]. The Consulting Committee for International Telegraphs and Telephones (CCITT) issues recommendations that cover interfaces equivalent or similar to those issued by TIA/EIA. Rapid development of computers created a demand for computer-to-computer communications over long distances. The switched public telephone network provided a readily available infrastructure for the communication task. Because computers generate digital data while the telephone network was designed for the transmission of voice signal, the digital signals from the computer had to be converted to a modulated signal which can be transmitted over the analog network. Modems (modulator/demodulator) are used to convert the digital signal into a modulated analog signal that is transmitted over the telephone line and converted back to digital signal by the modem at the other end of the telephone line. The RS-232 was designed as an interface between a computer and a modem. The formal name of the RS-232 standard is “Interface Between Data Terminal Equipment and Data Communication Equipment Employing Serial Binary Data Interchange,” in which the Data Terminal Equipment (DTE) represents the computer and the Data Communication Equipment (DCE) represents the modem. Figure 37.8 shows an example of the RS-232 interface in the system providing computer-to-computer communication over the switched telephone network. The computers at each end represent DTE and the modems represent DCE. The RS-232 interface standard specifies mechanical, electrical, and functional characteristics of the DTE/ DCE interface. The CCITT V.24 interface describes equivalent functional characteristics and relies on other standards for mechanical and electrical characteristics of the interface. The RS-232 standard is widely used in applications where it provides a direct point-to-point connection between two computers or computers and field elements of mechatronic systems in which case we are dealing with DTE to DTE interface. As this is a situation where a modem is not required, the cable used to connect a DTE to another DTE is called a “null modem” cable, which has internal built-in connections to fake the presence of a modem. The mechanical characteristic is concerned with the actual physical connection of the DTE and DCE and involves specification of pin assignments and genders of the connectors. The RS-232 standard does not specify a connector type, but it is customary to use either 25-pin D-type (DB-25) connector, which
RS-232 Interface Computer
DTE
FIGURE 37.8
UART
Telephone Network Modem
DCE
Data communication over a telephone network.
©2002 CRC Press LLC
RS-232 Interface Modem
DCE
UART
Computer
DTE
1 2 3 4 5 6 7 8 20
Pin assignment between a DTE and DCE. 1 2 3 4 5 6 7 8 20
FIGURE 37.10
PG TxD RxD RTS CTS DSR SG DCD DTR
DCE
DTE FIGURE 37.9
1 2 3 4 5 6 7 8 20
PG TxD RxD RTS CTS DSR SG DCD DTR
PG TxD RxD RTS CTS DSR SG DCD DTR
DTE
DTE
1 2 3 4 5 6 7 8 20
Example of a null modem cable pin assignment.
can accommodate all 25 pins, listed in the standard. In practice, a smaller number of pins are used; thus, as an alternative, a 9-pin D-type connector (DB-9) is often used. Please note that the pin assignment for DB-9 connector is not specified by RS-232 and is different from DB-25 pin assignment. Figure 37.9 shows DB-25 connector pin assignments and the interconnection of selected circuits between a DTE and a DCE. Figure 37.10, on the other hand, shows an example of the DB-25 connector pin assignments and interconnection of selected circuits between two computers, i.e., two DTEs.
Functional Description of Selected Interchange Circuits A full description of all signals as specified by the RS-232 standard is beyond the scope of this chapter. The reader is referred to the relevant standard [4]. We will describe the most common signals used in DTE/DCE and DTE/DTE interface. Please note that with the exception of the Protective Ground circuit and the Signal Ground circuit the circuits carry signals unidirectionally, as shown by arrows in Fig. 37.9. Functional characteristics specify the functions that are performed by individual interchange circuits. Protective Ground (PG). This line ensures that the chassis of the DTE and DCE are on the same potential. Transmitted Data (TxD). Transmission line-signal originating from the DTE propagates to DCE. Received Data (RxD). Receiver line-signal originating from the DCE propagates to DTE. Request to Send (RTS). This signal is used to condition DCE for data transmission. On a half-duplex channel the signal controls the direction of data transmission of the DCE (transmit or receive). On a one-way-only channel (simplex) and on the full-duplex channels this signal controls the transmit state of the DCE (transmit or nontransmit state). A signal originating from the DTE propagates to DCE. Clear to Send (CTS). This signal indicates that the DCE is ready to receive and is the response to the asserted RTS signal. The signal is originating from the DCE and propagates to DTE. Data Set Ready (DSR). This signal indicates that the DCE is ready to operate. The signal is originating from the DCE and propagates to DTE.
©2002 CRC Press LLC
Signal Ground (SG). This line is a common ground return line for all other signals. Data Carrier Detect (DCD). This signal indicates that the DCE is receiving a valid modulated signal from the DCE at the other end. The signal is originating from the DCE and propagates to the DTE. Data Terminal Ready (DTR). This signal indicates that the DTE is powered up and ready to operate. This signal is originating from the DTE and propagates to DCE. The RS-232 specifies unbalanced, unidirectional, point-to-point interface. The interconnection is done over a set of wires referred to as interchange circuits. The electrical characteristics specify voltage levels of signals, rate of change of signals, and line impedance of interchange circuits. The standard specifies Nonreturn to Zero (NRZ) coding of digital signals. The standard requires that the drivers be designed such that for the terminator load resistance between 3 and 7 kW the drivers should be capable of delivering high-level voltages between +5 and +15 V and low voltages between -5 and -15 V. The electrical signals are designed to provide a 2 V margin in signaling levels. The receiver signals are defined as +3 to +15 V for high voltage and as -3 to -15 V for low voltage. It should be noted that for the data interchange circuit the high level voltage is defined as logic 0 (SPACE), while the low level voltage is defined as logic 1 (MARK). For control signals, on the other hand, the high level voltage defines the ON state while the low level voltage defines the OFF state. The maximum rate of change of signal allowed on both data and signal lines is 30 V/µs. The original standard has also specified the maximum length of cable as 15 m. This specification was replaced by the specification of the maximum allowed capacitive load of 2500 pF in the EIA/TIA-232-D. The maximum cable length is determined by the capacitance of the cable per unit length; thus, this parameter now defines indirectly the length of the interface cable. The RS-232 interface is rated at signaling rates in the range from 0 to 20 kbps. It should be noted that in practice a good design would allow greater distances and greater data rates than the ones specified by the standard.
RS-422 and RS-485 Interfaces The TIA/EIA-422-B standard “Electrical Characteristics of Balanced Voltage Digital Interface Circuits” [5] defines electrical characteristics of RS-422 interface. The RS-422 specifies a unidirectional, single driver, terminated balanced interface. The standard allows multiple receivers (up to 10) on one line. Figure 37.3 illustrates a typical point-to-point application of RS-422. As a result of improved noise immunity the RS-422 interface supports data rates up to 10 Mbps and cable length up to 1200 m, although not simultaneously. The maximum data rate of 10 Mbps is supported on a cable length up to 12 m, while a cable length of 1200 m supports data rates up to 100 kbps. Observe that the product of cable length and data rate is a limiting parameter of the interface. The transmission medium is a twisted-pair transmission line. The TIA/EIA-485-A standard “Standard for Electrical Characteristics of Generators and Receivers for Use in Digital Multipoint Systems” [6] defines electrical characteristics of RS-485 interface. The RS-485 is a unique standard, which allows multiple nodes to communicate bidirectionally over a single twistedpair transmission line. The RS-485 standard defines a low cost, multipoint balanced interface with electrical characteristic, supported cable types, cable length and data rates equivalent to those specified by the RS-422 standard. RS-485 parts are backward compatible and interchangeable with their equivalent RS-422 parts; however, RS-422 parts should not be used in RS-485 systems. RS-422 is usually used in point-to-point full-duplex communication systems, while RS-485 is used in multipoint half-duplex communication systems. The distinguishing feature of RS-485 drivers is their TRI-STATE capability, which allows the use of multiple drivers. The RS-485 has improved driver capability and input voltage range and supports up to 32 devices (drivers and/or receivers) on a single transmission line. Figure 37.11 shows a typical RS-485 multipoint application. It should be noted that both RS-422 and RS-485 are electrical standards only. They do not specify mechanical or functional requirements.
©2002 CRC Press LLC
R
R T
T
D
D
T1
R
R
R
D
D
D
T3
FIGURE 37.11
T4
T2
T32
Example of an RS-485 multipoint application.
As mentioned earlier, data sheets and application notes of component suppliers provide an excellent source of information [1,2]. An excellent overview of practical data communications and interfacing for instrumentation and control is provided in [7]. Detailed discussion of design aspects of serial communications and interfacing based on RS-232 and RS-485 is given in [8]. It is recommended that for the full specification the designer should consult the relevant standards [4–6]. Additional information including design recommendations can be found in [9–11]. A good introduction and background theory to data communication and computer networks can be found in [12].
37.3 IEEE 488—The General Purpose Interface Bus (GPIB) Introduction The interface described by IEEE 488 standard, which will be referred to as GPIB in this chapter, is used to connect instruments to test and measurement systems. Examples of such instruments are digital voltmeters, storage oscilloscopes, printers, and plotters. In general, these instruments are called GPIB devices. These devices operate under the coordination of a controller. Most modern systems consist of a cluster of such devices connected to one or more computers. In such a system, one of the computers will become the controller. Historically, the interface was developed by Hewlett–Packard in 1965. At that time, the interface was called HPIB, and a general standard did not exist. In 1975, it was formulated as IEEE 488 and was called IEEE Standard Digital Interface for Programmable Instrumentation. The standard specified the electrical, mechanical, and hardware aspects, i.e., the signals, their functioning, and purpose. Instrument manufacturers used the interface freely without adhering to a standard protocol in communicating with instruments. Instruments meant for the same purpose, yet manufactured by different manufacturers required widely varied commands. Some instruments made measurements in response to a command, while some other instruments of similar type made measurements without a command at all. Further, there were no agreed data formats between instruments sending data and instruments receiving data. This situation led to the development of an extension to the IEEE 488 standard. The new standard was published in 1987 and was ©2002 CRC Press LLC
called IEEE 488.2 Standard Codes, Formats, Protocols, and Common Commands for Use with IEEE 488.1 (1987) [13], where IEEE 488.1 is the new name for the original IEEE 488 standard. The IEEE 488.2 compliant devices must present data through data formats and codes specified in the standard. The standard also specifies a minimum set of mandatory control sequences or commands and suggests a few other optional commands. It also provides a standard status-reporting model that must be implemented by the instrument manufacturers so that determining the status of instruments will be easier for the instrument programmers. Although not yet a standard, The Standard Commands for Programmable Instrumentation (SCPI) put together in 1990 agrees upon a standard set of commands for various instrument categories. Accordingly, all digital voltmeters manufactured by different manufacturers will respond to the same GPIB command.
GPIB Hardware This section describes the electrical and mechanical specifications of the GPIB interface as well as the signal description and their purpose. All GPIB devices are connected using a special cable with each end having the male as well as the female ends of the connector. This permits piggyback connections of cables. The devices can be connected either in a chained manner (i.e., device B connected to device A, device C connected to device B, etc.) or in a star configuration (i.e., device A, B, C, etc. connected to a common node). The connection configurations are shown in Fig. 37.12. A maximum of 15 devices can be connected to the bus. The maximum separation between two devices is 4 m with an average separation of not more than 2 m. At least two-thirds of the devices connected must be powered on. The GPIB cable consists of 24 wires. Eight of these lines are data lines, while three lines are used for handshaking. Another five lines are used for interface management and the remaining eight lines are ground lines. Among the ground lines are a cable shield line, a signal ground line, three ground return lines for the handshaking signals, and three other ground return lines for three of the interface management lines. All signals used are standard TTL signal levels with negative logic. The handshake lines and interface management lines are given in Table 37.1. The operation of the individual lines is not important to the average user or programmer as their usage is taken care of by the controllers and the instruments that comply with IEEE 488.2 standard. TABLE 37.1 Handshaking and Interface Management Lines Handshaking Lines NRFD NDAC DAV
Not ready for data Not data accepted Data valid
Device A
Interface Management Lines ATN IFC REN SRQ EOI
Device B
Attention Interface clear Remote enable Service request End of identify
Device A
Controller
Device B
Controller
Device C Device C
FIGURE 37.12
Linear and star configurations of connecting GPIB devices to a controller.
©2002 CRC Press LLC
Controllers, Talkers, and Listeners The controller carries out the general management of the bus. While there can be many controllers connected to the GPIB network, there can be only one controller-in-charge (CIC) which manages the bus at that given time. All information sent out by the controller on the data lines are called “commands” and all information sent out by other devices are termed “data.” The GPIB devices that send data any time are called “talkers” and the devices that receive data are called “listeners.” While there can be more than one listener operating at any given time, there can be only one talker operating at any given time. A system can have permanent talkers and permanent listeners; however, if the capability exists, a GPIB device can be a listener at one time and a talker at another time. A brief explanation of the signal lines is given below, as it would enhance our understanding of the operation of GPIB interface.
Interface Management Lines Attention (ATN) The ATN line is controlled by the CIC. When asserted, the signals on the data lines constitute a command signal and all devices must listen. When unasserted, the signals on the data lines represent data and are generally sent by a talker to one or more listeners. Interface Clear (IFC) The IFC line is asserted by the CIC to reset the GPIB bus. Upon receipt of this signal, all GPIB devices on the bus will initialize themselves. Remote Enable (REN) GPIB devices can be controlled either locally or remotely. The CIC asserts the REN line to bring all GPIB devices under remote programming mode. Thus, for example, the change of scale of a DVM can be carried out by a GPIB command instead of a front panel control. Service Request (SRQ) Any device other than a controller can asynchronously assert the SRQ line requesting service from the controller. The controller monitors the SRQ line and polls all devices to determine the device or devices requiring service. End of Identity (EOI) The EOI signal is used by a talker to indicate the end of the data message of the talker. It indicates to the listener(s) the end of the receiving data record.
Handshake Lines In general, a data transfer with complete handshake gets through three stages: request or preparedness, data transfer, and acknowledgment. On some systems, where the stability of data on the data bus is questionable, a data valid signal may also be provided. On the GPIB bus, when a talker has to send data to a listener, the controller must address a device and instruct it to be the talker and then address one or more other devices and instruct them to be listeners. See later for “Addressing of GPIB Devices.” Not Ready for Data (NRFD) The NRFD line is controlled by the controller when sending commands or by the talker when sending data. A device that has been instructed to be a listener will unassert NRFD to indicate to the talker that it is ready to receive data. Of all the listeners, the slowest device will be the last to unassert NRFD and thus control the speed of data transfer. Data Valid (DAV) When all listeners have indicated their readiness to receive data by unasserting NRFD, the talker (or the controller when sending commands) will assert a DAV signal to indicte to all listeners that the data on the data lines DIO1-DIO8 are stable and may be read by the listeners. In response to a DAV signal, the listeners ©2002 CRC Press LLC
may assert NRFD to halt any further data transmission by talkers until the data already transmitted has been received. Not Data Accepted (NDAC) The NDAC line driven by all listeners is the acknowledgment signal. When data has been received by all listeners, the NDAC line will be unasserted. The talker can then remove the data and unassert the DAV signal.
Data Lines DIO1-DIO8 (8 lines) The data lines are controlled by the controller when issuing commands or by the talker. As soon as the controller instructs a particular device to be a talker, that device will place data on the lines DIO1-DIO8 and will wait for at least T1 seconds.
Addressing of GPIB Devices All GPIB devices connected to a GPIB bus must have a unique GPIB address. A device can have a primary address as well as a secondary address. Most devices use a primary address only. The addresses are in the range 0–30 decimal. In general, the addresses on the instruments as well as the controller are set using switches. The controller instructs a device with a particular address to be a talker or a listener by sending a bit pattern on the data bus. The bit pattern is formed according to Table 37.2. The data bits are numbered from D7 to D0. The value of each bit is listed straight underneath. The letter A signifies 0 or 1. The five bits D4–D0 will form a bit pattern representing the address of the device. The letter X signifies a “don’t care” bit, which is not used. TA will be set to 1 if the controller is instructing the device to be a talker. LA will be set to 1 if the controller is instructing the device to be a listener. For example, if a particular device has the address 15 (decimal) and if the controller is instructing that device to be the talker, then the controller must send the following bit pattern over the data lines DIO8-DIO1. 0 1 0 0 1 1 1 1 = 4F (hex)
Device with address 15 be the talker Similarly, Device with address 0 be the listener
0 0 1 0 0 0 0 0 = 20 (hex)
“Untalk” the current talker
0 1 0 1 1 1 1 1 = 5F (hex)
“Unlisten” all listeners
0 0 1 1 1 1 1 1 = 3F (hex)
Note that Untalk and Unlisten commands look very similar to Talk and Listen commands; however, the address 31 (decimal) does not exist. Therefore, the address 31 is used to affect Untalk and Unlisten. For the controllers, IEEE 488.2 Standard provides the Required and Optional Control Sequences. All controllers that comply with IEEE 488.2 must support all mandatory commands. The standard also provides the “Controller Protocols.” Protocols are formed by combining a set of control sequences. For example, FINDLSTN command will issue a set of control sequences to determine the existing listeners. For the instruments, IEEE 488.2 specifies a set of mandatory commands and queries. For example, * when the command “ RST” is received by IEEE 488.2 compliant instruments, they all must carry out an * instrument reset. Similarly, upon receipt of “ STB?” command the instrument will send the status byte to the controller. TABLE 37.2 Talker/Listener Addressing Commands D7 X
©2002 CRC Press LLC
D6 TA
D5 LA
D4 A
D3 A
D2 A
D1 A
D0 A
All mandatory common commands and queries, all required and optional control sequences as well as the controller protocols can be found in [14,15].
References 1. Goldie, J., Summary of well known interface standards, Application note AN-216, National Semiconductor, 1998, www.national.com. 2. Goldie, J., Comparing EIA-485 and EIA-422-A line drivers and receivers in multipoint applications, Application note AN-759, National Semiconductor, 1998. 3. McNamara, J.E., Technical Aspects of Data Communication, 3rd edition, Digital Press, 1988. 4. TIA/EIA-232-F, Interface between data terminal equipment and data communication equipment employing serial binary data interchange, TIA, EIA, 1997. 5. TIA/EIA-422-B, Electrical characteristics of balanced voltage digital interface circuits, TIA, EIA, 1995. 6. TIA/EIA-485-A, Standard for electrical characteristics of generators and receivers for use in digital multipoint systems, TEI, EIA, 1998. 7. Mackay, S.G., et al., Data Communications for Instrumentation and Control, IDC Techbooks, 2000. 8. Axelson, J., Serial Port Complete, Lakeview Research, Madison, 1998. 9. Goldie, J., Ten ways to bulletproof RS-485 interfaces, Application note AN-1057, National Semiconductor, 1996. 10.RS-422 and RS-485 Application Note, B&B Electronics Manufacturing Co., 1997, www.bb-elec.com. 11.DALLAS SEMICONDUCTOR, Application Note 83, Fundamentals of RS-232 Serial Communications, 1998. 12.Stallings, W., Data and Computer Communications, 6th ed., Prentice-Hall, Upper Saddle River, NJ, 2000. 13.ANSI/IEEE 488.1-1987 IEEE standard digital interface for programmable instrumentation institution of electrical and electronic engineers, New York, 1987. 14.ANSI/IEEE 488.2-1987 IEEE standard codes, formats, protocols and common commands, institution of electrical and electronic engineers, New York, 1987. 15.ANSI/IEEE 488.2-1992 IEEE standard codes, formats, protocols and common commands, and standard commands for programmable instruments. Institution of Electrical and Electronic Engineers, New York, 1992.
©2002 CRC Press LLC
38 Communications and Computer Networks 38.1 38.2 38.3
A Brief History Introduction Computer Networks Wide Area Computer Networks • Local and Metropolitan Area Networks • Wireless and Mobile Communication Networks
Mohammad Ilyas Florida Atlantic University
38.4 38.5 38.6
Resource Allocation Techniques Challenges and Issues Summary and Conclusions
The field of communications and computer networks deals with efficient and reliable transfer of information from one point to another. The need to exchange information is not new but the techniques employed to achieve information exchange have been steadily improving. During the past few decades, these techniques have experienced an unprecedented and innovative growth. Several factors have been and continue to be responsible for this growth. The Internet is the most visible product of this growth and it has impacted the life of each and every one of us. This chapter describes salient features and operational details of communications and computer networks. The contents of this chapter are organized in several sections. Section 38.1 describes a brief history of the field of communications. Section 38.2 deals with the introduction of communication and computer networks. Section 38.3 describes operational details of computer networks. Section 38.4 discusses resource allocation mechanisms. Section 38.5 briefly describes the challenges and issues in communication and computer networks that are still to be overcome. Finally, Section 38.6 summarizes the article.
38.1 A Brief History Exchange of information (communications) between two or more entities has been a necessity since the existence of human life. It started with some form and shape of human voice that one entity can create and other(s) can listen to and interpret. Over a period of several centuries, these voices evolved into languages. As the population of the world grew, more and more languages were born. For a long time, languages were used for face-to-face communications. If there were ever a need to convey some information (a message) over a distance, someone would be briefed and sent to deliver the message to a distant site. Gradually, additional methods were developed to represent and exchange the information. These methods included symbols, shapes, and eventually alphabets. This development facilitated information recording and use of nonvocal means for exchanging information. Hence, preservation, dissemination, sharing, and communication of knowledge became easier. Until about 150 years ago, all communication was via wireless means and included smoke signals, beating of drums, and use of reflective surfaces for reflecting light signals (optical wireless). Efficiency of
©2002 CRC Press LLC
these techniques was heavily influenced by environmental conditions. For instance, smoke signals were not very effective in windy conditions. In any case, as we will note later, some of the techniques that were in use centuries ago for conveying information over a distance were similar to the techniques that we currently use. The only difference is that the implementation of those techniques is exceedingly more sophisticated now than it was centuries ago. As the technological progress continued and electronic devices started appearing on the surface, the field of communication also started making use of the innovative technologies. Alphabets were translated into their electronic representations so that information could be electronically transmitted. Morse code was developed for telegraphic exchange of information. Further developments led to the use of the telephone. It is important to note that in earlier days of technological masterpieces, users would go to a common site where one could send a telegraphic message over a distance or could have a telephonic conversation with a person at a remote location. This was a classic example of resource sharing. Of course, human help was needed to establish a connection with remote sites. As the benefits of the advances in communication technologies were being harvested, electronic computers were also emerging and making the news. Earlier computers were not only expensive and less reliable, they were also huge in size. For instance, the computers that used vacuum tubes were of the size of a large room and used roughly about 10,000 vacuum tubes. These computers would stop working if a vacuum tube burned out, and the tube would need to be replaced by using a ladder. On average, those computers would function for a few minutes before another vacuum tube’s replacement was necessary. A few minutes of computer time was not enough to execute a large computer program. With the advent of transistors, computers not only became smaller in size and less expensive, but also more reliable. These aspects of computers resulted in their widespread applications. With the development of personal computers, there is hardly any side of our lives that has not been impacted by the use of computers. The field of communications is no exception and the use of computers has escalated our communication capabilities to new heights.
38.2 Introduction Communication of information from one point to another in an efficient and reliable manner has always been a necessity. A typical communication system consists of the following components as shown in Fig. 38.1: • • • • •
Source that generates or has the information to be transported Transmitter that prepares the information for transportation Transmission medium that carries the information from one end to the other Receiver that receives the information and prepares it for delivering to the receiver Destination that takes the information from receiver and utilizes it as necessary
The information can be generated in analog or digital form. Analog information is represented as a continuous signal that varies smoothly in time. As one speaks in a microphone, an analog voice signal is generated. Digital information is represented by a signal that stays at some fixed level for some duration of time followed by a change to another fixed level. A computer works with digital information that has two levels (binary digital signals). Figure 38.2 shows an example of analog and digital signals. Transmission of
FIGURE 38.1
A typical communication system.
©2002 CRC Press LLC
FIGURE 38.2
Typical analog and digital signals.
information can also be in analog or digital form. Therefore, we have the following four possibilities in a communication system [21]: • • • •
Analog information transmitted as an analog signal Analog information transmitted as a digital signal Digital information transmitted as an analog signal Digital information transmitted as a digital signal
There may not be a choice regarding the form (analog or digital) of information being generated by a device. For instance, a voice signal as one speaks, a video signal as generated by a camera, a speed signal generated by a moving vehicle, and an altitude signal generated by the equipment in a plane will always be analog in nature; however, there is a choice regarding the form (analog or digital) of information being transmitted over a transmission medium. Transmitted information could be analog or digital in nature and information can be easily converted from one form to another. Each of these possibilities has its pros and cons. When a signal carrying information is transmitted, it looses its energy and strength and gathers some interference (noise) as it propagates away from the transmitter. If the energy of the signal is not boosted at some intermediate point, it may attenuate beyond recognition before it reaches its intended destination. That will certainly be a wasted effort. In order to boost energy and strength of a signal, it must be amplified (in case of analog signals) and rebuilt (in case of digital signals). When an analog signal is amplified, the noise also becomes amplified and that certainly lowers expectations about receiving the signal at its destination in its original (or close to it) form. On the other hand, digital signals can be processed and reconstructed at any intermediate point and, therefore, the noise can essentially be filtered out. Moreover, transmission of information in digital form has many ©2002 CRC Press LLC
other advantages including processing of information for error detection and correction, applying encryption and decryption techniques to sensitive information, and many more. Thus, digital information transmission technology has become the dominant technology in the field of communications [9,18]. As indicated earlier, communication technology has experienced phenomenal growth over the past several decades. The following two factors have always played a critical role in shaping the future of communications [20]: • Severity of user needs to exchange information • State of the technology related to communications Historically, inventions have always been triggered by the severity of needs. It has been very true for the field of communications as well. In addition, there is always an urge and curiosity to make things happen faster. When electricity was discovered and people (scattered around the globe) wanted to exchange information over longer distances and in less time, the telegraph was invented. Morse code was developed with shorter sequences (of dots and dashes) for more frequent alphabets. That resulted in transmission of messages in a shorter duration of time. The presence of electricity and the capability of wires to carry information over longer distances led to the development of devices that converted human voice into electrical signal, and thus led to the development of telephone systems. Behind this invention was also a need/desire to establish full-duplex (two-way simultaneous) communication in human voice. As use of the telephone became widespread, there was a need for a telephone user to be connected to any other user, and that led to the development of switching offices. In the early days, the switching offices were operated manually. As the state of the technology improved, the manual switching offices were replaced by automatic switching offices. Each telephone user was assigned a telephone number for identification purposes and a user able to dial the number for the purpose of establishing a connection with the called party. As the computer technology improved and the computers became easier to afford and smaller in size, they found countless uses including their use in communications. The computers not only replaced the automatic (electromechanical) switching offices, they were also employed in many other aspects of communication systems. Examples include conversion of information from analog to digital and vice versa, processing of information for error detection and/or correction, compression of information, and encryption/decryption of information. As computers became more powerful, there were many other applications that surfaced. The most visible application was the amount of information users started sharing among themselves. The volume of information being exchanged among users has been growing exponentially over the last three decades. As users needed to exchange such a mammoth amount of information, new techniques were invented to facilitate the process. There was not only a need for users to exchange information with others in an asynchronous fashion, there was also a need for computers to exchange information among themselves. The information being exchanged in this fashion has different characteristics than the information being exchanged through the telephone systems. This need led to the interconnection of computers with each other and that is what is called computer networks.
38.3 Computer Networks A computer network is an interconnection of computers. The interconnection forms a facility that provides reliable and efficient means of communication among users and other devices. User communication in computer networks is assisted by computers, and the facility also provides communication among computers. Computer networks are also referred to as computer communication networks. Interconnection among computers may be via wired or wireless transmission medium [5,6,10,13,18]. There are two broad categories of computer networks: • Wide area networks • Local/metropolitan area networks ©2002 CRC Press LLC
FIGURE 38.3 (a) A typical wide area computer communication network. (b) A typical local/metropolitan area communication bus network. (c) A typical local/metropolitan area communication ring network.
Wide area computer networks, as the name suggests, span a wider geographical area and essentially have a global scope. On the other hand, local/metropolitan area networks span a limited distance. Local area networks are generally confined to an industrial building or an academic institution. Metropolitan area networks also have limited geographical scope but it is relatively larger than that of the local area networks [19]. Typical wide and local/metropolitan area networks are shown in Fig. 38.3. Once a user is connected to a computer network, that user can communicate with any other user also connected to the network at some point. It is not required for a user to be connected directly to another ©2002 CRC Press LLC
user in order to communicate. In fact, in wide area networks, two communicating users will rarely be directly connected with each other. This implies that the users will be sharing the transmission links for exchanging their information. This is one of the most important aspects of computer networks. Sharing of resources improves utilization of the resources and is, of course, cost-effective as well. In addition to sharing the transmission links, the users will also share the processing power of the computers at the switching nodes, buffering capacity to store the information at the switching nodes, and any other resources that are connected to the computer network. A user who is connected to a computer network at any switching node will have immediate access to all the resources (databases, research articles, surveys, and much more) that are connected to the network as well. Of course, access to specific information may be restricted and a user may require appropriate authorization to access the information. The information from one user to another may need to pass through several switching nodes and transmission links before reaching its destination. This implies that a user may have many options available to select one out of many sequences of transmission links and switching nodes to exchange information. That adds to the reliability of the information exchange process. If one path is not available, not feasible, or not functional, some other path may be used. In addition, for better and effective sharing of resources among several users, it is not appropriate to let any user exchange a large quantity of information at a time; however, it is not uncommon that some users may have a large quantity of information to exchange. In that case, the information is broken into smaller units known as packets of information. Each packet is sent toward its destination as a separate entity and then all packets are assembled together at the destination side to re-create the original piece of information [2]. Due to the resource sharing environment, users may not be able to exchange their information at any time they wish because the resources (switching nodes, transmission links) may be busy serving other users. In that case, some users may have to wait for some time before they begin their communication. Designers of computer networks should design the network so that the total delay (including wait time) is as brief as possible and that the total amount of information successfully exchanged (throughput) is as large as possible. Many aspects must be addressed for enabling networks to transport users’ information from one point to another. The major aspects are: • • • • • • • • • • • •
Addressing mechanism to identify users Addressing mechanism for information packets to identify their source and destination Establishing a connection between sender and receiver and maintaining it Choosing a path or a route (sequence of switching nodes and transmission links) to carry the information from a sender to a receiver Implementing a selected route or path Checking information packets for errors and recovering from errors Encryption and decryption of information Controlling the flow of information so that shared resources are not over-taxed Informing the sender that the information has been successfully delivered to the intended destination (acknowledgment) Billing for the use of resources Ensuring that different computers running different applications and operating systems can exchange information Preparing information appropriately for transmission over a given transmission medium
This is not an exhaustive list of items that need to be addressed in computer networks. In any case, all such issues are addressed by very systematic and detailed procedures. The procedures are called communication protocols. The protocols are implemented at the switching nodes by a combination of hardware and software. It is not advisable to implement all these features in one module of hardware or software because that will become very difficult to manage. It is a standard practice that these features be divided into different ©2002 CRC Press LLC
smaller modules and then these modules can be interfaced together to collectively provide implementation of these features. International Standards Organization (ISO) has suggested dividing these features into seven distinct modules called layers. The proposed model is referred to as Open System Interconnection (OSI) reference model. The seven layers proposed in the OSI reference model are [2]: • • • • • • •
Application layer Presentation layer Session layer Transport layer Network layer Data link layer Physical layer
The physical layer deals with the transmission of information on the transmission medium. The data link layer handles the information on a single link. The network layer deals with the path or route of information from the switching node where the source is connected to the switching node where the receiver is connected. It also monitors end-to-end information flow. The remaining four layers reside with the user equipment. The transport layer deals with the information exchange from the source to the sender. The session layer handles the establishment of a session between the source and the receiver and maintains it. The presentation layer deals with the form in which information is presented to the lower layer. Encryption/decryption of information can also be performed at this layer. The application layer deals with the application that generates the information at the source side and what happens to it when it is delivered at the receiver side. As the information begins from the application layer at the sender side, it is processed at every layer according to the specific protocols implemented at that layer. Each layer processes the information and appends a header and/or a trailer with the information before passing it on to the next layer. The headers and trailers appended by various layers contribute to the overhead and are necessary for transportation of the information. Finally, at the physical layer, the bits of information packets are converted to an appropriate signal and transmitted over the transmission medium. At the destination side, the physical layer receives the information packets from the transmission medium and prepares them for passing these to the next higher layer. As a packet is processed by the protocol layers at the destination side, its headers and trailers are stripped off before it is passed to the next layer. By the time information reaches the application layer, it should be in the same form as it was transmitted by the source. Once a user is ready to send information to another user, he or she has two options. He or she can establish a communication with the destination prior to exchanging information or he can just give the information to the network node and let the network deliver the information to its destination. If communication is established prior to exchanging the information, the process is referred to as connection-oriented service and is implemented by using virtual circuit connections. On the other hand, if no communication is established prior to sending the information, the process is called connectionless service. This is implemented by using a datagram environment. In connection-oriented (virtual circuit) service, all packets between two users travel over the same path through a computer network and, hence, arrive at their destination in the same order as they were sent by the source. In connectionless service, however, each packet finds its own path through the network while traveling towards its destination. Each packet will therefore experience a different delay and the packets may arrive at their destination out of sequence. In that case, the destination will be required to put all the packets in proper sequence before assembling them [2,10,13]. As in all resource sharing systems, allocation of resources in computer networks requires careful attention. The main idea is that the resources should be shared among users of a computer network as fairly as possible. At the same, it is desired to maintain the network performance as close to its optimal level as possible. The fairness definition, however, varies from one individual to another and depends upon how one is associated with a computer network. Although fairness of resource sharing is being evaluated, two performance parameters—delay and throughput—for computer networks are considered. The delay ©2002 CRC Press LLC
is the duration of time from the moment information is submitted by a user for transmission to the moment it is successfully delivered to its destination. The throughput is the amount of information successfully delivered to its intended destination per unit time. Due to the resource sharing environment in computer networks, these two performance parameters are contradictory. It is desired to have the delay as small as possible and the throughput as large as possible. For increasing throughput, a computer network must handle increased information traffic, but the increased level of information traffic also causes higher buffer occupancy at the switching nodes and, hence, more waiting time for information packets. This results in an increase in delay. On the other hand, if information traffic is reduced to reduce the delay, that will adversely affect the throughput. A reasonable compromise between throughput and delay is necessary for the satisfactory operation of a computer network [10,11].
Wide Area Computer Networks A wide area network consists of switching nodes and transmission links as shown in Fig. 38.3(a). Layout of switching nodes and transmission links is based on the traffic patterns and expected volume of traffic flow from one site to another site. Switching nodes provide the users access to a computer network and implement communication protocols. When a user is ready to transmit his or her information, the switching node, to which the user is connected, will establish a connection if a connection-oriented service has been opted. Otherwise, the information will be transmitted in a connectionless environment. In either case, switching nodes play a key role in determining the path of the information flow according to some well-established routing criteria. The criteria include performance (delay and throughput) objectives among other factors based on user needs. For keeping the network traffic within a reasonable range, some traffic flow control mechanisms are necessary. In late 1960s and early 1970s, when data rates of transmission media used in computer networks were low (a few thousand bits per second), these mechanisms were fairly simple. A common method used for controlling traffic over a transmission link or a path was an understanding that the sender would continue sending information until the receiver sent a request to stop. The information flow would resume as soon as the receiver sent another request to resume transmission. Basically the receiver side had the final say in controlling the flow of information over a link or a path. As the data rates of transmission media started increasing, this method was not deemed efficient. To control the flow of information in relatively faster transmission media, a sliding window scheme was used. According to this scheme, the sender will continuously send information packets but no more than a certain limit. Once the limit is reached, the sender will stop sending the information packets and will wait for the acknowledgment that the packets have been transmitted. As soon as an acknowledgment is received, the sender may send another packet. This method ensures that there are no more than a certain specific number of packets in transit from sender to receiver at any given time. Again, the receiver has control over the amount of information that the sender can transmit. These techniques for controlling the information traffic are referred to as reactive- or feedback-based techniques because the decision to transmit or not to transmit is based on the current traffic conditions. Reactive techniques are acceptable in low to moderate data rates of transmission media. As the data rates increase from kilobits per second to megabits and gigabits per second, the situation changes. Over the past several years, there has been a manifold increase in data rates. Optical fibers provide enormously high data rates. Size of the computer networks has also experienced tremendous increase. The amount of traffic flowing through these networks has been increasing exponentially. Given that, the traffic control techniques used in earlier networks are not quite effective anymore [11,12,22]. One more factor that has added to the complexity of the situation is that users are now exchanging different types of information through the same network. Consider the example of the Internet. The geographical scope of the Internet is essentially global. Extensive use of optical fiber as transmission media provides very high data rates for exchanging information. In addition, users are using the Internet for exchanging any type of information they come across, including voice, video, and data. All these factors have essentially necessitated the use of a modified approach for traffic management in computer networks. The main factor leading to this change is that the information packets are moving so fast through the computer networks that any feedback-based (or reactive) ©2002 CRC Press LLC
control will be too slow to be of any use. Therefore, some preventive mechanisms have been developed to maintain the information traffic inside a computer network to a comfortable level. Such techniques are implemented at the sender side by ensuring that only as much information traffic is allowed to enter the network as can be comfortably handled by the networks [1,20,22]. Based on the users’ needs and state of the technology, providing faster communications for different types of services (voice, video, data, and others) in the same computer network in an integrated and unified manner has become a necessity. These computer networks are referred to as broadband integrated services digital networks (BISDNs). BISDNs provide end-to-end digital connectivity and users can access any type of communication service from a single point of access. Asynchronous transfer mode (ATM) is expected to be used as a transfer mechanism in BISDNs. ATM is essentially a fast packet switching technique where information is transmitted in the form of small fixed-size packets called cells. Each cell is 53 bytes long and includes a header of 5 bytes. The information is primarily transported using a connection-oriented (virtual circuit) environment [3,4,8,12,17]. Another aspect of wide area networks is the processing speed of switching nodes. As the data rates of transmission media increase, it is essential to have faster processing capability at the switching nodes. Otherwise, switching nodes become bottlenecks and faster transmission media cannot be fully utilized. When transmission media consist of optical fibers, the incoming information at a switching node is converted from optical form to electronic form so that it may be processed and appropriately switched to an outgoing link. Before it is transmitted, the information is again converted from electronic form to optical form. This slows down the information transfer process and increases the delay. To remedy this situation, research is being conducted to develop large optical switches to be used as switching nodes. Optical switches will not require conversion of information from optical to electronic and vice versa at the switching nodes; however, these switches must also possess the capability of optical processing of information. When reasonably sized optical switches become available, use of optical fiber as transmission media together with optical switches will lead to all-optical computer and communication networks. Information packets will not need to be stored for processing at the switching nodes and that will certainly improve the delay performance. In addition, wavelength division multiplexing techniques are rendering use of optical transmission media to its fullest capacity [14].
Local and Metropolitan Area Networks A local area network has a limited geographical scope (no more than a few kilometers) and is generally limited to a building or an organization. It uses a single transmission medium and all users are connected to the same medium at various points. The transmission medium may be open-ended (bus) as shown in Fig. 38.3(b) or it may be in the form of a loop (ring) as shown in Fig. 38.3(c). Metropolitan area networks also have a single transmission medium that is shared by all the users connected to the network, but the medium spans a relatively larger geographical area, up to 150 km. They also use a transmission medium with relatively higher data rates. Local and metropolitan area networks also use a layered implementation of communication protocols as needed in wide area networks; however, these protocols are relatively simpler because of simple topology, no switching nodes, and limited distance between the senders and the receivers. All users share the same transmission medium to exchange their information. Obviously, if two or more users transmit their information at the same time, the information from different users will interfere with each other and will cause a collision. In such cases, the information of all users involved in a collision will be destroyed and will need to be retransmitted. Therefore, there must be some well-defined procedures so that all users may share the same transmission medium in a civilized manner and have successful exchange of information. These procedures are called medium access control (MAC) protocols. There are two broad categories of MAC protocols: • Controlled access protocols • Contention-based access protocols ©2002 CRC Press LLC
In controlled access MAC protocols, users take turns transmitting their information and only one user is allowed to transmit information at a time. When one user has finished his or her transmission, the next user begins transmission. The control could be centralized or distributed. No information collisions occur and, hence, no information is lost due to two or more users transmitting information at the same time. Examples of controlled access MAC protocols include token-passing bus and token-passing ring local area networks. In both of these examples, a token (a small control packet) circulates among the stations. A station that has the token is allowed to transmit information, and other stations wait until they receive the token [19]. In contention-based MAC protocols, users do not take turns transmitting their information. A user makes his or her own decision to transmit and also faces a risk of becoming involved in a collision with another station that also decides to transmit at about the same time. If no collision occurs, the information may be successfully delivered to its destination. On the other hand, if a collision occurs, the information from all users involved in a collision will need to be retransmitted. An example of contention- based MAC protocols is carrier sense multiple access with collision detection (CSMA/CD), which is used in Ethernet. In CSMA/CD, a user senses the shared transmission medium prior to transmitting its information. If the medium is sensed as busy (someone is already transmitting the information), the user will refrain from transmitting the information; however, if the medium is sensed as free, the user transmits the information. Intuitively, this MAC protocol should be able to avoid collisions, but collisions still do take place. The reason is that transmissions travel along the transmission medium at a finite speed. If one user senses the medium at one point and finds it free, it does not mean that another user located at another point of the medium has not already begun its transmission. This is referred to as the effect of the finite propagation delay of electromagnetic signal along the transmission medium. This is the single most important parameter that causes deterioration of performance in contention-based local area networks [11,19]. Design of local area networks has also been significantly impacted by the availability of transmission media with higher data rates. As the data rate of a transmission medium increases, the effects of propagation delay become even more visible. In higher speed local area networks such as Gigabit Ethernet, and 100-BASE-FX, the medium access protocols are designed to reduce the effects of propagation delay. If special attention is not given to the effects of propagation delay, the performance of high-speed local area networks becomes very poor [15,19]. Metropolitan area networks essentially deal with the same issues as local area networks. These networks are generally used as backbones for interconnecting different local area networks. These are high-speed networks and span a relatively larger geographical area. MAC protocols for sharing the same trans-mission media are based on controlled access. The two most common examples of metropolitan area networks are fiber distributed data interface (FDDI) and distributed queue dual bus (DQDB). In FDDI, the transmission medium is in the form of two rings, whereas DQDB uses two buses. FDDI rings carry information in one but opposite directions and this arrangement improves reliability of communication. In DQDB, two buses also carry information in one but opposite directions. The MAC protocol for FDDI is based on token passing and supports voice and data communication among its users. DQDB uses a reservation-based access mechanism and also supports voice and data communication among its users [19].
Wireless and Mobile Communication Networks Communication without being physically tied-up to wires has always been of interest and mobile and wireless communication networks promise that. The last few years have witnessed unprecedented growth in wireless communication networks. Significant advancements have been made in the technologies that support wireless communication environment and there is much more to come in the future. The devices used for wireless communication require certain features that wired communication devices may not necessarily need. These features include low power consumption, light weight, and worldwide communication ability. In wireless and mobile communication networks, the access to a communication network is wireless so that the end users remain free to move. The rest of the communication path could be wired, wireless, ©2002 CRC Press LLC
or combination of the two. In general, a mobile user, while communicating, has a wireless connection with a fixed communication facility and rest of the communication path remains wired. The range of wireless communication is always limited and therefore the range of user mobility is also limited. To overcome this limitation, the cellular communication environment has been devised. In a cellular communication environment, a geographical region is divided into smaller regions called cells, thus the name cellular. Each cell has a fixed communication device that serves all mobile devices within that cell. However, as a mobile device, while in active communication, moves out of one cell and into another cell, service of that connection is transferred from one cell to another. This is called the handoff process [7,16]. The cellular arrangement has many attractive features. As the cell size is small, the mobile devices do not need very high transmitting power to communicate. This leads to smaller devices that consume less power. In addition, it is well known that the frequency spectrum that can be used for wireless communication is limited and can therefore support only a small number of wireless communication connections at a time. Dividing communication regions into cells allows the use of the same frequency in different cells as long as they are sufficiently far apart to avoid interference. This increases the number of mobile devices that can be supported. Advances in digital signal processing algorithms and faster electronics have led to very powerful, smaller, elegant, and versatile mobile communication devices. These devices have tremendous mobile communication abilities including wireless Internet access, wireless e-mail and news items, and wireless video (though limited) communication on handheld devices. Wireless telephones are already available and operate in different communication environments across the continents. The day is not far when a single communication number will be assigned to every newborn and will stay with that person irrespective of his/her location. Another field that is emerging rapidly is the field of ad hoc wireless communication networks. These networks are of a temporary nature and are established for a certain need and for a certain duration. There is no elaborate setup needed to establish these networks. As a few mobile communication devices come in one another’s proximity, they can establish a communication network among themselves. Typical situations where ad hoc wireless networks can be used are in the classroom environment, corporate meetings, conferences, disaster recovery situations, etc. Once the need for networking is satisfied, the ad hoc networking setup disappears.
38.4 Resource Allocation Techniques As discussed earlier, computer networks are resource sharing systems. Users share the common resources as transmission media, processing power and buffering capacity at the switching nodes, and other resources that are part of the networks. A key to successful operation of computer networks is a fair and efficient allocation of resources among its users. Historically, there have been two approaches to allocation of resources to users in computer networks: • Static allocation of resources • Dynamic allocation of resources Static allocation of resources means that a desired quantity of resources is allocated to each user who may use it whenever he or she needs to. If the user does not use his/her allocated resources, no one else can. On the other hand, dynamic allocation of resources means that a desired quantity of resources is allocated to users on the basis of their demands and for the duration of their need. Once the need is satisfied, the allocation is retrieved. In that case, someone else can use these resources if needed. Static allocation results in wastage of resources, but does not incur the overhead associated with dynamic allocation. Which technique should be used in a given situation is subject to the concept of supply and demand. If resources are abundant and demand is not too high, it may be better to have static allocation of resources; however, when the resources are scarce and demand is high, dynamic allocation is almost a necessity to avoid the wastage of resources. Historically, communication and computer networks have dealt with both situations. Earlier communication environments used dynamic allocation of resources when users walked to a public call office to ©2002 CRC Press LLC
make a telephone call or send a telegraphic message. After a few years, static allocation of res-ources was adopted, when users were allocated their own dedicated communication channels and these were not shared among others. In the late 1960s, the era of computer networks dawned with dynamic allocation of resources and all communication and computer networks have continued with this tradition to date. With the advent of optical fiber, it was felt that the transmission resources are abundant and can satisfy any demand at any time. Many researchers and manufacturers were in favor of going back to the static allocation of resources, but a decision to continue with dynamic resource allocation was made and that is here to stay for many years to come [10].
38.5 Challenges and Issues Many challenges and issues are related to communications and computer networks that are still to be overcome. Only the most important ones will be described in this section. High data rates provided by optical fibers and high-speed processing available at the switching nodes has resulted in lower delay for transferring information from one point to another. However, the propagation delay (the time for a signal to propagate from one end to another) has essentially remained unchanged. This delay depends only on the distance and not on the data rate or the type of transmission medium. This issue is referred to as latency vs. delay issue [11]. In this situation, traditional feedback-based reactive traffic management techniques become ineffective. New preventive techniques for effective traffic management and control are essential for achieving the full potential of these communication and computer networks [22]. Integration of different services in the same networks has also posed new challenges. Each type of service has its own requirements for achieving a desired level of quality of service (QoS). Within the networks any attempt to satisfy QoS for a particular service will jeopardize the QoS requirements for other services. Therefore, any attempt to achieve a desired level of quality of service must be uniformly applied to the traffic inside a communication and computer network and should not be intended for any specific service or user. That is another challenge that needs to be carefully addressed and its solutions achieved [13]. Maintaining security and integrity of information is another continuing challenge. The threat of sensitive information passively or actively falling into unauthorized hands is very real. In addition, proactive and unauthorized attempts to gain access to secure databases are also very real. These issues need to be resolved to gain the confidence of consumers so that they may use the innovations in communications and computer networking technologies to their fullest [13].
38.6 Summary and Conclusions This chapter discussed the fundamentals of communications and computer networks and the latest developments related to these fields. Communications and computer networks have witnessed tremendous growth and sophisticated improvements over the last several decades. Computer networks are essentially resource sharing systems in which users share the transmission media and the switching nodes. These are used for exchanging information among users that are not necessarily connected directly. There has been a manifold increase in transmission rates of transmission media and the processing power of the switching nodes (which are essentially computers) has also been multiplied. The emerging computer networks are supporting communication of different types of services in an integrated fashion. All types of information, irrespective of type and source, are being transported in the form of packets (e.g., ATM cells). Resources are being allocated to users on a dynamic basis for better utilization. Wireless communication networks are emerging to provide worldwide connectivity and exchange of information at any time. These developments have also posed some challenges. Effective traffic management techniques, meeting QoS requirements, and information security are the major challenges that need to be surmounted in order to win the confidence of users. ©2002 CRC Press LLC
References 1.Bae, J., and Suda, T., “Survey of traffic control schemes and protocols in ATM networks,” Proceedings of the IEEE, Vol. 79, No. 2, February 1991, pp. 170–189. 2.Beyda, W., “Data communications from basics to broadband,” Third Edition, 2000. 3.Black, U., “ATM: foundation for broadband networks,” Prentice-Hall, Englewood Cliffs, NJ, 1995. 4.Black, U., “Emerging communications technologies,” Second Edition, Prentice-Hall, Englewood Cliffs, NJ, 1997. 5.Chou, C., “Computer networks in communication survey research,” IEEE Transactions on Professional Communication, Vol. 40, No. 3, September 1997, pp. 197–208. 6.Comer, D., “Computer networks and internets,” Prentice-Hall, Englewood Cliffs, NJ, 1999. 7.Goodman, D., “Wireless personal communication systems,” Addison-Wesley, Reading, MA, 1999. 8.Goralski, W., “Introduction to ATM networking,” McGraw-Hill, New York, 1995. 9.Freeman, R., “Fundamentals of telecommunications,” John Wiley & Sons, New York, 1999. 10.Ilyas, M., and Mouftah, H.T., “Performance evaluation of computer communication networks,” IEEE Communications Magazine, Vol. 23, No. 4, April 1985, pp. 18–29. 11.Kleinrock, L., “The latency/bandwidth tradeoff in gigabit networks,” IEEE Communications Magazine, Vol. 30, No. 4, April 1992, pp. 36–40. 12.Kleinrock, L., “ISDN-The path to broadband networks,” Proceedings of the IEEE, Vol. 79, No. 2, February 1991, pp. 112–117. 13.Leon-Garcia, A., and Widjaja, I., “Communication networks, fundamental concepts and key architectures,” McGraw Hill, New York, 2000. 14.Mukherjee, B., “Optical communication networks,” McGraw-Hill, New York, 1997. 15.Partridge, C., “Gigabit networking,” Addison-Wesley, Reading, MA, 1994. 16.Rappaport, T., “Wireless communications,” Prentice-Hall, Englewood Cliffs, NJ, 1996. 17.Schwartz, M., “Broadband integrated networks,” Prentice-Hall, Englewood Cliffs, NJ, 1996. 18.Shay, W., “Understanding communications and networks,” Second Edition, PWS, 1999. 19.Stallings, W., “Local and metropolitan area networks,” Sixth Edition, Prentice-Hall, Englewood Cliffs, NJ, 2000. 20.Stallings, W., “ISDN and broadband ISDN with frame relay and ATM,” Fourth Edition, Prentice-Hall, Englewood Cliffs, NJ, 1999. 21.Stallings, W., “High-speed networks, TCP/IP and ATM design principles,” Prentice-Hall, Englewood Cliffs, NJ, 1998. 22.Yuan, X., “A study of ATM multiplexing and threshold-based connection admission control in connection-oriented packet networks,” Doctoral Dissertation, Department of Computer Science and Engineering, Florida Atlantic University, Boca Raton, Florida 33431, August 2000.
©2002 CRC Press LLC
39 Fault Analysis in Mechatronic Systems
Leila Notash
39.1 39.2 39.3 39.4 39.5 39.6
Queen’s University
Parallel Architecture Manipulators (Based on a Paper by Huang and Notash 1999) • Tool Condition Monitoring
Thomas N. Moore Queen’s University
Introduction Tools Used for Failure/Reliability Analysis Failure Analysis of Mechatronic Systems Intelligent Fault Detection Techniques Problems in Intelligent Fault Detection Example Mechatronic System: Parallel Manipulators/Machine Tools
39.7
Concluding Remarks
39.1 Introduction As the degree of automation increases, particularly intelligent automation, high reliability, fail-safe and fault tolerance become an essential part of the mechatronic system design. A mechatronic system is reliable if no failure and malfunction could result in an unsafe system; is safe if it causes no injury or damage to the operator, environment and system itself; is fail-safe if the system could be stopped safely after the failure; and is fault tolerant if the system could complete its task safely after any failure. Fault/failure corresponds to any condition or component/subsystem degradation (sharp or graceful degradation) that affects the performance of a system such that the system cannot function as it is required. As the application of the mechatronic systems expands to areas such as highly dynamic/unstructured or space/remote environments, medical and high-speed applications, the necessity for the system to be failsafe (could stop with no harm to the environment, operator, and itself) and fault tolerant (tolerate the failure and complete the assigned task) increases. A mechatronic system is called fault tolerant if after any failures there will be no interruption in the task/operation of the system. Fault tolerance and high reliability could be achieved by using high quality components, through design and robust control, and by incorporating redundancy in the design of mechatronic systems. A mechatronic system consists of mechanical, electrical, computer, and control (hardware and software) subsystems. Therefore, their redundancy could be in the form of hardware redundancy (redundancy in sensing, actuation, transmission, communication, and computing), software redundancy, analytical redundancy, information redundancy, and time redundancy.
39.2 Tools Used for Failure/Reliability Analysis The failure analysis techniques could be classified as inductive techniques and deductive techniques (Wolfe, 1978). Inductive techniques, such as decision or event trees and failure modes and effects analysis (FMEA), consider the possible states of components/subsystems and determine their effects on the system, i.e.,
©2002 CRC Press LLC
identify the undesired state. Deductive analyses, such as fault tree analysis (FTA), involve investigation of possible desired state of the overall system and identify the component states that contribute to the occurrence of the undesired state, i.e., describe how the undesired state is achieved. The event tree method is a pictorial representation of all the events (success or failures) that can occur in a system. Similar to other techniques, the event tree method can be used for systems in which all subsystems/components are continuously operating. This method is also widely used for systems in which some or all of the subsystems/components are in a standby mode with sequential operational logic and switching, such as safety oriented systems (Billinton and Allan, 1983). FMEA is a bottom-up qualitative technique used to evaluate a design by identifying possible failure modes and their effects on the system, occurrence of the failure modes, and detection techniques. The history of FMEA goes back to the early 1950s when the technique was utilized in the design and development of flight control systems (Dhillon, 1983). Since then it has been widely used in the industry for specific designed systems with known knowledge of their components, subsystems, functions, required performance and characteristics, and so on. Criticality analysis (CA) is a quantitative method used to rank critical failure mode effects by taking into consideration the probability of their occurrence. FMECA is a design technique composed of FMEA and CA and provides a systematic approach to clarify hardware failures. Fault tree analysis (FTA) is a top-down procedure which considers components in working or failed states, and it has been proven difficult to handle degraded component states. FTA can be used to obtain minimum cut sets, which define the modes of system failures and identify critical components. The reliability measures for the top event of FTA can be obtained provided that the failure data on primary events/failures is available.
39.3 Failure Analysis of Mechatronic Systems The failure modes of a mechatronic system include failure modes of mechanical, electrical, computer, and control subsystems, which could be classified as hardware and software failures. The failure analysis of mechatronic systems consists of hardware and software fault detection, identification (diagnosis), isolation, and recovery (immediate or graceful recovery), which requires intelligent control. The hardware fault detection could be facilitated by redundant information on the system and/or by monitoring the performance of the system for a given/prescribed task. Information redundancy requires sensory system fusion and could provide information on the status of the system and its components, on the assigned task of the system, and the successful completion of the task in case of operator error or any unexpected change in the environment or for dynamic environment. The simplest monitoring method identifies two conditions (normal and abnormal) using sensor information/signal: if the sensor signal is less than a threshold value, the condition is normal, otherwise it is abnormal. In most practical applications, this signal is sensitive to changes in the system/process working conditions and noise disturbances, and more effective decision-making methods are required. Generally, monitoring methods can be divided into two categories: model-based methods and featurebased methods. In model-based methods, monitoring is conducted on the basis of system modeling and model evaluation. Linear, time-invariant systems are well understood and can be described by a number of models such as state space model, input–output transfer function model, autoregressive model, and autoregressive moving average (ARMA) model. When a model is found, monitoring can be performed by detecting the changes of the model parameters (e.g., damping and natural frequency) and/or the changes of expected system response (e.g., prediction error). Model-based monitoring methods are also referred to as failure detection methods. Model-based systems suffer from two significant limitations. First, many systems/processes are nonlinear, time-variant systems. Second, sensor signals are very often dependent on working conditions. Thus, it is difficult to identify whether a change in sensor signal is due either to the change of working conditions or to the deterioration of the process. Feature-based monitoring methods use suitable features of the sensor signals to identify the operation conditions. The features of the sensor signal (often called the monitoring indices) could be time and/or ©2002 CRC Press LLC
frequency domain features of the sensor signal such as mean, variance, skewness, kurtosis, crest factor, or power in a specified frequency band. Choosing appropriate monitoring indices is crucial. Ideally the monitoring indices should be: (i) sensitive to the system/process health conditions, (ii) insensitive to the working conditions, and (iii) cost effective. Once a monitoring index is obtained, the monitoring function is accomplished by comparing the value obtained during system operation to a previously determined threshold, or baseline, value. In practice, this comparison process can be quite involved. There are a number of feature-based monitoring methods including pattern recognition, fuzzy systems, decision trees, expert systems, and neural networks. Fault detection and identification (FDI) process in dynamic systems could be achieved by analytical methods such as detection filters, generalized likelihood ratio (which uses Kalman filter to sense discrepancies in system response), and multiple mode method (which requires dynamic model of the system and could be an issue due to uncertainty in the dynamic model) (Chow and Willsky, 1984). As mentioned above, the system failures could be detected and identified by investigating the difference between various functions of the observed sensor information and the expected values of these functions. In case of failure, there will be a difference between the observed and the expected behavior of the system, otherwise they will be in agreement within a defined threshold. The threshold test could be performed on the instantaneous readings of sensors, or on the moving average of the readings to reduce noise. In a sensor voting system, the difference of the outputs of several sensors and each component (sensor or actuator) is included in at least one algebraic relation. When a component fails, the relations including that component will not hold and the relations that exclude that component will hold. For a voting system to be fail-safe and detect the presence of a failure, at least two components are required. For a voting system to be fail-operational and identify the failure, at least three components are required, e.g., three sensors to measure the same quantity (directly or indirectly). As Chow and Willsky (1984) pointed out, for the detection and identification of a single failure among m components at least (m - 1) relations are required (more relations are preferred for better performance in the presence of noise).
39.4 Intelligent Fault Detection Techniques The fault tolerant control (robust control and decision-making process) should include allowable performance degradation in the failed state, criticality and likelihood of the failure, urgency of response to failure, tradeoffs between correctness and speed of response, normal range of system uncertainty, disturbance environment, component reliability vs. redundancy, maintenance goals (mean-time-to-failure, mean-time-to-repair, maintenance-hour/operation-hour, etc.), system architecture, limits of manual intervention, and life-cycle costs (Stengel, 1991). Fault detection could be achieved by redundancy in sensing (measurement) and actuation, parallel redundancy (e.g., dual sensors or actuators), analytical redundancy, and artificial intelligence (expert systems, artificial neural network, or integration of both techniques) combined with redundancy. Stengel (1991) classified the analytical redundancy into direct and temporal redundancy. Direct redundancy consists of algebraic relationship among instantaneous outputs of sensors and is useful for sensor failure detection, but not for actuator failure detection. Temporal redundancy includes the relationship among histories of sensor outputs and actuator inputs (also comparison of the outputs of dissimilar sensors at different times). Temporal redundancy could be used for both sensor and actuator FDI, e.g., a sensor voting system with mixed displacement and velocity sensors could detect failures of both types of sensors. The computational complexity of temporal redundancy is higher compared to the direct redundancy case as it requires the dynamics of the system. An expert system embodies in a computer the knowledge-based component of an expert skill in such a manner that the system can generate intelligent actions and advice and can, when required, justify to the user its line of reasoning. In general, an expert system is composed of three parts: an inference engine, a human-machine interface, and a knowledge base. The inference engine is the knowledge processor and is modeled after the expert’s reasoning. The engine works with available information on a particular problem, coupled with the knowledge stored in the knowledge base to draw conclusions or recommendations. ©2002 CRC Press LLC
FIGURE 39.1
Architecture of a typical multilayer feedforward neural network.
The knowledge base contains highly specialized knowledge on the problem area as provided by the expert in the form of statistical analysis, empirical or semi-empirical rules, theoretic and computer simulation studies, and experimental testing. It includes problem facts, rules, concepts, and relationships. Expert systems have obvious knowledge representation forms that make knowledge easy to manage, have the capability to explain their behavior, and can diagnose new faults using their knowledge bases. At the same time, self-learning is still a problem and computation time can be quite lengthy for difficult tasks. A neural network is a highly nonlinear system with adaptation and generalization capabilities. There are many different architectures of neural networks; however, the multilayer feedforward neural network (refer to Fig. 39.1) is one of the most popular ones. This is because of the simplicity, availability of efficient learning methods, generalization capabilities, and noise tolerance of these networks. This network is a collection of simple, interconnected nodes, also known as neurons, which operate in parallel and store knowledge on the strength of connections between the individual nodes. Such a parallel computing network, inspired by the computational architecture of the human brain, has been successfully applied to intelligent tasks such as learning, speech synthesis, and pattern recognition. The input vector feeds into each of the first layer neurons, the outputs of this layer feed into each of the second layer neurons, and so on. The last layer, which generates output to the external world, is called the output layer. The hidden layers are not connected to the external world. Often the neurons are fully connected between the layers, i.e., every neuron in layer l is connected to every neuron in layer l + 1. Training a neural network consists of the process of finding the set of interconnection weights (there is an interconnection weight associated with each neuron which modifies the input signal to that neuron in a specific manner), which results in a network output that satisfies a predefined criterion. Feedforward neural networks are trained using the backpropagation algorithm. This is a supervized training method. This means that the network will be presented with sample inputs and correct responses, called a training pattern. The network is then trained to reproduce the correct responses. Neural networks have capabilities of association, memorization, error tolerance, self-adaptation, and multiple complex pattern processing. However, they cannot explain their own reasoning behavior and cannot diagnose new faults (those not already made available previously in training the network).
39.5 Problems in Intelligent Fault Detection The fault detection scheme should be capable of detecting and identifying the failures correctly and promptly with minimum delays. This requires a reconfigurable robust controller. That is, the controller should distinguish between failures, uncertainties/inaccuracies in the model of the system, and disturbances such as sensor noise; and reduce the effect of measurement error and noise, uncertainties in the system model, and disturbances (even component failure) on the system output. ©2002 CRC Press LLC
The sensor noise could be taken care of by statistical analysis on sensor readings. The uncertainties in the system model could be taken care of by estimating the effect of parameter uncertainties and compensating for it in the FDI system, or by minimizing the sensitivity of the FDI system to these uncertainties. The detection scheme should also be capable of monitoring the degradation of the system, as well as evolution and progress of failure over time (and predicting the failure), and responding to each accordingly.
39.6 Example Mechatronic System: Parallel Manipulators/Machine Tools Parallel structured machine tools consist of multiple serial branches/legs acting in parallel on a common mobile platform with the spindle being connected to the mobile platform. Parallel manipulator-based devices have the advantages of not requiring actuation of base distal joints and of having their active joints acting in parallel on the mobile platform. These advantages can lead to parallel machine tools having desirable stiffness, accuracy, and dynamic characteristics, which, in turn, will provide high material removal rate (high product volume) with tight tolerances and in-process inspection capability (on-machine measurements of workpieces, fixtures, and tools during and after manufacturing process without breaking setups). The failure analysis of parallel machine tools should include failures of parallel architecture, as well as failure of cutting tool, in addition to software failures.
Parallel Architecture Manipulators (Based on a Paper by Huang and Notash, 1999) The following discussion will focus on the design orientated failure analysis of the mechanical system of parallel manipulators/machines. Parallel manipulators consist of a base platform (stationary link), a mobile platform (end effector), and multiple branches/legs connecting the base and mobile platforms. Figure 39.2 depicts an example of a six-branch parallel manipulator. The mechanical failure modes of manipulators could be classified as joint failure (component), link failure/breakage (component), branch failure (subsystem), end effector failure (subsystem), and device failure (system). Figure 39.3 represents the top level FTA of a three-branch parallel manipulator/machine. Component Failures Parallel (closed-loop) manipulators possess both active joints (joints that are sensed and actuated) and passive joints (unactuated joints which could be sensed or unsensed). Therefore, their failures could be due to the failures of active, passive sensed, or passive unsensed joints. The failure of any joint will cause
FIGURE 39.2
Example of a six-branch parallel manipulator/machine.
©2002 CRC Press LLC
FIGURE 39.3
Top level fault tree for a three-branch parallel manipulator.
the failure of the parallel manipulator, unless the device is redundantly actuated/sensed or has a redundant unsensed joint(s) for the given task. The common failure modes of active, passive sensed, and passive unsensed joints are the joint break and joint jam. The only failure modes of passive unsensed joints are the common joint failures. The failure modes of passive sensed joints include sensor failure, in addition to the common failure modes. In this case, the motion of the joint cannot be measured and the joint will be reduced to a passive unsensed joint. The major failure modes of active joints could be classified as actuator failure, transmission failure, and sensor failure. As a result of an actuator failure, the active joint degrades to a passive sensed joint, provided that the joint is back drivable; otherwise, the joint must be locked and the corresponding branch and the parallel manipulator will lose one DOF and an actuation. Because of a transmission failure, the actuator fails to drive the joint, and the active joint could only be used as a passive sensed joint. When the sensor of an active joint fails, although the actuator may operate properly, the motion of the joint cannot be controlled as there will be no reliable information available on the joint motion; hence, the active joint is degraded to a passive unsensed joint. Subsystem Failures The branches of a parallel device could be categorized as active or passive branches. An active branch possesses at least one active joint to provide a required force and to facilitate a suitable loci for the branch end location. A passive sensed branch has at least one sensed joint and its main function is to constrain the loci of the branch end position. Neither joint of a passive unsensed branch is sensed, and the branch is mainly used to constrain the motion of the mobile platform. A branch of a parallel manipulator could fail because of component (link, joint) failures. As well, a branch will not follow its assigned path if it is in the workspace boundary, or at an internal singularity (where it loses one or more DOF). Therefore, the mechanical failure modes of a branch include branch break, loss of DOF, and loss of sensing/actuation. Mechanical System Failures A parallel manipulator could fail because of component and/or subsystem failures. Therefore, the mechanical failures of a parallel manipulator include loss of the DOF, loss of the actuation, loss of the motion constraint, and uncertainty configurations. A summary of the mechanical failure levels, modes, effects, and causes of parallel manipulators has been tabulated in Table 39.1. ©2002 CRC Press LLC
TABLE 39.1
Failure Modes of Parallel Manipulators and Their Effects
Failure Levels
Failure Modes
Components Links
Joints
Branches
Common
Break
Overload, fatigue, impact, material flaw Common Joint break Overload, fatigue, impact, material flaw Joint jam Deterioration, external interference Active Actuator failures Depends on actuator type Transmission Depends on failures transmission type Sensor failures Depends on sensor type Passive sensed Sensor failures Depends on sensor type Passive unsensed Common failures Overload, fatigue, (break, jam) impact, material flaw; deterioration, external interference Break Joint/link break
Loss of DOF
Active
Passive sensed Passive unsensed
Manipulator
©2002 CRC Press LLC
Failure Causes
Effects Reduction in number of branches
Reduction in number of branches
Reduction in DOF of corresponding branch Reduction in actuation, DOF if joint not back-drivable Reduction in actuation, DOF if joint not back-drivable Reduction in sensing, actuation, maybe DOF Reduction in sensing Reduction in number of branches; reduction in DOF
Reduction in number of branches, maybe actuation and DOF, interference with other branches Reduction in DOF of manipulator
Joint jam, locked active joint, branch singularity Loss of actuation Active joint failure Reduction in actuation, maybe DOF Loss of sensing Sensor failure Reduction in actuation, degradation to passive branch Loss of sensing Sensor failure Reduction in sensing, degradation to passive unsensed branch Common failures Joint/link break, Reduction in constraint or DOF of (break, loss of joint jam, locked manipulator DOF) active joint, branch singularity Loss of DOF Joint jam, branch Insufficient DOF singularity, branch interference Loss of actuation Active Degradation in force and motion joint/branch capabilities failure Loss of constraint Reduction in Uncontrolled motion of manipulator number of active branches Passive unsensed Uncontrolled motion of manipulator branch break Uncertainty Instantaneous uncontrolled motion configuration of manipulator
Failure Identification A fault tolerant manipulator should be capable of identifying a failure, as well as tolerating the failure. The failed component (mechanical system) of a parallel manipulator, e.g., a failed joint sensor, could be identified via the manipulator controller using the information provided by the sensors of the device. A joint sensor fault detection scheme for a class of fault tolerant parallel manipulators, based on redundant sensing of joint displacements and the comparison of forward displacement solutions, was presented in (Notash, 2000). While the failure of active joints could be identified based on the information provided by the sensor(s) on the corresponding joint, failure of passive joints could be identified by monitoring the overall performance of the manipulator in the software. For a given parallel manipulator, the criteria for failure should be incorporated in the simulation software. For example, the loss of DOF due to workspace boundary could be monitored (similar to the joint limits and branch interference) and the manipulator could be stopped before it reaches its envelope to prevent potential failure and damage to the device. As well, all of the potential special (uncertainty) configurations of the manipulator should be identified, and the closeness to these singularities should be monitored as the device moves around within its workspace. Fault Tolerance Through Redundancy The fault tolerant capabilities of parallel manipulators could be improved by employing appropriate redundancies. Redundant sensing has been investigated for improving the fault tolerance capabilities of parallel manipulators, for simplifying the forward displacement analysis of these manipulators, and for facilitating fixtureless calibration of these devices. Redundancy in actuation has been considered for eliminating the uncertainty configurations of parallel manipulators. More work is required to develop methodologies for identifying the failed components of parallel manipulators with elements of redundancy, and compensating for their failures. For parallel manipulators, redundancy could be incorporated as redundant DOF (mobility), redundant sensing, and redundant actuation. Redundant DOF could be achieved by incorporating additional joints into the parallel manipulator. A redundant DOF requires one more actuator on the parallel manipulator. This additional actuator is not considered as a redundant one because its failure will result in the failure of the parallel manipulator due to the loss of a required actuation. Redundancy in sensing could be obtained by sensing the existing passive unsensed joints of the manipulator, by adding a redundant passive sensed branch, or by using an external sensor such as a vision system. It should be noted that the information redundancy is achieved by redundant sensing, as well as by providing the task description of the manipulator, such as the Cartesian trajectory of the end effector (for robot path planning and machining operation). Redundancy in actuation could be accomplished by actuating the passive joints of the manipulator, or by adding an active branch (in addition to employing dual actuators).
Tool Condition Monitoring An important element of the automated process control function is the real-time detection of cutting tool failure, including both wear and fracture mechanisms in machining operations. The ability to detect such failures online would allow remedial action to be undertaken in a timely fashion, thus ensuring consistently high product quality (quality of surface finish and dimensional precision) and preventing potential damage to the process machinery. The basic premise of any automated, real-time tool condition monitoring system is that there exists either a directly measurable, or a derived parameter, which can be related to advancing tool wear and/or breakage. Information about tool wear, if obtained online, can be used to establish tool change policy, adaptive control, economic optimization of machining processes, and full automation of machining processes. In the ideal case, the system should be able to detect levels of wear well below those at which the tool would have to be replaced and should also be sensitive to relatively small changes in the level of wear. The latter characteristic would provide the system with the potential to “trend” the wear pattern and predict the amount of useful life left in the tool (allowable wear limit reached). ©2002 CRC Press LLC
With respect to tool fracture, the system should be able to detect both small fractures, “chipping” phenomena, and catastrophic failure of a tool. Although prediction of such failures would be desirable, it is problematic whether this is a practical goal, at least in the near future. The number of variables, which determine the actual occurrence of tool fracture together with their complex interactions, and in many instances their underlying stochastic nature, make reliable prediction capabilities, at best, a long-term prospect in tool monitoring systems. Cutting Tool Failure Monitoring Techniques Tool condition monitoring systems are based upon either direct or indirect methods of quantifying the magnitude of tool failure. The direct methods are those that utilize effects caused directly by tool failure. The direct methods, usually performed by means of optical, radiometric, pneumatic, or contact sensors can be effectively applied to the offline measurement of tool wear or breakage. However, such direct means of measuring tool failure have generally been found to be difficult to apply in practical shop floor applications. This is particularly true in those situations requiring online (real-time) monitoring capability. Indirect methods of sensing tool failure depend upon the measurement of parameters, which are indirectly related to the condition of the cutting edge. For example, the cutting forces generated during a machining operation are dependent upon the condition of the tool’s cutting edge. Generally, as the tool edge wears the generated cutting forces increase. Thus, measurement of the cutting forces present during a machining operation provides an indication of the tool condition, i.e., increasing cutting forces indicates increasing wear. In reality the relationship can be very complex. Other parameters that have been studied to determine their suitability as indicators of cutting tool failure include spindle motor current, acoustic emissions, cutting tool temperature, and noise and vibration signals. It is also possible to measure cutting forces directly and then relate these values to the condition of the cutting tool. In fact, this is one of the more common indirect tool wear monitoring methods. It has been reported that cutting force signals are more sensitive to tool wear than vibration or power measurements. The general reliability of force measurements is another reason for their popularity in tool condition monitoring applications. To use cutting force measurements for practical tool monitoring systems, there is a need to relate these forces to the state of tool condition online. However, since the measured cutting forces are affected by both cutting edge condition and changes in cutting conditions (feed rate, cutting speed, and depth of cut), the detection of tool failure using measurements of these forces becomes quite challenging in practice. System Characteristics Whether a tool condition monitoring system employs direct or indirect measures of tool failure (automated, computer-based system or not), it must include a number of common features if it is to be truly practical. Figure 39.4 shows the block diagram of a generalized tool condition monitoring system (Braun, 1986). In the measurement section, the physical parameter (or possibly, parameters) of interest is converted to a form that is appropriate for further manipulation by the system (generally a digitized representation of an electric analog signal). Within the processing section, various techniques are implemented in order to suppress noise, compress information, and emphasize important features of the acquired signal. Typical methods include analog
FIGURE 39.4
Block diagram of a generalized tool condition monitoring system.
©2002 CRC Press LLC
or digital filtering, time domain averaging, Fourier transformation, parametric identification based on ARMA models, etc. The purpose of the feature extraction section is to obtain a specific feature, or features, (often referred to as a feature vector), which can be used by the classifier to determine the specific type of failure and initiate appropriate corrective actions. Examples of features would include total power of the signal, crest factor value, power in a particular frequency range, frequency of the maximum peak, amplitude of the maximum peak, the autoregressive parameters of an ARMA model, etc. If multiple features are employed, they should be uncorrelated so that they provide independent indications of tool failure. When coupled with a hierarchical decision tree structure (or other appropriate structure) in the classifier, such multiple feature vectors can greatly improve the reliability of the tool monitoring system. The adaptation and database section should not only efficiently manage all data storage and manipulation requirements but also provide the system, to as great a degree as possible, with the ability to learn from experience.
39.7 Concluding Remarks It should be noted that the first and most practical step for increasing the reliability and improving the fault tolerance of mechatronic systems, e.g., a parallel machine, is by enhancing the existing design, or by improving the robustness of the design, such as using coupled joints while designing the architecture of the manipulator. Redundancies through redesign are recommended for the applications where the fail-safe system could be very crucial, or the down time should be minimum and previously scheduled, such as the medical applications or space operation. It is also worth mentioning that not any redundancy could improve the fault tolerance of a system with no modification to the architecture of the device. It is noteworthy to emphasize the importance of fail-safe simulation software and controller for a fault tolerant mechatronic system, which requires a robust software capable of monitoring the performance of system and responding to any system failures (including mechanical, electrical, and control systems).
References 1.Billinton, R., and Allan, R.N., Reliability Evaluation of Engineering Systems: Concepts and Techniques, Plenum Press, 1987. 2.Braun, S. ed., Mechanical Signal Analysis—Theory and Applications, Academic Press, 1986. 3.Chow, E.Y., and Willsky, A.S., “Analytical redundancy and the design of robust failure detection systems,” IEEE Trans. Automatic Control, 29(7), 603–614, 1984. 4.Dhillon, B.S., System Reliability, Maintainability and Management, Petrocelli Books, 1983. 5.Huang, L., and Notash, L., “Failure analysis of parallel manipulators,” Proc. 10th IFToMM Congress on Theory of Machines and Mechanisms, pp. 1027–1032, June, 1999. 6.Notash, L., “Joint sensor fault detection for fault tolerant parallel manipulators,” J. Robotic Systems, 17(3), 149–157, 2000. 7.Stengel, R.F., “Intelligent failure-tolerant control,” IEEE Control Systems, pp. 14–23, June 1991. 8.Wolfe, W.A., “Fault tree analysis,” Atomic Energy of Canada, Report, 1978.
©2002 CRC Press LLC
40 Logic System Design 40.1
Introduction to Digital Logic Logic Switching Levels • Logic Gate Application
40.2
Semiconductor Devices Diode • Bipolar Transistor • Field Effect Transistor (FET)
40.3 40.4
Logic Gates Logic Design Minimization • Dynamic Characteristics • Other Design Considerations
40.5
Logic Gate Technologies Resistor–Transistor Logic (RTL) • Diode–Transistor Logic (DTL) • Transistor–Transistor Logic (TTL) • Emitter-Coupled Logic (ECL) • CMOS Logic
M. K. Ramasubramanian North Carolina State University
40.6 40.7 40.8
Logic Gate Integrated Circuits Programmable Logic Devices (PLD) Mechatronics Application Example
40.1 Introduction to Digital Logic In analog electronics, voltages and current represent variables that vary continuously from the allowable minimum to the maximum. These variables are measured, amplified, added, and subtracted through analog circuits to achieve the desired results. For instance, measurement of temperature using thermocouples requires the amplification of voltages generated to a suitable range, calibration of the voltage with measured temperatures, and outputting the results on a voltmeter to indicate temperature. In this design, it may be necessary to subtract an offset voltage, multiply with a gain factor depending on the temperature range. The amplification of voltages and current are accomplished easily with operational amplifiers and transistors, respectively. The measured temperature can be used as the feedback signal in a control loop for a mechatronic temperature control system. In digital electronics, the variables assume a binary state, assuming a value of 0 or 1. In the above example, we might want to shut the solenoid valve down if the temperature was below desired value and open the valve if the temperature was above that value. In this case, we simply require a TRUE or FALSE input to the question “Is the temperature above or below the threshold?” The representation of these types of variables in circuits, which assume binary values, and their manipulation to achieve desired results is the topic of discussion in this chapter.
Logic Switching Levels In digital circuits, voltage levels indicate binary states where the HIGH or TRUE state is represented by the maximum voltage value, typically 5 V, and the LOW or FALSE state is represented by the minimum voltage value, typically 0 V. In Boolean logic,“1” represents TRUE and “0” represents FALSE. In practice, any voltage above a minimum input threshold, VIH, is interpreted as logic HIGH and any voltage below
©2002 CRC Press LLC
TTL Levels 5V
CMOS Levels
VCC = 4.5-5.5V
VCC = 5V
LOW VOLTAGE LEVELS
VOHVCC = -0.1V
3.3 V
HIGH
VCC = 2.7-3.6V
VIH = 3.85V
2.5V
VOH = 2.4V
VOH = 2.4V
VCC = 2.3-2.7V
VIH = 2.0V
VIH = 2.0V
VOH = 2.0V
VTH = 1.5V
VTH = 1.5V
VIH = 1.7V VTH = 1.2V
VIL = 0.8V
VIL = 0.8V
VOL = 0.5V
VOL = 0.2V
VTH = 2.5V
VIL = 1.35V
VIL = 0.7V VOL = 0.2V
VOL = 0.1V
Logic Level Specifications
FIGURE 40.1
Switching levels for logic gates [1].
1
FIGURE 40.2
0
1
0
1
0
Periodic and nonperiodic logic level signals.
a maximum threshold, VIL, is interpreted as logic LOW. The minimum output from a logic device for HIGH is represented by VOH (different from VIH), and maximum output level for a logic LOW is represented by VOL (different from VIH). These values depend on the type of logic device and a general chart of values for these parameters is shown in Fig. 40.1 [1].VCC is the supply voltage. The difference between the VOH and VIH, or VOL and VIL , is called the noise margin. It is important to design the logic circuit with the constraint that voltages will never fall in the region between VIH and VIL, which is called the forbidden region where the logic device will fail to interpret signals. The differences between switching levels for different technologies such as 5-V logic, 3.3-V logic, CMOS (complementary metal oxide semiconductor), and TTL (transistor–transistor logic) should all be considered when interfacing these systems with each other. A logic variable can rapidly change states as shown by an ideal pulse train in Fig. 40.2. The variables can vary periodically or nonperiodically between 0 and 1. Logic gates read these signals as inputs, perform the appropriate Boolean operations among them, and generate the correct output at desired operating speeds. Robust design and use of logic functions and its implementation in circuits is an integral part of mechatronics design.
Logic Gate Application Consider the example of an autonomous robot moving about on a table surface. The robot should move towards the destination denoted by a bright light source while avoiding obstacles and at the same time not falling off the edge. Assuming that we have three digital sensors, namely, obstacle detector, ©2002 CRC Press LLC
Photo Resistor
Motor +
5V
M
Obstacle Not Present Not At Edge Beacon Visible
FIGURE 40.3
AND
Transistor Switch
Forward motion logic implementation for a tabletop robot.
edge detector, and destination sensor, we can write a simple logic function for moving forward, as shown in Eq. (40.1). Of course, this is not the complete logic required for the robot to function properly. However, we focus on one aspect of the problem to illustrate the use of logic functions.
MOVE FORWARD = (OBSTACLE NOT DETECTED) AND (EDGE NOT DETECTED) AND (BEACON IS VISIBLE)
(40.1)
The input from the three sensors is interfaced to a logic circuit consisting of logic gates, in this simple example, a three-input AND gate and the output drives the motors. Of course, other cases of behaviors for the robot where the edge is found or the beacon is not visible or an obstacle is detected have to be worked out to make this circuit robust and worthwhile. Figure 40.3 shows an implementation of the logical statement expressed in Eq. (40.1).
40.2 Semiconductor Devices Diode In order to understand logic gates, it is important to develop a basic understanding of semiconductor devices, especially the diode and the transistor. A diode is a pn-junction, which means that the diode is made up of a p-type (electron deficient) material layer and an n-type (electron rich) material layer sandwiched together. When the positive terminal of a battery is connected to the p-side of the diode (anode) and the negative of the battery is connected to the n-side of the diode (cathode), then the diode is said to be forward biased as long as the voltage across the junction exceeds 0.7 V. When the terminals are reversed, the diode is said to be reverse biased and does not conduct until very high voltages are applied across the junction, known as the breakdown voltage. For all practical purposes, we can assume that a reverse-biased diode does not conduct. A schematic of a diode, its symbol, and a forward-biased circuit is shown in Fig. 40.4. When forward biased, the diode can be treated as a simple closed switch with a 0.7 V drop across it and when the diode is reverse biased, the diode is an open switch.
Bipolar Transistor A bipolar transistor has three semiconductor layers. In an npn-transistor, a very thin p-layer is sandwiched between two n-layers. Transistor types and their symbols are shown in Fig. 40.5(a, b). ©2002 CRC Press LLC
+
P
N
-
ANODE
i
CATHODE
Forward Bias Direction
FIGURE 40.4
The diode and its behavior.
C EMITTER
N
P
N
COLLECTOR
B
NPN
BASE
E
(a)
C EMITTER
P
N
P
BASE
FIGURE 40.5
B
COLLECTOR
PNP E
(b)
(a) npn-transistor symbol, (b) pnp-transistor symbol.
VCC
3 LEADS
E
B
C
iC iB
VBB +
C
B
+
νCE
νBE
-
E
iE -
FIGURE 40.6
Schematic representation of the working of an npn-transistor.
There are three leads in a transistor, namely, the collector (C), emitter (E), and the base (B). For an npn-transistor in a circuit, as shown in Fig. 40.6, the base–emitter junction is forward biased and will conduct if the voltage VBE exceeds the forward bias voltage for the pn-junction, typically 0.7 V. VBE is increased by increasing the voltage at B. However, the base–collector junction is reverse biased as the collector C is at a higher potential. As current flows in the base–emitter loop, the electrons from the emitter
©2002 CRC Press LLC
S
G
N
D
D G
N
N - MOSFET
P
S
G
P
FIGURE 40.7
D
D G
P N
S
P - MOSFET
S
n- and p-channel MOSFETs and symbols.
flow into the base terminal by filling in the “holes” in the p-layer and subsequently releasing an electron from the p-layer out of the base terminal. However, because of a limited number of “holes” in the p-layer (which is very thin), the electrons from the emitter see a larger potential across the collector–emitter path and jump the junction. A large current, IC, flows in the collector–emitter loop as a result. Thus, the transistor is a current amplifier. A small current flowing in the base–emitter loop, IB, is amplified by typically a factor of about 100 in the collector–emitter path. As the current flow in the base–emitter is increased by increasing VBE, the collector–emitter current increases by decreasing VCE. Since the collector is connected to the power source, VCC, and the emitter is connected to the ground, the device controls this current flow by controlling the drop in voltage across the collector–emitter junction, continuing to drop the voltage as the base–emitter current is increased. It is obvious that the voltage cannot drop below 0; in fact, it cannot drop below 0.2–0.35 V in a real device. Under these conditions, the transistor is said to be saturated and is acting as a closed switch. Circuits that are built with transistors in the saturating condition are called saturating circuits; for example, the TTL family of logic gates. Circuits that do not allow the transistor to saturate and find a stable operating point in the active region of the transistor are called nonsaturating circuits; for example, emitter-coupled logic (ECL) gates. The biggest advantage of a nonsaturating circuit is the speed with which states can be changed compared to a saturating circuit.
Field Effect Transistor (FET) These devices are easier to make and uses less silicon. There are two major classes of FETs, namely, the junction FET (JFET) and the metal oxide semiconductor FET (MOSFET). In both cases, a small input voltage controls the output current with practically no input current. The three terminals are called the source (S), drain (D), and gate (G). Figure 40.7 shows the symbols for the n- and p-channel enhancement type MOSFETs. MOSFET is the most popular of transistor technologies. A MOSFET gate has no electrical contact with the source and the drain. A silicon-dioxide layer insulates the gate. Electrical voltage applied at the gate attracts electrons to the region below the gate and provides an n-type channel in a p-type substrate for conduction between the drain and source. This is called the enhancement type of MOSFET. The other is the depletion-enhancement type where there is an n-channel present between the drain and source, but the channel resistance can be increased or decreased by applying either a negative or a positive voltage at the gate, respectively. Depletion-enhancement MOSFET symbols and function are described in Fig. 40.8. MOSFET devices are slower than bipolar devices and are used in slower but high density circuits, due to ease of manufacture and use of less silicon.
©2002 CRC Press LLC
RD D
N +
P
-
G
+ + + + +
D
-
N +
S
G S FIGURE 40.8
Depletion-enhancement type MOSFET.
40.3 Logic Gates Logic gates are the basic building blocks of logic circuits and a computer. Mechatronic systems have a central computational element as well as specific logic functions implemented in hardware. A logic circuit consists of several logic gates working together. We will discuss the logic gates in general and as building blocks of mechatronic subsystems. Logic operations can be subdivided into two categories, namely, combinatorial and sequential. In the case of combinatorial logic circuits, the logic gates are used to produce an output based on instantaneous values of the inputs, whereas in the case of sequential logic circuits, the change in output depends on the present state as well as the state before the changes in input values, thus exhibiting memory behavior. Further, the sequential logic circuits can be synchronous or asynchronous. When the output changes synchronously with a clock input, it is said to be synchronous. When the inputs are read as soon as there is any change in it, it is called an asynchronous logic circuit. There are three fundamental logic operations, namely the AND, OR, and NOT functions. Other logic operations are derived operations from these fundamental ones. The AND gate symbol and its truth table are shown in Fig. 40.9. The AND gate can have more than two inputs. Figure 40.10 shows an OR gate. Here the output is HIGH when either of the inputs or both the inputs are HIGH. The OR gate can also have more than two inputs. Figure 40.11 shows an inverter, also known as a NOT gate. This gate takes one input and simply inverts the logic, i.e., a HIGH input is returned as LOW output and vice versa. Other common logic gates that are derived from these fundamental ones are NAND, NOR, and Exclusive OR gates. NAND gate is a combination of AND and NOT gates; NOR is a combination of OR and NOT gates, and Exclusive OR can be generated with a combination of OR, NAND, and AND gates. Figures 40.12 through 40.14 show the derived gate types, namely the NAND, NOR, and XOR gates and their truth tables, respectively. The logic functions and their implementation into hardware using gates is the basic building block of a digital computer.
40.4 Logic Design As in any design, it is important to keep it simple, robust, and cost effective. Mechatronics design or logic circuit design is no exception. When a logic function of a system is translated into relationships between inputs and outputs, it is not certain if the number of elements involved in realizing the design are the minimum or further simplification is possible. If the complexity is defined as the number of logic gates used, then the problem reduces to minimizing the logic function mathematically. However, if complexity is defined as the number of ICs used in the circuit (the amount of real estate occupied by the circuit), additional approaches have to be considered, namely using the same type of gate, as much
©2002 CRC Press LLC
Input1 Input2
Output
Inputs
Output
INPUT 1 INPUT 2 L L H H
OUTPUT
L H L H
L L L H
A A
OUTPUT
B
B
A.B time, t
FIGURE 40.9
AND gate, symbol, and behavior.
Inputs
Output
Inputs
Output
INPUT 1 L L H H
INPUT 2 L H L H
OUTPUT L H H H
A
A
OUTPUT
B
B A+B time, t
FIGURE 40.10
OR gate, symbol, and behavior.
Input
FIGURE 40.11
Output
Output
L
H
H
L
NOT gate or an inverter, symbol, and behavior. Inputs
Output
Inputs
Output
INPUT 1 L L H H
INPUT 2 L H L H A
OUTPUT H H H L
NAND gate, symbol, and behavior.
©2002 CRC Press LLC
A
B (A.B)' time, t
OUTPUT
B
FIGURE 40.12
Input
0066_Frame_C40 Page 8 Wednesday, January 9, 2002 8:21 PM
Inputs
Output
Inputs
Output
INPUT 1 L L H H
INPUT 2 L H L H
OUTPUT H L L L
A
A
OUTPUT
B
B (A+B)' time, t
FIGURE 40.13
NOR gate, symbol, and behavior.
Inputs
Output
Inputs
Output
INPUT 1 L L H H
INPUT 2 L H L H
OUTUT L H H L
A A
OUTPUT
B
B A XOR B time, t
FIGURE 40.14
XOR gate, symbol, and behavior.
as possible, although it may not be minimal in terms of number of gates. This will be preferred over using less different types of gates necessitating use of more ICs, in which some of the gates are unused.
Minimization A method for minimizing Boolean functions is the Karnaugh map (K-map). From a physical description of the problem, logic statements are written as shown in Eq. (40.1) for the tabletop robot problem. A truth table is generated showing the relationship between inputs and outputs. Let us take a truth table for a three-variable design, shown in Fig. 40.15. The logical function can be written as
X = A′B′C′ + A′BC′ + ABC′ + A′BC
(40.2)
An implementation of the function without any further consideration will require four 3-input AND gates, one 4-input OR gate, and three inverters. If we assume that both complemented and uncomplemented forms of the signal for each variable are available, we still end up with a complex two-level circuit
©2002 CRC Press LLC
0066_Frame_C40 Page 9 Wednesday, January 9, 2002 8:21 PM
INPUTS
FIGURE 40.15
OUTPUT
A
B
C
X
0
0
0
1
0
1
0
1
1
0
0
0
1
1
0
1
0
0
1
0
0
1
1
1
1
0
1
0
1
1
1
0
Truth table for a logic circuit design and minimization.
1 AB 2 C
00
01
11
10
0
1
1
1
0
1
0
1
0
0 3
FIGURE 40.16
Karnaugh map for the logic design problem with three inputs and one output.
for what needs to be accomplished. Applying Karnaugh mapping, we can attempt to minimize the Boolean function and hence simplify the type and number of logic gates needed for circuit implementation. The Karnaugh map is derived from the truth table shown in Fig. 40.15. The two variables AB are grouped for column designations and the third variable provides the row designation. The values are arranged in such a way that adjacent columns or rows differ by only 1 bit. Figure 40.16 essentially represents the logic described in the truth table in Fig. 40.15. Because adjacent blocks in a K-map differ by 1 bit, the bit that changes is insignificant in a grouping of adjacent ones. In order to obtain the minimized function, adjacent ones on a K-map are identified by covering each one on the map at least once in a row or a column grouping, observing that in each case one variable is insignificant with respect to the value of X, the output. That variable is eliminated and the process is continued until all the groupings are evaluated. Finally, the reduced set of product terms is combined with an OR function to give the minimized function.
©2002 CRC Press LLC
0066_Frame_C40 Page 10 Wednesday, January 9, 2002 8:21 PM
tr
tf
(VH) 100% 90% VIH(min)
VT tw VIL(max) 10% (VL) 0%
Time
FIGURE 40.17
A real pulse and definition of characteristic parameters [2].
Figure 40.16 shows three sets of adjacent ones in rows and columns identified by circles around them and the following observations can be made: Group 1. Only variable B changes states. Hence, it can be eliminated and the minimized form for the grouping is A′C′. Group 2. Only variable A changes states. Hence, it can be eliminated and the minimized form of the grouping is BC′. Group 3. Only variable C changes states. Hence, it can be eliminated and the minimized form of the grouping is A′B. Hence, the minimized form for the logic function is
X = A′C′ + BC′ + A′B This can be implemented with one 2-input AND gate IC and one 3-input OR gate. A K-map is helpful in minimizing up to six variables.
Dynamic Characteristics Having studied the logic function and obtaining a minimum, we can build the logic circuit. However, in order to ensure that the circuit will work as intended over the entire operating range, dynamic characteristics of logic circuits must be considered. It was stated earlier that the input signal can change rapidly in a system and the logic circuit should perform as intended at frequencies at which the system is expected to operate. The correct functioning of the logic circuit when the inputs are changing rapidly is an important consideration in design. In our discussion thus far, we have assumed that the logic signal is an ideal square wave and that the logic gates function without any delay. Let us examine the effects of relaxing these two assumptions to obtain some insight into the dynamic behavior of logic circuits. A real pulse is shown in Fig. 40.17 [2]. The rise time is denoted by tr and fall time by tf . The pulse further shows a settling time, overshoot, and undershoot when changing states. The signal amplitude is specified as the difference between the two stable signal levels for high (VH) and low (VL), i.e., from 100% to 0%, and tw is the pulse width of the signal measured at 50% of the amplitude. tTHL, tTLH are the transition times for the output signal to go from high to low and low to high, respectively. tPHL and tPLH are propagation delay times for high to low and low to high transitions, respectively. For medium speed operation, tPHL, and tPLH are typically about 30 ns. When an input to a logic gate changes states, the output lags behind by a characteristic time delay called the propagation delay, measured by the time difference between the input at 50% of the amplitude and the output at 50% of the amplitude. A simplified model of a real pulse for an inverter is shown in Fig. 40.18 ©2002 CRC Press LLC
tr
tf VDD
90% INPUT
50% 10% tTHL
tTLH VDD
90% 50% 10%
INVERTING OUTPUT tPHL
FIGURE 40.18
tPLH
Propagation delay definition.
[3]. Values for the propagation, typically expressed in nanoseconds, are available in the datasheet for a device. For a logic circuit, a propagation delay analysis is carried out by mapping out the total delay from input to output as the inputs change states, and identifying any static problems (frequency independent) and dynamic problems. Additional gates may be added to the circuit of the problem.
Other Design Considerations The number of logic gates that a given gate can drive is called fan-out and the number of gates that can be connected to the input of a given gate is called fan-in. These data are given in the data sheet and should be adhered to. Further, minimizing the number of ICs needed in a logic circuit is an important consideration that might require modifying the design to use the same kind of gate although more numbers may be used than the minimum circuit identified with K-map analysis. Use of the same type of gates for compatibility between ICs is another design consideration in logic circuits.
40.5 Logic Gate Technologies The first of the logic families that became commercially available was the resistor–transistor logic (RTL), where the transistor is used as a high-speed switch in circuits. Diode–transistor logic (DTL) and transistor– transistor logic (TTL) followed in the evolution. While the RTL and the DTL are obsolete, the TTL gates are still widely used. There are several variations of TTL logic, namely, the high-speed (H), low-power (L), Shottkey (S), and low-power Shottkey (LS). CMOS logic gates are an entirely different implementation of logic gates based on the complimentary metal-oxide semiconductor devices (CMOS) technology. These devices have low-power requirements and improved noise characteristics. These devices are extremely static sensitive and are easily damaged. A mixture of CMOS and bipolar processes resulted in the BiCMOS technology, using internal CMOS components and high-power bipolar outputs. Several different families evolved from the original BiCMOS processes [1].
Resistor–Transistor Logic (RTL) Figure 40.19(a) shows an RTL inverter and Fig. 40.19(b) shows a NAND gate. The transistor is assumed to operate in the saturation mode. Because of the nature of a transistor, there is a minimum voltage drop across the collector–emitter junction at saturation and there is a minimum current required in the base–emitter loop to saturate the transistor. In Fig. 40.19(a), the output voltage is between 0.3 and 5.0 V. The NAND gate shown has an output of 0.6 V for logic LOW as the collector–emitter drop for the two transistors in series has to be added up. If we add an additional transistor to add an input, we have additional power dissipation and the output voltage is at 0.9 V for a logic LOW causing problems with ©2002 CRC Press LLC
+5 v
+5v
X=(A.B)' A
Input
Output
B
(b)
(a)
FIGURE 40.19
(a) Resistor–transistor NOT gate, (b) resistor–transistor NAND gate. A
A+B (4.3V)
B
+5 v
A B
FIGURE 40.20
Diode–resistor logic.
A. B (5V HIGH) (0.7V LOW)
the logic devices that it is driving. The logic function operation becomes unreliable as output can get into the forbidden region. Further, the presence of resistors in the base–emitter loop tends to slow the device. Because of these limiting characteristics, RTL gates are obsolete.
Diode–Transistor Logic (DTL) Diodes themselves can be used to build logic gates for simple applications as shown in Fig. 40.20. The diode drops the voltage by 0.7 V across the pn-junction when conducting, resulting in 0.7 V for a LOW and 4.3 V for a HIGH at the output. It is readily seen that the cascading of several of these circuits will push the circuit into the forbidden region, resulting in erroneous logic. Moreover, the diode resistor logic cannot implement an inverter (NOT) function, and it is not practical to produce high density ICs with diodes and resistors. Because of these shortcomings, the diode-resistor logic gate is obsolete. A DTL gate is shown in Fig. 40.21. Here, the diodes are used for the OR function and the transistor is used for the NOT function to give a NOR gate. Still the presence of the resistor at the base of the transistor causes power dissipation and reduces the speed of operation. Figure 40.22 shows an improved diode–transistor design that eliminates the bias resistor, thereby improving the speed of operation. DTL devices are obsolete owing to the same limitations discussed earlier.
Transistor–Transistor Logic (TTL) In Fig. 40.22, it can be observed that the diodes at the input are forward biased while the diode at the base of the transistor is reverse biased when any input is LOW. On the other hand, when all inputs are HIGH, the base diode is forward biased and the transistor conducts, giving the NAND function. ©2002 CRC Press LLC
+V
(A+B)' A B
FIGURE 40.21
Diode–transistor logic NOR gate. +V
+V
(A.B)' A B
FIGURE 40.22
Improved diode–transistor NAND logic gate.
In a transistor npn, for example, the base–emitter is forward biased during conduction and collector– base is reverse biased. If we have a transistor with multiple emitter leads, then we can use the emitter–base junction for the input diodes. The base–collector junction is used for the base-diode in the DTL gate. The result is a TTL gate implementation of a NAND function in Fig. 40.23 [4]. Here, when any of the inputs is LOW, the base–emitter loop conducts and the emitter of the first stage transistor is at 0.2 V, giving HIGH for output at the inverter. When all the inputs are HIGH, the transistor multiple emitters (first stage) is cutoff. Therefore, all other transistors conduct with a logic LOW at output. The manufacturer’s data sheet for each device provides circuit diagrams, and all technical data including maximum and minimum input values, propagation delay, rise and fall times, fan-out, fan-in limitations, power consumption, and application suggestions. These are excellent sources of information for the designer.
Emitter-Coupled Logic (ECL) Emitter-coupled logic (ECL) devices are bipolar devices in which the transistor is never saturated or completely shut off. The result is very high speed compared to TTL or CMOS implementations. The ECL gates are used in several applications where high speed is essential, for example, computer cache memory. Figure 40.24 shows a NOR/OR gate [5]. VCC is connected to ground (0 V) while VEE is connected to supply voltage, -5.2 V for better noise immunity. The transition time from one state to another is less than 1 ns, resulting in several gigahertz operating frequency when ECL gates are used. Because the transistors are not fully saturated, the ECL gates output at HIGH and LOW are about –0.75 and –1.6 V, respectively. The bias voltage is set at the base of transistor Q4, the value is the average ©2002 CRC Press LLC
VCC 4 kΩ
(INPUTS)
1.6 kΩ
130 Ω
A B
Y (OUTPUT)
1 kΩ GND
FIGURE 40.23
Transistor–transistor logic implementation of a NAND gate [4].
VCC RC
Q5
RC Q
NOR OUT
A
Q1 B
R
Q2
Q3 P
Q4 Vbb
Q6 OR OUT
RE VEE
FIGURE 40.24
A
NOR
B
OR
Emitter-coupled logic NOR/OR gate [5].
of HIGH and LOW values for the gate; in this case, the value would be –1.175 V. Next, the resistors are selected to control the current flow and prevent transistor saturation. When the signal at A or B is HIGH (–0.75 V), the transistors conduct. The voltage at point P becomes –1.5 V (VBE of Q2 + VA). This reduces the difference between Vbb and the voltage at point P below the threshold for transistor Q3 to conduct and hence it is off, raising the voltage at point R to 0 V. This turns transistor Q6 on. With a VBE threshold of 0.75 V, the measured OR output is –0.75 V, a logic HIGH. The value of resistance RC and RE are chosen so that the voltage at point Q is -0.85 V when transistor Q1 or Q2 is conducting. It is true when B is HIGH and A is LOW or when A and B are both HIGH. When both A and B are LOW, the transistors Q1 and Q2 are off and Q3 conducts lowering the voltage at point P to –1.925 V. Voltage at point R is –0.85 V resulting in an OR output of –1.6 V at the OR output and -0.75 V at the NOR output. Because of the constant operation of the transistors in the active region, there is continuous current draw and hence heat dissipation. The ECL devices draw four to five times the power of a comparable TTL device. Hence, this is used cautiously as front-end devices where speed is essential, while using HCMOS or TTL gates elsewhere. In order to mix ECL gates with TTL or CMOS devices, special level shifters are used, for example, National Semiconductor’s 100325 Low Power ECL-to-TTL Translator. This device converts an ECL input (-0.75 (H) and –1.6 (L)) to a TTL output (2.4 V min. for HIGH and 0.5 V max. for LOW), while maintaining a rise or fall time of less than 1 ns.
©2002 CRC Press LLC
VCC
OUTPUT, X'
INPUT, X
FIGURE 40.25
An NMOS inverter.
Vcc
VCC
OUTPUT, (A+B)' INPUT, A
INPUT, A
OUTPUT, (A.B)'
INPUT, B
INPUT, B
(a)
FIGURE 40.26
(b)
(a) An NMOS NAND gate, (b) an NMOS NOR gate.
CMOS Logic As discussed earlier, MOSFET can be used as a transistor switch without significant power dissipation. NMOS logic gates are designed with n-MOSFETs and PMOS logic gates are designed with p-MOSFET transistors. As an example, an NMOS inverter is shown in Fig. 40.25. Figure 40.26(a) shows a logic NAND function when two n-MOSFETs are connected in series and Fig. 40.26(b) shows a parallel arrangement of two n-MOSFETs to give a NOR gate. The NMOS circuits shown have a pull-up resistor and a pull-down n-MOSFET. To eliminate the resistor, the pull-up side of the circuit is replaced with p-MOSFET. The modified NOT or inverter circuit is shown in a commercial implementation in Fig. 40.27 [3]. Additional diodes are shown for static protection of the device. This is known as a CMOS circuit since the pull-down and pull-up parts of the circuit have complimentary MOSFET devices. When two n-MOSFETs are connected in the pull-down side of the circuit in series, the pull-up resistor is replaced by two p-MOSFETs in parallel, and vice versa. A CMOS implementation of the NOR gate is shown in Fig. 40.28. An important characteristic of CMOS gates is their low-power consumption as there is practically no current flow in both HIGH and LOW states. However, the device is slower than a bipolar transistor device.
©2002 CRC Press LLC
VDD
VDD
_ G=A G
A INPUT
OUTPUT
VSS
FIGURE 40.27
A CMOS inverter [3]. Vcc
INPUT, A
OUTPUT, (A+B)'
INPUT, B
FIGURE 40.28
A CMOS NOR gate.
With decreasing transistor sizes due to advancements in fabrication technologies, the speed of CMOS devices continue to increase.
40.6 Logic Gate Integrated Circuits A commercial logic gate ICs has several gates of the same type on it. For example, Fig. 40.29 shows a commercial quad-AND gate IC. The chip itself is powered with Vcc and GND pins, A and B pins are inputs, and the Y pins are the corresponding outputs. You can use one or all of the gates on a chip as needed. ©2002 CRC Press LLC
1A 1B 1Y 2A 2B 2Y GND
FIGURE 40.29
1 2 3 4 5 6 7
14 13 12 11 10 9 8
Vcc 4B 4A 4Y 3B 3A 3Y
1A 1B
1Y
2A 2B
2Y
3A 3B
3Y
4A 4B
4Y Y=A.B
A DIP package of quad-AND gate IC.
The designation of the chips requires some attention. Let us take the Texas Instruments designations for an AND gate, namely, SN5408, SN54LS08, SN54S08, SN7408, SN74LS08, and SN74S08. While the designation shown on a device has much more information than what is shown here, the basic information that we should be aware of is the function designation (00 = NAND gate, 02 = NOR, 04 = Inverter, 08 = AND, etc.), and technology type (HC for high-speed CMOS, LS for low-power Schottky, etc.). For other notations used in chip designations, refer to the Texas Instruments Logic Selection Guide [1].
40.7 Programmable Logic Devices (PLD) Programmable logic devices (PLDs) are ICs with several uncommitted logic gates in them, the connections among which are programmable based on the logic circuit design that needs to be implemented. This is especially helpful when very large circuits consisting of several thousands of logic gates have to be built and tested. For large circuit design and testing, it is not practical to use standard logic gate ICs since each IC has at most four or six logic gates on it, requiring large circuit boards and interconnects. The PLD consists of several hundred logic gates on it and the device design is programmable with a special programming hardware. When more than one PLD is used to implement a design, programmable interconnects are used between PLDs. One type of fully PLD, called the programmable logic array (PLA), consists of an AND level in the middle and an OR level at output, similar to a TTL single logic gate structure, with both layers being programmable. All input signals are connected to an inverter level, which provides both the normal and complemented values of input variables to the AND level. Appropriate connections are made at the AND level and at the OR level to produce the desired logic outputs. In this device all the levels are programmable. A simpler version of PLD, called a programmable array logic (PAL) device, consists of a programmable AND layer and a fixed OR layer. This is easier and less expensive to manufacture, although it is not as flexible as a PLA. A variety of combinations is available to suit various needs. A schematic of a PLA is shown in Fig. 40.30 [6] where the connections to be made in the hardware are marked with an X. When programmed these connections will be made or “fused” and verified by the programming hardware.
40.8 Mechatronics Application Example A driver circuit for a DC motor is a good example for the use of transistors and logic gates. The objectives of the design are the following: 1. The motor should drive forward and reverse at different speeds. 2. The motor should either coast to a stop or brake abruptly. 3. The motor should drive at different speeds, controllable by a microprocessor. ©2002 CRC Press LLC
CLK/I
1
First Fuse Numbers
0
4
8
12
16
Increment 20 24 28
32
36
40
Asynchronous Reset (to all registers)
0 Macrocell 396 440
880 2
P=5808 R=5809 Macrocell
23
22
I/O/Q
I/O/Q
P=5810 R=5811
924 Macrocell 1452 3
21
I/O/Q
P=5812 R=5813
1496 Macrocell
2112 4 2156
FIGURE 40.30
I/O/Q
P=5814 R=5815 Macrocell
2860 5
20
19
I/O/Q
P=5816 R=5817
Programmable logic array (PLA) [6].
The complete logic and power circuit implementation of the solution to this design problem is shown in Fig. 40.31, which is known as the H-bridge. The motor is connected between the output pins (out1 and out2) [7]. The EN (enable) and IN1 (input 1) and IN2 (input 2) are the inputs. The behavior of the system is given by the adjacent table in Fig. 40.31. When the enable signal is LOW, regardless of the input states, all the AND gates are LOW, and the power transistors are all off and the motor is off. If the motor is moving when the enable line switches to LOW, the motor coasts to a stop. When the enable input is HIGH, it can be seen that when IN1 is high and IN2 is LOW, transistors 1 and 4 are on, and 2 and 3 are off. This drives the motor one way as the current can flow through the motor to the ground through the two diagonal transistors. Since transistors 2 and 3 are off, short circuit from power to ground is prevented. This is designed by inputting the complements of IN1 and IN2 to the AND gates driving transistors 3 and 4, respectively. When IN2 is HIGH and IN1 is LOW, the motor runs in the opposite direction (while the enable is HIGH). Since transistors 2 and 4 are closed and 1 and 3 are open, current flows in the opposite direction through the motor. When enable is HIGH, and the inputs IN1 and IN2 are either turned HIGH or LOW at the same time while the motor is moving, then the motor terminals are forced to Vcc or ground. However, the motor power is off since IN1 and IN2 are LOW. Now, the motor is a generator trying to maintain a potential difference across its terminal as the rotor moves in a magnetic field. The emf generated is forced to the source or sink potential. This brings the motor to a rapid stop, identified as the fast stop or the braking function. Further, the IN1 and IN2 lines can be used for direction and braking functions, while the enable can be pulsed at different duty cycle levels (pulse width modulation) to achieve different speeds. Since the motor is free running when enable is LOW regardless of input, as EN is switched rapidly, the inertia of the rotor helps smooth out the motion. The selection of pulse repetition time (PRT) and arrangement of pulses within the PRT in a uniform fashion to produce desired PWM signals should be done to finetune the performance of this system.
©2002 CRC Press LLC
100nF
D1
D2
M D3
D4
+Vs Out1 2
Out2 3
4
9
5
In1 In2 EnA
1
2
3
4
7 6 1 SENSE A
INPUTS In1=H In2 =L ENA=H In1=L In2=H In1 = In2 ENA=L In1=X In2 =X
FIGURE 40.31
8
RsA
FUNCTION FORWARD REVERSE FAST MOTOR STOP FREE RUNNING MOTOR STOP
H-bridge motor driver circuit [7].
References 1.“Logic Selection Guide, First Half 2001,” Texas Instruments, Document sdyu001o.pdf. Source: www.ti.com. 2. “Designing with Logic,” Texas Instruments, Document sdya009C.pdf. Source: www.ti.com 3.“CD4069UB Types- Quad-Inverter,” Texas Instruments, Datasheet, schs054.pdf, 1998. Source: www.ti.com. 4.“SN5400 Quadruple 2-Input Positive NAND-Gates,” Texas Instruments, Datasheet, sdls025.pdf, March 1988, Source: www.ti.com. 5.Koga, R., Crain, W.R., Hansel, S.J., Crawford, K.B., Pinkerton, S.D., Peozin, S.H., Moses, S.C., and Maher, M., “Ion Induced Charge Collection and SEU Sensitivity of Emitter Coupled Logic (ECL) Devices,” IEEE Trans on Nuclear Science, 42(6), 1823–1828, 1995. 6.High-performance Impact-X ™ Programmable Array Logic Circuits, TIBPAL22V10-7C, TI, 1995. Product datasheet. 7.“Dual Full-Bridge Driver L298,” SGS Thomson Microelectronics Datasheet. Source: www.st.com.
©2002 CRC Press LLC
41 Synchronous and Asynchronous Sequential Systems 41.1
Overview and Definitions Synchronous Sequential Systems • Flip-Flops and Latches • Mealy and Moore Models • Pulsed and Level Type Inputs • State Diagrams
41.2
Synchronous Sequential System Synthesis
41.3
Asynchronous Sequential System Synthesis
41.4 41.5
Design of Controllers’ Circuits and Datapaths Concluding Remarks
Design Steps Design Steps
Sami A. Al-Arian University of South Florida
41.1 Overview and Definitions Traditionally, digital systems have been classified into two general classes of circuits: combinational and sequential systems. Combinational systems are logic circuits in which outputs are determined by the present values of inputs. On the other hand, sequential systems represent the class of circuits in which the outputs depend not only on the present value of the inputs, but also on the past behavior of the circuit. In most systems a clock signal is used to control the operation of a sequential logic. Such a system is called a synchronous sequential circuit. When no clock signal is used, the system is referred to as asynchronous.
Synchronous Sequential Systems Figure 41.1 shows the general structure of a synchronous sequential system. The circuit has a set of primary inputs X and produces a set of primary outputs Z . In addition, it has sets of secondary inputs and outputs, Q + and Q , respectively. These sets of signals are inputs and outputs to state (or memory) elements or devices called flip-flops (FFs) or latches. The outputs of these devices constitute the present + states Q , while the inputs constitute the next states or Q . There are several types of such devices, as well as many variations of these types, namely, set-reset (SR), delay (D), trigger (T), and JK (a combination of SR and T) FFs and latches. Table 41.1 shows the behavior of each of these types.
Flip-Flops and Latches The outputs of the FFs or latches, which are sequential devices, are determined by the present values of their inputs as well as the values of their present states. However, FFs are edge-triggered devices, meaning that state transitions might take place only during one clock cycle. This clock transition is either positive edge
©2002 CRC Press LLC
TABLE 41.1 FF Behavior for SR, D, T, and JK Types FF Inputs
SR
D
T
JK
SR
D
T
JK
Q
Q+
Q
Q+
Q
Q+
Q
Q+
00 00 01 01 10 10 11 11
0 0 1 1
0 0 1 1
00 00 01 01 10 10 11 11
0 1 0 1 0 0
0 1 0 0 1 1
0 1 0 1
0 0 1 1
0 1 0 0
0 1 1 0
0 1 0 1 0 1 0 1
0 1 0 0 1 1 1 0
Not allowed
Note: Q is present state, Q+ is next state.
X
PIs Combinational Circuit
SIs
POs
Z
SOs
FFs or Latchea CK
FIGURE 41.1
General model for sequential circuits.
CK
J
K
QFF QLatch FIGURE 41.2
Timing diagram of JK FF and JK latch (note the transpaprent property in the latch).
(L to H transition) or negative edge (H to L transition). (The clock signal that causes the change in the state is usually referred to as the active clock edge.) On the other hand, a latch is a sequential device that might change the internal state of the device as long as the clock signal (or controlled input) is active (either active high or low). This property associated with latches is called the transparent property. Figure 41.2 shows an example of a timing diagram of a JK FF and JK latch.
Mealy and Moore Models Sequential circuits are also referred to as finite state machines (FSMs), which means that such circuits have a finite number of states to represent their behavior. Furthermore, FSMs are classified into two models: Mealy and Moore. Mealy circuits represent the class of circuits whose outputs (Z m ) depend on ©2002 CRC Press LLC
X
X/Z
Si
Si Z
(a) Mealy Model
FIGURE 41.3
(b) Moore Model
State diagrams for an FSM.
the present states (Q) and the primary inputs (X). On the other hand, Moore circuits represent the class of circuits whose outputs (Z M ) depend only on the present states (Q). An FSM could, of course, have both types in the same system.
Pulsed and Level Type Inputs The inputs to any sequential system could be of two types: pulsed or level. A pulsed input (whether active low or high) is an input that makes a transition (L to H or H to L), and then returns back to its inactive state. A level input is an input that makes a single transition (L to H or H to L) and stays in that state until the input changes its value. The number of finite states that the system may have would most definitely depend on the type of inputs the system has, whether pulsed or level. Hence, there are four major types of sequential circuits: 1. Pulsed synchronous. Sequential systems that have pulsed input signals and clocked state elements. 2. Level synchronous. Sequential systems that have level input signals and clocked state elements. 3. Pulsed asynchronous. Sequential systems that have pulsed input signals and unclocked state elements. 4. Level asynchronous. Sequential systems that have level input signals and unclocked state elements.
State Diagrams A state diagram is a tool used in sequential circuit synthesis. It represents the graphical representation of state transitions of the FSM. Each state is represented by a circle. If the machine is of Moore type, the output value is associated with the present state. However, if the machine is Mealy, then the output is associated with the present state and the input. Both types are illustrated in Fig. 41.3. The inputs are represented by arrows going from one state to another. For n inputs, the number of arrows going out of n each state is 2 for level type inputs, and n for pulsed type inputs. For example, if a sequential system has two level inputs X1 X2, there would be four arrows coming out of each state representing 00, 01, 10, and 11 inputs. On the other hand, in a pulsed input system, such as in a vending machine design where the inputs are quarters (Q), dimes (D), and nickels (N), the number of arrows coming out of each state is 3 representing Q, D, and N inputs.
41.2 Synchronous Sequential System Synthesis Let us design a synchronous sequential system that would meet the following requirements: 1. 2. 3. 4.
The circuit has four pulsed inputs X1, X2, X3, and X4, and one level output Z. All changes in the circuit occur on the positive edge of the clock. A level output (Z = 1) is to occur if the following sequence takes place: X2 X4 X3 X1. If two consecutive pulses of the same input pulse occur, the circuit would return back to the initial state.
©2002 CRC Press LLC
Design Steps There are six simple design steps as follows: 1. Given the above system specifications, the first step is to create the state diagram (SD). Figure 41.4 shows the state diagram for this problem. Note that there are five states (S0–S4). Each state has four arrows representing the n pulsed inputs (X1–X4). In addition, S0 represents the initial state. Also note that new states are created as needed according to the system’s specifications. It is not necessary to have the optimum number of states at this stage. 2. The next step is to translate the state diagram into a state table (ST), as shown in Table 41.2. Note that this step is a one-to-one mapping. 3. The next step is to minimize the number of states by creating the reduced state table (RST). There are several techniques that could be employed in this step, including inspection, partitioning, and the implication table. Two states are considered equivalent (and therefore could be merged) if (1) they go to the same next states under all inputs, and (2) they have the same outputs under all inputs. Once redundant or equivalent states are determined in this step, one can use the merger diagram in merging all redundant states where each state in the set is also equivalent to all other states in the same set of states. In this example, state S4 is shown to be equivalent to state S0, as shown in the implication table in Fig. 41.5. Note that a check mark is put in the S0–S4 box since both states have the same next states, as well as the same outputs under all the inputs. (Figure 41.6 shows an example of a merger diagram where several states were found to be equivalent because each was equal to all the others.) 4. The next step is state assignment (SA). State assignment is an important step because different assignments may yield different implementations and hence different costs. The number of distinct assignments (ND) is equal to the following: N
( 2 FF – 1 )! N D = -------------------------------------N ( 2 FF – N S )!N FF! TABLE 41.2 State Table for Synchronous Sequential Design Example Next State/Output Present State
X1
X2
X3
X4
S0 S1 S2 S3 S4
S 0 /0 S 2 /0 S 0 /0 S 0 /0 S 0 /0
S1/0 S 0 /0 S1/0 S1/0 S1/0
S 0 /0 S 0 /0 S 0 /0 S 4 /1 S 0 /0
S 0 /0 S 0 /0 S 3 /0 S 0 /0 S 0 /0
X1,X3,X4/0
X2/0
X4/0
S1
X2/0
X2/0
S0
S2
X1,X2,X3/0 X2/0
X1,X3,X4/0
X3/0
X1,X4/0
S4
X3,X4/0
X1/1
FIGURE 41.4
State diagram for syncronous sequential example.
©2002 CRC Press LLC
S3
S1
S2
(0,1) (0,2)
(0,3)
(0,1) (0,2) (0,3)
S3
FIGURE 41.5 example.
Implication
table
for
synchronous
S4 S0
(0,1) (0,2)
(0,3)
S1
S2
S3
1 7
6 2
5
FIGURE 41.6 Merger diagram example: equivalent states (1, 2), (3, 5, 7), and (4, 6), seven states collapse to three distinct states.
3
4
where NS represents the number of states in the RST, and NFF represents the number of flip-flops. N FF -1 N < N s < 2 FF. Hence, the number of distinct assignments with only nine states Note also that 2 and four flip-flops is over 10 million! Therefore, state assignments must adhere to some guidelines that would yield minimum implementations to optimize cost and reliability. The following is the set of three guidelines, which are listed according to their priority. The weight of each guideline could be set at 5 for guideline A, 3 for guideline B, and 1 for guideline C. Guideline A. Present states that have the same next states under a given input, must be given adjacent assignments. Guideline B. States that are next states for a present state under different inputs, must be given adjacent assignments Guideline C. Present states that have the same outputs under all inputs must be given adjacent assignments. The objective of these guidelines is to satisfy as much of these adjacencies as possible according to the weights given above. In the example given here, the following set of adjacencies is obtained from guidelines A and B (here guideline C is ignored). Guideline A: (S0, S1) × 2 (meaning two times), (S0, S2) × 3, (S1, S2), (S0, S3) × 3, (S2, S3) × 2, (S1, S3). Guideline B: (S0, S1) × 3, (S0, S2), (S0, S3), (S1, S3). Hence, the total weight for the following adjacencies is (S0, S1): 19, (S0, S2): 18, (S0, S3): 18, (S1, S2): 5, (S2, S3): 10, (S1, S3): 8. Therefore, the following assignments are given: S0 = 00, S1 = 01, S2 = 10, and S3 = 11, where the following adjacencies are satisfied: (S0, S1), (S0, S2), (S1, S3), and (S2, S3). Although this state assignment is not unique, it clearly yields efficient implementation. 5. In this step the FF type is chosen, and the next state as well as the output equations are derived. The next state equations are derived either through the characteristic equations, or through deriving the state transition table, where each FF input is determined for each state transition from present state to next state. The characteristic equations for the FFs are given in Fig. 41.7, ©2002 CRC Press LLC
TABLE 41.3
FF Input Values for State Transitions
Q
Q+
S
R
D
T
J
K
0 0 1 1
0 1 0 1
0 1 0 d
d 0 1 0
0 1 0 1
0 1 1 0
0 1 d d
d d 1 0
Note: Q is present state, Q+ is next state.
+
Q SR= S + R′Q
+
QD = D
+
+
Q T = TQ′ + T′Q FIGURE 41.7
Q JK = JQ′ + K′Q
FFs characteristic equations.
Q 2 = Q 2 Q 1′ X 3 + Q 2′ Q 1 X 4 +
Q 1 = Q 1 X 2 + Q ′2X 2 + Q 2 Q ′1X 3 +
Z = Q2 Q1 X1
FIGURE 41.8
J2 = Q1 X4
K2 = X1 + X2 + Q1 X3 + X4
J1 = X2 + Q2 X3
K 1 = X 1 + Q 2′ X 2 + X 3 + X 4
Next states (Q +2 , Q +1 ), output (Z), and JK FF inputs equations.
X4
X3
Q1 X1 X2
X3
Q2 Q2
J1 K1
Q1 Q 1'
Z
Q X1
J2 K2
Q2
X1
X4
X2 Q 2'
FIGURE 41.9
CK
Implementation of synchronous design example.
while the state transition table for each type is given in Table 41.3. The next state and output equations for this example using JK FFs are shown in Fig. 41.8. 6. The next step is implementation or realization. Figure 41.9 shows the implementation of this design using JK FFs. Note that each term in the next state equation is obtained for each pulsed input using separate Kmaps. If the inputs were of level type, the K-map for each FF input would then include all the primary inputs. ©2002 CRC Press LLC
41.3 Asynchronous Sequential System Synthesis Synchronous sequential circuits operate with clocks that control the total operation of the system. Such synchronous sequential circuits are called to operate in a pulse mode behavior. On the other hand, in an asynchronous sequential system, changes in the state of the system are not triggered by clock pulses. Instead, changes in the state of the system depend on changes in the primary inputs. However, since a good and reliable design requires the primary inputs to the circuit to change only one at a time, then such changes must allow enough time to elapse in order to reach a stable state. A stable state is achieved when all internal elements no longer change their values. A circuit that adheres to this behavior is called a fundamental mode circuit. A main advantage of asynchronous circuits is their speed of operation. Since there is no clock (which must be at least as long as the slowest path in the circuit), the speed would be equal to the propagation path delay in the local portion of the circuit. Hence, the performance of the overall system could be enhanced. However, the major disadvantages of the asynchronous system are races and hazards, both static and dynamic. These race conditions and hazards make asynchronous circuits more difficult to deal with, and hence, they must be designed with care. An asynchronous sequential synthesis is illustrated through the following example. Let us design a fundamental mode circuit that has two inputs (X1, X2) and one output Z. The output Z would change its value from 0 to 1 when X2 changes its value from 1 to 0, while X1 = 1. Likewise, the output Z would change its value from 1 to 0 when X1 changes its value from 0 to 1, while X2 = 1. Note that only one input at a time may change its value. Also note that a steady-state output occurs only when the state is stable. Otherwise, the output is a “don’t care” (illustrated in the flow table as –).
Design Steps Similar to the synchronous system design, there are also six steps in designing this asynchronous system. 1. The first step is to create the initial state diagram (SD) and the primitive flow table (PFT) for the asynchronous system. Figure 41.10 and Table 41.4 show the SD and PFT for this example, respectively. Note that stable states are circled. In addition, the PFT may have only one stable state per row. Also note the new terminology for the asynchronous circuit. What was called a state table in a synchronous system is referred to as a flow table in an asynchronous system. Since only one input is allowed to change at a time, the entry to multiple input changes is “don’t care” or –/–. In this example, the PFT has six stable states 1–6. 2. The next step is to use the implication table for the PFT, as shown in Fig. 41.11. The implication table shows that (1, 2), (1, 3), (3, 5), and (4, 6) are compatible rows. That means that under each 00
00 01
01
10
1 2
3
11
11
00
00 11
4
11
01 10
5
10
01 6
10
FIGURE 41.10
Primitive flow table for an asynchronous design example.
©2002 CRC Press LLC
01
TABLE 41.4
Primitive Flow Table (PFT) for Asyncronous Design Example Next State / Output
Previous Present Input State
X2 X1
00
01
11
10
2/-
-/-
3/-
/0
4/-
-/-
5/-
00
1
01
2
1/-
10
3
1/-
-/-
11
4
-/-
6/-
4
/0
3/-
11
5
-/-
6/-
5
/1
3/-
01
6
1/-
4/-
-/-
1
TABLE 41.5
/0
6
/1
3
/0
Reduced Flow Table (RFT) for Asyncronous Design Example
Present State
X2X1 00
A
A
B
A/-
C
2
/0
A/-
Next State / Output 01 11 A
/0
C/-
B
C/-
C
10
/1
C
B/-
B
/1
/0
B/-
/0
2 3
4,5
4 2,6
2,6
5 6
FIGURE 41.11
Implication table for the PFT.
2,6
2,6 4,5 4,5
2,6 1
4,5
2
3
4,5 4
5
input the stable states either go to the same next states and have the same outputs, or at least they do not contradict. Hence, the corresponding merger diagram shows that the PFT can be reduced to a 3-state flow table. The new reduced final states in the flow table are then the three nonbinary states, A, B, and C. State A is (1, 2), state B is (3, 5), and state C is (4, 6). Table 41.5 shows the reduced flow table. In this flow table, we have more than one stable state per row. Note that when states are combined, the “don’t care” entries are replaced with the actual states under a given input. ©2002 CRC Press LLC
TABLE 41.6 Flow Table (FT) with an Added Cycle D to Eliminate A Critical Race State Assignment
00
Present State A
Next State / Output X2X1 00 A
/0
01
B
A/-
10
C
A/-
11
D
-/-
01
A
C
11
/0
C/-
D/-
B
/1
C
C/-
A
B
/0
/0
B/-
-/-
-/-
B
01
C A(00)
FIGURE 41.13 State transitions through cycle D. Note that B goes to C through cycle D.
B/-
/1
00,10
11 FIGURE 41.12 State transition. AB transitions are noncritical; AC, BC are critical transitions.
10
C(10)
B(01)
D(11)
3. The next step is the state assignment. Here again, each state must be given adjacent assignments if there is a state transition between any two stable states. As long as there are more than two stable states per row, then all transitions between the states are considered critical. Figure 41.12 shows all critical transitions between the stable states. Each line represents a transition with its corresponding input value indicated on the line. Note that input 00 is not a critical transition because it has only one stable state (A). But if a critical transition exists, we must have adjacent assignments in order to avoid the problem of a critical race, where we might end up in a different stable state when multiple input changes occur. Our state assignment in Fig. 41.12 shows that we must have three adjacencies (A, B), (A, C), and (B, C). But since we can have only two adjacencies with two variables, then we can either give multiple assignments per stable state or create cycles. The disadvantage of the first method is the fact that we may have more logic because of the added states, which would consequently add to the cost and reduce the performance (i.e., speed.) The second method is the creation of cycles. This method would also affect the performance with the added delay of cycles. In this example, an added cycle with no stable states is created between states B and C in order to ensure the transition between the two states. In this problem, state D is a cycle created between states B and C, as shown in Fig. 41.13. Hence, states B and C can only make transitions between them through the newly created cycle in state D. The new flow table is shown in Table 41.6. ©2002 CRC Press LLC
TABLE 41.7 Encoded Excitation and Output Table Present State
X2X1 00
00
00 / 0
Next State / Output 01 11
10
00 / 0
10 / -
01 / -
01
00 / -
11 / -
01 / 1
01 / 0
10
00 / -
10 / 1
10 / 0
01 / -
-/-
-/-
11
-/-
10 / -
+ Y 2 = D 2 = Y 2 X 1 + Y 1 X ′2X 1 + Y ′1X 2 X 1
Y 1 = D 1 = X 2 X ′1 +Y ′2Y 1 X 1 +
Z = Y 2 X ′2 + Y 1 X 1 FIGURE 41.14
Excitation and output equations.
Y2X1 Y1X2'X1 D2 Y2
Y1'X2X1 X2X1'
D1 Y1
Y2'Y1X1 Y2 X2' Y1
Z
X1
FIGURE 41.15
Implementation of asynchronous example.
4. The next step is the derivation of the encoded excitation and output tables. This is shown in + + Table 41.7. Again stable states are circled. While Y2Y1 represent the present state, Y 2 Y 1 represent the next state. 5. The next step is to derive the corresponding excitation (or next state) as well as the output equations, as shown in Fig. 41.14. 6. A logical implementation or realization of the above equations is shown in Fig. 41.15.
©2002 CRC Press LLC
FIGURE 41.16 ASM chart and datapaths for syncronous design for vending machine controller, and FF input and output equations.
41.4 Design of Controllers’ Circuits and Datapaths Controller circuits could be designed using synchronous as well asynchronous circuits. In most cases, synchronous designs are preferred in order to avoid races and hazards. Asynchronous circuits are not recommended because the delays are not controlled by the designer. However, asynchronous circuits are at times unavoidable since they are much faster and because sometimes they do exist locally in a much larger synchronous system. A formal design methodology for controllers or processors is the use of the algorithmic state machines (ASM). An ASM diagram is a type of flowchart that can be used to represent the state transitions and the generated outputs for an FSM. Each state is represented by a rectangular box, while the inputs are tested through a diamond box. Outputs are indicated either as conditional with the use of an oval-shaped box (Mealy-type outputs) or unconditional inside the state boxes (Moore-type outputs.) The datapaths of the system are shown as transitions from state to state. In a synchronous system, state transitions take place with clock transitions. On the other hand, asynchronous systems may have state transitions when changes in inputs take place. A designer must analyze such a circuit very carefully in order to make sure that the circuit would operate according to its specifications, especially when sometimes asynchronous inputs are unavoidable. As an example, let us design a controller circuit for a coffee machine. The cost of the coffee is 25 cents. Nickels (N), dimes (D), and quarters (Q) are accepted. However, no coin change is allowed. The output is dispensed immediately after 25 cents are deposited. Figure 41.16 shows the design steps, datapaths, and implementation of a synchronous controller circuit.
©2002 CRC Press LLC
41.5 Concluding Remarks Most digital designs are sequential systems. Such systems may be synchronous or asynchronous. Synchronous systems have a clock that controls the operation of the system. The performance of such a system is as good as the speed of its clock. But synchronous systems avoid the problems of hazards and races. On the other hand, asynchronous circuits and controllers are much faster but may include races. A race may occur whenever a state transition requires the change of two or more of the state variables simultaneously. The race is between different variables to see which one changes first. A critical race may force the circuit to end up in different stable states. Critical races may be eliminated by carefully studying and analyzing the circuit.
©2002 CRC Press LLC
42 Architecture 42.1 42.2 42.3
Introduction Types of Microprocessors Major Components of a Microprocessor Central Processor • Input/Output Subsystem • System Interconnection
Daniel A. Connors University of Colorado at Boulder
Wen-mei W. Hwu University of Illinois at Urbana-Champaign
42.4 42.5
Instruction Set Architecture Instruction Level Parallelism Dynamic Instruction Execution • Predicated Execution • Speculative Execution
42.6
Industry Trends Computer Microprocessor Trends • Embedded Microprocessor Trends • Microprocessor Market Trends
42.1 Introduction The microprocessor industry is divided into the computer and embedded sectors. Both computer and embedded microprocessors share aspects of computer design, instruction set architecture, organization, and hardware. The term “computer architecture” is used to describe these fundamental aspects and, more directly, refers to the hardware components in a computer system and the flow of data and control information among them. In this chapter, various types of microprocessors will be described, fundamental architecture mechanisms relevant in the operation of all microprocessors will be presented, and microprocessor industry trends discussed.
42.2 Types of Microprocessors Computer microprocessors are designed for use as the central processing units (CPU) of computer systems such as personal computers, workstations, servers, and supercomputers. Although microprocessors started as humble programmable controllers in the early 1970s, virtually all computer systems built in the 1990s use microprocessors as their central processing units. The dominating architecture in the computer microprocessor domain today is the Intel 32-bit architecture, also known as IA-32 or X86. Other high-profile architectures in the computer microprocessor domain include Compaq-Digital Alpha, HP PA-RISC, Sun Microsystems SPARC, IBM/Motorola PowerPC, and MIPS. Embedded microprocessors are increasingly used in consumer and telecommunications products to satisfy the demands for quality and functionality. Major product areas that require embedded microprocessors include digital TV, digital cameras, network switches, high-speed modems, digital cellular phones, video games, laser printers, and automobiles. Future improvements in energy consumption, fabrication cost, and performance will further enable new applications such as the hearing aid. Many experts expect that embedded microprocessors will form the fastest growing sector of the semiconductor business in 1 the next decade.
©2002 CRC Press LLC
Embedded microprocessors have been categorized into DSP processors and embedded CPUs due to historic reasons. DSP processors have been designed and marketed as special-purpose devices that are mostly programmed by hand to perform digital signal processing computations. A recent trend in the DSP market is to use compilers to alleviate the need for tedious hand-coding in DSP development. Another recent trend in the DSP market is toward integrating a DSP processor core with application-specific logic to form a single-chip solution. This approach is enabled by the fast increasing chip density technology. The major benefit is reduced system cost and energy consumption. Two general types of DSP cores are available to application developers today. Foundry-captive DSP cores and related application-specific logic design services are provided by major semiconductor vendors such as Texas Instruments, Lucent Technologies, and SGS-Thompson to application developers who commit to their fabrication lines. A very large volume commitment is usually required to use the design service. Licensable DSP cores are provided by small to medium design houses to application developers who want to be able to choose fabrication lines. There are several ways that the needs of embedded computing differ from those of the more traditional general-purpose systems. Constraints on the code size, weight, and power consumption place stringent requirements on embedded processors and the software they execute. Also, constraints rooted in realtime requirements are often a significant consideration in many embedded systems. Furthermore, cost is a severe constraint on embedded processors. Embedded CPUs are used in products where the computation involved resembles that of generalpurpose applications and operating systems. Embedded CPUs have been traditionally derived from outof-date computer microprocessors. They often reuse the compiler and related software support developed for their computer cousins. Recycling the microprocessor design and compiler software minimizes engineering cost. A trend in the embedded CPU domain is similar to that in the DSP domain: to provide embedded CPU cores and application specific logic design services to form single-chip solutions. For example, MIPs customized its embedded CPU core for use in Nintendo64, in return for engineering fees and royalty streams. ARM, NEC, and Hitachi offer similar products and services. Due to an increasing need to perform DSP computation in consumer and telecommunication products, an increasing number of embedded CPUs have extensions to enable more effective DSP computation. Contrary to the different constraints and product markets, both computer and embedded microprocessors share traditional elements of computer architecture. These main elements will be described. Additionally, over the past decade, substantial research has gone into the design of microprocessors embodying parallelism at the instruction level, as well as aggressive compiler optimization and analysis techniques for harnessing this opportunity. Much of this effort has since been validated through the proliferation of mainstream general-purpose computers based on these technologies. Nevertheless, growing demand for high performance in embedded computing systems is creating new opportunities to leverage these techniques in application-specific domains. The research of Instruction-Level Parallelism (ILP) has developed a distinct architecture methodology referred to as Explicitly Parallel Instruction Computing (EPIC) technology. Overall, these techniques represent fundamental substantial changes in computer architecture.
42.3 Major Components of a Microprocessor The main hardware of a microprocessor system can be divided into sections according to their functionalities. A popular approach is to divide a system into four subsystems: the central processor, the memory subsystem, the input/output (I/O) subsystem, and the system interconnection. Figure 42.1 shows the connection between these subsystems. The main components and characteristics of these subsystems will be described.
Central Processor A modern microprocessor’s central processor system can typically be further divided into control, data path, pipelining, and branch prediction hardware. ©2002 CRC Press LLC
FIGURE 42.1
Architecture subsystems of a computer system.
Control Unit The control unit of a microprocessor generates the control signals to orchestrate the activities in the data path. There are two major types of communication lines between the control unit and the data path: the control lines and the condition lines. The control lines deliver the control signals from the control unit to the data path. Different signal values on these lines trigger different actions in the data path. The condition lines carry the status of the execution from data path to the control unit. These lines are needed to test conditions involving the registers in the data path in order to make future control decisions. Note that the decision is made in the control unit, but the registers are in the data path. Therefore, the conditions regarding the register contents are formed in the data path and then shipped to the control unit for decision-making. A control unit can be implemented with hardwiring, microprogramming, or a combination of both. In a hardwired design, each control unit is viewed as an ordinary sequential circuit. The design goals are to minimize the component count and to maximize the operation speed. The finite state machine is realized with registers, logic, and wires. Once constructed, the design can be changed only through physically rewiring the unit. Therefore, the resulting circuits are called hardwired control units. Due to design optimizations, the resulting circuits often exhibit little structure. The lack of structure makes it very difficult to design and debug complicated control units with this technique. Therefore, hardwiring is normally used when the control unit is relatively simple. Most of the design difficulties in the hardwired control units are due to the effort of optimizing the combinational circuit. If there is a method that does not attempt to optimize the combinational circuit, the design complexity could be significantly reduced. One obvious option is to use either read-only memory (ROM) or random access memory (RAM) to implement the combinational circuit. A control unit whose combinational circuit is simplified by the use of ROM or RAM is called a microprogrammed control unit. The memory used is called control memory (CM). The practice of realizing the combinational circuit in a control unit with ROM/RAM is called microprogramming. The concept of microprogramming was first introduced by Wilkes. The idea of using a memory to implement a combinational circuit can be illustrated with a simple example. Assume that we are to implement a logic function with three input variables, as described in the truth table illustrated in Fig. 42.2(a). A common way to realize this function is to use Karnaugh maps to derive highly optimized logic and wiring. The result is shown in Fig. 42.2(b). The same function can also be realized in memory. In this method, a memory with eight 1-bit locations can be used to retain the eight possible combinations of the three-input variable. Location i contains an F value corresponding to the ith input combination. For example, location 3 contains the F value (0) for the input combination 011. The three input variables are then connected to the address input of the memory to complete the design (Fig. 42.2(c)). In essence, the memory implicitly contains the entire truth table. Considering the ©2002 CRC Press LLC
FIGURE 42.2
Using memory to simplify logic design: (a) Karnaugh map, (b) logic, (c) memory.
FIGURE 42.3
Basic model of microprogrammed control units.
decoding logic and storage cells involved in a 8 × 1 memory, it is obvious that the memory approach uses a lot more hardware components than the Karnaugh map approach. However, the design is much simpler in the memory approach. Figure 42.3 illustrates the general model of a microprogrammed control unit. Each control memory location consists of an address field and some control fields. The address field plus the next address logic implements the combinational circuit for generating the next state value. The control fields implement the combinational circuit for generating the control signal. Both the control memory and the next address logic will be studied in detail in this section. The state register/counter has been renamed the Control Memory Address Register (CMAR) for an obvious reason: the contents of the register are used as the address input to the control memory. An important insight is that the CMAR stores the state of the control unit. Data Path The data path of a microprocessor contains the main arithmetic and logic execution units required to execute instructions. Designing the data path involves analyzing the function(s) to be performed, then specifying a set of hardware registers to hold the computation state, and designing computation steps to transform the contents of these registers into the final result. In general, the functions to be performed will be divided into steps, each of which can be done with a reasonable amount of logic in one clock cycle. Each step brings the contents of the registers closer to the final result. The data path must be equipped with a sufficient amount of hardware to allow these computation steps in one clock cycle. The data path of a typical microprocessor contains integer and floating-point register files, ten or more functional units
©2002 CRC Press LLC
for computation and memory access, and pipeline registers. One must understand the concept of pipelining in order to understand the data paths of today’s microprocessors. Pipelining In the 1970s, only supercomputers and mainframe computers were pipelined. Today, most commercial microprocessors are pipelined. In fact, pipelining has been a major reason why microprocessors today outperform supercomputers built less than 10 years ago. Pipelining is a technique to coordinate parallel 2 processing of operations. This technique has been used in assembly lines of major industries for more than a century. The idea is to have a line of workers specializing in different pieces of work required to finish a product. A conveying belt carries each product through the line of workers. Each worker will do a small piece of work on each product. Each product is finished after it is processed by all the workers in the assembly line. The obvious advantage of pipelining is to allow one worker to immediately start working on a new product after finishing the work on a current product. The same methodology is applied to instruction processing in microprocessors. Figure 42.4(a) shows an example five-stage pipeline dividing instruction execution into Fetch (F), Decode (D), Execute (E), Memory (M), and Write-back (W) operations, each requiring various stage-specific logic. Between each stage is a stage register (SR) used to hold the instruction information necessary to control the instruction. A very basic principle of pipelining is that the work performed by each stage must take about the same amount of time. Otherwise, the efficiency will be significantly reduced because one stage becomes a bottleneck of the entire pipeline. Similarly, the time duration of the slowest pipeline stage determines the overall clock frequency of the processor. Due to this constraint and the characteristics of memory speeds, the five-stage pipeline model often requires some of the principle five stages to be divided into smaller stages. For instance, the memory stage may be divided into three stages, allowing memory accesses to be pipelined and the overall processor clock speed to be a function of a fraction of the memory access latency.
FIGURE 42.4
Pipeline architecture: (a) machine, (b) overlapping instructions.
©2002 CRC Press LLC
The time required to finish N instructions in a pipeline with K stages can be calculated. Assume a cycle time of T for the overall instruction completion, and an equal T/K processing delay at each stage. With a pipeline scheme, the first instruction completes the pipeline after T, and there will be a new instruction out of the pipeline per stage delay T/K. Therefore, the delays of executing N instructions with and without pipelining, respectively, are
T * (N)
(42.1)
T + ( T/k ) * ( N – 1 )
(42.2)
There is an initial delay in the pipeline execution model before each stage has operations to execute. The initial delay is usually called pipeline start-up delay (P), and is equal to total execution time of one instruction. The speed-up of a pipelined machine relative to a nonpipelined machine is calculated as
P*N ---------------------------P + (N – 1)
(42.3)
When N is much larger than the number of pipestages P, the ideal speed-up approaches P. This is an intuitive result since there are P parts of the machine working in parallel, allowing the execution to go about P times faster in ideal conditions. The overlap of sequential instructions in a processor pipeline is shown in Fig. 42.4(b). The instruction pipeline becomes full after the pipeline delay of P = 5 cycles. Although the pipeline configuration executes operations in each stage of the processor, two important mechanisms are constructed to ensure correct functional operation between dependent instructions in the presence of data hazards. Data hazards occur when instructions in the pipeline generate results that are necessary for later instructions that are already started in the pipeline. In the pipeline configuration of Fig. 42.4(a), register operands are initially retrieved during the decode stage. However, the execute and memory stage can define register operands and contain the correct current value but are not able to update the register file until the later write-back execution stage. Forwarding (or bypassing) is the action of retrieving the correct operand value for an executing instruction between the initial register file access and any pending instruction’s register file updates. Interlocking is the action of stalling an operation in the pipeline when conditions cause necessary register operand results to be delayed. It is necessary to stall early stages of the machine so that the correct results are used, and the machine does not proceed with incorrect values for source operands. The primary causes of delay in pipeline execution are initiated due to instruction fetch delay and memory latency. Branch Prediction Branch instructions pose serious problems for pipelined processors by causing hardware to fetch and execute instructions until the branch instructions are completed. Executing incorrect instructions can result in severe performance degradation through the introduction of wasted cycles into the instruction stream. There are several methods for dealing with pipeline stalls caused by branch instructions. The simplest performance scheme handles branches by treating every branch as either taken or not taken. This treatment can be set for every branch or determined by the branch opcode. The designation allows the pipeline to continue to fetch instructions as if the branch was a normal instruction. However, the fetched instruction may need to be discarded and the instruction fetch restarted when the branch outcome is incorrect. Delayed branching is another scheme which treats the set of sequential instructions following a branch as delay slots. The delay-slot instructions are executed whether or not the branch instruction is taken. Limitations on delayed branches are caused by the compiler and program characteristics being unable to support numerous instructions that execute independent of the branch direction. Improvements have been introduced to provide nullifying branches, which include a predicted direction for the branch. When the prediction is incorrect, the delay-slot instructions are nullified. ©2002 CRC Press LLC
FIGURE 42.5
Branch prediction.
A more modern approach to reducing branch penalties uses hardware to dynamically predict the outcome of a branch. Branch prediction strategies reduce overall branch penalties by allowing the hardware to continue processing instructions along the predicted control path, thus eliminating wasted cycles. Efficient execution can be maintained while branch targets are correctly predicted. However, a large performance penalty is incurred when a branch is mispredicted. Branch target buffer is a cache structure that is accessed in parallel with the instruction fetch. It records the past history of branch instructions so that a prediction can be made while the branch is fetched again. This prediction method adapts the branch prediction to the run-time program behavior, generating a high prediction accuracy. The target addresses of the branch is also saved in the buffer so that the target instruction can be fetched immediately if a branch is predicted taken. 3 Several methodologies of branch target prediction have been constructed. Figure 42.5 illustrates several general branch prediction schemes. The most common implementation retains history information for each branch as shown in Fig. 42.5(a). The history includes the previous branch directions for making predictions on future branch directions. The simplest history is last taken, which uses 1-bit to recall whether the branch condition was taken or not taken. A more effective branch predictor uses a 2bit saturating state history counter to determine the future branch outcome similar to Fig. 42.5(b). Two bits rather than 1 bit allows each branch to be tagged as strongly or weakly taken or not taken. Every correct prediction reinforces the prediction, while an incorrect prediction weakens it. It takes two consecutive mispredictions to reverse the direction (whether taken or not taken) of the prediction. Recently, more complex two-level adaptive branch prediction schemes have been built, which use two levels of branch history to make predictions, as shown in Fig. 42.5(c). The first level is the branch outcome history of the last branches encountered. The second level is the branch behavior for the last occurrences of a specific pattern of branch histories. There are alternative ways of constructing both levels of adaptive branch prediction schemes, the mechanisms can contain information that is either based on individual branches, groups (set-based), and all (global). Individual formation contains the branch history for each branch instruction. Set-based information groups branches according to their instruction address, thereby forming sets of branch history. Global information uses a global history containing all branch outcomes. The second level containing branch behaviors can also be constructed using any of the three types. In general, the firstlevel branch history pattern is used as an index into the second-level branch history. Memory Subsystem The memory system serves as a repository of information in a microprocessor system. The processing unit retrieves information stored in memory, operates on the information, and returns new information back to memory. The memory system is constructed of basic semiconductor DRAM units called modules or banks. ©2002 CRC Press LLC
There are several properties of memory, including speed, capacity, and cost that play an important role in the overall system performance. The speed of a memory system is the key performance parameter in the design of the microprocessor system. The latency (L) of the memory is defined as the time delay from when the processor first requests data from memory until the processor receives the data. Bandwidth (BW) is defined as the rate at which information can be transferred from the memory system. Memory bandwidth and latency are related to the number of outstanding requests (R) that the memory system can service:
L BW = --R-
(42.4)
Bandwidth plays an important role in keeping the processor busy with work. However, technology tradeoffs to optimize latency and improve bandwidth often conflict with the need to increase the capacity and reduce the cost of the memory system. Cache Memory Cache memory, or simply cache, is a small, fast memory constructed using semiconductor SRAM. In modern computer systems, there is usually a hierarchy of cache memories. The top-level cache is closest to the processor and the bottom level is closest to the main memory. Each higher level cache is about 5–10 times faster than the next level. The purpose of a cache hierarchy is to satisfy most of the processor memory accesses in one or a small number of clock cycles. The top-level cache is often split into an instruction cache and a data cache to allow the processor to perform simultaneous accesses for instructions and data. Cache memories were first used in the IBM mainframe computers in the 1960s. Since 1985, cache memories have become a standard feature for virtually all microprocessors. Cache memories exploit the principle of locality of reference. This principle dictates that some memory locations are referenced more frequently than others, based on two program properties. Spatial locality is the property that an access to a memory location increases the probability that the nearby memory location will also be accessed. Spatial locality is predominantly based on sequential access to program code and structured data. Temporal locality is the property that access to a memory location greatly increases the probability that the same location will be accessed in the near future. Together, the two properties ensure that most memory references will be satisfied by the cache memory. There are several different cache memory designs: direct-mapped, fully associative, and set associative. Figure 42.6 illustrates the two basic schemes of cache memory, direct-mapped and set associative.
FIGURE 42.6
Cache memory: (a) direct-mapped design, (b) two-way set-associative design.
©2002 CRC Press LLC
Direct-mapped cache, shown in Fig. 42.6(a) allows each memory block to have one place to reside within a cache. Fully associative cache, shown in Fig. 42.6(b), allows a block to be placed anywhere in the cache. Set-associative cache restricts a block to a limited set of places in the cache. Cache misses are said to occur when the data requested does not reside in any of the possible cache locations. Misses in caches can be classified into three categories: conflict, compulsory, and capacity. Conflict misses are misses that would not occur for fully associative caches with LRU (least recently used) replacement. Compulsory misses are misses required in cache memories for initially referencing a memory location. Capacity misses occur when the cache size is not sufficient to contain data between references. Complete cache miss definitions are provided in Ref. 4. Unlike memory system properties, the latency in cache memories is not fixed and depends on the delay and frequency of cache misses. A performance metric that accounts for the penalty of cache misses is effective latency. Effective latency depends on the two possible latencies, hit latency (LHIT), the latency experienced for accessing data residing in the cache, and miss latency (LMISS), the latency experienced when accessing data not residing in the cache. Effective latency also depends on the hit rate (H), the percentage of memory accesses that are hits in the cache, and the miss rate (M or 1 – H), the percentage of memory accesses that miss in the cache. Effective latency in a cache system is calculated as
L effective = L HIT * H + L MISS * ( 1 – H )
(42.5)
In addition to the base cache design and size issues, there are several other cache parameters that affect the overall cache performance and miss rate in a system. The main memory update method indicates when the main memory will be updated by store operations. In write-through cache, each write is immediately reflected to the main memory. In write-back cache, the writes are reflected to the main memory only when the respective cache block is replaced. Cache block allocation is another parameter and designates whether the cache block is allocated on writes or reads. Last, block replacement algorithms for associative structures can be designed in various ways to extract additional cache performance. These include LRU, LFU (least frequently used), random, and FIFO (first-in, first-out). These cache management strategies attempt to exploit the properties of locality. Spatial locality is exploited by deciding which memory block is placed in cache, and temporal locality is exploited by deciding which cache block is replaced. Traditionally, when cache service misses, they would block all new requests. However, non-blocking cache can be designed to service multiple miss requests simultaneously, thus alleviating delay in accessing memory data. In addition to the multiple levels of cache hierarchy, additional memory buffers can be used to improve 2 cache performance. Two such buffers are a streaming/prefetch buffer and a victim cache. Figure 42.7 illustrates the relation of the streaming buffer and victim cache to the primary cache of a memory system.
FIGURE 42.7
Advanced cache memory system.
©2002 CRC Press LLC
A streaming buffer is used as a prefetching mechanism for cache misses. When a cache miss occurs, the streaming buffer begins prefetching successive lines starting at the miss target. A victim cache is typically a small, fully associative cache loaded only with cache lines that are removed from the primary cache. In the case of a miss in the primary cache, the victim cache may hold additional data. The use of a victim cache can improve performance by reducing the number of conflict misses. Figure 42.7 illustrates how cache accesses are processed through the streaming buffer into the primary cache on cache requests, and from the primary cache through the victim cache to the secondary level of memory on cache misses. Overall, cache memory is constructed to hold the most important portions of memory. Techniques using either hardware or software can be used to select which portions of main memory to store in cache. However, cache performance is strongly influenced by program behavior and numerous hardware design alternatives. Virtual Memory Cache memory illustrated the principle that the memory address of data can be separate from a particular storage location. Similar address abstractions exist in the two-level memory hierarchy of main memory and disk storage. An address generated by a program is called a virtual address, which needs to be translated into a physical address or location in main memory. Virtual memory management is a mechanism, which provides the programmers with a simple uniform method to access both main and secondary memories. With virtual memory management, the programmers are given a virtual space to hold all the instructions and data. The virtual space is organized as a linear array of locations. Each location has an address for convenient access. Instructions and data have to be stored somewhere in the real system; these virtual space locations must correspond to some physical locations in the main and secondary memory. Virtual memory management assigns (or maps) the virtual space locations into the main and secondary memory locations. The mapping of virtual space locations to the main and secondary memory is managed by the virtual memory management. The programmers are not concerned with the mapping. The most popular memory management scheme today is demand paging virtual memory management, where each virtual space is divided into pages indexed by the page number (PN). Each page consists of several consecutive locations in the virtual space indexed by the page index (PI). The number of locations in each page is an important system design parameter called page size. Page size is usually defined as a power of two so that the virtual space can be divided into an integer number of pages. Pages are the basic unit of virtual memory management. If any location in a page is assigned to the main memory, the other locations in that page are also assigned to the main memory. This reduces the size of the mapping information. The part of the secondary memory to accommodate pages of the virtual space is called the swap space. Both the main memory and the swap space are divided into page frames. Each page frame can host a page of the virtual space. If a page is mapped into the main memory, it is also hosted by a page frame in the main memory. The mapping record in the virtual memory management keeps track of the association between pages and page frames. When a virtual space location is requested, the virtual memory management looks up the mapping record. If the mapping record shows that the page containing requested virtual space location is in main memory, the management performs the access without any further complication. Otherwise, a secondary memory access has to be performed. Accessing the secondary memory is usually a complicated task and is usually performed as an operating system service. In order to access a piece of information stored in the secondary memory, an operating system service usually has to be requested to transfer the information into the main memory. This also applies to virtual memory management. When a page is mapped into the secondary memory, the virtual memory management has to request a service in the operating system to transfer the requested virtual space location into the main memory, update its mapping record, and then perform the access. The operating system service thus performed is called the page fault handler. The core process of virtual memory management is a memory access algorithm. A one-level virtual address translation algorithm is illustrated in Fig. 42.8. At the start of the translation, the memory access algorithm receives a virtual address in a memory address register (MAR), looks up the mapping record, ©2002 CRC Press LLC
FIGURE 42.8
Virtual memory translation.
requests an operating system service to transfer the required page if necessary, and performs the main memory access. The mapping is recorded in a data structure called the page table located in main memory at a designated location marked by the page table base register (PTBR). The page table index and the PTBR form the physical address (PAPTE) of the respective page table entry (PTE). Each PTE keeps track of the mapping of a page in the virtual space. It includes two fields: a hit/miss bit and a page frame number. If the hit/miss (H/M) bit is set (hit), the corresponding page is in main memory. In this case, the page frame hosting the requested page is pointed to by the page frame number (PFN). The final physical address (PAD) of the requested data is then formed using the PFN and PI. The data is returned and placed in the memory buffer register (MBR) and the processor is informed of the completed memory access. Otherwise (miss), a secondary memory access has to be performed. In this case, the page frame number should be ignored. The fault handler has to be invoked to access the secondary memory. The hardware component that performs the address translation algorithm is called the memory management unit (MMU). The complexity of the algorithm depends on the mapping structure. A very simple mapping structure is used in this section to focus on the basic principles of the memory access algorithms. However, more complex two-level schemes are often used due to the size of the virtual address space. The size of the page table designated may be quite large for a range of main memory sizes. As such, it becomes necessary to map portions of page table into a second page table. In such designs, only the second-level page table is stored in a reserved region of main memory, while the first page table is mapped just like the data in the virtual spaces. There are also requirements for such designs in a multiprogramming system, where there are multiple processes active at the same time. Each processor has its own virtual space and therefore its own page table. As a result, these systems need to keep multiple page tables at the same time. It usually takes too much main memory to accommodate all the active page tables. Again, the natural solution to this problem is to provide other levels of mapping. Translation Lookaside Buffer Hardware support for a virtual memory system generally includes a mechanism to translate virtual addresses into the real physical addresses used to access main memory. A Translation Lookaside Buffer (TLB) is a cache structure, which contains the frequently used PTEs for address translation. With a TLB, ©2002 CRC Press LLC
FIGURE 42.9
Translation Lookaside Buffer (TLB) architectures: (a) virtual cache, (b) physical cache.
address translation can be performed in a single clock cycle when TLB contains the required PTEs (TLB hit). The full address translation algorithm is performed only when the required PTEs are missing from the TLB (TLB miss). Complexities arise when a system includes both virtual memory management and cache memory. The major issue is whether address translation is done before accessing the cache memory. In virtual cache systems, the virtual address directly accesses cache. In a physical cache system, the virtual address is translated into a physical address before cache access. Figure 42.9 illustrates both the virtual and physical cache translation approaches. A virtual cache system typically overlaps the cache memory access and the access to the TLB. The overlap is possible when the virtual memory page size is larger than the cache capacity divided by the degree of cache associativity. Essentially, since the virtual page index is the same as the physical address index, no translation for the lower indexes of the virtual address is necessary. Thus, the cache can be accessed in parallel with the TLB, or the TLB can be accessed after the cache access for cache misses. Typically, with no TLB logic between the processor and the cache, access to cache can be achieved at lower cost in virtual cache systems and multi-access per cycle cache systems can avoid requiring a multiported TLB. However, the virtual cache translation alternative introduces virtual memory consistency problems. The same virtual address from two different processes mean different physical memory locations. Solutions to this form of aliasing are to attach a process identifier to the virtual address or to flush cache contents on context switches. Another potential alias problem is that different virtual addresses of the same process may be mapped into the same physical address. In general, there is no easy solution; and it involves a reverse translation problem. Physical cache designs are not always limited by the delay of the TLB and cache access. In general, there are two solutions to allow large physical cache design. The first solution, employed by companies with past commitments to page size, is to increase the set associativity of cache. This allows the cache index portion of the address to be used immediately by the cache in parallel with virtual address translation. However, large set associativity is very difficult to implement in a cost-effective manner. The second solution, employed by companies without past commitment, is to use a larger page size. The cache can be accessed in parallel with the TLB access similar to the other solution. In this solution, there are fewer ©2002 CRC Press LLC
address indexes that are translated through the TLB, potentially reducing the overall delay. With larger page sizes, virtual caches do not have advantage over physical caches in terms of access time.
Input/Output Subsystem The Input/Output (I/O) subsystem transfers data between the internal components (CPU and main memory) and the external devices (disks, terminals, printers, keyboards, scanners). Peripheral Controllers The CPU usually controls the I/O subsystem by reading from and writing into the I/O (control) registers. There are two popular approaches for allowing the CPU to access these I/O registers—I/O instructions and memory-mapped I/O. In an I/O instruction approach, special instructions are added to the instruction set to access I/O status flags, control registers, and data buffer registers. In a memory-mapped I/O approach, the control registers, the status flags, and the data buffer registers are mapped as physical memory locations. Due to the increasing availability of chip area and pins, microprocessors are increasingly including peripheral controllers on-chip. This trend is especially clear for embedded microprocessors. Direct Memory Access Controller A DMA controller is a peripheral controller that can directly drive the address lines of the system bus. The data is directly moved from the data buffer to the main memory, rather than from data buffer to a CPU register, then from CPU register to main memory.
System Interconnection System interconnection is the facilities that allow the components within a computer system to communicate with each other. There are numerous logical organizations of these system interconnect facilities. Dedicated links or point-to-point connections enable dedicated communication between components. There are different system interconnection configurations based on the connectivity of the system components. A complete connection configuration, requiring N(N – 1)/2 links, is created when there is one link between every possible pair of components. A hypercube configuration assigns a unique n-tuple {1, 0} as the coordinate of each component and constructs a link between components whose coordinates differ only in one dimension, requiring N log N links. A mesh connection arranges the system components into an N-dimensional array and has connections between immediate neighbors, requiring 2N links. Switching networks are a group of switches that determine the existence of communication links among components. A cross-bar network is considered the most general form of switching network and uses an N ¥ M two-dimensional array of switches to provide an arbitrary connection between N components on one side to M components on another side using NM switches and N + M links. Another switching network is the multistage network, which employs multiple stages of shuffle networks to provide a permutation connection pattern between N components on each side by using N log N switches and N log N links. Shared buses are single links which connect all components to all other components and are the most popular connection structure. The sharing of buses among the components of a system requires several aspects of bus control. First, there is a distinction between bus masters, the units controlling bus transfers (CPU, DMA, IOP) and bus slaves, the other units (memory, programmed I/O interface). Bus interfacing and bus addressing are the means to connect and disconnect units on the bus. Bus arbitration is the process of granting the bus resource to one of the requesters. Arbitration typically uses a selection scheme similar to interrupts; however, there are more fixed methods of establishing selection. Fixed-priority arbitration gives every requester a fixed priority, and round-robin ensures every requester the most favorable at one point in time. Bus timing refers to the method of communication among the system units and can be classified as either synchronous or asynchronous. Synchronous bus timing uses a shared clock that defines the time other bus signals change and stabilize. Clock sharing by all units allows the bus to be monitored at agreed time intervals and action taken accordingly. However, the synchronous system bus must operate at the speed of the slowest component. Asynchronous bus timing ©2002 CRC Press LLC
allows units to use different clocks, but the lack of a shared clock makes it necessary to use extra signals to determine the validity of bus signals.
42.4 Instruction Set Architecture There are several elements that characterize an instruction set architecture, including word size, instruction encoding, and architecture model. Word Size Programs often differ in the size of data they prefer to manipulate. Word processing programs operate on 8-bit or 16-bit data that correspond to characters in text documents. Many applications require 32-bit integer data to avoid frequent overflow in arithmetic calculation. Scientific computation often requires 64-bit floating-point data to achieve desired accuracy. Operating systems and databases may require 64-bit integer data to represent a very large name space with integers. As a result, the processors are usually designed to access multiple-byte data from memory systems. This is a well-known source of complexity in microprocessor design. The endian convention specifies the numbering of bytes with a memory word. In the little endian convention, the least significant byte in a word is numbered byte 0. The number increases as the positions increase in significance. The DEC VAX and X86 architectures follow the little endian convention. In the big endian convention, the most significant byte in a word is numbered 0. The number decreases as the positions decrease in significance. The IBM 360/370, HP PA-RISC, Sun SPARC, and Motorola 680X0 architectures follow the big endian convention. The difference usually manifests itself when users try to transfer binary files between machines using different endian conventions. Instruction Encoding Instruction encoding plays an important role in the code density and performance of microprocessors. Traditionally, the cost of memory capacity was the determining factor in designing either a fixed-length or variable-length instruction set. Fixed-length instruction encoding assigns the same encoding size to all instructions. Fixed-length encoding is generally a characteristic of modern microprocessors and the product of the increasing advancements in memory capacity. Variable-length instruction set is the term used to describe the style of instruction encoding that uses diff-erent instructions lengths according to addressing modes of operands. Common addressing modes included either register or methods of indexing memory. Figure 42.10 illustrates two potential designs found in modern use of decoding variable length instructions. The first alternative, in Fig. 42.10(a) involves an additional instruction decode stage in the original pipeline design. In this model, the first stage is used to
FIGURE 42.10
Variable-sized instruction decoding: (a) staging, (b) predecoding.
©2002 CRC Press LLC
determine instruction lengths and steer the instructions to the second stage, where the actual instruction decoding is performed. The second alternative, in Fig. 42.10(b), involves predecoding and marking instruction lengths in the instruction cache. This design methodology has been effectively used in decoding X86 5 variable instructions. The primary advantage of this scheme is the simplification of the number of decode stages in the pipeline design. However, the method requires a larger instruction cache structure for holding the resolved instruction information. Architecture Model Several instruction set architecture models have existed over the last three decades of computing. First, CISC (complex instruction set computers) characterized designs with variable instruction formats, numerous memory addressing modes, and large numbers of instruction types. The original CISC philosophy was to create instructions sets that resembled high-level programming languages in an effort to simplify compiler technology. In addition, the design constraint of small memory capacity also led to the development of CISC. The two primary architecture examples of the CISC model are the Digital VAX and Intel X86 architecture families. RISC (reduced instruction set computers) gained favor with the philosophy of uniform instruction lengths, load-store instruction sets, limited addressing modes, and reduced number of operation types. RISC concepts allow the microarchitecture design of machines to be more easily pipelined, reducing the processor clock cycle frequency and the overall speed of a machine. The RISC concept resulted from improvements in programming languages, compiler technology, and memory size. The HP PA-RISC, Sun SPARC, IBM Power PC, MIPS, and DEC Alpha machines are examples of RISC architectures. Architecture models allowing multiple instructions to issue in a clock cycle are VLIW (very long instruction word). VLIWs issue a fixed number of operations conveyed as a single long instruction and place the responsibility of creating the parallel instruction packet on the compiler. Early VLIW processors suffered from code expansion due to instructions. Examples of VLIW technology are the Multiflow Trace and Cydrome Cydra machines. EPIC (explicitly parallel instruction computing) is similar in concept to VLIW in that both use the compiler to explicitly group instructions for parallel execution. In fact, many of the ideas for EPIC architectures come from previous RISC and VLIW machines. In general, the EPIC concept solves the excessive code expansion and scalability problems associated with VLIW models by not completely eliminating its functionality. Also, the trend of compiler controlled architecture mechanisms are generally considered part of the EPIC-style architecture domain. The Intel IA-64, Philips Trimedia, and Texas Instruments’ C6X are examples of EPIC machines.
42.5 Instruction Level Parallelism Modern processors are being designed with the ability to execute many parallel operations at the instruction level. Such processors are said to exploit ILP (instruction-level parallelism). Exploiting ILP is recognized as a new fundamental architecture concept in improving microprocessor performance, and there are a wide range of architecture techniques that define how an architecture can exploit ILP.
Dynamic Instruction Execution A major limitation of pipelining techniques is the use of in-order instruction execution. When an instruction in the pipeline stalls, no further instructions are allowed to proceed to insure proper execution of in-flight instruction. This problem is especially serious for multiple issue machines, where each stall cycle potentially costs work of multiple instructions. However, in many cases, an instruction could execute properly if no data dependence exists between the stalled instruction and the instruction waiting to execute. Static scheduling is a compiler-oriented approach for scheduling instructions to separate dependent instructions and minimize the number of hazards and pipeline stalls. Dynamic scheduling is another approach that uses hardware to rearrange the instruction execution to reduce the stalls. The concept of dynamic execution uses hardware to detect dependences in the in-order instruction stream sequence and rearrange the instruction sequence in the presence of detected dependences and stalls. ©2002 CRC Press LLC
Today, most modern superscalar microprocessors use dynamic out-of-order scheduling techniques to increase the number of instructions executed per cycle. Such microprocessors use basically the same dynamically scheduled pipeline concept, all instructions pass through an issue stage in-order, are executed out-of-order, and are retired in-order. There are several functional elements of this common sequence, which have developed into computer architecture concepts. The first functional concept is scoreboarding. Scoreboarding is a technique for allowing instructions to execute out-of-order when there are available resources and no data dependences. Scoreboarding originates from the CDC 6600 machine’s issue logic, named the scoreboard. The overall goal of scoreboarding is to execute every instruction as early as possible. A more advanced approach to dynamic execution is Tomasulo’s approach. This scheme was employed in the IBM 360/91 processor. Although there are many variations on this scheme, the key concept of avoiding write-after-read (WAR) and write-after-write (WAW) dependences during dynamic execution is attributed to Tomasulo. In Tomasulo’s scheme, the functionality of the scoreboarding is provided by the reservation stations. Reservation stations buffer the operands of instructions waiting to issue as soon as they become available. The concept is to issue new instructions immediately when all source operands become available instead of accessing such operands through the register file. As such, waiting instructions designate the reservation station entry that will provide their input operands. This action removes WAW dependences caused by successive writes to the same register by forcing instructions to be related by dependences instead of by register specifiers. In general, renaming of register specifiers for pending operands to the reservation station entries is called register renaming. Overall, Tomasulo’s scheme combines scoreboarding and register 6 renaming. An Efficient Algorithm for Exploring Multiple Arithmetic Units provides the complete details of Tomasulo’s scheme.
Predicated Execution Branch instructions are recognized as a major impediment to exploiting (ILP). Branches force the compiler and hardware to make frequent predictions of branch directions in an attempt to find sufficient parallelism. Misprediction of these branches can result in severe performance degradation through the introduction of wasted cycles into the instruction stream. Branch prediction strategies reduce this problem by allowing the compiler and hardware to continue processing instructions along the predicted control path, thus eliminating these wasted cycles. Predicated execution support provides an effective means to eliminate branches from an instruction stream. Predicated execution refers to the conditional execution of an instruction based on the value of a Boolean source operand, referred to as the predicate of the instruction. This architectural support allows the compiler to use an if-conversion algorithm to convert conditional branches into predicate defining instructions, and instructions along alternative paths of each branch into predicated instruc7 tions. Predicated instructions are fetched regardless of their predicate value. Instructions whose predicate value is true are executed normally. Conversely, instructions whose predicate is false are nullified, and thus are prevented from modifying the processor state. Predicated execution allows the compiler to trade instruction fetch efficiency for the capability to expose ILP to the hardware along multiple execution paths. Predicated execution offers the opportunity to improve branch handling in microprocessors. Eliminating frequently mispredicted branches may lead to a substantial reduction in branch prediction misses. As a result, the performance penalties associated with the eliminated branches are removed. Eliminating branches also reduces the need to handle multiple branches per cycle for wide issue processors. Finally, predicated execution provides an efficient interface for the compiler to expose multiple execution paths to the hardware. Without compiler support, the cost of maintaining multiple execution paths in hardware grows rapidly. The essence of predicated execution is the ability to suppress the modification of the processor state based upon some execution condition. Full predication cleanly supports this through a combination of instruction set and microarchitecture extensions. These extensions can be classified as a support for suppression of execution and expression of condition. The result of the condition, which determines if ©2002 CRC Press LLC
TABLE 42.1
Predicate Definition Truth Table Pout
Pin
Comparison
U
U
OR
OR
AND
AND
0 0 1 1
0 1 0 1
0 0 0 1
0 0 1 0
— — — 1
— — 1 —
— — 0 —
— — — 0
an instruction should modify the state, is stored in a set of 1-bit registers. These registers are collectively referred to as the predicate register file. The values in the predicate register file are associated with each instruction in the extended instruction set through the use of an additional source operand. This operand specifies which predicate register will determine whether the operation should modify the processor state. If the value in the specified register is 1, or true, the instruction is executed normally; if the value is 0, or false, the instruction is suppressed. Predicate register values may be set using predicate define instructions. The predicate define semantics 8 used are those of the HPL Playdoh architecture. There is a predicate define instruction for each comparison opcode in the original instruction set. The major difference with conventional comparison instructions is that these predicate defines have up to two destination registers and that their destination registers are predicate registers. The instruction format of a predicate define is shown below.
pred_ Pout1 ,Pout2 ,scr1,scr2 ( P in ) This instruction assigns values to Pout1 and Pout2 according to a comparison of src1 and src2 specified by . The comparison can be: equal (eq), not equal (ne), greater than (gt), etc. A predicate is specified for each destination predicate. Predicate defining instructions are also predicated, as specified by Pin . The predicate determines the value written to the destination predicate register based upon the result of the comparison and of the input predicate, Pin . For each combination of comparison result and Pin , one of the three following actions may be performed on the destination predicate: it can write 1, write 0, or leave it unchanged. There are six predicate types which are particularly useful, the unconditional (U), OR, and AND type predicates and their complements. Table 42.1 contains the truth table for these predicate definition types. Unconditional destination predicate registers are always defined, regardless of the value of Pin and the result of the comparison. If the value of Pin is 1, the result of the comparison is placed in the predicate register (or its compliment for U ). Otherwise, a 0 is written to the predicate register. Unconditional predicates are utilized for blocks, which are executed based on a single condition. The OR-type predicates are useful when execution of a block can be enabled by multiple conditions, such as logical AND (&&) and OR (||) constructs in C. OR-type destination predicate registers are set if Pin is 1 and the result of the comparison is 1 (0 for OR); otherwise, the destination predicate register is unchanged. Note that OR-type predicates must be explicitly initialized to 0 before they are defined and used. However, after they are initialized, multiple OR-type predicate defines may be issued simultaneously and in any order on the same predicate register. This is true since the OR-type predicate either writes a “1” or leaves the register unchanged, which allows implementation as a wired logical OR condition. ANDtype predicates are analogous to the OR type predicate. AND-type destination predicate registers are cleared if Pin is 1 and the result of the comparison is 0 (1 for AND); otherwise, the destination predicate register is unchanged. Figure 42.11 contains a simple example illustrating the concept of predicated execution. Figure 42.11(a) shows a common programming “if-then-else” construction. The related control flow representation of that programming code is illustrated in Fig. 42.11(b). Using if-conversion, the code in Fig. 42.11(b) is then transformed into the code shown in Fig. 42.11(c). The original conditional branch is translated into ©2002 CRC Press LLC
FIGURE 42.11
Instruction sequence: (a) program code, (b) traditional execution, (c) predicated execution.
pred_eq instructions. Predicate register p1 is set to indicate if the condition (A = B) is true, and p2 is set if the condition is false. The “then” part of the if-statement is predicated on p1 and the “else” part is predicated on p2. The pred_eq simply decides whether the addition or subtraction instruction is performed and ensures that one of the two parts is not executed. There are several performance benefits for the predicated code. First, the microprocessor does not need to make any branch predictions since all the branches in the code are eliminated. This removes related penalties due to misprediction branches. More importantly, the predicated instructions can utilize multiple instruction execution capabilities of modern microprocessors and avoid the penalties for mispredicting branches.
Speculative Execution The amount of ILP available within basic blocks is extremely limited in non-numeric programs. As such, processors must optimize and schedule instructions across basic block code boundaries to achieve higher performance. In addition, future processors must contend with both long latency load operations and long latency cache misses. When load data is needed by subsequent dependent instructions, the processor execution must wait until the cache access is complete. In these situations, out-of-order machines dynamically reorder the instruction stream to execute nondependent instructions. Additionally, out-of-order machines have the advantage of executing instructions that follow correctly predicted branch instructions. However, this approach requires complex circuitry at the cost of chip die space. Similar performance gains can be achieved using static compile-time speculation methods without complex out-of-order logic. Speculative execution, a technique for executing an instruction before knowing its execution is required, is an important technique for exploiting ILP in programs. Speculative execution is best known for hiding memory latency. These methods utilize instruction set architecture support of special speculative instructions. A compiler utilizes speculative code motion to achieve higher performance in several ways. First, in regions of code where insufficient ILP exists to fully utilize the processor resources, useful instructions may be executed. Second, instructions at the beginning of long dependence chains may be executed early to reduce the computation’s critical path. Finally, long latency instructions may be initiated early to overlap their execution with other useful operations. Figure 42.12 illustrates a simple example of code before and after a speculative compile-time transformation is performed to execute a load instruction above a conditional branch. Figure 42.12(a) shows how the branch instruction and its implied control flow define a control dependence that restricts the load operation from being scheduled earlier in the code. Cache miss latencies would halt the processor unless out-of-order execution mechanisms were used. However, with speculation support, Fig. 42.12(b) can be used to hide the latency of the load operation. The solution requires the load to be speculative or nonfaulting. A speculative load will not signal an exception for faults such as address alignment or address space access errors. Essentially, the load is considered silent for these occurrences. The additional check instruction in Fig. 42.12(b) enables these ©2002 CRC Press LLC
FIGURE 42.12
Instruction sequence: (a) traditional execution, (b) speculative execution.
signals to be detected when the original execution does reach the original location of the load. When the other path of branch’s execution is taken, such silent signals are meaningless and can be ignored. Using this mechanism, the load can be placed above all existing control dependences, providing the compiler with the ability to hide load latency. Details of compiler speculation can be found in Ref. 9.
42.6 Industry Trends The microprocessor industry is one of the fastest moving industries today. Healthy demands from the market have stimulated strong competition, which, in turn, have resulted into great technical innovations.
Computer Microprocessor Trends The current trends in computer microprocessors include deep pipelining, high clock frequency, wide instruction issue, speculative and out-of-order execution, predicated execution, natural data types, large on-chip caches, floating point capabilities, and multiprocessor support. In the area of pipelining, the Intel Pentium II processor is pipelined approximated twice as deeply as its predecessor Pentium. The deep pipeline has allowed the clock Pentium II processor to run at a much higher clock frequency than Pentium. In the area of wide instruction issue, the Pentium II processor can decode and issue up to three X86 instructions per clock cycle, compared to the two-instruction issue bandwidth of Pentium. Pentium II has dedicated a very significant amount of chip area to branch target buffer, reservation station, and reorder buffer to support speculative and out-of-order execution. These structures together allow the Pentium II processor to perform much more aggressive, speculative, and out-of-order executions than Pentium. In particular, Pentium II can coordinate the execution of up to 40 X86 instructions, which is several times larger than Pentium. In the area of predicated execution, Pentium II supports a conditional move instruction that was not available in Pentium. This trend is furthered by the next generation IA-64 architecture where all instructions can be conditionally executed under the control of predicate registers. This ability will allow future microprocessors to execute control intensive programs much faster than their predecessors. In the area of data types, the MMX instructions from Intel have become a standard feature of all X86 microprocessors today. These instructions take advantage of the fact that multimedia data items are typically represented with a smaller number of bits (8–16 bits) than the width of an integer data path today (32–64 bits). Based on an observation, the same operation is often repeated on all data items in multimedia applications—the architects of MMX specify that each MMX instruction performs the same operation on several multimedia data items packed into one integer word. This allows each MMX instruction to process several data items simultaneously to achieve significant speed-up in targeted applications. In 1998, AMD proposed the 3DNow! instructions to address the performance needs of 3-D ©2002 CRC Press LLC
graphics applications. The 3DNow! instructions are designed based on the concept that 3-D graphics data items are often represented in single precision floating-point format and they do not require the sophisticated rounding and exception handling capabilities specified in the IEEE Standard format. Thus, one can pack two graphics floating-point data into one double-precision floating-point register for more efficient floating-point processing of graphics applications. Note that MMX and 3DNow! are similar in concepts applied to integer and floating-point domains. In the area of large on-chip caches, the popular strategies used in computer microprocessors are either to enlarge the first-level caches or to incorporate second-level and sometimes third-level caches on-chip. For example, the AMD K7 microprocessor has a 64-KB first-level instruction cache and a 64-KB firstlevel data cache. These first-level caches are significantly larger than those found in the previous generations. For another example, the Intel Celeron microprocessor has a 128-KB second level combined instruction and data cache. These large caches are enabled by the increased chip density that allows many more transistors on the chip. The Compaq Alpha 21364 microprocessor has both: a 64-KB first-level instruction cache, a 64-KB first-level data cache, and a 1.5-MB second-level combined cache. In the area of floating-point capabilities, computer microprocessors, in general, have a much stronger floating-point performance than their predecessors. For example, the Intel Pentium II processor achieves several times the floating-point performance improvements of the Pentium processor. For another example, most RISC microprocessors now have floating-point performances that rival supercomputer CPUs built just a few years ago. Due to the increasing demand of multiprocessor enterprise computing servers, many computer microprocessors now seamlessly support cache coherence protocols. For example, the AMD K7 microprocessor provides direct support for seamless multiprocessor operation when multiple K7 microprocessors are connected to a system bus. This capability was not available in its predecessor, the AMD K6.
Embedded Microprocessor Trends There are three clear trends in embedded microprocessors. The first trend is to integrate a DSP core with an embedded CPU/controller core. Embedded applications increasingly require DSP functionalities such as data encoding in disk drives and signal equalization for wireless communications. These functionalities enhance the quality of services of their end computer products. At the 1998 Embedded Microprocessor Forum, 10 ARM, Hitachi, and Siemens all announced products with both DSP and embedded microprocessors. Three approaches exist in the integration of DSP and embedded CPUs. One approach is to simply have two separate units placed on a single chip. The advantage of this approach is that it simplifies the development of the microprocessor. The two units are usually taken from existing designs. The software development tools can be directly taken from each unit’s respective software support environments. The disadvantage is that the application developer needs to deal with two independent hardware units and two software development environments. This usually complicates software development and verification. An alternative approach to integrating DSP and embedded CPUs is to add the DSP as a co-processor of the CPU. This CPU fetches all instructions and forwards the DSP instructions to the co-processor. The hardware design is more complicated than the first approach due to the need to more closely interface the two units, especially in the area of memory accesses. The software development environment also needs to be modified to support the co-processor interaction model. The advantage is that the software developers now deal with a much more coherent environment. The third approach to integrating DSP and embedded CPUs is to add DSP instructions to a CPU instruction set architecture. This usually requires brand-new designs to implement the fully integrated instruction set architecture. The second trend in embedded microprocessors is to support the development of single-chip solutions for large-volume markets. Many embedded microprocessor vendors offer designs that can be licensed and incorporated into a larger chip design that includes the desired I/O peripheral devices and applicationspecific integrated circuit (ASIC) design. This paradigm is referred to as system-on-a-chip design. A microprocessor that is designed to function in such a system is often referred to as a licensable core.
©2002 CRC Press LLC
The third major trend in embedded microprocessors is aggressive adoption of high-performance techniques. Traditionally, embedded microprocessors are slow to adopt high-performance architecture and implementation techniques. They also tend to reuse software development tools, such as compilers from the computer microprocessor domain. However, due to the rapid increase of required performance in embedded markets, the embedded microprocessor vendors are now making fast moves in adopting high-performance techniques. This trend is especially clear in the DSP microprocessors. Texas Instruments, Motorola/Lucent, and Analog Devices have all announced aggressive EPIC DSP microprocessors to be shipped before the Intel/HP IA-64 EPIC microprocessors.
Microprocessor Market Trends Readers who are interested in market trends for microprocessors are referred to Microprocessor Report, a periodical publication by MicroDesign Resources (www.MDRonline.com). In every issue, there is a summary of microarchitecture features, physical characteristics, availability, and pricing of microprocessors.
References 1. Turley, J., RISC volume gains but 68K still reigns, Microprocessor Report, vol. 12, pp. 14–18, Jan. 1998. 2. Hennessy, J.L. and Patterson, D.A., Computer Architecture A Quantitative Approach, Morgan Kaufman, San Francisco, CA, 1990. 3. Smith, J.E., A study of branch prediction strategies, Proceedings of the 8th International Symposium on Computer Architecture, pp. 135–14, May 1981. 4. Hwu, W.W. and Conte, T.M., The susceptibility of programs to context switching, IEEE Transactions on Computers, vol. C-43, pp. 993–1003, Sept. 1994. 5. Gwennap, L., Klamath extends P6 family, Microprocessor Report, Vol. 1, pp. 1–9, February 1997. 6. Tomasulo, R.M., An efficient algorithm for exploiting multiple arithmetic units, IBM Journal of Research and Development, vol. 11, pp. 25–33, Jan. 1967. 7. Allen, J.R. et al., Conversion of control dependence to data dependence, Proceedings of the 10th ACM Symposium on Principles of Programming Languages, pp. 177–189, Jan. 1983. 8. Kathail, V., Schlansker, M.S., and Rau, B.R., HPL PlayDoh architecture specification: Version 1.0, Tech. Rep. HPL-93-80, Hewlett-Packard Laboratories, Palo Alto, CA, Feb. 1994. 9. Mahlke, S.A. et al., Sentinel scheduling: a model for compiler-controlled speculative execution, ACM Transactions on Computer Systems, vol. 11, Nov. 1993. 10.Embedded Microprocessor Forum (San Jose, CA), Oct. 1998.
©2002 CRC Press LLC
43 Control with Embedded Computers and Programmable Logic Controllers 43.1 43.2
Hugh Jack Grand Valley State University
Hardware Platforms • Hardware Interfacing • Programming Languages
43.3
Programmable Logic Controllers Programming Languages • Interfacing • Advanced Capabilities
Andrew Sterian Grand Valley State University
Introduction Embedded Computers
43.4
Conclusion
43.1 Introduction Modern control systems include some form of computer, most often an embedded computer or programmable logic controller (PLC). An embedded computer is a microprocessor- or microcontrollerbased system used for a specific task rather than general-purpose computing. It is normally hidden from the user, except for a control interface. A PLC is a form of embedded controller that has been designed for the control of industrial machinery. (See Fig. 43.1.) A block diagram of a typical control system is shown in Fig. 43.2. The controller monitors a process with sensors and affects it with actuators. A user interface allows a user or operator to direct and monitor the control system. Interfaces to other computers are used for purposes such as programming, remote monitoring, or coordination with another controller. When a computer is applied to a control application, there are a few required specifications. The system must always remain responsive and in control of the process. This requires that the control software be real-time so that it will respond to events within a given period of time, or at regular intervals. The systems are also required to fail safely. This is done with thermal monitoring for overheating, power level detection for imminent power loss, or with watchdog timers for unresponsive programs.
43.2 Embedded Computers An embedded computer is a microprocessor- or microcontroller-based system designed for dedicated functionality in a specialized (i.e., nongeneral-purpose) electronic device. Common examples of embedded computers can be found in cell phones, microwave ovens, handheld computing devices, automotive systems, answering machines, and many other systems.
©2002 CRC Press LLC
FIGURE 43.1 An embedded computer with an Altera FPGA (front-left) and an Allen Bradley SLC500 programmable logic controller (top-right).
Personal Computer
Sensors
User Interface
Controller
Actuators
Process
FIGURE 43.2
An example block diagram of a computer controlled application.
The design constraints and parameters for an embedded computer are usually different from those of a general-purpose computer. Although the latter is designed for maximum computing power and support for the latest interconnection and peripheral standards, an embedded computer is designed to be just powerful enough and to support only the interfaces and protocols that are specifically required. The constraints of an embedded computer design often include size, power consumption and heat dissipation, and cost.
Hardware Platforms Microcontroller-Based Systems Microcontrollers are closely related to the microprocessors that power today’s general-purpose computers. They differ from microprocessors, in general, by being highly integrated, with built-in peripherals that minimize total system part count, having low power consumption, providing a small amount of on-chip RAM and ROM, and having several general-purpose input/output (I/O) lines available for instrument sensors and control. For this reason, a microcontroller-based embedded system may be designed with very few external components. In contrast, a microprocessor-based system requires external RAM, external peripherals, and I/O interfaces, and often dissipates so much heat that active cooling is required for proper operation. The peripherals built into many microcontrollers include serial-line interfaces (such as RS232), timers, pulse generators, event counters, etc. These peripherals support many sensor and actuator control functions. ©2002 CRC Press LLC
For example, pulse generators and timers can be used to construct stepper motor drive sequences. Microcontrollers are becoming increasingly specialized with respect to the data communication interfaces they 2 support. While many support the ubiquitous RS232, SPI, and I C protocols, recent microcontrollers have built-in support for interfaces such as USB. In order to minimize power consumption, most microcontrollers have a special sleep or standby mode in which no instructions are executed and very little power is consumed. Microcontrollers can be programmed to awaken in response to an external event so that the program code is executed, and power consumed, only when necessary. Microcontrollers are a very large semiconductor market due to the wide range and high volume of devices that use them. There are many manufacturers and models of microcontrollers, ranging from tiny 8-pin devices with minimal functionality and costing mere pennies, to large devices with hundreds of pins, many features, and much higher cost. This broad spectrum reflects the highly specific nature of an embedded computer and its design. FPLD-Based Systems Field-programmable logic devices (FPLDs) such as CPLDs (complex programmable logic devices) and FPGAs (field-programmable gate arrays) are a more recent alternative to microcontrollers for embedded computer design. An FPLD represents a programmable hardware device; the actual hardware functionality of the device is what is being designed. A microcontroller, in contrast, has fixed hardware functionality and is programmed with software. It is possible, however, to design an FPLD that behaves as a microcontroller, and is further programmed in software. The programmable hardware functionality, however, affords the designer a much greater degree of flexibility over a fixed hardware solution. The price for this flexibility, however, is complexity. FPLDs may be designed from the ground up or may be composed of one or more predesigned core and peripheral blocks. It is possible, for example, to purchase microcontroller core functions, peripheral functions, etc. and assemble them to form a customized microcontroller on an FPLD with non-recurring engineering (NRE) costs that are much lower than a full custom chip design. FPLDs can often be programmed “on-the-fly,” allowing for reconfigurable computing. This is a computing paradigm that reprograms a system at the hardware level while it is in operation, according to system demands. This means, for example, that the same hardware device can implement multiple bus protocols, interfaces, or algorithms as needed, rather than requiring a larger and more expensive device that supports all of the necessary functions but only uses one at a time. Digital Signal Processing Systems Digital signal processing (DSP) devices are in many ways similar to microcontrollers with respect to peripheral integration, power consumption, etc. but also have specialized hardware support for common DSP operations, such as filtering. DSP devices are ideal for use in systems that process speech and music, or for robust control and communications applications. The specialized hardware support of these devices means that they are capable of sustaining much higher effective computation rates (on signal processing tasks), but at the same clock speed and power dissipation as the more general-purpose microcontrollers. Real-Time Systems Most embedded systems must operate in real time, that is, they must respond in a timely fashion to external events such as user commands and sensor readings. When an absolute upper limit on response time is required (and guaranteed), the system is a hard real-time system; otherwise, it is a soft real-time system. Systems that have safety constraints, such as automotive and industrial control systems, are often hard real-time systems so that absolute maximum time delays can be computed and verified for safetycritical events. Real-time computation is effected using interrupts. These are mechanisms supported by all common microcontrollers that cause a change in the flow of execution of the program when the interrupt occurs. The program that is executed in response to the interrupt is expected to respond in some way to the interrupt. ©2002 CRC Press LLC
For example, an interrupt may occur when a digital logic level changes at a device pin, indicating a sensor condition, or it may occur when the user presses a button on a keypad, indicating that an action is desired and is to be performed immediately. The implementation of a real-time software system may either be custom designed or may make use of a commercial real-time operating system (RTOS). Since the design of an interrupt-driven real-time system has many potential pitfalls, the usage of a mature RTOS can greatly speed development time. Embedded Modules The functionality of commercially available embedded computing modules has been steadily increasing. It is common to find powerful microcontrollers, an Ethernet interface, and basic Internet protocol support all combined in a very small form factor for less than $50 in single quantities. This level of integration can greatly speed development time for network-enabled control or remote sensing applications.
Hardware Interfacing Mechanical Switches Switches are easily interfaced to digital logic with a resistor as shown in Fig. 43.3. The mechanical nature of the switch may lead to bounce or oscillation of the digital signal for a brief period during the switch opening/closing action. This bounce may be eliminated in the software or with a small amount of additional hardware. Analog Inputs Analog inputs that indicate one of the two conditions can be interfaced to a digital logic input with a simple comparator (Fig. 43.4). A threshold voltage is set with a resistor divider. The comparator generates a digital signal, which indicates whether the analog input voltage is above or below the threshold voltage. This approach can be used for sensors such as optical interrupters (for part counting, motor movement detection, etc.), temperature limit sensors, and many others. When the analog voltage itself is of interest (as in, for example, temperature measurements), an analogto-digital converter (ADC) can be used to provide either a serial or a parallel representation of the voltage with a precision ranging anywhere from 8 bits to 16 bits and above. A serial ADC may require as few as two digital I/O pins on a microcontroller for transferring data, while a parallel ADC requires at least as
+5V
to digital input
FIGURE 43.3 A mechanical switch is easily interfaced to a digital input on a microcontroller using a single resistor.
+5V
analog input
+
-
FIGURE 43.4 A digital input driven by a comparator detects whether an analog voltage signal is above or below a threshold voltage (set with a resistor divider network). ©2002 CRC Press LLC
to digital input
V+
FIGURE 43.5 A digital output can control a high- current device (such as a lamp pictured to the right) using a transistor as a switch.
digital output
many pins as there are bits of resolution, but can transfer an entire analog reading in one transaction for faster throughput. Some microcontrollers have built-in ADC peripherals with multiple input channels enabling highly integrated low-cost analog sensor systems. Analog voltages that are very small may be amplified with an instrumentation amplifier prior to analogto-digital conversion. Instrumentation amplifiers have very high gain and high impedance, and hence, are suitable for sensors with very weak driving voltages and currents. Simple Actuators Embedded computers are not usually capable of driving most practical actuators directly, since the latter often require voltages and currents not compatible with digital circuitry. As with sensors, however, some simple interface circuitry is all that is required. Simple on/off actuators such as lamps, LEDs, relay coils, etc. can be driven from a digital output, using a transistor as a switch, as shown in Fig. 43.5. The digital output controls the on/off state of the transistor, which, in turn, either allows or does not allow current to flow through the actuator. Motors can also be controlled using transistors as interfaces between digital outputs and the highcurrent motor coils. The lamp in Fig. 43.5 can be replaced with a DC motor to allow simple on/off control of the motor. A set of four transistors arranged in an H-bridge configuration allows such a motor to rotate in either direction. Two H-bridge configurations can be used to control a stepper motor. In all cases, the speed and direction of rotation are under direct control of the embedded computer through its digital outputs. Analog Outputs For actuators that require a variable analog voltage or current, a digital-to-analog converter (DAC) can be used as an interface between the embedded computer and the actuator. As with ADCs, DACs are available in a variety of bit widths, conversion speeds, number of channels, etc. Often, the current driving capacity of these devices is not sufficient and an additional buffer amplifier is required to meet the current demands of the actuator.
Programming Languages Embedded computers are most commonly programmed in low-level languages for maximum control over the hardware resources. The most time-critical sections of the code are generally programmed in assembly language, which is the lowest-level language understood by a microcontroller. The C language is generally used for higher-level structured programming. Even higher-level languages, such as C++ or Java, are not well suited for embedded programming as they require larger amounts of memory and are not designed for low-level access to hardware resources. Figure 43.6 shows a fragment of an assembly language program written for the Microchip PIC 16F84A microcontroller. It enables power to a DC motor (through an external interface circuit) when two digital inputs are both at a logic 1 level. The code runs continuously, always checking for the status of the two digital inputs (which may be manual switches, current sensors, etc.). The same code fragment written in C is shown in Fig. 43.7. The code is more compact and easier to read since C is a higher-level language than assembly. ©2002 CRC Press LLC
loop: btfss goto btfss goto
PORTA,0 turnoff PORTA,1 turnoff
Check digital input bit 0 of Port A and disable motor if not 1 Check digital input bit 1 of Port A and disable motor if not 1
bsf goto
PORTB,5 loop
Enable motor by setting bit 5 of Port B and check inputs again
turnoff: bcf goto
PORTB,5 loop
Disable motor by clearing bit 5 of Port B and check inputs again
FIGURE 43.6 Fragment of assembly code for Microchip PIC 16F84A microcontroller. This code fragment examines two digital inputs (bits 0 and 1 of input Port A) and sets bit 5 of output Port B if both inputs are at a logic 1 level. The output can be used to enable or disable a DC motor with appropriate interface circuitry.
while (1) { if (PA0 && PA1) {// Check status of bits 0 and 1 in Port A PB5 = 1; // Set bit 5 of Port B } else { PB5 = 0; // Clear bit 5 of Port B } } FIGURE 43.7
Fragment of C code to effect the same functionalilty as the code in Fig. 43.6.
43.3 Programmable Logic Controllers The modern programmable logic controller (PLC) is the successor of relay-based controls. The technological shift began in the 1960s, when the limitations of electromechanical relay-based controllers drove General Motors to search for electronic alternatives. The answer was provided in 1970 by Modicon, who provided a microprocessor-based control system. The programming language was modeled after relay ladder logic diagrams to ease the transition of designers, builders, and maintainers to these new controllers. Throughout the 1970s the technology was refined and proven, and since the early 1980s they have become ubiquitous on the factory floor. Most PLC components are in card form that can be interchanged quickly in the event of a failure. A typical PLC application has about one hundred inputs and outputs, but the scale of the applications varies widely. A small PLC costing $200 might have six inputs and four outputs. A large application might involve multiple PLCs working together over an entire plant and collectively have tens of thousands of inputs and outputs. In general, the aggregated cost of PLC hardware per input and output is approximately $10–$50. This does not include the cost of sensors (typically $50–$100), actuators (typically $50–$200), installation (typically $10–$100), design, or programming. Manufacturing control systems always require logical control and sometimes continuous control. Logical control involves the examination of binary inputs (on or off) from sensors and setting binary outputs to drive actuators. A simple example is a photosensor that detects a box on a conveyor and actuates an air cylinder to divert the box. Continuous control systems are used less frequently because of their higher costs and increased complexity. A typical continuous controller might use an analog output card ($1000) to output a voltage to a variable frequency motor driver ($1000) to control the velocity of a conveyor. ©2002 CRC Press LLC
LADDER LOGIC D
A
B
BOOLEAN EQUATIONS X
X = (A + B . C ) . D
C
A
X
Y
Y = X . (A + D)
D
hot
FIGURE 43.8
neutral
A simple ladder logic program with equivalent Boolean equations. run
stop
active
active active
active
GT Source A: T4:0.ACC Source B: 5 T4:0/DN
FIGURE 43.9
heater
TON timer T4:0 delay 10 s fan1
fan2
A complex ladder logic example.
Programming Languages Every PLC can be programmed with ladder logic. Ladder logic uses input contacts (shown with two vertical lines) and output coils (shown with a circle). A contact with a slash through it represents a normally closed contact. In ladder logic, the left-hand rail is energized. When the contacts are closed in the right combinations, power can flow through the coil to the right-hand neutral rail. Consider the ladder logic example in Fig. 43.8. It is assumed that the hot rail at the left side has power, and the right side rail is neutral. When the contacts are opened and closed in the right combinations they allow power to flow through the output coils, thus actuating them. The program logic is interpreted by working from the left side of the ladder. In the first rung if A and D are on, the output X will be turned on. This can also be accomplished by turning B on, turning C off, and turning D on. In the second, the output Y will be on if X is on and A is on, or D is off. Notice that the branches behave as OR functions and the contacts in line act as an AND function. It is possible to write ladder logic rungs as Boolean equations, as shown on the right-hand side of the figure. The example in Fig. 43.8 contains only conditional logic, but Fig. 43.9 shows a more complex example of a ladder logic program that uses timers and memory values. When the run input is active, output heater will turn on, 5 s later fan1 will turn on, followed by fan2 at 10 s. The first rung of the program will allow the system to be started with a normally open run push button input, or stopped with a normally closed push button stop. All stop inputs are normally closed switches, so the contact in this rung needs to be normally open to reverse the logic. The output active is also used to branch around the run to seal-in the run state. The next line of ladder logic turns on an output heater when the system is active. The third ©2002 CRC Press LLC
line will run a timer when active is on. When the input to the TON timer goes on, the timer T4:0 will begin counting, and the timer element T4:0.ACC will begin to increment until the delay value of 10 s is reached, at this point the timer done bit T4:0/DN bit will turn on and stay on until the input to the timer is turned off. The fourth rung will compare the accumulated time of the timer and if it is greater than 5 the output fan1 will be turned on. The final rung of the program will turn on fan2 after the timer has delayed 10 s. A PLC scans (executes) a ladder logic program many times per second. Typical execution times range from 5 to 100 ms. Faster execution times are required for processes operating at a higher speed. The notations and function formats used in Fig. 43.9 are based on those developed by a PLC manufacturer. In actuality, every vendor has developed a different version of ladder logic. IEC 61131-3 Programming Languages The IEC 61131 standards (formerly IEC 1131) have been created to unify PLCs [3,5]. The major portions of the standard are listed below. IEC 61131-1 Overview IEC 61131-2 Requirements and Test Procedures IEC 61131-3 Data Types and Programming IEC 61131-4 User Guidelines IEC 61131-5 Communications IEC 61131-7 Fuzzy Control The most popular part of the standard is the programming specification, IEC 61131-3. It describes five basic programming models including ladder diagrams (LD), instruction list (IL), structured text (ST), sequential function charts (SFC), and function block diagrams (FBD). These languages have been designed to work together. It is possible to implement a system using a combination of the languages, or to implement the same function in different languages. A discussion of ST, SFC, and FDB programs follows. Structured Text A structured text program is shown in Fig. 43.10. This program has the same function as the previous ladder logic example. The first line defines the program name. This is followed by variable definitions. The variables run and stop are inputs to the controller from sensors and switches. The variables heater,
FIGURE 43.10 to Fig. 43.9.
A structured text program equivalent
©2002 CRC Press LLC
PROGRAM example VAR_INPUT run : BOOL ; stop : BOOL ; END_VAR VAR_OUTPUT heater : BOOL ; fan1 : BOOL ; fan2 : BOOL ; END_VAR VAR active : BOOL ; delay : TON ; END_VAR active := (run OR active) & stop ; heater := active ; delay(EN := active, PRE := 10) ; IF ( delay.ACC > 5 ) THEN fan1 := 1 ; ELSE fan1 := 0 ; END_IF ; fan2 := delay.DN ; END_PROGRAM
run active
OR
active
AND stop
heater TON EN 10
PRE
fan2
DN ACC
A A>B
5
FIGURE 43.11
fan1
B
A FBD program equivalent to Fig. 43.9.
fan1, and fan2 are outputs to the actuators in the system. The variables active and delay are internal to the program only. The program section immediately follows the variable declarations. In the program the first two lines set the values of active and heater. The instruction delay(….) calls the instantiated timer. The argument EN := active sets the timer to run, and PRE := 10 sets the timer delay to 10 s. The following lines use an “if ” statement to set the value of fan1, using the accumulated timer value delay.ACC. The value of fan2 is then set when the timer accumulator has reached the delay time and set the done bit delay.DN. Structured text is popular and shows potential for eventually replacing ladder logic as the most popular programming language. Function Block Diagrams A data flow model is the basis of function block diagrams. In these programs, the data flows from the inputs on the left to the outputs on the right. The example in Fig. 43.11 is equivalent to the previous ladder logic example. The OR and AND functions are used to set the values of active and heater. The TON timer uses the enable EN and delay PRE inputs to drive the accumulator ACC and DN outputs. The DN output drives fan2 while the ACC value is compared to the value of 5 to set the output fan1. Data flow diagrams can be very useful for doing a high-level design of a control system. Sequential Function Charts An SFC is used to describe a system in terms of steps and transitions. A step describes a mode of operation or state in which some action is performed, normally setting outputs. Transitions determine the change of states, normally by examining inputs. (Note: Some readers may notice that SFCs are based on Petri nets.) Figure 43.12 shows an example of an SFC to control storage tanks. When the controller is started and the power input goes true, it will empty the tanks. After that the run input will start cycles where both the tanks are filled and then emptied repeatedly. In this example, the flow of control begins at the initial step start, and then moves to step S1. The action associated with the step is R, which will reset, or turn off the outputs in_valve1 and in_valve2. The system will remain in step S1 until the transition is fired by input power. After this there are two possible paths. If empty1 and empty2 are both true, the left-hand branch will be followed, otherwise the right-hand transition will fire and that branch will be followed. The left-hand branch sets the run_light on (with S), and turns off the outlet_valve. The right-hand branch will turn on outlet_valves until the inputs empty1 and empty2 are both on. At that point run_light will be turned on, and the out_valves turned off. Regardless of which branch was followed, the flow of execution will pause at the following transition until the input run becomes true.
©2002 CRC Press LLC
start S1
R in_valve1 R in_valve2
power empty1 & empty2 S2
S run_light
not(empty1 & empty2) S out_valves
S3
R out_valves
empty1 & empty2 S run_light
S4
R out_valves run
S5
S in_valve1
S7
R in_valve1
S9
S in_valve2
S6
not(empty1)
not(empty2) S8
R in_valve2
S out_valves empty1 & empty2
S10
FIGURE 43.12
R out_valves
An SFC program for tank level control.
After the run transition is fired the flow of execution splits into both the left and right branches, as indicated by the two horizontal lines. The left branch fills one tank, while the right branch fills the other tank independently. When both branches are complete the flow of execution rejoins at the second set of horizontal lines, and then activates step S9. After step S10 the flow of execution returns to the point after the run transition. The SFC programming method differs from other programming methods in that the program is not expected to run completely in a single scan, while all others must run completely in each scan.
Interfacing The installation and interfacing requirements for PLCs are driven by the need to protect people and equipment by failing safely. A typical wiring diagram for a PLC application is shown in Fig. 43.13. At the top of the diagram a transformer is used to step down a higher supply voltage. This is immediately followed by a power disconnect and fuses. The power is then split into left and right rails, much like the ladder diagrams discussed earlier. Line 10 shows a master power control for the system. This includes a normally open start button and a normally closed stop button. These switches control a master control relay (MCR) C1. Notice that if power is supplied to the coil C1, it will close the contacts C1 on the same run and hold C1 on until the stop button is pushed. Another set of contacts is used on the left rail to disconnect power from the inputs to the PLC and the DC power supply. This control circuitry external to the PLC is required so that the stop buttons of a control system are able to directly disconnect the power. This is often required by law. In this example the PLC is powered with 120 V AC, connected between the power rails. There are two 120 V AC inputs from normally open push buttons. The 24 V DC power supply is input to the V+ on the output terminals of the PLC, which will then switch output power to solenoid S1 and indicator light L1. ©2002 CRC Press LLC
4:1 440 V AC
disconnect
3A
120 V AC
000 start
stop
C1
010 C1 020 030
L1
N PLC
040 C1
V+ A
050
O/0
I/0
090
L1
B 060
090 S1
O/1
I/1 common
070
080 090
FIGURE 43.13
L1 040
24 V
DC power supply
N com.
040
A PLC wiring example.
Advanced Capabilities PLCs are often used in applications that go beyond basic logic solving. Some advanced programming and input/output (I/O) functions are listed below. Calculations—The ability to do basic scientific calculations. Lower end PLCs only use integer math, while higher end PLCs also provide floating point math. Analog I/O—Continuous voltage and current values can be input and output. Feedback control—Proportional integral derivative (PID) controller calculations are provided as function blocks and can be used with analog I/O. Communications—The ability to transmit data as strings over serial ports or to transfer parts of the PLC memory using proprietary protocols. ASCII strings—Functions to manipulate ASCII strings. System—Fault detection, status monitoring, interrupt routines, etc. Fuzzy logic—Some PLCs include fuzzy set functions for nonlinear control problems. At a minimum PLCs use communications for programming. But in many applications PLCs are used to communicate with other devices. In the past, most communications were based on proprietary, or closed, standards. More recently a few open communication standards have been developed and are supported by many vendors; these include Profibus, DeviceNet, CanBus, and ModBus. There has also been a trend to use more universal communication standards such as RS-232, RS-422, RS-485, and Ethernet. An example of an automation system is shown in Fig. 43.14. An RS-232 connection is used between a laptop computer (e.g., COM1) and PLC1 for programming. DH+ is used to connect PLC1, PLC2, and the HMI; it is a proprietary communication standard developed by Allen-Bradley. An operator can use the Human Machine Interface (HMI) to display data and accept operator input and communicate these values directly to both PLCs. Devicenet, an open automation standard, is used to connect PLC2 to a welding controller. ©2002 CRC Press LLC
PLC1 Computer
RS-232
HMI run stop
DH+
PLC2
DH+ Weld Controller
Devicenet
FIGURE 43.14
PLC communication example.
Development Time PLC Embedded
Complexity Unit Cost
PLC
Embedded
Complexity Cost
PLC
Embedded
FIGURE 43.15 solutions.
Relative trade-offs between control Number of Units
43.4 Conclusion PLCs and embedded controllers are complementary technologies and, when applied strategically, they will both provide low cost and reliable solutions to control problems. Figure 43.15 shows the relative trade-offs between the controllers. In general, an embedded controller requires more initial development time than a PLC for a simple system. As the system grows more complex, the embedded controller benefits ©2002 CRC Press LLC
from the existence of software libraries and design tools. When using a PLC the cost of the purchased hardware will always be higher per unit. The development costs for an embedded computer will usually be higher, but these become minimal when amortized over a large number of units. As a result, embedded controllers are typically selected for applications that will be mass-produced and allow a greater development time, such as a toy robot. PLCs are often selected for applications that only require a few controllers and are to be completed in a relatively short time, such as the production machines to make a toy.
References 1.Bryan, L.A., Bryan, E.A., Programmable Controllers, Industrial Text and VideoCompany, 1997. 2.Filer, R., Leinonen, G., Programmable Controllers and Designing Sequential Logic, Saunders College Publishing, 1992. 3.Lewis, R.W., Programming Industrial Control Systems using IES1131-3, The Institution of Electrical Engineers, 1998. 4.Petruzella, F., Programmable Logic Controllers, Second Edition, McGraw-Hill, 1998. 5.Programmable Controllers—Part 3: Programming Languages, IEC 61131-3 Ed. 1.0, 1993. 6.Stenerson, J., Fundamentals of Programmable Logic Controllers, Sensors and Communications, PrenticeHall, 1998. 7.Webb, J.W., Reis, R.A., Programmable Logic Controllers, Principles and Applications, Prentice-Hall, 1995.
©2002 CRC Press LLC
VI Software and Data Acquisition 44 Introduction to Data Acquistition Jace Curtis 45 Measurement Techniques: Sensors and Transducers Cecil Harrison Introduction • Motion and Force Transducers • Process Transducers • Transducer Performance • Loading and Transducer Compliance
46 A/D and D/A Conversion Mike Tyler Introduction • Sampling • ADC Specifications • DAC Specifications
47 Signal Conditioning Stephen A. Dyer Linear Operations • Nonlinear Operations
48 Computer-Based Instrumentation Systems Kris Fuller The Power of Software • Digitizing the Analog World • A Look Ahead
49 Software Design and Development Margaret H. Hamilton The Notion of Software • The Nature of Software Engineering • Development Before the Fact • Experience with DBTF • Conclusion
50 Data Recording and Logging Tom Magruder Overview • Historical Background • Data Logging Functional Requirements • Data-Logging Systems • Conclusions
©2002 CRC Press LLC
44 Introduction to Data Acquistition Jace Curtis National Instruments, Inc.
The purpose of a data acquisition system is to capture and analyze some sort of physical phenomenon from the real world. Light, temperature, pressure, and torque are a few of the many different types of signals that can interface to a data acquisition system. A data acquisition system may also produce electrical signals simultaneously. These signals can either intelligently control mechanical systems or provide a stimulus so that the data acquisition system can measure the response. A data acquisition system provides a way to empirically test designs, theories, and real world systems for validation or research. Figure 44.1 illustrates a typical computer-based data acquisition module. The design and the production of a modern car, for instance, relies heavily on data acquisition. Engineers will first use data acquisition to test the design of the car’s components. The frame can be monitored for mechanical stress, wind noise, and durability. The vibration and temperature of the engine can be acquired to evaluate the design quality. The researchers and engineers can then use this data to optimize the design of the first prototype of the car. The prototype can then be monitored under many different conditions on a test track while information is collected through data acquisition. After a few iterations of design changes and data acquisition, the car is ready for production. Data acquisition devices can monitor the machines that assemble the car, and they can test that the assembled car is within specifications. At first, data acquisition devices stood alone and were manually controlled by an operator. When the PC emerged, data acquisition devices and instruments could be connected to the computer through a serial port, parallel port, or some custom interface. A computer program could control the device automatically and retrieve data from the device for storage, analysis, or presentation. Now, instruments and data acquisition devices can be integrated into a computer through high-speed communication links, for tighter integration between the power and flexibility of the computer and the instrument or device. Since data acquisition devices acquire an electric signal, a transducer or a sensor must convert some physical phenomenon into an electrical signal. A common example of a transducer is a thermocouple. A thermocouple uses the material properties of dissimilar metals to convert a temperature into a voltage. As the temperature increases, the voltage produced by the thermocouple increases. A software program can then convert the voltage reading back into a temperature for analysis, presentation, and data logging. Many sensors produce currents instead of voltages. A current is often advantageous because the signal will not be corrupted by small amounts of resistance in the wires connecting the transducer to the data acquisition device. A disadvantage of current-producing transducers, though, is that most data acquisition devices measure voltage, not current. Generally, the data acquisition devices that can measure current use a very small resistance of a known value to convert the known current into a readable voltage. Ultimately, the device is then still acquiring a voltage.
©2002 CRC Press LLC
FIGURE. 44.1
Analog signals for data acquisition can be grouped into two basic classes: random and deterministic. Data acquisition devices can both acquire and generate these types of signals. Random signals never repeat and have a flat frequency spectrum. Microphone static is an example of a random signal. A deterministic signal, unlike random signals, can be represented by a sum of sinusoids. Deterministic signals can be subdivided into periodic and transient signals. Periodic signals constantly repeat the same shape at regular intervals over time, while transient signals start and end at a constant level and do not occur at regular intervals. Transient signals are nonperiodic events that represent a finite-length reaction to some stimulus. Digital input and output are commonly incorporated into data acquisition hardware for sensing contacts, controlling relays and lights, and testing digital devices. The most commonly used digital levels are TTL and TTL-compatible CMOS. These are both very common 5-V standards for digital hardware. Digital transfer rates to and from the data acquisition hardware vary from unstrobed to high speed. Unstrobed digital input and output involves setting digital lines and monitoring states by software command. This form of digital input and output is also known as static or immediate digital I/O. The maximum speed of an unstrobed I/O is highly dependent on the computer hardware, the operating system, and the application program. Pattern digital I/O refers to inputs and outputs of digital patterns under the control of a clock signal. The speed at which the data can be sent or received depends on the amount of data, the characteristics of the data acquisition hardware, and the computer speed. The final type of I/O on computer-based data acquisition hardware is counter/timer I/O. Counter/ timers are capable of measuring or producing very time-critical digital pulses. These pulses, like the digital input and output, are generally TTL or TTL-compatible CMOS. These components are used for measuring or producing a number of time-critical signals including event counting, pulse train generation, frequency-shift keying, and monitoring quadrature encoders. The two main characteristics of a counter/timer are the counter size and maximum source frequency. The counter size is generally represented in bits and determines how high a counter can count. For instance, a 32-bit counter can count 32 2 - 1 = 4,294,967,295 events before it returns the count value back to zero. The maximum source frequency represents the speed of the fastest signal the counter can count. An 80-MHz counter can count events that are as fast as 12.5 ns apart. An “event” is actually the rising or falling edge of a digital signal. No real situation will ever have perfect signals or be completely free of noise. Signal conditioning is a method to remove, as much as possible, unwanted components of a digital or analog signal. A real analog signal usually comprises both deterministic and random signals, and a digital signal is not going to be perfectly square. Measurement hardware, particularly for high-frequency analog signals, is usually equipped with an antialiasing filter. This is a low-pass filter that blocks frequencies above the desired frequency range and increases the accuracy of the measurements. Digital and counter/timer lines are also commonly fitted with filters that remove spikes from the signal that could otherwise be mistakenly ©2002 CRC Press LLC
counted as a rising or falling edge. Isolation is another type of signal conditioning that separates the measurement hardware circuitry from the signal being measured. This is done to remove large differences in electric potential between the measurement hardware and the signal, and it protects the measurement hardware from damage, given a large surge in voltage or current. The heart of a data acquisition device is a digital-to-analog converter (DAC), an analog-to-digital converter (ADC), or some combination of the two. An ADC has a finite list of values which represents voltages. The purpose of the ADC is to select a value from this list, which is closest to an actual voltage at a specified time. The value is then transferred in binary format to a computer. Alternatively, a DAC can produce an analog voltage from a list of binary values. The voltage generated by a basic DAC stays the same until it receives another value from the computer. In order to acquire and produce analog waveforms, the DAC and ADC must activate at precise intervals. Consequently, measurement hardware has timing circuitry to produce a pulse train of a constant frequency to control the ADC and DAC. The data that is transferred from the ADC and to the DAC travels to the computer over a bus. A bus is a group of electrical conductors that transfer information inside a computer. Some common examples of a bus are PCI and USB. The bus can carry both control information and binary measurement data to and from measurement hardware. One of the most important considerations in selecting a bus is bus transfer rate, usually expressed in megabytes per second (Mbytes/s). A single analog value could require less than 1 byte or as much as 4 bytes, depending on the type of measurement hardware. The bus is shared among multiple devices, so data acquisition devices often have on-board memory to serve as a holding place for data when the bus is not available. In very fast data acquisition routines, the memory can hold all the data, and at the end of the acquisition, all the data can be transferred to the computer for processing. When data is acquired at high speeds on multiple channels, it is often important to understand the phase relationship from one signal to the next. If the signals are generated or acquired on multiple data acquisition devices, there are a number of ways to synchronize the systems and preserve relative phase relationships. One way is to share the ADC and DAC clock between the data acquisition devices. The realtime system integration bus (RTSI) is a bus that can connect multiple devices together to share timing circuitry among multiple devices. Phase-lock looping (PLL) is a more sophisticated synchronization method. A reference signal is supplied to all the data acquisition devices, and the internal clocks stay in phase with the reference signal. Consequently, the phase relationship can be reserved even if different measurement hardware is using different sampling or update speeds. Figure 44.2 is a diagram showing the components of a typical data acquisition hardware. The difference between an actual analog voltage and the closest voltage from the list of binary values is called the quantization error. In a perfect digitizing measurement system free of noise, the quantization error would solely explain any difference between the actual voltage and the measured voltage. No measurement hardware and no environment, however, are perfect. The accuracy of an instrument describes the amount of uncertainty when considering quantization error, unavoidable system noise, and hardware imperfections. Accuracy is sometimes confused with precision. Precision refers to the amount of deviation in multiple measurements connected to a constant and level signal source. Even if an instrument is
FIGURE 44.2
©2002 CRC Press LLC
FIGURE 44.3
precise, it could still be inaccurate if the readings were consistent but significantly different than the actual value of the signal. The accuracy of a data acquisition system can change with temperature, time, and usage. Data acquisition hardware can store on-board correction constants for offset and gain errors. An offset error is a constant difference between the measured and actual voltage, regardless of the voltage level. A gain error increases linearly as the measured voltage increases. Some data acquisition hardware also include an accurate voltage source on-board that can be periodically used as a reference to correct the gain and offset error parameters. The final piece of a data acquisition system to understand is the software. The driver software is a set of commands that a programmer can incorporate into a program. The driver software is usually supplied by the manufacturer of the hardware and can be used in a variety of programming languages. A programmer can use a programming language to build an application from the driver software like the one in Fig. 44.3. The application is then ready for an end user to easily control and acquire data from the hardware—a custom instrument built specifically for the user’s needs.
©2002 CRC Press LLC
45 Measurement Techniques: Sensors and Transducers 45.1 45.2
Introduction Motion and Force Transducers Displacement (Position) Transducers • Velocity Transducers • Acceleration Transducers • Force Transducers
45.3
Process Transducers Fluid Pressure Transducers • Fluid Flow Transducers (Flowmeters) • Liquid Level Transducers • Temperature Transducers
Cecil Harrison University of Southern Mississippi
45.4 45.5
Transducer Performance Loading and Transducer Compliance
45.1 Introduction An automatic control system is said to be error actuated because the forward path components (comparator, controller, actuator, and plant or process) respond to the error signal (Fig. 45.1). The error signal is developed by comparing the measured value of the controlled output to some reference input, and so the accuracy and precision of the controlled output are largely dependent on the accuracy and precision with which the controlled output is measured. It follows then that measurement of the controlled output, accomplished by a system component called the transducer, is arguably the single most important function in an automatic control system. A transducer senses the magnitude or intensity of the controlled output and produces a proportional signal in an energy form suitable for transmission along the feedback path to the comparator. [The term proportional is used loosely here because the output of the transducer may not always be directly proportional to the controlled output; that is, the transducer may not be a linear component. In linear systems, if the output of the transducer (the measurement) is not linear, it is linearized by the signal conditioner.] The element of the transducer which senses the controlled output is called the sensor; the remaining elements of a transducer serve to convert the sensor output to the energy form required by the feedback path. Possible configurations of the feedback path include: • Mechanical linkage • Fluid power (pneumatic or hydraulic) • Electrical, including optical coupling, RF propagation, magnetic coupling, or acoustic propagation
©2002 CRC Press LLC
AC
CO
ER CONTROLLER
CONTROLLED OUTPUT
TU
NT
AT
RO
R RO
REFERENCE INPUT
IO
L
N
DISTURBANCE
ACTUATOR
PLANT OR PROCESS
SENSOR COMPARATOR
FEEDBACK
FIGURE 45.1
TRANSDUCER
SIGNAL CONDITIONER
MEASUREMENT
Functional block diagram of a canonical (standard) automatic control system.
Electrical signals suitable for representing measurement results include: • DC voltage or current amplitude • AC voltage or current amplitude, frequency, or phase (CW modulated) • Voltage or current pulses (digital) In some cases, representation may change (e.g., from a DC amplitude to digital pulses) along the feedback path. The remainder of this discussion pertains to a large number of automatic control systems in which the feedback signal is electrical and the feedback path consists of wire or cable connections between the feedback path components. The transducers considered hereafter sense the controlled output and produce an electrical signal representative of the magnitude, intensity, or direction of the controlled output. The signal conditioner accepts the electrical output of the transducer and transmits the signal to the comparator in a form compatible with the reference input. The functions of the signal conditioner include: • • • • • • • • • • • • • •
Amplification/attenuation (scaling) Isolation Sampling Noise elimination Linearization Span and reference shifting Mathematical manipulation (e.g., differentiation, division, integration, multiplication, root finding, squaring, subtraction, or summation) Signal conversion (e.g., DC–AC, AC–DC, frequency–voltage, voltage–frequency, digital–analog, analog–digital, etc.) Buffering Digitizing Filtering Impedance matching Wave shaping Phase shifting
In cases in which part or all of the required signal conditioning is accomplished within the transducer, the transducer output may be connected directly to the comparator. [Connection of the transducer output directly to the comparator should not be confused with unity feedback. Unity feedback occurs when the cascaded components of the feedback path (transducer and signal conditioner) have a combined transfer function equal to 1 (unity).] In a digital control system, many of the signal conditioning functions listed here can also be accomplished by software. ©2002 CRC Press LLC
0066_frame_C45.fm Page 3 Thursday, January 10, 2002 4:58 PM
Transducers are usually considered in two groups: • Motion and force transducers, which are mainly associated with servomechanisms • Process transducers, which are mainly associated with process control systems As will be seen, most process transducers incorporate some sort of motion transducer.
45.2
Motion and Force Transducers
This section discusses those transducers used in systems that control motion (i.e., displacement, velocity, and acceleration). Force is closely associated with motion, because motion is the result of unbalanced forces, and so force transducers are discussed concurrently. The discussion is limited to those transducers that measure rectilinear motion (straight line motion within a stationary frame of reference) or angular motion (circular motion about a fixed axis). Rectilinear motion is sometimes called linear motion, but this leads to confusion in situations where the motion, though along a straight line, really represents a mathematically nonlinear response to input forces. Angular motion is also called rotation or rotary motion without ambiguity. The primary theoretical basis for motion transducers is found in rigid-body mechanics. From the equations of motion for rigid-bodies (Table 45.1), it is clear that if any one of displacement, velocity, or TABLE 45.1
Equations of Motion
Continuous
Discrete ∆t = ti − ti−1
Rectilinear displacement: x(t) = =
∫ v ( t ) dt ∫ ∫ a ( t ) dt
v i + v i−1 - ⋅ ( ∆t ) x i = x i−1 + ----------------2 a i + 2a i−1 + a i−2 ( ∆t ) - ⋅ ---------= 2x i−1 – x i−2 + ----------------------------------2 2
Angular displacement: q(t) = =
∫ w ( t ) dt ∫ ∫ a ( t ) dt
Rectilinear velocity: d v ( t ) = ----- x ( t ) dt =
∫ a ( t ) dt
Angular velocity: d w ( t ) = ----- q ( t ) dt =
∫ a ( t ) dt
Rectilinear acceleration: d a ( t ) = ----- v ( t ) dt 2
d = -------2 x ( t ) dt Angular acceleration: d a ( t ) = ----- w ( t ) dt 2
d = -------2 q ( t ) dt
©2002 CRC Press LLC
w i + w i−1 - ⋅ ( ∆t ) q i = q i−1 + -------------------2 a i + 2a i−1 + a i−2 ( ∆t ) - ⋅ ---------= 2q i−1 – q i−2 + -------------------------------------2 2 x i – x i−1 v i = ----------------∆t a i + a i−1 - ⋅ ( ∆t ) = v i−1 + ----------------2 q i – q i−1 w i = -----------------∆t a i + a i−1 - ⋅ ( ∆t ) = w i−1 + ------------------2 v i – v i−1 a i = ----------------∆t x i – 2x i−1 + x i−2 = ----------------------------------2 ( ∆t ) w i – w i−1 a i = -------------------∆t q i – 2q i−1 + q i−2 = -----------------------------------2 ( ∆t )
acceleration is measured, the other two can be derived by mathematical manipulation of the signal within an analog signal conditioner or within the controller software of a digital control system. Position is simply a location within a frame of reference; thus, any measurement of displacement relative to the frame is a measurement of position, and any displacement transducer whose input is referenced to the frame can be used as a position transducer.
Displacement (Position) Transducers Displacement transducers may be considered according to application as gross (large) displacement transducers or sensitive (small) displacement transducers. The demarcation between gross and sensitive displacement is somewhat arbitrary, but may be conveniently taken as approximately 1 mm for rectilinear displacement and approximately 10′ arc (1/6°) for angular displacement. The predominant types of gross displacement transducers (Fig. 45.2) are: • • • • •
Potentiometers [Fig. 45.2(a)] Variable differential transformers (VDT) [Fig. 45.2(b)] Synchros [Fig. 45.2(c)] Resolvers [Fig. 45.2(d)] Position encoders [Fig. 45.2(e)]
Potentiometer-based transducers are simple to implement and require the least signal conditioning, but potentiometers are subject to wear due to sliding contact between the wiper and the resistance element and may produce noise due to wiper bounce [Fig. 45.2(a)]. Potentiometers are available with strokes ranging from less than 1 cm to more than 50 cm (rectilinear) and from a few degrees to more than 50 turns (rotary). VDTs are not as subject to wear as potentiometers, but the maximum length of the stroke is small, approximately 25 cm or less for a linear VDT (LVDT) and approximately 60∞ or less for a rotary VDT (RVDT). VDTs require extensive signal conditioning in the form of phase-sensitive demodulation of the AC signal; however, the availability of dedicated VDT demodulators in integrated circuit (IC) packages mitigates this disadvantage of the VDT. Synchros are rather complex and expensive three-phase AC machines, which are constructed to be precise and rugged. Synchros are capable of measuring angular differences in the positions (up to ±180∞) of two continuously rotating shafts. In addition, synchros may function simultaneously as reference input, output measurement device, feedback path, and comparator [Fig. 45.2(c)]. Resolvers are simpler and less expensive than synchros, and they have an advantage over RVDTs in their ability to measure angular displacement throughout 360∞ of rotation. In Fig. 45.2(d), which represents one of several possibilities for utilizing a resolver, the signal amplitude is proportional to the cosine of the measured angle at one output coil and the sine of the measured angle at the other. Dedicated ICs are available for signal conditioning and for conversion of resolver output to digital format. The same IC, when used with a Scott-T transformer, can be used to convert synchro output to digital format. Position encoders are highly adaptable to digital control schemes because they eliminate the requirement for digital-to-analog conversion (DAC) of the feedback signal. The code tracks are read by track sensors, usually wipers or electro-optical devices (typically infrared or laser). Position encoders are available for both rectilinear and rotary applications, but are probably more commonly found as shaft encoders in rotary applications. Signal conditioning is straightforward for absolute encoders [Fig. 45.2(e)], requiring only a decoder, but position resolution depends on the number of tracks, and increasing the number of tracks increases the complexity of the decoder. Incremental encoders require more complex signal conditioning, in the form of counters and a processor for computing position. The number of tracks, however, is fixed at three [Fig. 45.2(f)]. Position resolution is limited only by the ability to render finer divisions of the code track on the moving surface. ©2002 CRC Press LLC
DC SOURCE INPUT
θ
RESISTANCE ELEMENT WIPER
x INPUT
OUTPUT DC SOURCE
OUTPUT (a)
RECTILINEAR
ROTARY AC SOURCE MAGNETIC CORE
INPUT SHAFT
AC SOURCE
θ
INPUT
MAGNETIC CORE
x
INPUT
INPUT SHAFT
OUTPUT
OUTPUT (b) RECTILINEAR (LVDT)
ROTARY (RVDT)
θ2
θ1 AC SOURCE
ERROR SIGNAL
CONTROLLED ANGLE (SYSTEM OUTPUT) (c)
CONTROL TRANSMITTER
REFERENCE ANGLE (SYSTEM INPUT) CONTROL TRANSFORMER
FIGURE 45.2 Gross displacement transducers: (a) potentiometers, (b) variable differential transformers (VDT), (c) synchros (typical connection), (d) resolvers (typical connection), (e) absolute position encoders, (f) code track for incremental position encoder.
Although gross displacement transducers are designed specifically for either rectilinear or rotary motion, a rack and pinion, or a similar motion converter, is often used to adapt transducers designed for rectilinear motion to the measurement of rotary motion, and vice versa. The predominant types of sensitive (small) displacement transducers (Fig. 45.3) are: • Differential capacitors • Strain gauge resistors • Piezoelectric crystals ©2002 CRC Press LLC
OUTPUT
OUTPUT
STATOR COILS
AC SOURCE
INPUT
θ (d)
ROTOR COILS
θ
INPUT
INPUT TRACK SENSORS
x CODE TRACKS
DIGITAL OUTPUT
0 0 0 0 (e)
1 0 0 0
1 1 0 0
0 1 0 0
0 1 1 0
1 1 1 0
1 0 1 0
0 0 1 0
0 0 1 1
1 0 1 1
1 1 1 1
0 1 1 1
0 1 0 1
1 1 0 1
1 0 0 1
0 0 0 1
CODE TRACKS (END VIEW)
RECTILINEAR ENCODER
ROTARY (SHAFT) ENCODER
∆x REF. TRACK CODE TRACKS
TRACK 1 TRACK 2 INPUT x "HOME" SIGNAL
t
REF. SENSOR
t
SENSOR 1
t
SENSOR 2
OUTPUT
(f)
FIGURE 45.2
RECTILINEAR OR ROTARY
(Continued)
Figure 45.3(a) provides a simplified depiction of a differential capacitor used for sensitive displacement measurements. The motion of the input rod flexes the common plate, which increases the capacitance of one capacitor and decreases the capacitance of the other. In one measurement technique, the two capacitors are made part of an impedance bridge (such as a Schering bridge), and the change in the bridge output is an indication of displacement of the common plate. In another technique, each capacitor is connected to serve as tuning capacitor for an oscillator, and the difference in frequency between the two oscillators is an indication of displacement. A strain gauge resistor is used to measure elastic deformation (strain) of materials by bonding the resistor to the material [Fig. 45.3(b)] so that it undergoes the same strain as the material. The resistor is ©2002 CRC Press LLC
OUTPUT (CAPACITOR CONNECTIONS)
x INPUT INPUT SHAFT CAPACITOR PLATES (END VIEW)
∆x
(a)
+ OUTPUT R + ∆R
− ∆x
x
INPUT
(b) OUTPUT
CRYSTAL
OUTPUT
INPUT x
∆x
∆x
ISOLATION MASS
(c)
FIGURE 45.3 crystals.
INPUT x
Sensitive displacement transducers: (a) differential capacitor, (b) strain gauge resistor, (c) piezoelectric
usually incorporated into one of the several bridge circuits, and the output of the bridge is taken as an indication of strain. The piezoelectric effect is used in several techniques for sensitive displacement measurements [Fig. 45.3(c)]. In one technique, the input motion deforms the crystal by acting directly on one electrode. In another technique, the crystal is fabricated as part of a larger structure, which is oriented so that input motion bends the structure and deforms the crystal. Deformation of the crystal produces a small output voltage and also alters the resonant frequency of the crystal. In a few situations, the output voltage is taken directly as an indication of motion, but more frequently the crystal is used to control an oscillator, and the oscillator frequency is taken as the indication of strain. ©2002 CRC Press LLC
OUTPUT
ν
PERMANENT MAGNET
INPUT
(a)
COIL (CUTAWAY VIEW)
ω
PROXIMITY SENSOR
PROXIMITY SENSOR
INPUT OUTPUT
INPUT
ω
SHAFT WITH PROXIMITY TRIGGERS
GEAR WITH TEETH AS PROXIMITY TRIGGERS
(b)
FIGURE 45.4
OUTPUT
Velocity transducers: (a) magnet and coil, (b) proximity sensors.
Velocity Transducers As stated previously, signal conditioning techniques make it possible to derive all motion measurements— displacement, velocity, or acceleration—from a measurement of any one of the three. Nevertheless, it is sometimes advantageous to measure velocity directly, particularly in the cases of short-stroke rectilinear motion or high-speed shaft rotation. The analog transducers frequently used to meet these two requirements are: • Magnet-and-coil velocity transducers [Fig. 45.4(a)] • Tachometer generators A third category of velocity transducers, counter-type velocity transducers [Fig. 45.4(b)], is simple to implement and is directly compatible with digital controllers. The operation of magnet-and-coil velocity transducers is based on Faraday’s law of induction. For a solenoidal coil with a high length-to-diameter ratio made with closely spaced turns of fine wire, the voltage induced into the coil is proportional to the velocity of the magnet. Magnet-and-coil velocity transducers are available with strokes ranging from less than 10 mm to approximately 0.5 m. A tachometer generator is, as the name implies, a small AC or DC generator whose output voltage is directly proportional to the angular velocity of its rotor, which is driven by the controlled output shaft. Tachometer generators are available for shaft speeds of 5000 rpm, or greater, but the output may be nonlinear and there may be an unacceptable output voltage ripple at low speeds. AC tachometer generators are less expensive and easier to maintain than DC tachometer generators, but DC tachometer generators are directly compatible with analog controllers and the polarity of the output is a direct indication of the direction of rotation. The output of an AC tachometer generator must be demodulated (i.e., rectified and filtered), and the demodulator must be phase sensitive in order to indicate direction of rotation. Counter-type velocity transducers operate on the principle of counting electrical pulses for a fixed amount of time, then converting the count per unit time to velocity. Counter-type velocity transducers ©2002 CRC Press LLC
rely on the use of a proximity sensor (pickup) or an incremental encoder [Fig. 45.2(f)]. Proximity sensors may be one of the following types: • • • • •
Electro-optic Variable reluctance Hall effect Inductance Capacitance
Two typical applications of counter-type velocity transducers are shown in Fig. 45.4(b). Since a digital controller necessarily includes a very accurate electronic clock, both pulse counting and conversion to velocity can be implemented in software (i.e., made a part of the controller program). Hardware implementation of pulse counting may be necessary if time-intensive counting would divert the controller from other necessary control functions. A special-purpose IC, known as a quadrature decoder/counter interface, can perform the decoding and counting functions and transmit the count to the controller as a data word.
Acceleration Transducers As with velocity measurements, it is sometimes preferable to measure acceleration directly, rather than derive acceleration from a displacement or velocity measurement. The majority of acceleration transducers may be categorized as seismic accelerometers because the measurement of acceleration is based on measuring the displacement of a mass called the seismic element (Fig. 45.5). The configurations shown in Figs. 45.5(a,b) require a rather precise arrangement of springs for suspension and centering of the seismic mass. One of the disadvantages of a seismic accelerometer is that the seismic mass is displaced during acceleration, and this displacement introduces nonlinearity and bias into the measurement. The force-balance configuration shown in Fig. 45.5(c) uses the core of an electromagnet as the seismic element. A sensitive displacement sensor detects displacement of the core and uses the displacement signal in a negative feedback arrangement to drive the coil, which returns the core to its center position. The output of the force-balance accelerometer is the feedback required to prevent displacement rather than displacement per se. A simpler seismic accelerometer utilizes one electrode of a piezoelectric crystal as the seismic element [Fig. 45.5(d)]. Similarly, another simple accelerometer utilizes the common plate of a differential capacitor [Fig. 45.3(a)] as the seismic element.
Force Transducers Force measurements are usually based on a measurement of the motion, which results from the applied force. If the applied force results in gross motion of the controlled output, and the mass of the output element is known, then any appropriate accelerometer attached to the controlled output produces an output proportional to the applied force (F = Ma). A simple spring-balance scale [Fig. 45.6(a)] relies on measurement of displacement, which results from the applied force (weight) extending the spring. Highly precise force measurements in high-value servomechanisms, such as those used in pointing and tracking devices, frequently rely on gyroscope precession as an indication of the applied force. The scheme is shown in Fig. 45.6(b) for a gyroscope with gimbals and a spin element. A motion transducer (either displacement or velocity) on the precession axis provides an output proportional to the applied force. Other types of gyroscopes and precession sensors are also used to implement this force measurement technique. Static force measurements (in which there is no apparent motion) usually rely on measurement of strain due to the applied force. Figure 45.6(c) illustrates the typical construction of a common force transducer called a load cell. The applied force produces a proportional strain in the S-shaped structural member, which is measured with a sensitive displacement transducer, usually a strain gauge resistor or a piezoelectric crystal. ©2002 CRC Press LLC
INPUT
a
CANTILEVER SPRING
OUTPUT DISPLACEMENT INPUT SENSOR
∆x
∆y
a CENTERING SPRING
SEISMIC ELEMENT
SUPPORT CHANNEL
OUTPUT
HORIZONTAL
(a)
VERTICAL
INPUT a
SEISMIC ELEMENT
CENTERING SPRINGS
DISPLACEMENT TRANSDUCER
∆θ OUTPUT (b)
INPUT
a
DISPLACEMENT SENSOR
INPUT SEISMIC ELEMENT
a SPRING SEISMIC ELEMENT
COIL
(c)
− +
OUTPUT CRYSTAL OUTPUT
(d)
FIGURE 45.5 Seismic accelerometers: (a) rectilinear acceleration transducers, (b) rotary accelerometer, (c) forcebalance accelerometer, (d) piezoelectric accelerometer.
©2002 CRC Press LLC
ANGULAR MOTION SENSOR
OUTPUT PRECESSION
DISPLACEMENT SENSOR
INERTIAL REFERENCE
OUTPUT
SPIN ELEMENT
INPUT
F
GIMBALS
F
∆θ
TORQUE AXIS
∆y INPUT
SPIN AXIS
PIVOT SPRING
(a)
PRECESSION AXIS
(b) OUTPUT
INPUT
F
(c)
FIGURE 45.6
Force transducers: (a) spring scale, (b) gyroscope, (c) load cell.
45.3 Process Transducers This section discusses transducers used in measuring and controlling the process variables most frequently encountered in industrial processes, namely, • • • •
Fluid pressure Fluid flow Liquid level Temperature
Fluid Pressure Transducers Most fluid pressure transducers are of the elastic type, in which the fluid is confined in a chamber with at least one elastic wall, and the deflection of the elastic wall is taken as an indication of the pressure. The Bourdon tube and the bellows are examples of elastic pressure transducers, which are used in laboratory-grade transducers and in some industrial process control applications. The fluid pressure transducer depicted in Fig. 45.7, which uses an elastic diaphragm to separate two chambers, is the type most frequently encountered in industrial process control. Diaphragms are constructed from one of a variety of elastic materials ranging from thin metal to polymerized fabric. For gross pressure measurements, the displacement of the diaphragm is sensed by a potentiometer or LVDT; for more sensitive pressure measurements, any one of the three sensitive displacement sensors described earlier is used. In the most common configuration for sensitive pressure transducers, a strain gauge resistor with a rosette pattern is bonded to the diaphragm. In another configuration, the outer ©2002 CRC Press LLC
REFERENCE PRESSURE
DISPLACEMENT SENSOR
OUTPUT
WORKING CHAMBER DIAPHRAGM
INPUT
p
FIGURE 45.7
Diaphragm pressure transducer. DISPLACEMENT SENSOR
REFERENCE PRESSURE
∆x
OUTPUT
SPRING
PISTON WORKING CHAMBER
INPUT
FIGURE 45.8
p
Piston-and-spring transducer.
walls of the pressure sensor serve as capacitor plates and the diaphragam serves as the common plate of a differential capacitor. In a very sensitive and highly integrated configuration, the diaphragm is a silicon wafer with a piezoresistive strain gauge and signal conditioning circuits integrated into the silicon. High-vacuum (very low pressure) measurements, usually based on observations of viscosity, thermal conductivity, acoustic properties, or ionization potential of the fluid, will not be included in this discussion. Transducers used in high-pressure hydraulic systems [70 MPa (10,000 psi) or greater] are usually of the piston and spring type [Fig. 45.8]. In either of the pressure transducers, the output is actually a measure of the difference in pressure between the working chamber and the reference chamber of the transducer (i.e., pOUT = p - pREF). The measurement is called: • An absolute pressure if the reference chamber is sealed and evacuated (i.e., pREF = 0 and pOUT = p) • A gauge pressure if the reference chamber is vented to the atmosphere (i.e., pOUT = p - pATM) • A differential pressure if any other pressure is applied to the reference chamber
Fluid Flow Transducers (Flowmeters) Flowmetering, because of the number of variables involved, encompasses a wide range of measurement technology and applications. In industrial processes, the term fluid is applied not only to gases and liquids, but also to flowable mixtures (often called slurries or sludges) such as concrete, sewage, or wood pulp. Control of a fluid flow, and hence the type of measurement required, may involve volumetric flow rate, mass flow rate, or flow direction. Gas flows may be compressible, which also influences the measurement technique. In addition, the condition of the flow—whether or not it is homogenous and clean (free of suspended particles)—has a bearing on flowmeter technology. Another factor to be considered is flow velocity; slow moving laminar flows of viscous material require different measurement techniques than ©2002 CRC Press LLC
those used for high-velocity turbulent flows. Still another consideration is confinement of the flow. Whereas most fluid flow measurements are concerned with full flow through closed channels such as ducts and pipes, some applications require measurements of partial flow through open channels such as troughs and flumes. Only the most widely used flowmeters are considered here. The major categories of flowmeters are: • Differential pressure, constriction-type (venturi, orifice, flow nozzle, elbow (or pipe bend), and pitot static) (Fig. 45.9) • Fluid-power (gear motors, turbines, and paddle wheels) (Fig. 45.10) DIFFERENTIAL PRESSURE TRANSDUCER DIFFERENTIAL PRESSURE TRANSDUCER
OUTPUT
OUTPUT
FLUID FLOW INPUT
ORIFICE
FLUID FLOW THROAT
INPUT
OBSTRUCTION PLATE
(b)
(a)
DIFFERENTIAL PRESSURE TRANSDUCER
DIFFERENTIAL PRESSURE TRANSDUCER
OUTPUT
OUTPUT
FLUID FLOW INPUT
FLUID FLOW NOZZLE
INPUT
(d)
(c)
STATIC PRESSURE
OUTPUT
FLUID FLOW STATIC PRESSURE PORT INPUT TOTAL PRESSURE (e)
STAGNATION POINT
PITOT TUBE
DIFFERENTIAL PRESSURE TRANSDUCER
FIGURE 45.9 Differential pressure flowmeters: (a) Venturi flowmeter, (b) orifice flowmeter, (c) nozzle flowmeter, (d) pipebend (elbow) flowmeter, (e) pitot-static-flowmeter. ©2002 CRC Press LLC
FLUID FLOW INPUT
PROXIMITY SENSOR
COUNTER OUTPUT
(a)
COUNTER
OUTPUT PROXIMITY SENSOR
PADDLE WHEEL FLUID FLOW INPUT
(b)
OUTPUT
ANGULAR VELOCITY SENSOR
DRIVE GEAR FLUID FLOW INPUT
IDLER GEAR
(c)
FIGURE 45.10 flowmeter.
• • • • •
Fluid power flowmeters: (a) turbine flowmeter, (b) paddle wheel flowmeter, (c) gear motor
Ultrasound (Fig. 45.11) Vortex shedding (Fig. 45.12) Thermal anemometer (Fig. 45.13) Electromagnetic (Fig. 45.14) Rotameter (variable-area in-line flowmeter) (Fig. 45.15)
Differential pressure flowmeters are suited to high- and moderate-velocity flow of gas and clean, lowviscosity liquids. Venturi flowmeters [Fig. 45.9(a)] are the most accurate, but they are large and expensive. Orifice flowmeters [Fig. 45.9(b)] are smaller, less expensive, and much less accurate than venturi flowmeters.
©2002 CRC Press LLC
ULTRASOUND TRANSMITTER
SOUND PATH
INPUT FLUID FLOW
ULTRASOUND RECEIVER SYNCHRONIZATION AND TIMING TIMER CONVERTER
OUTPUT
(a)
PARTICLES OR BUBBLES
INPUT FLUID FLOW TRANSMITTED/ REFLECTED SOUND PATH
ULTRASOUND TRANSRECEIVER FREQUENCY SHIFT CONVERTER
(b)
FIGURE 45.11 flowmeter.
OUTPUT
Ultrasound flowmeters: (a) Transmission-type ultrasound flowmeter, (b) doppler ultrasound
FREQUENCY-TOVOLTAGE CONVERTER
OUTPUT
SOUND PICKUP
VORTICES FLUID FLOW INPUT
SHEDDING BODY
FIGURE 45.12
Vortex-shedding flowmeter.
Nozzle flowmeters [Fig. 45.9(c)] are a compromise between venturi and orifice flowmeters. Pipe-bend flowmeters [Fig. 45.9(d)], which can essentially be installed in any bend in an existing piping system, are used primarily for gross flow rate measurements. Pitot-static flowmeters [Fig. 45.9(e)] are used in flows which have a large cross-sectional area, such as in wind tunnels. Pitot-static flowmeters are also used in freestream applications such as airspeed indicators for aircraft. Fluid-power flowmeters are used in low-velocity, moderately viscous flows. In addition to industrial control applications, turbine flowmeters [Fig. 45.10(a)] are sometime used as speed indicators for ships or boats. Paddle wheel flowmeters [Fig. 45.10(b)] are used both in closed- and open-flow applications such as liquid flow in flumes. Since a fluid-power gear motor [Fig. 45.10(c)] is a constant volume device, motor shaft speed is always a direct indication of fluid flow rate.
©2002 CRC Press LLC
CURRENT/ TEMPERATURE SENSOR/ CONTROLLER
HEATING ELEMENT
OUTPUT FLUID FLOW
INPUT
FIGURE 45.13
Thermal anemometer.
OUTPUT
N
ELECTRODES
FLUID FLOW
INPUT
S
FIGURE 45.14
Electromagnetic flowmeter.
CALIBRATED GRADUATIONS
OUTPUT (HIGH) MOVABLE PROXIMITY SENSORS OUTPUT (LOW)
FLOAT GUIDE WIRE
FLUID FLOW INPUT
FIGURE 45.15
Variable-area in-line flowmeter (rotameter).
©2002 CRC Press LLC
Ultrasound flowmeters of the transmission type [Fig. 45.11(a)], which are based on the principle that the sound transmission speed will be increased by the flow rate of the fluid, are used in all types of clean, subsonic flows. Doppler flowmeters [Fig. 45.11(b)] rely on echoes from within the fluid, and are thus only useful in dirty flows that carry suspended particles or turbulent flows that produce bubbles. Ultrasound flowmeters are nonintrusive devices, which can often be retrofitted to existing duct or pipe systems. Vortex shedding flowmeters (Fig. 45.12) introduce a shedding body into the flow to cause production (shedding) of vortices. The sound accompanying the production and collapse of the vortices is monitored and analyzed. The dominant frequency of the sound is indicative of the rate of vortex production and collapse, and hence an indication of flow rate. Vortex shedding flowmeters are useful in low-velocity, nonturbulent flows. Thermal anemometers (Fig. 45.13) are used in low-velocity gas flows with large cross-sectional area, such as in heating, ventilation, and air conditioning (HVAC) ducts. Convection cooling of the heating element is related to flow rate. The flow rate measurement is based either on the current required to maintain a constant temperature in the heating element, or alternatively on the change in temperature when the current is held constant. Electromagnetic flowmeters (Fig. 45.14) are useful for slow moving flows of liquids, sludges, or slurries. The flow material must support electrical conduction between the electrodes, and so in some cases it is necessary to ionize the flow upstream from the measurement point in order to use an electromagnetic flowmeter. Variable-area in-line flowmeters (Fig. 45.15), or rotameters, are sometimes referred to as sight gauges because they provide a visible indication of the flow rate. These devices, when fitted with proximity sensors (such as capacitive pickups) that sense the presence of the float, can be used in on–off control applications.
Liquid Level Transducers Liquid-level measurements are relatively straightforward, and the transducers fall into the categories of contact or noncontact. Measurements may be continuous, in which the liquid level is monitored continuously throughout its operating range, or point, in which the liquid level is determined to be above or below some predetermined level. The contact transducers encountered most frequently are: • • • •
Float Hydrostatic pressure Electrical capacitance Ultrasound
The noncontact transducers encountered most frequently are: • • • •
Capacitive proximity sensors Ultrasound Radio frequency Electro-optical
Float-type liquid level transducers are available in a wide variety of configurations for both continuous and point measurements. One possible configuration is depicted in Fig. 45.16 for continuous measurement and for both single- and dual-point measurements. Hydrostatic pressure liquid level transducers may be used in either vented or pressurized applications (Fig. 45.17). In either case the differential pressure is directly proportional to the weight of the liquid column, since the differential pressure transducer accounts for surface pressure. Capacitance probes [Fig. 45.18(a)] are widely used in liquid level measurements. It is possible, when the tank walls are metal, to use a single bare or insulated metal rod as one capacitor plate and the tank walls as the other. More frequently, capacitance probes consist of a metal rod within a concentric cylinder ©2002 CRC Press LLC
OUTPUT OUTPUT
OUTPUT
OUTPUT
HIGH
GUIDE ROD
DISPLACEMENT SENSOR
PROXIMITY SENSOR FLOAT
INPUT
LIQUID LEVEL
LOW
CONTINUOUS
FIGURE 45.16
POINT
Float-type liquid level transducers.
DIFFERENTIAL PRESSURE TRANSDUCER
OUTPUT
OUTPUT
INPUT
INPUT
LIQUID LEVEL
LIQUID LEVEL
PRESSURIZED
VENTED
FIGURE 45.17
Hydrostatic pressure liquid level transducers.
OUTPUT
OUTPUT
HIGH INPUT
LIQUID LEVEL
METAL TANK WALL
OPEN END
OUTPUT INPUT INPUT
CAPACITANCE SENSOR SIGHT GAUGE
LIQUID LEVEL
OUTPUT
LIQUID LEVEL LOW (a)
ROD AND TANK WALL
FIGURE 45.18
ROD AND CYLINDER
(b)
Capacitive-type liquid level transducers: (a) capacitive probes, (b) capacitive switches.
©2002 CRC Press LLC
NON-WETTED ULTRASOUND TIMER
ULTRASOUND ACTUATED SWITCH
OUTPUT
OUTPUT
TRANSMITTER/ RECEIVER WETTED ULTRASOUND TIMER
TRANSMITTER OUTPUT
INPUT
INPUT
LIQUID LEVEL
(a)
RECEIVER
LIQUID LEVEL
(b)
FIGURE 45.19
Ultrasound liquid level transducers: (a) echo-ranging liquid level transducer, (b) ultrasound switch.
open at the ends, which makes the transducer independent of the tank construction. An interesting application of this type of capacitance probe is as aircraft fuel quantity indicators. Capacitance switches can be utilizes as depicted in Fig. 45.18(b) to provide noncontact point measurements of liquid level. Ultrasound echo ranging transducers can be used in either wetted (contact) or nonwetted (noncontact) configurations for continuous measurement of liquid level [Fig. 45.19(a)]. An interesting application of wetted transducers is as depth finders and fish finders for ships and boats. Nonwetted transducers can also be used with bulk materials such as grains and powders. Radio-frequency and electro-optic liquid level transducers are usually noncontact, echo ranging devices that are similar in principle and application to the nonwetted ultrasound transducer. Ultrasonic transducers can also be adapted to point measurements by locating the transmitter and the receiver opposite one another across a gap [Fig. 45.19(b)]. When liquid fills the gap, attenuation of the ultrasound energy is markedly less than when air fills the gap. The signal conditioning circuits utilize this sharp increase in the level of ultrasound energy detected by the receiver to activate a switch.
Temperature Transducers Temperature measurement is generally based on one of the following physical principles: • • • • •
Thermal expansion Thermoelectric phenomena Thermal effect on electrical resistance Thermal effect on conductance of semiconductor junctions Thermal radiation
(Strictly speaking, any device used to measure temperature may be called a thermometer, but more descriptive terms are applied to devices used in temperature control.) Bimetallic switches (Fig. 45.20) are widely used in on–off temperature control systems. If two metal strips with different coefficients of thermal expansion are bonded together while both strips are at the same temperature, the bimetallic structure will bend when the temperature is changed. Although these devices are often called thermal cutouts, implying that they are used in normally closed switches, they can be fabricated in either normally closed or normally open configurations. The bimetallic elements can also be fabricated in coil or helical configurations to extend the range of motion due to thermal expansion. Thermocouples are rugged and versatile temperature sensors frequently found in industrial control systems. A thermocouple consists of a pair of dissimilar metal wires twisted or otherwise bonded at one end. The Seebeck effect is the physical phenomena that accounts for thermocouple operation, so thermocouples are known alternatively as Seebeck junctions. The potential difference (Seebeck voltage) between the free ends of the wire is proportional to the difference between the temperature at the junction and ©2002 CRC Press LLC
BIMETALLIC ELEMENT
ELECTRICAL CONTACT
FIGURE 45.20
Bimetallic thermal switch. ISOTHERMAL TERMINAL BLOCK
INPUT
THERMOCOUPLE
SIGNAL CONDITIONING CIRCUIT
OUTPUT
TEMPERATURE CORRECTIONS TERMINAL BLOCK TEMPERATURE SENSOR
(a)
MOUNTING HOLE
THREADED WELL
ENCAPSULATED JUNCTION
SCREW-MOUNT MOUNTING HOLE
(b)
FLANGED WELL
ADHESIVE PAD
FIGURE 45.21 Thermocouples: (a) typical thermocouple connection, (b) some thermocouple accessories and configurations.
the temperature at the free ends. Thermocouples are available for measurement of temperature as low as -270°C and as high as 2300°C, although no single thermocouple covers this entire range. Thermocouples are identified as type B, C, D, E, G, J, K, N, R, S, or T, according to the metals used in the wire. Signal conditioning and amplification of the relatively small Seebeck voltage dictates that the thermocouple wires must be connected to the terminals of a signal conditioning circuit. These connections create two additional Seebeck junctions, each of which generates its own Seebeck voltage, which must be canceled in the signal conditioning circuit. To implement cancellation to the corrections the following are necessary [Fig. 45.21(a)]: • The input terminals of the signal conditioning circuit must be made of the same metal. • The two terminals must be on an isothermal terminal block so that each Seebeck junction created by the connection is at the same temperature. • The temperature of the terminal block must be known. ©2002 CRC Press LLC
VOLTAGE FOLLOWER
INPUT
FIGURE 45.22
RTD
− +
OUTPUT
CONSTANT CURRENT SOURCE
Typical resistance temperature detector (RTD) application.
The first two requirements are met by appropriate construction of the signal conditioning circuit. The third requirement is met by using a reference temperature sensor, probably an IC temperature transducer of the type described later. Thermocouple and thermocouple accessories are fabricated for a variety of applications [Fig. 45.21(b)]. Protective shields (thermowells) are used to protect thermocouple junctions in corrosive environments or where conducting liquids can short circuit the thermocouple voltage; however, exposed (bare) junctions are used wherever possible, particularly when a fast response is essential. Resistance temperature detectors (RTD) are based on the principle that the electrical resistivity of most metals increases predictably with temperature. Platinum is the preferred metal for RTDs, although other less expensive metals are used in some applications. The resistivity of platinum is one of the standards by which temperature is measured. The relatively good linearity of the resistivity of platinum over a wide temperature range (-200 to 800°C) makes platinum RTDs suitable for stable, accurate temperature transducers, which are easily adapted to control systems applications. The disadvantage of the RTD is that the temperature-sensitive element is a rather fragile metal filament wound on a ceramic bobbin or a thin metal film deposited on a ceramic substrate. RTD elements are usually encapsulated and are rarely used as bare elements. The accessories and application packages used with RTDs are similar to those used with thermocouples [Fig. 45.21(b)]. Most platinum RTDs are fabricated so as to have a nominal resistance of 100 W at 0°C. The resistance temperature coefficient of platinum is approximately 3–4 mW/W/°C, so resolution of the temperature to within 1°C for a nominal 100-W RTD element requires resolution of the absolute resistance within 0.3–0.4 W. These resistance resolution requirements dictate use of special signal conditioning techniques to cancel the lead and contact resistance of the RTD element (Fig. 45.22). The circuit depicted in Fig. 45.22 is a variation of a 4-wire ohmmeter. Most RTDs are manufactured with four leads to be compatible with such circuits. Thermistors are specially prepared metal oxide semiconductors that exhibit a strong negative temperature coefficient, in sharp contrast to the weak positive temperature coefficient of RTDs. Nominal thermistor resistance, usually specified for 25°C, ranges from less than 1000 W to more than 1 MW, with sensitivities greater than 100 W/°C. Thus, the thermistor is the basis for temperature sensors that are much more sensitive and require less special signal conditioning than either thermocouples or RTDs. The tradeoff is the marked nonlinearity of the resistance-temperature characteristic. To minimize this problem, manufacturers provide packages in which the thermistor has been connected into a resistor network chosen to provide a relatively linear resistance-temperature characteristic over a nominal temperature range. The development of thermistor technology has lead to the IC temperature sensor in which the temperature-sensitive junction(s) and the required signal conditioning circuits are provided in a monolithic package. The user is only required to provide a supply voltage (typically 5 V DC) to the IC in order to obtain an analog output voltage proportional to temperature. Thermistors and IC temperature sensors ©2002 CRC Press LLC
TARGET/DETECTOR
HEAT SOURCE
LENS
TARGET ENCLOSURE
FIGURE 45.23
Schematic of the radiation thermometry scheme.
can be produced in very small packages, which permit highly localized temperature measurements. Some thermistors designed for biological research are mounted in the tip of a hypodermic needle. The shortcomings of both thermistor and IC temperature sensors are that they are not rugged, cannot be used in caustic environments, and are limited to temperatures below approximately 200°C. Radiation thermometers are used for remote (noncontact) sensing of temperature in situations where contact sensors cannot be used. Operation is based on the principles of heat transfer through thermal radiation. Radiation thermometers focus the infrared energy from a heat source onto a black body (target) within the radiation thermometer enclosure [Fig. 45.23]. One of the contact temperature sensors described previously is incorporated into the target to measure the target temperature. The rise in temperature at the target is related to the source temperature. Typical radiation thermometers have standoff ranges (focal lengths) of 0.5–1.5 m, but instruments with focal length as short as 1 cm or as long as 10 m are available. Radiation thermometers are available for broadband, monochromatic, or two-color thermometry.
45.4 Transducer Performance The operation of a transducer within a control system can be described in terms of its static performance and its dynamic performance. The static characteristics of greatest interest are: • • • • •
Scale factor (or sensitivity) Accuracy, uncertainty, precision, and system error (or bias) Threshold, resolution, dead band, and hysteresis Linearity Analog drift
The dynamic characteristics of greatest interest are: • Time constant, response time, and rise time • Overshoot, settling time, and damped frequency • Frequency response Static performance is documented through calibration, which consists of applying a known input (quantity or phenomenon to be measured) and observing and recording the transducer output. In a typical calibration procedure, the input is increased in increments from the lower range limit to the upper range limit of the transducer, then decreased to the lower range limit. The range of a component consists of all allowable input values. The difference between the upper and lower range limits is the input span of the component; the difference between the output at the upper range limit and the output at the lower range limit is the output span. Dynamic performance is documented by applying a known change, usually a step, in the input and observing and recording the transducer output, usually with a strip recorder or a storage oscilloscope.
©2002 CRC Press LLC
45.5 Loading and Transducer Compliance A prime requirement for an appropriate transducer is that it be compliant at its input. Compliance in this sense means that the input energy required for proper operation of the transducer, and hence a correct measurement of the controlled output, does not significantly alter the controlled output. A transducer that does not have this compliance is said to load the controlled output. For example, a voltmeter must have a high-impedance input in order that the voltage measurement does not significantly alter circuit current and, hence, alter the voltage being measured.
Defining Terms Controlled output: The principal product of an automatic control system; the quantity or physical activity to be measured for automatic control. Feedback path: The cascaded connection of transducer and signal conditioning components in an automatic control system. Forward path: The cascaded connection of controller, actuator, and plant or process in an automatic control system. Motion transducer: A transducer used to measure the controlled output of a servomechanism; usually understood to include transducers for static force measurements. Plant or process: The controlled device that produces the principal output in an automatic control system. Process control: The term used to refer to the control of industrial processes; most frequently used in reference to control of temperature, fluid pressure, fluid flow, and liquid level. Process transducer: A transducer used to measure the controlled output of an automatic control system used in process control. Reference input: The signal provided to an automatic control system to establish the required controlled output; also called setpoint. Servomechanism: A system in which some form of motion is the controlled output. Signal conditioning: In this context, the term used to refer to the modification of the signal in the feedback path of an automatic control system; signal conditioning converts the sensor output to an electrical signal suitable for comparison to the reference input (setpoint); the term can also be applied to modification of forward path signals. Transducer: The device used to measure the controlled output in an automatic control system; usually consists of a sensor or pickup and signal conditioning components.
References Bateson, R.N. 1993. Introduction to Control System Technology, 4th ed. Merrill, Columbus, OH. Berlin, H.M. and Getz, F.C., Jr. 1988. Principles of Electronic Instrumentation and Measurement. Merrill, Columbus, OH. Buchla, D. and McLachlan, W. 1992. Applied Electronic Instrumentation and Measurement. Macmillan, New York. Chaplin, J.W. 1992. Instrumentation and Automation for Manufacturing. Delmar, Albany, NY. Doeblin, E.O. 1990. Measurement Systems Application and Design, 4th ed. McGraw-Hill, New York. Dorf, R.C. and Bishop, R.H. 1995. Modern Control Systems, 7th ed. Addison-Wesley, Reading, MA. O’Dell, T.H. 1991. Circuits for Electronic Instrumentation. Cambridge Univ. Press, Cambridge, England, UK. Seippel, R.G. 1983. Transducers, Sensors, and Detectors. Reston Pub., Reston, VA. Webb, J. and Greshock, K. 1993. Industrial Control Electronics, 2nd ed. Macmillan, New York.
©2002 CRC Press LLC
Further Information Manufacturers and vendors catalogs, data documents, handbooks, and applications notes, particularly the handbook series (current year) by Omega Engineering, Inc.: The Flow and Level Handbook The Pressure, Strain, and Force Handbook The Temperature Handbook Trade journals, magazines, and newsletters, particularly: Instrumentation Newsletter (National Instruments) Personal Engineering and Instrumentation News Test and Measurement News (Hewlett Packard) Test and Measurement World
©2002 CRC Press LLC
46 A/D and D/A Conversion 46.1 46.2 46.3
Introduction Sampling ADC Specifications Range • Resolution • Coding Convention • Linear Errors • Nonlinear Errors • Aperture Errors • Noise • Dynamic Range • Types of ADCs • Flash • SuccessiveApproximation Register • Multistage • Integrating • Sigma-Delta • Digital-to-Analog Converters • Updating
46.4
Mike Tyler National Instruments, Inc.
DAC Specifications Range • Resolution • Monotonicity • Settling Time and Slew Rate • Offset Error and Gain Error • Architecture of DACs • Switching Network • Resistive Networks • Summing Amplifier
46.1 Introduction As computers began to gain popularity, engineers and scientists realized that computers could become a powerful tool. However, almost all real-world phenomena (such as light, pressure, velocity, temperature, etc.) are analog signals, and computers, on the other hand, rely on digital signals. Therefore, many companies began to invest in advancements in analog-to-digital and digital-to-analog converters (ADC and DAC). These devices have become the keystone in every measurement device. This chapter will examine the ADC and DAC on a functional level as well as discuss important specifications of each.
46.2 Sampling In order to convert an analog signal into a digital signal, the analog signal must first be sampled. Sampling involves converting one value of a signal at a particular interval of time. Generally, conversions happen uniformly in time. For example, a digitizing system may convert a signal every 5 µs, or sample at 200 kS/s. Although it is not necessary to uniformly sample a signal, doing so provides certain benefits that will be discussed later. A typical sampling circuit contains two major components: a track-and-hold (T/H) circuit and the ADC. Since the actual conversion in the ADC takes some amount of time, it is necessary to hold constant the value of the signal being converted. At the instance the sample is to be taken, the T/H holds the sample value even if the signal is still changing. Once the conversion has been completed, the T/H releases the value it is currently storing and is ready to track the next value. One aspect of sampling that cannot be avoided is that some information is thrown away, meaning that an analog waveform actually has an infinite number of samples and there is no way to capture every value.
©2002 CRC Press LLC
The major pitfall associated with this fact is called undersampling or sampling too slow. If a 10-kHz sinewave is to be acquired and sampling only occurs at 5 kS/s, the true waveform will not be preserved. In fact, a waveform of a different frequency will result. The result of undersampling is often referred to as aliasing. According to the Nyquist theory, which deals with sampling, sampling should occur at a rate twice as high as the highest frequency component of the signal. In general, this theory just preserves the frequency of the signal; so if the shape of the waveform is desired, sampling should probably be at least 10 times as fast as the signal.
46.3 ADC Specifications Range The input range of an ADC is the span of voltages over which the ADC can make a conversion. For example, a common range for ADC is 0–5 V, meaning that the ADC can convert an input that is within 0–5 V. The end points of the low and high end of the range are called -full-scale and +full-scale (they are also referred to as rails). If the -full-scale is equal to 0 V, then the range is referred to as unipolar, and if the two full-scale values have the same magnitude, e.g., -5 V to +5 V, then the range of the ADC is referred to as bipolar. If an input voltage falls outside the range, the ADC is said to be overranged. In this case, most ADCs will return a value of the endpoint closest to the voltage.
Resolution The resolution of a digitizer is the smallest detectable change in voltage; however, the resolution of an ADC usually refers to the number of binary bits it produces. For example, a 12-bit ADC represents a converted analog value, using 12 digital bits. This same 12-bit ADC can resolve a value to one of 4096 12 (= 2 ) different levels. Another common way to specify resolution is by decimal digits. A 6-digit voltmeter measuring on a 1-V scale could measure in 0.000001 V steps from -0.999999 V to 0.999999 V.
Coding Convention The different formats an ADC can use represent its output and are known as coding convention. An ADC using binary coding produces all 0s at –full-scale and all 1s at +full-scale (e.g., a 3-bit converter would produce 000 through 111).
Linear Errors Linear errors are the largest and most common errors in an ADC, and are easily corrected by simple calibration or by additions and multiplications by correction constants. Although linear errors do not distort the ADC transfer function, they can change the range over which the ADC correctly operates.
Nonlinear Errors Unlike linear errors, nonlinear errors are more difficult to compensate for in either the analog or digital signal. The best way to mitigate nonlinear error is to choose a well-designed, well-specified ADC. Nonlinear errors are characterized by two different specifications: differential nonlinearity (DNL) and integral nonlinearity (INL). DNL measures any irregularity in the code width (smallest detectable change) by comparing the actual change in value to the ideal value of one code width (or 1 LSB). INL measures the deviation from an ideal transfer line of the code transitions. Another important specification of an ADC in regards to differential nonlinearity is if any codes are missing. A missing code can be thought of as a code with a width of 0 LSB (or a DNL of –1). If a code ©2002 CRC Press LLC
is missing, the step size at that point in the transfer function is doubled, effectively cutting the local resolution of the ADC in half. Therefore, ADC datasheets will specify if the ADC has no missing codes. Another way to capture the same information included in INL is a measurement called relative accuracy. Relative accuracy indicates how far away from the ideal the code transitions are (which is INL), but also includes how far any part of the transfer function, including quantization “staircase” error, deviates from ideal. In an ideal noiseless ADC, the worse case relative accuracy is always greater than the INL. However, if an ADC has some inherent noise and has noise (referred to a dither) added to the input, then the relative accuracy actually improves. The addition of noise to a quantizer tends to smooth the average transfer function that results in less of a “staircase” effect. This improvement in the transfer functions linearity comes at the expense of conversion errors caused by the added noise.
Aperture Errors Aperture errors deal with the timing of the conversions themselves. All ADCs require some signal, generally a pulse train clock, to tell the ADC when to start a conversion. Inherently, some small amount of time will elapse when the ADC receives this convert signal and when the sample is held. This amount of time that lapses is called the aperture delay. Most ADCs have an aperture delay of just a few nanoseconds. However, most measurement devices have some other circuitry in front of the ADC, such as amplifiers, which have the effect of negating the aperture delay caused by the ADC. For example, if the ADC has a delay of 10 ns and the amplifier has a delay of 160 ns, the effective aperture delay of the system is -150 ns. Another important time specification is jitter. Jitter (or aperture jitter) measures the difference in the amount of time between each sample. If a signal is sampled at 1 million samples per second (1 MS/s), the expected period between each sample would be exactly 1 µs. The actual time between samples could vary from 1 µs by as much as a few picoseconds to a nanosecond from cycle to cycle. Jitter can be caused by the clock source, digital clock circuitry, or S/H circuitry. The most common effect of jitter is to add interference at frequencies very close to the signal of interest.
Noise Noise limits the ADC resolution because an interfering waveform is present in the input signal as it is being converted. The most common source of noise in a signal is thermal noise. Thermal noise is caused by the random nature of electrical components. With higher temperatures and resistances in components, the thermal noise will increase. Other common sources of noise are electromagnetically coupled to nearby circuitry, such as logic circuits and clocks. Generally, noise is specified in volts peak-to-peak or rms, or LSBs rms or peak-to-peak. Quantization error, previously discussed, is sometimes referred to as quantization noise. Although quantization error is perfectly predictable with respect to the input signal, when a signal is fairly “busy” (meaning that each consecutive conversions do not result in many common bits of data) the quantization error becomes chaotic. When this occurs, the quantization error can be thought of as another source of random noise, whose statistical distribution is uniform from –0.5 to 0.5 LSB and whose standard deviation is 1/ 12 LSB. In spectral analysis, this is sometimes the dominant source of noise. Once noise reaches the ADC, there are ways to process the noise out of the signal, provided that the noise is an independent signal. One of the most common ways to decrease noise in a DC measurement is to acquire a number of points and average the values. If the noise is white random noise, which has equal energy density at all frequencies, averaging will reduce the amount of noise by the square root of the number of samples averaged. If the noise is interfering with a repetitive waveform, the noise can be reduced by measuring a number of waveforms, using a level trigger and then averaging the waveforms. Most digital oscilloscopes have waveform averaging. Most noise specifications for an ADC are for quiet, low-impedance signals. To preserve the noise performance of the ADC, the user must connect signals to the inputs with shielded cabling that keeps signals away from any electromagnetic interference. ©2002 CRC Press LLC
Dynamic Range Dynamic range is the ratio of largest to smallest signal the ADC can represent. The dynamic range is found by taking a full-scale signal value and comparing that to the smallest detectable noise level of the ADC. The dynamic range is usually expressed in decibels (dB) and can be found by the following formula:
Dynamic Range = 20 log ( S/N ) where S is large signal level and N is noise level. The noise level includes quantization noise of the ADC, n -1 which for an ideal ADC is equal to 1/ 12 LSB rms. A full-scale sine wave has an amplitude of 2 LSB n-1 or 2 / 2 (n = number of bits of the ADC). Therefore, an ideal ADC has a dynamic range of n-1
Dynamic Range = 20 log ( 2 / 2 ¥ 1 / 12 ) = 6.0206n + 1.7609 Since no ADC is ideal, the effective number of bits (ENOB) of an actual ADC can be calculated using the above equation. The ENOB represents the real world resolution of an ADC, and can be found with the following equation using dynamic range:
NOB = ( Dynamic Range – 1.7609)/6.0206 For example, a 12-bit ADC with a dynamic range of 69 dB has an ENOB of 11.17 bits.
Types of ADCs All ADCs accomplish the same fundamental task of taking an analog signal and converting it into a digital representation. Two crucial characteristics of an ADC are the speed at which conversions can be made and the resolution of the conversions. In most cases, this becomes a trade-off of speed vs. resolution. For example, a converter of 100 MS/s at 24 bits is not currently available, but there are 100 MS/s converters (probably at 8 bits) and 24-bit converters (probably at 1 kS/s). This makes it important to understand how the ADC will be used in order to match the correct converter for the application. Despite the many different types of ADCs available, they all share some common characteristics. The heart of any ADC converter is the comparator. A comparator is a simple 1-bit ADC, which has two analog inputs and one digital output. One of the analog input signals is a reference voltage that has some known value. The other inputs will either be greater than or less than the known input value, and that will turn into a digital value of 1 or 0. Some ADCs are actually composed of multiple comparators, but the basic theory for each one is the same.
Flash Flash ADCs are the fastest ADCs available, obtaining speeds in multiple gigasamples per second. However, true to the speed vs. resolution trade-off discussed, the flash converters generally have resolutions of 10 n -1 bits and below. A flash converter with n bits of resolution is composed of 2 high-speed comparators n -1 operating in parallel, see Fig. 46.1. A string of 2 resistors between two voltage references supplies a set of uniformly spaced voltages that span the input range, one for each comparator. The input voltage is then compared to each level simultaneously. The comparators then output a 1 for all voltages below the input voltage, and a 0 for all voltages above the input voltage. These resulting digital values are then fed into a logic convert to output an n-bit value. Because of the simplicity of the design, flash converters are fast, but as the resolution of the converter is increased the number of comparators and resistors needed increases exponentially. Both the size ©2002 CRC Press LLC
FIGURE 46.1 Flash ADC—A flash converter has 2 of the resistors for linearity.
n –1
comparators operating in parallel. It relies on the uniformity
FIGURE 46.2 SAR ADC—A successive-approximation (SAR) converter has one comparator, which iterates through a series of “guesses” to determine a digital representation of the signal.
and power needed to operate the converter also increase exponentially as a result of increased resolution, and this way the converters are limited in their resolution. However, because string resistors’ values typically vary only a few percent from one another, the differential linearity of the flash ADC is quite good.
Successive-Approximation Register Successive-approximation register (SAR) ADCs are the most common ADCs, having resolutions of 8–16 bits and speeds up to 10 MS/s. These ADCs are low-cost, and generally have good integral linearity. The SAR ADC architecture contains a high-speed DAC in a feedback loop, see Fig. 46.2. The SAR iterates the DAC through a series of levels, which are then compared to the input voltage. As the conversion progresses, the SAR builds the n-bit digital output as a result of these comparisons. When the SAR has finished, the output of the DAC is as close to the input signal as possible, and the digital input of the DAC becomes the output of the SAR ADC. A good real world analogy to an SAR is a balance scale. If an object of unknown mass is placed on one side and continues to test a combination of weights until the scale is balanced, the weight of the object can be obtained. The speed of the SAR ADC is limited by the rate at which the DAC can settle inside the feedback loop. In fact, the DAC must settle n times for every n bits of resolution desired in the ADC. In order to achieve faster rates, the SAR architecture can be used as the basis for a different ADC, the multistage. ©2002 CRC Press LLC
FIGURE 46.3 Multistage ADC—A multistage converter is a combination of the SAR and flash converters to provide faster sampling than the SARs and at a higher resolution than the flash converters could provide.
Multistage In order to achieve higher rates than the SAR, multistage ADCs use the iterative approach of the SAR but reduce the number of comparisons needed to complete the conversion. In addition to the comparator, the multistage ADC uses low-resolution flash converters, see Fig 46.3. In the figure, the 6-bit flash is used to convert the residual errors from the 8-bit flash. These two outputs from the ADCs are then combined using digital logic to produce a 12-bit output. Most multistage ADCs are actually pipelined ADC. Pipelined ADCs have the same architecture as a multistage ADC, but each flash converter contains a T/H at the input. This allows each stage to convert the residual error while the previous stage has moved on to the next sample. This way the whole converter can operate at the speed of the slowest stage, as opposed to the multistage that operates at a speed equal to the sum of all the stages.
Integrating Integrating ADCs are the opposite of the flash converter. They are designed to return very high-resolution reading. As a trade-off, they operate at slower speeds. It is a very simple design; the integrating ADCs consist of an integrating amplifier, a comparator, a digital counter, and an extremely stable capacitor. The most common integrating ADC is the dual-slope. In this architecture, the capacitor is initially discharged to have no potential across it. At a set time, the input is applied across the capacitor and it begins to charge for a set period of time T1. Because of the properties of a capacitor, the rate of charge is proportional to the input voltage. After T1, the capacitor is switched to a negative reference voltage and begins to discharge at a rate proportional to the reference. The digital counter simply measures how much time it took for the capacitor to completely discharge T2. Since T1 and the rate at which the capacitor discharges are both known values, the voltage of the input can be obtained by a simple ratio. It is important to note that the convert is not actually measuring the input voltage itself. Instead, the ADC obtains the voltage by measuring time and using digital logic to calculate the input voltage. This method has the advantage of rejecting noise, such as periodic noise, to which other ADCs are susceptible. In addition, most integrating ADCs operate on a multiple of an AC line period (1/60 or 1/50 s) so that stray electromagnetic fields caused by power systems are cancelled.
Sigma-Delta The sigma-delta (SD) ADC is one of the most popular types of ADC due to its fit on the speed vs. resolution curve. SD ADCs can provide 16–24 bits of resolution at sample rates of up to hundreds of thousands of samples per second. This speed and resolution makes them ideal for certain applications such as vibration and audio analysis; however, the process of integration causes the SD ADC to have poor DC accuracy. Figure 46.4 shows the design of an SD ADC. The heart of an SD ADC is actually a 1-bit ADC that samples at incredibly high rates. Typically, these 1-bit ADCs sample at 64 or 128 times the eventual sample rate, which is a process known as oversampling. In addition to the high-speed ADC, an SD architecture consists of an analog low-pass filter and a DAC all together in a feedback loop. The result forces otherwise unavoidable quantization noise into higher frequency bands. This resulting spectrum of the noise is part of a process called noise shaping. The output of this feedback loop, which is ©2002 CRC Press LLC
FIGURE 46.4 SD ADC—A sigma-delta converter uses a 1-bit comparator to determine the signal value. SD converters have great linearity by design, because the 1-bit ADC is perfectly linear, theoretically, since it can assume only one of two values.
actually just a stream of 1-bit conversions, is then fed to a digital filter. The digital filter then increases the resolution, reduces the data rate, and applies a low-pass digital filter to the data coming out of the feedback loop. After this process, the SD ADC has an output with high resolution and signals only in the frequency band of interest, eliminating most of the inherent electronic noise.
Digital-to-Analog Converters The opposite of an ADC, which takes an analog value and produces a digital value, would be a device that takes digital values and creates analog values. A digital-to-analog converter (DAC) is a device that, given a digital representation of a signal, can create an analog signal at a specific voltage level. Although much of the theory behind ADCs discussed previously applies to DACs, a unique set of terms and phenomena do exist.
Updating Updating can be thought of as the DAC equivalent to sampling. If a DAC is to generate a sine wave from a group of digital values, we need some way to specify how this waveform is to be generated. Simply put, the update rate is how many points per second that a DAC can output an analog value, generally given in samples per second, kilosamples per second, or million samples per second.
46.4 DAC Specifications Range The range of a DAC is identical to the definition of the range of an ADC. This refers to the voltage range of values that the DAC can output.
Resolution The resolution of a DAC is specified identical to the ADC; however, the perspective is reversed. In an ADC, resolution defines how many digital bits would represent an analog value, thus giving us a level of granularity we could acquire. With a DAC, the resolution indicates how many digital bits need to be supplied to the DAC to operate and what granularity of signal we can produce.
Monotonicity One of the most useful specifications of a DAC is the monotonicity. If a DAC is monotonic, this implies that as the digital value increases, the analog output value will also increase or at least stay the same. Conversely, a device is said to be nonmonotonic if one or more values of the analog output may actually be less than the values corresponding to codes having smaller weight. Many applications are sensitive to fine changes in output value; therefore, any DAC used needs to be monotonic on all bits. ©2002 CRC Press LLC
Settling Time and Slew Rate Settling time and slew rate together determine how rapidly a DAC can change the analog value it is outputting. Settling time refers to the amount of time it takes the output of the DAC to reach a specified accuracy level. Most DACs specify settling time as a full-scale change in voltage, from the smallest output value to the largest. Slew rate, specified in volt per second, is the maximum rate of change of the output of the DAC. Therefore, a DAC with a fast slew rate and a small settling time can generate high-frequency signals because an accurate voltage level can be obtained in a very small amount of time.
Offset Error and Gain Error Offset error refers to the transfer characteristic of the DAC not outputting an analog value of 0 when the digital value of 0 is applied. The range from zero to full would be offset from the specified value because the offset would carry throughout the transfer function. The offset error can be thought of as a translation in the transfer line either up or down from the ideal. Gain error indicates a linear deviation from the ideal transfer line of a DAC. This can be caused by a variety of factors, which results in a change of slope from the ideal.
Architecture of DACs Unlike ADCs, DACs do not implement a wide range of approaches to convert a digital input code to an analog value. Instead, almost all DACs use some combination of a switch network, resistive network, and summing amplifier. This is not to say that all DACs have the same design, but they are all based on the principle of switching.
Switching Network The switching network of a DAC can be thought of as the heart of the conversion. Since digital bits are either on or off, these bits can be used to control single poll switches. These switches are then used to direct some form of analog circuitry to develop an analog value. For example, a 3-bit DAC would comprise three switches, one for each bit of input data. Depending on the code given, these switches would close in such a way to develop an analog value from a reference source that is equal to the digital representation, see Fig. 46.5. Depending on the design of the analog circuitry in the DAC, the switches may be connecting current or voltage references to a resistive network.
FIGURE 46.5 DAC architecture—Most digital-to-analog converters (DACs) follow a standard architecture of a switch network, a resistive network, and an amplifier.
©2002 CRC Press LLC
Resistive Networks Resistive networks in a DAC provide the varying levels of analog output voltage, which will form the output of the DAC. Although many different resistive schemes are used in DAC design, the basic principle is common in all of them. The one shown in Fig. 46.5 uses a dual resistor quad approach. In the figure, bits 0–3 and 4–7 are separated by a single resistor. These two independent groups are each a resistor quad with resistor values of 1R-2R-4R-8R where R is equal to 10 kWs. If any of the switches is in the 1 position, a current will develop across the resistor proportional to the resistors’ value. Therefore, if bit 0 is on a current proportional to 1/1R is generated, whereas if switch 2 is on a current proportional to 1/4R would be generated. The resistor between the two quads has the effect of a 16:1 current attenuator, so that even though bit 4 would generate a current proportional to 1/1R, once it gets to the amplifier it would appear to have a current proportional to 1/16R. In this case, bit 0 would be the most significant bit (MSB), and bit 7 would be the least significant bit (LSB).
Summing Amplifier The operational amplifier (op-amp) used in the DAC circuit of Fig 46.5 is acting as a summing amplifier. As the different bits generate a particular current, the op-amp is designed to collect the total current and would generate an output voltage. This output voltage of the op-amp is now an analog representation of the digital code which was fed to the DAC.
©2002 CRC Press LLC
47 Signal Conditioning 47.1
Amplitude Scaling • Impedance Transformation • Linear Filtering
Stephen A. Dyer Kansas State University
Linear Operations
47.2
Nonlinear Operations
Kelvin’s first rule of instrumentation states, in essence, that the measuring instrument must not alter the event being measured. For the present purposes, we can consider the instrument to consist of an input transducer followed by a signal-conditioning section, which in turn drives the data-processing and display section (the remainder of the instrument). We are using the term instrument in the broad sense, with the understanding that it may actually be a measurement subsystem within virtually any type of system. Certain requirements are imposed upon the transducer if it is to reproduce an event faithfully: It must exhibit amplitude linearity, phase linearity, and adequate frequency response. But it is the task of the signal conditioner to accept the output signal from the transducer and from it produce a signal in the form appropriate for introduction to the remainder of the instrument. Analog signal conditioning can involve strictly linear operations, strictly nonlinear operations, or some combination of the two. In addition, the signal conditioner may be called upon to provide auxiliary services, such as introducing electrical isolation, providing a reference of some sort for the transducer, or producing an excitation signal for the transducer. Important examples of linear operations include amplitude scaling, impedance transformation, linear filtering, and modulation. A few examples of nonlinear operations include obtaining the root-mean-square (rms) value, square root, absolute value, or logarithm of the input signal. There is a wide variety of building blocks available in either modular or integrated-circuit (IC) form for accomplishing analog signal conditioning. Such building blocks include operational amplifiers, instrumentation amplifiers, isolation amplifiers, and a plethora of nonlinear processing circuits such as comparators, analog multiplier/dividers, log/antilog amplifiers, rms-to-DC converters, and trigonometric function generators. Also available are complete signal-conditioning subsystems consisting of various plug-in input and output modules that can be interconnected via universal backplanes that can be either chassis- or rack-mounted.
47.1 Linear Operations Three categories of linear operations important to signal conditioning are amplitude scaling, impedance transformation, and linear filtering.
Amplitude Scaling The amplitude of the signal output from a transducer must typically be scaled—either amplified or attenuated—before the signal can be processed.
©2002 CRC Press LLC
Amplification Amplification is generally accomplished by an operational amplifier, an instrumentation amplifier, or an isolation amplifier. Operational Amplifiers A conventional operational amplifier (op amp) has a differential input and a single-ended output. An ideal op amp, used often as a first approximation to model a real op amp, has infinite gain, infinite bandwidth, infinite differential input impedance, infinite slew rate, and infinite common-mode rejection ratio (CMRR). It also has zero output impedance, zero noise, zero bias currents, and zero input offset voltage. Real op amps, of course, fall short of the ideal in all regards. Important parameters to consider when selecting an op amp include: 1. DC voltage gain K0. 2. Small-signal gain-bandwidth product (GBWP) fT , which for most op amps is fT K0 f1, where f1 is the lower break frequency in the op amp’s transfer function. The GBWP characterizes the closedloop, high-frequency response of an op-amp circuit. 3. Slew rate, which governs the large-signal behavior of an op amp. Slew rates range from less than 1 V/µs to several thousand volts per microsecond. Other parameters, such as input and output impedances, DC offset voltage, DC bias current, drift voltages and currents, noise characteristics, and so forth, must be considered when selecting an op amp for a particular application. There are several categories of operational amplifiers. In addition to “garden-variety” op amps there are many op amps whose characteristics are optimized for one or more classes of use. Some categories of op amps include: 1. Low-noise op amps, which are useful in the portions of signal conditioners required to amplify very-low-level signals. 2. Chopper-stabilized op amps, which are useful in applications requiring extreme DC stability. 3. Fast op amps, which are useful when large slew rates and large GBWPs are required. 4. Power op amps, which are useful when currents of greater than a few mA must be provided to the op amp’s load. 13 5. Electrometer op amps, which are used when very high (>10 Ω ) input resistances and very low (