top of page

MATLAB Implementation of Neural Network with Model Predictive Control of PMSM

Writer: LMS RSLMS RS

Introduction

In modern control systems, a common challenge is ensuring the accurate and smooth operation of motors. Using a neural network combined with MPC offers a powerful approach for controlling Permanent Magnet Synchronous Motors (PMSM). The process involves various components like a DC voltage source, a three-phase inverter, and the PMSM, all controlled to optimize performance.

System Setup and Data Acquisition

The system under consideration consists of several critical components:

  • DC Voltage Source: Provides the necessary power for the motor.

  • Three-Phase Inverter: Controls the current supplied to the PMSM.

  • Permanent Magnet Synchronous Motor (PMSM): The motor being controlled.

Multiple parameters are measured during the system's operation, including rotor angle, stator currents (ABC), speed, and electromagnetic torque. The rotor angle is converted into electrical radians, and the stator currents are transformed into DQ form using Park's transformation. Speed data is processed to ensure that the motor performs as expected.

Neural Network Control

At the heart of the system is a neural network controller, which receives two critical inputs:

  1. Speed Error: The difference between the reference speed and the actual speed of the motor.

  2. Reference Speed Command: The target speed for the PMSM.

Based on these inputs, the neural network generates references for the current in the DQ axis (ID and IQ). These references are then used to control the motor. The field-oriented control technique is applied, where the ID reference is set to zero, and the neural network controls the system to achieve the desired output.

Model Predictive Control (MPC) for Switching

The next key component is the Model Predictive Controller (MPC), which operates by considering multiple switching states. There are eight possible switching states, from 000 to 111, for controlling the inverter and PMSM. Initially, the pulses for these switches are set to zero.

For each switching state, a cost function is calculated based on the inverter's voltage and current, as well as the predicted ID and IQ values. The MPC then selects the switching state that minimizes the cost function, ensuring that the motor runs efficiently and meets the desired performance.

Training the Neural Network

Before the neural network can be used for real-time control, it must first be trained. Training involves collecting input-output data pairs from the system and using them to train the neural network. The goal is to minimize the mean squared error (MSE) between the predicted and actual outputs.

The neural network is trained iteratively, adjusting weights to achieve a high R-value (close to 1), indicating good performance. The training process also aims to reduce the MSE as much as possible, ensuring the model can predict the required outputs with minimal error.

Testing the Model and Results

After training the neural network, it is time to test the system. During testing, the reference speed command changes over time, starting from 0, increasing to 120, and then decreasing back to 0. The system responds by adjusting the motor's speed smoothly, with minimal current variation. This ensures that the motor follows the reference speed accurately, demonstrating the effectiveness of the neural network and MPC control system.

The testing also confirms that the motor can track the reference speed with low current consumption, typically around 15 amps. This smooth operation is essential in industrial applications where precise control of the motor's performance is critical.

Conclusion

In conclusion, the integration of a neural network with Model Predictive Control (MPC) provides a highly effective solution for controlling Permanent Magnet Synchronous Motors (PMSM). The neural network enhances the system's ability to track reference speeds accurately, while MPC optimizes the switching states to minimize energy consumption and ensure smooth operation.

This approach is valuable for a wide range of motor control applications, offering improved precision, efficiency, and reliability in modern motor-driven systems.

 
 
 

תגובות


bottom of page