Closing the loop in the driver or in LinuxCNC
- mdagenais
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
17 Oct 2017 21:42 #100493
by mdagenais
Closing the loop in the driver or in LinuxCNC was created by mdagenais
I have converted an SX3 mill to a CNC a few years ago using LinuxCNC, a PC, a Mesa 5i20 PCI FPGA, Mesa 7i29 H-bridges, and DC motors with encoders. Everything is running fine. I am involved in a FabLab and we acquired Tormach machines last year which use LinuxCNC and steppers (open loop presumably). For various projects, lately a robotic arm, members are looking at cost efficient solutions for the controller / drivers / motors and asking for advice.
Integrated computer and FPGA boards, such as the De0-nano SOC or Zynq boards, can be extremely effective solutions, able to drive numerous servo loops with high performance and low cost. The problem is the driver boards which seem to go more and more towards packaged solutions handling locally the servo loop.
For example, the Gecko digital servo drive (G320x) is step/direction and handles the servo loop internally. Most other suppliers, high cost or low cost, for instance the Chinese Leadshine DCS810, do the same. There does not seem to be much action in the PWM driver supply chain. It seems that the Mesa and Pico systems models have not changed much in the past 10 years, in functionality or price. Have I missed new low cost designs for Brushed and Brushless servo motor PWM drives?
The question is then, how important is it to close the servo loop in LinuxCNC versus in each drive board? Self-contained step/dir drives are easier to integrate and wire up, and you have a flexible adjustment of the maximum current. However, the servo for each loop is controlled independently, not synchronised. Looking at the source code of the trajectory planner in LinuxCNC, it appears that the feedback information is used to adapt the trajectory / speed all along. Are we missing much by not having the servo loops for all the axis closed and coordinated within LinuxCNC? Do we get lower precision on movement and no way to measure it?
Thanks for any advice!
Integrated computer and FPGA boards, such as the De0-nano SOC or Zynq boards, can be extremely effective solutions, able to drive numerous servo loops with high performance and low cost. The problem is the driver boards which seem to go more and more towards packaged solutions handling locally the servo loop.
For example, the Gecko digital servo drive (G320x) is step/direction and handles the servo loop internally. Most other suppliers, high cost or low cost, for instance the Chinese Leadshine DCS810, do the same. There does not seem to be much action in the PWM driver supply chain. It seems that the Mesa and Pico systems models have not changed much in the past 10 years, in functionality or price. Have I missed new low cost designs for Brushed and Brushless servo motor PWM drives?
The question is then, how important is it to close the servo loop in LinuxCNC versus in each drive board? Self-contained step/dir drives are easier to integrate and wire up, and you have a flexible adjustment of the maximum current. However, the servo for each loop is controlled independently, not synchronised. Looking at the source code of the trajectory planner in LinuxCNC, it appears that the feedback information is used to adapt the trajectory / speed all along. Are we missing much by not having the servo loops for all the axis closed and coordinated within LinuxCNC? Do we get lower precision on movement and no way to measure it?
Thanks for any advice!
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23310
- Thank you received: 4858
20 Oct 2017 18:57 #100591
by andypugh
Replied by andypugh on topic Closing the loop in the driver or in LinuxCNC
A lot of the modern drives can be configured to run in velocity mode, so there is something of a middle-ground to consider.
The stmbl drives are worth considering (though I am not sure how you get one without making your own)
The stmbl drives are worth considering (though I am not sure how you get one without making your own)
Please Log in or Create an account to join the conversation.
- mdagenais
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
21 Oct 2017 03:22 #100601
by mdagenais
Leadshine has an extensive line of drives for brushed and brushless motors but seems all step/dir. However, I checked and indeed it appears that other manufacturers have brushless drives which accept potentiometer, analog and PWM input for velocity control which would work. Thanks!
I was not aware of the STMBL "open source" servo drive design. Very interesting! I am not planning to build my own for now however, and this high power beast has a fairly expensive bill of materials.
Back to the original question, we hear qualitative comparisons such as DC servo is better than stepper, and coordinated axis control within LinuxCNC is in theory better than independent step/dir control of each axis. For steppers, at least it is easy to measure the difference in noise and current consumption in operation, as compared to DC servo. For coordinated axis control versus independent step/dir control, are there use cases where the difference was measured? Since open loop steppers rarely miss steps on production machines, can we assume that the planned trajectory is almost always achieved and coordinated reaction to trajectory slowdowns is not something that is used much and makes a difference in practice?
Replied by mdagenais on topic Closing the loop in the driver or in LinuxCNC
A lot of the modern drives can be configured to run in velocity mode, so there is something of a middle-ground to consider.
The stmbl drives are worth considering (though I am not sure how you get one without making your own)
Leadshine has an extensive line of drives for brushed and brushless motors but seems all step/dir. However, I checked and indeed it appears that other manufacturers have brushless drives which accept potentiometer, analog and PWM input for velocity control which would work. Thanks!
I was not aware of the STMBL "open source" servo drive design. Very interesting! I am not planning to build my own for now however, and this high power beast has a fairly expensive bill of materials.
Back to the original question, we hear qualitative comparisons such as DC servo is better than stepper, and coordinated axis control within LinuxCNC is in theory better than independent step/dir control of each axis. For steppers, at least it is easy to measure the difference in noise and current consumption in operation, as compared to DC servo. For coordinated axis control versus independent step/dir control, are there use cases where the difference was measured? Since open loop steppers rarely miss steps on production machines, can we assume that the planned trajectory is almost always achieved and coordinated reaction to trajectory slowdowns is not something that is used much and makes a difference in practice?
Please Log in or Create an account to join the conversation.
- jmelson
- Offline
- Moderator
Less
More
- Posts: 805
- Thank you received: 150
21 Oct 2017 14:41 #100612
by jmelson
ordinary stepper drives apply rated current to the windings at all times, and have no way to get more torque than normal at that particular speed. Therefore, they have no way to "try harder" in an impending stall. Because stepper motors have sharp poles that cause the magnetic detent effect, resonance is designed INTO the motor. Servo motors have much less resonance, and the feedback nature of the drive allows the drive to apply only the required power needed. This allows the motors to stay cool, so the drive can apply greater power when the load is greater.
Since the computer is part of the servo loop in LinuxCNC, the servo update rate is limited, but coordination of the axes is guaranteed. Some servo drives have much higher update rates within the drive, but the delay between command and response could be variable, meaning the coordination is less certain, if not proven.
Jon
Replied by jmelson on topic Closing the loop in the driver or in LinuxCNC
Back to the original question, we hear qualitative comparisons such as DC servo is better than stepper, and coordinated axis control within LinuxCNC is in theory better than independent step/dir control of each axis. For steppers, at least it is easy to measure the difference in noise and current consumption in operation, as compared to DC servo. For coordinated axis control versus independent step/dir control, are there use cases where the difference was measured? Since open loop steppers rarely miss steps on production machines, can we assume that the planned trajectory is almost always achieved and coordinated reaction to trajectory slowdowns is not something that is used much and makes a difference in practice?
ordinary stepper drives apply rated current to the windings at all times, and have no way to get more torque than normal at that particular speed. Therefore, they have no way to "try harder" in an impending stall. Because stepper motors have sharp poles that cause the magnetic detent effect, resonance is designed INTO the motor. Servo motors have much less resonance, and the feedback nature of the drive allows the drive to apply only the required power needed. This allows the motors to stay cool, so the drive can apply greater power when the load is greater.
Since the computer is part of the servo loop in LinuxCNC, the servo update rate is limited, but coordination of the axes is guaranteed. Some servo drives have much higher update rates within the drive, but the delay between command and response could be variable, meaning the coordination is less certain, if not proven.
Jon
Please Log in or Create an account to join the conversation.
- Surgo
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
02 Nov 2018 04:50 #119804
by Surgo
Replied by Surgo on topic Closing the loop in the driver or in LinuxCNC
I realize this thread is about a year old by now, but it was the first result on Google and I have a similar problem / question.
Looking to update an old CNC controller, keep my analog DC servos. All the drives I find close the loop in the drive. I'm interested in feeding back the encoder values to the controller though so I can (a) get multi-axis coordination as mentioned, but also (b) so it can combine that with the output of the glass-scale DRO that's already sitting on the machine to counteract backlash, ball screw nonuniformity, etc.
Does it represent an issue if the servo drives are closed-loop themselves, but I also feed back the encoder data into linuxcnc? Will they both try to correct errors in one axis and result in overcorrection? Am I overthinking this?
Looking to update an old CNC controller, keep my analog DC servos. All the drives I find close the loop in the drive. I'm interested in feeding back the encoder values to the controller though so I can (a) get multi-axis coordination as mentioned, but also (b) so it can combine that with the output of the glass-scale DRO that's already sitting on the machine to counteract backlash, ball screw nonuniformity, etc.
Does it represent an issue if the servo drives are closed-loop themselves, but I also feed back the encoder data into linuxcnc? Will they both try to correct errors in one axis and result in overcorrection? Am I overthinking this?
Please Log in or Create an account to join the conversation.
- jmelson
- Offline
- Moderator
Less
More
- Posts: 805
- Thank you received: 150
02 Nov 2018 14:49 - 02 Nov 2018 14:50 #119821
by jmelson
Replied by jmelson on topic Closing the loop in the driver or in LinuxCNC
Analog drives do not have a positioning loop, so error will accumulate. Do the motors have tachometers? If so, then the drive can close the velocity loop, using the tachometer for velocity feedback. The CNC control uses the encoder for position feedback.
If your drives are connected to the encoders, then these are NOT pure analog servo drives.
They may use the encoder for velocity feedback only, or for position feedback as well.
It is quite standard practice to use analog velocity servo amps with tachometer velocity feedback and have the CNC control close the position loop using the encoder feedback.
Jon
If your drives are connected to the encoders, then these are NOT pure analog servo drives.
They may use the encoder for velocity feedback only, or for position feedback as well.
It is quite standard practice to use analog velocity servo amps with tachometer velocity feedback and have the CNC control close the position loop using the encoder feedback.
Jon
Last edit: 02 Nov 2018 14:50 by jmelson.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23310
- Thank you received: 4858
02 Nov 2018 16:18 #119833
by andypugh
Replied by andypugh on topic Closing the loop in the driver or in LinuxCNC
What you describe will work fine. You simply end up commanding a slightly different position to nominal to get the actual position required.
Please Log in or Create an account to join the conversation.
Moderators: PCW, jmelson
Time to create page: 0.063 seconds