Comparative Study of PMSM Control Using Reinforcement Learning and PID Control.
Comparative Study of PMSM Control Using Reinforcement Learning and PID Control.
Abstract— The use of reinforcement learning for process control Unlike classical approaches, reinforcement learning does
does not require knowledge of its mathematical model. This paper not need to define and know the mathematical model of the
focuses on the control of a permanent magnet synchronous motor system to be controlled, it simply sends actions to the controlled
(PMSM) based on the Field Oriented Control strategy (FOC). The environment to maximize rewards.
objective is to compare the performances of the classical PID
control with that using reinforcement learning (RL). The RL
algorithm used is Double Delay Deterministic Policy Gradient There are several modern RL algorithms. We can mention:
(TD3). Deep Q learning (DQN), Deep Deterministic Policy Gradient
First, the general principle of vector control of a PMSM motor is (DDPG), Double Delay Deterministic Policy Gradient (TD3).
described. Then, the control using reinforcement learning is For our case, we will use the TD3 algorithm.
analyzed and compared to PID control. The performances to be
compared are accuracy, dynamic response and the ability to The paper is organized as follows: the PMSM model and the
control torque and speed. FOC principle are presented in Section II, Section III describes
Finally, the simulation models have been developed and tested in the reinforcement learning, Section IV contains the PID
the MATLAB / SIMULINK. Simulated results are displayed to
validate the effectiveness of the proposed strategies.
controller and Section V presents the methods and results of
numerical simulations of the PMSM control signal correction
based on the FOC strategy using the PID controller and the
Keywords— PMSM, FOC, reinforcement learning, TD3, reinforcement learning agent. Finally, Section VI presents the
Simulink. conclusion.
I. INTRODUCTION
Permanent magnet synchronous motors (PMSM) are widely II. PMSM MODELING AND FOC STRATEGY
used in electric drive systems. They have the advantages of DESCRIPTION
being simple in structure, efficient and easy to maintain.
Despite all these advantages and because of their non-linear
behavior due to motor and load dynamics, their control is A. PMSM Model
difficult [1-2].
The diagram in Fig.1 shows the different phases of PMSM
Many strategies have been developed to control and regulate modeling.
the parameters of the PMSM.
The application of RL reinforcement learning to the control The model of the PMSM is defined by the following
of physical systems is a desired approach, where RL agents electrical (1) and mechanical (2) equations:
train themselves using the input and output signals of the
system to find a suitable control policy before implementation
in a real application.
0 0
1
0 1
Where:
• is the stator resistor.
• and , and , and are respectively d-q axis
stator voltages, currents and inductances.
• , are respectively the rotor inertia and viscous friction
coefficient.
• is the electrical angular velocity of rotor.
• , , and are respectively the electromagnetic
torque, the load torque, the Flux induced by the
permanent magnets of the rotor in the stator phases and
the mechanic speed.
0 0.2*10 (9)
2 0.2*10 (10)
• The reward of action:
3 0.1456,
0
(11)
Finally, the reward is defined by:
, 0 2 3 (12)
0,02;<=0
Combined inertia PMSM-Load
0,014 >=?/AB
Combined viscous friction
PMSM-Load
0,2CD
Flux induced by the permanent Fig. 9. d axis current variation
magnets
After training, reinforcement learning has zero accuracy, the
Pole pairs number EF 4 dynamic overshoots of the Id and Iq currents have decreased by
54% compared to the classical PID method.
The reinforcement learning kept the machine decoupled
(Id=0).
demonstrate the superiority of the control system using
reinforcement learning.
REFERENCES