A method for automatically calibrating a nitrogen and oxygen sensor

Automatically parsing CAN packets and adapting characteristic parameters through DBC files, automatic calibration of different models of nitrogen oxygen sensors is achieved, solving the problems of low manual resolution efficiency and low accuracy, improving development speed and accuracy, and simplifying process.

CN115586306BActive Publication Date: 2025-02-25SOOK AUTOMOTIVE COMPONENTS (JIANGSU) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211245853.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-12
Publication Date
2025-02-25
Estimated Expiration
2042-10-12

AI Technical Summary

Technical Problem

In the prior art, manual analysis of CAN packets is low efficiency and low accuracy, resulting in different models of nitrogen oxygen sensors that need to be developed separately, increasing the development difficulty and time.

Method used

Automatically parse CAN messages through DBC files, extract the CAN messages characteristics of different models of nitrogen oxygen sensors, and automatically adapt according to the characteristic parameters to realize automatic calibration of various types of sensors.

Benefits of technology

It improves the development speed and accuracy of nitrogen oxygen sensors, simplifies the development process, shortens development time, and solves the problem that different models of sensors need to be developed separately.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115586306B_ABST
    Figure CN115586306B_ABST
Patent Text Reader

Abstract

The present invention discloses an automatic calibration method for a nitrogen oxygen sensor, comprising the following steps: (1) importing a DBC file of a standard part; (2) obtaining a message of the standard part; (3) parsing the message according to the DBC file and extracting message features; (4) adapting feature parameters; (5) testing the NOx concentration of the standard part and the part to be calibrated; (6) calculating the calibration coefficient; and (7) setting the calibration coefficient. Compared with the disadvantages of different types of sensors in the prior art that different message contents are different and need to be developed separately, and the disadvantages of low efficiency and low accuracy of manual analysis of CAN messages, the automatic calibration method for the nitrogen oxygen sensor of the present invention automatically parses the CAN message content through the DBC file, extracts the message features of each type of sensor, and the lower computer completes the adaptation of various types of nitrogen oxygen sensors according to the feature adaptation feature parameters, thereby improving the development speed and accuracy of the nitrogen oxygen sensor, simplifying the development process, and shortening the development time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a sensor, and in particular to an automatic calibration method for a nitrogen oxygen sensor. Background Art

[0002] In order to detect and reduce the emission of nitrogen oxide pollutants in the exhaust gas generated by automobile engines, the automobile is equipped with front nitrogen oxide sensors and rear nitrogen oxide sensors on the exhaust gas emission pipeline to detect and control the emission of nitrogen oxide pollutants. As the number of automobiles continues to rise, the performance and development efficiency of nitrogen oxide sensors are crucial for engine exhaust emission detection.

[0003] During the development of nitrogen oxide sensors, different types of nitrogen oxide sensors have different CAN message IDs and message contents. Incorrect message IDs and message contents will cause the nitrogen oxide sensors to not work properly, so different types of sensors need to be developed separately. However, manual analysis of CAN messages is inefficient and inaccurate.

[0004] Invention patent CN202110563644 provides a new nitrogen oxygen sensor calibration test system, which relates to the field of sensor calibration technology. The system includes a host computer control module, a mixed gas source module and a test bench module; the host computer control module includes a host computer, a USB connection box and an industrial control card; the mixed gas source module includes multiple gas sources, multiple digital gas flow meters and a gas mixing chamber; the test bench module includes a heating furnace and an exhaust pipe arranged on the heating furnace, and the test bench can accommodate multiple nitrogen oxygen sensors at the same time;

[0005] The host computer controls the flowmeter to control the concentration of NOx and O2 in the mixed gas flowing into the exhaust pipe. In the calibration test of the nitrogen oxide sensor, the host computer control module is used to effectively control the ratio of the mixed gas and complete the setting of the internal calibration parameters of the nitrogen oxide sensor. It can calibrate and test multiple nitrogen oxide sensors at the same time, which greatly improves the consistency of the manufacturer's product production, ensures product quality, and improves production test efficiency. However, the test system provided by the patent can only calibrate multiple calibrated parts of the same model that have been developed at the same time to improve the calibration speed of a model product, but it has the problem of low efficiency in product development of different models, and the development of different models of sensors requires manual analysis of CAN messages and the disadvantages that different models of sensors need to be developed separately. Summary of the invention

[0006] Purpose of the invention: In view of the shortcomings of the prior art, the present invention provides an automatic calibration method for a nitrogen oxide sensor, which automatically parses CAN messages through DBC files, and automatically adapts characteristic parameters according to the characteristics of the CAN messages to meet the requirements of sensors of different models. This solves the shortcomings that the development of sensors of different models requires manual parsing of CAN messages and that sensors of different models need to be developed separately, simplifies the development process, and improves the development speed and accuracy of nitrogen oxide sensors.

[0007] Technical solution: The automatic calibration method of the nitrogen oxygen sensor of the present invention comprises the following steps:

[0008] (1) Import the created DBC file for message parsing of the standard parts of the nitrogen oxide sensor into the host computer;

[0009] (2) Obtain the message of the standard parts of the nitrogen oxide sensor. The process is as follows:

[0010] (2.1) Connect the low-level CAN bus of the standard part to the low-level CANZ bus of the CAN bus analyzer, and connect the high-level CAN bus of the standard part to the high-level CAN bus of the CAN bus analyzer; connect the host computer to the CAN bus analyzer through the PC USB interface;

[0011] (2.2) Provide 12V or 24V regulated DC power supply to the standard parts according to the NOx sensor model;

[0012] (2.3) The host computer sends a start data frame and a stop data frame to the standard part through the CAN bus analyzer to obtain the CAN messages sent by the standard part when it is working and when it stops working;

[0013] (3) Parse CAN messages and extract message features based on the DBC database file:

[0014] (3.1) Through the DBC file, the host computer automatically parses the information of the CAN message obtained through the CAN bus analyzer software. The obtained CAN message includes the start frame and stop frame, main frame, frame ID of the additional frame, message content, and sending cycle;

[0015] (3.2) The host computer sorts out the parsed CAN message information and extracts the CAN message features;

[0016] (4) Feature parameter adaptation

[0017] (4.1) The upper computer sends the extracted CAN message features to the lower computer;

[0018] (4.2) The lower computer selects the corresponding characteristic parameters according to the CAN message characteristics provided by the upper computer, completes the adaptation of different types of nitrogen oxide sensors, and obtains the part to be calibrated;

[0019] (5) Testing the standard parts and the parts to be calibrated of the nitrogen oxide sensor: changing the NOx concentration in the environment of the standard parts and the parts to be calibrated, and the host computer obtains the NOx concentration values ​​measured when the standard parts and the parts to be calibrated are working in different NOx concentration environments;

[0020] (6) Calibration coefficient calculation

[0021] (6.1) The host computer calculates the calibration coefficient based on the NOx concentration value x of the part to be calibrated and the NOx concentration value y of the standard part measured under different NOx concentration environments;

[0022] (7) The host computer writes the calibration coefficients into the microcontroller of the part to be calibrated to complete the calibration.

[0023] In step (1), the DBC file contains the baud rate, message ID, message name, number of bytes in the message data field, network node of the message, and explanation of the message.

[0024] In step (1), VectorCANdb++ is used to create a DBC file.

[0025] In step (2), the low-level CAN bus of the standard part is connected to the low-level CANZ bus of the CAN bus analyzer, and the high-level CAN bus of the standard part is connected to the high-level CAN bus of the CAN bus analyzer; the host computer is connected to the CAN bus analyzer via a PC; and a 12V or 24V regulated DC power supply is provided to the standard part according to the model of the nitrogen oxide sensor.

[0026] In step (3), the CAN message includes a start frame and a stop frame, a main frame, a frame ID of an additional frame, a message content and a sending cycle.

[0027] The message features extracted in step (3) include cycle and heating status.

[0028] The process of testing the standard parts and the parts to be calibrated of the nitrogen oxygen sensor in step (5) is as follows:

[0029] (5.1) Place the standard parts and the parts to be calibrated of the same model in the same NOx concentration environment;

[0030] (5.2) Sending start frame and stop frame commands through the host computer to make the standard parts and the parts to be calibrated work, and wait for the nitrogen and oxygen concentration value measured by the sensor to reach a valid state;

[0031] (5.3) Changing the NOx concentration in the environment of the standard part and the part to be calibrated, the host computer obtains the NOx concentration values ​​measured when the standard part and the part to be calibrated are working in different NOx concentration environments.

[0032] In step (6), a first-order polynomial Y=ax+b is fitted, according to the formula

[0033]

[0034] Calculate the calibration coefficients a and b, and reduce the NOx concentration measurement error through calibration; where x is the NOx concentration value of the part to be calibrated, y is the NOx concentration value of the standard part, a is the gain of the NOx concentration value x of the part to be calibrated, b is the offset of the NOx concentration value x of the part to be calibrated, and Y is the NOx concentration value obtained after the NOx concentration value x of the part to be calibrated is corrected;

[0035] (7) Calibration coefficient setting: After calculating the calibration coefficient, the host computer writes the calibration coefficient into the EEPROM (Electrically Erasable Programmable Read-Only Memory) of the microcontroller of the part to be calibrated to complete the calibration.

[0036] Working principle: When the present invention automatically calibrates the nitrogen oxygen sensor, the upper computer automatically parses the CAN message content through the DBC database file, extracts the characteristics of the CAN message of the nitrogen oxygen sensor of different models, and automatically sends it to the lower computer. The lower computer adapts the characteristic parameters corresponding to the characteristics of the CAN message, that is, it is adapted to various types of nitrogen oxygen sensors. Finally, the calibrated part is tested to obtain the CAN message, and the calibration coefficient is calculated and configured through polynomial fitting to control the sensor accuracy within the required range.

[0037] Beneficial effect: Compared with the disadvantages of different types of sensors in the prior art that have different message contents and need to be developed separately, and the disadvantages of low efficiency and low accuracy of manual analysis of CAN messages, the automatic calibration method of the nitrogen oxygen sensor of the present invention automatically parses the CAN message content through the DBC file, extracts the message features of each type of sensor, and the lower computer completes the adaptation of various types of nitrogen oxygen sensors according to the feature adaptation feature parameters, thereby improving the development speed and accuracy of the nitrogen oxygen sensor, simplifying the development process, and shortening the development time. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 The flowchart of the automatic calibration method of the nitrogen oxygen sensor of the present invention;

[0039] Figure 2 This is the upper computer interface diagram when calibrating the nitrogen oxygen sensor. DETAILED DESCRIPTION

[0040] The present invention automatically calibrates the nitrogen oxygen sensor through a CAN bus analyzer, a host computer and a slave computer. The CAN bus analyzer is responsible for CAN communication between the host computer and the slave computer; the host computer refers to the PC-side software, which is responsible for controlling the slave computer and monitoring the working status of the slave computer and the data sent; the slave computer refers to the single-chip microcomputer of the nitrogen oxygen sensor.

[0041] The part to be calibrated mentioned in the present invention refers to a nitrogen oxide sensor developed with the standard part as a reference standard but without calibration coefficient setting; CAN refers to a controller area network.

[0042] DBC file refers to the database file of the controller area network, which is the abbreviation of Database Can, representing the database file of CAN, used to describe the data communication between nodes in the CAN network, and contains the protocol data in the CAN bus protocol and its specific meaning. The DBC file of the standard part is a DBC file that parses the message content of the standard part.

[0043] ID refers to the corresponding message in CAN, and each ID corresponds to its own message meaning. The host computer refers to the PC software, that is, the PC computer that sends start and stop commands to the lower computer. The lower computer refers to the microcontroller of the nitrogen oxide sensor. The CAN bus analyzer is used in this method to collect data from the lower computer and send it to the host computer, and the upper computer also sends data to the lower computer through the CAN bus analyzer.

[0044] In this embodiment, a certain type of nitrogen oxygen sensor is taken as an example, and the calibration method of the nitrogen oxygen sensor of the present invention includes the following steps:

[0045] (1) Importing the created DBC database file for parsing the message content of the nitrogen oxide sensor standard part into the host computer;

[0046] (1.1) Use VectorCANdb++ software to create a DBC database file. The created DBC file contains the baud rate, message ID, message name, number of bytes in the message data field, network node of the message, and explanation of the message;

[0047] (1.2) Import the created DBC database file into the host computer.

[0048] (2) Obtain the message of the standard parts of the nitrogen oxide sensor. The process is as follows:

[0049] (2.1) Connect the low-level CAN bus of the standard part to the low-level CANZ bus of the CAN bus analyzer, and connect the high-level CAN bus of the standard part to the high-level CAN bus of the CAN bus analyzer; connect the host computer to the CAN bus analyzer through the PC USB interface;

[0050] (2.2) Provide 24V regulated DC power supply to the standard parts according to the NOx sensor model;

[0051] (2.3) The host computer sends a start data frame and a stop data frame to the standard part through the CAN bus analyzer to obtain the CAN messages sent by the standard part when it is working and when it stops working; the process in this embodiment is to send a start frame to the standard part through the CANTest software, the start frame ID is 0x18FEDF00, the data is FF FF FF FF FF FF FF 01, and the sending period is 100ms; the nitrogen oxygen sensor receives the start frame and starts working, and the sensor works through four stages: power-on-heating-oxygen effective-nitrogen oxygen effective, waiting for the sensor to reach the nitrogen oxygen effective stage and the NOx concentration value to drop until it stabilizes;

[0052] (2.4) Send a stop frame to the standard part through the CANTest software. The stop frame ID is 0x18FEDF00, the data is FFFF FF FF FF FF FF 00, and the sending cycle is 100ms. The sensor stops working after receiving the stop frame.

[0053] (2.5) Save the CAN messages sent by the standard parts during the test through the CANTest software;

[0054] (3) Automatically parse CAN messages and extract message features based on the DBC database file. The process is as follows:

[0055] (3.1) Import the CAN message obtained in step (2) to the host computer. Through the DBC file, the host computer automatically parses the standard CAN message information obtained from the CAN message; parses the frame ID and message content of the start frame and stop frame of the sensor message, the main frame ID and main frame message content, and the additional frame ID and additional frame message content information as follows:

[0056] It is analyzed that the main frame ID sent by this model of nitrogen oxide sensor when working normally is 0x18F00F52, which is sent every 50ms. After the main frame works normally and stably, the data is 4A 13 C8 FA 55 9F FF FF, and the 8-bit data is numbered D0-D7 from left to right;

[0057] Among them: D0 D1 is (NOx concentration value (hexadecimal number converted to decimal number))*0.05-200; D2 D3 is the oxygen concentration value, the value change of D4 "0x01->0x05->0x45->0x55" indicates the indicator light of the sensor working through the four states of power-on-heating-oxygen effective-nitrogen oxygen effective; the value change of D5 "0xDF->0xBF->0x9F" indicates the three stages of the heating process rising-effective-stable; D6 indicates the NOx concentration, and D7 indicates the fault state of oxygen;

[0058] After sending the stop frame, when the sensor stops working, the main frame data is always FF FF FF FF FF FF FF FF;

[0059] The sensor sends an additional frame when it stops working, and stops sending when it works normally. The additional frame sending cycle is 1 second, and stops sending when it works normally. The additional frame ID is 0xCFD1151, and the data is C4 0C D1 03 7D 00 00 FF. The additional frame D0 D1 bit shows the current sensor temperature value, and D2-D7 bits are fixed values; the "0x" before the data indicates that the number is a hexadecimal number; according to the parsed message information, extract the message features such as cycle and heating status bit information;

[0060] (4) Feature parameter adaptation: the process is as follows:

[0061] (4.1) The upper computer sends the extracted CAN message features to the lower computer;

[0062] (4.2) The lower computer selects the corresponding characteristic parameters according to the CAN message characteristics provided by the upper computer, completes the adaptation of different types of nitrogen oxide sensors, and obtains the part to be calibrated;

[0063] (5) Test the standard parts and the parts to be calibrated of the nitrogen oxide sensor. The process is as follows:

[0064] (5.1) Place the standard parts and the parts to be calibrated with adapted characteristic parameters under NOx concentrations of 0ppm, 100ppm, 500ppm, and 1000ppm;

[0065] (5.2) Send start frame and stop frame commands to the standard parts and the parts to be calibrated through the host computer for testing;

[0066] (5.3) The host computer automatically obtains the NOx concentration measured when the standard parts and the parts to be calibrated are working under the NOx concentration environment of 0ppm, 100ppm, 500ppm, and 1000ppm;

[0067] (6) Calculate the calibration coefficient

[0068] According to the NOx concentrations of 15ppm, 115ppm, 508ppm, and 1006ppm measured by the host computer under four NOx concentration environments, the NOx concentration values ​​of 2.7ppm, 99.95ppm, 500.04ppm, and 993.45ppm measured by the standard parts are used as reference standards. Through the obtained 4 groups of NOx concentration values ​​x of the parts to be calibrated and the NOx concentration value y of the standard parts, four groups of data (x, y) are obtained: (2.7, 15), (99.95, 115), (500.04, 508), and (993.45, 1006). The four groups of data are fitted using a first-order polynomial Y=ax+b. According to the formula

[0069] Wherein, x is the NOx concentration value of the part to be calibrated, y is the NOx concentration value of the standard part, a is the gain of the NOx concentration value x of the part to be calibrated, b is the offset of the NOx concentration value x of the part to be calibrated, and Y is the NOx concentration value obtained after the correction of the NOx concentration value x of the part to be calibrated; the calibration coefficients are calculated as a=0.99717, b=13.9427;

[0070] (7) The host computer writes the calibration coefficients into the microcontroller of the part to be calibrated to complete the calibration.

[0071] After calculating the calibration coefficients a=0.99717, b=13.9427, the host computer writes the coefficients a=0.99717, b=13.9427 into the EEPROM (electrically erasable programmable read-only memory) of the microcontroller of the part to be calibrated. When the microcontroller is working, it corrects the NOx concentration value measured by the nitrogen oxide sensor by reading the calibration coefficient set in the EEPROM. Compared with the NOx concentration value measured by the standard part, the error range is controlled within 10ppm, and the calibration is completed.

Claims

1. An automatic calibration method for a nitrogen oxygen sensor, characterized in that: The following steps are involved: (1) Importing a DBC file for message parsing of a standard part of a nitrogen oxide sensor created by VectorCANdb++ into a host computer; the DBC file includes a baud rate, a message ID, a message name, the number of bytes in the message data field, a network node of the message, and an explanation of the message; (2) Obtaining messages of the standard parts of the nitrogen oxide sensor: connecting the low-level CAN bus of the standard parts to the low-level CANZ bus of the CAN bus analyzer, and connecting the high-level CAN bus of the standard parts to the high-level CAN bus of the CAN bus analyzer; connecting the host computer to the CAN bus analyzer via a PC; providing a 12V or 24V regulated DC power supply to the standard parts according to the model of the nitrogen oxide sensor; the host computer sends a start data frame and a stop data frame to the standard parts via the CAN bus analyzer, and obtaining CAN messages sent when the standard parts are working and stopping; (3) parsing the CAN message according to the DBC file and extracting the message features; the CAN message includes the frame ID of the start frame and the stop frame, the main frame, the additional frame, the message content and the sending cycle; the message features include the cycle and the heating state; (4) Feature parameter adaptation: (4.1) The upper computer sends the extracted CAN message features to the lower computer; (4.2) The lower computer selects the corresponding characteristic parameters according to the CAN message characteristics provided by the upper computer, completes the adaptation of different types of nitrogen oxide sensors, and obtains the part to be calibrated; (5) Testing the standard parts and the parts to be calibrated of the nitrogen oxide sensor: changing the NOx concentration of the standard parts and the parts to be calibrated, the host computer obtains the NOx concentration values ​​measured when the standard parts and the parts to be calibrated are working in different NOx concentration environments; the process of testing the standard parts and the parts to be calibrated of the nitrogen oxide sensor is as follows: (5.1) Place the standard parts and the parts to be calibrated of the same model in the same NOx concentration environment; (5.2) Sending start frame and stop frame commands through the host computer to make the standard parts and the parts to be calibrated work, and wait for the nitrogen and oxygen concentration value measured by the sensor to reach a valid state; (5.3) Changing the NOx concentration in the environment of the standard part and the part to be calibrated, the host computer obtains the NOx concentration values ​​measured when the standard part and the part to be calibrated are working in different NOx concentration environments; (6) The upper computer calculates the calibration coefficient based on the NOx concentration value x of the calibrated part and the NOx concentration value y of the standard part measured under different NOx concentration environments; the process is: through the first-order polynomial y=ax+b fitting, the calibration coefficients a and b are calculated according to the following formula, and the NOx concentration measurement error is reduced through calibration: Wherein, x is the NOx concentration value of the part to be calibrated, y is the NOx concentration value of the standard part, a is the gain of the NOx concentration value x of the part to be calibrated, b is the offset of the NOx concentration value x of the part to be calibrated, and Y is the NOx concentration value obtained after the NOx concentration value x of the part to be calibrated is corrected; (7) The host computer writes the calibration coefficients into the microcontroller of the part to be calibrated to complete the calibration.

Citation Information

Patent Citations

  • A novel nitrogen and oxygen sensor calibration and testing system

    CN113295751B

  • Digital mining gas sensor calibration and verification device and method

    CN112505246A