- Posts: 189
- Thank you received: 0
PID issues or calibration help
tommylight wrote:
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).gmouer wrote:
tommylight wrote: 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.
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 to join the conversation.
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 to join the conversation.
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
Please Log in to join the conversation.
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
.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.
Attachment not found
Please Log in to join the conversation.
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 to join the conversation.
- tommylight
-
- Away
- Administrator
-
- Posts: 22012
- Thank you received: 4
That is the normal behaviour of velocity mode servo drives, they do drift slowly when enabled and no signal is applied to the input.hatch789 wrote: 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.
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 to join the conversation.
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 to join the conversation.
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 to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
-
- Posts: 4739
- Thank you received: 2
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 to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
-
- Posts: 4739
- Thank you received: 2
Please Log in to join the conversation.
