Cyber Physical Systems Lecture 5 PDF
Document Details
Tags
Summary
This document is a lecture on Cyber Physical Systems (CPS). It covers topics like default transitions, determinacy, and receptiveness within state machines and provides an extended example of a traffic light controller. The lecture notes define concepts but lack questions for assessment.
Full Transcript
Cyber Physical systems CPS Lecture 5 Default Transitions default transition, shown in Figure, the default transition is denoted with dashed lines. A default transition is enabled if no non-default transition is enabled and if its guard evaluates to true. Determinacy and R...
Cyber Physical systems CPS Lecture 5 Default Transitions default transition, shown in Figure, the default transition is denoted with dashed lines. A default transition is enabled if no non-default transition is enabled and if its guard evaluates to true. Determinacy and Receptiveness Determinacy: A state machine is said to be deterministic if, for each state, there is at most one transition enabled by each input value. Receptiveness A state machine is said to be receptive if, for each state, there is at least one transition possible on each input symbol. In other words, receptiveness ensures that a state machine is always ready to react to any input, and does not “get stuck” in any state. The formal definition of an FSM given above ensures that it is receptive, since update is a function, not a partial function. It is defined for every possible state and input value. Moreover, in our graphical notation, since we have implicit default transitions, we have ensured that all state machines specified in our graphical notation are also receptive. Extended State Machines The notation for FSMs becomes awkward when the number of states gets large. The garage counter If M is large, the bubble-and-arc notation becomes unwieldy, which is why we resort to a less formal use of “...” in the figure. An extended state machine solves this problem by augmenting the FSM model with variables that may be read and written as part of taking a transition between states. Extended State Machines Notation for general extended state machines. Example An extended state machine describing a traffic light at a pedestrian crosswal. This is a time triggered machine that assumes it will react once per second. It starts in the red state and counts 60 seconds with the help of the variable count. It then transitions to green, where it will remain until the pure input pedestrian is present. That input could be generated, for example, by a pedestrian pushing a button to request a walk light. When pedestrian is present, the machine transitions to yellow if it has been in state green for at least 60 seconds. Otherwise, it transitions to pending, where it stays for the remainder of the 60 second interval. This ensures that once the light goes green, it stays green for at least 60 seconds. At the end of 60 seconds, it will transition to yellow, where it will remain for 5 seconds before transitioning back to red.The outputs produced by this machine are sigG to turn on the green light, sigY to change the light to yellow, and sigR to change the light to red. Extended state machine model of a traffic light controller that keeps track of the passage of time, assuming it reacts at regular intervals..