Parameter Tuning Method of Linear Active Disturbance Rejection Controller Based on Sparrow Search Algorithm
Through the linear active disturbance rejection controller parameter tuning method based on the Sparrow search algorithm, the problem of stable operation and parameter tuning of the magnetic levitation system in the real environment is solved, and the stable control and anti-interference capabilities are improved.
Patent Information
- Application Number
- CN202210637483.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-07
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2042-06-07
AI Technical Summary
Existing magnetic levitation system control technology is difficult to achieve stable operation in a real environment, especially due to external interference factors such as wind and air pressure, which cause changes in the vehicle's suspension state, and it is difficult to tune the parameters of the linear active disturbance rejection controller.
A linear active disturbance rejection controller parameter tuning method based on the sparrow search algorithm is used to iteratively optimize the parameters to achieve stable control by constructing a fitness function, correlating the parameters to be tuned with the sparrow position vector, initializing and updating the sparrow population.
It achieves stable operation of the magnetic levitation platform under linear active disturbance rejection control, reduces the difficulty of parameter adjustment, and improves the anti-interference capability and control accuracy.
Smart Images

Figure CN115032897B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of motion control technology, and in particular to a parameter setting method of a linear active disturbance rejection controller based on a sparrow search algorithm. Background Art
[0002] Maglev trains will dominate the next generation of ground transportation, and have the characteristics of non-contact, low wear, low noise and long service life. However, the nonlinear characteristics of permanent magnetic materials increase the difficulty of vehicle control and improve the control accuracy requirements of the controller. At present, the development of maglev transportation can not only promote the progress of transportation technology and solve the complex transportation problems in cities, but also have a huge role in promoting my country's economic modernization.
[0003] However, because the magnetic levitation system is essentially an unstable nonlinear system, and there are other external factors in the real suspension environment, such as wind, air pressure, etc., which may cause the vehicle's suspension state to change outdoors. Therefore, it is particularly important to use control algorithms with strong anti-interference ability, robustness, and independent of the precise model of the controlled object in the test platform and engineering design. However, most of the current control technologies for magnetic levitation systems, such as classic PID controllers, state feedback, robust control, intelligent control, and sliding mode control, have only remained in the simulation stage. Only PID control, sliding mode control (SMC), and other methods that do not rely on the precise model of the system have been successfully applied to magnetic levitation systems. Among them, the active disturbance rejection control (ADRC) proposed by Professor Han Jingqing inherits the advantages of the classic PID by reducing the total disturbance of various uncertain factors. The linear active disturbance rejection control (LADRC) control concept proposed by Professor Gao Zhiqiang and others linearizes ADRC using the concept of frequency scale, and proposes an easy-to-operate linear active disturbance rejection control (LADRC) for the control field. However, this method has the problem of difficult parameter tuning, and parameter tuning is a way to reach the design index, constantly adjusting the design variables so that the design results are constantly close to the parameterized target value. Therefore, how to perform parameter tuning for linear active disturbance rejection control is a technical problem that needs to be solved urgently. Summary of the invention
[0004] In view of this, the purpose of the present application is to provide a parameter tuning method for a linear active disturbance rejection controller based on a sparrow search algorithm, by adopting the sparrow search algorithm to perform parameter tuning for the linear active disturbance rejection control, and applying this method to the proposed magnetic levitation ball platform, so that the magnetic levitation platform can achieve stable operation under the linear active disturbance rejection control according to the parameter tuning method, and at the same time, the problem of difficulty in adjusting the parameters of the linear active disturbance rejection control is also solved.
[0005] The embodiment of the present application provides a parameter setting method of a linear active disturbance rejection controller based on a sparrow search algorithm, which is applied to a magnetic levitation ball platform. The parameter setting method includes:
[0006] According to the actual suspension height and the preset suspension height of the steel ball on the magnetic suspension platform, the fitness function of the sparrow search algorithm is constructed;
[0007] Associating the parameters to be tuned of the linear active disturbance rejection controller with the position vector of the sparrow;
[0008] Initialize the relevant parameters of the sparrow search algorithm and the position vector of the sparrow;
[0009] Calculating the fitness value of each individual sparrow in the sparrow population according to the fitness function, the relevant parameters and the position vector of the sparrow;
[0010] According to the fitness value of each individual sparrow, the sparrows in the sparrow population are divided into discoverers and followers, and the early warning ones are determined at the same time;
[0011] Iteratively updating the positions of the discoverer, follower, and alerter;
[0012] When the iteration number threshold is reached, the updating is stopped, the global optimal value position of the sparrow population is output, and the parameter tuning of the linear active disturbance rejection controller is completed.
[0013] Optionally, the fitness function of the sparrow search algorithm is constructed by the following formula:
[0014]
[0015] Where t is time, y r is the preset suspension height of the steel ball, and y is the actual suspension height of the steel ball.
[0016] Optionally, the parameters to be adjusted include: observation bandwidth, control bandwidth and compensation gain.
[0017] Optionally, the relevant parameters include: the number of sparrows, a threshold of the number of iterations, a search range, and the dimension of the variable to be optimized.
[0018] Optionally, dividing the sparrows in the sparrow population into discoverers and followers according to the fitness value of each individual sparrow includes:
[0019] According to the fitness value of each individual sparrow, the sparrows are sorted from high to low to determine the sparrow queue;
[0020] The sparrows with the first preset number of numbers in the sparrow queue are determined as discoverers, and the sparrows in the sparrow queue other than the discoverers are determined as followers.
[0021] Optionally, the iterative updating of the positions of the discoverer, the follower, and the alerter includes:
[0022] Update the finder's position using the following formula:
[0023]
[0024] Among them, a represents the current number of iterations; i represents the i-th sparrow; j represents the j-th dimension optimization variable, j = 1, 2...d; It represents the location information of the sparrow at the ath iteration; iter max is a normal number, representing the maximum number of iterations before the optimization is finally completed; α represents a random number; R2 represents the warning value; ST represents the safety value; Q represents a random number that obeys the normal distribution; L represents a 1×d matrix, and each element in the matrix is 1;
[0025] Update the position of the joiner using the following formula:
[0026]
[0027] in, Represents the optimal position currently occupied by the discoverer; X worst represents the worst position of the sparrow; A is a 1×d matrix, and the elements in the matrix are randomly 1 or -1. + =A T (AA T ) -1 ; represents the location information of the joiner at the ath iteration; n represents the total number of sparrows;
[0028] Update the position of the alerter using the following formula:
[0029]
[0030] in, represents the global optimal position at the ath iteration; β represents the control parameter of the step size; K represents a random number, f i represents the current fitness value of the sparrow individual; f g Represents the global minimum fitness value; f w Represents the current highest fitness value; ε represents the minimum constant.
[0031] Optionally, the outputting of the global optimal position of the sparrow population to complete parameter tuning of the linear active disturbance rejection controller includes:
[0032] According to the global optimal value position of the sparrow population and the correlation between the untuned parameters of the linear active disturbance rejection controller and the position vector of the sparrow, the global optimal value position of the sparrow population is restored to the untuned parameters corresponding to the linear active disturbance rejection controller, and the parameter tuning of the linear active disturbance rejection controller is completed.
[0033] The embodiment of the present application further provides a parameter setting device for a linear active disturbance rejection controller based on a sparrow search algorithm, the parameter setting device comprising:
[0034] A construction module, used for constructing a fitness function of a sparrow search algorithm according to an actual suspension height and a preset suspension height of a steel ball on a magnetic suspension platform;
[0035] An association module is used to associate the parameters to be tuned of the linear active disturbance rejection controller with the position vector of the sparrow;
[0036] Initialization module, used to initialize the relevant parameters of the sparrow search algorithm and the position vector of the sparrow;
[0037] A calculation module, used for calculating the fitness value of each individual sparrow in the sparrow population according to the fitness function;
[0038] A division module, for dividing the sparrows in the sparrow population into discoverers and followers according to the fitness value of each individual sparrow, and determining the early warning ones at the same time;
[0039] An updating module, used for iteratively updating the positions of the discoverer, follower and alerter;
[0040] The tuning module is used to stop updating when a threshold of the number of iterations is reached, output the global optimal value position of the sparrow population, and complete the parameter tuning of the linear active disturbance rejection controller.
[0041] Optionally, the building module is used to build the fitness function of the sparrow search algorithm through the following formula:
[0042]
[0043] Where t is time, y r is the preset suspension height of the steel ball, and y is the actual suspension height of the steel ball.
[0044] Optionally, the parameters to be adjusted include: observation bandwidth, control bandwidth and compensation gain.
[0045] Optionally, the relevant parameters include: the number of sparrows, a threshold of the number of iterations, a search range, and the dimension of the variable to be optimized.
[0046] Optionally, when the division module is used to divide the sparrows in the sparrow population into discoverers and followers according to the fitness value of each individual sparrow, the division module is used to:
[0047] According to the fitness value of each individual sparrow, the sparrows are sorted from high to low to determine the sparrow queue;
[0048] The sparrows with the first preset number of numbers in the sparrow queue are determined as discoverers, and the sparrows in the sparrow queue other than the discoverers are determined as followers.
[0049] Optionally, when the updating module is used to iteratively update the positions of the discoverer, the follower, and the alerter, the updating module is used to:
[0050] Update the finder's position using the following formula:
[0051]
[0052] Among them, a represents the current number of iterations; i represents the i-th sparrow; j represents the j-th dimension optimization variable, j = 1, 2...d; It represents the location information of the sparrow at the ath iteration; iter max is a normal number, representing the maximum number of iterations before the optimization is finally completed; α represents a random number; R2 represents the warning value; ST represents the safety value; Q represents a random number that obeys the normal distribution; L represents a 1×d matrix, and each element in the matrix is 1;
[0053] Update the position of the joiner using the following formula:
[0054]
[0055] in, Represents the optimal position currently occupied by the discoverer; X worst represents the worst position of the sparrow; A is a 1×d matrix, and the elements in the matrix are randomly 1 or -1. + =A T (AA T ) -1 ; represents the location information of the joiner at the ath iteration; n represents the total number of sparrows;
[0056] Update the position of the alerter using the following formula:
[0057]
[0058] in, represents the global optimal position at the ath iteration; β represents the control parameter of the step size; K represents a random number, f i represents the current fitness value of the sparrow individual; f g Represents the global minimum fitness value; f w Represents the current highest fitness value; ε represents the minimum constant.
[0059] Optionally, when the tuning module is used to output the global optimal value position of the sparrow population and complete the parameter tuning of the linear active disturbance rejection controller, the tuning module is used to:
[0060] According to the global optimal value position of the sparrow population and the correlation between the untuned parameters of the linear active disturbance rejection controller and the position vector of the sparrow, the global optimal value position of the sparrow population is restored to the untuned parameters corresponding to the linear active disturbance rejection controller, and the parameter tuning of the linear active disturbance rejection controller is completed.
[0061] An embodiment of the present application also provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the parameter setting method as described above are performed.
[0062] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the parameter setting method as described above are executed.
[0063] A parameter setting method for a linear anti-disturbance control controller based on a sparrow search algorithm provided in an embodiment of the present application is applied to a magnetic levitation ball platform, and the parameter setting method includes: constructing a fitness function of the sparrow search algorithm according to an actual suspension height and a preset suspension height of a steel ball on the magnetic levitation platform; associating the parameters to be set of the linear anti-disturbance control controller with the position vector of the sparrow; initializing the relevant parameters of the sparrow search algorithm and the position vector of the sparrow; calculating the fitness value of each individual sparrow in the sparrow population according to the fitness function, the relevant parameters and the position vector of the sparrow; dividing the sparrows in the sparrow population into discoverers and followers according to the fitness value of each individual sparrow, and determining the early warning at the same time; iteratively updating the positions of the discoverers, followers and early warnings; stopping the update when the iteration number threshold is reached, outputting the global optimal value position of the sparrow population, and completing the parameter setting of the linear anti-disturbance control controller.
[0064] In this way, by using the sparrow search algorithm to tune the parameters of the linear active disturbance rejection control and applying this method to the proposed magnetic levitation ball platform, the magnetic levitation platform can achieve stable operation under the linear active disturbance rejection control according to the parameter tuning method, and the problem of difficulty in adjusting the parameters of the linear active disturbance rejection control is also solved.
[0065] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0067] Figure 1 A flow chart of a parameter setting method of a linear active disturbance rejection controller based on a sparrow search algorithm provided in an embodiment of the present application;
[0068] Figure 2 A structural schematic diagram of the operating principle of the magnetic levitation platform provided in this application;
[0069] Figure 3 A schematic diagram of the operating principle of the SSA-LADRC provided in this application;
[0070] Figure 4 It is a schematic diagram of the structure of the control rate module in LADRC;
[0071] Figure 5 It is a schematic diagram of the structure of the linear extended state observer in LADRC;
[0072] Figure 6 This is the overall structure diagram of LADRC on simulink;
[0073] Figure 7 It is a schematic diagram of the structure after the sparrow search algorithm is associated with LADRC;
[0074] Figure 8 It is one of the convergence curves of the ITAE indicator of the objective function;
[0075] Fig. 9 is one of the response curves corresponding to the control algorithm;
[0076] Fig.10 It is the second convergence curve of the objective function ITAE indicator;
[0077] Fig.11 This is the second response curve corresponding to the control algorithm;
[0078] Fig.12 It is the third convergence curve of the ITAE indicator of the objective function;
[0079] Fig.13 This is the third response curve corresponding to the control algorithm;
[0080] Fig.14 A schematic diagram of the structure of a parameter setting device for a linear active disturbance rejection controller based on a sparrow search algorithm provided in an embodiment of the present application;
[0081] Fig.15 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0082] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, each other embodiment obtained by those skilled in the art without making creative work belongs to the scope of protection of the present application.
[0083] Because the magnetic levitation system is essentially an unstable nonlinear system, and there are other external factors in the real suspension environment, such as wind, air pressure, etc., which may cause the vehicle to change its suspension state outdoors. Therefore, it is particularly important to use control algorithms with strong anti-interference ability, robustness, and independent of the precise model of the controlled object in the test platform and engineering design. However, most of the control technologies of the magnetic levitation system, such as the classic PID controller, state feedback, robust control, intelligent control, and sliding mode control, have only remained in the simulation stage. Only PID control, sliding mode control (SMC), and other methods that do not rely on the precise model of the system have been successfully applied to the magnetic levitation system. Among them, the active disturbance rejection control (ADRC) proposed by Professor Han Jingqing inherits the advantages of the classic PID by reducing the total interference of various uncertain factors. The linear active disturbance rejection control (LADRC) control concept proposed by Professor Gao Zhiqiang and others linearizes ADRC using the concept of frequency scale, and proposes an easy-to-operate LADRC for the control field. However, this method has the problem of difficult parameter tuning, and parameter tuning is a way to reach the design index. The design variables are constantly adjusted to make the design results approach the parameterized target value. Therefore, how to adjust the parameters of linear active disturbance rejection control is a technical problem that needs to be solved urgently.
[0084] Based on this, an embodiment of the present application provides a parameter setting method for linear active disturbance rejection control based on a sparrow search algorithm. By adopting the sparrow search algorithm to perform parameter setting for the linear active disturbance rejection control, and applying this method to the proposed magnetic levitation ball platform, the magnetic levitation platform can achieve stable operation under the linear active disturbance rejection control according to the parameter setting method, and also solves the problem of difficulty in adjusting the parameters of the linear active disturbance rejection control.
[0085] See also Figure 1 , Figure 1 The flowchart of a parameter setting method of a linear active disturbance rejection controller based on a sparrow search algorithm provided in an embodiment of the present application is as follows. Figure 1 As shown in , the parameter setting method provided in the embodiment of the present application includes:
[0086] S101. Construct a fitness function of a sparrow search algorithm according to an actual suspension height and a preset suspension height of the steel ball on the magnetic levitation platform.
[0087] Here, the proposed parameter tuning method is applied on a magnetic levitation platform, see Figure 2 , Figure 2A structural diagram of the operating principle of the magnetic levitation platform provided for this application. The magnetic levitation platform includes a steel ball, a laser sensor, a controller, a power amplifier and then an electromagnet. The platform uses the suction force generated by the electromagnet to suspend the controlled steel ball in a balanced position. The laser sensor is used to obtain the distance x between the controlled steel ball and the electromagnet (i.e. the actual suspension height of the steel ball), and the controller stores the preset suspension height of the steel ball (which can also be input through an external device), and then calculates through the control algorithm of the controller to output a control signal, which is converted into a control current i through the power amplifier. The control current causes the electromagnet to generate an upward electromagnetic force F on the steel ball, and the electromagnetic force F resists the gravity of the steel ball itself, and finally keeps the controlled steel ball in a balanced position to achieve the effect of suspension. In addition, the steel ball can be fixed at a specified position or moved according to a desired trajectory by adjusting the current flowing through the electromagnetic coil. Wherein, the controller is a linear anti-disturbance controller.
[0088] And, according to Figure 2 As shown, the nonlinear dynamic equation of the magnetic levitation platform is:
[0089]
[0090] Among them, F(i,x) represents the electromagnetic force, F(i 0 , x 0 ) is the electromagnetic force when the steel ball is at the equilibrium point, U in It represents the input voltage of the power amplifier. The description of other parameters is shown in Table 1 below.
[0091] Table 1: Physical parameters of each component in the magnetic levitation platform
[0092] symbol meaning Value (unit) m Steel ball weight 0.094kg <![CDATA[μ 0 ]]> Vacuum Permeability <![CDATA[4π×10 -7 H / m]]> A Track cross-sectional area <![CDATA[π×10 -4 m 2 ]]> N Electromagnet coil turns 2450 turns <![CDATA[i 0 ]]> Balance current 0.3943 <![CDATA[x 0 ]]> Balance displacement 0.01m <![CDATA[K a ]]> Power amplifier gain 6.508
[0093] From the nonlinear dynamic equation of the magnetic levitation platform, it can be seen that the electromagnetic force F is related to the control current i and the position x of the steel ball. The relationship between them is nonlinear. The electromagnetic attraction F(i, x) is calculated at the equilibrium point (i 0 , x 0 ) is expanded using Taylor's formula and after discarding the higher-order terms, the expression of the electromagnetic attraction F is:
[0094]
[0095] Substituting the expression of electromagnetic attraction F into the nonlinear dynamic equation of the magnetic levitation platform, the nonlinear dynamic equation of the magnetic levitation platform can be transformed into:
[0096]
[0097] Take U in As the control input, the linear equation model of the magnetic levitation ball platform at the equilibrium point is:
[0098]
[0099] Performing Laplace transformation on both ends of the linear equation model of the magnetic levitation ball platform at the equilibrium point yields:
[0100]
[0101] Select X(s) as the output signal of the system, U in (s) is used as the output signal, and the transfer function of the magnetic levitation platform is obtained as follows:
[0102]
[0103] Substituting the physical parameters in Table 1 into the above transfer function, the transfer function of the magnetic levitation platform can be obtained as follows:
[0104]
[0105] In one implementation provided in the present application, the fitness function of the sparrow search algorithm is constructed by the following formula: Where t is time, y r is the preset suspension height of the steel ball, and y is the actual suspension height of the steel ball.
[0106] Here, the ITAE index is used as the objective function (ie, the fitness function) of the sparrow search algorithm. For the linear active disturbance rejection control (LADRC) controller, the ITAE index is the error generated by the controller, thereby establishing a connection between LADRC and the sparrow search algorithm.
[0107] In this way, the sparrow search algorithm searches for the best position within the specified range, that is, the parameters to be adjusted for the linear active disturbance rejection controller, so that the fitness function ITAE index reaches a minimum value, thereby minimizing the error of the LADRC controller, which is the optimal control state of the controller. It is worth noting that due to the limitations of the controller itself, the search range should not be set too large, otherwise the program will fail. It should also not be set too small, otherwise the controller will not be able to reach the optimal control state.
[0108] For examples, see Figure 3 , Figure 3 The schematic diagram of the operation principle of SSA-LADRC provided in this application, wherein SSA-LADRC is a sparrow search algorithm-linear active disturbance rejection control, such as Figure 3As shown in the figure, the dotted box represents the structural diagram of the linear active disturbance rejection controller operation principle. Here, the input and output of the LADRC control magnetic levitation ball system constitute the integral time absolute error ITAE index, which is used as the fitness function of the sparrow optimization algorithm. This index reflects the control accuracy and speed of the control system, and also represents the error generated by the LADRC control magnetic levitation ball system. The smaller its value, the better the control effect of the LADRC magnetic levitation ball. The role of the sparrow search algorithm is to search for the parameters required to minimize the ITAE error within the set range, so that the control performance of the LADRC can be optimized within a certain parameter range.
[0109] S102, associating the parameters to be tuned of the linear active disturbance rejection controller with the position vector of the sparrow.
[0110] Here, the parameters to be adjusted include: observation bandwidth, control bandwidth and compensation gain. By associating the parameters to be adjusted of the linear active disturbance rejection controller with the position vector of the sparrow, that is, the position of the sparrow is encoded by the parameters to be adjusted of the linear active disturbance rejection controller, so that the parameter adjustment of the linear active disturbance rejection controller can be completed in the process of finding the optimal position. Among them, the dimension of the variables to be optimized of the sparrow is the sum of the parameters to be adjusted.
[0111] Here, the parameters to be adjusted include the observer bandwidth, the control bandwidth and the compensation gain because the linear active disturbance rejection controller includes a linear extended state observer (LESO) and a control rate module. The linear extended state observer (LESO) in the linear active disturbance rejection controller receives the actual suspension height y of the steel ball in the magnetic levitation ball platform and calculates the estimated value of the actual suspension height and the estimated value of the first-order differential of the estimated value of the steel ball velocity, and calculates the estimated value of the total disturbance, which corresponds to z in the LADRC parameters respectively. 1 、z 2 、z 3 Among them, the expression of the linear extended state observer is
[0112]
[0113] β 1 , β 2 , β 3 is the adjustable gain of the linear extended state observer, and its value is related to the observation bandwidth, namely, β 1 =3ω 0 , β 2 =3ω 0 2 , β 3 =ω 0 3 (ω 0 is the observation bandwidth). The observation bandwidth ω of the observer0 Determines the tracking speed of LESO, its ω 0 The larger the value, the faster the LESO estimation disturbance will be. 0 If the value is too large, the steel ball will shake. 0 The choice of control system is also very important.
[0114] Furthermore, the linear error feedback module in the control rate module receives the preset suspension height y of the magnetic suspension ball. r , and the estimated value of the actual suspension height y transmitted by the linear expansion observer and its first-order differential estimate are z 1 、z 2 The calculation formula of the linear error feedback module is: 0 =k p (y r -z 1 )-k d z 2 , that is, the error between the preset suspension height and the estimated value of the actual suspension height is used as the input of the controller, and the initial control voltage is output through the proportional-differential control rate of the controller. Then, the initial control voltage u output by the linear error feedback module is adjusted according to the total disturbance estimate transmitted by the linear expansion observer. 0 Compensation is performed to calculate the control voltage of LADRC on the magnetic suspension ball (steel ball) To achieve PD control without an integral link. p , k d They are the proportional gain coefficient and differential gain coefficient of the PD controller, and their values are related to the control bandwidth. k d =2ω c , control bandwidth ω c Determines the response speed of the controller, within a certain range ω c The bigger the better, but if it is too large, it will cause system instability or excessive overshoot. c The choice is crucial. 0 Then it is the initial control voltage u output by the linear extended state observer for the linear error feedback module 0 Compensation gain, experience shows that u 0 It is an important parameter that affects the stability of the system, so for u 0 The choice is also crucial.
[0115] Therefore, let the three parameters of LADRC be the position vector of the sparrow, that is, x 1 =ω c , x 2 =ω 0 , x 3 =b0 , the location information of each sparrow has a corresponding fitness value, namely the objective function ITAE.
[0116] In this way, the control voltage u is divided into two paths. One path uses the power amplifier of the magnetic levitation ball platform to convert the input voltage into a driving current flowing into the electromagnetic coil to control the size of the electromagnetic force, thereby realizing the suspension of the steel ball. The other path is b 0 The gain of times is used as the first input signal of the extended state observer. That is, the input control voltage of the magnetic levitation ball platform and the output actual suspension height are used as the input of the linear extended state observer, so that LESO can observe the state of the magnetic levitation ball platform and then calculate the reasonable control amount u of the magnetic levitation ball platform.
[0117] S103, initializing relevant parameters of the sparrow search algorithm and initializing the position vector of the sparrow.
[0118] Here, the relevant parameters include: the number of sparrows, the iteration number threshold, the search range and the dimension of the variable to be optimized, and may also include the number of discoverers, the number of alarms, the alarm value and the like.
[0119] The number of sparrows n should be selected according to the size of the search range. The larger the search range, the more sparrows are needed, which can better avoid the optimization process from falling into a local optimal solution due to too few sparrows. The iteration number threshold is the maximum number of iterations, and the maximum number of iterations should be selected to be greater than the number of iterations required for the objective function to stabilize. The number of discoverers PD should account for 20% of the sparrow population, and the alarm value should be selected in the range of zero to one. The upper and lower bounds of the search range need to be determined in combination with the actual situation of the controller, that is, the upper and lower bounds of the search range are roughly determined by repeatedly running the program.
[0120] Here, since LADRC has three parameters that need to be tuned, the dimension of the variable to be optimized can be selected as 3, the number of sparrows n is set to about ten times the number of parameters to be optimized, and the upper and lower bounds of the search range should be as large as possible without affecting the LADRC controller.
[0121] S104. Calculate the fitness value of each individual sparrow in the sparrow population according to the fitness function, the relevant parameters and the position vector of the sparrow.
[0122] Here, when calculating the fitness value of each individual sparrow, the relevant parameters and the position vector of each sparrow can be input into the LADRC controller, and the fitness value (ie, ITAE value) of each individual sparrow can be calculated through the fitness function.
[0123] S105. According to the fitness value of each individual sparrow, the sparrows in the sparrow population are divided into discoverers and followers, and the early warning ones are determined at the same time.
[0124] It should be noted that in a sparrow population, the energy reserve of the discoverer is higher than that of the participants in the same sparrow population. The role of the discoverer in the entire sparrow population is to search for areas with abundant food and provide the followers with the direction and area for foraging. In the mathematical model, the indicator corresponding to the energy reserve of the sparrow is the fitness value.
[0125] When the early warning person in the sparrow population finds predators around, the sparrow will start chirping as an alarm signal. When the alarm value is greater than the safety value, the discoverer will look for other safe areas and will follow the lead to the area to forage.
[0126] The proportion of discoverers and followers is in a dynamic equilibrium state. Whether each individual sparrow can become a discoverer depends on whether the sparrow finds better food resources. However, the proportion of followers and discoverers in the population will not change, that is, if one sparrow becomes a joiner, another sparrow will become a discoverer.
[0127] The lower the energy of the followers, the worse their foraging position is in the entire population. Some hungry followers have a better chance of flying to other safe areas to forage, thereby obtaining more food and energy.
[0128] When sparrows are looking for food, followers are always more likely to find the finder who can provide the best food resources, and then get the food they need from the finder with the best food or look for food around the finder. At the same time, some followers may constantly monitor the finder to steal food resources in order to improve their own hunting efficiency.
[0129] When a sparrow population becomes aware of the risk, the sparrows at the edge of the group will quickly gather towards the safe area to gain a better position, while the sparrows in the middle of the population will wander around randomly, looking for opportunities to approach other sparrows.
[0130] In one embodiment provided in the present application, the sparrows in the sparrow population are divided into discoverers and followers according to the fitness value of each individual sparrow, including: determining a sparrow queue by sorting them in descending order according to the fitness value of each individual sparrow; determining the sparrows with the first preset number of sparrows in the sparrow queue as discoverers, and determining the sparrows in the sparrow queue other than the discoverers as followers.
[0131] Here, the sparrow with a high fitness value is determined as the discoverer, and the sparrow with a low fitness value is determined as the follower.
[0132] For example, after the sparrow queue is determined, the first 20% of the sparrows in the population can be determined as discoverers, and the last 80% of the sparrows can be determined as followers.
[0133] In addition, the early warning detectors were randomly selected from the sparrow population.
[0134] S106: Continuously update the positions of the discoverer, follower, and alerter.
[0135] Here, each time the positions of the discoverer, follower, and alerter are updated, it is necessary to determine whether the current number of updates reaches the iteration threshold.
[0136] In an implementation manner provided in the present application, the continuously updating the positions of the discoverer, follower, and alerter includes:
[0137] Update the finder's position using the following formula:
[0138]
[0139] Here, a represents the current number of iterations; i represents the i-th sparrow; j represents the j-th dimension optimization variable, j = 1, 2...d; It represents the location information of the sparrow at the ath iteration; iter max is a normal number, representing the maximum number of iterations before the optimization is completed; α represents a random number; R 2 represents the warning value; ST represents the safety value; Q represents a random number that obeys the normal distribution; L represents a 1×d matrix, and each element in the matrix is 1;
[0140] Among them, the value range of α is (0, 1], R 2 The value range of is [0,1]; the value range of ST is [0.5,1];
[0141] When R 2 When <ST, it means that there are no predators around the foraging area of the sparrow population, and the discoverer can carry out a large-scale search operation. 2 ≥ST, which means that some sparrows in the population have found predators around the search area and sent information to the population. At this time, the sparrow population should fly to other safe areas to start looking for food. At this time, the follower needs to execute the position update formula.
[0142] Update the position of the joiner using the following formula:
[0143]
[0144] here, Represents the optimal position currently occupied by the discoverer; X worst represents the worst position of the sparrow; A is a 1×d matrix, and the elements in the matrix are randomly 1 or -1. + =A T (AA T ) -1 ; represents the location information of the joiner at the ath iteration; n represents the total number of sparrows;
[0145] Among them, when i>n / 2, it indicates that the i-th follower with a lower fitness value has not obtained food and is in a very hungry state. At this time, the sparrow population needs to fly to other areas to find food and obtain more energy.
[0146] Update the position of the alerter using the following formula:
[0147]
[0148] here, represents the global optimal position at the ath iteration; β represents the control parameter of the step size; K represents a random number, f i represents the current fitness value of the sparrow individual; f g Represents the global minimum fitness value; f w Represents the current highest fitness value; ε represents the minimum constant.
[0149] Among them, β is a random number that obeys a normal distribution with a mean of 0 and a variance of 1; the value range of K is [-1,1]; the role of ε is to prevent the denominator from being zero.
[0150] When f i >f g This shows that the sparrows are at the edge of the population and are very vulnerable to attack. best This shows that the sparrows in this position are in the best position in the entire population, not easily attacked by predators, and are very safe. i =f g This means that the sparrows in the center of the population are aware of the risk and need to get as close as possible to the sparrows to reduce the risk of being attacked by predators. K reflects the flight trend of the sparrows and is also a step length control parameter.
[0151] S107. When the iteration number threshold is reached, the updating is stopped, the global optimal value position of the sparrow population is output, and the parameter setting of the linear active disturbance rejection controller is completed.
[0152] In one embodiment provided in the present application, the outputting of the global optimal position of the sparrow population to complete the parameter tuning of the linear active disturbance rejection controller includes: according to the global optimal position of the sparrow population and the correlation between the parameters to be tuned of the linear active disturbance rejection controller and the position vector of the sparrows, restoring the global optimal position of the sparrow population to the parameters to be tuned corresponding to the linear active disturbance rejection controller to complete the parameter tuning of the linear active disturbance rejection controller.
[0153] Here, the sparrow search algorithm is used to obtain the optimal position parameters of individual sparrows. The coordinate parameters in the position parameters correspond to the three parameters of the LADRC controller. In this way, the parameter tuning is completed after the maximum number of iterations, and finally the optimal solution within the specified range is output. The optimal position information of these sparrows is the optimal parameter of LADRC.
[0154] As an example, the scheme of this application is further explained through the following experimental cases. The GML2001 magnetic levitation ball platform of Googol Technology Company is used, and the effect is verified using the matlab platform. This effect verification uses classic PID, linear auto-disturbance rejection control (LADRC) and sparrow search algorithm-linear auto-disturbance rejection control (SSA-LADRC) to control the magnetic levitation ball platform, and examines the performance of the three control methods in terms of overshoot and anti-interference ability. The specific steps are as follows:
[0155] Step 1: Build the LADRC model in Simulink, which includes the control rate module and the linear extended state observer (LESO), as shown in Figure 4 As shown, Figure 4 It is a schematic diagram of the structure of the control rate module in LADRC; the expression corresponding to the control rate module is:
[0156]
[0157] like Figure 5 As shown, Figure 5 is a schematic diagram of the structure of the linear extended state observer in LADRC; Figure 6 As shown, Figure 6 The overall structure diagram of LADRC on simulink is shown in Figure 2. The expression corresponding to the linear extended state observer (LESO) is:
[0158]
[0159] Step 2: Construct the fitness function (i.e., objective function) on simulink. And this module establishes the connection between LADRC and the sparrow search algorithm. Figure 7 , Figure 7This is a schematic diagram of the structure after the sparrow search algorithm is associated with LADRC.
[0160] Step 3: Set the corresponding parameters of the sparrow search algorithm. Dimension dim = 3, and let x 1 =ω c , x 2 =ω 0 , x 3 =b 0 The search upper bound ub=[80 300 20], the search lower bound lb=[10 50 1], the number of sparrows n=30, the iteration threshold G=30, let the number of alarms be 20% of the total number of sparrows, and the proportion of discoverers be 20% of the total number of sparrows.
[0161] Step 4: Let the three parameters of LADRC be b 0 =6,ω c =30,ω 0 =250.
[0162] Step 5: Take the three parameters K of PID controller p =800,K i =4000, K d =45.
[0163] Step 6: Insert a step signal with a final value of 1 at the 5th second as interference.
[0164] Step 7: Set the input signal:
[0165]
[0166] Verification results:
[0167] When the input signal is y r1 Please refer to Figure 8 , Figure 8 is one of the convergence curves of the objective function ITAE indicator; Figure 8 As shown, after about 20 iterations, the ITAE index, i.e., the objective function, tends to be stable, and the final value of the ITAE index is 0.0024376. The three parameters of LADRC are ω c =80,ω 0 =300, b 0 =6.965314. Please refer to Fig. 9 , Fig. 9 is one of the response curves corresponding to the control algorithm, Fig. 9 It can be seen that the overshoot of SSA-LADRC is much smaller than that of LADRC and PID, and under the same interference conditions, the anti-interference performance of SSA-LADRC is also stronger than that of LADRC and PID.
[0168] When the input signal of SSA-LADRC is y r2 Please refer to Fig.10 , Fig.10 It is the second convergence curve of the objective function ITAE indicator; Fig.10 As shown, it can be seen that the ITAE index tends to be stable after about 25 iterations, and the final value of the ITAE index is 0.003945. The three parameter values of LADRC are ω c =79.99878,ω 0 =299.9995, b 0 =7.4572. Please refer to Fig.11 , Fig.11 The second response curve corresponding to the control algorithm is Fig.11 It can be seen that the overshoot of SSA-LADRC is significantly smaller than that of LADRC and PID, and under the same interference conditions, the anti-interference ability of SSA-LADRC is also stronger than that of LADRC and PID.
[0169] When the input signal of SSA-LADRC is y r3 Please refer to Fig.12 , Fig.12 It is the third convergence curve of the objective function ITAE indicator; Fig.12 As shown, it can be seen that the ITAE index, i.e., the objective function, tends to be stable after about 20 iterations. The final value of the ITAE index is 0.0043888. The three parameters of LADRC are ω c =80,ω 0 =221.8344, b 0 =7.028571. Please refer to Fig.13 , Fig.13 The third response curve corresponding to the control algorithm is Fig.13 It can be seen that the overshoot of SSA-LADRC is much smaller than that of LADRC and classic PID control. In terms of anti-interference, SSA-LADRC is also significantly smaller than LADRC and classic PID control. Compared with PID, LADRC has a smaller overshoot and converges faster after interference.
[0170] In summary, the performance of SSA-LADRC is better than that of LADRC, and the performance of LADRC is better than that of PID.
[0171] In this way, the present application adopts the sparrow search algorithm to perform parameter adjustment for the linear anti-disturbance control, and applies this method to the proposed magnetic levitation ball platform, so that the magnetic levitation platform can achieve stable operation under the linear anti-disturbance control according to the parameter adjustment method, while also solving the problem of difficulty in adjusting the parameters of the linear anti-disturbance control.
[0172] See also Fig.14 , Fig.14 The schematic diagram of the structure of a parameter setting device of a linear active disturbance rejection controller based on a sparrow search algorithm provided in an embodiment of the present application. Fig.14 As shown in , the parameter setting device 1400 includes:
[0173] A construction module 1410 is used to construct a fitness function of a sparrow search algorithm according to an actual suspension height and a preset suspension height of the steel ball on the magnetic suspension platform;
[0174] An association module 1420 is used to associate the parameters to be tuned of the linear active disturbance rejection controller with the position vector of the sparrow;
[0175] Initialization module 1430, used to initialize relevant parameters of the sparrow search algorithm and initialize the position vector of the sparrow;
[0176] A calculation module 1440 is used to calculate the fitness value of each individual sparrow in the sparrow population according to the fitness function;
[0177] A division module 1450 is used to divide the sparrows in the sparrow population into discoverers and followers according to the fitness value of each individual sparrow, and simultaneously determine the early warning ones;
[0178] An updating module 1460, configured to iteratively update the positions of the discoverer, the follower, and the alerter;
[0179] The tuning module 1470 is used to stop updating when the iteration number threshold is reached, output the global optimal value position of the sparrow population, and complete the parameter tuning of the linear active disturbance rejection controller.
[0180] Optionally, the construction module 1410 is used to construct the fitness function of the sparrow search algorithm through the following formula:
[0181]
[0182] Where t is time, y r is the preset suspension height of the steel ball, and y is the actual suspension height of the steel ball.
[0183] Optionally, the parameters to be adjusted include: observation bandwidth, control bandwidth and compensation gain.
[0184] Optionally, the relevant parameters include: the number of sparrows, a threshold of the number of iterations, a search range, and the dimension of the variable to be optimized.
[0185] Optionally, when the division module 1450 is used to divide the sparrows in the sparrow population into finders and followers according to the fitness value of each individual sparrow, the division module 1450 is used to:
[0186] According to the fitness value of each individual sparrow, the sparrows are sorted from high to low to determine the sparrow queue;
[0187] The sparrows with the first preset number of numbers in the sparrow queue are determined as discoverers, and the sparrows in the sparrow queue other than the discoverers are determined as followers.
[0188] Optionally, when the updating module 1460 is used to iteratively update the positions of the discoverer, the follower, and the alerter, the updating module 1460 is used to:
[0189] Update the finder's position using the following formula:
[0190]
[0191] Among them, a represents the current number of iterations; i represents the i-th sparrow; j represents the j-th dimension optimization variable, j = 1, 2...d; It represents the location information of the sparrow at the ath iteration; iter max is a normal number, representing the maximum number of iterations before the optimization is finally completed; α represents a random number; R2 represents the warning value; ST represents the safety value; Q represents a random number that obeys the normal distribution; L represents a 1×d matrix, and each element in the matrix is 1;
[0192] Update the position of the joiner using the following formula:
[0193]
[0194] in, Represents the optimal position currently occupied by the discoverer; X worst represents the worst position of the sparrow; A is a 1×d matrix, and the elements in the matrix are randomly 1 or -1. + =A T (AA T ) -1 ; represents the location information of the joiner at the ath iteration; n represents the total number of sparrows;
[0195] Update the position of the alerter using the following formula:
[0196]
[0197] in, represents the global optimal position at the ath iteration; β represents the control parameter of the step size; K represents a random number, f i represents the current fitness value of the sparrow individual; f g Represents the global minimum fitness value; f w Represents the current highest fitness value; ε represents the minimum constant.
[0198] Optionally, when the tuning module 1470 is used to output the global optimal value position of the sparrow population and complete the parameter tuning of the linear active disturbance rejection controller, the tuning module 1470 is used to:
[0199] According to the global optimal value position of the sparrow population and the correlation between the untuned parameters of the linear active disturbance rejection controller and the position vector of the sparrow, the global optimal value position of the sparrow population is restored to the untuned parameters corresponding to the linear active disturbance rejection controller, and the parameter tuning of the linear active disturbance rejection controller is completed.
[0200] See also Fig.15 , Fig.15 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig.15 As shown in , the electronic device 1500 includes a processor 1510 , a memory 1520 and a bus 1530 .
[0201] The memory 1520 stores machine-readable instructions executable by the processor 1510. When the electronic device 1500 is running, the processor 1510 communicates with the memory 1520 via the bus 1530. When the machine-readable instructions are executed by the processor 1510, the above-mentioned Figure 1 as well as Fig.13 The specific implementation of the steps in the method embodiment shown can be found in the method embodiment, and will not be repeated here.
[0202] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the computer program can execute the above-mentioned Figure 1 as well as Fig.13 The specific implementation of the steps in the method embodiment shown can be found in the method embodiment, and will not be repeated here.
[0203] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0204] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0205] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0206] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0207] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application can essentially be embodied in the form of a software product, or in other words, the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0208] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A parameter tuning method for linear active disturbance rejection controller based on sparrow search algorithm, It is characterized in that Applied to the magnetic levitation ball platform, the parameter setting method includes: According to the actual suspension height and the preset suspension height of the steel ball on the magnetic suspension platform, a fitness function of the sparrow search algorithm is constructed; the fitness function represents the error generated by the linear active disturbance rejection controller in the magnetic suspension platform; the linear active disturbance rejection controller includes a linear extended state observer and a control rate module; The parameters to be adjusted of the linear active disturbance rejection controller are associated with the position vector of the sparrow; the method of associating the parameters to be adjusted of the linear active disturbance rejection controller with the position vector of the sparrow includes: taking the parameters to be adjusted of the linear active disturbance rejection controller as the position vector of the sparrow, and the position information of each sparrow has a corresponding fitness function; the parameters to be adjusted include: observation bandwidth, control bandwidth and compensation gain; the observation bandwidth determines the tracking speed of the linear extended state observer; the control bandwidth determines the response speed of the controller; the compensation gain is the compensation gain of the linear extended state observer for the initial control voltage output by the linear error feedback module in the control rate module; the calculation formula of the control voltage of the steel ball on the magnetic suspension platform by the linear extended state observer is: ,in, is the control voltage, is the proportional gain coefficient, is the differential gain coefficient, is the compensation gain, is the state of the linear extended state observer, To preset the suspension height; Initialize the relevant parameters of the sparrow search algorithm and the position vector of the sparrow; Calculating the fitness value of each individual sparrow in the sparrow population according to the fitness function, the relevant parameters and the position vector of the sparrow; According to the fitness value of each individual sparrow, the sparrows in the sparrow population are divided into discoverers and followers, and the early warning ones are determined at the same time; Iteratively updating the positions of the discoverer, follower, and alerter; When the iteration number threshold is reached, the update is stopped, the global optimal value position of the sparrow population is output, and the parameter tuning of the linear active disturbance rejection controller is completed; The fitness function of the sparrow search algorithm is constructed by the following formula: ITAE= Where t is time, y r is the preset suspension height of the steel ball, and y is the actual suspension height of the steel ball; The related parameters include: the number of sparrows, the iteration number threshold, the search range and the dimension of the variable to be optimized; the dimension of the variable to be optimized is determined according to the number of parameters to be adjusted.
2. The parameter setting method according to claim 1, It is characterized in that The method of dividing the sparrows in the sparrow population into discoverers and followers according to the fitness value of each individual sparrow comprises: According to the fitness value of each individual sparrow, the sparrows are sorted from high to low to determine the sparrow queue; The sparrows with the first preset number of numbers in the sparrow queue are determined as discoverers, and the sparrows in the sparrow queue other than the discoverers are determined as followers.
3. The parameter setting method according to claim 1, It is characterized in that The iterative updating of the positions of the discoverer, the follower and the alerter includes: Update the discoverer's position using the following formula: Among them, a represents the current number of iterations; i represents the i-th sparrow; j represents the j-th dimension optimization variable, j=1,2...d; It represents the location information of the sparrow at the ath iteration; iter max is a normal number, representing the maximum number of iterations before the optimization is finally completed; α represents a random number; R2 represents the warning value; ST represents the safety value; Q represents a random number that obeys the normal distribution; L represents a 1×d matrix, and each element in the matrix is 1; Update the position of the joiner using the following formula: in, Represents the optimal position currently occupied by the discoverer; represents the worst position of the sparrow; A is a 1×d matrix, and the elements in the matrix are randomly 1 or -1. + =A T (AA T ) -1 ; represents the location information of the joiner at the ath iteration; n represents the total number of sparrows; Update the position of the alerter using the following formula: in, Represents the global optimal position at the ath iteration; represents the control parameter of the step size; K represents a random number, f i Represents the current fitness value of the sparrow individual; Represents the global minimum fitness value; Represents the current highest fitness value; Represents the minimum constant.
4. The parameter setting method according to claim 1, It is characterized in that The outputting of the global optimal position of the sparrow population to complete the parameter setting of the linear active disturbance rejection controller includes: According to the global optimal value position of the sparrow population and the correlation between the untuned parameters of the linear active disturbance rejection controller and the position vector of the sparrow, the global optimal value position of the sparrow population is restored to the untuned parameters corresponding to the linear active disturbance rejection controller, and the parameter tuning of the linear active disturbance rejection controller is completed.
5. A parameter setting device for a linear active disturbance rejection controller based on a sparrow search algorithm. It is characterized in that The parameter setting device comprises: A construction module is used to construct a fitness function of a sparrow search algorithm according to an actual suspension height and a preset suspension height of a steel ball on a magnetic suspension platform; the fitness function represents an error generated by a linear active disturbance rejection controller in the magnetic suspension platform; the linear active disturbance rejection controller includes a linear extended state observer and a control rate module; An association module is used to associate the parameters to be adjusted of the linear active disturbance rejection controller with the position vector of the sparrow; the association of the parameters to be adjusted of the linear active disturbance rejection controller with the position vector of the sparrow includes: taking the parameters to be adjusted of the linear active disturbance rejection controller as the position vector of the sparrow, and the position information of each sparrow has a corresponding fitness function; the parameters to be adjusted include: observation bandwidth, control bandwidth and compensation gain; the observation bandwidth determines the tracking speed of the linear extended state observer; the control bandwidth determines the response speed of the controller; the compensation gain is the compensation gain of the linear extended state observer for the initial control voltage output by the linear error feedback module in the control rate module; the calculation formula of the control voltage of the steel ball on the magnetic suspension platform by the linear extended state observer is: ,in, is the control voltage, is the proportional gain coefficient, is the differential gain coefficient, is the compensation gain, is the state of the linear extended state observer, To preset the suspension height; Initialization module, used to initialize the relevant parameters of the sparrow search algorithm and the position vector of the sparrow; A calculation module, used for calculating the fitness value of each individual sparrow in the sparrow population according to the fitness function; A division module, for dividing the sparrows in the sparrow population into discoverers and followers according to the fitness value of each individual sparrow, and determining the early warning ones at the same time; An updating module, used for iteratively updating the positions of the discoverer, follower and alerter; A tuning module, used for stopping updating when a threshold of the number of iterations is reached, outputting the global optimal position of the sparrow population, and completing parameter tuning of the linear active disturbance rejection controller; The building module is used to construct the fitness function of the sparrow search algorithm through the following formula: ITAE= Where t is time, y r is the preset suspension height of the steel ball, and y is the actual suspension height of the steel ball; The related parameters include: the number of sparrows, the iteration number threshold, the search range and the dimension of the variable to be optimized; the dimension of the variable to be optimized is determined according to the number of parameters to be adjusted.
6. An electronic device, It is characterized in that include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to execute the steps of the parameter setting method as described in any one of claims 1 to 4.
7. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the parameter setting method according to any one of claims 1 to 4 are executed.
Citation Information
Patent Citations
Differential AGV trajectory tracking control method based on sparrow search algorithm
CN112000096A
