Multi-shaft multifunctional motor position decoding system based on ZYNQ

文档序号:1492418 发布日期:2020-02-04 浏览:5次 中文

阅读说明:本技术 一种基于zynq多轴多功能电机位置解码系统 (Multi-shaft multifunctional motor position decoding system based on ZYNQ ) 是由 邓子畏 周林 任强 田炜 叶霆 蒋增文 黄武 盛四华 于 2019-11-01 设计创作,主要内容包括:本发明公开了一种基于ZYNQ多轴多功能电机位置解码系统,包括设于ZYNQ芯片上可进行数据交互的处理器系统单元和可编程逻辑单元,所述处理器系统单元上设有用于实现可编程逻辑单元上参数配置和数据处理的ARM模块,可编程逻辑单元上设有:解码模块,用于对外置电机输入的多种编码器信号进行解码;八位并口模块,用于给外部处理器访问内部寄存器时提供对应接口;选择器模块,用于将电机编码器信号选择性输入至对应解码模块中进行解码;人机交互模块,用于实现人机之间的数据交互。本发明通过将多种解码模块集中设于可编程逻辑单元上并行解码,有效提高了编码器信号解码的实时性和同步性,同时极大程度上缓解了CPU的负担,为实现更加复杂算法提供了有利条件。(The invention discloses a ZYNQ-based multi-axis multifunctional motor position decoding system, which comprises a processor system unit and a programmable logic unit, wherein the processor system unit and the programmable logic unit are arranged on a ZYNQ chip and can perform data interaction, an ARM module for realizing parameter configuration and data processing on the programmable logic unit is arranged on the processor system unit, and the programmable logic unit is provided with: the decoding module is used for decoding various encoder signals input by the external motor; the eight-bit parallel port module is used for providing a corresponding interface when the external processor accesses the internal register; the selector module is used for selectively inputting the motor encoder signals into the corresponding decoding module for decoding; and the human-computer interaction module is used for realizing data interaction between human and computers. The invention effectively improves the real-time performance and the synchronism of the encoder signal decoding by intensively arranging various decoding modules on the programmable logic unit for parallel decoding, simultaneously relieves the burden of a CPU to a great extent and provides favorable conditions for realizing more complex algorithms.)

1. The utility model provides a multi-axis multifunctional motor position decoding system based on ZYNQ, its characterized in that can carry out data interaction's treater system unit and programmable logic unit including locating on the ZYNQ chip, be equipped with ARM module (1) that is used for realizing parameter configuration and data processing on the programmable logic unit on the treater system unit, be equipped with on the programmable logic unit:

the decoding module is used for decoding various encoder signals input by the external motor;

an eight-bit parallel port module (5) for providing a corresponding interface when the external processor accesses the internal register;

the selector module (6) is used for selectively inputting the motor encoder signals into the corresponding decoding module for decoding;

and the human-computer interaction module (7) is used for realizing data interaction between human and computers.

2. The ZYNQ-based multi-axis multi-functional motor position decoding system of claim 1 wherein said decoding module comprises an incremental ABZ decoding module (2) for decoding ABZ differential signals input by the motor to obtain current motor speed, motor speed direction and motor position; the MOM decoding module (3) is used for decoding an input signal of the motor to provide high-speed control guarantee for the dynamic response of the motor; and a Nikon decoding module (4) used for decoding the input signal of the motor to obtain the motor position information and storing the obtained motor position information in a designated register.

3. The ZYNQ-based multi-axis multi-functional motor position decoding system of claim 2, wherein the ZYNQ chip (9) is selected as an SoC chip with a model number XC7Z020-2CLG 400I.

4. The ZYNQ-based multi-axis multi-functional motor position decoding system of claim 3 wherein said ARM module (1) is selected as a dual Cortex-a9 ARM core.

5. The ZYNQ-based multi-axis multifunctional motor position decoding system as claimed in claim 4, wherein the human-machine interaction module (7) comprises a nixie tube for setting parameters and displaying an interface, an indicator lamp for displaying a power supply condition and an operation state of the driver, and a button for inputting parameters into each module.

6. The ZYNQ-based multi-axis multi-function motor position decoding system of claim 5, wherein the connection between the selector module (6) and the decoding module and between the selector module (6) and the external motor are through AXl4-Lite to achieve data interaction.

7. The ZYNQ-based multi-axis multi-function motor position decoding system of claim 6 further comprising a filtering module (8) for filtering external input signals.

8. The ZYNQ-based multi-axis multi-function motor position decoding system of claim 7 wherein said filtering module (8) comprises key filtering and ABZ differential signal filtering of incremental encoder inputs.

Technical Field

The invention relates to the field, in particular to a ZYNQ-based multi-axis multifunctional motor position decoding system.

Background

With the higher automation degree of modern industry, the motor is used as a core component, higher requirements are also provided on the aspects of performance including speed precision, speed regulation range, dynamic response, torque pulsation and the like, the motor position encoder sends the current motor position and speed to the processor in real time, and the position feedback quantity accuracy and speed directly influence the control performance of the motor. The development of multi-axis parallel and serial mechanical arms further promotes the development of multi-axis drivers, and in order to ensure the decoding real-time performance of a plurality of motor position encoders, a CPU and a DSP are used in a traditional mode, so that the decoding of the multi-axis motor positions is difficult to ensure, and a complex control algorithm is required to be realized.

Disclosure of Invention

The invention aims to provide a ZYNQ-based multi-shaft multifunctional motor position decoding system, which effectively improves the real-time performance and the synchronism of encoder signal decoding by intensively arranging decoding modules of three multi-path position encoders on a programmable logic unit of a ZYNQ chip for parallel decoding, simultaneously relieves the burden of a CPU to a great extent and provides favorable conditions for realizing more complex algorithms.

In order to solve the technical problem, the invention provides a ZYNQ-based multi-axis multifunctional motor position decoding system, which comprises a processor system unit and a programmable logic unit, wherein the processor system unit and the programmable logic unit are arranged on a ZYNQ chip and can perform data interaction, an ARM module for realizing parameter configuration and data processing on the programmable logic unit is arranged on the processor system unit, and the programmable logic unit is provided with:

the decoding module is used for decoding various encoder signals input by the external motor;

the eight-bit parallel port module is used for providing a corresponding interface when the external processor accesses the internal register;

the selector module is used for selectively inputting the motor encoder signals into the corresponding decoding module for decoding;

and the human-computer interaction module is used for realizing data interaction between human and computers.

As a further optimization of the above technical solution, the decoding module includes an incremental ABZ decoding module for decoding the ABZ differential signal input by the motor to obtain the current motor speed, the motor speed direction and the motor position; the MOM decoding module is used for decoding an input signal of the motor to provide high-speed control guarantee for the dynamic response of the motor; and the Nikon decoding module is used for decoding an input signal of the motor to acquire motor position information and storing the acquired motor position information in a specified register.

As a further optimization of the technical scheme, the ZYNQ chip is an SoC chip with the model of XC7Z020-2CLG 400I.

As further optimization of the technical scheme, the ARM module selects an ARM inner core with the model of double Cortex-A9.

As a further optimization of the technical scheme, the human-computer interaction module comprises a nixie tube for setting parameters and displaying an interface, an indicator light for displaying the power supply condition and the running state of the driver, and keys for inputting the parameters into each module.

As further optimization of the technical scheme, the selector module and the decoding module and the selector module and the external motor are connected through AXl4-Lite to achieve data interaction.

As a further optimization of the above technical solution, the apparatus further includes a filtering module for filtering an external input signal.

As a further optimization of the above technical solution, the filtering module includes a key filter and an ABZ differential signal filter input by the incremental encoder.

Compared with the prior art, the decoding modules of various multi-path position encoders in the market mainstream can be intensively arranged on the programmable logic unit of the ZYNQ chip, and various multi-path position encoder signals are selectively input into the corresponding decoding modules through the selector module to be decoded in parallel, so that the real-time performance and the synchronism of encoder signal decoding are effectively improved, a large amount of interruption loads of a CPU are not required to be relied on, the burden of the CPU is greatly relieved, and favorable conditions are provided for realizing more complex algorithms.

Drawings

FIG. 1 is a schematic diagram of the structure of a ZYNQ-based multi-axis multifunctional motor position decoding system of the present invention,

figure 2 is a block diagram of the incremental ABZ decoding module of the present invention,

figure 3 is a block diagram of the control word format of the morgan encoder of the present invention,

figure 4 is a block diagram of the format of feedback data received from a morgan encoder in accordance with the present invention,

FIG. 5 is a block diagram of the Nikon decoding module of the present invention,

FIG. 6 is a block diagram of the command format sent by the Nikon encoder of the present invention.

In the figure: the device comprises an ARM module, a 2 incremental ABZ decoding module, a 3 multiMochuan decoding module, a 4 Nikon decoding module, a 41 control register, a 42 timing module, a 43 control module, a 44 position decoding module, a 45 to-be-transmitted control word module, a 46.16 serial port transmitting module, an 47.16 bit serial port receiving module, a 5 eight-bit parallel port module, a 6 selector module, a 7 human-computer interaction module, a 8 filtering module, a9 ZYNQ chip and a 10 motor.

Detailed Description

In order to make the technical solutions of the present invention better understood, the present invention is further described in detail below with reference to the accompanying drawings.

As shown in fig. 1, a decoding system based on a ZYNQ multi-axis multifunctional motor position includes a processor system unit and a programmable logic unit which are arranged on a ZYNQ chip 9 and can perform data interaction, wherein an ARM module 1 for realizing parameter configuration and data processing on the programmable logic unit is arranged on the processor system unit, and the programmable logic unit is provided with:

the decoding module is used for decoding various encoder signals input by the external motor;

an eight-bit parallel port module 5, which is used for providing a corresponding interface when the external processor accesses the internal register;

the selector module 6 is used for selectively inputting the motor encoder signals into the corresponding decoding modules for decoding;

and the human-computer interaction module 7 is used for realizing data interaction between human and computers.

In this embodiment, the decoding modules corresponding to multiple multi-path position encoders are centrally arranged on the programmable logic unit of the ZYNQ chip 9, when the external motor 10 inputs signals of the multi-path position encoders into the system, the selector module 6 selectively inputs signals of the multi-path position encoders into the corresponding decoding modules for parallel decoding, so that a large amount of interrupt loads of the CPU are not required, the burden of the CPU is greatly relieved, favorable conditions are provided for realizing a more complex algorithm, and the real-time performance and the synchronization of encoder signal decoding are effectively improved.

As shown in fig. 2-6, the decoding module includes an incremental ABZ decoding module 2 for decoding the ABZ differential signal input by the motor to obtain the current motor speed, the motor speed direction and the motor position; the MOM decoding module 3 is used for decoding an input signal of the motor to provide high-speed control guarantee for the dynamic response of the motor; and the Nikon decoding module 4 is used for decoding the input signal of the motor to obtain the motor position information and storing the obtained motor position information in a designated register.

In this embodiment, three position encoders that are mainstream in the market at the present stage are selected, which are an incremental ABZ encoder, a multiple-mole Chuan encoder, and a Nikon position encoder, so that the decoding module includes an incremental ABZ decoding module 2, a multiple-mole Chuan decoding module 3, and a Nikon decoding module 4 that correspond to the position encoders to decode the encoder signals. The incremental ABZ encoder, the multiple Mochuan encoder and the Nikon position encoder are all physically connected through RS485, and the Baud rate is 2.5M. In other embodiments, other types of encoders may be selected for detection, and when other types of encoders are selected, the programmable logic unit needs to add or change the type of decoding module corresponding to each type of encoder.

In this embodiment, the decoding process includes: firstly, a signal (such as a key or ABZ) is sent to a general IO port of an FPGA, a system clock 50MHz generates a frequency of 1KHz through a frequency divider to sample the signal, then a sampling result is sent to a shift register with 10 bits, at the moment, a level processing module detects the value of the shift register in real time, and if the value is equal to 0 multiplied by 03FF, the system determines that the current signal level is 1; if the value is equal to 0 x 0000, the system asserts the current signal level to 0.

As shown in fig. 2, the incremental ABZ encoder inputs an ABZ differential signal, in order to decode the ABZ differential signal, the incremental ABZ decoding module 2 uses an M/T method speed measurement module 81 to implement M/T method speed measurement, sets relevant parameters of the incremental ABZ decoding module 2 through a human-computer interaction module 7 and an eight-bit parallel port module 5, and then combines the M method to measure a higher rotation speed to obtain a higher resolution and the T method to obtain a higher resolution when measuring a lower speed, and can obtain a higher resolution no matter at a high speed or a low speed; the phase difference between the A phase and the B phase is 90 degrees, and the phase discriminator 82 compares the A phase with the B phase, so as to judge whether the incremental ABZ encoder rotates forwards or backwards; because the Z phase is zero pulse, the zero reference position of the incremental ABZ encoder can be obtained, and the multi-turn position after the motor is started can be recorded by the multi-turn position measuring and recording module 83 by combining the analytic reading of the input encoder and the pole pair number of the motor, so that the current motor rotating speed, the motor rotating speed direction and the motor position can be obtained.

As shown in fig. 3 and 4, the multiple-Mochuan decoding module 3 is configured to decode a coded signal output by a multiple-Mochuan single-turn 17-bit multiple-turn 16-bit absolute position encoder, a response communication mode is adopted between the encoder and the decoding module, data communication is based on an RS485 hardware interface, a communication baud rate is 2.5M serial communication, a communication distance can reach 20 meters, and meanwhile, an abnormal problem caused by data errors is avoided through CRC data. The Morgan decoding module 3 only needs to send one byte of control data, so that the encoder can read single-turn, multi-turn, all data and reset states, after the external motor encoder receives the control word sent by the Morgan decoding module 3, the external motor encoder returns the received control word (CF), encoder state word (SF), encoder ID (which can identify the basic category of the encoder) and encoder data (DF0, DF1, DF7, etc.), the Morgan decoding module uses a timer to continuously decode the position in the decoding process, uses a three-section state machine to realize the sending and receiving of the data, and the CRC check process is as shown in FIG. 4. During decoding, the period of the timer is set to 100us through the man-machine interaction module 7 and the eight-bit parallel port module 5, when the timer reaches a point, the control word registered in advance is taken out, then the external encoder is waited to send data to the Morgan decoding module 3, the Morgan decoding module 3 receives and decodes the data, and after the decoding is completed, interruption is generated and the state is shifted to a waiting timer triggering state. The Morgan decoding module 3 needs about 60uS when reading all the data of one-time coding, thereby providing high-speed control guarantee for the dynamic response of the motor.

As shown in fig. 5 and 6, the nikon decoding module 4 can be subdivided into seven small modules: the device comprises a control register 41, a timing module 42, a control module 43, a position decoding module 44, a control word to be sent module 45, a 16-bit-string-port sending module 46 and a 16-bit-string-port receiving module 47, wherein a coded signal output by a Nikon position encoder (MAR-M50AH) is decoded through seven small modules, a question and answer communication mode is adopted between the encoder and the position decoding module 44, a communication protocol supports RS485 half-duplex, the Baud rate is 2.5Mbps as default, the precision is 20 bits in a single circle, and 16 bits in multiple circles. When decoding, the time period of the timing module 42 and the control word of the control word module 45 to be sent are set by the human-computer interaction module 7 and the eight-bit parallel port module 5, after the timing module 42 reaches the set time, the control module 43 triggers the control word of the control word module 45 to be sent and sends the control word through the 16-bit serial port sending module 46, after waiting for 10us, the 16-bit serial port receiving module 47 receives data fed back by the encoder, and simultaneously transmits the feedback data to the position decoding module 44 for decoding, so that the motor position information is obtained, and then the obtained motor position information is stored in the control register 41.

As shown in FIG. 1, the ZYNQ chip 9 is an SoC chip with the model of XC7Z020-2CLG 400I. In this embodiment, the ZYNQ chip 9 is an SoC chip of ZYNQ7000 series XC7Z020-2CLG400I of Xilinx corporation.

As shown in fig. 1, the type of the ARM module 1 is double Cortex-a9 ARM core. In this embodiment, the model of the Xilinx company is a dual Cortex-a9 ARM kernel, and the dominant frequency of the ARM module 1 can reach 767MHz, so that the SRM module 1 can be effectively ensured to realize the functions of parameter configuration, data processing and the like of each module.

As shown in fig. 1, the human-computer interaction module 7 includes a nixie tube for setting parameters and displaying an interface, an indicator light for displaying the power supply condition and the operation state of the driver, and a key for inputting the parameters into each module. In this embodiment, the human-machine interaction module 7(HMI) includes five seven-segment digital pipes for setting parameters of each module and displaying an interface, two indicator lights for displaying a power supply condition and an operation state of the driver, and five keys for inputting the parameters into each module. In other embodiments, the nixie tube, the indicator light and the keys in the human-computer interaction module 7 can be configured and adjusted correspondingly according to actual requirements.

As shown in fig. 1, data interaction is realized between the selector module 6 and the decoding module and between the selector module 6 and the external motor 10 through AXl4-Lite connection. In this embodiment, in order to ensure timely validity of data interaction between the modules, the selector module 6 and the decoding module, and the selector module 6 and the external motor 10 are connected through AXl 4-Lite. In other embodiments, other connection modes are also possible, such as AXL 4.

As shown in fig. 1 and 2, the apparatus further includes a filtering module 8 for filtering an external input signal.

As shown in fig. 1 and 2, the filtering module 8 includes a key filter and an ABZ differential signal filter input by the incremental encoder.

In this embodiment, the filtering module 8 is configured to filter an external input signal, including key filtering debounce and ABZ differential signal filtering input by an incremental encoder, generate a 1KHz low-frequency sampling clock by using a frequency divider, sample through a sampling IO port level, store a sampling result in a lowest bit of a shift register each time, and translate the sampling result of the previous 9 times to a higher bit; when the sampling results of 10 times are all 1, the programmable logic unit asserts the input at the moment to be high level; when the sampling results of 10 times are all 0, the programmable logic unit asserts the input at this time to be low level; and meanwhile, caching the judged signal level, and coding according to a unique code mode, thereby realizing key filtering and debouncing. And the signals of the incremental ABZ encoder are differential signals, so that the ABZ differential signals enter the FPGA after being converted into single-ended signals and level signals by using differential conversion and further need to be filtered, the sampling frequency selected by the filtering processing of the ABZ differential signals is 25M, the bit width of the register is 5 bits, the filtering processing process is the same as key filtering debounce, and details are not repeated here.

The position decoding system based on the ZYNQ multi-shaft multifunctional motor provided by the invention is described in detail above. The principles and embodiments of the present invention are explained herein using specific examples, which are presented only to assist in understanding the core concepts of the present invention. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.

10页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:无刷直流电机双模控制的切换方法及切换系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!