Brushless servo drive
ManAtWork
Posts: 2,176
Hello,
here in the propeller forum most of the time the word "servo" means a small actuation device used in model vehicles or robots. Here, I mean something completely different: A controller for an industrial servo motor in the 1/2..2HP range used for positioning in CNC or automation machines.
I have built one, with a propeller, of course. As you can see in the pictures the PCB is quite small (46x94mm) when compared with other servo drivers in that power range. It is capable of delivering up to 12A continous and 20A peak per phase at a supply voltage up to 160V DC. The use of the propeller chip helped a lot keeping the hardware simple. The separate PID control loops for current, velocity and position and the handlers for the encoder, step/dir input and PWM output run in different cogs and therefore do not disturb the timing of each other.
I use a IMHO quite clever way to measure the motor phase current. I have conventional shunt resistors in the motor lines. Their voltage is modulated onto a HF signal which is transfered to the low voltage side with a small toroid transformer. The HF signal is then demodulated and measured with the sigma delta ADC feature of the propeller. So no expensive hall current sensors nor special HV chips nor external ADCs are required. Another pair of sigma delta ADCs is used for the position feedback input. So I can optionally use optical encoders or resolvers.
I haven't calculated the price of all components, yet, but except for the propeller chips itself there are not many expensive parts. So I think an end user price comparable to a gecko G340 should be possible.
Here is a video of the first test run:
http://www.youtube.com/watch?v=-UsIcyime04
The motor is a SanyoDenki brushless servo rated 200V and 750W. I mounted an external 2000 lines incremental encoder because the former owner wrecked the original one by hitting·the motor shaft·with a hammer.
Cheers
here in the propeller forum most of the time the word "servo" means a small actuation device used in model vehicles or robots. Here, I mean something completely different: A controller for an industrial servo motor in the 1/2..2HP range used for positioning in CNC or automation machines.
I have built one, with a propeller, of course. As you can see in the pictures the PCB is quite small (46x94mm) when compared with other servo drivers in that power range. It is capable of delivering up to 12A continous and 20A peak per phase at a supply voltage up to 160V DC. The use of the propeller chip helped a lot keeping the hardware simple. The separate PID control loops for current, velocity and position and the handlers for the encoder, step/dir input and PWM output run in different cogs and therefore do not disturb the timing of each other.
I use a IMHO quite clever way to measure the motor phase current. I have conventional shunt resistors in the motor lines. Their voltage is modulated onto a HF signal which is transfered to the low voltage side with a small toroid transformer. The HF signal is then demodulated and measured with the sigma delta ADC feature of the propeller. So no expensive hall current sensors nor special HV chips nor external ADCs are required. Another pair of sigma delta ADCs is used for the position feedback input. So I can optionally use optical encoders or resolvers.
I haven't calculated the price of all components, yet, but except for the propeller chips itself there are not many expensive parts. So I think an end user price comparable to a gecko G340 should be possible.
Here is a video of the first test run:
http://www.youtube.com/watch?v=-UsIcyime04
The motor is a SanyoDenki brushless servo rated 200V and 750W. I mounted an external 2000 lines incremental encoder because the former owner wrecked the original one by hitting·the motor shaft·with a hammer.
Cheers
Comments
best regards
Stefan
errrr, depends.... Do you mean the precision of (static) position, dynamic following error, or the precision of the current control loop?
The accuracy of static position is only dependant on the mechanical system and the precision of the feedback device. So with a standard 2000 lines incremental encoder the error would be +/- one count = 1/8000 revolution. If you connect the motor to a ball screw with 5mm pitch this would give a position error of 5mm/8000 = 0.625µm. If you like to spend more $ you could use a glass scale or a heidenhain rotary encoder with sin/cos output. This can be further interpolated to achieve higher resolution in the 10nm range or 10+ million counts/rev.
Dynamical following error, however, is of course higher than one encoder count if the load changes or is accelerated. This depends on how high the control loop gain can be set without oscillations. With a stiff mechanical system, ground preloaded ball screws for example, following errors below 0.01mm or around 10..20 encoder counts can be achieved at a typical machning feed rate of 3000mm/min.
The precision of the current control loop is not very impressive. The PWM cycle time is 41.6µs (1/24kHz) which translates to 3333 processor cycles at 80MHz. This results in a resolution a bit less than 12 bits for the ADC and PWM. The actual precision is much less. The error of the shunt resistor value, gain and offset error of the analogue circuit and inaccuracy of the sigma delta·ADC is more than 10%. But that doesn't matter much as any gain error is compensated by the surrounding velocity control loop. Even 20% wouldn't hurt. Offset is automatically adjusted by software. The analogue circuitry also adds some noise which can be heared as a soft audible noise with the motor acting as speaker. However, due to the mechanical inertia it has much less than one encoder count amplitude.
Best regards
Would a similar circuit also control the brushless motors in an electric bycicle?
What is the maximum encoder frequency?
Have you provided for complementary and index encoder signals?
When will these be available for sale?
Do you intend to develop a larger unit?
Any more details would be greatly appreciated.
Mickster
it's a magnetic incremental encoder with 12bit resolution (4096 inc/rev)
http://www.austriamicrosystems.com/eng/Products/Magnetic-Encoders/Rotary-Encoders/AS5045
ManAtWork I would like to know your opinion about this encoder
I ordered three samples for free. I'm very curious how they will work.
best regards
Stefan
I am sure this would work quite well with an electric bicycle, but that isn't really exploiting the full potential of the Propeller. Very nice work and I am sure that Parallax appreciates the proof of concept in an industrial servo context. For most of use, the cost of just one industrial servo is well beyond budget.
Theoretically yes, at least the hardware could do but with a completely different software. The servo controller needs a high resolution encoder to work well whereas in a simple speed control application like bicycle or model aircraft/boats you don't want an expensive encoder but just hall sensors or no sensor at all.
The max. encoder frequency is 1,000,000 counts per second or 250,000 cycles/lines per second. The feedback interface can handle complementary (RS442) or single ended TTL signals (A, B and index channel), complementary analogue signals (sine/cosine mode) or reference signal out, two amplitude modulated signals in (resolver mode).
Yes, I plan to sell them starting next year, hopefully if nothing goes wrong. I already have plans for a unit with higher voltage (230Vac or 320Vdc input) and another one with higher current (up to 25A max continous). But first I have to debug the software carefully, otherwise I'd only produce expensive smoke.
This seems to be a smart chip for simple and low cost applications. I think there is no easier way to get relatively precise absolute position feedback. It can replace low cost encoders like HEDS54xx with the additional bonus of the absolute information. However, I think it also has some limitations. 12 bit is not much if you really need fast response and precise control. If your motor is one count (1/4096rev) off the nominal position, you only know the direction but nothing about speed and force/torque. You have to wait for at least 3 counts to calculate acceleration so you know the exact current you need to apply as countermeasure. For this reason it's always good to have one order of magnitude higher resolution than you need accuracy.
For industrial control I like the encoders from SanyoDenki which offer 17 bit resolution. It's not only accuracy, you also hear much less noise (grunting, squealing) due to quantisation errors ("stair-casing") at low speeds. To provide a low cost solution I even developed my own optical encoder. It has only 400 lines/rev but it doesn't output phase shifted square waves but instead sine/cosine waves. They can be interpolated by A/D converting and an arctan calculation resulting in a resolution of over 400,000 counts/rev! I know, such devices are already available, but not affordable.
Theoretically yes, at least the hardware could do but with a completely different software. The servo controller needs a high resolution encoder to work well whereas in a simple speed control application like bicycle or model aircraft/boats you don't want an expensive encoder but just hall sensors or no sensor at all.
The max. encoder frequency is 1,000,000 counts per second or 250,000 cycles/lines per second. The feedback interface can handle complementary (RS442) or single ended TTL signals (A, B and index channel), complementary analogue signals (sine/cosine mode) or reference signal out, two amplitude modulated signals in (resolver mode).
Yes, I plan to sell them starting next year, hopefully if nothing goes wrong. I already have plans for a unit with higher voltage (230Vac or 320Vdc input) and another one with higher current (up to 25A max continous). But first I have to debug the software carefully, otherwise I'd only produce expensive smoke.
This seems to be a smart chip for simple and low cost applications. I think there is no easier way to get relatively precise absolute position feedback. It can replace low cost encoders like HEDS54xx with the additional bonus of the absolute information. However, I think it also has some limitations. 12 bit is not much if you really need fast response and precise control. If your motor is one count (1/4096rev) off the nominal position, you only know the direction but nothing about speed and force/torque. You have to wait for at least 3 counts to calculate acceleration so you know the exact current you need to apply as countermeasure. For this reason it's always good to have one order of magnitude higher resolution than you need accuracy.
For industrial control I like the encoders from SanyoDenki which offer 17 bit resolution. It's not only accuracy, you also hear much less noise (grunting, squealing) due to quantisation errors ("stair-casing") at low speeds. To provide a low cost solution I even developed my own optical encoder. It has only 400 lines/rev but it doesn't output phase shifted square waves but instead sine/cosine waves. They can be interpolated by A/D converting and an arctan calculation resulting in a resolution of over 400,000 counts/rev! I know, such devices are already available, but not affordable.
I saw this thead and was very interested as i have a Brother TC-217 CNC mill that uses Sanyo Denki servos and I want to retrofit it to more modern drive and control system.
Is this the unit you describe inthis thread - DC servo amplifier UHU 120V 12A? I found it at Benezan-Electronic.de, I assume that is your site?
The hardware of the new brushless drive is working, the propeller software is nearly completed. The only thing still missing is the PC software for tuning and parameter adjustment. This seems to be only a small task but is in fact the hardest work and absolutely required to sell the thing to the public market. There's no progress for two years now and it's absolutely frustrating that a good idea is wasted by not completing the project. But I have to admit that I don't have the time and money to do it because I'm busy with other projects I'm payed for.
Need some help?
this is exactly how it is solved at the moment. I can send ASCII input to a command line parser and tune the PID controller and other parameters by trial and error. I'm sure most of us here in the forum would be happy with this. But the average engineer that has to install a servo drive to a machine doesn't want to. If I'd sell it like this my phone was busy all the time by customers complaining.
My idea was to
1. provide a nice PC program with GUI to enter the motor parameters or select a set of parameters from a predefined list of known motors (easy job, mostly done)
2. provide an autotuning feature for the non-obvious PID parameters. I've already implemented a scope function that can send a plot of several parameters (torque/current, velocity and position deviation) as funtion of time to the PC. The PC software could then do a fourier analysis and compute the PID values from it. (I know, this could also be done inside the propeller but is much easier if you have unlimited memory and it doesn't have to be real-time)
Brother was very helpful by providing full electrical scematics, but unfortunatley they have no info on these older drives and Sanyo did not have any info either. So I an stuck trying to troubleshoot the drives I have or search Ebay for working drives.
I hope you can find some time to finish this!