The measurement and processing of the encoder signal is an important issue in servo motor control. The position, speed and acceleration of the motor rotor are derived from the encoder signal. The encoder pulse signal is measured and processed, and accurate information will be obtained, which is the basis of control. Conversely, it will mislead control. vape pen smoking flavour cigarette,vape pen smoking,vape pen smok,vape pen single use,vape pen rechargeable Shenzhen Aierbaita Technology Co., Ltd. , https://www.aierbaitavape.com
one. Encoder pulse signal:
Usually the encoder has A, B, Z pulse signals, and some additionally have U, V, W pulse signals.
two. A, B signal measurement is a note:
The A, B signals are processed into 4 octave pulses, which appear at 0°, 90°, 180°, and 270° of the A period, respectively. However, this ideal state does not exist. Usually, the phase difference between the A and B pulses is not exactly 90°, and the high level and level of the A and B pulses are not exactly equal. You can refer to the data given by the encoder manufacturer. That is to say, the time intervals of the four pulses are not equal. If the T method is used for measurement, the actual speed will be constant and the speed measurement value will fluctuate. This is a problem that must be avoided.
The solution to this problem:
1. When making a T-method measurement, you cannot use two adjacent pulses, but use the same edge of the same signal. Explain that the same signal is, for example, an A signal, and the same edge is, for example, a rising edge, that is, using the rising edge of A to the rising edge of A to perform the T-method measurement. It is also possible to use the falling edge of A to the falling edge, or the same edge of B. The advantage of this is that accuracy is guaranteed. The downside is that the period is 4 times that of adjacent edges, increasing the delay.
2. Make measurements on the spacing of each edge in advance, and calculate the correction factor for real-time correction. The advantage of this is that the delay is only 1/4 of the previous scheme. The disadvantage is that the accuracy of the edge along the edge cannot be ensured, because the time difference of each adjacent pulse may change with the angle of the motor, and may also vary with the speed when the vibration is strong. change. Accuracy is not fully guaranteed.
three. Note on Z signal measurement:
Once the Z signal is misinterpreted due to interference, it will cause synchronization failure, and the motor current will increase rapidly and cause serious consequences. Therefore, the Z signal should pay special attention to anti-interference processing. We only deal with the processing of software here.
As mentioned above, the Z signal passes the correlation between A, B, and Z to increase the anti-interference ability. This method reduces the probability of interference to a factor of 1/4. However, in the environment of high-frequency interference with severe interference, this measure is still insufficient. Next, we will introduce a method, window method. The window method is to open a window near the zero position. Only the Z signal appearing in this window, while satisfying the level relationship between A, B, and Z, is considered to be the Z signal. The Z signal generated outside the window is not recognized. For example: using an encoder with 2,500 lines per revolution, the number of 4 octave pulses generated per revolution is 10,000. When the pulse reaches between 9700 and 10300, the Z signal is valid, and the Z signal is not recognized at other times.
Some gentlemen may raise objections. Since the Z signal may interfere, the A and B signals will also interfere. His doubts are justified. It is true that the A and B signals are also subject to interference, resulting in incorrect window positions. I think about this problem in this way. The interference we are facing is relatively small, otherwise any measures will be invalid. The situation causing the interference is only a small percentage compared with the normal situation, for example, only one interference signal is for 100 pulses. Then we can think that the A, B signal is generally reliable, and the actual situation is not much different. Instead of believing in the Z signal, it is better to believe that the position of the A and B pulses is accumulated.
Some gentlemen still have doubts. If the Z signal is disturbed in the window, what should I do? Then when the motor position is set to zero when it is not zero, it will cause position error, which will affect the motor operation. However, since the window is close to zero, the influence is not great. After the next zero correction, Will resume.
After adopting the window method, the possibility of interference of the Z signal is greatly reduced. And even if it is accidentally disturbed, it will have little effect on the operation of the motor and will recover soon.