1 / 28

Embedded Systems ECEC 356 –Fall 2014 CAT 268

Embedded Systems ECEC 356 –Fall 2014 CAT 268. Chapter 3 – model based design Chapter 4 – extended state machines and hybrid automata. Eric Wait 10/7-9/2014. Last Week – Chapter 2 This Week – Chapter 3,4 Next Week – Chapter 4, exam 1. Chapter 4 – ESM and hybrid automata.

oleg-talley
Download Presentation

Embedded Systems ECEC 356 –Fall 2014 CAT 268

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Embedded SystemsECEC 356 –Fall 2014 CAT 268 • Chapter 3 – model based design • Chapter 4 – extended state machines and hybrid automata Eric Wait 10/7-9/2014

  2. Last Week – Chapter 2 • This Week – Chapter 3,4 • Next Week – Chapter 4, exam 1

  3. Chapter 4 – ESM and hybrid automata

  4. Modeling with State Machines • Questions: • How to represent the system for: • Systematic analysis • So that a computer program can manipulate it • How to model its environment • How to compose subsystems to make bigger systems • How to check whether the system satisfies its specification in its operating environment

  5. Recall FSM Notation state initial state transition self loop

  6. Garage Counter Example • Recall this example, which counts cars in a parking garage: • The notation here is a bit awkward, because the parameter M may be large, and we are stuck using a somewhat informal … notation.

  7. Extended State Machines • Extended state machines augment the FSM model with variables that may be read or written. E.g.: Question: What is the size of the state space?

  8. General Notation for Extended State Machines • We make explicit declarations of variables, inputs, and outputs to help distinguish the three.

  9. Extended state machine model of a traffic light controller at a pedestrian crossing: • This model assumes one reaction per second • (a time-triggered model) Default transition with implicit guard / action(true / none)

  10. When does a reaction occur? • When a reaction occurs is not specified in the state machine itself. It is up to the environment. • This traffic light controller design assumes one reaction per second. This is a time-triggered model.

  11. When does a reaction occur? • Suppose all inputs are discrete and a reaction occurs when any input is present. Then the above transition will be taken whenever the current state is s1 and x is present. • This is an event-triggered model.

  12. When does a reaction occur? • Suppose x and y are discrete and pure signals. When does the transition occur? Answer: when the environment triggers a reaction and x is absent.If this is a (complete) event-triggered model, then the transition will never be taken because the reaction will only occur when x is present!

  13. Hybrid Automata

  14. Discrete System (FSM) Continuous System jump Hybrid System flow

  15. Where do Hybrid Systems arise? • Digital controller of physical “plant” • thermostat • intelligent cruise control in cars • aircraft auto pilot • Phased operation of natural phenomena • bouncing ball • biological cell growth • Multi-agent systems • ground and air transportation systems • interacting robots

  16. An alternative to FSMs that is explicit about the passage of time: Timed automata, a special case of hybrid systems.

  17. Example: Mouse Double Click Detector This simple form of hybrid system is called a timed automaton, where the dynamics is just passage of time.

  18. Example: Mouse Double Click Detector How many states does this automaton have?

  19. Timed automaton model of a traffic light controller This light remains green at least 60 seconds, and then turns yellow if a pedestrian has requested a crossing. It then remains red for 60 seconds.

  20. Example: “Tick” Generator (Timer) How would you model a timer that generates a ‘tick’ each time T time units elapses? A similar timed automaton can model a generator of a timer interrupt.

  21. Hybrid Automaton for Bouncing Ball y – vertical distance from ground (position) a – coefficient of restitution, 0 ·a· 1 If you plotted y(t), what would it look like?

  22. Hybrid Automaton for Bouncing Ball y – vertical distance from ground (position) a – coefficient of restitution, 0 ·a· 1

  23. When do reactions occur in a hybrid automaton? • Reactions are occurring continually, with the continuous state variable x being continually updated.

  24. When do reactions occur in a hybrid automaton? • Suppose x and y are discrete and pure signals. When does the transition occur? Answer: at the earliest time t when x is absent after entering s1.This will always be the same time when s1 is entered. Why? If x is absent when s1 is entered, then the transition is taken then.If x is present when s1 is entered, then it will be absent at a timeinfinitesimally larger. How to model this rigorously?

  25. Example: Newton’s Cradle Image src: Wikipedia Commons A middle ball does not move, so its momentum must be 0. But the momentum of the first ball is transferred somehow to the fifth. So there is an instant at which it is non-zero!

  26. Sneak Preview: Super-Dense Time • We will solve this problem by modeling signals as functions of super-dense time: • In this way, x can be present and absent at the same time, with a well-defined order between its presence and absence.

  27. Homework 3 • HW 3 – due beginning of class 10/14 • Read Chapter 4 of Lee & Seshia • L&S problems 3.5, 4.1,4.5 • Review Appendix A • Exam 1 – 10/16!

  28. Instructor Contact Information Andrew R. Cohen Associate Prof. Department of Electrical and Computer Engineering Drexel University 3120 – 40 Market St., Suite 110 Philadelphia, PA 19104 office phone: (215) 571 – 4358 http://bioimage.coe.drexel.edu/courses acohen@coe.drexel.edu

More Related