A method for optimizing motor control of a corn planter based on chaotic sparrow search algorithm
By combining the chaotic sparrow search algorithm with fuzzy PID control, the motor control of the corn planter was optimized, solving the problems of uneven planting spacing and high manual labor intensity. This achieved efficient and precise control of the planter, improving crop yield and quality.
Patent Information
- Application Number
- CN202510036767.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2045-01-09
AI Technical Summary
Traditional corn planters suffer from uneven planting spacing and high manual labor intensity. Furthermore, PID controllers with fixed parameters struggle to achieve optimal control performance. Existing chaotic sparrow search algorithms are deficient in both global and local search capabilities.
By combining the chaotic sparrow search algorithm with fuzzy PID control, the population is initialized with a Logistic chaotic sequence, Gaussian mutation and chaotic disturbance are introduced, and the PID parameters of the fuzzy PID controller are optimized to achieve precise control of the seeder motor.
It improves sowing uniformity and adaptability, reduces manual labor intensity, increases crop yield and quality, and enhances the system's robustness and control precision.
Smart Images

Figure CN119882561B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of agricultural machinery controller optimization, and more particularly to a method for optimizing motor control of a corn planter based on a chaotic sparrow search algorithm. BACKGROUND
[0002] In the field of modern agricultural mechanization, traditional corn planters are limited in improving crop yield and quality due to uneven seeding spacing and high labor intensity. With the development of electric drive technology, electric drive corn planter control systems have gradually become a research hotspot, with high-precision sensors and embedded systems achieving improvements in seeding accuracy and efficiency. However, due to system nonlinearity and uncertainty, fixed parameter PID controllers are difficult to achieve optimal control. Fuzzy PID controllers handle uncertainty and nonlinearity through fuzzy logic to achieve online adjustment of PID parameters. The chaotic sparrow search algorithm, with its excellent global and local search capabilities, is used in optimization algorithms to improve search accuracy and convergence speed.
[0003] Chinese patent document CN112880688A discloses a method for three-dimensional path planning of an unmanned aerial vehicle based on a chaotic adaptive sparrow search algorithm, including the following steps: establishing a flight environment model according to the flight environment; establishing a UAV flight cost function to evaluate UAV path performance; improving the sparrow search algorithm using a chaotic initialization population strategy, an adaptive weight strategy, and a Cauchy-Gaussian hybrid mutation strategy, and proposing a chaotic adaptive sparrow search algorithm; using the chaotic adaptive sparrow search algorithm to plan the UAV path in a three-dimensional environment to obtain the optimal solution for UAV path planning and obtain the planning result. However, the cubic mapping chaotic operator used in this method has a certain degree of chaos, but compared to the Logistic chaotic mapping, its chaotic behavior has relatively weak ergodicity and randomness within the parameter range. This characteristic may result in uneven population initialization, affecting the global search ability of the algorithm. In addition, the cubic mapping has limited ability to escape local optima when performing local perturbation, and is prone to falling into local optimal solutions.
[0004] Therefore, the present application designs a method for optimizing motor control of a corn planter based on a chaotic sparrow search algorithm. SUMMARY
[0005] The present application aims to overcome at least one of the above-mentioned deficiencies of the prior art, and provides a method for optimizing motor control of a corn planter based on a chaotic sparrow search algorithm, which combines the chaotic sparrow search algorithm with fuzzy PID control to achieve more accurate and intelligent seeding control, thereby improving seeding uniformity and adaptability, reducing labor intensity, and ultimately improving crop yield and quality.
[0006] The detailed technical solutions of the present application are as follows:
[0007] A method for optimizing motor control of a corn seeder based on a chaotic sparrow search algorithm, the method comprising:
[0008] S1, determine the size of the sparrow population, the number of discoverers, the number of scout early 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, generate initial solutions with randomness and diversity; the parameters of each sparrow individual are represented as a candidate solution of a fuzzy PID controller, corresponding to a specific value of the PID parameters;
[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 n Sparrows from the sparrow population as discoverers in proportion, and update the positions of the discoverers; the remaining sparrows are used as followers, and the positions are updated by following the direction of the discoverers to develop potential solutions in a local range;
[0011] S4, randomly select S n Sparrows from the sparrow population for reconnaissance and early warning, simulate the anti-predation behavior of sparrows when they face danger, and update their positions;
[0012] S5, recalculate the fitness value f i of each sparrow and the average fitness value f a of all sparrows;
[0013] When f i < f a , perform Gaussian mutation on the sparrow individuals, and recalculate the fitness. If the fitness of the mutated sparrow is better than that before mutation, update the position of the sparrow, otherwise keep it unchanged;
[0014] When f i ≥ f a , perform chaotic disturbance on the sparrow individuals, and recalculate the fitness. When the fitness is better than before disturbance, update the position of the sparrow, otherwise keep it unchanged;
[0015] S6, if the position of the sparrow individual 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. Until the maximum number of iterations or other termination conditions are reached, stop iteration and output the optimal solution;
[0016] S7, updating the PID parameters of the fuzzy PID controller according to the final global optimal solution: Kp, Ki, and Kd; the fuzzy PID controller uses the updated and optimized parameters to perform real-time adjustment and reasoning through the fuzzy rule base, takes the error e and the error change rate ec of the controlled object as input variables, combines the membership function and the fuzzy reasoning to output the adjustment value of the PID parameters, and thus realizes accurate adjustment of the controlled system.
[0017] According to the application, the population is initialized by using the Logistic chaotic sequence, and the initialization is specifically as follows:
[0018] The formula of the Logistics chaotic 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, x n ∈(0,1), μ is a control parameter, and is taken as a value between 3.57 and 4 to generate chaotic behavior, and x n+1 represents the value of the next iteration.
[0021] The population position is initialized by using the Logistics chaotic mapping, and the initialization is specifically 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 a chaotic value generated by the Logistic mapping, lb and ub are respectively the lower bound and the upper bound of the search space.
[0024] According to the application, in step S2, the fitness calculation function is defined according to the performance index of the fuzzy PID controller, and the fitness expression calculated is as follows:
[0025]
[0026] In formula (3), F x represents the fitness values of all sparrow individuals, f(x n,1 x n,2 ...x n,d ) represents the fitness value of one sparrow, n represents the number of sparrows, d represents the number of dimensions of one sparrow, and x n,d represents one sparrow individual.
[0027] According to the application, preferably, in the step S3, the position calculation formula of the discoverer is:
[0028]
[0029] In the formula (4), x represents the new position of the sparrow after updating, t is the number of current iteration, T is the maximum number of iterations, and α and Q are random constants, 0<α≤1, Q is subject to a standard normal distribution; L is a 1-row d-column matrix with all elements being 1, x ij represents the position information of the i-th sparrow in the j-th dimension, R2 represents a warning value, and ST represents a 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 carries out anti-predation and moves to a safe area;
[0030] The position calculation formula of the follower is:
[0031]
[0032] In the 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, A + is a 1-row d-column matrix, and the value of any element is 1 or -1, and n represents the number of sparrows.
[0033] According to the application, preferably, in the step S4, the position calculation formula of the scout for early warning is:
[0034]
[0035] In the formula (6), β and K are random numbers, β satisfies a standard normal distribution, -1≤K≤1, f i represents the fitness value of the current sparrow, f g and f w respectively represent the optimal and worst fitness values of all sparrows, and γ is a minimum parameter to avoid a denominator of 0.
[0036] According to the application, preferably, the Gaussian mutation formula is as follows:
[0037] X′ i = X i +σ·N(0,1) (7)
[0038] In the 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 mean 0 and standard deviation 1.
[0039] According to the application, 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 for controlling the strength of the disturbance.
[0042] According to the application, the fuzzy rule base is constructed by defining fuzzy sets and membership functions for the error e and the 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 application has the following beneficial effects:
[0044] (1) The application improves the quality of the initial solution by initializing the population with the improved Logistic chaotic sequence, thereby enhancing the global search ability 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 application introduces chaotic disturbance, particularly Logistic chaotic disturbance, to avoid the algorithm falling into local optimum. By generating chaotic variables through formula (8) and carrying these chaotic variables to the solution space of the problem to be solved, the algorithm can perform chaotic disturbance on individuals that fall into local optimum, prompting the algorithm to jump out of local constraints and continue searching.
[0046] (3) The chaotic sparrow search algorithm of the application introduces the method of Gaussian variation to enhance the local search ability and improve the search precision. Meanwhile, the Logistic chaotic sequence is generated based on the stagnation solution, and chaotic disturbance is performed on the individuals with this chaotic sequence, which helps the algorithm maintain population diversity when approaching the global optimum, avoids premature convergence, and thereby improves the convergence speed and stability of the algorithm.
[0047] (4) The fuzzy PID controller optimized by the chaotic sparrow search algorithm has realized significant technical advantages on the seed drill, mainly reflected in improving the accuracy and uniformity of seeding, enhancing the adaptability to different soil and environmental conditions, reducing the error and overshoot in the seeding process, improving the work efficiency, reducing the labor intensity of farmers, and enhancing the robustness of the system. This control strategy effectively avoids local optimal solution, improves the globality and convergence speed of search, and provides an efficient and reliable technical support for modern agricultural mechanized seeding operation. BRIEF DESCRIPTION OF DRAWINGS
[0048] Figure 1 is a flow chart of the method for controlling the motor of the corn seed drill based on chaotic sparrow search optimization according to the present application.
[0049] Figure 2 is a fuzzy rule base of the KP according to the embodiment of the present application.
[0050] Figure 3 is a fuzzy rule base of the KI according to the embodiment of the present application.
[0051] Figure 4 is a fuzzy rule base of the KD according to the embodiment of the present application.
[0052] Figure 5 is a flow chart of the corn seed drill according to the embodiment of the present application. DETAILED DESCRIPTION
[0053] The present disclosure will be further described below in conjunction with the drawings and embodiments.
[0054] Embodiment 1,
[0055] The present embodiment provides a method for controlling the motor of a corn seed drill based on chaotic sparrow search algorithm optimization, which comprises:
[0056] The core idea of the sparrow search algorithm is to perform global search and local development by simulating the interaction between the discoverer and the follower in the sparrow foraging process 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 local search-based characteristics, it is easy to fall into local optimal solution and cannot find global optimal solution. This will greatly reduce the effect of motor control, thereby affecting the work efficiency of the seed drill. Therefore, the sparrow search algorithm is improved in view of these problems, and the specific implementation steps of the improved algorithm are as follows:
[0057] 1. First, determine the population size, the number of discoverers, the number of sparrow scouts, the dimension of the objective function, the upper and lower bounds of the initial value, and the maximum number of iterations. The 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 a sparrow individual, and the parameters of each sparrow individual represent a candidate solution for the fuzzy PID controller, corresponding to a specific value of the PID parameters: Kp, Ki, and Kd.
[0060] 2. Initialize the population using the Logistic chaotic sequence to generate initial solutions with randomness and diversity, avoiding the algorithm from falling into local optima. The formula for the Logistics chaotic mapping strategy is as follows:
[0061] x n+1 = μx n (1-x n )
[0062] where x n is the current iteration value, and x n ∈(0,1), μ is the control parameter, usually taking values between 3.57 and 4 to produce chaotic behavior, and x n+1 is the next iteration value.
[0063] Initialize the population position using the Logistics chaotic mapping:
[0064] X i = x ni ·(ub-lb)+lb
[0065] where X i is the position of the ith sparrow, x ni is the chaotic value generated by the Logistic mapping, and lb and ub are the lower and upper bounds of the search space, respectively.
[0066] 3. Calculate the fitness of each sparrow individual in the sparrow population, select the sparrow individual with the highest and lowest fitness as the global optimal solution and local worst solution, and calculate the position of the sparrow individual 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 on the system performance, and the fitness expression is:
[0067]
[0068] where F X represents the fitness values 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 a sparrow with d dimensions, x n,d represents a sparrow individual.
[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, expand the population exploration range, and update the positions of the discoverers to improve the global search ability; the remaining sparrows are used as followers to update their positions by following the direction of the discoverers to develop potential solutions in a local range.
[0070] The formula for calculating the position of the discoverer is:
[0071]
[0072] wherein represents the new position of the sparrow after updating, t is the number of current iterations, T is the maximum number of iterations. α and Q are random constants, 0 < α ≤ 1, Q follows a standard normal distribution. L is a 1-row d-column matrix with all elements being 1, x ij represents the position information of the ith sparrow in the jth dimension. R2 represents the warning value, ST represents the safety value, when R2 < ST, it means that the current state is safe, the discoverer can expand the search range, when R2 ≥ ST, it means that the current state is unsafe, the sparrow population carries out anti-predation and moves towards the safe area.
[0073] The formula for calculating the position of the follower is:
[0074]
[0075] wherein x b represents the sparrow with the highest fitness value among all sparrows, x w represents the sparrow with the worst fitness value among all sparrows. A + is a 1-row d-column matrix, and the value of any element is 1 or -1.
[0076] 5. Set the number of reconnaissance sparrows, generally 15% of the sparrow population, simulate the anti-predation behavior of sparrows when they are in danger, and update their positions; the introduction of reconnaissance warning further improves the adaptability and dynamic response ability of the population, avoiding the algorithm falling into local optimum.
[0077] The position updating formula is as follows:
[0078]
[0079] wherein β and K are random numbers, β satisfies a standard normal distribution, -1 ≤ K ≤ 1. f i represents the fitness value of the current sparrow, f g and fw Let represent the best and worst fitness values among all sparrows, respectively. γ is a minimal parameter to avoid a denominator of 0.
[0080] 6. Recalculate the fitness value f for each sparrow after each iteration. i And the average fitness value f of all sparrows a .
[0081] When f i <f a Gaussian mutation is performed on individual sparrows to expand the search range and recalculate fitness. If the fitness of the mutated sparrow is better than that of the original sparrow, its position is updated; otherwise, it remains unchanged. The Gaussian mutation formula is as follows:
[0082] X′ i =X i +σ·N(0,1)
[0083] Where X is i The original position of the i-th sparrow, X′ is the updated position of the i-th sparrow, σ is the standard deviation of the Gaussian distribution, which controls the magnitude of the variation, and N(0,1) is a standard normal random number with a mean of 0 and a standard deviation of 1.
[0084] When f i ≥f a A chaotic perturbation is applied to individual sparrows to improve their optimization ability, and the fitness of the new position is calculated. If the fitness is better than before the perturbation, the sparrow's position is updated; otherwise, it remains unchanged. The chaotic perturbation formula is as follows:
[0085] X′ i =X i +η·x ni (ub-lb)
[0086] Where η is a scaling factor used to control the intensity of the disturbance.
[0087] 7. If the position of an 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 best, update the global optimal solution. Iteration continues until the maximum number of iterations or other termination conditions are reached, at which point the iteration stops and the optimal solution is output. The flowchart of the chaotic sparrow search algorithm is shown below. Figure 1 As shown.
[0088] Finally, 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 and optimized parameters to perform real-time adjustment and reasoning through the fuzzy rule base, taking the error e and error rate ec of the controlled object as input variables, combining the membership function and fuzzy reasoning to output the adjustment value of the PID parameters, and achieving precise adjustment of the controlled system.
[0089] Example 2,
[0090] The fuzzy PID controller is an advanced control strategy that integrates traditional PID control and fuzzy logic, which adjusts PID parameters in real time to adapt to the nonlinear and time-varying characteristics of the system. The controller uses error e and error rate ec as inputs, which are processed through fuzzification, and then inferences are made based on the pre-set fuzzy rule base. The fuzzy rule base for proportional gain Kp, integral gain Ki, and derivative gain Kd is shown in Figure 2 Figure 3 Figure 4 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, making it particularly suitable for handling uncertainty problems in complex systems.
[0091] Specifically, first, a fuzzy PID controller is designed, in which the error e and error rate ec of the controlled object are input variables, and the PID parameters: Kp, Ki, Kd are 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 the 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 pre-set performance indicators such as overshoot and settling time. Then, the chaotic sparrow search algorithm is used to optimize the positions 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 according to its results. Finally, the optimized PID parameters are used to calculate the control output, which is applied to the controlled system, and the process is repeated until the stopping condition is met, such as reaching the maximum number of iterations or the fitness converges. By combining the flexibility of fuzzy control and the global search ability of the chaotic sparrow search algorithm, the invention can adaptively adjust the PID parameters, thereby improving the stability and response speed of the control system, making it suitable for various complex and variable working environments.
[0092] The newly generated fuzzy control rule is combined with the membership function to generate a fuzzy PID control, and the optimized PID controller parameter output is applied to the stepper motor of the corn planter.
[0093] Specifically: after the corn planter system is started, the seeding distance, gear transmission ratio and the number of holes of the seeding disc and other parameters are set first; the corn planter system enters the working state, the speed of the machine running can be obtained through the Hall sensor and these parameters are transmitted to the single-chip microcomputer, the target speed of the stepper motor is calculated by the single-chip microcomputer and the PWM signal is output to control the motor to start seeding; the actual speed of the stepper motor is collected in real time by the encoder, and the error e and error change rate ec of the corn planter system are fed back to the fuzzy PID controller, the fuzzy PID controller corrects the PID parameters through the chaotic sparrow search algorithm, realizes the fast and accurate control of the stepper motor, and achieves the purpose of efficient seeding; the flow chart of the corn planter is as shown in Figure 5
[0094] The improved sparrow search algorithm is used to optimize the fuzzy PID controller parameters, and the optimized controller is applied to the motor control of the corn planter, so that the accurate and efficient adjustment of the motor is realized. Specifically, the improved SSA introduces the combination strategy of Logistic chaotic mapping, Gaussian mutation and chaotic disturbance, enhances the global search ability and local optimization precision 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, effectively cope with the nonlinearity and uncertainty of the system. The optimized fuzzy PID controller is applied to the motor control of the planter, which can dynamically adjust the motor speed, ensure uniform seeding and stable operation of the planter under different soil conditions, improve the uniformity, efficiency and quality of crop planting, reduce manual intervention and labor intensity, and greatly improve the level of agricultural mechanization.
Claims
1. A method for optimizing motor control of a corn planter based on a chaotic sparrow search algorithm, characterized by, The method comprises: S1, determining the size of the sparrow population, the number of discoverers, the number of scout early warning individuals, the target function dimension, the upper and lower bounds of the initial value, and the maximum number of iterations; using a Logistic chaotic sequence to initialize the sparrow population to generate an initial solution; the parameters of each sparrow individual are represented as a candidate solution of a fuzzy PID controller, corresponding to a specific value of the PID parameters; S2, calculating the fitness value of each individual in the sparrow population, selecting the sparrow individuals with the highest and lowest fitness as the global optimal solution and the local worst solution, and calculating the positions of the sparrow individuals with the highest and lowest fitness; S3. Select sparrows proportionally from the sparrow population. One sparrow acts as the discoverer and updates its position; the remaining sparrows act as followers and update their positions by following the discoverer's direction, thus developing potential solutions within a local area. S4, randomly select from sparrow population Only sparrow reconnaissance warning, simulation sparrow face danger when anti-predation behavior, and update its location; S5, recalculating the fitness value of each sparrow and the average fitness value of all sparrows ; When Gaussian variation is performed on the sparrow individual, and the fitness is recalculated. If the fitness of the sparrow after variation is better than that before variation, the position of the sparrow is updated, otherwise it remains unchanged; When chaos disturbance is carried out on the sparrow individual, and the fitness is recalculated. When the fitness is better than before the disturbance, the sparrow position is updated, otherwise it remains unchanged; S6, if the position of the sparrow individual changes in S5, then recalculate the fitness value of each sparrow and the average fitness value of the sparrow population, and if the current fitness value is less than the historical optimal value, then update the global optimal solution; until the maximum number of iterations or other termination conditions are reached, then stop iteration and output the optimal solution; S7, updating the PID parameters of the fuzzy PID controller according to the final global optimal solution, and outputting the PID parameters to the stepper motor of the corn planter, specifically: after the corn planter system is started, first set the seeding distance, gear transmission ratio and hole number parameters of the seeding disc; the corn planter system enters the working state, the speed of the machine running is obtained through the Hall sensor and these parameters are transmitted to the single-chip microcomputer, the target speed of the stepper motor is calculated by the single-chip microcomputer and the PWM signal is output to control the motor to start seeding; the actual speed of the stepper motor is collected in real time by the encoder, and the error e and error rate ec of the corn planter system are fed back to the fuzzy PID controller, and the fuzzy PID controller corrects the PID parameters through the chaotic sparrow search algorithm to realize the control of the stepper motor.
2. The method for optimizing motor control of a corn planter based on chaotic sparrow search algorithm according to claim 1, characterized in that, The population is initialized using a Logistic chaotic sequence as follows: The formula of the Logistics chaotic mapping strategy is as follows: (1) In formula (1), is the value of the current iteration, and ∈(0, 1), is a control parameter, taking values between 3.57 and 4 to produce chaotic behavior, denotes the value of the next iteration; The population position is initialized using the Logistics chaotic mapping as follows: (2) In formula (2), is the position of the i-th sparrow, is a chaotic value generated by a Logistic map, and are the lower and upper bounds of the search space, respectively.
3. The method for optimizing motor control of a corn planter based on chaotic sparrow search algorithm according to claim 1, characterized in that, In the step S2, the calculation function of the fitness is defined according to the performance indicators of the fuzzy PID controller, and the fitness expression obtained by calculation is as follows: (3) In formula (3), denotes the fitness value of all Sparrows, denotes the fitness value of a Sparrow, n denotes the number of Sparrows, and d represents the number of dimensions of a Sparrow, denotes a Sparrow individual.
4. The method for optimizing motor control of a corn planter based on a chaotic sparrow search algorithm according to claim 1, characterized in that, In the step S3, the discoverer position calculation formula is: (4) In formula (4), represents the new position of the updated sparrow, t is the number of the current iteration, and T is the maximum number of iterations, and is a randomly generated constant, 0 1, Q follows a standard normal distribution; L is a 1-row d-column matrix and all elements are 1, represents the position information of the i-th sparrow in the j-th dimension, represents a warning value, ST represents a safety value, when it indicates that the current state is safe, and the discoverer can expand the search range, when it indicates that the current state is unsafe, and the sparrow population carries out anti-predation and moves towards the safety area; The follower position calculation formula is: (5) In formula (5), denotes the pheasant with the highest fitness among all pheasants, denotes the pheasant with the lowest fitness among all pheasants, is a 1-row d-column matrix, and the value of any element is 1 or -1, and n denotes the number of pheasants.
5. The method for optimizing motor control of a corn planter based on chaotic sparrow search algorithm according to claim 4, characterized in that, In the step S4, the scout early warning sparrow position calculation formula is: (6) In equation (6), Both K and K are random numbers. It follows a standard normal distribution, -1 1, This represents the current fitness value of the sparrow. Let represent the best and worst fitness values among all sparrows, respectively. To minimize the parameter, avoid having a denominator of 0.
6. The method for optimizing motor control of a corn planter based on chaotic sparrow search algorithm according to claim 2, characterized in that, The Gaussian variation formula is as follows: (7) In formula (7), is the original position of the i-th pion, is the updated position of the i-th pion, is the standard deviation of the Gaussian distribution, which controls the magnitude of the variation, is a standard normal distribution random number with a mean of 0 and a standard deviation of 1.
7. The method for optimizing motor control of a corn planter based on chaotic sparrow search algorithm according to claim 6, characterized in that, The chaotic disturbance formula is as follows: (8) In formula (8), is a scaling factor for controlling the strength of the perturbation.
8. The method for optimizing motor control of a corn planter based on chaotic sparrow search algorithm according to claim 1, characterized in that, The fuzzy PID controller uses the updated PID parameters to adjust and reason in real time through the fuzzy rule base; the fuzzy rule base is constructed by defining fuzzy sets and membership functions for the error e and error rate ec of the corn planter system, and defining fuzzy sets and membership functions for the proportional gain Kp, integral gain Ki and differential gain Kd of the fuzzy PID controller.
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
EtherCAT clock synchronization method based on genetic algorithm and fuzzy PID
CN118605126A