NivaarExam PrepOfficial exam papers ↗

19-Soft-A4 Real-Time Systems · May 2013

Question 2 of 6: Maximum Decision-Logic Delay Before Tank Spill-Over

Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)

Notes on this paper

National Exams — May 2013 — 04-Soft-A4 Real-Time Systems. Three-hour, closed-book exam (Casio or Sharp approved calculators only). Format: six questions of equal value (20% each); any five constitute a complete paper and only the first five as they appear in the answer book are marked. All six are solved below for completeness. Where a doubt exists as to interpretation, the candidate is expected to state assumptions — engineering assumptions used below are flagged in check callouts.

Reference texts: Jane W. S. Liu, Real-Time Systems (Prentice Hall, 2000) — task models, timing requirements, FCFS and EDF scheduling; Giorgio C. Buttazzo, Hard Real-Time Computing Systems: Predictable Scheduling Algorithms and Applications (Springer, 3rd ed.) — preemptive dynamic-priority scheduling and the optimality of EDF; Hermann Kopetz, Real-Time Systems: Design Principles for Distributed Embedded Applications (Springer, 2nd ed.) — distributed real-time control, network-induced delay and time-triggered protocols; Katsuhiko Ogata, Modern Control Engineering (Pearson, 5th ed.) — frequency-domain stability, phase margin and delay margin; Ian Sommerville, Software Engineering (Pearson, 10th ed.) — general software-engineering process context.

Question 2: Maximum Decision-Logic Delay Before Tank Spill-Over (20%)

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. Cylindrical tank, diameter $D = 1.0\ \text{m}$, height (rim / spill level) $H = 5.0\ \text{m}$; inlet flow rate $Q = 400\ \text{L/min}$; shut-off command is issued at level $h_{\text{shutoff}} = 4.9\ \text{m}$; the closed loop is over-damped (no overshoot in the level response).

QuantityValue
Diameter, $D$1.0 m
Rim / spill level, $H$5.0 m
Shut-off trigger level, $h_{\text{shutoff}}$4.9 m
Inlet flow rate, $Q$400 L/min

Find. The largest time delay the decision-logic function can take, between the shut-off level being reached and the valve actually closing, without the tank spilling over.

shut-off level h = 4.9 mtank rim / spill level H = 5.0 mD = 1.0 minlet, Q = 400 L/minLevel sensor-> Decision logicclose valveDecision logic must shut the inlet valve within the time it takesthe level to climb from the shut-off point to the rim.
Figure 1 — cylindrical tank: the safety margin between the shut-off level (4.9 m) and the rim (5.0 m) is the only buffer available to the decision logic before spill-over.

Approach. Because the loop is over-damped, the level rises monotonically with no overshoot, so the worst case is simply that the inlet keeps flowing at its full rated rate for the whole delay: the decision logic's response time is bounded by how long it takes to fill the remaining 0.1 m margin between the shut-off level and the rim, at the full inlet rate.

  1. Tank cross-sectional area. $$A = \frac{\pi D^2}{4} = \frac{\pi (1.0\ \text{m})^2}{4} = \boxed{0.7854\ \text{m}^2}.$$
  2. Remaining safety-margin volume. Between the shut-off level and the rim, the free volume that must not be exceeded is $$\Delta V = A \times (H - h_{\text{shutoff}}) = 0.7854\ \text{m}^2 \times 0.1\ \text{m} = 0.07854\ \text{m}^3 = \boxed{78.54\ \text{L}}.$$
  3. Inlet flow rate in consistent units. $$Q = \frac{400\ \text{L/min}}{60\ \text{s/min}} = 6.667\ \text{L/s}.$$
  4. Largest tolerable decision-logic delay. Over-damped, monotonic rise means the worst-case fill of the margin happens at the full inlet rate, so $$t_{\max} = \frac{\Delta V}{Q} = \frac{78.54\ \text{L}}{6.667\ \text{L/s}} = \boxed{11.78\ \text{s}}.$$ Substituting the shipped result back: $6.667 \times 11.78 = 78.5\ \text{L} \approx \Delta V$. ✓
QuantityResult
Tank cross-sectional area, $A$0.7854 m²
Safety-margin volume, $\Delta V$78.54 L (0.07854 m³)
Largest tolerable decision-logic delay, $t_{\max}$≈ 11.78 s