KFUPM · EE 381 Control Systems Laboratory · Teaching prototype
A reaction-wheel testbed designed to help control engineering students connect feedback-control theory with the behavior of a real electromechanical system.
Physical prototype (left) · SolidWorks design study (right)
Looping excerpts from both bench demonstration clips
Watch the original bench video · CAD files · Simulation code · Additional photos
A motor accelerates the flywheel and applies an equal and opposite reaction torque to the rotating base. The motor acts on the wheel's motion relative to the base.
Here, subscripts b and w denote base and wheel; J is rotational inertia, i is motor current, Kₜ is the torque constant, N is the gear ratio, and η is transmission efficiency. These are the simplified equations without the optional reflected actuator inertia used in the full MATLAB model.
The MATLAB study implements three control modes:
| Mode | Learning objective |
|---|---|
| Open-loop voltage | Observe the reaction-wheel/base response to a voltage pulse |
| Wheel-speed PI | Regulate relative wheel speed using PI control and an inner current loop |
| Base-angle PD | Regulate base orientation using PD control and an inner current loop |
For base-angle PD control, wheel torque is requested opposite to the desired base torque:
The requested current is then limited and passed to the inner PI controller. The model also represents electrical dynamics, friction, battery behavior, actuator limits, and safety supervision.
The SolidWorks design was initially intended for CNC manufacturing. Some parts were modified during fabrication for 3D printing, so the published CAD is a design reference rather than a verified exact as-built revision.
cd('simulation/matlab') RUN_TESTS_FIRST % Open-loop, wheel-speed PI, and base-angle PD RUN_OPEN_LOOP_COMPARE % Compare nominal 6:1, 10:1, and 19:1 gearing
The simulation results report the following modeled peak currents in MATLAB R2025a:
| Open-loop pulse | Wheel-speed PI | Base-angle PD |
|---|---|---|
| 1.183 A | 0.497 A | 1.180 A |
All three scenarios passed the repository's numerical sanity checks. These are simulation results, not measured hardware tracking errors.
Evidence: The photos and videos show physical bench operation. The MATLAB code documents modeled control behavior. Closed-loop hardware tracking and simulation-to-hardware agreement have not been quantified in this repository.
Credits: Muhammed Elyamani · KFUPM EE 381. Component attribution and rights.


