PCI bus-based fully closed-loop AC servo control system
2026-04-06 04:47:53··#1
Abstract: An open AC servo motion control system based on the PCI bus is designed, featuring modularity, intelligence, and flexibility. A motion control card and PC are used as the upper-level control unit, AC servo drivers and servo motors as actuators, and a linear encoder and data acquisition card as the linear displacement detection device, thus creating a fully closed-loop motion control system. Simultaneously, VC++ programming is used to achieve high-speed and high-precision control of the servo motor. Keywords : Full-closed-loop PCI bus AC servo motion control card [align=center]Full-closed Loop AC Servo Control System Based On PCI BUS GUAN Jian, SHU Zhibing (Automation College, Nanjing University of Technology, Nanjing 210009, China) Abstract : The open servo motion control system based on PCI BUS is modular, intelligent, and flexible. With a motion controller and PC as the high-level control unit, an AC servo driver and servo motor as the execution component, and an optical grating ruler and data collection as the position examination part, a full-closed-loop motion control system is designed. Using VC++, the system can control the servo motor with high speed and high precision. Keywords : Full-closed Loop PCI BUS AC Servo Motion Controller 0 Introduction In modern industrial production, AC servo control systems have been widely used. However, with the development of mechatronics products, the requirements for positioning accuracy and dynamic response of AC servo control systems are getting higher and higher, and traditional systems can hardly meet the needs of modern production. The design ideas of replacing analog with digital, replacing DC with AC, and replacing open-loop with closed-loop have become the main methods for building open control systems. Among various open control systems, PCs (including industrial PCs) have the characteristics of large production batches, high cost performance, and advanced technology, and are equipped with high-performance application software and programming software. Therefore, by using the standard PCI bus of PCs, a PC+motion control card upper controller can be designed to meet the requirements of the core components of the control system. Most AC servo control systems work in a semi-closed-loop control mode, which cannot overcome or compensate for the gaps and errors in the transmission chain. In order to obtain higher control accuracy, high-precision detection elements (such as: grating rulers, photoelectric encoders, etc.) should be installed in the final motion part to achieve full closed-loop control [1]. Full closed-loop control overcomes the defects of semi-closed-loop control system. The upper controller can directly sample the position feedback element installed on the last mechanical moving part as the position loop. In this way, the servo system can eliminate the gaps in mechanical transmission (such as gear gaps, lead screw gaps, etc.), compensate for the manufacturing errors of mechanical transmission parts (such as lead screw pitch errors, etc.), realize the true full closed-loop position control function, and obtain high positioning accuracy. 1 Hardware design of control system 1.1 System hardware composition The system is an XY axis full closed-loop AC servo motion control system used for teaching and experiment. The system consists of four parts (Figure 1): (1) The upper control part includes a general PC and an ADT850 motion control card; (2) The drive part consists of a Panasonic MINAS A4 series AC servo driver and an AC servo motor; (3) The load part is an XY axis ball screw platform; (4) The closed-loop feedback part is realized by a grating ruler and a data acquisition card. [align=center] Fig.1 The structure of the full-closed servo loop system[/align] 1.2 Design of the full-closed-loop control structure The control system adopts a double-loop structure, namely the inner loop and the outer loop. The inner loop ensures the stability of the system and its robustness against external disturbances and parameter changes. The outer loop improves the control accuracy of the system, making the closed-loop system response close to the reference model. (1) The inner loop receives the encoder feedback signal of the servo motor through the AC servo driver to realize the control of the motor. The Panasonic MINAS A4 series AC servo driver includes a servo controller and a PWM power amplifier. The servo controller consists of a position loop controller, a speed loop controller and a current loop controller. The function of the servo controller is to complete the closed-loop control of the servo system, such as torque control, speed control and position control. The IPM (intelligent power module) in the servo driver is a new type of module with IGBT as the power device. (PWM frequency conversion speed regulation technology) This power module integrates the output power element IGBT and drive circuit, and various protection circuits into the same module, which improves the system performance and reliability, reduces the IPM conduction loss and switching loss, and reduces the size of the entire system. (2) The outer ring is composed of the load platform displacement signal collected by the grating ruler and fed back to the upper control system through the data acquisition card. The grating ruler adopts a linear incremental grating ruler. The grating of the incremental measurement method adopts periodic grating lines, and the position information is obtained by calculating the number of increments (measurement step) from a certain point [2]. As shown in Figure 2, the output signal of the grating ruler is two square wave signals A and B with a phase angle difference of 90°. The spatial position period of the signal is W, and the highest resolution is η=W/4. The smaller W is, the higher the resolution of the grating ruler. When the system moves forward, the rising edge and falling edge of the A signal are 1/4W ahead of the B signal; conversely, when the system moves backward, the rising edge and falling edge of the A signal are 1/4W behind the B signal. The displacement can be calculated by counting the number of cycles of the collected motion signal direction and the change of the A signal using a counter, i.e., the displacement X = nW, where n is the count value. [align=center] Fig.2 Principle of the linear encoder signals collection[/align] (3) The motion control card is responsible for the real-time control of the system. The ADT850 motion control card is a PCI bus motion control card used to control stepper motors and digital servo motors, and to perform linear, circular interpolation and spline function movements. As the upper unit of the stepper motor, the ADT850 motion control card forms a master-slave control structure with the computer. The computer mainly completes the management of the human-machine interface, the detection and control of the control system, and the motion control card receives the instructions issued by the computer CPU and performs motion trajectory planning. This includes the output of pulse direction and direction signal, automatic acceleration and deceleration processing, and detection of signals such as origin and limit switches. The system has software search reference point and software limit functions, which can ensure that precision components such as motors and ball screws are not damaged during system operation. Meanwhile, ADT850 supports operating systems such as DOS, Windows 95/98/NT/2000/XP, and provides low-level library functions, which can be used for software development in VC++, VB, etc. [3]. 2 Software Development Based on ADT850 Card This system uses both a motion control card and a data acquisition card based on the PCI bus. Both cards provide low-level VC library functions, which provides a convenient way to develop under a software framework. In the development, we chose to use the Windows system and VC++ MFC to program in an object-oriented manner [4]. The software development process mainly includes three parts, as shown in the system structure diagram 3: program initialization; two-dimensional trajectory design; and error comparison of detection signals. [align=center] Fig.3 system software structure flow[/align] (1) Initialization of ADT850 motion control card The ADT850 motion control card itself provides a static library ADT850.LIB, a header file ADT850.H, and a file winio.sys used by Windows NT/2000. The functions in the dynamic library have been declared in the header file ADT850.H. After declaring #include “adt850.h” in the program header, the library functions are called to confirm the installation of the ADT850 card, set the pulse output mode, the position feedback mode, the working mode of the limit switch, whether the servo signal is used, whether to use software limit, etc. These parameters should be set according to the specific hardware platform. Generally, they are only set once during program initialization and should not be set again afterward. Some function calls are as follows: adt850_initial() // Detect the installation of the ADT850 card int set_pulse_mode() // Set the working mode of the output pulse int get_status() // Get the drive status of each axis int get_inp_status() // Get the interpolation drive status int set_range() // Set the range int set_startv() // Set the initial speed int set_speed() // Set the drive speed (2) Initialization of the KPCI-811 multi-function data acquisition card The KPCI-811 multi-function data acquisition card is used. In the initialization, the data acquisition card library functions are called to initialize the card, just like the motion control card. This includes creating a device object, setting the acquisition frequency, and the timer counting working mode. Some function calls are as follows: IO_HANDLEL_KP811_LocateAndOpen() // Create device object void KP811_TimerWrite() // Set AD acquisition frequency void KP811_ModeWrite() // Set working mode void KP811_ChannelWrite() // Set A/D channel number WORD KP811_CheckSF_ReadFIFO() // Software triggers A/D and reads data void KP811_8254_CTRL_Write() // Set 8254 timer counting working mode (3) Two-dimensional trajectory program design Using VC++ MFC to design dialog-based motion control trajectory design. Taking linear interpolation trajectory as an example, realize linear motion from the origin to the specified position. Part of the program is as follows: void CMyDlg::OnOrigin() { ……. char ch1[10],ch2[10]; GetDlgItem(IDC_LOG_POS1)->GetWindowText(ch1,10); GetDlgItem(IDC_LOG_POS2)->GetWindowText(ch2,10); num1=atoi(ch1); num2=atoi(ch2); …… } void CMyDlg::OnLine() { …… inp_move2(cardno,1, num1, num2); …… } 3 Analysis and solutions to key problems in actual operation (1) Error of actual detection signal At the control end, the timer generates an interrupt, the program will read the actual position value signal detected by the grating ruler, and at the same time pause the motor running program to wait for the correction result. However, at the load end, if the actual position value detected by the grating ruler is read before the servo motor has really stopped, an error in detection will occur. The solution is to extend the motor's position appropriately when an interrupt occurs, and then check the actual position of the grating ruler after the delay, and then correct it. Obviously, the setting of this delay needs to be coordinated with the setting of the sampling period and the performance of the servo driver and servo motor. Because this delay will accumulate with the increase of the number of interrupts, the delay will affect the system performance if it is too long; the delay should not be shorter than the performance requirements of the servo driver and servo motor. (2) Determination of the sampling period The sampling period determines the positioning accuracy and response frequency of the system. The smaller the sampling period, the higher the control accuracy, but it will increase the calculation load of the controller and cause frequent interruptions, slowing down the running speed and continuity of the motor, thus affecting its response frequency. Therefore, when actually selecting the sampling period, it is necessary to consider both the needs and the possibilities. Considering the dynamic performance and anti-interference performance of the control system, the sampling period should be shorter. In this way, the system can quickly locate by changing the given value, reduce the error, and improve the anti-interference performance. Considering the response frequency, the sampling period should be longer, which can reduce the calculation load of the DSP, reduce the number of steps of the motor movement, thereby increasing the speed and frequency of the motor operation and strengthening the continuity of control. From the above analysis, it can be seen that the requirements of various factors on the sampling period are different and even contradictory. Therefore, it is necessary to make a comprehensive choice based on the specific situation and requirements. The implementation method is to change the sampling period in the comparison interrupt of the timer to achieve the optimization of system control. (3) The reading error caused by the grating ruler The accuracy of the system depends on the grating ruler, but the installation of the grating ruler and the ambient temperature can easily cause the reading error of the grating ruler. First, it is necessary to ensure that the installation of the grating ruler is parallel to the guide rail of the operation. Another aspect is to reduce the influence of the ambient temperature on the final measurement and run the system under the allowable environmental conditions as much as possible. 4 Conclusion This paper constructs a full closed-loop control system based on the semi-closed-loop AC servo control system. At the same time, in view of the current situation that the semi-closed-loop control system is widely used in the market and the user's desire to enhance the control accuracy of the control system, a data acquisition card based on the PCI bus and a linear grating ruler are adopted. This design, combined with the motion control card based on the PCI bus and the two-axis ball screw platform, simplifies the development and design of the control program and the hardware installation. While ensuring the stability of the system, the control accuracy of the system is improved. References [1] Fan Yani, Liu Kerong. Full closed-loop control system based on motion controller [J]. Modern Electronics Technology, 2006 (23): 140-142. [2] Zhang Baihai, Chai Senchun, et al. Research on signal processing method of grating ruler in data acquisition system [J]. Machine Tool & Hydraulics, 2003 (02): 118-119. [3] Shu Zhibing. AC servo motion control system [M]. Beijing: Tsinghua University Press, 2006. [4] Sun Xin, Yu Anping. VC++ In-depth Explanation [M]. Beijing: Electronic Industry Press, 2006. Author Biography : Guan Jian (1981-), male, Jiangsu native, postgraduate, major research direction: AC servo system, motion control technology, CNC system, mechatronics. Email: [email protected] Shu Zhibing (1965-), male, from Nanjing, Jiangsu Province, is the Director of the Institute of Motion Control at Nanjing University of Technology and the Secretary-General of the Intelligent Detection and Application Technology Research Association of the Chinese Association for Artificial Intelligence. His main research areas include AC servo systems, DSP technology, fieldbus, CNC systems, motion control, and mechatronics systems. Contact Information : Address: School of Automation, Nanjing University of Technology, No. 5 Xinmofan Road, Nanjing, Jiangsu Province, 210009, China. Tel: 025-83587369, 83306120 (Fax) Mobile: 13776653504