Skip to main content

2 Points Calibration

1. What Is Two-Point Calibration?​

Two-point calibration is a measurement-system calibration method that uses two known reference values and their corresponding raw sensor readings to establish a linear relationship between the sensor input and the calibrated output.

This method can compensate for both offset and gain errors:

  • Offset error: The sensor reports a non-zero reading when the actual input is zero.
  • Gain (slope) error: The sensor reading does not change at the correct rate as the measured value changes.

Compared with one-point calibration, which normally corrects only the offset, two-point calibration provides more accurate correction across the calibrated measurement range.

2. How Does Two-Point Calibration Work?​

Two known reference values are applied to the sensor. The raw sensor reading at each reference value is then recorded. These two reference-reading pairs define a straight calibration line.

The calibrated value is calculated using the following formula:

y = R1 + ((R2 - R1) / (S2 - S1)) * (x - S1)

Where:

ParameterDescription
xCurrent raw sensor reading
yCalibrated output value
R1First known reference value
S1Raw sensor reading measured at R1
R2Second known reference value
S2Raw sensor reading measured at R2

After the two calibration points are configured, the device uses this linear relationship to convert subsequent raw sensor readings into calibrated output values.

3. Example​

Assume the following two calibration points:

Reference ValueRaw Sensor Reading
0120
100980

In this example, R1 = 0, S1 = 120, R2 = 100, and S2 = 980. The device uses the straight line defined by these two points to calculate the calibrated output for each raw sensor reading.

For example, when the raw sensor reading is 550, the calibrated value is:

y = 0 + ((100 - 0) / (980 - 120)) * (550 - 120)
= 50

Assuming that the device uses the following two-point calibration command:

AT+2pCal=R1,S1,R2,S2

The two calibration points in this example would be configured as follows:

AT+2pCal=0,120,100,980

This means:

  • When the reference value is 0, the raw sensor reading is 120.
  • When the reference value is 100, the raw sensor reading is 980.
  • The device uses these two points to calculate all calibrated output values.

4. Notes​

  • S1 and S2 must not be the same value.
  • The calibration assumes a linear relationship between the raw sensor reading and the reference value.
  • Use stable and accurately known reference values.
  • Select two reference points that cover the range in which accurate measurements are required.
  • Values outside the calibrated range are extrapolated from the same linear relationship and may have greater error.

5. Applicable Models​

This two-point calibration function applies to the following model:

  • PS-LB

For the supported firmware version, AT commands, downlink commands, parameter units, and configuration examples, refer to the AT command section in the corresponding product user manual.