An online self-tuning method, device and medium for control parameters of an underwater robot
Patent Information
- Application Number
- CN202511673398.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-14
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2045-11-14
AI Technical Summary
[0008]本发明提供了一种水下机器人控制参数在线自整定方法、设备及介质,其目的是解决水下机器人控制参数手动调试过程复杂、高度依赖专家经验且效率低下的问题
与现有技术相比,本发明提供的一种水下机器人控制参数在线自整定方法、设备及介质,通过构建一个外置的、与PLC协同工作的自动化参数整定闭环系统,从根本上改变了依赖人工经验的传统手动调试模式,具体解决过程如下:首先,该方法通过引导操作人员仅执行简单的通道选择与启动指令,将复杂的模型辨识与参数计算任务交由系统自动完成,显著降低了操作门槛;在此基础上,系统通过实时采集PLC在控制过程中产生的真实控制指令与运动状态数据,并基于此数据驱动,采用迭代最小二乘法等系统辨识技术来精确拟合包含时滞特性的水下机器人动力学模型,从而摆脱了对理想化线性模型的依赖;进而,系统依据辨识出的模型参数,并充分考虑系统时滞的严重程度,自适应地选择不同的计算公式来精准整定内外环PID控制器的参数,这一过程系统性地解决了推进器非线性等问题;最终,将自动计算出的最优PID参数回写给PLC完成控制器更新,实现了从数据采集、模型辨识、参数计算到控制器更新的全自动在线整定,最终达到了降低对人员经验依赖、大幅提升调试效率与成功率、并保障机器人最终控制性能的发明目的。
Smart Images

Figure CN121411495B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automatic control of underwater robots, specifically to an online self-tuning method, device, and medium for underwater robot control parameters. Background Technology
[0002] Underwater robots, especially remotely operated underwater vehicles (ROVs), require precise and stable motion control performance when performing underwater observation, inspection, and operational tasks. Their control systems typically include independent controllers with multiple degrees of freedom, such as displacement control for the X, Y, and Z axes, and attitude control for yaw, pitch, and roll. These controllers generally employ PID control algorithms, and the suitability of the control parameters directly determines the robot's dynamic response performance, thus affecting operational efficiency and safety.
[0003] Currently, the tuning of control parameters for underwater robots mainly relies on manual adjustments by engineers. Before the robot is delivered to the customer, or when changes in its onboard tools or equipment lead to alterations in its dynamic characteristics, the control parameters need to be readjusted. This process has the following significant drawbacks: Highly dependent on experience and with high technical barriers: Control parameter tuning is one of the most complex aspects of underwater robot commissioning. Due to the complexity of underwater robot dynamics models, influenced by factors such as hydrodynamics, carrier configuration, and thruster layout, and lacking theoretical guidance, commissioning personnel must rely on extensive engineering experience to find relatively ideal parameter combinations through repeated trial and error. This not only places extremely high demands on the skills of commissioning personnel but also results in a long training cycle and high labor costs.
[0004] The debugging process is lengthy and inefficient: underwater robots typically have seven independent motion controllers, which engineers need to manually debug one by one. The entire debugging process is tedious and time-consuming, seriously affecting product delivery schedules and the efficiency of subsequent task preparation.
[0005] The debugging results are difficult to guarantee, affecting the user experience: Due to reliance on human experience, the parameters debugged are often not optimal and may even be unsuitable. Parameter mismatch can lead to slow response, overshoot, oscillation, or instability in the robot, seriously affecting the operator's control experience and even causing safety hazards such as task failure or equipment damage due to poor control performance.
[0006] In addition, some existing automated tuning methods are often based on idealized linear models and fail to fully consider the time delay characteristics of underwater robot systems and nonlinear factors such as the asymmetry of thrust curves in forward and reverse rotation of the thruster, resulting in limited application effects in engineering practice.
[0007] Therefore, there is an urgent need in this field for an automated tuning method for underwater robot control parameters that can lower the technical threshold, improve debugging efficiency, and ensure control performance, in order to solve the above-mentioned problems that have long plagued the industry. Summary of the Invention
[0008] This invention provides an online self-tuning method, device, and medium for underwater robot control parameters, aiming to solve the problems of complex, highly dependent on expert experience, and inefficient manual debugging of underwater robot control parameters.
[0009] To achieve the above objectives, the first aspect of the present invention provides a method for online self-tuning of control parameters for an underwater robot, comprising the following steps: In response to the parameter tuning command, select one degree of freedom channel of the underwater robot as the current tuning channel; During the process of the PLC generating control signals according to the parameter tuning instructions and driving the thruster of the current tuning channel to operate, the system receives control instruction data and motion status data corresponding to the current tuning channel fed back by the PLC. Based on the motion state data, determine whether the underwater robot meets the parameter tuning conditions; When the parameter tuning conditions are met, the dynamic model parameters of the current tuning channel are identified based on the control command data and the motion state data. The PID control parameters of the current tuning channel are calculated based on the dynamic model parameters. The PID control parameters are sent to the PLC to update its control parameters.
[0010] Furthermore, the method for identifying the dynamic model parameters of the currently tuned channel includes: Based on the sampling period and the preset maximum time delay, the model parameter identification algorithm is initialized to determine the maximum number of delay periods and the starting data sequence number for parameter estimation. The motion state data is used as the model output to construct the model output vector; For each data index starting from the initial data index, the following iterative identification process is performed: Based on the control command data, construct a model input vector corresponding to the data sequence number; Using the model output vector and the model input vector, an iterative matrix for least squares parameter estimation is constructed; The iterative least squares parameter estimation method is used to calculate the optimal model parameter estimates for the current data index. Based on the estimated optimal model parameters, calculate the model residuals and the variance of the model residuals; Calculate the AIC information criterion value based on the variance; The iterative identification process is executed repeatedly, and the delay period number and model parameters corresponding to the minimum AIC information criterion value are selected as the final estimated values of the dynamic model parameters of the current tuning channel.
[0011] Furthermore, the method for calculating the optimal model parameter estimate under the current data sequence number includes: applying the recursive iterative least squares method to solve for the discrete transfer function parameters that best match the actual motion state data by minimizing the sum of squares of the model residuals, including time delay parameters, numerator polynomial parameters and denominator polynomial parameters.
[0012] Furthermore, the PID control parameters include the parameters of the inner loop speed controller and the outer loop position controller; the step of calculating the PID control parameters of the current tuning channel based on the dynamic model parameters includes: calculating the parameters of the inner loop speed controller and the outer loop position controller respectively based on the identified dynamic model parameters.
[0013] Furthermore, the method for calculating the parameters of the inner loop speed controller includes: Based on the time delay parameters in the dynamic model parameters, determine the severity of the system time delay; If the system time delay does not exceed the preset threshold, the parameters of the inner loop speed controller are calculated according to the first set of preset formulas; If the system time delay exceeds the preset threshold, the parameters of the inner loop speed controller are calculated according to the second set of preset formulas.
[0014] Furthermore, the method for calculating the parameters of the outer ring position controller includes: calculating the parameters of the outer ring position controller according to a preset formula based on the parameters of the inner ring speed controller.
[0015] Furthermore, determining whether the underwater robot meets the parameter tuning conditions includes: Monitor the velocity or angular velocity in the motion state data; If the variance of the velocity or angular velocity is less than the preset value within a preset time, it is determined that the parameter tuning conditions are met. Alternatively, if a stop command is received from the operator, it is determined that the parameter tuning conditions are met.
[0016] Furthermore, after the step of determining whether the underwater robot meets the parameter tuning conditions based on the motion state data, a step for handling parameter tuning failure is also included: If the underwater robot does not enter a stable motion state and does not receive a stop command within a preset time, it is determined that the parameter tuning has failed and a failure command is sent to the PLC. or, After determining that the parameter tuning conditions are met, the average velocity and velocity variance are calculated based on the motion state data during the last period of time. If the average speed is less than a predetermined percentage of the maximum speed designed for the current tuning channel, or if the speed variance is greater than a preset threshold, then the parameter tuning is deemed to have failed.
[0017] To achieve the above objectives, a second aspect of the present invention provides an electronic device including a memory and a processor, the memory being used to store a program that supports the processor in executing the online self-tuning method for underwater robot control parameters, and the processor being configured to execute the program stored in the memory.
[0018] To achieve the above objectives, a third aspect of the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, performs the steps of the online self-tuning method for the control parameters of the underwater robot.
[0019] The beneficial effects of this invention are: Compared with existing technologies, this invention provides an online self-tuning method, device, and medium for underwater robot control parameters. By constructing an external, automated parameter tuning closed-loop system that works in conjunction with a PLC, it fundamentally changes the traditional manual debugging mode that relies on human experience. The specific solution process is as follows: First, this method guides operators to execute only simple channel selection and start commands, leaving the complex tasks of model identification and parameter calculation to be completed automatically by the system, significantly reducing the operational threshold. Based on this, the system collects real-time control commands and motion state data generated by the PLC during the control process, and uses this data to drive system identification techniques such as iterative least squares method to... The system accurately fits the dynamic model of the underwater robot, which includes time delay characteristics, thus eliminating the reliance on idealized linear models. Furthermore, based on the identified model parameters and taking into full account the severity of the system's time delay, the system adaptively selects different calculation formulas to precisely tune the parameters of the inner and outer loop PID controllers. This process systematically solves problems such as thruster nonlinearity. Finally, the automatically calculated optimal PID parameters are written back to the PLC to complete the controller update, realizing fully automated online tuning from data acquisition, model identification, parameter calculation to controller update. Ultimately, this achieves the invention's objective of reducing reliance on human experience, significantly improving debugging efficiency and success rate, and ensuring the final control performance of the robot. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below.
[0021] Figure 1This is a diagram of an underwater robot parameter self-tuning system architecture disclosed in an embodiment of the present invention.
[0022] Figure 2 This is a coordinate system definition diagram for an underwater robot disclosed in an embodiment of the present invention.
[0023] Figure 3 This is a flowchart of a control parameter tuning method disclosed in an embodiment of the present invention.
[0024] Figure 4 This invention discloses a schematic diagram of a data acquisition curve. Detailed Implementation
[0025] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. 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 should fall within the scope of protection of the present invention.
[0026] According to embodiments of the present invention, it should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the following manufacturing method, in some cases the steps shown or described may be performed in a different order than that shown here.
[0027] The system architecture of this invention is as follows: Figure 1 As shown, it comprises three parts: a human-machine interface system, a PLC (Programmable Logic Controller), and a control parameter self-tuning module. The human-machine interface system provides the operator with an interface to send operation commands and display the robot's status; the PLC, as the underwater robot's main controller, is responsible for executing control algorithms and driving the thrusters; the control parameter self-tuning module consists of a computer with a dedicated self-tuning program installed. It communicates with the PLC, reads the robot's thruster commands and motion status data, calculates optimized control parameters, and sends them to the PLC to adjust the control effect.
[0028] The motion control of an underwater robot can typically be broken down into seven automatic control loops: automatic altitude control, automatic depth control, lateral motion tracking control, longitudinal motion tracking control, automatic heading angle control, automatic pitch angle control, and automatic roll angle control. These controllers operate independently of each other.
[0029] It is worth noting that automatic altitude hold and automatic depth hold are essentially both about controlling the underwater robot's motion in the vertical direction (Z-axis). Therefore, their control parameters are exactly the same. The only difference lies in the physical meaning of the control target and the feedback state: automatic altitude hold targets the underwater robot's height above the seabed and provides feedback from the altitude sensor; while automatic depth hold targets the underwater robot's depth above the sea surface and provides feedback from the depth sensor. Based on this, this invention integrates and summarizes the underwater robot's controller into parameter settings on six degrees of freedom: X (longitudinal displacement), Y (lateral displacement), Z (vertical displacement), yaw, pitch, and roll. The coordinate system is defined as follows: Figure 2 As shown.
[0030] The online self-tuning method for control parameters of this invention mainly includes two core processes: model parameter identification and control parameter calculation. Before tuning begins, a preparation stage is required: the underwater robot is deployed in the water, and the thruster speed is adjusted to achieve balancing, ensuring the underwater robot remains statically stable under PLC-based closed-loop control. The criteria for static stability are: a single axial displacement of less than 0.1 meters and a rotation angle of less than 1 degree within 10 seconds, with both pitch and roll angles not exceeding 3 degrees. Subsequently, the operator selects the desired motion degree of freedom channel (X, Y, Z, yaw, pitch, or roll) through the human-machine interface system and initiates the parameter configuration function. After receiving the request, the PLC generates the control command for that channel. The system drives the corresponding thruster and simultaneously sends control commands and motion status data to the control parameter self-tuning module. The control parameter self-tuning module stores the data and monitors whether the underwater robot has entered a stable motion state (e.g., the variance of velocity or angular velocity is less than 0.01 within 2 seconds) or whether it has received a stop command from the operator. If the conditions are met, it enters the parameter tuning stage; otherwise, it sends tuning failure information to the PLC and the human-machine interface system.
[0031] like Figure 3 As shown, the present invention provides an online self-tuning method for control parameters of an underwater robot, comprising the following steps: Step S100: In response to the parameter tuning command, select one motion degree of freedom channel of the underwater robot as the current tuning channel; The operator uses the aforementioned human-machine interface system to select one of the underwater robot's six degrees of freedom (X-direction displacement, Y-direction displacement, Z-direction displacement, yaw angle, pitch angle, and roll angle) channels that requires parameter tuning, and then activates the parameter configuration function for that channel. The system immediately responds to this parameter tuning command and sets that channel as the "current tuning channel." This step allows engineers to perform targeted parameter optimization on a single channel where the underwater robot's specific motion performance shortcomings or dynamic characteristics have changed after the addition of new equipment, without having to operate all six channels simultaneously, greatly improving the flexibility and efficiency of debugging.
[0032] Step S200: During the process of the PLC generating a control signal according to the parameter tuning instruction and driving the thruster of the current tuning channel to operate, the PLC receives control instruction data and motion status data corresponding to the current tuning channel. After receiving a parameter configuration request for a specific channel (such as the Z-axis direction), the PLC will generate a specific control command. For example, when adjusting in the Z-axis direction, this command is denoted as... To ensure the safe operation of the underwater robot, the amplitude of this control command is set to a small percentage of the system's maximum command, specifically between 3% and 5%. Before initiating this process, the operator must ensure that the environment around the underwater robot is unobstructed and be prepared for an emergency stop. The PLC issues this control command to the thruster corresponding to the target channel, causing it to operate and thus driving the underwater robot to produce the corresponding movement.
[0033] While driving the thruster, the PLC continuously collects and packages control command data and motion status data corresponding to the currently tuned channel. Specifically, for displacement channels (X, Y, Z), the feedback status data can be displacement, velocity, or both; for rotation channels (yaw, pitch, roll), the feedback status data can be angle, angular velocity, or both. This data is recorded in discrete sampling form. For example, for the Z-axis channel, the sequence of sampled data sent by the PLC to the control parameter self-tuning module can be represented as:
[0034] in, Indicates at the sampling time Control input acting in the Z-axis direction; Indicates at the sampling time The speed of the underwater robot along the Z-axis; This indicates the total number of sampled data points sent by the PLC to the parameter tuning module. This data sequence completely records the correspondence between control inputs and system outputs.Figure 4 This is a schematic diagram of the collected data curve, where, This refers to the initial step control command applied in the Z-axis direction; The velocity value in the Z-axis direction when the system reaches a steady state; Figure 4 This demonstrates the process of obtaining dynamic characteristic data of a system through a step response experiment.
[0035] The control parameter self-tuning module receives and stores the aforementioned data fed back by the PLC in real time through the communication interface. (or a state expressed in terms of angle / angular velocity).
[0036] Step S300: Determine whether the underwater robot meets the parameter tuning conditions based on the motion state data; The control parameter self-tuning module continuously monitors and analyzes the received motion state data. For displacement channels (X, Y, Z), it primarily monitors linear velocity; for rotation channels (yaw, pitch, roll), it monitors angular velocity. The system sets an observation time window (e.g., 2 seconds) and calculates the variance of the velocity or angular velocity data within this window. The condition for determining whether a stable motion state has been entered is that the variance value is less than a preset threshold, such as 0.01. This indicates that the robot's motion speed in that channel has become relatively stable, and the dynamic process has essentially ended.
[0037] In addition to waiting for the system to automatically reach a stable state, this invention also provides a mechanism for manual intervention. Throughout the data acquisition process, the operator can observe the robot's motion status in real time. If the operator deems the current data sufficient, or if it is necessary to stop acquisition for safety, efficiency, or other reasons, the operator can proactively issue a stop command through the human-machine interface system. Once the control parameter self-tuning module receives this stop command, regardless of whether the current motion state has reached the automatically determined stability standard, it will immediately determine that the parameter tuning conditions are met and terminate the data acquisition phase.
[0038] As a safeguard, the system also includes logic for handling parameter tuning failures. If, within a preset, relatively long period (which can be set according to actual conditions), the robot is neither detected to have entered the aforementioned stable motion state nor has a stop command been received from the operator, the control parameter self-tuning module will determine that the parameter tuning attempt has failed. In this case, the module will send a tuning failure notification to the PLC and the human-machine interface system. Upon receiving this notification, the PLC will stop feeding data, thus safely terminating the tuning process.
[0039] Step S400: When the parameter tuning conditions are met, the dynamic model parameters of the current tuning channel are identified based on the control command data and the motion state data. Once the parameter tuning conditions are met, the system enters the model parameter identification stage. The purpose of this step is to identify the control command data collected in step S200. and motion state data By using a system identification method, the dynamic model parameters of the current tuning channel are estimated.
[0040] First, the structure of the mathematical model to be identified needs to be determined. This invention represents the dynamic model of the underwater robot in a single degree of freedom as a first-order inertial element with time delay, whose continuous-time transfer function... The format is as follows:
[0041] in, For continuous-time transfer functions, For system gain, It is a time constant. For system time delay, Let Z be a complex frequency variable. Taking motion in the Z direction as an example, the model can be expressed as:
[0042] according to Figure 4 The discrete-time model corresponding to the sampling data estimation can be expressed as:
[0043] in, Represents at discrete time points At that time, the system's output in the Z-axis direction; Represents at discrete time points The system's output along the Z-axis at (i.e., at the previous sampling time). Equivalent to That is, the velocity or angular velocity at the previous moment; Represents at discrete time points At that time, the control input applied to the system in the Z-axis direction; It is caused by system time delay The number of delay cycles caused; and These are the parameters of the discrete transfer function, where It is the discrete transfer function and the past output The coefficients of the multiplication, It is the input after delay in the discrete transfer function. The coefficients of the product; This represents model error or system noise.
[0044] Before the model parameter identification process officially begins, algorithm initialization is required. The data sampling period is set to [value missing]. (For example ), and preset the maximum time delay of the system to be (For example Based on this, the maximum delay period can be calculated. :
[0045] And determine the starting data sequence number used for parameter identification. :
[0046] At the same time, the stored motion state data will be transferred from The model output vector is formed at the end. For example, for the Z direction:
[0047] in, The model output vector in the Z-axis direction contains the values from the initial time step. By the end time The sampled data of the Z-direction velocity (or angular velocity); This is a transpose.
[0048] The core identification process involves iterating through the possible delay cycles. (From 0 to And then iterate to find the optimal model. For each candidate To determine the value, perform the following steps: First, construct the corresponding model input vector based on the control input data. Its elements are:
[0049] Next, the model output vector is used. and model input vector Constructing the iterative matrix for least squares parameter estimation The iteration matrix for:
[0050] Then, the least squares method is used to calculate the current... Optimal parameter estimates under the given value:
[0051] in, and The parameters in the discrete transfer function model and The estimated value. The symbol "^" represents "estimated value".
[0052] Using the estimated discrete model parameters and Calculate the residual of the model :
[0053] And further calculate the variance of the residuals. :
[0054] in, For the number of data points, This is a summation index used to iterate through each element in the residual vector. Finally, to evaluate the model (corresponding to the current...) To assess the quality of information, calculate the Akaike Information Criterion (AIC) value:
[0055] Complete all After iteratively calculating the value, the system compares the AIC values of all candidate models and selects the parameter combination corresponding to the model that minimizes the AIC value, thus determining the optimal number of delay cycles. and discrete model parameters and These identified discrete parameters These are the final estimated values of the current tuning channel dynamics model parameters, which will be used in the PID control parameter calculation in step S500.
[0056] Step S500: Calculate the PID control parameters of the current tuning channel based on the dynamic model parameters; This invention employs a dual PID control structure—an inner loop (velocity loop) and an outer loop (position loop)—for the control system of an underwater robot, with parameters tuned separately for each loop. The inner loop controller directly acts on the thrusters to stabilize the robot's speed or angular velocity; the outer loop controller handles position or angle tracking.
[0057] First, the discrete model parameters identified in step S400 need to be... Convert to continuous-time model The parameters are as follows:
[0058]
[0059]
[0060] in, The sampling period is [value]. Thus, we have obtained three key continuous parameters characterizing the system's dynamic properties: system gain... Time constant and time delay (Note: In the subsequent PID tuning formula, the time delay time...) Also expressed as ,Right now .
[0061] Next, the parameters of the inner loop speed controller will be tuned. The transfer function of the inner loop speed PID controller is as follows:
[0062] in, This is the transfer function of the inner loop speed controller; The proportional gain of the inner loop speed controller; The integral time constant of the inner loop speed controller; The differential time constant of the inner loop speed controller; It is a complex frequency variable.
[0063] The parameter tuning is calculated based on the severity of the system time delay. The system first calculates the time delay ratio. (If we take the Z-axis as an example, then it is) ), and select different tuning formulas based on the comparison results with the threshold (0.3).
[0064] If the system time delay is not severe, and the following conditions are met... :
[0065]
[0066]
[0067] in, The time constant of the motion system in the Z-axis direction obtained from model identification; The system gain for motion in the Z-axis direction obtained from model identification; The time delay of the motion in the Z-axis direction is obtained from the model identification.
[0068] If the system has severe time delay, it must satisfy... :
[0069]
[0070]
[0071] Inner loop speed controller parameters , , After tuning is complete, continue tuning the parameters of the outer loop position controller. The transfer function form of the outer loop position PID controller is:
[0072] in, The proportional gain of the outer loop speed controller; The integral time constant of the outer loop speed controller; is the differential time constant of the outer loop speed controller.
[0073] Its parameters are calculated based on the inner loop tuning results and system time delay, according to the following formula:
[0074]
[0075]
[0076] Through the above calculation process, the system finally obtains the complete PID parameter set for the inner loop speed controller and outer loop position controller of the current tuning channel. This prepares for the final update of the PLC's control parameters.
[0077] Step S600: Send the PID control parameters to the PLC to update its control parameters.
[0078] The control parameter self-tuning module sends the PID control parameters calculated in step S500 for the current tuning channel to the PLC through the established communication link. Specifically, this includes the parameters of the inner loop speed controller (proportional gain). Integral time constant Differential time constant And the parameters of the outer loop position controller (proportional gain) Integral time constant Differential time constant .
[0079] After successfully receiving and verifying these new control parameters, the PLC will immediately use them to update the original parameters of the PID controllers of the corresponding motion control channels (such as X, Y, Z displacement channels or yaw, pitch, roll channels). This allows the underwater robot to use the newly tuned parameters for closed-loop control from the next moment, thereby expecting to obtain better dynamic response performance, such as faster adjustment speed, smaller overshoot, or better stability.
[0080] Simultaneously, the control parameter self-tuning module sends a confirmation message to the operator via the human-machine interface system, indicating successful parameter updates. This message includes the updated channel name and key parameter values for the operator to record and verify. At this point, the online parameter self-tuning process for a selected motion degree-of-freedom channel is complete. To tune the parameters of other channels, the operator can repeat steps S100 to S600 to systematically optimize the parameter configuration of all six motion degree-of-freedom controllers for the underwater robot.
[0081] This invention proposes an online self-tuning method for underwater robot control parameters. Through the collaborative work of a human-machine interface system, a PLC, and a control parameter self-tuning module, operators can automatically complete parameter tuning with simple prompts. The specific process includes a preparation phase to ensure robot stability, selection of the control channel, PLC generating control commands and driving the thrusters, and the self-tuning module collecting motion state data. It optimizes the control effect through model parameter identification (e.g., estimating discrete transfer function parameters based on the least squares method) and control parameter calculation (e.g., PID parameter tuning). This method reduces debugging difficulty, improves efficiency, and can handle complex situations such as multi-degree-of-freedom independent control and thruster asymmetry, ultimately improving the robot's dynamic response performance and enhancing the ROV operator's experience.
[0082] According to another aspect of the embodiments of this application, an electronic device is also provided, including a processor and a memory, wherein the processor is configured to implement the steps of the method when executing a computer program stored in the memory.
[0083] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0084] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0085] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0086] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0087] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for online self-tuning of control parameters for an underwater robot, characterized in that, Includes the following steps: In response to the parameter tuning command, select one degree of freedom channel of the underwater robot as the current tuning channel; During the process of the PLC generating control signals according to the parameter tuning instructions and driving the thruster of the current tuning channel to operate, the system receives control instruction data and motion status data corresponding to the current tuning channel fed back by the PLC. Based on the motion state data, determine whether the underwater robot meets the parameter tuning conditions; When the parameter tuning conditions are met, the dynamic model parameters of the current tuning channel are identified based on the control command data and the motion state data. The PID control parameters of the current tuning channel are calculated based on the dynamic model parameters. The PID control parameters are sent to the PLC to update its control parameters; The PID control parameters include the parameters of the inner loop speed controller and the outer loop position controller; The step of calculating the PID control parameters of the current tuning channel based on the dynamic model parameters includes: calculating the parameters of the inner loop speed controller and the outer loop position controller based on the identified dynamic model parameters; The method for calculating the parameters of the inner loop speed controller includes: Based on the time delay parameters in the dynamic model parameters, determine the severity of the system time delay; If the system time delay does not exceed the preset threshold, the parameters of the inner loop speed controller are calculated according to the first set of preset formulas, which are as follows: in, The proportional gain of the inner loop speed controller; The integral time constant of the inner loop speed controller; The differential time constant of the inner loop speed controller; The time constant of the motion system in the Z-axis direction obtained from model identification; The system gain for motion in the Z-axis direction obtained from model identification; The time delay of the motion in the Z-axis direction obtained from model identification; The time delay; If the system time delay exceeds the preset threshold, the parameters of the inner loop speed controller are calculated according to the second set of preset formulas, which are as follows: The method for calculating the parameters of the outer loop position controller includes: calculating the parameters of the outer loop position controller based on the parameters of the inner loop speed controller according to a preset formula, wherein the preset formula is as follows: in, The proportional gain of the outer loop speed controller; The integral time constant of the outer loop speed controller; is the differential time constant of the outer loop speed controller.
2. The method for online self-tuning of underwater robot control parameters as described in claim 1, characterized in that, The method for identifying the dynamic model parameters of the currently tuned channel includes: Based on the sampling period and the preset maximum time delay, the model parameter identification algorithm is initialized to determine the maximum number of delay periods and the starting data sequence number for parameter estimation. The motion state data is used as the model output to construct the model output vector; For each data index starting from the initial data index, the following iterative identification process is performed: Based on the control command data, construct a model input vector corresponding to the data sequence number; Using the model output vector and the model input vector, an iterative matrix for least squares parameter estimation is constructed; The iterative least squares parameter estimation method is used to calculate the optimal model parameter estimates for the current data index. Based on the estimated optimal model parameters, calculate the model residuals and the variance of the model residuals; Calculate the AIC information criterion value based on the variance; The iterative identification process is executed repeatedly, and the delay period number and model parameters corresponding to the minimum AIC information criterion value are selected as the final estimated values of the dynamic model parameters of the current tuning channel.
3. The online self-tuning method for underwater robot control parameters as described in claim 2, characterized in that, The methods for calculating the optimal model parameter estimates under the current data sequence number include: applying the recursive iterative least squares method, minimizing the sum of squares of the model residuals, and solving for the discrete transfer function parameters that best match the actual motion state data, including time delay parameters, numerator polynomial parameters, and denominator polynomial parameters.
4. The method for online self-tuning of underwater robot control parameters as described in claim 1, characterized in that, Determining whether the underwater robot meets the parameter tuning conditions includes: Monitor the velocity or angular velocity in the motion state data; If the variance of the velocity or angular velocity is less than the preset value within a preset time, it is determined that the parameter tuning conditions are met. Alternatively, if a stop command is received from the operator, it is determined that the parameter tuning conditions are met.
5. The method for online self-tuning of underwater robot control parameters as described in claim 1, characterized in that, After the step of determining whether the underwater robot meets the parameter tuning conditions based on the motion state data, the method further includes a parameter tuning failure handling step: If the underwater robot does not enter a stable motion state and does not receive a stop command within a preset time, it is determined that the parameter tuning has failed and a failure command is sent to the PLC. or, After determining that the parameter tuning conditions are met, the average velocity and velocity variance are calculated based on the motion state data during the last period of time. If the average speed is less than a predetermined percentage of the maximum speed designed for the current tuning channel, or if the speed variance is greater than a preset threshold, then the parameter tuning is deemed to have failed.
6. An electronic device, comprising a memory and a processor, characterized in that, The memory is used to store a program that supports the processor in executing the online self-tuning method for the control parameters of the underwater robot according to any one of claims 1-5, and the processor is configured to execute the program stored in the memory.
7. A computer-readable storage medium storing a computer program thereon, characterized in that, When the computer program is run by the processor, it performs the steps of the online self-tuning method for the control parameters of the underwater robot according to any one of claims 1-5.