Dynamic Systems. Simulation of. with MATLAB and Simulink. Harold Klee. Randal Allen SECOND EDITION. CRC Press. Taylor & Francis Group

Similar documents
Process Modelling, Identification, and Control

Process Modelling, Identification, and Control

NUMERICAL METHODS. lor CHEMICAL ENGINEERS. Using Excel', VBA, and MATLAB* VICTOR J. LAW. CRC Press. Taylor & Francis Group

Review Higher Order methods Multistep methods Summary HIGHER ORDER METHODS. P.V. Johnson. School of Mathematics. Semester

Contents. PART I METHODS AND CONCEPTS 2. Transfer Function Approach Frequency Domain Representations... 42

A THEORETICAL INTRODUCTION TO NUMERICAL ANALYSIS

NUMERICAL METHODS FOR ENGINEERING APPLICATION

Numerical Methods for Engineers

Introduction to. Process Control. Ahmet Palazoglu. Second Edition. Jose A. Romagnoli. CRC Press. Taylor & Francis Group. Taylor & Francis Group,

9.6 Predictor-Corrector Methods

NUMERICAL MATHEMATICS AND COMPUTING

Bindel, Fall 2011 Intro to Scientific Computing (CS 3220) Week 12: Monday, Apr 18. HW 7 is posted, and will be due in class on 4/25.

Numerical Methods for the Solution of Differential Equations

Numerical Methods for Engineers. and Scientists. Applications using MATLAB. An Introduction with. Vish- Subramaniam. Third Edition. Amos Gilat.

Lecture V: The game-engine loop & Time Integration

MTH 452/552 Homework 3

OPEN CHANNEL FLOW. Computer Applications. Numerical Methods and. Roland Jeppson. CRC Press UNIVERSITATSB'BUOTHEK TECHNISCHE. INFORMATlONSBiBUOTHEK

Applied Numerical Analysis

Index. Index. More information. in this web service Cambridge University Press

Engineering and. Tapio Salmi Abo Akademi Abo-Turku, Finland. Jyri-Pekka Mikkola. Umea University, Umea, Sweden. Johan Warna.

Signals and Systems Laboratory with MATLAB

Introduction. Finite and Spectral Element Methods Using MATLAB. Second Edition. C. Pozrikidis. University of Massachusetts Amherst, USA

CONTROL * ~ SYSTEMS ENGINEERING

Fourth Order RK-Method

CONTROL SYSTEMS ENGINEERING Sixth Edition International Student Version

Solving PDEs with PGI CUDA Fortran Part 4: Initial value problems for ordinary differential equations

Ordinary differential equations - Initial value problems

Applied Math for Engineers

Numerical Analysis. A Comprehensive Introduction. H. R. Schwarz University of Zürich Switzerland. with a contribution by

CHAPTER 5: Linear Multistep Methods

Math 411 Preliminaries

Module 4: Numerical Methods for ODE. Michael Bader. Winter 2007/2008

Control Systems. LMIs in. Guang-Ren Duan. Analysis, Design and Applications. Hai-Hua Yu. CRC Press. Taylor & Francis Croup

Numerical Methods for Differential Equations

Contents. 1 State-Space Linear Systems 5. 2 Linearization Causality, Time Invariance, and Linearity 31

Modeling & Simulation 2018 Lecture 12. Simulations

Astrodynamics (AERO0024)

Lecture IV: Time Discretization

Digital Control Engineering Analysis and Design

GAME PHYSICS SECOND EDITION. дяййтаййг 1 *

multistep methods Last modified: November 28, 2017 Recall that we are interested in the numerical solution of the initial value problem (IVP):

ECE257 Numerical Methods and Scientific Computing. Ordinary Differential Equations

Scientific Computing: An Introductory Survey

AND NONLINEAR SCIENCE SERIES. Partial Differential. Equations with MATLAB. Matthew P. Coleman. CRC Press J Taylor & Francis Croup

System Dynamics for Engineering Students Concepts and Applications

EEE582 Homework Problems

CS 450 Numerical Analysis. Chapter 9: Initial Value Problems for Ordinary Differential Equations

DIFFERENTIAL EQUATIONS WITH BOUNDARY VALUE PROBLEMS

Numerical Methods with MATLAB

Preface. 2 Linear Equations and Eigenvalue Problem 22

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 9

Adaptive Filtering. Squares. Alexander D. Poularikas. Fundamentals of. Least Mean. with MATLABR. University of Alabama, Huntsville, AL.

Analysis and Synthesis of Single-Input Single-Output Control Systems

Lecture 14 - Using the MATLAB Control System Toolbox and Simulink Friday, February 8, 2013

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

4.4 Computing π, ln 2 and e

Math 660 Lecture 4: FDM for evolutionary equations: ODE solvers

Numerical Methods - Initial Value Problems for ODEs

FINITE-DIMENSIONAL LINEAR ALGEBRA

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

ẋ n = f n (x 1,...,x n,u 1,...,u m ) (5) y 1 = g 1 (x 1,...,x n,u 1,...,u m ) (6) y p = g p (x 1,...,x n,u 1,...,u m ) (7)

Integration of Ordinary Differential Equations

Initial-Value Problems for ODEs. Introduction to Linear Multistep Methods

NONLINEAR AND ADAPTIVE (INTELLIGENT) SYSTEMS MODELING, DESIGN, & CONTROL A Building Block Approach

Vibration Dynamics and Control

Computational Methods

Theory and Problems of Signals and Systems

FUNDAMENTALS of SYSTEMS BIOLOGY From Synthetic Circuits to Whole-cell Models

Index. 1/f Noise Need for, 200 Simulating, 200 Using cascaded linear systems, 202

Basic. Theory. ircuit. Charles A. Desoer. Ernest S. Kuh. and. McGraw-Hill Book Company

You may not use your books, notes; calculators are highly recommended.

WILEY. Differential Equations with MATLAB (Third Edition) Brian R. Hunt Ronald L. Lipsman John E. Osborn Jonathan M. Rosenberg

CS520: numerical ODEs (Ch.2)

Numerical Mathematics

Lecture 11 FIR Filters

Review for Exam 2 Ben Wang and Mark Styczynski

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF MATHEMATICS ACADEMIC YEAR / EVEN SEMESTER QUESTION BANK

MATHEMATICAL OBJECTS in

Using MATLAB and. Abaqus. Finite Element Analysis. Introduction to. Amar Khennane. Taylor & Francis Croup. Taylor & Francis Croup,

NUMERICAL METHODS USING MATLAB

Solving Ordinary Differential equations

Chapter 5 Exercises. (a) Determine the best possible Lipschitz constant for this function over 2 u <. u (t) = log(u(t)), u(0) = 2.

Ordinary Differential Equations

Numerical Methods for Engineers and Scientists

Math 128A Spring 2003 Week 12 Solutions

Jim Lambers MAT 772 Fall Semester Lecture 21 Notes

Solving Ordinary Differential Equations

Numerical Methods. Scientists. Engineers

Fundamental Numerical Methods for Electrical Engineering

TABLE OF CONTENTS INTRODUCTION, APPROXIMATION & ERRORS 1. Chapter Introduction to numerical methods 1 Multiple-choice test 7 Problem set 9

Dr. Ian R. Manchester

Computational Techniques Prof. Dr. Niket Kaisare Department of Chemical Engineering Indian Institute of Technology, Madras

Numerical Integration of Equations of Motion

Linear Multistep Methods I: Adams and BDF Methods

Chemical Reactor flnolysis

The family of Runge Kutta methods with two intermediate evaluations is defined by

16.7 Multistep, Multivalue, and Predictor-Corrector Methods

Excel for Scientists and Engineers Numerical Method s. E. Joseph Billo

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

Review. Numerical Methods Lecture 22. Prof. Jinbo Bi CSE, UConn

Transcription:

SECOND EDITION Simulation of Dynamic Systems with MATLAB and Simulink Harold Klee Randal Allen CRC Press Taylor & Francis Group Boca Raton London New York CRC Press is an imprint of the Taylor & Francis Croup, an informa business

Contents Foreword, Preface Authors X1U xv X1X Chapter 1 Mathematical Modeling 1 1.1 Introduction 1 1.1.1 Importance of Models 1 1.2 Derivation of a Mathematical Model 4 Exercises 8 1.3 Difference Equations 10 1.3.1 Recursive Solutions 11 Exercises 12 1.4 First Look at Discrete-Time Systems 13 1.4.1 Inherently Discrete-Time Systems 17 Exercises 20 1.5 Case Study: Population Dynamics (Single Species) 21 Exercises 28 Chapter 2 Continuous-Time Systems 31 2.1 Introduction 31 2.2 First-Order Systems 31 2.2.1 Step Response of First-Order Systems 32 Exercises 36 2.3 Second-Order Systems 38 2.3.1 Conversion of Two First-Order Equations to a Second-Order Model 43 Exercises 46 2.4 Simulation Diagrams 47 2.4.1 Systems of Equations 53 Exercises 55 2.5 Higher-Order Systems 56 Exercises 58 2.6 State Variables 59 2.6.1 Conversion from Linear State Variable Form to Single Input-Single Output Form 64 2.6.2 General Solution of the State Equations 65 Exercises 65 2.7 Nonlinear Systems 68 2.7.1 Friction 70 2.7.2 Dead Zone and Saturation 72 2.7.3 Backlash 73 2.7.4 Hysteresis 73 2.7.5 Quantization 77 2.7.6 Sustained Oscillations and Limit Cycles 78 v

vi Contents Exercises 82 2.8 Case Study: Submarine Depth Control System 85 Exercises 89 Chapter 3 Elementary Numerical Integration 91 3.1 Introduction 91 3.2 Discrete-Time System Approximation of a Continuous-Time Integrator 92 Exercises 94 3.3 Euler Integration 96 3.3.1 B ackward (Implicit) Euler Integration 99 Exercises 101 3.4 Trapezoidal Integration 102 Exercises 106 3.5 Numerical Integration of First-Order and Higher Continuous-Time Systems 107 3.5.1 Discrete-Time System Models from Simulation Diagrams 107 3.5.2 Nonlinear First-Order Systems 111 3.5.3 Discrete-Time State Equations 114 3.5.4 Discrete-Time State System Matrices 118 Exercises 119 3.6 Improvements to Euler Integration 122 3.6.1 Improved Euler Method 122 3.6.2 Modified Euler Integration 125 Exercises 135 3.7 Case Study: Vertical Ascent of a Diver 138 3.7.1 Maximum Cable Force for Safe Ascent 144 3.7.1.1 Trial and Error 144 3.7.1.2 Analytical Solution 145 3.7.2 Diver Ascent with Decompression Stops 145 Exercises 147 Chapter 4 Linear Systems Analysis 151 4.1 Introduction 151 4.2 Laplace Transform 151 4.2.1 Properties of the Laplace Transform 153 4.2.2 Inverse Laplace Transform 159 4.2.3 Laplace Transform of the System Response 160 4.2.4 Partial Fraction Expansion 161 Exercises 167 4.3 Transfer Function 168 4.3.1 Impulse Function 168 4.3.2 Relationship between Unit Step Function and Unit Impulse Function 169 4.3.3 Impulse Response 171 4.3.4 Relationship between Impulse Response and Transfer Function... 175 4.3.5 Systems with Multiple Inputs and Outputs 178 4.3.6 Transformation from State Variable Model to Transfer Function 184 Exercises 187

Contents 4.4 Stability of Linear Time Invariant Continuous-Time Systems 189 4.4.1 Characteristic Polynomial 190 4.4.2 Feedback Control System 194 Exercises 198 4.5 Frequency Response of LTI Continuous-Time Systems 200 4.5.1 Stability of Linear Feedback Control Systems Based on Frequency Response 210 Exercises 213 4.6 z-transform 215 4.6.1 Discrete-Time Impulse Function 221 4.6.2 Inverse z-transform 225 4.6.3 Partial Fraction Expansion 226 Exercises 233 4.7 z-domain Transfer Function 234 4.7.1 Nonzero Initial Conditions 236 4.7.2 Approximating Continuous-Time System Transfer Functions 238 4.7.3 Simulation Diagrams and State Variables 244 4.7.4 Solution of Linear Discrete-Time State Equations 248 4.7.5 Weighting Sequence (Impulse Response Function) 253 Exercises 257 4.8 Stability of LTI Discrete-Time Systems 259 4.8.1 Complex Poles of H(z) 263 Exercises 269 4.9 Frequency Response of Discrete-Time Systems 272 4.9.1 Steady-State Sinusoidal Response 272 4.9.2 Properties of the Discrete-Time Frequency Response Function 274 4.9.3 Sampling Theorem 27 8 4.9.4 Digital Filters 284 Exercises 289 4.10 Control System Toolbox 292 4.10.1 Transfer Function Models 293 4.10.2 State-Space Models 293 4.10.3 State-Space/Transfer Function Conversion 295 4.10.4 System Interconnections 298 4.10.5 System Response 299 4.10.6 Continuous-/Discrete-Time System Conversion 302 4.10.7 Frequency Response 303 4.10.8 Root Locus 305 Exercises 309 4.11 Case Study: Longitudinal Control of an Aircraft 312 4.11.1 Digital Simulation of Aircraft Longitudinal Dynamics 325 4.11.2 Simulation of State Variable Model 327 Exercises 329 4.12 Case Study: Notch Filter for Electrocardiograph Waveform 330 4.12.1 Multinotch Filters 331 Exercises 338 Chapter 5 Simulink 341 5.1 Introduction 341 5.2 Building a Simulink Model 341

vjjj Contents 5.2.1 Simulink Library 342 5.2.2 Running a Simulink Model 345 Exercises 347 5.3 Simulation of Linear Systems 349 5.3.1 Transfer Fen Block 350 5.3.2 State-Space Block 353 Exercises 362 5.4 Algebraic Loops 363 5.4.1 Eliminating Algebraic Loops 364 5.4.2 Algebraic Equations 367 Exercises 369 5.5 More Simulink Blocks 371 5.5.1 Discontinuities 377 5.5.2 Friction 377 5.5.3 Dead Zone and Saturation 377 5.5.4 Backlash 379 5.5.5 Hysteresis 380 5.5.6 Quantization 381 Exercises 382 5.6 Subsystems 385 5.6.1 PHYSBE 386 5.6.2 Car-Following Subsystem 386 5.6.3 Subsystem Using Fen Blocks 389 Exercises 392 5.7 Discrete-Time Systems 393 5.7.1 Simulation of an Inherently Discrete-Time System 394 5.7.2 Discrete-Time Integrator 397 5.7.3 Centralized Integration 398 5.7.4 Digital Filters 402 5.7.5 Discrete-Time Transfer Function 404 Exercises 408 5.8 MATLAB and Simulink Interface 411 Exercises 417 5.9 Hybrid Systems: Continuous- and Discrete-Time Components 420 Exercises 423 5.10 Monte Carlo Simulation 424 5.10.1 Monte Carlo Simulation Requiring Solution of a Mathematical Model 428 Exercises 434 5.11 Case Study: Pilot Ejection 437 Exercises 441 5.12 Case Study: Kalman Filtering 442 5.12.1 Continuous-Time Kalman Filter 442 5.12.2 Steady-State Kalman Filter 443 5.12.3 Discrete-Time Kalman Filter 443 5.12.4 Simulink Simulations 444 5.12.5 Summary 455 Exercise 456

Contents '* Chapter 6 Intermediate Numerical Integration 457 6.1 Introduction 457 6.2 Runge-Kutta (RK) (One-Step Methods) 457 6.2.1 Taylor Series Method 458 6.2.2 Second-Order Runge-Kutta Method 459 6.2.3 Truncation Errors 461 6.2.4 High-Order Runge-Kutta Methods 466 6.2.5 Linear Systems: Approximate Solutions Using RK Integration 467 6.2.6 Continuous-Time Models with Polynomial Solutions 469 6.2.7 Higher-Order Systems 471 Exercises 478 6.3 Adaptive Techniques 481 6.3.1 Repeated RK with Interval Halving 481 6.3.2 Constant Step Size <T= 1 min) 485 6.3.3 Adaptive Step Size (Initial T= 1 min) 485 6.3.4 RK-Fehlberg 486 Exercises 490 6.4 Multistep Methods 492 6.4.1 Explicit Methods 493 6.4.2 Implicit Methods 495 6.4.3 Predictor-Corrector Methods 498 Exercises 502 6.5 Stiff Systems 503 6.5.1 Stiffness Property in First-Order System 504 6.5.2 Stiff Second-Order System 506 6.5.3 Approximating Stiff Systems with Lower-Order Nonstiff System Models 509 Exercises 522 6.6 Lumped Parameter Approximation of Distributed Parameter Systems 526 6.6.1 Nonlinear Distributed Parameter System 531 Exercises 534 6.7 Systems with Discontinuities 535 6.7.1 Physical Properties and Constant Forces Acting on the Pendulum BOB 543 Exercises 549 6.8 Case Study: Spread of an Epidemic 552 Exercises 559 Chapter 7 Simulation Tools 561 7.1 Introduction 561 7.2 Steady-State Solver 562 7.2.1 Trim Function 564 7.2.2 Equilibrium Point for a Nonautonomous System 565 Exercises 574 7.3 Optimization of Simulink Models 576 7.3.1 Gradient Vector 585 7.3.2 Optimizing Multiparameter Objective Functions Requiring Simulink Models 587

x Contents 7.3.3 Parameter Identification 590 7.3.4 Example of a Simple Gradient Search 591 7.3.5 Optimization of Simulink Discrete-Time System Models 599 Exercises.. 605 7.4 Linearization 610 7.4.1 Deviation Variables 611 7.4.2 Linearization of Nonlinear Systems in State Variable Form 619 7.4.3 Linmod Function 623 7.4.4 Multiple Linearized Models for a Single System 627 Exercises 633 7.5 Adding Blocks to the Simulink Library Browser 637 7.5.1 Introduction 637 7.5.2 Summary 645 Exercise 645 7.6 Simulation Acceleration 645 7.6.1 Introduction 645 7.6.2 Profiler 647 7.6.3 Summary 647 Exercise 648 Chapter 8 Advanced Numerical Integration 649 8.1 Introduction 649 8.2 Dynamic Errors (Characteristic Roots, Transfer Function) 649 8.2.1 Discrete-Time Systems and the Equivalent Continuous-Time Systems 650 8.2.2 Characteristic Root Errors 653 8.2.3 Transfer Function Errors 664 8.2.4 Asymptotic Formulas for Multistep Integration Methods 669 8.2.5 Simulation of Linear System with Transfer Function H(s) 672 Exercises 677 8.3 Stability of Numerical Integrators 680 8.3.1 Adams-Bashforth Numerical Integrators 680 8.3.2 Implicit Integrators 687 8.3.3 Runga-Kutta (RK) Integration 692 Exercises 700 8.4 Multirate Integration 702 8.4.1 Procedure for Updating Slow and Fast States: Master/Slave RK-4/RK-4 = 706 8.4.2 Selection of Step Size Based on Stability 707 8.4.3 Selection of Step Size Based on Dynamic Accuracy 708 8.4.4 Analytical Solution for State Variables 712 8.4.5 Multirate Integration of Aircraft Pitch Control System 714 8.4.6 Nonlinear Dual Speed Second-Order System 717 8.4.7 Multirate Simulation of Two-Tank System 723 8.4.8 Simulation Trade-Offs with Multirate Integration 725 Exercises 728 8.5 Real-Time Simulation 730 8.5.1 Numerical Integration Methods Compatible with Real-Time Operation 733 8.5.2 RK-1 (Explicit Euler) 734

Contents 8.5.3 RK-2 (Improved Euler) 734 8.5.4 RK-2 (Modified Euler) 735 8.5.5 RK-3 (Real-Time Incompatible) 735 8.5.6 RK-3 (Real-Time Compatible) 736 8.5.7 RK-4 (Real-Time Incompatible) 736 8.5.8 Multistep Integration Methods 736 8.5.9 Stability of Real-Time Predictor-Corrector Method 738 8.5.10 Extrapolation of Real-Time Inputs 740 8.5.11 Alternate Approach to Real-Time Compatibility: Input Delay 746 Exercises 753 8.6 Additional Methods of Approximating Continuous-Time System Models 754 8.6.1 Sampling and Signal Reconstruction 754 8.6.2 First-Order Hold Signal Reconstruction 759 8.6.3 Matched Pole-Zero Method 760 8.6.4 Bilinear Transform with Prewarping 763 Exercises 765 8.7 Case Study: Lego Mindstorms NXT 767 8.7.1 Introduction 767 8.7.2 Requirements and Installation 769 8.7.3 Noisy Model 769 8.7.4 Filtered Model 773 8.7.5 Summary 779 Exercise 779 References 781 Index 785