How it is built
Architecture overview
An elevator installation is a small real-time system with two very different jobs. The group controller decides which car serves which passenger call, trading waiting time against energy and car loading; a wrong decision only makes people wait. The car and drive controllers move a cabin along a shaft under a motion profile, open doors and stop at a floor within millimetres; a wrong decision here can hurt someone. The design splits these jobs on purpose: an optimiser that may be clever, slow to change and statistically tuned sits above a safety layer that is simple, redundant and certified, and the optimiser can only request what the safety layer allows.
The idea that makes it work is that the safety chain does not trust the controller. Whatever the software asks for, power to the machine and brake is cut when a door is open, a landing lock is not engaged, the car overspeeds or a final limit is crossed. The control software works inside that envelope. Remote monitoring (cloud connection of controllers, vibration and door counters, fault codes) sits outside it and only informs maintenance. Elevators and escalators in Europe are regulated through the EU Lifts Directive 2014/33/EU and the EN 81 standards (for example EN 81-20 for passenger lifts; Wikipedia, Elevator).
Parts:
- Group dispatch — assign calls to cars, from hall calls or destination entries — Assignment problem (Hungarian / Jonker–Volgenant), Mixed-integer programming (branch and bound), simulated-annealing (no page yet), local-search-2opt-or-opt (no page yet), genetic-algorithms (no page yet), Top-k selection, d-ary heap
- Traffic model and tuning — predict traffic patterns, size the group, test policies — Time-series forecasting (baselines, model families, backtests), Exponential smoothing (ETS, Holt-Winters), STL decomposition (seasonal-trend with loess), Time-series cross-validation (rolling origin), croston-method (no page yet), queueing-theory (no page yet), discrete-event-simulation (no page yet), Monte Carlo integration, PRNGs (PCG, xoshiro)
- Car motion and drive — move the car smoothly to a stop — velocity-motion-profiles (no page yet), input-shaping (no page yet), field-oriented-control (no page yet), PID controller, PWM generation, Fixed-rate control loop, Phase-locked loop (digital), IIR and FIR filters, biquad-filters (no page yet), Kalman filter, Explicit Euler
- Car and floor logic — doors, call buttons, levelling, operating modes — Hierarchical state machine, Statecharts, Process supervision
- Safety layer — independent monitoring and the EN 81 safety chain — safety-monitor-architecture (no page yet), redundancy-voting (no page yet), end-to-end-protection-e2e (no page yet), Watchdog timer, Memory protection unit, Safety-critical coding standards, Code coverage instrumentation, CRC32C checksums
- Real-time bus and scheduling — move commands, calls and states between boards — real-time-fieldbus (no page yet), time-triggered-scheduling (no page yet), dma-transfers (no page yet)
- Remote monitoring and updates — connect controllers, find faults early, ship firmware — mqtt-protocol (no page yet), Mutual TLS, Signed update metadata (TUF), Digital signatures (Ed25519), key-rotation (no page yet), Secrets management, remaining-useful-life-estimation (no page yet), vibration-spectral-analysis (no page yet), Fast Fourier transform, Short-time Fourier transform and spectrogram, peak-detection (no page yet), Time-series anomaly detection, Isolation forest, Robust statistics, hdr-histogram (no page yet), Health checking
- Backend and test — fleet state, durability, safe changes — Write-ahead log, Primary-backup replication, Point-in-time recovery, Leases, Deterministic simulation testing, fault-injection (no page yet), Graceful draining, Coverage-guided fuzzing
hall / destination panels ──► group controller ──car assignment──► car controllers ──► drive (profile, FOC, PWM)
▲ (optimiser, traffic mode) │ ▲ │
│ ▲ │ │ encoder ▼
displays traffic forecast doors, levelling motor + brake
│
┌───────────────────────── safety chain (series contacts) ───────────┴──► cut motor power and drop brake
│ door/landing locks · governor · final limits · safety monitor (independent channel)
└─ cannot be overridden by any block above
car controllers ── MQTT over mutual TLS ──► fleet backend (faults, vibration, door counts) ──► service tickets
How the parts fit together
Group dispatch
Calls arrive as hall calls (up or down at a floor) or, in destination dispatch, as a destination typed on a keypad, a touch screen or read from a card. In destination dispatch, passengers heading to the same floors are grouped into the same cars, which cuts waiting and travel time compared with ordinary up/down buttons (Wikipedia, Destination dispatch). The controller assigns each new call to one car and tells the passenger which car to take, so the assignment is a commitment. That is a different problem from a taxi dispatcher: it must be decided in milliseconds, it cannot be revised cheaply once displayed, and it must handle a car that fails after it was assigned.
The usual structure is: build a candidate list (each car, with its current direction, stops and load), cost each candidate by estimated waiting time, estimated journey time and the effect on calls already assigned, and pick the lowest. The cost model is the policy. It is typically tuned per traffic mode (up-peak, down-peak, lunch, off-peak) from simulation.
Optimisers fit at three levels of effort. A cheap online rule scans cars and picks the minimum with a Top-k selection or small d-ary heap. When several calls arrive at once, or a whole batch is re-planned, the matching of calls to cars is an assignment problem solved exactly in O(n³). When side constraints dominate (zoning, VIP priority, capacity, energy), mixed-integer programming states the full problem; in practice that is too slow for the online path and is used offline to evaluate how far a heuristic is from optimal. Metaheuristics (simulated-annealing, local-search-2opt-or-opt, genetic-algorithms; no pages yet) tune policy parameters or search the stop sequences offline. Reinforcement learning has also been tried: Crites and Barto trained multiple learning agents on a simulated group controller (Machine Learning, 1998). Learned dispatchers are mainly research results; a deployed policy has to be one a service engineer can reason about.
Traffic model and tuning
Buildings have strongly periodic traffic: arrivals in the morning, the lunch exchange, departures in the evening. The controller keeps a running traffic estimate per floor and period and switches mode when the pattern changes. Exponential smoothing is a cheap online estimator with O(1) state; STL decomposition separates the weekly and daily seasonal shape offline. Sparse flows, such as a rarely used basement floor, are intermittent demand (croston-method, no page yet). Time-series cross-validation is the honest test: train on the past weeks, score the next week. Capacity planning at design time uses the up-peak calculation that assumes all passengers come from the ground floor (Wikipedia, Elevator), and queueing-theory (no page yet) gives the first sizing estimate: Little's law links queue length, arrival rate and waiting time. A full design check runs a discrete-event simulation (no page yet) with sampled passenger arrivals (Monte Carlo integration with a seeded PRNG); a seeded run is reproducible, so two dispatch policies can be compared on the identical passenger stream.
Car motion and drive
The group controller says "go to floor 12"; the car controller turns that into a velocity profile: accelerate, cruise, decelerate and stop at the landing, with limited acceleration and limited jerk (the S-curve) because jerk is what a passenger feels (velocity-motion-profiles, no page yet). The profile is a reference, played out at a fixed period by a Fixed-rate control loop that must not drift. A PID controller closes the speed and position loops; inside it the drive runs current control on the motor (field-oriented-control, no page yet) by PWM switching. The encoder or tape signal passes IIR and FIR filters (biquad sections, no page yet) before the loops use it, and a Kalman filter can fuse the encoder with an accelerometer for a smoother speed estimate. Long ropes make the car a spring: input-shaping (no page yet) shapes the command so it does not excite the cabin's resonance. For simulation of the drive and the rope, Explicit Euler is the first integrator; stiff rope models need a smaller step. A Phase-locked loop (digital) appears where the drive tracks an encoder's sinusoidal channels.
Car and floor logic
Doors, buttons, lamps, levelling and operating modes (normal, independent service, fire recall, inspection) are a state machine with many modes that share reactions: a "stop" event means the same in every substate. A Hierarchical state machine and Statecharts keep that logic readable and testable, and they make illegal transitions (moving with doors open) visible in the model. On a networked controller, a Process supervision tree restarts crashed non-safety tasks (display, logging, the remote agent) without touching the drive.
Safety layer
Safety is layered and mostly not software. Traction lifts carry a mechanical overspeed governor that triggers safety gear on the guide rails if the car overspeeds (Wikipedia, Elevator), and the usual electrical safeguard is a chain of series contacts (door and landing locks, final limits) that opens the supply to the machine and brake; the EN 81 series sets the requirements. On top of this, modern controllers add electronic safety functions that are developed to a functional-safety standard. The common pattern is safety-monitor-architecture (no page yet): an independent channel (a doer and a checker) that watches speed, position and door state and forces a safe state on disagreement. Watchdog timer catches a hung processor, redundancy-voting (no page yet) compares two or three channels, a Memory protection unit isolates tasks on the safety microcontroller, and end-to-end-protection-e2e (no page yet) adds counters and checksums (CRC32C checksums or a safety-class CRC) so the receiver detects loss, repetition and corruption over a shared bus. Safety-critical coding standards fix the language subset and review rules, and Code coverage instrumentation provides the evidence that tests reached every branch.
Real-time bus
Between boards the traffic is small but must be deterministic: calls, car states, door commands, drive references. Lift controllers use CAN-based buses such as CANopen (it has a lift community and application profile; Wikipedia, CANopen) and, in motion systems, EtherCAT-style fieldbuses (real-time-fieldbus, no page yet). A time-triggered schedule (time-triggered-scheduling, no page yet) assigns each message a slot so worst-case latency is a design-time number, and dma-transfers (no page yet) move sensor samples without CPU load.
Remote monitoring and updates
The controller reports counters and fault codes to a fleet backend using a publish/subscribe protocol (mqtt-protocol, no page yet) over Mutual TLS, so each controller is an authenticated client. Condition monitoring turns vibration and door-motor current into health signals: vibration-spectral-analysis (no page yet) uses the Fast Fourier transform and the Short-time Fourier transform and spectrogram, with peak-detection (no page yet) for events such as a door-lock impact. A Time-series anomaly detection layer (Robust statistics for the baseline, an Isolation forest for multivariate outliers) flags a car whose door cycle time drifts; remaining-useful-life-estimation (no page yet) turns drift into "replace the belt within N weeks". Latency of door cycles is summarised with an hdr-histogram (no page yet). Firmware reaches the field through Signed update metadata (TUF): roles with thresholds sign small metadata that pins file hashes, so a compromised server alone cannot push firmware, and Digital signatures (Ed25519) plus key-rotation (no page yet) and Secrets management keep the keys safe. Updates never touch the safety channel without a re-certification step; that is a process rule, not a technical one.
Backend and test
The fleet backend stores fault events and counters on a Write-ahead log with Primary-backup replication and Point-in-time recovery; Leases protect single-writer jobs such as alert delivery. The product is tested in simulation: Deterministic simulation testing runs the group controller, car controllers and bus under a seeded scheduler, so a failure found once can be replayed exactly; fault-injection (no page yet) drops bus messages, stalls a car and kills a task. Health checking decides when a controller counts as offline.
The ingest servers that receive fault events from many controllers use Graceful draining on deploy: they stop accepting new connections, finish the events in flight, and tell controllers to reconnect to another server, which controllers do from their local buffer without losing a record. Coverage-guided fuzzing targets what arrives from outside the car: bus frames, remote-monitoring messages and service-tool commands, with the parsers built so that a malformed message cannot reach the safety chain.
Data and control flow
One passenger trip (destination dispatch):
- The passenger enters floor 12 at a lobby terminal; the terminal sends the destination and origin to the group controller.
- The controller costs each candidate car (position, committed stops, load) and picks one; the terminal shows "car C". Order of milliseconds.
- The car controller adds the lobby stop and the floor-12 stop to its plan and re-plans the stop order.
- At the lobby the door state machine opens, waits for a clear door sensor, and closes; the safety chain must be closed before the drive may move.
- The drive follows the velocity profile; the control loop runs at a fixed period, the safety monitor checks speed against the permitted curve for the remaining distance.
- Levelling brings the car to the floor within tolerance; doors open; the plan advances.
One condition-monitoring cycle:
- The controller samples door-motor current and car vibration around each run.
- It reduces them on the edge: FFT peaks, cycle times, counts.
- Summaries are published over MQTT with mutual TLS; the backend appends them to the log.
- A scheduled job compares each car to its own robust baseline and to similar cars; outliers become service tickets.
Scaling
- Dispatch decision time: a group with many cars and a burst of calls. Levers: incremental costing (only the changed car), a cheap rule online, exact assignment only for batches, precomputed zone tables.
- Traffic quality: a bad traffic model gives bad mode switches. Levers: more history per building, seasonal decomposition, a larger simulation set before release.
- Motion quality: ride comfort is bounded by the profile and the rope resonance, not by compute. Levers: jerk limits, input shaping, a better position sensor.
- Safety certification effort: every change in the safety path costs a re-assessment. Lever: keep the safety function small, independent and rarely changed; put all new features in the non-safety side.
- Fleet size: millions of controllers produce a steady stream of small messages. Levers: summarise on the edge, publish deltas, batch per site, shard the backend by site.
- Test cost: a physical test needs a shaft. Lever: deterministic simulation with recorded traffic.
Failure modes
| Failure | Symptom | Cause | Fix |
|---|---|---|---|
| Bunching | two cars arrive together, a third never | cost ignores other cars' assignments | count committed stops in the cost; add a spacing term |
| Wrong mode in the morning | long queues at the lobby at 8:55 | traffic mode switch lags the real pattern | forecast the period ahead, not just the last minutes |
| Car lost after assignment | passenger waits at a car that never comes | commitment shown but the car went out of service | re-assign on car fault and update the display |
| Jerky stop | passengers feel a bump at the floor | jerk not limited, or loop period jittering | S-curve profile, absolute-deadline control loop |
| Rope oscillation | cabin bobs after stopping | command excites a resonance | input shaping, filter tuned to rope length |
| Door nuisance trips | car stuck with doors cycling | sensor noise, no debounce | filtering and a retry state in the door machine |
| Safety channel false trip | car stops between floors | speed measure noisy near the limit curve | filter with margin, redundant sensors, vote |
| Missed corrupt message | wrong command accepted over the bus | no counter or checksum on a safety message | end-to-end protection with counter and CRC |
| Update bricks the fleet | many controllers offline after a rollout | single signer, no staged rollout | threshold-signed metadata, canary groups, rollback |
| False maintenance alarms | tickets for healthy cars | baseline polluted by outliers or seasonal drift | robust baselines, seasonal decomposition, per-car thresholds |
Real implementations
| name | what it is | repo | licence | notes |
|---|---|---|---|---|
| CANopenNode | open CANopen stack in C for embedded targets | CANopenNode/CANopenNode | Apache-2.0 | CANopen has a lift community and application profile; this is the generic stack |
| SOEM | open EtherCAT master | OpenEtherCATsociety/SOEM | — | real-time fieldbus master for motion |
| Eclipse Mosquitto | open MQTT broker | eclipse-mosquitto/mosquitto | — | remote-monitoring transport |
The commercial group controllers (KONE, Otis, Schindler, TK Elevator) are closed. I know of no open-source group controller at industrial level; the open pieces are the buses and brokers. Small research simulators on GitHub are not production systems and are not listed here.
Sources
- Crites, R. H. and Barto, A. G., Elevator Group Control Using Multiple Reinforcement Learning Agents, Machine Learning 33, 1998. DOI
- Wikipedia, Elevator: governor and safety gear, EN 81 standards, up-peak calculation, simulation of lift traffic. page
- Wikipedia, Destination dispatch: origin, grouping of passengers by destination. page
- EU Directive 2014/33/EU on lifts and safety components for lifts.
- Trajectory Planning for Automatic Machines and Robots, Springer, 2009: textbook on trajectory profiles. DOI
- Wikipedia, CANopen: lift community. page
- OASIS, MQTT Version 5.0. spec
- EtherCAT Technology Group, technology overview. page