Servo control system
The servo system is an automated control system that tracks the change in input volume with a certain degree of accuracy. As the position following system of the closed-loop automatic control system, it plays a prominent role in the production process and the control, positioning, aiming, tracking, signal transmission and reception of moving objects, and has become an important component of various adjustment systems. section.
A typical DSP closed-loop control system, shown in Figure 1, consists essentially of three modules: the controller, the controlled object, and the sensor. The controller compares the reference signal with the feedback signal measured by the sensor, and the generated error is then sent to the controlled object by the control algorithm to calculate an appropriate correction signal. The main purpose of the controller is to make the system have the best response according to the control command and the feedback signal to generate an appropriate correction signal, and the process is mainly to complete the execution of the control algorithm, which can be completed by analog, digital or hybrid.
Various control methods used in modern control theory, such as adaptive control, fuzzy control, neural network control, robust control, etc., can be used to design the control system. There are many control algorithms, but basically they are composed of mathematical equations plus some process control commands such as if...then, go...to, etc., and TableLook-up is sometimes necessary, so the control processor is It is how to implement control algorithms using software and hardware technologies.
Application of DSP in control system
In order to control the speed, position and current of the motor, and also communicate with the host computer, the following joint servo system control block diagram 2 is designed, including motor, harmonic reducer, photoelectric encoder and control board. Drive boards, which form an organic whole, together to achieve motor servo control and power assist. The control board realizes closed-loop control and communication of the motor, and the drive board performs power amplification to drive the motor to run.
1. DSP bus module
In order to be able to communicate with the host computer, the drive system uses the CAN bus module of the DSP, which belongs to the enhanced eCAN bus module.
The design uses a standard CAN controller (SCC) mode, using only the first 15 mailboxes in 32 mailboxes, without the use of timed delivery. Since the joint servo unit needs to receive both the message and the message, these mailboxes need to be configured to receive the mailbox and send the mailbox without receiving filtering. The communication baud rate is configured to 1 M/s.
2.DSP Event Manager Module
This module is a motor control module. There are two event management EVA and EVB in the DSP, which all include general-purpose timer, comparison unit, capture unit, PWM logic circuit, quadrature code pulse circuit and interrupt logic circuit. The combination of optimized peripheral units and high-performance DSP cores provides advanced control technology for high speed, efficiency and full speed for all motor types.
Each event manager module can simultaneously generate eight Pulse Width Modulation (PWM) signals, including three pairs of dead-band programmable CMP/PWM signals generated by a 16-bit full compare unit and two generated by a 16-bit general-purpose timer comparator. Independent PWM signal. By setting different working modes, it is possible to select PWM waves that output asymmetric PWM waves, symmetric PWM waves or eight space vectors. The PWM output frequency can be changed directly as needed; the PWM pulse width can be changed during or after the PWM period; the autoload compare and period registers have reduced CPU overhead.
In the design, the full comparison unit in Event Manager A is used to generate an asymmetric PWM wave with dead band protection, through which the switching of the six N-channel MOSFET transistors in the H-bridge circuit is controlled. The quadrature coded pulse (QEP) circuit composed of CAP1/QEP1 and CAP2/QEP2 in the capture unit is used to count the orthogonal coded pulses generated by the photoelectric encoder to calculate the velocity and position. The circuit is protected by an interrupt generated by the PDPINTx pin. The ADC module is used to collect the phase current of the H-bridge circuit to achieve closed-loop control of the current loop.





