Real-Time Simulation Technologies: Principles, Methodologies, and Applications

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Real-Time Simulation Technologies: Principles, Methodologies, and Applications is an edited compilation of work that explores fundamental concepts and basic techniques of real-time simulation for complex and diverse systems across a broad spectrum. Useful for both new entrants and experienced experts in the field, this book integrates coverage of detailed theory, acclaimed methodological approaches, entrenched technologies, and high-value applications of real-time simulation—all from the unique perspectives of renowned international contributors. Because it offers an accurate and otherwise unattainable assessment of how a system will behave over a particular time frame, real-time simulation is increasingly critical to the optimization of dynamic processes and adaptive systems in a variety of enterprises. These range in scope from the maintenance of the national power grid, to space exploration, to the development of virtual reality programs and cyber-physical systems. This book outlines how, for these and other undertakings, engineers must assimilate real-time data with computational tools for rapid decision making under uncertainty. Clarifying the central concepts behind real-time simulation tools and techniques, this one-of-a-kind resource: Discusses the state of the art, important challenges, and high-impact developments in simulation technologies Provides a basis for the study of real-time simulation as a fundamental and foundational technology Helps readers develop and refine principles that are applicable across a wide variety of application domains As science moves toward more advanced technologies, unconventional design approaches, and unproven regions of the design space, simulation tools are increasingly critical to successful design and operation of technical systems in a growing number of application domains. This must-have resource presents detailed coverage of real-time simulation for system design, parallel and distributed simulations, industry tools, and a large set of applications.

Author(s): Katalin Popovici, Pieter J. Mosterman
Series: Computational Analysis, Synthesis, and Design of Dynamic Systems
Publisher: CRC Press
Year: 2012

Language: English
Pages: xxii+622
City: Boca Raton

Real-Time Simulation Technologies: Principles, Methodologies, and Applications......Page 4
Contents......Page 6
Preface......Page 10
Editors......Page 12
Contributors......Page 14
Content......Page 18
Section I: Basic Simulation Technologies and Fundamentals......Page 19
Section II: Real-Time Simulation for System Design......Page 20
Section III: Parallel and Distributed Real-Time Simulation......Page 21
Section IV: Tools and Applications......Page 22
Section I: Basic Simulation Technologies and Fundamentals......Page 24
1 Real-Time Simulation
Using Hybrid Models......Page 26
1.1.1 Discrete Models......Page 27
1.2.1 Queuing Models......Page 28
1.2.3 DEVS Formalism......Page 29
1.2.4 Time Management for Discrete Simulation......Page 30
1.3.1 Nature of Continuous Models......Page 31
1.3.2.1 Types of Numerical Integration Algorithm......Page 32
1.3.2.2 Fixed versus Variable Step......Page 34
1.3.2.4 Single-Step versus Multistep......Page 35
1.3.3 Software for Continuous Simulation......Page 36
1.4 Hybrid Models......Page 38
1.4.2 Software for Hybrid Simulations......Page 39
1.4.3.1 Continuous Model with a Discrete Element......Page 42
1.4.3.2 Example of a Discrete-Based Hybrid Simulation......Page 44
1.4.3.3 Balanced Hybrid Simulation......Page 45
1.5.1 Timing Issues in Real-Time Hybrid Simulation......Page 47
1.5.2 High-Speed Real-Time Hybrid Simulation......Page 48
1.5.3 Numerical Integration for High-Speed Real-Time Simulation......Page 49
1.5.4 HSRT Multirate Simulation......Page 51
1.6 Concluding Remarks......Page 53
References......Page 54
2.1 Introduction......Page 58
2.2 Formal Approaches To The Design Of Real-Time Distributed Computer Systems......Page 60
2.3.2 DEVS and RT-DEVS......Page 63
2.3.3 DEVS as a Formalized Aid to System Design......Page 67
2.4.1 Design Aid for Real-Time Distributed VE......Page 68
2.4.2 Design Aid and Verification for Real-Time Distributed Systems......Page 72
2.4.3 DEVS Approach to the Design of Distributed
Real-Time Cooperative Robotic Systems......Page 79
References......Page 82
3.1 Introduction......Page 86
3.2 Background......Page 88
3.2.1 Difficulties of DEVS Formal Verification......Page 91
3.2.2 Rational Time-Advance DEVS......Page 92
3.3 DEVS Verification Methodology......Page 94
3.4 Case Study: Controller For An e-Puck Robotic Application......Page 103
3.4.1 DEVS Model Specification......Page 104
3.4.2 Implementation on the ECD++ Toolkit......Page 107
3.4.3 Executing the Models......Page 111
3.4.4 Verifying the Model......Page 112
References......Page 116
4.1 Introduction......Page 120
4.2 Code Generation And Metaprogramming For Optimizing Real-Time Simulation......Page 121
4.2.1 Concepts and Definitions......Page 122
4.2.2.1 Data Generation......Page 123
4.2.3 Domain-Specific Languages......Page 124
4.2.3.1 Embedded DSLs......Page 126
4.2.4 Multistage Programming Languages......Page 128
4.2.4.1 C++ Template Metaprogramming......Page 129
4.2.5 Partial Evaluation......Page 131
4.2.6 Comparison of the Different Approaches......Page 134
4.3.1 DEVS /RT-DEVS......Page 135
4.3.2 Application of Metaprogramming to DEVS Simulation......Page 138
References......Page 141
5.1 Introduction......Page 146
5.1.1 Challenges for MBE in Embedded Systems......Page 147
5.1.2 MBE Process......Page 148
5.2 Requirements for Modeling Languages......Page 150
5.3.1 Metamodeling Architecture......Page 152
5.3.2.1 Requirements Modeling with UML......Page 154
5.3.2.2 Modeling Logical and Technical Architectures with UML......Page 156
5.3.2.3 UML Basics by Example......Page 157
5.3.3 UML Extension Mechanism......Page 162
5.3.4 UML Behavioral Semantics......Page 163
5.4 UML Extensions for Real Time......Page 165
5.4.1 Overview of UML Profiles......Page 166
5.4.2.1 MARTE Basics......Page 168
5.4.2.2 MARTE Semantics......Page 172
5.4.2.3 MARTE Example......Page 173
5.5 Discussion and Open Issues......Page 175
5.6 Summary and Outlook......Page 178
References......Page 179
6 Modeling and Simulation
of Timing Behavior
with the Timing
Definition Language......Page 182
6.1 Introduction......Page 183
6.2.1 TDL Properties......Page 184
6.2.2 TDL Language Constructs......Page 185
6.2.3 Example TDL Modules......Page 187
6.2.4 TDL Toolchain......Page 189
6.2.4.1 E-code......Page 190
6.3.1.1 Extension of the TDL Toolchain for MATLAB® and Simulink®......Page 191
6.3.1.2 Modeling......Page 192
6.3.1.4 Platform Mapping and Code Generation......Page 193
6.3.2 Implementation Perspective......Page 194
6.4 TDL Integration With Ptolemy II......Page 195
6.4.1 TDL Domain......Page 196
6.5 Comparison between the Simulink® and the Ptolemy II Integration......Page 197
6.6 Related Work......Page 198
6.7 Conclusion......Page 199
References......Page 200
Section II: Real-Time Simulation for System Design......Page 202
7.1 Introduction......Page 204
7.2.1 PSBD Overview......Page 206
7.2.2 Bifurcated Design Process for Networked Real-Time Embedded Systems......Page 208
7.3 Background on CR Design......Page 210
7.4.1 Design Procedure and Implementation Environment......Page 211
7.4.2 Design of a Single Cognitive Modem......Page 213
7.4.3 Design of a CR Network......Page 215
7.4.4 Experiment Results......Page 217
7.5 Conclusions......Page 219
References......Page 220
8 Validator Tool Suite
Filling the Gap between
Conventional Softwarein-
the-Loop and Hardwarein-
the-Loop Simulation
Environments......Page 222
8.1 Solid System Verification and Validation Needs Improved
Simulation Support......Page 223
8.1.1 Real-Time Behavior in the Validator......Page 224
8.2 Architecture of a Simulation with the Validator......Page 226
8.2.1 Basic Features of the Validator......Page 228
8.3.1 Target Platform Specification......Page 229
8.3.2 Task Source Code Annotation......Page 230
8.4.1 Simulation with the Validator as the
Basis for Advanced Debugging......Page 231
8.4.2 Simulation with the Validator to Reengineer Legacy Systems......Page 234
8.4.2.1 Sample Analysis......Page 235
8.5.2 Modeling and Simulating Legacy Code......Page 237
8.6 Conclusions......Page 238
References......Page 239
9.1 Introduction To Real-Time Simulation......Page 242
9.1.1 Timing and Constraints......Page 244
9.1.2 Analysis of Simulator Bandwidth Requirements......Page 246
9.1.3 Rapid Control Prototyping......Page 247
9.1.4 Hardware-in-the-Loop......Page 248
9.2 Real-Time Simulator Technology......Page 249
9.3.1 Model-Based Design......Page 250
9.3.2 Interaction with the Model......Page 252
9.4.1 Power Generation Applications......Page 253
9.4.2 Automotive Applications......Page 255
9.4.3 All-Electric Ships and Electric Train Networks......Page 256
9.4.5 Electric Drive and Motor Development and Testing......Page 258
9.4.7 Education: University Research and Development......Page 259
9.4.8 Emerging Applications......Page 260
References......Page 262
10.1 Introduction......Page 266
10.2 Previous Work......Page 267
10.3.1 System Call Emulation......Page 269
10.3.2 Pthreads as a Real-Time Concurrency Model......Page 271
10.3.3 Real-Time Concurrency Manager......Page 273
10.3.4 Interrupt Management......Page 274
10.4 Experimental Results......Page 275
References......Page 279
11 Service-Based
Simulation Framework
for Performance
Estimation of
Embedded Systems......Page 282
11.1.1 System-Level Performance Estimation......Page 283
11.1.2 Overview of the Framework......Page 284
11.1.3 Organization of the Chapter......Page 285
11.2 Service Models......Page 286
11.3 Service Model Interfaces......Page 287
11.4 Service Requests......Page 288
11.5 Service Model Implementations......Page 290
11.5.1 Model-of-Computation......Page 291
11.5.2 Composition......Page 293
11.6 Application Modeling......Page 294
11.7 Architecture Modeling......Page 295
11.8 System Modeling......Page 296
11.9.1 Discrete Event Simulation......Page 297
11.9.2 Representation of Time......Page 298
11.9.3 Simulation......Page 299
11.10 Producer–Consumer Example......Page 300
11.11.1 A Mobile Audio Processing Platform......Page 307
11.11.3 Simulation Speed......Page 309
References......Page 310
12.1 Introduction......Page 312
12.1.1 Multiview Models and Consistency Challenges......Page 313
12.1.2 Inconsistency Example......Page 315
12.2 State Of The Art In Consistency And Semantics......Page 318
12.2.1 UML Model Consistency Requirements......Page 319
12.2.2 Consistency Checking......Page 320
12.2.3 Semantics......Page 324
12.3 Solving UML Consistency......Page 327
12.3.1 Queries and Constraints Semantics......Page 328
12.3.1.1 Notational Preliminaries and System Formalization......Page 331
12.3.1.2 Abstract Specification Language......Page 332
12.3.1.3 Specification Language Semantics......Page 333
12.3.2 Notion of Consistency......Page 335
12.3.3 Example of Consistency Management......Page 338
12.4 Discussion......Page 346
12.5 Summary And Outlook......Page 348
References......Page 349
Section III: Parallel and Distributed Real-Time Simulation......Page 352
13.1 Flight Control System Development Process......Page 354
13.2 Validation And Verification......Page 355
13.3 Modeling And Simulation Platforms......Page 356
13.4 Interactive Flight Control System Development Test Bed......Page 357
13.5 Design Case Study......Page 361
13.6 Challenges And Lessons Learned......Page 364
13.7 Conclusions......Page 369
References......Page 370
14 Test Bed for Evaluation of Power Grid Cyber-Infrastructure......Page 372
14.1 Introduction......Page 373
14.2.1 RINSE......Page 375
14.2.2 DNP3 Overview......Page 377
14.2.2.1 Data Link Layer......Page 378
14.2.3 Attacking DNP3......Page 379
14.2.4.1 Approach......Page 380
14.3.1 Virtual Relays......Page 381
14.3.2 Virtual Data Aggregators......Page 382
14.3.3 State Server......Page 383
14.4.1 Lab Setup......Page 384
14.4.2 Interoperability......Page 386
14.5.1 Create the Basic Network......Page 387
14.5.3 Evaluate Experiment......Page 390
14.6.2 Future Work......Page 391
References......Page 392
15.1 Introduction......Page 394
15.1.1 What Is Distributed Real-Time SBT?......Page 395
15.2 Brief History of Distributed SBT......Page 396
15.3.1.1 Software Protocols......Page 398
15.3.1.2 Domain Architectures......Page 399
15.3.2 Fidelity......Page 400
15.3.2.1 Expanding Fidelity into New Domains......Page 401
15.3.3 Instructional Strategies......Page 402
15.3.4.1 Human Effort Required for Distributed AAR......Page 403
15.3.5 Lack of Effectiveness Assessment......Page 404
15.3.6 Lack of Use Outside of the Defense Sector......Page 405
15.4 Conclusion......Page 406
References......Page 407
16.1 Introduction......Page 412
16.2 Modeling and Simulating Discrete Event Systems......Page 415
16.3 Sample Path Constructability......Page 418
16.3.1 Standard Clock Approach......Page 421
16.3.2 Augmented System Analysis......Page 422
16.4 Concurrent Simulation Approach for Arbitrary Event Processes......Page 424
16.4.1 Notation and Definitions......Page 425
16.4.2 Observed and Constructed Sample Path Coupling Dynamics......Page 427
16.4.3 Speedup Factor......Page 431
16.4.4 Extensions of the TWA......Page 432
16.5 Use of TWA for Real-Time Optimization......Page 433
References......Page 438
Section IV: Tools and Applications......Page 440
17.1 Introduction......Page 442
17.2.1 Formal Composition Techniques......Page 444
17.2.2 Simulation Techniques......Page 445
17.3 Motivating Scenarios......Page 446
17.3.1 Ethernet Capture Effect......Page 447
17.3.2 Application Services......Page 448
17.4.1.1 Time Dilation Factor (TDF) and Scale Factor (SF)......Page 449
17.4.1.2 Paravirtualized vs. Fully Virtualized VMs......Page 451
17.4.1.4 Network Emulation......Page 452
17.4.2 Application to Motivating Scenarios......Page 453
17.5 Addressing Issues of Time Dilation in Physical Memory......Page 455
17.5.2.1 More Memory or More Hosts......Page 456
17.5.2.2 Memory Emulation......Page 457
17.6 Concluding Remarks......Page 458
References......Page 459
18 Simulation for
Operator Training in
Production Machinery......Page 462
18.1.2 Simulation for Operator Training......Page 463
18.1.3 Modeling......Page 464
18.1.5 Game-Based Learning, Game Programming, and Simulation......Page 466
18.2 Simulation Of Plant And Machinery......Page 467
18.2.1 Languages for Simulation......Page 468
18.3 Simulator For Rolling Mill Operator Training......Page 469
18.3.1 Requirement Analysis of the Training Simulator......Page 470
18.3.2 System Design of the Training Simulator......Page 471
18.3.3 Reduction of Complexity......Page 474
18.3.3.2 Reduction of Possible Machine States......Page 475
18.3.3.4 Depth of Simulation......Page 476
18.3.4.1 Simulation Tool......Page 478
18.3.4.2 Example Details......Page 479
18.4 Experiences With Simulation-Based Training......Page 480
References......Page 481
19 Real-Time Simulation
Platform for Controller
Design, Test, and
Redesign......Page 484
19.1 Introduction......Page 485
19.2 Structure and Functions of the CDTRP......Page 489
19.3 Taxonomy of Real-Time Simulation Modes Realized by CDTRP......Page 490
19.4 Categorization of CDTRP Modes Based on Their Suitability for
Design, Test, and Redesign Stages......Page 491
19.5 Implementation of the Plant Emulator Card with PIC Microcontroller......Page 493
19.6 Experimental Setup of the Developed CDTRP......Page 494
19.7.2 Controller Design, Test, and Redesign by the CDTRP on a Physical Plant: The DC Motor Case......Page 498
19.7.2.2 Identification of DC Motor to Obtain a Model
to Be Simulated and Emulated......Page 499
19.7.2.4 Controller Design–Test–Redesign Process......Page 501
19.7.2.5 The Simulation, Emulation, and Physical Measurement
Results Obtained along the Entire Design Process
Implemented by CDTRP......Page 502
19.7.2.7 Recreating Noise Disturbance in the S-E-R Mode......Page 503
19.7.3 Investigation of Reliable Operating Frequency of Mixed
Modes of CDTRP: Coupled Oscillators as Benchmarks......Page 505
19.7.3.2 Synchronization of (Lorenz Ttransmitter) Emulator
with a Physical Analog (Lorenz Receiver) Plant......Page 507
19.7.3.3 Synchronization of the (Lorenz Receiver) Emulator with
Physical Analog (Lorenz Transmitter) Hardware......Page 509
19.7.3.5 Effect of Feedback on Chaotic Synchronization......Page 511
19.7.3.6 Synchronization of (Linear Undamped Pendulum
Receiver) Simulator/Emulator with (Signal Generator
Transmitter) Simulator......Page 512
19.7.3.7 Synchronization of (Linear Undamped Pendulum) Receiver
Emulator with (Signal Generator) Transmitter......Page 513
19.7.3.8 Synchronization of a Physical Analog (Lorenz Receiver)
Hardware with Transmitter Emulator......Page 516
References......Page 519
20.1 Introduction......Page 524
20.2 RT Techniques for Automotive Systems......Page 526
20.3.1 Choosing the Right Type of Model......Page 529
20.3.2 Data Preparation......Page 531
20.3.3 Model Verification and Validation......Page 533
20.3.4 From the Model to a RT Executable......Page 534
20.4 RT Implementations in the Automotive Industry......Page 535
20.4.1 Diagnosing a Faulty EGR Valve......Page 536
20.4.2 In-Cylinder Pressure Feedback Control......Page 541
References......Page 542
21.1 Introduction......Page 546
21.2 Introduction to AUTOSAR......Page 549
21.2.1 VFB Level......Page 550
21.2.2 Behavioral Level......Page 551
21.2.3 RTE Level......Page 552
21.2.4 AUTOSAR Process......Page 553
21.2.5 AUTOSAR Timing Model......Page 555
21.2.6 AUTOSAR Tools and the Role of Tools......Page 559
21.3.1 Use of AUTOSAR in the Development Process......Page 560
21.3.3 Simulation at the RTE Level......Page 561
21.3.4 Simulation at the BSW Level: From ECU-Level Simulation to
Full Architecture Modeling......Page 562
21.4 Model-To-Model Integration and Translation: From Simulink® to
AUTOSAR and From AUTOSAR to Simulink®......Page 563
21.5 Simulation, Timing Analysis, and Code Generation: Consistency Issues
and Model Alignment......Page 568
References......Page 569
22.1 Introduction......Page 572
22.2.1 History......Page 574
22.2.2 Modelica Example......Page 575
22.3.1 Open Platform......Page 579
22.3.2 Acausal Modeling......Page 580
22.3.3 Symbolic Manipulation......Page 584
22.3.4 Inverse Models......Page 589
22.3.5 Model Configuration......Page 592
22.3.6 Real-Time Language Extensions and Interfaces......Page 593
22.3.7 Tool-Specific Features......Page 594
22.4 Application Examples......Page 595
References......Page 599
23.1.1 Examples of Real-Time Simulation......Page 604
23.1.2 Benefits of Real-Time Simulation......Page 606
23.1.3 Challenges of Real-Time Simulation......Page 607
23.2 Moving from Desktop to Real-Time Simulation......Page 608
23.2.1 Procedure for Tuning Solver Settings......Page 609
23.2.2 Adjusting Models to Make Them Real-Time Capable......Page 619
References......Page 620
24 Systematic Derivation of
Hybrid System Models
for Hydraulic Systems......Page 622
24.1.2 Simulating Differential Algebraic Equations......Page 623
24.2 Network Equations for Incompressible Fluid Models......Page 625
24.3.1 Reduced Order State Vector......Page 627
24.3.3 Junction Pressures and Reaction Forces......Page 628
24.4.1 Index of Differential Algebraic Equations......Page 629
24.4.2 Minimum Order Dynamic Equations......Page 630
24.4.3 Matrix Polynomial Equations for Algebraic States......Page 631
24.4.4 Solving Systems of Polynomial Equations......Page 632
24.4.5 Local Singularities in Algebraic Equations......Page 633
24.5.1 Model Definition......Page 634
24.5.2 Model Dynamics......Page 636
24.5.3 Mode Transition (Finite State Machine)......Page 637
24.5.4 DAE Equations (“Positive” Mode)......Page 638
24.5.5 Simulation Results......Page 640
Acknowledgment......Page 643
References......Page 644