A synchronous rotating permanent magnet low-gradient working area dynamic repositioning method and system

By employing a dynamic repositioning method in the low-gradient working area of ​​a synchronously rotating permanent magnet, the problems of control lag and insufficient magnetic field stability in the movement of magnetically controlled micro-nano robots in non-uniform magnetic fields are solved. This method enables forward-looking prediction of future movement risks and predictability of the magnetic field environment, thereby improving the safety and tracking accuracy of robot movement.

CN123156931APending Publication Date: 2026-11-24EXCEWELL INTELLIGENT TECH (ZHEJIANG) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611352479.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-02
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing magnetically controlled micro-nano robots suffer from control lag and insufficient magnetic field stability when moving in non-uniform magnetic fields. This can lead to trajectory deviation, instability, or collisions, especially when deviating from the low-gradient safe working area.

Method used

A dynamic repositioning method using a low-gradient working area of ​​a synchronously rotating permanent magnet is adopted. The trajectory prediction model predicts future motion risks, and while maintaining the fixed relative installation relationship and synchronous rotation relationship of the first and second permanent magnets, the overall repositioning parameters are determined. The spatial pose is adjusted using a repositioning actuator to ensure the predictability and stability of the magnetic field structure.

Benefits of technology

It enables forward-looking prediction of future motion risks of magnetically controlled micro-nano robots, reduces the response lag of the control system, improves motion safety and tracking accuracy, and ensures the stability of the magnetic field environment and the smoothness of robot motion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123156931A_ABST
    Figure CN123156931A_ABST
Patent Text Reader

Abstract

This invention provides a method and system for dynamic repositioning of a synchronously rotating permanent magnet in a low-gradient working area. The method includes: acquiring the current motion state of a magnetically controlled micro / nano robot and the current driving state of the magnetic drive component; based on the current motion state, current driving state, and historical time-series data, obtaining a predicted trajectory in the future prediction time domain through a trajectory prediction model and determining the deviation risk; responding to the deviation risk meeting a preset trigger condition, determining the overall repositioning parameters of the magnetic drive component while maintaining the fixed relative installation relationship and synchronous rotation relationship of the first and second permanent magnets; and controlling a repositioning actuator based on the overall repositioning parameters to drive the magnetic drive component to perform spatial pose adjustment. This invention achieves proactive intervention, improving the robot's motion safety and tracking accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of magnetically controlled micro-nano robot drive control, specifically to a method and system for dynamic repositioning of a synchronously rotating permanent magnet in a low-gradient working area. Background Technology

[0002] In magnetically controlled micro / nano robot actuation technology, rotating permanent magnets are widely used due to their ability to generate strong rotating magnetic fields. However, the magnetic field generated by rotating permanent magnets exhibits significant spatial non-uniformity. During movement, micro / nano robots are affected not only by magnetic torque but also by magnetic gradient forces generated by the magnetic field gradient. When the robot deviates from a specific low-gradient safe working area, excessive magnetic gradient forces may lead to trajectory deviation, instability, or even collisions. Existing solutions typically employ fixed-position magnetic drive devices or perform post-hoc compensation magnet position adjustments only after the robot has significantly deviated from the safe zone. This post-hoc compensation method suffers from significant control lag and cannot utilize the robot's historical motion state to predict the risk of it leaving the safe zone in advance. Furthermore, if there is a lack of strict constraints on the relative relationships between magnets during repositioning, independent movement of magnets can easily alter the original spatial distribution structure of the magnetic field, introducing new magnetic field disturbances. This results in an unpredictable magnetic field environment after repositioning, thereby affecting the robot's motion stability and safety. Summary of the Invention

[0003] To address the issues of lag in magnetic drive control and insufficient magnetic field stability during repositioning in existing technologies, this invention provides a dynamic repositioning method and system for a synchronously rotating permanent magnet in a low-gradient working area. This method enables forward-looking prediction of future motion risks for magnetically controlled micro / nano robots and overall rigidity repositioning of the magnetic drive components, thereby improving the robot's motion safety and tracking accuracy while maintaining the predictability of the magnetic field structure.

[0004] To achieve the above objectives, the present invention adopts the following technical solution: a method for dynamic repositioning of a synchronously rotating permanent magnet in a low-gradient working region, comprising:

[0005] Step 1: Obtain the current motion state of the magnetically controlled micro-nano robot and the current driving state of the magnetic drive assembly, wherein the magnetic drive assembly includes a first permanent magnet and a second permanent magnet that maintain a fixed relative installation relationship.

[0006] Step 2: Based on the current motion state, current driving state and historical time series data, obtain the predicted trajectory of the magnetically controlled micro-nano robot in the future prediction time domain through the trajectory prediction model, and determine the deviation risk based on the positional relationship between the predicted trajectory and the low gradient working area and the magnetic field safety index.

[0007] Step 3: In response to the deviation risk meeting the preset triggering condition, under the constraint of maintaining the fixed relative installation relationship and synchronous rotation relationship of the first permanent magnet and the second permanent magnet, determine the overall repositioning parameters of the magnetic drive assembly;

[0008] Step 4: Based on the overall repositioning parameters, control the repositioning actuator to drive the magnetic drive component to adjust the spatial pose, and maintain the synchronous rotation of the first permanent magnet and the second permanent magnet during the adjustment process.

[0009] The deviation risk described above is determined in the following ways:

[0010] The comprehensive deviation risk value is calculated based on at least one of the following: the predicted magnetic field gradient at the predicted trajectory, the predicted magnetic gradient force, the distance from the predicted trajectory to the boundary of the low gradient working area, and the trajectory tracking error.

[0011] The preset triggering conditions include a trigger threshold and a release threshold. The trigger threshold is greater than the release threshold to form a hysteresis control zone. Relocation is triggered when the comprehensive deviation risk value is greater than or equal to the trigger threshold, and relocation is released when the comprehensive deviation risk value is less than the release threshold.

[0012] The aforementioned method for determining the overall repositioning parameters of the magnetic drive assembly includes:

[0013] A multi-objective optimization function is constructed, wherein the optimization objectives of the multi-objective optimization function include at least one of the following: the deviation of the predicted trajectory from the preset safe sub-region, the predicted magnetic field gradient, the predicted magnetic gradient force, the trajectory tracking error, and the displacement cost and attitude change cost of the magnetic drive component;

[0014] Under the condition of satisfying rigid body constraints and physical safety constraints, the multi-objective optimization function is solved to obtain the optimal global relocation parameters;

[0015] The rigid body constraint conditions include a fixed distance constraint and a fixed relative attitude constraint between the first permanent magnet and the second permanent magnet.

[0016] In the aforementioned method, the trajectory prediction model adopts a physically guided residual structure, and its prediction result is obtained by superimposing the physical prediction quantity based on the robot dynamics model and / or magnetic field model with the residual correction quantity learned by the neural network.

[0017] The training loss function of the trajectory prediction model includes a state prediction error term, and at least one of a magnetic field consistency constraint term and a motion continuity constraint term.

[0018] In the aforementioned method, the first permanent magnet and the second permanent magnet rotate synchronously at the same rotation frequency, and the initial phase difference is fixed at zero.

[0019] The initial phase difference is used as a constant operating parameter and is not used as an input variable of the trajectory prediction model, the computational cost of the deviation risk, or a decision variable of the multi-objective optimization function.

[0020] In the aforementioned method, the low-gradient working region consists of a set of spatial points that satisfy the magnetic field gradient threshold and / or the magnetic gradient force threshold.

[0021] A safe sub-region is defined within the low-gradient working region, and the safe sub-region has a preset safety margin between its boundary and the boundary of the low-gradient working region.

[0022] In the aforementioned method, the current motion state is acquired through at least one of visual imaging, ultrasonic imaging, magnetic sensor array, or optical positioning system;

[0023] The acquired sensor data is fused and estimated using Kalman filtering, particle filtering, or a neural network state estimator to obtain the current motion state.

[0024] In the aforementioned method, when the magnetically controlled micro-nano robot re-enters the safe sub-region, which is a region within the low-gradient working area with a preset safety margin, and when the release threshold is met for multiple consecutive control cycles, the control of the repositioning actuator to drive the magnetic drive component to perform spatial translation is stopped, and the movement of the magnetically controlled micro-nano robot is controlled only by controlling the synchronous rotation frequency or rotation axis direction of the first permanent magnet and the second permanent magnet.

[0025] A dynamic repositioning system for a synchronously rotating permanent magnet in a low-gradient working region includes:

[0026] A magnetic drive assembly includes a first permanent magnet and a second permanent magnet that maintain a fixed relative mounting relationship, and a rotary driver for driving the first permanent magnet and the second permanent magnet to rotate synchronously.

[0027] A repositioning actuator is connected to the magnetic drive assembly and configured to drive the magnetic drive assembly to perform spatial pose adjustment.

[0028] The state perception module is configured to acquire the current motion state of the magnetically controlled micro-nano robot and the current driving state of the magnetic drive component.

[0029] The prediction and control unit is communicatively connected to the state perception module, the rotary actuator, and the repositioning actuator, respectively. It is configured to acquire a predicted trajectory and determine the deviation risk based on the current motion state, the current driving state, and historical time series data. In response to the deviation risk meeting a preset trigger condition, it determines the overall repositioning parameters while maintaining the fixed relative installation relationship and synchronous rotation relationship of the first permanent magnet and the second permanent magnet, and controls the repositioning actuator to drive the magnetic drive component to perform spatial pose adjustment based on the overall repositioning parameters.

[0030] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described above.

[0031] Compared with existing technologies, this invention obtains the predicted trajectory of a magnetically controlled micro / nano robot in the future prediction time domain and determines the deviation risk through a trajectory prediction model. This transforms the control strategy from ex-post compensation based on current errors to proactive intervention based on future states, effectively reducing the response lag of the control system and enabling the magnetic drive components to adjust in advance before the robot actually crosses the boundary. Simultaneously, in determining the overall repositioning parameters and executing spatial pose adjustments, the fixed relative installation relationship and synchronous rotation relationship of the first and second permanent magnets are strictly maintained. The two magnets are treated as a single rigid body for repositioning, avoiding distortion of the magnetic field spatial distribution structure caused by independent movement of the magnets, and ensuring the predictability and stability of the magnetic field characteristics in the low-gradient working area before and after repositioning. Furthermore, by constructing a multi-objective optimization function that includes magnetic field safety indicators and execution costs, and solving for the optimal repositioning parameters under the premise of satisfying rigid body constraints, it is possible to ensure that the robot is in a safe low-gradient environment while balancing trajectory tracking accuracy and the smoothness of the actuator's motion. Furthermore, by setting a hysteresis control zone formed by trigger and release thresholds, the frequent reciprocating motion of the magnetic drive components caused by the robot's fluctuations near the safety boundary can be effectively suppressed, thereby improving the system's operational stability and engineering reliability. Attached Figure Description

[0032] Figure 1 This is a flowchart of the dynamic repositioning method for the low-gradient working area of ​​a synchronously rotating permanent magnet according to an embodiment of the present invention.

[0033] Figure 2 This is a schematic diagram of the dynamic repositioning system for the low-gradient working area of ​​a synchronous rotating permanent magnet according to an embodiment of the present invention.

[0034] Figure 3 This is a system functional module block diagram according to an embodiment of the present invention;

[0035] Figure 4 This is a schematic diagram of the dynamic relocation geometry principle of the low-gradient working region according to an embodiment of the present invention;

[0036] Figure 5 This is a schematic diagram of the structure of an artificial intelligence time series prediction model according to an embodiment of the present invention;

[0037] Figure 6 This is a schematic diagram of the relocation optimizer and safety constraint structure according to an embodiment of the present invention;

[0038] Figure 7 This is a timing diagram of the synchronous rotation of dual permanent magnets with zero phase difference according to an embodiment of the present invention.

[0039] Among them, 101-first synchronous rotating permanent magnet, 102-second synchronous rotating permanent magnet, 103-fixed bracket / magnetic drive head, 104-preferred low gradient working area, 105-magnetically controlled micro-nano robot, 106-target trajectory / predicted trajectory, 107-repositioning actuator, 108-state sensing device, 109-prediction and control unit, 110-AI timing predictor, 111-repositioning optimizer, 112-safety constraint layer, 201-state sensing module, 202-magnet synchronous drive module, 203-low gradient model module, 204-AI prediction module, 205-repositioning decision module, 206-safety constraint module, and 207-execution and feedback module. Detailed Implementation

[0040] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention.

[0041] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0042] Example 1: This example provides a dynamic repositioning method for the low-gradient working area of ​​a synchronously rotating permanent magnet. This method solves the safety and stability problems of magnetically controlled micro / nano robots moving in non-uniform magnetic fields through the synergy of forward prediction and overall rigidity repositioning. Figure 1 As shown, the method mainly includes the following steps:

[0043] Step 1: Obtain the current motion state of the magnetically controlled micro-nano robot and the current driving state of the magnetic drive assembly. The magnetic drive assembly includes a first permanent magnet and a second permanent magnet that maintain a fixed relative installation relationship.

[0044] In this step, the current motion state refers to the set of physical quantities characterizing the robot's instantaneous motion characteristics, such as the robot's three-dimensional position coordinates, linear velocity vector, and attitude angle information in the workspace. The current drive state refers to the parameters characterizing the working condition of the magnetic drive component itself, such as the pose of the magnetic drive component relative to the global coordinate system, and the real-time rotation frequency of the first and second permanent magnets. In this embodiment, the first and second permanent magnets are connected by a mechanical structure (such as a fixed bracket), and the center distance, relative direction of the rotation axis, and initial installation angle between them are all known and fixed physical parameters. This fixed relative installation relationship constitutes the geometric basis for subsequent overall repositioning.

[0045] In a discrete sampling system, the first The real-time state vector at each sampling time can be represented as:

[0046] ;

[0047] In the formula: For discrete sampling time index, For the first The robot's position at each sampling time. For the first Robot speed at each sampling time, This represents the error of the robot relative to the target trajectory 106 (predicted trajectory) or the target waypoint. For the measurement or estimation of the magnetic field near the robot, This refers to the measured or estimated value of the magnetic field gradient. This is the pose of the magnetically driven head. The common synchronous rotation frequency of the two permanent magnets. Optional environmental conditions, including flow rate, viscosity, vessel / channel geometry, or wall distance, etc. The actual time corresponding to each sampling moment is Since the initial phase difference of the two permanent magnets is 0 by default and they rotate synchronously, the rotation phase and phase difference of the two magnets are not included in the real-time state vector.

[0048] Step 2: Based on the current motion state, current driving state and historical time series data, obtain the predicted trajectory of the magnetically controlled micro-nano robot in the future prediction time domain through the trajectory prediction model, and determine the deviation risk based on the positional relationship between the predicted trajectory and the low gradient working area and the magnetic field safety index.

[0049] In this step, the trajectory prediction model is a computational model capable of handling temporal dependencies. Its input includes not only the real-time state at the current moment but also historical state sequences within a preset time window, thus capturing the robot's motion inertia and dynamic trends in complex fluid environments. The future prediction time domain refers to several control cycles extending backward from the current moment, and the predicted trajectory is the set of spatial paths the robot is expected to traverse within this time domain. The logic for determining deviation risk lies in assessing the spatial matching degree between the predicted trajectory and the low-gradient working area: if some or all points in the predicted trajectory exceed the boundary of the low-gradient working area, or if safety indicators such as the magnetic field gradient and magnetic gradient force at the location of the predicted trajectory exceed preset safety thresholds, then a high deviation risk is determined. This assessment method based on future states allows the system to perceive risks in advance before the robot actually enters a dangerous area, overcoming the lag defect of traditional feedback control, which can only perform ex-post compensation based on current errors.

[0050] In a discrete sampling system, the first The current state and length of each sampling time are: Historical state sequence input artificial intelligence prediction model To obtain the future Robot predicted state for each control cycle:

[0051] ;

[0052] In the formula: For robots in the future The predicted position vector at each sampling time. Indicates from the first One to the first The historical state sequence and current state at each sampling time. The length of the historical state sequence. To predict the step number in the time domain, This is to predict the number of future sampling points included in the time domain.

[0053] Artificial intelligence prediction models can employ LSTM, GRU, TCN, Transformer, neural state-space models, neural ordinary differential equations, physical information neural networks, or combinations thereof.

[0054] Step 3: In response to the deviation risk meeting the preset triggering condition, under the constraint of maintaining the fixed relative installation relationship and synchronous rotation relationship of the first permanent magnet and the second permanent magnet, determine the overall repositioning parameters of the magnetic drive assembly.

[0055] In this step, the preset trigger condition can be a deviation risk value exceeding a certain set threshold, or a specific point in the predicted trajectory crossing the boundary, etc., based on logical judgment results. When the trigger condition is met, the system initiates the repositioning decision process. The core constraint here is "maintaining a fixed relative installation relationship and synchronous rotation relationship." This means that during mathematical modeling and optimization, the first and second permanent magnets are considered as an indivisible rigid body. The overall repositioning parameters describe the translational displacement vector and / or attitude rotation matrix of this rigid body component in space, rather than the independent motion parameters of a single magnet. By applying this rigid body constraint, it is ensured that the spatial distribution of the synthetic magnetic field generated inside the magnetic drive component remains unchanged before and after repositioning; only the overall position shifts. This avoids introducing new magnetic field distortions or unpredictable disturbances due to changes in the relative positions of the magnets, ensuring the safety of the repositioning process itself.

[0056] Step 4: Based on the overall repositioning parameters, control the repositioning actuator to drive the magnetic drive component to adjust the spatial pose, and maintain the synchronous rotation of the first permanent magnet and the second permanent magnet during the adjustment process.

[0057] In this step, the repositioning actuator can be a multi-degree-of-freedom motion platform, a robotic arm, or a linear module—a mechatronic device that performs corresponding translational or rotational movements based on the calculated overall repositioning parameters. Maintaining synchronous rotation during the adjustment process means that while the magnetic drive assembly undergoes macroscopic spatial pose changes, the internal rotary actuator continues to drive the first and second permanent magnets to rotate according to a preset frequency and phase relationship. This action signifies the parallel execution of "macroscopic repositioning" and "microscopic drive," ensuring that the magnetically controlled micro / nano robot can continuously obtain a stable rotating magnetic field drive during the movement of the magnetic source. This prevents drive interruption or sudden torque changes due to translation or attitude adjustments of the magnetic source, thus guaranteeing the continuity and stability of the robot's motion.

[0058] Through the processes described in steps 1 to 4 above, this embodiment constructs a complete closed-loop control link. This link treats the dual-magnet assembly as a single rigid body for forward repositioning, utilizing both the time-advance nature of artificial intelligence predictions to compensate for control lag and the spatial invariance of rigid body constraints to maintain the predictability of the magnetic field environment. This effectively improves the operational safety and trajectory tracking accuracy of the magnetically controlled micro-nano robot in dynamic and complex environments.

[0059] Preferably, the deviation risk is determined by calculating a comprehensive deviation risk value based on at least one of the following: the predicted magnetic field gradient at the predicted trajectory, the predicted magnetic gradient force, the distance from the predicted trajectory to the boundary of the low gradient working area, and the trajectory tracking error.

[0060] Specifically, the calculation of the comprehensive deviation risk value aims to integrate multi-dimensional physical safety indicators and control performance indicators into a unified decision-making basis. Among these, the predicted magnetic field gradient reflects the degree of spatial non-uniformity of the magnetic field at the robot's future location; an excessively large gradient may cause the robot to be subjected to unwanted magnetic torque disturbances. The predicted magnetic gradient force directly characterizes the magnitude of the translational force exerted by the magnetic field on the magnetic robot; an excessively large gradient force is a direct cause of robot loss of control or collision. The distance from the predicted trajectory to the boundary of the low-gradient working area provides a spatial safety margin measure; a smaller distance means closer to the danger zone. The trajectory tracking error measures the degree to which the robot deviates from the predetermined target path, reflecting the current control quality. To eliminate the influence of different dimensions of the indicators, the above components usually need to be normalized before calculating the comprehensive deviation risk value. Normalization methods can include threshold normalization, max-min normalization, sigmoid mapping, or standardization methods based on historical data statistics, mapping each risk component to a unified numerical range.

[0061] As a preferred implementation method, the comprehensive deviation risk value can be calculated by weighted summation, and its expression is as follows:

[0062] ;

[0063] In the formula, This represents the overall deviation risk value; , , and These represent the risks of predicted magnetic field gradient exceeding limits, predicted magnetic gradient force exceeding limits, boundary distance risk, and trajectory tracking error risk, respectively, after normalization. , , and These are the non-negative weighting coefficients for the corresponding risk components, used to adjust the contribution of each factor to the overall risk. In practical applications, the weighting coefficients can be set according to the specific application scenario and safety priority. For example, in vascular interventional scenarios with extremely high safety requirements, the weighting coefficients can be appropriately increased. and The weight of [the material] is [assigned]; however, in precision assembly scenarios, more attention may be paid to [the specific material]. Furthermore, the weighting coefficients can also be dynamically adjusted, for example, by adapting to changes in the robot's current movement speed or environmental flow rate to accommodate differences in risk sensitivity under different working conditions.

[0064] The preset triggering conditions include a trigger threshold and a release threshold. When the trigger threshold is greater than the release threshold, a hysteresis control zone is formed. When the comprehensive deviation risk value is greater than or equal to the trigger threshold, relocation is triggered. When the comprehensive deviation risk value is less than the release threshold, relocation is released.

[0065] The core design of this hysteresis control mechanism lies in addressing the control oscillation problem near the boundary. Due to the complexity of the fluid environment, sensor measurement noise, and the uncertainty of model predictions, the instantaneous risk value of a robot moving near the boundary of a low-gradient working zone may fluctuate frequently around a threshold. If only a single trigger threshold is set, the magnetic drive component will frequently start and stop repositioning actions, which will not only lead to mechanical wear and heat generation of the actuator but also introduce additional fluid disturbances due to frequent acceleration and deceleration, thus reducing the robot's motion stability. By setting a trigger threshold higher than the release threshold, the difference between the two constitutes the hysteresis control region. Repositioning is only initiated when the risk significantly increases and exceeds the trigger threshold. Once repositioning begins, even if the risk decreases but does not fall below the release threshold, the system maintains the repositioning state until the risk is sufficiently reduced below the release threshold. This design effectively filters signal jitter at the boundary, ensuring the smoothness and continuity of control commands, and also provides clear and verifiable control log characteristics for subsequent infringement determination.

[0066] Furthermore, when the magnetically controlled micro-nano robot re-enters the safe sub-region, which is a region with a preset safety margin within the low-gradient working area, and the release threshold is met for multiple consecutive control cycles, the control repositioning actuator stops driving the magnetic drive component to perform spatial translation. The movement of the magnetically controlled micro-nano robot is controlled only by controlling the synchronous rotation frequency or rotation axis direction of the first permanent magnet and the second permanent magnet.

[0067] The safety sub-region introduced here is a more conservative safety core region within the low-gradient working region, which maintains a preset safety margin with respect to the outer boundary of the low-gradient working region. The existence of this safety margin ensures that when the robot is released from relocation, it has not only left the high-risk area but has also returned to a stable area with sufficient buffer space, thereby reducing the probability of it rushing out of the safe area again due to inertia or delay. Regarding the determination of the release condition, the time continuity constraint of "multiple consecutive control cycles" is particularly emphasized. This means that the system will not immediately stop relocation simply because the risk value at a single sampling moment is lower than the release threshold, but requires a continuous period of time (e.g., consecutive...). One control cycle, The risk value (which can be an integer between 3 and 10) is always kept below the release threshold. This time-based filtering mechanism effectively eliminates false safety signals caused by transient noise from sensors or short-term anomalies in the prediction model, preventing the system from prematurely releasing repositioning before it has truly stabilized, thus avoiding repeated start-stop cycles of repositioning. When the above release conditions are met, the system switches the control mode from "rigid repositioning + rotation drive" to "rotation drive only." At this time, the magnetic drive component remains stationary in its current position, relying solely on the rotating magnetic field generated by the synchronous rotation of the two permanent magnets to guide the robot to continue moving along the target trajectory. This mode switching saves energy consumption of the actuator and reduces unnecessary interference of macroscopic motion on the microscopic flow field.

[0068] Preferably, determining the overall repositioning parameters of the magnetic drive component includes: constructing a multi-objective optimization function, wherein the optimization objectives of the multi-objective optimization function include at least one of the following: the deviation of the predicted trajectory from the preset safe sub-region, the predicted magnetic field gradient, the predicted magnetic gradient force, the trajectory tracking error, and the displacement cost and attitude change cost of the magnetic drive component.

[0069] like Figure 6 As shown, the relocation optimizer 111 receives future state prediction data from the AI ​​time-series predictor 110 and safe region parameters provided by the low-gradient model module 203, and searches for the optimal solution by constructing the aforementioned multi-objective optimization function. In this optimization framework, the deviation of the predicted trajectory from the preset safe sub-region is used to quantify the degree to which the robot will leave the safe core area at future moments. The smaller this value, the higher the confidence that the robot is in a safe environment. The predicted magnetic field gradient and the predicted magnetic gradient force are directly related to the magnitude of the unwanted disturbance force experienced by the robot at its future position. Incorporating them into the optimization objective can actively suppress the risk of motion instability caused by magnetic field inhomogeneity. The trajectory tracking error reflects the robot's execution accuracy of the predetermined task path, ensuring that the relocation action does not sacrifice task performance while ensuring safety. The displacement cost and attitude change cost of the magnetic drive component are penalty terms for the motion amplitude of the actuator, which aim to avoid overly aggressive or frequent relocation adjustments, thereby reducing mechanical wear, reducing energy consumption, and maintaining the relative stability of the fluid environment. In the actual construction of this multi-objective optimization function, since the above indicators have different dimensions, they usually need to be normalized first, and then a comprehensive objective function is formed by weighted summation. The weight coefficients can be configured according to the priority requirements of safety, tracking accuracy and motion smoothness in specific application scenarios.

[0070] Under the condition of satisfying rigid body constraints and physical safety constraints, solve the multi-objective optimization function to obtain the optimal global relocation parameters.

[0071] To ensure the stability of the magnetic field structure during repositioning, the constraints must be strictly enforced in the optimization solution. These rigid body constraints include a fixed distance constraint between the first and second permanent magnets and a fixed relative attitude constraint.

[0072] Specifically, the implementation of rigid body constraints determines the predictability of the magnetic field distribution after repositioning. As a preferred implementation logic, the positions and attitudes of the first and second permanent magnets are not solved separately as independent optimization variables. Instead, the magnetic drive assembly is abstracted as a six-degree-of-freedom rigid body, with only its overall translation vector and rotation parameters used as optimization decision variables. Under this parameterized expression, the spatial poses of the first and second permanent magnets are uniquely determined by the transformation of this rigid body. The center distance and relative installation angle between them are mathematically locked as constant values, thus eliminating the risk of disrupting the fixed relative installation relationship due to independent variable changes during the optimization process. This approach not only simplifies the dimensions of the optimization problem and improves the solution efficiency, but more importantly, it ensures that regardless of the optimization result, the repositioned dual-magnet system always maintains the same internal geometric configuration as the initial state, thereby guaranteeing the morphological invariance of the low-gradient working region during synchronous migration with the magnetic drive assembly.

[0073] Let the overall repositioning transformation of the magnetic drive assembly be The optimal relocation value is obtained through optimization. :

[0074] ;

[0075] In the formula: This is the optimal global relocation value. This represents the candidate global relocation value. It is a comprehensive objective function that targets the deviation of the predicted trajectory from the center of the preferred low-gradient working area 104 or the safe sub-region, the predicted magnetic field gradient, the predicted magnetic gradient force, the robot trajectory tracking error, and the displacement or attitude change of the magnetic drive head repositioning.

[0076] An example objective function is:

[0077] ;

[0078] In the formula, For candidate global relocation values The corresponding comprehensive objective function value, A smaller value indicates that the candidate solution has better overall performance in terms of safety domain preservation, magnetic field disturbance, execution cost, and trajectory tracking accuracy. In order to make The optimal global relocation value that achieves the minimum value. This represents the candidate repositioning transformation after considering the dual permanent magnets and their fixing bracket as a single rigid body, where... This is the overall translational displacement vector of the magnetic drive head. The overall attitude increment can typically be represented by a rotation vector, Euler angle increment, or equivalent attitude parameter. These are non-negative weighting coefficients corresponding to safety domain deviation, magnetic field gradient, magnetic gradient force, overall translation, overall attitude adjustment, and trajectory tracking error, which can be set according to the priority of safety, tracking accuracy, and execution cost. Since the dimensions of each parameter are different, it is preferable to first perform dimensionless or normalized calculations based on safety thresholds, allowable displacement, allowable attitude change, or statistical scales before determining the weights. Optimization constraints include at least: constant magnet spacing, constant relative attitude, identical rotation frequencies of the two magnets, actuator stroke constraints, collision constraints, and necessary lower limits for magnetic field amplitude or torque. The initial phase difference between the two magnets is preset to 0 and used as a constant operating parameter, not participating in repositioning optimization.

[0079] In addition to rigid body constraints, physical safety constraints are equally indispensable. Physical safety constraints (safety constraint layer 112) mainly include travel range limits for repositioning actuators and collision avoidance constraints. Travel range limits ensure that the calculated overall repositioning parameters do not exceed the physical motion boundaries of actuators such as linear modules and robotic arms, preventing equipment damage. Collision avoidance constraints, based on environmental perception information or pre-set electronic fences, restrict the magnetic drive components from entering dangerous areas that may interfere with blood vessel walls, experimental containers, or other obstacles. During the optimization process, these constraints can be used as hard constraints to directly define the feasible region, or they can be transformed into soft constraint penalty terms added to the objective function to adapt to the characteristics of different solvers.

[0080] Various numerical optimization algorithms can be used to solve multi-objective optimization functions. For example, when both the objective function and constraints can be approximated as quadratic, quadratic programming can be used to obtain the global optimum. For scenarios with strong nonlinearity, iterative solutions such as sequential quadratic programming, interior-point methods, or gradient descent algorithms can be used. It should be understood that this invention does not limit the specific solver type, as long as it can converge to obtain the overall relocation parameters that satisfy the constraints within the control cycle. Through the mechanism of combining multi-objective optimization with multiple constraints, this embodiment can achieve a comprehensive balance of safety, effectiveness, and engineering feasibility while ensuring that the magnetically controlled micro-nano robot is always in the low-gradient safety zone, taking into account both trajectory tracking accuracy and the motion stability of the actuator. Regarding the differences in optimization strategies under different application scenarios, in two-dimensional plane experiments, only the XY translation of the magnetic drive head can be optimized. In 3D systems, XYZ translation can be optimized; in robotic arm systems, common attitude adjustment can also be incorporated. To avoid solving high-dimensional nonlinear optimization problems in each control cycle, the mapping between the local displacement of the magnetic drive head and the center displacement of the low-gradient region can be pre-calculated offline. Initial values ​​are provided by a lightweight neural network or lookup table model, and then quickly corrected by a local optimizer. This "offline mapping + online correction" strategy can significantly reduce the online computational burden while ensuring optimization quality, meeting the real-time requirements of millisecond-level control cycles.

[0081] As a preferred option, the trajectory prediction model adopts a physically guided residual structure, and its prediction result is obtained by superimposing the physical prediction quantity based on the robot dynamics model and / or magnetic field model with the residual correction quantity learned by the neural network.

[0082] Specifically, such as Figure 5 As shown, the physical prediction is a theoretical state value calculated based on the pre-established kinematic equations of the magnetically controlled micro / nano robot and the analytical model of the dual permanent magnet magnetic field. This physical prediction reflects the robot's expected trajectory under ideal conditions, considering only known dominant factors such as magnetic torque drive, fluid viscous drag, and gravity, providing a benchmark reference for the entire prediction system that conforms to basic physical laws. However, in real-world complex fluid environments, robot motion is often affected by many factors that are difficult to model accurately, such as the local rheological properties of non-Newtonian fluids, near-wall effects from blood vessel or channel walls, manufacturing errors from permanent magnet processing and assembly, deviations between finite-size magnet models and point dipole approximations, and mechanical backlash of the actuator itself. These factors lead to a systematic deviation between the prediction results of the pure physical model and the actual state.

[0083] To address the aforementioned unmodeled factors, this embodiment introduces a neural network to learn the residual correction. The residual correction characterizes the difference between the physical prediction and the actual state. The neural network automatically extracts the nonlinear mapping relationship between these complex interference factors and the time-series state by learning from a large amount of historical measured data. During the inference phase, the system linearly superimposes the physical prediction and the residual correction to obtain the final predicted state. The advantage of this superposition logic is that it preserves the interpretability and generalization ability of the physical model, ensuring that the prediction results do not deviate from the basic laws of mechanics, while utilizing the powerful nonlinear fitting ability of deep learning to compensate for model mismatch, thereby significantly improving the prediction accuracy in complex dynamic environments. It should be understood that although this embodiment uses additive superposition as an example, multiplicative correction or other forms of fusion strategies can also be used in other implementations, as long as the organic combination of physical prior knowledge and data-driven features can be achieved.

[0084] Preferably, the prediction output of the physically guided residual structure can be expressed as:

[0085] ;

[0086] In the formula: For the future The predicted state vector at each sampling time. To predict the step number in the time domain, To predict the number of future sampling points included in the time domain; These are the physical predictions given by the magnetic field model and the simplified dynamics model of the robot; The residual correction amount learned by the neural network is used to compensate for unmodeled factors such as fluid disturbance, near-wall effect, manufacturing differences, modeling errors of finite-size magnets, and actuator errors.

[0087] To ensure that the physical guidance residual structure can converge effectively and learn the correct physical laws, the training loss function of the trajectory prediction model includes a state prediction error term, as well as at least one of a magnetic field consistency constraint term and a motion continuity constraint term.

[0088] Specifically, the state prediction error term measures the Euclidean distance or mean square error between the predicted position and velocity output by the model and the true label, serving as a fundamental indicator for ensuring prediction accuracy. However, relying solely on state error may lead to overfitting the model to noisy data, or outputting predictions that, while numerically close to the true values, are physically unreasonable. Therefore, this embodiment introduces physical constraint terms into the loss function. The magnetic field consistency constraint term penalizes the deviation between the estimated magnetic field value at the predicted position and the value calculated by the physical magnetic field model. This constraint forces the trajectory learned by the model to lie within a physically achievable magnetic field space, preventing the model from "imagining" non-existent high-gradient regions or non-physical motion paths simply to reduce position error, thereby enhancing the reliability of the prediction results in subsequent relocation decisions. The motion continuity constraint term penalizes the drastic changes in state between adjacent prediction moments, such as sudden velocity changes or acceleration anomalies. Since magnetically controlled micro / nano robots typically operate in low Reynolds number fluid environments, their motion exhibits significant damping characteristics and temporal continuity. This constraint term effectively suppresses high-frequency jitter and non-physical jumps in the predicted trajectory, making the prediction results smoother and more consistent with actual kinematic characteristics.

[0089] During training, the aforementioned loss terms are weighted and summed to form the total loss function. The weight coefficients can be adjusted based on the signal-to-noise ratio of the training data, the accuracy of the physical model, and the specific application scenario. For example, in open water scenarios where the physical model is relatively accurate, the weight of the magnetic field consistency constraint term can be appropriately increased to strengthen the dominant role of physical priors; while in narrow channel scenarios where near-wall effects are significant and the physical model mismatch is large, the weight of the physical constraint can be appropriately reduced, giving the neural network greater freedom to learn residual features. Through this flexible weight adjustment strategy, the trajectory prediction model provided in this embodiment can achieve the best balance between data-driven adaptability and the interpretability of the physical model, providing a reliable state prediction basis for subsequent deviation risk assessment and dynamic relocation decisions. Regarding the construction of training data and training strategies, model training data can be generated from simulation data, experimental data, or a mixture of both. To reduce the amount of real experimental data, a large number of samples can be generated using magnetic field-dynamic simulation for pre-training, followed by fine-tuning using real robot trajectories. The training labels are the position, velocity, and optional gradient / gradient force for the first to K future steps. This two-stage training strategy of "simulation pre-training + real-world fine-tuning" can significantly reduce the dependence on real experimental data while ensuring the prediction accuracy of the model under actual working conditions. A preferred total loss function can be expressed as:

[0090] ;

[0091] in, and These are the position and velocity prediction errors, respectively. This is used to ensure that the magnetic field at the predicted location is consistent with the physical model of the magnetic field. Used to ensure the continuity of the predicted trajectory , , , These are the non-negative weight coefficients corresponding to each loss term. Each weight coefficient can be pre-set based on the characteristics of the training data, prediction accuracy requirements, and physical constraints, or it can be determined through hyperparameter optimization or adaptive weighting methods. Since the phase difference between the two magnets is treated as a constant zero parameter in this invention, no loss term corresponding to the phase difference between the two magnets is set. During online operation, the AI ​​model does not directly output the final actuator displacement, but instead provides the future trajectory and risk quantity, which is then solved by the subsequent relocation optimizer for control quantities subject to physical safety constraints. For complex fluid environments such as liquid channels, blood vessel models, or viscous media, local flow velocity, pulsating flow phase, liquid viscosity, and wall distance can be used as environmental state inputs to the trajectory prediction model. If some environmental quantities cannot be directly measured, they can be encoded using latent variables through the robot's short-time motion response, or estimated online by the observer. For periodic pulsating flow, the flow cycle phase can be used as model input, enabling the prediction model to distinguish the differences in robot motion during acceleration and deceleration phases. During online operation, the most recently... The actual trajectory is used to statistically analyze the AI ​​prediction error. When the prediction error continues to exceed the threshold, only the residual layer at the end of the model or the environmental adaptation parameters are updated to avoid disrupting the main magnetic physics model through online updates.

[0092] Preferably, the first permanent magnet and the second permanent magnet rotate synchronously at the same rotation frequency, and the initial phase difference is fixed at zero.

[0093] Specifically, the physical realization of zero phase difference relies on a high-precision synchronous drive architecture. For example... Figure 7 As shown, a unified synchronous clock signal source is used to simultaneously drive two rotary actuators, or a master-slave control mode is adopted. The master spindle motor drives the encoder to generate a reference pulse signal, and the slave spindle motor strictly tracks this reference signal through a phase-locked loop or servo following algorithm, thereby ensuring that the rotational angular velocities of the two permanent magnets are always equal at the hardware level. During the system startup initialization phase, the actual magnetic pole directions of the two permanent magnets are detected by an origin sensor or visual calibration method, and one or both magnets are controlled to rotate to a preset zero-position angle, so that their magnetic moment vectors are completely parallel or form a preset fixed angle at the initial moment, thereby completing the initial phase alignment. This hardware-level synchronization and alignment mechanism provides a deterministic magnetic field reference for subsequent control algorithms.

[0094] The initial phase difference is used as a constant operating parameter and is not used as an input variable in the trajectory prediction model, the computational cost of deviation risk, or a decision variable in the multi-objective optimization function. This setting is a key boundary condition for achieving efficient dynamic relocalization. Specifically, in the trajectory prediction model, since the phase difference is locked to zero, the model does not need to learn the nonlinear effects of phase changes on robot motion, and the input feature space is significantly reduced in dimensionality. This not only reduces the amount of training data required but also avoids overfitting or convergence difficulties caused by complex phase-motion coupling relationships. In deviation risk assessment, the calculation of the comprehensive deviation risk value depends only on the steady-state magnetic field distribution characteristics determined by the zero-phase-difference condition, without having to calculate the additional risk component caused by transient phase fluctuations in real time, thereby improving the real-time performance and robustness of risk judgment. In the multi-objective optimization solution, the decision variables only include the overall translation vector and attitude rotation parameters of the magnetic drive components, and do not include the relative phase angle between the two magnets. This means that the optimizer searches for the optimal external spatial pose under a fixed internal magnetic field configuration, rather than attempting to adapt to the environment by changing the internal magnetic field structure.

[0095] By fixing the initial phase difference to zero and excluding it from the optimization variables, the technical advantage lies in decoupling "microscopic actuation" from "macroscopic positioning." In this architecture, the dual permanent magnet assembly appears externally as a rigid magnetic source with a constant magnetic field topology; the repositioning operation is equivalent to the overall transport of this rigid magnetic source. This approach greatly simplifies the solution of the inverse dynamics problem, enabling the system to complete optimization calculations, including safety constraints, within a short control cycle, meeting the engineering requirements for real-time navigation of magnetically controlled micro / nano robots. Simultaneously, the constant zero phase difference ensures the morphological stability of the low-gradient working region, making the magnetic field environment of the robot consistent and predictable before and after repositioning, avoiding transient high-gradient force disturbances introduced by phase adjustment.

[0096] It should be noted that throughout the entire dynamic process of the repositioning actuator driving the magnetic drive assembly to adjust its spatial pose, the aforementioned synchronous rotation relationship and zero phase difference condition remain unchanged. In other words, regardless of whether the magnetic drive head is stationary or in a high-speed translational or rotational state, the two permanent magnets continuously maintain rotational motion with the same frequency and phase, and their internal relative geometric and kinematic relationships are not disturbed by external macroscopic motion.

[0097] Preferably, the low-gradient working region consists of a set of spatial points that satisfy the magnetic field gradient threshold and / or the magnetic gradient force threshold.

[0098] Specifically, the low-gradient working region is not a pre-defined, fixed geometry, but rather a dynamically defined safety space based on the physical properties of the magnetic field. During system initialization or pose updates of the magnetically driven components, the prediction and control unit performs discretized mesh scanning or analytical calculations on the working space to evaluate the magnitude of the magnetic field gradient at each spatial point. and / or magnetic gradient force amplitude A point is marked as safe only when all or only one of the aforementioned indicators at a given spatial point falls below a preset safety threshold. The connected set of all safe points constitutes the current low-gradient working zone. The thresholds are not arbitrarily chosen empirical values, but rather determined based on the physical properties and task requirements of the magnetically controlled micro / nano robot. For example, the magnetic field gradient threshold can be derived by inversely calculating the critical gradient torque required for the robot to experience uncontrolled tumbling or instability; the magnetic gradient force threshold can be determined based on the balance between the maximum driving force required for the robot to maintain stable movement in a fluid of a specific viscosity and the maximum permissible disturbance force. This definition method based on physical thresholds ensures that the low-gradient working zone accurately reflects the robot's current safe operating boundary, rather than merely a geometric limitation.

[0099] The mathematical foundation for the low-gradient working region is given below. For any point in the working space... The combined magnetic field generated by the two synchronously rotating permanent magnets is:

[0100] ;

[0101] In the formula: For two synchronously rotating permanent magnets at position The resulting magnetic field at that location

[0102] For the first synchronously rotating permanent magnet at position The magnetic field generated at that location, For the second synchronously rotating permanent magnet at position The magnetic field generated at that location.

[0103] Define the local magnetic field gradient index Let be the norm of the gradient tensor of the synthesized magnetic field with respect to spatial location, or the gradient norm of the magnetic field amplitude:

[0104] ;

[0105] In the formula: This is the position vector in the workspace. For time, To synthesize the magnetic field, For spatial gradient operators, The norm of a vector.

[0106] For the equivalent magnetic moment is For micro / nano robots, the magnetic gradient force can be expressed as:

[0107] ;

[0108] In the formula: For position At the moment Magnetic gradient force, For spatial gradient operators, The equivalent magnetic moment for magnetically controlled micro / nano robots. For two synchronously rotating permanent magnets at position The synthetic magnetic field generated at that location.

[0109] A preferred low-gradient working area is defined based on at least one safety indicator. :

[0110] ;

[0111] In the formula: For a moment The low gradient working region The magnetic field gradient threshold. The magnetic gradient force threshold is defined as the set of regions that satisfy the condition that the magnetic field gradient does not exceed the threshold and / or the magnetic gradient force does not exceed the threshold.

[0112] In a preferred embodiment, for each candidate spatial point, the maximum value, root mean square value, or preset quantile of the magnetic field gradient index and magnetic gradient force index are calculated over at least one complete rotation cycle. The working area is defined using the worst-case scenario of the cycle; that is, a point is only designated as a preferred low-gradient point if both the maximum gradient and maximum gradient force are below a threshold within a complete rotation cycle. The low-gradient working area is constituted by consecutive spatial points that meet the conditions. This definition method based on the worst-case scenario of the cycle ensures that the robot is not affected by transient high gradients throughout the entire rotation cycle of the magnet, thus providing a more conservative and reliable safety guarantee. Furthermore, the low-gradient working area is not fixed to the laboratory coordinate system but is related to the pose of the magnetically driven head. Related. When the magnetic drive head translates as a whole. Or rotate as a whole At the same time, the positions and magnetic moment directions of the two permanent magnets are updated according to the rigid body transformation, thereby updating the low-gradient working region in real time. This characteristic means that the low-gradient working area migrates synchronously with the magnetic drive components, and its internal magnetic field topology remains unchanged before and after repositioning, with only the overall spatial position shifting. This ensures that the robot remains in a working environment with the same safety characteristics after repositioning.

[0113] A safe sub-region is defined within the low-gradient working region, and a preset safety margin is provided between the safe sub-region and the boundary of the low-gradient working region.

[0114] The safe subregion is a proper subset of the low-gradient working region, whose boundary is shrunk inward by a preset safety margin relative to the outer boundary of the low-gradient working region. For applications with higher safety levels, a safe sub-region can be obtained through morphological contraction or distance transformation, ensuring that the minimum distance from the safe sub-region to the boundary of the low-gradient working area is greater than a preset safety margin. This safety margin setting has dual technical significance: firstly, it provides a core safe zone with higher confidence for the magnetically controlled micro / nano robot; even if the robot is momentarily disturbed and deviates from the center, as long as it remains within the safe sub-region, it will not immediately face the risk of going out of bounds; secondly, this margin directly supports the hysteresis control strategy described earlier. Specifically, the threshold for triggering relocation corresponds to a high-risk state approaching the boundary of the low-gradient working area, while the threshold for resolving relocation corresponds to a low-risk state returning to the safe sub-region. Preset safety margin The difference between these two thresholds is quantified in space, so that when the system is delocalized, the robot must go to a safer position than when it was triggered. This ensures the stability of the control logic at the physical space level and effectively avoids the problem of frequent start-stop of the magnetic drive component at the boundary due to sensor noise or prediction jitter.

[0115] The current motion state is acquired through at least one of visual imaging, ultrasonic imaging, magnetic sensor arrays, or optical positioning systems. Kalman filtering, particle filtering, or a neural network state estimator are then used to fuse and estimate the acquired sensor data to obtain the current motion state. To address different application scenarios and environmental constraints, this invention provides various state perception implementation methods for selection or combination. For example, in transparent microfluidic chip experiments or in vitro simulated blood vessel environments, visual imaging systems (such as high-speed microscopes or industrial cameras) can provide high-resolution position and attitude information, suitable for laboratory research with extremely high precision requirements. In opaque biological tissue or live animal experiments, ultrasonic imaging systems, with their penetrating capabilities, can achieve real-time tracking of robots in deep tissues. Magnetic sensor arrays invert the robot's position by detecting the weak magnetic field changes generated by the robot's own magnetic moment; this method is unaffected by optical line-of-sight obstruction and has a sampling frequency reaching the kHz level, making it very suitable for high-speed dynamic control. Optical positioning systems (such as infrared reflective tracking) are commonly used for high-precision absolute positioning at the macroscopic scale in vitro. It should be understood that the above perception methods are not mutually exclusive; in actual systems, multimodal configurations can be performed as needed to adapt to complex and changing working conditions. Because single sensors often have limitations such as measurement noise, sampling delay, or local blind spots, directly using raw observation data as input to the trajectory prediction model may reduce prediction accuracy or even lead to misjudgment. Therefore, this embodiment introduces a state estimation algorithm to fuse multi-source data. Specifically, when the system dynamics model is relatively accurate and the noise follows a Gaussian distribution, Kalman filtering or its extended forms (EKF / UKF) can be used to smooth observation noise and fill in missing states using a prediction-correction mechanism. When the robot motion exhibits strong nonlinearity or non-Gaussianity (such as under complex blood flow pulsation), particle filtering can approximate the true posterior probability distribution through a large number of samples, providing more robust state estimation. In situations where environmental interference is extremely complex and it is difficult to establish an accurate analytical model, a neural network state estimator can learn the implicit patterns in historical data and directly regress the true state end-to-end from the noisy observation sequence. The current motion state obtained through the above fusion estimation not only eliminates random measurement errors, but also includes derived state quantities such as velocity and acceleration that cannot be directly measured, providing a high-quality and highly reliable input basis for the trajectory prediction model, thereby indirectly improving the decision-making accuracy and operational safety of the entire dynamic relocation system.

[0116] Example 7: Figure 2 and Figure 3 As shown, this embodiment provides a dynamic repositioning system for the low-gradient working region of a synchronously rotating permanent magnet. This system maps the dynamic repositioning method in the aforementioned embodiments into a specific hardware entity and signal interaction architecture. The system includes a magnetic drive component, a repositioning actuator, a state sensing module, and a prediction and control unit.

[0117] The magnetic drive assembly includes a first permanent magnet and a second permanent magnet that maintain a fixed relative mounting relationship, and a rotary driver for driving the first and second permanent magnets to rotate synchronously. Specifically, as... Figure 2 As shown, the first synchronous rotating permanent magnet 101 and the second synchronous rotating permanent magnet 102 are rigidly connected by a fixed bracket 103 (i.e., a magnetic drive head). The center distance, rotation axis parallelism, and initial installation angle between the two are guaranteed by machining precision, forming an immutable internal geometric configuration. The rotary actuator can be integrated inside the fixed bracket 103 or externally connected. For example, two independent servo motors can be used to drive the two permanent magnets respectively, and strict synchronous rotation at the same frequency can be achieved through a synchronous belt, gear set, or electronic gearbox; or a single motor can be used in conjunction with a mechanical linkage mechanism to drive both magnets simultaneously. Regardless of the driving form used, its physical structure must ensure that the relative posture of the two magnets remains unchanged during high-speed rotation and external repositioning motion, thereby maintaining the structural stability of the magnetic field distribution in the low-gradient working area.

[0118] The repositioning actuator is connected to the magnetic drive assembly and configured to drive the magnetic drive assembly to adjust its spatial pose. Specifically, the repositioning actuator 107 is a mechatronic device that supports the magnetic drive assembly and realizes its macroscopic motion. Depending on the degree of freedom requirements of the application scenario, this mechanism can be a three-axis linear module, a six-degree-of-freedom industrial robotic arm, a parallel platform, or a customized XY-Z motion platform. In terms of mechanical connection, the end flange or moving slider of the repositioning actuator is firmly connected to the fixed bracket 103, so that the translation or rotation of the actuator can be transmitted to the entire magnetic drive assembly without gaps. This physical connection ensures that the displacement vector output by the repositioning actuator is the overall pose change of the magnetic drive assembly, providing a reliable hardware execution basis for the optimization solution based on rigid body constraints in Embodiment 3.

[0119] The state perception module is configured to acquire the current motion state of the magnetically controlled micro / nano robot and the current driving state of the magnetic drive components. Specifically, the state perception module 201 includes one or more sensors and their signal conditioning circuits. For state acquisition of the magnetically controlled micro / nano robot 105, sensors can be arranged outside the working area, such as a high-speed microscope camera directly above, a lateral ultrasonic probe, or a surrounding array of magnetic sensors; alternatively, some micro-sensors can be integrated into the working container wall as needed. For acquisition of the driving state of the magnetic drive components, rotational speed, phase, and overall pose information can be acquired in real time through an encoder, Hall sensor mounted on the rotary actuator shaft, or an inertial measurement unit (IMU) mounted on the fixed bracket 103. It should be understood that although... Figure 1The general state sensing device 108 is drawn as an independent module, but in the actual system, its sensor probe may be installed on the same base as the repositioning actuator 107, or distributed in the experimental environment, as long as it can cover the workspace and achieve synchronous data acquisition.

[0120] The prediction and control unit is communicatively connected to the state perception module, the rotary actuator, and the repositioning actuator, respectively. It is configured to acquire a predicted trajectory and determine deviation risk based on the current motion state, current driving state, and historical time-series data. In response to the deviation risk meeting preset trigger conditions, it determines the overall repositioning parameters while maintaining the fixed relative installation relationship and synchronous rotation relationship of the first and second permanent magnets. It then controls the repositioning actuator to drive the magnetic drive component to adjust its spatial pose based on these overall repositioning parameters. Specifically, the prediction and control unit 109 is the core of the system's computation and decision-making. Its hardware carrier can be a high-performance industrial computer, an edge computing platform equipped with a GPU accelerator card, an embedded controller (such as an FPGA+ARM architecture), or a combination of the above devices. In terms of communication topology, this unit establishes a low-latency control link with the repositioning actuator 107 and the rotary actuator via a high-speed bus (such as EtherCAT, CANopen) or real-time Ethernet, while simultaneously reading data from the state perception module through an image acquisition card, ADC board, or dedicated interface. Logically, the prediction and control unit runs an operating system and control software configured to execute the dynamic repositioning method described in Example 1. For example, the AI ​​prediction module 204, relocation decision module 205, safety constraint module 206, and execution and feedback module 207 can run as software processes or firmware algorithms within the unit's processor, converting raw data from sensor inputs into precise control commands for the actuators. Through this integrated hardware and software architecture, the prediction and control unit achieves millisecond-level closed-loop control from state perception and risk prediction to rigid relocation execution, ensuring safe navigation and precise operation of the magnetically controlled micro-nano robot in complex dynamic environments. An example control cycle includes: state acquisition, state filtering, AI future trajectory prediction, risk assessment, relocation triggering, relocation optimization, safety constraint checking, actuator movement, and state feedback. The two permanent magnets are maintained in synchronized rotation at the same frequency and under a preset zero-phase-difference operating condition by the magnet synchronization drive module 202; this condition does not enter the aforementioned prediction and relocation calculation chain. If relocation is not triggered, only conventional robot heading / speed control is executed. If the actuator reaches its travel boundary, the robot's propulsion speed can be reduced first, the path replanned, or a request for overall rearrangement from the upper platform can be made. Each module can be implemented in software within the same industrial computer, or it can be distributed across GPU computers, motion controllers, and embedded controllers.

[0121] Example 3: This example provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the dynamic repositioning method for the low-gradient working area of ​​a synchronous rotating permanent magnet as described in Example 1 above.

[0122] Specifically, a computer-readable storage medium refers to a physical carrier capable of carrying and persistently or temporarily storing data and instructions, enabling a processor to read from and execute the corresponding program logic. In embodiments of this invention, the storage medium can take various forms to adapt to different deployment scenarios. For example, in terms of non-volatile storage, it can be a read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory, optical discs (such as CD-ROM, DVD, Blu-ray discs), or magnetic disks (such as hard disk drives, floppy disks), etc. These media are suitable for long-term software preservation, distribution, and firmware embedding. In terms of volatile storage, it can also be random access memory (RAM), dynamic random access memory (DRAM), or static random access memory (SRAM), etc. These media are suitable for temporary loading and caching during program execution.

[0123] When the processor loads and executes the computer program from the aforementioned storage medium, it essentially transforms the abstract control strategy described in the preceding embodiments into a specific sequence of machine operations. Specifically, by executing program instructions, the processor controls the state perception module to collect the motion state of the magnetically controlled micro-nano robot and the driving state of the magnetic drive components, calls the trajectory prediction model to calculate the deviation risk in the future prediction time domain, and solves for the overall repositioning parameters that satisfy rigid body constraints when the triggering conditions are met, and finally sends a pose adjustment command to the repositioning actuator.

[0124] Example 4: This example, based on Example 1 above, further demonstrates the specific application of the dynamic repositioning method for the low-gradient working region of a synchronously rotating permanent magnet in a targeted transport scenario of a magnetically controlled micro / nano robot in a complex fluid environment. It should be understood that this example is merely a comprehensive application demonstration of the technical solution in actual working conditions and does not constitute an additional limitation on the scope of protection of this invention.

[0125] In this application scenario, the working environment is set as a transparent silicone channel simulating human blood vessels or a viscous liquid pipe filled with glycerol aqueous solution. The magnetically controlled micro / nano robot employs a magnetic helical robot with a chiral structure. This environment is typically unstructured; the fluid not only has high viscosity but may also exhibit periodic pulsating flow and significant near-wall effects, resulting in highly nonlinear and time-varying motion dynamics of the robot. To achieve stable targeted transport in this complex environment, the system adopts the closed-loop control architecture described in the aforementioned embodiments. Specifically, the control cycle of the prediction and control unit is set to 20Hz to 100Hz, meaning a complete cycle from state acquisition, AI prediction, risk assessment to repositioning decision and command issuance is completed every 10ms to 50ms. This high-frequency control rhythm ensures that the system can respond promptly to fluid disturbances and rapid changes in the robot's state. The prediction time domain length of the trajectory prediction model is preferably set to 5 to 50 control steps. This range ensures sufficient foresight to cover the mechanical response delay of the repositioning actuator while avoiding excessive cumulative errors due to excessively long prediction times.

[0126] Regarding the construction of the low-gradient working region, the magnetic field gradient threshold and magnetic gradient force threshold are not arbitrarily set, but calibrated based on the physical properties of the magnetic helical robot and the safety requirements of the task. For example, the magnetic field gradient threshold can be derived from the critical magnetic torque required for the robot to avoid rollover instability at the maximum permissible tilt angle; the magnetic gradient force threshold is determined based on the balance between the maximum driving force required for the robot to maintain stable movement in a fluid of a specific viscosity and the permissible disturbance force to prevent it from being adsorbed to the pipe wall. During system operation, the trajectory prediction model plays a crucial role in addressing interference factors such as pulsating flow and near-wall effects by utilizing its physically guided residual structure. The physical model provides basic motion predictions based on the Stokes flow assumption, while the neural network residual correction automatically compensates for unmodeled dynamic deviations caused by changes in pulsating flow velocity, boundary layer friction, and magnet manufacturing errors by learning from historical data. When the prediction results indicate that the robot's future trajectory may deviate from the safe sub-region due to an increase in instantaneous flow velocity, the relocation decision module will trigger the overall translation or attitude adjustment of the magnetic drive components before the robot actually crosses the boundary. Because the repositioning process strictly maintains the fixed relative installation relationship of the two permanent magnets and the synchronous rotation condition with zero phase difference, the internal magnetic field topology of the low gradient working area remains unchanged when the magnetic drive head moves as a whole, thus avoiding secondary disturbances to the robot caused by magnetic field reconstruction and achieving the synergy of forward-looking safety compensation and smooth drive.

[0127] To verify the effectiveness of the technical solution of this invention, the following comparative experiment can be designed: two experimental groups are set up: "traditional feedback control with fixed magnetic drive head" and "predictive dynamic repositioning control based on this invention," and tests are conducted under the same target trajectory, fluid environment, and external disturbance conditions. The verification indicators mainly include: the proportion of robot dwell time in the low-gradient working area, the peak value of the maximum magnetic gradient force experienced during movement, the average tracking error and maximum tracking error relative to the target trajectory, and the number of repositioning triggers and the total movement distance of the actuator per unit time. The expected experimental results show that, compared with the fixed magnetic drive head scheme, the dynamic repositioning method provided by this invention can significantly improve the robot's dwell time in the low-gradient working area, reduce the peak value of the maximum magnetic gradient force, and effectively suppress unnecessary frequent repositioning actions through a hysteresis control mechanism while maintaining or improving trajectory tracking accuracy. These quantitative indicators intuitively reflect the safety, stability, and energy efficiency advantages brought about by the combination of forward-looking prediction and rigid repositioning. Furthermore, in actual deployments, if some environmental parameters (such as local flow velocity) cannot be directly measured, the system can also encode latent variables by observing the robot's short-term motion response or estimate them by an online observer, and use this estimate as the input of the environmental state into the AI ​​prediction model, further enhancing the system's adaptability in unknown or time-varying environments.

[0128] In addition, the present invention also includes the following optional implementation methods: (1) The “trajectory prediction model” is not limited to a single deep neural network, but can also use machine learning regression models, Bayesian models, Gaussian processes, combinations of neural networks and physical models, online learning models, or integration of multiple models. (2) The “low gradient working area” is not limited to using magnetic field gradient alone, but can also use magnetic gradient force, the ratio of gradient force to magnetic torque, maximum period gradient, energy gradient, or calibrated comprehensive safety indicators. (3) “Dynamic repositioning” is not limited to two-dimensional translation, but also includes three-dimensional translation, overall attitude adjustment, and overall motion of the end effector of a robotic arm with dual magnets, but the fixed relative installation relationship between the two permanent magnets remains unchanged in one embodiment. (4) The present invention can be combined with vision, ultrasound, magnetic positioning, or multimodal positioning, and can also be combined with robot heading / velocity controllers such as PID, sliding mode control, model predictive control, and reinforcement learning control; the core of the present invention is to use the future motion prediction results to perform forward repositioning of the low gradient working area. (5) Without departing from the concept of the present invention, the dual synchronous rotating permanent magnets can be extended to two or more synchronous rotating permanent magnets. At this time, the rigid body constraint and synchronous rotation constraint of the overall repositioning can be extended accordingly. For the extended system, the phase relationship between each rotating permanent magnet can be fixed according to the preset synchronous working conditions, and does not need to be used as the optimization variable of the dynamic repositioning algorithm.

[0129] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for dynamic repositioning of a low-gradient working zone of a synchronous rotating permanent magnet, characterized in that, include: Step 1: Obtain the current motion state of the magnetically controlled micro-nano robot and the current driving state of the magnetic drive assembly, wherein the magnetic drive assembly includes a first permanent magnet and a second permanent magnet that maintain a fixed relative installation relationship. Step 2: Based on the current motion state, current driving state and historical time series data, obtain the predicted trajectory of the magnetically controlled micro-nano robot in the future prediction time domain through the trajectory prediction model, and determine the deviation risk based on the positional relationship between the predicted trajectory and the low gradient working area and the magnetic field safety index. Step 3: In response to the deviation risk meeting the preset triggering condition, under the constraint of maintaining the fixed relative installation relationship and synchronous rotation relationship of the first permanent magnet and the second permanent magnet, determine the overall repositioning parameters of the magnetic drive assembly; Step 4: Based on the overall repositioning parameters, control the repositioning actuator to drive the magnetic drive component to adjust the spatial pose, and maintain the synchronous rotation of the first permanent magnet and the second permanent magnet during the adjustment process.

2. The method of claim 1, wherein, The deviation risk is determined in the following ways: The comprehensive deviation risk value is calculated based on at least one of the following: the predicted magnetic field gradient at the predicted trajectory, the predicted magnetic gradient force, the distance from the predicted trajectory to the boundary of the low gradient working area, and the trajectory tracking error. The preset triggering conditions include a trigger threshold and a release threshold, wherein the trigger threshold is greater than the release threshold to form a hysteresis control zone; Relocation is triggered when the overall deviation risk value is greater than or equal to the trigger threshold, and relocation is canceled when the overall deviation risk value is less than the cancellation threshold.

3. The method of claim 1, wherein, Determining the overall repositioning parameters of the magnetic drive assembly includes: A multi-objective optimization function is constructed, wherein the optimization objectives of the multi-objective optimization function include at least one of the following: the deviation of the predicted trajectory from the preset safe sub-region, the predicted magnetic field gradient, the predicted magnetic gradient force, the trajectory tracking error, and the displacement cost and attitude change cost of the magnetic drive component; Under the condition of satisfying rigid body constraints and physical safety constraints, the multi-objective optimization function is solved to obtain the optimal global relocation parameters; The rigid body constraint conditions include a fixed distance constraint and a fixed relative attitude constraint between the first permanent magnet and the second permanent magnet.

4. The method of claim 2, wherein, The trajectory prediction model adopts a physically guided residual structure, and its prediction result is obtained by superimposing the physical prediction quantity based on the robot dynamics model and / or magnetic field model with the residual correction quantity learned by the neural network. The training loss function of the trajectory prediction model includes a state prediction error term, and at least one of a magnetic field consistency constraint term and a motion continuity constraint term.

5. The method of claim 3, wherein, The first permanent magnet and the second permanent magnet rotate synchronously at the same rotation frequency, and the initial phase difference is fixed at zero. The initial phase difference is used as a constant operating parameter and is not used as an input variable of the trajectory prediction model, the computational cost of the deviation risk, or a decision variable of the multi-objective optimization function.

6. The method according to claim 1, characterized in that, The low-gradient working region consists of a set of spatial points that satisfy the magnetic field gradient threshold and / or the magnetic gradient force threshold. A safe sub-region is defined within the low-gradient working region, and the safe sub-region has a preset safety margin between its boundary and the boundary of the low-gradient working region.

7. The method according to claim 6, characterized in that, The current motion state is obtained by at least one of visual imaging, ultrasonic imaging, magnetic sensor array, or optical positioning system. The acquired sensor data is fused and estimated using Kalman filtering, particle filtering, or a neural network state estimator to obtain the current motion state.

8. The method according to claim 2, characterized in that, When the magnetically controlled micro-nano robot re-enters the safe sub-region, which is a region within the low-gradient working area with a preset safety margin, and the release threshold is met for multiple consecutive control cycles, the control of the repositioning actuator to drive the magnetic drive component to perform spatial translation is stopped. The movement of the magnetically controlled micro-nano robot is controlled only by controlling the synchronous rotation frequency or rotation axis direction of the first permanent magnet and the second permanent magnet.

9. A dynamic repositioning system for a synchronously rotating permanent magnet in a low-gradient working region, characterized in that, include: A magnetic drive assembly includes a first permanent magnet and a second permanent magnet that maintain a fixed relative mounting relationship, and a rotary driver for driving the first permanent magnet and the second permanent magnet to rotate synchronously. A repositioning actuator is connected to the magnetic drive assembly and configured to drive the magnetic drive assembly to perform spatial pose adjustment. The state perception module is configured to acquire the current motion state of the magnetically controlled micro-nano robot and the current driving state of the magnetic drive component. The prediction and control unit is communicatively connected to the state perception module, the rotary actuator, and the repositioning actuator, respectively. It is configured to acquire a predicted trajectory and determine the deviation risk based on the current motion state, the current driving state, and historical time series data. In response to the deviation risk meeting a preset trigger condition, it determines the overall repositioning parameters while maintaining the fixed relative installation relationship and synchronous rotation relationship of the first permanent magnet and the second permanent magnet, and controls the repositioning actuator to drive the magnetic drive component to perform spatial pose adjustment based on the overall repositioning parameters.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 8.