Method for optimizing corn planter motor control based on chaos sparrow search algorithm
By applying a fuzzy PID controller optimized based on the Chaos Sparrow Search algorithm in corn seeders, the problems of uneven sowing spacing and high manual labor intensity in traditional corn seeders are solved, and more efficient and even sowing effects and higher crop quality are achieved.
Patent Information
- Application Number
- CN202510036767.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-01-09
AI Technical Summary
Due to the uneven sowing spacing and high labor intensity of traditional corn seeders, they limit the improvement of crop yield and quality, and it is difficult for PID controllers with fixed parameters to achieve the best control effect.
The fuzzy PID controller optimized based on the Chaos Sparrow search algorithm is adopted to initialize the population through the Logistic chaotic sequence, and combine Gaussian mutation and chaotic perturbation to optimize the PID parameters to achieve more accurate and intelligent seeding control.
It improves the uniformity and adaptability of sowing, reduces the intensity of labor, improves crop yield and quality, and enhances the robustness and stability of the system.
Smart Images

Figure CN119882561A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of agricultural machinery controller optimization, and more specifically, relates to a method for optimizing corn planter motor control based on a chaotic sparrow search algorithm. Background Art
[0002] In the field of modern agricultural mechanization, traditional corn planters have limited the improvement of crop yield and quality due to problems such as uneven planting spacing and high labor intensity. With the development of electric drive technology, the control system of electric drive corn planters has gradually become a research hotspot, and the improvement of planting accuracy and efficiency is achieved through high-precision sensors and embedded systems. However, due to the nonlinearity and uncertainty of the system, the PID controller with fixed parameters is difficult to achieve the best control effect. The fuzzy PID controller uses fuzzy logic to deal with uncertainty and nonlinear problems and realizes online adjustment of PID parameters. The chaotic sparrow search algorithm is used in the optimization algorithm with its excellent global search ability and local search ability to improve the search accuracy and convergence speed.
[0003] Chinese patent document CN112880688A discloses a three-dimensional trajectory planning method for unmanned aerial vehicles based on a chaotic adaptive sparrow search algorithm, which includes the following steps: establishing a flight environment model according to the flight environment; establishing a UAV flight cost function to evaluate the UAV trajectory performance; using a chaotic initialization population strategy, an adaptive weight strategy and a Cauchy-Gaussian mixture mutation strategy to improve the sparrow search algorithm, and proposing a chaotic adaptive sparrow search algorithm; using a chaotic adaptive sparrow search algorithm to plan the trajectory of the unmanned aerial vehicle in a three-dimensional environment, and obtaining the optimal solution for the trajectory planning of the unmanned aerial vehicle, and obtaining the planning result. However, although the cubic mapping chaos operator used in this method has certain chaos, compared with the Logistic chaotic mapping, the ergodicity and randomness of its chaotic behavior within the parameter range are relatively weak. This characteristic may lead to an uneven population initialization effect, thereby affecting the global search capability of the algorithm. In addition, the cubic mapping has limited ability to jump out of the local optimum when performing local perturbations, and is prone to falling into the local optimal solution.
[0004] In view of this, the present invention designs a method for optimizing corn planter motor control based on chaotic sparrow search algorithm. Summary of the invention
[0005] The present invention aims to overcome at least one defect of the above-mentioned prior art and provide a method for optimizing the motor control of a corn planter based on chaotic sparrow search, combining the chaotic sparrow search algorithm with fuzzy PID control to achieve more precise and intelligent sowing control, so as to improve sowing uniformity and adaptability, reduce manual labor intensity, and thus improve crop yield and quality.
[0006] The detailed technical scheme of the present invention is as follows:
[0007] A method for optimizing corn planter motor control based on chaotic sparrow search algorithm, the method comprising:
[0008] S1. Determine the size of the sparrow population, the number of discoverers, the number of reconnaissance and warning individuals, the dimension of the objective function, the upper and lower bounds of the initial value, and the maximum number of iterations; use the Logistic chaotic sequence to initialize the sparrow population and generate an initial solution with randomness and diversity; the parameters of each sparrow individual are expressed as a candidate solution of the fuzzy PID controller, corresponding to a specific value of the PID parameter;
[0009] S2. Calculate the fitness value of each individual in the sparrow population, select the sparrow individuals with the highest and lowest fitness as the global optimal solution and the local worst solution, and calculate the positions of the sparrow individuals with the highest and lowest fitness;
[0010] S3, select P from the sparrow population in proportion n The first sparrow acts as a discoverer and updates the discoverer's position; the remaining sparrows act as followers and update their positions by following the discoverer's direction to develop potential solutions in a local area.
[0011] S4, randomly select S from the sparrow population n The sparrows were used for reconnaissance and early warning, simulating the anti-predation behavior of the sparrows when facing danger, and updating their positions;
[0012] S5. Recalculate the fitness value f of each sparrow i And the average fitness value of all sparrows f a ;
[0013] When f i <f a Perform Gaussian mutation on individual sparrows and recalculate their fitness. If the fitness of the sparrow after mutation is better than that before mutation, update the position of the sparrow, otherwise it remains unchanged.
[0014] When f i ≥f a The sparrows are subjected to chaotic disturbances and their fitness is recalculated. When the fitness is better than before the disturbance, the position of the sparrow is updated, otherwise it remains unchanged.
[0015] S6. If the position of the individual sparrow in S5 changes, recalculate the fitness value of each sparrow and the average fitness value of the sparrow population. If the current fitness value is less than the historical optimal value, update the global optimal solution. When the maximum number of iterations or other termination conditions are reached, stop the iteration and output the optimal solution.
[0016] S7. Update the PID parameters of the fuzzy PID controller: Kp, Ki, Kd according to the final global optimal solution. The fuzzy PID controller uses the updated optimized parameters to perform real-time adjustment and reasoning through the fuzzy rule base, takes the error e and error change rate ec of the controlled object as input variables, combines the membership function and fuzzy reasoning to output the adjustment value of the PID parameters, and realizes precise regulation of the controlled system.
[0017] Preferably, the use of the Logistic chaotic sequence to initialize the population is as follows:
[0018] The formula of Logistics chaos mapping strategy is as follows:
[0019] x n+1 =μx n (1-x n ) (1)
[0020] In formula (1), x n is the value of the current iteration, and x n ∈(0,1), μ is the control parameter, which takes values between 3.57 and 4 to produce chaotic behavior, x n+1 Represents the value of the next iteration;
[0021] Use the Logistics Chaos Map to initialize the population position as follows:
[0022] X i =x ni ·(ub-lb)+lb (2)
[0023] In formula (2), X i is the position of the i-th sparrow, x ni is the chaotic value generated by Logistic mapping, lb and ub are the lower and upper bounds of the search space respectively.
[0024] Preferably, according to the present invention, in step S2, the fitness calculation function is defined according to the performance index of the fuzzy PID controller, and the fitness expression obtained by calculation is as follows:
[0025]
[0026] In formula (3), F x represents the fitness value of all sparrow individuals, f(x n,1 x n,2 ...x n,d ) represents the fitness value of a sparrow, n represents the number of sparrows, d represents that a sparrow has d dimensions, x n,d Represents an individual sparrow.
[0027] Preferably according to the present invention, in the step S3, the discoverer position calculation formula is:
[0028]
[0029] In formula (4), represents the new position of the updated sparrow, t is the number of the current iteration, T is the maximum number of iterations, α and Q are randomly generated constants, 0 < α ≤ 1, Q follows the standard normal distribution; L is a 1×d matrix with all elements being 1, and x ij represents the position information of the i-th sparrow in the j-th dimension, R2 represents the early warning value, and ST represents the safety value. When R2 < ST, it indicates that the current state is safe, and the discoverer can expand the search range. When R2 ≥ ST, it indicates that the current state is unsafe, and the sparrow population performs anti-predation and moves closer to the safe area;
[0030] The follower position calculation formula is:
[0031]
[0032] In formula (5), x b represents the sparrow with the highest fitness among all sparrows, x w represents the sparrow with the lowest fitness among all sparrows, and A + is a 1×d matrix, and the value of any element is 1 or -1, and n represents the number of sparrows.
[0033] Preferably according to the present invention, in the step S4, the position calculation formula of the scouting and warning sparrow is:
[0034]
[0035] In formula (6), both β and K are random numbers, β satisfies the standard normal distribution, -1 ≤ K ≤ 1, and f i represents the fitness value of the current sparrow, f g and f w represent the optimal and worst fitness values among all sparrows respectively, and γ is a very small parameter to avoid the denominator being 0.
[0036] Preferably according to the present invention, the Gaussian mutation formula is as follows:
[0037] X′ i = X i + σ·N(0, 1) (7)
[0038] In formula (7), X i is the original position of the i-th sparrow, and X′ iis the updated position of the i-th sparrow, σ is the standard deviation of the Gaussian distribution, which controls the amplitude of the variation, and N(0,1) is a standard normal distribution random number with a mean of 0 and a standard deviation of 1.
[0039] Preferably, according to the present invention, the chaotic disturbance formula is as follows:
[0040] X′ i =X i +η·x ni (ub-lb) (8)
[0041] In formula (8), η is a scaling factor used to control the intensity of the disturbance.
[0042] Preferably, according to the present invention, the fuzzy rule base is constructed by defining fuzzy sets and membership functions for the error e and error change rate ec of the controlled object, and defining fuzzy sets and membership functions for Kp, Ki, and Kd.
[0043] Compared with the prior art, the present invention has the following beneficial effects:
[0044] (1) The present invention improves the quality of the initial solution by initializing the population with an improved Logistic chaotic sequence, thereby enhancing the global search capability of the algorithm. This initialization method enables the algorithm to start searching from a wider solution space, increasing the possibility of finding the global optimal solution.
[0045] (2) The algorithm of the present invention introduces chaotic perturbations, especially Logistic chaotic perturbations, to prevent the algorithm from falling into local optimum. By applying the formula to generate chaotic variables and transmitting these chaotic variables to the solution space of the problem to be solved, the algorithm can perform chaotic perturbations on some individuals that are trapped in the local optimum, prompting the algorithm to jump out of the local restrictions and continue searching.
[0046] (3) The chaotic sparrow search algorithm of the present invention introduces the method of Gaussian mutation to strengthen the local search capability and improve the search accuracy. At the same time, a Logistic chaotic sequence is generated based on the solution of search stagnation, and this chaotic sequence is used to perform chaotic perturbations on individuals, which helps the algorithm maintain population diversity when approaching the global optimum and avoid premature convergence, thereby improving the convergence speed and stability of the algorithm.
[0047] (4) The fuzzy PID controller optimized by the chaotic sparrow search algorithm has achieved significant technical advantages in the seed drill, which is mainly reflected in improving the accuracy and uniformity of seeding, enhancing the adaptability to different soil and environmental conditions, reducing errors and overshoots in the seeding process, improving operation efficiency, reducing the labor intensity of farmers, and enhancing the robustness of the system. This control strategy effectively avoids local optimal solutions, improves the globality and convergence speed of the search, and provides an efficient and reliable technical support for modern agricultural mechanized seeding operations. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 The present invention is a flowchart of a method for optimizing the control of a corn planter motor based on chaotic sparrow search.
[0049] Figure 2 It is the fuzzy rule base of the KP described in the embodiment of the present invention.
[0050] Figure 3 It is the fuzzy rule base of KI described in the embodiment of the present invention.
[0051] Figure 4 It is the fuzzy rule base of KD described in the embodiment of the present invention.
[0052] Figure 5 It is a flow chart of the corn planter described in an embodiment of the present invention. DETAILED DESCRIPTION
[0053] The present disclosure is further described below in conjunction with the accompanying drawings and embodiments.
[0054] Embodiment 1,
[0055] This embodiment provides a method for optimizing the control of a corn planter motor based on a chaotic sparrow search algorithm, the method comprising:
[0056] The core idea of the sparrow search algorithm is to perform global search and local development by simulating the interaction between the finder and the follower in the process of sparrow foraging and the reaction mechanism of the sparrow when facing danger. However, due to the high dependence of the algorithm on the initial solution, different initial solutions may lead to different search results. In addition, due to its characteristics based on local search, it is easy to fall into the local optimal solution and fail to find the global optimal solution. This will greatly reduce the motor control effect, thereby affecting the work efficiency of the seed drill. Therefore, the present invention improves the sparrow search algorithm to address these problems. The specific implementation steps after the improvement are as follows:
[0057] 1. First, determine the population size, the number of discoverers, the number of sparrows for reconnaissance and early warning, the dimension of the objective function, the upper and lower bounds of the initial value, and the maximum number of iterations. A population consisting of n sparrows can be expressed as follows:
[0058]
[0059] Where n is the number of sparrows, d is the dimension of the problem, x n,d Represents an individual sparrow. The parameters of each individual sparrow are expressed as a candidate solution of the fuzzy PID controller, corresponding to a specific value of the PID parameters: Kp, Ki, and Kd.
[0060] 2. Use the Logistic chaotic sequence to initialize the population and generate initial solutions with randomness and diversity to prevent the algorithm from falling into the local optimum. The formula of the Logistics chaotic mapping strategy is as follows:
[0061] x n+1 =μx n (1-x n )
[0062] where x n is the value of the current iteration, and x n ∈(0,1), μ is the control parameter, which is usually taken between 3.57 and 4 to produce chaotic behavior, x n+1 The value for the next iteration.
[0063] Use the Logistics Chaos Map to initialize the population position:
[0064] X i =x ni ·(ub-lb)+lb
[0065] Where X i is the position of the i-th sparrow, x ni is the chaotic value generated by Logistic mapping, lb and ub are the lower and upper bounds of the search space respectively.
[0066] 3. Calculate the fitness of each individual sparrow in the sparrow population, select the sparrow individuals with the highest and lowest fitness as the global optimal solution and the local worst solution, and calculate the positions of the sparrow individuals with the highest and lowest fitness; the fitness calculation function is defined according to the performance indicators of the fuzzy PID controller (such as overshoot, response time and steady-state error), reflecting the optimization degree of the controller parameters to the system performance, and the fitness expression is:
[0067]
[0068] Among them, F X represents the fitness value of all sparrow individuals, f(x n,1 x n,2 ...x n,d) represents the fitness value of a sparrow, n represents the number of sparrows, d represents that a sparrow has d dimensions, and x n,d represents an individual sparrow.
[0069] 4. Set the discovery ratio, generally 15%. Select the number of discoverers from the sparrows according to the ratio and update their positions. Use them for global search to expand the exploration range of the population and update the positions of the discoverers to improve the global search ability. The remaining sparrows are followers, and their positions are updated by following the direction of the discoverers to develop potential solutions within a local range.
[0070] The formula for calculating the position of the discoverer is:
[0071]
[0072] where represents the new position of the sparrow after update, t is the current iteration number, and T is the maximum iteration number. α and Q are randomly generated constants, 0 < α ≤ 1, and Q follows the standard normal distribution. L is a matrix with one row and d columns and all elements being 1, and x ij represents the position information of the i-th sparrow in the j-th dimension. R2 represents the warning value, and ST represents the safety value. When R2 < ST, it means the current state is safe, and the discoverer can expand the search range. When R2 ≥ ST, it means the current state is unsafe, and the sparrow population performs anti-predation and moves closer to the safe area.
[0073] The formula for calculating the position of the follower is:
[0074]
[0075] where x b represents the sparrow with the highest fitness among all sparrows, and x w represents the sparrow with the lowest fitness among all sparrows. A + is a matrix with one row and d columns, and any element has a value of 1 or -1.
[0076] 5. Set the number of sparrows for scouting and early warning, generally 15% of the sparrow population, simulate the anti-predation behavior of sparrows when facing danger, and update their positions. The introduction of scouting and early warning further improves the adaptability and dynamic response ability of the population and avoids the algorithm falling into local optima.
[0077] The position update formula is as follows:
[0078]
[0079] where β and K are both random numbers, β follows the standard normal distribution, and -1 ≤ K ≤ 1. f i represents the fitness value of the current sparrow, f g and fw Represent the best and worst fitness values of all sparrows respectively. γ is a minimum parameter to avoid the denominator being 0.
[0080] 6. After each iteration, the fitness value f of each sparrow is recalculated i And the average fitness value of all sparrows f a .
[0081] When f i <f a When performing Gaussian mutation on individual sparrows, the search range of sparrows is expanded, and the fitness is recalculated. If the fitness of the sparrow after mutation is better than that before mutation, the position of the sparrow is updated, otherwise it remains unchanged. The Gaussian mutation formula is as follows:
[0082] X′ i =X i +σ·N(0,1)
[0083] where X i is the original position of the ith sparrow, X′ is the updated position of the ith sparrow, σ is the standard deviation of the Gaussian distribution, which controls the amplitude of the variation, and N(0,1) is a standard normal distribution random number with a mean of 0 and a standard deviation of 1.
[0084] When f i ≥f a The chaotic disturbance is performed on the individual sparrows to improve their optimization ability and calculate the fitness of the new position. When the fitness is better than before the disturbance, the position of the sparrow is updated, otherwise it remains unchanged. The chaotic disturbance formula is as follows:
[0085] X′ i =X i +η·x ni (ub-lb)
[0086] where η is a scaling factor that controls the strength of the perturbation.
[0087] 7. If the position of the individual sparrow changes in the previous step, recalculate the fitness value of each sparrow and the average fitness value of the sparrow population. If the current fitness value is less than the historical optimal value, update the global optimal solution; until the maximum number of iterations or other termination conditions are reached, stop the iteration and output the optimal solution. The flowchart of the chaotic sparrow search algorithm is as follows: Figure 1 shown.
[0088] Finally, the PID parameters of the fuzzy PID controller are updated according to the final global optimal solution: Kp, Ki, Kd; the fuzzy PID controller uses the updated optimized parameters to perform real-time adjustment and reasoning through the fuzzy rule base, taking the error e and error change rate ec of the controlled object as input variables, combining the membership function and fuzzy reasoning to output the adjustment values of the PID parameters, thereby achieving precise regulation of the controlled system.
[0089] Embodiment 2,
[0090] Fuzzy PID controller is an advanced control strategy that integrates traditional PID control and fuzzy logic. It adapts to the nonlinear and time-varying characteristics of the system by optimizing PID parameters in real time. The controller uses error e and error change rate ec as input. After fuzzification, it performs reasoning based on the preset fuzzy rule base. The fuzzy rule base of proportional gain Kp, integral gain Ki, and differential gain Kd is as follows: Figure 2 Figure 3 Figure 4 As shown. Finally, the adjustment value of the PID parameters is output through defuzzification. This control method not only inherits the accuracy of PID control, but also combines the adaptability and robustness of fuzzy logic, which is particularly suitable for dealing with uncertainty problems in complex systems.
[0091] Specifically, a fuzzy PID controller is first designed, in which the error e and error change rate ec of the controlled object are used as input variables, and the PID parameters: Kp, Ki, Kd are used as output variables. By defining fuzzy sets and membership functions for e and ec, and defining fuzzy sets and membership functions for Kp, Ki, Kd, a fuzzy rule base is constructed to achieve dynamic adjustment of PID parameters. Then, the sparrow population is initialized using Logistic chaotic mapping, and each sparrow represents a set of potential PID parameters. In the fitness evaluation stage, each set of PID parameters is applied to the control system, and its fitness is evaluated by preset performance indicators such as overshoot and stability time. Subsequently, the chaotic sparrow search algorithm is used to optimize the position in the population to find the optimal PID parameters. This process involves selecting the sparrow with the highest fitness as the global optimal solution, and updating the parameters of the fuzzy PID controller based on its results. Finally, the control output is calculated using the optimized PID parameters and applied to the controlled system, and the process is repeated until the stop condition is met, such as reaching the maximum number of iterations or fitness convergence. The present invention combines the flexibility of fuzzy control with the global search capability of the chaotic sparrow search algorithm to adaptively adjust PID parameters, thereby improving the stability and response speed of the control system and making it suitable for various complex and changeable working environments.
[0092] The newly generated fuzzy control rules are combined with the membership function to generate fuzzy PID control, and the optimized PID controller parameters are output to act on the stepper motor of the corn planter.
[0093] Specifically, after the corn planter system is started, the parameters such as the seeding distance, the gear ratio and the number of holes in the seeding disk are set first; the corn planter system enters the working state, and the speed of the machine can be obtained through the Hall sensor and these parameters are transmitted to the single-chip microcomputer, which calculates the target speed of the stepper motor and outputs a PWM signal to control the motor to start sowing; the encoder collects the actual speed of the stepper motor in real time, and feeds back the error e and error change rate ec of the corn planter system to the fuzzy PID controller, which corrects the PID parameters through the chaotic sparrow search algorithm to achieve fast and accurate control of the stepper motor to achieve the purpose of efficient sowing; the flow chart of the corn planter is as follows Figure 5 shown.
[0094] The present invention improves the sparrow search algorithm, optimizes the fuzzy PID controller parameters, and applies the optimized controller to the motor control of the corn planter, thereby realizing accurate and efficient regulation of the motor. Specifically, the improved SSA introduces a combination strategy of Logistic chaotic mapping, Gaussian variation and chaotic disturbance, which enhances the global search capability and local optimization accuracy of the algorithm, and ensures the stability and robustness of the algorithm in the optimization process. By optimizing the proportional gain Kp, integral gain Ki and differential gain Kd of the fuzzy PID controller, it can adapt to the complex operating environment of the corn planter in real time, and effectively deal with the nonlinearity and uncertainty problems of the system. The optimized fuzzy PID controller acts on the motor control of the planter, and can dynamically adjust the motor speed to ensure that the planter can achieve uniform sowing and stable operation under different soil conditions, thereby improving the uniformity, efficiency and quality of crop planting, reducing manual intervention and labor intensity, and greatly improving the level of agricultural mechanization.
Claims
1. A method for optimizing corn planter motor control based on chaotic sparrow search algorithm, characterized in that: The method comprises: S1. Determine the size of the sparrow population, the number of discoverers, the number of reconnaissance and warning individuals, the dimension of the objective function, the upper and lower bounds of the initial value, and the maximum number of iterations; use the Logistic chaotic sequence to initialize the sparrow population and generate an initial solution; the parameters of each sparrow individual are expressed as a candidate solution of the fuzzy PID controller, corresponding to a specific value of the PID parameter; S2. Calculate the fitness value of each individual in the sparrow population, select the sparrow individuals with the highest and lowest fitness as the global optimal solution and the local worst solution, and calculate the positions of the sparrow individuals with the highest and lowest fitness; S3, select P from the sparrow population in proportion n The first sparrow acts as a discoverer and updates the discoverer's position; the remaining sparrows act as followers and update their positions by following the discoverer's direction to develop potential solutions in a local area. S4, randomly select S from the sparrow population n The sparrows were used for reconnaissance and early warning, simulating the anti-predation behavior of the sparrows when facing danger, and updating their positions; S5. Recalculate the fitness value f of each sparrow i And the average fitness value of all sparrows f a ; When f i <f a Perform Gaussian mutation on individual sparrows and recalculate their fitness. If the fitness of the sparrow after mutation is better than that before mutation, update the position of the sparrow, otherwise it remains unchanged. When f i ≥f a The sparrows are subjected to chaotic disturbances and their fitness is recalculated. When the fitness is better than before the disturbance, the position of the sparrow is updated, otherwise it remains unchanged. S6. If the position of the individual sparrow in S5 changes, recalculate the fitness value of each sparrow and the average fitness value of the sparrow population. If the current fitness value is less than the historical optimal value, update the global optimal solution. When the maximum number of iterations or other termination conditions are reached, stop the iteration and output the optimal solution. S7. Update the PID parameters of the fuzzy PID controller according to the final global optimal solution. The fuzzy PID controller uses the updated optimized parameters to perform real-time adjustment and reasoning through the fuzzy rule base, takes the error e and error change rate ec of the controlled object as input variables, combines the membership function and fuzzy reasoning to output the adjustment value of the PID parameters, and realizes precise regulation of the controlled system.
2. The method for optimizing the motor control of a corn planter based on a chaotic sparrow search algorithm according to claim 1 is characterized in that: The use of Logistic chaotic sequence to initialize the population is as follows: The formula of Logistics chaos mapping strategy is as follows: x n+1 =μx n (1-x n ) (1) In formula (1), x n is the value of the current iteration, and x n ∈(0,1), μ is the control parameter, which takes values between 3.57 and 4 to produce chaotic behavior, x n+1 Represents the value of the next iteration; Use the Logistics Chaos Map to initialize the population position as follows: X i =x ni ·(ub-lb)+lb (2) In formula (2), X i is the position of the i-th sparrow, x ni is the chaotic value generated by Logistic mapping, lb and ub are the lower and upper bounds of the search space respectively.
3. The method for optimizing the motor control of a corn planter based on a chaotic sparrow search algorithm according to claim 1 is characterized in that: In step S2, the fitness calculation function is defined according to the performance index of the fuzzy PID controller, and the fitness expression obtained by calculation is as follows: In formula (3), F X represents the fitness value of all sparrow individuals, f(x n,1 x n,2 ...x n,d ) represents the fitness value of a sparrow, n represents the number of sparrows, d represents that a sparrow has d dimensions, x n,d Represents an individual sparrow.
4. The method for optimizing the control of a corn planter motor based on a chaotic sparrow search algorithm according to claim 1 is characterized in that: In step S3, the calculation formula of the finder's position is: In formula (4), represents the new position of the updated sparrow. t is the number of the current iteration, T is the maximum number of iterations, α and Q are randomly generated constants, where 0 < α ≤ 1 and Q follows the standard normal distribution; L is a 1×d matrix with all elements being 1, and x ij represents the position information of the i-th sparrow in the j-th dimension. R2 represents the warning value, and ST represents the safety value. When R2 < ST, it indicates that the current state is safe, and the discoverers can expand the search range. When R2 ≥ ST, it indicates that the current state is unsafe, and the sparrow population conducts anti-predation and moves closer to the safe area; The follower position calculation formula is: In formula (5), x b represents the sparrow with the highest fitness among all sparrows, x w A represents the sparrow with the worst fitness among all sparrows. + It is a matrix with 1 row and d columns, and the value of any element is 1 or -1, and n represents the number of sparrows.
5. The method for optimizing the control of a corn planter motor based on a chaotic sparrow search algorithm according to claim 1 is characterized in that: In step S4, the calculation formula for the sparrow position of the reconnaissance warning is: In formula (6), β and K are both random numbers, β satisfies the standard normal distribution, -1≤K≤1, f i Indicates the current sparrow's fitness value, f g and f w They represent the best and worst fitness values of all sparrows respectively, and γ is a minimum parameter to avoid the denominator being 0.
6. The method for optimizing the control of a corn planter motor based on a chaotic sparrow search algorithm according to claim 1 is characterized in that: The Gaussian variation formula is as follows: X′ i =X i +σ·N(0,1) (7) In formula (7), X i is the original position of the i-th sparrow, X′ i is the updated position of the i-th sparrow, σ is the standard deviation of the Gaussian distribution, which controls the amplitude of the variation, and N(0,1) is a standard normal distribution random number with a mean of 0 and a standard deviation of 1.
7. The method for optimizing the control of a corn planter motor based on a chaotic sparrow search algorithm according to claim 1, characterized in that: The chaotic perturbation formula is as follows: X′ i =X i +η·x ni (ub-lb) (8) In formula (8), η is a scaling factor used to control the intensity of the disturbance.
8. The method for optimizing the control of a corn planter motor based on a chaotic sparrow search algorithm according to claim 1 is characterized in that: The fuzzy rule base is constructed by defining fuzzy sets and membership functions for the error e and error change rate ec of the controlled object, and defining fuzzy sets and membership functions for Kp, Ki, and Kd.
Citation Information
Patent Citations
Unmanned aerial vehicle three-dimensional flight path planning method based on chaos adaptive sparrow search algorithm
CN112880688A
PID parameter optimization method based on improved sparrow algorithm
CN114397807A
Fuzzy PID magnetorheological brake control method based on improved sparrow algorithm
CN118117923A
EtherCAT clock synchronization method based on genetic algorithm and fuzzy PID
CN118605126A
Method for optimizing PID control parameters of semi-active suspension of vehicle
WO2024125584A1