Lesson 16: Advanced Topics in Behavior Analysis - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

Lesson 16: Advanced Topics in Behavior Analysis

Description:

Related Terms: state machine, state chart, finite automaton. Definition: ... describes a hypothetical machine (finite automaton) which at any given time is ... – PowerPoint PPT presentation

Number of Views:32
Avg rating:3.0/5.0
Slides: 19
Provided by: fay6
Category:

less

Transcript and Presenter's Notes

Title: Lesson 16: Advanced Topics in Behavior Analysis


1
Lesson 16Advanced Topics in Behavior Analysis
Object-Oriented Modeling
Applications

2
Lesson Objectives
  • Describe the characteristics of Real-Time Systems
  • Understand action tables
  • Understand picket fence representation
  • Learn about timing diagram
  • Understand leveling behavior models
  • Learn about concurrency

3
State-Transition Diagrams
  • Related Terms state machine, state chart, finite
    automaton
  • Definition
  • A STD shows a sequence of states an object (a
    class, a package, or a system) can assume during
    its lifetime (execution), together with the
    stimuli that cause changes of state.
  • A STD describes a hypothetical machine (finite
    automaton) which at any given time is found in a
    set of finite states.
  • It consists of
  • A finite, non-empty set of states
  • A finite, non-empty set of events
  • Functions (actions) which describe the transition
    from one state to the next
  • An initial state
  • A set of final states

4
State-Transition Diagrams Events/Conditions/Opera
tions
  • A Transition is triggered by one or more events.
  • An Event consists of a name and a list of
    possible argument.
  • Conditions can be attached to the event or
    conditions may be formulated independently of a
    specific event.
  • Events/Conditions can trigger actions inside the
    state that are realized through appropriate
    operations (actions).
  • Three special triggers are predefined
  • entry fires automatically when entering a state
  • exist fires automatically when leaving a state
  • do fires repeatedly as long as the state is
    active

5
State-Transition Diagrams Events/Conditions/Opera
tions
  • An event is an occurrence which has a particular
    significance in a given context, can be localized
    in space and time, and needs to be taken into
    account because it triggers a state transition.
  • An Event may have the following causes
  • A condition (defined for a transition) is
    satisfied.
  • The object receive a message.
  • Transitions are usually triggered by events which
    are noted on the arrows that connect the states.
  • Transitions without event specifications are
    triggered automatically as soon as the actions
    belong to a state (inside) or previous state (on
    transition) are terminated.
  • 0 or more Event(arguments) 0 or more conditions
    /operations (arguments)

6
Characteristics of Real-Time Systems
  • Problems are formulated in scientific or
    engineering terms
  • RTSs contain sensors and actuators to interact
    with their environment instead of with humans
  • A RTS has sensors to sense important physical
    parameters, such as temperature, pressure, or
    speed
  • A RTS has actuators, such as valves and
    thermostats that can make direct changes to the
    environment without going through a human
    intermediary.
  • Require a degree of coordination similar to the
    eye-hand coordination of people.
  • RTSs often require concurrent processing of
    multiple inputs - Examples
  • Temperature, pressure, acidity may have to be
    sensed and used together to calculate how to
    control a chemical reaction.
  • Valves and heaters may have to be adjusted
    simultaneously to maintain the desired flow rate,
    temperature, and reaction rate.

7
Characteristics of Real-Time Systems
  • RTSs operate at very short time scales
  • Systems like a nuclear reactor may responses in
    milliseconds or even microseconds.
  • Such rapid response times may sometimes be at the
    limit of the available technology.
  • As a result, there may be several technological
    constraints in the design of the system.
  • RTSs require higher precision than ordinary
    systems.
  • Constraints are imposed by the task, not the user
  • These constraints guarantee safety, liveness, and
    timeliness
  • Safety means that responses match specifications
    and the system is fault-tolerant
  • Liveness means that the system responds to all
    events
  • Timeliness means that the system responds within
    time constraints imposed by the environment

8
Comments on the Characteristics of RTSs
  • The list of previous RTS characteristics is not
    mandatory
  • A method for designing RTSs must be able to deal
    with all of the RTS characteristics.
  • There are no method deals with all the
    characteristics
  • Methods for RTS developments
  • ROOM
  • Berard
  • O-ET

9
STD for the Control Temperature Process
Start
Stop
Idle State
Cold Enable Gas()
Cold or Cool Enable Electric()
Hot Enable Refrign()
Gas Heating
Cold Enable Gas()
Cool Disable Gas()
Electric Heating
OK Disable Electric()
Hot Disable Electric() Enable Refrign()
Cold oe Cool Disable Refrign()
Refrigeration
10
An Action Table Equivalent to previous STD
SIGNALS
Cold Cool OK Hot
STATUS
Enable Electric()
Enable Gas() Enable Electric()
Enable Refrigeration()
Idle Gas Heat Electric Heat Refrigeration
Disable Gas()
Disable Electric() Idle-State
Enable Gas()
Disable Electric() Enable Refrign()
Disable Refrign() Idle-State
Disable Refrign() Idle-State
11
Timing Diagram
Idle Warming Running Cooling
12
Timing Diagram (contd)
  • Timing Diagrams help in understanding a complex
    sequence of related actions and activities within
    a thing or between instances
  • A Timing Diagram represents the relative time at
    which an action or activity occurs
  • Each row in the diagram denotes a separate
    action or activity

13
Timing Diagram (contd)
  • When the lines are drawn
  • Low gt the action or activity is considered not
    to be taken place
  • Highgt the action or activity is considered to be
    taken place
  • When one activity must precede another, a
    freehand line can be drawn to show the precedence
    relationship
  • Timing Diagram can be annotated to show the
    birth and death of object instances, and the
    formation and breakup of relationships, etc.

14
Leveling Behavior Models
Idle
On
O F F
Stopped
Start
O N
Accelerating
Decelerating
Off
Done
At Speed
Running
15
Leveling Behavior Models (contd)
  • Behavior models can be leveled
  • Leveling suppresses details to increase
    understanding
  • Allows the representation of very large behavior
    models, in manageable pieces
  • Two popular approaches
  • Sub-class/Super-class Class-based
  • Composite object structure Instance-based

16
Concurrency
  • Aggregation Concurrency
  • A dynamic model describes a set of concurrent
    objects, each with its state and STD.
  • The objects in a system are inherently concurrent
    and can change state independently
  • The state of the entire system cannot be
    represented by a single state in a single object
    it is the product of the states of all its
    objects.
  • Aggregation implies concurrency.
  • The aggregate state corresponds to the combined
    states of all the components STDs
  • Aggregation is the and relationship
  • The aggregate state is one state from the first
    STD, and a state from the second STD, and a state
    from each other STD.

17
Concurrency (contd)
  • Concurrency within an object
  • Concurrency within the state of a single object
    arises when the object can be partitioned subsets
    of attributes and links, each o which has its own
    sub-STD. The state of an object comprises one
    state from each sub-STD

18
Discussion Questions
Define An action table Concurrency Timing
Diagram What are the differences between
aggregation and concurrency? What are the
characteristics of RTSs?
Write a Comment
User Comments (0)
About PowerShow.com