ECSE 4961/6961 ALSETLab Fall 2018 Cyber-Physical Systems

Transcription

ECSE 4961/6961Modeling and Simulation forCyber-Physical SystemsImagine!Source: http://dx.doi.org/10.3384/ecp1106313Fall 2018Prof. Luigi ize!

Agenda Administrative Matters Go over the Syllabus Go over the Schedule Introduction to Modeling and Simulation Introduction to CPS Introduction to Dymola

Example project proposal: 6 DOF Robot ArmMechanical Multi-bodyDynamics ModelCode Virtual Prototyping: Model, code and simulate! Build the Prototype! Deploy control code. Compare real control systemwith the design!Deploy!Simulate3

Introduction toModeling andSimulation

General Concepts aboutSystems What is a system? Space shuttle, tank, power system, etc. A system can contain sub-systems that are themselves systems.(eg. Power sys. contains generators, generators are subsystemswith different controls, protections, etc) A system is an object or collection of objects whose propertiesare of interest. We want to study selected properties of these objects. Why study a system? Understand it in order to build it: engineer’s point of view Satisfy human curiosity (understand more): researcher’s point lications5

NaturalSystem Types and PropertiesArtificial Natural and Artificial Systems: A system can occur naturally (e.g. the universe) or artificially(e.g. space shuttle) It can also be a mix of both: the solar-heated water system is artificialwhile the sun and clouds: natural Properties: Observability: being able to take measurements of the system during the process. Controllability: influence on the behavior of the system through inputs. Inputs: variables of the environment that can influence the behavior of the system. These inputs mayor not be intentionally controlled. Outputs: variables that are determined by the system and may influence the surroundingenvironment.6

Experiments (1/2) Observability is essential to study a system: We need to observe outputs Learn if its possible to excite the system bycontrolling its inputsI want one ofthese! The experimentation process consists of extractinginformation from a system by varying the inputsignals. Requirement: the system is controllable and observable We apply a set of external conditions to theaccessible inputs and observe the reaction of thesystem by measuring the outputs. Experiments at the system scale are very rare in certainkinds of systems (e.g. critical infrastructure)Chief Joseph Dynamic Breaker – “The Toaster”[BPA] “It can consume 1,440 MW - more than the output ofBonneville Dam. It's only capable of staying on for 3 seconds- beyond that, it would destroy itself.”History of the DC Pacific intertie: link7

Experiments (2/2) Difficulties: Often systems have many inputs are not accessible (e.g. inside a control system) and controllable(disturbance inputs) Many useful outputs are not accessible for measurements (internal states) Cost: it is possible damage of the system. Danger: training nuclear plant operators The system may not even exist (we are going to build it). The difficulties of experimentation lead us to the development of models! A model of a system allows investigation and may answer many questions regarding the real system ifthe model is realistic/good enough!8

Models A model of a system is anything an “experiment” can be applied to in order to answer questionsabout the system being mimicked. without doing experiments on the real system. Instead simplified experiments are performed on the model! We have then a simplified system that reflects properties of the real system. Types: Mental model: a statement “person A is reliable”(models the behavior of the person) Verbal model: expressed in words (see model above)! Physical Model:model:a physicalA objectthat mimicsof a realsystemMathematicaldescriptionofsomethe propertiessystem wheretherelationships betweenvariablesthe questionssystem areto help us ofansweraboutexpressedthe system.in mathematical form.9

Mathematical ModelsMathematical models have been developedfrom physical principles (laws of nature!),experiments and/or observations, anunderstood by humans knowledge.Model knowledge is stored in: Books (equations and text in “natural”language and human mindswhich computers cannot access or (uniquely)interpret.10

The Form of Mathematical Models– Equations Although forms of mathematics were used before 1000 BC, he first attempt on solving a form of first orderlinear equations in 1650 B.C. Equality sign was introduced by Robert Recorde in 1557 Newton still wrote text (Principia, vol. 1, 1686):“The change of motion is proportional to the motive force impressed ” CSSL (1967) introduced a special form of “equation”:variable expressionv INTEG(F)/m Programming languages usually do not allow equations! Explicit assignment statements are used. In this course we will learn the Modelica modeling language, which allows for Acasual and Object-oriented equation based modeling using a standardized computer language

Models and Simulation We represent CPSs in two different ways:- Equ o sfti- Computer programs The artifacts represented by mathematical models in a computer are called virtual prototypes Simulation: from latin “Simulare” means to pretend. A simulation is an experiment performed on a model. This definition does not require a model to be present in mathematical or computer form. We will however focus on models that can be written in computer-representable forms. Hence, we will perform numerical experiments by performing computations (by hand) orin a computer. The value of the simulation is completely dependent on how well the model represents thereal system regarding the questions to be answered.A model can NEVER be accepted as a final andtrue/definite description of an actual cyber-physicalsystem.12

Introduction to CPS

Cyber-Physical Systems (CPS)CPS are “engineered” systems integrate cyber and physical components into a “hybrid” system: Cyber components: “follow the rules of algorithms” , examples Computation (e.g. computers, IT systems), communication protocols Physical components / systems: “follow the laws of nature” , examples Thermal Domain: Heating,andComponent: a transistorSystem: a data acquisition board for a sensor.Component: gas turbine.System: power plant with a gas turbine and an electrical generatorCyber-physical multi-domain: VentilationMulti-domain Domain: building’sElectrical Domain: Component: a water heaterSystem:aAir Conditioning (HVAC) systemCyber components: digital control system, digital monitoring sensors, IT Cyber-physical System: power plant as above, but with digital monitoring and control!CyberPhysical

Why are CPS important?CPS technologies are transforming the way people interactwith engineered systems: Just as the Internet has transformed the way people interact withinformationFrom the Internet of Information to the “Internet of Things”The “CPS” view and CPS in general help drive innovation andcompetition in: aeronautics, building design, energy, electrical power grids (‘smart grid’) healthcare, manufacturing, and transportation.Advances in CPS will enable: capability, adaptability, scalability, resiliency, safety, security, and usabilityto expand the horizons of these critical systems.

A Fundamental Question:Why do we need to develop models and performsimulations for Cyber-Physical Systems? To reduce the lifetime cost of a system: In requirements: trade-off studies In test and design: fewer proto-types In training: avoid accidents In operation: anticipate problems! (1910) The prospective pilot sat in the topsection of this device and was required toline up a reference bar with the horizon. 42% of the British pilots who died in WW1were killed in training [Jones, Dr.]16

Example:Boeing’s Model-Based Systems Engineering (MBSE) approachto build a Complex Cyber-Physical ”System-of-Systems”Large Number of Vendors for the FinalSystemM&S used to testprototypes in variety ofenvironments.M&S are used to train usersin the operationalenvironment – enhancinglearning.Simulation costs 1/10 ofrunning actual scenarios.Scale of networks:cost-prohibitive ortechnically impossible forfield tests.A Flying Micro-Grid!M&S used to test andvalidate networkingprotocols in laboratory environment acting as a testbed.17

Another Example:The power of models in SIMNET Developed in 1980 to early 1990’s Distributed, interactive simulation for training combatunits 10 year development cycle, 300 million Started the huge (multi-billion dollar) industry ofnetworked simulations that are relied upon by DoD fortraining and engineering Where do you think the technology to play “Call ofDuty” comes from?Simnet screenshot From Bruce Sterling's "War is Virtual Hell," Wired 1.01 (March-Apr. 1993)18

Roles of M&S in Cyber-Physical System DevelopmentAnd the Model-V Development Approach for Model-Based Systems Engineering (MBSE)User Cases andRequirementsSystem Performance(HLA Design using UML)UserRequirements &ModelsOperationalSystemTesting Against Use CasesOverall SystemModels (incl.grid)System LevelDesign &Specifications(deployment anddemonstration)ValidationDevice ModelsVerificationIntegratedSystemsTesting with other elementsand within the environmentSubsystemsSubsystemIntegration & Tests(hardware-in-the-loopreal-time simulation)(physical modeling andoff-line simulation)Implementation &Rapid Prototyping(software-in-the-loopreal-time simulation)ComponentDesign ModelsUnit DesignModelsTestingTesting each componentin isolation andwith other elementsComponents(SW, HW, Data)Units(SW, HW, Data)Implementation &Testing(hardware-in-the-loopreal-time simulation)Implementation(Production CodeGeneration)1919

Example of MBSE CPS Development using ModelicaRobotics Models, Real-time Training Simulator for Flight, Driving. Source: Tobias Bellmann, DLR, Oberphaffenhofen, GermanyUsing Modelica models generating real-timecodeDifferent simulation environments (e.g. Flight,Car Driving, Helicopter)Developed at DLR Munich, GermanyDymola Modelica tool

Why Modelica and FMI standards are important forCPS Development? Quantitative estimation ofbusiness impact, regardingSAAB’s Grippen Fighter Use Case resulted in enhanced cost for development anddevelopment process with OpenCPS.eu project results V&V of a new aircraft vehiclesubsystemimplemented:o1st loop covers a larger part of total systemfunctionality15% cost increase in 1st loop15% cost reduction in 2nd loop20% cost reduction in 3rd loop Possible to include FMUs of S/W developed in xtUML Efficient distributed simulation of a connected set of largemodels (FMUs)oEarly discovery of design errors & improved decisionsupport in early model-based design decisionsoReduced pressure on test rigsoIncreased use of models, possibility of standardizeddeployment of models to new usersoFurther increased knowledge in MBSE, human capital,contact network21

Modelica Model of Grippen’s Electronic Control Unit (ECU)The ECU code is simulated simultaneouslywith the aircraft environmental model No“abstractions” for the controller function,actual controller code!22

Why CPS andthis course shouldmatter to you?! Boeing’s relationship with Dassault’s 3DSPlatform:Skills studentsneed“Boeing will deploy the 3DEXPERIENCE platform in phases and relyon Winning Program, Co-Design to Target, Ready for Rate, Build toOperate and License to Fly industry solution experiences foraerospace and defense to deepen its end to end digital collaboration,design, engineering, analysis, manufacturing planning and shop floorexecution capabilities throughout the enterprise.” Boeing and similar companies will benefit fromresearch and teaching that involves thedevelopment of these skills. You will develop some of these skills in thiscourse.Skills studentsneed23

Why this course matters for your future?!Work with the most exciting companies!

Why this course matters for your future?!Do cool things!

Dangers of Models and Simulation Falling in love with a modelThe Pygmalion effect (forgetting that model is not the real world) From the Greek myth of Pygmalion, a sculptor who fell in love with astatue he had carved. Forcing reality into the constraints of a modelThe Procrustes effect (e.g. economic theories) Procrustes: "the stretcher [who hammers out the metal]”, a rogue smithfrom Attica that physically attacked people by cutting/stretching theirlegs, so as to force them to fit the size of an iron bed. A Procrustean bed is an arbitrary standard to which exact conformity isforced. Forgetting the model’s level of accuracySimplifying assumptions forgotten more than yesterday’s pudding 26

Although forms of mathematics were used before 1000 BC, he first attempt on solving a form of first order linear equations in 1650 B.C. Equality sign was introduced by Robert Recorde in 1557 Newton still wrote text (Principia, vol. 1, 1686): "The change of motion is proportional to the motive force impressed "