Research on Pump Speed Control System Based on Fuzzy PID

permanent magnet synchronous motor, Fuzzy algorithm, vector control.


Introduction
Pump is an important energy conversion and fluid delivery equipment; the pump occupies an essential role in the daily production practice and life. The motor is an important electromagnetic device to realize the conversion and trans-mission of electric energy [1]. Energy consumption is rising in some of the more industrialized countries. Ordinary asynchronous motors operate under different loads, compared with the rated load state, the power factor and efficiency are greatly reduced, especially in no-load and noload conditions [2]. In the current centrifugal pump motor system, most of the three-phase asynchronous motor is still used as the driving power source of the pump. When the motor runs under light load for a long time, the system efficiency is low, so the factory's update of driving equipment is more in line with interests [3]. At present, for some multistage pumps, such as submersible pump, mine pump, etc., due to their large demand torque interval, equipment frequent start and stop and other working conditions, the ordinary drive motor cannot meet its requirements. The permanent magnet synchro-nous motor has the advantages of simple structure, small size, light weight, high efficiency, high power factor, measurable rotor parameters, good control performance and so on. In recent years, it has been more and more widely used in aerospace, electric vehicles, industrial control and many other fields, the application of permanent magnet synchronous motor in intelligent multistage pump will also be the general trend. At present, the research on frequency conversion technology is more mature. Due to the good driving performance, advanced automatic control function, and significant energy saving and energy saving of frequency conversion speed regulation technology, the flow rate can be selected and the speed can be adjusted under different working conditions in the drive of the pump, so as to ensure that the centrifugal pump and motor operate at the high efficiency point and save energy and consumption [4].
At present, most of the pump speed regulation systems still adopt the open-loop control method, which is generally applicable to loads such as fans and single-stage pumps whose speed range is not large or whose torque decreases with the decrease of speed [5]. Of course, some multi-stage pumps use the classical PID control method, but the traditional PID control has high energy consumption. Due to the complicated tuning of PID parameters, and once set, it cannot be changed, so it has poor adaptability in the changing working environment. If the working environment is bad, the control effect of the control system cannot meet the requirements [6].
Fuzzy control technology is developing rapidly at present, it is not dependent on the accurate mathematical model of the object, and just put the expert of the fuzzy rules are stored in a computer language, for use, therefore, realtime system is strong, good robustness and control surface is smooth, especially for permanent magnet synchronous motor in the control of this nonlinear strong coupling [7]. Many scholars have also conducted relevant research. Rashed, M; Acarnley, P et al. proposed an indirect rotation field-oriented control scheme for sensor less speed control of permanent magnet synchronous motor to solve stator resistance mismatch and system noise sensitivity in low speed operation [8]. Chen Shugang et al. established an open-loop variable frequency speed control model and efficiency optimization control method based on rotor field-oriented vector control [9]. According to this research and development of electric submersible screw pump frequency conversion speed control system, through the actual operation verification, received the ideal control effect. Ma Yu et al. proposed a PID adaptive control method based on PSO and PB hybrid optimization forward neural network [10]. Thus, it can be seen that research on permanent magnet synchronous motor, contains both the summary of the traditional control method, also borrowed from now the research of computer artificial intelligence, etc, a lot of research is not constrained by theory, and apply theory to practice, these intelligent algorithms also have application value in engineering practice. In this paper, through the establishment of driver -motorcentrifugal pump coupling model simulation, test and observe the pump and motor a number of indicators, explore more suitable for pump speed control system control method. An adaptive PID controller applied to the permanent magnet motor speed regulating system of centrifugal pump is designed and its control effect is verified.

Basic theory and mathematical model of permanent magnet synchronous motor
Permanent magnet synchronous motor (PMSM) is a strong coupling, nonlinear and high order system. The establishment of mathematical model usually depends on the biaxial theory. the accuracy of mathematical models is extremely important, and the following assumptions are usually made: • The magnetic circuit saturation of the motor is ignored, and eddy current loss and hysteresis loss are excluded; • The stator three-phase winding spacing is 120° symmetrical distribution; • The induced electromotive force of the stator winding shows a sine wave distribution; • There is no damping effect between the permanent magnet rotor and the stator winding. The stator current equation in the synchronous rotating coordinate system is: The flux equation is: According to Eqs. (1) and (2), the stator current equation is： The electromagnetic torque equation is: where: In this paper, Simulink in MATLAB is used to establish the model of the electrical part. The motor drive module is composed of four modules: current loop speed loop PID adjustment, coordinate transformation, space vector pulse modulation and motor body. PID regulator is simple and easy to implement, with simple control algorithm, and can fully meet the control requirements of the centrifugal pump system. PI control method is adopted for both speed ring and current ring here. Since the control parameters will have a great influence on the whole control system, the control system can run stably by constantly debugging the control parameters [11]. According to the control principle of PMSM vector control, the simulation diagram of PMSM PID control system based on speed ring is built, as shown in Fig. 3.

Bench test
In order to illustrate the credibility of the established vector control model of permanent magnet synchronous motor, the PID vector control system scheme is verified by motor test. As shown in Fig. 4, the test bench mainly includes permanent magnet synchronous motor, laboratory dynamometer, controller circuit board, host computer, CNC DC power supply, emulator and host computer connector. The parameters of PMSM used are shown in the Table 1, and the control method is selected based on PID control of PMSM vector control method. During the test, the starting speed curve data of the motor operation were observed by the host computer, and the Kp, Ki parameters of the controller were adjusted by trial-and-error method for many times to ensure that the motor operation remained stable and consistent with the ideal speed under the rated conditions [12]. PC through RS422 serial port communication and DSP for data transmission, to calculate the permanent magnet synchronous motor step response speed curve of the maximum peak and rise time, call related algorithm to select the closest to the actual value of prediction, parameter values optimized controller parameters of optimal value input to the DSP controller, this controller parameters optimization experiment. The load studied in this paper is a multistage pump, due to the limited experimental conditions, the pump load will be replaced by a laboratory dynamometer, permanent magnet synchronous motor drive system combined with dynamometer operation, after relevant debugging, permanent magnet synchronous motor conventional load experiment and motor speed control experiment. System after debugging on electricity, permanent magnet synchronous motor under no-load running, running condition of motor in the test bench test, to ensure its operation condition, consistent with the simulation of permanent magnet synchronous motor. Set the running time of 0.5 s, the speed of 1600 r/min, the subsequent load of 50 N·m, the interval between data frames of the host computer is 100ms, and the sampling accuracy is 10 times per second. The test results are shown in Fig. 4.

Fig. 4 Comparison of test and simulation results
According to the comparison of the results in the Fig. 4, it can be seen that the speed curve obtained under the test condition is roughly consistent with that obtained by the simulation. After stabilization, the speed errors are very small, and all reach the steady-state response state, and the errors are very small, within 2%. However, there are still some differences in dynamic startup, mainly manifested in the peak value and response speed. The overshoot in simulation is higher than that in actual operation, and the response speed is faster than that in the test. Speculated that the reasons of the differences are: The PID parameters adjusted in the simulation process are different from the actual running parameters, and there are some problems in the simulation parameter adjustment, which makes the running characteristics of the rotating speed poor.
There are some errors such as response delay and signal transmission delay in actual motor operation measurement.
It can be concluded from the results of the built model and the actual test that the results of simulation and test are close to each other, with differences but basically consistent. There are still some problems in the PID parameter adjustment in the simulation process, and there is room for optimization.
It also shows that the PMSM system model is in good agreement with the actual motor system.

Constant voltage frequency ratio control model
Constant voltage frequency ratio control model is the most basic control mode in AC motor frequency control, which is easy to realize and cheap in price. It is an openloop control system, does not need the feedback of current, voltage, position and speed, the control circuit structure is simple, the parameter dependence on the motor and the water pump is low, and has better speed regulation performance [13].
When the motor drives the centrifugal pumps, it is necessary to maintain the rated value of m  at each stage of the motor to avoid excessive energy consumption, low power and falling pump head. The effective value of each phase induced back potential of three-phase stator winding of permanent magnet synchronous motor is: where: E is the effective value of the induced back potential of each phase winding of the stator; f is the voltage frequency of the stator; N is the number of turns of the stator winding; k is the fundamental winding coefficient of the stator winding, and m  is the magnetic flux at each stage of the air gap. According to the formula, if the effective value E of the winding is ensured to vary linearly with the voltage frequency f, the air-gap flux can be kept constant.
Constant voltage frequency ratio of permanent magnet synchronous motor open-loop control system including the working frequency, frequency given rising and falling time, V/F of curve setting, SVPWM pulse modulation. The time setting of speed up and speed down is used to limit the motor speed up, and also as a buffer for starting control. Too fast speed is easy to cause torque and current impact. V/F link can undertake voltage compensation in low pressure when appropriate, to ensure that the ratio of voltage and frequency is always constant V/F = C. Control system outputs the pulse signal through the SVPWM drive link, triggers the three-phase voltage inverter to output the threephase AC power with adjustable frequency and voltage, and controls the permanent magnet synchronous motor variable voltage and frequency speed regulation [14]. Fig. 5 shows the structure diagram of constant voltage frequency ratio control system.
When the constant voltage frequency ratio control method drives vane pump unit, the motor stator winding voltage Us is calculated theoretically according to the stator frequency f1 and input phase voltage of the motor stator winding Us ratio is constant, again by control circuit output PWM wave to control the state of three groups of IGBT, so as to realize inverter output link of the stator voltage Us, further realize the speed n0 adjustment [15]. In order to make the simulation more convenient and fully cooperate with the permanent magnet synchronous motor system, SimHydraulics module in MATLAB Simulink is used to establish the centrifugal pump model.
Sim-Hydraulics is a physical modeling environment based on Simscape module, which provides a component library for modeling and simulation of hydraulic systems, including models of hydraulic components such as pumps, valves, actuators, pipes and hydraulic resistance [15]. Fig. 7 is the centrifugal pump and its pipeline, input is the permanent magnet synchronous motor angular speed ω, r/min. Since the provided speed is a physical signal, when the step signal (Stop) is used to provide input, it is necessary to convert the dimensionless Simulation signal into a physical signal, that is, it is necessary to use a signal Converter (Simulink-PS Converter). The pipe input level height H0 and the pipe outlet height H1, m; The torque value Tr of the torque sensor output is fed back to the torque input of the motor, N·m; The centrifugal pump adopts the centrifugal pump components given in the software, and the rotation speed, flow rate, head, power and medium density of the centrifugal pump are configured in the module. The pressure difference at the inlet and outlet of the centrifugal pump is measured by the pressure sensor, and the flow sensor is measured by the pump outlet flow Q, m 3 /h, from which the pump head H, m can be calculated. Liquid flows through the pump system attributes should be specific, points out that the add Hydraulic Fluid module, specified liquid water, the system temperature is 25℃. The constructed centrifugal pump module is respectively connected with the PID control system and the constant voltage frequency ratio control system of the permanent magnet synchronous motor. The Fig. 8 shows the coupling model of the vector control system of the centrifugal pump-driving equipment-permanent magnet synchronous motor. Fig. 7 Centrifugal pump model The simulation time is set for 1s in all systems, and the load of the hydraulic system is connected at the initial stage of system operation. The reference speed of the centrifugal pump in the hydraulic system n = 2753 r/min, the fluid density ρ = 1000 kg/m 3 , the height H0 = 0, the height H1 = 237 m. The height difference between the outlet of the pump pipe and the free liquid level Hst = H1 -H0 = 237 m. The solution method is discrete mode, Te = 5e -5 s, and the algorithm is ode23t with variable step size.
Dynamic starting characteristics: Fig. 9 respectively shows the motor speed driven by PID control and motor speed under open loop control. After adding the centrifugal pump load of the hydraulic system, the motor speed under the control of constant voltage and frequency ratio did not overstate, but the motor was unstable at the beginning of operation, and reached the set speed of 1500 r/min after 0.4 s. There was no obvious speed fluctuation during the operation of the system. However, the motor speed under PID control has no obvious overshoot, reaching the speed of 1500 r/min at 0.025 s, and there is no obvious speed fluctuation in the system operation. It can be seen that under the same centrifugal pump load, the PMSM system under PID control has faster startup response capability.
By comparing the changes of the stator current under the two control methods to reflect the operation of the drive control, the motor speed is controlled at 1200 r/min and 600 r/min respectively, and the stator current changes are measured after adding loads, as shown in Figs. 10 and 11.
By analyzing the stator current waveform at different speeds, it can be seen that the stator current under PID control tends to be stable after 0.018 s, while the waveform under constant voltage frequency ratio control gradually reaches the normal positive waveform after 0.054 s. However, the initial distortion of stator current under PID control is more serious, which is far from superior to the effect under constant voltage frequency ratio control. After stabilizing, the stator currents under the two control methods have good sinusoidal degree and symmetry.
Steady-state and accuracy: Speed characteristics are an important parameter for analyzing motor characteristics. In order to further analyze steady-state performance and accuracy of motor operation under the two control methods, the peak value, average value and root mean square in statistics are used to analyze the operating performance of the system. The following figure is the error analysis diagram after the error analysis processing of the speed time domain change by using the simulink toolbox in MATLAB. As shown in the Fig. 12, the average speed of constant voltage frequency ratio is 950 r/min, and the average speed of PID control is 1183 r/min. Compared with the actual motor speed, PID control speed precision is higher; The lower RMS value of the data stability index in statistics indicates the better stability. It can be seen that the RMS value of the speed under the two control methods is basically similar, and the motor operation stability is basically the same. In order to further study the driving conditions of the two control methods on the pump system, the simulation experiment of the motor -frequency converter -centrifugal pump coupling system was compared to measure the instantaneous torque changes under different working conditions at rated speed. The torque fluctuation at 0.5 Q and 1.0 Q is also obtained from the test. It can be seen that the torque accuracy under the two control methods is relatively high and roughly similar. The torque under constant voltage frequency than open loop control has several torque mutations in a certain period, while the motor controlled by PID controller has smaller torque fluctuations and higher stability when driving the centrifugal pump.

Adaptive fuzzy PID control
5.1. Working principle of vector control speed regulating system of permanent magnet synchronous motor Permanent magnet synchronous motor control system adopts speed loop and current loop double closed-loop control structure [16]. Since the general centrifugal pump does not have high requirements on the motor, the current loop is controlled by traditional PI, and the outer speed loop is controlled by PID [17]. As shown in Fig. 13, the permanent magnet synchronous motor is powered by three phase inverters, obtained by photoelectric encoder phase motor rotor position information and space, the stator current is obtained by the speed regulator and speed regulator ud and uq, after a series of coordinate transformation and get three phase adjusting voltage space vector pulse modulation signal to adjust motor.

Fuzzy adaptative PID Controller
Fuzzy PID controller is the combination of fuzzy control principle and PID controller, mainly including the establishment of the output and input of the system, the establishment of fuzzy set and membership function, the establishment of fuzzy rules, fuzzy reasoning and inverse fuzzification four parts. In the operation of PMSM vector control system of centrifugal pump, the fuzzy PID controller continuously detects the error e and the error conversion rate ec. After fuzzing, the fuzzy rules are used for reasoning, and the output Δkp, Δki, Δkd are sent to the PID controller to realize the self-tuning of PID parameters [18].
After fuzzing, the fuzzy quantities e, ec, Δkp, Δki, Δkd need to define their fuzzy subsets. The number of fuzzy subsets should be controlled within a certain range, too little will affect the system accuracy, too much will prolong the computation time. Here, the fuzzy sets of input and output quantities are {NB, NM, NS, ZO, PS, PM, PB}.
The membership function reflects the relationship between fuzzy quantities. Here, the input membership function selects the function combining triangle membership function and normal distribution, and the output chooses triangle membership function. Triangular membership functions simple calculation, the control system of the real time curve function is better than others.
Fuzzy rules are sorted out by relevant experts and engineering technicians in a large number of control system research and engineering practical application, reflecting the relationship between fuzzy input and output, abstract into mathematical form, so as to facilitate computer calculation, generally expressed as "If... Then...". The selection of control rules directly affects the control performance of the system.
This rule needs to consider the function of each parameter in the control system and the relationship between each other. When the deviation e is large, it is necessary to control Δkp is large to ensure the response speed of the system is fast. In order to prevent the overshoot of the system from being too large and the limiting integral function from being too large and saturated, the parameter variation Δki needs to take the minimum value. When the speed deviation e and speed deviation rate ec are kept at a medium level, in order to ensure that the system has both a small overshoot and a fast response speed, the proportional parameter variation Δkp and the integral parameter variation Δki should be kept moderate. When the deviation e is small, in order to eliminate the static error of the system, the values of Δkp and a Δki are increased as much as possible [19]. According to the relationship between input and output and the relevant design experience, the fuzzy rules formulated in this paper are shown in tables. In the process of industrial control, fuzzy control algorithm is a relatively rapid development of the field, its energy saving transformation in industrial furnace, fan and water pump is very significant. Although the operation system of the ordinary PID speed regulation system of the motor has been very fine, in the actual engineering application, the parameter debugging is cumbersome and easy to be affected by environmental factors, especially in the submersible pump, electric submersible pump and other multi-stage pump system. Adjusting the parameters of the PI will be associated with certain overshoot, a certain amount of torque ripple and certain landing speed, and in the process of debugging transfer torque pulsation, rotational speed overshoot, start, speed does not stand still, select a set of comprehensive performance better parameters is difficult. Fuzzy PID technology can solve these problems perfectly, and can be widely used in elevators, new energy vehicles and other equipment systems with the continuous development and application of fuzzy control theory, fuzzy control technology will contribute more value to industrial process control.     15 shows the simulation results of traditional PID controller and fuzzy PID controller respectively. Both system simulation time is 0.5 s, set speed 1500 r/min, don't add load simulation initial, and a load torque of 5 N·m is suddenly added at 0.25 s.
Control performance for the motor system controlled by ordinary PID, the step disappears after 0.028 s, and the system is stable, while the speed of the fuzzy PID vector control system reaches 1500 r/min in 0.021 s. It can be seen that the fuzzy PID control system has better dynamic start performance than the ordinary PID control system. Stability from the step response comparison results of the two figures, the speed curve fluctuation of the PMSM control system with fuzzy PID controller is not obvious, and it is more stable. The initial overshoot of the system using the ordinary PID controller is larger, reaching 2000 r/min, while the fuzzy PID control system has a smaller overshoot, reaching 1550 r/min. Fig. 17 Stator current diagram of fuzzy PID controller Electromagnetic torque curves of the two control systems in Figs. 18 and 19, it can be seen that the electromagnetic torque of the motor can follow the healthy changes of the system, which has reliability and stability. In addition, compared with the ordinary PID control system, the fuzzy PID control motor system can change to the correct direction faster and achieve stability after sudden torque addition. Electromagnetic torque diagram of fuzzy PID controller Dynamic performance: From the speed comparison under load disturbance response in the figure, it can be seen that the motor system speed of ordinary PID controller drops to 1405 r/min after 0.25 s surge torque is added, and reaches the steady state again after 0.013 s. However, for the fuzzy PID control system, speed down to 1475 r/min, after 0.006 s to reach 1500 r/min. Obviously, the dynamic performance of fuzzy PID control system is better.

Conclusions
In this paper, the vector control method of permanent magnet synchronous motor is studied, the permanent magnet synchronous motor vector control system model based on traditional PID is built, and the accuracy and consistency of the built simulation model system is verified by bench test. Further explore the driving control effect of different control methods of permanent magnet synchronous motor -controllerhydraulic system, and compare the traditional open loop control with PID control, considering the output torque stability, starting response characteristics, disturbance rejection ability of the system. The simulation results show that the PID control system is superior to the traditional open-loop control in the drive of pump load, and has better dynamic response performance and steady-state performance. And in view of the traditional PID control in the multi-stage pump drive, the working environment is bad, the working condition is not strong adaptability, the motor is easy to burn and other problems, and the good effect of the fuzzy PID control is affirmed, compared with the traditional PID control system, affirming the good effect of the fuzzy PID control. In the motor speed response, step disturbance, stability and other aspects have a certain improvement; Limited to the current conditions, only the constant voltage frequency ratio control which is widely used in the pump load is compared with the fuzzy PID control. The actual centrifugal pump system experiment verification will be carried out in the subsequent work. When the fuzzy PID is applied to the centrifugal pump, the control parameters need to be further calibrated.