Control method of double-closed-loop direct-current speed regulation system based on improved parrot algorithm

By improving the parrot algorithm to optimize the weight and threshold of the BP neural network, the problem of PID controller parameter adjustment takes time and easy to fall into local optimal solutions is solved, and faster convergence speed and better PID parameters are achieved.

CN119472819APending Publication Date: 2025-02-18XIAN AERONAUTICAL UNIV
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411609073.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

In the prior art, power dragging on the spot adjusts the PID controller parameters takes a long time, is difficult, and has a lot of workload. The BP neural network is prone to fall into the problem of local optimal solutions.

Method used

The improved parrot algorithm is used to optimize the weight and threshold of the BP neural network to obtain the initial optimization of the BP neural network, and then train it according to the gradient descent principle to obtain the final optimized BP neural network, which is used to calculate the optimal parameters of the PID controller. .

Benefits of technology

By improving the advantages of global convergence of parrot algorithm, the initial weight and threshold of the BP neural network are optimized, and the local optimal solution is avoided, and the robustness and adaptability of the PID controller parameters are improved, and the optimization time is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119472819A_ABST
    Figure CN119472819A_ABST
Patent Text Reader

Abstract

The invention provides a control method of a double-closed-loop direct-current speed regulation system based on an improved parrot algorithm, and relates to the technical field of industrial control. Comprising the steps that weights and thresholds of a BP neural network are optimized through an improved parrot algorithm, an initial optimized BP neural network is obtained, the weights for BP neural network optimization are 36, and the thresholds for BP neural network optimization are 12; according to a gradient descent principle, training the initial optimized BP neural network to obtain a final optimized BP neural network; calculating the parameters of the PID controller by using the final optimized BP neural network to obtain the optimal group parameters of the PID controller; and controlling the double-closed-loop direct-current speed regulation system by using the optimal group parameters of the PID controller. The problems that in the prior art, when PID controller parameters are adjusted on an electric dragging site, consumed time is long, difficulty is large, the workload is large, and a BP neural network falls into a local optimal solution are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of industrial control, and in particular to a control method of a double closed-loop DC speed regulation system based on an improved Parrot algorithm. Background Art

[0002] At present, the speed and current dual closed-loop DC speed regulation system has been widely studied and applied in the field of industrial control. With the DC motor as the core, the system realizes precise and stable speed regulation and current control through dual closed-loop control of speed and current, which has important engineering application value and theoretical research significance. The speed and current dual closed-loop DC speed regulation system is widely used in industrial scenarios that require precise speed and current control, such as mechanical transmission, electric vehicle drive system, wind turbine generator set, etc. These applications put forward higher requirements on the stability, dynamic response and energy efficiency of the system, prompting researchers to continuously explore new control theories and technical means to meet the actual needs of different industrial fields. However, although the traditional PID controller is simple and easy to implement, its parameter setting and performance optimization face challenges in complex systems and rapidly changing environments. At present, there are problems such as long time-consuming, difficult, heavy workload and poor effect of PID controller parameter setting. In order to overcome these limitations, researchers actively explore the use of various intelligent algorithms to improve the performance of PID controllers.

[0003] The research background of the parrot algorithm stems from the in-depth observation of group behavior in nature, especially the exploration of collective action of animals. In recent years, with the development of computational intelligence and optimization algorithms, researchers have gradually realized that the collective wisdom of animals in nature can provide inspiration for solving complex problems. Parrots are highly social birds, and their collaborative behavior in foraging and protecting territory has become the core concept of algorithm design.

[0004] Among the many heuristic algorithms, researchers have drawn on the behavioral patterns of various animals such as bird flocks and fish schools, and proposed a variety of algorithms based on swarm intelligence, such as particle swarm optimization (PSO) and fish school algorithms. However, these algorithms have their own limitations, such as being prone to falling into local optimality when dealing with multi-peak functions. To this end, researchers have begun to explore new algorithmic frameworks to more effectively address complex optimization challenges. Summary of the invention

[0005] In order to overcome the shortcomings of the prior art, the purpose of the present invention is to provide a control method for a dual closed-loop DC speed regulation system based on an improved Parrot algorithm. The present invention solves the problems in the prior art of adjusting PID controller parameters on site in electric traction, such as long time consumption, high difficulty, large workload, and BP neural network falling into a local optimal solution.

[0006] To achieve the above object, the present invention provides the following solutions:

[0007] A control method for a dual closed-loop DC speed regulation system based on an improved Parrot algorithm, comprising:

[0008] The weights and thresholds of the BP neural network are optimized using the improved parrot algorithm to obtain an initial optimized BP neural network, wherein the weights and thresholds of the BP neural network are optimized to be 36 and 12 respectively;

[0009] According to the gradient descent principle, the initial optimized BP neural network is trained to obtain the final optimized BP neural network;

[0010] Calculating the parameters of the PID controller using the final optimized BP neural network to obtain the optimal group parameters of the PID controller;

[0011] The dual closed-loop DC speed regulation system is controlled using the optimal group parameters of the PID controller.

[0012] Preferably, the method of optimizing the weights and thresholds of the BP neural network using the improved parrot algorithm to obtain an initial optimized BP neural network includes:

[0013] Setting parameters in the parrot algorithm and initializing the parameters in the parrot algorithm to obtain initialized parameters, wherein the parameters include: population size, number of iterations, upper limit, lower limit and initial position of each parrot;

[0014] Determine the population size based on the nonlinear cyclic change mechanism;

[0015] Determine the parrot's flight direction and target location based on the parrot population's foraging rules;

[0016] The positions of the parrots in the population are updated according to the first position update formula and the parrots' flight directions, initial positions and target positions to obtain a first updated position;

[0017] Using the parrot flight mechanism, according to the first updated position and the second updated formula, a second updated position is obtained;

[0018] Using the parrot communication mechanism, nonlinearly improve the probability of parrots flying out of the group and flying into the group, and obtain the third updated position according to the second updated position and the third updated formula;

[0019] Using the parrot approaching the owner mechanism, a fourth updated position is obtained according to the third updated position and the fourth updated formula;

[0020] Determine an optimal weight and threshold according to the first update position, the second update position, the third update position, the fourth update position, the upper limit, the lower limit and the number of iterations;

[0021] The initial weights and thresholds of the BP neural network are determined according to the optimal weights and thresholds to obtain an initial optimized BP neural network.

[0022] Preferably, the first updating formula is:

[0023]

[0024] in, is the updated position of the i-th parrot after the t-th iteration, is the position of the i-th parrot in the t-th iteration, X Best is the global optimal solution for the parrot's position, Levy(dim) is the Levy distribution, representing the parrot's flight direction, dim is the dimension, t is the current number of iterations, and rand(0,1) is a random number between 0 and 1. is the average position of the parrot population at the tth iteration.

[0025] Preferably, the second updating formula is:

[0026]

[0027] in, is the second updated position.

[0028] Preferably, the third updating formula is:

[0029]

[0030] Among them, P is a random number between 0 and 1, ST is a dynamic probability, Update location for the third time.

[0031] Preferably, the fourth updating formula is:

[0032]

[0033] in, Represents the owner and surrounding locations, Update position for the fourth.

[0034] Preferably, according to the gradient descent principle, the initial optimized BP neural network is trained to obtain the final optimized BP neural network, including:

[0035] The initial optimized BP neural network is trained using a double closed-loop DC speed regulation system model, and the input and output of the hidden layer and the output layer of the initial optimized BP neural network are calculated;

[0036] Determine the objective function and calculate the error based on the input and output;

[0037] According to the error, the weights and thresholds of the hidden layer and output layer of the initial optimized BP neural network are reversely corrected and the maximum number of iterations is judged. If the maximum number is reached, the final optimized BP neural network is obtained. Otherwise, the step is returned to train the initial optimized BP neural network using the dual closed-loop DC speed regulation system model.

[0038] The present invention discloses the following technical effects:

[0039] The present invention provides a control method for a dual closed-loop DC speed regulation system based on an improved Parrot algorithm, comprising: optimizing the weights and thresholds of a BP neural network by using the improved Parrot algorithm to obtain an initial optimized BP neural network, wherein the weights of the BP neural network optimization are 36 and the thresholds are 12; training the initial optimized BP neural network according to the gradient descent principle to obtain a final optimized BP neural network; calculating the parameters of a PID controller by using the final optimized BP neural network to obtain the optimal group parameters of the PID controller; and controlling the dual closed-loop DC speed regulation system by using the optimal group parameters of the PID controller. The invention not only reduces the optimization time, but also increases the population diversity and prevents falling into the local optimal solution by making nonlinear cyclic changes to the population algorithm of the parrot algorithm; in the communication of the parrot algorithm, the probability of the parrot flying out and flying into the group is changed from a fixed value to a nonlinear function, thereby obtaining the global optimal solution and reducing the convergence speed; in the process of the parrot algorithm's fear of strangers, the parrot flying towards the owner is improved to flying around the owner, thereby increasing the diversity of the parrot population position and preventing it from falling into the local optimal solution; the initial weights and thresholds of the BP neural network are optimized by taking advantage of the global convergence of the improved parrot algorithm, so that the BP neural network training PID controller parameters obtain the global optimal K p , K i , K d The simulation results show that the algorithm converges quickly and obtains the global optimal solution. p , K i , K d The parameters are robust, adaptable and effective. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0041] Figure 1 A flow chart of a control method for a dual closed-loop DC speed regulation system based on an improved Parrot algorithm provided in an embodiment of the present invention;

[0042] Figure 2 A mathematical model diagram of a speed and current dual closed-loop DC speed regulation system provided by an embodiment of the present invention;

[0043] Figure 3 A flow chart of the improved Parrot algorithm for optimizing BP neural network to adjust PID controller parameters provided by an embodiment of the present invention;

[0044] Figure 4 A schematic diagram of the convergence curve of fitness values ​​of the improved parrot algorithm and the traditional parrot algorithm provided in an embodiment of the present invention;

[0045] Figure 5 A comparison chart of simulation effects of different algorithm controllers provided by an embodiment of the present invention;

[0046] Figure 6 A comparison chart of experimental results of different algorithm controllers provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0048] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0049] like Figure 1 As shown, the present invention provides a control method for a dual closed-loop DC speed regulation system based on an improved Parrot algorithm, comprising:

[0050] Step 100: Optimizing the weights and thresholds of the BP neural network using the improved parrot algorithm to obtain an initial optimized BP neural network, wherein the weights of the BP neural network optimization are 36 and the threshold is 12;

[0051] Step 200: According to the gradient descent principle, the initial optimized BP neural network is trained to obtain the final optimized BP neural network;

[0052] Step 300: Calculate the parameters of the PID controller using the final optimized BP neural network to obtain the optimal group parameters of the PID controller;

[0053] Step 400: Controlling the dual closed-loop DC speed regulation system using the optimal set of parameters of the PID controller.

[0054] Furthermore, the improved parrot algorithm is used to optimize the weights and thresholds of the BP neural network to obtain an initial optimized BP neural network, including:

[0055] Specifically, a mathematical model of a speed and current dual closed-loop DC speed regulation system is constructed, with the speed loop as the outer loop and the current loop as the inner loop; the BP neural network structure is designed. The BP neural network consists of an input layer, a hidden layer, and an output layer, wherein the input layer is determined by the number of optimized values. The present invention optimizes the overshoot, adjustment time, and steady-state error of the motor speed, so the input layer is 3 layers, and the weights that need to be optimized are 18; too few hidden layers lead to low accuracy and a narrow range of adaptability, and too many hidden layers lead to increased calculations and increased calculation time. The present invention has 6 hidden layers; the output layer is determined by the PID controller parameters, and the present invention optimizes the proportional coefficient K p , integral coefficient K i , differential coefficient K d Therefore, the output layer is 3 layers and the weights to be optimized are 18; therefore, the BP network needs to optimize a total of 36 weights and the threshold is 12.

[0056] Setting parameters in the parrot algorithm and initializing the parameters in the parrot algorithm to obtain initialized parameters, wherein the parameters include: population size, number of iterations, upper limit, lower limit and initial position of each parrot;

[0057] Specifically, for the parrot population m and the number of iterations t max , upper limit Ub, lower limit Lb, initial position X of each parrot i 0 Initialize the parameters.

[0058] Determine the population size based on the nonlinear cyclic change mechanism;

[0059] Specifically, a nonlinear cyclic change mechanism is introduced for the population size. Inspired by the crested porcupine algorithm, when a parrot sees its owner or food, not every parrot will see it. If it does not see the parrot, it will not move and its position will not be updated. In each iteration, there are parrots like this. They are temporarily removed from the population. After a period of time, when they see their owner or food, they are moved back to the population and their positions are updated. Formula (1) is used to determine the number of parrots to be removed each time. This method speeds up the convergence speed when removing parrots from the population, and then moves them back to the population to increase the diversity of the population.

[0060]

[0061] Where m min is the minimum population size, m max is the maximum population size, T is the cycle period, and t is the current number of iterations.

[0062] Determine the parrot's flight direction and target location based on the parrot population's foraging rules;

[0063] The positions of the parrots in the population are updated according to the first position update formula and the parrots' flight directions, initial positions and target positions to obtain a first updated position;

[0064] Specifically, the parrot population starts to forage for food, determines the moving direction and target position by the location of the food or the owner, and updates the position of each parrot by the first updating formula.

[0065] The first update formula is:

[0066]

[0067] in, is the updated position of the i-th parrot after the t-th iteration, is the position of the i-th parrot in the t-th iteration, X Best is the global optimal solution for the parrot's position, Levy(dim) is the Levy distribution, representing the parrot's flight direction, dim is the dimension, t is the current number of iterations, and rand(0,1) is a random number between 0 and 1. is the average position of the parrot population at the tth iteration.

[0068]

[0069] Where γ=1.5.

[0070] Using the parrot flight mechanism, according to the first updated position and the second updated formula, a second updated position is obtained;

[0071] Specifically, the parrot randomly flies to any position on the owner and stays there for a period of time, and the position is updated as the second update formula:

[0072]

[0073] in, is the second updated position. Where: ones(1,dim) represents a vector of all 1s in dim dimension.

[0074] Using the parrot communication mechanism, nonlinearly improve the probability of parrots flying out of the group and flying into the group, and obtain the third updated position according to the second updated position and the third updated formula;

[0075] Specifically, the group of parrots communicate with the isolated parrots and exchange information. This process is divided into flying out of the group and flying into the group. The probability of parrots flying out of the group and flying into the group is nonlinearly improved. In the early stage, more parrots are allowed to fly out of the group and this process is maintained for a longer time to increase population diversity and prevent falling into the local optimum. In the later stage, more parrots are allowed to fly into the group to speed up the convergence speed. The third update formula is:

[0076]

[0077] Among them, P is a random number between 0 and 1, ST is a dynamic probability, Update location for the third time.

[0078] Where P is a random number between 0 and 1, and the dynamic probability ST is expressed by formula (7). P ≤ ST represents the flying group.

[0079]

[0080] Using the parrot approaching the owner mechanism, a fourth updated position is obtained according to the third updated position and the fourth updated formula;

[0081] Specifically, in order to find a safe place, the parrot approaches the owner while keeping a distance from strangers. Inspired by the reproduction of dung beetles, the parrot approaches the owner instead of approaching the owner's surroundings. As the number of iterations increases, the boundary around the owner is linearly attenuated. In the early stage of iteration, the range around the owner is large, and the parrot's moving position distribution is large, which prevents it from falling into a local optimal solution. In the later stage of iteration, the range around the owner gradually decreases, speeding up the iteration speed. The fourth update formula is:

[0082]

[0083] in, Represents the owner and surrounding locations, Update position for the fourth.

[0084] The half represents the parrot flying towards its owner. The first half represents the owner and the surrounding area, and the second half represents the parrot staying away from strangers.

[0085]

[0086] Determine an optimal weight and threshold according to the first update position, the second update position, the third update position, the fourth update position, the upper limit, the lower limit and the number of iterations;

[0087] Specifically, after one iteration, a set of weights and thresholds of the BP neural network are obtained, and the proportional coefficient K of PID is calculated. p , integral coefficient K i , differential coefficient K d, substituted into the mathematical model of the dual closed-loop DC speed regulation system, calculated the fitness value, and updated the global optimal solution; when the number of iterations is less than the maximum number of iterations (t<t max ) Jump to step "Introducing nonlinear cyclic change mechanism of population size", otherwise terminate the iteration and output the optimal weights and thresholds as the initial weights and thresholds of the BP neural network.

[0088] The initial weights and thresholds of the BP neural network are determined according to the optimal weights and thresholds to obtain an initial optimized BP neural network.

[0089] Further, according to the gradient descent principle, the initial optimized BP neural network is trained to obtain the final optimized BP neural network, including:

[0090] The initial optimized BP neural network is trained using a double closed-loop DC speed regulation system model, and the input and output of the hidden layer and the output layer of the initial optimized BP neural network are calculated;

[0091] Determine the objective function and calculate the error based on the input and output;

[0092] According to the error, the weights and thresholds of the hidden layer and output layer of the initial optimized BP neural network are reversely corrected and the maximum number of iterations is judged. If the maximum number is reached, the final optimized BP neural network is obtained. Otherwise, the step is returned to train the initial optimized BP neural network using the dual closed-loop DC speed regulation system model.

[0093] Specifically, based on the mathematical model of the speed and current dual closed-loop DC speed regulation system, the weights and thresholds of the BP neural network are trained again. According to the gradient descent principle, the weights and thresholds connecting the hidden layer and the input layer are corrected according to the learning rate η (0<η<1).

[0094] The input layer input is:

[0095]

[0096] Where: i represents the i-th input layer, 3 I i They represent overshoot, adjustment time and steady-state error respectively.

[0097] Calculate the input of the jth hidden layer neuron:

[0098]

[0099] Where: is the i-th input layer, w ji is the weight between the i-th input layer and the j-th hidden layer.

[0100] Calculate the output of the jth hidden layer neuron:

[0101]

[0102] Where: is the j-th hidden layer threshold, ranging from 0 to 1.

[0103]

[0104] Calculate the input of the neurons in the output layer of the lth layer:

[0105]

[0106] Where: v lj is the weight between the jth hidden layer and the lth output layer.

[0107] Calculate the output of the neurons in the output layer of the lth layer:

[0108]

[0109] Where: is the output layer threshold of the lth layer.

[0110]

[0111] Calculated For a group K p , K i , K d , input into the mathematical model of the speed and current dual closed-loop DC speed control system, calculate the objective function according to formula (15), and then perform reverse correction.

[0112]

[0113] Then the weight correction between the hidden layer and the output layer is:

[0114]

[0115] The weight correction between the input layer and the hidden layer is:

[0116]

[0117] In formulas (18) and (19), α is the inertia coefficient and η is the learning efficiency.

[0118]

[0119] In formula (20) and (21), Unknown, so the symbolic function is used Instead, the error can be compensated by modifying the learning efficiency η.

[0120] After simplification and derivation, the weight correction formula between the output layer and the hidden layer is:

[0121]

[0122] After simplification and derivation, the weight correction formula between the hidden layer and the input layer is:

[0123]

[0124] If the maximum number of iterations is reached, the training of the BP neural network is terminated, otherwise the training of the BP neural network continues.

[0125] Furthermore, after the BP neural network is trained, the optimal set of weights and thresholds is obtained, and the optimal set of K is calculated. p , K i , K d , applied to the mathematical model of the speed and current dual closed-loop DC speed control system, and the overshoot and adjustment time were calculated.

[0126] A physical model of the speed and current dual closed-loop DC speed control system was built, using S7-1200PLC as the core controller. The DC motor voltage was controlled through a single rectifier voltage regulator module to control the DC motor speed. The rotary encoder and current transmitter module respectively collected the speed and current of the DC motor, and then transmitted them to the S7-1200PLC to form a closed-loop control of the DC motor. The PID parameters optimized by IPO-BP were input into the S7-1200PLC controller, and the overshoot and adjustment time were calculated. By comparing the traditional PID controller parameters with the optimized PID controller parameters, the optimized PID controller system greatly reduced the overshoot and adjustment time.

[0127] More specifically, Figure 2 As shown, by substituting the determined parameters of the speed and current dual closed-loop DC speed regulation system, the mathematical model of the speed and current dual closed-loop DC speed regulation system can be obtained.

[0128] The parameters of the DC motor selected in the present invention are: the rated voltage is U N =220V, rated current I N =163A, rated speed is n N =1460, lag time constant T s =0.00167s, amplification factor K s =40, armature resistance 0.5Ω, motor time constant T l =0.03s, excitation time constant T m =0.075s, electromotive force coefficient C e =0.132Vmin / r, the allowable overload multiple is 1.5 times.

[0129] Substitute the above parameters into the mathematical model formula of the speed and current dual closed-loop DC speed control system to calculate the mathematical model.

[0130] First, select and debug the parameters of the current loop PID controller. The controller selects the PI controller and sets the output upper and lower limits to 10 and -10. After adjustment, the parameters of the controller are finally obtained as follows: k i-P =1.013, k i-I =33.7, the speed loop adopts incremental PID controller.

[0131] Figure 3 In order to improve the parrot algorithm and optimize the flowchart of the BP neural network, firstly, the parameters of the parrot algorithm such as population, number of iterations, and initial parrot position are initialized; secondly, the nonlinear loop mechanism is used to improve the number of parrot populations before each iteration; then the parrot flies to the food or the owner, and randomly lands on any part of the owner to update the parrot position; the parrots in the group exchange information with the isolated parrots, and use nonlinear functions to improve the probability of flying in and out of the group during the communication process; in order to find a safe place, the parrot chooses to fly to the owner and stay away from strangers, and improves the owner's position to the owner's attachment area; if the maximum number of iterations is not reached, continue to optimize, and if it is reached, output the optimal set of initial weights and thresholds of the BP neural network; then use the speed and current dual closed-loop DC speed regulation system model to train the weights and thresholds of the BP neural network online; when the maximum number of iterations or the accuracy range is reached, stop training; the trained BP neural network optimizes the speed loop PID controller parameter k n-P , k n-I , k n-D .

[0132] Figure 4 The optimal fitness value convergence curves of the improved Parrot algorithm and the traditional Parrot algorithm when optimizing the BP neural network are shown, and the number of iterations, optimization time, overshoot, adjustment time, and steady-state error of IPO-BP-PID and PO-BP-PID when they are stable are compared in Table 1, indicating that the improved Parrot algorithm is superior to the traditional Parrot algorithm in many aspects, proving the feasibility and effectiveness of the improved Parrot algorithm.

[0133] Table 1 Comparison data between improved parrot algorithm and traditional parrot algorithm in optimizing BP neural network

[0134]

[0135] The above data testify to the better case of the present invention. It can be seen that in terms of optimization time, the improved ant colony algorithm takes 296s to calculate the optimal set of weights and thresholds, while the traditional ant colony algorithm takes 963s to calculate the optimal set of weights and thresholds, indicating that the improved parrot algorithm is better than the traditional parrot algorithm in convergence speed, which is 31% higher than the same period last year. The two different sets of weights and thresholds are applied to the BP neural network, and a set of k is optimized respectively. n-P , k n-I , k n-D The parameters are then substituted into the mathematical model of the speed and current dual closed-loop DC speed control system. The simulation results of IPO-BP-PID are: overshoot is 0.223%, adjustment time is 0.154s, and steady-state error is 0.326, while the simulation results of PO-BP-PID are: overshoot is 0.302%, adjustment time is 0.319s, and steady-state error is 1.997. The comparison shows that the improved Parrot algorithm is also better than the traditional Parrot algorithm in terms of optimization effect.

[0136] Figure 5 In order to simulate the speed loop PID controller in the speed-current dual closed-loop DC system, the structures of IPO-BP-PID, PO-BP-PID, BP-PID and traditional PID were introduced respectively, and the adjusted DC motor speed was compared. The performance of different algorithms was compared according to overshoot, adjustment time and steady-state error. The results are shown in Table 2.

[0137] Table 2 Comparison of simulation performance of different speed loop PID controllers

[0138]

[0139] From Table 2, it can be seen that the speed and current dual closed-loop DC speed control system using the IPO-BP-PID controller structure has the shortest adjustment time, the smallest steady-state error, and the best performance; for overshoot, the IACO-BP-PID system is slightly higher than the BP-PID system, but the adjustment time and steady-state error of the IPO-BP-PID system are much greater than the adjustment time and steady-state error of the BP-PID system. By comparison, the IPO-BP-PID system is still better than the BP-PID system. It proves that IPO-BP is better than PO-BP and BP in terms of optimization effect.

[0140] The experimental model of the present invention adopts S7-1200PLC as the core controller, and its output analog signal controls the output voltage of the single-phase rectifier and voltage regulator module. The output voltage of the single-phase rectifier and voltage regulator module is the input voltage of the DC motor, thereby controlling the speed and current of the DC motor. The DC motor speed is collected by the rotary encoder, and the DC motor current is collected by the current transmitter. The speed and current are input into the S7-1200PLC in real time. A double closed-loop PID controller is used in the PLC to control the analog signal output to the single-phase rectifier and voltage regulator module, and finally the DC motor reaches the desired speed. The IOT2050 intelligent gateway sends the real-time data of the S7-1200PLC to the Tencent cloud to save the experimental data.

[0141] The specific steps of S7-1200PLC programming are as follows: S7-1200PLC programming software is TIAPortalV16, and the main program is written in the OB30 interrupt loop. Configure the analog input address, read the analog signal of the current transmitter, write the analog conversion digital quantum program, and calculate the real-time current; configure the address and filter time of the high-speed counter, read the rotary encoder pulse, and write the subroutine for calculating the number of pulses and the current speed; write the speed loop PID and current loop PID controller subroutines, and the parameters use the K after simulation optimization. p , K i , K d ; Configure the analog output address, write a digital-to-analog quantum program, control the output voltage of the single-phase rectifier voltage regulator module, and thus control the speed and current of the DC motor; call the above subroutines in the OB30 loop main program, and set the time to 100ms, so the control cycle and sampling cycle are both 100ms. Switch the PLC to online mode, open the PID controller module speed control interface and switch to monitoring mode, set the desired speed, press the start button of the switchboard, monitor the output value waveform of the speed loop PID controller and the current loop PID controller, the real-time speed and current waveform, and calculate the overshoot and error.

[0142] Figure 6 This is a comparison chart of the experimental effects of different controllers of the present invention, from top to bottom they are IPO-BP-PID, PO-BP-PID, BP-PID, and traditional PID controller. The red curves are all the real-time speeds of the DC motor, and the black curves are all the expected speeds (1460 rad / min). The performance of different algorithms is compared based on overshoot, adjustment time and steady-state error. The results are shown in Table 3.

[0143] Table 3 Experimental performance comparison of different speed loop PID controllers

[0144]

[0145] Table 3 shows that from the overall effect, the IPO-BP-PID control effect is still the best. However, the overshoot, adjustment time and steady-state error have increased. This is related to the hardware control cycle, equipment response time and some unknown interference factors in the operation of the experimental equipment. The control cycle of this experiment is 100ms, which is much longer than the simulation control time. Therefore, the overall adjustment time is relatively long, and the PID adjustment panel in TIAPortal V16 adopts a cycle limit, and the waveform is a step-shaped rather than a continuous curve.

[0146] The present invention has proved the effectiveness and correctness of the speed and current double closed-loop DC speed regulation system control method based on the improved Parrot algorithm to optimize the BP neural network through simulation and test bench model verification, thus improving the overall performance of the system.

[0147] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0148] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A control method for a dual closed-loop DC speed regulation system based on an improved Parrot algorithm, characterized in that: include: The weights and thresholds of the BP neural network are optimized by using the improved parrot algorithm to obtain an initial optimized BP neural network, wherein the weights and thresholds of the BP neural network are optimized to be 36 and 12 respectively; According to the gradient descent principle, the initial optimized BP neural network is trained to obtain the final optimized BP neural network; Calculating the parameters of the PID controller using the final optimized BP neural network to obtain the optimal group parameters of the PID controller; The dual closed-loop DC speed regulation system is controlled using the optimal group parameters of the PID controller.

2. The control method of a dual closed-loop DC speed regulation system based on an improved Parrot algorithm according to claim 1 is characterized in that: The improved parrot algorithm is used to optimize the weights and thresholds of the BP neural network to obtain the initial optimized BP neural network, including: Setting parameters in the parrot algorithm and initializing the parameters in the parrot algorithm to obtain initialized parameters, wherein the parameters include: population size, number of iterations, upper limit, lower limit and initial position of each parrot; Determine the population size based on the nonlinear cyclic change mechanism; Determine the parrot's flight direction and target location based on the parrot population's foraging rules; The positions of the parrots in the population are updated according to the first position update formula and the parrots' flight directions, initial positions and target positions to obtain a first updated position; Using the parrot flight mechanism, according to the first updated position and the second updated formula, a second updated position is obtained; Using the parrot communication mechanism, nonlinearly improve the probability of parrots flying out of the group and flying into the group, and obtain the third updated position according to the second updated position and the third updated formula; Using the parrot approaching the owner mechanism, a fourth updated position is obtained according to the third updated position and the fourth updated formula; Determine an optimal weight and threshold according to the first update position, the second update position, the third update position, the fourth update position, the upper limit, the lower limit and the number of iterations; The initial weights and thresholds of the BP neural network are determined according to the optimal weights and thresholds to obtain an initial optimized BP neural network.

3. The control method of a dual closed-loop DC speed regulation system based on an improved Parrot algorithm according to claim 1 is characterized in that: The first update formula is: in, is the updated position of the i-th parrot after the t-th iteration, is the position of the i-th parrot in the t-th iteration, X Best is the global optimal solution for the parrot's position, Levy(dim) is the Levy distribution, representing the parrot's flight direction, dim is the dimension, t is the current number of iterations, and rand(0,1) is a random number between 0 and 1. is the average position of the parrot population at the tth iteration.

4. The control method of a dual closed-loop DC speed regulation system based on an improved Parrot algorithm according to claim 3 is characterized in that: The second update formula is: in, is the second updated position.

5. The control method of a dual closed-loop DC speed regulation system based on an improved Parrot algorithm according to claim 4 is characterized in that: The third update formula is: Among them, P is a random number between 0 and 1, ST is a dynamic probability, Update location for the third time.

6. The control method of a dual closed-loop DC speed regulation system based on an improved Parrot algorithm according to claim 4 is characterized in that: The fourth update formula is: in, Represents the owner and surrounding locations, Update position for the fourth time.

7. The control method of a dual closed-loop DC speed regulation system based on an improved Parrot algorithm according to claim 1, characterized in that: According to the gradient descent principle, the initial optimized BP neural network is trained to obtain the final optimized BP neural network, including: The initial optimized BP neural network is trained using a double closed-loop DC speed regulation system model, and the input and output of the hidden layer and the output layer of the initial optimized BP neural network are calculated; Determine the objective function and calculate the error based on the input and output; According to the error, the weights and thresholds of the hidden layer and output layer of the initial optimized BP neural network are reversely corrected and the maximum number of iterations is judged. If the maximum number is reached, the final optimized BP neural network is obtained. Otherwise, the step is returned to train the initial optimized BP neural network using the dual closed-loop DC speed regulation system model.

Citation Information

Cited By

  • Electrocardiogram classification method for optimizing residual network based on improved parrot algorithm

    CN120694656A

  • An electrocardiogram classification method based on improved parrot algorithm optimization residual network

    CN120694656B

  • Method for monitoring and regulating oil temperature of oil-immersed transformer

    CN121143522A