Design of Neutrosophic Self-Tuning PID Controller for AC Permanent Magnet Synchronous Motor Based on Neutrosophic Theory

In practical control applications, AC permanentmagnet synchronousmotors need to work in different response characteristics. In order to meet this demand, a controller which can independently realize the different response characteristics of the motor is designed based on neutrosophic theory and genetic algorithm. According to different response characteristics, neutrosophic membership functions are constructed. +en, combined with the cosine measure theorem and genetic algorithm, the neutrosophic self-tuning PID controller is designed. It can adjust the parameters of the controller according to response requirements. Finally, three kinds of controllers with typical system response characteristics are designed by using Simulink. +e effectiveness of the designed controller is verified by simulation results.


Introduction
Compared with the traditional electric excitation synchronous motor, permanent magnet synchronous motor (PMSM) has the advantages of less loss, high efficiency, and low power consumption. It is excited by a permanent magnet. e structure is simple and the cost is low. e collector ring and brush are omitted, and the reliability is improved. e rotor does not need an excitation current. So, the excitation loss no longer exists. And the efficiency and power factor of the motor are improved. In recent years, the research and application of PMSM have been very popular [1]. It is meaningful to study the method to make PMSM work effectively on the demand response characteristics.
In fact, some parameters of the system are not constants but will change with time, such as manufacturing tolerances, aging of major components, and environmental changes.
is will affect the control performance to a certain extent. In order to improve the control performance of the PMSM, Sun et al. [2] proposed an improved MPCC scheme for PMSM drives to overcome the high torque and current ripples. At the same time, the steady-state and dynamic performance of PMSM drives are further improved. In [3], a new method to extract accurate rotor position for the speed sensorless control of surface-mounted permanent magnet synchronous motors (SPMSMs) based on the back electromotive force (EMF) information is presented. In [4], a novel method for the sensorless control of interior permanent magnet synchronous motors is proposed. An iterative search strategy based on dichotomy is proposed to provide a finite number of rotor position angles with good accuracy. Hussein [5] proposed a variety of uncertainty system modeling methods and robust stability analysis methods for interval linear time invariant systems. Hote et al. [6] introduced the robust stability analysis of the PWM push-pull DC-DC converter.
en, Precup and Preitl [7] proposed the integral servo system with proportional integral (PI) and proportional integral derivative (PID) controllers to ensure stability and robustness of the controller. Elkaranshawy et al. [8] designed the PID robust controller of flexible arm robot by using the Kharitonov theorem.
In order to further solve the problems of uncertainty and inconsistent information, the concept of neutrosophic set was first proposed by Smarandache [9]. en, the neutrosophic theory developed rapidly. Wang et al. [10] proposed the single valued neutrosophic set. Ye [11] further proposed the concept of a simplified neutrosophic set, including the concepts of single valued neutrosophic set and interval neutrosophic set. Subsequently, researchers have solved many practical engineering problems based on the theory of neutrosophic set, such as fault diagnosis [12,13], Multiattribute group decision making [14,15], linear and nonlinear programming [16], linear equation of traffic flow [17], and roughness coefficient of rock discontinuity [18].
PID algorithm is the most widely used in the field of engineering control. But the tuning of PID parameters is a tedious process. At present, the PID tuning methods studied by scholars include genetic algorithm [19], particle swarm optimization [20], and fuzzy control algorithm [21]. e tuning of PID parameters based on neutrosophic theory was proposed by Can and Ozguven [22]. However, it uses a traversal search algorithm, and the precision and speed cannot be considered at the same time. Ye [23,24] proposed a cosine similarity measure. Combined with the genetic algorithm, the Can's PID tuning method is optimized. Ruan et al. [25] further extended and compared the neutrosophic PID tuning methods with cosine similarity measure, exponential similarity measure, and simulated annealing algorithm.
In this paper, the neutrosophic PID tuning control algorithm under different response characteristics is studied. Neutrosophic membership functions are constructed corresponding to different characteristics and the cosine measure theorem and genetic algorithm are used to tune the parameters and get the optimal values. e paper is organized as follows. In Section 2, the PMSM model is described. And neutrosophic self-tuning PID controller is designed in Section 3. Simulations are shown in Section 4. Finally, the conclusion of this work is summarized in Section 5.

PMSM Model Description
2.1. Basic Equations of PMSM. PMSM control system is a high-order, nonlinear, multivariable strong coupling system, so its mathematical model contains time-varying parameters, and the magnetic circuit relationship is also complex. e section coordinate diagram of PMSM is shown in Figure 1.
e a-axis of the stationary coordinate system coincides with the A-phase winding, which is used to analyze the mathematical model of the PMSM. [26]. In the coordinate system, the voltage matrix equation of PMSM is as follows:

Voltage Equation
where u a ,u b , and u c are the stator phase voltages, i a , i b , and i c are the stator phase currents, φ a , φ b , and φ c are stator flux, R s is the stator resistance, and p is a differential operator. e voltage equation of AC permanent magnet synchronous motor in the two-phase rotating d − q coordinate system is derived as follows: [27,28]. e flux linkage equation of PMSM in the d − q coordinate system is as follows:

Flux Linkage Equation
where φ r is rotor flux linkage and L d and L q are as follows:

Electromagnetic Torque Equation.
e power of PMSM is equal to the product of phase voltage and phase current of each phase. It can be expressed as follows: After coordinate transformation, the power is changed in form, but its magnitude is 3/2 of the input power in the d − q coordinate system. To further analyze the input power, the voltage equation is introduced into equation (7), and then the electromagnetic torque equation is obtained as follows: where p n is the pole number of the motor and φ f is the flux linkage of the permanent magnet. Generally speaking, L d � L q is satisfied.

Equation of
Motion. e electromagnetic torque of PMSM not only drives the motor load but also overcomes the friction damping and inertia of the permanent magnet rotor. e torque balance formula is as follows: By integrating equations (2)-(4), (8), and (9), the mathematical model of three-phase AC PMSM can be obtained as follows:

Vector Control Principle of PMSM.
Since the mathematical model of PMSM is a nonlinear and strong coupling mathematical model, we need to use the vector control method to decouple the mathematical model. And combined with an appropriate control method, the speed control requirements can be achieved. e control method used in this paper is to make i d � 0. More details can be found in [29,30]. en, the decoupling mathematical model can be obtained as follows:

Neutrosophic eory.
e variable X is defined as a universe of discourse. Any single-valued neutrosophic set N in X can be expressed as follows [31]: where T N (x) is a true membership function, I N (x) is an uncertain membership function, and F N (x) is a false membership function.
And each x satisfies the following conditions: For convenience, x � (T, I, F) is defined as a singlevalued neutrosophic number in X.
Definition 1 (see [32]). If there are two neutrosophic sets N 1 and N 2 that belong to the universe of discourse X � x 1 , x 2 , . . . , x n , the specific forms are as follows: en, the cosine similarity measure between N 1 and N 2 can be defined by Cs(N 1 , N 2 ) has the following properties: Mathematical Problems in Engineering e flowchart of the genetic algorithm is shown in Figure 2. Initialization includes generation population size, determination of iteration times, coding, selection, crossover, mutation probability, etc. e criterion for judging whether to end is to specify the number of iterations or to specify your own ending criteria, such as the emergence of a more suitable individual. In addition, it is possible to use decimal number operations directly without encoding and decoding. ere are many pieces of research on genetic algorithms, which will not be repeated here.

Neutrosophic Self-Tuning PID Control Method.
is paper will adopt the PID control algorithm, which is very effective in engineering. In particular, the incremental PID is only related to the last three errors, which greatly improves the stability of the system. Its specific form is as follows [33]: where Δu k is the control signal. A, B, and C are parameters. More details can be found in [33]. e PID parameter self-tuning method is designed based on the neutrosophic theory and genetic algorithm. e selftuning method needs to consider multiple system response characteristics, that is, a multiobjective programming model problem. In order to comprehensively investigate the advantages and disadvantages of a system, we choose rising time, settling time, peak time, overshoot ratio, undershoot ratio, and steady-state error as the transient characteristics of the control system. According to different response characteristics, neutrosophic membership functions are constructed. Finally, the cosine similarity measure method is used to calculate the measurement value between the transient characteristics and the ideal response characteristics.
e triangular and trapezoidal membership functions are adopted for neutrosophic processing. e six transient characteristics are taken as a whole feature set S � S 1 , S 2 , S 3 , S 4 , S 5 , S 6 . In the set S, element S 1 means the rising time, S 2 means the settling time, S 3 means the peak time, S 4 means the overshoot ratio, S 5 means the undershoot ratio, and S 6 means the steady-state error.
Using the neutrosophic theory, the following form is given: and the ideal N * is shown as follows: en, using cosine similarity measure, we can get the similarity of N and N * as follows: e structure diagram of control system is shown in Figure 3. e inner loop of the control system is current loop and the outer loop is speed loop.

Remark 1.
e main feature of this control system is that the neutrosophic self-tuning PID control method can realize the control of PMSM with different response characteristics. What users need to do is to give the response characteristics they want by simply adjusting the membership function. Cosine similarity measure method and genetic algorithm in the control system can find the optimal parameters of PID controller automatically, instead of manual adjustment.

Simulink Module Building.
In order to facilitate observation in the Simulink module, the main system is first established as shown in Figure 4. e speed, angle, torque, and current of L d and L q can be displayed in the scope. Powergui sets the working frequency of the whole system, which is equivalent to the CPU working frequency of 20 microseconds. e sampling time of each sensor is different, which can be represented by different zero-order holders.
en the subsystem as shown in Figure 5 is built to assemble the core module.
is is a double loop system. e inner loop is the current loop and the outer loop is the velocity loop. e sampling speeds of the angle sensor and speed sensor are set to 1 ms. e speed of the current sensor is faster, set to 0.2 ms. In order to be close to reality, the random white noise is added to the speed sensor with the amplitude of ±0.1 rad/s. e data of the speed sensor are processed by a sliding filter. e average value of five sampling data is taken as the measured value of actual speed. e sampling time of each sensor can be adjusted according to the actual situation. e two-phase DC to three-phase AC module is shown in Figure 6. e operations in each submodule are slightly different. e angle offset of the first, second, and third modules in Figures 7-9 are 0, −120, and 120, respectively. e PMSM used in this simulation is shown in Figure 10. e specific parameter settings are shown in Table 1.

Scheme.
e simulations are divided into three parts: nonovershooting system, fast response system, and comprehensive response system.

Nonovershooting System.
e nonovershooting system expects no overshoot in the response process. e design process of the overshoot ratio neutrosophic membership function should meet the following principles. e parameters of the true, false, and uncertain membership functions should be selected in the range of small overshoot ratio. e smaller the overshoot requirement is, the larger the true value should be. e larger the overshoot requirement is, the larger the false value should be. e system has relatively low requirements for the other five characteristics. So the neutrosophic membership functions are designed as shown in Figure 11. e desired speed is u d � 5rad/s. e simulation results are shown in Figure 12 and Table 2. It can be seen from Figure 12 that the speed can converge to 5 rad/s. ere is no overshoot in the response process of the rotor speed. In Table 2, the overshoot ratio of the response curve is 0% and the control objective without overshoot is satisfied. e iteration of the group in the simulation is shown in Figure 13. e red circle is the best individual in each generation, and the blue star is the average value of each generation. It can be seen from Figure 13 that the overall trend is downward. e red curve is convergent and finally stabilizes at 0.0951.

Fast Response
System. e fast response system expects fast response speed. So, the rising time and peak time should be short, and the overshoot and undershoot ratio can be appropriately increased to bring faster speed. e design process of the rising time and peak time neutrosophic membership functions should meet the following principles. e parameters of the true, false, and uncertain membership functions should be selected in the range of short time.
e smaller the response time requirement is, the larger the true value should be. e larger the response time requirement is, the larger the false value should be. e system has relatively low requirements for the other four characteristics. So, the neutrosophic membership functions are designed as shown in Figure 14.
e desired speed is u d � 5 rad/s. e simulation results are shown in Figure 15 and Table 3. It can be seen from Figure 15 that the speed can also converge to 5 rad/s. In Table 3, the rising time is 0.0006531 s and the peak time is 0.0013 s. e rising time and peak time are shorter than those in the above nonovershooting system. In other words, it has a faster response speed. But obviously, the overshoot ratio of the fast response system is increased to 16.1994%. e iterative result of the population in the simulation is shown in Figure 16. It can be seen from Figure 16 that the convergence speed of this iteration population is faster. e average and optimal values of each generation are declining. e optimal value is also convergent and finally stabilizes at 0.1961.

Comprehensive Response
System. e comprehensive response system expects to achieve a balance between response speed and overshoot indexes. e parameters of the overshoot ratio neutrosophic membership function in Figure 14 will be further reduced, thus increasing the limit of overshoot. e other five indexes' neutrosophic membership functions in Figure 14 are basically unchanged. So, the neutrosophic membership functions are designed as shown in Figure 17.
e desired speed is also u d � 5 rad/s. e simulation results are shown in Figure 18 and Table 4. It can be seen from Figure 18 that the speed can converge to 5 rad/s. e overshoot index is obviously reduced than the fast response system and the response speed is also fast. In Table 4, the  Mathematical Problems in Engineering            rising time is 0.000664 s and the peak time is 0.0013 s. e two time indexes are basically unchanged than the above fast response system. At the same time, the overshoot index is reduced from 16.1994% to 8.7895%. e population iteration diagram is shown in Figure 19. e optimal value is also convergent and finally stabilizes at 0.1741.

Conclusion
In this paper, a neutrosophic self-tuning PID controller is designed for PMSM to match different characteristics. e neutrosophic membership functions of the designed controller can be adjusted according to different response requirements.
en the optimal parameters of the PID controller can be found based on the cosine similarity measure and genetic algorithm. ree kinds of AC permanent magnet motor control systems with different characteristics are designed in simulations. e results show that the designed controller can meet the requirements of different characteristics and has good control accuracy.
It is noted that the determination of the parameters of the six membership functions depends on certain expert experience. e different choices will directly affect the final PMSM control performance. In practice, it is difficult to choose the optimal membership parameters. In future research, the adaptive adjustment method of membership function parameters will be studied.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.