PID issues or calibration help

More
01 Jan 2019 23:56 #123299 by gmouer

Have a read through this, it has much more details:
forum.linuxcnc.org/10-advanced-configura...ning-detailed-how-to


I looked through that how-to and seen one concern. The procedure calls for tuning P first THEN FF1. PCW has always said that FF1 was the main acting element and should be tuned first for velocity loops. My tuning adventures concur with tuning FF1 first, then moving on to P.

I do not recall ever reading something like tuning FF1 first then P. That will almost never work ( only on some cases where the default P value is near to what is needed for that machine).
You have to tune the P value to get some stiffness on the motors so they can manage to get to the commanded set point, otherwise it will be near impossible to tune anything.
PCW mentioned several times that you can calculate and set the FF1 value even without any tuning if there are certain parameters known before hand, then tune the P and in some cases also I and D values.
But first make sure you have the scaling right.


Did you read PCW's post above? A very small P value is used then FF1 is tuned first. If P is done first it masks the effect of FF1 which is the main driving force in a velocity loop ( correction: FF1 SHOULD be the main driving force, it does the majority of the work)

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

More
02 Jan 2019 05:22 #123308 by hatch789
I spent about 8 hours on this over the past 3 days and it's driving me batty. I may however try the new thing I just gleaned from this statement emphasizing a very small P value. so right now my P is set to 25. But if I use 1 for P then I might see FF1 making a much larger difference. So I can try that.

Is there any good information somewhere about how to adjust I and D values? I am having a problem with my follow error being too large. It goes up (or down depending on direction) when I move and then comes back down when I release the jog. In all of the articles it indicates that you can move the servo without it really moving the follow error much ...but only when you have it tuned. So I imagine my f-error is due to the fact that I don't have things tuned as I should.

I'll try to get some video for you guys tomorrow to see if anyone has some advice for me.

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

More
02 Jan 2019 13:30 - 02 Jan 2019 13:31 #123327 by PCW
Replied by PCW on topic PID issues or calibration help
If you have properly tuned velocity mode drives you should not need any D
and I should only be used to remove small static errors when tuning is very close to optimum (that is no D and especially no I when doing initial tuning)

Are you sure you have velocity mode drives and that they are working properly?

Velocity mode drives should hold position (resist external forces) with
zero commanded velocity (set P=0 to test)
Analog velocity mode drives may drift slowly with 0 commanded velocity
so dont leave unattended with 0 P
Last edit: 02 Jan 2019 13:31 by PCW. Reason: fix P sb D

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

More
02 Jan 2019 14:37 #123333 by hatch789
Mine drift very slowly with drives enabled (servos on at the machine) but linuxCNC turned off. I can balance them with a little POT screw and get them to stop but as the analog driver boards warm up more then they might drift again. So if I re-adjust they're fine and hold until next day when I restart and they are cold. So I just deal with a very slow drift about .0010" per minute but I keep the servos offline until I engage LinuxCNC so it's not an issue. No point to constantly messing with balance depending on whether or not the driver boards are warm or cold.

These are old Westamp 30059 Analog drives. I do have adjustment I can do for TACH and CW and other things but I hate to go messing with that stuff unless we know that's where my problem lies. I did notice my driver boards are +/- 15v and my ini file is set to OUTPUT_SCALE 10 and MAX_OUTPUT 10 so that could be an issue if I'm not giving the full voltage range? The early testing I did with a "battery box" (two 9v batteries and a POT) allowed me to move the servos back and forth no problem. So maybe only using up to 10v is fine because the servos certainly move FAST when I give them full signal. -But correct me if I'm wrong here, isn't the signal we give a PWM signal and not a voltage variation?

Any help from those knowledgeable in these types of drives is appreciated. I am also happy to do a skype session if it's easier to work on this stuff interactively with someone. On a side note cncbasher had D=.0025 in my file originally and testing seems like it helps to smooth things out a bit with a tiny bit of D as I play with giving some up to maybe .01 or less. Too much and it jitters.

There is a procedure to put a floating scope on the TACH and watch the waveform. I may try that to see just how "tuned" my drives are in general because that could be a lot of my issue.

This browser does not support PDFs. Please download the PDF to view it: Download PDF

Attachments:

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

More
02 Jan 2019 14:47 #123334 by PCW
Replied by PCW on topic PID issues or calibration help
Analog drives typically use +-15V power supplies because the power supply must be greater than the analog circuitry's input and output ranges. Almost all analog drives are +-10V

The signal sent to the drive is Analog, not PWM

Can you post a plot of the following error + commanded velocity? This would help to diagnose the tuning problem.

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

More
02 Jan 2019 14:50 #123335 by tommylight

Mine drift very slowly with drives enabled (servos on at the machine) but linuxCNC turned off. I can balance them with a little POT screw and get them to stop but as the analog driver boards warm up more then they might drift again. So if I re-adjust they're fine and hold until next day when I restart and they are cold. So I just deal with a very slow drift about .0010" per minute but I keep the servos offline until I engage LinuxCNC so it's not an issue. No point to constantly messing with balance depending on whether or not the driver boards are warm or cold.

That is the normal behaviour of velocity mode servo drives, they do drift slowly when enabled and no signal is applied to the input.
But if they are drifting while Linuxcnc is not active and enabled, that is very dangerous and should be addressed immediately, they should be enabled ONLY after enabled from Linuxcnc ( by pressing F2 ). The way you have it Linnuxcnc has no means of disabling the drives in case of run-out of any other mishap while tuning or otherwise.

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

More
02 Jan 2019 15:42 #123336 by PCW
Replied by PCW on topic PID issues or calibration help
Thanks for adding that reminder

This is basically the first and most important thing to get working on servo retrofit
(other than hardware only Estop circuitry which must work independently of the control)
Drives must only be enabled when LinuxCNC is running and in the machine-on state

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

More
02 Jan 2019 15:44 #123337 by hatch789
Hi PCW, Yes I can post a pic this evening of command velocity and f-error on the halscopoe together.

Hi Tommy, you're right but I have not tackled that beast yet. The E-STOP on my mill is how I kill the servo drives and it's right beside me. So I just hit it in case I need to. But as I said the drift on the servos is only 0.0010" per minute so no danger there when P = 0. Basically while tuning I can just press F2 and kill power on LinuxCNC to make a new change to servo tune and it's been working fine for me for 3 days. I have the analog drives tuned well (I think) so they are fine without an input signal from LinuxCNC.

I would love to figure out how to tie my RESET button on the machine into the F2 button on LinuxCNC. That RESET button on my mill is how I turn my servos on and make them active. Likewise it would be nice to have it do an E-STOP on the mill when I press the ESTOP in LinuxCNC or even just when I toggle the F2 off. I'm not sure how people generally have it setup.

I have to test it but I think my spindle will also NOT spin unless I hit RESET. So that reset enables spindle and servos I believe.

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

More
02 Jan 2019 16:19 #123339 by Todd Zuercher
All of that should not be hard to figure out with the wiring schematics. Figuring out and connecting all of those things is part of doing a proper machine integration.

I usually keep e-stop and machine enable (F2) separated, so that setting an E-stop in Linuxcnc triggers the machines mechanical E-stop (and visa-versa), but disabling the machine with F2 does not set the E-stop. Setting the E-stop in Linuxcnc automatically disables it so that after the E-stop is cleared the machine must also be enabled (F2).

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

More
02 Jan 2019 16:41 #123341 by Todd Zuercher
You should be able to keep your external "reset" button, and use it, just by connecting it to an input to Linuxcnc so that Linuxcnc knows that the machine has been enabled and disabled. Exactly how you would want to do the hal connections for this will depend on how your hardware is set up.

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

Time to create page: 0.089 seconds
Powered by Kunena Forum