AAS- Explaining the PI controllers in FOC.

In the context of motor control, and especially in advanced systems like Field-Oriented Control (FOC), PI controllers are a fundamental building block. They are a type of feedback control system that continuously works to reduce the difference, or “error,” between a desired value (the setpoint) and the actual, measured value.

The name “PI” stands for Proportional-Integral, referring to the two main components of the controller’s logic.

1. The Proportional (P) Term

The proportional term is the immediate response to the current error. It is calculated by multiplying the error by a constant value, known as the proportional gain (Kp​).

  • How it works: The larger the error, the stronger the corrective action. If the motor’s measured current is far below the target current, the proportional term will generate a large corrective signal to increase the voltage to the motor, quickly closing the gap.
  • Benefits: It provides a fast, initial response to an error.
  • Drawbacks: A purely proportional controller can have a persistent, small error known as a “steady-state error.” It will get the motor close to the target, but it may never reach it exactly. A high Kp​ value can also cause the system to overshoot the target and oscillate.

2. The Integral (I) Term

The integral term addresses the persistent, steady-state error that the proportional term can’t eliminate. It works by accumulating the error over time. It is calculated by multiplying the sum of all past errors by a constant value, known as the integral gain (Ki​).

  • How it works: Even if the error is small, if it persists for a long time, the integral term will grow larger and larger. This increasing value acts as a “push” that forces the system to continue its corrective action until the error is eliminated.
  • Benefits: It completely eliminates steady-state error, ensuring that the system eventually reaches its exact target.
  • Drawbacks: It can be slow to respond and may cause overshoot if the Ki​ value is too high, as it will continue to “push” even after the error has been corrected.

How PI Controllers are Used in FOC

In a Field-Oriented Control system, two main PI controllers are used to manage the motor’s currents:

  1. The Torque Controller (q-axis PI Controller): This controller is responsible for the motor’s torque.
    • Setpoint: The desired torque for the motor, which corresponds to the desired value of the q-axis current (iq​).
    • Measured Value: The actual measured q-axis current.
    • Goal: The controller works to ensure that the actual motor current matches the desired current, thereby providing the exact amount of torque requested by the driver.
  2. The Flux Controller (d-axis PI Controller): This controller is responsible for the motor’s magnetic flux.
    • Setpoint: The desired value of the d-axis current (id​). For a Permanent Magnet Synchronous Motor (PMSM), this value is typically set to zero to maximize efficiency and ensure all the current is used for producing torque.
    • Measured Value: The actual measured d-axis current.
    • Goal: The controller ensures that the actual d-axis current remains at or near zero, preventing wasted energy and ensuring the motor operates at its peak efficiency.

The outputs of these two PI controllers (which are voltage commands) are then fed into the inverse transformations (Inverse Park and Clarke) to generate the three-phase voltages that are sent to the motor.

In essence, the two PI controllers act as a powerful team. The proportional term provides the quick, responsive action needed for dynamic control, while the integral term ensures long-term accuracy and the complete elimination of any tracking error. The precise “tuning” of the Kp​ and Ki​ gains is a critical part of motor control engineering, as it determines the trade-off between speed, stability, and accuracy.

Leave a comment