Research on motor modular drive control technology based on FPGA

brushless DC motor is widely used in aviation, aerospace and other fields because of its fast response speed and high operation efficiency. The motor drive module based on FPGA has the advantages of small size and high reliability. In order to carry out the motor modular drive control technology based on FPGA, the electrical drive module and control module are designed, and the correctness of the design is verified by the test, which lays the foundation for the follow-up project implementation.


driving principle
The drive and control of Brushless DC motor is mainly composed of drive module and control module. Its function is to receive position sensor signal and forward and reverse signal, which is used to control the on-off of each power tube of inverter bridge and generate continuous torque to replace the function of mechanical commutator. The driving circuit is a typical voltage type AC-DC-AC circuit. The inverter provides symmetrical alternating rectangular wave with equal amplitude and frequency of 5-26khz modulation wave. The permanent magnet N-S alternates to make the U, V, W square wave with 120 ° phase difference of position sensor, combined with forward and reverse signals, generates effective six state coded signals: 101, 100, 110, 010, 011, 001, and generates ah-bl, ah-cl, bh-cl, bh-al, ch-al, ch-bl sequential conduction through logical combination component processing. In each state, only two groups of windings are energized. Changing a state in turn, the magnetic field axis generated by the stator winding rotates at an electrical degree angle of 60 ° in space. The rotor rotates with the stator magnetic field at a space position equivalent to 60 ° electrical degree angle. When the rotor is in The new code changes the conduction combination of the power tube, so that the magnetic field axis generated by the stator winding moves forward 60 ° further Degree angle. In this cycle, the brushless DC motor will produce continuous torque and drag the load for continuous rotation [4]. The speed control of Brushless DC motor is realized by PWM modulation, namely DC pulse width speed regulation. By changing the duty cycle of PWM driving signal, the real conduction time of six MOS transistors is adjusted, and then the real voltage value added to the motor two-phase coil is changed to realize the purpose of speed regulation.
There are many conventional PWM modulation methods, which can be summed up as full bridge modulation and half bridge modulation. The loss of full bridge modulation switch is twice that of half bridge modulation. Therefore, this design chooses half bridge modulation, uses the upper half bridge PWM modulation, the lower half bridge constant pass way. The theoretical control signal of 6-way motor shall be as shown in the figure below:

driver module design
Brushless DC motor drive module, in the power supply design, interface design, and signal transmission design and other aspects of consideration, can achieve rapid verification of a variety of micro control chip electromechanical control systems. The core circuit of the module is motor control chip msk4301. There are three kinds of external interfaces, including power interface, controller interface and motor interface. The controller interface includes six motor control signals and three Hall position signals, which are used to receive six motor commutation control signals and send three position sensor signals. The interface with the motor is the common 3-phase winding interface and 3-  The power interface includes 28V power supply and 12V power supply. 28V is the driving power supply. 12V is converted into 5V and 3.3V through DC / DC to meet the power supply requirements of different chips. In the drive module, the level conversion circuit between 5V and 3.3V is designed to convert the 5V Hall position signal into 3.3V signal suitable for all kinds of CPUs. At the same time, it can also convert the 6-way 3.3V motor control signal sent by CPU into the control signal suitable for msk4301.  Figure 4 level conversion circuit diagram The hall position signal acquisition channel of the module is isolated by optocoupler, and the detailed processing circuit is shown in the following figure:  The core driver chip of the module is msk4301, and its interface and peripheral circuit diagram are as follows:  Figure 6 msk4301 interface and peripheral circuit diagram

control module design
The hardware of the control part is based on the smartSOPC FPGA development platform, and the software is written in VHDL language [5]. The main flow chart of control software is shown in Figure  8. The system includes clock unit, speed setting unit, driving reversing unit, signal processing unit, speed measuring unit, display unit, PID algorithm and so on. The core unit of the control module is the PID algorithm unit, which converts the set speed value and the actual speed value collected by the speed measurement unit into six PWM control signals and one enable signal through the PID algorithm unit to realize the drive and control of the motor.

Simulation and test verification
According to the design idea, the corresponding waveform simulation is carried out in quartus2.
The compiled program is downloaded to the FPGA device to check the correctness of the drive design. Connect the drive board and motor correctly, and use oscilloscope to collect the waveforms of Hall signal and PWM signal. After the system is powered on, the speed is set by pressing the key, and the target speed and actual speed are displayed in the nixie tube display. Through many tests, it is found that the functions of each module are normal, and the motor can reach the set speed after a short period of speed regulation. The real-time PWM waveform and speed acquisition curve are shown in the figure below: The blue signal in the figure is one of the half bridge PWM motor control signals. The time of one third cycle of the signal is high level and high level range, which is consistent with the expected value. According to the measured speed curve, the speed regulation process of the system conforms to the characteristic curve of Brushless DC motor and meets the design requirements.

Conclusion
In order to study the motor modular drive and control technology based on FPGA, the research has designed the brushless DC motor drive and control module. The correctness of the design is verified by the test, which lays a foundation for the further use of FPGA in aerospace electromechanical system.