Capsule robot positioning and pose control system for a magnetic field sensor array
By combining imaging marking on the capsule robot with the use of a reinforcement learning model, the posture was measured and magnetic control commands were generated, which solved the problem of large iteration error and improved the position and posture control accuracy of the capsule robot.
Patent Information
- Application Number
- CN202311107195.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-30
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2043-08-30
AI Technical Summary
In existing technologies, the position and attitude calculation of magnetically controlled capsule robots suffers from large iterative errors, resulting in low accuracy.
By combining a magnetic field sensor array with a reinforcement learning model, the capsule robot is marked with a developmental image, its posture is measured, and magnetic control commands are generated using the reinforcement learning model. The developed posture is then used for iterative calculation and correction to reduce cumulative errors.
This improves the accuracy of position and attitude control of the capsule robot, reduces the cumulative error in iterative calculations, and enhances the accuracy of control.
Smart Images

Figure CN117158876B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of medicine, in particular to a capsule robot positioning and posture control system of a magnetic field sensor array. BACKGROUND
[0002] Capsule micro-robot is an intelligent micro-tool that can enter the human gastrointestinal tract for medical exploration and treatment, and is a new breakthrough in in-vivo interventional examination and treatment medical technology.
[0003] Capsule robots are divided into passive and active types according to different moving methods. Capsule robots can move to a target point for image acquisition, move to a target point for treatment and drug administration. Therefore, there is a high precision requirement for the calculation of the position of the capsule robot.
[0004] At present, for a magnetic control type capsule robot, an existing technology (CN115886692A) discloses a positioning method, which calculates the theoretical magnetic field of an internal permanent magnet by using a magnetic dipole model, calculates the actual magnetic field of the internal permanent magnet according to the environmental magnetic field data, the magnetic field generated by the suspension electromagnetic coil and the deflection electromagnetic coil at each position, and the real-time magnetic field data in the working space, and calculates the real-time position and posture parameters of the capsule robot according to the theoretical magnetic field and the actual magnetic field and an iterative optimization algorithm.
[0005] The method of calculating the position and posture by using the magnetic field theory is currently commonly used, however, the precision of this method has a theoretical defect. The essence of the current method of calculating the position and posture is to use an iterative method, that is, the position and posture of the next moment are calculated by using the posture of the capsule robot calculated by iteration at the last moment. The posture information used for iterative calculation of the position of the next moment is actually the posture information obtained by iteration, not the actually measured posture information. Since there is a large cumulative error in iteration, the calculation accuracy of the final position is low.
[0006] Therefore, it is necessary to provide a new method to improve the accuracy of the calculation of the position and posture of the capsule robot and the precision of the control thereof. SUMMARY
[0007] The embodiment of the present specification provides a capsule robot positioning and posture control system of a magnetic field sensor array, which is used to improve the precision of the control of the position and posture of the capsule robot.
[0008] The system has:
[0009] The capsule robot posture actual measurement module performs radiographic marking on the capsule robot, and the markings are respectively marked as first, second and third markings. After the capsule robot enters the working space, the capsule robot is radiographed to obtain a radiographic image. Target recognition is performed on the radiographic image to identify the projection features of the first, second and third markings. The radiographic posture of the capsule robot is calculated according to the projection features of the first, second and third markings.
[0010] The machine learning module constructs a reinforcement learning model, uses the reinforcement learning model to plan and generate a magnetic control instruction, simulates and predicts the position and posture of the capsule robot at the next moment after the magnetic control instruction is implemented according to the radiographic posture, judges whether the simulated and predicted position and posture at the next moment are on a preset moving path, implements the magnetic control instruction if yes, continues to radiograph the capsule robot after implementation, calculates the radiographic posture and position of the capsule robot, uses the radiographic posture and position for next iteration, and corrects the reinforcement learning model according to the deviation between the radiographic posture and the simulated and predicted result.
[0011] The magnetic control system is used to implement the magnetic control instruction, wherein the magnetic control system has a magnetic field sensor array.
[0012] The various technical solutions provided by the embodiments of the present application radiographically mark the capsule robot, radiograph to obtain a radiographic image after the capsule robot enters the working space, identify the projection features of the markings, calculate the radiographic posture of the robot, use the reinforcement learning model to generate a magnetic control instruction, simulate and predict the position and posture of the robot at the next moment after the instruction is implemented according to the radiographic posture, judge whether it is on the preset path, implement the magnetic control instruction if yes, continue to radiograph after implementation, calculate the radiographic posture and position of the capsule robot, use the radiographic posture and position for next iteration, and correct the reinforcement learning model according to the deviation between the radiographic posture and the simulated and predicted result. The magnetic control system implements the magnetic control instruction, the position is calculated by the radiographic posture calculated by actual measurement in each iteration, the posture iterated is no longer used for the iterative calculation of the position, the cumulative error is reduced, and the precision of the position and posture control is improved. BRIEF DESCRIPTION OF DRAWINGS
[0013] The drawings described herein are used to provide further understanding of the present application, and form a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application, and do not constitute improper limitations on the present application. In the drawings:
[0014] Figure 1 A principle schematic diagram of a capsule robot positioning and posture control system of a magnetic field sensor array is provided for the embodiments of the present application. DETAILED DESCRIPTION
[0015] Exemplary embodiments of the present application will now be described more fully with reference to the accompanying drawings. The exemplary embodiments, however, can be implemented in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these exemplary embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the inventive concept to those skilled in the art. Like reference numerals refer to like elements throughout the specification. Repetitive descriptions of like elements will be omitted for sake of brevity.
[0016] In the case of a certain specific embodiment, the features, structures, characteristics or other details described can not exclude being combined in a suitable manner in one or more other embodiments, in line with the technical idea of the present application.
[0017] In the description of the specific embodiments, the features, structures, characteristics or other details described are intended to enable a full understanding of the embodiments by those skilled in the art. However, one or more of the features, structures, characteristics or other details can not be practiced by those skilled in the art without the specific feature, structure, characteristic or other detail.
[0018] The flowcharts shown in the drawings are merely illustrative and do not necessarily include all the contents and operations / steps, nor are they necessarily executed in the order described. For example, some operations / steps can be further broken down, and some operations / steps can be combined or partially combined, so the actual execution order can be changed according to the actual situation.
[0019] The block diagrams shown in the drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, the functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0020] The term "and / or" or "and / or" includes all combinations of one or more of the associated listed items.
[0021] Figure 1 A schematic diagram of a principle of a capsule robot positioning and posture control system of a magnetic field sensor array provided for an embodiment of the present specification, which can include:
[0022] The capsule robot posture actual measurement module 101 performs radiographic marking on the capsule robot, and the capsule robot is marked as a first, second, and third mark. After the capsule robot enters the working space, the capsule robot is radiographed to obtain a radiographic image. Target recognition is performed on the radiographic image to identify the projection features of the first, second, and third marks, and the radiographic posture of the capsule robot is calculated according to the projection features of the first, second, and third marks.
[0023] The machine learning module 102 constructs a reinforcement learning model, uses the reinforcement learning model to plan a magnetic control instruction, predicts a position and pose of the capsule robot at a next time after the magnetic control instruction is implemented based on the simulation of the developing pose, and determines whether the position and pose at the next time simulated and predicted are on a preset moving path. If yes, the magnetic control instruction is implemented. After the implementation, the capsule robot is continuously developed, the developing pose and position of the capsule robot are calculated, the developing pose and position are used for next iteration, and the reinforcement learning model is corrected according to a deviation between the developing pose and the simulation result.
[0024] The magnetic control system 103 is used for implementing the magnetic control instruction, wherein the magnetic control system has a magnetic field sensor array.
[0025] The capsule robot is marked by developing the capsule robot, a developing image is obtained after the capsule robot enters a working space, a projection feature of the mark is recognized, a robot developing pose is calculated, a magnetic control instruction is generated by using a reinforcement learning model, a position and pose of the robot at a next time after the instruction is implemented are simulated and predicted based on the developing pose, it is determined whether the position and pose at the next time are on a preset path. If yes, the magnetic control instruction is implemented. After the implementation, the capsule robot is continuously developed, the developing pose and position of the capsule robot are calculated, the developing pose and position are used for next iteration, and the reinforcement learning model is corrected according to a deviation between the developing pose and the simulation result. The magnetic control system implements the magnetic control instruction. The position is calculated by using the developing pose calculated by actually measuring the position in each iteration. The pose calculated by iteration is no longer used for the iteration calculation of the position, so that cumulative error is reduced, and the precision of position and pose control is improved.
[0026] In the embodiment of the present application, the working space is an intersection of working spaces of the magnetic control system and the developing system.
[0027] The capsule robot pose actually measuring module 101 has a marking device and a developing device. The marking device is used for marking the capsule robot, and the developing device is used for developing the capsule robot. The marking device and the developing device can be implemented by using hardware in the prior art. The structure is not the core of the present application, and thus is not limited.
[0028] Of course, after the capsule robot pose actually measuring module 101 is integrated into the system, the capsule robot pose actually measuring module 101 can be further assigned with a calculation and storage unit for various calculation and storage functions.
[0029] The marking position and the relative position between the marks can be recorded.
[0030] The developing time can be determined and the developing instruction can be executed.
[0031] The target recognition on the developed image, the target recognition on the developed image, the projection features of the first, second and third markers are recognized, and the developed posture of the capsule robot is calculated according to the projection features of the first, second and third markers.
[0032] The target refers to the geometric feature and color feature of the marker (noun state).
[0033] In the embodiments of the present application, the first, second and third markers are point markers, and the developed posture of the capsule robot is calculated according to the projection features of the first, second and third markers, including:
[0034] The projection distances between the first, second and third markers are calculated respectively, the inclination angles of the first-second marker connecting line and the first-third marker connecting line are calculated according to the projection distances, and the developed posture of the capsule robot is recorded by the inclination angles of the first-second marker connecting line and the first-third marker connecting line.
[0035] The projection distance of the first-second marker connecting line is denoted as a, the projection distance of the first-third marker connecting line is denoted as b, the orthographic projection distance of the first-second marker connecting line is denoted as A, and the orthographic projection distance of the first-third marker connecting line is denoted as B. Then arccos(a / A) is the inclination angle of the first-second marker connecting line, and arccos(b / B) is the inclination angle of the first-third marker connecting line.
[0036] In the embodiments of the present application, the first, second and third markers are circular, and the developed posture of the capsule robot is calculated according to the projection features of the first, second and third markers, including:
[0037] One of the first, second and third markers is selected, the length and direction of the long side and the length and direction of the short side of the marker are determined, the inclination angle value is calculated according to the length ratio of the short side to the long side as the cosine value of the inclination angle, the direction of the short side is taken as the direction of the inclination angle, and the inclination angle value and direction of the inclination angle are used to record the developed posture of the capsule robot.
[0038] The circular marker is projected to obtain an elliptical shape after tilting, the short side direction of the ellipse is the tilting direction, and the short side / long side is the cosine value of the tilting angle. The inclination angle can be calculated according to this principle.
[0039] The one of the first, second and third markers can be selected, which can be the one with the largest projection area, so as to improve the calculation accuracy.
[0040] The long side is denoted as L1, and the short side is denoted as L2. Then the inclination angle is arccos(L2 / L1), and the inclination angle direction is the short side direction.
[0041] The developing posture of the capsule robot can be recorded as (a circular mark name, an inner inclination degree in a direction away from the projection surface, and a pointing degree in the projection surface).
[0042] For example, (a circular mark name 1, an inner inclination of 45 degrees in a direction away from the projection surface, and a 175-degree direction in the projection surface).
[0043] Since developing requires mobilization of hardware devices, and iteration only requires software operation, in order to reduce the frequency of device calling, the developing device can be called intermittently, and developing can be performed intermittently.
[0044] Therefore, in the embodiment of the present application, the developing of the capsule robot is continued, the developing posture and position of the capsule robot are calculated, and the next iteration is performed using the developing posture and position, which comprises:
[0045] The current iteration frequency is determined, if the iteration frequency reaches a multiple of a preset value, the capsule robot is developed, the developing posture of the capsule robot is calculated, and the next iteration is performed using the developing posture and the position calculated in the last iteration, if the iteration frequency does not reach a multiple of a preset value, the position and posture information calculated in the last iteration is used for the next iteration.
[0046] In one application scenario, at the 5th, 10th, 15th,..., iteration, developing is performed and the developing posture is used to calculate the position and posture at the next time, and the position and posture at the next time is calculated using the posture calculated in the last iteration at other iteration times. Since the number of times of iteration of the posture is limited, the cumulative error is limited, the accuracy is improved, and the frequency of hardware mobilization is reduced.
[0047] In order to improve the magnetic control effect, reinforcement learning can be used for decision making.
[0048] In the embodiment of the present application, the reinforcement learning model is constructed, which comprises:
[0049] The shape information of the capsule robot, the position information of the mass center of the capsule robot, the position information of the internal permanent magnet, the spatial attribute information of the magnetic field sensor array in the magnetic control system, and the position and posture information of the capsule robot at the historical time are collected from the database, and are input into the reinforcement learning model to be trained as historical state information, to obtain magnetic control decision information;
[0050] The historical state information and the magnetic control decision information are input into a pre-established posture and reward value prediction model to obtain reward value information and evolved state information, and the evolved state information contains evolved posture information.
[0051] The posture change amount is calculated, the historical state information, the corresponding magnetic control decision information, the posture change amount and the reward value information are used to update the to-be-trained reinforcement learning model, and the training is completed through multiple iterations.
[0052] The shape information of the capsule robot is the external shape of the capsule robot, and affects the motion state of the capsule robot. The shape information can be obtained by three-dimensional modeling of the shape of each capsule robot.
[0053] The position information of the mass center of the capsule robot can be obtained by actual measurement. The position coordinates of the intersection of the three perpendicular lines in the capsule robot are calculated by hanging the mass center of the capsule robot at three different angles, that is, the mass center.
[0054] The position information of the internal permanent magnet can be obtained by design information or actual measurement.
[0055] The spatial attribute information of the magnetic field sensor array in the magnetic control system can be the length, width, sensor density and distance from the lesion of the magnetic field sensor array.
[0056] The historical time capsule robot position and attitude information can be obtained by multiple imaging in the historical treatment event.
[0057] The to-be-trained reinforcement learning model is updated to realize training, so as to have a decision-making ability meeting the reward requirement.
[0058] In the embodiment of the present specification, the to-be-trained reinforcement learning model has a to-be-trained action probability distribution function, and the probability distribution state of the action is adjusted through training.
[0059] The historical state information is input into the to-be-trained reinforcement learning model, and the magnetic control decision information is obtained according to the probability distribution state thereof.
[0060] For a specific probability distribution function, it refers to the functional relationship between the occurrence probability of actions, and the action refers to the magnetic control decision, which will not be described in detail here and can be set according to experience.
[0061] In the embodiment of the present specification, the pose and reward value prediction model is a deep neural network model architecture.
[0062] The pose and reward value prediction model training process can be that the pose information at the last time and the implemented magnetic control decision are used to construct training samples, the pose at the next time is collected, the reward value is calculated according to the implementation result of the magnetic control decision, the training label is set with the reward value and the pose at the next time, the deep neural network model architecture is trained in a supervised learning manner, and the pose and reward value prediction model is obtained, which is used to predict the pose and reward value at the next time for the existing iterated position, imaging attitude and decided magnetic control strategy.
[0063] The reward value is calculated according to the magnetic control decision implementation result, and the reward function with the reciprocal of time and the reciprocal of distance as independent variables can be constructed to calculate the reward value.
[0064] The attitude change amount can be a change direction and a change value of the inclination angle.
[0065] The movement path of the capsule robot affects the treatment efficiency, and therefore, in order to improve the scientificity of the movement path planning, the intracavity image can be collected, and the movement path is planned and continuously adjusted and optimized based on the intracavity image.
[0066] In the embodiment of the present specification, there is also an image acquisition module for acquiring the intracavity image.
[0067] The image processing module is configured to perform three-dimensional reconstruction according to the collected image to obtain the three-dimensional shape information of the cavity.
[0068] The relative position of the target point to the capsule robot can be calculated according to the real-time three-dimensional shape information of the cavity, and the movement path is adjusted.
[0069] Since the shape of the cavity changes, the position of the treatment target point also changes, and if the dynamic position of the target point is considered when planning the movement path of the capsule robot, the control accuracy of the capsule robot can be improved.
[0070] The three-dimensional reconstruction according to the collected image has been applied in the prior art, and the three-dimensional reconstruction can be performed by using the finite element method, which will not be described in detail here.
[0071] The dynamic change time sequence of the three-dimensional shape of the cavity in the future can also be predicted by using the changes of the three-dimensional shape information of the cavity at multiple time points, and the target position dynamic change time sequence is calculated according to the predicted dynamic change time sequence of the three-dimensional shape of the cavity in the future.
[0072] The movement path is planned according to the target position dynamic change time sequence and the movement speed of the capsule robot.
[0073] The changes of the three-dimensional shape information of the cavity at multiple time points can reflect the past change trend, and the future change state can be obtained by continuing according to the change trend.
[0074] In the embodiment of the present specification, the prediction of the dynamic change time sequence of the three-dimensional shape of the cavity in the future by using the changes of the three-dimensional shape information of the cavity at multiple time points comprises:
[0075] The amplitude change trend and the frequency change trend of the changes of the three-dimensional shape information of the cavity at multiple time points are calculated.
[0076] Calculate the future cavity deformation amplitude and frequency according to the amplitude variation trend and the frequency variation trend, and combine the current cavity three-dimensional morphology to carry out deformation simulation, and obtain the cavity three-dimensional morphology at multiple future moments.
[0077] The dynamic position of the target point makes the capsule robot not only move to the position of the target point, but also the time must be synchronized with the dynamic characteristics of the target point, so here not only the position calculation, but also the time dimension is contained, which can be solved by iterating according to the time period.
[0078] In the embodiment of the present application, the moving path is planned according to the dynamic change time sequence of the target point position and the moving speed of the capsule robot, comprising:
[0079] The relative position of the target point to the capsule robot is taken as the observation value, a dynamic environment space is constructed according to the current position of the capsule robot and the dynamic change time sequence of the target point position, an action space is constructed according to the moving direction, moving step and moving speed of the capsule robot, a plurality of particle groups are created in the action space, a reward function is constructed with the reciprocal of time and the reciprocal of distance as independent variables, the action strategy at each particle coordinate is determined, the observation value after the action strategy is applied to the environment space is calculated, and the iteration is continued until the observation value is 0, the sum of reward values is calculated for each iteration route with different particles as different iteration routes, the plurality of action strategies under the iteration route with the maximum sum of reward values are screened, and the moving path is determined according to the moving direction and moving step under the action strategy.
[0080] By screening the plurality of action strategies under the iteration route with the maximum sum of reward values, the optimal moving path can be obtained, and in the embodiment of the present application, the cavity is a peristaltic cavity.
[0081] The observation value of 0 indicates that the capsule robot reaches the target point.
[0082] By constructing a dynamic environment space, the reality that the cavity deforms rhythmically is taken into account.
[0083] The moving direction, moving step and moving speed of the capsule robot reflect the control target of the capsule robot, so they are used to construct the action space.
[0084] By creating a plurality of particle groups, each particle is a search iteration path, which is convenient for screening the optimal iteration path.
[0085] The reward function constructed with the reciprocal of time and the reciprocal of distance as independent variables is convenient for screening the moving path with the shortest moving time and moving distance, thereby improving the treatment efficiency.
[0086] The reward function taking the reciprocal of time and the reciprocal of distance as independent variables can be constructed, which can simulate the movement process of the capsule robot in real time according to the action policy, and calculate the relative position with the target point in real time.
[0087] The simulation process can take into account the initial speed, attitude, movement direction and movement step. The formula can be set in combination with Newton's second law of motion, and the resistance parameter can also be set in combination with the viscosity of the fluid in the cavity, thereby improving the simulation authenticity and accuracy. The specific calculation formula for simulating the movement of the object can be set according to experience, and the existing technology has been disclosed, which will not be described in detail here.
[0088] The above specific embodiments further illustrate the purpose, technical solutions and beneficial effects of the present application. It should be understood that the present application is not inherently related to any specific computer, virtual device or electronic device, and various general-purpose devices can also implement the present application. The above description is only for specific embodiments of the present application and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
[0089] Each embodiment in the specification is described in a progressive manner, and the same or similar parts between each embodiment can be referred to each other. Each embodiment focuses on the difference from other embodiments.
[0090] The above description is only for the embodiments of the present application and is not intended to limit the present application. For those skilled in the art, the present application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the scope of claims of the present application.
Claims
1. A capsule robot positioning and pose control system for a magnetic field sensor array, characterized by, Comprise: Capsule robot posture actual measurement module, capsule robot is developed mark, is respectively marked as first, second and third mark, after capsule robot enters workspace, capsule robot is developed, get the development image; The target recognition is carried out to the development image, the projection feature of first, second and third mark is identified, the first, second and third mark are point-like mark, the development posture of capsule robot is calculated according to the projection feature of first, second and third mark, comprising: The projection distance between first, second and third mark is calculated respectively, the inclination of first-second mark connection line and the inclination of first-third mark connection line are calculated according to the projection distance, and the development posture of capsule robot is recorded by the inclination of first-second mark connection line and the inclination of first-third mark connection line; Machine learning module, reinforcement learning model is constructed; The reinforcement learning model is constructed, comprising: Capsule robot shape information, capsule robot mass center position information, internal permanent magnet position information, magnetic field sensor array spatial attribute information in magnetic control system, capsule robot position and posture information at historical time are collected from database, which are input into the reinforcement learning model to be trained as historical state information, to obtain magnetic control decision information; The historical state information and the magnetic control decision information are input into the pre-established pose and reward value prediction model to obtain reward value information and evolved state information, wherein the evolved state information contains evolved pose information; Calculate the posture change, update the reinforcement learning model to be trained according to each historical state information, corresponding magnetic control decision information, posture change and reward value information, and complete training through multiple iterations; The magnetic control instruction is generated by using the reinforcement learning model, the position and posture of capsule robot moved to next time after implementing the magnetic control instruction are simulated and predicted by combining the development posture, and whether the position and posture of next time simulated and predicted are on the preset moving path is judged, if yes, the magnetic control instruction is implemented, and after implementation, the capsule robot is developed again, the development posture and position of capsule robot are calculated, the next iteration is carried out by using the development posture and position, and the reinforcement learning model is modified according to the deviation between development posture and simulation prediction result; Magnetic control system is used for implementing the magnetic control instruction, wherein the magnetic control system has a magnetic field sensor array.
2. The system of claim 1, wherein, The capsule robot is developed again, the development posture and position of capsule robot are calculated, and the next iteration is carried out by using the development posture and position, comprising: Determine the current iteration frequency, if the iteration frequency reaches the multiple of preset value, the capsule robot is developed, the development posture of capsule robot is calculated, and the next iteration is carried out by using the development posture and the position calculated by the last iteration, if the iteration frequency does not reach the multiple of preset value, the position and posture information calculated by the last iteration is used for next iteration.
3. The system of claim 1, wherein, Further have image acquisition module, acquire intracavity image. An image processing module is configured to perform three-dimensional reconstruction based on the collected images to obtain three-dimensional morphological information of the cavity, calculate the relative position of the target point to the capsule robot based on the real-time three-dimensional morphological information of the cavity, and adjust the moving path.
4. The system of claim 1, wherein, The pose and reward value prediction model is a deep neural network model architecture.
5. The system of claim 1, wherein, The working space is the intersection of the working space of the magnetic control system and the developing system.
6. The system of claim 3, wherein, The cavity is a peristaltic cavity.
7. The system of claim 1, wherein, The reinforcement learning model to be trained has a to-be-trained action probability distribution function, and the probability distribution state of the action is adjusted through training.
Citation Information
Patent Citations
Real-time positioning method and system of magnetic control suspension capsule robot and storage medium
CN115886692A
Wireless capsule endoscope positioning method and apparatus, and terminal equipment
CN112515611A