Permanent Magnet Brushless DC Motor Driver Base On DSP 56 F 8346

Abstract: In this paper, a permanent magnet brushless DC motor drive is designed for smart barrier car. The designed car is, all-digital system, uses direct-axis current zero, vector control strategy, which are based on DSP. System hardware is composed of power boards, power panels and intelligent control boards. A DSP minimum system, it typically uses a current loop and speed loop control structure. A PI regulator is used for current loop control, a PID for speed control loop, to solve the contradiction between fast overshoot, to improve anti-jamming capability, meet the performance requirements.


Introduction
This design is based on FREESCALE DSP. the system designed as follow.Once the system is powered and started, the motion parameter is given by uart or a resistor.DSP reads parameter and commutation HALL code start to start the motor running.HALL not only act as a rotor position sensor, but also as a rotor speed sensor.After a rotor rolling DSP calculates the rotor speed and sensing stator (either two-phase) current so that motors can maintain the given speed and desire torque.FOC control algorithm adjusts the q axis voltage output,calculated by PI controller and generate voltage value then through the coordinate transformation and output six SVPWM control signal.The system control chart is Figure 1 [1].

Control Algorithm
FOC control algorithm achieved by the DSP, which also called vector control.The basic idea is based on vector transformation of coordinate.The current vector is decomposed into two mutually perpendicular to each other independent of the vector i d , generates magnet flux, and i q generates torque.Now the control method set i d =0, then, the torque is a linear relationship to i q [5] .A three phase static coordinate system ABC can be converted to static α-β coordinate system by a Clarke transformer, their relationship is shown in equation (1).
A Park transformer transfer static αβcoordinate system to rotor d-q coordinate system through the matrix converting is shown in equation (2).
cos sin sin cos Current loop control, motor stator current control, is the key to high-performance basis function.Control accuracy and response speed is major control factor and realized in voltage-mode PWM mode (SVPWM) [3].Since the current feedback signal with more harmonic components, is necessary to filter links, and given equal time the constant of the filter and the feedback filter time are constant.As equivalent armature circuit resistance and inductance of the first-order inertia link, can be a controlled loop current loop in Figure2, β 1 The amplification factor of the current feedback circuit [2].A current loop closed-loop transfer function compared with second-standard form, and according to "second order optimal" parameters can be adjusted for the current loop scale factor.Any given space voltage vector can be represented by eight basic space voltage vector synthesis (Sa, Sb, Sc) [4] in Figure 3.1.According to the triangular relationship, each vector can be calculated as follows in Figure 3.2: the reference voltage vector V ref located within the basic space vectors V 1 and V 2 surrounding a sector.The relationship is represented in equation ( 4).In order to minimize harmonics, the design use 7-segment method.T 0 = T s -T 1 -T 2 is zero-vector time.Figure 3.3 is a three-arm switching function waveform.
Basic space vector magnitude is 2 / 3 dc U .According to equation ( 6), it is possible to obtain an arbitrary voltage vector space, precise control of voltage vector.
A speed control loop is based on the current loop design [2] and speed loop PI regulator.A speed loop requires a high and fast response speed sampled signal and speed reference signal has increased the time constant t of filter can then it can be obtained as shown in Figure 4 speed closed-loop system transfer function block diagram: SVPWM control signal is generated by DSP after FOC control, isolated by ACPL-3120 to driver power MOSFET switches which consist of H-bridge by six irf540 so that motor stator windings shaped a rotating magnetic field [5].The actual circuit is shown in Figure 5.

Figure 5. SVPWM control H-bridge circuit
The motor stator windings are connected to a structure of star series a resistor to the winding, which act as a current sensor [6].The body voltage is amplified by AD8656 and isolated by an optocoupler, producing a voltage of 0-3.3V and connecting to DSP's ADC, which calculates the phase current.Actual current sensing amplifer circuit is shown in Figure 6.This measurement method can detect stator phase current, quickly and simply, is low cost, and is little influenced by temperature on the measurement accuracy.

Software design
The main progress is operate in a interrupt.The interrupt procedure is shown in Figure 7.
Into the formula: This becomes an incremental PID control [3].Generally, a computer only needs in the same sample period T, select K p , T d and T i , determining an output value of the controller, is the amount of time related.Software flow chart is in Figure 8.
SVPWM is determined by the output voltage in α-β coordinate system, know output voltage locate in which sector is key point, the decomposed into basic voltage vector.Figure 9 gives SVPWM Sector match algorithm software flow chart.

Conclusion
In this paper, we developed a permanent magnet brushless DC motor control system.The whole system is applied to current loop and speed control loop.The results show that the system has better control precision and dynamic response as a follow-up study done a good technical foundation.

Figure 2 .
Figure 2. Current loop closed loop transfer function block diagram

Figure 4 .
Figure 4. Speed closed-loop system transfer function block diagram