A control method based on a vehicle-mounted equipment slewing system
By improving the dung beetle optimization algorithm to optimize the current inner ring PID controller parameters of the vehicle-mounted slewing system, the adaptability problem of traditional PID control methods under dynamic load changes is solved, and high-precision and stable control effects are achieved.
Patent Information
- Application Number
- CN202510473894.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-16
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-04-16
AI Technical Summary
Traditional PID control methods have fixed parameters and poor adaptability in vehicle-mounted equipment rotary systems, making it difficult to adapt to dynamic load changes, resulting in reduced control accuracy and unstable system.
The improved dung beetle optimization algorithm is used to optimize the current inner ring PID controller parameters of the vehicle-mounted slewing system, and the position out-of-bounds problem is handled through the boundary reflection method, and the learning of historical optimal position is introduced in the theft behavior, combining MATLAB modeling and simulation optimization control parameters.
It improves the control accuracy and robustness of the vehicle-mounted rotary system under complex operating conditions, and enhances the adaptability and stability of the system.
Smart Images

Figure CN119995424B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of PID control, and particularly relates to a control method based on a slewing system of vehicle-mounted equipment. Background Art
[0002] Automobile intelligence is an important current development direction. The autonomous driving function has gradually developed from the initial assisted driving to a higher level of autonomous driving or even driverless driving. In this process, the slewing system of vehicle-mounted equipment needs to have higher precision and response speed to adapt to the instructions of the autonomous driving system. The vehicle-mounted slewing system is widely used in military radars, construction machinery, fire fighting pan-tilt heads and other fields, and needs to achieve high-precision angle and speed control under complex working conditions.
[0003] The PID control technology of permanent magnet synchronous motors is a key motor control strategy. PID respectively represents proportional, integral, and differential. In the control process, the proportional link outputs a control signal according to the error between the actual operating state and the desired state of the motor, and can quickly respond to the error to adjust the motor state; the integral link accumulates the error to eliminate the steady-state error of the system and make the output of the motor more accurately reach the set value; the differential link adjusts the control quantity according to the change rate of the error. It can predict the development trend of the error, change the control signal in advance, effectively improve the dynamic response of the system, reduce overshoot, so that the permanent magnet synchronous motor can achieve precise and stable control in terms of speed, torque or position.
[0004] Traditional PID control has problems such as fixed parameters and poor adaptability, and the parameters rely on manual experience, with insufficient robustness, making it difficult to meet the requirements of dynamic load changes. When the dynamic characteristics of the vehicle-mounted equipment slewing system change, such as load changes and increased interference, the fixed PID parameters are difficult to ensure good control performance, and it is impossible to timely and effectively adjust the input voltage or current of the motor to restore the speed, resulting in a decrease in the control accuracy of the system and even possible instability.
[0005] The dung beetle optimization algorithm is a new type of intelligent optimization algorithm, whose inspiration comes from the ball-rolling behavior and foraging behavior of dung beetles (commonly known as scarab beetles). In nature, dung beetles will roll animal feces into balls and push them in a specific direction. At the same time, they will also search for high-quality food resources. By simulating the five stages of ball-rolling, dancing, foraging, stealing, and reproduction of dung beetles, the survival behavior characteristics of dung beetles in the natural environment are fully demonstrated, and an efficient optimization algorithm is designed to solve complex optimization problems. However, some parameters in the algorithm have a greater impact on the algorithm performance and show high sensitivity under different test functions. This means that in practical applications, the parameters need to be carefully adjusted, increasing the difficulty of use and the calculation cost. Summary of the Invention
[0006] The objective of the present invention is to enable the slewing system of on-vehicle equipment to still achieve high-precision speed control under complex working conditions. Therefore, this paper proposes an improved dung beetle optimization algorithm to optimize the parameters of the motor current inner-loop PID controller of the on-vehicle equipment slewing system, solving the problems of fixed parameters, poor adaptability of the traditional PID control method, and poor control accuracy of the on-vehicle equipment slewing system, thereby improving the robustness of the on-vehicle equipment slewing system.
[0007] To achieve the above objective, the present invention adopts the following technical solutions:
[0008] A control method based on the on-vehicle equipment slewing system, characterized in that the control parameters of the on-vehicle equipment slewing system are optimized by improving the dung beetle optimization algorithm, and the specific steps are as follows:
[0009] Step 1: Construct a PID control model based on the on-vehicle equipment slewing system, including an improved dung beetle optimization algorithm model, a permanent magnet synchronous motor control model, a current inner-loop PID controller, a space vector pulse width modulation model, and an observer model.
[0010] Step 2: Improve the dung beetle optimization algorithm, specifically implemented as follows: D1, use the boundary reflection method to handle the problem of the position of the dung beetle individual exceeding the boundary; D2, introduce the successful experience of learning other dung beetles during the stealing process of the dung beetle, and guide the stealing behavior through the historical optimal position.
[0011] Step 3: Use the improved dung beetle optimization algorithm to optimize the current inner-loop PID controller of the on-vehicle equipment slewing system to obtain the optimal Kp, Ki, and Kd control parameters of the current inner-loop PID controller.
[0012] Step 4: Use MATLAB to perform modeling and simulation on the control of the on-vehicle equipment slewing system.
[0013] Further, in the first step, a PID control model based on the slewing system of on-vehicle equipment is constructed, including an improved dung beetle optimization algorithm model, a permanent magnet synchronous motor control model, a PID controller, a space vector pulse width modulation model, and an observer model. It is characterized in that the improved dung beetle optimization algorithm model is improved on the basis of the traditional dung beetle optimization algorithm to better adapt to the complex environment and control requirements of the on-vehicle equipment slewing system; the permanent magnet synchronous motor control model is the power core of the on-vehicle equipment slewing system. According to the motion equation of the permanent magnet synchronous motor, a control model of the motor is established, and the variation law of the motor speed and position with time is observed to achieve precise control of the on-vehicle equipment slewing system; the PID controller is the core link of the entire slewing system control. According to the error between the input and output of the system, a control signal is generated through the linear combination of the proportional, integral, and differential links; the space vector pulse width modulation model is used to convert the control signal output by the PID controller into the switching signal of the inverter, thereby controlling the stator voltage and current of the permanent magnet synchronous motor, and further improving the control accuracy and performance of the permanent magnet synchronous motor; the observer model estimates the state variables of the motor that are difficult to directly measure or have low measurement accuracy according to the measurable input and output signals of the motor.
[0014] Further, the motion equation of the permanent magnet synchronous motor is an important equation describing the mechanical motion characteristics of the motor. It establishes the relationship between the electromagnetic torque, load torque, moment of inertia of the motor and load, mechanical angular velocity, and viscous friction coefficient. The motion equation of the permanent magnet synchronous motor is:
[0015] (1);
[0016] In Equation (1), is the electromagnetic torque, is the load torque, is the moment of inertia of the motor and load, is the mechanical angular velocity of the motor, is the viscous friction coefficient.
[0017] Further, in the on-vehicle equipment slewing system, the PID controller acts in the current inner loop and becomes the current inner loop PID controller. The current inner loop PID controller receives the actual speed signal from the observer, compares it with the target speed, calculates the error, and then calculates the control signal according to the mathematical model of the current inner loop PID controller. This control signal is sent to the drive circuit of the permanent magnet synchronous motor to adjust the input current of the motor, thereby changing the speed of the motor and making the actual state of the slewing system gradually approach the desired state. The mathematical model of the current inner loop PID controller is:
[0018] (2);
[0019] In formula (2), is the control signal output by the current inner loop PID controller at time t, is the error between the desired input value and the actual output value at time t, , , are the proportional coefficient, integral coefficient, and differential coefficient respectively.
[0020] Furthermore, the space vector pulse width modulation model can capture the changes in the output signal of the current inner loop PID controller. Through algorithmic logic, it can accurately select the most suitable solution for the current control requirements from numerous inverter switch state combinations and respond quickly.
[0021] Furthermore, the observer model focuses on state variables of the motor that are difficult to directly measure or have poor measurement accuracy. It estimates by means of the measurable input and output signals of the motor, deeply correlates the input voltage and current signals with the output speed and position feedback signals, keenly captures the dynamic changes of the input and output signals during operation, and continuously compares the differences between the actual output and the estimated output through the gain matrix, and uses this to correct the estimated value of the state variable. The observer mathematical model is shown as the following formula:
[0022] (3);
[0023] In formula (3), is the estimated state, and , is the estimated output, and , is the gain matrix, and , is the actual output, is the change rate of the estimated state, is the input signal of the motor system, generally the measurable speed and position feedback signals. A, B, and C are the system matrix, input matrix, and output matrix respectively.
[0024] Furthermore, in the second step, the boundary reflection method is used to handle the problem of the position of the dung beetle individual exceeding the boundary. Its characteristic is that when the position of the dung beetle individual exceeds the boundary of the search space, the boundary reflection method can effectively pull it back into the legal search space. If the individual position is less than the lower bound, it is reflected to the symmetric position on the other side of the lower bound. If the individual position is greater than the upper bound, it is reflected to the symmetric position on the other side of the upper bound. Using the boundary reflection method to handle the problem of the position of the dung beetle individual exceeding the boundary solves the problems of invalid search, poor stability, and low population diversity caused by the individual position exceeding the boundary in the original algorithm, and improves the algorithm performance. The mathematical model of the boundary reflection method is shown as the following formula:
[0025] (4);
[0026] In formula (4), is the original position of the i-th individual in the j-th dimension, is the position of the i-th individual in the j-th dimension after boundary reflection, is the lower limit value of the search space in the j-th dimension, is the upper limit value of the search space in the j-th dimension.
[0027] Furthermore, in the second step, introducing the successful experience of learning from other dung beetles during the stealing process of dung beetles, guiding the stealing behavior through the historical optimal position, it is characterized in that it breaks the limitation of individual independent exploration, builds a bridge for group information interaction, so that each dung beetle no longer blindly steals randomly, but captures potential high-quality solution regions according to the historical optimal positions accumulated by itself and its companions in past iterations, adjusts its own moving direction and distance, and approaches the optimal solution more accurately, greatly improving the search efficiency, enabling the algorithm to quickly focus on the global optimal solution. The mathematical model of this process is:
[0028] (5);
[0029] In formula (5), is the inertia weight, is the number of other dung beetles participating in influencing the stealing behavior of the i-th dung beetle, is the weight coefficient, is the global historical optimal position, is the position of the i-th dung beetle at the t-th iteration, is the historical optimal position of the j-th dung beetle at the t-th iteration.
[0030] Furthermore, in the third step, using the improved dung beetle optimization algorithm to optimize the current inner loop PID controller of the vehicle-mounted equipment slewing system, obtaining the optimal Kp, Ki, Kd control parameters of the current inner loop PID controller, it is characterized in that the current inner loop PID controller mainly acts on the control of the permanent magnet synchronous motor, and then controls the vehicle-mounted equipment slewing system. Using the improved dung beetle optimization algorithm to tune and optimize the parameters of the current inner loop PID controller, and performing iterations to obtain the best Kp, Ki, Kd parameters of the current inner loop PID controller, thereby optimizing the control performance of the current inner loop PID controller. The specific steps are:
[0031] S1. Parameter initialization: Set the maximum number of iterations and the population size , the population dimension dim, the upper bound ub of the search, the lower bound lb, the initial position of the improved dung beetle optimization algorithm is the initial solution of the current inner loop PID parameters in the algorithm optimization process, and the position update of the dung beetle is the parameter update of the current inner loop PID controller;
[0032] S2. Tuning of the current inner loop PID parameters: Select the combination of Kp, Ki, and Kd parameters that makes the system dynamic response and steady-state performance reach the best balance through the improved dung beetle optimization algorithm. Due to the time-sensitive characteristic of the improved dung beetle optimization algorithm, an index that can quantify the time cumulative error needs to be used as the fitness function. The integral of time multiplied by the absolute error can not only punish overshoot and oscillation because of its time-domain weighting characteristic of the error, but also effectively reflect the rapidity and steady-state accuracy of the system, so as to more accurately evaluate the comprehensive performance of the PID parameters. Its mathematical expression formula is as follows:
[0033] (6);
[0034] In formula (6), is a key index used to measure the deviation between the actual current and the expected reference current, and T is the cumulative effect used to integrate and calculate the error;
[0035] S3. Simulate the dung beetle's ball-rolling behavior and foraging behavior: Dynamically adjust the position of the dung beetle population by simulating the five behavioral stages of the dung beetle's ball-rolling, dancing, foraging, stealing, and breeding, and gradually approach the optimal solution;
[0036] S4. Start iteration: Execute times of iteration optimization process. In each loop, compare the current fitness value with the historical optimal fitness value to judge whether to update the optimal fitness value, and at the same time update the optimal solution of the group according to the adaptive fitness value of each dung beetle individual;
[0037] S5. Judgment: Judge whether the iteration number t reaches the maximum iteration number , if it reaches, stop and output the optimal solution, if not, continue to execute steps S3 and S4;
[0038] S6. Assignment: Assign the optimal solution to the three parameters Kp, Ki, and Kd of the current inner loop PID controller to complete the parameter optimization of the current inner loop PID controller.
[0039] Furthermore, in the above S3, simulate the dung beetle's ball-rolling behavior and foraging behavior: Dynamically adjust the position of the dung beetle population by simulating the five behavioral stages of the dung beetle's ball-rolling, dancing, foraging, stealing, and breeding, and gradually approach the optimal solution. It is characterized in that it integrates the unique mechanisms of multiple behavioral stages, enabling the algorithm to exhibit efficient and flexible search capabilities in the search space:
[0040] Step 1. Rolling behavior: After rolling the feces into a ball, the dung beetle uses celestial cues to navigate in a straight line. If there is no light source, the path will bend, and natural factors may cause deviation. The individual position update formula for the rolling behavior is as follows:
[0041] (7);
[0042] In formula (7), is the deflection coefficient, and , is the constant for adjusting the step size, and , is the natural coefficient, simulating environmental interference, is the current iteration number, is the position information of the $i$-th dung beetle at the $t$-th iteration, is used to simulate the change in light intensity, and , is the global worst position, used to expand the search range;
[0043] Step 2. Dancing behavior: When the dung beetle encounters an obstacle, it will climb onto the dung ball and dance, that is, rotate and pause the dung ball to re-determine the direction. The position update of the dancing behavior uses the tangent function:
[0044] (8);
[0045] In formula (8), is the position information of the $i$-th dung beetle at the $t$-th iteration, is the deflection angle, and ;
[0046] Step 3. Foraging behavior: The dung beetle drills out of the ground to find food. The optimal foraging area will guide the dung beetle to forage. The boundary of the optimal dung beetle area is defined as follows:
[0047] (9);
[0048] In formula (9), is the current global best position, , are the lower and upper bounds of the optimal dung beetle area respectively, and are the lower and upper bounds for optimizing the dung beetle area. The dung beetle position is updated as follows:
[0049] (10);
[0050] In formula (10), is a random number obeying the normal distribution, is a random vector, and ;
[0051] Step 4, Theft behavior: Some dung beetles will steal the dung balls of other dung beetles, which is very common in nature. In the algorithm, it is assumed that the area around the current global best position is the best position for competing for food. The position update formula for the stealing dung beetle is:
[0052] (11);
[0053] In formula (11), is a random vector subject to a normal distribution, is a constant that controls the perturbation amplitude, is the current local best position;
[0054] Step 5, Reproduction behavior: Female dung beetles bury the dung balls underground to lay eggs to ensure the safety of their offspring. The selection of the egg-laying area is crucial. The strategy for defining the boundary of the egg-laying area that simulates female dung beetles is:
[0055] (12);
[0056] In formula (12), is the current local best position, , are the lower and upper bounds of the egg-laying area respectively, and are the lower and upper bounds of the optimized dung beetle area, , is the maximum number of iterations. The position update of the egg balls where the dung beetles lay eggs is as follows:
[0057] (13);
[0058] In formula (13), is the position information of the i-th egg ball at the t-th iteration, and are two independent random vectors.
[0059] Further, in the fourth step, the control of the vehicle-mounted equipment slewing system is modeled and simulated using MATLAB. Specifically, first, the parameters are set in MATLAB using the improved dung beetle optimization algorithm model to simulate the behavior of dung beetles, handle out-of-bounds positions and guiding theft behaviors, optimize the parameters of the current inner-loop PID controller, and find the best parameter combination. Second, the permanent magnet synchronous motor control model is built in MATLAB as the power core of the system, and is controlled by the signal of the current inner-loop PID controller to observe the change in the motor speed and supply energy to the system. Third, the space vector pulse width modulation model receives the signal of the current inner-loop PID controller, converts it into an inverter switching signal in MATLAB, screens the adapted scheme to control the motor voltage and current, and improves the control accuracy and system stability. Finally, the observer model estimates the unmeasurable state variables in MATLAB based on the measurable signals of the motor, and feeds them back to the current inner-loop PID controller for accurate error calculation and generation of reasonable signals, and also provides accurate motor state information for other models to ensure the precise control of the system. These models cooperate with each other, adjust and optimize, simulate the operation of the system under different working conditions, verify the effectiveness of the control method in this paper, and provide theoretical and technical support for practical applications. Description of the Drawings
[0060] Figure 1 It is a flowchart of the control system based on the vehicle-mounted equipment slewing system.
[0061] Figure 2 It is a model of the control system based on the vehicle-mounted equipment slewing system.
[0062] Figure 3 It is a comparison chart of the fitness values of the dung beetle optimization algorithm and the improved dung beetle algorithm.
[0063] Figure 4 It is a comparison chart of the effects of the dung beetle optimization algorithm and the improved dung beetle algorithm on optimizing the current inner-loop PID controller. Detailed Embodiment
[0064] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments; based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0065] A control method based on a vehicle-mounted equipment slewing system provided by the present invention is characterized in that the optimization of the control parameters of the vehicle-mounted equipment slewing system is realized by improving the dung beetle optimization algorithm, and the specific steps are as follows:
[0066] Step 1: Construct a PID control model based on the slewing system of vehicle-mounted equipment, including an improved dung beetle optimization algorithm model, a permanent magnet synchronous motor control model, a current inner-loop PID controller, a space vector pulse width modulation model, and an observer model.
[0067] Furthermore, in Step 1, when constructing a PID control model based on the slewing system of vehicle-mounted equipment, including an improved dung beetle optimization algorithm model, a permanent magnet synchronous motor control model, a PID controller, a space vector pulse width modulation model, and an observer model, the improved dung beetle optimization algorithm model is improved on the basis of the traditional dung beetle optimization algorithm to better adapt to the complex environment and control requirements of the vehicle-mounted equipment slewing system; the permanent magnet synchronous motor control model is the power core of the vehicle-mounted equipment slewing system. According to the motion equation of the permanent magnet synchronous motor, a control model of the motor is established to observe the variation law of the motor speed and position over time, so as to achieve precise control of the vehicle-mounted equipment slewing system; the PID controller is the core link of the entire slewing system control. According to the error between the input and output of the system, a control signal is generated through the linear combination of the proportional, integral, and differential links; the space vector pulse width modulation model is used to convert the control signal output by the PID controller into the switching signal of the inverter, thereby controlling the stator voltage and current of the permanent magnet synchronous motor, and further improving the control accuracy and performance of the permanent magnet synchronous motor; the observer model estimates the state variables of the motor that are difficult to directly measure or have insufficient measurement accuracy based on the measurable input and output signals of the motor.
[0068] Furthermore, the motion equation of the permanent magnet synchronous motor is an important equation describing the mechanical motion characteristics of the motor. It establishes the relationship between the electromagnetic torque, load torque, moment of inertia of the motor and load, mechanical angular velocity, and viscous friction coefficient. The motion equation of the permanent magnet synchronous motor is:
[0069] (1);
[0070] In Equation (1), is the electromagnetic torque, is the load torque, is the moment of inertia of the motor and load, is the mechanical angular velocity of the motor, is the viscous friction coefficient.
[0071] Further, in the slewing system of vehicle-mounted equipment, the PID controller acts in the current inner loop, becoming the current inner loop PID controller. The current inner loop PID controller receives the actual speed signal from the observer, compares it with the target speed, calculates the error, and then calculates the control signal according to the mathematical model of the current inner loop PID controller. This control signal is sent to the drive circuit of the permanent magnet synchronous motor to adjust the input current of the motor, thereby changing the speed of the motor and making the actual state of the slewing system gradually approach the desired state. The mathematical model of the current inner loop PID controller is as follows:
[0072] (2);
[0073] In formula (2), is the control signal output by the current inner loop PID controller at time t, is the error between the desired input value and the actual output value at time t, , , are the proportional coefficient, integral coefficient, and differential coefficient respectively.
[0074] Further, the space vector pulse width modulation model can capture the changes in the output signal of the current inner loop PID controller. Through algorithmic logic, it can accurately screen out the most suitable solution for the current control requirements from numerous inverter switch state combinations and respond quickly.
[0075] Further, the observer model focuses on the state variables of the motor that are difficult to directly measure or have poor measurement accuracy. It estimates by means of the measurable input and output signals of the motor, deeply correlates the input voltage and current signals with the output speed and position feedback signals, and keenly captures the dynamic changes of the input and output signals during operation. Through the gain matrix, it continuously compares the differences between the actual output and the estimated output and corrects the estimated value of the state variable accordingly. The mathematical model of the observer is shown as the following formula:
[0076] (3);
[0077] In formula (3), is the estimated state, and , is the estimated output, and , is the gain matrix, and , is the actual output, is the change rate of the estimated state, is the input signal of the motor system, generally the measurable speed and position feedback signals. A, B, and C are the system matrix, input matrix, and output matrix respectively.
[0078] Step 2: Improve the dung beetle optimization algorithm, which is specifically implemented as follows: D1, use the boundary reflection method to handle the problem of the position of dung beetle individuals exceeding the boundary; D2, introduce the successful experience of learning other dung beetles during the stealing process of dung beetles, and guide the stealing behavior through the historical optimal position.
[0079] Furthermore, in the above Step 2, when using the boundary reflection method to handle the problem of the position of dung beetle individuals exceeding the boundary, when the position of a dung beetle individual exceeds the boundary of the search space, the boundary reflection method can effectively pull it back into the legal search space. If the individual position is less than the lower bound, it is reflected to the symmetric position on the other side of the lower bound. If the individual position is greater than the upper bound, it is reflected to the symmetric position on the other side of the upper bound. Using the boundary reflection method to handle the problem of the position of dung beetle individuals exceeding the boundary solves the problems of invalid search, poor stability, and low population diversity caused by the individual position exceeding the boundary in the original algorithm, and improves the algorithm performance. The mathematical model of the boundary reflection method is shown in the following formula:
[0080] (4);
[0081] In formula (4), is the original position of the i-th individual in the j-th dimension, is the position of the i-th individual in the j-th dimension after boundary reflection, is the lower limit value of the search space in the j-th dimension, is the upper limit value of the search space in the j-th dimension.
[0082] Furthermore, in the above Step 2, introducing the successful experience of learning other dung beetles during the stealing process of dung beetles and guiding the stealing behavior through the historical optimal position breaks the limitation of individual independent exploration, builds a bridge for group information interaction, enables each dung beetle to no longer steal blindly randomly, but captures potential high-quality solution regions based on the historical optimal positions accumulated by itself and its companions in previous iterations, adjusts its own movement direction and distance, and gets closer to the optimal solution more accurately, greatly improving the search efficiency and enabling the algorithm to quickly focus on the global optimal solution. The mathematical model of this process is:
[0083] (5);
[0084] In formula (5), is the inertia weight, is the number of other dung beetles participating in influencing the stealing behavior of the i-th dung beetle, is the weight coefficient, is the global historical optimal position, is the position of the i-th dung beetle at the t-th iteration, is the historical optimal position of the j-th dung beetle at the t-th iteration.
[0085] Step 3: Use the improved dung beetle optimization algorithm to optimize the current inner-loop PID controller of the vehicle-mounted equipment slewing system, and obtain the optimal Kp, Ki, and Kd control parameters of the current inner-loop PID controller.
[0086] Further, in the said Step 3, when using the improved dung beetle optimization algorithm to optimize the current inner-loop PID controller of the vehicle-mounted equipment slewing system and obtain the optimal Kp, Ki, and Kd control parameters of the current inner-loop PID controller, it is characterized in that the current inner-loop PID controller mainly acts on the control of the permanent magnet synchronous motor, and then controls the vehicle-mounted equipment slewing system. Use the improved dung beetle optimization algorithm to tune and optimize the parameters of the current inner-loop PID controller, and perform iteration to obtain the best Kp, Ki, and Kd parameters of the current inner-loop PID controller, thereby optimizing the control performance of the current inner-loop PID controller. The specific steps are as follows:
[0087] S1. Parameter initialization: Set the maximum number of iterations and population size of the improved dung beetle optimization algorithm. The population dimension is dim, the search upper bound is ub, and the lower bound is lb. The initial position of the improved dung beetle optimization algorithm is the initial solution of the current inner-loop PID parameters in the algorithm optimization process. The position update of the dung beetle is the parameter update of the current inner-loop PID controller;
[0088] S2. Tuning of the current inner-loop PID parameters: Select the combination of Kp, Ki, and Kd parameters that makes the dynamic response and steady-state performance of the system reach the best balance through the improved dung beetle optimization algorithm. Due to the time-sensitive characteristic of the improved dung beetle optimization algorithm, an index that can quantify the time-accumulated error needs to be used as the fitness function. The integral of time multiplied by the absolute error can not only punish overshoot and oscillation because of its time-domain weighting characteristic of the error, but also effectively reflect the rapidity and steady-state accuracy of the system, so as to more accurately evaluate the comprehensive performance of the PID parameters. Its mathematical expression formula is as follows:
[0089] (6);
[0090] In formula (6), is a key index used to measure the deviation between the actual current and the expected reference current, and T is the cumulative effect used to calculate the integral of the error;
[0091] S3. Simulate the dung beetle's ball-rolling behavior and foraging behavior: Dynamically adjust the position of the dung beetle population by simulating the five behavioral stages of the dung beetle's ball-rolling, dancing, foraging, stealing, and breeding, and gradually approach the optimal solution;
[0092] S4. Start iteration: Execute In the secondary iterative optimization process, in each loop, the current fitness value is compared with the historical optimal fitness value to determine whether to update the optimal fitness value. At the same time, according to the adaptive fitness value of each dung beetle individual, the optimal solution of the population is updated;
[0093] S5. Judgment: Judge whether the iteration number t has reached the maximum iteration number , if it has reached, stop and output the optimal solution, if not, continue to execute steps S3 and S4;
[0094] S6. Assignment: Assign the optimal solution to the three parameters Kp, Ki, and Kd of the current-loop PID controller to complete the parameter optimization of the current-loop PID controller.
[0095] Furthermore, in the said S3, simulate the dung beetle's behavior of rolling a ball and foraging: By simulating the five behavior stages of the dung beetle's rolling a ball, dancing, foraging, stealing, and breeding, dynamically adjust the position of the dung beetle population and gradually approach the optimal solution. It is characterized by integrating the unique mechanisms of multiple behavior stages, enabling the algorithm to exhibit efficient and flexible search capabilities in the search space:
[0096] Step1. Ball-rolling behavior: After the dung beetle rolls the feces into a ball, it uses celestial cues to navigate in a straight line. If there is no light source, the path will bend, and natural factors may cause deviation. The individual position update formula for the ball-rolling behavior is:
[0097] (7);
[0098] In formula (7), is the deflection coefficient, and , is a constant for adjusting the step size, and , is the natural coefficient, simulating environmental interference, is the current iteration number, is the position information of the i-th dung beetle at the t-th iteration, is used to simulate the change in light intensity, and , is the global worst position, used to expand the search range;
[0099] Step2. Dancing behavior: When the dung beetle encounters an obstacle, it will climb onto the dung ball and dance, that is, rotate and pause the dung ball to re-determine the direction. The position update of the dancing behavior uses the tangent function:
[0100] (8);
[0101] In formula (8), is the position information of the i-th dung beetle at the t-th iteration, is the deflection angle, and ;
[0102] Step3, Foraging behavior: The dung beetle drills out of the ground to find food. The optimal foraging area guides the dung beetle to forage. The boundary of the optimal dung beetle area is defined as follows:
[0103] (9);
[0104] In formula (9), is the current global best position, , are the lower and upper bounds of the optimal dung beetle area respectively, and are the lower and upper bounds of the optimized dung beetle area. The position update of the dung beetle is as follows:
[0105] (10);
[0106] In formula (10), is a random number obeying the normal distribution, is a random vector, and ;
[0107] Step4, Theft behavior: Some dung beetles will steal the dung balls of other dung beetles, which is very common in nature. In the algorithm, it is assumed that the area around the current global best position is the best position to compete for food. The position update formula of the stealing dung beetle is:
[0108] (11);
[0109] In formula (11), is a random vector obeying the normal distribution, is a constant that controls the perturbation amplitude, is the current local best position;
[0110] Step5, Reproduction behavior: The female dung beetle buries the dung ball underground to lay eggs to ensure the safety of the offspring. The choice of the egg-laying area is crucial. The boundary selection strategy for simulating the egg-laying area of the female dung beetle is defined as:
[0111] (12);
[0112] In formula (12), is the current local best position, , are the lower and upper bounds of the egg-laying area respectively, and are the lower and upper bounds of the optimized dung beetle area, , Let \(T\) be the maximum number of iterations. The position update of the egg ball where the dung beetle lays eggs is as follows:
[0113] (13);
[0114] In formula (13), \(x_{i}(t)\) is the position information of the \(i\)-th egg ball at the \(t\)-th iteration, and \(r_{1}\) and \(r_{2}\) are two independent random vectors.
[0115] Step 4: Use MATLAB to model and simulate the control of the vehicle-mounted equipment slewing system.
[0116] Furthermore, in the above Step 4, when using MATLAB to model and simulate the control of the vehicle-mounted equipment slewing system, it is characterized in that, firstly, use the improved dung beetle optimization algorithm model to set parameters in MATLAB, simulate the behavior of dung beetles, handle out-of-bounds positions and guiding theft behaviors, optimize the parameters of the current inner-loop PID controller, and find the best parameter combination. Secondly, the permanent magnet synchronous motor control model is used as the power core of the system to be modeled in MATLAB, and it is controlled by the signal of the current inner-loop PID controller to observe the change of the motor speed and supply energy to the system. Thirdly, the space vector pulse width modulation model receives the signal of the current inner-loop PID controller, converts it into an inverter switching signal in MATLAB, screens and adapts the scheme to control the motor voltage and current, and improves the control accuracy and system stability. Finally, the observer model estimates the difficult-to-measure state variables in MATLAB based on the measurable signals of the motor, and feeds them back to the current inner-loop PID controller for accurate error calculation and generation of reasonable signals, and also provides accurate motor state information for other models to ensure the precise control of the system. These models cooperate with each other, adjust and optimize, simulate the operation of the system under different working conditions, verify the effectiveness of the control method in this paper, and provide theoretical and technical support for practical applications.
[0117] Figure 3 Figure is the comparison curve of the fitness functions of the dung beetle optimization algorithm and the improved dung beetle optimization algorithm. At the beginning of the iteration, the fitness value of the improved dung beetle optimization algorithm is continuously smaller than that of the dung beetle optimization algorithm. It can be proved that the improved dung beetle optimization algorithm obtains the optimal fitness value faster than the dung beetle optimization algorithm. According to the principle that the smaller the fitness value, the better the solution, the optimal solution obtained by the improved dung beetle optimization algorithm is better than that of the dung beetle optimization algorithm.
[0118] Figure 4It is a comparison chart of the PID response of the dung beetle optimization algorithm and the improved dung beetle optimization algorithm. By setting the target value to 1, the PID response curves of the two algorithms are compared. As can be seen from the figure, under the condition of approaching the same target value of 1, the improved dung beetle optimization algorithm takes less time and has a smaller fluctuation amplitude in the vertical coordinate compared with the dung beetle optimization algorithm. It can be shown that in a complex environment, the PID controller system based on the improved dung beetle optimization algorithm has better performance than the PID controller system of the dung beetle optimization algorithm.
Claims
1. A control method based on a vehicle-mounted equipment slewing system, characterized in that, Optimize the control parameters of the slewing system of vehicle-mounted equipment by improving the dung beetle optimization algorithm. The specific steps are as follows: Step 1: Construct a PID control model based on the slewing system of vehicle-mounted equipment, including an improved dung beetle optimization algorithm model, a permanent magnet synchronous motor control model, a current inner-loop PID controller, a space vector pulse width modulation model, and an observer model; Step 2: Improve the dung beetle optimization algorithm. The improved dung beetle optimization algorithm includes: D1. Use the boundary reflection method to handle the problem of the position of dung beetle individuals exceeding the boundary. When the position of a dung beetle individual exceeds the boundary of the search space, the boundary reflection method can effectively pull it back into the legal search space. If the individual position is less than the lower bound, it is reflected to the symmetric position on the other side of the lower bound. If the individual position is greater than the upper bound, it is reflected to the symmetric position on the other side of the upper bound. The mathematical model of the boundary reflection method for handling the problem of the position of dung beetle individuals exceeding the boundary is shown in the following formula: In formula (4), x ij is the original position of the i-th individual in the j-th dimension, and x′ ij is the position of the i-th individual in the j-th dimension after boundary reflection. l j is the lower limit value of the search space in the j-th dimension, and u j is the upper limit value of the search space in the j-th dimension; D2. Introduce the successful experience of learning other dung beetles during the theft process of dung beetles. Guide the theft behavior through the historical optimal position, break the limitation of individual independent exploration, build a bridge for group information interaction, so that each dung beetle no longer blindly steals randomly, but captures potential high-quality solution areas according to its own and its companions' historical optimal positions accumulated in past iterations, adjusts its own movement direction and distance, and approaches the optimal solution more accurately, greatly improving the search efficiency and enabling the algorithm to quickly focus on the global optimal solution. The mathematical model of this process is: In Equation (5), w is the inertia weight, k is the number of other dung beetles participating in influencing the stealing behavior of the i-th dung beetle, a j is the weight coefficient, g(t) is the global historical optimal position, x i (t) is the position of the i-th dung beetle at the t-th iteration, p j (t) is the historical optimal position of the j-th dung beetle at the t-th iteration; Step 3: Use the improved dung beetle optimization algorithm to optimize the current inner-loop PID controller of the slewing system of vehicle-mounted equipment to obtain the optimal Kp, Ki, and Kd control parameters of the current inner-loop PID controller; Step 4: Use MATLAB to perform modeling and simulation on the control of the slewing system of vehicle-mounted equipment.
2. The control method based on the slewing system of vehicle-mounted equipment according to claim 1, characterized in that, In the above Step 1, constructing a PID control model based on the slewing system of vehicle-mounted equipment includes an improved dung beetle optimization algorithm model, a permanent magnet synchronous motor control model, a current inner-loop PID controller, a space vector pulse width modulation model, and an observer model; the improved dung beetle optimization algorithm model is improved on the basis of the traditional dung beetle optimization algorithm to better adapt to the complex environment and control requirements of the slewing system of vehicle-mounted equipment; the permanent magnet synchronous motor control model is the power core of the slewing system of vehicle-mounted equipment. According to the motion equation of the permanent magnet synchronous motor, a control model of the motor is established to observe the change law of the motor speed and position over time and achieve precise control of the slewing system of vehicle-mounted equipment; the current inner-loop PID controller is the core link of the control of the entire slewing system. According to the error between the input and output of the system, a control signal is generated through the linear combination of the proportional, integral, and differential links; the space vector pulse width modulation model is used to convert the control signal output by the current inner-loop PID controller into the switching signal of the inverter, thereby controlling the stator voltage and current of the permanent magnet synchronous motor; the observer model is used to estimate the state variables of the motor that are difficult to directly measure or have insufficient measurement accuracy based on the measurable input and output signals of the motor.
3. The control method based on the slewing system of vehicle-mounted equipment according to claim 2, characterized in that, In step 3, the improved dung beetle optimization algorithm is used to optimize the current inner-loop PID controller of the permanent magnet synchronous motor control system, and the optimal Kp, Ki, and Kd control parameters of the current inner-loop PID controller are obtained. The specific steps are as follows: S1. Parameter initialization: Set the maximum number of iterations Max_iteration and population size SearchAgents_no of the improved dung beetle optimization algorithm, the population dimension dim, the search upper bound ub, and the lower bound lb. The initial position of the improved dung beetle optimization algorithm is the initial solution of the current inner-loop PID parameters in the algorithm optimization process. The position update of the dung beetle is the parameter update of the current inner-loop PID controller; S2. Tuning of the current inner-loop PID parameters: Select the combination of Kp, Ki, and Kd parameters that makes the system dynamic response and steady-state performance reach the best balance through the improved dung beetle optimization algorithm. Due to the time-sensitive characteristic of the improved dung beetle optimization algorithm, an index that can quantify the time-accumulated error needs to be used as the fitness function. The integral of time multiplied by the absolute error can not only punish overshoot and oscillation but also effectively reflect the rapidity and steady-state accuracy of the system because of its time-domain weighting characteristic of the error, thus more accurately evaluating the comprehensive performance of the PID parameters. Its mathematical expression formula is as follows: In Equation (6), e(t) is a key index used to measure the deviation between the actual current and the desired reference current, and T is used to integrate the cumulative effect of the error; S3. Simulate the ball-rolling behavior and foraging behavior of dung beetles: Dynamically adjust the position of the dung beetle population by simulating the five behavioral stages of dung beetles: ball-rolling, dancing, foraging, stealing, and breeding, and gradually approach the optimal solution; S4. Start iteration: Execute the Max_iteration - time iteration optimization process. In each loop, compare the current fitness value with the historical optimal fitness value to determine whether to update the optimal fitness value. At the same time, update the optimal solution of the population according to the adaptive fitness value of each dung beetle individual; S5. Judgment: Judge whether the iteration number t has reached the maximum iteration number Max_iteration. If it has reached, stop and output the optimal solution. If it has not reached, continue to execute steps S3 and S4; S6. Assignment: Assign the optimal solution to the three parameters Kp, Ki, and Kd of the current inner-loop PID controller to complete the parameter optimization of the current inner-loop PID controller.
4. The control method based on the slewing system of vehicle-mounted equipment according to claim 3, wherein In the fourth step, the control of the vehicle-mounted equipment slewing system is modeled and simulated using MATLAB. First, the parameters are set in MATLAB using the improved dung beetle optimization algorithm model to simulate the behavior of dung beetles, handle out-of-bounds positions and guiding theft behaviors, optimize the parameters of the current inner-loop PID controller, and find the optimal parameter combination. Second, the permanent magnet synchronous motor control model is modeled in MATLAB as the power core of the system, and is controlled by the signal of the current inner-loop PID controller to observe the change in the motor speed and supply energy to the system. Third, the space vector pulse width modulation model receives the signal of the current inner-loop PID controller, converts it into an inverter switching signal in MATLAB, screens the adaptation scheme to control the motor voltage and current, and improves the control accuracy and system stability. Finally, the observer model estimates the difficult-to-measure state variables in MATLAB based on the measurable signals of the motor and feeds them back to the current inner-loop PID controller for accurate error calculation and generation of reasonable signals.
Citation Information
Patent Citations
Edge computing server placement method based on dung beetle optimization algorithm
CN116887285A
Fog workflow scheduling method based on improved dung beetle optimization algorithm
CN118069321A
A PID parameter tuning method based on dung beetle algorithm
CN119758703A