Lite / Textbooks / Engineering Design and Optimization / Chapter 5
5. System architecture and budgets
Introduction
Before the details comes the architecture: which blocks exist, what flows between them and what each promises. This chapter draws systems as blocks with labelled interfaces, compares centralised and distributed designs, and allocates the scarce resources (time, power, mass and data) as budgets with margins. A budget turns 'it should be fast enough' into a number that each block owner must meet.
Figure 5.1. A latency budget (described in words)
A stacked bar of a robot's reaction time: sense 10 ms, process 25 ms, plan 15 ms, act 20 ms and link 5 ms make 75 ms against a 100 ms budget, a 25 % margin. At 1.5 m/s the robot travels 0.1125 m before it reacts.
Explanation
Built from 4 School lessons. Each part is the lesson's own explanation.
5.1 Blocks, arrows and promises
A warehouse robot has eight boxes on its diagram and twenty arrows between them. Which do engineers argue about more: the boxes or the arrows?
Subsystems and layers
A mobile robot's software and hardware fall into layers: sensing (encoders, cameras, IMU), perception and estimation (turning raw readings into 'I am here, a box is there'), planning (choosing what to do next), control (making motors follow the plan) and actuation (drivers and motors). Power runs underneath everything.
Data paths and power paths
In a block diagram, data arrows carry information (a pose, a speed command) and power arrows carry energy (battery to motor driver). Draw them differently, for example solid and dashed. A fault on a power path can take out several data paths at once, which is why engineers look for single points of failure there.
Every arrow is a promise
Label each arrow with its interface: the signal's name, unit, coordinate frame and rate. 'Pose' is vague; 'pose of the robot in the map frame, metres and radians, 50 Hz' is a promise the receiving team can build on and test against.
Common mix-ups
If every subsystem passes its own tests, the robot will work.
✓ Subsystem tests check each box against its own assumptions; the interfaces between boxes need their own tests.A block diagram is a picture of the hardware layout.
✓ It shows function and signal flow, not physical position. Two blocks can run on the same chip.
Open the Lite lesson: Blocks, arrows and promises
5.2 One brain or many?
Should a robot run everything on one powerful computer, or spread the work across several small ones? Both answers ship in real products.
Centralised
One computer runs perception, planning and control. Pros: one place for all data, simpler software, easy to debug. Cons: one busy processor must also meet fast loop deadlines, and if it crashes, everything stops.
Distributed
Small processors near each motor or sensor run fast local loops, and a main computer coordinates them over a bus. Pros: fast, predictable local loops and less wiring. Cons: more interfaces, bus delays and clock synchronisation to manage. A failure can be contained to one node, if the design plans for it.
Decide with criteria, not taste
List criteria (cost, latency, reliability, power, development time), weight them for this robot's users, score each option and check whether any option is dominated. Then record the decision and what you gave up, so the next engineer knows it was a choice, not an accident.
Common mix-ups
There is one correct robot architecture.
✓ The best architecture depends on the robot's users, budget and risks; record the criteria behind your choice.
Open the Lite lesson: One brain or many?
5.3 The latency budget
At 1.5 m/s, a robot covers 9 cm in 60 ms. That is how far it travels after seeing an obstacle and before it even starts to brake.
Latencies in series add
Sense-to-act latency is the sum of every stage: sensor exposure and readout, transfer, processing, planning, communication to the motor controller, and the actuator's own response. Slack = deadline − total. Negative slack means the robot cannot meet its reaction requirement.
Latency is distance
Distance travelled before reacting = speed × latency. At 1.5 m/s, 60 ms is 9 cm. A safety requirement such as 'stop within 30 cm of an obstacle' therefore limits speed, latency or both, and braking distance comes on top.
Jitter and margin
Real stages do not take the same time every cycle; some frames take much longer. Budget with worst-case or high-percentile timings and keep a margin, and timestamp data so a late result can be recognised rather than trusted.
Common mix-ups
Making the fastest stage even faster is a good use of effort.
✓ Savings come from the largest stages; a 2 ms stage can save at most 2 ms.
Open the Lite lesson: The latency budget
5.4 Power, mass and data budgets with margins
Every subsystem team swears its estimate is right. Why does the mission still keep 20% in reserve?
Anatomy of a budget
List every consumer with its current best estimate (CBE): avionics 18 W, mobility 30 W, heaters 22 W… Sum them. Add contingency to reflect immaturity: perhaps 25–30% for a new design, 10% for something already built and measured. Compare with the capability (power available, mass allocation, bits per day). Policy usually demands a further margin in reserve.
Margin, the honest way
Margin = (capability − estimate with contingency)/(estimate with contingency). It is the engineering team's insurance against surprises: an instrument that turns out heavier, a colder-than-expected winter, a degraded solar array. Margins are tracked over time; a margin that shrinks every month is a warning sign even while it is positive.
Duty cycles and averages
Power budgets use averages over the cycle that matters (a sol, an orbit) plus a check on peaks. A 60 W radio on 20% of the time averages 12 W, but the battery and wiring must still deliver 60 W while it transmits. Energy budgets (Wh per sol) decide whether the battery survives the night.
When the budget breaks
Options, roughly in order of preference: reduce demand (duty-cycle the heaters, compress data), reallocate between subsystems, improve capability (bigger array, faster link), or descope requirements. Each has a cost elsewhere: a bigger array is more mass. Budgets are coupled, which is why one person keeps them all.
Common mix-ups
A positive margin means the budget is fine.
✓ The margin must meet the project's policy and stay stable over time; a shrinking margin is an early warning.Each subsystem can optimise its own budget line.
✓ Budgets are coupled: more power capability adds mass. One systems engineer balances them together.
Open the Lite lesson: Power, mass and data budgets with margins
Worked examples
Blocks, arrows and promises: example 1
Write a full interface label for the arrow from the wheel encoders to the wheel speed controller.
Solution
'Wheel speed, left and right, in rad/s, measured at the wheel, published at 1 kHz with a timestamp.' It names the signal, the unit, where it is measured (its frame), the rate and the timing information.
One brain or many?: example 1
A school robot must cost under 60 pounds and be easy for beginners to debug. Centralised or distributed?
Solution
Centralised: one cheap board, one program to read, no bus to configure. Loop timing is manageable because the robot is slow. The trade: if that board resets, the robot stops, which is acceptable for a classroom.
The latency budget: example 1
Stages 12, 25, 5, 2, 6 ms; deadline 50 ms; speed 2 m/s. Find slack and reaction distance.
Solution
Total = 50 ms, slack = 0 ms (just in budget, no margin). Distance = 2 × 0.05 = 0.1 m = 10 cm.
Power, mass and data budgets with margins: example 1
Loads: 18, 30, 22, 15, 12 W. Contingency 20%. Supply 110 W. Margin?
Solution
Sum 97 W. With contingency 116.4 W. Margin = (110 − 116.4)/116.4 = −5.5%: over budget. Cut heaters by duty-cycling, or grow the supply to about 128 W for a 10% margin.
Interactive figures, in words
Figure 5.2 from Blocks, arrows and promises
Place each block of the warehouse robot in its layer and give it an update rate. Before you check, predict: which blocks run fastest, and why are they the ones closest to the motors?
The architecture builder can be done as a table: wheel encoders, sensing, 1 kHz; camera, sensing, 10 Hz; state estimator, estimation, 100 Hz; object detector, estimation, 10 Hz; mission planner, planning, 1 Hz; wheel speed PID, control, 1 kHz; motor driver, actuation, not a loop; battery, power, not a loop.
Figure 5.3 from The latency budget
Start with the default stages and a 60 ms deadline. Raise the robot's speed and watch the reaction distance. Then set the deadline to 40 ms and get back within budget by changing as few stages as possible.
The latency-budget lab shows five stages as a stacked bar against a dashed deadline line. Default stages add to 66 milliseconds, over a 60 millisecond deadline; at 1.5 metres per second that is about 10 centimetres travelled before reacting.
Figure 5.4 from Power, mass and data budgets with margins
On Power, set 20% contingency and find the smallest power supply with a healthy margin. Raise the heaters to 40 W (a cold-season night): what must give? On Mass, find the largest science payload that keeps a healthy margin within 400 kg. On Data, find a link setup that keeps up with 600 Mbit per sol.
The planner has tabs for power, mass, data, delta-v and light-time. In each, subsystem estimates are summed, contingency is applied, and the margin against capability is shown with a status word: healthy, below policy or over budget. For example, power loads summing to 97 W with 20% contingency need 116.4 W, so a 110 W supply is 5.5% over budget.
Laboratory
These run in a browser on the full site (they need a faster connection). Simulations are simplified educational models.
- Simulation OS: Battery sensor node (Simulation OS experiment)
Build a power budget for the node, add a 20 % margin, and find the reporting interval that still meets a one-year battery life.
Open on the full site - Nexus: Smart junction (Nexus project)
Sketch the junction controller's architecture as blocks and interfaces, and give each interface a data rate and a timing promise.
Open on the full site
Practice
Each question links to its Lite lesson, where your answer is checked on our server and a wrong answer gets a hint. Answers are never sent to your device.
- Why draw power paths differently from data paths?
Answer it in “Blocks, arrows and promises” - In a robot where one 5 V regulator feeds the computer, the camera and the lidar, what is the regulator?
Answer it in “Blocks, arrows and promises” - Which is a typical advantage of a distributed architecture?
Answer it in “One brain or many?” - Why write down what an architecture decision traded away?
Answer it in “One brain or many?” - You must cut 10 ms. Stages: camera 16, vision 30, plan 8, bus 2, motor 10. Where do you look first?
Answer it in “The latency budget” - Why budget with worst-case timings rather than averages?
Answer it in “The latency budget” - A radio draws 60 W while transmitting, 20% of the time. The average power budget shows 12 W. What else must you check?
Answer it in “Power, mass and data budgets with margins” - Why is contingency larger for a brand-new instrument than for one that has flown before?
Answer it in “Power, mass and data budgets with margins”
Engineering applications
Spacecraft design
Spacecraft carry mass, power and data budgets from the first sketch, with larger contingencies on new instruments. Each subsystem team owns a line in the budget and reports against it.
Interactive products
A game controller must respond within a latency budget players will not notice. Engineers allocate milliseconds to sensing, radio, processing and display, then measure each stage.
Watch (optional)
Streaming video uses a lot of data. Everything you need is in the text.
- “How Engineering Robots Works: Crash Course Engineering #33” by CrashCourse
- “Build a tower, build a team | Tom Wujec” by TED
Summary
- An architecture is blocks, interfaces and the promises each interface makes.
- Power paths, data paths and single points of failure should be visible on the diagram.
- Centralised designs are simpler; distributed ones can be more robust and faster locally, at the cost of integration.
- Budgets allocate time, power, mass and data with margins; use worst cases, and size contingency to novelty.
Glossary
- Block diagram
- A block diagram shows a system as labelled boxes connected by arrows, each arrow naming what flows between them: power, a signal, data or a force. Field Guide
- Battery capacity and runtime
- A battery's capacity in ampere-hours says how long it can supply a current; multiplied by its voltage it gives stored energy in watt-hours. Field Guide
- Electrical power
- The power transferred in a component is the voltage across it multiplied by the current through it. For a resistor this can also be written I²R or V²/R. Field Guide
- Payload
- Payload is the mass a robot can carry or manipulate while still meeting its specifications for speed, accuracy and lifetime. Field Guide
Project: Budget a delivery robot
Draw the architecture of a small indoor delivery robot. Build its latency budget for stopping at an obstacle, its power budget for a four-hour shift and its mass budget, each with a stated margin. Identify the tightest budget and one design change to relieve it.
Deliverables
- An architecture diagram with interfaces
- Three budgets with margins
- The tightest budget and the proposed change
Write it up on paper or in your own notes. Lite never stores what you write.
References
- Gerhard Pahl et al. (2007). Engineering Design: A Systematic Approach, 3rd edition. Springer.
- Panos Y. Papalambros and Douglass J. Wilde (2017). Principles of Optimal Design: Modeling and Computation, 3rd edition. Cambridge University Press.