Position control ignores feedback position

Moderators: TomKerekes, dynomotion

User avatar
TomKerekes
Posts: 2527
Joined: Mon Dec 04, 2017 1:49 am

Re: Position control ignores feedback position

Post by TomKerekes » Fri Jun 04, 2021 6:10 pm

Hi Roger,
The motion was 50mm.
That indicates that the motor step resolution is 0.5um.

Just to make sure we're on the same page, the SureServo is using its own position feedback on its internal rotary encoder to close the motor position loop.
The SureServo has been tuned so that it has its own Feed Forward Gain set to give <10microns following error while it's performing the Step Response here.
The Step & Direction input it's receiving is just the desired position it's trying to control to. This is a closed loop system in itself
Yes understood. This is important and necessary. Trying to control using only linear scale feedback is problematic. For example if there is backlash then the motor can move without any information coming about it from the linear scales. So a dual loop approach like this is necessary. Ironically simple steppers can work well as they have inherent positioning capability without feedback.

and is probably why the accelleration isn't an issue.
No if KFLOP commands too high acceleration there isn't anything the SureServo can do to correct that other than not doing what it was told to do and have a large error.

The reason the acceleration is not increasing is because the motion is Jerk and velocity limited. Jerk is the rate Acceleration is applied. Imagine your in a car and are told you can only very slowly apply acceleration and are told to drive 30mph. After reaching 15mph with the accelerator only slightly depressed (ignoring friction) you will need to start releasing the acceleration otherwise the 30mph limit will be exceeded before you can get off the gas.

There is a program included with KMotion called TripsWPF.exe that can help you better understand Jerk, Acceleration, Velocity, and Distance. You might watch the related video.

Here is TripsWPF with your parameters entered. Notice the Acceleration ramps up to ~ 750,000 but then must begin to ramp down:

TripsWPF.png
I only changed the input gain to 2 because I was originally running the config with Step & Direction, not CL Step. I had to change it then so it moved the right distance. Maybe that's wrong now it's using CL Step?
Again changing the Input Gain wouldn't have any effect on the distance moved regardless of whether it was Step Dir mode or CL Step. Input Gain only has to do with how the distance actually moved is measured. Because the Step Resolution seems to be 0.5um and the Encoder Resolution is 1.0um, the Input Gain needs to be 2 to match and so that when moving 50mm it also reads 100000 counts.


Anyway, here is the data with the feed forward set to zero.
Good. Here is the error plot that the linear scales are seeing with an open loop move (from KFLOP's perspective based on the linear scales). Max errors are ~90 steps (45um) when moving and ~30 steps (15um) when stopped



Error.png
I don't understand why the output is now a straight line. What does the Output represent?
Because the PID gains and FF gains are all zero no corrections are being made. So the output is always zero. The Output (using the right side scale) indicates how much correction is being made in motor steps.

The next step would be to add PID gains, Low Pass filter, or FF gains to see if you can reduce the errors. Usually a small amount of I gain (ie 0.001) is most useful.

I'm using the Move button on the Step Response screen. The Step function doesn't move the axis, so I don't know what that's used for or how to move the axis with that.
Just use the Move button. From a theoretical control theory standpoint Step Responses can be useful to understand a system. But in reality specifying a large instantaneous step of infinite Velocity, Acceleration, and Jerk will just result in a fault. If you do use it it should be a size of only a few steps to see how the system would respond to a sudden small error.

The motion profile acceleration figure doesn't seem to affect the Command curve beyond A=1e6 When I set it above that, the steepness of the Command curve doen't increase. I don't think this is stretching the AC Servo acceleration performance to the limit.
As I tried to explain above you will need to increase Jerk or Velocity to ever reach higher acceleration. A normal setting for Jerk is 10X the Acceleration so the full Acceleration is applied over 0.1 seconds. Not 7hrs as the current parameters :)

HTH
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply