r/PLC • u/The_Only_Abe • 22d ago
Engineering Question AB Servo Help

Hi, this is my first servo project and I can't seem to figure out why my servo's current command spikes near the end of the deceleration portion of a move, causing the motor to lurch forward even while it is moving. I expect it in the acceleration but is it wrong to assume that current would dwindle during a deceleration? I am using a VPL-A0752E-PJ12AA servo with a Kinetix 5500 2198-H008-ERS drive. There are no machine actions that happen when the conveyor is moving and, as you can see, it doesn't seem to matter if it is a long move or a short move, the current spikes just the same, causing a lurch. Has anyone else seen something like this?
2
u/Profibussin 22d ago
What steps have you gone through to setup the drive? What steps have you taken to troubleshoot the issue?
Have you tuned the drive? Please see this manual if you haven't.
3
u/The_Only_Abe 22d ago
I have been tasked with making this servo stop lurching so I didn't set this up. From some of my research, it looks like the drive is undersized just based on the frame size of the motor. Like T-Pain, I've used the autotune on this drive while under a simulated load. I have made sure there wasn't any electrical noise and that everything is properly grounded, there isn't any mechanical interference as the conveyor belt moves freely. I've played with the accel/decel to help eliminate position hunting but nothing has worked. This is part of my last efforts before I deal with Rockwell directly.
1
u/TowelDelicious222 22d ago
Does it still lurch if you use straight MAM commands, or while jogging with MAJ command?
2
u/The_Only_Abe 22d ago
I ran a MAM move and it moved exactly how I expected it to, nice and smooth with no lurch. So now I am going to focus on the AOI that this motion is being ran through.
3
u/Profibussin 22d ago
Sounds like a good place to start. If you can run it well with a manual MAM that means the automated control is not sending the correct motion commands, or those motion commands are parameterized incorrectly. Perhaps there are also overlapping motion commands being given to the drive?
2
u/The_Only_Abe 22d ago
That is what I thought too. I'm investigating now
1
u/No_Meet_6364 21d ago
What is the AOI you mentioned supposed to accomplish?
Sometimes when people write cams and use something like cubic interpolation there’s spikes because of the way the math and motion planner work out so you could see stutters if it’s not a smooth path.
I agree too there could be some unexpected motion if the commands internally are overlapping or something along those lines.
1
1
u/Jholm90 21d ago
Check your torque limiting. This is a deciding factor in the planner. If you ask for X decel it won't meet that target if torque is limiting. We set stuff like this to 150-300% in some cases depending on target ramping. Exact issue you're describing with velocity changing in the middle of the move.
Other thing to look at is Jerk but that's only kicker for your acel/decel curves not during constant speed unless payload is changing and requires additional power and jerk to catch up.
1
1
u/beckes91 22d ago
If it is geared to a virtual axis, it is also on stop ramp? Maybe you are commanding virtual axis to do a fast stop and the physical motor overshoot.
1
u/CapinWinky Hates Ladder 16d ago
I'm late to this party, but I have a lot of experience with the deep magic of servo control. All of this information is applicable to Rockwell at some level, but not all of it is actionable on Rockwell and you just have to accept those limitations.
Latency on Everything
The servo drive closing the loops has a loop cycle time (usually about 50µs)
That latency trickles down from current, torque, velocity, and position loop cascade
The encoder feedback has a delay between where the encoder was and when that position is recognized by the drive.
Nothing Measures Speed
Encoders aren't speed measurement devices. You are always integrating to measure speed and double integrating to measure acceleration. Instantaneous speed or acceleration values mean nothing because they do not actually exist. You know that Velocity Error tolerance value you can put in the axis settings for Rockwell? By default it faults after 0 seconds and that is stupid. Click the Parameter button and set the velocity error time to more than 0 seconds instead of just setting the allowed error to a huge number.
Anyway, loops that use/control velocity are always averaging things over time.
Correction Requires Error
For the position gain to output torque, you need to first have position error, which is bad. That is why there is feedforward for accel and decel. You just assume it's going to need some extra ass to start and stop before things fall behind and avoid that error altogether.
So, from all that you can start to see why you might have a random current spike when your position error isn't all that bad.
Maybe your feedforward is doing exactly what it should and giving a burst of current to avoid error during decel.
Maybe your feedforward is off and you end the decel with some error and some very tight position control tuning values are kicking in for the final correction.
Maybe your Hiperface DSL encoder latency is telling your drive that your motor is still at X at the end of the decel, but it's really at Y already, so your drive briefly thinks there is error when there isn't, but the slow as shit Ethernet/IP update rate isn't capturing this 100µs position error spike because it is only recording at 4ms resolution.
Rockwell doesn't have a parameter for this.
From experience, I can tell you these are classic spikes for the start/end of accel decel and completely normal. The aforementioned encoder latency adjustment is first used so that the reported error reflects reality, then you use feedforward to reduce the real position error. Since Rockwell does not allow alignment of the encoder feedback latency with loop action, some fake error spikes will always be there, but you can use feed forward still to reduce the real-world position error.
In case you were wondering how other motion control systems correct for encoder latency and what that even means, here's the deal.
You motor really is somewhere now. The encoder is behind the times and telling you where your motor was 0.8ms ago; let's assume that's 3mm away from where it really is now. Your motor actually is 0.1mm away from where it should be. You're drive knows where your motor is commanded to be right now and where it should have been at every moment along its path because that's what drives do.
You don't want your drive trying to correct for 2.9mm of error that isn't real based on old position information, so what do you do? You could estimate where the motor really is based on the speed of the motor and the 0.8ms latency, but what if you are changing speed all over the place for a robot joint or something? No, you look 0.8ms back in time on the commanded position to see where the motor should have been at the time that encoder position actually happened and you correct in the present based on that. Not perfect, but it is better than trying to predict the future.
3
u/No_Meet_6364 22d ago
It’s hard to say without the application info. A common cause for this might be some slop in the mechanical system somewhere.
Other stuff that would be of interest is looking at your jerk profile and how the stopping is happening - e.g. what the commanded stop dynamics are.