| With the development of field programmable device infrastructure and technology,the capacity and performance of FPGA chip have been greatly improved.Nowadays,many projects directly use FPGA as the core control unit.The application of FPGA chip in the motor control system improves the dynamic response and real-time performance of the system,so as to improve the motor control effect.The model-based design technology provides the whole process from algorithm requirement design to target code generation,and improves the development efficiency of FPGA engineering.Therefore,using model-based design technology to realize FPGA motor control system has both advantages,which has practical value and far-reaching significance for the development of motor control system.After analyzing and summarizing the development of motor control system and the relationship between model-based design technology and FPGA development,this paper takes the vector control system of permanent magnet synchronous motor as the research object.After analyzing the mathematical model,vector control theory and SVPWM algorithm of permanent magnet synchronous motor,it attempts to generate HDL in Simulink with FPGA code The coder library models the coordinate transformation,speed and current regulator,SVPWM algorithm,motor and drive axle involved in the whole control system.The triangle carrier model and the deadzone model are redesigned to meet the FPGA code generation requirements,and simulation analysis is carried out to verify the correctness of the modeling.Then the Fixed-point tools are used to process the data in the system model and the dynamic constraints of the data bit width,so that it can meet the requirements of code generation.The environment of code generation is configured to automatically generate FPGA code.In modalism,the generated test incentive file is used to compile and simulate the code to verify the consistency between the code running results and the simulation results of Simulink system.In addition,this paper designs the hardware part of the control system circuit,completes the program design of the signal acquisition circuit,and then completes the code integration of the whole control system in the Quartus software.By setting up the experiment platform of PMSM system,debugging the control system and analyzing the experimental data,the results show that the control system has good dynamic response and control performance,thus verifying the feasibility of the FPGA PMSM system based on the model design and development,which has great guiding significance for the realization of complex control system on FPGA. |