Why does P-only control have offset?
With Ki = 0, motor torque only comes from present error: u = Kp(setpoint − angle). Near horizontal, the hanging weight creates gravity torque, so a P-only controller must keep some angle error to produce the balancing motor torque.
How does the hanging weight create load torque?
The arm angle runs from −π/2 straight down to π/2 straight up; 0 is horizontal. Gravity torque is modeled as weight·cos(θ), so it is strongest near horizontal and zero when the arm points straight down or straight up.
What happens at 6 seconds?
The hanging weight increases. That raises the gravity torque for the same arm angle, so the controller must produce more motor torque. P-only does that by accepting more position error; integral action can build the extra torque without permanent offset.
What does Kp change?
Higher Kp commands more torque per radian of error, so it reduces offset and reacts faster. Too little Kp droops under the weight; too much Kp can overshoot, ring, or hit the torque clamp.
What do Ki and Kd change?
Ki accumulates error and can remove persistent offset by building steady torque over time. Too much Ki can overshoot. Kd reacts to motion and adds damping, which helps tame ringing from high Kp or inertia.
What does inertia change?
Inertia controls how hard the arm is to accelerate. Higher inertia makes the response slower and more prone to overshoot after torque changes; lower inertia makes the arm respond quickly.
Where is PID used?
PID is common when a machine must regulate a measurable quantity despite changing loads or disturbances: robot velocity, oven temperature, drone attitude, motor position, fluid level, and cruise control.