Why using computer simulation?

Slides:



Advertisements
Similar presentations
Embedded System, A Brief Introduction
Advertisements

Modeling and Simulation By Lecturer: Nada Ahmed. Introduction to simulation and Modeling.
Chapter 14 Simulation. 2 What Is Simulation?  Simulation: A model of a complex system and the experimental manipulation of the model to observe the results.
Signals and Systems March 25, Summary thus far: software engineering Focused on abstraction and modularity in software engineering. Topics: procedures,
Lect.3 Modeling in The Time Domain Basil Hamed
CS 367: Model-Based Reasoning Lecture 2 (01/15/2002)
CONTROL SYSTEMS: WHAT THEY ARE
Modeling and simulation of systems Slovak University of Technology Faculty of Material Science and Technology in Trnava.
Formal Methods in Software Engineering Credit Hours: 3+0 By: Qaisar Javaid Assistant Professor Formal Methods in Software Engineering1.
Petri Nets Overview 1 Definition of Petri Net C = ( P, T, I, O) Places P = { p 1, p 2, p 3, …, p n } Transitions T = { t 1, t 2, t 3, …, t n } Input.
ME457 Mechatronic System Modeling MICHIGAN STATE UNIVERSITY ME457: Mechatronic System Modeling and Simulation Prof. R. C. Rosenberg Your objective: domination!
Unified Modeling (Part I) Overview of UML & Modeling
Models of Computation for Embedded System Design Alvise Bonivento.
Chapter 14 Simulation. 2 What Is Simulation?  Simulation: A model of a complex system and the experimental manipulation of the model to observe the results.
Formal Methods 1. Software Engineering and Formal Methods  Every software engineering methodology is based on a recommended development process  proceeding.
Cheng/Dillon-Software Engineering: Formal Methods Model Checking.
Chapter 1 Introduction to Simulation
1 Performance Evaluation of Computer Networks: Part II Objectives r Simulation Modeling r Classification of Simulation Modeling r Discrete-Event Simulation.
Capacity analysis of complex materials handling systems.
Mathematical Modeling and Formal Specification Languages CIS 376 Bruce R. Maxim UM-Dearborn.
AToM 3 : A Tool for Multi- Formalism and Meta-Modelling Juan de Lara (1,2) Hans Vangheluwe (2) (1) ETS Informática Universidad Autónoma de Madrid Madrid,
Ch. 2. Specification and Modeling 2.1 Requirements Describe requirements and approaches for specifying and modeling embedded systems. Specification for.
Previous experience n Background (Carleton / Ottawa U / Special ?) –Systems/Computer Engineering –Computer Science –Electronic/Electrical Engineering –Industrial/Mechanical.
Big Ideas Differentiation Frames with Icons. 1. Number Uses, Classification, and Representation- Numbers can be used for different purposes, and numbers.
Why building models? n Cannot experience on the real system of interest n Cost n Danger n The real system does not exist Why using simulation? n Reduced.
A Context Model based on Ontological Languages: a Proposal for Information Visualization School of Informatics Castilla-La Mancha University Ramón Hervás.
Programming Languages and Design Lecture 3 Semantic Specifications of Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern.
Petri Nets Lecturer: Roohollah Abdipour. Agenda Introduction Petri Net Modelling with Petri Net Analysis of Petri net 2.
1 Copyright  2001 Pao-Ann Hsiung SW HW Module Outline l Introduction l Unified HW/SW Representations l HW/SW Partitioning Techniques l Integrated HW/SW.
CSCI1600: Embedded and Real Time Software Lecture 28: Verification I Steven Reiss, Fall 2015.
Finite State Machines (FSM) OR Finite State Automation (FSA) - are models of the behaviors of a system or a complex object, with a limited number of defined.
Model Checking Lecture 1. Model checking, narrowly interpreted: Decision procedures for checking if a given Kripke structure is a model for a given formula.
1 Specification A broad term that means definition Used at different stages of software development for different purposes Generally, a statement of agreement.
Review n System dynamics : A sequence of state transition n model : A set of rules for state transition System S X Y Discrete event system FSM (Automata)
CSCI 383 Object-Oriented Programming & Design Lecture 7 Martin van Bommel.
Introduction The objective of simulation – Analysis the system (Model) Analytically the model – a description of some system intended to predict the behavior.
Simulation Examples And General Principles Part 2
Introduction To Modeling and Simulation 1. A simulation: A simulation is the imitation of the operation of real-world process or system over time. A Representation.
Modelling & Simulation of Semiconductor Devices Lecture 1 & 2 Introduction to Modelling & Simulation.
IGEM 2009 Tutorial Modelling. What? Model A model in science is a symplified physical, mathematical, or logical representation of a system of entities,
From requirements to specification Specification is a refinement of requirements Can be included together as Software Requirements Specifications (SRS)
Traffic Simulation L2 – Introduction to simulation Ing. Ondřej Přibyl, Ph.D.
Laurea Triennale in Informatica – Corso di Ingegneria del Software I – A.A. 2006/2007 Andrea Polini VIII. Specifications (II)
Sub-fields of computer science. Sub-fields of computer science.
Requirements Specification
OPERATING SYSTEMS CS 3502 Fall 2017
An Overview of Requirements Engineering Tools and Methodologies*
Chapter 1: Overview of Control
Main issues: • What do we want to build • How do we write this down
OVERVIEW Impact of Modelling and simulation in Mechatronics system
POAD Book: Chapter 8 POAD: Analysis Phase
Modeling and Simulation (An Introduction)
SIMULATION SIMULAND PURPOSE TECHNIQUE CREDIBILITY PROGRAMMATICS
Introduction Introduction to VHDL Entities Signals Data & Scalar Types
Mathematical Models of Systems Objectives
ADVANTAGES OF SIMULATION
Graph Coverage for Specifications CS 4501 / 6501 Software Testing
Introduction to Control Systems Objectives
Event Relation Graphs and Extensions in Ptolemy II
Linear Control Systems
Digital Control Systems (DCS)
ME457: Mechatronic System Modeling and Simulation
Object oriented analysis and design
CS310 Software Engineering Dr.Doaa Sami
Digital Control Systems Waseem Gulsher
Graph Coverage for Specifications CS 4501 / 6501 Software Testing
Dynamic Modeling Lecture # 37.
Department of Computer Science Abdul Wali Khan University Mardan
Presented By: Darlene Banta
Chapter 4 System Modeling.
Presentation transcript:

Why using computer simulation? Why building models? Cannot experience on the real system of interest Cost Danger The real system does not exist Why using computer simulation? Reduced cost of computers Improved facilities of modern computers Ease to use Flexibility http://www.sce.carleton.ca/courses/sysc-5104/materials/private/

M&S Entities and Relations Experimental Frame Device for executing model Real World Simulator Data: Input/output relation pairs simulation relation modeling relation Conditions under which the system is experimented with/observed Model Each entity can be formalized as a Mathematical Dynamic System (mathematical manipulations to prove system properties) Structure generating behavior claimed to represent real world

One system: many models Model is valid to objective  correct answer to query c.f) Complete model never exists One model: many implementations (simulations) Q1 Q2 Q3 Q4 SYSTEM Given system Objective Q1 Q2 Q3 Q4 MODEL1 MODEL2 many models experiment1 experiment2

Systems, Models and Simulations Processes. Classifications. Formalisms.

Modelling techniques classification Example: waiting in a line for service Conceptual Modelling: informal model Communicates the basic nature of the process Provides a vocabulary for the system (ambiguous) General description of the system to be modeled

Declarative models Based on State-based declarative models evolution of the model represented as states (or events) over time = behavior of the entities under study Transitions between states (or events) State-based declarative models Example: States = number of persons waiting in line Arcs = arrival of new customers/departure of serviced ones Fishwick: Models that permit dynamics to be encoded as state-to- state or event-to-event transitions are declarative. The idea behind declarative modeling is to focus on the structure of the state (or event) from one time period to the next Declarative modeling: these techniques are focused on the evolution of the model represented as states (which describe the behavior of the entities under study) and the transitions between them. According to the particular focus of the technique, we can have state-based or event-based declarative models. State-based declarative models, for instance, can be represented as a graph where the vertices represent the entities and the arcs represent the state changes (transitions). Figure 1.10 shows a state-based declarative model representing a portion of the system’s specification, in which students arrive at or leave the classroom. At a certain point, we have 27 students in the lecture room and a temperature of 25°C. If a new student arrives, we will have a total of 28 students and 25.05°C (this is an untimed model, so timing information is not included). If a student leaves, we return to the previous state; if another student arrives, we have 29 students and temperature will go up (25.1°C). We also show a state representing that the heating has been turned off, which will reduce temperature in the classroom accordingly.

Declarative models (cont.) Event-based declarative models Arcs = represent scheduling Event relation: from arrival to departure of ith entity A taxonomy for simulation modeling based on programming language principles PAUL A. FISHWICK Un d no puede ocurrir sin un a antes. Un a no necesita que haya un d antes. Puede haber varios a consecutivos. --- Wainer 2009: Figure 1.11 shows an event-based declarative model for the classroom that represents the same phenomena analyzed in Figure 1.10. If we schedule the arrival of a new student, we will have one more student in the room and temperature will increase. The model can receive more students while there is room available (q ≤ 85). At any moment, we can schedule a student to leave (in this case, we will decrease temperature and the number of students in the room). We need at least one student to schedule a student departure (q ≥ 1). If we schedule the heat off event, temperature goes down 3°C.

Functional models “Black box” Input: signal defined over time Output: depending on the internal function Timing delays: discrete or continuous Example: Inputs = customers arriving Outputs = delayed output of the input customers A taxonomy for simulation modeling based on programming language principles PAUL A. FISHWICK

Spatial models Space notions included Relationship between time and space positions Example: customers moving through the server. A taxonomy for simulation modeling based on programming language principles PAUL A. FISHWICK

Modelling System Dynamics Simulation models capture a systems’ dynamic behavior and how it organizes itself over time in response to imposed conditions and stimuli. Such modeling is required in order to be able to predict how a system will react to external inputs and proposed structural changes. Avoid approaches based in programming languages In most cases their foundation are not rigorous resulting simulation software difficult to test, maintain, and verify Changes in the language can produce serious effects in existing models their semantics are usually not formally defined. Do not provide a method abstract enough to think about problems neither to solve or prove properties of the entities under study

Formal Modelling Advantages of Formal Methods Formalism Correctness and completeness  Testing Communication means  Teamwork Formalism Communication convention Specification in unambiguous manner Abstraction (representation) + manipulation of abstraction Formal specification -> Formal model

A Systems Dynamics classification Classifying modelling techniques according to the system dynamics System Dynamics: A sequence of State transitions Model: A set of rules for a State transition X System S Y

Classification Vars./Time Continuous Discrete [1] DESS Partial Differential Equations Ordinary Differential Equations Bond Graphs Modelica Electrical circuits [2] DTSS Difference Equations Finite Element Method Finite Differences Numerical methods (in general, any computing method for the continuous counterparts], like Runge-Kutta, Euler, DASSL and others. [3] DEVS DEVS Formalism Timed Petri Nets Timed Finite State Machines Event Graphs [4] Automata Finite State Machines Finite State Automata Petri Nets Boolean Logic Markov Chains

(DESS: Differential Equation Systems Specification) Analogous ODE system structure Car suspension, Mechanical view. Electrical analogy of car suspension.

DESS Transfer functions (block diagrams)

DESS Bond Graphs Also: Forrester´s “System Dynamics” Differential Algebraic Equations https://reference.wolfram.com/language/tutorial/NDSolveDAE.html

DESS Differential equations Numerical methods for Differential Equation solving: Discrete Time/Continuous Variables systems.

Discrete Time / Continuous Variable (DTSS: Discrete Time Systems Specification) Modeling Techniques: Finite Difference Methods Also “Numerical Methods”, “Difference Equations” (Euler, Runge Kutta, DASSL, etc.) Dependent variable: u Independent variable: x Differential equation: Euler: Difference equation: Stencil (PDEs) https://en.wikipedia.org/wiki/Stencil_(numerical_analysis) In mathematics, especially the areas of numerical analysis concentrating on the numerical solution of partial differential equations, a stencil is a geometric arrangement of a nodal group that relate to the point of interest by using a numerical approximation routine. Stencils are the basis for many algorithms to numerically solve partial differential equations (PDE). Two examples of stencils are the five-point stencil and the Crank–Nicolson method stencil.

Discrete Time / Discrete Variable (Automata) Modeling Techniques: Finite State Machines Finite State Automata Petri Nets CSP (Communicating Sequential Processes) CCS (Calculus of Communicating Systems) LTS (Labelled Transition Systems) Markov chains LTS: http://www.cas.mcmaster.ca/~kahl/SE3BB4/2007/SE3B-2007-LTS1_4up.pdf http://www.mcrl2.org/dev/user_manual/articles/lts.html

Discrete Variable / Continuous Time (DEDS: Discrete Event Dynamic Systems) Modeling Techniques: Min-max algebra Timed Finite State Machines Timed Petri Nets Generalized Semi-Markov Process (GSMP) Timed automata Timed graphs Event graphs Event scheduling GPSS (simulation language) DEVS formalism (Discrete EVent Systems specification) DEVS contains all DEDS, being even more expressive. Ponemos DEVS como ejemplo más general del paradigma de modelos DVCT, porque los contiene a todos. Fundamentalmente, DEVS no tiene la restricción de “Discrete Variable”, aunque esa es una restricción que reaparece en la etapa de simulación (por la finitud numérica represenatcional de las computadoras digitales).

Research efforts in DEDS modelling Characteristic of DEDS (DTDS is a special case of DEDS) Human-made systems Naturally concurrent systems Not well-grounded mathematical formalism for modeling Difficulties in computer experimentation Non-linear No accurate analytic solution No transformation methods

Examples of Discrete Event Systems Examples of Discrete Event System: Human-made system Multi-computer system Communication network Distributed control manufacturing system Games Traffic systems

Multiformalism Complex system example DAEs GPSS Differential Algebraic Equations process interaction discrete-event scheduling system …complexity lies in the diversity of the different components, both in abstraction level and in formalism used. Forrester’s System Dynamics Complex systems are characterized, not only by a large number of components, but also by the diversity of the components. For the analysis and design of such complex systems, it is no longer sufficient to study the diverse components in isolation, using the specific formalisms these components were modelled in. Rather, it is necessary to answer questions about properties (most notably behaviour) of the whole system. To focus the attention, Figure 6 gives an example of a complex system. The complexity lies in the diversity of the different components, both in abstraction level and in formalism used: • A paper and pulp mill produces paper from trees with polluted water as a side-effect. This system is modelled as a process interaction discrete-event scheduling system. • A Waste Water Treatment Plant (WWTP) takes the polluted effluent from the mill and purifies it. Some solid waste is taken to a landfill whereas the partially purified water flows into a lake. This system is modelled using Differential Algebraic Equations (DAEs) describing the biochemical reactions in the WWTP. • A Fish Farm grows fish in the lake. Fish feed on algae which are highly sensitive to polluted water. The water is also used for a tree plantation which supplies the paper mill. This system is modelled using the System Dynamics formalism. The dotted feedback arrow from the fish farm to the paper mill indicates the possible disastrous impact of poisoned fish on the productivity of workers in the mill. Differential Equations Hans Vangheluwe, 2008

Multiformalism utility Different Abstraction Levels of a Dynamic System state < Multilevel Abstraction in System Design > Higher Abstraction Level S/W Real-time program Timed DES event1 event2 event3 event4 event5 time state Concurrent program Untimed DES Sequential program Finite State Automata time state H/W Diff. Eqn FSM time state time

Multiformalism utility Hybrid Systems Problematic for classic discrete Discrete Time methods. Among other reasons, due to the difficult/costly handling of Discrete Events. Discrete-Event process, State Chart. Physical process, Differential Equations. (Juan de Lara, 2005) Real Process, Conceptual Model.

Example: hierarchical control Operator Planning/scheduling Discrete Event Controller PID controller analog/digital Plant Command Discrete states Actuation Sensors Event-based control Time-based Supervisory control Continuous variables and time Strategic control