A speed control optimization method for a sweeping robot

By improving the border sheep dog optimization algorithm, optimizing the PID controller of the speed control system, the problem of tedious and unstable control of traditional PID controller parameters, and achieve higher control accuracy and stability.

CN118818960BActive Publication Date: 2025-01-28HUBEI THREE GORGES POLYTECHNIC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411295677.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2025-01-28
Estimated Expiration
2044-09-18

AI Technical Summary

Technical Problem

Traditional PID controllers have cumbersome processes when adjusting parameters and rely on the experience of technicians, making it difficult to effectively control complex nonlinear systems, resulting in unstable control or poor accuracy.

Method used

By improving the border sheep dog optimization algorithm, the introduction of dynamic acceleration adjustment strategies and the fusion of the mobile strategy of the winning pool, optimize the KP, Ki, and KD parameters of the PID controller to improve the accuracy and stability of the controller.

Benefits of technology

The accuracy and stability of the PID controller is significantly improved, the control response time is reduced, the faster and more accurate speed control is achieved, and the overall performance of the speed control system of the floor sweeping robot is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118818960B_ABST
    Figure CN118818960B_ABST
Patent Text Reader

Abstract

The invention discloses a speed control optimization method for a sweeping robot, which belongs to the field of PID control technology. The method comprises the following steps: S1, constructing a sweeping robot speed control system; S2, improving a border collie optimization algorithm, which comprises two improvements: D1, using a dynamic acceleration adjustment strategy to improve the position movement acceleration of a sheepdog and a flock of sheep during the optimization process of a standard border collie optimization algorithm; D2, using a mobile strategy integrating a winning pool to improve a mathematical model for updating the position of a flock of sheep; S3, using an improved border collie optimization algorithm to optimize three parameters of a PID controller Kp, Ki and Kd of the sweeping robot speed control system; and S4, applying the searched optimal PID parameters Kp, Ki and Kd to the sweeping robot speed control system to optimize the control effect of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of PID control optimization, and in particular relates to a speed control optimization method for a sweeping robot. Background Art

[0002] A sweeping robot is a modern smart home device that has become an important household assistant for many families. Relying on advanced navigation technology, intelligent algorithms and efficient cleaning systems, the sweeping robot provides users with great convenience in their busy daily lives. With the continuous development of technology, the sweeping robot will become more intelligent and multifunctional, further improving the efficiency of home cleaning and user experience. The speed control of the sweeping robot is an important part of its performance, involving the application of multiple technologies and algorithms. Through reasonable speed control, the sweeping robot can work efficiently and stably in a complex home environment and provide better cleaning services.

[0003] PID (Proportional-Integral-Differential) controller is a classic control algorithm widely used in the field of speed control. Relying on its simple and effective control mechanism, it can achieve precise speed regulation. Although PID controller is the mainstream technology in the field of speed control, it also faces some challenges. The adjustment process of the three parameters of the traditional PID controller is cumbersome and highly dependent on the experience of technicians. For the control of some complex nonlinear systems, there will be problems of unstable control or poor accuracy. Optimizing the PID controller through an intelligent optimization algorithm can improve the performance and stability of the PID controller, and reduce the response time of speed control, so that the speed of the sweeping machine can be controlled more reasonably.

[0004] The Border Collie Optimization Algorithm is a new type of meta-heuristic algorithm. This algorithm is inspired by the herding behavior of Border Collies. It divides the population into explorers and followers, namely, sheepdogs and sheep. By simulating the herding behavior of Border Collies, such as gathering, tracking and watching, it guides the optimization process to balance the search space and exploration and development. Compared with other advanced algorithms, this algorithm performs better in the optimization effect. Through the fast optimization characteristics of the Border Collie Optimization Algorithm, the complex and tedious process of adjusting parameters of the traditional PID controller can be solved, reducing the burden on technicians, and in the face of some complex nonlinear systems, the control accuracy and robustness can be increased through algorithm optimization. However, like many meta-heuristic algorithms, the Border Collie Optimization Algorithm's performance is highly dependent on the parameter settings and is unstable during the optimization process, and there is a situation of falling into local optimality. For these problems, the algorithm can be improved to achieve the desired control effect. Summary of the invention

[0005] To overcome the above-mentioned shortcomings, the present invention proposes a speed control optimization method for a sweeping robot. The method optimizes the PID controller of the speed control system of the sweeping robot by improving the standard Border Collie optimization algorithm. The improved algorithm significantly improves the accuracy and stability of the PID controller, thereby making the speed control faster and more accurately reach the target speed, thereby achieving the beneficial effect of the speed control of the sweeping robot.

[0006] In order to achieve the above-mentioned purpose, the present invention adopts a speed control optimization method for a sweeping robot, and the specific steps of the technical solution are as follows.

[0007] Step 1: Construct a speed control system for the sweeping robot. The control system includes a PID controller module, an improved border collie optimization algorithm module, a speed signal controller module, a brushless DC motor module, and an encoder speed measurement module.

[0008] Step 2: Improve the Border Collie optimization algorithm, including two improvement strategies:

[0009] D1: Use a dynamic acceleration adjustment strategy to improve the standard border collie optimization algorithm. In the optimization process, a dynamic adjustment factor α is introduced to adaptively adjust the size of α according to the fitness value of each iteration, thereby dynamically changing the size of the acceleration.

[0010] D2: Use a mobile strategy that integrates a winning pool to improve the mathematical model of the sheep flock's position update. In this algorithm, there are three types of sheepdogs, namely the leader dog, the left dog, and the right dog. These three sheepdogs are the individuals with the best positions in the entire population, so these three sheepdogs are regarded as the winners of the population, and their positions are used as the winning pool to guide the sheep flock's position update, so that the entire population can move closer to the optimal position area faster.

[0011] Step 3: Use the improved Border Collie optimization algorithm to optimize the three parameters Kp, Ki, and Kd of the PID controller of the sweeping robot speed control system to obtain the optimal PID parameter values.

[0012] Step 4: Apply the optimal PID parameter values ​​Kp, Ki, and Kd found in step 3 to the speed control system of the sweeping robot to optimize the control effect of the system.

[0013] More specifically, in the sweeping robot speed control system constructed in step one, the target speed is first input into the control system as an input signal. The encoder speed measurement module detects the speed of the motor that controls the speed of the sweeping robot, and the error e(t) is obtained by subtracting the actual speed detected from the target speed. The error e(t) is adjusted by the PID controller, and the adjusted speed signal u(t) is transmitted to the speed signal controller, thereby controlling the rotation of the motor.

[0014] More specifically, in the standard border collie optimization algorithm, the acceleration of the movement of the sheepdog and the flock is determined by the current speed and time. However, the fitness value of the objective function needs to be considered in the entire optimization process. Adjusting the acceleration only according to speed and time has poor adaptability. According to the improvement strategy mentioned in D1, a dynamic adjustment factor α is introduced. During the optimization process, the size of α can be dynamically adjusted according to the size of fitness. The size of the factor is used as a weight to affect the change of acceleration, thereby improving the stability of population update and the quality of the population. Through dynamic adjustment, the possibility of the algorithm falling into a local optimal solution can be reduced. The specific improvement formula is shown in formula (1):

[0015] (1);

[0016] In formula (1), iter represents the number of iterations. represents the acceleration of the i-th search agent in the population in the j-th dimension, represents the speed at which the i-th search agent in the population updates in the j-th dimension, represents the speed of the i-th search agent in the population in the j-th dimension, The calculation formula for the movement time of the i-th search agent in the population is shown in formula (2), and α(iter) represents the calculation formula of the dynamic adjustment factor as shown in formula (3);

[0017] (2);

[0018] In formula (2), iter represents the number of iterations, dim represents the size of the population dimension, and r ranges from 1 to dim. represents the acceleration of the i-th search agent in the population in the r-th dimension, represents the speed at which the i-th search agent in the population updates in the r-th dimension, represents the speed of the i-th search agent in the population in the r-th dimension, and the absolute value of the two speed differences in each dimension is accumulated and averaged;

[0019] (3);

[0020] In formula (3), iter represents the number of iterations, K is the decay constant with a value of 0.1, Represents the fitness value of the i-th search agent in the population, Indicates the current optimal fitness value.

[0021] More specifically, the search population in the border collie optimization algorithm is composed of sheepdogs and sheep. The three individuals with the best positions are the leader dog, the left dog, and the right dog. The search positions of these three dogs are used to guide the position update of other individuals in the population, which can better improve the overall quality of the population. Therefore, according to the use of a mobile strategy that integrates the winning pool mentioned in D2 to improve the mathematical model of sheep group position update, through the improvement of the mathematical model, the search population can approach the target value faster, and improve the convergence speed of the algorithm optimization process. The specific update formulas are shown in formulas (4) and (5);

[0022] (4);

[0023] (5);

[0024] In formula (4), iter represents the number of iterations. represents the position of the i-th search agent in the j-th dimension, represents the speed at which the i-th search agent in the population updates in the r-th dimension, The calculation formula for the movement time of the i-th search agent in the population is shown in formula (2). The acceleration calculation formula of the i-th search agent in the population in the r-th dimension is shown in formula (1). In formula (5), It represents the position difference between the current search agent's position in the jth dimension and the leader dog's position in the jth dimension. and It represents the difference between the position of the current search agent in the jth dimension and the positions of the right dog and the left dog in the jth dimension. If the algorithm falls into a local optimum during the search process, the gaze behavior will be executed. In the gaze behavior, the position update formula (4) will be used to update the population position. If the gaze behavior is not executed, the improved formula (5) of the fusion winning pool strategy will be used to update the position.

[0025] More specifically, the improved Border Collie optimization algorithm is used to optimize the three parameters of the PID controller Kp, Ki, and Kd of the speed control system of the sweeping robot to obtain the optimal PID parameter values. The specific steps are as follows:

[0026] S1, simulate the working process of the speed control system of the sweeping robot and construct the transfer function of the control simulation model;

[0027] S2, setting the input signal of the speed control system of the sweeping robot, and taking the set input signal as the target speed;

[0028] S3, initialize the parameters of the improved border collie optimization algorithm module, the population size is N, the problem dimension is dim, the upper limit of the search space is ub, the lower limit is lb, and the population position is initialized;

[0029] S4, encoding the three parameters Kp, Ki, and Kd of the PID controller of the speed control system of the sweeping robot and converting them into three dimensions of the position solution of the improved border collie optimization algorithm;

[0030] S5. Use ISE as the objective function of the improved shepherd optimization algorithm. The formula of the objective function is as follows:

[0031] ;

[0032] In the formula represents the fitness value required by the improved border collie optimization algorithm, e(t) represents the error of the speed control system of the sweeping robot at the current running time t, that is, the difference between the target speed and the actual speed collected by the encoder, and T is the total running time of the system;

[0033] S6. The population position is updated by improving the mathematical model of the border collie optimization algorithm, and the fitness value of the position solution obtained by the search is calculated through the objective function. According to the principle that the smaller the fitness value, the better, the optimal solution and the optimal fitness value under the current number of iterations are selected, and the optimal solution is converted into the three parameters Kp, Ki, and Kdz of the PID controller of the speed control system of the sweeping robot, and is transmitted to the control system for control optimization;

[0034] S7, loop and execute S6 to determine whether the current iteration number reaches the maximum iteration number. If so, exit the loop and use the output optimal solution as the optimal Kp, Ki, and Kd parameters of the PID controller.

[0035] More specifically, the transfer function of the control simulation model constructed in S1 mainly simulates the actual operating state of the speed control system of the sweeping robot. Considering the influence of various factors on the system in actual scenarios, a second-order nonlinear integral equation is designed and converted into the transfer function G(s) of the simulation model through Laplace transform. The formula is as follows:

[0036] ;

[0037] Where G(s) is the transfer function and s is the function variable.

[0038] More specifically, the specific steps of updating the position of the population using the mathematical model of the improved border collie optimization algorithm described in S6 are:

[0039] S61, calculating the fitness value of the initialized population positions, and sorting the top three individuals in terms of fitness value as the leader dog, the left dog, and the right dog respectively;

[0040] S62, dividing the flock of sheep into types by calculating the fitness value of the flock position. If the fitness value of the sheep at the current position minus the fitness value of the leader dog is greater than the fitness value of the sheep at the current position minus the average fitness value of the left dog and the right dog, then the sheep of this type are defined as the flock that needs to be gathered. Otherwise, the sheep of this type are defined as the flock that needs to be tracked. Different individuals in the flock have different update formulas in the optimization process, which can improve the randomness and adaptability of the algorithm and increase the balance of the global search.

[0041] S63, update the speeds of the three sheepdogs, the leader dog, the left dog and the right dog, and the update formula is shown in formula (6):

[0042] (6);

[0043] In formula (6), iter is the current iteration number, Indicates the speed of the current iteration shepherd, represents the acceleration of the population at the current iteration number, The position of the shepherd at the current iteration;

[0044] S64, setting a gaze mechanism. If the search process falls into a local optimum, the gaze mechanism will be executed. The speed update formula of the flock being watched is shown in formula (7). Both the flock being gathered and the flock being tracked use a unified update formula under the gaze mechanism:

[0045] (7);

[0046] In formula (7), iter is the current iteration number, represents the speed of the flock under the current iterative gaze mechanism, represents the acceleration of the population at the current iteration number, Indicates the position of the flock in the current iteration of the gaze mechanism;

[0047] If the watching mechanism is not implemented, the gathering flock and the tracking flock use different mathematical models to update the speed. The speed of the gathering flock is mainly guided by the position of the leader dog. The update formula is shown in formula (8):

[0048] (8);

[0049] In formula (8), iter is the current iteration number, Indicates the speed of the leader dog in the current iteration. represents the acceleration of the population at the current iteration number, Indicates the location of the flock gathered in the current iteration;

[0050] The speed of tracking the flock is mainly guided by the positions of the left and right dogs. The update formula is shown in formula (9):

[0051] (9);

[0052] In formula (9), iter is the current iteration number, represents the guidance speed generated by taking the right dog speed as a reference. The mathematical formula is shown in formula (10): represents the guidance speed generated by taking the left dog speed as a reference, and the mathematical formula is shown in formula (11);

[0053] (10);

[0054] (11);

[0055] In formula (10) and formula (11), iter is the current iteration number, Indicates the speed of the right dog in the current iteration, Indicates the speed of the left dog in the current iteration, Indicates the position of the left dog in the current iteration, Indicates the position of the right dog in the current iteration. represents the acceleration of the population at the current iteration number, Indicates the direction of movement of the right dog. Indicates the direction of movement of the left dog;

[0056] S65, update the position of the population, and use a mobile strategy of integrating the winning pool mentioned in D2 to update the position of the flock. The strategy is divided into two parts. If the current updating individual is a sheep in the watching behavior, use formula (4) to update the position. Otherwise, use formula (5) to update the position. The three sheepdogs update their positions using the position update formula (4).

[0057] S66. Update the acceleration of the population. Use a dynamic acceleration adjustment strategy mentioned in D1 to update the acceleration of the population. The update formula is shown in formula (1).

[0058] Compared with the prior art, the technical solution proposed in the present invention has the following advantages and beneficial effects: the present invention improves the acceleration mathematical model of the population in the standard algorithm by using a dynamic acceleration adjustment strategy, introduces a dynamic adjustment factor α into the formula, and the parameter is automatically adjusted by the size of the fitness value of each iteration, so that the acceleration of each update can be dynamically adjusted, and the adaptability of the algorithm in the optimization process can be improved. According to the adjustment of the fitness value, the quality and stability of the population update can be better guaranteed, thereby improving the optimization accuracy of the algorithm and being able to jump out of the local optimal solution faster. In the position update of the flock, a mobile strategy integrating the winning pool is used to improve the algorithm, and the three individuals with the best positions, namely the leader dog, the left dog and the right dog in the algorithm, are used to form a winning pool to guide the update of the flock position. The population can be searched through the improved strategy to approach the target value faster, and the optimization speed of the algorithm is improved. The PID controller of the speed control system of the sweeping robot is optimized by using the improved border collie optimization algorithm, and the stability and adaptability of the controller are improved. The system can be quickly adjusted under the influence of different factors, and has good robustness, reducing the workload and uncertainty of manual debugging, and improving the performance of the speed control system of the entire sweeping robot. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 The figure is a flow chart of a speed control optimization method for a sweeping robot.

[0060] Figure 2 This is the model diagram of the speed control system of the sweeping robot.

[0061] Figure 3 A comparison chart showing the effect of optimizing PID on the speed control of the sweeping robot by the improved Border Collie optimization algorithm and the standard Border Collie optimization algorithm.

[0062] Figure 4 Comparison of fitness values ​​during tuning of the improved Border Collie optimization algorithm and the standard Border Collie optimization algorithm.

[0063] Figure 5 A comparison chart of the change in parameter value Kp during the tuning process of the improved Border Collie optimization algorithm and the standard Border Collie optimization algorithm.

[0064] Figure 6 A comparison chart of the changes in parameter value Ki during the tuning process of the improved Border Collie optimization algorithm and the standard Border Collie optimization algorithm.

[0065] Figure 7 A comparison chart of the change in parameter value Kd during the tuning process of the improved Border Collie optimization algorithm and the standard Border Collie optimization algorithm. Specific implementation methods

[0066] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0067] See also Figure 1-Figure 7 The present invention provides a technical solution: a speed control optimization method for a sweeping robot, the specific steps are as follows Figure 1 shown.

[0068] Step 1: Use MATLAB and Simulink to build a simulation model of the speed control system of the sweeping robot. The modules of the control system are as follows: Figure 2 As shown, it includes a PID control module, an improved border collie optimization algorithm module, a speed signal controller module, a DC brushless motor module, and an encoder speed measurement module.

[0069] Furthermore, the operation process of the speed control system of the sweeping robot is to first input the target speed as an input signal into the control system. The encoder speed measurement module will detect the speed of the motor that controls the speed of the sweeping robot, and subtract the actual speed detected from the target speed to obtain the error e(t). The error e(t) is adjusted by the PID controller, and the adjusted speed signal u(t) is transmitted to the speed signal controller to control the rotation of the motor.

[0070] Step 2: Improve the Border Collie optimization algorithm, including two improvement strategies:

[0071] D1: Use a dynamic acceleration adjustment strategy to improve the standard border collie optimization algorithm. In the optimization process, a dynamic adjustment factor α is introduced to adaptively adjust the size according to the fitness value of each iteration, thereby dynamically changing the acceleration size.

[0072] D2: Use a mobile strategy that integrates a winning pool to improve the mathematical model of the sheep flock's position update. In this algorithm, there are three types of sheepdogs, namely the leader dog, the left dog, and the right dog. These three sheepdogs are the individuals with the best positions in the entire population, so these three sheepdogs are regarded as the winners of the population, and their positions are used as the winning pool to guide the sheep flock's position update, so that the entire population can move closer to the optimal position area faster.

[0073] Furthermore, in the standard border collie optimization algorithm, the acceleration of the movement of the sheepdog and the flock is determined by the current speed and time. However, the fitness value of the objective function needs to be considered in the entire optimization process. Adjusting the acceleration only according to speed and time has poor adaptability. According to the improvement strategy mentioned in D1, a dynamic adjustment factor α is introduced. During the optimization process, the size of α can be dynamically adjusted according to the size of fitness. The size of the factor is used as a weight to affect the change of acceleration, thereby improving the stability of population update and the quality of the population. Through dynamic adjustment, the possibility of the algorithm falling into a local optimal solution can be reduced. The specific improvement formula is shown in formula (1):

[0074] (1);

[0075] In formula (1), iter represents the number of iterations. represents the acceleration of the i-th search agent in the population in the j-th dimension, represents the speed at which the i-th search agent in the population updates in the j-th dimension, represents the speed of the i-th search agent in the population in the j-th dimension, The calculation formula for the movement time of the i-th search agent in the population is shown in formula (2), and α(iter) represents the calculation formula of the dynamic adjustment factor as shown in formula (3);

[0076] (2);

[0077] In formula (2), iter represents the number of iterations, dim represents the size of the population dimension, and r ranges from 1 to dim. represents the acceleration of the i-th search agent in the population in the r-th dimension, represents the speed at which the i-th search agent in the population updates in the r-th dimension, represents the speed of the i-th search agent in the population in the r-th dimension, and the absolute value of the two speed differences in each dimension is accumulated and averaged;

[0078] (3);

[0079] In formula (3), iter represents the number of iterations, K is the decay constant with a value of 0.1, Represents the fitness value of the i-th search agent in the population, Indicates the current optimal fitness value.

[0080] Furthermore, the search population in the border collie optimization algorithm is composed of sheepdogs and sheep. The three individuals with the best positions are the leader dog, the left dog, and the right dog. The search positions of these three dogs are used to guide the position update of other individuals in the population, which can better improve the overall quality of the population. Therefore, according to the use of a mobile strategy that integrates the winning pool mentioned in D2 to improve the mathematical model of sheep group position update, through the improvement of the mathematical model, the search population can approach the target value faster, and improve the convergence speed of the algorithm optimization process. The specific update formulas are shown in formulas (4) and (5);

[0081] (4);

[0082] (5);

[0083] In formula (4), iter represents the number of iterations. represents the position of the i-th search agent in the j-th dimension, represents the speed at which the i-th search agent in the population updates in the r-th dimension, The calculation formula for the movement time of the i-th search agent in the population is shown in formula (2). The acceleration calculation formula of the i-th search agent in the population in the r-th dimension is shown in formula (1). In formula (5), It represents the position difference between the current search agent's position in the jth dimension and the leader dog's position in the jth dimension. and It represents the difference between the position of the current search agent in the jth dimension and the positions of the right dog and the left dog in the jth dimension. If the algorithm falls into a local optimum during the search process, the gaze behavior will be executed. In the gaze behavior, the position update formula (4) will be used to update the population position. If the gaze behavior is not executed, the improved formula (5) of the fusion winning pool strategy will be used to update the position.

[0084] Step 3: Use the improved Border Collie optimization algorithm to optimize the three parameters Kp, Ki, and Kd of the PID controller of the sweeping robot speed control system to obtain the optimal PID parameter values.

[0085] Furthermore, the specific steps of optimizing the parameters of the PID controller using the improved Border Collie optimization algorithm are as follows:

[0086] S1, simulate the working process of the speed control system of the sweeping robot, and build the transfer function of the control simulation model through Simulink;

[0087] S2, setting the input signal of the speed control system of the sweeping robot, and taking the set input signal as the target speed;

[0088] S3, initialize the parameters of the improved border collie optimization algorithm module, the population size is N, the problem dimension is dim, the upper limit of the search space is ub, the lower limit is lb, and the population position is initialized;

[0089] S4, encoding the three parameters Kp, Ki, and Kd of the PID controller of the speed control system of the sweeping robot and converting them into three dimensions of the position solution of the improved border collie optimization algorithm;

[0090] S5. Use ISE as the objective function of the improved shepherd optimization algorithm. The formula of the objective function is as follows:

[0091] ;

[0092] In the formula represents the fitness value required by the improved border collie optimization algorithm, e(t) represents the error of the speed control system of the sweeping robot at the current running time t, that is, the difference between the target speed and the actual speed collected by the encoder, and T is the total running time of the system;

[0093] S6. The population position is updated by improving the mathematical model of the border collie optimization algorithm, and the fitness value of the position solution obtained by the search is calculated through the objective function. According to the principle that the smaller the fitness value, the better, the optimal solution and the optimal fitness value under the current number of iterations are selected, and the optimal solution is converted into the three parameters Kp, Ki, and Kdz of the PID controller of the speed control system of the sweeping robot, and is transmitted to the control system for control optimization;

[0094] S7, loop and execute S6 to determine whether the current iteration number reaches the maximum iteration number. If so, exit the loop and use the output optimal solution as the optimal Kp, Ki, and Kd parameters of the PID controller.

[0095] Furthermore, the transfer function of the control simulation model constructed in S1 mainly simulates the actual operating state of the speed control system of the sweeping robot. Considering the influence of various factors on the system in actual scenarios, a second-order nonlinear integral equation is designed and converted into the transfer function G(s) of the simulation model through Laplace transform. The formula is as follows:

[0096] ;

[0097] Where G(s) is the transfer function and s is the function variable.

[0098] Furthermore, the specific steps of updating the position of the population using the mathematical model of the improved border collie optimization algorithm described in S6 are:

[0099] S61, calculating the fitness value of the initialized population positions, and sorting the top three individuals in terms of fitness value as the leader dog, the left dog, and the right dog respectively;

[0100] S62, dividing the flock of sheep into types by calculating the fitness value of the flock position. If the fitness value of the sheep at the current position minus the fitness value of the leader dog is greater than the fitness value of the sheep at the current position minus the average fitness value of the left dog and the right dog, then the sheep of this type are defined as the flock that needs to be gathered. Otherwise, the sheep of this type are defined as the flock that needs to be tracked. Different individuals in the flock have different update formulas in the optimization process, which can improve the randomness and adaptability of the algorithm and increase the balance of the global search.

[0101] S63, update the speeds of the three sheepdogs, the leader dog, the left dog and the right dog, and the update formula is shown in formula (6):

[0102] (6);

[0103] In formula (6), iter is the current iteration number, Indicates the speed of the current iteration shepherd, represents the acceleration of the population at the current iteration number, The position of the shepherd at the current iteration;

[0104] S64, setting a gaze mechanism. If the search process falls into a local optimum, the gaze mechanism will be executed. The speed update formula of the flock being watched is shown in formula (7). Both the flock being gathered and the flock being tracked use a unified update formula under the gaze mechanism:

[0105] (7);

[0106] In formula (7), iter is the current iteration number, represents the speed of the flock under the current iterative gaze mechanism, represents the acceleration of the population at the current iteration number, Indicates the position of the flock in the current iteration of the gaze mechanism;

[0107] If the watching mechanism is not implemented, the gathering flock and the tracking flock use different mathematical models to update the speed. The speed of the gathering flock is mainly guided by the position of the leader dog. The update formula is shown in formula (8):

[0108] (8);

[0109] In formula (8), iter is the current iteration number, Indicates the speed of the leader dog in the current iteration. represents the acceleration of the population at the current iteration number, Indicates the location of the flock gathered in the current iteration;

[0110] The speed of tracking the flock is mainly guided by the positions of the left and right dogs. The update formula is shown in formula (9):

[0111] (9);

[0112] In formula (9), iter is the current iteration number, represents the guidance speed generated by taking the right dog speed as a reference. The mathematical formula is shown in formula (10): represents the guidance speed generated by taking the left dog speed as a reference, and the mathematical formula is shown in formula (11);

[0113] (10);

[0114] (11);

[0115] In formula (10) and formula (11), iter is the current iteration number, Indicates the speed of the right dog in the current iteration, Indicates the speed of the left dog in the current iteration, Indicates the position of the left dog in the current iteration, Indicates the position of the right dog in the current iteration. represents the acceleration of the population at the current iteration number, Indicates the direction of movement of the right dog. Indicates the direction of movement of the left dog;

[0116] S65, update the position of the population, and use a mobile strategy of integrating the winning pool mentioned in D2 to update the position of the flock. The strategy is divided into two parts. If the current updating individual is a sheep in the watching behavior, use formula (4) to update the position. Otherwise, use formula (5) to update the position. The three sheepdogs update their positions using the position update formula (4).

[0117] S66. Update the acceleration of the population. Use a dynamic acceleration adjustment strategy mentioned in D1 to update the acceleration of the population. The update formula is shown in formula (1).

[0118] Step 4: Apply the optimal PID parameter values ​​Kp, Ki, and Kd found in step 3 to the speed control system of the sweeping robot built using Simulink. By adjusting the three PID parameters, the error e(t) between the target speed and the actual speed is reduced, thereby optimizing the control effect of the speed control system of the sweeping robot.

[0119] In order to verify that the speed control optimization method for a sweeping robot proposed in the present invention has better performance than other methods, the present invention is specifically implemented by using Matlab mathematical modeling software and Siimulink simulation to compare the improved Border Collie optimization algorithm for optimizing PID control and the standard Border Collie optimization algorithm for optimizing PID control. In the speed control system of the sweeping robot, the control performance of the PID controller determines the control accuracy and speed of the system, while the performance of the optimization algorithm determines the overshoot size, corresponding speed and dynamic error of the PID controller.

[0120] To verify that the performance of the improved Border Collie optimization algorithm is better than that of the basic Border Collie optimization algorithm, in the test code, the population size N of the improved Border Collie optimization algorithm is set to 100, the problem dimension dim is 3, and the maximum number of iterations Max_Iter is 50, and the simulation system is run. Figure 3 A comparison chart of the effects of the improved Border Collie optimization algorithm and the standard Border Collie optimization algorithm on the speed control of the sweeping robot is shown. In the figure, BCO is the standard Border Collie optimization algorithm, IBCO is the improved Border Collie optimization algorithm, and the target value is 1 unit value. Compared with ordinary PID control, both the standard algorithm and the improved algorithm effectively optimize the control effect, but the overshoot of the PID control of the improved algorithm is lower, the control effect is more stable, and the stable state of the target value is reached in about 1s. In short, the improved Border Collie optimization algorithm can better optimize the PID controller.

[0121] Figure 4 A comparison chart of the fitness values ​​during the tuning process of the improved Border Collie optimization algorithm and the standard Border Collie optimization algorithm is shown. The lower the fitness value of the system, the better the searched solution. It can be seen from the figure that the improved Border Collie optimization algorithm can quickly reach the vicinity of the optimal fitness value, and can quickly jump out when trapped in a local optimal solution, and continue to search for a better solution. The feature of rapid optimization can improve the response speed of the speed control system of the sweeping robot, thereby reducing the impact of errors on the system during the adjustment process.

[0122] Figure 5 , Figure 6 , Figure 7 These are comparison diagrams of the changes in parameter values ​​Kp, Ki, and Kd during the tuning process of the improved Border Collie optimization algorithm and the standard Border Collie optimization algorithm. The changes in the three values ​​of Kp, Ki, and Kd searched by the improved Border Collie optimization algorithm are smaller than those of the standard Border Collie optimization algorithm, which also reflects the advantage of the improved algorithm in optimization speed. After quickly searching for better parameter values, only appropriate adjustments are needed to achieve the optimal effect, thereby improving the control stability of the system.

Claims

1. A speed control optimization method for a sweeping robot, characterized in that: The specific steps are: S1. Build a speed control system for the sweeping robot; S2. Improve the Border Collie optimization algorithm, including two improvements: D1: A dynamic acceleration adjustment strategy is used to improve the acceleration of the position movement of the sheepdog and the sheep during the optimization process of the standard border collie optimization algorithm. A dynamic adjustment factor α is introduced to adaptively adjust the size according to the fitness value of each iteration, thereby dynamically changing the size of the acceleration; The specific improved formula is shown in formula (1): In formula (1), iter represents the number of iterations, acc i,i (iter) represents the acceleration of the i-th search agent in the population in the j-th dimension, represents the update speed of the i-th search agent in the population in the j-th dimension, V i,j (iter) represents the speed of the i-th search agent in the population in the j-th dimension, Time i (iter) represents the calculation formula of the movement time of the i-th search agent in the population, as shown in formula (2), α(iter) represents the calculation formula of the dynamic adjustment factor, as shown in formula (3); In formula (2), iter represents the number of iterations, dim represents the size of the population dimension, and r ranges from 1 to dim. represents the acceleration of the i-th search agent in the population in the r-th dimension, represents the update speed of the i-th search agent in the population in the r-th dimension, V i,r (iter) represents the speed of the i-th search agent in the population in the r-th dimension, and the absolute value of the difference between the two speeds in each dimension is accumulated and averaged; In formula (3), iter represents the number of iterations, K is the decay constant with a value of 0.1, and f i (iter) represents the fitness value of the i-th search agent in the population, f best Indicates the current optimal fitness value; D2: A moving strategy integrating the winning pool is used to improve the mathematical model of the sheep flock position update. In the border collie optimization algorithm, there are three types of sheepdogs, namely the leader dog, the left dog and the right dog. These three sheepdogs are the individuals with the best positions in the entire population, so these three sheepdogs are regarded as the winners of the population, and their positions are used as the winning pool to guide the sheep flock position update; the specific improvement formula is shown in formula (4): In formula (4), iter represents the number of iterations, Pop i,j (iter) represents the position of the i-th search agent in the j-th dimension, represents the update speed of the i-th search agent in the population in the r-th dimension, Time i (iter) represents the calculation formula of the movement time of the i-th search agent in the population, as shown in formula (2), The acceleration calculation formula of the i-th search agent in the population in the r-th dimension is shown in formula (1). In formula (5), X leader,j (iter) represents the position difference between the current search agent in the jth dimension and the leader dog in the jth dimension. Similarly, X right,j (iter) and X left,j (iter) represents the difference between the position of the current search agent in the jth dimension and the position of the right dog and the left dog in the jth dimension. If the algorithm falls into a local optimum during the search process, the gaze behavior will be executed. In the gaze behavior, the position update formula (4) will be used to update the population position. If the gaze behavior is not executed, the improved formula (5) by fusion of the winning pool strategy will be used to update the position. S3, using the improved border collie optimization algorithm to optimize the three parameters Kp, Ki, and Kd of the PID controller of the speed control system of the sweeping robot to obtain the optimal PID parameter values; S4. Apply the searched optimal PID parameters Kp, Ki, and Kd to the speed control system of the sweeping robot to optimize the control effect of the system.

2. The speed control optimization method for a sweeping robot according to claim 1, characterized in that: In S1, the speed control system of the sweeping robot includes a PID control module, an improved border collie optimization algorithm module, a speed signal controller module, a DC brushless motor module, and an encoder speed measurement module. First, the target speed is input into the speed control system as an input signal. The encoder speed measurement module detects the speed of the motor that controls the speed of the sweeping robot, and the error e(t) is obtained by subtracting the actual speed detected from the target speed. The error e(t) is adjusted by the PID controller, and the adjusted speed signal u(t) is transmitted to the speed signal controller, thereby controlling the rotation of the motor.

3. A speed control optimization method for a sweeping robot according to claim 2, characterized in that: In S3, the three parameters Kp, Ki, and Kd of the PID controller of the speed control system of the sweeping robot are optimized using the improved border collie optimization algorithm. The specific steps are as follows: S31. Simulate the working process of the speed control system of the sweeping robot and construct the transfer function of the control simulation model. The main purpose is to simulate the actual operating state of the speed control system of the sweeping robot. Considering the influence of various factors on the system in actual scenarios, a second-order nonlinear integral equation is designed and converted into the transfer function G(s) of the simulation model through Laplace transform. The formula is as follows: Where G(s) is the transfer function and s is the function variable; S32, setting an input signal of a speed control system of the sweeping robot, and using the set input signal as a target speed; S33, initialize the parameters of the improved border collie optimization algorithm module, the population size is N, the problem dimension is dim, the upper limit of the search space is ub, the lower limit is lb, and the population position is initialized; S34, encoding the three parameters Kp, Ki, and Kd of the PID controller of the speed control system of the sweeping robot and converting them into three dimensions of the position solution of the improved border collie optimization algorithm; S35. Use ISE as the objective function of the improved shepherd optimization algorithm. The formula of the objective function is as follows: Where J ISE represents the fitness value required by the improved border collie optimization algorithm, e(t) represents the error of the speed control system of the sweeping robot at the current running time t, that is, the difference between the target speed and the actual speed collected by the encoder, and T is the total running time of the system; S36, updating the population position by improving the mathematical model of the border collie optimization algorithm, and calculating the fitness value of the position solution obtained by the optimization through the objective function, selecting the optimal solution and the optimal fitness value under the current number of iterations according to the principle that the smaller the fitness value, the better, converting the optimal solution into three parameters Kp, Ki, and Kdz of the PID controller of the speed control system of the sweeping robot, and transmitting them to the control system for control optimization; S37, loop and execute S36 to determine whether the current iteration number reaches the maximum iteration number. If so, exit the loop and use the output optimal solution as the optimal Kp, Ki, and Kd parameters of the PID controller.

4. A speed control optimization method for a sweeping robot according to claim 3, characterized in that: The specific steps of using the mathematical model of the improved border collie optimization algorithm to update the position of the population described in S36 are as follows: step 1, calculating the fitness value of the initialized population position, and sorting the top three individuals in terms of fitness value as the leader dog, the left dog and the right dog respectively; Step 2: Divide the flock into different types by calculating the fitness value of the flock position. If the fitness value of the sheep at the current position minus the fitness value of the leader dog is greater than the fitness value of the sheep at the current position minus the average fitness value of the left dog and the right dog, then the sheep of this type are defined as the flock that needs to be gathered. Otherwise, the sheep of this type are defined as the flock that needs to be tracked. Different individuals in the flock have different update formulas in the optimization process. Step 3: Update the speed of the three sheepdogs: the leader dog, the left dog, and the right dog. The update formula is shown in formula (6): In formula (6), iter is the current iteration number, V d (iter) represents the speed of the sheepdog in the current iteration, acc(iter) represents the acceleration of the population in the current iteration, Pop d (iter) indicates the position of the shepherd at the current iteration; Step 4: Set up the gaze mechanism. If the search process falls into a local optimal situation, the gaze mechanism will be executed. The speed update formula of the flock being watched is shown in formula (7). Both the flock being gathered and the flock being tracked use a unified update formula under the gaze mechanism: In formula (7), iter is the current iteration number, V se (iter) represents the speed of the flock under the current iteration of the gazing mechanism, acc(iter) represents the acceleration of the flock at the current iteration, Pop se (iter) indicates the position of the flock in the current iteration of the gaze mechanism; If the watching mechanism is not implemented, the gathering flock and the tracking flock use different mathematical models to update the speed. The speed of the gathering flock is mainly guided by the position of the leader dog. The update formula is shown in formula (8): In formula (8), iter is the current iteration number, V leader (iter) indicates the speed of the leader dog in the current iteration, acc(iter) indicates the acceleration of the population in the current iteration, Pop sg (iter) indicates the location of the current iteration of the flock; The speed of tracking the flock is mainly guided by the positions of the left dog and the right dog. The update formula is shown in formula (9): In formula (9), iter is the current iteration number, V sr represents the guide speed generated by taking the right dog speed as a reference. The mathematical formula is shown in formula (10), V sl represents the guidance speed generated by taking the left dog speed as a reference, and the mathematical formula is shown in formula (11); In formula (10) and formula (11), iter is the current iteration number, V right (iter) represents the speed of the right dog in the current iteration, V left (iter) indicates the speed of the left dog in the current iteration, Pop left (iter) indicates the position of the left dog in the current iteration, Pop right (iter) represents the position of the right dog at the current iteration, acc(iter) represents the acceleration of the population at the current iteration, θ1 represents the direction of movement of the right dog, and θ2 represents the direction of movement of the left dog; Step 5: Update the position of the population. Use a mobile strategy that integrates the winning pool mentioned in D2 to update the position of the flock. This strategy is divided into two parts. If the current updated individual is a sheep in the gaze behavior, use formula (4) to update the position. Otherwise, use formula (5) to update the position. The three sheepdogs update their positions using the position update formula (4). Step 6: Update the acceleration of the population. Use a dynamic acceleration adjustment strategy mentioned in D1 to update the acceleration of the population. The update formula is shown in formula (1).

Citation Information

Patent Citations

  • Slope stability evaluation method based on DDPG-PSO-BP algorithm

    CN117332693A

  • Stability control method and device based on particle active disturbance rejection

    US20230213948A1