PID tuning when you have a tuned Servo in CSP mode?

More
1 year 3 months ago #331139 by jhandel
I am building out POC with Teknic ClearPath EtherCat servos and so far the Cia402 driver is working great.. I have a question around PID tuning.

I ran around in circles trying to get the right P, I, D, FF, FF1, FF2, etc settings and couldn't get the servo anywhere near its limits before it would fail out with a joint follow error.  

I got rid of all the PID settings and now it won't fail on following but it runs a f-error of about 5.8 when I do some long mock moves (the 5.8 on the scope is a nice trapazoid shape with a ramp up, flat top and a ramp down.. )

So folks with servos that have their own internal control-loop, how do you configure your PID or tune so that when you have 3 of these guys going their combined f-errors don't cause you to make wonky parts? 

Thanks in advance..  Since this is mostly a theory question I'm not posting configs, but happy to if folks ask. 

Please Log in or Create an account to join the conversation.

More
1 year 3 months ago #331161 by jhandel
finding a thread from like 2023, it looks like what I am seeing is processing delay between ethercat and where LinuxCNC thinks things should be... The actual servo error rate (according to its software's scope) is less than 4 steps out of 1280 steps per mm)..

I did some napkin math and 5mm ferror suggests a processing delay of .0083 seconds. Does that sound reasonable or should I be looking somewhere to bring that delay down?

Thanks

Please Log in or Create an account to join the conversation.

More
1 year 3 months ago - 1 year 3 months ago #331171 by Hakan
One line of thought, not the only one for sure, is to run the servo without a linuxcnc control loop. The drive tuning is what determines the precision.

There is unfortunately a delay in the linuxcnc Ethercat loop of one or two cycles, I think two.
So the actual position is old already. At high travel speeds the following error can be two cycles times multiplied by the speed off.
Without it being wrong in any way, just by delays.
Last edit: 1 year 3 months ago by Hakan.

Please Log in or Create an account to join the conversation.

More
1 year 3 months ago #331206 by jhandel
if my math is right and I am reading ferror right, I am running 36000mm/m which works out to 600mm/s and an ferror of 5 (well 4.94ish, but close enough).

5/600 = .008333333 But I am running my loop at 500000 if I have configured things right so 2 round trips should be .001ish... makes me think that something else is up in that lag....

Does EtherCat time code movements so that multiple axis would all move at the right time to each other and be at the right place regardless of what LinuxCNC sees back as the time delay?

Thanks

Please Log in or Create an account to join the conversation.

More
1 year 3 months ago #331347 by endian
Hi

Ethercat is by the developers build as written outs first and then reads inputs .. theoretically there it is a single cycle lag.. but when you have constant timing and very little cycle time it is not big deal..

If you want use pid control from lcnc you will have to use your driver in the CSV mode and do the differential counting in the lcnc itself.. regular pid tunning as with mesa cards analogs etc..

if you are running the drivers in the CSP mode, driver calculated stuff internally by known time period of the ethercat bus .. here is lcnc just a position sender and you have to tune the driver itself internally

Have a look at driver timing setup 60C2 register .. if you periods are same everywhere it can produce your lag easily

Please Log in or Create an account to join the conversation.

More
1 year 3 months ago #331373 by Hakan
Linuxcnc servo cycle is not synchronized with the ethercat cycle. That adds an extra cycle delay.
 
The following user(s) said Thank You: endian

Please Log in or Create an account to join the conversation.

Time to create page: 0.116 seconds
Powered by Kunena Forum