How a PI Speed Controller Works
A PI (Proportional-Integral) speed controller is a system used to adjust and maintain the speed of a motor. It ensures that the motor operates at a desired speed, even when external factors (like changes in load or voltage) try to disrupt it.
The controller continuously measures the difference between the target speed (setpoint) and the actual speed of the motor. This difference is called the error. The PI controller uses two main components—Proportional (P) and Integral (I)—to calculate how much to adjust the motor's input to correct this error.
Proportional Component (P)
The proportional part reacts to the current error. It generates a response that is directly proportional to how big the error is.
- Effect: A larger error causes a stronger corrective action, while a smaller error results in a weaker adjustment.
-
Impact of P on performance:
- Higher P: Faster response to changes but can cause overshooting or instability.
- Lower P: Smoother response but slower corrections and less precise control.
Integral Component (I)
The integral part reacts to the accumulated error over time. It looks at how long the error has been present and gradually adjusts the control output to eliminate any persistent (steady-state) error.
- Effect: It ensures that even small errors that don't go away (e.g., due to drag or load) are corrected over time.
-
Impact of I on performance:
- Higher I: Faster elimination of steady-state error but can lead to overshooting and oscillations.
- Lower I: More stable control but slower correction of persistent errors.
Example: Adjusting a Propeller Motor’s Speed in a Plane
Imagine you have a propeller-driven RC plane, and you want the motor to spin at 6,000 RPM (Revolutions Per Minute) to maintain steady flight.
- When you first start the motor, the propeller spins at only 5,500 RPM due to the air resistance and load from the plane’s weight.
- The PI controller detects an error of 500 RPM (target = 6,000; actual = 5,500).
- The P component reacts immediately to this error by increasing the motor’s power, quickly raising the speed to near 6,000 RPM.
- As the motor approaches the target speed (e.g., 5,980 RPM), the error becomes smaller. The P component reduces the power to prevent overshooting the desired speed.
- Despite this, there may still be a slight persistent error (e.g., 5,990 RPM instead of 6,000 RPM) due to aerodynamic drag or system limitations. The I component gradually increases the power slightly, ensuring the motor reaches exactly 6,000 RPM over time.
- If the plane begins climbing, the increased load on the propeller might drop the speed to 5,800 RPM. The PI controller detects this change and adjusts the power to restore the speed to 6,000 RPM smoothly.
What to Do for Smoother Reactions
If the speed controller reacts too quickly (causing sudden jumps or oscillations in motor speed), you can adjust the P and I parameters:
-
Lower the P value:
- A smaller P value will make the controller less aggressive in reacting to changes in error, resulting in smoother adjustments.
- However, this may also slow down the correction process.
-
Lower the I value:
- A smaller I value will reduce the effect of accumulated error, preventing the system from overcompensating and oscillating.
- This adjustment makes the controller more stable, but it may take longer to correct steady-state errors.
For example, if your RC plane’s motor speed fluctuates too much during flight, you could reduce the P value from 0.5 to 0.38 and the I value from 2 to 0.75. This would make the governor’s responses more gradual, ensuring the plane flies smoothly without sudden power changes.
Balancing P and I
To achieve smooth, stable, and accurate motor control, P and I values must be carefully tuned:
- Too much P: May cause rapid, unstable changes in motor speed.
- Too much I: May result in delayed reactions and overshooting.
- Default values: Default settings are often a great compromise and an excellent starting point. You can experiment by adjusting the parameters in small increments to find the best performance for your specific setup.