If you’ve ever worked with precision machinery—think CNC routers, robotic arms, packaging lines, or even high-end 3D printers—you’ve probably experienced it: that odd, jittery motion that makes you second-guess your setup, or worse, a sudden overshoot that knocks a workpiece off its fixture. More often than not, the culprit isn’t a faulty motor or a misaligned mechanical part. It’s something far simpler, and vastly underdiscussed for new automation technicians: a poorly adjusted servo motor controller gain. Servo Motor

I’ve spent the last eight years as a servo motor supplier, working directly with small machine shops, industrial maintenance teams, and startup automation engineers, and I can’t tell you how many times I’ve gotten a panicked call at 7 a.m. on a Monday from someone whose entire production line is down, all because they tweaked a wrong setting on their controller’s gain parameters. It makes sense, too: servo motor controller manuals are dense, full of jargon like “proportional gain (Kp)” and “derivative gain (Kd)” that sounds like it was written for control engineering PhDs, not someone who just needs their packaging machine to run consistently. So today, I’m pulling back the curtain on how to adjust servo gain like someone who’s actually done it in the field, not just read about it in a textbook. No overly complex math, no confusing acronyms, just step-by-step guidance built from real client fixes.
First, let’s make sure we’re all on the same page: what is gain, exactly? For anyone new to servo motors, think of gain as the “sensitivity dial” for your controller. The Kp (proportional gain) parameter is how hard the motor reacts to the difference between where it’s supposed to be (your target position) and where it actually is (its actual position). Crank Kp up too high, and the motor will yank back and forth trying to correct that small error—hence that jitter I mentioned earlier, or even overshoot past the target and slam into the other end of its range. Crank Kp too low, and the motor is lazy: it will take forever to get to the target, and it will drift or lag if you add a load, like a heavy box on a conveyor.
Then there’s Kd (derivative gain), which is how much the controller reacts to the rate of change of that error. Think of it as a “damper” for the motor’s movement. Kd is there to stop that jitter from high Kp, because it reacts to how fast the error is changing—so if the motor is moving too quickly toward the target, Kd will pull back a little. Mess with Kd wrong, though, and you can get a weird, mushy feel where the motor doesn’t respond when you need it to, or it even oscillates at high speeds.
Most servo controllers also have Ki (integral gain), which fixes “steady-state error”—that’s when the motor is supposed to be at a fixed position, but it drifts a tiny bit over time, like a robotic arm that’s supposed to hold a part 10 cm from its base but creeps to 10.2 cm. For most basic applications, especially if you’re moving the motor back and forth a lot (position control, which is most common for automation), Ki is often set very low or even disabled entirely at first, because it can add instability if not dialed in properly. We’ll stick to Kp and Kd today, since that’s where 90% of new users run into trouble.
Now, before you touch a single setting on your controller, let’s do two non-negotiable prep steps that will save you hours of frustration later. First, make sure your mechanical system is already perfectly aligned and tightened. I can’t tell you how many times I’ve adjusted gain for a client, only to find the problem was a loose lead screw or a bent linear rail that was causing weird resistance the motor was fighting against. If your mechanical parts are loose or misaligned, adjusting gain won’t fix the jitter—it will just make the motor fight harder against the bad mechanics, leading to premature wear. Second, disconnect any external loads that aren’t part of the standard operation. If you’re adjusting a servo that lifts a 50 kg die cut, test it first with no die cut at all, then adjust for the actual load later. Loads add inertia, which changes how gain works, so testing with and without load is critical.
Now, the step-by-step process I teach all our new clients, honed over hundreds of setup calls. Let’s break this down, using a common use case: a small CNC router axis that moves a cutting head back and forth along a linear rail.
Step 1: Reset your controller to factory defaults. This might sound too simple, but almost every time a user calls me, they’ve tweaked random gain settings over time and left them way off base. Go into your controller’s menu (most modern servo controllers are Bluetooth-enabled now, so you can use a laptop or phone app to adjust them, no physical keypad needed) and select “restore factory gains.” Every brand is a little different, but if you’re using a common brand (like Mitsubishi, Omron, or Yaskawa, which we supply most often), this is a standard option under “setup” or “parameters.” This will bring Kp, Kd, and Ki to a safe, neutral starting point.
Step 2: Increase Kp until you see a slight overshoot. Keep it simple: set Kd to 0 for this step, because we only care about Kp right now. Start with Kp at 20% of its maximum value (every controller shows gain as a percentage, so this is easy) and run a test cycle: move the motor 100 mm forward, then back, repeat 5 times. If the motor moves slowly and takes a long time to get to the target, bump Kp up by 5%. Repeat the test. Keep doing this until, on the very last test cycle, the motor slightly overshoots the target—like it moves 102 mm instead of 100 mm, then settles back. That’s your peak Kp, the point where the motor is as sensitive as it can be without becoming unstable. For most CNC applications, this will land you around 70-85% Kp, but it varies by motor size and load. If your motor is super small (like a NEMA 17 for a 3D printer), Kp might only be 40%, while a large 2 kW servo for a palletizer might be 90% Kp.
Step 3: Add a small amount of Kd to eliminate that overshoot. Now that Kp is at its peak stable setting, we need to fix that slight overshoot without making the motor slow down. Start with Kd at 5% and run the same test cycle: move 100 mm back and forth. If the motor still overshoots, bump Kd up by 2-3%. Repeat until the overshoot is gone, but don’t crank Kd so high that the motor feels sluggish. The sweet spot is where the motor reaches the target almost instantly, with a tiny, unnoticeable correction—no jitter, no overshoot, no lag. For the CNC router example, this might be 75% Kp and 15% Kd. If you have Ki enabled, you can set Ki to 5-10% now to fix any small steady-state drift, but only if you see that drift after running 10+ cycles. If you don’t see drift, leave Ki off to avoid instability.
Wait a second—what if your application is speed control, not position control? That’s a different scenario, like a conveyor belt moving at a constant speed, or a spindle motor turning at a fixed RPM. For speed control, the process is almost the same, but you’ll test speed instead of position. Set Kd to 0, bump Kp up until the speed overshoots (the conveyor will speed up past the target RPM for a split second before settling), then add Kd until that overshoot is gone. Same logic, just testing for speed instead of position.
Now, let’s talk about common mistakes I see all the time, because even if you follow these steps, it’s easy to tweak something wrong. The first big mistake is testing with only one load. If you adjust gain with no load, then add a heavy part to your robotic arm later, that extra mass will create more inertia, and your current gain will be too high—leading to jitter or overshoot. Always test gain with the full, normal load the motor will carry. The second mistake is ignoring high-speed operations. If your motor only moves slowly, you can get away with lower Kd, but if it’s moving at 1000 RPM, Kd needs to be a little higher to handle the faster changes in error. I usually tell clients to test gain at their maximum operating speed, not just a slow test speed. The third mistake is touching Ki too early. Ki is a band-aid for drift, but if you set it too high, it will make the motor oscillate at high speeds. Start with Ki off, and only add it if you see consistent drift after 10+ cycles.
Another thing: if you’re working with a servo that has a “gain scheduling” feature, use it. Gain scheduling lets you set different Kp and Kd values for different speeds or loads. For example, a robotic arm might need higher gain when moving light parts and lower gain when moving heavy parts to avoid stress on the motor and gears. This is super common in manufacturing, but it’s an advanced step, so don’t worry about it until you’ve nailed the basic Kp/Kd setup.
Let me wrap this up with a real example, because numbers make this stick. Last month, I worked with a client who runs a small packaging line for bakery products: they use a servo motor to push 500g bread loaves into boxes, moving at 200 mm per cycle, 20 cycles per minute. Their old gain settings were Kp at 50%, Kd at 2%, and they were getting jitter that made 1 in 20 loaves misaligned in the box, costing them $1,200 a week in scrap. We reset to factory defaults, set Kd to 0, bumped Kp up to 78% until we saw a 1mm overshoot, then added Kd to 12% to eliminate that overshoot. No Ki needed. After that, misalignment dropped to almost zero, and they saved over $4,000 in the first month. That’s the difference between a little gain adjustment and throwing money away on scrap.
If you’re still stuck after following these steps, don’t guess your way through it. Every servo system is a little different, and factors like lead screw pitch, belt tension, and even the length of the motor shaft can change gain needs. We supply a wide range of servo motors and controllers for every application—from small 3D printer servos to heavy-duty industrial palletizer motors—and our team of automation specialists can walk you through a customized gain setup, no fancy engineering degree required. We don’t just sell parts; we help you keep your line running smoothly, because we’ve been in your shoes, fixing these exact problems after hours and on weekends.

Don’t let a simple gain setting derail your production. Take 30 minutes this week to go through these steps, test with your actual load, and dial in your gains. If you hit a wall, reach out to our team for help—we’re here to make servo motors work for you, not against you.
Robot Joints References
- Bolton, W. (2015). Control Systems: Fundamentals and Applications. Routledge.
- Kuo, B. C., & Golnaraghi, F. (2017). Automatic Control Systems (11th ed.). John Wiley & Sons.
- Omron Corporation. (2022). Servo Motor and Controller Setup Guide. Omron Industrial Automation.
- Yaskawa Electric Corporation. (2021). Sigma-7 Series Servo Parameter Tuning Manual. Yaskawa America, Inc.
Hangzhou Zhongda Motor Co., Ltd.
We’re well-known as one of the most professional servo motor manufacturers in China, also support customized service. Please feel free to buy bulk high quality servo motor made in China here from our factory. Contact us for pricelist.
Address: NO 111.Dalingshan Road,Yinhu Street,Fuyang District,Hangzhou City,Zhejiang Rrovince,China.
E-mail: admin@hz-zhijue.com
WebSite: https://www.zdservo.com/