This simulator closes a position loop around a rotary actuator. A controller compares the commanded angle with the measured output angle and applies a clamped motor torque. You tune the gains, inertia, torque limit and load to see overshoot, settling, saturation and steady-state offset for yourself.
• A cutaway actuator rig with motor and stator, a reduction gear pair, an output shaft with angle pointer, a feedback encoder and a load brake with torque indicator. • Controls for position command (-120° to 120°), proportional gain (0.2-2 N·m/rad), derivative gain (0-0.4 N·m·s/rad), output inertia (0.01-0.08 kg·m²), torque limit (0.2-1 N·m) and load torque applied after 2 s (-0.3 to 0.3 N·m). • Readouts for output angle, position error, angular velocity, applied torque, the active command and a torque-saturation flag. • A check box that alternates the command every 6 s, and experiments such as a well-damped 90° move and a load-induced offset.
Torque is τ = clamp(Kp(θcmd - θ) - Kd ω, ±τmax) and the output follows J dω/dt = τ - bω - τload, with b = 0.02 N·m·s/rad. Raising Kp stiffens the response but can cause overshoot, while Kd adds damping. A steady load needs a steady torque, and with proportional control alone that torque comes from a permanent error: the lab notes that about 0.25 rad (14.3°) of error is needed to hold the example load. When the requested torque exceeds the limit it is clipped, which limits acceleration regardless of gain.
The model is a single output-side inertia with an ideal encoder, PD control and viscous damping. The gear ratio is illustrative, and there is no electrical winding model, backlash, stiction or hard stops. Dynamics are integrated with substeps of at most 2 ms.
The derivative term opposes velocity, acting like added damping. Increasing Kd reduces overshoot and oscillation, while setting it to zero leaves only the proportional spring-like action.
With only proportional and derivative action, holding a constant load torque requires a steady controller torque, and that requires a steady error. The lab's load-offset experiment shows roughly 14.3° of error for the example load.
The torque command is clipped to the limit, so the actuator cannot accelerate any harder no matter how high the gains are. The saturation flag turns on, and large steps look like constant-acceleration ramps before the loop takes over.
It is a teaching model of the position loop only, without current loops, winding electrical dynamics, backlash or friction. It is useful for understanding gain, damping and saturation, not for tuning a specific drive.