Professional Documents
Culture Documents
Lect3 RTOS
Lect3 RTOS
Pilani Campus
RKTiwary
RTOS
Lec-3
Digital Control
• Controlling some device (the “plant”) using an actuator,
based on sampled sensor data
– y(t) is the measured state of the plant
– r(t) is the desired state of the plant
– Calculate control output u(t) as a function of y(t), r(t)
– Rise time – the amount of time that the plant takes to reach
some small neighbor hood around the final state in response to
a step change in the reference input
– If R is the rise time, and T is the period, a good rule of thumb
is that the ratio 10 ≤ R/T ≤ 20
• Not only does a system need to run a control law with time
constraints, it must also schedule communications, sending
and receiving messages according to deadlines
– Mostly cyclic
• Most tasks execute periodically
• The system must also respond to some external events (fault
recovery and external commands) asynchronously
• Example: modern avionics and process control systems
Three tasks:
180 per second, total computation time 1 ms
Read sensor data
Compute the control laws of the inner yaw-control loop
Apply the control laws results to the actuators
Perform internal checks
2 90 per second, total computation time 3 ms:
Compute the control laws of the inner pitch-control loop
Compute the control laws of the inner roll- and collective-
control loop
3 30 per second, total computation time 10 ms:
Compute the control lows of the outer loops
How to implement this control system?
Schedulers
– Preemptable – scheduling decisions are made whenever some job
becomes ready for execution or a job completes
– Non-preemptable – scheduling decision are delayed until a running job
completes.
4/3
J7 J5 J6 J8
4 6 10 11
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Effective Release Times and Deadlines
Effective deadline
If a job has no successors, its effective deadline
is its deadline
It if has successors, its effective deadline is the
minimum of its deadline and the effective
deadline of its successors