A seabed base operation and maintenance control method based on PID-genetic algorithm optimization

By integrating real-time PID response with global optimization using genetic algorithms, a seabed-based operation and maintenance control method was developed. This optimized PID parameters and solved the problem of insufficient control stability and accuracy of UAVs in complex marine environments, enabling efficient and stable operation of UAVs in seabed-based operation and maintenance tasks.

CN122431094APending Publication Date: 2026-07-21STATE OCEAN TECH CENT
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
STATE OCEAN TECH CENT
Filing Date
2026-06-24
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

In existing UAV seabed-based operation and maintenance control technologies, pure genetic algorithms have poor real-time performance, and conventional PID parameters have poor adaptive performance due to their fixed parameters. These make it difficult to achieve real-time response and adaptive optimization of UAV control in complex and ever-changing marine environments, resulting in insufficient control stability and accuracy.

Method used

By integrating real-time PID response with global optimization using genetic algorithms, a six-degree-of-freedom multi-loop PID controller is constructed. Through a bidirectional mapping and encoding mechanism between PID parameters and chromosomes, a targeted gene recombination strategy is designed to optimize PID parameters. Combined with a multi-objective fitness function and parameter constraint penalty terms, adaptive adjustment is achieved.

Benefits of technology

It significantly improves the control stability, operational accuracy, and energy efficiency of UAVs in complex marine environments, ensuring the stability and efficient operation of UAVs in seabed-based maintenance tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122431094A_ABST
    Figure CN122431094A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of marine observation equipment operation and maintenance and unmanned aerial vehicle intelligent control, and discloses a seabed base operation and maintenance control method based on PID-genetic algorithm optimization, which comprises the following steps: S1, a PID controller is constructed, six independent PID control loops are designed, three loops are used for respectively controlling the X-axis, Y-axis and Z-axis positions of an unmanned aerial vehicle, and the other three loops are used for respectively controlling the pitch angle, roll angle and yaw angle attitudes of the unmanned aerial vehicle; S2, the parameter constraint range of each link of the PID controller is set; and S3, a one-way mapping coding mechanism of the PID parameters and the chromosomes is established, and the proportional gain, integral gain and differential gain of each PID control loop are sequentially coded into gene segments and the like. The method combines the real-time response advantages of the PID and the global optimization capability of the genetic algorithm, realizes adaptive intelligent optimization of the PID parameters, and improves the control stability, operation accuracy and operation and maintenance efficiency of the unmanned aerial vehicle in a complex marine environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of marine observation equipment operation and maintenance and unmanned aerial vehicle (UAV) intelligent control technology, specifically to a seabed-based operation and maintenance control method optimized by PID-genetic algorithm. Background Technology

[0002] Ocean observation is a fundamental means of understanding and managing the ocean. Seabed-based observation systems, as core nodes of the seabed scientific observation network, are deployed long-term on the seabed, integrating various sensors such as ADCP and CTD to acquire long-term continuous data on ocean hydrology, geology, and ecology. In recent years, unmanned aerial vehicles (UAVs) have become increasingly widely used in offshore infrastructure operation and maintenance due to their advantages of flexible deployment, high efficiency, low cost, and all-weather operation capabilities.

[0003] The marine environment is complex and ever-changing, with sudden changes in wind conditions and frequent wave disturbances, placing extremely high demands on the real-time performance, stability, and adaptability of UAV control systems. Existing UAV control technologies for seabed-based maintenance and inspection mainly fall into two categories: one is pure genetic algorithm control. While genetic algorithms possess powerful global search capabilities and can optimize control parameters offline, they have inherent drawbacks such as slow convergence speed and poor real-time performance. They cannot be directly applied to the real-time feedback loop of UAV flight control, and in the rapidly changing marine environment, they struggle to cope with sudden disturbances, easily leading to control lag and instability risks. The other category is conventional PID control. Although conventional PID control can achieve real-time response, its parameters are fixed values ​​set manually through trial and error. This makes it unable to adapt to the changing marine environment and difficult to achieve an optimal balance among conflicting objectives such as position accuracy, attitude stability, response speed, and energy consumption control, limiting the overall operational efficiency of UAVs in complex seabed-based maintenance tasks.

[0004] In summary, existing technologies suffer from technical shortcomings such as poor real-time performance of pure genetic algorithms, poor adaptability of fixed conventional PID parameters, and lack of deep integration and collaborative optimization between path planning and flight control. There is an urgent need for a seabed-based operation and maintenance control method that integrates real-time PID control with global optimization of genetic algorithms and can adaptively optimize PID parameters to cope with complex and ever-changing marine conditions and improve the stability and accuracy of UAV operation and maintenance inspection. Summary of the Invention

[0005] To address the shortcomings of existing technologies, the present invention aims to provide a seabed-based operation and maintenance control method based on PID-genetic algorithm optimization. This method integrates the advantages of real-time response of PID with the global optimization capability of genetic algorithm to achieve adaptive intelligent optimization of PID parameters, thereby improving the control stability, operational accuracy and operation and maintenance efficiency of UAVs in complex marine environments.

[0006] To achieve the above objectives, the present invention provides the following technical solution: A seabed-based operation and maintenance control method based on PID-genetic algorithm optimization includes: S1, constructing a PID controller and designing six independent PID control loops. Three loops control the X-axis, Y-axis, and Z-axis positions of the UAV, respectively, and the other three loops control the UAV's pitch angle, roll angle, and yaw angle attitude, respectively; S2, setting the parameter constraint range for each link of the PID controller; S3, establishing a one-way mapping encoding mechanism between PID parameters and chromosomes, encoding the proportional gain, integral gain, and derivative gain of each PID control loop into gene segments sequentially, and initially generating an initial population containing a preset number of chromosomes; S4, performing targeted gene recombination operations on the chromosomes in the initial population, screening for dominant chromosomes in the initial population, classifying the dominant chromosomes according to control characteristics, and performing gene recombination using differentiated recombination rules for proportional gene segments, integral gene segments, and derivative gene segments, respectively, and performing parameter compliance verification and gene repair on the recombined chromosomes; the dominant chromosomes... The initial population consists of N% of chromosomes with the highest fitness. S5: Construct a fitness function based on PID control performance, using UAV position control accuracy, attitude control stability, system response speed, and operational energy consumption as indicators. Introduce parameter constraint penalties to penalize parameters exceeding the range, and calculate the fitness value of each recombined chromosome. S6: Filter the recombined chromosomes based on their fitness values, retaining the top M% of chromosomes for the next iteration. S7: Repeat steps S4 to S6 until the iteration termination condition is met, obtaining the optimal chromosome. The iteration termination condition is: the rate of change of chromosome fitness is less than a preset threshold for ten consecutive generations or the number of iterations reaches a preset upper limit. S8: Reverse decode the optimal chromosome to restore the optimal proportional gain, optimal integral gain, and optimal derivative gain corresponding to the six PID control loops. S9: Load the optimal PID parameters into the PID controller, which drives the UAV to perform seabed-based maintenance tasks.

[0007] In this invention, preferably, in S1, the control formula for each PID control loop is: ; in, Let i be the control vector of the i-th PID control loop. The deviation between the target value and the feedback value of the i-th PID control loop is given. Let i be the proportional gain of the i-th PID control loop. Let i be the integral gain of the i-th PID control loop. Let be the differential gain of the i-th PID control loop.

[0008] In this invention, preferably, in S3, the one-way mapping encoding mechanism between PID parameters and chromosomes is as follows: a single PID parameter corresponds to a single gene locus, a complete set of six PID control loop parameters corresponds to a chromosome, each chromosome contains six sets of PID gene clusters, and each set of PID gene clusters corresponds to the proportional gene segment, integral gene segment, and differential gene segment of a PID control loop.

[0009] In this invention, preferably, in S4, the dominant chromosomes are classified according to their control characteristics. The classification types include: proportional gene segment dominant chromosomes, integral gene segment dominant chromosomes, and differential gene segment dominant chromosomes. The proportional gene segment dominant chromosomes are chromosomes with a proportional weight score of not less than Q% in the fitness score, the integral gene segment dominant chromosomes are chromosomes with an integral weight score of not less than Q% in the fitness score, and the differential gene segment dominant chromosomes are chromosomes with a differential weight score of not less than Q% in the fitness score.

[0010] In this invention, preferably, in S4, the differential recombination rules include: For proportional gene segments, a single-point recombination rule is adopted, wherein the single-point recombination rule is: randomly select two dominant chromosomes for proportional gene segments, randomly select one recombination point from the gene loci corresponding to the proportional gene segment, and exchange the proportional gene fragments after the recombination point; For integral gene segments, a uniform recombination rule is adopted, wherein the uniform recombination rule is: randomly select two dominant chromosomes for integral gene segments, split the gene loci corresponding to the integral gene segments at equal intervals, and alternately select integral gene fragments from the two chromosomes for recombination; For differential gene segments, a local fragment recombination rule is adopted, wherein the local fragment recombination rule is: randomly select two dominant chromosomes for differential gene segments, and only exchange local gene fragments in the differential gene segments that are strongly correlated with overmodulation inhibition.

[0011] In this invention, preferably, in step S4, the parameter compliance verification and gene repair of the recombinant chromosome includes: S41, traversing all gene loci of the recombinant chromosome and checking whether the value of each gene locus exceeds the parameter constraint range; S42, determining gene loci with values ​​greater than the corresponding parameter upper limit or less than the corresponding parameter lower limit as out-of-bounds loci; S43, correcting the values ​​of all out-of-bounds loci to the corresponding parameter upper or lower limit, so that the values ​​of all gene loci fall within the preset constraint range.

[0012] In this invention, preferably, in S5, the fitness function expression is: + + - , Where F(X) is the fitness value, ω1, ω2, ω3, and ω4 are preset weight coefficients, and J position J is a location control indicator.attitude J is the attitude control index. stability J is a system stability index. energy Let λ be the energy consumption index for the operation, λ be the penalty coefficient, and P(X) be the parameter constraint penalty function.

[0013] In this invention, preferably, the calculation formula for the position control index is as follows: , Among them, J position For location control indicators, t s,i Let σ be the settling time of the i-th PID control loop. s,i Let e ​​be the standard deviation of the error of the i-th PID control loop. s,i Let be the steady-state error of the i-th PID control loop; The formula for calculating attitude control parameters is: , Among them, J attitude For attitude control, t s,i Let σ be the settling time of the i-th PID control loop. s,i Let e ​​be the standard deviation of the error of the i-th PID control loop. s,i Let be the steady-state error of the i-th PID control loop; The formula for calculating the system stability index is: , Among them, J stability λ is a system stability index. i These are the characteristic values ​​of the closed-loop system. Operational energy consumption index J energy The calculation formula is: , Among them, J energy Here, T represents the total duration of the seabed-based maintenance task, and u(t) represents the control vector of the PID control loop. The formula for calculating the parameter constraint penalty function P(X) is as follows: , Where P(X) is the parameter constraint penalty function, Let i be the proportional gain of the i-th PID control loop. Let i be the integral gain of the i-th PID control loop. Let be the differential gain of the i-th PID control loop.

[0014] In this invention, preferably, in step S8, the reverse decoding of the optimal chromosome includes: S81, splitting the optimal chromosome into six independent PID control loop parameter groups according to the degree-of-freedom cluster and P / I / D type, with each parameter group corresponding to a PID control loop of one degree of freedom; S82, extracting the values ​​corresponding to each gene locus from each parameter group after splitting, and obtaining the proportional gain, integral gain, and derivative gain of the corresponding PID control loop respectively; S83, directly assigning the extracted proportional gain, integral gain, and derivative gain to the parameter register of the corresponding PID control loop to complete the loading of control parameters; S84, performing linkage verification on the assigned PID parameters to eliminate the risk of system oscillation and integral saturation.

[0015] In this invention, preferably, the initial population has a preset number of 50 chromosomes, and the preset upper limit for the number of iterations is 50 generations; the parameter constraint range includes: proportional gain K. p,i The value ranges from 0.1 to 100, and the integral gain K i,i The value ranges from 0.01 to 10, and the differential gain K d,i The value ranges from 0.01 to 50, where i is a positive integer, 1≤i≤6, corresponding to six PID control loops.

[0016] Compared with the prior art, the beneficial effects of the present invention are: This method deeply integrates real-time PID control with global optimization using a genetic algorithm, constructing a bidirectional mapping mechanism between PID parameters and chromosomes. It also designs targeted gene recombination strategies for the control characteristics of proportional, integral, and derivative components, achieving directional synergistic optimization of system response speed, steady-state accuracy, and overshoot suppression. Simultaneously, a six-degree-of-freedom multi-loop PID controller, combined with integral separation and differential filtering, effectively suppresses integral saturation and high-frequency noise interference. Furthermore, by incorporating a multi-objective fitness function that includes parameter constraint penalties, the optimized PID parameters not only possess engineering feasibility but also adaptively adjust under complex and variable marine conditions, significantly improving the control stability, operational accuracy, and energy efficiency of UAV-based seabed maintenance. Attached Figure Description

[0017] Figure 1 This is a flowchart of a seabed-based operation and maintenance control method based on PID-genetic algorithm optimization according to the present invention.

[0018] Figure 2 This is a flowchart illustrating the parameter compliance verification and gene repair of the recombined chromosome in S4 of the seabed-based operation and maintenance control method based on PID-genetic algorithm optimization of the present invention.

[0019] Figure 3This is a flowchart illustrating the reverse decoding of the optimal chromosome in S8 of the seabed-based operation and maintenance control method based on PID-genetic algorithm optimization according to the present invention. Detailed Implementation

[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0022] Please see Figure 1 A preferred embodiment of the present invention provides a seabed-based operation and maintenance control method based on PID-genetic algorithm optimization, comprising: S1. Construct a PID controller and design six independent PID control loops. Three loops control the position of the UAV on the X-axis, Y-axis, and Z-axis, respectively, and the other three loops control the UAV's pitch angle, roll angle, and yaw angle attitude, respectively.

[0023] To address the six-degree-of-freedom motion characteristics of unmanned aerial vehicles (UAVs) in complex marine environments, this invention achieves layered, independent, and precise control of position and attitude. Due to the complex disturbances in the marine environment, such as continuous gusts of wind, wave disturbances, and ocean currents, a single overall controller cannot simultaneously ensure both position tracking accuracy and attitude stability. Therefore, this invention decomposes the UAV's spatial motion into position control in three orthogonal directions and attitude control in three angular directions. Each degree of freedom corresponds to an independent PID loop, with each loop having independent feedback signals, control logic, and output channels. These loops operate independently and collaboratively, enabling rapid response to position deviations and stabilization of the aircraft's attitude under strong disturbance conditions. This avoids problems such as overall control lag, attitude drift, or loss of position control, providing a clear underlying control architecture for subsequent parameter optimization. This ensures that the UAV possesses basic motion controllability and stability in maintenance tasks such as seabed inspection, hovering monitoring, and data acquisition.

[0024] Specifically, the control formula for each PID control loop is as follows: ; in, Let i be the control vector of the i-th PID control loop. The deviation between the target value and the feedback value of the i-th PID control loop is given. Let i be the proportional gain of the i-th PID control loop. Let i be the integral gain of the i-th PID control loop. Let be the differential gain of the i-th PID control loop.

[0025] S2 sets the parameter constraint range for each component of the PID controller.

[0026] Based on the engineering feasibility of PID control theory and the actual control requirements of marine unmanned aerial vehicles (UAVs), the values ​​of PID parameters directly determine the dynamic performance and stability of the control system. Proportional gain K... p,i An excessively large integral gain K can easily cause severe system oscillations and a surge in overshoot, while an excessively small gain will result in a slow system response and insufficient tracking accuracy. i,i An excessively large differential gain (K) can cause integral saturation and excessively rapid elimination of steady-state error, leading to jitter. An excessively small differential gain (K) cannot effectively eliminate long-term steady-state deviations. d,i Excessive parameters can amplify high-frequency noise and introduce additional interference, while insufficient parameters cannot effectively suppress system overshoot and improve dynamic damping. Therefore, by setting reasonable upper and lower limits for parameters, it is possible to effectively avoid the generation of invalid parameters that exceed the engineering safety range during the iterative optimization process of the genetic algorithm, ensuring that all optimized PID parameters are practically executable. At the same time, it provides clear numerical boundaries for subsequent encoding, recombination, and screening, ensuring the stability and effectiveness of the algorithm optimization process.

[0027] Preferably, the parameter constraint range can be set as: proportional gain K p,i The value ranges from 0.1 to 100, and the integral gain K i,i The value ranges from 0.01 to 10, and the differential gain K d,i The value ranges from 0.01 to 50, where i is a positive integer, 1≤i≤6, corresponding to six PID control loops.

[0028] S3. Establish a one-way mapping and coding mechanism between PID parameters and chromosomes, and encode the proportional gain, integral gain and derivative gain of each PID control loop into gene fragments in sequence to initially generate an initial population containing a preset number of chromosomes.

[0029] This step establishes a bridge between PID control parameters and genetic algorithm evolutionary units. Since the computational objects of genetic algorithms are chromosome sequences composed of discrete gene loci, they cannot directly identify and process continuous numerical PID parameters. Therefore, standardized coding rules are needed to convert PID parameters into gene segments operable by the genetic algorithm. This invention employs a mapping method where a single parameter corresponds to a single gene locus, and a single set of six-loop PID parameters corresponds to a single chromosome. Each chromosome contains six independent PID gene clusters, and each gene cluster consists of proportional, integral, and differential gene loci for the corresponding loop, totaling eighteen gene loci, fully carrying a set of six-degree-of-freedom PID control parameter information. Specifically, the one-way mapping coding mechanism between PID parameters and chromosomes is as follows: a single PID parameter corresponds to a single gene locus, a complete set of six PID control loop parameters corresponds to one chromosome, each chromosome contains six sets of PID gene clusters, and each set of PID gene clusters corresponds to the proportional, integral, and differential gene segments of a PID control loop. Preferably, the initial population is preset to 50 chromosomes, but other numbers can be preset as needed. By randomly assigning values ​​to generate diverse parameter combinations within the parameter constraints, we can ensure that the initial population covers a sufficient parameter space and has rich gene diversity, while avoiding the algorithm from getting stuck in a local optimum due to an excessively narrow initial search range, thus providing a sufficient candidate sample base for subsequent genetic evolution.

[0030] S4. Targeted gene recombination is performed on chromosomes in the initial population to screen for dominant chromosomes. Dominant chromosomes are then classified according to their control characteristics. Differential recombination rules are applied to proportional gene segments, integral gene segments, and differential gene segments for gene recombination. The recombined chromosomes are then subjected to parameter compliance verification and gene repair. The dominant chromosomes are the chromosomes with the highest fitness in the initial population, which are in the top N% of the population.

[0031] Unlike the random crossover and recombination of traditional genetic algorithms, targeted gene recombination achieves precise fusion and targeted enhancement of dominant gene segments through a complete process of screening, classification, differentiated recombination, and verification and repair. First, the top N% of high-quality chromosomes in terms of fitness are selected from the initial population as parent samples, excluding individuals with poor performance to ensure that evolution is based on high-quality genes. The value of N can be set according to actual conditions; in this embodiment, N=30 is used as an example, meaning the dominant chromosomes are the top 30% of chromosomes in terms of fitness in the initial population. Then, based on control characteristics, the dominant chromosomes are divided into three categories: proportional gene segment advantage, integral gene segment advantage, and differential gene segment advantage, corresponding to performance characteristics such as fast response speed, high steady-state accuracy, and strong overshoot suppression, respectively. Differential recombination rules are then designed for the different control effects of the three gene segments. Proportional gene segments use single-point recombination to retain fast response characteristics, integral gene segments use uniform recombination to avoid oscillations caused by integral mutations, and differential gene segments use local fragment recombination to maintain system damping stability. After recombination, all gene loci of the newly generated chromosomes are traversed, and the values ​​are checked one by one to see if they exceed the preset parameter constraints. Out-of-bounds sites are automatically corrected to the corresponding boundary values ​​to complete gene repair. This ensures that all chromosome parameters after recombination meet engineering safety requirements, avoids invalid parameters from entering subsequent iteration processes, and achieves synergistic optimization of the three core performance aspects: response speed, steady-state accuracy, and overshoot suppression.

[0032] Dominant chromosomes are classified according to their control characteristics. The classification types include: proportional gene segment dominant chromosomes, integral gene segment dominant chromosomes, and differential gene segment dominant chromosomes. A proportional gene segment dominant chromosome is one whose proportional weight score in the fitness score is not less than Q%. An integral gene segment dominant chromosome is one whose integral weight score in the fitness score is not less than Q%. A differential gene segment dominant chromosome is one whose differential weight score in the fitness score is not less than Q%. The value of Q can be set according to the actual situation. In this embodiment, Q is taken as 80, meaning: a proportional gene segment dominant chromosome is one whose proportional weight score in the fitness score is not less than 80%, an integral gene segment dominant chromosome is one whose integral weight score in the fitness score is not less than 80%, and a differential gene segment dominant chromosome is one whose differential weight score in the fitness score is not less than 80%.

[0033] Differential restructuring rules include: The proportional gene segment adopts a single-point recombination rule, which is as follows: two dominant chromosomes of proportional gene segments are randomly selected, a recombination point is randomly selected from the gene locus corresponding to the proportional gene segment, and the proportional gene segment after the recombination point is exchanged. The integral gene segment adopts a uniform recombination rule, which is as follows: two dominant chromosomes of integral gene segments are randomly selected, the gene loci corresponding to the integral gene segment are split at equal intervals, and integral gene segments of the two chromosomes are alternately selected for recombination. The differential gene segment adopts the local fragment recombination rule, which is: randomly select two dominant chromosomes of the differential gene segment, and exchange only the local gene segments in the differential gene segment that are strongly related to over-regulation inhibition.

[0034] Specifically, such as Figure 2 As shown, parameter compliance verification and gene repair of the recombinant chromosomes include: S41, iterate through all gene loci of the recombined chromosome and check whether the value of each gene locus exceeds the parameter constraint range.

[0035] Because targeted gene recombination involves crossover, exchange, and recombination operations on gene fragments of the dominant chromosome, the random splicing of gene fragments during recombination may cause the values ​​of some gene loci to exceed the reasonable constraint ranges of proportional gain, integral gain, and differential gain preset by S2. Parameters exceeding these ranges are invalid and cannot operate safely and stably in a real control system. Therefore, it is necessary to perform a full-site traversal check on each new chromosome generated after recombination. Each chromosome contains eighteen gene loci, corresponding to the K values ​​of six PID loops. p K i K d During the traversal, the parameters are read one by one from each gene locus and compared with the upper and lower limits of the parameter type corresponding to that locus. This ensures that no parameter locus that may exceed the limit is missed, providing complete and accurate screening results for subsequent accurate identification of out-of-bounds loci and gene repair, and preventing invalid parameters from entering the subsequent fitness calculation and iteration process from the source.

[0036] S42, gene loci with log values ​​greater than the upper limit of the corresponding parameter or less than the lower limit of the corresponding parameter are determined to be out-of-bounds loci.

[0037] After completing the numerical alignment of all gene loci, the numerical values ​​of each gene locus are rigorously matched with the upper and lower limits of the corresponding parameter type according to parameter constraint standards. For example, setting the proportional gain K... p,i The value ranges from 0.1 to 100, and the integral gain K i,i The value ranges from 0.01 to 10, and the differential gain K d,iThe value range is from 0.01 to 50. For proportional gain gene loci, a value greater than 100 or less than 0.1 is considered an out-of-bounds proportional parameter locus. For integral gain gene loci, a value greater than 10 or less than 0.01 is considered an out-of-bounds integral parameter locus. For differential gain gene loci, a value greater than 50 or less than 0.01 is considered an out-of-bounds differential parameter locus. Through clear judgment rules, compliant and out-of-bounds loci are accurately distinguished, and all gene loci that do not meet engineering safety requirements are clearly marked. This provides a precise list of target loci for subsequent targeted gene repair, avoiding blind corrections that could lead to erroneous changes to compliant parameters, and ensuring the accuracy and effectiveness of the repair process.

[0038] S43 corrects the values ​​of all out-of-bounds sites to the corresponding upper or lower limit of the parameter, so that the values ​​of all gene sites fall within the preset constraint range.

[0039] After identifying all out-of-bounds sites and their corresponding parameter types, numerical correction operations are performed according to the "boundary-based correction" principle. For out-of-bounds sites with values ​​greater than the upper limit of the corresponding parameter, their values ​​are directly and forcibly corrected to the preset upper limit value of that parameter type. For example, if the proportional gain site has a value of 120, it is corrected to 100. For out-of-bounds sites with values ​​less than the lower limit of the corresponding parameter, their values ​​are directly and forcibly corrected to the preset lower limit value of that parameter type. For example, if the integral gain site has a value of 0.005, it is corrected to 0.01. The correction process strictly follows the parameter constraint rules, making precise adjustments only to out-of-bounds sites without changing the values ​​of other compliant sites. This ensures that the values ​​of all eighteen gene loci on the corrected chromosome strictly fall within the parameter constraint range. After gene repair is completed, all chromosomes are engineering-executable and can be directly loaded into a PID controller for control performance simulation and fitness evaluation. This ensures the effectiveness and stability of parameters during the iterative optimization of the genetic algorithm, avoiding invalid parameters from interfering with the evolutionary direction and reducing optimization efficiency.

[0040] S5. Construct a fitness function based on the effect of PID control. Using the UAV's position control accuracy, attitude control stability, system response speed and operation energy consumption as indicators, introduce parameter constraint penalty terms to penalize parameters that exceed the range, and calculate the fitness value of each chromosome after recombination.

[0041] Traditional single-index evaluation methods cannot adequately address the multi-dimensional needs of marine UAV operation and maintenance tasks. Therefore, this invention constructs a multi-objective fusion fitness function, comprehensively incorporating four core indicators: position control accuracy, attitude control stability, system response speed, and operational energy consumption. Position control accuracy quantifies the UAV's position error and tracking capability in three-dimensional space; attitude control stability assesses the fuselage angle stability and disturbance resistance capability; system response speed reflects the system's dynamic adjustment efficiency; and operational energy consumption is related to the UAV's endurance and operation and maintenance costs. Simultaneously, a parameter constraint penalty term is introduced to impose quantitative penalties on PID parameters exceeding preset ranges, forcing the algorithm to adhere to parameter boundary constraints. Each indicator is weighted and fused using preset weight coefficients, which can be flexibly adjusted according to the severity of the marine environment and the priority of the operation and maintenance tasks, ultimately outputting a unique fitness value. A higher fitness value indicates better overall control performance of the corresponding PID parameter, providing a quantitative basis for subsequent chromosome selection and ensuring that the evolutionary direction always aligns with the actual needs of UAV operation and maintenance in complex marine environments.

[0042] Preferably, the fitness function expression is: + + - , Where F(X) is the fitness value, ω1, ω2, ω3, and ω4 are preset weight coefficients, and J position J is a location control indicator. attitude J is the attitude control index. stability J is a system stability index. energy Let λ be the energy consumption index for the operation, λ be the penalty coefficient, and P(X) be the parameter constraint penalty function.

[0043] Furthermore, the formula for calculating the location control index is as follows: , Among them, J position For location control indicators, t s,i Let σ be the settling time of the i-th PID control loop. s,i Let e ​​be the standard deviation of the error of the i-th PID control loop. s,i Let be the steady-state error of the i-th PID control loop; The formula for calculating attitude control parameters is: , Among them, J attitude For attitude control, t s,i Let σ be the settling time of the i-th PID control loop. s,i Let e ​​be the standard deviation of the error of the i-th PID control loop. s,i Let be the steady-state error of the i-th PID control loop; The formula for calculating the system stability index is: , Among them, J stability λ is a system stability index. i These are the characteristic values ​​of the closed-loop system. Operational energy consumption index J energy The calculation formula is: , Among them, J energy Here, T represents the total duration of the seabed-based maintenance task, and u(t) represents the control vector of the PID control loop. The formula for calculating the parameter constraint penalty function P(X) is as follows: , Where P(X) is the parameter constraint penalty function, Let i be the proportional gain of the i-th PID control loop. Let i be the integral gain of the i-th PID control loop. Let be the differential gain of the i-th PID control loop.

[0044] S6. Based on the fitness value, the recombined chromosomes are screened, and the chromosomes with the top M% fitness ranking are retained to enter the next iteration.

[0045] After calculating the fitness of all recombined chromosomes, all chromosomes in the population are sorted from highest to lowest fitness value. The top M% of high-quality chromosomes are selected and retained for the next generation iteration, while the remaining individuals with poor performance are eliminated. The value of M can be set according to the actual situation; in this embodiment, M=50 is used as an example, meaning that the top 50% of high-quality chromosomes are retained for the next generation iteration. This selection mechanism effectively eliminates PID parameter combinations with poor control performance, preventing the spread of inferior genes in the population, while ensuring the stability of the population size and a gradual increase in the proportion of high-quality genes in each generation. As the number of iterations increases, the overall control performance of the population continues to converge and optimize, gradually approaching the optimal PID parameter combination, providing a performance convergence basis for triggering the iteration termination condition. Simultaneously, it balances the algorithm's search efficiency and optimization accuracy, avoiding low iteration efficiency due to retaining too many inferior individuals, or loss of population diversity and getting trapped in local optima due to overly strict selection criteria.

[0046] S7. Repeat S4 to S6 until the iteration termination condition is met to obtain the optimal chromosome. The iteration termination condition is: the rate of change of chromosome fitness is less than a preset threshold or the number of iterations reaches a preset upper limit for ten consecutive generations.

[0047] PID parameters are continuously optimized and converged through multiple iterative cycles until a stable optimal parameter combination is obtained. A single recombination, evaluation, and screening process is insufficient to cover the entire parameter space and converge to the optimal solution. Therefore, iterative cycles of targeted gene recombination, fitness calculation, and high-quality chromosome screening are repeatedly executed, allowing the population to continuously optimize gene combinations and improve overall control performance in each evolutionary round. To avoid wasting computational resources in infinite iterations or insufficient optimization affecting control performance, a dual iteration termination condition is set: when the rate of change of the optimal fitness value of the population over ten consecutive generations is less than a preset threshold (e.g., 5%), it indicates that the population performance has stabilized, and further iterations will not bring significant performance improvements, thus terminating the optimization; simultaneously, a preset upper limit on the number of iterations is set as a fallback termination condition to prevent the algorithm from failing to converge for a long time due to special operating conditions. Preferably, the preset upper limit on the number of iterations can be 50 generations. After the iteration terminates, the chromosome with the highest fitness value in the current population is the gene sequence carrying the optimal PID parameter information, completing the evolutionary process from the initial random population to the optimal parameter gene sequence, providing the optimal evolutionary result for subsequent parameter decoding.

[0048] S8 decodes the optimal chromosome in reverse to restore the optimal proportional gain, optimal integral gain, and optimal derivative gain corresponding to the six PID control loops.

[0049] This step completes the reverse mapping from the gene coding space to the actual control parameter space. First, the eighteen gene loci of the optimal chromosome are split according to degree-of-freedom clusters and P / I / D types, precisely dividing them into three sets of parameter gene clusters corresponding to six independent PID control loops. Each gene cluster corresponds to a proportional, integral, and derivative gene locus for one degree of freedom. Then, the values ​​corresponding to each gene locus are extracted one by one and directly mapped to the proportional gain, integral gain, and derivative gain of the corresponding PID loop, completing the initial parameter restoration. Finally, the restored set of PID parameters undergoes linkage verification, comprehensively checking the matching and coordination between parameters. Key risks include excessive proportional gain causing system oscillation, excessive integral gain leading to integral saturation, and abnormal derivative gain causing high-frequency interference. This ensures that the restored optimal PID parameter set is not only numerically compliant but also that the parameters are coordinated and matched, possessing practical engineering usability, providing safe, stable, and efficient control parameter input for the UAV control system.

[0050] The optimal chromosome is essentially a gene string containing 18 numbers. These 18 numbers are not randomly arranged, but rather divided into 6 degrees of freedom, each with 3 parameters (P, I, D) arranged according to a pre-encoded rule. First, the entire chromosome is grouped according to the 6 degrees of freedom, with each degree of freedom forming a "parameter cluster." Then, within each cluster, the corresponding K is distinguished according to three types: P (proportional), I (integral), and D (differential). p (Proportional gain), Ki (Integral gain), K d (Differential gain) Three gene loci. After this splitting, the original whole chromosome is broken down into 6 independent PID parameter groups. Each group corresponds exactly to the complete PID control parameters of one degree of freedom of the UAV (X, Y, Z position, pitch, roll, yaw attitude), realizing precise grouping from gene sequence to actual control parameters, providing clear and independent parameter units for subsequent extraction and assignment.

[0051] Specifically, such as Figure 3 As shown, the reverse decoding of the optimal chromosome includes: S81, according to the degree of freedom cluster and P / I / D type, splits the optimal chromosome into six independent PID control loop parameter groups, each parameter group corresponding to a PID control loop with one degree of freedom.

[0052] S82 extracts the values ​​corresponding to each gene locus from each of the split parameter groups to obtain the proportional gain, integral gain, and derivative gain of the corresponding PID control loop.

[0053] S83 directly assigns the extracted proportional gain, integral gain, and derivative gain to the parameter register of the corresponding PID control loop, thus completing the loading of control parameters.

[0054] S84 performs linkage verification on the assigned PID parameters to eliminate the risk of system oscillation and integral saturation.

[0055] S9 loads the optimal PID parameters into the PID controller, which then drives the UAV to perform seabed-based maintenance tasks.

[0056] The optimal proportional gain, integral gain, and derivative gain, after reverse decoding and linkage verification, are written into the parameter register of the PID controller in the UAV flight control system, completing parameter loading and updating. During actual operation and maintenance, the PID controller receives real-time motion data from the UAV's position and attitude sensors, calculates the deviation between this data and the preset maintenance path, hovering point, attitude angle, and other target commands, and outputs precise control commands based on the optimal PID parameters. This drives the UAV's motors, servos, and other actuators to quickly respond to marine environmental disturbances, accurately track preset maintenance trajectories, and stably maintain hovering attitude. This enables the UAV, equipped with monitoring equipment, to efficiently complete the entire maintenance process, including seabed base location inspection, sensor data acquisition, seabed base position and attitude monitoring, and abnormal situation photography and recording. While ensuring control accuracy and stability, this reduces operational energy consumption, extends endurance, and comprehensively improves the automation, intelligence, and reliability of marine seabed base operation and maintenance.

[0057] Example 1

[0058] This embodiment provides a seabed-based operation and maintenance control method optimized by PID-genetic algorithm, applied to an operation and maintenance scenario of a nearshore marine observation area containing 5 seabed bases (A, B, C, D, E). The geographical coordinates of the seabed bases are A(2,5), B(6,3), C(4,8), D(9,6), and E(7,1), with C being a high-priority seabed base. The maximum range of the UAV is 50km, the cruising speed is 8km / min, and the maximum operation time for a single flight is 60 minutes. The specific steps are as follows: S1. Construct a six-degree-of-freedom multi-loop PID controller for the UAV, designing six independent PID control loops: loops 1-3 control the X-axis, Y-axis, and Z-axis positions respectively, and loops 4-6 control the pitch angle, roll angle, and yaw angle attitude respectively.

[0059] The control formula for each PID control loop is: ; in, Let i be the control vector of the i-th PID control loop. The deviation between the target value and the feedback value of the i-th PID control loop is given. Let i be the proportional gain of the i-th PID control loop. Let i be the integral gain of the i-th PID control loop. Let be the differential gain of the i-th PID control loop.

[0060] The integral stage is set with an integral separation threshold of 0.5. When the absolute value of the deviation is greater than 0.5, the integral action is canceled, and when it is less than or equal to 0.5, the integral action is enabled. The derivative stage introduces a first-order low-pass filter with a filtering coefficient of 10 to filter out high-frequency noise interference in the marine environment.

[0061] S2, Set the PID parameter constraint range: proportional gain K p,i ∈[0.1,100], integral gain K i,i ∈[0.01,10], differential gain K d,i ∈[0.01,50], i=1,2,...,6.

[0062] S3, establish PID parameter-chromosome one-way mapping encoding: a single parameter corresponds to a single gene, 6 loops with a total of 18 gene loci, and 1 chromosome contains 6 groups of PID gene clusters; initially generate 50 chromosomes, and the values ​​of each gene locus are randomly generated within the constraints of step S2 to form the initial population.

[0063] S4, Targeted Gene Recombination: (1) Screen 15 high-quality chromosomes with the top 30% fitness in the initial population and classify them according to control characteristics: 5 proportionally dominant chromosomes, 5 integrally dominant chromosomes, and 5 differentially dominant chromosomes. (2) Differential Recombination: The proportionally dominant chromosomes adopt single-point recombination and randomly select recombination points to exchange fragments; the integrally dominant chromosomes adopt uniform recombination and alternately select fragments after equidistant splitting; the differentially dominant chromosomes adopt local fragment recombination and only exchange over-adjustment inhibition related fragments. (3) Parameter Verification and Repair: Verify the gene locus values ​​of the recombined chromosomes. If they exceed the constraint range, correct them to boundary values. For example, if the proportional gain exceeds 100, set it to 100; if it is less than 0.1, set it to 0.1.

[0064] S5, construct a multi-objective fitness function: set weight coefficients ω1=0.3, ω2=0.3, ω3=0.2, ω4=0.2, and penalty coefficient λ=0.1; decode the recombined chromosomes into PID parameters, load them into the UAV dynamics model, simulate ocean gust disturbances, perform a hovering flight mission at point C on the seabed, collect settling time, error standard deviation, steady-state error, system eigenvalues, and operational energy consumption, and substitute them into the fitness function to calculate the fitness value of each chromosome.

[0065] S6, Chromosome selection: Sort by fitness value and retain the top 50%, i.e., 25 chromosomes, to enter the next iteration.

[0066] S7, Iterative optimization: Repeat S4-S6, iterate until the fitness change rate is <5% for 10 consecutive generations. At this point, the number of iterations is 38 generations, and the iteration is terminated.

[0067] S8, Reverse Decoding of the Optimal Chromosome: Split the optimal chromosome, extract the values ​​of 18 gene loci, and assign them to K of the corresponding PID loop. p,i K i,i K d,i The parameter linkage verification showed no oscillation or integral saturation, thus obtaining the optimal PID parameter set.

[0068] S9 loads the optimal PID parameters into the UAV controller, driving the UAV to execute the seabed maintenance tasks C→A→D→B→E according to priority. Each seabed maintenance task lasts 5 minutes, with no control lag or instability throughout. The steady-state position error is ≤0.2m, the steady-state attitude error is ≤0.5°, the overshoot is ≤3%, and the energy consumption is reduced by 12% compared to conventional PID control, successfully completing the maintenance tasks.

[0069] This invention integrates PID real-time control with global optimization using a genetic algorithm, overcoming the shortcomings of traditional algorithms such as poor real-time performance and fixed parameters, and achieving adaptive tuning of PID parameters. Through six-degree-of-freedom independent control, targeted gene recombination, and multi-objective optimization, it improves the hovering accuracy, stability, and anti-disturbance capability of UAVs in complex sea conditions, reduces energy consumption and manual parameter tuning costs, and significantly improves the efficiency and reliability of seabed-based operation and maintenance.

[0070] The above description is a detailed description of the preferred embodiments of the present invention. However, the embodiments are not intended to limit the scope of the patent application of the present invention. All equivalent changes or modifications made under the technical spirit of the present invention should fall within the patent scope covered by the present invention.

Claims

1. A seabed-based operation and maintenance control method based on PID-genetic algorithm optimization, characterized in that, include: S1. Construct a PID controller and design six independent PID control loops. Three loops control the position of the UAV on the X-axis, Y-axis, and Z-axis, respectively, and the other three loops control the pitch angle, roll angle, and yaw angle of the UAV, respectively. S2 sets the parameter constraint range for each component of the PID controller; S3, establish a one-way mapping and coding mechanism between PID parameters and chromosomes, and encode the proportional gain, integral gain and derivative gain of each PID control loop into gene fragments in sequence to initially generate an initial population containing a preset number of chromosomes. S4. Targeted gene recombination is performed on chromosomes in the initial population to screen for dominant chromosomes. Dominant chromosomes are then classified according to their control characteristics. Differential recombination rules are applied to proportional gene segments, integral gene segments, and differential gene segments for gene recombination. The recombined chromosomes undergo parameter compliance verification and gene repair. The dominant chromosomes are the chromosomes with the highest fitness in the initial population (N%). S5. Construct a fitness function based on PID control effect, using UAV position control accuracy, attitude control stability, system response speed and operation energy consumption as indicators, introduce parameter constraint penalty terms to penalize parameters that exceed the range, and calculate the fitness value of each chromosome after recombination. S6. Based on the fitness value, the recombined chromosomes are screened, and the chromosomes with the top M% fitness ranking are retained to enter the next iteration. S7. Repeat S4 to S6 until the iteration termination condition is met to obtain the optimal chromosome. The iteration termination condition is: the rate of change of chromosome fitness is less than a preset threshold or the number of iterations reaches a preset upper limit for ten consecutive generations. S8, reverse decode the optimal chromosome to restore the optimal proportional gain, optimal integral gain and optimal derivative gain corresponding to the six PID control loops; S9 loads the optimal PID parameters into the PID controller, which then drives the UAV to perform seabed-based maintenance tasks.

2. The seabed-based operation and maintenance control method based on PID-genetic algorithm optimization according to claim 1, characterized in that, In S1, the control formula for each PID control loop is: ; in, Let i be the control vector of the i-th PID control loop. The deviation between the target value and the feedback value of the i-th PID control loop is given. Let i be the proportional gain of the i-th PID control loop. Let i be the integral gain of the i-th PID control loop. Let be the differential gain of the i-th PID control loop.

3. The seabed-based operation and maintenance control method based on PID-genetic algorithm optimization according to claim 1, characterized in that, In S3, the one-way mapping encoding mechanism between PID parameters and chromosomes is as follows: a single PID parameter corresponds to a single gene locus, a complete set of six PID control loop parameters corresponds to a chromosome, each chromosome contains six sets of PID gene clusters, and each set of PID gene clusters corresponds to the proportional gene segment, integral gene segment, and differential gene segment of a PID control loop.

4. The seabed-based operation and maintenance control method based on PID-genetic algorithm optimization according to claim 1, characterized in that, In S4, the dominant chromosomes are classified according to their control characteristics. The classification types include: proportional gene segment dominant chromosomes, integral gene segment dominant chromosomes, and differential gene segment dominant chromosomes. The proportional gene segment dominant chromosomes are chromosomes whose proportional weight score in the fitness score is not less than Q%, the integral gene segment dominant chromosomes are chromosomes whose integral weight score in the fitness score is not less than Q%, and the differential gene segment dominant chromosomes are chromosomes whose differential weight score in the fitness score is not less than Q%.

5. The seabed-based operation and maintenance control method based on PID-genetic algorithm optimization according to claim 1, characterized in that, In S4, the differentiated recombination rules include: The proportional gene segment adopts a single-point recombination rule, which is as follows: two dominant chromosomes of proportional gene segments are randomly selected, a recombination point is randomly selected from the gene locus corresponding to the proportional gene segment, and the proportional gene segment after the recombination point is exchanged. The integral gene segment adopts a uniform recombination rule, which is as follows: two dominant chromosomes of integral gene segments are randomly selected, the gene loci corresponding to the integral gene segment are split at equal intervals, and integral gene segments of the two chromosomes are alternately selected for recombination. The differential gene segment adopts the local fragment recombination rule, which is: randomly select two dominant chromosomes of the differential gene segment, and exchange only the local gene segments in the differential gene segment that are strongly related to over-regulation inhibition.

6. The seabed-based operation and maintenance control method based on PID-genetic algorithm optimization according to claim 1, characterized in that, In S4, the parameter compliance verification and gene repair of the recombined chromosome includes: S41, traverse all gene loci of the recombined chromosome and check whether the value of each gene locus exceeds the parameter constraint range. S42, gene loci whose values ​​are greater than the upper limit of the corresponding parameter or less than the lower limit of the corresponding parameter are determined to be out-of-bounds loci; S43 corrects the values ​​of all out-of-bounds sites to the corresponding upper or lower limit of the parameter, so that the values ​​of all gene sites fall within the preset constraint range.

7. The seabed-based operation and maintenance control method based on PID-genetic algorithm optimization according to claim 1, characterized in that, In S5, the fitness function expression is: + + - , Where F(X) is the fitness value, ω1, ω2, ω3, and ω4 are preset weight coefficients, and J position J is a location control indicator. attitude J is the attitude control index. stability J is a system stability index. energy Let λ be the energy consumption index for the operation, λ be the penalty coefficient, and P(X) be the parameter constraint penalty function.

8. The seabed-based operation and maintenance control method based on PID-genetic algorithm optimization according to claim 7, characterized in that, The formula for calculating the location control index is as follows: , Among them, J position For location control indicators, t s,i Let σ be the settling time of the i-th PID control loop. s,i Let e ​​be the standard deviation of the error of the i-th PID control loop. s,i Let be the steady-state error of the i-th PID control loop; The formula for calculating attitude control parameters is: , Among them, J attitude For attitude control, t s,i Let σ be the settling time of the i-th PID control loop. s,i Let e ​​be the standard deviation of the error of the i-th PID control loop. s,i Let be the steady-state error of the i-th PID control loop; The formula for calculating the system stability index is: , Among them, J stability λ is a system stability index. i These are the characteristic values ​​of the closed-loop system. Operational energy consumption index J energy The calculation formula is: , Among them, J energy Here, T represents the total duration of the seabed-based maintenance task, and u(t) represents the control vector of the PID control loop. The formula for calculating the parameter constraint penalty function P(X) is as follows: , Where P(X) is the parameter constraint penalty function, Let i be the proportional gain of the i-th PID control loop. Let i be the integral gain of the i-th PID control loop. Let be the differential gain of the i-th PID control loop.

9. The seabed-based operation and maintenance control method based on PID-genetic algorithm optimization according to claim 1, characterized in that, In S8, the reverse decoding of the optimal chromosome includes: S81, according to the degree of freedom cluster and P / I / D type, the optimal chromosome is divided into six independent PID control loop parameter groups, each parameter group corresponds to a PID control loop with one degree of freedom; S82 extracts the values ​​corresponding to each gene locus from each of the split parameter groups to obtain the proportional gain, integral gain, and derivative gain of the corresponding PID control loop. S83 directly assigns the extracted proportional gain, integral gain, and derivative gain to the parameter register of the corresponding PID control loop, thus completing the loading of control parameters; S84 performs linkage verification on the assigned PID parameters to eliminate the risk of system oscillation and integral saturation.

10. The seabed-based operation and maintenance control method based on PID-genetic algorithm optimization according to claim 1, characterized in that, The initial population has a preset number of 50 chromosomes, and the maximum number of iterations is preset to 50 generations. The parameter constraint range includes: proportional gain K p,i The value ranges from 0.1 to 100, and the integral gain K i,i The value ranges from 0.01 to 10, and the differential gain K d,i The value ranges from 0.01 to 50, where i is a positive integer, 1≤i≤6, corresponding to six PID control loops.