| With the rapid development of the electric vehicle field,Permanent Magnet Synchronous Motor(PMSM)Position Sensorless control has been widely used due to its advantages such as low cost and high stability.This paper will take the surface-mounted Permanent Magnet Synchronous Motor as the research object to carry out the research on the Position Sensorless control strategy.Aiming at the difficult and long period of the traditional motor controller development mode,the model-based design mode is used to develop a complete model in Simulink.The electronic control system realizes the automatic generation from the simulation model to the Embedded Coder,and verifies the designed Position Sensorless control algorithm based on this.This paper analyzes two types of Permanent Magnet Synchronous Motors,and derives the mathematical model of Permanent Magnet Synchronous Motors based on the natural coordinate system.The Sliding Mode Observer algorithm is used to obtain the rotor position angle and speed information,which is high for traditional Sliding Mode control.The shortcomings of frequency chattering a Weighted Adaptive Sliding Mode Observer is designed,and the operation performance of the Weighted Adaptive Sliding Mode Observer under different conditions of the motor is simulated.The results show that the Weighted Adaptive Sliding Mode Observer can achieve more accurate Position Sensorless control.,High-frequency chattering is effectively suppressed.Based on the model design and development process combined with the hardware tools of the TMS320F28035 chip provided by TI,a complete Weighted Adaptive Sliding Mode electronic control system automatic code generation model including the underlying driver and CAN communication framework is built in Simulink,and the M script automatic configuration is designed.Finally,the embedded C code is generated.Analyze the C code generated by the model,establish different in-loop test models to verify its functionality and stability,design different optimization methods to reduce the code size and improve operating efficiency,and finally verify the generation of the model designed in this article through hardware experiments.The effectiveness of the underlying driver and control algorithm code. |