Generative design ◆ Topology optimisation ◆ Self-balancing robot ◆ University of Toronto ◆ SPIE ACAIB 2022
Let the algorithm carve the chassis, then see what the controller gets out of it. A reaction-wheel unicycle whose seven printed brackets were grown by Fusion 360's generative design, and a Simulink comparison of the generative and the conventional chassis under the same PID loops. Below: the two robots as an interactive 3-D twin you can push and re-tune, topology optimisation running in your browser, the paper's pipeline step by step, and a full re-run of the comparison with the sweeps the paper did not have room for.
Teaser (15 s): a bracket carved by topology optimisation, then the two chassis released from a 5° tilt with the same gain set, scaled to the edge of the conventional chassis' margin. The 72-second explainer is further down.

Each part gets a free-body diagram, preserved joints (green), forbidden regions (red) and a material list. The generative study subtracts material until only load paths are left, and the designer picks a solution on a mass against safety-factor chart.

Generated parts are mirrored so they are stiff in all four bending directions, merged into one body, and checked in Inventor: safety factor above 15 everywhere under the loads of step 1. Then it is printed as a single piece.

Pitch and travel are an inverted pendulum on the drive wheel; roll is a reaction-wheel pendulum. Three PID loops with one fixed gain set drive both chassis from a 5° tilt: the lighter, higher generative body settles in 0.69 s, the conventional one wanders for 19 s.
One drive wheel for pitch and travel, an aluminium reaction wheel on top for roll, three battery cells and the boards in between. The generative chassis carries them on lattice brackets; the conventional one on solid plates, assumed twice as heavy and with its centre of mass 3 cm lower, the two things the paper says about it. Both run the same three PID loops in your browser at 1 kHz. Push them, drop them from a tilt, scale the gains, add loop delay, and read the traces.
Red is the generative chassis, blue the conventional. The gold band is the paper's 5 % settling band (0.25° of a 5° release). Motors are a 12 V geared brushed motor on the drive wheel and a direct-drive motor on the reaction wheel, both voltage-limited; the recoverable tilt (about 11°) is the reaction-wheel motor's stall torque, the same on both chassis.
Try the presets: with the paper's gains both balance (0.70 s vs 0.74 s). At ×1.5 the generative chassis still settles in 0.67 s while the conventional one chatters at the voltage limit for the whole run. With 35 ms of loop delay the generative chassis holds and the conventional one wanders half a metre.

The printed prototype (13 s, phone clip): reaction wheel, drive wheel, an Arduino and driver boards on a printed body, balancing on a tile floor. The paper's outlook was to print the two bodies in Nylon and close the comparison on hardware.
Generative design here means: tell the software where the loads go, what must stay, what must stay empty, which materials and processes are allowed, and let it grow candidate shapes; then choose among them. The paper walks the unicycle body through five steps.

A simple reference model is split into seven parts by loading condition and each gets a free-body diagram from the masses of Table 1: reaction wheel and motor, drive motor, batteries, boards. Design safety factor 2.

In the Fusion 360 Generative Design workspace: green is preserved (joints, grounds), red is an obstacle where nothing may grow, yellow is an optional starting shape that saves cloud time. Grey is the conventional part for reference.

No manufacturing constraint, so the studies range freely; Nylon, ABS, acrylic, resin, aluminium and titanium are allowed. The budget allowed Nylon SLS printing, so Nylon outcomes are what gets picked.

The cloud computes the outcomes; a safety factor against mass chart shows them by material, with a recommended one. The final part is the Nylon outcome nearest the recommendation.

Moment analysis was one-sided, so parts are mirrored twice for stiffness in all four bending directions, merged into one body, checked in Inventor (safety factor above 15) and printed in one piece.

What the software is doing underneath. Fusion 360's generative design is a cloud service, but for a bracket under a static load its core is the classic problem of topology optimisation: distribute a fixed amount of material in a domain so that the part is as stiff as possible under the load, with preserved and forbidden regions as constraints. The playground below runs the textbook version of that algorithm (SIMP: penalised densities, a density filter, an optimality-criteria update) on the paper's three main brackets, in your browser, so you can watch the material subtraction of Fig. 3 happen and move the loads yourself.
The three time-lapses are the same algorithm run offline on finer grids, with a stress check afterwards: von Mises stress on the final layout under the design load, and the safety factor against Nylon's yield, so a mass against safety-factor chart like the paper's Fig. 5 falls out of the volume-fraction sweep.
Fixed plane at the bottom, 10 N down from the top plate, 5 N sideways each way. 70 iterations; mass −70 %, safety factor 45 against 46 for the solid plate.
The bearing seat carries the wheel's weight, the motor torque as a couple and a sideways load. Mass −72 % at a safety factor above 100.
Both ends fixed, the motor in the middle, batteries either side, a bearing pull below: the plate becomes an arch and a V, the paper's slender cross seen from the side. Mass −68 %.
Pick one of the paper's brackets or a classic case, press Run, and watch the material go where the load paths are. Paint preserved regions (they stay solid, like the green joints in Fig. 2) and obstacles (nothing grows there, the red boxes), or move the load. Lower the target volume and read off the mass and the safety factor; the compliance curve shows the optimiser converging. Plane-stress finite elements, SIMP with penalty 3, solved matrix-free by conjugate gradients, all in JavaScript.
fixed nodes loads (arrows, N) preserved obstacle ink = material. Element size 1.7 mm for the paper's parts; plate thickness 6 mm; Nylon PA12, yield 48 MPa. The safety factor is the yield stress over the largest von Mises stress on solid elements, a stress post-check on a stiffness-optimised layout, as in the paper's step 5.
The paper's Fig. 5, re-made. For each bracket the target volume is swept from 15 % to solid. Above about 30 % fill the safety factor stops improving: the extra material sits off the load paths. That knee is where generative design earns its mass saving, and it is where the paper's chosen outcomes sit.

The paper splits the robot the way every reaction-wheel unicycle is split: pitch and travel are a wheeled inverted pendulum driven by the bottom wheel, and roll is a reaction-wheel pendulum pivoting about the ground contact line. With the generalised coordinates q = (θ₂, ϕ, θ₁, φ) of Eq. (3.1), reaction-wheel angle, roll, drive-wheel angle, pitch, and the Lagrangian L = E − U of Eqs. (3.3)–(3.5), the Euler–Lagrange equations give the motion; the paper's Eqs. (3.6)–(3.9) are those with the DC-motor torques substituted.
The re-run keeps the wheel/body coupling terms of the pitch subsystem (m l cos φ on both rows), which the paper's Eq. (3.8)–(3.9) drop; their small-angle, uncoupled form is the special case. Three PID loops close the system exactly as in Fig. 10: roll on the reaction-wheel motor, pitch and translation summed onto the drive motor, with one gain set for both chassis. The re-run adds a small reaction-wheel speed term to the roll loop (the standard fix for wheel-speed drift) and drops the roll integrator; the pitch loop keeps its integrator with anti-windup.
Why the chassis matters to the controller. Linearised about upright, the pitch subsystem has one unstable pole at roughly √(g / leff): the higher the centre of mass, the slower the fall. A lighter body also needs less torque per radian of lean (m g l). Generative design moved the chassis from 820 g with the centre of mass 12 cm above the axle to 650 g at 15 cm: from a 9.0 /s pole to a 7.8 /s one, at nearly the same m g l. That is the whole physical effect the sweeps below quantify.




The paper's Simulink/Simscape model and the Fusion 360 files are not available, so the comparison is re-run with the equations above, the component masses of Table 1, and estimates for what the paper does not give (wheel radius, inertias, motor constants, the conventional body's mass), all stated in the report. Same protocol: both chassis released from 5° pitch and 5° roll, one PID set, settling time in the paper's 5 % band, the top-point excursion, and the electrical power of the two motors.
| metric | generative, paper | conventional, paper | generative, re-run | conventional, re-run | generative, ×1.5 gains | conventional, ×1.5 gains |
|---|---|---|---|---|---|---|
| pitch settling time, 5 % band [s] | 0.688 | 19.21 | 0.70 | 0.74 | 0.67 | none in 12 s (limit cycle) |
| roll settling time [s] | 0.060 | 0.060 | 1.27 | 1.27 | 1.27 | 1.27 |
| peak top-point excursion [cm] | 9.2 | 35.6 | 3.1 | 2.9 | 3.1 | 4.4 |
| mean electrical power over the run [W] | 340 (their units) | 348 | 0.53 | 0.48 | 0.45 | 44 |
| peak electrical power [W] | 2.76e6 (their units) | 2.98e6 | 126 | 126 | 126 | 126 |
| energy to recover [J] | — | — | 5.4 | 4.9 | 5.4 | 528 (12 s) |
| unstable pitch pole [1/s] | — | — | 7.8 | 9.0 | 7.8 | 9.0 |
| body mass / CoM above the axle | 169 g body, "higher" | "heavier, lower" | 650 g / 15 cm | 821 g / 12 cm | 650 g / 15 cm | 821 g / 12 cm |
The paper's roll settled in 0.06 s and its power numbers are unscaled Simulink signals, so those columns are shown for the record only. The re-run's roll takes 1.3 s because the reaction-wheel motor saturates at 11 V for the first 0.2 s: with a realistic motor, roll is the slow axis. The pitch settling of the generative chassis with the paper's gains, 0.70 s, matches the paper's 0.69 s; the difference is what the conventional chassis does.
With the paper's gains, both chassis balance and the traces nearly overlap: the conventional one is 40 ms slower in pitch and reaches the same peak power, the voltage limit. The difference the paper reports is not visible here. It appears when the gain set moves towards the edge of what the conventional chassis tolerates:
The same gain set scaled ×1.5. The generative chassis settles in 0.67 s; the conventional one never settles within the 12 s run: its drive voltage sits at the ±11 V limits 81 % of the time, its pitch buzzes within ±0.45°, the wheel wanders over 8 cm, and it burns 528 J against 5 J. Inside one chassis' margin, outside the other's: that is the 0.69 s against 19 s of the paper's Table 2 in this model.
5° pitch and 5° roll release. Pitch in 0.70 s against 0.74 s; roll in 1.3 s on both, limited by the reaction-wheel motor.
The generative chassis settles; the conventional one chatters at the voltage limit and drifts. The drive-voltage trace is the tell.
1.2 rad/s on both axes, the largest push either chassis survives with these motors: the reaction wheel's stall torque, not the chassis, sets the limit.
The paper's gains with 35 ms between measurement and voltage: the generative chassis holds, the conventional one wanders. Both fall at 45 ms and 40 ms.
With one fixed gain set the two chassis behave nearly the same until the set approaches the conventional chassis' limits. The paper's 0.69 s against 19 s is what one gain set looks like when it sits inside one chassis' margin and outside the other's.
The unstable pole went from 9.0 /s to 7.8 /s. In the sweeps that is 10 % more gain margin, 5 ms more loop delay and a 25 % slower control loop before the fall, at the same motors. Mass alone changes little: m g l is nearly equal for the two.
The largest recoverable tilt (11°) and push (1.25 rad/s) are identical for both: the reaction-wheel stall torque against M g lb sin ρ. Peak power is the voltage limit on both. Energy per 5° recovery is 5 J either way.
One simulation per point, deterministic, from the same scripts. Red is the generative chassis, blue the conventional; a cross marks a fall.
Gain margin. Scaling the paper's pitch and position gains together: both improve until 1.375×, where the conventional chassis breaks into a limit cycle; the generative one holds to 1.5×. Below 0.5× both are simply slower.
Energy against the gain scale. Inside the margin a 5° recovery costs 5 J; the limit cycle costs a hundred times that, most of it heating the drive motor's winding at the voltage limit.
Loop delay. Peak top-point excursion as a pure delay is added between measurement and voltage. The conventional chassis starts wandering at 20 ms and falls at 40 ms; the generative one at 30 ms and 45 ms.
Control period. The same gains with a slower controller: the conventional chassis falls at a 40 ms period, the generative one at 50 ms. A slower fall tolerates a slower loop.
Initial tilt. Energy to recover grows with the tilt; both chassis fall from 12°, where the reaction-wheel motor can no longer out-torque gravity in roll. The generative chassis costs slightly more energy per recovery: its centre of mass is higher, so a degree of lean is more potential energy.
Push at 1 s. Peak pitch after an impulsive kick on both axes; both survive up to 1.25 rad/s and fall at 1.5. The generative chassis swings 20 % further for the same kick (lighter, higher) and recovers in the same time.
72 chassis on a grid of structure mass and centre-of-mass height, all with the paper's gains. The white circles are the two chassis; the arrow is the move generative design made. Low centres of mass fall with these gains no matter the mass; the conventional chassis sits one row above that edge, the generative one three.
If each chassis gets its own tune. LQR on the linearised plant with the same weights for both, mapped onto the paper's three-loop structure: the two settle in 0.80 s and 0.80 s (pitch), 0.96 s and 0.91 s (roll). Retuned, the chassis difference nearly vanishes; what remains is the margin above.

Seventy-two seconds: the robot and its three degrees of freedom, the five-step pipeline with the topology optimisation running, the mass against safety-factor chart, the two pendulums released with the motors off, the nominal and the edge comparisons, the sweeps, the printed prototype, and what this re-run can and cannot claim.
Everything on this page comes from one small Python package and four scripts; nothing is random, so there are no seeds. The package holds the two chassis, the motors, the dynamics with RK4 and the three PID loops, the metrics, the linearisation with an LQR helper, and the SIMP topology optimiser with the stress check. The scripts run the sweeps in parallel, draw the figures and the results JSON the plots above read, render the videos with a small software rasteriser, and build the report.
# Unicycle/experiments python -m pytest -q tests # energy conservation, linearisation vs finite differences, closed-loop, settling, topopt python run_study.py control # 2 x main + gain / delay / rate / tilt / push / friction sweeps + the 72-chassis grid -> out/study.json python run_study.py topopt # three brackets x ten volume fractions, time-lapse frames -> out/topopt.{json,npz} python make_figures.py # docs/figures/*.pdf, site PNGs, assets/data/unicycle_results.json, docs/numbers.tex python make_videos.py --which all # teaser, explainer, comparisons, time-lapses, thumb -> assets/videos/unicycle_*.mp4 cd ../docs && make # unicycle.pdf, the technical report
Files. unicycle/params.py (Chassis, Motor, Gains and every estimate in one place), model.py (Unicycle, simulate, metrics, linearise, lqr), topopt.py (LoadCase, topopt, stress_check, the three brackets); render.py is the rasteriser. The browser twins are assets/js/unicycle_sim.js (the same model, line for line), unicycle_scene3d.js (three.js), unicycle_topopt.js (SIMP with a matrix-free conjugate-gradient solve) and unicycle_plots.js.
Assumptions you can change. Drive wheel 70 mm, 40 g; reaction wheel 120 mm ring, 85 % of m r²; body radius of gyration 0.6 of the CoM height; a 12 V geared drive motor (0.48 N m stall) and a 0.33 N m direct-drive reaction-wheel motor; the conventional structure at twice the generative mass with the centre of mass 3 cm lower. The grid sweep shows how the conclusions move with the last two.
Technical report (PDF): the derivations, the parameter table, every figure with its numbers, and the limitations.
Generative Design for Self-balancing Unicycle Robot in Additive Manufacturing. Jiaqi Chen (Tongji University), Qilong Cheng (University of Toronto) and Mengrui Han (Beijing University of Technology); the first two authors contributed equally. International Conference on Automation Control, Algorithm, and Intelligent Bionics (ACAIB 2022), Proc. SPIE 12253, 122530A. doi:10.1117/12.2639454.
Figures 1 to 14 shown on this page are the paper's. The 3-D twins, the topology-optimisation playground, the time-lapses, the comparison videos, the sweeps and the report are mine, built from the paper's equations and Table 1 with the estimates stated above; the Simulink and Fusion 360 files of the original study were not available for this re-run. The prototype clip is from the project.