CSCI1600: Embedded and Real Time Software

Slides:



Advertisements
Similar presentations
ECE 720T5 Fall 2012 Cyber-Physical Systems Rodolfo Pellizzoni.
Advertisements

Concurrent & Distributed Systems Lecture 6: Simulation (WWCH) What? –The use of an abstract model of a real engineering system, which can be implemented.
Computer Science 240 Principles of Software Design.
SE320: Introduction to Computer Games Week 8: Game Programming Gazihan Alankus.
ECE 720T5 Winter 2014 Cyber-Physical Systems Rodolfo Pellizzoni.
CS4730 Real-Time Systems and Modeling Fall 2010 José M. Garrido Department of Computer Science & Information Systems Kennesaw State University.
Intent Specification Intent Specification is used in SpecTRM
Week 8 - Wednesday.  What did we talk about last time?  Level order traversal  BST delete  2-3 trees.
CSCI1600: Embedded and Real Time Software Lecture 12: Modeling V: Control Systems and Feedback Steven Reiss, Fall 2015.
CSCI1600: Embedded and Real Time Software Lecture 4: Introduction to the Arduino Steven Reiss, Fall 2015.
CSCI1600: Embedded and Real Time Software Lecture 8: Modeling III: Hybrid Systems Steven Reiss, Fall 2015.
CSCI1600: Embedded and Real Time Software Lecture 2: Introduction Steven Reiss, Fall 2015.
CSCI1600: Embedded and Real Time Software Steven Reiss Fall 2015.
CSCI1600: Embedded and Real Time Software Lecture 33: Worst Case Execution Time Steven Reiss, Fall 2015.
CSCI1600: Embedded and Real Time Software Lecture 6: Modeling I: Continuous Systems Steven Reiss, Fall 2015.
CSCI1600: Embedded and Real Time Software Lecture 9: Input Output Concepts Steven Reiss, Fall 2015.
CSCI1600: Embedded and Real Time Software Lecture 28: Verification I Steven Reiss, Fall 2015.
CSCI1600: Embedded and Real Time Software Lecture 14: Input/Output II Steven Reiss, Fall 2015.
The single most important skill for a computer programmer is problem solving Problem solving means the ability to formulate problems, think creatively.
CSCI1600: Embedded and Real Time Software Lecture 15: Advanced Programming Concepts Steven Reiss, Fall 2015.
1 Team Skill 3 Defining the System Part 1: Use Case Modeling Noureddine Abbadeni Al-Ain University of Science and Technology College of Engineering and.
CSCI1600: Embedded and Real Time Software Lecture 10: Modeling IV: Compositions of State Machines Steven Reiss, Fall 2015.
CompSci 280 S Introduction to Software Development
Modularity Most useful abstractions an OS wants to offer can’t be directly realized by hardware Modularity is one technique the OS uses to provide better.
OPERATING SYSTEMS CS 3502 Fall 2017
CS240: Advanced Programming Concepts
Learning to Program D is for Digital.
Unified Modeling Language
Object-Oriented Programming
Modularity and Memory Clearly, programs must have access to memory
Application Development Theory
Chapter 8 I/O.
CSCI1600: Embedded and Real Time Software
CSCI1600: Embedded and Real Time Software
TRANSLATORS AND IDEs Key Revision Points.
CSCI1600: Embedded and Real Time Software
CSCI1600: Embedded and Real Time Software
CSCI1600: Embedded and Real Time Software
CSCE 315 – Programming Studio, Fall 2017 Tanzir Ahmed
Chapter 9 Use Cases.
CSCI1600: Embedded and Real Time Software
CSCI1600: Embedded and Real Time Software
CSCI1600: Embedded and Real Time Software
CSCI1600: Embedded and Real Time Software
CSCI1600: Embedded and Real Time Software
CSCI1600: Embedded and Real Time Software
CSCI1600: Embedded and Real Time Software
CSCI1600: Embedded and Real Time Software
CSCI1600: Embedded and Real Time Software
CSCI1600: Embedded and Real Time Software
Software Requirements
Software Design Principles
Workshop for Programming And Systems Management Teachers
Tonga Institute of Higher Education IT 141: Information Systems
Applying Use Cases (Chapters 25,26)
Applying Use Cases (Chapters 25,26)
Tonga Institute of Higher Education IT 141: Information Systems
User ScenarIOS.
Basic Concepts of Algorithm
CSCI1600: Embedded and Real Time Software
CSCI1600: Embedded and Real Time Software
CSCI1600: Embedded and Real Time Software
Work & Machines Thinking Questions.
CSCI1600: Embedded and Real Time Software
CSCI1600: Embedded and Real Time Software
Chapter 2: Performance CS 447 Jason Bakos Fall 2001 CS 447.
From Use Cases to Implementation
Work & Machines Thinking Questions.
CSCI1600: Embedded and Real Time Software
Presentation transcript:

CSCI1600: Embedded and Real Time Software Lecture 8: Modeling I: Continuous Systems Steven Reiss, Fall 2017

Readings What did you get from the reading? Lecture 7: Continuous Modeling 11/28/2018

Why Modeling Specifying system behavior Designing the system Understanding what the system should do In response to external events In response to internal events Designing the system Requirements, specifications Understanding odd conditions Understanding time and other constraints Lecture 7: Continuous Modeling 11/28/2018

Why Modeling Proving properties of the system Proving a system is “safe” What does safety mean Show the system fits this meaning Can be done in terms of models Also can be done in terms of code Performance properties Timing requirements Lecture 7: Continuous Modeling 11/28/2018

Proving Program Properties Prove heat and cold never on within 5 minutes of each other Can do this by looking at the code How complex is the code, how difficult What are all the things that can happen What if there are multiple processes/threads Easier to prove a high-level model satisfies the property And then show the code meets the model Lecture 7: Continuous Modeling 11/28/2018

The Real World Embedded systems exist in context That context is the real world Is the real world continuous or discrete? Lecture 7: Continuous Modeling 11/28/2018

Physical Systems If we embed into a physical system What is the effect What do we want to happen Will we achieve the effect What can go wrong Need to model the physical system Lecture 7: Continuous Modeling 11/28/2018

Modeling for Design Why bother with modeling What do you want Why not just implement what we want And see what happens What do you want How do you know what will work What happens if things go wrong Lecture 7: Continuous Modeling 11/28/2018

Consider a RC Car What are you concerned with What are your controls Position of the car (dimension?) Location, wheel positions, velocity Relative or absolute What are your controls Accelerate or not Binary or can you control How does this affect the position Turn left/right Lecture 7: Continuous Modeling 11/28/2018

RC Car What accelerate means What does turn mean How much acceleration Maximum speed Slowdown when not accelerating What does turn mean How fast does the wheel turn Maximum amount of turn Does car follow wheel? Lecture 7: Continuous Modeling 11/28/2018

RC Car Suppose you want to track a line What should you do? Can tell left/right by amount What should you do? Lecture 7: Continuous Modeling 11/28/2018

Modeling This is one reason to model Are there others? Understanding what your options might be and what your system should think about doing Making it easy to measure the effects Are there others? Lecture 7: Continuous Modeling 11/28/2018

Simulation Suppose our RC car were breakable E.g. helicopter, drone, … Suppose it had real effects E.g. real car, X-ray machine Pin ball machine Suppose it were expensive Or not yet built How would you create the embedded program Lecture 7: Continuous Modeling 11/28/2018

Simulation Environment Create a simulation environment Simulate the physical world Let your program run as part of the simulation This requires modeling the real world Physical details Gravity, motion, etc. Can be chemical, heat, … How many have written a simulation? Lecture 7: Continuous Modeling 11/28/2018

Simulation Small time step Fixed or variable Track position, velocity, orientation, state Of each object Or subobject (e.g. wheels of RC car) Compute next state Next position, velocity, orientation Consider a bouncing ball Lecture 7: Continuous Modeling 11/28/2018

Simulation Effectively doing calculus Different ways of computing next Small step = delta Smaller step => more accurate This is why you develop the formulas as in the text Different ways of computing next Runge-Kutta, … Different amount of current and next deltas For our purposes, simplest should work Lecture 7: Continuous Modeling 11/28/2018

Time Step Larger time step is faster Smaller time step is more accurate For simple motion, not that important Complex motions, collisions Need a time step that ensure events Pinball machine Pool table RC Car Lecture 7: Continuous Modeling 11/28/2018

Simulation Can be expressed in modeling language Various systems exist Matlab (Simulink), LabView provide a graphical interface Actor model described in text Various systems exist Special-purpose systems (e.g. flight simulators) Lecture 7: Continuous Modeling 11/28/2018

Simulation Concerns Fidelity Speed Debugging How accurately does it model the real world How important is this accuracy Speed Does it operate in real time Does it operate on the time scale of your system Debugging Can you debug your program using it Can you simulate real-world faults Lecture 7: Continuous Modeling 11/28/2018

Embedded Systems You can model the outside world Within your program But you probably don’t want to simulate it WHY? What do you do instead Get outside state, compare to expected Compensate Lecture 7: Continuous Modeling 11/28/2018

Feedback In general, your system doesn’t try to compute the next step based purely on the model Instead it uses feedback to control the system We’ll get into this in two weeks Lecture 7: Continuous Modeling 11/28/2018

Modeling Embedded Systems We’ve talked about modeling the outside world Suppose we want to model our embedded system What’s different How might we do this Lecture 7: Continuous Modeling 11/28/2018

RT/Embedded SW Architecture Break the problem into tasks Each task has its own requirements How often to run, when to run How much time it takes How critical it is What are the tasks for a problem? Lecture 7: Continuous Modeling 11/28/2018

Task Types Control-oriented tasks Timer-oriented tasks Managing state, handling sequential actions Timer-oriented tasks Something needs to be done periodically Data-oriented tasks If multiple tasks access a data structure Have a task in charge of that structure Device-oriented tasks Single task to handle a device Lecture 7: Continuous Modeling 11/28/2018

Modeling the System First modeling the individual tasks Interactions with the physical world Interactions based on time Then modeling their interaction With each other Lecture 7: Continuous Modeling 11/28/2018

Homework Read Chapter 3.1-3.5 Exercises 3.2 and 3.6 Lecture 7: Continuous Modeling 11/28/2018