A method and circuit for detecting a bilateral configuration magnetic field
By employing a bilateral magnetic field detection method and an improved PID controller, and using uniformly distributed Hall sensors to simultaneously detect axial and longitudinal magnetic field strength, the limitations of flexibility and anti-interference in existing magnetic field detection technologies are resolved, achieving high-precision and stable magnetic field detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TAIZHOU NOBO MEDICAL TECHNOLOGY CO LTD
- Filing Date
- 2026-05-14
- Publication Date
- 2026-06-26
AI Technical Summary
Existing magnetic field detection methods are difficult to comprehensively and accurately describe the magnetic field distribution in complex magnetic field environments, and lack flexibility and anti-interference ability, which affects the performance of high-precision control systems.
A bilateral magnetic field detection method is adopted, which uses uniformly distributed Hall sensors to simultaneously detect the axial and longitudinal magnetic field strengths, and controls them through an improved PID controller. The precise rotation angle and radial height are obtained by combining inverse Fourier calculation and trigonometric function calculation.
It enables stable and accurate detection in complex magnetic field environments, improves the flexibility and anti-interference capability of detection, and meets the needs of high-precision control systems.
Smart Images

Figure CN122283553A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of magnetic field detection technology, and in particular to a method and circuit for detecting a two-sided structured magnetic field. Background Technology
[0002] With the rapid development of modern electronic and electromagnetic technologies, magnetic fields are increasingly used in industrial control, medical equipment, precision instruments, and automation systems. For example, in fields such as motor control, non-destructive testing, magnetic navigation, and biomedical imaging, accurate measurement of magnetic field strength and its spatial distribution has become a key technology. However, existing magnetic field detection methods still have certain limitations in practical applications.
[0003] Currently, common magnetic field detection circuits mainly include single-sided detection, axial detection, and longitudinal detection. These detection methods typically measure magnetic fields in a specific direction or a single dimension. Their structural design is relatively simple and their implementation cost is low, but this also makes them significantly inadequate in complex magnetic field environments. For example, single-sided detection can only obtain magnetic field information for a local area and is difficult to reflect the overall magnetic field distribution; while axial or longitudinal detection can provide continuous data along a certain direction, it often cannot comprehensively and accurately describe the true state of the magnetic field in scenarios where the magnetic field changes in multidimensional space are complex.
[0004] Furthermore, the aforementioned detection methods have certain limitations in terms of flexibility. When detection requirements change (such as changes in measurement angle, spatial position, or magnetic field direction), traditional detection circuits often need structural adjustments or even redesign, making it difficult to meet the needs of multi-scenario applications. In terms of stability, single-direction detection methods are easily affected by external interference (such as temperature changes, electromagnetic noise, etc.), leading to deviations in measurement results and consequently affecting the overall system performance.
[0005] In applications requiring high control precision, such as high-precision servo control systems or precision medical equipment, errors in magnetic field detection directly affect the system's response speed and control accuracy. Therefore, the shortcomings of traditional detection circuits in terms of multi-dimensional sensing capabilities, anti-interference performance, and system stability are gradually becoming significant factors restricting their further application.
[0006] Based on the above problems, there is an urgent need for a new detection scheme with higher flexibility, stronger anti-interference ability and the ability to realize multi-dimensional magnetic field detection, so as to meet the higher requirements of modern high-precision control systems for magnetic field measurement. Summary of the Invention
[0007] Technical objective: To address the deficiencies in existing technologies, this invention discloses a method and circuit for detecting a bilaterally constructed magnetic field. It can simultaneously detect the axial and longitudinal magnetic field strengths, and uses a uniformly distributed Hall sensor to simultaneously detect the magnetic field strength at different angles, resulting in more stable and accurate detected values.
[0008] Technical solution: To achieve the above technical objectives, the present invention adopts the following technical solution.
[0009] A method for detecting a bilateral tectonic magnetic field includes the following steps: S1. Collect the detection values of a single Hall sensor used to detect the longitudinal magnetic field strength and an even number of Hall sensors used to detect the axial magnetic field strength. Preprocess the detection values of all Hall sensors to obtain several first processed value sequences. Among the even number of Hall sensors, each group of Hall sensors is set at a pair of poles of the suspension winding to realize the detection of the bilateral constructed magnetic field. The single Hall sensor used to detect the longitudinal magnetic field strength is set in the radial direction of the suspension winding to realize the detection of the longitudinal height. Step S2: Perform inverse Fourier transform calculation on each first processed value sequence to obtain the second processed value sequence; Step S3: For each data point in the second processed value sequence, calculate the rotation angle using the inverse cosine trigonometric function; calculate the radial height for each data point in the second processed value sequence using the inverse tanine trigonometric function; wherein, the real-time radial height is obtained from the data of a single Hall sensor used to detect the longitudinal magnetic field strength, and the real-time rotation angle and real-time radial height are obtained from the detection values of an even number of Hall sensors used to detect the axial magnetic field strength. Step S4: The real-time rotation angle and real-time radial height of the bilateral symmetry are controlled by the improved PID controller to quickly obtain the desired angle and desired radial height. The real-time radial height corresponding to the data of a single Hall sensor is used as the detected longitudinal height.
[0010] The present invention also discloses a circuit for detecting a bilateral constructed magnetic field, comprising: a detection circuit and a control circuit connected in sequence; the detection circuit includes a socket and a single Hall sensor connected to the socket for detecting the longitudinal magnetic field strength and an even number of Hall sensors for detecting the axial magnetic field strength; wherein, the output terminals of all Hall sensors are connected to the socket; the control circuit includes a microcontroller, a MOS driver, a MOS transistor, and a winding; wherein the microcontroller is used to receive the signal fed back by the detection circuit, generate a corresponding duty cycle value through the above-described method for detecting a bilateral constructed magnetic field, and transmit it to the MOS driver, which in turn drives the MOS transistor to further control the strength of the levitation winding, thereby achieving magnetic field adjustment.
[0011] Beneficial effects: 1. This invention realizes the detection of bilateral structural magnetic fields, and can detect magnetic fields with a wider range; specifically, this invention can simultaneously detect the axial and longitudinal magnetic field strength. By using a uniformly distributed Hall sensor, it can simultaneously detect the magnetic field strength at different angles, and the detected values are more stable and more accurate; at the same time, it has higher flexibility and stronger anti-interference ability. 2. In the circuit for detecting a bilateral structural magnetic field of the present invention, the filter capacitor in the circuit can reduce the detection error and provide a more accurate measurement of the magnetic field strength; at the same time, the circuit meets the requirements of high precision, high stability and wide detection range for magnetic field detection, and is a circuit that can truly detect a bilateral structural magnetic field. Attached Figure Description
[0012] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a circuit block diagram of the present invention; Figure 3 This is a schematic diagram of the detection circuit according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the PCB layout of the detection circuit according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the Hall detection results according to an embodiment of the present invention; Figure 6 This is a schematic diagram of a three-pole suspension winding according to an embodiment of the present invention; Figure 7 This is a schematic diagram of the levitation force according to an embodiment of the present invention. Detailed Implementation
[0013] The following description, in conjunction with the accompanying drawings, further illustrates and explains a method and circuit for detecting a bilateral structural magnetic field according to the present invention.
[0014] As attached Figure 1 As shown, a method for detecting a bilateral tectonic magnetic field includes the following steps: Step S1: Collect the detection values of a single Hall sensor for detecting the longitudinal magnetic field strength and an even number of Hall sensors for detecting the axial magnetic field strength. Preprocess the detection values of all Hall sensors to obtain several first processed value sequences. In the even number of Hall sensors, each group of Hall sensors is positioned at a pair of poles of the suspension winding to achieve bilateral construction of the magnetic field detection. The single Hall sensor for detecting the longitudinal magnetic field strength is positioned radially on the suspension winding to achieve longitudinal height detection. The preprocessing includes: performing Kalman filtering on the collected detection values to obtain signal values. Since the collected values may contain too much noise, the data is first subjected to Fourier decomposition to obtain multiple harmonic parameters. The more noise, the more harmonics. In this scheme, only the fundamental frequency is assigned as the first processed value. In some embodiments of this invention, the number of Hall sensors used to detect the axial magnetic field strength is 6.
[0015] Step S2: For each first processed value sequence, perform inverse Fourier transform to obtain the second processed value sequence; the calculation formula is: , in, This refers to the k-th data point in the second processed value sequence, which is a time-domain sequence Y. , This is the nth data point in the first processed value sequence, which is a frequency domain sequence. N is the number of points in the first processed value sequence, and j represents an imaginary number.
[0016] Step S3: Calculate the rotation angle for each data point in the second processed value sequence using the inverse cosine trigonometric function; calculate the radial height for each data point in the second processed value sequence using the inverse tanine trigonometric function; wherein, the real-time radial height is obtained from the data of a single Hall sensor used to detect the longitudinal magnetic field strength, and the real-time rotation angle and real-time radial height are obtained from the detection values of an even number of Hall sensors used to detect the axial magnetic field strength; the calculation formulas for the rotation angle and radial height are as follows: , , Where Y represents the data in the second processed value sequence. As an intermediate quantity, The rotation angle is the corresponding position of the rotor. k is the radial height proportionality coefficient; h is the radial height. Because each group of Hall sensors in this invention is positioned at a pair of poles in the suspension winding to detect the bilaterally constructed magnetic field, when calculating the radial height h, one set of data is always symmetrical, but the radial heights calculated from adjacent Hall sensors are inconsistent. This invention, by detecting the bilaterally constructed magnetic field, achieves faster stator stability control and reduces oscillations caused by unilateral pull-pull.
[0017] Step S4: The real-time rotation angle and real-time radial height of the bilateral symmetry are controlled by the improved PID controller to quickly obtain the desired angle and desired radial height. The real-time radial height corresponding to the data of a single Hall sensor is used as the detected longitudinal height.
[0018] The improved PID controller uses step-wise proportional, integral, and derivative values to control the real-time rotation angle and real-time radial height. In this embodiment, the real-time rotation angle and real-time radial height are controlled in three stages, and corresponding proportional, integral, and derivative control coefficients are set for each stage to achieve PID control.
[0019] As attached Figure 2 As shown, this invention also discloses a circuit for detecting a bilateral constructed magnetic field, comprising: a detection circuit and a control circuit connected in sequence; the detection circuit includes a socket and a single Hall sensor connected to the socket for detecting the longitudinal magnetic field strength, and an even number of Hall sensors for detecting the axial magnetic field strength; wherein, the output terminals of all Hall sensors are connected to the socket. Among the even number of Hall sensors for detecting the axial magnetic field strength, each Hall sensor corresponds to a filter capacitor, the positive terminal of which is connected to pin 1 of the Hall sensor, and the negative terminal is connected to the common ground terminal GND. The control circuit includes a microcontroller, a MOS driver, a MOS transistor, and a winding; wherein the microcontroller receives the signal fed back from the detection circuit, generates a corresponding duty cycle value using any of the methods described above for detecting a bilateral constructed magnetic field, and transmits it to the MOS driver, which then drives the MOS transistor to further control the strength of the levitation winding, thereby adjusting the magnetic field.
[0020] The circuit of this invention can simultaneously detect axial and longitudinal magnetic field strength, and by using uniformly distributed Hall sensors, it can simultaneously detect magnetic field strength at different angles, resulting in more stable and accurate detected values.
[0021] Example: As attached Figure 3 and attached Figure 4As shown, in this embodiment, the detection circuit includes a socket and a single Hall sensor connected to the socket for detecting the longitudinal magnetic field strength, and six Hall sensors for detecting the axial magnetic field strength. The output terminals of all Hall sensors are connected to the socket. The six Hall sensors for detecting the axial magnetic field strength are evenly distributed and arranged in a circle. The detection circuit of the present invention can not only detect the magnitude of the magnetic field on both sides, but also calculate the strength of the magnetic field at each point through multiple detection values to ensure that the levitation force generated by the winding achieves the expected effect.
[0022] Circuit diagram as follows Figure 3 As shown, power supply filter capacitors C6 and C4 are connected to the power supply VCC at one end and to ground GND at the other end; U1, U2, U3, U4, U5, and U6 are Hall sensors used to detect axial magnetic field strength, pin 2 is the output pin, pin 1 is connected to the power supply VCC, and pin 4 is connected to the common ground GND; C1 is the filter capacitor for Hall sensor U1, with its positive terminal connected to pin 1 of Hall sensor U1 and its negative terminal connected to the common ground GND; C7 is the filter capacitor for Hall sensor U2, with its positive terminal connected to pin 1 of Hall sensor U2 and its negative terminal connected to the common ground GND. C8 is the filter capacitor for Hall sensor U3, with its positive terminal connected to pin 1 of Hall sensor U3 and its negative terminal connected to the common ground GND; C9 is the filter capacitor for Hall sensor U4, with its positive terminal connected to pin 1 of Hall sensor U4 and its negative terminal connected to the common ground GND; C10 is the filter capacitor for Hall sensor U5, with its positive terminal connected to pin 1 of Hall sensor U5 and its negative terminal connected to the common ground GND; C11 is the filter capacitor for Hall sensor U6, with its positive terminal connected to pin 1 of Hall sensor U6 and its negative terminal connected to the common ground GND; Hall sensor U7 is used to detect the longitudinal magnetic field strength. Figure 4 The 5U connector has pin 1 connected to the power supply VCC, pin 4 connected to the common ground GND, and pin 2 as the output pin. The FPC-24-1_0MMZ-Z is a socket that brings out the outputs of Hall sensors U1~U7 for measurement and reading. Two pins are connected to VCC for power supply (i.e., connected to the positive terminal of the power supply), and the other end is the common ground GND. The detection circuit of this invention mainly comprises two parts: the first part is a symmetrical Hall sensor that detects the axial magnetic field strength; the second part is a separate Hall sensor that detects the longitudinal magnetic field strength. This detection circuit can detect magnetic field strength in a double-sided configuration. The circuit is placed on a PCB board, with six Hall sensor chips on the front side, each spaced at a 60° angle. These Hall sensors detect the horizontal magnetic field strength, i.e., the axial magnetic field strength. The Hall sensor chips on the back of the PCB board detect the vertical magnetic field strength, i.e., the longitudinal magnetic field strength. Figure 5As shown, six Hall sensors can detect the magnetic field on both sides. Each time a detection is performed, the magnitude of the magnetic field in six directions can be obtained, which can determine the magnitude and direction of the magnetic field more quickly, accurately, stably, and over a wider range.
[0023] The Hall sensor used in the circuit is a programmable linear Hall effect current sensor IC, which is a chip that achieves high accuracy and high resolution without sacrificing bandwidth. Its operating temperature range reaches -40℃ to 150℃, which can perfectly meet the accuracy and operating environment requirements of this circuit.
[0024] The steps and requirements for generating a magnetic field are as follows: Perform Fourier decomposition on the sinusoidal magnetomotive force of the permanent magnet to determine the number of pole pairs generated by the permanent magnet in the air gap of the motor. A stationary magnetic field, the magnetic field generated by a permanent magnet passes through a field with a pole pair number of After modulation by the modulation block, a pole pair number of is generated in the air gap. and The rotating magnetic field, in which The extreme logarithm is The rotational speed of the magnetic field is: , The number of extreme pairs is The rotational speed of the magnetic field is: , in, ω represents the mechanical angular velocity of the rotor modulation block.
[0025] The suspension winding is wound according to the conditions for the generation of levitation force. Taking k=1, the number of pole pairs of the rotating magnetic field in the air gap is... Therefore, the suspension winding is wound into... opposite pole or Opposite pole.
[0026] When the number of pole pairs of the rotating magnetic field in the air gap is satisfy At that time, the suspension winding is wound into Pole pairs; when the number of pole pairs of the rotating magnetic field in the air gap is satisfy At that time, the suspension winding is wound into Pole pairs; when the number of pole pairs of the rotating magnetic field in the air gap is Not satisfied At that time, the suspension winding is wound into opposite pole or .
[0027] When the levitation winding is wound with 5 pole pairs, the motor will generate a levitation force with large pulsations, and will not produce a stable levitation force. When the levitation winding is wound with 3 pole pairs, the motor will produce a more stable levitation force. Figure 6 As shown, the levitation force of the motor at this time is as follows: Figure 7 As shown, the motor's levitation force pulsation is relatively small at this time, and the motor generates a stable levitation force.
[0028] This invention increases the number of Hall sensors and improves the detection range by changing the included angle of the axial Hall sensors. When n Hall sensors are placed in the circuit (since the circuit is designed with symmetrical Hall sensors, n is an even number, such as 2, 4, 6, 8, 10, 12...), the included angle between each Hall sensor is 360° / n. When the number of Hall sensors is increased to 8, the included angle of each Hall sensor is reduced to 45°; when the number of Hall sensors is increased to 12, the included angle of each Hall sensor is reduced to 30°.
[0029] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for detecting a bilateral tectonic magnetic field, characterized in that, Includes the following steps: S1. Collect the detection values of a single Hall sensor used to detect the longitudinal magnetic field strength and an even number of Hall sensors used to detect the axial magnetic field strength. Preprocess the detection values of all Hall sensors to obtain several first processed value sequences. Among the even number of Hall sensors, each group of Hall sensors is set at a pair of poles of the suspension winding to realize the detection of the bilateral constructed magnetic field. The single Hall sensor used to detect the longitudinal magnetic field strength is set in the radial direction of the suspension winding to realize the detection of the longitudinal height. Step S2: Perform inverse Fourier transform calculation on each first processed value sequence to obtain the second processed value sequence; Step S3: For each data point in the second processed value sequence, calculate the rotation angle using the inverse cosine trigonometric function; calculate the radial height for each data point in the second processed value sequence using the inverse tanine trigonometric function; wherein, the real-time radial height is obtained from the data of a single Hall sensor used to detect the longitudinal magnetic field strength, and the real-time rotation angle and real-time radial height are obtained from the detection values of an even number of Hall sensors used to detect the axial magnetic field strength. Step S4: The real-time rotation angle and real-time radial height of the bilateral symmetry are controlled by the improved PID controller to quickly obtain the desired angle and desired radial height. The real-time radial height corresponding to the data of a single Hall sensor is used as the detected longitudinal height.
2. The method for detecting a bilateral structural magnetic field according to claim 1, characterized in that: An even number of Hall sensors, used to detect the axial magnetic field strength, are evenly distributed and arranged in a circle.
3. The method for detecting a bilateral structural magnetic field according to claim 1, characterized in that: The preprocessing process includes: performing Kalman filtering on the collected detection values to obtain signal values, performing Fourier decomposition on the signal values to obtain multiple harmonic parameters, and taking the fundamental frequency as the first processed value.
4. The method for detecting a bilateral structural magnetic field according to claim 1, characterized in that: The calculation formula for the second processed value sequence includes: , in, For the k-th data in the second processed value sequence, , This is the nth data point in the first processed value sequence. N is the number of points in the first processed value sequence, and j represents an imaginary number.
5. The method for detecting a bilateral structural magnetic field according to claim 1, characterized in that: The formulas for calculating the angle include: , Where Y represents the data in the second processed value sequence. As an intermediate quantity, This represents the rotation angle at the corresponding position of the rotor.
6. The method for detecting a bilateral structural magnetic field according to claim 1, characterized in that: Formula for calculating radial height include: , Where Y is the data in the second processed value sequence, k is the radial height scaling factor, and h is the radial height.
7. A circuit for detecting a bilateral constructed magnetic field, characterized in that, include: A detection circuit and a control circuit are connected in sequence. The detection circuit includes a socket and a single Hall sensor connected to the socket for detecting the longitudinal magnetic field strength, and an even number of Hall sensors for detecting the axial magnetic field strength. The output terminals of all Hall sensors are connected to the socket. The control circuit includes a microcontroller, a MOS driver, a MOS transistor, and a winding. The microcontroller receives the signal fed back from the detection circuit, generates a corresponding duty cycle value using the method for detecting a bilateral constructed magnetic field as described in any one of claims 1-6, and transmits it to the MOS driver. The MOS driver then drives the MOS transistor to further control the strength of the levitation winding, thereby adjusting the magnetic field.
8. The circuit for detecting a bilateral constructed magnetic field according to claim 7, characterized in that: The Hall sensor is a programmable linear Hall effect current sensor IC.
9. The circuit for detecting a bilateral constructed magnetic field according to claim 7, characterized in that: In the even number of Hall sensors used to detect the axial magnetic field strength, each Hall sensor corresponds to a filter capacitor. The positive terminal of the filter capacitor is connected to pin 1 of the Hall sensor, and the negative terminal is connected to the common ground terminal GND.