Help Picking the Resolution of an Incremental Encoder
February 9, 2016
I recently received an e-mail asking for some help picking the right resolution for an optical incremental encoder. I have removed the personal information and the drive/controller information, otherwise the e-mail is verbatim:
Hi,
I am using a motor controller in dual loop velocity mode.
What resolution incremental encoder would I need if I wanted to achieve 1%
or better velocity regulation in the range of 0.1RPM to 230RPM on the output
shaft of the gearbox.
The velocity control loop on the controller runs at 1kHz.
I have used your online calculator and it says 600k lines is this correct?
Here was my response:
I think I see what you are after, but you are missing some information. The Encoder Calculator on the web site is a bit too simple for what you are trying to do. It is really meant to be a quick conversion tool to find out of your Incremental Encoder is going to violate controller input frequency limitations, and the like.
The ability of the system to regulate to a given speed will depend on more than just the line count of the encoder. The real question that needs to be answered before we can determine Incremental Encoder resolution is “How many pulses are needed per update?” this is a question that will need to be asked of the Drive manufacturer/supplier, but I am sure they will have further questions about the motor size and loading as well.
It is easy to see that a motor without a load is easier to regulate than one with a dynamic (changing) load. Therefore, the size of the motor (and it’s inertia) and the size of the load (and it’s inertia) will need to be taken into account.
With all that being said, we can do some quick math to get a feel for what we do know about the application.
Before I get started, one major thing to note here is that it appears that you are asking for regulation to occur on the output of the gearbox. I am guessing that the Incremental Encoder is on the motor side (input) of the gear box, so there will be a scaling factor of the input to output ratio that will need to be taken into account along with the following math:
We know that you want to regulate speed within a range of 0.1 RPM to 230 RPM.
Taking the maximum speed of 230 RPM:
230/60 = 3.83 RPS (Revolutions per Second)
We also know that the drive does a loop update rate of 1000 times/sec (1Khz)
1000/3.83 = 260.89 updates per Revolution
360 Mechanical Degrees in a revolution
260.89/360 .72469 loop updates per degree at full speed. (Or, 1.379 Degrees traveled for every update)
Taking the minimum speed of .1 RPM:
0.1/60 = 0.00167 RPS
1000/ 0.00167 = 600,000 updates per revolution
600000/360 = 1666.67 Loop Updates Per Degree at minimum speed.
After this we really need to ask is “What can the drive do?” At the top speed, we will travel over a degree before the drive can update the loop for any error component. In the minimum speed example, the drive will not see a change in count over 1667 loop updates. How does the drive handle this?
To see what this means in Incremental Encoder pulses vs Drive Loop Updates we can take the highest line count encoder we currently provide, a 20,000 LC QR12:
20,000 pulses/360 Mechanical Degrees = 55.5 pulses per mechanical degree
If we use the encoder “post quad”, we can look at the edges of channels A and B pulses to 4x our resolution to 80,000 edges
80000 edges/360 Mechanical Degrees = 222.22 Edges per mechanical degree
For 260 RPM:
55.5 Pulses per degree/.72469 updates per degree = 76.58 pulses per loop update
using edges:
222.22/ .72469 = 306.33 edges per update
For 0.1 RPM:
55.5 Pulses per degree/1666.7 updates per degree = .0333 pulses per loop update (or 30.03 loop updates per Edge)
using edges:
222.22/1666.7 = 0.1333 edges per update = 0.1333 Edges per update (or 7.5 loop updates per Edge)
Just taking a very rough look at it, a 20,000 line count incremental Encoder appears to have more than enough data per update to give the drive a good idea of how fast the motor is turning at the high speed, while at the slow speed the drive has to wait for several loop updates to pass until it sees even one edge of the Incremental Encoder Signals.
Will the drive be able to regulate at this lower speed without falling out of the 1% tolerance? My guess is probably not, but only the drive manufacturer can answer that for sure. I am also wondering if 1% regulation is really needed at these slow speeds.
Keep in mind that these numbers would also need to be scaled by the input to output shaft ratio if the encoder is on the input side to the gearbox and the RPM’s above are actually referring to the output shaft speed.
Can the application tolerate being out of the 1% specification momentarily while the drive recovers? If so, your focus should likely be on loop response time.
At the very least, I am guessing tuning the loop to accommodate for both full speed and slow speed may be difficult.
I hope this helps,
Jim