19-Soft-A4 Real-Time Systems · May 2016
Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)
Paper: National Exams, May 2016, 04-Soft-A4 Real-time Systems, 3 hours, closed book. Any five of the six questions constitute a complete paper (all questions answered below as a full study resource). Reference texts: Liu, Real-Time Systems; Buttazzo, Hard Real-Time Computing Systems; Kopetz, Real-Time Systems: Design Principles for Distributed Embedded Applications; Ogata, Modern Control Engineering.
Question text not reproduced: the examination questions are © Engineers and Geoscientists BC. Open the official past paper (linked at the top of this page) to read the question, then follow the worked solution below.
Given.
| Quantity | Symbol | Value |
|---|---|---|
| Travel speed | $v$ | 50 km/h = 13.89 m/s |
| Warning threshold | $d_{\text{warn}}$ | 15 m |
| Auto-brake threshold | $d_{\text{auto}}$ | 10 m |
| Braking distance | $d_{\text{brake}}$ | 6 m |
| Safe (residual) distance | $d_{\text{safe}}$ | 1 m |
Find. (1) A state diagram covering both the stationary- and moving-object cases. (2) The real-time latency budget available to the sensor + decision unit + actuator chain. (3) A general formula relating that budget to initial speed and braking distance.
Approach. Model the system as a distance-threshold state machine (the same abstraction covers a stationary object and a slower-moving one, because both reduce to "closing distance falls below a threshold" — only the closing-speed value differs between the two cases); then derive the maximum end-to-end system latency as the time budget left over once the physically-required stopping distance and safety margin are subtracted from the auto-brake trigger range.
| Quantity | Value |
|---|---|
| Travel speed, $v$ | 13.89 m/s (50 km/h) |
| Manual-brake reaction window (Warning→Auto-Brake) | 0.36 s |
| Max. end-to-end system latency, $t_{\text{sys}}$ | 0.216 s ≈ 216 ms |
| General formula | $t_{\text{sys,max}}(v) = (d_{\text{auto}} - d_{\text{brake}}(v) - d_{\text{safe}})/v$ |