Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: hutchison on September 10, 2008, 05:28:58 PM

Title: motor tuning for vfd spindle
Post by: hutchison on September 10, 2008, 05:28:58 PM
hi all,
 i am attemping to tune my spindle motor, i have a vfd and 3ph motor for the spindle on my lathe, the vfd is bieng fed an analogue 0/10 signal with a step to volts card, which is bieng fed by mach3 steps.

i am experiencing some stuttering with the motor , like an engine mis-firing,  its more prominent at some rpm than others. it could be a motor mount plate issue not fixed proper etc,  or centrifugal balance issue etc.  I want to talk about the software side / mach3 first as i'm new to configuring it and there is alot of stuff to take in. 
the instruction for the step to volts card / C6 is to set 1000 steps per revolution in the config/motor tuning / 'steps per rev' box . so i did.

I tested the voltage at the vfd input at my max rpm and it was 9.96V. producing 2500rpm, great.
it accelerates well, generally seems o.k but for the small knock.  its nothing major, but somehting aint right.

as far as steps produced at max rpm:
1000 steps per rev = 2,500,000 steps per minute! @ 2500rpm  , correct?
so 2,500,000 / 60 = Hz = 42Khz correct?

now if my kernel speed in mach is set to 25Khz, is this going to affect the smooth running of mach or this spindle motor if its pumping out an actual 42Khz to control the spindle. did i get that right?

something else to mention here is i have a 100cpr index pulse  / timing plate on the spindle, this works o.k  as far i can tell relaying a speed to mach it only fluctuates from 2495-2500 when calling out for 2500rpm.
any ideas?


Title: Re: motor tuning for vfd spindle
Post by: Hood on September 10, 2008, 06:15:41 PM
If your Kernel is set to 25KHz and any axis requires more than that for its top speed then that axis will never reach its top speed. Same for the spindle. If you need 45KHz for one axis you need to set it to that even if the other axis dont require it.
 Have a look at your pulse width and set it to maybe 3 or 4 and see if that makes a difference.
Hood
Title: Re: motor tuning for vfd spindle
Post by: hutchison on September 11, 2008, 02:39:35 PM
I checked the kernel speed out sure enough it was set at 25000.  how can it run at 2500rpm then?, it sure did!.  I have now changed it over to 45Khz, so all's theoretically fair.
 
I changed the motor pulse time to see if that made a difference on the vibration, it pretty much didnt, all that happened was to increase or decrease the spindle speed,  it didnt change the vibration.

I took off the drive belt from between spindle and motor and tried again,  behold it was deathly quiet, apart from the inverter whistle!.  I think I can concllude that the belt was tracking off and up the side of the timing pulley flange, the lumpy profile of the 5MM HTD belt was just 'biting'  on entry to the pcd form on the pulley, if you get what i mean, a case of mis-alignment.   Its caused from the OEM motor mount plate bieng fixed in only two places, which is quite lame, but then I guess it wasnt intended for a heavier motor and drive, and also was driven by a plain old V belt so there were no notches  or teeth to mis-bite.

The OEM motor mount plate is 4mm thick, it's thick enough but it only has two points of contact inside the machine, one to pivot on and the other one slot/bolt to nip up once you have taken up the belt slack.  I could physically move the motor if i pushed it hard and it wasnt sitting parrallel to the spindle, so the belt was just running off to the edge without the 3rd point of contact to guarantee parrallel.

So next stop is to machine up a larger plate, so I can fix in three place at least, where arrow is!.  I wasnt oblivious to the flexing issue,  i just wanted to check the software side, thanks very much for the advice :-) .
suprising they got away with it before!

(http://i295.photobucket.com/albums/mm134/hutchisonphotos/emcomount2.jpg)
(http://i295.photobucket.com/albums/mm134/hutchisonphotos/emcomount4.jpg)





Title: Re: motor tuning for vfd spindle
Post by: Hood on September 11, 2008, 03:12:34 PM
Good news you found the fault and as you say its often hard to decide whether its mechanical or software that is to blame.
Hood
Title: Re: motor tuning for vfd spindle
Post by: hutchison on September 12, 2008, 05:35:33 AM
i guess then that the spindle pulse time period is directly related to the output speed ,  how then if the pulse time period is increased does the motor speed up in the same time frame?   

is it like an inertia thing? it pulses power on and off, with the off period staying the same and the on period increasing? 
how can this be applied to different motors for tuning...
Title: Re: motor tuning for vfd spindle
Post by: Hood on September 12, 2008, 05:52:45 AM
Basically you have to set the pulse width to suit the drive that needs the widest then you tune all of your motors at this pulse width. I have seen reports lately that the CNC4PC spindle control boards are sensitive to pulse width and if you have it too low then jogging an axis can make your spindle speed fluctuate, for these guys setting the pulse width up a bit solved their problems. I think also there was another speed controller being used that was also very sensitive to the pulse width, setting the pulse width correctly for these devices cured the problems, but cant remember what type it was :(
Hood
Title: Re: motor tuning for vfd spindle
Post by: hutchison on September 12, 2008, 05:42:17 PM
 at the same time came across another problem,

  I cannot sync the commanded or actual speeds together no-matter what I tried.  I tired various pulse widths, calibrating the spindle, trimming some millivolts on my analogue output card.  Best I could get was 2490 for 2490rpm! but..  at the lower end of the scale betwen 2-300rpm its as much as 100rpm out. for some reason , i think it may be the 100 hole timing plate. 

I noticed that below 2-300rpm the actual spindle speed read/displayed jumped about wildly in the dro when calibrating, it took a long time to move on as the speed would not settle. Sometimes leaping upto 3300 then next increment would be 65 rpm , it was just going haywire.
   The Index pulse plate has 1 ring of 100 holes as displyed in the link, and note the single notch at the top.  The index pulse for mach is taken off the top notch and a proximity sensor as norm, and signals to mach when the notch passes the sensor, its active low. Then the other 100 pulse holes, i had picked up through the other proximity and serial interface but havent plugged them into mach yet, i'm not sure if i could use them for anything.  any more ideas, very grateful :-)   i wonder if a wider slot will help,  what seems odd is i thought it would have problemswith top end speed reading not bottom end where it has a longer time frame to read the pulse.  So far my spindle has broken mach law twice!.  the slots are 2mil.
Title: Re: motor tuning for vfd spindle
Post by: Hood on September 12, 2008, 05:47:56 PM
Can you replace that with a plate with only a single slot of 10mm or so width, think you will have better luck that way.
Hood
Title: Re: motor tuning for vfd spindle
Post by: hutchison on September 12, 2008, 05:51:35 PM
sure can, i'll give that a go and see if it helps, |I have faith in a wider slot.  does having 100 slots not make it more accurate for screwcutting, forgive me for thinking traditionally of dropping it on an ainjest /multi-starts..?  i guess mach can cope with accuracy using timing alone? , i worry too much, but its good to know !
Title: Re: motor tuning for vfd spindle
Post by: Hood on September 12, 2008, 05:59:19 PM
Single slot is probably best for Mach and it needs to be fairly wide, its not so much Mach but the parallel port I think. SmoothStepper should change all that  :)
Hood
Title: Re: motor tuning for vfd spindle
Post by: Hood on September 12, 2008, 06:01:06 PM
Oh and make sure you use the Index input if using a single slot disc.
Hood
Title: Re: motor tuning for vfd spindle
Post by: hutchison on September 12, 2008, 06:11:50 PM
can you give me a target discrepancy to aim for between actual and commanded spindle speed please!,  whats the general results people have, should it be a stable speed reading? few rpm, or better still none at-all with no load!?
Title: Re: motor tuning for vfd spindle
Post by: Hood on September 12, 2008, 06:19:13 PM
My Bridgeport mill just has manual speed control, was going to hook it up to Mach at some point but once I get the Beaver Mill finished I will probably sell the Bridgeport so I am not going to bother at this time.
 On the lathe the speed is controlled via clutches in the gearbox and Mach switches between the clutches over ModBUS so really maybe these are not good examples for you in as much as the actual speed control, however both read exactly what they are supposed to and if anything  the reading fluctuates by 1 RPM. I dont have spindle speed averaging checked so I know that is a true reading.
Hood
Title: Re: motor tuning for vfd spindle
Post by: hutchison on September 12, 2008, 06:48:30 PM
im aiming for nuts then i guess, big target!. if anyone had confirmation of electronic rpm fluctuation for the dro on a set machine i would be obliged, i've just turned mach on so im looking for a standard to work from.

 I appreciate what you say about the mechanical machine is driving the dro.  Tell me you have a modbus controlling different clutches inside the gearbox, thats pretty smart, i did not know a cnc could effectively change gears!, i have hope for a machine with torque yet then! was it a conventional mahcine or a cnc to start with?
Title: Re: motor tuning for vfd spindle
Post by: Hood on September 12, 2008, 06:56:30 PM
The Lathe was set up that way from the factory, it has a gearbox with 5 electromagnetic clutches which can ne engaged in a few different combination and this give me various spindle speeds. I am however planning on fitting a big AC servo I have instead of this arrangement, that will give me infinitely variable speed up to the 2000RPM that it runs at now. I just hope the motor will be big enough, its slightly bigger than the motor thats on now being 12.5KW(11KW now) but will have to wait and see what it is like when connected. I hope to be able to hook up to the gearbox for testing and if its not quite powerfull enough then I will use maybe two of the ranges of the gearbox. If it is powerfull enough then I will do away with the gearbox and direct drive to the top gearbox that has a manually controlled High and Low range.
Hood
Title: Re: motor tuning for vfd spindle
Post by: hutchison on September 13, 2008, 05:54:11 PM
5 emc's, very interested to see that box.  
 did you remain with the origonal motor frame size?.   I just managed to squeeze the next up into the space giving me a massive power increase of 180w  :D (0.55Kw from origonal 0.37) .   still, the inverter will give a programmed torque boost of another 50%, the top end was sacrificed for 1.1:1 pulley reduction to give some more gain at the epxense of some top end.




I took out the index plate and turned that down to get rid of the 100 slots,  milled in a 10mm square, now it works  better for pick up, it still fluctuates around 10rpm quickly in the dro. after calibrating further 2490 = 2490 actual,  and 1000 = 1010 actual, and  600 = 605 actual. so its close!

but there is still some discrepancy at the very low speeds / 200=305 actual or so.  for some, and it may be my oversight and inexperience, mach has difficulty calibrating/syncing the low speeds in for step tuned spindle motor?.  I'll give it another go. thanks for the help so far its working out well


Title: Re: motor tuning for vfd spindle
Post by: Hood on September 13, 2008, 06:37:12 PM
Try increasing the index debounce a bit and see if that helps, wouldnt put it too high though. Never set up VFD control so I dont really know anything about it. I think JimPinder has so might be worth giving him a shout.

Dont have any pics of the box I am afraid, the manual has some line drawings of it, if you are interested PM me your email and I will send the manual (2megs approx). I still have the original AC Induction motor on it (11kw) and not sure what the frame size or even the shaft size is. The new motor has a 42mm shaft but it would be too good to be true if that was the original motors size  ::)
Hood
Title: Re: motor tuning for vfd spindle
Post by: hutchison on September 15, 2008, 06:22:41 PM
i have now tried changing the p.i.d values, it seems to hunt about too much like that, i checked closed loop feedback that also takes too long to settle, although it hunted out the commanded value for once!.  Averaging is more like pulling the wool over your eyes..!   

Im on 45khz , have one slot in my index pulse plate 10mm wide on a 94mm diamater plate.   On my inverter 10V = top speed @ 50hz = 2790, through 1.1:1 pulley = 2536.   Ive calibrated the spindle in at 1-2-3-4-5-6 ~ us.
 i can get good results for commanded in the mid to high range 750-2500,  within target to 5-8 rpm, (thats adeqaute for sure on a low inertia pint sized drive)   but for some reason still in the lower rev range when calibrating mach just dosent pick up the index pulse properly below 750. it can be anything upto 100rpm out, its non linear also,  just to be even more of a figure out!.


when initiating auto-calibration it starts the spindle around 125rpm,    and my motor spins at around 44,
mach has to increase to around 250 before the spindle starts to register steady speed at around 75-100rpm, before that its not registering properly in mach. 

by the time it gets to around 750rpm the spindle speed actual has caught up with mach calibration commanded, and from then on upto 2500 its better.  why when mach is calibrating does it not wait for the actual speed to catch up with the commanded before the commanded moves onto the next reference point up the graph* etc!.   perhaps its an acceleration thing, i'll try that next. 

Title: Re: motor tuning for vfd spindle
Post by: hutchison on September 16, 2008, 03:52:44 PM
i increased the acceleration rate on the vfd side,  by around double, and also the acceleration in motor tuning to nearer top end.    it seems to have further improved the accuracy of the spindle calibration and the dro.  I'm to within 5rpm open loop now all the way through  from 500-2490 rpm, does it get much better on a light weight drive? . 

at s500/400/300 it jumps plus to around 40rpm out.  funny thing is , when i command 100rpm, it jumps right upto top speed, perhaps someone can pick up on that issue.

I shall continue testing!.  I notice alot of others have had similar experience by doing a search on spindle calibration.  I wonder if its the board im using to convert step to volts if its a linear increase at the bottom end.