Showing you how to use personal computers for modeling and simulation, Interactive Dynamic-System Simulation, Second Edition provides a practical tutorial on interactive dynamic-system modeling and simulation. It discusses how to effectively simulate dynamical systems, such as aerospace vehicles, power plants, chemical processes, control systems, and physiological systems. Written by a pioneer in simulation, the book introduces dynamic-system models and explains how software for solving differential equations works. After demonstrating real simulation programs with simple examples, the author integrates a new treatment of the difference equation programs needed to model sampled-data control systems with digital controllers. Subsequent chapters provide detailed programming know-how. These chapters cover library, table-lookup, user-definable, limiter, switching, and noise functions; an experiment-protocol scripting language; powerful vector and matrix operations; and classical simulation programs that illustrate a number of useful programming tricks. The final chapter shows how experiment-protocol scripts and compiled DYNAMIC program segments can quickly solve mathematical problems, including fast graph plotting, Fourier transforms, and complex-number plots. CD-ROM ResourceThe accompanying CD-ROM contains a complete, industrial-strength simulation program package. To install the ready-to-run simulation system, simply copy a single Windows or Linux folder from the CD. You can then run and modify every program example in the text or try your own projects. For truly interactive modeling, screen-edited programs are run-time compiled and immediately produce solution displays on a typed run command.
Author(s): Granino A. Korn
Series: Numerical Insights 7
Edition: 2
Publisher: CRC Press
Year: 2010
Language: English
Pages: 213
Contents......Page 6
Interactive Dynamic-System Simulation, Second Edition......Page 2
Numerical Insights......Page 3
Interactive Dynamic-System Simulation Second Edition......Page 4
Preface......Page 16
1.1.1 Introduction......Page 18
1.1.2 T ime Histories, State- Transition Models, and Differential Equations......Page 20
1.1.3 Differential Equation Systems with Defined Variables......Page 21
1.2.2 M ultirun Simulation Studies......Page 22
1.2.3 W hat a Simulation Run Does: Updating Variables......Page 23
1.2.4.1 Time- History Sampling......Page 24
1.2.4.2 Operations with Sampled Data......Page 25
1.2.5.2 Improved Integration Rules......Page 26
1.3.1 A Wish List for Interactive Modeling......Page 28
1.3.3 L inux versus Windows......Page 29
1.3.4.2 Enter and Run a Simulation Program......Page 30
1.3.6 A Complete Simulation Program......Page 31
1.3.7.2 Display Scaling and Stripchart- Type Displays......Page 34
1.3.7.3 Time- History Storage and Printing......Page 35
References......Page 36
2.1.2 Experiment- Protocol Programs and Commands......Page 38
2.2.1 Classical Applications and Higher-Order Differential Equations......Page 40
2.2.2.1 Van der Pol's Differential Equation......Page 41
2.2.2.2 Simulation of a Simple Pendulum......Page 43
2.2.3 A Simple Nuclear Reactor Simulation......Page 45
2.2.4 An Electric Circuit Simulation with 1401 Differential Equations......Page 46
2.3.1 Ballistic Trajectories......Page 49
2.3.2.1 Pitch- Plane Flight Equations......Page 52
2.3.2.2 Linearized Flight Equations......Page 53
2.3.3 A Simplified Autopilot......Page 54
2.3.4 Torpedo Trajectory......Page 55
2.3.5 Translunar Satellite Orbit......Page 58
2.4.1 Simulation of Epidemic Propagation......Page 60
2.4.2.2 Generalizations......Page 62
References......Page 64
3.1.2 Simulation of a Simple Servomechanism......Page 66
3.1.3.1 Test Inputs and Error Measures......Page 68
3.1.3.2 Parameter- Influence Studies......Page 69
3.1.3.3 Iterative Parameter Optimization......Page 70
3.1.4.3 Control System Transfer Functions and Frequency Response......Page 73
3.2.1 M odels Using Difference Equations......Page 74
3.2.2 Sampled- Data Operations......Page 75
3.3.1 Primitive Difference Equations......Page 76
3.3.2 G eneral Difference Equation Systems......Page 77
3.3.3.1 Difference Equation Code and Differential Equation Code......Page 78
3.4.1 Simulation of an Analog Plant with a Digital PID Controller......Page 81
References......Page 84
4.2.1 Library Functions......Page 86
4.2.2.1 Functions of One Variable......Page 87
4.2.2.2 Functions of Two Variables......Page 88
4.2.2.3 General Remarks......Page 89
4.2.3 User- Defined Functions......Page 90
4.3.1.2 Simple Limiters......Page 91
4.3.1.3 Useful Relations between Limiter Functions......Page 92
4.3.2 Switches and Comparators......Page 93
4.3.4 Noise Generators......Page 94
4.3.5 Integration through Discontinuities and the Step Operator......Page 96
4.4.1 Introduction......Page 97
4.4.2 Track/ Hold Circuits and Maximum/ Minimum Tracking......Page 98
4.4.3.2 A Comparator with Hysteresis......Page 100
4.4.4.1 Square Wave, Triangle, and Sawtooth Waveforms......Page 101
4.4.4.2 Signal Modulation......Page 104
4.4.5 Generation of Inverse Functions......Page 105
4.5.1.2 Submodel Declaration......Page 106
4.5.2 A Simple Example: Coupled Oscillators......Page 107
4.6.1 A Satellite Roll- Control Simulation......Page 109
4.6.2 Bang- Bang Control and Integration......Page 112
References......Page 114
5.2.1 L abels and Branching......Page 116
5.2.2 C onditional Branching......Page 117
5.2.4 E xperiment- Protocol Procedures......Page 118
5.3.1.1 Simple Array Declarations......Page 120
5.3.1.2 Equivalent Arrays......Page 121
5.3.2.1 Simple Assignments......Page 122
5.3.2.2 data Lists and read Assignments......Page 123
5.4.1.1 Console Output......Page 124
5.4.1.2 File and Device Output......Page 125
5.4.2.2 File or Device Input......Page 126
5.4.3 Multiple DYNAM IC Program Segments......Page 127
5.5.1 Interactive Error Correction......Page 128
5.5.3 The Notebook File......Page 129
Reference......Page 130
6.1.1 Introduction......Page 132
6.2.1 N ull Matrices and Identity Matrices......Page 133
6.2.4......Page 134
6.3.1 V ector Expressions in DYNAM IC Program Segments......Page 135
6.3.2.1 Matrix/ Vector Products......Page 136
6.3.2.2 Example: Rotation Matrices......Page 137
6.3.3 M atrix/ Vector Models of Linear Systems......Page 138
6.4.1 Index- Shifted Vectors......Page 140
6.4.3.1 Analog Systems......Page 142
6.4.3.2 Digital Filters......Page 143
6.5.1 DOT Products and Sums of DOT Products......Page 146
6.5.2 E uclidean Norms......Page 147
6.6.1 V ector Difference Equations......Page 148
6.6.2.2 Simple MATRIX Assignments......Page 149
6.6.3 Submodels with Vectors and Matrices......Page 150
6.7.1.1 Vector Assignments Replicate Models......Page 151
6.7.1.2 Parameter- Influence Studies......Page 152
6.7.1.4 Neural Network Simulation......Page 154
6.8.1.1 store and get Operations......Page 155
6.8.2 T ime Delay Simulation......Page 158
References......Page 161
7.1.2 A Benchmark Problem with Logarithmic Plotting......Page 162
7.2.1 Simulation of Hard Impact: The Bouncing Ball......Page 163
7.2.2 The EURO SIM Peg- and- Pendulum Benchmark [1]......Page 166
7.2.3 The EURO SIM Electronic- Switch Benchmark......Page 168
7.3.1 Simulation of a Glucose Tolerance Test......Page 170
7.3.2 Simulation of Human Blood Circulation......Page 171
7.4.1 Crossplotting Results from Multiple Runs: The Pilot Ejection Problem......Page 176
7.5.1 A Look at System Dynamics......Page 177
7.5.2 World Simulation......Page 181
References......Page 186
8.1.1 Overview......Page 188
8.2.2.1 A Simple Function Plot......Page 189
8.2.2.2 Array- Value Plotting......Page 190
8.2.3 F ast Array Manipulation......Page 191
8.2.4 Statistical Computations......Page 192
8.3.1 INTEGER and COMPLEX Quantities......Page 193
8.3.3 Complex Number Operations and Library Functions......Page 194
8.3.4.2 Complex Number Plots......Page 195
8.4.2 Simultaneous Transformation of Two Real Arrays......Page 197
8.4.3 Cyclical Convolutions......Page 198
Reference......Page 200
A.1.2 R oundoff Errors......Page 202
A.1.3 C hoice of Integration Rule and Integration Step Size......Page 203
A.2.1 R unge– Kutta and Euler Rules......Page 206
A.2.3 Stiff Differential Equation Systems......Page 208
A.2.4 Examples Using Gear-Type Integration......Page 209
A.2.5 Perturbation Methods Can Improve Accuracy......Page 211
References......Page 212