PCA Model block

Description

The Principal Component Analysis (PCA) Model block provides the following information for a pre-loaded PCA model:

  • The contribution of each variable to the total process variability
  • The loading of each principle component (Eigenvector value)
  • The Distance to Model (D2Mod) value
  • The Hotelling TSquared (T2) values

The PCA block contains one input port, one parameter port and two output ports.  

The PCA model itself is loaded from an XML file deployed from the Discrete and Batch Troubleshooter where the model is constructed.  

PCA calculations can be performed:

  • On every execute (continuous mode)
  • Over a moving time window
  • At the start of each new batch

Return to Overview of blocks

PCA block

Block Type

Rules and Models block (Model block / Moving window)

Input port

The input port contains all the fields used in the PCA model which is constructed in and imported from the Discrete & Batch Troubleshooter. Double click the PCA block to configure the properties of the block.

The input port may contain only double type fields and must contain all fields used in constructing the loaded PCA model. These fields are selected when configuring the Properties page of the text source file. The input port must contain all fields used in constructing the loaded PCA model, and these input fields must be mapped to the required fields of the PCA model.

Parameter port

The parameter port is optional and is used when calculating values for batches.  It is also used for batch comparisons, making use of a cutoff threshold as an alarm indicating bad batches.  A field is selected as a trigger signalling the start of a new batch, and the model then executes when the trigger field identifies the start of a new batch. If there is a lengthy delay between the end of the last batch, and the start of a new batch when the model executes, delays can be experienced in receiving model outputs, as only when the trigger field value changes will the PCA output values in the output port be calculated and updated.  BAD_QUALITY input samples are ignored for calculation triggers.  

The parameter port must contain fields of double, integer or string values.  

Output port

There are two output ports which contain the following calculated values from the loaded PCA model:

Port 1: Default port:

  • Distance to model (D2MOD)

    The Distance to model values indicate how well the model has matched the actual process.  Large Distance to model values indicate a poorly performing process, and low Distance to model values indicate a process that has been accurately modeled.
  • Principle component scores

    These fields are denoted by "tn" where n is the number of the principle components of the model.  Values for these fields always indicate the principle component scores for the current input fields.
  • T2 (TSquared)

The Hotelling T2 also measures "distance from model", taking into account the multivariate covariance structure. The higher the T2 value, the more distant is the observed process from the model, and the process is performing poorly.  Conversely, the lower the T2 value, the closer the observed process is to the model, and the process is performing well.  The Distance to model value is therefore directly proportional to the T2 value, and both / either score could be used to check the accuracy of the model.

  • Variable contributions (VC_)

    These fields denote the variable contributions of each field to the total error of the process.

NOTE:  If the Calculation method is set to "Moving Window" or "Batch", these fields contain the average input values for each field over the window period or batch. D2MOD, T2, and VC output values will have used the averaged input values over the window / batch. However the Principle Component Scores use the current and specific input values, not the window or batch average.  

Port 2: Hotelling T2 Variable Contributions port:

  • The Hotelling T2 variable contributions are named Hotelling_VC_[input] where [input] is the input field that is used to calculate the Hotelling T2 in the PCA model.

Outputs can be illustrated by using probes which only show integer or double fields, or by inserting an output port showing integer, double, and string fields. Output ports are found under General blocks.

Functions performed on tags

The input values are sent through the PCA model block and the calculated output values from the model are placed in output fields of the PCA model block.

  • On the Values:

    • These output values have been discussed above, under output port.

  • On the Quality:

    • Continuous calculation method: any bad quality input value will result in a bad quality output value.

    • Moving Window and Batch calculation methods: If there is at least one good quality input value for a particular timestamp, the input values will be averaged and a good quality, averaged output value will result.  If there is not one good quality input value for a particular timestamp, bad quality output values will result.

  • On the Timestamp:

    • This is recorded at the model execute time.

Runnability

Minimum requirements for runnability on the PCA Model block:

  • Loaded and valid PCA XML model file.

  • Configured calculation method: Continuous, Moving Window, or Batch.  

  • Properly configured and mapped model/input fields. The input port must contain all fields used in constructing the loaded PCA model, and these input fields must be mapped to the required fields of the PCA model.

Return to top


Related topics:

  

CSense 2023- Last updated: June 24,2025