Neural network with Model Predictive control of PMSM
Hello, viewers! Welcome to LMS Solution. In today's session, we delve into the fascinating world of Permanent Magnet Synchronous Motor (PMSM) control using a Neural Network (NN) in conjunction with Model Predictive Control (MPC). This simulation is conducted using Simulink.
Simulink Model Overview
The Simulink model comprises a DC voltage source connected to a three-phase inverter, which, in turn, powers the Permanent Magnet Synchronous Machine (PMSM). The PMSM receives torque input, and various parameters are measured, such as rotor angle, stator current (in phases A, B, and C), total spin rate per second, and electromagnetic parameters.
Neural Network Controller
The Neural Network Controller plays a pivotal role in this setup. It takes two inputs: the error (difference between reference speed and actual speed) and the reference speed command. Based on these inputs, the NN generates the ��iq reference. The Field-Oriented Control (FOC) is used with ��id reference set to 0.
Model Predictive Controller (MPC)
The Model Predictive Controller is responsible for determining the optimal switching states of the inverter. It calculates the cost function for eight switching states, starting from 000 to 111. The state with the minimum cost function is chosen, and the corresponding pulse is sent to the inverter via the MPC controller.
Training the Neural Network
Prior to implementation, the Neural Network needs training. Real-world data is collected, and the NN is trained using the Particle Swarm Optimization algorithm. The training process involves minimizing the mean squared error between the predicted and actual outputs.
Testing the Model
After successful training, the model is tested. Various scopes are used to visualize the results, including rotor speed, inverter output voltage, stator current, electromagnetic torque, and switching pulse.
The simulation demonstrates the effectiveness of combining Neural Network and Model Predictive Control for precise speed tracking and soft start of the PMSM. The controlled stator current ensures a smooth transition during speed changes.