Topic 6 · Control Systems (HL)
Computer Science · Topic Cheatsheet

Topic 6 · Control Systems (HL)

30 key results accumulated across 3 chapters.

Control system
Ch 1
Uses input commands to MANAGE the behaviour of another (usually physical) system.
Open loop
Ch 1
Runs a fixed action; NO feedback. Simple, cheap, BRITTLE. Toaster timer, microwave, traffic lights.
Closed loop
Ch 1
Sensor measures output → controller compares to target → adjusts. Self-correcting. Thermostat, cruise control.
4 parts (closed-loop)
Ch 1
SENSORCONTROLLERACTUATORPROCESS → (back to sensor). MEMORISE IN ORDER.
Setpoint
Ch 1
The TARGET value (e.g. 20°C on thermostat). Error = setpoint − measured.
When open-loop is right
Ch 1
Predictable system + small disturbances + low cost of error + sensors too expensive.
When closed-loop is required
Ch 1
Disturbances common + accuracy matters + stakes high (flight, medical, vehicle).
Sensor
Ch 2
Converts physical quantity → electrical voltage. Thermistor, photoresistor, accelerometer, mic.
ADC
Ch 2
Analog-to-Digital Converter. SAMPLES voltage at fixed rate; outputs integers (10-bit = 0-1023).
Sample rate + resolution
Ch 2
Hz + bits. Higher = more precise but more cost + CPU.
Actuator
Ch 2
Converts signal → physical action. Motor, servo, valve, heater, LED, speaker.
DAC
Ch 2
Digital-to-Analog Converter. Integer → voltage. Often replaced by PWM (fast on/off, average = duty cycle).
Negative feedback
Ch 2
Output PULLED BACK toward target. Stabilising. Used in 99% of control systems.
Positive feedback
Ch 2
Output AMPLIFIED away from current state. Microphone squeal, fire alarm chain. Rare and dangerous if unbounded.
Lag
Ch 2
Intrinsic DELAY between command and physical response. Cannot be removed — only ANTICIPATED.
Overshoot
Ch 2
Output PASSES the target before settling. Caused by lag + naïve control. PID minimises it.
PID
Ch 2
Proportional (current error) + Integral (accumulated error) + Derivative (rate of change). Industry workhorse.
P role
Ch 2
Drives correction proportional to current error magnitude.
I role
Ch 2
Removes steady-state offset (system stuck slightly below target).
D role
Ch 2
Damps approach — slows correction as target is neared → less overshoot.
Embedded system
Ch 3
Computer built INTO a larger device, doing ONE job. Constrained memory + power, often real-time, no reboots.
vs general-purpose
Ch 3
GP = many user programs, full OS, abundant resources. Embedded = fixed firmware, often bare-metal or RTOS.
Hard real-time
Ch 3
Missing the deadline = FAILURE. Airbag (30 ms), pacemaker, ABS, industrial robotics.
Soft real-time
Ch 3
Late = degraded, not catastrophic. Video frame drop, audio jitter, online gaming.
Main loop
Ch 3
1) SENSE (read ADC/GPIO) → 2) DECIDE → 3) ACTUATE → 4) SLEEP → repeat FOREVER. No exit condition.
Interrupts in embedded
Ch 3
Handle urgent events that cannot wait for next loop iteration (button, packet, overcurrent).
Why no Python
Ch 3
GC + dynamic types + megabyte RAM = incompatible with tiny KB-RAM hard-real-time microcontrollers. C dominates.
RTOS
Ch 3
Real-Time Operating System (FreeRTOS, Zephyr). Tiny + predictable + priority scheduling. Common in serious embedded.
WCET
Ch 3
Worst-Case Execution Time analysis. Required for hard-real-time to prove deadline is met under ALL conditions.
Examples
Ch 3
Pacemaker · car ECUs (~50/car) · drone flight controller · microwave · smart thermostat · 3D printer.