MSME Graduate Capstone | Portland State University | September 2025 to June 2026
I designed, built, and validated a ground-based testbed that reproduces a CubeSat's three-axis attitude dynamics on the bench, closing the loop from first-principles equations of motion all the way through hardware. The dominant disturbance settled in about 17 seconds, matching the theoretical pole-placement prediction.
Reaction wheels let a spacecraft point precisely for communication, solar tracking, and disturbance rejection, all without expending propellant. Testing that kind of control authority on the ground usually means an air-bearing table, but air bearings only allow a narrow rotational range and can't do a full 360-degree spin, which rules out ever testing recovery from a tumble. I wanted that capability, so I built a three-ring gimbal instead. It allows unrestricted rotation on all three axes, at the cost of a harder math problem: every ring adds its own inertia, and the coupling between axes has to be modeled carefully rather than assumed away.
Stabilize at a commanded attitude, recover from disturbances, match the model's predicted response, and do it repeatably.
I derived the nonlinear equations of motion from first principles using Euler-Lagrange, then linearized about equilibrium to reduce the system to three independent double integrators, one per axis. Because the gimbal's three rings carry very different effective inertias, I also derived the reaction wheels' optimal tilt angle analytically for this testbed's specific geometry, rather than picking a number from the literature's 57 to 61 degree range. The math gave 58.2 degrees; the as-built hardware landed at 58.4 degrees, within 0.2 degrees of the derived optimum.
With the plant modeled, I designed a state-feedback control law in MATLAB, placing the closed-loop poles and adding integral states to reject a small constant disturbance torque from a residual center-of-gravity offset. I implemented the full control loop in embedded C++ on a Teensy 4.1, reading attitude from a 9-DOF IMU and driving four reaction wheels through H-bridge motor drivers.
Hardware testing demonstrated closed-loop disturbance rejection on all three axes. The dominant disturbance settled in about 17 seconds, closely matching the pole-placement prediction from simulation and confirming the controller has real authority over the physical platform, not just the model. This control law is linearized about equilibrium and valid only up to about 15 degrees per axis, so it's built for fine attitude control rather than an initial large-angle detumble; on real spacecraft, that phase is typically handled by magnetorquers, which were outside this project's scope.
The settling timescale matched theory, but the settling shape didn't, and I don't paper over that gap. The hardware response was noisier than the clean simulated one, driven mostly by bearing friction and slop in the 3D-printed shaft connectors, a residual center-of-gravity offset, and slight imbalance in the reaction wheels. Those are artifacts of testing on the ground rather than in orbit, where none of that friction or gravity loading would exist. Budget was a real constraint on the actuator choice too. I couldn't buy motors with the specs I actually wanted, brushless motors with a fast response, so I worked with whatever I could scavenge instead: brushed Mabuchi RS-365PH DC motors. Those had a slow rise time of their own, putting a hard ceiling on how fast the whole closed-loop system could respond, regardless of how aggressively I placed the controller's poles.
Lagrangian mechanics, MATLAB (state-space, pole placement), full-state feedback and integral control, controllability analysis, IMU sensor fusion, embedded C++ (Teensy), PWM motor control, mechanical design and fabrication, root-cause debugging.