#### Abstract

In practical control applications, AC permanent magnet synchronous motors 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. Then, 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. The effectiveness of the designed controller is verified by simulation results.

#### 1. 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. The structure is simple and the cost is low. The collector ring and brush are omitted, and the reliability is improved. The 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. This 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. Then, 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]. Then, 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]. The 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.

The 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.

#### 2. 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.

The section coordinate diagram of PMSM is shown in Figure 1. The *a*-axis of the stationary coordinate system coincides with the A-phase winding, which is used to analyze the mathematical model of the PMSM.

###### 2.1.1. Voltage Equation [26]

In the coordinate system, the voltage matrix equation of PMSM is as follows:where ,, and are the stator phase voltages, , , and are the stator phase currents, , , and are stator flux, is the stator resistance, and is a differential operator.

The voltage equation of AC permanent magnet synchronous motor in the two-phase rotating coordinate system is derived as follows:

###### 2.1.2. Flux Linkage Equation [27, 28]

The flux linkage equation of PMSM in the coordinate system is as follows:where is rotor flux linkage and and are as follows:

###### 2.1.3. Electromagnetic Torque Equation

The 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 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 is the pole number of the motor and is the flux linkage of the permanent magnet. Generally speaking, is satisfied.

###### 2.1.4. Equation of Motion

The electromagnetic torque of PMSM not only drives the motor load but also overcomes the friction damping and inertia of the permanent magnet rotor. The 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:

##### 2.2. 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. The control method used in this paper is to make . More details can be found in [29, 30]. Then, the decoupling mathematical model can be obtained as follows:

#### 3. Design of Neutrosophic Self-Tuning PID Controller

##### 3.1. Neutrosophic Theory

The variable is defined as a universe of discourse. Any single-valued neutrosophic set in can be expressed as follows [31]:where is a true membership function, is an uncertain membership function, and is a false membership function.

And each satisfies the following conditions:

For convenience, is defined as a single-valued neutrosophic number in .

*Definition 1. *(see [32]). If there are two neutrosophic sets and that belong to the universe of discourse , the specific forms are as follows:Then, the cosine similarity measure between and can be defined by has the following properties:(1)(2)If , then (3)(4)If is also a neutrosophicset belonged to , and satisfies , then and is established

##### 3.2. Genetic Algorithm

The 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. The 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. There are many pieces of research on genetic algorithms, which will not be repeated here.

##### 3.3. Neutrosophic Self-Tuning PID Control Method

This 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 is the control signal. , , and are parameters. More details can be found in [33].

The PID parameter self-tuning method is designed based on the neutrosophic theory and genetic algorithm. The self-tuning 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.

The triangular and trapezoidal membership functions are adopted for neutrosophic processing. The six transient characteristics are taken as a whole feature set . In the set , element means the rising time, means the settling time, means the peak time, means the overshoot ratio, means the undershoot ratio, and means the steady-state error.

Using the neutrosophic theory, the following form is given:and the ideal is shown as follows:

Then, using cosine similarity measure, we can get the similarity of and as follows:

The rule of PID parameter self-tuning is to minimize .

The structure diagram of control system is shown in Figure 3. The inner loop of the control system is current loop and the outer loop is speed loop.

*Remark 1. *The 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.

#### 4. Simulations

##### 4.1. Simulink Module Building

In order to facilitate observation in the Simulink module, the main system is first established as shown in Figure 4. The speed, angle, torque, and current of and 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. The sampling time of each sensor is different, which can be represented by different zero-order holders. Then the subsystem as shown in Figure 5 is built to assemble the core module.

This is a double loop system. The inner loop is the current loop and the outer loop is the velocity loop. The sampling speeds of the angle sensor and speed sensor are set to 1 ms. The 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. The data of the speed sensor are processed by a sliding filter. The average value of five sampling data is taken as the measured value of actual speed. The sampling time of each sensor can be adjusted according to the actual situation.

The two-phase DC to three-phase AC module is shown in Figure 6. The operations in each submodule are slightly different. The angle offset of the first, second, and third modules in Figures 7–9 are 0, −120, and 120, respectively.

The PMSM used in this simulation is shown in Figure 10. The specific parameter settings are shown in Table 1.

##### 4.2. Scheme

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

###### 4.2.1. Nonovershooting System

The nonovershooting system expects no overshoot in the response process. The design process of the overshoot ratio neutrosophic membership function should meet the following principles.

The parameters of the true, false, and uncertain membership functions should be selected in the range of small overshoot ratio. The smaller the overshoot requirement is, the larger the true value should be. The larger the overshoot requirement is, the larger the false value should be. The system has relatively low requirements for the other five characteristics. So the neutrosophic membership functions are designed as shown in Figure 11.

**(a)**

**(b)**

**(c)**

**(d)**

**(e)**

**(f)**

The desired speed is rad/s. The simulation results are shown in Figure 12 and Table 2. It can be seen from Figure 12 that the speed can converge to rad/s. There 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.

The iteration of the group in the simulation is shown in Figure 13. The 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. The red curve is convergent and finally stabilizes at 0.0951.

###### 4.2.2. Fast Response System

The 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. The design process of the rising time and peak time neutrosophic membership functions should meet the following principles.

The parameters of the true, false, and uncertain membership functions should be selected in the range of short time. The smaller the response time requirement is, the larger the true value should be. The larger the response time requirement is, the larger the false value should be.

The system has relatively low requirements for the other four characteristics. So, the neutrosophic membership functions are designed as shown in Figure 14.

**(a)**

**(b)**

**(c)**

**(d)**

**(e)**

**(f)**

The desired speed is rad/s. The simulation results are shown in Figure 15 and Table 3. It can be seen from Figure 15 that the speed can also converge to rad/s. In Table 3, the rising time is 0.0006531 s and the peak time is 0.0013 s. The 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%.

The 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. The average and optimal values of each generation are declining. The optimal value is also convergent and finally stabilizes at 0.1961.

###### 4.2.3. Comprehensive Response System

The comprehensive response system expects to achieve a balance between response speed and overshoot indexes. The parameters of the overshoot ratio neutrosophic membership function in Figure 14 will be further reduced, thus increasing the limit of overshoot. The other five indexes' neutrosophic membership functions in Figure 14 are basically unchanged. So, the neutrosophic membership functions are designed as shown in Figure 17.

**(a)**

**(b)**

**(c)**

**(d)**

**(e)**

**(f)**

The desired speed is also rad/s. The simulation results are shown in Figure 18 and Table 4. It can be seen from Figure 18 that the speed can converge to rad/s. The overshoot index is obviously reduced than the fast response system and the response speed is also fast. In Table 4, the rising time is 0.000664 s and the peak time is 0.0013 s. The 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%.

The population iteration diagram is shown in Figure 19. The optimal value is also convergent and finally stabilizes at 0.1741.

#### 5. Conclusion

In this paper, a neutrosophic self-tuning PID controller is designed for PMSM to match different characteristics. The neutrosophic membership functions of the designed controller can be adjusted according to different response requirements. Then the optimal parameters of the PID controller can be found based on the cosine similarity measure and genetic algorithm. Three kinds of AC permanent magnet motor control systems with different characteristics are designed in simulations. The 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. The 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

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

#### Conflicts of Interest

The authors declare that there are no conflicts of interest regarding the publication of this paper.