Unmanned aerial vehicle sliding mode controller design method based on improved whale algorithm
By combining the improved whale optimization algorithm and the new reaching law, the oscillation problem in the sliding mode control system is solved, the optimal parameters of the UAV sliding mode controller are designed, the control effect and stability are improved, and the control cost is reduced.
Patent Information
- Application Number
- CN202310456555.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-25
- Publication Date
- 2024-10-29
AI Technical Summary
There is an oscillation phenomenon in the existing sliding mode control system, which makes it difficult to effectively suppress the jitter of the UAV sliding mode controller on the sliding mode surface, affecting the control effect.
The improved whale optimization algorithm is used to design a new sliding mode control reaching law, the initial population is constructed through reverse learning, a random strategy is introduced to improve the convergence factor, a new reaching law is designed based on the Lyapunov function, and the parameters are modified using the improved whale optimization algorithm. Tuning to find the optimal parameters of the sliding mode controller.
It effectively reduces the oscillation of the UAV sliding mode controller on the sliding mode surface, improves the stability and reliability of the control system, and reduces the control cost.
Smart Images

Figure SMS_4 
Figure SMS_5 
Figure SMS_6
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of unmanned aerial vehicle system control, and in particular relates to a design method of a sliding mode controller for an unmanned aerial vehicle based on an improved whale algorithm. Background Art
[0002] In recent years, unmanned aerial technology has made rapid progress and has been widely used in military and civilian fields. UAVs can also fly quickly and stably on harsh terrain, and are most suitable for reconnaissance, search, and rescue. However, small UAVs have limited flight distance and mission execution time because they carry limited energy. Therefore, considering UAV swarm operations is a hot issue at present. Sliding mode control is a nonlinear control strategy. When the system state reaches the sliding mode and runs the sliding mode, the system is not affected by the change of the controlled object variable or external interference, and the sliding mode system has strong rigidity. But in fact, there is jitter in the sliding mode control system, which needs to be suppressed. This direction is also the most important research field of sliding mode control.
[0003] In sliding mode control, the reaching law is a very important condition. The reaching law of sliding mode control directly stipulates the dynamic performance of the system switching function in the reaching stage. In practical application, it will also affect the performance of the switching function in the sliding stage, and then affect the system state; therefore, the requirements of the control task for the sliding mode controller can be met by reasonably designing the reaching law. However, the improved reaching law has many parameters and complex formulas, which makes it difficult to set the parameters. Therefore, a swarm intelligence algorithm is used to optimize the parameters. The whale optimization algorithm (WOA) is a new meta-heuristic algorithm that simulates the spiral feeding mode of humpback whales to find prey. The process of humpback whales hunting prey is divided into encircling prey (i.e. narrowing the search space), bubble net attack (i.e. spiral updating position) and searching for prey (i.e. searching for targets). Although WOA has the advantages of few parameters, simple structure, and fast convergence speed, it is easy to fall into the local optimal solution and has low convergence accuracy. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a design method for a UAV sliding mode controller based on an improved whale algorithm, which can overcome the shortcomings of the prior art, construct an improved whale optimization algorithm, design a new sliding mode control reaching law, establish a UAV motion model, and obtain the optimal parameters of the UAV sliding mode control to reduce the oscillation of the sliding mode controller on the sliding surface.
[0005] The objective of the present invention is achieved through the following technical solutions:
[0006] The present invention proposes a design method of a UAV sliding mode controller based on an improved whale algorithm, comprising the following steps:
[0007] S1: Build and improve the whale optimization algorithm;
[0008] S2: Establish UAV motion model;
[0009] S3: Design a new reaching law for sliding mode controller;
[0010] S4: Use the improved whale optimization algorithm to adjust the parameters of the new reaching law of the modular controller;
[0011] S5: Obtain the optimal sliding mode control input.
[0012] Furthermore, in the process of constructing the improved whale optimization algorithm in S1, the following three steps are used to improve the whale optimization algorithm:
[0013] The initial population of whales is constructed through reverse learning. The detailed steps are as follows:
[0014] Get a random initial solution, that is, the initial whale population, and select the first N whale individuals with better fitness to form the population X * ; Obtain X through reverse learning * The corresponding inverse solution Comparison of whale populations X * With reverse whale populations The fitness of the individuals in , N of them are selected as the initial population of whales.
[0015] The convergence factor a is improved and a random strategy is introduced. The convergence factor is no longer linearly related to the number of iterations. Instead, the value of the convergence factor a is randomly selected, and its deviation is controlled by variance, so that the algorithm can jump out of the local optimum. The formula is as follows:
[0016] a=Rand(a max -a min )+Rand(σN)
[0017] Among them, a max and a min represents the maximum and minimum values of the convergence factor a, N is a normal distribution with a mean of 0 and a variance of 1, and σ is the variance of the convergence factor a.
[0018] The formula for the local jitter of the optimal individual in the neighborhood is:
[0019]
[0020] For the new individual generated, if it is better than the current individual, it will be replaced; otherwise, the original best individual will be retained.
[0021] Furthermore, in S2, a UAV motion state model is established:
[0022] Consider a formation of a pilot UAV and several follower UAVs, where the pilot UAV is denoted as L and the follower UAV is denoted as i. The motion state description equation of the follower UAV is
[0023]
[0024]
[0025] In the formula, x i ——The position of the drone in the x direction, y i ——The position of the drone in the y direction, vi x ——The speed of the drone in the x direction, v iy ——The speed of the drone in the y direction, u ix ——Control input of the drone in the x direction, u iy ——Control input of the drone in the y direction.
[0026] Furthermore, in S3, a new reaching law of the sliding mode controller is designed. The sliding mode controller of the UAV is designed by considering the position error, and a new reaching law of the sliding mode control is designed:
[0027] The new approach rate design is as follows:
[0028]
[0029] Furthermore, the specific steps of using the improved whale optimization algorithm to perform parameter tuning on the new reaching law of the modular controller in S4 are as follows:
[0030] Assign values to the whale population. Assign values to the whale population. The designed sliding mode controller is affected by 5 parameters, the initial population is 50, the maximum number of iterations is set to 50, and the five-dimensional space is set. The position of the i-th whale is P i ={p i1 ,p i2 ,p i3 ,p i4 ,p i5 ,}; The system error of the sliding mode controller, that is, the error between the UAV and the desired position, is used as the fitness function of the whale optimization algorithm; the whale individual with the best fitness is found through iteration, and the solution is the optimal parameters of the new reaching law.
[0031] The beneficial effect of the present invention is that the present invention considers the UAV motion model and sliding mode control and proposes a UAV sliding mode controller design method based on the improved whale algorithm. The key of the present invention is to improve the whale optimization algorithm, design a new convergence law, and find the optimal parameters of the designed sliding mode controller to reduce the oscillation after reaching the sliding surface. The economic aspect is reflected by the UAV control cost, and the reliability is reflected by the sliding surface oscillation effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to make the purpose, technical solution and beneficial effects of the present invention clearer, the present invention provides the following drawings for illustration:
[0033] Figure 1 It is the overall flow chart;
[0034] Figure 2 It is the UAV motion state model; DETAILED DESCRIPTION
[0035] The preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0036] The present invention uses the improved whale optimization algorithm to adjust the parameters of the new reaching law to obtain the optimal parameters of the UAV sliding mode controller. Figure 1 As shown in FIG. 1 , the design method of the UAV sliding mode controller based on the improved whale algorithm specifically includes:
[0037] Step 1: Improve the whale optimization algorithm;
[0038] The initial population of whales is constructed through reverse learning. The detailed steps are as follows:
[0039] Get a random initial solution, that is, the initial whale population, and select the first N whale individuals with better fitness to form the population X * ; Obtain X through reverse learning * The corresponding inverse solution Comparison of whale populations X * With reverse whale populations The fitness of the individuals in , N of them are selected as the initial population of whales.
[0040] The convergence factor a is improved and a random strategy is introduced. The convergence factor is no longer linearly related to the number of iterations. Instead, the value of the convergence factor a is randomly selected, and its deviation is controlled by variance, so that the algorithm can jump out of the local optimum. The formula is as follows:
[0041] a=Rand(a max -a min )+Rand(σN)
[0042] Among them, a max and a min represents the maximum and minimum values of the convergence factor a, N is a normal distribution with a mean of 0 and a variance of 1, and σ is the variance of the convergence factor a.
[0043] The formula for the local jitter of the optimal individual in the neighborhood is:
[0044]
[0045] For the new individual generated, if it is better than the current individual, it will be replaced; otherwise, the original best individual will be retained.
[0046] According to the whale optimization algorithm, the convergence speed will vary due to the difference in the initial solution. When an individual is born near the optimal value, all individuals in the whale population will converge quickly. Therefore, considering the reverse individual of each individual, the probability that the individual and the reverse individual are closer to the optimal individual is 50%. The fitness is evaluated, and the individual with better fitness is used as the initial individual, which means that each individual is one step closer to the optimal solution. The optimization ability of the traditional whale optimization algorithm is closely related to the coefficient A and the convergence factor a. The coefficient A and the convergence factor a show a linear decreasing relationship, so the number of iterations has a greater impact. Therefore, the convergence factor a is improved, and a random strategy is introduced. By randomly selecting the value of the convergence factor and controlling its deviation degree with the variance, the algorithm jumps out of the local optimum. Similarly, a small-scale random search is performed near the optimal individual to find an individual with a higher fitness value, which not only helps to speed up the global convergence of the algorithm, but also prevents the algorithm from falling into the local optimum too early.
[0047] Step 2: Construct the UAV motion state model;
[0048] To achieve multi-UAV formation movement, each follower UAV is expected to maintain a certain distance and angle with the pilot UAV and move at the same speed and control input as the pilot UAV. Set the follower UAV to receive the status information of the pilot UAV, such as Figure 2 As shown, the expected position of the following drone is:
[0049]
[0050] in:
[0051]
[0052]
[0053] In the formula, x id ——The desired x and y coordinates of the following drone in the global coordinate system id ——the desired y coordinate of the following drone in the global coordinate system, ——The x coordinate of the follower drone in the coordinate system centered on the pilot drone, ——The y coordinate of the follower drone in the coordinate system centered on the pilot drone, d li ——The expected distance between the following UAV and the leading UAV in the formation, θ li ——The desired angle between the follower drone and the lead drone in the formation.
[0054] Step 3: Design a new reaching law for the sliding mode controller;
[0055] The UAV sliding mode controller is designed by considering the position error. The UAV sliding mode controller is designed as follows:
[0056] e x =xx d
[0057] e y =yy d
[0058]
[0059]
[0060] At this time, the equivalent control rate U in the x direction ixeq Equivalent control rate U in the y direction iyeq :
[0061]
[0062]
[0063] The system control rate can be obtained:
[0064]
[0065]
[0066] In order to overcome the defect that the traditional approach rate has large oscillation after reaching the sliding surface, a new approach rate is proposed. The new approach rate is designed as follows:
[0067]
[0068] Compared with the traditional exponential reaching law, the reaching law proposed in this paper is not like the constant speed term in the exponential reaching law which is a fixed constant. When the system state is far away from the sliding surface, the reaching rate exponential term and the constant speed term proposed in this paper act at the same time. At this time, the speed of the system is large and the system converges quickly. When the system state is close to the sliding surface, that is, when s→0, the constant speed term acts. At this time, the system will move on the sliding surface at a weak decaying speed, effectively reducing the chattering.
[0069] By constructing the Lyapunov function:
[0070]
[0071] Derivative the above formula:
[0072]
[0073] Where k1, k2>0, are constants between 0 and 1. When k1, k2>0, k1sgn(s)>0, k2|s| 1-γ sgn(s)>0, the new reaching law designed in this paper satisfies the Lypunov principle, that is, The system can converge within a finite time. Therefore, the new convergence law designed by the present invention satisfies the Lyapunov principle, that is, The system can converge in a finite time.
[0074] Step 4: Use the improved whale optimization algorithm to adjust the parameters of the new reaching law of the model controller;
[0075] The designed sliding mode controller is subject to k1, k2, In order to avoid repeated experiments, the improved whale optimization algorithm is used to optimize the parameters to obtain the best controller. The optimization steps are as follows:
[0076] Assign values to the whale population. Assign values to the whale population. The designed sliding mode controller is affected by 5 parameters, the initial population is 50, the maximum number of iterations is set to 50, and the five-dimensional space is set. The position of the i-th whale is P i ={p i1 ,p i2 ,p i3 ,p i4 ,p i5 ,}; The system error of the sliding mode controller, that is, the error between the UAV and the desired position, is used as the fitness function of the whale optimization algorithm; the whale individual with the best fitness is found through iteration, and the solution is the optimal parameters of the new reaching law.
[0077] Step 5: Obtain the optimal sliding mode control input based on the parameters.
[0078] The innovation of the present invention lies in the design of a sliding mode controller design modeling method for a UAV system based on an improved whale optimization algorithm. Combined with the UAV motion state, the deficiencies of the traditional whale optimization algorithm and the deficiencies of the traditional reaching law are improved, and the improved whale optimization algorithm is used to adjust the parameters of the new reaching law to obtain the optimal input of the UAV sliding mode controller.
[0079] Finally, it should be noted that the above preferred embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail through the above preferred embodiments, those skilled in the art should understand that various changes can be made in form and details without departing from the scope defined by the claims of the present invention.
Claims
1. A design method for a UAV sliding mode controller based on an improved whale algorithm, characterized in that: The method comprises the following steps: S1: Build and improve the whale optimization algorithm; S2: Establish UAV motion model; S3: Design a new reaching law for sliding mode controller; S4: Parameter tuning of the new reaching law of modular control using the improved whale optimization algorithm; S5: Obtain the optimal sliding mode control input.
2. The method for designing a sliding mode controller for an unmanned aerial vehicle based on an improved whale algorithm according to claim 1 is characterized in that: In S1, the traditional whale optimization algorithm is improved in three aspects: The initial population of whales is constructed through reverse learning. The detailed steps are as follows: Get a random initial solution, that is, the initial whale population, and select the first N whale individuals with better fitness to form the population X * ; Obtain X through reverse learning * The corresponding inverse solution Comparison of whale populations X * With reverse whale populations The fitness of the individuals in , N of them are selected as the initial population of whales. The convergence factor a is improved, and the formula is as follows: a=Rand(a max -a min )+Rand(σN) Among them, a max and a min represents the maximum and minimum values of the convergence factor a, N is a normal distribution with a mean of 0 and a variance of 1, and σ is the variance of the convergence factor a. The formula for the local jitter of the optimal individual in the neighborhood is: For the new individual generated, if it is better than the current individual, it will be replaced; otherwise, the original best individual will be retained.
3. The design method of the UAV sliding mode controller based on the improved whale algorithm according to claim 1 is characterized in that: In S2, a formation of a pilot UAV and several follower UAVs is considered, where the pilot UAV is denoted as L, the follower UAV is denoted as i, and the motion state description equation of the follower UAV is: In the formula, x i ——The position of the drone in the x direction, y i ——The position of the drone in the y direction, v ix ——The speed of the drone in the x direction, v iy ——The speed of the drone in the y direction, u ix ——Control input of the drone in the x direction, u iy ——Control input of the drone in the y direction.
4. The method for designing a sliding mode controller for a UAV based on an improved whale algorithm according to claim 1, characterized in that: In S3, a new reaching law of the sliding mode controller is designed. The sliding mode controller of the UAV is designed by considering the position error, and a new reaching law of the sliding mode control is designed: The new approach rate design is as follows:
5. The method for designing a sliding mode controller for a UAV based on an improved whale algorithm according to claim 1 is characterized in that: The specific steps of using the improved whale optimization algorithm to adjust the parameters of the new reaching law of the model controller in S4 are as follows: Assign values to the whale population. The designed sliding mode controller is controlled by k1, k2, The β,γ5 parameters affect the initial population to 50, the maximum number of iterations to 50, the five-dimensional space to set the position of the i-th whale to P i ={p i1 ,p i2 ,p i3 ,p i4 ,p i5 ,}; The system error of the sliding mode controller, that is, the error between the UAV and the desired position, is used as the fitness function of the whale optimization algorithm; the whale individual with the best fitness is found through iteration, and the solution is the optimal parameters of the new reaching law.
