On Tue, 8 May 2012, gene heskett wrote: > Date: Tue, 8 May 2012 16:33:06 -0400 > From: gene heskett <[email protected]> > Reply-To: "Enhanced Machine Controller (EMC)" > <[email protected]> > To: [email protected] > Subject: Re: [Emc-users] PID controller Q's > > On Tuesday, May 08, 2012 04:26:08 PM Peter C. Wallace did opine: > >> On Tue, 8 May 2012, gene heskett wrote: >>> Date: Tue, 8 May 2012 15:45:11 -0400 >>> From: gene heskett <[email protected]> >>> Reply-To: "Enhanced Machine Controller (EMC)" >>> >>> <[email protected]> >>> >>> To: "Enhanced Machine Controller (EMC)" >>> <[email protected]> Subject: [Emc-users] PID controller >>> Q's >>> >>> I currently have the commanded spindle velocity, NDI if it is supposed >>> to be rpms or what, essentially being fed thru the abs function >>> directly into the pid.0.command input. >>> >>> I am sending the encoder.0.velocity thru the abs function also then >>> into pid.0.feedback. This voltage on the hal meter is noisy but >>> visually averages someplace in the 3 to 5 range, which I believe is >>> about 2x the real speed it is turning in rps, and is not majorly >>> modifiable by the plus and minus buttons on the gui, which issue 1 to >>> 1101 numbers in 100 increments and that i what I see with the >>> halmeter at the pid.0.command input. The whole range of numbers >>> presented to pid.0.command in can modify the spindle speed by perhaps >>> 20%. Running like this, the spindle speed is extremely stiff, >>> responding to an increased load in a small fraction of a second. >>> >>> If and when I wire up a reverse, it will be done with a dpdt relay >>> controlled the .rev command from motion module. >>> >>> But 2 things, one being that in the halscope, the pid.0.output is >>> oscillating rail to rail, according to the scope at several hundred >>> volts peak to peak, and of course the pwmgen is outputting little >>> trains of pulses at the oscillation speed which is something in 100 >>> hz range. >>> >>> I am getting the impression that the gain of the pid.0.feedback pin is >>> many decades higher than the gain of the command pin. >>> >>> Presently from the hal file: >>> >>> setp pid.0.Pgain 0 >>> setp pid.0.Igain 1 >>> setp pid.0.Dgain 1 >>> setp pid.0.maxoutput 401 # to keep it from running >>> away >>> >>> Those values are straight from the Closed_Loop_Spindle_Speed page of >>> the wiki, and obviously I don't know enough about PID controls to >>> make intelligent adjustments. >>> >>> I sure could use some help in taming this beast. >>> >>> Thanks everybody. >>> >>> Cheers, Gene >> >> With only D and I you have setup a second order differential equation >> whose solution is a sine wave :-) >> >> >> I'd start with P only (D and I = 0)and adjust P upwards till it becomes >> unstable then try adding a small (much less than 1) amount of D. > > Thanks Peter. Zeroing D-I is easy enough, what would be a good starting > value for P, 0.5, 0.25, or successive approximate it starting at 1.0? > > I have re-read that page several times without coming close to > understanding what that person has done, so I feel like I am re-inventing > the basic wheel here. With this, and 3 other unread msgs I see yet, > perhaps I'll have some progress to report, probably after the woof gets > back & we go vote in the local primaries & maybe see if there is someplace > we can graze for a reasonable fee.
My mind was not thinking on velocity loop... Andy Pugh is right you should do most of the control with feed forward (FF0 that basically scales and copies the commanded volocity to the output of the PID COMP) I would just adjust FF0 first to get as good velocity tracking as you can (no P,I or D) and then add I to pull it in (and then add P to make the I gain stable) >> Peter Wallace >> Mesa Electronics >> >> >> ------------------------------------------------------------------------ >> ------ 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 >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/emc-users > > > Cheers, Gene > -- > "There are four boxes to be used in defense of liberty: > soap, ballot, jury, and ammo. Please use in that order." > -Ed Howdershelt (Author) > My web page: <http://coyoteden.dyndns-free.com:85/gene> > You could live a better life, if you had a better mind and a better body. > > ------------------------------------------------------------------------------ > 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 > [email protected] > https://lists.sourceforge.net/lists/listinfo/emc-users > Peter Wallace Mesa Electronics (\__/) (='.'=) This is Bunny. Copy and paste bunny into your (")_(") signature to help him gain world domination. ------------------------------------------------------------------------------ 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 [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
