sequential and reactive strategies

37
response actuator control program analog quantity, e.g. pulse train digital quantity, e.g. power % interface stimuli sensor control program analog quantity, e.g. light digital quantity, e.g. light % interface Sequential and Reactive Strategies sensor space actuator space

Upload: others

Post on 19-Mar-2022

1 views

Category:

Documents


0 download

TRANSCRIPT

response

actuator control program

analog quantity, e.g. pulse train

digital quantity, e.g. power %

interface

stimuli

sensor control program

analog quantity, e.g. light

digital quantity, e.g. light %

interface

Sequential and Reactive Strategies

sensor space actuator space

Sequential Strategy

Open loop/ closed loop control

Detect when something goes wrong

Timeout in all infinite loops

Sequential strategy

Reactive Strategy

blocked

blocked

Each control loop can be programmed as a process

sensors actuators

Real time operating system

Processes/threads

sensors actuators

Real time operating system

Processes/threads

Common resources?

actuators

Real time operating system

Arbitration Touch Turn Wander

Embedded Java

The leJOS API classes provide real time events, sensor events and threads: TimerListener SensorListener Thread Timer

a simple round robin 2ms time slice for threads of equal priority...

Cooperative scheduling

Preemptive scheduling

Runnable Non-Runnable suspend()

resume()

yield()

Running

dispatch

start()

stop(), or run() returns

Alive

Line following

A PID Controller For Lego Mindstorms Robots