Design and simulation of reconfigurable CNC system based on DSP+CPLD

Publisher:时光如梦Latest update time:2009-07-24 Source: 微计算机信息Keywords:DSP Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. Introduction

With the rapid development of computer technology, industrially developed countries have invested heavily in the research and development of modern manufacturing technology and proposed a new manufacturing model. One of its core ideas is flexible manufacturing, and the manufacturing system can be dynamically adjusted as the processing conditions change. At present, various types of MCUs are developing rapidly. They are not only fast in operation, cheap, and diverse, but also different MCUs integrate dedicated control circuits on their chips for different applications, which meets different application requirements and improves the safety and stability of the circuit. Based on the above analysis and demonstration, this paper designs a reconfigurable CNC system based on DSP+CPLD field programmable gate array devices.

2. Hardware Design

This motion control card is a motion control card with PC as the host, and DSP is selected as the core microprocessor. The card integrates encoder signal acquisition and processing circuit, D/A output circuit, expansion memory circuit and PC-DSP communication circuit. PC transmits the roughly processed data to the motion control system through the DSP-PC communication interface. DSP calculates the error value with the given position by analyzing the result of the photoelectric encoder feedback signal processing circuit, and then obtains the position control amount through the software position regulator, calculates the motion speed control amount, and the generated output signal is converted into analog voltage by D/A to send it to the servo amplifier, and the closed-loop control of the position is realized by controlling the servo motor. The structural block diagram of the system is shown in Figure 1.

Design and simulation of reconfigurable CNC system based on DSP+CPLD

The 16-bit fixed-point DSPTMS320LF2407A from TI of the United States is selected as the core processor of this motion controller. The address decoding, timing logic, and encoder signal processing circuits are completed using CPLD. The PCI interface chip is used to realize the communication between the dual-port RAM and the PC. The dual-port RAM is used to store and buffer the communication data between the DSP and the PC. The SRAM is used to store the programs and data when the motion controller is running.

(1).DSP external interrupt interface processing

For CNC machine tools, due to the limitations of various aspects such as the working stroke, when it exceeds the control range, limit interrupts and encoder INDEX signal interrupts are introduced. Each control axis has two limit switches in the positive and negative directions, generating two limit signals. There are 8 limit signals for 4 axes: LIMA+, LIMA-, LIMB+, LIMB-, LIMC+, LIMC-, LIMD+, LIMD-, where "+" indicates positive limit and "-" indicates negative limit. These signals are connected to the interrupt pin XINT1 of DSP after being ANDed by CPLD, and these signals are connected to the I/O port of DSP through the optical coupling circuit. When moving to the limit switch, the external interrupt signal XINT1 of DSP will be triggered, and then DSP can determine which limit switch exceeds the working range according to I/O. The 8 limit switches are connected to the I/O port of DSP respectively, and these multiplexed pins are in I/O function by setting MCRA (address: 7090H) and MCRB (address: 7092H) to zero. The state of the limit input signal can be read from the corresponding data bits of the registers PADATDIR (address: 7098H) and PBDATDIR (address: 709AH), and the corresponding data direction bits are set to zero to make these I/O pins work in the "input" state. The INDEX signal processing of the encoder is similar to the above. Each axis can generate an INDEX signal, and 4 axes have 4 INDEX signals. These 4 signals generate an interrupt signal through the logic AND gate, which is connected to XINT2 and the DSP's I/O port for the DSP to read when the interrupt occurs.

(2) Design of four-axis encoder signal processing circuit

The four-axis encoder signal processing circuit processes two sets of square wave signals with a phase difference of 90o output by the photoelectric encoder to obtain the actual position of the actuator. Its output is a 16-bit digital quantity, which is fed back to the central processor. The encoder signal processing circuit includes several functional modules such as filtering, frequency multiplication, and counting. The traditional four-axis encoder signal processing circuit is designed with discrete components, which has poor reliability and anti-interference ability. CPLD is used to design a single-chip parallel four-axis encoder signal processing circuit.

It has good real-time performance, small hardware size, high working efficiency, and improves the integration of the system. Compared with discrete components, the single-chip parallel four-axis encoding signal processing circuit is integrated on a single chip. On the one hand, the parameter characteristics of the gate circuit and trigger in the single chip are completely consistent, and the pulse period of the pulse signal can be kept consistent at the same speed. On the other hand, the circuit is made in a single chip, and the anti-interference performance is also greatly improved compared with the circuit composed of separate devices, which enhances the flexibility, versatility and reliability of the system. This paper designs a four-axis servo system, so there are eight channels and four groups of square wave signals, with a phase difference of 90o between phase A and phase B. CLR, CLK, and WE are output clear, system clock, and output enable, respectively. SEL* is the output selection signal, which selects a group of signal processing results from X, Y, Z, and A as the output signal and sends it to the data bus in time-sharing.

Design of filter module

The encoder disk is a stable square wave signal in theory, but in actual operation, there is often pulsation interference. The function of the filter module is to filter out these pulsation interferences, reduce the possibility of system malfunction, and improve system reliability. The following VHDL program delays four CLK pulses for the A and B two-phase square wave signals at the same time. The input signal with a pulse width less than three CLK pulse cycles is filtered out. The simulation results are shown in the figure:

Design and simulation of reconfigurable CNC system based on DSP+CPLD

Design of frequency multiplication counting module

The design of the quadruple frequency circuit is to increase the number of counting pulses in one cycle to improve the measurement resolution. In engineering, the rising and falling edges of the two square wave signals output by the photoelectric encoder are often used to obtain the quadruple frequency pulse signal, which increases the resolution of the photoelectric encoder by four times. The direction of movement is determined by the positive and negative difference between the two square wave signals output by the photoelectric encoder. The output signals A and B of the photoelectric encoder can be written as:

Design and simulation of reconfigurable CNC system based on DSP+CPLD

Design and simulation of reconfigurable CNC system based on DSP+CPLD

As shown in the figure:

Design and simulation of reconfigurable CNC system based on DSP+CPLD

The quadruple frequency counting pulse output S and direction discrimination signal J generated in one cycle can realize the position detection of the servo device and the control of the position servo control system through a 16-bit reversible counting.

3. Design of control algorithm

(1) Control model

Important indicators such as the maximum motion speed, tracking accuracy, and positioning accuracy of CNC machine tools all depend on the dynamic and static performance of the drive and position control system. Therefore, research and development of high-performance drive systems and position control systems has always been one of the key technologies in the study of CNC machine tools. At present, classical control methods, such as proportional or proportional-integral algorithms, are still widely used in CNC machine tool position servo control. The advantages are that the algorithm is simple and easy to implement, but there are defects such as poor adaptability of control parameters and weak anti-interference ability. In order to meet the manufacturing industry's pursuit of high-efficiency production of high-quality products and the need to process parts with increasingly complex shapes, it is required to continuously improve and enhance the steady-state accuracy and dynamic response characteristics of the position servo system, and the adaptability and anti-interference of system parameter changes. Therefore, it is an inevitable trend to adopt and develop advanced control technology. Unfortunately, among the many control algorithms proposed at present, there are very few technologies with practical value, which are mainly manifested in: ① Due to the limitations of algorithm calculation, it is difficult to meet the real-time requirements of control; ② The control theory is imperfect in parameter design and stability analysis; ③ The limitation of modeling error on control quality.

This paper uses the self-learning function of neural networks to design an online single neuron PID and CMAC parallel control intelligent position controller, and uses it in the real-time control of the CNC system, achieving good control effects. The control model structure is shown in the figure:

Design and simulation of reconfigurable CNC system based on DSP+CPLD

(2) Simulation and implementation

The composite control algorithm combining single neuron PID and CMAC is used to complete the simulation experiment of the typical input ramp input response of the position servo controller. Figure 5 is the output curve of the two control algorithms after adding a 10% step disturbance to the unit ramp input of the position servo system. Through the analysis of the graph, it can be seen that the control algorithm combining single neuron PID and CMAC has a smaller following error and better anti-interference ability than the conventional PID control algorithm. This is more important in the position servo control system.

Design and simulation of reconfigurable CNC system based on DSP+CPLD

4. Conclusion

The DSP chip with powerful computing and control functions is used to build a numerical control system platform. The CPLD is used to solve the problem of changes in the logic circuits of different application occasions of the system, and the hardware is reconfigurable. The control algorithm has better dynamic characteristics, control accuracy, anti-interference ability, and adaptive function than conventional PID control. The system is an open system that allows users to continuously upgrade software and hardware very conveniently and keep up with the pace of development of numerical control technology within a certain period of time.

分页
Keywords:DSP Reference address:Design and simulation of reconfigurable CNC system based on DSP+CPLD

Previous article:Research and development of servo motion controller based on DSP
Next article:FPGA Implementation of Cascaded Signal Processors

Recommended ReadingLatest update time:2024-11-16 21:46

Zhongke Haoxin explains the industry's first RISC-V-based DSP
Recently, during the 2021 China Integrated Circuit Design Innovation Conference and IC Application Expo (ICDIA), Zhongke Haoxin co-founder & deputy general manager Wu Junning and assistant general manager & sales director Wang Kai accepted media interviews and interpreted the first RISC-V DSP product launched by Zho
[Embedded]
Zhongke Haoxin explains the industry's first RISC-V-based DSP
Universal Circuit Design of TMS320F2812 and DIP-IPM
introduction: With the rapid development of electronic technology, power consumption and energy saving have put forward new requirements for electronic technology. In terms of power electronics technology, variable frequency speed regulation of AC motors has become the mainstream of motor control. Variable
[Embedded]
Design of voice coil motor servo control system based on DSP and ARM
In order to meet the requirements of the project in terms of control performance and communication methods, a dual-core voice coil motor drive controller hardware structure based on floating-point DSP and ARM is proposed to realize the position servo control of voice coil motors for laser positioning and scanning. Acc
[Microcontroller]
Design of voice coil motor servo control system based on DSP and ARM
Implementation and Optimization of H.264 Video Encoder on DSP
Abstract: The H.264 video encoder is implemented on the DM642 EVM platform, and the encoder is optimized from several aspects, such as memory allocation, cache optimization, code optimization, and assembler level optimization. Experimental results show that the optimized encoder can maintain high image quality and c
[Security Electronics]
Design of PWM Sine Signal Generator Driven by CPLD Using Single Chip Microcomputer
  The previous issues introduced readers to the design of the microcontroller + CPLD system. This article continues to explore the potential of CPLD and provides a design of a PWM sinusoidal signal generator driven by a microcontroller. It fully demonstrates the flexibility of CPLD and its infinite wonders when combine
[Microcontroller]
Design of PWM Sine Signal Generator Driven by CPLD Using Single Chip Microcomputer
Elimination of harmonic distortion of inverter based on DSP control technology
1 Introduction With the rapid development of digital processing system applications, the demand for high-quality uninterruptible power supplies for many devices, such as alarm systems, health care equipment and safety lighting equipment, has increased accordingly. Moreover, with the widespread use of high-freq
[Industrial Control]
Elimination of harmonic distortion of inverter based on DSP control technology
TMS320F206 fixed-point DSP chip development practice
    Abstract: Taking TMS320F206 as an example, this article explains the debugging methods and debugging techniques of DSP chips. It focuses on the hardware design and debugging in the DSP system development process, the pipeline conflicts and wait state settings of software design, and how to utilize flash memory an
[Embedded]
Development of a multi-output PEMFC control system power supply
0 Introduction PEMFC hydrogen generator has the characteristics of no pollution, high efficiency, no noise, continuous operation and modularization. In particular, it is not limited by the "Carnot" cycle, has low operating temperature and low heat radiation. It has a very broad application prospect in both
[Power Management]
Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号