In this guide, we will cover the essential aspects of tuning a PID controller for your motor control applications. From understanding the fundamentals of PID control to exploring the behavior of every Key value, you will have the knowledge to optimize your motor control systems for precision, efficiency, and reliability.
We begin with an exploration of the PID controllers, elucidating their intrinsic components and operational principles. The importance of tuning these controllers is underscored, highlighting its impact on enhancing motor performance and reducing errors and oscillations. A systematic approach to tuning is presented, offering a step-by-step guide on identifying system parameters and employing effective tuning methods. We will also look at the FOC tuning of specific values giving a methodology and suggested values.
What is a PID controller?
A PID Controller stands for Proportional, Integral, and Derivative Controller. It’s a control loop feedback mechanism (or controller) widely used in industrial control systems. A PID controller continuously calculates an error value as the difference between a desired value also called a reference point and a measured process variable and applies a correction based on proportional, integral, and derivative terms, hence the name. For this reason, a PID Controller can be applied as a Control Logic in several situations, and a Motor Controller can use PID in order to reduce the error of critical aspects such as Current, Speed, and Position. It is also important to note that the error can keep evolving as the system is an Active one, where different situations can happen or new reference points are given.
Why Tune a PID Controller?
Tuning these controllers ensures the motor performs efficiently, with reduced errors and oscillations. An untuned PID can lead to issues such as overshooting, undershooting, or even system instability.
A PID controller operates based on three key Gain components:
- Proportional gain (Kp): Determines how fast the output changes in response to a change in the error
- Integral gain (Ki): Determines how much the output changes in response to the accumulation of the error over time
- Derivative gain (Kd) Determines how much the output changes in response to the rate of change of the error
These components work together to minimize the error between the desired reference point and the actual process variable.
Transient Response concepts
Before talking about how the Gains change the behaviour of the system is necessary to define some concepts:
- Reference Value: The reference value, also known as the setpoint or desired value, is the target value that a system or process is designed to achieve or maintain.
- Desired Amplitude: Desired amplitude refers to the specific level or magnitude that a signal or response should reach, as indicated by the reference value. It represents the ideal amplitude that a system aims to attain.
- Rise Time: Rise time is a measure of how quickly a system or signal reaches its desired amplitude from an initial state. It is the time it takes for the signal to transition from a specified low value to a specified high value
- Peak: The peak of a signal or response is the maximum value it reaches during its operation. It represents the highest point or amplitude achieved by the signal.
- Overshoot: Overshoot occurs when a system’s response temporarily exceeds the desired amplitude or reference value before settling down.
- Settling Time: Settling time is the time it takes for a system’s response to reach and remain within a specified tolerance band around the desired amplitude after any transient behavior, including overshoot, has occurred.
That we can represent in the following image:
Gains Tuning Effects
These are the effects when the Gains are increased:
PID controller Tuning Steps
- Adopt a progressive approach starting the tuning of Kp, then Ki, and finally if needed Kd will help to find the proper correct values.
Common PID controller problems
Here are some common PID controller tuning problems and how to solve them:
- Oscillation: If the system oscillates, it means that the Kp is too high. Reduce the proportional gain until the oscillation stops.
- Slow response: If the system response is too slow, it means that the Ki is too low. Increase the integral gain until the system response is faster.
- Overshoot: If the system overshoots the desired setpoint, it means that the gains Kp and Ki are too high or reduces the Kd until the overshoot is minimized.
PID can be used on an FOC system, for more detailed information is possible to read this article, however, we like to write down some little considerations about this specific situation.
- If you’re focused on torque control, you only need to calibrate the current gains.
- For speed control, you should calibrate the current gains first and then adjust the speed gains on top of them.
- Finally, if you’re aiming for precise position control, you should calibrate the current gains, then fine-tune the speed gains, and further refine the position gains.
NOTE for SOLO Motor Controller Users
- Is possible to perform an auto-tune operation of the Current gains within the Motion terminal by pressing the Motor Calibration button.
- In Solo, the gains only need to be calibrated once as Gains are stored in the unit’s memory. However, you should review and potentially adjust them if there are changes in your system, such as using a different motor, or sensor, or when the task itself changes
- You can calibrate the values on a live test bench, but it’s critical to adopt safety precautions, such as limiting the maximum current from the power supply. Incorrect calibration values can compromise the integrity of the system’s components, leading to potential damages
You can find in the next table suggested values that can serve as references during the calibration of your Ki and Kp. Keep in mind that these values may vary depending on the specific characteristics of your system
PID tuning is a continuous process, and fine-tuning may be required as your system evolves, By tuning the PID controller gains correctly, you can achieve the desired performance. Overall is a process that require a dose of experience but we tried with this practical guide to give you all the tool to be able to perform this task.
At SOLO Motor Controllers, we’re committed to improving the performance of your motors and systems. Leveraging our active support and our Motion Terminal is possible to have real-time insights to refine and optimize your setup, ensuring peak efficiency and performance.