Current turning capabilities status

More
27 Oct 2013 18:51 #40344 by andypugh

In fact I am not all that convinced that closed-loop is even necessary with a VFD.

This one I really did not expected, and it is for sure not my case.
In all of my parts I use constant surface speed, so it is necessary to have the spindle at the speed required by the controller.


My lathe only has a 1kW motor, and I don't run PID. I get constant surface speed, and no real problem with the spindle slowing under cuts.
This is with the "standard" setup where the pwmgen.scale is set to 1500 (rpm) and the 10V speed of the VFD is set to 100Hz.
So, M3 S750 = 50% PWM = 5V = 50Hz. And that is the speed that the motor runs at.

As you increase the load on an induction motor is slows slightly relative to the VFD frequency, but not _very_ much.
If you look at this diagram: www.mindconnection.com/images/library/mo...nduction%20Motor.jpg then you can either accept the increase in slip and decrease in speed as the torque increases, or you can attempt to use a PID to increase the frequency, in effect rotating the A and B lines clockwise so that the motor speed is constant with torque. This is the slip compensation described in the article that that diagram came from: www.mindconnection.com/library/electrical/motorslip.htm

I don't know what the typical "slip" is of an induction motor at full load, but I think it is only a few %. So all the PID can do is give you that last few % of cutting speed accuracy. And you will probably find yourself experimenting by several 10s of % of spindle speed when looking for the best machining results.

So, this is why I am saying that PID may not be necessary with an induction motor and VFD setup.

Actually, I am not 100% sure that your motor isn't permanent magnet. In that case there is no slip, and the motor should run at exactly the speed that the VFD is set to.

It is allowed to have a bit of variation, but as my test showed the PID is not working as expected. The rest of the PID's in my system for the servos are working ok, and I only have the P=1 set up.

The servo PIDs are controlling motor speed (or torque) to achieve a position. When the position is correct, the motor can turn off and the position stays correct. (that is, zero position error -> zero P-term -> zero PID output)
For the spindle you have velocity in and velocity out. It is _not_ correct to turn the motor off when the speed is correct, because the motor will then slow down. So, the "P" term is not the most important part of your spindle PID controller.

So, as I said, first get the speed control as good as you can using _only_ the FF0 term, with everything else at zero. This is equivalent to the open-loop spindle control that I use on my lathe. You probably then need just a bit of I-gain to compensate for the errors. You may not want any P-gain at all.

But I think that PCW is on the right track when he says that your runaway is due to the "abs" functions.

Consider the situation when you have only a P-term and you command a spindle speed that is lower than the current speed. The PID output is negative, because the error is negative. But the abs-function converts the negative PID output to a positive voltage to the VFD. The motor speeds up. The error is now bigger, so the PID calculates an even bigger negative value, which the abs function makes in to an even bigger voltage command to the vfd…

If The P-term is small and the FF0 term is large, you won't see this, because (FF0 + (negative)P ) will still be a positive number.

But for a VFD-controlled spindle I am fairly sure that what you want is just FF0 and I, no P or D.

Please Log in or Create an account to join the conversation.

More
28 Oct 2013 01:40 #40354 by emcPT
Under load the motor will drop speed, that is for sure. The speed drop is much more evident in low speeds, even if I did not (until now) browsed all the respective parameters about the work at low speeds available in the VFD. Since this is not my first experience with VFD at low speeds (5 Hz; 10 Hz), I was hoping to get the most out of the available feedback - that works very well.

My lathe only has a 1kW motor, and I don't run PID. I get constant surface speed, and no real problem with the spindle slowing under cuts.
This is with the "standard" setup where the pwmgen.scale is set to 1500 (rpm) and the 10V speed of the VFD is set to 100Hz.
So, M3 S750 = 50% PWM = 5V = 50Hz. And that is the speed that the motor runs at.


In my case I also have it linear and without any PID compensation the output (with no load) fails the desired speed at most 100 rpm in 2500 rpm; or 15 rpm at 200 rpm. The issue is really the work under load at low speeds were the motor will display less torque.

The servo PIDs are controlling motor speed (or torque) to achieve a position. When the position is correct, the motor can turn off and the position stays correct. (that is, zero position error -> zero P-term -> zero PID output)
For the spindle you have velocity in and velocity out. It is _not_ correct to turn the motor off when the speed is correct, because the motor will then slow down. So, the "P" term is not the most important part of your spindle PID controller.

So, as I said, first get the speed control as good as you can using _only_ the FF0 term, with everything else at zero. This is equivalent to the open-loop spindle control that I use on my lathe. You probably then need just a bit of I-gain to compensate for the errors. You may not want any P-gain at all.

But I think that PCW is on the right track when he says that your runaway is due to the "abs" functions.

Consider the situation when you have only a P-term and you command a spindle speed that is lower than the current speed. The PID output is negative, because the error is negative. But the abs-function converts the negative PID output to a positive voltage to the VFD. The motor speeds up. The error is now bigger, so the PID calculates an even bigger negative value, which the abs function makes in to an even bigger voltage command to the vfd…

If The P-term is small and the FF0 term is large, you won't see this, because (FF0 + (negative)P ) will still be a positive number.

But for a VFD-controlled spindle I am fairly sure that what you want is just FF0 and I, no P or D.

Very good info there. Will test extensily and will post the results.
I would really want a compensation so that the desired speed is quite similar to the real speed, even on load.

What is your profession, if I may ask?

Please Log in or Create an account to join the conversation.

More
28 Oct 2013 01:58 #40356 by andypugh

What is your profession, if I may ask?

I have done a lot of jobs, I was a metallurgist straight after my PhD, then moved into structural integrity and mechanical testing, then worked on skin graft research for a little while, then became a mechanical designer, then an NVH engineer at a car company, then spent a while designing X-ray microscopes. At the moment I am back in the auto industry where I set up engine control computers. (lots of rather elaborate PID controllers).

Please Log in or Create an account to join the conversation.

More
07 Nov 2013 01:56 #40596 by jtc
Another progress another question :(

1)
Axis are running, spindle is running, toolchange is done. Not bad for now.
As the machine does automatic toolchanges (and many for each part), every time that the tool change happens, the spindle stops. I think that this is a desired feature for milling machines, but for lathes it is a waist of power and time as the spindle must brake and gain speed again.
I hope that this is easy to change/set up, but I could not find any info about this.
I must say that the toolchange is being done by a component programmed here, but the component does not ask for the spindle stop.

Thank you

Please Log in or Create an account to join the conversation.

More
07 Nov 2013 15:59 #40624 by emcPT
This is done, for example here:



so linuxcnc can support it, but we have no idea how to do it.
Who made the video? Is someone that uses this forum?

Please Log in or Create an account to join the conversation.

More
More
07 Nov 2013 18:28 #40627 by andypugh

1) every time that the tool change happens, the spindle stops. I think that this is a desired feature for milling machines, but for lathes it is a waist of power and time as the spindle must brake and gain speed again.


It's an INI-file option: [EMCIO] TOOL_CHANGE_WITH_SPINDLE_ON = 1
www.linuxcnc.org/docs/html/config/ini_co..._sub_emcio_section_a

Please Log in or Create an account to join the conversation.

More
25 Feb 2014 02:05 #44146 by emcPT
After almost one year...
It was worth it!
Attachments:

Please Log in or Create an account to join the conversation.

More
12 Apr 2014 19:22 - 12 Apr 2014 19:25 #45882 by emcPT
Some work being done:



Some small issues are not completely done (we were unable to produce what we want), so if anyone can give me a good way to atchieve the following (or just one point):

1) I normally do repeative work, and the toolpath preview stays with the last run part on it. I have to "clean the toolpath" before I start again a new cycle. Can this be automatically (when a new cycle start, the toolpath is also cleaned from the previous made part)?

2) I have a physically start and a stop button. I want that the stop button do the following: If the machine is running, when the user presses the stop, the machine makes a pause (feedhold) with the spindle rotating, if the user presses again the same button, it should be equal to cycle stop. The first was done, but we were unable to give a second functionality to the button based on the condition that I described.

3) Also, I have a feed override button, that works very well (0 to 200%). The button is only able to override the G1,G2,G3 movements, not the fast movements G0. My interest is to give the ability for the user to control both feedrates from the same button. This is very usefull to test a part, were the proximity movements are in general all made by G0.

4) We use a touch screen. All works good, but the buttons on linux (not only in linuxcnc) are very small. The top bar, when I want to close for example the text editor is hard to press (I press all around it except the button that I want :angry: ). For linuxcnc itself Gmocapy will probably be a solution that I did not yet tested.
Last edit: 12 Apr 2014 19:25 by emcPT. Reason: Video was not present

Please Log in or Create an account to join the conversation.

More
12 Apr 2014 19:44 #45884 by andypugh

Can this be automatically (when a new cycle start, the toolpath is also cleaned from the previous made part)?

Possibly, it is possible to do it from a script
linuxcnc.org/docs/html/man/man1/axis-remote.1.html
The remainder of the puzzle is how to do it from HAL (or possibly from G-code)
One possibility is to have a custom M-code to call a script that clears the display. This would need you to insert that M-code in the G-code file.

2) I have a physically start and a stop button. I want that the stop button do the following: If the machine is running, when the user presses the stop, the machine makes a pause (feedhold) with the spindle rotating, if the user presses again the same button, it should be equal to cycle stop. The first was done, but we were unable to give a second functionality to the button based on the condition that I described.

www.linuxcnc.org/docs/html/man/man9/multiclick.9.html

3) Also, I have a feed override button, that works very well (0 to 200%). The button is only able to override the G1,G2,G3 movements, not the fast movements G0. My interest is to give the ability for the user to control both feedrates from the same button. This is very usefull to test a part, were the proximity movements are in general all made by G0.

I think you can do that by changing the max-velocity rather than the feed-override. In the "Touchy" interface this is part of the UI. I am not sure which UI you are actually using.
4) We use a touch screen. All works good, but the buttons on linux (not only in linuxcnc) are very small. The top bar, when I want to close for example the text editor is hard to press (I press all around it except the button that I want :angry: ). For linuxcnc itself Gmocapy will probably be a solution that I did not yet tested.[/quote]
Have a look through the "themes", there might be a more touch-oriented one.
The following user(s) said Thank You: emcPT

Please Log in or Create an account to join the conversation.

Moderators: piasdom
Time to create page: 0.351 seconds
Powered by Kunena Forum