On May 20, 2012, at 7:08 PM, Jon Elson wrote:

> 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.

Hi Jon,

That is correct.

>> 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.

Thank you so much for this! I was starting with the default settings in the 
.ini file.

Putting these numbers in immediately made the drive stable - even in closed 
loop which is now what I am tuning.

I was able to get the P up to 150. I can add some D, but it seems that it only 
makes the drive more jittery without decreasing the error.

Can you tell me what exactly is the goal? Do I want the P as high was possible 
while keeping it stable? In other words, why not just leave P at 50 or 100 and 
be done with it?

> 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?

Yes. Do the shields need to be grounded to be useful?

> Are you using US Digital encoders that
> are known to be noise sensitive?  

Not on this first axis I am trying to tune. It is a Renco. My other two axises 
are US Digital, but those will be replaced by CUI AMT102 encoders when I get 
around to installing the new much more powerful motors for the other 2 axises.

> 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.

I just went ahead and ordered some differential encoder/decoders just to be 
safe. Due to the size of the machine they are pretty long cables, I would guess 
around 15 feet.

Also, I routed my motor power lines as separately as I could. My encoders exit 
the machine on the left side and the power on the right.

>> 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

What is the goal with I once P and D are good?

> 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

Interesting, I can't seem to get D anywhere near that high. With P at 150 or 
200, it gets real jittery with a D of over 0.5.

>> 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.

I see. So when I am tuning, I should start out with a modest acceleration 
factor, then bump it up until I see a spike?

>> 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.

Yeah, I think the 5:1 gear box will get me somewhere in the same neighborhood 
as your Bridgeport. 

My motor is definitely not weak though it is a 1125 oz-in Peak 90V/40A.

Besides much more torque, I will be getting much better resolution. Just 
dithering I am currently at 0.002+ inch, and currently when I rapid I am 
getting an error of around 0.01. I think when I gear it down I could get that 
closer to 0.001...

Thanks again! You really got me feeling much better about tuning it went from 
scary to feeling like I am almost in command now!


Best,

Jeshua Lacock
Founder/Engineer
3DTOPO Incorporated
<http://3DTOPO.com>
Phone: 208.462.4171


------------------------------------------------------------------------------
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

Reply via email to