The control logic moves the actuator from its current position to a desired one. While it moves, it can also guarantee that a certain trajectory, passing through some specific intermediate configurations, is followed. Example: a motor drives a link of a robotic arm and must reach 90°, starting stopped at 0°. The error variable is the target minus the current position. It goes into the control system, which calculates the command that makes the motor reach the target and the error reach zero.
Why it never switches off. At zero error the control system is not stopped. It keeps running to reject external disturbances, such as gravity pushing the arm downward, and holds the motor at the desired position. Reach the target, press the gravity button, and watch it get corrected. Then untick the checkbox and repeat. Gravity always pulls the arm down toward the horizontal, so for a target above 90° it pulls the other way than for a target below 90°.
The example: the 0°, 30°, 60°, 90° positions and the 90°, 60°, 30°, 0° errors. Real controllers use many formulas for the command, so the demo uses the simplest rule: turn by the error, up to the motor's turn per iteration.
This is the control type used to drive the robot wheels in this project. The goal changes: the wheel should not reach a position but rotate at a constant speed. The input is the desired speed, and the error variable is the desired speed minus the current speed of the motor. The controller computes the command that minimizes it.
Useful in manipulation, where fragile objects must be grasped without breaking them. Position control could press too hard and break the object, or too softly and drop it. With force control the input is the desired force, and the error is the desired force minus the force the end effector applies now. The gripper closes with the right tension.
Think of a blind hand that only knows how far to close, against a hand with a sense of touch. Try the same objects in both modes, or switch on Auto grab and watch the tally at the bottom of the lab.
The objects, their safe force ranges and the units are illustrative values chosen for this demo. The idea: a fragile object can break if too much pressure is applied, or be dropped if the pressure is not enough.
The loop never changes: the error is always the desired value minus the current value, and the controller works to bring it to zero. Only the quantity changes. Switch between the three and drag the desired value.
| Control | Input | Error variable | What it achieves |
|---|---|---|---|
| Position | desired position | target position − current position | Moves the actuator to a desired position, following a trajectory if needed |
| Velocity | desired speed | desired speed − current speed | Rotates the actuator at a constant speed (the robot wheels) |
| Force / torque | desired force | desired force − current force | Grasps with the right tension, without breaking or dropping |