Device and method for calibrating and optimizing angle linearity of inductive sensor

By designing the MCU in an inductive sensor for signal calibration and gain processing, and combining the ATAN2 function and least squares method to fit the data, the problem of recalibration after replacing the sensor chip is solved, achieving high-precision angular signal output and reducing program transplantation costs.

CN119618290APending Publication Date: 2025-03-14WUHU GRAND VISION AUTO ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411730401.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

Existing inductive sensors modify the output by modifying the sensor chip registers, resulting in the need to be recalibrated after the chip is replaced, which increases the cost and time of program transplantation.

Method used

An inductive sensor calibration optimization angle linearity device is designed, and the SIN and COS signals are calibrated and gained by MCU, angle mapping is completed through the ATAN2 function, and the data is fitted using the least squares method to improve angle linearity.

Benefits of technology

The angular signal accuracy is improved without relying on a single sensor chip to process the output curve, reducing the cost and time of program transplantation, and the angular output linearity is better.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119618290A_ABST
    Figure CN119618290A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of angle sensors, in particular to an inductive sensor calibration optimization angle linearity device and a method thereof.The inductive sensor calibration optimization angle linearity device comprises an inductive sensor, the inductive sensor is provided with a lower shell and an upper cover which are mutually sealed, clamped and matched, and the lower shell is internally provided with a PCB; a PCB is arranged in the lower shell, an MCU, a sensor chip, a coil and a wiring end are integrated on the PCB, a positioning hole seat is integrally arranged on the lower shell, the positioning hole seat is matched with the PCB in a penetrating manner, and a copper-clad rotor is arranged above the PCB. The device and the method for calibrating and optimizing the angle linearity of the inductive sensor have the characteristics that the device does not completely depend on a single series of sensor chips any more, calibration can be quickly completed even if the sensor chips are replaced, and the device does not completely depend on a function part of a register corresponding to a single sensor chip any more; and the program transplantation cost is effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of angle sensors, and in particular to a device and method for calibrating and optimizing angle linearity of an inductive sensor. Background Art

[0002] Angle sensors are mainly used to measure the position, angle and direction of rotating parts such as shafts and motors. Angle sensors are needed in the fields of automobiles, construction machinery, etc. to sense angle changes.

[0003] At present, the main type of angle sensor is inductive sensor, which has higher accuracy and sensitivity than traditional angle sensors. Inductive angle sensor is mainly composed of transmitter coil, receiver coil and copper-clad rotor. After the sensor is powered, the magnetic field is changed by rotating the copper-clad rotor, so that the output voltage value changes, resulting in different output data. The sensor can calculate the current angle change value, the speed of the rotor rotation and the direction of rotation based on the change value.

[0004] Although inductive sensors have higher accuracy than traditional angle sensors, they have higher requirements on the coil production process. Different coils have different angle linearity outputs. It is not practical to completely rely on the high accuracy of the coil production process. Therefore, it is possible to consider completing the compensation and gain of the coil output data from the software level. Existing inductive sensors mainly calibrate the coil output data by writing the registers representing gain and offset of the corresponding sensor chip and correcting the sensor output.

[0005] However, this method of correcting the output by modifying the corresponding register of the corresponding sensor chip has the problem that after the sensor chip is replaced, it needs to be calibrated according to a new calibration method, which increases the cost and time of program transplantation. Summary of the invention

[0006] The purpose of the present invention is to provide an inductive sensor calibration and optimization angle linearity device and method thereof, so as to solve the problem proposed in the above background technology that the inductive sensors currently on the market correct the output by modifying the corresponding registers of the corresponding sensor chip. After the sensor chip is replaced, it is necessary to calibrate it according to a new calibration method, which increases the cost and time of program transplantation.

[0007] To achieve the above-mentioned purpose, the present invention provides the following technical solutions: an inductive sensor calibration and optimization angle linearity device, comprising an inductive sensor, the inductive sensor is provided with a lower shell and an upper cover body that are sealed and snap-fitted with each other, and a PCB board is provided in the lower shell, and an MCU, a sensor chip, a coil and a terminal are integrated on the PCB board, a positioning hole seat is integrally provided on the lower shell, and the positioning hole seat is penetrated and matched with the PCB board, and a copper-clad rotor is provided above the PCB board, and the coil includes a transmitter coil and a receiving coil.

[0008] Preferably, the PCB board is installed horizontally, and the copper-clad rotor is parallel to the PCB board, and the copper-clad rotor is concentric with the coil.

[0009] The present invention also provides a method for calibrating and optimizing the angular linearity of an inductive sensor, which is applied to the above-mentioned device for calibrating and optimizing the angular linearity of an inductive sensor, and the method is as follows:

[0010] The method steps for calibrating and optimizing the angle linearity of the inductive sensor are as follows: 1. The magnetic field of the coil changes; 2. Two signals, SIN and COS, are generated; 3. The sensor chip receives the signal and converts it into the MCU; 4. The MCU performs analog-to-digital conversion on the calibrated data through the ADC module, and converts the analog signal into a digital signal; 5. The MCU calibrates the acquired ADC values ​​of SIN and COS; 6. The ATAN2 function completes the mapping of the angle to the interval of (-π, π], and after adding π, it is mapped to the interval of (0, π]; 7. The MCU outputs the current rotor rotation angle, speed, and rotation direction through the built-in program.

[0011] Preferably, in step 2, the generated SIN and COS signals are respectively input into corresponding sensor chips on the PCB board.

[0012] Preferably, step 5 is performed when the SIN and COS amplitudes are different and the phase difference is not 90 degrees.

[0013] Preferably, in step 5, the MCU performs gain and adjustment on the data output by SIN and COS through a built-in program to achieve calibration of the ADC values ​​of SIN and COS.

[0014] Preferably, the MCU receives one cycle of SIN and COS data, processes a currently received segment of data, finds the maximum and minimum values ​​of SIN and COS respectively through built-in functions, calculates the difference between the maximum and minimum values ​​of the SIN and COS amplitude ranges respectively, compares the sizes of the amplitude ranges of the two, and completes gain processing of the SIN and COS output waveforms based on the comparison results, so that the amplitude ranges of the SIN and COS waveforms are the same.

[0015] Preferably, the MCU performs an average processing on the collected SIN and COS signal data to obtain the DC offset of the SIN and COS signals, and performs an offset processing on the SIN and COS so that the maximum value and the minimum value of the SIN and COS waveforms are equal.

[0016] Preferably, after the MCU completes the offset of the SIN and COS signals, the waveforms drawn by the ADC values ​​output by the SIN and COS satisfy the same amplitude and a phase difference of 90 degrees.

[0017] Preferably, each time the MCU receives a segment of data, it uses the least squares method to fit the segment of received data, and calculates the difference between the angle within the segment of the curve and the curve fitted by the least squares method based on the fitted curve. When the MCU outputs the angle, it adds or subtracts the error to make up for the error, thereby further improving the angle linearity.

[0018] Compared with the prior art, the present invention has the following beneficial effects:

[0019] 1. The inductive sensor calibration optimization angle linearity device and method are no longer completely dependent on a single series of sensor chips. Even if the sensor chip is replaced, the calibration can be completed quickly. It is no longer completely dependent on the functional part of the corresponding register of a single sensor chip, effectively reducing the cost of program transplantation.

[0020] 2. The device and method for calibrating and optimizing the angle linearity of an inductive sensor can effectively improve the accuracy of the output angle signal without completely relying on the processing of the output curve by the sensor chip.

[0021] 3. The device and method for calibrating and optimizing the angle linearity of an inductive sensor directly adjust the output signal of the sensor chip, and have the advantage of better angle output linearity.

[0022] 4. The device and method for calibrating and optimizing the angle linearity of an inductive sensor are better than sensors that rely on a single sensor chip in terms of software portability and transplantation cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 It is the calibration flow chart of sin and cos output waveform;

[0024] Figure 2 A side view of the internal structure of an inductive sensor of a device for calibrating and optimizing angle linearity of an inductive sensor according to the present invention.

[0025] In the figure: 1. inductive sensor; 2. lower shell; 3. positioning hole seat; 4. PCB board; 5. coil; 6. upper cover; 7. copper-clad rotor; 8. terminal. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0027] See also Figure 1-2 The present invention provides a technical solution: an inductive sensor calibration and optimization angle linearity device, comprising an inductive sensor 1, the inductive sensor 1 is provided with a lower shell 2 and an upper cover 6 that are sealed and snap-fitted with each other, and a PCB board 4 is provided in the lower shell 2, and an MCU, a sensor chip, a coil 5 and a terminal 8 are integrated on the PCB board 4, and the coil 5 includes a transmitter coil and a receiving coil. In this structure, when an alternating current passes through the transmitter coil, according to Faraday's law of electromagnetic induction, a magnetic field that changes with time will be generated around the coil, and this magnetic field will penetrate nearby magnetic conductive materials, such as the copper-clad rotor 7, to realize the rotation of the copper-clad rotor 7. The receiving coil is used to sense the change in the magnetic field generated by the transmitter coil. It is not directly connected to the power supply, but relies on the change in the magnetic field to generate an induced electromotive force. When the position of the copper-clad rotor 7 relative to the transmitter coil changes, it changes the magnetic flux passing through the receiving coil. According to Lenz's law, this change in magnetic flux will cause an induced current or voltage to be generated inside the receiving coil. A positioning hole seat 3 is integrally provided on the lower shell 2, and the positioning hole seat 3 is penetrated and matched with the PCB board 4, and a copper-clad rotor 7 is provided above the PCB board 4, and the PCB board 4 is installed horizontally, and the copper-clad rotor 7 is parallel to the PCB board 4, and the copper-clad rotor 7 and the coil 5 remain concentric. This structure can ensure the correctness and accuracy of the output data of the inductive sensor 1 to a certain extent by correctly assembling the inductive sensor 1. The steps of the inductive sensor calibration optimization angle linearity device and method are as follows: 1. The magnetic field of the coil changes; 2. Generate two signals, SIN and COS; 3. The sensor chip receives the signal and converts it into the MCU; 4. The MCU converts the calibrated data into analog-to-digital data through the ADC module, and converts the analog signal into a digital signal; 5. The MCU calibrates the acquired SIN and COS ADC values; 6. The ATAN2 function completes the angle mapping to the interval of (-π, π], and after adding π, it is mapped to (0, π]; 7. The MCU outputs the current rotor rotation angle, speed, and rotation direction through the built-in program.

[0028] In step 2, the generated SIN and COS signals are respectively input into the corresponding sensor chips on the PCB board (4). In this step, the SIN and COS signals can be processed respectively by the corresponding sensor chips.

[0029] Step 5 is performed when the amplitudes of SIN and COS are different and the phase difference is not 90 degrees. Since the main factors affecting the linearity of the angle output are the different amplitudes of SIN and COS and the phase difference is not 90 degrees, the MCU needs to process the data to meet the requirements of the angle linear output. In step 5, the MCU performs gain and adjustment on the data output by SIN and COS through the built-in program to calibrate the ADC values ​​of SIN and COS. The MCU receives the data of one cycle of SIN and COS, and processes the currently received data. The maximum and minimum values ​​of SIN and COS are found through the built-in function, and then the difference between the maximum and minimum values ​​of the amplitude range of SIN and COS is calculated respectively. The size of the amplitude range of the two is compared, and the gain processing of the SIN and COS output waveforms is completed according to the comparison results, so that the amplitude range of the SIN and COS waveforms is the same. MCU averages the collected SIN and COS signal data to obtain the DC offset of SIN and COS signals, and performs offset processing on SIN and COS so that the maximum and minimum values ​​of SIN and COS waveforms are equal. After MCU completes the offset of SIN and COS signals, the waveform drawn by the ADC values ​​output by SIN and COS meets the same amplitude and phase difference of 90 degrees. This step makes the linearity of the output angle initially meet the requirements of angle linearity. After receiving a section of data each time, MCU uses the least squares method to fit this section of received data. According to the fitted curve, the difference between the angle in this section of the curve and the curve fitted by the least squares method is calculated. When MCU outputs the angle, it adds or subtracts to make up for this error, further improving the angle linearity. This step uses the above idea to divide the output curve between 0 and 360 degrees into multiple sections, and each section is processed according to the above method. Finally, the accuracy of the output angle curve will be significantly improved. The finer the segmentation, the higher the accuracy. MCU calibrates the acquired SIN and COS ADC values.

[0030] Working principle: When using the inductive sensor calibration and optimization angle linearity device and method, first in the automobile steering system, the inductive sensor 1 is packaged and fixed to the PCB board 4 through the lower shell 2 and the upper cover 6, and the PCB board 4 is installed and positioned through the positioning hole seat 3 to ensure that the upper copper-clad rotor 7 is parallel to the PCB board 4 and is always concentric with the coil 5 position reserved for the PCB board 4 and maintains a certain height with it. The positioning hole seat 3 connects the inductive sensor 1 to the steering shaft. By correctly assembling the inductive sensor 1, the correctness and accuracy of the output data are guaranteed to a certain extent. The wiring harness connected to the terminal 8 connects the inductive sensor 1 to the power supply. When the inductive sensor 1 is started for detection, the magnetic field of the coil 5 changes, causing the copper-clad rotor 7 to start to rotate at a uniform speed, generating SIN and COS signals that are input into the corresponding sensor chip on the PCB board 4. After receiving the transmitted signal, the sensor chip converts it and finally inputs the output signal into the MCU. Since the processed data of the signal transmitted by the sensor chip to the coil 5 is input into the MCU, the output angle linearity cannot meet the accuracy requirement at this time. The main factors affecting the linearity of the angle output are the different amplitudes of SIN and COS and the phase difference is not 90 degrees. At this time, the MCU needs to process the data to meet the requirements of angle linear output. First, the MCU receives the data of one cycle of SIN and COS, processes the currently received data, finds the maximum and minimum values ​​of SIN and COS respectively, calculates the difference between the maximum and minimum values ​​of the SIN and COS amplitude ranges respectively, compares the amplitude ranges of the two, and completes the gain processing of the SIN and COS output waveforms according to the comparison results, so that the amplitude ranges of the SIN and COS waveforms are the same, and then offsets the SIN and COS so that the maximum and minimum values ​​of the SIN and COS waveforms are equal. After the offset is completed, the SIN and COS waveforms have the same amplitude and a phase difference of 90 degrees. At this point, the linearity of the output angle line preliminarily meets the requirements of angle linearity. Next, the angle linearity will be further improved. Each time a section of data is received, the least squares method is used to fit this section of received data. According to the fitted curve, the difference between the angle in this section of the curve and the curve fitted by the least squares method is calculated. When the MCU outputs the angle, it adds or subtracts to make up for the error. Using the above idea, the output curve between 0 and 360 degrees is divided into multiple sections. Each section is processed according to the above method. Finally, the accuracy of the output angle curve will be significantly improved. The finer the segmentation, the higher the accuracy, thereby completing a series of tasks.

[0031] Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments, or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A device for calibrating and optimizing the angular linearity of an inductive sensor, comprising an inductive sensor (1), characterized in that: The inductive sensor (1) is provided with a lower shell (2) and an upper cover (6) which are sealed and snap-fitted with each other, and a PCB board (4) is provided inside the lower shell (2), and the PCB board (4) is integrated with an MCU, a sensor chip, a coil (5) and a terminal (8), the lower shell (2) is integrally provided with a positioning hole seat (3), and the positioning hole seat (3) is penetrated and matched with the PCB board (4), and a copper-clad rotor (7) is provided above the PCB board (4), and the coil (5) includes a transmitter coil and a receiving coil.

2. The device for calibrating and optimizing angle linearity of an inductive sensor according to claim 1, characterized in that: The PCB board (4) is installed horizontally, and the copper-clad rotor (7) is parallel to the PCB board (4), and the copper-clad rotor (7) and the coil (5) are kept concentric.

3. The method for calibrating and optimizing the angular linearity of an inductive sensor calibration and optimization angular linearity device according to claim 1, characterized in that: The steps of the method for calibrating and optimizing the angle linearity of an inductive sensor are as follows:

1. The magnetic field of the coil changes; 2. Two signals, SIN and COS, are generated; 3. The sensor chip receives the signal, converts it, and inputs it into the MCU; 4. MCU converts the calibration data into digital signals through the ADC module; 5. MCU calibrates the acquired SIN and COS ADC values; 6. The ATAN2 function maps the angle to the interval (-π, π], and then maps it to the interval (0, π] after adding π; 7. MCU outputs the current rotor rotation angle, speed, and rotation direction through the built-in program.

4. The method for calibrating and optimizing the angle linearity of an inductive sensor according to claim 3, characterized in that: In the step 2, the generated SIN and COS signals are respectively input into corresponding sensor chips on the PCB board (4).

5. The method for calibrating and optimizing the angle linearity of an inductive sensor according to claim 3, characterized in that: The step 5 is performed when the amplitudes of SIN and COS are different and the phase difference is not 90 degrees.

6. The method for calibrating and optimizing the angle linearity of an inductive sensor according to claim 3, characterized in that: In the step 5, the MCU performs gain and adjustment on the data output by SIN and COS through the built-in program, thereby calibrating the ADC values ​​of SIN and COS.

7. The method for calibrating and optimizing the angle linearity of an inductive sensor according to claim 6, characterized in that: The MCU receives one cycle of SIN and COS data, processes a currently received segment of data, finds the maximum and minimum values ​​of SIN and COS respectively through built-in functions, calculates the difference between the maximum and minimum values ​​of the SIN and COS amplitude ranges respectively, compares the sizes of the amplitude ranges of the two, and completes the gain processing of the SIN and COS output waveforms according to the comparison results, so that the amplitude ranges of the SIN and COS waveforms are the same.

8. The method for calibrating and optimizing the angle linearity of an inductive sensor according to claim 7, characterized in that: The MCU performs an average processing on the collected SIN and COS signal data to obtain the DC offset of the SIN and COS signals, and performs an offset processing on the SIN and COS so that the maximum value and the minimum value of the SIN and COS waveforms are equal.

9. The method for calibrating and optimizing the angle linearity of an inductive sensor according to claim 8, characterized in that: After the MCU completes the offset of the SIN and COS signals, the waveforms drawn by the ADC values ​​output by the SIN and COS satisfy the same amplitude and a phase difference of 90 degrees.

10. The method for calibrating and optimizing the angle linearity of an inductive sensor according to claim 9, characterized in that: Each time the MCU receives a segment of data, it uses the least squares method to fit the segment of received data, and calculates the difference between the angle within the segment of the curve and the curve fitted by the least squares method based on the fitted curve. When the MCU outputs the angle, it adds or subtracts the error to make up for the error, thereby further improving the angle linearity.