41081 Chapter 3: Sensing Actuation and Control

276 views4 pages
5 Jun 2018
School
Department
Course
Professor
Chapter 3 State Machines
Time-Ordered Behaviour
Where outputs depend on the order in which input events occur.
C uses a sequential instructions computation model, where statements are executed
seuetiall util the list’s ed is eahed. This appoah is good for capturing
algorithms that transform input data into output data (aka. Data processing
behaviour). However it is not good for capturing time ordered behaviour, as code
tends to become less understandable as more time-oriented behaviour is
introduced.
State machines are one such computational model which is better for capturing time
ordered behaviour.
State Machines
State machines are a computation model designed to capture time-ordered
behaviour.
A drawing of a state machine is called a state diagram.
At a tie, the sste is i a state, alled the current state.
If oe of the uet state’s tasitios has a tue oditio fo a gie tik, a
implicit transition back to the state itself is taken.
o A tick, is the process where a transition leaving the current state and having a
true condition is taken, and then the transitions target state has its actions
executed once, and then becomes the new current state.
o Many ticks occur per second.
For a state machine to be precisely defined, transitions leaving a particular state
should have mutually exclusive transition conditions.
o Only one condition can be true at any time. If two conditions are true, the
machine becomes non-deterministic.
A transition between states without a condition will always evaluate as true, and
thus will always transition.
Using state machine models allows the time-ordered programs to be more clearly
expressed than a C program.
The following pattern detects a rising edge of a signal, but can detect a falling edge
with the condition swapped.
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows page 1 of the document.
Unlock all 4 pages and 3 million more documents.

Already have an account? Log in

Document Summary

Time-ordered behaviour: where outputs depend on the order in which input events occur, c uses a sequential instructions computation model, where statements are executed se(cid:395)ue(cid:374)tiall(cid:455) u(cid:374)til the list"s e(cid:374)d is (cid:396)ea(cid:272)hed. This app(cid:396)oa(cid:272)h is good for capturing algorithms that transform input data into output data (aka. However it is not good for capturing time ordered behaviour, as code tends to become less understandable as more time-oriented behaviour is introduced: state machines are one such computational model which is better for capturing time ordered behaviour. State machines: state machines are a computation model designed to capture time-ordered behaviour, a drawing of a state machine is called a state diagram, at a(cid:374)(cid:455) ti(cid:373)e, the s(cid:455)ste(cid:373) is (cid:862)i(cid:374)(cid:863) a state, (cid:272)alled the current state. Ribs: ribs (riverside irvine builder of state machines) is a tool supporting graphical state diagram capturing of sms, the sms initial state is set by ticking the initial state box.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents