---
title: Use the Normalization Processor Function
slug: manufacturing-connect-edge/use-the-normalization-processor-function
docTags: 
createdAt: 2024-05-24T20:16:32.821Z
---

You can use the Normalization processor function to eliminate redundant data and ensure that collected PLC data is on the same scale. Normalization also eliminates undesirable characteristics like Insertion, Update, and Deletion Anomalies.

The value range is observed, and the next value is normalized to a range between 0 and 1 based on the chosen method. The values use a moving window algorithm and are placed between 0 and 1 based on the previous window.

# Understanding Different Normalization Types

You have the following normalization types:

- **Min-Max:&#x20;**&#x53;cale the data points between minimum and maximum values in that window. This will ensure that all the transformed values fall between 0 and 1.
- **Average Standard Deviation:&#x20;**&#x53;tandardize features in the moving window by subtracting the mean and dividing by the standard deviation. This results in features with an average of zero and a variance of one.

# User Scenario

Review the following scenario for the normalization processor function. Then, you will simulate PLC data and normalization outputs using an input processor.

PLC sensors in a beverage bottling plant monitor variables like liquid temperature, fill level, and bottle placement speed. Applying the normalization function to these readings will help to scale the data points within a 0-1 range for each batch. This uniform scaling is crucial for the machine learning model used in quality control, as it compares current production metrics with historical data to detect and rectify any deviations, ensuring consistent product quality and optimal production efficiency.

# Step 1: Add a Device

Follow the steps to [Connect a Device](docId\:nm1lQfefyA-DSIfFitIty) and configure the following parameters:

- **Device Type**: Simulator
- **Driver Name**: Generator
- **Enable Alias Topics**: Select the checkbox.&#x20;

# Step 2: Add Tags

After connecting the device, add the following tags. See [Add a Tag](docId\:h5heqIcXrCY3NCH9KBg9I) to learn more.&#x20;

## Tag 1: tag1

- **Name**: Select **S - Random value generator**
- **Value Type:** Select **float64**
- **Polling Interval**: Enter **5**
- **Tag Name**: Enter **tag1**
- **Min\_value**: Enter **101**
- **Max\_value**: Enter **199**

# Step 3: Create Analytics Flows

You can now create the analytics flows using data from the device and tag you previously created. Follow the appropriate step out of 3a or 3b based on the two normalization types you want to use.

**To create an analytics flow with the Normalization Processor function:**

1. Navigate to **Analytics**.&#x20;
2. On the analytics canvas, click **Add processor.**
   The *Create a processo*r dialog box displays.
   ![](https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/1P7HshGnW1nndEOUyfeUi_image.png "The Add processor option")
3. Select **DataHub Subscribe**.
4. In the *Topic&#x20;*&#x66;ield, click the **Search&#x20;**&#x69;con, select the device you previously created, and then select the alias topic for the **tag1**.
   ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/_3lHUTgcrRm1tt01ncgmF_image.png" size="80" width="1141" height="571" position="center" caption="Create a Processor dialog box" showCaption="true"}
5. Click **Save**.

## Step 3a: Configure Min-Max Normalization&#x20;

1. Click **Add processor** again and select **Normalization&#x20;**&#x70;rocessor.
   The following information defines this function:
   - **Mode**: Select the **Min-Max** normalization type from the drop-down menu.
   - **Window Size:&#x20;**&#x45;nter the number of values you want the function to consider.
2. Click **Save**.
   ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/l16Rc-fTjKLDOKdypvvla_image.png" size="80" width="1143" height="664" position="center" caption="Normalization dialog box" showCaption="true"}
3. Connect the DataHub Subscribe processor (tag: *tag1*) to the Normalization processor with a wire and use the **events** connection.
4. On the analytics canvas, click **Save**.

The configured analytics flows should look like the following:&#x20;

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/dau5LtmXYE_kvJfoSM2pF_image.png" size="80" width="752" height="420" position="center" caption="Completed Normalization flow canvas" showCaption="true"}

## Step 3b: Configure Average-Standard Deviation Normalization&#x20;

1. Click **Add processor** again and select **Normalization&#x20;**&#x70;rocessor.
   The following information defines this function:
   - **Mode**: Select the **Average-Standard Deviation** normalization type from the drop-down menu.
   - **Window Size:&#x20;**&#x45;nter the number of values you want the function to consider.
2. Click **Save**.
   ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/UbDpbapSNt7qJz3hnPYy-_image.png" size="80" width="1136" height="662" position="center" caption="Normalization dialog box" showCaption="true"}
3. Connect the DataHub Subscribe processor (tag: *tag1*) to the Normalization processor with a wire and use the **events&#x20;**&#x63;onnection.
4. On the analytics canvas, click **Save**.

The configured analytics flows should look like the following:&#x20;

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/4qWtc-cv2G4eBV0vXY89z_image.png" size="80" width="756" height="358" position="center" caption="Completed Normalization flow canvas" showCaption="true"}

# Step 4: View Output of Processor

Click the **View&#x20;**&#x69;con in the *Normalization&#x20;*&#x70;rocessor to view the output values.

## View Min-Max Normalization Output

The normalization function normalizes the last 5 values from the defined *tag1*, and the next value is again placed between 0 and 1 based on the previous window.&#x20;

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/ie3k-eRhMU3OT1zZ_2LYa_image.png" size="80" width="749" height="527" position="center" caption="Min-Max Normalization Output" showCaption="true"}

## View Average-Standard Deviation Normalization Output

The normalization function normalizes the last 5 values from the defined *tag1*, and the next value is again placed between 0 and 1 based on the previous window.&#x20;

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/gNAnU33BpItwKHcIwJNWL_image.png" size="80" width="771" height="517" position="center" caption="Average-Standard Deviation Normalization Output" showCaption="true"}

