Podcast
Questions and Answers
What is a primary characteristic of a Finite State Machine (FSM)?
What is a primary characteristic of a Finite State Machine (FSM)?
Which of the following best describes a guard in the context of a Finite State Machine?
Which of the following best describes a guard in the context of a Finite State Machine?
In a garage counter Finite State Machine, what is likely a key output?
In a garage counter Finite State Machine, what is likely a key output?
What type of signals can be used in guards for signals with numerical values?
What type of signals can be used in guards for signals with numerical values?
Signup and view all the answers
Which application best exemplifies the use of a Finite State Machine in a control system?
Which application best exemplifies the use of a Finite State Machine in a control system?
Signup and view all the answers
What is a potential advantage of using a Finite State Machine in system design?
What is a potential advantage of using a Finite State Machine in system design?
Signup and view all the answers
In the context of a garage counter Finite State Machine, which component is essential for state transitions?
In the context of a garage counter Finite State Machine, which component is essential for state transitions?
Signup and view all the answers
What type of system is characterized by distinct states and transitions between them?
What type of system is characterized by distinct states and transitions between them?
Signup and view all the answers
Which of the following best illustrates a guard condition with numerical values in a Finite State Machine?
Which of the following best illustrates a guard condition with numerical values in a Finite State Machine?
Signup and view all the answers
In a discrete system, which feature primarily distinguishes a Finite State Machine from other design methods?
In a discrete system, which feature primarily distinguishes a Finite State Machine from other design methods?
Signup and view all the answers
Study Notes
Cyber Physical Systems (CPS) - Lecture 4
- CPS is an abbreviation for Cyber Physical Systems
- Lecture 4 covers Discrete Dynamics & State Machines
- Discrete systems operate in a sequence of distinct steps or have signals taking discrete values. Discrete systems have discrete dynamics
- Today's lecture will cover models (i.e., programs) of discrete systems, types and interfaces including states, transitions, guards, and determinism/receptiveness.
Discrete Systems - Example Design Problem
- Count the number of cars in a parking garage by sensing cars entering and leaving.
- Display the count.
- Arrival detection triggers "up" signal
- Departure detection triggers "down" signal
Discrete Systems - Example Diagram
- Diagram shows Arrival Detector, Departure Detector, Counter display with a sum.
- 'up' signal increases counter, 'down' signal decreases counter.
- Pure signal: up/down → {absent, present}
- Discrete Actor: Counter: (R → {absent, present}) → (R → {absent} ∪ N).
Discrete Systems - Finite State Machine (FSM)
- A state machine that models a system with discrete dynamics.
- At each reaction, maps inputs to outputs.
- The map depends on the current state.
- An FSM where the set of States is finite
- Example: States = {State1, State2, State3}
FSM Notation
- Diagrammatic representation of FSMs
- States are shown as circles
- Transitions are shown as arrows between states
- Associated with each transition are the transition's guard (condition that enables it), and an action/description.
Examples of Guards
- true: Transition always enabled.
- p1: Transition enabled if p1 is present.
- ¬p1: Transition enabled if p1 is absent.
- p1 ∧ p2: Transition enabled if both p1 and p2 are present.
- p1 ∨ p2: Transition enabled if either p1 or p2 is present.
Examples of Guards with numerical values
- p3: Transition enabled if p3 is present.
- p3 = 1: Transition is enabled if p3 has value 1.
- p3 > 5: Transition is enabled if p3's value is above 5.
Garage Counter FSM
- Shows a FSM for a parking garage counter.
- States represent the number of cars in the garage – Example: state 0, 1, ..., M (M maximum capacity)
Garage Counter Mathematical Model
- Formally defines the update function, initial conditions, the states.
- Function calculates the next state of the system based on current input and state.
- Example, UpdateFunction (s(n), x(n)).
Example of Thermostat
- A simple thermostat FSM. The thermostat has different states to heat or cool depending in temperature.
- States: heating, cooling
- Transitions occur based on current temperature
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
This quiz focuses on Lecture 4 of Cyber Physical Systems, covering Discrete Dynamics & State Machines. You'll explore the operation of discrete systems, state transitions, and the design problem of counting cars in a parking garage through discrete signals. Test your understanding of models, types, and interfaces in CPS.