Water-air cross-domain robot control method, device, medium and product

By constructing piecewise linear dynamic equations and a multimodal decomposition matrix library, and combining the Riccati backward transfer method and ADMM iteration, the problems of high computational load and low efficiency in the control of water-air cross-domain robots are solved, achieving fast response and efficient computation.

CN122194697BActive Publication Date: 2026-07-21HANGZHOU INTERNATIONAL INNOVATION INSTITUTE OF BEIHANG UNIVERSITY
View PDF 2 Cites -1 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU INTERNATIONAL INNOVATION INSTITUTE OF BEIHANG UNIVERSITY
Filing Date
2026-05-14
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Model predictive control is computationally intensive in water and air cross-domain robots, making it difficult to run in real time on resource-constrained 32-bit microcontrollers. Furthermore, existing lightweight solvers assume that the robot's physical model remains static, resulting in low computational efficiency.

Method used

A piecewise linear dynamic equation is constructed, and deviations from the confidence interval are determined by real-time environmental parameters. Cross-domain switching signals are generated, and the optimal control command is updated using the Riccati backpropagation method and the multimodal decomposition matrix library. The initial values ​​of ADMM iteration and TinyMPC iteration are combined to reduce the amount of computation and improve computational efficiency.

Benefits of technology

It enables rapid response in cross-domain environments of water and air cross-domain robots, reduces computational load, improves computational efficiency, ensures real-time determinism of the control system, and avoids the problems of sharp increase in computation time and inaccuracy in cross-domain scenarios of traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122194697B_ABST
    Figure CN122194697B_ABST
Patent Text Reader

Abstract

The application discloses a water-air cross-domain robot control method, device, medium and product, relates to the technical field of robot control and embedded artificial intelligence, and the method comprises the following steps: constructing a segmented linear dynamics equation of the water-air cross-domain robot; in each control period, real-time environment parameters of a current physical domain are acquired; when the real-time environment parameters of the current physical domain deviate from a confidence interval, a cross-domain switching signal is generated, the robot is switched to a target physical domain, based on the segmented linear dynamics equation and multi-modal decomposition parameters corresponding to the target physical domain in a pre-constructed multi-modal decomposition matrix library, the Riccati backward transfer method is used for updating, and an optimal control instruction is output; otherwise, TinyMPC iteration is performed based on the segmented linear dynamics equation and multi-modal decomposition parameters corresponding to the current physical domain in the pre-constructed multi-modal decomposition matrix library, and an optimal control instruction is obtained, and the calculation efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of robot control and embedded artificial intelligence technology, and in particular to a method, device, medium and product for controlling a cross-domain water and air robot. Background Technology

[0002] Model Predictive Control (MPC) offers significant advantages in handling dynamic systems with complex constraints, such as obstacle avoidance in UAVs and cross-media inspection. However, the computational demands of online optimization in MPC are enormous, making it difficult to run in real-time on resource-constrained 32-bit microcontrollers. While lightweight solvers (such as TinyMPC) have significantly improved speed through pre-decomposition of matrices, they typically assume that the robot's physical model is statically invariant, resulting in low computational efficiency. Summary of the Invention

[0003] The purpose of this application is to provide a method, device, medium, and product for controlling a cross-domain water and air robot, which can reduce the amount of computation and improve computational efficiency.

[0004] To achieve the above objectives, this application provides the following solution: In a first aspect, this application provides a method for controlling a cross-domain water-air robot, including: For the multiple physical domains experienced by the water-air cross-domain robot, piecewise linear dynamic equations are constructed; Within each control cycle, real-time environmental parameters of the current physical domain are acquired; these real-time environmental parameters include pressure, acceleration, and angular velocity. Determine whether the deviation from the confidence interval is based on the real-time environmental parameters of the current physical domain; If the deviation deviates from the confidence interval, a cross-domain switching signal is generated, and the water-air cross-domain robot switches from the current physical domain to the target physical domain. Based on the piecewise linear dynamic equations and the multimodal decomposition parameters corresponding to the target physical domain in the pre-built multimodal decomposition matrix library, the intermediate linear variables are updated using the Riccati backward transfer method, and the optimal control command is output. In the process of updating the intermediate linear variables and outputting the optimal control command of the control cycle, the Lagrange multipliers of the previous moment are retained as the initial values ​​for ADMM iteration. The multimodal decomposition parameters include the control gain matrix, the system state transition matrix, the steady-state feedback gain, and the control input transpose matrix. If the control does not deviate from the confidence interval, TinyMPC iteration is performed based on the piecewise linear dynamic equations and the multimodal decomposition parameters corresponding to the current physical domain in the pre-built multimodal decomposition matrix library to obtain the optimal control command.

[0005] Secondly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the computer program to implement the steps of the above-described water-air cross-domain robot control method.

[0006] Thirdly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described water-air cross-domain robot control method.

[0007] Fourthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described water-air cross-domain robot control method.

[0008] According to the specific embodiments provided in this application, this application has the following technical effects: This application provides a control method, device, medium, and product for a water-air cross-domain robot. By pre-constructing a multimodal decomposition matrix library offline, after the water-air cross-domain robot experiences a cross-domain environment (such as entering water from air, sudden load changes, or encountering strong dynamic interference), i.e., switching physical domains, it can directly call the multimodal decomposition parameters corresponding to the target physical domain in the multimodal decomposition matrix library. Based on the Riccati backward transfer method, iterative updates are performed to obtain the optimal control command, which can reduce the amount of computation and improve computational efficiency. This application determines whether to generate a cross-domain switching signal by using the real-time environmental parameters of the current physical domain, i.e., by using a physical domain identification trigger, it can achieve instantaneous response to sudden changes in robot dynamic characteristics without performing online matrix inversion. Attached Figure Description

[0009] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly described below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort: Figure 1 This is an application environment diagram of a water-air cross-domain robot control method according to an embodiment of this application; Figure 2 A flowchart illustrating a water-air cross-domain robot control method provided in an embodiment of this application; Figure 3 A schematic diagram illustrating the specific process of a water-air cross-domain robot control method provided in an embodiment of this application; Figure 4 A block diagram of the control system logic architecture inside a microcontroller provided in an embodiment of this application; Figure 5A feedback adjustment block diagram of an adaptive weight matrix provided in an embodiment of this application; Figure 6 This is a comparison diagram of control command responses for different startup methods during cross-domain switching, provided in an embodiment of this application. Figure 7 A dynamic adjustment curve of the adaptive weight matrix during the transition period provided in an embodiment of this application; Figure 8 A flowchart illustrating the logic of fast switching and instruction computation for cross-domain models based on asynchronous warm start, provided in an embodiment of this application; Figure 9 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

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

[0011] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0012] The water-air cross-domain robot control method provided in this application embodiment can be applied to, for example... Figure 1In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be set up independently, integrated into server 104, or placed in the cloud or on another server. Terminal 102 can send requests to be processed to server 104. After receiving the request, server 104 constructs piecewise linear dynamic equations for each physical domain of the water-air cross-domain robot. In each control cycle, it acquires the real-time environmental parameters of the current physical domain. When the real-time environmental parameters of the current physical domain deviate from the confidence interval, a cross-domain switching signal is generated, and the robot switches from the current physical domain to the target physical domain. Based on the piecewise linear dynamic equations and the multimodal decomposition parameters corresponding to the target physical domain in a pre-built multimodal decomposition matrix library, the robot updates using the Riccati backward propagation method and outputs the optimal control command. Conversely, based on the piecewise linear dynamic equations and the multimodal decomposition parameters corresponding to the current physical domain in the pre-built multimodal decomposition matrix library, it performs TinyMPC iteration to obtain the optimal control command. Server 104 can feed back the obtained optimal control command for the request to terminal 102. In addition, in some embodiments, the water-air cross-domain robot control method can also be implemented by the server 104 or the terminal 102 separately. For example, the terminal 102 can directly perform control command iteration for the request to be processed, or the server 104 can obtain the request to be processed from the data storage system and perform control command iteration for the request to be processed.

[0013] The terminal 102 can be, but is not limited to, various desktop computers and laptops. The server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers, or it can be a cloud server.

[0014] In one exemplary embodiment, such as Figure 2 As shown, a method for controlling a cross-domain water and air robot is provided. This method is executed by a computer device, specifically by a terminal or server alone, or by both a terminal and a server. In this embodiment, the method is applied to... Figure 1 Taking server 104 as an example, the explanation includes the following steps 201 to 205.

[0015] Step 201: Construct piecewise linear dynamic equations for the multiple physical domains experienced by the water-air cross-domain robot.

[0016] Step 202: In each control cycle, obtain the real-time environmental parameters of the current physical domain; the real-time environmental parameters include pressure, acceleration and angular velocity.

[0017] Step 203: Determine whether the current physical domain deviates from the confidence interval based on the real-time environmental parameters of the current physical domain.

[0018] Step 204: If the deviation deviates from the confidence interval, a cross-domain switching signal is generated, and the water-air cross-domain robot switches from the current physical domain to the target physical domain. Based on the piecewise linear dynamic equations and the multimodal decomposition parameters corresponding to the target physical domain in the pre-built multimodal decomposition matrix library, the intermediate linear variables are updated using the Riccati backward transfer method, and the optimal control command is output. In the process of updating the intermediate linear variables and outputting the optimal control command of the control cycle, the Lagrange multipliers of the previous moment are retained as the initial values ​​for the ADMM (Alternating Direction Method of Multipliers) iteration. The multimodal decomposition parameters include the control gain matrix, the system state transition matrix, the steady-state feedback gain, and the control input transpose matrix.

[0019] Step 205: If there is no deviation from the confidence interval, TinyMPC iteration is performed based on the piecewise linear dynamic equation and the multimodal decomposition parameters corresponding to the current physical domain in the pre-built multimodal decomposition matrix library to obtain the optimal control command.

[0020] By implementing steps 201 to 205 above, a multimodal decomposition matrix library is pre-built offline. When the water-air cross-domain robot experiences a cross-domain environment (such as entering water from air, sudden load changes, or encountering strong dynamic disturbances), i.e., after switching physical domains, the multimodal decomposition parameters corresponding to the target physical domain in the multimodal decomposition matrix library can be directly called. Based on the Riccati backward transfer method, iterative updates are performed to obtain the optimal control command, which can reduce the amount of computation and improve computational efficiency. When the robot experiences a "cross-domain" environment (such as entering water from air, sudden load changes, or encountering strong dynamic disturbances), the A and B matrices in the dynamic equations of the traditional lightweight solver will change drastically, resulting in cross-domain scene inaccuracy and a sharp increase in computation time (computation dead point), making it difficult to guarantee the real-time determinism of the control system. This application determines whether to generate a cross-domain switching signal by using the real-time environmental parameters of the current physical domain, i.e., by using a physical domain identification trigger, it can achieve instantaneous response to sudden changes in robot dynamic characteristics without performing online matrix inversion.

[0021] This embodiment adopts a fully autonomous embedded carrier-side real-time operating architecture: Hardware platform: The target hardware is a micro-robot platform equipped with a 32-bit high-performance microcontroller (such as the Crazyflie 2.1-nanometer UAV); Microcontroller parameters: It adopts an ARM Cortex-M4 core (STM32F405 chip), with a main frequency set at 168MHz, and is equipped with approximately 192kB of random access memory and 1MB of flash memory; Software implementation: The control algorithm is written in C++ and the code has been optimized for embedded hardware to ensure low memory usage and high execution efficiency; Control frequency: The system executes the closed-loop control loop at a frequency of not less than 500 Hz on the carrier side.

[0022] This application employs multi-domain matrix pooling preprocessing and hierarchical adaptive hot-start techniques. By identifying triggers in the physical domain, the microcontroller achieves instantaneous response to sudden changes in robot dynamics characteristics without performing online matrix inversion. Its core mathematical model aims to minimize the weighted sum of state deviation and control input within the prediction time domain N (N=10). The cost function (objective function) is expressed as follows: (1); in, The control sequence to be optimized. This is the initial control input vector. for The control input vector at each time step; For prediction in the time domain; This indicates taking the minimum value; To predict the terminal state vector at the end of the time domain; For reference target state; This is the terminal state weight matrix; for The state vector of the water-air cross-domain robot at any given moment; This is the time-domain step size index, with values ​​ranging from 0 to... N -1; for The control input vector at each time step; for The adaptive weight matrix at time step (defined dynamic weight adjustment operator); To control incremental penalties, used to smooth out speed jumps in the motor; To control the incremental penalty weight.

[0023] During the transition period, adaptive control is achieved by dynamically reconstructing the adaptive weight matrix of the cost function.

[0024] First, multi-domain dynamics modeling and linear segmentation are performed: for the n physical domains experienced by the robot (n=2, where... =1 indicates the air domain. =2 represents the water area. A nonlinear dynamic model is used for analysis. Nonlinear dynamic models for each physical domain are constructed using first-principles calculations, and physical compensation terms, including gravity terms, are explicitly included in the models to account for environmental changes. Buoyancy (Only in) (Opens when =2) and fluid resistance term .

[0025] Utilizing the differential flatness of the system, the high-dimensional (12-dimensional) state vector Mapped to a low-dimensional (4-dimensional) flat output space consisting of three-dimensional position and yaw angle. ,in, They are respectively Position coordinates on the axis This refers to the yaw angle. "Differential flatness" is like finding the string of a kite. Although 12 parameters, including attitude and speed, change during drone flight, as long as the four core variables—"position" and "nose direction"—are controlled, the other parameters can be automatically calculated. This way, the microcontroller only needs to process these four core variables, significantly reducing the computational load.

[0026] Linearization in a flat space: Within the flat output space, decoupled linearization models for each domain are derived based on the differential flatness mapping relationship. Subsequently, a first-order Taylor expansion is performed near the selected equilibrium point to obtain the discretized piecewise linear dynamic equations, as follows: (2); in, and The first The state matrix and control matrix of each physical domain; This indicates that the drone is in The 12-dimensional state vector at each moment includes three-dimensional coordinate position, three-dimensional linear velocity, three-dimensional attitude Euler angle, and three-dimensional angular velocity; Indicates that drones are in The four-dimensional control input vector at any given time includes the target speed or PWM control quantity for each motor of the quadcopter.

[0027] By eliminating strong coupling between states through differential flatness, TinyMPC's preprocessing matrix can be directly applied to the dimensionality-reduced space. While ensuring control accuracy, this dimensionality-reduction mapping avoids direct computation of high-dimensional matrices, further improving the response speed of low-computing-power embedded hardware during cross-domain switching, and laying a mathematical foundation for subsequent real-time adaptive control.

[0028] After obtaining the piecewise linear dynamic equations, as follows Figure 3As shown, the following steps are performed: In the offline phase, a multimodal decomposition matrix library is pre-stored offline; real-time sensor data fusion and feature extraction are performed; and a cross-domain switching signal is detected. If not, call the current domain matrix and perform TinyMPC iteration as usual; if yes, perform matrix atom switching and Lagrange multiplier hot start, adaptive weight smoothing compensation, output control command uk, enter the next control cycle, until all control cycles are completed and the process ends.

[0029] 1. Offline pre-computation and construction of the KKT system matrix library (offline pre-stored multimodal decomposition matrix library) Offline pre-computation and construction of the multimodal decomposition matrix library.

[0030] For each physical domain obtained from the above steps, the steady-state solution of the Riccati equations for the infinite-time LQR problem is solved in advance. The corresponding inversion auxiliary matrices (including the control gain matrix and the system state transition matrix) are cached. The final output of this step is a multi-domain multimodal decomposition matrix library stored in the microcontroller's read-only memory area. This multimodal decomposition matrix library contains the following four core components: control gain matrix, system state transition matrix, steady-state feedback gain, and control input transpose matrix.

[0031] The following two auxiliary matrices for inversion are calculated offline using the steady-state solution of the Riccati equation: the control gain matrix and the system state transition matrix.

[0032] 1) Control gain matrix : (3); in, For the first Steady-state symmetric positive definite solutions of the Riccati equations in each physical domain; The input weight matrix is ​​used to limit the power consumption output of the motor; the control gain matrix is ​​used to calculate the normalization factor of the optimal control law.

[0033] 2) System state transition matrix : (4); in, For the first The steady-state feedback gain (steady-state LQR feedback gain matrix) in each physical domain is used for fast mapping of state costs; the system state transition matrix represents the mathematical evolution characteristics of the closed-loop system.

[0034] The code definition of C1_Air_data (the system state transition matrix for air domain data) and the corresponding water domain data example are as follows: const float C1_Air_data

[16] = { 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f }; # Representation of the state transition matrix of the air domain in this embodiment static const float C1_Water_data

[16] = { 1.2f, 0.0f, 0.0f, 0.0f, 0.0f, 1.2f, 0.0f, 0.0f, 0.0f, 0.0f, 1.2f, 0.0f, 0.0f, 0.0f, 0.0f, 1.2f }; # Representation of the state transition matrix of the water area in this embodiment The code definition of C2_Air_data (the system state transition matrix for air domain data) and the corresponding water domain data example are as follows: static const float C2_Air_data

[144] = { 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f,0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f,0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f,0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f,0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f,0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,1.0f }; static const float C2_Water_data

[144] = { 0.8f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,0.0f, 0.0f, 0.8f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,0.0f, 0.0f, 0.0f, 0.8f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,0.0f, 0.0f, 0.0f, 0.0f, 0.8f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.9f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.9f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.9f, 0.0f, 0.0f, 0.0f, 0.0f,0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.9f, 0.0f, 0.0f, 0.0f,0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.9f, 0.0f, 0.0f,0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.9f, 0.0f,0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.9f,0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,0.9f In a preferred embodiment of the present invention, the system distinguishes different physical domains using a preset parameter matrix. For the air domain, the system state transition matrix C2Air is configured as a 12×12 identity matrix; for the water environment, in order to compensate for the influence of fluid viscous resistance, the diagonal elements of the system state transition matrix C2Water are modified to a preset attenuation value (e.g., 0.8) less than 1.

[0035] use , These two matrices can transform TinyMPC's online iteration into pure matrix-vector multiplication, completely eliminating the computationally intensive online matrix inversion process.

[0036] 3) Steady-state feedback gain : Used for fast mapping of state costs.

[0037] 4) Control input transpose matrix Used to connect adjacent states within the prediction time domain.

[0038] The internal control system logic architecture of a microcontroller is as follows: Figure 4 As shown, the physical domain in this application includes the air domain and the water domain. Therefore, the multimodal decomposition matrix library includes an air domain matrix library and a water domain matrix library. The above matrix groups are stored in the MCU's Flash memory in the form of lightweight arrays (floating-point arrays). In the subsequent TinyMPC solution steps (steps 204-205), the complex "quadratic optimization problem" can be mathematically decomposed offline in advance. During online runtime, the microcontroller only needs to call these pre-decomposed matrices to perform matrix-vector multiplication, completely transforming the online matrix inversion operation (the most time-consuming and resource-intensive step) required for online operation into simple linear algebra multiplication and addition operations, thereby completely eliminating the huge computational overhead of online matrix inversion.

[0039] Real-time environmental feature extraction and physical domain identification: Onboard sensors (including an onboard six-axis inertial measurement unit (IMU) and a barometer or pressure gauge to monitor depth and obtain instantaneous pressure, and the onboard six-axis IMU to monitor water impact) are used to collect real-time environmental parameters, thereby extracting dynamic environmental feature vectors. φ When the feature vector deviates from the confidence interval of the current physical domain, a cross-domain switching signal is generated. The dynamic environment feature vector is a four-dimensional feature vector used to characterize the current physical environment state, as shown below: (5); in, The instantaneous pressure is obtained directly from the water pressure gauge; The total acceleration modulus (L2 norm) reflects the impact strength; The total angular velocity modulus reflects drastic attitude changes. The acceleration is the vertical axis acceleration, used to determine the direction of resistance at the moment of water entry.

[0040] The relevant code example is as follows: void computeFeatureVector(float phi[4]) const { phi[0] = pressure; phi[1] = sqrtf(accel[0] accel[0] + accel[1] accel[1] + accel[2] accel[2]); phi[2] = sqrtf(gyro[0] gyro[0] + gyro[1] gyro[1] + gyro[2] gyro[2]); phi[3] = accel[2]; }

[0041] In step 203 above, determining whether there is a deviation from the confidence interval based on the real-time environmental parameters of the current physical domain specifically includes: fusing the real-time environmental parameters of the current physical domain to obtain the dynamic environmental feature vector of the current physical domain; calculating the deviation based on the dynamic environmental feature vector and feature reference values ​​of the current physical domain; when the deviation exceeds a preset threshold, it indicates a deviation from the confidence interval of the current physical domain; when the deviation does not exceed the preset threshold, it indicates no deviation from the confidence interval of the current physical domain. This is a dual-determination logic that ensures the system can identify the physical instant of entering "water" from "air," avoiding crashes caused by using incorrect dynamic parameters.

[0042] Triggering mechanism: An impact threshold of 3g acceleration and a pressure surge threshold are set (the pressure surge threshold is set to an instantaneous pressure increment 1%-2% higher than the static atmospheric pressure). When the six-axis inertial measurement unit detects a physical impact at the moment of contact with the water surface and the pressure gauge reading deviates from the confidence interval of the current physical domain (confirming complete immersion), the system calculates in real time. Characteristic reference value of the current physical domain The deviation.

[0043] Calculate the Euclidean distance between the dynamic environment feature vector and the feature reference value to obtain the deviation, which is used as the switching criterion: (6); The deviation threshold between the deviation and the confidence interval can be set to 0.3%. When the deviation from the confidence interval of the current domain is greater than the deviation threshold, it indicates that the deviation is from the confidence interval of the current physical domain, and the logic trigger immediately generates a cross-domain switching signal. Otherwise, it indicates that the deviation is not from the confidence interval of the current physical domain.

[0044] The code is presented as follows: bool detectDomainSwitch(const SensorData&sensors, Domain¤t_domain) { float phi[4]; # Define a four-dimensional environmental feature vector phi, used to store real-time physical features extracted from sensors. sensors.computeFeatureVector(phi); # Call the sensor processing module to calculate the current dynamic environment feature vector (usually containing 1D pressure data and 3D instantaneous acceleration data). float epsilon = 0.0f; # Initialize the feature deviation value epsilon (i.e., deviation, cumulative Euler distance variable), used to quantify the difference between the current environment and the standard environment. const float phi_ref = (current_domain == Domain::AIR) ? phi_ref_air : phi_ref_water; # Automatically match the corresponding environmental confidence interval reference base based on the current physical domain state. for (int i = 0; i < 4; i++) { # Iterate through the four-dimensional feature vector and calculate the deviation between the real-time sampled data and the current physical domain reference data. float diff = phi[i] - phi_ref[i]; # Calculate the difference in a single dimension (such as pressure or acceleration along a certain axis). epsilon += diff diff; The squared geometric distance in the feature space is calculated using the sum of squares method. epsilon = sqrtf(epsilon); # Perform the square root operation on the sum of squares to obtain the final Euclidean norm of the environmental feature deviation. if (epsilon>epsilon_threshold) {#Logical judgment: If the feature deviation value exceeds the preset confidence interval threshold} return true; } return false; If the deviation is within the safe range, it is determined that the physical domain has not changed, and the current control logic is maintained.

[0045] Fast matrix switching based on hot start includes: 1) atomic switching of matrix pointers (ensuring computational stability), 2) state inheritance of Lagrange multipliers and hot start, and 3) forward pass and instruction computation.

[0046] 1) Atomic switching of matrix pointers (ensuring computational stability): Upon receiving a cross-domain switching signal, the microcontroller performs an atomic jump of the matrix pointer within the first control interrupt cycle. The microcontroller modifies the memory address pointer to move the address of the auxiliary matrix group (multimodal decomposition parameters) called by the current solver from the current physical domain. iThe storage starting address is instantly redirected to the target physical domain. j The starting address of the memory. Atomicity definition: This jump operation is executed as an indivisible minimum instruction, ensuring that TinyMPC, within the current iteration cycle, either fully utilizes the current physical domain. i The multimodal decomposition parameters either fully utilize the target physical domain. j For multimodal decomposition parameters, it is strictly forbidden to mix matrix parameters from different physical domains in a single iteration. This approach avoids numerical solution oscillations or algorithm non-convergence caused by sudden parameter changes during computation, and resolves the computational errors that may occur when switching parameters in traditional methods.

[0047] The relevant code example is as follows: void update(const SensorData&sensors, const float x_current[NX], float u_output[NU]) {# The main loop updates the control law in real time. Within each control cycle, it performs environmental detection, physical domain switching determination, and control command calculation. bool domain_switched = domain_detector.detectDomainSwitch(sensors, current_domain); # Call the domain detector to determine in real time whether the current sensor data deviates from the confidence interval of the current physical domain. If a sudden environmental change (such as water impact) is detected, domain_switched returns true. if (domain_switched) { # Enter the cross-domain logic branch: execute only the instant a physical domain switch is detected. switchDomainMatrices(current_domain); # Performs an atomic jump to the matrix pointer. adaptive_weighting.startTransition(); # Calls the smooth transition algorithm to dynamically adjust the control weight matrix and mitigate actuator jitter caused by sudden changes in physical domain parameters. max_iter = MAX_ADMM_ITER_SWITCH; To improve computational convergence, adjust the number of ADMM iterations. }

[0048] 2) State inheritance and hot start of Lagrange multipliers: Based on the multimodal decomposition parameters obtained in the previous steps, intermediate linear variables are obtained through the Riccati backward transfer method. , And optimal control commands with physical continuity .

[0049] Simultaneously with the pointer jump, the system executes a warm-start strategy. The key is to avoid resetting the initial iteration values ​​of the ADMM algorithm; instead, it retains the Lagrange multipliers from the previous time step as the initial iteration values ​​for the current time step. The principle is that although the physical environment undergoes abrupt changes, the robot's pose and motion trends remain continuous in the time dimension. Retaining the Lagrange multipliers means preserving the system's "mathematical memory" of the physical constraints from the previous time step. Utilizing this mathematical convergence inertia, the system can quickly find the optimal solution within the new constraint space.

[0050] The relevant code example is as follows: struct ADMMState { #ADMM: The state variables of the optimization solver, storing intermediate variables of the optimization algorithm in the time dimension. float lambda[NHORIZON][NU]__attribute__((aligned(4))); float z[NHORIZON][NU]__attribute__((aligned(4))); #Lagrange multipliers, representing the degree to which the system violates current physical constraints (such as motor speed limits, dynamic equations). Retaining this matrix at the cross-domain instant is equivalent to retaining the controller's mathematical understanding of the "force equilibrium state at the previous moment".

[0051] }

[0052] Then, the Riccati fast update is performed. The Riccati backpropagation update formula is as follows: (7); (8); in, , During the ADMM solution process Intermediate linear variables at time points; , , , The target physical domains are respectively The corresponding control gain matrix, system state transition matrix, steady-state feedback gain, and control input transpose matrix ( That is, the aforementioned ); for Intermediate linear variables at time points; , It is a linear cost vector in the cost function, which is updated in real time with the reference trajectory and the iteration process; It is a penalty parameter The reciprocal of is the step scaling factor of the ADMM algorithm, which determines the correction strength.

[0053] 3) Forward pass and instruction calculation: Calculate the optimal control instruction with physical continuity based on the backward pass results. The forward pass formula is: (9); in, for The optimal control command at any given moment; for The adaptive weight matrix at time step; To control the incremental penalty weight; for Lagrange multipliers of time; For the current physical domain The corresponding environmental feedforward compensation term. The continuity of the control surface is ensured by the state inheritance of Lagrange multipliers and hot start, preventing control interruption during switching.

[0054] It is a dynamic shock absorber; the greater the impact of water entry, The larger, The smaller the gain, the more forcefully the instruction transition is smoothed out by reducing the gain.

[0055] Based on the (asynchronous) warm-start strategy, the ADMM (Alternating Direction Multiplier Method) algorithm has strong robustness. Using the solution of the previous frame as the initial value (warm start) can significantly reduce the number of iterations required for convergence.

[0056] void riccatiBackwardPass(int k) { const float C1 = matrix_lib->getC1(current_domain); const float C2 = matrix_lib->getC2(current_domain); # The program retrieves the corresponding control gain matrix C1 and system state transition matrix C2 directly from the multimodal decomposition matrix library in read-only memory (Flash) based on the current physical domain index (current_domain, such as air or water).

[0057] MatrixOps::matVecMult(C1, temp1, admm_state.d[k], NU, NU); # Calculate intermediate linear variables MatrixOps::vecAdd(admm_state.q[k], At_p, admm_state.p[k], NX); # Calculate intermediate linear variables .

[0058] Benefits: Ensures that the control frequency remains above 500Hz even during sudden environmental changes, preventing computational lag due to reinitialization.

[0059] During each control cycle of the water-air cross-domain robot's operation, once a change in the current environment is detected, a cross-domain switching signal is generated. The corresponding multimodal decomposition parameters are immediately extracted from the multimodal decomposition matrix library based on an index and participate in the Riccati backpropagation. It updates the Lagrange multipliers in real time using a linear recursive formula, thereby calculating the current optimal control command within 2ms without resetting the computational state (warm start).

[0060] The linear recurrence formula is ;in, This refers to the new round of Lagrange multipliers obtained after the current iteration step m+1 is completed; The Lagrange multiplier of the previous iteration; This is the optimal control input vector; As a dual auxiliary variable; This represents the original residual.

[0061] This application also includes a physical feedforward compensation injection step: Real-time invocation of the environmental feedforward compensation term, injecting the environmental feedforward compensation term into the control law as feedforward compensation in real time, which can further offset the known physical force step impact after updating the adaptive weight matrix, based on the current physical domain index. i The formula for calculating the environmental feedforward compensation term is as follows: The environmental feedforward compensation term is calculated from the gravity term, buoyancy term, and fluid resistance term.

[0062] After outputting the optimal control command, the water-air cross-domain robot control method further includes: linearly superimposing the optimal control command with the environmental feedforward compensation term to obtain the final control vector output to the actuator. Final control vector synthesis: combining the optimal control command output by the TinyMPC solver... The control vector is obtained by linearly superimposing the environmental feedforward compensation term corresponding to the current physical domain to obtain the final output to the actuator. .

[0063] This synthesis mechanism pre-emptively offsets most known physical force step impacts through feedforward compensation, allowing the TinyMPC solver to only fine-tune for residual small trajectory deviations. The continuity of the control surface is ensured through both mathematical iteration and physical compensation, effectively preventing control command interruptions caused by a sudden increase in environmental medium density or transient oscillations in the actuator due to load changes.

[0064] Traditional MPCs require re-decomposition of matrices after environmental changes, which can cause computational lag in the MCU (latency > 10ms) and lead to control loop collapse. This application solves the control instability caused by abrupt changes in the dynamic model during the switching between different physical environments (domains) of drones and other robots, as well as the robustness problem of TinyMPC in scenarios with drifting dynamic parameters, by pre-setting a "multi-domain matrix library (i.e., multimodal decomposition matrix library)" and an "asynchronous warm start" mechanism, thus achieving millisecond-level smooth cross-domain switching on low-computing-power hardware.

[0065] This application achieves a technological breakthrough through a closed-loop logic of offline solidification (offline pre-stored multimodal decomposition matrix library) – online triggering (generating a cross-domain switching signal when deviating from the confidence interval of the current physical domain) – pointer jump (physical domain switching). The multimodal decomposition matrix library is the physical foundation for enabling inverse-free computation in the physical domain switching step; the warm-start strategy is a mathematical application of the dynamic continuity assumption established in step 201.

[0066] Dynamic reshaping of the cost function terrain: Within the first T control frames after model switching (T=20, corresponding to a transition period of approximately 40ms), the system introduces an adaptive learning rate. (set up =0.5) to dynamically adjust the adaptive weight matrix in the cost function, and use the adaptive weight matrix to smooth out the instantaneous jump in control commands caused by model mutation.

[0067] After the water-air cross-domain robot switches from the current physical domain to the target physical domain, the adaptive weight matrix is ​​updated using the following formula: (10); in, The adaptive weight matrix before the update; This is a weighting compensation coefficient used to adjust the response sensitivity based on the state deviation. 0.5 is acceptable; Represents a diagonal matrix; This represents the current state of the water-air cross-domain robot. This serves as a reference target state for the water-air cross-domain robot. The energy balance factor is determined by the cross-domain switching signal, and is used in water areas (where resistance is high). Set to 1.0, automatically increase to protect the motor, in the air-cooled region. Set it to 0.1 to increase flexibility; This is the current actuator load function, used to monitor whether the motor is approaching saturation; The current actuator load function; for The optimal control command at any given time.

[0068] Feedback adjustment of the adaptive weight matrix, such as Figure 5 As shown. At the instant of cross-domain transition, due to the dramatic increase in the density of the surrounding medium, the system state will experience a drastic disturbance. At this time, the deviation between the current state and the reference trajectory... Instantaneous peaks may occur, and a sudden increase in cross-domain instantaneous deviation can lead to... A sudden increase forcibly raises the cost of violations, leading to an updated adaptive weight matrix. The increased weighting causes the system to exhibit high damping characteristics, absorbing physical shocks. This significantly increases the penalty weight for the control increment in the cost function, resulting in the updated adaptive weight matrix. Real-time feedback is injected into the instruction calculation loop.

[0069] struct AdaptiveWeighting { int transition_counter = 0; # Transition period counter bool in_transition = false; # Transition status flag float R_base[NU] = {1.0f, 1.0f, 1.0f, 1.0f}; # Basic weight matrix float R_new[NU]; # Updated real-time adaptive weight matrix void updateWeights(const float x[NX], const float x_ref[NX],float eta = 0.1f) { if (!in_transition) { for (int i = 0; i <NU; i++) R_new[i] = R_base[i]; return; # Non-transition period judgment } float state_error_sq = 0.0f; # Initialize the sum of squared state deviations variable for (int i = 0; i <NX; i++) { float diff = x[i] - x_ref[i]; state_error_sq += diff diff; }#Current Status Compared with reference trajectory The square of the Euclidean distance between them It is a key indicator for measuring impact strength. for (int i = 0; i <NU; i++) { R_new[i] = R_base[i] + eta state_error_sq; # As the deviation state_error_sq increases, the weights R_new (i.e., the adaptive weight matrix) increase dramatically. transition_counter++; # Increment the counter if (transition_counter>= TRANSITION_FRAMES) { in_transition = false; #Automatic exit mechanism } } }

[0070] The coordination mechanism is as follows: 1. Real-time parameter correction: Within each control cycle (2ms), the system prioritizes the adaptive weight matrix update, replacing the basic weights in the forward propagation formula with the updated adaptive weight matrix; 2. Smooth command output: When calculating the optimal control command, formula (9) is applied. The instantaneous pose deviation across domains, i.e., the deviation between the current state and the reference trajectory... When the weight is increased, the updated adaptive weight matrix of the output increases instantaneously, causing the gain term in formula (9) to increase. Reduce accordingly; 3. Damping characteristics: This combination method mathematically increases the cost of violation, enabling the system to exhibit extremely high damping characteristics at the moment of sensing physical impact. This transforms the energy impact of the cross-domain instant into the numerical increment of the adaptive weight matrix, ultimately ensuring that the optimal control command output by the step maintains numerical continuity, effectively absorbing physical impact and smoothing out jumps.

[0071] The collaborative mechanism involves injecting an environmental feedforward compensation term into the control law to offset most predictable physical force mutations (feedforward); and adjusting the adaptive weight matrix to absorb residual, unmodelable random disturbances (feedback). Unlike conventional error compensation, this application utilizes an adaptive weight matrix... The multi-objective reconstruction establishes a "smart damping" mechanism at the mathematical level. At the moment of water entry, if the system senses a surge in control energy consumption due to a sudden change in the medium (i.e.,...) If the value is too large, the energy balance term will force a limit on the control gain. This cooperative mechanism greatly reduces the solver's burden and ensures high smoothness of control commands.

[0072] Adaptive scheduling of computing resources: To ensure the algorithm can still quickly find the optimal solution when weights change drastically, this application automatically adjusts the computational intensity of the ADMM solver during the transition period. This water-air cross-domain robot control method also includes automatically adjusting the number of iterations of the ADMM solver during the transition period after the water-air cross-domain robot switches from the current physical domain to the target physical domain. In normal operation, the number of iterations MAX_ADMM_ITER is 3, but during the transition period of T=20, the system automatically increases the iteration limit to MAX_ADMM_ITER_SWITCH (5 iterations). This "dynamic computing power allocation" ensures that even when the cost function terrain becomes "steep," the controller can still converge within 2ms, balancing stability and real-time performance.

[0073] void update(const SensorData&sensors, const float x_current[NX],float u_output[NU]) {# The main update loop function of the controller, responsible for receiving real-time sensor data and current state, calculating and outputting the optimal control command.

[0074] int max_iter = MAX_ADMM_ITER; # Initialize the maximum number of iterations in the current cycle to the standard value.

[0075] if (domain_switched) { # Check if a cross-domain switch signal has just been received. adaptive_weighting.startTransition(); # Triggers the adaptive weighting adjustment logic, starting the dynamic adjustment of the adaptive weight matrix during the transition period. max_iter = MAX_ADMM_ITER_SWITCH; # At the moment of switching, raise the iteration limit of the ADMM solver to high redundancy mode. } else if (switch_frame_counter<TRANSITION_FRAMES) { / / If not currently at the switching instant but still within the preset transition period max_iter = MAX_ADMM_ITER_SWITCH; / / Maintain a high iteration count throughout the entire transition period switch_frame_counter++; / / Increment the transition period frame counter } admmIteration(max_iter); / / Execute the ADMM core algorithm logic for the determined number of iterations }}

[0076] Control instruction response comparison for different startup methods at the cross - domain switching instant Figure 6 As shown, compare the control output responses of traditional cold startup and the hot startup of this application at the cross - domain switching moment (t = 2.0s). Cold startup (dashed line) shows a sharp jump and damped oscillation at the switching instant (peak about 6.5, underdamped second - order system model); hot startup (thick solid line) only shows minor fluctuations and quickly converges. Purpose: Demonstrate the smooth switching advantage of the asynchronous hot startup mechanism. ;

[0077] Dynamic adjustment curve of the adaptive weight matrix during the transition period Figure 7 As shown, the initial R = 1.0, instantaneously jumps to a peak of about 4.2 at the perturbation moment t = 2.0s, and then exponentially decays back to 1.0 within the T = 20 frames (0.04s) transition period. Purpose: Demonstrate the energy absorption and jump suppression effect of the transition - period adaptive compensation mechanism.

[0078] Fast cross - domain model switching and instruction resolution logic based on asynchronous hot startup Figure 8 As shown, the input layer receives S switch the signal and the Lagrange multiplier of the previous frame retained in memory; the switching layer points the multi - modal decomposition parameter pointer to the target physical domain array in the Flash memory; the core calculation layer performs N times of Riccati backward iteration to generate intermediate linear variables; the correction layer superimposes and updates the adaptive weight compensation; the output layer is used to output the optimal control vector smoothed by the environmental feed - forward compensation term.

[0079] By adopting a pre - generated offline matrix library and an online linear recurrence solution mechanism, when this application deals with the UAV control problem with 12 - dimensional state and 4 - dimensional input, on an embedded chip with a main frequency of 168MHz, the single - step solution time is stable within 2ms, supporting 500Hz high - frequency control.

[0080] This application proposes a multi-domain extension scheme to eliminate matrix inversion, transforming the most time-consuming online inversion operation into a table lookup operation (i.e., searching for multimodal decomposition parameters of the physical domain in a multimodal decomposition matrix library). Compared to traditional online inversion methods, this application improves computational efficiency by approximately 8 to 9 times. More importantly, when a physical domain switch occurs (at the moment of water entry), the system does not need to perform the expensive matrix decomposition operation again, thus avoiding the sharp increase in computational time (computational dead points) that may occur in traditional schemes, ensuring the real-time determinism of the control system.

[0081] By utilizing the convergence characteristics of the ADMM algorithm, the "computational discontinuity" problem during cross-physical domain switching is solved through a hot-start mechanism. Based on the hot-start mechanism and the adaptive weight compensation strategy (Formula (10)), this application can maintain the continuity of control commands when the robot crosses the medium. Expected experimental results show that when the UAV enters the water at a speed of 1 m / s, the gradient of the control command jump is reduced by more than 60% compared with the traditional fixed weight scheme. This improvement significantly suppresses the attitude oscillation caused by the water entry impact, shortening the attitude recovery time of the UAV after entering the new physical domain to 3-5 control cycles. By dynamically adjusting the penalty weight in the cost function, this application effectively absorbs the physical energy impact caused by environmental changes, ensuring that the actuators (such as motors) are not damaged due to instantaneous overload.

[0082] Lightweight Deployment: By combining matrix non-zero element index storage, the algorithm can achieve multi-domain MPC operation on MCUs with very low memory. This application maintains extremely low memory usage while achieving multi-domain adaptive control. Due to the matrix library's use of non-zero element compressed storage and Flash hardening technology, the total RAM usage of the entire control system on the microcontroller is less than 200KB, and the increase in Flash space usage is only 20-30KB, perfectly adapting to resource-constrained platforms.

[0083] This application employs multi-domain matrix pooling preprocessing (construction of a multimodal decomposition matrix library) and hierarchical adaptive warm-start (steps 203-205) techniques. By identifying triggers in the physical domain, the microcontroller (MCU) can instantaneously adjust the control law according to environmental changes without performing high-power online matrix inversion. This achieves low computational latency (typically less than 2ms) and high switching smoothness, significantly improving the stability of cross-media operations. This demonstrates that this application can implement advanced adaptive model predictive control on low-power microcontrollers with extremely limited resources, greatly reducing the hardware cost of high-performance cross-domain robots. Through offline pre-storage of multimodal matrices and a warm-start mechanism, this application achieves high-performance adaptive control of complex cross-domain dynamic environments on low-computing-power MCUs, possessing extremely high engineering practical value.

[0084] This application also provides an application scenario in which the above-described water-air cross-domain robot control method is applied. Specifically, the water-air cross-domain robot control method provided in this embodiment can be applied in robot motion control scenarios. Robot motion control scenarios include a content production stage, a content processing link, and a content distribution stage; requests to be processed enter the content processing link from the content production stage, obtain corresponding optimal control instructions through human-machine collaboration, and then enter the downstream content distribution stage. The water-air cross-domain robot control method provided in this embodiment belongs to the content processing link. Specifically, in the content processing chain for the request, piecewise linear dynamic equations for each physical domain of the water-air cross-domain robot can be constructed. In each control cycle, the real-time environmental parameters of the current physical domain are acquired. When the real-time environmental parameters of the current physical domain deviate from the confidence interval, a cross-domain switching signal is generated, and the robot switches from the current physical domain to the target physical domain. Based on the piecewise linear dynamic equations and the multimodal decomposition parameters corresponding to the target physical domain in the pre-built multimodal decomposition matrix library, the Riccati backward propagation method is used for updating, and the optimal control command is output. Otherwise, TinyMPC iteration is performed based on the piecewise linear dynamic equations and the multimodal decomposition parameters corresponding to the current physical domain in the pre-built multimodal decomposition matrix library to obtain the optimal control command.

[0085] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 9 As shown, the computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores robot motion control data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a method for controlling a cross-domain water-air robot.

[0086] Figure 9The structures shown are merely block diagrams of some structures related to the present application and do not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than shown in the figures, or combine certain components, or have different component arrangements. In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0087] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0088] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0089] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with relevant regulations and be authorized by the owner of the corresponding device.

[0090] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

[0091] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0092] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0093] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A control method for a cross-domain water-air robot, characterized in that, The water-air cross-domain robot control method includes: For the multiple physical domains experienced by the water-air cross-domain robot, piecewise linear dynamic equations are constructed; Within each control cycle, real-time environmental parameters of the current physical domain are acquired; these real-time environmental parameters include pressure, acceleration, and angular velocity. Determine whether the deviation from the confidence interval is based on the real-time environmental parameters of the current physical domain; If the deviation deviates from the confidence interval, a cross-domain switching signal is generated, and the water-air cross-domain robot switches from the current physical domain to the target physical domain. Based on the piecewise linear dynamic equations and the multimodal decomposition parameters corresponding to the target physical domain in the pre-built multimodal decomposition matrix library, the intermediate linear variables are updated using the Riccati backward transfer method, and the optimal control command is output. In the process of updating the intermediate linear variables and outputting the optimal control command of the control cycle, the Lagrange multipliers of the previous moment are retained as the initial values ​​for ADMM iteration. The multimodal decomposition parameters include the control gain matrix, the system state transition matrix, the steady-state feedback gain, and the control input transpose matrix. If the control does not deviate from the confidence interval, TinyMPC iteration is performed based on the piecewise linear dynamic equations and the multimodal decomposition parameters corresponding to the current physical domain in the pre-built multimodal decomposition matrix library to obtain the optimal control command.

2. The water-air cross-domain robot control method according to claim 1, characterized in that, The Riccati backward propagation update formula is as follows: ; ; ; in, , During the ADMM solution process Intermediate linear variables at time points; , , , The target physical domains are respectively The corresponding control gain matrix, system state transition matrix, steady-state feedback gain, and control input transpose matrix; for Intermediate linear variables at time points; , This is the linear cost vector in the cost function; It is a penalty parameter The reciprocal of; for The optimal control command at any given moment; for The adaptive weight matrix at time step; To control the incremental penalty weight; for Lagrange multipliers of time; For the current physical domain The corresponding environmental feedforward compensation term.

3. The water-air cross-domain robot control method according to claim 2, characterized in that, The water-air cross-domain robot control method further includes updating the adaptive weight matrix after the water-air cross-domain robot switches from the current physical domain to the target physical domain, as shown in the following formula: ; in, The adaptive weight matrix before the update; This is the weighting compensation coefficient; Represents a diagonal matrix; This represents the current state of the water-air cross-domain robot. This serves as a reference target state for the water-air cross-domain robot. The energy balance factor is determined by the cross-domain switching signal; The current actuator load function; for The optimal control command at any given time.

4. The water-air cross-domain robot control method according to claim 1, characterized in that, The cost function is expressed as follows: ; in, The control sequence to be optimized. This is the initial control input vector. for The control input vector at each time step; For prediction in the time domain; This indicates taking the minimum value; To predict the terminal state vector at the end of the time domain; For reference target state; This is the terminal state weight matrix; for The state vector of the water-air cross-domain robot at any given moment; for The control input vector at each time step; To control incremental penalties, used to smooth out speed jumps in the motor.

5. The water-air cross-domain robot control method according to claim 2, characterized in that, The environmental feedforward compensation term is calculated from the gravity term, buoyancy term, and fluid resistance term; After outputting the optimal control command, the water-air cross-domain robot control method further includes: linearly superimposing the optimal control command with the environmental feedforward compensation term to obtain the final control vector output to the actuator.

6. The water-air cross-domain robot control method according to claim 1, characterized in that, Determining whether a deviation from the confidence interval is based on real-time environmental parameters of the current physical domain includes: By fusing the real-time environmental parameters of the current physical domain, a dynamic environmental feature vector of the current physical domain is obtained. The deviation is calculated based on the dynamic environment feature vector and feature reference value of the current physical domain; When the deviation exceeds a preset threshold, it indicates a deviation from the confidence interval of the current physical domain; when the deviation does not exceed the preset threshold, it indicates no deviation from the confidence interval of the current physical domain.

7. The water-air cross-domain robot control method according to claim 1, characterized in that, The water-air cross-domain robot control method further includes: automatically adjusting the iteration number of the ADMM solver during the transition period after the water-air cross-domain robot switches from the current physical domain to the target physical domain.

8. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that the processor executes the computer program to implement the water-air cross-domain robot control method according to any one of claims 1-7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the water-air cross-domain robot control method according to any one of claims 1-7.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the water-air cross-domain robot control method according to any one of claims 1-7.