Simulation of Dynamic System
Simulation of Dynamic System
Simulation of Dynamic System
EDITION
Simulation of
Dynamic Systems
with MATLAB and Simulink
Harold Klee
Randal Allen
CRC Press
Taylor
& Francis
Boca Raton
CRC Press is an
Taylor
&
imprint
Francis Croup,
Group
London
New York
of the
an
informa business
Contents
Foreword
X1U
Preface
xv
Authors
X1X
Chapter
Mathematical
1.1
1.1.1
1.2
Modeling
Introduction
Importance
Derivation of
of Models
1
4
Mathematical Model
Exercises
1.3
Difference
1.3.1
10
Equations
Recursive Solutions
11
Exercises
1.4
12
Systems
Inherently Discrete-Time Systems
13
17
Exercises
1.5
Case
20
21
Exercises
Chapter
Continuous-Time Systems
28
31
2.1
Introduction
31
2.2
First-Order
31
2.2.1
Systems
Step Response
of First-Order
Systems
32
Exercises
2.3
36
Second-Order
2.3.1
Systems
38
Equations
to a Second-Order
Model
43
Exercises
2.4
46
Simulation
47
2.4.1
53
Diagrams
Systems of Equations
Exercises
2.5
55
Higher-Order Systems
56
Exercises
2.6
58
State Variables
2.6.1
2.6.2
59
Single
64
65
Exercises
2.7
to
65
Nonlinear
Systems
68
2.7.1
Friction
70
2.7.2
72
2.7.3
Backlash
73
2.7.4
2.7.5
Hysteresis
Quantization
77
2.7.6
73
Cycles
78
vi
Contents
Exercises
2.8
Chapter
Case
82
Control
System
85
Exercises
89
91
3.1
Introduction
3.2
Discrete-Time
91
System Approximation
of
Continuous-Time Integrator
Exercises
3.3
Euler
94
Integration
3.3.1
96
B ackward
99
Exercises
101
3.4
102
Trapezoidal Integration
Exercises
3.5
106
Numerical
Systems
107
3.5.1
Discrete-Time
3.5.2
Nonlinear First-Order
3.5.3
Discrete-Time State
114
118
Exercises
119
3.6
122
122
125
Exercises
3.7
Case
135
Study:
3.7.1
3.7.2
107
111
Equations
Discrete-Time State System Matrices
3.5.4
Chapter
92
Vertical Ascent of
Diver
138
144
3.7.1.1
144
3.7.1.2
Analytical Solution
145
Decompression Stops
145
Exercises
147
Linear
151
Systems Analysis
4.1
Introduction
4.2
Laplace
Transform
4.2.1
Properties
4.2.2
Inverse
4.2.3
Laplace
4.2.4
Partial Fraction
151
151
of the
Laplace Transform
153
Laplace Transform
Transform of the
159
160
System Response
Expansion
161
Exercises
4.3
167
Transfer Function
168
4.3.1
Impulse Function
4.3.2
Relationship
168
Impulse
Function
4.3.3
4.3.4
4.3.5
4.3.6
Exercises
169
Impulse Response
Relationship between Impulse Response and
Systems with Multiple Inputs and Outputs
Transformation from State Variable Model
Function
171
Transfer Function... 175
178
to Transfer
184
187
Contents
4.4
Stability
4.4.1
Characteristic
4.4.2
Feedback Control
189
Systems
190
Polynomial
System
194
Exercises
198
4.5
200
210
Exercises
4.6
213
215
z-Transform
4.6.1
Discrete-Time
4.6.2
Inverse z-Transform
225
4.6.3
Partial Fraction
226
Impulse
221
Function
Expansion
Exercises
4.7
233
234
4.7.2
236
Continuous-Time
Transfer Functions
Approximating
System
Simulation Diagrams and State Variables
Solution of Linear Discrete-Time State Equations
Weighting Sequence (Impulse Response Function)
4.7.3
4.7.4
4.7.5
244
248
253
Exercises
4.8
257
of LTI Discrete-Time
Stability
4.8.1
Complex
Poles of
259
Systems
263
H(z)
Exercises
269
4.9
272
Sampling
4.9.4
Digital Filters
272
Function
Theorem
4.10
284
289
Control
System
4.10.1
293
4.10.2
State-Space Models
293
4.10.3
State-Space/Transfer
4.10.4
System Interconnections
System Response
4.10.5
Toolbox
292
Function Conversion
295
298
299
4.10.6
Continuous-/Discrete-Time System
4.10.7
Frequency Response
303
4.10.8
Root Locus
305
Conversion
302
Exercises
309
4.11
312
4.11.2
327
Case
Exercises
4.12
Case
325
329
4.12.1
274
27 8
Exercises
Chapter
238
for
Multinotch Filters
Electrocardiograph
Waveform
330
331
Exercises
338
Simulink
341
5.1
Introduction
5.2
Building
Simulink
341
Model
341
Contents
vjjj
Simulink Library
Running a Simulink
5.2.1
5.2.2
342
345
Model
347
Exercises
5.3
Simulation of Linear
5.3.1
349
Systems
350
5.3.2
State-Space
353
Block
Exercises
362
5.4
363
Algebraic Loops
5.4.1
Eliminating Algebraic Loops
5.4.2
Algebraic Equations
364
367
369
Exercises
5.5
More
Simulink Blocks
371
5.5.1
Discontinuities
377
5.5.2
Friction
377
5.5.3
377
5.5.4
Backlash
379
5.5.5
Hysteresis
Quantization
380
5.5.6
381
382
Exercises
5.6
Subsystems
385
5.6.1
PHYSBE
386
5.6.2
Car-Following Subsystem
Subsystem Using Fen Blocks
386
5.6.3
389
Exercises
5.7
392
Discrete-Time
393
Systems
5.7.1
Simulation of
5.7.2
Discrete-Time
397
5.7.3
Centralized
398
Inherently
Integrator
Integration
an
Discrete-Time System
5.7.4
Filters
Digital
5.7.5
402
404
Exercises
5.8
408
MATLAB
and
Simulink
Interface
411
Exercises
5.9
417
Hybrid Systems:
Components
Exercises
5.10
424
Requiring
Mathematical Model
Exercises
Case
Case
Solution
428
434
Study:
Pilot
Study:
Kalman
Ejection
Exercises
5.12
420
423
5.11
394
437
441
5.12.1
Filtering
442
442
5.12.2
Steady-State
5.12.3
443
5.12.4
Simulink
444
5.12.5
Summary
Exercise
Kalman Filter
Simulations
443
455
456
Contents
Chapter
'*
457
457
457
6.2.1
Taylor
458
6.2.2
6.2.3
6.2.4
Series Method
459
461
Runge-Kutta Methods
6.2.5
High-Order
Linear Systems: Approximate
6.2.6
469
6.2.7
Higher-Order Systems
471
466
Solutions
Using
RK
Integration
Exercises
478
6.3
481
Adaptive Techniques
6.3.1
Repeated RK with Interval Halving
6.3.2
Constant Step Size <T= 1 min)
6.3.3
Adaptive Step Size (Initial T= 1 min)
6.3.4
RK-Fehlberg
481
485
485
486
Exercises
6.4
490
Methods
Multistep
6.4.1
Explicit Methods
6.4.2
Implicit Methods
492
6.4.3
498
493
495
Predictor-Corrector Methods
Exercises
6.5
Stiff
502
503
Systems
6.5.1
Stiffness
6.5.2
Stiff Second-Order
6.5.3
Property
Approximating
System Models
in First-Order
System
Systems
Stiff
System
504
506
Exercises
6.6
522
Parameter
Systems
System
6.7
534
Systems
6.7.1
with Discontinuities
Physical Properties
on
535
Acting
543
Exercises
6.8
Case
526
531
Exercises
Chapter
467
549
Study: Spread
of
an
552
Epidemic
Exercises
559
Simulation Tools
561
7.1
Introduction
7.2
Steady-State
561
Solver
562
7.2.1
Trim Function
7.2.2
Equilibrium
564
Point for
Nonautonomous
565
System
Exercises
7.3
574
Optimization
of
Simulink
Models
7.3.1
Gradient Vector
7.3.2
576
585
Functions
Requiring
587
Contents
7.3.3
Parameter Identification
590
7.3.4
591
7.3.5
Exercises..
7.4
605
Linearization
610
7.4.1
Deviation Variables
611
7.4.2
619
7.4.3
Linmod Function
623
7.4.4
for
Single System
Exercises
7.5
Simulink Library
to the
Browser
Introduction
637
7.5.2
Summary
645
645
Simulation Acceleration
645
7.6.1
Introduction
645
7.6.2
Profiler
647
7.6.3
Summary
647
648
Advanced Numerical
Integration
649
8.1
Introduction
8.2
649
Transfer
Function)
Equivalent
649
8.2.1
8.2.2
653
8.2.3
664
8.2.4
Asymptotic
669
8.2.5
Simulation of Linear
650
Formulas for
Exercises
8.3
637
7.5.1
Exercise
Chapter
627
633
Adding Blocks
Exercise
7.6
599
672
677
Stability
of Numerical
Integrators
680
8.3.1
680
8.3.2
Implicit Integrators
Runga-Kutta (RK) Integration
687
8.3.3
692
Exercises
700
8.4
702
Multirate Integration
8.4.1
Procedure for Updating Slow and Fast States:
Master/Slave
RK-4/RK-4
706
8.4.2
8.4.3
Selection of
8.4.4
Analytical
8.4.5
714
8.4.6
8.4.7
723
8.4.8
Simulation Trade-Offs
725
Step
on
Size Based on
Stability
707
Dynamic Accuracy
708
System
with Multirate Integration
Exercises
8.5
Numerical
RK-1
730
with Real-Time
8.5.2
717
728
Real-Time Simulation
8.5.1
712
Operation
(Explicit Euler)
733
734
Contents
8.5.3
RK-2
734
8.5.4
RK-2
735
(Improved Euler)
(Modified Euler)
RK-3 (Real-Time Incompatible)
RK-3 (Real-Time Compatible)
RK-4 (Real-Time Incompatible)
Multistep Integration Methods
8.5.5
8.5.6
8.5.7
8.5.8
8.5.9
Stability
8.5.10
8.5.11
Exercises
8.6
736
736
736
738
740
746
753
Additional Methods of
Approximating
Continuous-Time
System
Models
8.6.1
Sampling
754
8.6.2
First-Order Hold
8.6.3
760
8.6.4
763
and
Reconstruction
754
Signal Reconstruction
759
Signal
Prewarping
Exercises
8.7
735
Case
765
767
8.7.1
Introduction
8.7.2
8.7.3
Requirements
Noisy Model
8.7.4
Filtered Model
773
8.7.5
Summary
779
Exercise
767
and Installation
769
769
779
References
781
Index
785