A sensor performance analysis method, electronic device, and storage medium

CN117804667BActive Publication Date: 2026-09-08SAIC GM WULING AUTOMOBILE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410122481.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-29
Publication Date
2026-09-08
Estimated Expiration
2044-01-29

AI Technical Summary

Technical Problem

[0006]有鉴于此,本申请提供一种传感器性能的分析方法、电子设备以及存储介质,以利于解决现有技术中在根据多个样本数据拟合出传感器输入值与传感器输出值的对应曲线的过程中,需要工作人员对相关数据进行选择,无法彻底实现对传感器性能分析的自动化,同时使得确定出来的传感器性能准确性较低,且效率不高的问题

Benefits of technology

[0040]在本申请实施例中,将第一传感器输出差值对应的样本数据和第二传感器输出差值对应的样本数据取均值,获得第一坐标数据;将第三传感器输出差值对应的样本数据和第四传感器输出差值对应的样本数据取均值,获得第二坐标数据;根据第一坐标数据和第二坐标数据确定第二直线。在该过程中,不需要工作人员对相关数据进行选择,可以实现对传感器性能分析的自动化,同时提高了对传感器性能分析的准确性,且提高了传感器性能分析的效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117804667B_ABST
    Figure CN117804667B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a sensor performance analysis method, an electronic device and a storage medium. The method comprises: determining M sample data, and then determining a first straight line; substituting each sensor input sample value in the M sample data into the first straight line to obtain M sensor output intermediate values, and performing difference calculation on the M sensor output intermediate values and M sensor output sample values to obtain M sensor output differences; determining first coordinate data and second coordinate data according to the M sensor output differences; and determining a second straight line according to the first coordinate data and the second coordinate data. In the embodiments of the present application, the first coordinate data and the second coordinate data are determined according to the M sensor output differences, and the second straight line is determined according to the first coordinate data and the second coordinate data. In this process, the staff does not need to select relevant data, and the automation of sensor performance analysis can be realized, thereby improving the accuracy and efficiency of sensor performance analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of sensor technology, and more specifically to a method for analyzing sensor performance, an electronic device, and a storage medium. Background Technology

[0002] A sensor is a device that can directly sense a measurand and output an electrical signal or other signal that has a definite relationship with the measurand. In actual vehicle use, sensors collect relevant signals for the vehicle's Electronic Power Steering (EPS) system. As one of the key components of the EPS system, the performance of the sensor directly determines the overall performance of the EPS system; therefore, it is necessary to analyze the sensor's performance. Generally, sensor performance is analyzed based on the curve corresponding to the sensor's input and output values. Therefore, before analyzing sensor performance, it is first necessary to determine the curve corresponding to the sensor's input and output values ​​based on the collected sensor sample data.

[0003] In related technologies, after processing the collected sensor output sample values ​​and sensor input sample values ​​to determine multiple sample data, a corresponding curve between the sensor input value and the sensor output value can be fitted based on the multiple sample data, thereby enabling the analysis of the sensor performance.

[0004] However, in the process of fitting the corresponding curve between the sensor input value and the sensor output value based on multiple sample data, staff need to select relevant data, which cannot completely automate the sensor performance analysis. At the same time, the accuracy of the determined sensor performance is low and the efficiency is not high.

[0005] It should be noted that the information disclosed in the background section of this application is intended only to enhance the understanding of the general background of this application, and should not be construed as an admission or in any way implying that the information constitutes prior art known to those skilled in the art. Summary of the Invention

[0006] In view of this, this application provides a method, electronic device, and storage medium for analyzing sensor performance, in order to solve the problems in the prior art where, in the process of fitting the corresponding curve between sensor input values ​​and sensor output values ​​based on multiple sample data, operators need to select relevant data, which cannot completely automate the analysis of sensor performance, and also results in low accuracy and low efficiency in determining sensor performance.

[0007] In a first aspect, embodiments of this application provide a method for analyzing sensor performance, including:

[0008] Determine M sample data, each of which includes a sensor input sample value and a sensor output sample value, where M > 1;

[0009] Determine the first straight line based on any one of the sample data and the zero point coordinates;

[0010] Substitute each sensor input sample value from the M sample data into the first straight line to obtain the M sensor output intermediate values;

[0011] The difference between each sensor output sample value in the M sample data and the corresponding sensor output median value is calculated to obtain the M sensor output differences;

[0012] The first coordinate data is obtained by averaging the sample data corresponding to the first sensor output difference and the sample data corresponding to the second sensor output difference. The first sensor output difference and the second sensor output difference are the maximum and minimum values ​​among the N sensor output differences, respectively.

[0013] The second coordinate data is obtained by averaging the sample data corresponding to the output difference of the third sensor and the sample data corresponding to the output difference of the fourth sensor. The output difference of the third sensor and the output difference of the fourth sensor are the maximum and the second smallest values ​​among the N sensor output differences, respectively; or, the output difference of the third sensor and the output difference of the fourth sensor are the second largest and the smallest values ​​among the N sensor output differences, respectively.

[0014] A second straight line is determined based on the first coordinate data and the second coordinate data. The second straight line is used to analyze sensor performance.

[0015] In one possible implementation, determining the first straight line based on any of the sample data and the zero-point coordinates includes:

[0016] The first straight line is determined based on the maximum sample data and the zero point coordinates among the M sample data, wherein the maximum sample data is the sample data corresponding to the sensor input sample value or the sensor output sample value.

[0017] In one possible implementation, determining N sample data, each sample data including a sensor input sample value and a sensor output sample value, includes:

[0018] Acquire N sample data, each of which includes a sensor input sample value and a sensor output sample value, and one sensor input sample value corresponds to multiple sensor output sample values;

[0019] Based on N sampled data, M sample data are determined. Each sample data includes a sensor input sample value and a sensor output sample value. The sensor input sample value is the sensor input sample value, and the sensor output sample value is the average value of the sensor output samples. The average value of the sensor output samples is the average value of multiple sensor output sample values ​​corresponding to the sensor input sample value.

[0020] Where N≥M.

[0021] In one possible implementation, determining M sample data based on N sample data, each sample data including a sensor input sample value and a sensor output sample value, includes:

[0022] Based on N sampled data, M forward stroke sample data are determined. Each forward stroke sample data includes a sensor input sample value and a forward stroke sensor output sample value. The sensor input sample value is the sensor input sample value, and the forward stroke sensor output sample value is the average value of the forward stroke sensor output samples. The average value of the forward stroke sensor output samples is the average value of multiple forward stroke sensor output sample values ​​corresponding to the sensor input sample value.

[0023] Based on N sampled data, M reverse stroke sample data are determined. Each reverse stroke sample data includes a sensor input sample value and a reverse stroke sensor output sample value. The sensor input sample value is the sensor input sample value, and the reverse stroke sensor output sample value is the average value of the reverse stroke sensor output samples. The average value of the reverse stroke sensor output samples is the average value of multiple reverse stroke sensor output sample values ​​corresponding to the sensor input sample value.

[0024] Based on the M forward stroke sample data and the M reverse stroke sample data, M sample data are determined. Each sample data includes a sensor input sample value and a sensor output sample value. The sensor input sample value is the sensor input sampling value, and the sensor output sample value is the average of the forward stroke sensor output sampling average value and the reverse stroke sensor output sampling average value corresponding to the sensor input sampling value.

[0025] One possible implementation also includes:

[0026] Calculate the standard deviation of the positive stroke based on the M positive stroke sample data;

[0027] Calculate the standard deviation of the reverse stroke based on the M reverse stroke sample data.

[0028] In one possible implementation,

[0029] After acquiring N sample data, the method further includes: determining whether there is any abnormal data among the N sample data.

[0030] The step of determining N sample data based on N sample data includes: if there is no abnormal data among the N sample data, then determining M sample data based on the N sample data.

[0031] In one possible implementation, determining M sample data based on N sample data further includes:

[0032] If there are abnormal data among the N sampled data, the abnormal data will be deleted, and then M sample data will be determined.

[0033] One possible implementation also includes:

[0034] Output the second straight line.

[0035] Secondly, embodiments of this application provide an electronic device, characterized in that it includes:

[0036] processor;

[0037] Memory;

[0038] And a computer program, wherein the computer program is stored in the memory, the computer program including instructions that, when executed by the processor, cause the electronic device to perform the method described in any one of the first aspects.

[0039] Thirdly, embodiments of this application provide a computer-readable storage medium, characterized in that the computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to perform the method described in any one of the first aspects.

[0040] In this embodiment, the first coordinate data is obtained by averaging the sample data corresponding to the output difference of the first sensor and the sample data corresponding to the output difference of the second sensor; the second coordinate data is obtained by averaging the sample data corresponding to the output difference of the third sensor and the sample data corresponding to the output difference of the fourth sensor; and the second straight line is determined based on the first and second coordinate data. This process eliminates the need for manual data selection, automating sensor performance analysis and improving both accuracy and efficiency. Attached Figure Description

[0041] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0042] Figure 1 This diagram illustrates an application scenario of EPS for related technologies.

[0043] Figure 2 This is a flowchart illustrating a sensor performance analysis method provided in an embodiment of this application.

[0044] Figure 3 This is a schematic diagram of a human-computer interaction interface for sensor performance analysis provided in an embodiment of this application.

[0045] Figure 4 This is a flowchart illustrating another sensor performance analysis method provided in an embodiment of this application.

[0046] Figure 5 This application provides a software framework diagram for sensor performance analysis.

[0047] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0048] To better understand the technical solution of this application, the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0049] It should be understood that the described embodiments are merely some, not all, of the embodiments in this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.

[0050] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. The singular forms “a,” “the,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0051] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0052] Electric Power Steering (EPS) is a power steering system that directly relies on an electric motor to provide auxiliary torque. During actual vehicle use, various sensors collect the steering wheel torque and angle applied by the driver, and send the steering wheel angle to the EPS. The EPS calculates the assist torque based on the steering wheel torque and angle, converts it into a current command for the assist motor, and controls the motor to generate the corresponding assist torque. This assist torque is amplified by a gear reduction mechanism and then applied to the steering gear. Ultimately, this assists the driver in overcoming steering resistance torque, thus enabling the vehicle to be steered.

[0053] For ease of understanding, a detailed description is provided below with reference to the accompanying drawings and specific embodiments.

[0054] See Figure 1 This is a schematic diagram illustrating an application scenario of EPS (Expanded Power Surgery) for related technologies. For example... Figure 1 As shown, in this application scenario, a steering wheel 101, an electronic power steering system 102, a steering shaft 103, a rack and pinion steering gear 104, and a tire 105 are illustrated. Specifically, the electronic power steering system 102 includes an electronic control unit (ECU) 1021, a sensor 1022, a power steering motor 1023, and a gear reduction mechanism 1024.

[0055] like Figure 1 As shown, the steering wheel 101 controls the steering of the tires 105 through the steering shaft 103 and the rack and pinion steering gear 104; the sensor 1022 is used to collect sensor signals on the steering shaft 103; the ECU 1021 outputs corresponding power steering motor control commands according to the received sensor signals; the power steering motor 1023 applies auxiliary torque to the steering shaft 103 through the power steering gear reduction mechanism 1024 to assist the steering shaft 103 in rotating.

[0056] In practical applications, when the driver turns the steering wheel 101, the steering wheel 101 drives the steering shaft 103 to rotate. At this time, the sensor 1022 transmits the sensor signal collected by the steering shaft 103 to the ECU 1021. The ECU 1021 controls the power steering motor 1023 to drive the gear reduction mechanism 1024 to rotate based on the received sensor signal, thereby assisting the steering shaft 103 to rotate, and finally driving the rack and pinion steering gear 104 to control the tire steering.

[0057] It should be pointed out that, Figure 1This is merely an illustrative description of an application scenario involved in the embodiments of this application and should not be construed as a limitation on the scope of protection of this application. Furthermore, it is understood that sensor 1022 is only an exemplary description, and sensor 1022 can specifically be a torque sensor, an angle sensor, or a torque-angle sensor (the torque-angle sensor is an integration of a torque sensor and an angle sensor). This application does not specifically limit the type of sensor.

[0058] Understandably, as a key component of the electronic power steering system, the performance of the sensor directly determines the overall performance of the system. Therefore, it is necessary to analyze the sensor's performance. Generally, sensor performance is analyzed based on the curve corresponding to the sensor's input and output values. Therefore, before analyzing sensor performance, it is first necessary to determine the curve corresponding to the sensor's input and output values ​​based on the collected sensor sample data.

[0059] In related technologies, after processing the collected sensor output sample values ​​and sensor input sample values ​​to determine multiple sample data, a corresponding curve between the sensor input value and the sensor output value can be fitted based on the multiple sample data, thereby enabling the analysis of the sensor performance.

[0060] However, in the process of fitting the corresponding curve between the sensor input value and the sensor output value based on multiple sample data, staff need to select relevant data, which cannot completely automate the sensor performance analysis. At the same time, the accuracy of the determined sensor performance is low and the efficiency is not high.

[0061] In this embodiment, the first coordinate data is obtained by averaging the sample data corresponding to the output difference of the first sensor and the sample data corresponding to the output difference of the second sensor; the second coordinate data is obtained by averaging the sample data corresponding to the output difference of the third sensor and the sample data corresponding to the output difference of the fourth sensor; and the second straight line is determined based on the first and second coordinate data. This process eliminates the need for manual data selection, automating sensor performance analysis and improving both accuracy and efficiency. Specifically, a detailed description is provided below in conjunction with the accompanying drawings and specific embodiments.

[0062] See Figure 2 This is a flowchart illustrating a sensor performance analysis method provided in an embodiment of this application. As shown in the figure, it specifically includes the following steps.

[0063] Step S201: Determine M sample data.

[0064] In this embodiment of the application, M sample data are determined based on N sample data. Each sample data includes a sensor input sample value and a sensor output sample value, and one sensor input sample value corresponds to multiple sensor output sample values; each sample data includes a sensor input sample value and a sensor output sample value, and N≥M>1.

[0065] Specifically, in this embodiment, the sensor input sample value is used as the sensor input sample value, and the average of multiple sensor output sample values ​​corresponding to the sensor input sample value is used as the sensor output sample value. It can be understood that by using the average of multiple sensor output sample values ​​corresponding to the sensor input sample value as the sensor output sample value, the accuracy of testing sensor performance can be improved to some extent.

[0066] For example, taking an angle sensor as an example, there are 36 sampled data points: (60, 58.2), (60, 60.5), (60, 60.7), (60, 59.2), (60, 60.4), (60, 60.1), (120, 119.5), (120, 119.1), (120, 120.5), (120, 118.6), (120, 121.3), (120, 119.5), (180, 179.2), (180, 179.6), (180, 180.2), (180, 181.1), (180, 181.3), (180, 178.9), (240, 240.8), (240, 241.2). (240, 240.2), (240, 241.9), (240, 240.6), (240, 240.5), (300, 300.8), (300, 301.2), (300, 299.2), (300, 298.9), (300, 299.6), (300, 300.6), (360, 360.1), (360, 361.2), (360, 359.1), (360, 358.1), (360, 360.5), and (360, 360.7) are used as sensor input sample values, and the average of multiple sensor output sample values ​​corresponding to the sensor input sample values ​​is used as sensor output sample values. That is, (60, 59.85), (120, 119.75), (180, 180.05), (240, 240.7), (300, 300.05), and (360, 359.95). It should be noted that the angle sensor input and output sample values ​​are displayed as coordinate points. For example, (60, 58.2) mentioned above indicates that the angle sensor input sample value is 60° and the angle sensor output sample value is 58.2°, and so on. For the sake of brevity, this application will not elaborate further.

[0067] In practical applications, it is first necessary to acquire the sensor data set, and then determine the sensor output sampling value corresponding to the sensor input sampling value based on the preset sensor input sampling value and the sensor data set, thereby determining N sampling data and then M sample data.

[0068] Specifically, in this embodiment, when there is a sensor input value in the sensor data set that is the same as the sensor input sample value, the determined sensor output sample value is the sensor output value corresponding to the sensor input sample value in the sensor data set that is the same as the sensor input sample value; when there is no sensor input value in the sensor data set that is the same as the sensor input sample value, the sensor output value corresponding to the sensor input sample value adjacent to the sensor input sample value in the sensor data set is taken as the sensor output sample value according to its size.

[0069] It should be noted that, generally, when there is no sensor input value in the sensor dataset that is identical to the sensor input sample value, each sensor input sample value is adjacent to two other sensor input values. In one possible implementation, the sensor output value corresponding to the sensor input value that is closer to the sensor input sample value is taken as the sensor output sample value.

[0070] For example, when there is no sensor input value in the sensor data set that is the same as the sensor input sample value, the sensor input sample value is 180°. Based on the two sensor input values ​​adjacent to this sensor input sample value, which are 180.1° and 179.8°, the sensor output value corresponding to the sensor input value of 180.1° is selected as the sensor output sample value.

[0071] In one possible implementation, after acquiring N sampled data points, it is necessary to determine whether there is any abnormal data among the N sampled data points. If there is no abnormal data among the N sampled data points, then M sampled data points are determined based on the N sampled data points. In this embodiment, a data anomaly allowable range can be preset. When the difference between the sensor input sampled value and the sensor output sampled value is not within the data anomaly allowable range, the data is considered abnormal. When the difference between the sensor input sampled value and the sensor output sampled value is within the data anomaly allowable range, the data is considered normal.

[0072] For example, when some of the sampled data in N sampled data are (60, 58.2), (60, 61.5), (60, 60.7), (60, 59.2), (60, 62.4), and (60, 60.1), and the allowable range for data anomalies is [0, 2], since (60, 62.4) in the six sampled data represents an angle sensor input sample value of 60° and an angle sensor output sample value of 62.4°, the difference between the sensor input sample value and the sensor output sample value is 2.4°. This difference between the sensor input sample value and the sensor output sample value is not within the allowable range for data anomalies, so the sampled data (60, 62.4) is considered abnormal data, and the sensor performance analysis system considers the data to be abnormal.

[0073] Of course, in one possible implementation, instead of judging the anomalies of N sampled data, judgment can be performed on M sampled data. After determining M sampled data based on N sampled data, judgment is then performed on the M sampled data. In this embodiment, a preset allowable range for data anomalies can be defined. When the difference between the sensor input sample value and the sensor output sample value is outside the allowable range, the data is considered abnormal. When the difference between the sensor input sample value and the sensor output sample value is within the allowable range, the data is considered normal. This application does not impose specific limitations on this.

[0074] In this embodiment of the application, if there is abnormal data among the N sampled data, the abnormal data is deleted before determining the M sampled data. For example, when some of the sampled data of the N sampled data are (60, 58.2), (60, 61.5), (60, 60.7), (60, 59.2), (60, 62.4), and (60, 60.1), and the allowable range of abnormal data is [0, 2], then since (60, 62.4) in the sampled data is abnormal data, this abnormal data is deleted, and the sampled data is determined based on the sampled data after deleting the abnormal data.

[0075] Step S202: Determine the first straight line based on any sample data and the coordinates of the zero point.

[0076] In this embodiment, after obtaining M sample data, a first straight line is determined based on any one of the M sample data and the zero-point coordinates. For example, when the M sample data are (60, 59.85), (120, 119.75), (180, 180.05), (240, 240.7), (300, 300.05), and (360, 359.95), the first straight line can be determined based on (60, 59.85) and the zero-point coordinates. Similarly, it can also be determined based on (120, 119.75) and the zero-point coordinates, and so on. This application does not impose any specific limitations on this.

[0077] Understandably, in practice, when the sensor input sample value is 0, the corresponding sensor output sample value is also 0. Therefore, the zero-point coordinates can be chosen as a determining condition for the first straight line.

[0078] In practical applications, observation of sample data reveals that the slope of the curve determined by connecting points in the sample data with a smooth curve continuously decreases or increases. Therefore, when selecting sample data from M data points closest to the zero point coordinates to determine the first straight line, the determined first straight line has a significant error compared to sample data points farther from the zero point coordinates, resulting in low accuracy. To address this issue, in this embodiment, the first straight line can be determined by selecting the sample data point farthest from the zero point coordinates along with the zero point coordinates.

[0079] In this embodiment, a first straight line is determined based on the maximum sample data and the zero-point coordinates among M sample data. The maximum sample data refers to the sample data corresponding to either the largest sensor input sample value or the largest sensor output sample value. It is understood that since the slope of the curve determined after connecting the points in the sample data through a smooth curve continuously decreases, selecting the maximum sample data and the zero-point coordinates results in a first straight line with relatively small error.

[0080] For example, when the M sample data are (60, 59.85), (120, 119.75), (180, 180.05), (240, 240.7), (300, 300.05), and (360, 359.95), the first straight line is determined based on (360, 359.95) and the zero point coordinates.

[0081] It is understandable that the obtained first straight line can be used to analyze sensor performance to some extent, but this first straight line still has a large error compared to other sample data. To further reduce the error in sensor performance, the first straight line can be further calibrated through steps S203-S207, thereby enabling more accurate analysis of sensor performance. Specifically, this will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0082] Step S203: Substitute the sensor input sample value from each of the M sample data into the first straight line to obtain the intermediate output values ​​of the M sensors.

[0083] In this embodiment, each sensor input sample value from the M sample data is substituted into the first straight line to obtain the intermediate values ​​of the M sensor outputs. For example, when the determined first straight line is Y1 = 1.02X, and the corresponding sample data are (60, 59.85), (120, 119.75), (180, 180.05), (240, 240.7), (300, 300.05), and (360, 353), substituting 60 into the first straight line yields the corresponding intermediate value of 61.2; substituting 120 into the first straight line yields the corresponding intermediate value of 122.4; and so on. For the sake of brevity, further details are omitted here.

[0084] Step S204: Calculate the difference between the sensor output sample value of each of the M sample data and the corresponding sensor output median value to obtain the M sensor output differences.

[0085] In this embodiment, after obtaining M intermediate sensor output values, the difference between each sensor output sample value in the M sample data and its corresponding intermediate sensor output value is calculated to obtain M sensor output differences. For example, if the sensor output sample value corresponding to sensor input sample value 60 is 59.85, and the intermediate sensor output value corresponding to sensor input sample value 60 is 61.2, the difference between the intermediate sensor output value 61.2 and the sensor output sample value 59.85 is calculated, and the final determined sensor output difference value is 1.35. Similarly, this process continues. For the sake of brevity, this application will not elaborate further.

[0086] Understandably, the obtained sensor output difference can be used to characterize the error between the determined first straight line and the sample points in the sample data. To reduce this error, the average of the sample points with larger errors and the sample points with smaller errors can be taken, thereby redetermining the corresponding coordinate data. It should be noted that the error mentioned here refers to the difference between the sample data and the first straight line, and is not used to describe the error between the final sensor performance and the actual sensor performance.

[0087] Step S205: Take the average of the sample data corresponding to the difference in output from the first sensor and the sample data corresponding to the difference in output from the second sensor to obtain the first coordinate data.

[0088] In this embodiment, the first coordinate data is obtained by averaging the sample data corresponding to the output difference of the first sensor and the sample data corresponding to the output difference of the second sensor. The first sensor output difference and the second sensor output difference are the maximum and minimum values ​​among the output differences of the M sensors, respectively.

[0089] For example, when the sample data are (60, 59.85), (120, 119.75), (180, 180.05), (240, 240.7), (300, 300.05), and (360, 353), and the corresponding first straight line is Y1 = 1.02X, the corresponding sensor output differences are 1.35, 2.65, 3.55, 4.1, 5.95, and 0. Therefore, the maximum value among the sensor output differences is 5.95, and the sensor sample data corresponding to this value is (300, 300.05); the minimum value among the sensor output differences is 0, and the sensor sample data corresponding to this value is (360, 353). The first coordinate data obtained by averaging the sample data corresponding to the first sensor output difference and the sample data corresponding to the second sensor output difference is (330, 326.53).

[0090] Step S206: Take the average of the sample data corresponding to the difference in output from the third sensor and the sample data corresponding to the difference in output from the fourth sensor to obtain the second coordinate data.

[0091] In this embodiment, the second coordinate data is obtained by averaging the sample data corresponding to the output difference of the third sensor and the sample data corresponding to the output difference of the fourth sensor. The output difference of the third sensor and the output difference of the fourth sensor are respectively the maximum and second smallest values ​​among the output differences of the M sensors; or, the output difference of the third sensor and the output difference of the fourth sensor are respectively the second largest and smallest values ​​among the output differences of the M sensors.

[0092] It can be understood that the second smallest value among the sensor output differences refers to the minimum value among the M-1 sensor output differences after removing the minimum value from the M sensor output differences; the second largest value among the sensor output differences refers to the maximum value among the M-1 sensor output differences after removing the maximum value from the M sensor output differences. For example, when the sensor output differences are 1.35, 2.65, 3.55, 4.1, 5.95, and 0, the second smallest value among the corresponding sensor output differences is 1.35; the second largest value among the corresponding sensor output differences is 4.1.

[0093] For example, when the sample data are (60, 59.85), (120, 119.75), (180, 180.05), (240, 240.7), (300, 300.05), and (360, 353), and the corresponding first straight line is Y1 = 1.02X, the corresponding sensor output differences are 1.35, 2.65, 3.55, 4.1, 5.95, and 0. At this time, the maximum value among the sensor output differences is 5.95, and the sensor sample data corresponding to this sensor output difference is (300, 300.05); the second smallest value among the sensor output differences is 1.35, and the sensor sample data corresponding to this sensor output difference is (60, 59.85). The second coordinate data is obtained as (180, 179.95) by averaging the sample data corresponding to the third sensor output difference and the sample data corresponding to the fourth sensor output difference.

[0094] Alternatively, for example, when the sample data are (60, 59.85), (120, 119.75), (180, 180.05), (240, 240.7), (300, 300.05), and (360, 353), and the corresponding first straight line is Y1 = 1.02X, the corresponding sensor output differences are 1.35, 2.65, 3.55, 4.1, 5.95, and 0. In this case, the second largest sensor output difference is 4.1, and the sensor sample data corresponding to this difference is (240, 240.7); the smallest sensor output difference is 0, and the sensor sample data corresponding to this difference is (360, 353). The second coordinate data is obtained as (300, 296.85) by averaging the sample data corresponding to the third and fourth sensor output differences.

[0095] In one possible implementation, the difference between the outputs of the third and fourth sensors can be selected as either the maximum and second minimum values ​​among the output differences of the M sensors, or the second largest and smallest values ​​among the output differences of the M sensors. Specifically, the third and fourth sensor output differences with the larger difference are used to determine the coordinate data.

[0096] For example, when the maximum value among the sensor output differences is 5.95 and the second smallest value is 1.35, the difference between the third and fourth sensor output differences is 5.6; when the second largest value among the sensor output differences is 4.1 and the smallest value is 0, the difference between the third and fourth sensor output differences is 4.1. Since 5.6 is greater than 4.1 in this case, the third and fourth sensor output differences are chosen as the maximum and second smallest values ​​among the M sensor output differences.

[0097] In one possible implementation, to obtain the second coordinate, the M sensor output differences obtained in step S204 can be sorted from largest to smallest, and the two sets of sensor output differences with the largest differences among the M sensor output differences can be found. This can be understood as the two sets of sensor output differences with the largest differences being the difference between the first and Mth sensor outputs, and the difference between the first and (M-1)th sensor outputs, or the difference between the first and Mth sensor outputs, and the difference between the second and Mth sensor outputs. Once the two sets of sensor output differences are determined, the average of the sample data corresponding to the two sensor output differences in each set is taken as the first coordinate data and the second coordinate data. For the sake of brevity, this application will not elaborate further here.

[0098] Step S207: Determine the second straight line based on the first coordinate data and the second coordinate data.

[0099] In this embodiment, the second straight line is determined based on the first coordinate data and the second coordinate data. For example, when the first coordinate data is (330, 326.53) and the second coordinate data is (180, 179.95), the slope of the second straight line can be determined to be (326.53-179.95) / (330-180)≈0.98. Substituting the first coordinate data into the second straight line Y = 0.98X + D, we can determine that D is approximately 3.13, meaning the second straight line is Y = 0.98X + 3.13. It can be understood that the second straight line reflects the correspondence of the target data better than the first straight line; that is, the second straight line can serve as a curve showing the correspondence between the sensor output value and the sensor input value. Therefore, the second straight line can be used to analyze sensor performance.

[0100] It is understood that the sensor performance includes the sensor's linearity, repeatability, hysteresis, confidence level, and absolute error. Of course, those skilled in the art can set other sensor performance according to actual needs, and this application does not impose specific restrictions on this.

[0101] In practical applications, to simplify sensor performance testing, a human-machine interface (HMI) is established, displaying the corresponding sensor performance data. In one possible implementation, the HMI simultaneously outputs a curve showing the relationship between the sensor output value and the sensor input value, i.e., a second straight line. Of course, those skilled in the art can also set the HMI to display curves showing the relationship between the sensor output value and time, as well as curves showing the relationship between the sensor input value and time, according to actual needs; this application does not specifically limit this. Specifically, a detailed description is provided below in conjunction with the accompanying drawings and specific embodiments.

[0102] See Figure 3 This is a schematic diagram of a human-computer interaction interface for sensor performance analysis provided in an embodiment of this application. Figure 3 As shown in the figure, the display areas show the correspondence curves between sensor output values ​​and sensor input values, the curves showing the relationship between sensor output values ​​and time, the curves showing the relationship between sensor input values ​​and time, the performance display areas for torque sensors and angle sensors. It can be understood that... Figure 3 This is merely an illustrative example. When performing performance tests on two angle sensors and two torque sensors simultaneously, the human-machine interface may include a display interface showing the corresponding curves of the two angle sensors and two torque sensors. For the sake of brevity, this application will not elaborate on this.

[0103] In this embodiment, the first coordinate data is obtained by averaging the sample data corresponding to the output difference of the first sensor and the sample data corresponding to the output difference of the second sensor; the second coordinate data is obtained by averaging the sample data corresponding to the output difference of the third sensor and the sample data corresponding to the output difference of the fourth sensor; and the second straight line is determined based on the first and second coordinate data. This process eliminates the need for manual data selection, automating sensor performance analysis and improving both accuracy and efficiency.

[0104] In practical applications, the sampling data includes forward stroke sampling data and reverse stroke sampling data. To ensure that the final determined second straight line better reflects the sensor's performance, the sample data should uniformly include both forward and reverse stroke data. Specifically, this will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0105] As can be understood, taking the angle sensor collecting steering wheel angle information as an example, the positive travel refers to the process of controlling the steering wheel to turn left or right from its original position; the negative travel refers to the process of controlling the steering wheel to return to its original position. Here, the original position refers to the position of the steering wheel when the vehicle is traveling in a straight line.

[0106] See Figure 4 This is a flowchart illustrating another sensor performance analysis method provided in an embodiment of this application. Figure 4 As shown, in Figure 2 Based on step S201 shown, the following steps are specifically included.

[0107] Step S2011: Based on N sampled data, determine M positive stroke sample data.

[0108] In this embodiment, M forward stroke sample data are determined based on N sample data. Each forward stroke sample data includes a sensor input sample value and a forward stroke sensor output sample value. The sensor input sample value is the sensor input sample value, and the forward stroke sensor output sample value is the average value of the forward stroke sensor output samples. The average value of the forward stroke sensor output samples is the average of multiple forward stroke sensor output sample values ​​corresponding to the sensor input sample value.

[0109] Specifically, in this embodiment, the N sampled data include N1 forward stroke sampled data and N2 reverse stroke sampled data, where N1 + N2 = N. From the N1 forward stroke sampled data, multiple sensor output sampled values ​​corresponding to the sensor input sample values ​​are determined. The average of these multiple determined sensor output sampled values ​​is then calculated to obtain the forward stroke sensor output sample average value. The sensor input sample value is the sensor input sampled value, and the forward stroke sensor output sample value is the forward stroke sensor output sample average value.

[0110] Step S2012: Based on N sampled data, determine M reverse travel sample data.

[0111] In this embodiment, M reverse stroke sample data are determined based on N sample data. Each reverse stroke sample data includes one sensor input sample value and one reverse stroke sensor output sample value. The sensor input sample value is the sensor input sample value, and the reverse stroke sensor output sample value is the average of the reverse stroke sensor output samples. The average of the reverse stroke sensor output samples is the average of multiple reverse stroke sensor output sample values ​​corresponding to the sensor input sample value.

[0112] Specifically, in this embodiment, the N sampled data include N1 forward stroke sampled data and N2 reverse stroke sampled data, where N1 + N2 = N. From the N2 reverse stroke sampled data, multiple sensor output sampled values ​​corresponding to the sensor input sample values ​​are determined. The average of these multiple determined sensor output sampled values ​​is then calculated to obtain the average reverse stroke sensor output sampled value. The sensor input sample value is the sensor input sampled value, and the reverse stroke sensor output sample value is the average reverse stroke sensor output sampled value.

[0113] Step S2013: Determine M sample data based on M forward stroke sample data and M reverse stroke sample data.

[0114] In this embodiment, M sample data are determined based on M forward stroke sample data and M reverse stroke sample data. Each sample data includes a sensor input sample value and a sensor output sample value. The sensor input sample value is the sensor input sampling value, and the sensor output sample value is the average of the forward stroke sensor output sampling average value and the reverse stroke sensor output sampling average value corresponding to the sensor input sampling value. It can be understood that the corresponding M sensor output sample values ​​are the same in the M forward stroke sample data and the M reverse stroke sample data; that is, the M sensor output sample values ​​in the M forward stroke sample data are the same as the M sensor output sample values ​​in the M reverse stroke sample data.

[0115] In one possible implementation, to better analyze the sensor's performance, it is also necessary to determine the forward and reverse standard deviations corresponding to the forward and reverse travel sample data. Understandably, the forward and reverse standard deviations are used to analyze the sensor's hysteresis performance.

[0116] In this embodiment, the standard deviation of the positive stroke is calculated based on M positive stroke sample data. Specifically, the difference between the M sensor input sample values ​​and the corresponding positive stroke sensor output sample value is calculated from the M positive stroke sample data. The average of the M differences is then summed, divided by M-1, and finally the square root is taken to determine the corresponding standard deviation of the positive stroke.

[0117] Similarly, in this embodiment, the standard deviation of the reverse stroke is calculated based on M reverse stroke sample data. Specifically, the difference between the M reverse sensor input sample values ​​and the reverse sensor output sample values ​​corresponding to each sensor input sample value is calculated, and the average of the M differences is taken. Then, the average is divided by M-1, and the square root is taken to determine the corresponding standard deviation of the reverse stroke.

[0118] Corresponding to the above embodiments, this application also provides a software framework diagram for sensor performance analysis. See [link to documentation]. Figure 5 The figure shows a software framework diagram for sensor performance analysis provided in this application embodiment. As shown in the figure, the core functions of this sensor performance analysis software are sample data acquisition and performance calculation, as detailed in the method embodiment above, which will not be repeated here.

[0119] The sensor performance analysis software also includes real-time monitoring and other functions. The real-time monitoring function includes the correspondence between the sensor input signal and time, the correspondence between the sensor output signal and time, and the correspondence between the sensor output signal and the input signal. Other functions include indicator lights, test result saving, and test result querying.

[0120] Corresponding to the above embodiments, this application also provides an electronic device. See also Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 600 may include a processor 601, a memory 602, and a communication unit 603. These components communicate through one or more buses. Those skilled in the art will understand that the structure of the electronic device shown in the figure does not constitute a limitation on the embodiments of the present invention. It may be a bus-shaped structure or a star-shaped structure, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0121] The communication unit 603 is used to establish a communication channel, enabling the electronic device to communicate with other devices. It can receive user data sent by other devices or send user data to other devices.

[0122] The processor 601 serves as the control center of the electronic device, connecting various parts of the device via interfaces and lines. It executes software programs, instructions, and / or modules stored in the memory 602, and calls data stored in the memory to perform various functions and / or process data. The processor may be composed of integrated circuits (ICs), such as a single packaged IC or multiple packaged ICs with the same or different functions connected together. For example, the processor 601 may consist only of a central processing unit (CPU). In this embodiment, the CPU may have a single processing core or include multiple processing cores.

[0123] The memory 602 is used to store the execution instructions of the processor 601. The memory 602 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.

[0124] When the execution instructions in memory 602 are executed by processor 601, the electronic device 600 is able to perform operations. Figure 1 Some or all of the steps in the illustrated embodiments.

[0125] In a specific implementation, the present invention also provides a computer storage medium, wherein the computer storage medium may store a program, which, when executed, may include some or all of the steps of the various embodiments of the simulation scene generation method provided by the present invention. The storage medium may be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0126] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, the simultaneous existence of A and B, or the existence of B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, and c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0127] Those skilled in the art will recognize that the units and algorithm steps described in the embodiments disclosed herein can be implemented using electronic hardware, computer software, or a combination of electronic hardware and software. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0128] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0129] In the several embodiments provided in this application, any function, if implemented as a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0130] The same or similar parts between the various embodiments in this specification can be referred to mutually. In particular, the device embodiments and terminal embodiments are basically similar to the method embodiments, so the description is relatively simple, and the relevant parts can be referred to the description in the method embodiments.

Claims

1. A method for analyzing sensor performance, characterized in that, include: Determine M sample data, each of which includes a sensor input sample value and a sensor output sample value, where M > 1; Determine the first straight line based on any one of the sample data and the zero point coordinates; Substitute each sensor input sample value from the M sample data into the first straight line to obtain the M sensor output intermediate values; The difference between each sensor output sample value in the M sample data and the corresponding sensor output median value is calculated to obtain the M sensor output differences; The first coordinate data is obtained by averaging the sample data corresponding to the first sensor output difference and the sample data corresponding to the second sensor output difference. The first sensor output difference and the second sensor output difference are the maximum and minimum values ​​among the M sensor output differences, respectively. The second coordinate data is obtained by averaging the sample data corresponding to the output difference of the third sensor and the sample data corresponding to the output difference of the fourth sensor. The output difference of the third sensor and the output difference of the fourth sensor are the maximum and the second smallest values ​​among the M sensor output differences, respectively; or, the output difference of the third sensor and the output difference of the fourth sensor are the second largest and the smallest values ​​among the M sensor output differences, respectively. A second straight line is determined based on the first coordinate data and the second coordinate data. The second straight line is used to analyze sensor performance. Determining the first straight line based on any of the sample data and the zero-point coordinates includes: Based on the maximum sample data and zero point coordinates among the M sample data, a first straight line is determined, wherein the maximum sample data is the sample data corresponding to the largest sensor input sample value or the largest sensor output sample value.

2. The method for analyzing sensor performance according to claim 1, characterized in that, The determination of M sample data, each sample data including a sensor input sample value and a sensor output sample value, includes: Acquire N sample data, each of which includes a sensor input sample value and a sensor output sample value, and one sensor input sample value corresponds to multiple sensor output sample values; Based on N sampled data, M sample data are determined. Each sample data includes a sensor input sample value and a sensor output sample value. The sensor input sample value is the sensor input sample value, and the sensor output sample value is the average value of the sensor output samples. The average value of the sensor output samples is the average value of multiple sensor output sample values ​​corresponding to the sensor input sample value. Where N≥M.

3. The method for analyzing sensor performance according to claim 2, characterized in that, The step of determining M sample data based on N sample data, each sample data including a sensor input sample value and a sensor output sample value, includes: Based on N sampled data, M forward stroke sample data are determined. Each forward stroke sample data includes a sensor input sample value and a forward stroke sensor output sample value. The sensor input sample value is the sensor input sample value, and the forward stroke sensor output sample value is the average value of the forward stroke sensor output samples. The average value of the forward stroke sensor output samples is the average value of multiple forward stroke sensor output sample values ​​corresponding to the sensor input sample value. Based on N sampled data, M reverse stroke sample data are determined. Each reverse stroke sample data includes a sensor input sample value and a reverse stroke sensor output sample value. The sensor input sample value is the sensor input sample value, and the reverse stroke sensor output sample value is the average value of the reverse stroke sensor output samples. The average value of the reverse stroke sensor output samples is the average value of multiple reverse stroke sensor output sample values ​​corresponding to the sensor input sample value. Based on the M forward stroke sample data and the M reverse stroke sample data, M sample data are determined. Each sample data includes a sensor input sample value and a sensor output sample value. The sensor input sample value is the sensor input sampling value, and the sensor output sample value is the average of the forward stroke sensor output sampling average value and the reverse stroke sensor output sampling average value corresponding to the sensor input sampling value.

4. The method for analyzing sensor performance according to claim 3, characterized in that, Also includes: Calculate the standard deviation of the positive stroke based on the M positive stroke sample data; Calculate the standard deviation of the reverse stroke based on the M reverse stroke sample data.

5. The method for analyzing sensor performance according to claim 2, characterized in that, After acquiring N sample data, the method further includes: determining whether there is any abnormal data among the N sample data. The step of determining M sample data based on N sample data includes: if there is no abnormal data among the N sample data, then determining M sample data based on the N sample data.

6. The method for analyzing sensor performance according to claim 5, characterized in that, The step of determining M sample data based on N sample data further includes: If there are abnormal data among the N sampled data, the abnormal data will be deleted, and then M sample data will be determined.

7. The method for analyzing sensor performance according to claim 1, characterized in that, Also includes: Output the second straight line.

8. An electronic device, characterized in that, include: processor; Memory; And a computer program, wherein the computer program is stored in the memory, the computer program including instructions that, when executed by the processor, cause the electronic device to perform the method of any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device on which the computer-readable storage medium is located to perform the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Linear calibration method

    CN103743427A

  • Correction method and device for sensor characteristic curve, equipment and storage medium

    CN109115257A