Published 2026-02-18
When making aservogimbal, especially a two-dimensional one, have you also encountered this problem: trying to link the twoservos obediently, but the result is either shaking like Parkinson's, or not turning in place? It's obviously an angle, so why is it so difficult to move? Don't worry, it's not that theservois broken, but that your control system is missing its soul - PID. This thing sounds like a holy book, but once you understand it, you can hit it wherever your gimbal points.
Simply put, PID is like controlling the accelerator when you drive. You want to drive to 100 yards (target value), but the current speed is only 80 (current value), and the difference is 20. P (proportion) is to press the accelerator hard based on this difference. The greater the difference, the greater the accelerator. However, it is easy to overshoot with P alone. At this time, I (points) will come out to take into account the errors accumulated in the past, and help you add a little more oil or collect a little more oil. D (differential) is like your prediction. When you see that there is a big downhill ahead, you should stop the fuel in advance to prevent overspeeding. With the cooperation of these three, the car can be fast and stable.
If you think about it, if you let the servo rotate 90 degrees, it can rotate without PID, but that is open-loop control. If the camera hanging on the gimbal is a bit heavy, or if a cable is pulled, the servo will not have the strength to overcome the resistance and will not be able to rotate in place. Or if you let it rotate quickly, it will hit you with a "clang", the inertia is too great, and the gimbal will shake for a long time. PID is a closed-loop control. It will keep an eye on the current angle. If there is any deviation or jitter, it will immediately fine-tune the servo output to ensure that the gimbal stops steadily and accurately where you want it to look.
Adjusting PID may sound metaphysical, but it is actually a process of "trial and error-correction". First, you must have a debugging tool that can view the angle in real time, such as printing the current angle to the computer through the serial port. Then, set I and D to 0 first, and only add P. Slowly increase the P value from small to large until the gimbal starts to vibrate slightly. At this time, P is almost enough. Then add a little bit of D, and the jitter usually disappears and the gimbal responds faster. If you find that the gimbal always has static differences and cannot rotate to the exact position, add a little more I. Remember, only adjust one parameter at a time.
If P is adjusted too small, just like when you drive a car and apply the accelerator lightly, the gimbal will be like an old man with slow response, slowly swinging towards the target, and it will not be accurate for a long time. This is called "slow response" in terms of control. On the other hand, if P is adjusted too high, the gimbal becomes impatient and rushes over with a "swish". As a result, it cannot stop the car and oscillates back and forth at the target position. This is "overshoot" and "oscillation". What we want is for the gimbal to reach the target quickly and smoothly, and to reach the target in one go without any trembling. This depends on the golden combination of P and D.
D is the damper, specially designed to deal with jitter and vibration. Imagine you are pushing a heavy revolving door and it will swing back after you push it. If you are smart, you will meet it with your hand when it is almost in place, block it slightly, absorb the excess kinetic energy, and the door will stop firmly. What D does is this "facing it" job. By calculating the changing trend of the angle, it predicts that the gimbal is about to overshoot, and pulls it back in advance in the opposite direction. After adding D, the gimbal's movements will appear very "sticky" and smooth, with no unnecessary shaking at all.
Have you ever encountered this situation: P and D have been adjusted, and the gimbal is as stable as a rock when it is unloaded, but once a heavy camera is installed, the gimbal always misses a few degrees and cannot return to the original position. This is "static differential" and is usually caused by friction or unbalanced gravity. I was born for this. It is like an accountant, adding up all the small errors in the past period, and if it finds that there is a shortfall, it will gradually provide more compensation. Therefore, I can enable the gimbal to eliminate static differences and aim at the target even when it is loaded. However, if I is too strong, it will also cause shock, so it should be stopped in moderation.
Seeing this, are you already itchy and want to try it? In fact, adjusting PID is like learning to ride a bicycle. Once you understand the principles, you will naturally get a feel for it after practicing it for a few times. Why not open your debugging software now and try to add a set of PID parameters to your gimbal to see the effect? If you encounter any problems, please leave a message in the comment area, and don’t forget to like and share it so that more friends who play servos can see it!
Update Time:2026-02-18
Contact Kpower's product specialist to recommend suitable motor or gearbox for your product.