double pid loop ?
19 Jul 2016 18:19 - 19 Jul 2016 18:19 #77667
by vre
Replied by vre on topic double pid loop ?
no i have not tunned yet the drives now iam reading manual how to tune.
thank you.
thank you.
Last edit: 19 Jul 2016 18:19 by vre.
Please Log in or Create an account to join the conversation.
24 Jul 2016 03:20 - 24 Jul 2016 03:23 #77898
by vre
Replied by vre on topic double pid loop ?
Last edit: 24 Jul 2016 03:23 by vre.
Please Log in or Create an account to join the conversation.
24 Jul 2016 03:41 - 24 Jul 2016 13:55 #77899
by PCW
Replied by PCW on topic double pid loop ?
If you get a error proportional to velocity it means FF1 is wrong
( or equivalently FF1=1 and either the input (encoder) or output ( step) scales or both are wrong )
Edit I think I'm wrong its not a FF1 problem (because it ends up in the right place even with no feedback)
But it may be that you have set your acceleration faster than your drive settings can follow
Or perhaps the drive has a long delay from step input to actual motion.
This might be due to some filtering option on the drive that you can disable
Also, with velocity mode and encoder feedback you _MUST_ have some P or you will get long term drift
( or equivalently FF1=1 and either the input (encoder) or output ( step) scales or both are wrong )
Edit I think I'm wrong its not a FF1 problem (because it ends up in the right place even with no feedback)
But it may be that you have set your acceleration faster than your drive settings can follow
Or perhaps the drive has a long delay from step input to actual motion.
This might be due to some filtering option on the drive that you can disable
Also, with velocity mode and encoder feedback you _MUST_ have some P or you will get long term drift
Last edit: 24 Jul 2016 13:55 by PCW.
The following user(s) said Thank You: vre
Please Log in or Create an account to join the conversation.
25 Jul 2016 01:55 #77959
by vre
Replied by vre on topic double pid loop ?
Please Log in or Create an account to join the conversation.
25 Jul 2016 02:05 - 25 Jul 2016 02:10 #77960
by PCW
Replied by PCW on topic double pid loop ?
P would make a lot more sense (and as I say without P you _will_ have drift)
But the error is so huge that it indicates something is fundamentally wrong
probably in the drive setup
it almost looks like there is a 50 ms or so delay from steps to feedback position
But the error is so huge that it indicates something is fundamentally wrong
probably in the drive setup
it almost looks like there is a 50 ms or so delay from steps to feedback position
Last edit: 25 Jul 2016 02:10 by PCW.
Please Log in or Create an account to join the conversation.
25 Jul 2016 04:10 - 25 Jul 2016 04:22 #77961
by vre
Replied by vre on topic double pid loop ?
You are right something is wrong with the drive.
But i think i found it (manual is crap in chinese and iam using auto translator)
1)disabled an S shaped filter
2)set position loop feedforward gain to 100% from 0%
results with p/i/d=0 FF1=1
Now its time for fine tuning...
I have ordered and one analog servo mesa card for speed mode loop and i think i will get better results with this setup.
But i think i found it (manual is crap in chinese and iam using auto translator)
1)disabled an S shaped filter
2)set position loop feedforward gain to 100% from 0%
results with p/i/d=0 FF1=1
Now its time for fine tuning...
I have ordered and one analog servo mesa card for speed mode loop and i think i will get better results with this setup.
Last edit: 25 Jul 2016 04:22 by vre.
Please Log in or Create an account to join the conversation.
27 Jul 2016 06:05 - 27 Jul 2016 06:07 #78061
by vre
Replied by vre on topic double pid loop ?
I have observed a strange behavior...
My scales for encoders and step generators are 10000 for 1 mm
so if i give G0 1 it means 1mm distance and 10000 pulses from step generator
but i read with halmeter hm2_5i24.0.0encoder.00.count pin 10001 pulses.
Linuxcnc sends more pulses about 1 pulse more every 10000 and sometimes linuxcnc sends pulses when no command executed .
I have closed loop step-dir with p/i/d/ff0/ff2=0 ff1=1 .
(If i add some p i get exact the pulses i give with some time delay and some oscillation and no drifting)
In open loop step dir if i give G0 1 i read with halmeter hm2_5i24.0.0encoder.00.count pin 10000 pulses exactly and no drifting.
I have in open loop step-dir p=1000 i/d/ff0/ff2=0 ff1=1
It seems that the servos working more normal in open loop.
Can i configure linuxcnc open loop step dir and have encoders only as dro and no as full closed loop ?
My scales for encoders and step generators are 10000 for 1 mm
so if i give G0 1 it means 1mm distance and 10000 pulses from step generator
but i read with halmeter hm2_5i24.0.0encoder.00.count pin 10001 pulses.
Linuxcnc sends more pulses about 1 pulse more every 10000 and sometimes linuxcnc sends pulses when no command executed .
I have closed loop step-dir with p/i/d/ff0/ff2=0 ff1=1 .
(If i add some p i get exact the pulses i give with some time delay and some oscillation and no drifting)
In open loop step dir if i give G0 1 i read with halmeter hm2_5i24.0.0encoder.00.count pin 10000 pulses exactly and no drifting.
I have in open loop step-dir p=1000 i/d/ff0/ff2=0 ff1=1
It seems that the servos working more normal in open loop.
Can i configure linuxcnc open loop step dir and have encoders only as dro and no as full closed loop ?
Last edit: 27 Jul 2016 06:07 by vre.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
27 Jul 2016 13:18 - 27 Jul 2016 14:20 #78066
by Todd Zuercher
Replied by Todd Zuercher on topic double pid loop ?
That would be normal and expected behavior for a closed loop system. All servos will have some error of at least a few encoder counts. Whether or not you run the system open or closed loop in Linuxcnc I would be very surprised if the actual following error of the servo is much different.
You didn't say what your P term numbers were when you were testing closed loop. They likely will be something less than the 1000 that you use when running open loop (they have to be because of delays and reaction times of the mechanical system vs. the near perfect reaction of the open loop) but it also needs to be >0. Figuring out what the ideal numbers should be is servo tuning.
You can run it open loop and still use the encoder feedback for DRO and more, just connect the encoder position feed back (hal pin something like hm2_5i25.0.encoder.00.position) to the axis.N.motor-pos-fb, but keep the stepgen position (and velocity) feedbacks connected to the PID loops.
You didn't say what your P term numbers were when you were testing closed loop. They likely will be something less than the 1000 that you use when running open loop (they have to be because of delays and reaction times of the mechanical system vs. the near perfect reaction of the open loop) but it also needs to be >0. Figuring out what the ideal numbers should be is servo tuning.
You can run it open loop and still use the encoder feedback for DRO and more, just connect the encoder position feed back (hal pin something like hm2_5i25.0.encoder.00.position) to the axis.N.motor-pos-fb, but keep the stepgen position (and velocity) feedbacks connected to the PID loops.
Last edit: 27 Jul 2016 14:20 by Todd Zuercher.
Please Log in or Create an account to join the conversation.
27 Jul 2016 14:10 #78070
by PCW
Replied by PCW on topic double pid loop ?
If you have no P, you are guaranteed that the counts will be off by a small amount
(an over a long time can be off by any amount, there is no limit)
If you cannot use any P without oscillation, this suggests that the drive still has a large lag between command (step pulses)
and actual motion (or delay in reporting the encoder count) So it may simply be not suitable for external closed loop control
(an over a long time can be off by any amount, there is no limit)
If you cannot use any P without oscillation, this suggests that the drive still has a large lag between command (step pulses)
and actual motion (or delay in reporting the encoder count) So it may simply be not suitable for external closed loop control
Please Log in or Create an account to join the conversation.
27 Jul 2016 22:16 - 27 Jul 2016 22:48 #78084
by vre
Replied by vre on topic double pid loop ?
Last edit: 27 Jul 2016 22:48 by vre.
Please Log in or Create an account to join the conversation.
Time to create page: 0.140 seconds