Jeshua Lacock wrote: > Actually, I really have only been using open-loop mode. > Since we had confusion here, open loop means LinuxCNC does not see movement when you move the motors. > I am a little confused however because changing the PID settings still seems > to affect the drive. > Yes, even in open-loop, the PID component is processing the difference between commanded position and the counted step pulses being issued. The stock PID values in the sample config are generally OK, but for certain INPUT_SCALE values you may get roughness in the step pulses. Examining this with Halscope should let you see this if it is happening. Just look at ppmc.0.encoder.00.delta (or whatever axis you are working with). Generally reducing P might help make it smoother. I wouldn't spend a lot of time tuning the open-loop mode, just tweak it a bit to get rid of rough timing and get the Gecko drives tuned. > I do have the drives working stably, just the X gantry is underdamped unless > I turn the acceleration way down. > Acceleration doesn't affect stability, what you are seeing is higher acceleration excites a marginally stable system so that the (in)stability is revealed. > But as soon as I try closed loop mode, I get a ton of noise and the drive is > super jittery. It starts nearly stable but seems to run away until it faults. > When I say run away it becomes increasingly jittery. > So, reduce P, and reduce I and D proportionally. You can reduce P to 1.0 and I and D to zero to start out, and then increase P just until you get movement. Make sure it is moving the right way to null out error, then increase P in modest steps until you get controlled movement. Error will remain a bit large at this point. Then, increase P until you get some vibrations, and add a bit of D to improve stability.
And, it may be that you are having feedback from the G320 drive's PWM outputs to the encoder cables. This may be what is causing the "increasingly jittery" effect. Do you have shielded encoder cables? Are you using US Digital encoders that are known to be noise sensitive? You may need to use shielded motor power cables as well. The G320 has no filtering on the outputs, so whatever your DC supply voltage is, that is being chopped at 20 KHz by the G320, producing ~70 V pulses with 100 ns risetime edges continuously on the motor wires. That's why I put an LC filter on the output of all my drives to prevent this type of interference. > > The sample .ini file uses two different values for 2 different axises. > > When you say low P settings, what would you start with? And what I and D is > good to start with? > > Also, what would you consider small steps to increase for P, I and D? > > You can go as low as 1.0 for P, and zero for I and D. You can leave I zero all the time, but as you raise P, you will need some D. Too much D can be disastrous. It takes instantaneous following error and compares it to the following error last servo period. This can have large fluctuations due to the position quantization of the encoder PLUS the time quantization (sampling) of the encoder reading. So, there is a HUGE amount of noise in this D term at 1/2 the sampling rate. So, you want to use just enough D to help smooth out the response. I usually increase D by 20% steps when I don't know what to expect, and maybe 50% when I have a good idea where I will run into instability. Have the E-stop button handy. Don't worry about I during tuning, it has minimal effect on stability. D is more sensitive. I typically find D needs to be between 5 - 10% of P, not sure if this number applies as much to the G320/USC setups. A rough set of number I use when testing the Gecko Interface board with an old G320 drive and small motor is : MAX_VELOCITY = 1.20 MAX_ACCELERATION = 20.0 PID_MAX_VEL = 1.25 BACKLASH = 0.000 INPUT_SCALE = 4000 OUTPUT_SCALE = 1.000 MIN_LIMIT = -10.0 MAX_LIMIT = 10.0 FERROR = 0.0100 MIN_FERROR = 0.05 DEADBAND = 0.0007 P = 200 I = 2 D = 5 BIAS = 0 FF0 = 0 FF1 = 1.2 FF2 = 0.0045 > When the error spikes, wouldn't that also indicate that it needs more gain > and or damping? > If the drive has suddenly run out of torque (current limit) or voltage (hit the DC supply voltage) there will be a sharp discontinuity. No amount of tuning can fix either of these conditions, they are noit control loop issues, but speed/power issues due to the power stage maxing out. You should never set up the system so that it hits either of these limits in normal operation. They represent a sharp discontinuity of the mechanical response of the motor/machine slide, and will necessarily sharply upset any attempt of the control loop to keep things smooth, as the system has effectively gone open-loop. > Note that I am using pulleys and timing belts for all my axises except for > the Z. > > I see. Currently my main gantry moves about 2 inches for one motor rotation > (which is geared 4:1). I just ordered Kelling's 5:1 planetary gear which > would make it geared 20:1 with the current pinion (12 tooth) or 10:1 with a > 24 tooth pinion... > OK, that is not geared down very much. I'm much more familiar with metal-cutting machines, on my Bridgeport mill the motor turns 7.5 times per inch. On my minimill, the motor turns 64 times per inch, which is probably too high a reduction, but it works with pretty weak motors. Jon ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users