Wireless capsule positioning device, magnetic field sensor positioning method and device
By obtaining the alternating magnetic field signal to calculate the position and posture of the magnetic field sensor, the problem of inaccurate positioning of the wireless capsule endoscope in the body is solved, and precise capsule positioning and control are achieved.
Patent Information
- Application Number
- CN202210336187.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-01
- Publication Date
- 2025-10-14
- Estimated Expiration
- 2042-04-01
AI Technical Summary
During the in vivo positioning process of wireless capsule endoscopes, the positioning results are not accurate enough due to signal source state measurement errors and signal transmission delays, which affects the subsequent capsule position control and photo shooting.
By acquiring alternating magnetic field signals under multiple magnetic source environments with different frequencies, the position and attitude of the magnetic field sensor are calculated, and the rotation matrix is used to correct the theoretical magnetic field amplitude algorithm. Combined with the inertial navigation algorithm, the positioning accuracy is improved and the signal source state measurement error and delay impact are reduced.
The precise positioning of the wireless capsule is achieved, reducing the impact of signal source state measurement errors and transmission delays, and ensuring the accuracy of subsequent control and shooting.
Smart Images

Figure CN114469057B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to wireless capsule positioning technology, and in particular to a wireless capsule positioning device, a magnetic field sensor positioning method and a device. Background Art
[0002] In-vivo device positioning technologies, such as wireless capsule endoscopes and invasive medical devices, are gaining increasing attention. While internal magnetic sources have limited applications, external magnetic sources offer greater potential. In this scenario, a capsule containing a magnetic field sensor is placed inside the human body, while a magnetic source is externally positioned to locate the capsule.
[0003] During the positioning process, it is necessary to obtain the real-time position and orientation of the magnetic source and to correlate the signal source status with the measurement data of the device being positioned. However, due to errors in signal source status measurement and signal transmission delays, the accuracy of the positioning results can be affected, resulting in inaccurate detection results.
[0004] If the magnetic field sensor cannot be accurately positioned, it will have a series of impacts on the subsequent control of the capsule position and the taking of in-vivo photos. Summary of the Invention
[0005] In order to solve the problem of inaccurate measurement caused by signal delay in the prior art, the purpose of the present invention is to provide a wireless capsule positioning device, a magnetic field sensor positioning method and a device.
[0006] To achieve the above-mentioned object, an embodiment of the present invention provides a magnetic field sensor positioning method, characterized in that it includes the following steps:
[0007] Acquire alternating magnetic field signals under multiple magnetic source environments with different frequencies;
[0008] Calculating the measured magnetic field amplitudes of each magnetic source in several directions in space according to the alternating magnetic field signal;
[0009] According to the correspondence between the local coordinate system and the world coordinate system, the theoretical amplitude algorithm of the magnetic source is corrected into theoretical magnetic field amplitude algorithm information in the local coordinate system, wherein the local coordinate system is the coordinate system where the magnetic field sensor is located, the world coordinate system is the coordinate system where the magnetic source is located, and the theoretical magnetic field amplitude algorithm information includes variable parameters for calibrating the position and / or posture of the magnetic field sensor;
[0010] The values of the variable parameters of the position and / or posture of the magnetic field sensor are calculated according to the measured magnetic field amplitude and the theoretical magnetic field amplitude algorithm information.
[0011] As a further improvement of the present invention, the acquiring of alternating magnetic field signals under multiple magnetic source environments with different frequencies includes:
[0012] Acquire alternating magnetic field signals under at least two magnetic source environments with different frequencies.
[0013] As a further improvement of the present invention, the acquiring of alternating magnetic field signals under multiple magnetic source environments with different frequencies includes:
[0014] An alternating magnetic field signal is obtained in an environment where the frequencies of at least two magnetic sources are in a multiple relationship.
[0015] As a further improvement of the present invention, the magnetic source is a permanent magnet, the permanent magnet performs rotational motion, and the rotational speeds of at least two of the permanent magnets are in a multiple relationship.
[0016] As a further improvement of the present invention, the alternating magnetic field signal includes spatial coordinate information of each magnetic source in the world coordinate system, and magnetic field vector information in several coordinate axis directions.
[0017] As a further improvement of the present invention, the method of correcting the theoretical amplitude algorithm of the magnetic source to the theoretical magnetic field amplitude algorithm information in the local coordinate system includes:
[0018] Introducing a rotation matrix R into the theoretical amplitude algorithm, and replacing the field point coordinates in the theoretical amplitude algorithm with relative position information between the magnetic field sensor and the nth magnetic source, wherein the rotation matrix R is a rotation matrix from the world coordinate system to the local coordinate system;
[0019] The theoretical magnetic field amplitude algorithm information includes a calculation formula for the theoretical amplitude of each magnetic source in the X, Y, and Z axis directions in the local coordinate system, and the calculation formula includes variable parameters for calibrating the position and / or posture of the magnetic field sensor.
[0020] As a further improvement of the present invention, the step of calculating the value of the variable parameter of the position and / or posture of the magnetic field sensor includes:
[0021] A calculation model is established based on the measured magnetic field amplitude and the theoretical magnetic field amplitude algorithm information. The calculation model is:
[0022] ,
[0023] in, is the theoretical magnetic field amplitude of the magnetic source, is the measured magnetic field amplitude of the magnetic source, n represents the corresponding n-th magnetic source, i represents the X, Y, and Z axes of the local coordinate system, is the coordinate vector of the magnetic field sensor , R is the rotation matrix including the attitude parameters of the magnetic field sensor.
[0024] As a further improvement of the present invention, when there are multiple solutions for the coordinate vector and / or the posture parameter, the present invention further includes the steps of:
[0025] Through the inertial navigation algorithm, the predicted solution at the next moment is calculated based on the solution at the previous moment;
[0026] Compare the predicted solution with the actual measured value at the next moment and calculate the difference;
[0027] The predicted solution whose difference is smaller than the preset difference is set as the correct solution.
[0028] To achieve one of the above-mentioned objectives, an embodiment of the present invention provides a magnetic field sensor positioning device, comprising:
[0029] A magnetic field acquisition module is used to acquire alternating magnetic field signals under multiple magnetic source environments with different frequencies;
[0030] A measurement amplitude calculation module is used to calculate the measurement magnetic field amplitude of each magnetic source in several directions in space based on the alternating magnetic field signal;
[0031] a theoretical amplitude calculation module, configured to correct the theoretical amplitude algorithm of the magnetic source into theoretical magnetic field amplitude algorithm information in the local coordinate system based on a correspondence between the local coordinate system and the world coordinate system, wherein the local coordinate system is the coordinate system where the magnetic field sensor is located, the world coordinate system is the coordinate system where the magnetic source is located, and the theoretical magnetic field amplitude algorithm information includes variable parameters for calibrating the position and / or posture of the magnetic field sensor;
[0032] A comparison module is used to calculate the value of the variable parameter of the position and / or posture of the magnetic field sensor according to the measured magnetic field amplitude and the theoretical magnetic field amplitude algorithm information.
[0033] To achieve one of the above-mentioned objects of the invention, an embodiment of the present invention provides a wireless capsule positioning device, comprising: the magnetic field sensor positioning device as described above, wherein the magnetic field sensor is located inside the wireless capsule.
[0034] To achieve one of the above-mentioned objectives, an embodiment of the present invention provides an electronic device, including:
[0035] a storage module storing a computer program;
[0036] The processing module can implement the steps in the above-mentioned magnetic field sensor positioning method when executing the computer program.
[0037] To achieve the above-mentioned one of the purposes of the application, an embodiment of the application provides a readable storage medium which stores a computer program, the computer program can realize the steps in the magnetic field sensor positioning method when executed by a processing module.
[0038] Compared with the prior art, the application has the following beneficial effects: the amplitude of the measured magnetic field is determined by the alternating magnetic field signal, the theoretical calculation method of the amplitude of the magnetic field is determined according to the actual scene of the magnetic source and the magnetic field sensor, the theoretical calculation method is made to be consistent with the measured amplitude of the magnetic field as much as possible, and then the information of the actual position and / or attitude of the magnetic field sensor is determined. The method does not need to measure the state of the signal source in real time, that is, the state of the signal source and the measured value of the magnetic field sensor do not need to be corresponded in time, thereby reducing the influence caused by the measurement error of the state of the signal source and the signal transmission delay, making the positioning result of the magnetic field sensor more accurate, and thereby facilitating the accurate control of the wireless capsule subsequently. BRIEF DESCRIPTION OF DRAWINGS
[0039] Figure 1 is a flowchart of the magnetic field sensor positioning method of an embodiment of the application;
[0040] Figure 2 is a structural schematic diagram of a wireless capsule positioning device of an embodiment of the application;
[0041] Figure 3 is a model schematic diagram of the positioning of a magnetic field sensor by two permanent magnets of an embodiment of the application;
[0042] Figure 4 is a model schematic diagram of the positioning of a magnetic field sensor by one permanent magnet of an embodiment of the application;
[0043] Figure 5 is a model schematic diagram of the positioning of a magnetic field sensor by three permanent magnets of an embodiment of the application;
[0044] Figure 6 is a structural block diagram of a magnetic field sensor positioning device of an embodiment of the application;
[0045] Figure 7 is a module schematic diagram of a wireless capsule positioning device of an embodiment of the application;
[0046] Among them, 1000, wireless capsule positioning device; 100, magnetic field sensor positioning device; 200, wireless capsule; 300, examination surface; 400, human body; 10, magnetic field generation module; 11, permanent magnet; 20, signal transmission module; 30, storage module; 40, processing module; 50, magnetic field sensor; 60, acceleration sensor; 70, signal transmission module; 80, camera module; 90, communication bus. DETAILED DESCRIPTION
[0047] The present invention will be described in detail below with reference to the specific embodiments shown in the accompanying drawings. However, these embodiments do not limit the present invention, and any structural, methodological, or functional changes made by those skilled in the art based on these embodiments are all within the scope of protection of the present invention.
[0048] One embodiment of the present invention provides a wireless capsule positioning device and a magnetic field sensor positioning method and apparatus. The wireless capsule positioning device is a device used in the human body, such as a wireless capsule endoscope or invasive medical device, to locate the position of a wireless capsule within the body. This method and apparatus improves the accuracy of magnetic field sensor positioning results, facilitating subsequent precise control of the wireless capsule.
[0049] The wireless capsule positioning device 1000 of this embodiment includes a wireless capsule 200 and a magnetic field sensor positioning device 100 for positioning the wireless capsule 200. The wireless capsule 200 is internally equipped with a sensor module, which includes a magnetic field sensor 50 (mag sensor), such as a Hall sensor, a magnetoresistive sensor (AMR, GMR, TMR), etc., for detecting a magnetic field. The magnetic field sensor positioning device 100 includes a magnetic field generating module 10 for emitting a magnetic field. The magnetic field sensor 50 is used to measure the magnetic induction intensity of the time-varying magnetic field generated by the magnetic field generating module 10. Since the magnetic field sensor 50 is installed in the wireless capsule 200, the positioning of the magnetic field sensor 50 in the present invention refers to the positioning of the wireless capsule 200.
[0050] Figure 1 A magnetic field sensor positioning method according to one embodiment of the present application is provided. Figure 2 This is a structural diagram of a wireless capsule positioning device 1000 according to an embodiment of the present application. A magnetic field sensor 50 for collecting magnetic field information is provided in the wireless capsule 200. The wireless capsule 200 is located inside a human body 400. The human body 400 lies flat on an inspection surface 300. A magnetic field generating module 10 surrounds the outside of the human body 400. The magnetic field sensor 50 detects the magnetic field emitted by the magnetic field generating module 10. The magnetic field generating module 10 can be set as a permanent magnet 11. During inspection, at least two permanent magnets 11 are provided, and the axes of the permanent magnets 11 can be parallel to each other, making the subsequent establishment and decoupling of the coordinate system more convenient.
[0051] Although the present application provides method operation steps as described in the following embodiments or flowcharts, based on routine or no creative work, in the steps of the method where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided in the embodiments of the present application.
[0052] The specific magnetic field sensor positioning method includes the following steps:
[0053] Step 101: Acquire alternating magnetic field signals under multiple magnetic source environments with different frequencies.
[0054] The alternating magnetic field signal includes the spatial coordinate information of each magnetic source in the world coordinate system, as well as magnetic field vector information along several coordinate axes. The world coordinate system is the coordinate system in which the magnetic source resides, while the local coordinate system, referred to below, is the coordinate system in which the magnetic field sensor resides. The spatial coordinate information of the magnetic source can be measured externally through various means, while the magnetic field vector information can be obtained using the magnetic field sensor 50 described above.
[0055] Multiple magnetic source environments with different frequencies refer to the environment in which multiple magnetic field emission sources are set to generate alternating magnetic fields with different frequencies. The magnetic field emission sources can be permanent magnets 11 rotating at different frequencies, electromagnetic coils conducting currents of varying frequencies, permanent magnets 11 vibrating at different frequencies, or a combination of permanent magnets 11 and electromagnetic coils. Figures 3 to 5 For example, the permanent magnets 11 rotating at different frequencies are used as sources of magnetic fields at different frequencies.
[0056] In step 101, alternating magnetic field signals can be obtained from at least two magnetic source environments with different frequencies. The positioning of the magnetic field sensor 50 includes its location and posture. Position and posture can include more than three parameters. Therefore, at least two different frequencies can be used to simultaneously generate six equations for calculation, thereby solving multiple unknown parameters. This embodiment will be primarily described using the case of two magnetic sources. Of course, the greater the number of magnetic sources emitting different frequencies, the more equations that can be generated simultaneously, leading to a more accurate solution.
[0057] The rotational speeds of at least two permanent magnets 11 may be in a multiple relationship, so that an alternating magnetic field signal can be obtained in an environment where the frequencies of at least two magnetic sources are in a multiple relationship, and calculation is made more convenient and faster through Fourier series decomposition.
[0058] When the rotation speed of each permanent magnet 11 is not equal to the fundamental frequency ( ), the magnetic field components can also be separated by bandpass filtering. For example, the passband frequency range of the first bandpass filter is , , the passband frequency range of the second bandpass filter is , , , and so on. The following uses a permanent magnet that rotates exponentially as an example to perform calculations using Fourier series decomposition.
[0059] The spatial coordinate information of each magnetic source in the world coordinate system is marked as , where n corresponds to the magnetic source, such as the permanent magnet n=1 marked as 1, and the magnetic field vector information is marked as , the permanent magnet n=2 is marked as 2, and the magnetic field vector information is marked as .
[0060] The magnetic field vector information can be the value collected multiple times within a period of time, and the magnetic field vector at each moment is , the superscript S is the representation in the local coordinate system, the superscript c represents the measured value, and the subscripts x, y, and z are the x-axis, y-axis, and z-axis in the local coordinate system respectively. Sampling is performed within the T time period. (N≥1, take an integer), it can be measured Row data, Indicates the row number of the data, from small to large, it indicates the order of measurement time. All magnetic field vector information can be written as in the form of a matrix.
[0061] Step 102: Calculate the measured magnetic field amplitudes of each magnetic source in several directions in space based on the alternating magnetic field signal;
[0062] It should be noted that some letters are used in the present invention to refer to some parameters, such as magnetic field information B, amplitude A, rotation matrix R, field point , and some letters are bolded to indicate that these parameters are matrices, such as the rotation matrix R. If the absolute value symbol is added to the parameter, such as the distance from the field point to the origin , then the distance is a scalar and is a field point If it refers to the component of the amplitude in a certain direction, for example 、 、 , refers to the components of the magnetic field amplitude on the x-axis, y-axis, and z-axis.
[0063] In the positioning method of the present invention, the position of the magnetic field sensor 50 can be determined by detecting the actual value of the magnetic field emitted by the magnetic field generating module 10 and comparing it with the theoretical value. When obtaining the actual value of the magnetic field, it also includes the background magnetic field. The background magnetic field can include the earth's magnetic field and the magnetic field of the magnetron device. These magnetic fields generally change very slowly. By rotating the permanent magnet 11 of this embodiment at a relatively high speed, the magnetic field generated by the permanent magnet 11 can be separated, and the influence of the background magnetic field can be eliminated in the calculation.
[0064] In several directions in space, the amplitude of the magnetic field of each magnetic source in the X, Y, and Z axis directions in the local coordinate system can be calculated. The calculation formula of the amplitude is:
[0065]
[0066] in:
[0067]
[0068] Substitute the magnetic field vector information above into the matrix of , when n is 2, respectively solve the values of , , , , , .
[0069] Step 103: According to the correspondence between the local coordinate system and the world coordinate system, the theoretical amplitude algorithm of the magnetic source is corrected to the theoretical magnetic field amplitude algorithm information in the local coordinate system, wherein the local coordinate system is the coordinate system where the magnetic field sensor is located, the world coordinate system is the coordinate system where the magnetic source is located, and the theoretical magnetic field amplitude algorithm information includes variable parameters for calibrating the position and / or attitude of the magnetic field sensor;
[0070] Specifically, a rotation matrix R is introduced in the theoretical amplitude algorithm, and the field point coordinates in the theoretical amplitude algorithm are replaced by the relative position information between the magnetic field sensor and the nth magnetic source, wherein the rotation matrix R is the rotation matrix from the world coordinate system to the local coordinate system;
[0071] The theoretical magnetic field amplitude algorithm information includes a calculation formula of the theoretical amplitude of each magnetic source in the X, Y and Z axis directions of the local coordinate system, and the calculation formula includes variable parameters for calibrating the position and / or attitude of the magnetic field sensor.
[0072] Different types of magnetic sources can correspond to different theoretical amplitude algorithms, for example, the above-mentioned different frequency rotating permanent magnets 11, the electromagnetic coils conducting different frequency varying currents, the permanent magnets 11 shaking at different frequencies, or the combination of permanent magnets 11 and electromagnetic coils, all of which can have different theoretical amplitude algorithms. Hereinafter, the different frequency rotating permanent magnets are taken as examples for illustration, and it should be noted that other formulas corresponding to other forms of magnetic source algorithms do not affect the operation of the method of the present application, and the position and / or attitude can also be calculated.
[0073] The theoretical amplitude algorithm of the different frequency rotating permanent magnet is corrected to the theoretical magnetic field amplitude algorithm information in the local coordinate system as follows:
[0074] (Formula 1),
[0075] wherein R is the rotation matrix from the world coordinate system to the local coordinate system, is the element of the first column of the i-th row of the rotation matrix R, is the element in the ith row and second column of the rotation matrix R, Represents the i-th row of the rotation matrix R, which is a matrix including the Euler angles (yaw, pitch, and roll). and Field points Parameters in, amplitude Can be expressed as 、 、 ,in Corresponding to the first row of the rotation matrix R, Corresponding to the second row of the rotation matrix R, Corresponding to the 3rd row of the rotation matrix R.
[0076] For ease of understanding, we will first take a permanent magnet as an example to explain. Figure 4 As shown, if the local coordinate system is parallel to the world coordinate system, the amplitude can be expressed as:
[0077]
[0078] (Formula 2)
[0079]
[0080] At this time, the permanent magnet 11 rotates around the Z axis at the origin (0,0,0), where , , is the magnetic permeability of the medium, M is the dipole strength, is the distance from the field point to the origin.
[0081] The magnitude of the visible amplitude is only related to the distance from the field point to the origin. and the dipole strength M, but has nothing to do with the rotation angular velocity and time of the permanent magnet 11.
[0082] To adjust the magnetic field sensor's posture, which is not parallel to the world coordinate system after rotation in space, we introduce the rotation matrix R. This is the rotation matrix from the world coordinate system to the local coordinate system. It contains three unknowns: the Euler angles (yaw, pitch, and roll). With the introduction of rotation matrix R, the amplitude formula (2) can be expressed as formula (1). Furthermore, when R = I, formulas (1) and (2) are equivalent, where I is a standard 3×3 matrix.
[0083] It can be seen that in formula 1, the magnitude of the amplitude is still only related to the distance from the field point to the origin. And the dipole strength M is related to the rotation angular velocity of the permanent magnet 11 and time, etc. Therefore, the embodiment can obtain more accurate results by comparing the theoretical value and the measured value, and the accuracy of the algorithm for reversing the position and posture of the magnetic field sensor 50 is not dependent on the time delay.
[0084] Then the field point in formula 1 is replaced by , wherein is the relative position information of the magnetic field sensor and the nth magnetic source, is the coordinate position of the capsule magnetic field sensor in the world coordinate system, and is the quantity to be solved, is the coordinate position of the nth magnetic source in the world coordinate system, and is a known quantity in the above alternating magnetic field signal. That is, the variable parameters for calibrating the position of the magnetic field sensor are the Euler angles (yaw, pitch, roll) of the rotation matrix R, and the variable parameters of the posture of the magnetic field sensor are the Euler angles (yaw, pitch, roll) of the rotation matrix R.
[0085] In this way, the formula for solving the amplitude includes the parameters of the position of the magnetic field sensor 50 in the world coordinate system and the parameters of the posture of the magnetic field sensor 50 R, so that the specific values of the parameters of the position and the posture can be solved.
[0086] In addition, the sensor module can also include an acceleration sensor 60 (gsensor) and / or an inertial sensor (IMU), such as a 3-axis acceleration sensor 60 (gsensor) and a 6-axis IMU (gsensor+gyroscope), for measuring the pitch angle and roll angle of the sensor module in a static state. The 3-axis acceleration sensor 60 or the 6-axis inertial sensor can further simplify the positioning problem of the system and improve the positioning accuracy. The acceleration and angular velocity information of the 6-axis IMU can also be used for inertial navigation and fusion of magnetic positioning, which can improve the smoothness of positioning.
[0087] The description of the embodiment mainly uses devices configured as a 3-axis magnetic field sensor 50 and a 3-axis acceleration sensor 60. The size range of the two sensors is: width 1-3 mm, height 0.5-2 mm, and sampling rate 10-1000 Hz.
[0088] Because the acceleration sensor 60 is included, the pitch angle pitch and the roll angle roll of the device in a static state can be obtained, and there are only four unknowns in formula one: and the heading angle yaw, which simplifies the calculation process. In addition, solving the pitch angle pitch and the roll angle roll of the device according to the acceleration information belongs to a known algorithm.
[0089] Step 104: Calculate the values of variable parameters of the position and / or posture of the magnetic field sensor 50 according to the measured magnetic field amplitude and the theoretical magnetic field amplitude algorithm information.
[0090] A calculation model is established based on the measured magnetic field amplitude and the theoretical magnetic field amplitude algorithm information. The calculation model is:
[0091] (Formula 3),
[0092] in, is the theoretical magnetic field amplitude of the magnetic source, is the measured magnetic field amplitude of the magnetic source, n represents the corresponding magnetic source, i is the X, Y, and Z axes of the local coordinate system, is the vector of the coordinates of the magnetic field sensor 50 in the world coordinate system , R is the rotation matrix including the attitude parameters of the magnetic field sensor.
[0093] In addition, the rotation matrix R is the aforementioned matrix including the Euler angles (yaw, pitch, and roll). The above formula 3 includes 6 unknowns. With two magnetic sources, 6 formulas can be listed for solution. If there are 3 magnetic sources, 9 formulas can be listed, which is more convenient to solve. Similarly, the more magnetic sources there are, the easier it is to solve the unknowns.
[0094] Furthermore, according to the above, the pitch angle and the roll angle can also be obtained by the acceleration sensor 60, so the six unknowns become four unknowns, and Formula 3 can be changed to:
[0095] (Formula 4),
[0096] Wherein, yaw is the heading angle of the magnetic field sensor 50 , and the solution method of Formula 4 may adopt an algorithm such as Levenberg-Marquardt.
[0097] When two permanent magnets 11 are used, such as Figure 3 As shown, 6 formulas can be combined to solve 4 unknowns. In addition, the above-mentioned solution method for N=2 has a certain symmetry in solving yaw. In fact, the system with N=2 cannot guarantee a unique solution, and there will be a limited number of solutions (the number of solutions is greater than 1 but limited). For a device containing a 3-axis magnetic field sensor 50 and a 3-axis acceleration sensor 60, such as Figure 5 As shown, N≥3 rotating permanent magnets 11 can be used for positioning to obtain a unique solution.
[0098] Specifically, when two permanent magnets 11 are used, multiple solutions for the heading angle and spatial coordinates may occur. An inertial navigation algorithm can be used to calculate a predicted solution for the next moment based on the solution at the previous moment. The predicted solution is then compared with the measured value at the next moment, and the predicted solution whose difference is less than a preset difference is considered the correct solution. Specifically, it is assumed that based on the position, acceleration, and angular velocity information at moments t-1, t-2, ..., the approximate position at moment t can be inferred. Assuming the heading angle at moment t-1 is yaw and yaw+π, two significantly different results will be produced. By comparing this with the actual positioning result at moment t, the heading angle yaw at moment t-1 can be determined.
[0099] This embodiment determines the measured magnetic field amplitude through an alternating magnetic field signal, determines a theoretical calculation method for the magnetic field amplitude based on the actual scenario of these magnetic sources and the magnetic field sensor 50, and then makes the theoretical calculation method as consistent as possible with the measured magnetic field amplitude, and then determines the actual position and / or posture information of the magnetic field sensor 50. This method does not require real-time measurement of the state of the signal source, that is, there is no need to time-match the signal source state with the measurement value of the magnetic field sensor 50, thereby reducing the impact of signal source state measurement errors and signal transmission delays, making the positioning result of the magnetic field sensor 50 more accurate, thereby facilitating subsequent accurate control of the wireless capsule 200.
[0100] In one embodiment, a magnetic field sensor positioning device 100 is provided, such as Figure 6 The magnetic field sensor positioning device 100 can be integrated into the above-mentioned wireless capsule positioning device 1000 or server, and can be a computer, a device with computing processing capabilities, a workstation, etc., and can specifically include a magnetic field acquisition module, a measurement amplitude calculation module, a theoretical amplitude calculation module, and a comparison module. The specific functions of each module are as follows:
[0101] A magnetic field acquisition module is used to acquire alternating magnetic field signals under multiple magnetic source environments with different frequencies. The magnetic field acquisition module can be a data acquisition interface in the form of hardware for the magnetic field sensor positioning device 100, or it can be a software module in the form of software for acquiring alternating magnetic field signals. The alternating magnetic field signals include the spatial coordinate information of each magnetic source in the world coordinate system, and the magnetic field vector information in the directions of several coordinate axes. The spatial coordinate information of the magnetic source can be measured in the outside world through various means, and the magnetic field vector information can be acquired through the magnetic field sensor 50 mentioned above.
[0102] A measurement amplitude calculation module is used to calculate the measurement magnetic field amplitude of each magnetic source in several directions in space based on the alternating magnetic field signal;
[0103] a theoretical amplitude calculation module, configured to correct a theoretical amplitude algorithm of a magnetic source to theoretical magnetic field amplitude algorithm information in a local coordinate system according to a correspondence between the local coordinate system and a world coordinate system, wherein the local coordinate system is a coordinate system in which the magnetic field sensor is located, the world coordinate system is a coordinate system in which the magnetic source is located, and the theoretical magnetic field amplitude algorithm information includes variable parameters for calibrating a position and / or an attitude of the magnetic field sensor;
[0104] a comparison module, configured to calculate a value of a variable parameter of the position and / or the attitude of the magnetic field sensor 50 according to the measured magnetic field amplitude and the theoretical magnetic field amplitude algorithm information.
[0105] In one embodiment, the magnetic field acquisition module is configured to acquire alternating magnetic field signals in an environment of at least two magnetic sources with different frequencies.
[0106] In one embodiment, the magnetic field acquisition module is configured to acquire alternating magnetic field signals in an environment of at least two magnetic sources with frequencies in a multiple relationship.
[0107] In one embodiment, the magnetic field sensor positioning device 100 further includes a magnetic source, which is a permanent magnet 11, the permanent magnet 11 rotates, and the rotation speeds of the at least two permanent magnets 11 are in a multiple relationship.
[0108] In one embodiment, the alternating magnetic field signals acquired by the magnetic field acquisition module include spatial coordinate information of each magnetic source in the world coordinate system and magnetic field vector information in a plurality of coordinate axis directions.
[0109] In one embodiment, the measured amplitude calculation module is configured to calculate amplitudes of magnetic fields in X, Y and Z axis directions of each magnetic source in the local coordinate system.
[0110] In one embodiment, the theoretical amplitude calculation module introduces a rotation matrix R in the theoretical amplitude algorithm, and replaces a field point coordinate in the theoretical amplitude algorithm with relative position information between the magnetic field sensor and an nth magnetic source, wherein the rotation matrix R is a rotation matrix from the world coordinate system to the local coordinate system.
[0111] The theoretical magnetic field amplitude algorithm information includes calculation formulas of theoretical amplitudes of each magnetic source in X, Y and Z axis directions in the local coordinate system, and the calculation formulas include variable parameters for calibrating the position and / or the attitude of the magnetic field sensor.
[0112] In one embodiment, the comparison module is configured to establish a calculation model according to the measured magnetic field amplitude and the theoretical magnetic field amplitude algorithm information.
[0113] In one embodiment, the comparison module is further configured to, when there are multiple solutions for the heading angle and the spatial coordinates, calculate a predicted solution for the next time according to the solution for the last time by the inertial navigation algorithm, and compare the predicted solution with the measured value for the next time, and the predicted solution with a difference less than a preset difference is the correct solution.
[0114] The magnetic field sensor positioning device 100 can be a part of a wireless capsule positioning device 1000, a desktop computer, a notebook, a palm computer, a cloud server, and other computing devices. The magnetic field sensor positioning device 100 can include, but is not limited to, a processing module 40, a storage module 30. Those skilled in the art can understand that the schematic diagram is only an example of the magnetic field sensor positioning device 100, and does not constitute a limitation on the terminal device of the magnetic field sensor positioning device 100, and can include more or fewer components than the diagram, or combine certain components, or different components, for example, the magnetic field sensor positioning device 100 can also include input / output devices, network access devices, buses, etc.
[0115] It should be noted that details not disclosed in the magnetic field sensor positioning device 100 of the embodiments of the present application are referred to the details disclosed in the magnetic field sensor positioning method of the embodiments of the present application.
[0116] According to the magnetic field sensor positioning device 100 of the present application, the magnetic field acquisition module detects the alternating magnetic field signal, the measurement amplitude calculation module determines the measurement magnetic field amplitude, the theoretical amplitude calculation module determines the calculation method of the variable parameter of the position and / or attitude of the magnetic field sensor 50, and then the comparison module makes the theoretical calculation method as consistent as possible with the measurement magnetic field amplitude, and then determines the information of the actual position and / or attitude of the magnetic field sensor 50. The magnetic field sensor positioning device 100 does not need to measure the state of the signal source in real time, i.e. does not need to correspond the state of the signal source with the measurement value of the magnetic field sensor 50 in time, thereby reducing the influence caused by the measurement error of the signal source state and the signal transmission delay, etc., making the positioning result of the magnetic field sensor 50 more accurate, thereby facilitating the accurate control of the wireless capsule 200 subsequently.
[0117] As Figure 7FIG2 is a schematic diagram of a wireless capsule positioning device 1000 provided by an embodiment of the present invention. The wireless capsule positioning device 1000 of this embodiment includes the magnetic field sensor positioning device 100 described above, and the wireless capsule positioning device 1000 further includes the wireless capsule 200 and the magnetic field generating module 10 described above, the magnetic field sensor 50 located inside the wireless capsule 200, the processing module 40, the storage module 30, and a computer program stored in the storage module 30 and executable on the processing module 40, such as the magnetic field sensor 50 positioning method program described above. When the processing module 40 executes the computer program, the steps in each of the magnetic field sensor 50 positioning method embodiments described above are implemented, such as Figure 1 Steps shown.
[0118] The magnetic field generating module 10 includes multiple magnetic sources that generate alternating magnetic fields of varying frequencies. These sources include at least two permanent magnets 11 and a drive component that rotates these permanent magnets 11. These permanent magnets 11 are relatively fixed, separated by a predetermined distance, and each rotates around a specific axis and its own center of mass. Each permanent magnet 11 is driven by a separate motor, or through a gear transmission, achieving a stable speed ratio by controlling the gear radius ratio. The speed can be adjusted, for example, from 60 to 6000 rpm, depending on the positioning frequency requirements and the complexity of the positioning environment.
[0119] The permanent magnet 11 can rotate at a constant speed, and the rotation speed of each permanent magnet is different to generate different magnetic field signals. Each permanent magnet rotates around the same axis, and the same axis is one of the X, Y, and Z axes. The X, Y, and Z axes are three reference axes in the three-dimensional coordinate system established to determine the position of the wireless capsule 200, which facilitates positioning coordinates and decoupling.
[0120] The rotational speeds of each permanent magnet 11 are multiples of each other. For example, when multiple permanent magnets 11 are selected in the measurement system, their rotational speeds are 2 or 3 times the rotational speed of each other. Using three rotating permanent magnets 11 with multiple rotational speeds, in conjunction with the magnetic field sensor 50 and the acceleration sensor 60, positioning can be achieved. This eliminates the need for phase correlation between the transmitter and receiver, and allows the permanent magnets 11 to be compact and provide a strong signal.
[0121] Furthermore, the magnet-containing wireless capsule 200 will vibrate in an alternating magnetic field. This vibration frequency is comparable to the signal frequency, thus affecting the measurement accuracy of the positioning signal. Increasing the signal frequency to 40 Hz or above can reduce the interference caused by this vibration. If one magnetic source rotates at 40 Hz, the other two magnetic sources can rotate at 80 Hz or 120 Hz, and the sampling rate can be selected from 480 Hz, 720 Hz, 960 Hz, etc., to ensure complete signal acquisition.
[0122] The components of the magnetic induction intensity measured by the magnetic field sensor 50 vary sinusoidally over time. Since the wireless capsule positioning device 1000 does not monitor the real-time orientation of the magnetic source, there is no need to confirm the phase information of the magnetic field. Moreover, since the amplitude of the magnetic field waveform is fixed, the amplitude of the waveform is only related to the coordinates of the magnetic field sensor 50 (i.e., the coordinates of the wireless capsule 200), the magnetic moment intensity (dipole intensity), and the posture of the sensor module, and is unrelated to the rotational angular velocity of the permanent magnet 11, time, etc.
[0123] The wireless capsule positioning device 1000 may further include a signal transmission module 20 and a communication bus 90. The signal transmission module 20 is used to transmit the data detected by the sensor module to the processing module 40 or a server, and may transmit data via a wireless connection, such as Bluetooth, Wi-Fi, ZigBee, etc. The communication bus 90 is used to establish a connection between the magnetic field generating module 10, the signal transmission module 20, the processing module 40, and the storage module 30. The communication bus 90 may include a path to transmit information between the magnetic field generating module 10, the signal transmission module 20, the processing module 40, and the storage module 30.
[0124] Wireless Capsule 200 Figure 7 As shown, it may include a magnetic field sensor 50, an acceleration sensor 60, a signal transmission module and a camera module 80. As described above, the magnetic field sensor 50 and the acceleration sensor 60 transmit information to the external processing module 40 or server through the signal transmission module 70. After the external world drives the wireless capsule 200 to move to a specified position, the camera module 80 takes a picture of the inside of the human body 400 and transmits it to the outside world through the signal transmission module 70, thereby completing the shooting of the body.
[0125] In addition, the present invention also proposes an electronic device, which includes a storage module 30 and a processing module 40. When the processing module 40 executes the computer program, it can implement the steps in the above-mentioned magnetic field sensor 50 positioning method, that is, implement the steps in any one of the technical solutions in the above-mentioned magnetic field sensor 50 positioning method.
[0126] The electronic device may be a part integrated into the wireless capsule positioning device 1000 , or a local terminal device, or a part of a cloud server.
[0127] The processing module 40 can be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processing module 40 is the control center of the wireless capsule positioning device 1000, connecting various components of the entire wireless capsule positioning device 1000 using various interfaces and circuits.
[0128] The storage module 30 can be used to store the computer programs and / or modules. The processing module 40 implements the various functions of the wireless capsule positioning device 1000 by running or executing the computer programs and / or modules stored in the storage module 30 and accessing the data stored in the storage module 30. The memory may primarily include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function (such as a sound playback function or an image playback function); the data storage area may store data generated based on the use of the mobile phone, such as audio data and a phone book. Furthermore, the memory may include high-speed random access memory (RAM) and non-volatile memory, such as a hard disk, internal memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state storage device.
[0129] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the storage module 30 and executed by the processing module 40 to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program in the wireless capsule positioning device 1000.
[0130] Further, an embodiment of the present application provides a readable storage medium, which stores a computer program, and the computer program can realize the steps in the positioning method of the magnetic field sensor 50 when executed by the processing module 40, that is, realize the steps in any one of the technical solutions in the positioning method of the magnetic field sensor 50.
[0131] The modules integrated in the magnetic field sensor positioning apparatus 100 can be stored in a computer readable storage medium if realized in the form of software function units and sold or used as independent products. Based on such understanding, all or part of the processes in the above-mentioned embodiments can also be completed by a computer program instructing related hardware, and the computer program can be stored in a computer readable storage medium and can realize the steps in the above-mentioned various method embodiments when executed by a processor.
[0132] The computer program includes computer program code, which can be in the form of source code, object code, executable files or some intermediate forms. The computer readable medium can include any entity or device capable of carrying the computer program code, recording medium, CD-ROM, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the computer readable medium can include or exclude contents according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
[0133] It should be understood that although the present specification is described in terms of embodiments, not every embodiment contains only one independent technical solution, and the description of the specification is only for the sake of clarity, and those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can be combined appropriately to form other embodiments that can be understood by those skilled in the art.
[0134] The above series of detailed descriptions are only specific descriptions of feasible embodiments of the present application, and are not intended to limit the protection scope of the present application, and any equivalent embodiments or changes made without departing from the spirit of the present application should be included in the protection scope of the present application.
Claims
1. A magnetic field sensor positioning method, characterized in that: In an environment where multiple permanent magnets rotate at uniform speeds of different frequencies, the method includes the following steps: Acquire multiple alternating magnetic field signals, wherein the alternating magnetic field signals include spatial coordinate information of each permanent magnet in a world coordinate system and magnetic field vector information acquired multiple times over a period of time, wherein the world coordinate system is the coordinate system where the permanent magnet is located; Calculating, based on the magnetic field vector information, the measured magnetic field amplitude of each permanent magnet in a plurality of directions in space in an environment of the plurality of permanent magnets; According to the correspondence between the local coordinate system and the world coordinate system, the theoretical amplitude algorithm of the permanent magnet is corrected to the theoretical magnetic field amplitude algorithm information in the local coordinate system, wherein the local coordinate system is the coordinate system where the magnetic field sensor is located, and the theoretical magnetic field amplitude algorithm information includes a calculation formula for the theoretical amplitude of the magnetic field emitted by each permanent magnet in several directions in the local coordinate system that can be detected at the magnetic field sensor position under the environment of the multiple permanent magnets, and the calculation formula includes the spatial coordinate information of each permanent magnet and the variable parameters used to calibrate the position and posture of the magnetic field sensor. The theoretical magnetic field amplitude algorithm information is , and the field points Replace with ,in, , , is the magnetic permeability of the medium, M is the dipole strength, is the distance from the field point to the origin, R is the rotation matrix from the world coordinate system to the local coordinate system, is the element in the ith row and first column of the rotation matrix R, is the element in the ith row and second column of the rotation matrix R, represents the i-th row of the rotation matrix R, and Field points Parameters in, amplitude Respectively expressed as 、 、 , Corresponding to the first row of the rotation matrix R, Corresponding to the second row of the rotation matrix R, Corresponding to the 3rd row of the rotation matrix R, is the relative position information between the magnetic field sensor and the nth permanent magnet, is the coordinate position of the magnetic field sensor in the world coordinate system, is the spatial coordinate information of the nth permanent magnet in the world coordinate system; The values of the variable parameters of the position and / or posture of the magnetic field sensor are calculated according to the measured magnetic field amplitude and the theoretical magnetic field amplitude algorithm information.
2. The magnetic field sensor positioning method according to claim 1, characterized in that: The rotational speeds of at least two of the permanent magnets are in a multiple relationship.
3. The magnetic field sensor positioning method according to claim 1, characterized in that: Calculating the measured magnetic field amplitudes of each permanent magnet in a plurality of directions in space includes: Calculate the magnitude of the magnetic field of each permanent magnet in the X, Y, and Z axis directions in the local coordinate system.
4. The magnetic field sensor positioning method according to claim 1, characterized in that: The method of correcting the theoretical amplitude algorithm of the permanent magnet to the theoretical magnetic field amplitude algorithm information in the local coordinate system includes: A rotation matrix R is introduced into the theoretical amplitude algorithm, and the field point coordinates in the theoretical amplitude algorithm are replaced with the relative position information of the magnetic field sensor and the nth permanent magnet, wherein the rotation matrix R is the rotation matrix from the world coordinate system to the local coordinate system. The theoretical magnetic field amplitude algorithm information includes the calculation formula of the theoretical amplitude of each permanent magnet in the X, Y, and Z axis directions in the local coordinate system.
5. The magnetic field sensor positioning method according to claim 1, characterized in that: in, The step of calculating the value of the variable parameter of the position and / or attitude of the magnetic field sensor comprises: A calculation model is established based on the measured magnetic field amplitude and the theoretical magnetic field amplitude algorithm information. The calculation model is: , in, is the theoretical magnetic field amplitude of the permanent magnet, is the measured magnetic field amplitude of the permanent magnet, n represents the corresponding n-th permanent magnet, i represents the X, Y, and Z axes of the local coordinate system, is the coordinate vector of the magnetic field sensor , R is the rotation matrix including the attitude parameters of the magnetic field sensor.
6. The magnetic field sensor positioning method according to claim 5, characterized in that: When there are multiple solutions for the coordinate vector and / or the posture parameter, the method further includes the following steps: Through the inertial navigation algorithm, the predicted solution at the next moment is calculated based on the solution at the previous moment; Compare the predicted solution with the actual measured value at the next moment and calculate the difference; The predicted solution whose difference is smaller than the preset difference is set as the correct solution.
7. A magnetic field sensor positioning device, characterized in that: include: A magnetic field acquisition module, configured to acquire multiple alternating magnetic field signals in an environment where multiple permanent magnets rotate at different frequencies, wherein the alternating magnetic field signals include the spatial coordinate information of each permanent magnet in a world coordinate system, and magnetic field vector information acquired multiple times over a period of time. The world coordinate system is the coordinate system in which the permanent magnets are located. A measurement amplitude calculation module is used to calculate the measurement magnetic field amplitude of each permanent magnet in several directions in space based on the alternating magnetic field signal; The theoretical amplitude calculation module is used to correct the theoretical amplitude algorithm of the permanent magnet into the theoretical magnetic field amplitude algorithm information in the local coordinate system according to the correspondence between the local coordinate system and the world coordinate system, wherein the local coordinate system is the coordinate system where the magnetic field sensor is located, and the theoretical magnetic field amplitude algorithm information includes a calculation formula for the theoretical amplitude of the magnetic field in several directions emitted by each permanent magnet in the local coordinate system that can be detected at the magnetic field sensor position under the environment of the multiple permanent magnets. The calculation formula includes the spatial coordinate information of each permanent magnet and the variable parameters used to calibrate the position and posture of the magnetic field sensor. The theoretical magnetic field amplitude algorithm information is , and the field points Replace with ,in, , , is the magnetic permeability of the medium, M is the dipole strength, is the distance from the field point to the origin, R is the rotation matrix from the world coordinate system to the local coordinate system, is the element in the ith row and first column of the rotation matrix R, is the element in the ith row and second column of the rotation matrix R, represents the i-th row of the rotation matrix R, and Field points Parameters in, amplitude Respectively expressed as 、 、 , Corresponding to the first row of the rotation matrix R, Corresponding to the second row of the rotation matrix R, Corresponding to the 3rd row of the rotation matrix R, is the relative position information between the magnetic field sensor and the nth permanent magnet, is the coordinate position of the magnetic field sensor in the world coordinate system, is the spatial coordinate information of the nth permanent magnet in the world coordinate system; A comparison module is used to calculate the value of the variable parameter of the position and / or posture of the magnetic field sensor according to the measured magnetic field amplitude and the theoretical magnetic field amplitude algorithm information.
8. A wireless capsule positioning device, characterized in that: include: The magnetic field sensor positioning device according to claim 7, wherein the magnetic field sensor is located inside the wireless capsule.
9. An electronic device, characterized in that: include: a storage module storing a computer program; The processing module can implement the steps of the magnetic field sensor positioning method according to any one of claims 1 to 6 when executing the computer program.
10. A readable storage medium storing a computer program, characterized in that: When the computer program is executed by the processing module, the steps of the magnetic field sensor positioning method according to any one of claims 1 to 6 can be implemented.
Citation Information
Patent Citations
A positioning system and a positioning method for a three-dimensional position and a three-dimensional attitude of a wireless capsule endoscope
CN106983487A
Swalkable equipment positioning system and method
CN112842320A