Robotics · 10 August 2023
EVA Free-Flying Space Robot: Quintic Trajectories and Quaternion Attitude Control
A dual-arm free-flying robot modelled in Simscape Multibody. A quaternion feedback regulator and a contact-wrench feedforward path hold the base attitude while the grippers close on a target.

Technologies
Dynamics
The state is the base pose and velocity together with the arm joint vector . The floating-base equations of motion split into a base block and a manipulator block; the off-diagonal inertia block couples arm accelerations into the base. With and (thruster wrench and joint torques):
With thrusters off and no external wrench, momentum is conserved, so every arm acceleration appears as base acceleration. The model therefore runs in free-flying mode: from the thrusters is the control handle that cancels the reaction. The base attitude is the unit quaternion with kinematics and rotational dynamics
where is the thruster control torque and lumps the arm reaction and the grasp contact.
Trajectory generation
Each joint follows a rest-to-rest quintic polynomial with zero velocity and acceleration at both ends, so the reaction torque on the base also starts and ends at zero:
The extrema are
Scaling by a factor reduces the peak acceleration, and with it the peak base disturbance torque, by . Approach and grasp are separate quintic segments, so the arm is at rest just before the gripper closes.
Attitude control: quaternion feedback regulator
The regulator feeds back the vector part of the error quaternion and the body rate, which gives a near eigen-axis rotation without the Euler-angle singularity:
and are symmetric positive-definite. If the scalar part is negative, the error quaternion is negated so the body takes the shorter rotation (no unwinding). For the Lyapunov candidate below, the cross terms cancel and LaSalle gives convergence to and for large-angle manoeuvres:
Gains are initialized from a natural frequency and damping ratio per axis, then refined against the thruster limits:
Grasp disturbance compensation
The regulator alone reacts after the base has moved, so a feedforward path is driven by the measured contact wrench. The wrench is mapped to a base torque, low-pass filtered and scaled by a gain , then added to the feedback torque:
Thrusters can only push, so opposing nozzles are used in pairs. The allocation block solves for non-negative forces with the smallest total impulse through the configuration matrix , and an on-off modulator (Schmitt trigger or pulse-width pulse-frequency stage) with a minimum on-time and a deadband turns each force demand into valve pulses. Propellant mass follows from the integrated impulse:
What I did
- Designed the dual-arm robot in SolidWorks (assembly Assem3) and imported it into Simscape Multibody with a 6-DOF joint to the world, so every arm reaction reaches the attitude loop.
- Generated the quintic joint references for the approach and grasp segments, with , and evaluated from the same duration .
- Implemented the quaternion feedback regulator with the shortest-rotation logic.
- Built the force-regulator feedforward path from the gripper wrench to the thruster block, including allocation, modulation and impulse logging.
Evaluation setup
Three cases use the same arm trajectory and grasp timing. The entries are the expected behaviour from the physics; measured values from the Simscape runs are not included here.
| Case | Thrusters | Expected base attitude error at grasp |
|---|---|---|
| A. Free-floating baseline | Off | Largest; the base keeps rotating because momentum is conserved |
| B. Quaternion feedback only | On, feedback | Reduced, but a peak appears before the loop reacts |
| C. Feedback plus force-regulator feedforward | On, both | Smallest peak and fastest settling, since the disturbance is cancelled as it arrives |
- Logged metrics: peak attitude error and settling time in a 1 degree band, peak body rate, end-effector error at grasp, total thruster impulse ( about 60 to 70 s for cold-gas nitrogen, approximate), pulse count.
- Sanity checks: angular momentum constant with thrusters off, quaternion norm 1 within solver tolerance, quintic velocity and acceleration exactly zero at segment ends.
Simplifications
Rigid bodies, idealised sensing and actuation, a hand-chosen , and a static target.
Future improvements
- Optimise for a limited reaction torque.
- Add sensor noise and thruster lag.