Photoelectric pulse encoder is a kind of photoelectric sensor which is used to detect mechanical displacement or indirectly detect speed, which is integrated with light, machine and electricity. According to its application in detecting angular displacement and rotation speed or linear displacement and linear motion speed, it is divided into photoelectric shaft angle encoder and linear encoder. According to the different ways of code formation, photoelectric shaft encoder can be divided into incremental and absolute type. Photoelectric pulse encoder has been widely used in industrial control and testing fields, such as CNC machine tools, steel rolling, textile equipment, elevator, printing, cigarette machine, robot, magnetic card machine, computer embroidery machine, etc.

In the industrial production site, there are optical, electrical, magnetic and vibration interference. The generation and transmission of the output pulse signal of the photoelectric pulse encoder may be affected by the above-mentioned interference, resulting in waveform distortion. The output waveform of an actual photoelectric pulse encoder is shown in Fig. 2.

Design and verification of filter based on FPGA

Fig. 1 ideal output waveform of encoder Fig. 2 actual output waveform of encoder

In order to obtain useful information from signals, people have done a lot of research on interference and its filtering. The research has been carried out mainly through the feature extraction of interference signal, according to the principles of suppressing interference, cutting off the interference propagation path or improving the anti-interference performance of sensitive devices, and basically meet the requirements of signal filtering. However, due to the complexity of industrial field interference, its randomness, dynamics and unpredictability, anti-interference has become an eternal topic in the development and debugging work.

Pulse signal filtering principle based on signal cognition

According to the Shannon information system model, the signal arriving at the signal processing unit can be expressed as follows:

Degree. For the pulse signal, its characteristic specification is only pulse level, pulse width, frequency and other characteristics. These features are easy to recognize and detect. Therefore, the second strategy should be used in pulse shaping and filtering. The following is an example of rotary encoder to illustrate the cognitive process of its output pulse signal characteristics

1.1 recognition of signal level

The level of pulse signal is only high level “1” and low level “0”.

1.2 cognition of signal pulse width

1.3 pulse width variation of signal

Due to the limitation of energy and mechanical material strength, the acceleration of any moving machine will be limited. For example, set the measured machine in timeWhen the speed rises from static state to rated speed in seconds, the width change of any two connected pulses is as follows:

(4)

1.4 cognition of pulse signal correlation characteristics

Design of filter based on FPGA

With the rapid development of electronic design technology, programmable gate array (FPGA) has more and more powerful functions, which can complete extremely complex sequential and combinational logic circuit functions, and is suitable for high-speed, high-density high-end digital logic circuit design field.

Fig. 3 principle of pulse signal filter

In the figure, the M / T method is used to realize the real-time measurement of speed, as shown in the speed measurement module in Fig. 3. Within a certain sampling time t, the pulse number of MP pulse signals and the number of MS high-frequency time scale pulses are calculated, and the real-time speed n is finally output.

(5)

Where:Is the number of high frequency time scale signals measured in the sampling period.

FPGA positive edge flip-flop and negative edge flip-flop are used to detect the positive or negative pulse hopping signal, and the pulse width counter is used to control the change rate of pulse width. According to the relationship between the output pulse and the input pulse, the positive / negative edge trigger channel is selected by the multiplexer, and then the pulse width is counted by the pulse width counter. If the count width value is within the legal width range, it is the legal pulse signal and output, otherwise it is the interference signal, which is filtered out.

In the actual operation process, there are fluctuations in the operating speed, and there should be a certain margin for the actual speed.

3 experimental system and result analysis

3.1 experimental methods

The pulse signal source is taken from a servo motor of p60b1835mxsij, with rated power of 2.7kw, ac200v, current of 10.7a, rated speed of 1500rpm, and built-in incremental encoder of 2000 lines. The filter is composed of large capacity multi gate FPGA proasic apa300 of Actel company according to figure 2. The sampling frequency of FPGA is 4MHz and the high frequency time scale frequency is 40MHz.

Firstly, the motor is operated in the whole speed range, and the output of the motor encoder signal (filter input signal) and the filter output are observed and compared, and then the filter output signal designed in this paper is used as the position control signal to control the permanent magnet synchronous motor.

Figure 4 pulse processing effect at 150 RPM Figure 5 pulse processing effect at 1500 rpm

3.2 analysis of experimental results

In the experiment, the pulse signal output from the encoder can be effectively filtered and shaped in the motor range from static to rated speed. The output pulse waveform and filtering output waveform of the encoder at 150rpm and 1500rpm are shown in Fig. 4 and Fig. 5. Channel 1 collects pulse waveform at the output of the filter and channel 2 collects the pulse waveform at the input of the filter. The output signal of the filter designed in this paper is used as the position control signal to control the permanent magnet synchronous motor. The experiment shows that the filter can meet the requirements of pulse signal filtering.

4 Conclusion

The signal arriving at the destination is the superposition of legal signal and interference signal. Therefore, two strategies can be used to filter out the interference signal effectively, namely, cognitive legal signal feature or cognitive interference signal feature. The specific choice should be based on which feature is easy to be recognized. The characteristics of the pulse signal are simple and standard, only the characteristic parameters such as level, period, pulse width and the relationship between them. Therefore, the pulse signal should adopt the filtering strategy of recognizing the legal signal and filtering the illegal signal. In this paper, the filtering strategy of recognizing the legitimate signal and filtering the illegal signal is used to meet the signal filtering requirements of permanent magnet synchronous motor control.

The innovation of this paper is to filter the signal based on the idea of cognitive pattern recognition. In the case that the interference is too much and the analysis is not clear, the filtering can meet the requirements.

Editor in charge: GT

Leave a Reply

Your email address will not be published. Required fields are marked *