Dual-channel high-precision servo system based on TMS320F2812
2026-04-06 06:20:33··#1
Abstract: A dual-channel high-precision servo system was designed. The system uses a TMS320F2812 as the control core, a rotary transformer as the position detection unit, and a slotless brushless DC motor as the servo motor. Voltage space vector modulation technology is employed to implement the control algorithm. Experimental results show that the system operates smoothly, exhibits good dynamic performance, and achieves the goal of dual-channel high-precision control. Keywords: high precision; dual channel; TMS320F2812; servo system [align=center] A DoubleChannel High Precision Servo System Based on TMS320F2812 TMS320F2812, and a resolver was used to test the rotor position of the slotless brushlessDCmotors precisely for each channel. Space vector pulse widthmodulation was realized to control the brushlessDC motor. Test results proved that the system had excellent performance in high precision while two motors worked together. Key words: high precision; double channel; TMS320F2812; servo system 0 Introduction Brushless DC servo systems with brushless DC motors as the core have superior speed regulation characteristics and advantages such as long life, high efficiency, and good maintainability. High-precision, high-reliability, and highly intelligent brushless DC servo systems are an important development direction for current servo systems [1-2]. With the development of microelectronics technology and control theory, servo systems can achieve increasingly higher working accuracy and wider speed regulation range, which promotes the application of servo systems in various industries and fields, such as industrial automation control. In the field of industrial automation, some occasions, such as high-precision CNC machine tools and some hydraulic equipment, require two or more motors to work simultaneously to ensure accuracy and improve performance. A hydraulic device requires two servo motors to work simultaneously and has high servo accuracy requirements, so a suitable servo system needs to be designed. This paper introduces a dual-channel high-precision servo control system with the high-performance digital signal processor TMS320F2812 as the control core. It makes full use of its rich on-chip resources, simplifies the system hardware design, achieves good results, and meets the requirements of the equipment. 1 Scheme Design The system requires high precision, which requires reducing the torque fluctuation during the operation of the servo motor. This can be considered from two aspects: motor structure and control algorithm. The servo system uses a slotless brushless DC motor (BLDCM) as the servo motor, and the commutation control method is voltage space vector (SVPWM) sinusoidal wave drive technology. The brushless DC motor adopts the sinusoidal wave drive method, and the three-phase winding is supplied with symmetrical three-phase AC power. The armature magnetic field is a circular rotating magnetic field with continuous direction change, which achieves low torque ripple, smooth operation and low working noise. Reference [3] proved that the SVPWM drive technology has a good effect on reducing the torque fluctuation of the motor. The slotless brushless DC motor eliminates the cogging effect and has the characteristics of small torque fluctuation, stable operation, low noise, small armature inductance and small positioning interference torque. After adopting the sinusoidal wave winding, the structure is combined with the sinusoidal wave drive technology to make the realization of high precision control of the system easier. The sinusoidal wave drive method requires the motor to be equipped with a high-resolution position sensor to provide accurate rotor position information. A rotary transformer is used as a rotor position detection sensor, enabling high-precision detection and meeting the position accuracy requirements of sinusoidal wave drive. Ordinary motor control microcontrollers have only one motor control unit. If two three-phase motors are to be controlled simultaneously, a certain number of external expansion devices and interfaces are required, significantly increasing cost and reducing reliability. The TMS320F2812 is a new generation of dedicated digital signal processor for motor control, with high integration, fast processing speed, and two event managers, enabling simultaneous speed control of two three-phase motors. Therefore, the TMS320F2812 was chosen as the core controller. The servo system scheme principle block diagram is shown in Figure 1 [img=365,309]http://www.chuandong.com/uploadpic/THESIS/2009/5/20090513114005554264.jpg[/img]. The brushless DC motor is the servo drive unit of the system; a PC is used as the host computer platform, and real-time monitoring of the servo system is achieved through an RS-485 bus. The two channels of the system have the same technical specifications and controlled objects, therefore, each channel adopts the same hardware structure to reduce system costs and shorten the development cycle. The TMS320F2812 serves as the core of the entire controller, generating a PWM modulation signal based on the control algorithm. This signal is then combined with a signal generated by the protection circuit, amplified by the drive circuit, and used to control the inverter circuit to achieve control of the servo motor. A signal generator produces a stable sine wave signal as the excitation signal for the resolver and the reference signal for the resolver-to-digital converter (RDC) circuit. The resolver is coaxially connected to the motor rotor, enabling angular position detection and feedback, as well as speed calculation and feedback functions. 2 System Hardware Design Since both channels use the same hardware circuitry, the hardware circuitry discussed below is applied in both channels. 2.1 Power Circuit Design [img=392,253]/uploadpic/THESIS/2009/5/2009051311264531690F.jpg[/img][align=left] Figure 2 Power Circuit The power circuit consists of two parts: the drive circuit and the inverter circuit. Figure 2 is the schematic diagram of a single-channel power circuit. The three-phase inverter circuit is composed of 6 power MOSFETs. The system uses the integrated driver chip IR2133 to drive and control the power MOSFETs, and has undervoltage protection and overcurrent protection functions. The IR2133 is powered by a bootstrap method, using a single power supply through 3 diodes to power the 3 upper bridge arm drive circuits of the inverter, while the 3 lower bridge arms share a single power supply. The PWM input signal is amplified by the IR2133 and drives the MOS2FET to work, generating the three-phase voltage controlling the BLDCM. The operational amplifier integrated inside the IR2133 collects the bus current signal to realize current closed-loop control. An external sampling resistor is connected to the ITR IP pin to achieve overcurrent protection. When an undervoltage or overcurrent fault occurs, the FAULT pin outputs a low level, which is sent to the fault protection pin of the TMS320F2812 to shut down the PWM output and realize the alarm protection function. In the figure, R6 and R7 form a voltage divider circuit to detect the DC bus supply voltage, prevent the system from operating under abnormal power supply conditions, and execute a voltage compensation algorithm based on the detected voltage to improve the system's anti-interference capability. 2.2 RDC Circuit Design This system uses a rotary transformer as the position detection element. The sine/cosine signal output by the rotary transformer is converted into a digital signal after passing through the RDC circuit and sent to the TMS320F2812 through the data bus to form the rotor position detection feedback channel. Position feedback, rotor position determination, and speed measurement all depend on this channel. Its accuracy is one of the key factors for the system to achieve speed stability and position accuracy. Therefore, this feedback circuit is a key channel of the system. In order to ensure the accuracy of this channel, the system uses the AD2S83 integrated circuit to implement the RDC conversion function, which has the advantages of strong anti-interference capability, good linearity, and high accuracy. The circuit is shown in Figure 3. [/align][img=387,289]/uploadpic/THESIS/2009/5/2009051311271098807F.jpg[/img] Figure 3 RDC angle conversion circuit In Figure 3, the output signal of the rotary transformer is sent to AD2S83, and DATA [0~16] is the digital output of AD2S83; SC1 and SC2 select the output accuracy of AD2S83 according to the maximum speed of the motor. In the design process, the rich resources and many pins of TMS320F2812 are fully utilized, and the accuracy selection bit is controlled by it, which expands the application objects; The maximum speed of the servo motor in this system is 1500 r/min, and AD2S83 finally selects 14-bit accuracy. The frequency of the reference signal is 18 kHz, and the detailed calculation process of the values of each component in the figure can be found in reference [6]. 3 Control strategy and implementation This system is a digital high-precision servo system with strong real-time performance. In the system design, digital control technology is fully utilized to simplify hardware circuit design, improve system reliability, and fully leverage the powerful functions of software, enabling some functions traditionally implemented by hardware circuits to be generated by software. The controller software mainly consists of two parts: a main loop program and a PWM timer underflow interrupt service subroutine. The main program and the interrupt service subroutine work together to complete the real-time control of the servo motors. The main loop program is responsible for the initialization of hardware peripherals, data initialization, and motor operating state transitions, and generates alarm information when a fault occurs. Since a single chip is used to control two servo motors, the most important task of the main program is to achieve coordinated control of the two servo motors and complete the state machine switching. According to the equipment's operating requirements, the two servo motors are divided into left and right motors, with five operating states: left motor working alone, right motor working alone, left and right motors working synchronously, left and right motors working differentially, and left and right motors locked. When the left/right motor is working alone, the other motor is locked to prevent malfunction. Based on the control commands sent by the host computer, the main program determines the operating state, preparing for the control implementation of the interrupt service subroutine. The PWM timer underflow interrupt service routine is the core component, implementing functions such as resolver signal reading, current detection, voltage detection, speed calculation, and system closed-loop control. The TMS320F2812 integrates two event managers, each capable of controlling a single servo motor. Since the hardware circuitry is identical, the servo motors are completely identical, and their final specifications are the same, the same control algorithm is used to control both servo motors, executed by the interrupt service routines of their respective event managers. Based on the SVPWM algorithm principle, a sine table is stored in the TMS320F2812, with the table length set according to the resolver resolution and the required control precision. Because a high-precision resolver is used for position detection, one electrical cycle is divided into six sectors based on the measured back EMF signal of the brushless DC motor, and the corresponding sector number is determined by the read resolver signal. Figure 4 is a flowchart of the PWM timer interrupt service routine. [img=350,366]/uploadpic/THESIS/2009/5/2009051311274327203V.jpg[/img] In the PWM interrupt service subroutine, the output signal of the RDC circuit is read in real time as the angle basis for the SVPWM control algorithm. The output signal of the RDC circuit corresponds to the rotor position information of the motor, and the speed and position signal of the servo system can be calculated. Based on the current signal obtained by A/D sampling, the real-time error is calculated to realize the closed-loop control of the system, generate a new PWM duty cycle, and control the speed of the brushless DC motor as the servo drive unit by adjusting the duty cycle, so as to achieve the purpose of high-precision control of the servo system. 4 Experimental Results and Conclusions The main parameters of the two brushless DC motor experimental prototypes used in the servo system are: rated power 80W, rated voltage 28V, maximum speed 1500 r/min, number of pole pairs p = 2, phase resistance R = 0.42Ω, phase inductance L = 2.1 mH. The PWM chopping frequency of the system during operation is 25 kHz, and SVPWM adopts bipolar modulation technology. [img=445,468]/uploadpic/THESIS/2009/5/2009051311281526363X.jpg[/img] Figure 5a shows the phase voltage waveform of the left and right channels after RC filtering, Figure 5b shows the phase current waveform when a single servo motor is working, and Figure 5c shows the start-up acceleration curve of the servo system. The initial acceleration time is slightly longer when using the soft start method, but it has a certain protection function for the servo system; and the system adopts soft start technology, which makes the speed overshoot almost zero during the acceleration phase, ensuring the accuracy of the system. When the system is running at the highest speed, the maximum angle error measured within 10 minutes is 1.87°, while the maximum speed deviation is ±1.0%. Due to the use of a high-precision rotary transformer as the detection element, the minimum speed of the servo system is as low as 0.1 r/min, which meets the requirements of low-speed applications. Experimental results show that by using the TMS320F2812 to simultaneously control two servo motors, and by employing a reasonable control algorithm and high-precision sensors, high control accuracy can be achieved, meeting the design requirements. References [1] Zhang Chen. Principles and Applications of DC Brushless Motors (2nd Edition) [M]. Beijing: Machinery Industry Press, 2004. [2] Li Zhongming, Liu Weiguo. Rare Earth Permanent Magnet Motors [M]. Beijing: National Defense Industry Press, 1999. [3] Qiu Jianqi, Shi Cenwei, Lin Ruiguang. SVPWM Control for Torque Pulsation Suppression of Permanent Magnet Brushless DC Motors [J]. Small and Medium-sized Motors, 2003, 30 (2): 27-33. [4] Liu Jinglin, Liu Weiguo, Ma Ruiqing. Ultra-low Speed High Precision Sine Wave AC Servo System Based on Direct Torque Control [J]. Journal of Northwestern Polytechnical University, 2004, 22 (4): 444-447. [5] Li Hualiang, Lin Hui. Full Digital Control of Dual Brushless DC Motors Based on DSP and CPLD [J]. Micromotors, 2006, 39 (2): 42 - 45. [6] Analog Device Inc. Resolver to Digital ConverterAD2S83 Datashe2et[EB/OL]. http//www.adtasheetcatalog.com/datasheets-pdf/A/D, 1998.