A method and apparatus for testing a pwm output angle sensor

By building a test platform and controlling motor rotation, recording signal parameters, and calculating the sensor's duty cycle and linearity, the accuracy and efficiency issues of PWM output angle sensor testing were resolved, and equipment costs were reduced.

CN120970578BActive Publication Date: 2026-07-24HUNAN AEROSPACE MAGNET & MAGNETO
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUNAN AEROSPACE MAGNET & MAGNETO
Filing Date
2025-07-23
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing technologies cannot accurately and efficiently test PWM output angle sensors, and suffer from oscilloscope error interference and high cost of high-precision equipment.

Method used

By building a test platform, the sensor duty cycle was reduced to 0 by rotating a motor. The signal generator parameters were recorded, the threshold for the number of rotations was set, the average and difference of the duty cycle were recorded, the linearity and the maximum absolute value were calculated, and the sensor performance was evaluated.

Benefits of technology

It enables accurate and efficient testing of PWM output angle sensors, improving testing accuracy and efficiency while reducing equipment costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120970578B_ABST
    Figure CN120970578B_ABST
Patent Text Reader

Abstract

The application discloses a PWM output angle sensor testing method, comprising the following steps: building a testing platform, obtaining the output value of the measured sensor, and calculating the duty cycle according to the output value of the measured sensor; making the duty cycle of the measured sensor 0 through motor rotation, recording and configuring the parameters of the signal generator; setting a rotation frequency threshold N, controlling the motor to drive the measured sensor to rotate synchronously at a time interval T and a rotation speed V, recording the average value of the duty cycle of the measured sensor within the time interval T and the difference between the maximum value and the minimum value of the duty cycle, and obtaining the average value of the duty cycle and the difference between the maximum value and the minimum value of the duty cycle of N points of the measured sensor; calculating the linearity according to the average value of the duty cycle of N points of the measured sensor, and evaluating the performance of the measured sensor according to the linearity and the maximum value of the absolute values of the differences of the measured sensor. The application solves the technical problem of how to accurately and efficiently test the PWM output angle sensor and improves the precision and efficiency of the test.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of angle sensor technology, and in particular to a method and apparatus for testing a PWM output angle sensor. Background Technology

[0002] PWM output angle sensors, with their advantages of high precision, anti-interference, low power consumption, simple interface, and digital output, are widely used in industrial automation, robotics, automotive electronics, and other fields. As the demand for these angle sensors continues to increase across various industries, the need for testing is also growing. Using a standard oscilloscope to calculate the duty cycle is problematic due to the inherent errors and resolution limitations of the oscilloscope itself, which significantly interfere with the test data, making it impossible to determine whether the error originates from the oscilloscope or the product itself. While using a high-precision oscilloscope solves the resolution and accuracy issues, it doesn't address the cost of high-precision equipment and the time commitment required for testing. Therefore, there is an urgent need to propose a testing method and device for PWM output angle sensors to address the technical challenges of accurately and efficiently testing these sensors, thereby improving both accuracy and efficiency. Summary of the Invention

[0003] The main objective of this invention is to propose a method and apparatus for testing PWM output angle sensors, aiming to solve the technical problem of how to accurately and efficiently test PWM output angle sensors and improve the accuracy and efficiency of testing.

[0004] To achieve the above objectives, the present invention provides a method for testing a PWM output angle sensor, wherein the method includes the following steps:

[0005] S1. Set up a test platform, connect the sensor under test to the test platform, obtain the output value of the sensor under test, and calculate the duty cycle based on the output value of the sensor under test.

[0006] S2. Rotate the motor to make the duty cycle of the sensor under test 0, record and configure the parameters of the signal generator at the moment when the duty cycle of the sensor under test is 0;

[0007] S3. Set the rotation number threshold N, control the motor to drive the sensor under test to rotate synchronously by an angle θ at a time interval T and a rotation speed V, record the average duty cycle of the sensor under test within the time interval T and the difference between the maximum and minimum duty cycle values. Repeat the above steps to obtain the average duty cycle of the sensor under test at N points and the difference between the maximum and minimum duty cycle values.

[0008] S4. Calculate the linearity based on the average duty cycle of the N points of the sensor under test, and evaluate the performance of the sensor under test based on the linearity and the maximum value of the absolute value of each difference of the sensor under test.

[0009] In one preferred embodiment, step S1 involves acquiring the PWM output value of the sensor under test for each cycle and calculating the duty cycle based on the PWM output value of the sensor under test.

[0010] In one preferred embodiment, the duty cycle is:

[0011]

[0012] Where η is the duty cycle, and n1, n2, and n3 are the PWM output values ​​of the sensor under test in one cycle.

[0013] In one preferred embodiment, after step S1, the method further includes:

[0014] The calculated duty cycle of the sensor under test is compared with the duty cycle value displayed on the oscilloscope to determine if they are consistent. If they are consistent, proceed to step S2; otherwise, the performance of the sensor under test is deemed unqualified.

[0015] In one preferred embodiment, step S3 controls the motor to operate at 10-second time intervals. The rotational speed drives the sensor under test to rotate synchronously by 18°.

[0016] In one preferred embodiment, the threshold number of rotations N is 20.

[0017] In one preferred embodiment, step S4 uses any one of the following methods to calculate the linearity of the sensor under test: independent linearity, end-base linearity, translational end-base linearity, zero-base linearity, front-end linearity, least squares linearity, and translational least squares linearity.

[0018] An apparatus including the aforementioned PWM output angle sensor testing method, comprising:

[0019] The system comprises a fixture base, a fixture test board, a motor, a motor drive module, a signal generator, a PC host computer, an automatic test module, and an oscilloscope. The PC host computer is connected to the signal generator and the automatic test module. The signal generator is connected to the motor drive module, the motor drive module is connected to the motor, the motor is connected to the fixture test board, the fixture test board is connected to the sensor under test, and the sensor under test is connected to the oscilloscope and the automatic test module. The fixture test board, the motor, and the sensor under test are all placed on the fixture base.

[0020] In the above technical solution of the present invention, the PWM output angle sensor testing method includes the following steps: building a test platform, connecting the sensor under test to the test platform, acquiring the output value of the sensor under test, and calculating the duty cycle based on the output value of the sensor under test; rotating the motor to make the duty cycle of the sensor under test 0, recording and configuring the parameters of the signal generator at the moment when the duty cycle of the sensor under test is 0; setting a rotation number threshold N, controlling the motor to drive the sensor under test to rotate synchronously by an angle θ at a time interval T and a rotation speed V, recording the average duty cycle of the sensor under test within the time interval T and the difference between the maximum and minimum duty cycle values, repeating the above steps to obtain the average duty cycle of N points of the sensor under test and the difference between the maximum and minimum duty cycle values; calculating the linearity based on the average duty cycle of the N points of the sensor under test, and evaluating the performance of the sensor under test based on the linearity and the maximum absolute value of each difference of the sensor under test. The present invention solves the technical problem of how to accurately and efficiently test PWM output angle sensors, improving the accuracy and efficiency of the test. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.

[0022] Figure 1 This is a schematic diagram of a PWM output angle sensor testing method according to an embodiment of the present invention;

[0023] Figure 2 This is a schematic diagram of a PWM output angle sensor testing device according to an embodiment of the present invention.

[0024] The realization of the objective, functional characteristics and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0025] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0026] It should be noted that all directional indicators (such as up, down, etc.) in the embodiments of the present invention are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicator will also change accordingly.

[0027] Furthermore, in this invention, descriptions involving "first," "second," etc., are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature.

[0028] Furthermore, the technical solutions of the various embodiments of the present invention can be combined with each other, but only if they are based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.

[0029] See Figure 1 According to one aspect of the present invention, the present invention provides a method for testing a PWM output angle sensor, wherein the method for testing a PWM output angle sensor includes the following steps:

[0030] S1. Set up a test platform, connect the sensor under test to the test platform, obtain the output value of the sensor under test, and calculate the duty cycle based on the output value of the sensor under test.

[0031] S2. Rotate the motor to make the duty cycle of the sensor under test 0, record and configure the parameters of the signal generator at the moment when the duty cycle of the sensor under test is 0;

[0032] S3. Set the rotation number threshold N, control the motor to drive the sensor under test to rotate synchronously by an angle θ at a time interval T and a rotation speed V, record the average duty cycle of the sensor under test within the time interval T and the difference between the maximum and minimum duty cycle values. Repeat the above steps to obtain the average duty cycle of the sensor under test at N points and the difference between the maximum and minimum duty cycle values.

[0033] S4. Calculate the linearity based on the average duty cycle of the N points of the sensor under test, and evaluate the performance of the sensor under test based on the linearity and the maximum value of the absolute value of each difference of the sensor under test.

[0034] Specifically, in this embodiment, a test platform is built, and the automatic test module is connected to the sensor under test. A protocol converter establishes a communication connection between the automatic test module and the PC host computer. The PC host computer can receive the duty cycle continuously sent by the automatic test module and automatically calculate the average, maximum, minimum and difference of the duty cycle within a certain time period under the current state of the product. A signal generator is used to control the rotation of the motor, thereby driving the sensor under test to rotate at a constant speed. The PC host computer is connected to the signal generator through a USB serial port to control the rotation of the motor. A high-precision oscilloscope is used to connect to the output of the sensor under test as a reference.

[0035] Specifically, in this embodiment, step S1 involves acquiring the PWM output value of the sensor under test for each cycle and calculating the duty cycle based on the PWM output value of the sensor under test; the duty cycle is:

[0036]

[0037] Where η is the duty cycle, and n1, n2, and n3 are the PWM output values ​​of the sensor under test in one cycle; the calculated duty cycle value is retained to 7 decimal places.

[0038] Specifically, in this embodiment, after step S1, the method further includes: comparing the calculated duty cycle of the sensor under test with the duty cycle displayed on the oscilloscope to determine if they are consistent. If they are consistent, proceed to step S2; otherwise, determine that the performance of the sensor under test is unqualified. After power-on, the PC host computer will print the duty cycle calculated by the automatic test module at a certain periodic transmission interval. The transmission period is determined by the frequency of the PWM waveform of the sensor under test. The higher the frequency, the faster the transmission. The calculated duty cycle of the sensor under test is compared with the duty cycle displayed on the oscilloscope. The duty cycle values ​​should be consistent, and the error should be controlled below ±0.1%.

[0039] Specifically, in this embodiment, the range of the sensor under test is 0-360°, corresponding to an output duty cycle of 0-100%. When the PC host computer is turned on, the sensor under test prints the duty cycle value at a certain periodic transmission interval. The rotation of the motor is controlled to drive the sensor to rotate to a position where the duty cycle is infinitely close to 0%.

[0040] Specifically, in this embodiment, the parameters of the signal generator are set on the PC host computer, and the motor is controlled to move at 10-second intervals. The rotation speed drives the sensor under test to rotate synchronously by 18°; the threshold number of rotations N is 20; after each 18° rotation, the PC host computer arbitrarily retrieves duty cycle values ​​with a time interval greater than or equal to 5000 sets, and automatically calculates the difference between the average, maximum and minimum duty cycle values ​​of each point, and displays them on the PC host computer interface, finally obtaining the average value and difference of 20 sets of duty cycle values.

[0041] Specifically, in this embodiment, the PC host computer uses 1-20 sets as the X-axis values ​​and the average value of the output duty cycle as the Y-axis. It calculates the linearity of the sensor under test using any one of the following methods: independent linearity, end-base linearity, translation end-base linearity, zero-base linearity, front-end linearity, least squares linearity, and translation least squares linearity. Linearity is an important indicator for measuring the static characteristics of the sensor under test. The smaller the linearity, the better the static characteristics and the better the stability. This invention sets a linearity threshold; if the calculated linearity is less than the threshold, it indicates that the sensor under test has good performance. The maximum absolute value of the difference between the maximum and minimum duty cycle values ​​calculated by the PC host computer reflects the maximum fluctuation of the duty cycle output at multiple angles under static conditions. The smaller the fluctuation, the better the product performance.

[0042] See Figure 2 According to another aspect of the present invention, a PWM output angle sensor testing device is provided, wherein the PWM output angle sensor testing device includes: a fixture base, a fixture test board, a motor, a motor drive module, a signal generator, a PC host computer, an automatic test module, and an oscilloscope; the PC host computer is connected to the signal generator and the automatic test module respectively, the signal generator is connected to the motor drive module, the motor drive module is connected to the motor, the motor is connected to the fixture test board, the fixture test board is connected to the sensor under test, and the sensor under test is connected to the oscilloscope and the automatic test module; the fixture test board, the motor, and the sensor under test are all placed on the fixture base.

[0043] Specifically, in this embodiment, a test platform is built and connected to the sensor under test via an automatic test module. The PWM output angle sensor test device also includes a protocol converter, which establishes a communication connection between the automatic test module and a PC host computer. The PC host computer can receive the duty cycle continuously sent by the automatic test module and automatically calculate the average, maximum, minimum, and difference of the duty cycle within a certain time period under the current state of the product. A signal generator is used to control the rotation of the motor, thereby driving the sensor under test to rotate at a uniform speed. The PC host computer is connected to the signal generator via a USB serial port to control the rotation of the motor. A high-precision oscilloscope is connected to the output of the sensor under test as a reference. The automatic test module is used to obtain the average and difference of multiple sets of duty cycles of the sensor under test and upload them to the PC host computer for calculation of the linearity of the sensor under test and performance evaluation.

[0044] The above are merely preferred embodiments of the present invention and do not limit the patent scope of the present invention. All equivalent structural transformations made using the contents of the present invention specification and drawings under the inventive concept of the present invention, or direct / indirect applications in other related technical fields, are included in the patent protection scope of the present invention.

Claims

1. A method for testing a PWM output angle sensor, characterized in that, Includes the following steps: S1. Set up a test platform, connect the sensor under test to the test platform, obtain the output value of the sensor under test, and calculate the duty cycle based on the output value of the sensor under test; Step S1 involves obtaining the PWM output value of the sensor under test for each cycle and calculating the duty cycle based on the PWM output value of the sensor under test. S2. Rotate the motor to make the duty cycle of the sensor under test 0, record and configure the parameters of the signal generator at the moment when the duty cycle of the sensor under test is 0; S3. Set the rotation number threshold. Control the motor at time intervals Rotation speed Drive the sensor under test to rotate synchronously by an angle Randomly select 5000 or more data points within a time interval T, record the average duty cycle of the sensor under test within time interval T, and the difference between the maximum and minimum duty cycle values. Repeat the above steps to obtain the sensor data. The average duty cycle of each point and the difference between the maximum and minimum duty cycle values; S4. Calculate the linearity based on the average duty cycle of the N points of the sensor under test, and evaluate the performance of the sensor under test based on the linearity and the maximum value of the absolute value of each difference of the sensor under test.

2. The method for testing a PWM output angle sensor according to claim 1, characterized in that, After step S1, the method further includes: The calculated duty cycle of the sensor under test is compared with the duty cycle value displayed on the oscilloscope to determine if they are consistent. If they are consistent, proceed to step S2; otherwise, the performance of the sensor under test is deemed unqualified.

3. The method for testing a PWM output angle sensor according to claim 1, characterized in that, Step S3 controls the motor to operate at 10-second intervals. The rotational speed of s drives the sensor under test to rotate synchronously. .

4. The method for testing a PWM output angle sensor according to claim 1, characterized in that, The number of rotations threshold It is 20.

5. The method for testing a PWM output angle sensor according to claim 1, characterized in that, Step S4 uses any one of the following methods to calculate the linearity of the sensor under test: independent linearity, end-base linearity, translational end-base linearity, zero-base linearity, front-base linearity, least squares linearity, and translational least squares linearity.

6. An apparatus comprising the PWM output angle sensor testing method according to any one of claims 1-5, characterized in that, include: Tooling base, tooling test board, motor, motor drive module, signal generator, PC host computer, automatic test module and oscilloscope; The PC host computer is connected to the signal generator and the automatic test module respectively. The signal generator is connected to the motor drive module. The motor drive module is connected to the motor. The motor is connected to the fixture test board. The fixture test board is connected to the sensor under test. The sensor under test is connected to the oscilloscope and the automatic test module. The fixture test board, the motor and the sensor under test are all placed on the fixture base.

Citation Information

Patent Citations

  • Method for testing linearity of angle sensor

    CN115930882A

  • A device and a method for controlling supply of fuel vapor to an internal combustion (IC) engine

    WO2016150673A1