Permanent magnet synchronous motor simulink simulation - PMSM vector control

I have learned PMSM for more than a year. I use the fastest method to build a basic vector control model in simulink. If you are not familiar with it, you can refer to it. I have time to update the details of each step and other implementation methods. It is not suitable for creation, remember to like it collect.

1 Vector control system block diagram

Not much to say, first look at the frame diagram

2 vector control simulink simulation model

The principle of vector control is not outlined in detail here. There are too many things involved. I will only give a brief explanation. I will explain each module when I have time. According to the modules in the block diagram, the models required for vector control in the Simulink model and model are as follows :

The parameters of each module are described below, and can also be set and modified according to actual needs

2.1 Powergui and simulation settings

Select the module list:

Find the corresponding module: (the following is to find the corresponding model diagram by the model name, double-click or drag it to the simulation interface)

 Select the simulation step size, here the sampling time is set a little smaller, otherwise an error will be reported if you choose the built-in SVPWM later

 2.2 Functional modules

Permanent Magnet Synchronous Machine (Permanent MagnetSynchronous Machine):

Inverter bridge (Universal Bridge) and DC power supply (DC Voltage Source):

 

 

 SVPWM module (SVPWM Generator (2-Level)):

PID module (PID Controller):

 

 Coordinate transformation module (write it yourself according to the coordinate transformation formula):

Bus selector module (separate the current, rotor position, speed and other signals in the motor):

Connect to motor to select current ia, ib, ic, position angle, speed

Note that this is the mechanical position angle, which needs to be converted into an electrical angle (×number of magnetic pole pairs). The speed is the electrical speed, the unit is (rad/s)

Velocity needs to be converted to velocity/min (60/(2pi))

 Other modules :

sum module:

 mux and demux modules:

 

 3 Simulation

After the model is built, choose a simulation time of 0.2s:

Add an oscilloscope module (scope) where observation is required, taking the rotational speed as an example:

The PID parameter selection is: the proportion and integral of the two PI controllers of the current loop are set to 10 and 2000, and the speed loop is set to 0.3 and 1. This parameter can be adjusted by yourself.

The motor is running, observe the waveform of the oscilloscope

Speed ​​waveform:

Three-phase current:

Add:

1. Press Ctrl+G for the selected content to package the module, the input interface is in, and the output interface is out.

2 If the current waveform is not ideal, you can increase the frequency of SVPWM

Guess you like

Origin blog.csdn.net/qq_49552487/article/details/123345801