Design of a general-purpose AC servo control module
2026-04-06 06:03:24··#1
Abstract: Based on the requirements of open CNC systems for high-precision AC servo control, a two-channel parallel general-purpose digital AC servo control module was designed. Each control module is based on a single high-performance digital signal processor (DSP) chip, forming the control system of the module; a single large-scale in-system programmable device (ISP) is used to construct the digital I/O circuit of the module. Using this module to control two identical or different objects only requires calling the corresponding AC servo control software and the corresponding ISP download software for constructing the digital I/O circuit from the software package. The designed AC servo control system has the characteristics of strong anti-interference ability, high reliability, high performance/price ratio, and modularity, and is suitable for various controlled objects. Keywords: Open system; Servo control; In-system programmable technology; Digital I/O circuit. The rapid development of general-purpose PC technology has greatly promoted the research and development of open CNC systems, enabling designers and researchers to analyze the control methods of different types of CNC machine tools, develop different functional general-purpose hardware modules and corresponding general-purpose software modules in a functional module manner, and combine these hardware and software general-purpose modules to form an open CNC system. With the significant improvement in the performance/price ratio of high-performance digital signal processor (DSP) chips, the application of general-purpose digital AC servo control modules based on DSPs in open CNC systems is becoming increasingly widespread. Because DSPs possess high-speed data processing capabilities, a modified DSP architecture, and a powerful instruction set, they are well-suited for executing modern control algorithms and various intelligent control algorithms, providing a foundation for the online real-time application of advanced control theory. This allows us to implement various complex control functions through software control modules. Digital control systems based on DSPs feature high precision, high reliability, flexible control, intelligence, easy parameter modification, and zero drift. 1. Design of a General-Purpose DSP Digital AC Servo Control Module When developing an open multi-axis linkage CNC system, it is necessary to design a general-purpose servo control module to meet the requirements of the open system. Such modules should possess the following characteristics: ① Versatility, meaning that the controlled object can be changed through software customization and combination on the same type of module; ② High reliability, high anti-interference capability, and high performance/price ratio; ③ A single module can control multiple servo motors. The general-purpose servo control system designed in this paper consists of two digital AC servo control modules that control two AC servo motors in parallel. This module integrates a DSP minimum system, ISP device, A/D device, high-speed optocoupler, etc. Using this module, the required control module can be customized and combined using AC servo control software and ISP software designed according to I/O requirements, depending on the controlled object. The DSP used is a TI 32-bit high-speed floating-point digital signal processor TMS320C31, with a 60ns single-cycle instruction execution time and a floating-point operation speed of 33.3 x 10⁶ times per second…1. The reason for using the DSP digital AC servo control module is that the multi-axis linkage CNC system needs to synchronously sample data from multiple AC servo motors every 80µs for closed-loop control of current, speed, and rotor position, and synchronously issue a set of PWM control signals every 80µs. That is, within 80µs, the sampling, control calculation and processing of multiple axes, and the output of PWM signals must be completed. If all these tasks were handled by the host industrial computer, it would not only severely increase the load on the host computer, but also compromise real-time performance. 1.1 Control Strategy Modern AC servo systems require fast response, high precision, and low torque ripple. Achieving high-performance control of the instantaneous torque of AC motors is crucial to meeting these requirements. Therefore, most modern high-precision AC servo systems employ field-oriented control (FOC) and direct torque control (DTC) strategies. These two control methods differ from early variable frequency speed control systems that relied solely on average value control based on the steady-state operation of AC motors. They completely disregard electromagnetic transient processes, controlling based on the instantaneous characteristics of the motor, thus significantly improving both the dynamic and static characteristics of the control system. From the current development status of AC servo systems, these two control theories each have their strengths and applications differ. For synchronous motors, especially AC permanent magnet synchronous motors, FOC is primarily used. This method features a simple control structure and easy software implementation. For asynchronous motors, both control methods can be used, but recent research has focused more on DTC. This is mainly because FOC is extremely complex for asynchronous motors, and its control effect is far inferior to that for permanent magnet synchronous motors. Magnetic field-oriented control (FNC) theory is a decoupled control method based on a precise mathematical model of the object. Therefore, the nonlinearity of the motor and changes in motor parameters have a certain impact on the control performance. Similarly, direct torque control (DTC) theory is also affected by motor parameters, especially at low speeds, where parameters have a significant impact on the control performance of both. Because intelligent control does not require a precise mathematical model of the object, it can achieve tractability and robustness in handling inaccurate and uncertain problems. Combining intelligent control with FNC and DTC theories can fully leverage their advantages, resulting in a significant improvement in control performance. 1.2 Software Package and General Control Module In the design, software modules such as magnetic field-oriented control, direct torque control, digital I/O circuits, intelligent control, fault monitoring, self-diagnosis, communication, and power device protection were designed according to different controlled objects. These modules form a DSP control system software package. In application, hardware control modules can be constructed online from the software based on the controlled object. To reduce the complexity of the control module circuit structure and improve versatility and reliability, a single-chip I/O hardware circuit was designed using an ISP device. In practical applications, by simply calling the digital I/O circuit software related to the controlled object and the corresponding control software, a fully digital intelligent field-oriented control module and a fully digital intelligent direct torque control module can be formed, which are applied to the control of synchronous servo motors and asynchronous servo motors, respectively. 1.3 DSP Digital AC Servo Control Module and Control System Structure Since the servo motor used is an AC permanent magnet synchronous servo motor, the control module used in the experiment is an intelligent field-oriented control module, and its system structure diagram is shown in Figure 1. The working principle of the module is: the A/D and ISP convert feedback signals such as stator current, rotor position, and rotor speed into digital signals. The DSP samples these digital signals and performs control calculations according to the speed command signal issued by the upper industrial control computer and the field-oriented control law. The results are output to the signal generation circuit composed of ISP devices to generate PWM signals, and the speed of the AC permanent magnet synchronous servo motor is controlled by the intelligent power switch module. When it is necessary to modify the controller parameters and control model, only the software needs to be modified. 2 General Single-Chip Digital I/O This article introduces a single-chip digital I/O circuit composed of ISP devices suitable for AC permanent magnet synchronous servo motors. The design utilizes Lattice's ISPLSI1032 ISP device to design a digital I/O circuit for measuring motor speed and rotor position feedback signals and generating PWM signals. This device integrates 6,000 PLD equivalent gates. A single ISP device can house the entire digital I/O circuit because the parameters of gates, flip-flops, tri-state gates, etc., within the same chip are completely identical. Therefore, the circuits constructed from them have consistent characteristics. Implementing the entire I/O circuit on a single ISP device significantly improves anti-interference performance and reliability compared to circuits constructed from discrete components. Due to the advantages of low inertia, low noise, high resolution, and high precision, photoelectric measurement systems are commonly used for measuring motor speed and rotor position signals. Its working principle is as follows: The photoelectric encoder coaxial with the motor generates orthogonal coded pulses proportional to the motor speed, with two phases (A phase and B phase) separated by 2 electrical pulse angles. These orthogonal coded pulses are passed through a quadrature circuit to generate a quadrature frequency pulse signal, which is then counted by a counting circuit to obtain the instantaneous values of speed and rotor position. The structure of the digital I/O circuit is shown in Figure 2. The single-chip digital I/O circuit consists of five parts: ① digital quadrature circuit; ② address decoder; ③ rotor position measurement circuit; ④ PWM signal generation circuit; ⑤ speed measurement circuit. The digital quadrature circuit subdivides the input orthogonal coded pulses and generates digital quadrature frequency pulses for counting and sampling. At the same time, the orthogonal coded pulses generate a motor direction signal for use in DSP control. The output terminal of the digital quadrature circuit is designed with a pulse width adjustment circuit to adjust the width of the output pulse as needed. The minimum pulse width is 60 μm, and the width adjustment increases in multiples of 60 ns. The address decoder decodes the address signal, read/write (R/W) signal, and extended bus IO (IOSTRB) signal sent by the DSP as a chip select signal to control the read/write of the corresponding circuits within the single-chip digital I/O circuit. Simultaneously, the chip select signal is also sent to an external A/D device for the DSP to perform read operations on the A/D. The rotor position measurement circuit includes: a modulo 10000 reversible counter, a data latch (14-bit), and an output tri-state gate (14-bit), as well as current and rotor position sampling signal adjustment circuits. The reversible counter is used for instantaneous rotor position counting, based on the number of pulses per revolution obtained after quadrupling the frequency of the quadrature encoded pulses emitted by the photoelectric encoder and the rated speed. It is designed as a 14-bit modulo 10000 reversible counter. The ISP's I/O units have tri-state buffering characteristics when used as outputs [sup][6] [/sup]. The 14 I/O units are used to form an output tri-state gate, connected to the DSP's 32-bit data bus. The current and rotor position sampling signals from the DSP's internal timer are processed by the current and position sampling signal adjustment circuit. After timing and pulse width adjustments, the signals for rotor instantaneous position latching, A/D sampling and conversion, and interrupt request are output sequentially. When the DSP responds to an interrupt and issues an external I/O read signal, the rotor instantaneous position count value is read by the address decoder. The PWM signal generation circuit includes a 6-bit PWM data latch, a PWM timing circuit, and a latch delay. The DSP periodically issues a write data signal. One bit of its data bus is combined with the decoded signal from the address decoder in the delay circuit. The output latch signal of the delay circuit ensures that the data on the data bus is correctly latched into the PWM data latch. Its output is adjusted and timing corrected by the PWM timing circuit to generate the PWM signal. The PWM timing circuit also ensures that the PWM signal controls the intelligent power devices in a turn-off-turn-on manner, avoiding short circuits caused by simultaneous conduction of power devices on the same bridge circuit. The speed measurement circuit includes: a speed sampling signal conditioning circuit, a digital quadruple frequency pulse counter (12-bit counter 1), a high-frequency clock pulse counter (16-bit counter 2), a data latch (29-bit), and an output tri-state gate (29-bit). The rotational speed is measured using the variable pulse number/pulse period (variable M/T) speed measurement method, the principle of which is shown in Figure 3. The principle of the variable M/T speed measurement method is as follows: During the speed measurement process, not only does the frequency f[sub]m[/sub] of the measured quadruple frequency speed measurement pulse signal change with the motor speed, but the detection time T also changes with the motor speed. Time T will always be equal to the sum of M[sub]p[/sub] pulse periods of f[sub]m[/sub]. By measuring time T and the counter's count value M[sub]p[/sub] of f[sub]m within this time, the motor speed can be determined. Time T can be obtained by counting the high-frequency clock pulses with frequency fc by counter 2, and the count value Mc is T = Mc/fc. Assuming the motor emits M coded pulses per revolution, after quadrupling the frequency, 4N speed measurement pulses can be obtained per revolution, corresponding to the rotation angle. Then the formula for calculating the rotation speed is n = 600 / (2T) = 60fcMp / (4NMc) (r/min). In the speed measurement circuit, the output tri-state gate is composed of 29 I/O units of the ISP device and connected to the 32-bit data bus of the DSP. The lower 16 bits contain the data of counter 2, the lower 12 bits of the higher 16 bits contain the data of counter 1, and the highest bit (the 32nd bit) contains the motor's rotation direction data. The decoding signal of the address decoder serves as the gate control signal for the output tri-state gates, and is simultaneously connected to the output enable pins of 29 output tri-state gates. The speed sampling signal conditioning circuit first outputs a data latch signal, and simultaneously latches the count values of counters 1 and 2, along with the direction signal ("0" or ... 1"), into the data latch when the signal's rising edge arrives. Then, it issues an interrupt request and a counter clear signal to request an interrupt and clear counters 1 and 2, starting a new round of counting. The DSP interrupt responds and issues an external I/O read signal, which, after decoding, reads the count values of counters 1 and 2 and the motor direction signal. The function of the speed sampling signal conditioning circuit is that when the speed sampling signal output by the DSP timer arrives, it does not immediately issue data latch, interrupt request, and counter clear signals; it only latches the speed sampling signal into the latch. Only when the rising edge of the fourth-harmonic pulse arrives does the speed sampling signal conditioning circuit issue signals sequentially. Additionally, this circuit also includes a pulse width adjustment circuit to output signals with the required pulse width, ensuring accurate data transmission. 3. Experimental Results The designed DSP digital AC servo control module was used in an experiment on an AC permanent magnet synchronous motor. The motor model used was MFA15OMB5, with a rated output power of 1.5 kW, rated current f = 7.5 A, rated speed of 2000 r/min, and encoder pulse count of 2500 p/r (P is the number of pulses). The experimental results are shown in Figures 4 and 5. Figure 4 shows the phase current waveform of the drive motor, and Figure 5 shows the speed response of the motor from rest to 500 r/min under no-load conditions. The experimental results show that the designed DSP digital AC servo control module meets the design requirements. 4. Conclusion This paper introduces a general-purpose DSP digital AC servo control system characterized by strong anti-interference capability, high reliability, high performance/price ratio, and modularity. The module itself also features high integration, compact structure, ease of maintenance and debugging, and applicability to various controlled objects. It can be used not only for AC synchronous and asynchronous motor control, but also, with software expansion, for DC motor, stepper motor, and AC linear motor control. The single-chip digital I/O circuit can be used for digital speed measurement of photoelectric encoders, rotary transformers, etc., and for various PWM I/O outputs. The designed general-purpose digital AC servo control module contains only a DSP minimum system, a single-chip large-scale in-system programmable logic device, a current sampling A/D device, and a high-speed optocoupler. Based on experiments, the designed module was tested in a multi-axis linkage CNC system. The results show that the speed inner loop, used as one of the coordinate closed-loop position control loops, can ensure that the position servo control accuracy meets the design requirements.