Soft sensor correction
This topic describes the Soft Sensor Correction component.
Function description
The Soft Sensor Correction component corrects prediction results for drift. It uses input lab values and the corresponding predicted values from historical data to perform the correction.
Calculation logic
When the lab value correction confirmation signal changes from "Verifying" to "Verified":
The component determines time T from the input year, month, day, hour, and minute parameters. It then reads historical "Predicted Value" data from IGate within a time range of deltaT (maximum time drift) around time T-K (prediction model time drift). From this data, the component finds the predicted value Y_p that is closest to time T-K.
If no historical data exists in this time range:
Outputs: D=0, E=0, Y_c=Y_mod, ST1=False, ST2=False, ST3=True.
If historical data exists in this time range:
Outputs: E=Y_lab-Y_p, D=w*E+(1-w)*D_p, Y_c=Y_mod+D, ST1=False, ST2=False, ST3=False.
When the lab value correction revoke signal changes from "Revoking" to "Normal":
Outputs: D=D_p, E=E_p, Y_c=Y_mod+D, ST1=False, ST2=False, ST3=False.
In all other cases:
Outputs: D=D_p, E=E_p, Y_c=Y_mod+D, ST1=SW1, ST2=SW2, ST3=False.
Parameter descriptions:
Y_mod: The input predicted value.
Y_lab: The input lab value.
SW1: The input lab value correction confirmation signal.
SW2: The input lab value correction revoke signal.
w: The input weight.
Y_p: The historical predicted value closest to time T-K.
D_p: The correction amount from the previous output.
E_p: The actual drift from the previous output.
D: The output correction amount.
E: The output actual drift.
Y_c: The output corrected predicted value.
ST1: The output verification in-progress status.
ST2: The output revocation in-progress status.
ST3: The output correction abnormal status.
Parameter description
IN port - input parameters
Parameter name | Description | Required | Data Type | Data Source Type |
year | Year | Yes | Integer Note An exception is thrown if non-numeric data exists. | Any |
month | Month | Yes | Integer Note An exception is thrown if non-numeric data exists. | Any |
day | Day | Yes | Integer Note An exception is thrown if non-numeric data exists. | Any |
hour | Hour | Yes | Integer Note An exception is thrown if non-numeric data exists. | Any |
min | Minute | Yes | Integer Note An exception is thrown if non-numeric data exists. | Any |
SW1 | Lab value correction confirmation signal | Yes | Boolean or Integer (0/1) Note An exception is thrown if the data is not Boolean or 0/1. | Any |
SW2 | Lab value correction revoke signal | Yes | Boolean or Integer (0/1) Note An exception is thrown if the data is not Boolean or 0/1. | Unlimited |
Y_lab | Lab value | Yes | Integer or Float Note An exception is thrown if non-numeric data exists. | Any |
Y_mod | Predicted value | Yes | Integer or Float Note An exception is thrown if non-numeric data exists. |
|
OUT port - output parameters
Parameter | Description | Output Data Type |
D | Correction amount | Float |
Y_c | Corrected predicted value | Float |
E | Actual drift | Float |
ST1 | Verification in-progress status | Boolean |
ST2 | Revocation in-progress status | Boolean |
ST3 | Correction abnormal status | Boolean |
Other parameters
Parameter | Description | Required | Default Value | Range |
Weight | The weight coefficient for correction. | Yes | 1 | [0,1] |
Prediction model time drift | The time drift between the model's predicted value and the current time. Unit: seconds. | Yes | 0 | [0,99999999] |
Maximum time drift | Unit: seconds. | Yes | 600 | [0,99999999] |
Output quality code description
The output quality code is processed as follows:
If no historical data exists in the correction time range, or if the quality codes of all historical data are in the range [0,192), the output quality code is 0.
In all other cases, the output quality code is 192.