Stateflow Modelling
Stateflow Modelling
Stateflow Modelling
We
will
use
32-bit
Matlab
release
2011b,
the
same
version
of
Matlab
as
currently
used
in
the
EECS
461
Embedded
Control
Lab.
InstrucFons
for
installing
32-bit
Matlab
2011b
on
your
laptop
are
contained
in
the
Course
LogisFcs
document
on
CTools
Recently
Matlab
has
changed
from
models
with
a
.mdl
sux
to
models
with
a
.slx
sux.
(The
underlying
soWware
is
dierent,
and
enables
addiFonal
features.)
If
you
insist
on
using
a
more
recent
version
of
Matlab,
and
you
want
me
to
examine
your
model
for
debugging,
then
you
should
save
your
model
as
a
.mdl
le
In
Matlab
2011b.
Look
for
a
save
as
command,
or
perhaps
an
export
command.
(Dierent
versions
of
Matlab
do
this
dierently.)
Power
Switch
Simulink
Model
Simulink
model
of
a
power
switch
that
toggles
on
and
o
at
zero
crossing
of
a
sine
input.
At
each
switch,
a
counter
is
incremented
Inside
the
State
Chart
Two
states
of
the
power
switch:
on
and
o
TransiFons
between
the
States
happen
whenever
the
event
switch
occurs.
When
a
transiFon
occurs,
the
variable
counter
is
incremented
By
default,
the
iniFal
state
is
o
To
Run
SimulaFon