`What products are involved in this article?This article is based on the use of RCP (Rheonics Control Panel) connected to the SME (Smart Module Electronics) operating SRD, DVP, and DVM. Hence it can be used for any of these Rheonics sensors.`
`What is the purpose of this article?Explain the process to get a temperature compensated density when it has a linear trend. Usual applications are with fluids with a linear dependency on temperature.`

`1. Temperature-compensated Density`

Density, defined as the substance's mass per unit of volume is an important fluid property that has an increasing presence in monitoring processes and control systems.

Density is affected by temperature and pressure. For most liquids, the Density decreases with temperature. As pressure increases, the density of any stable material also increases, markedly in gases, and almost negligibly in liquids and solids.

In most cases, we want to monitor the fluid density at a constant reference temperature. If the process temperature isn’t constant, an additional source of error to the control system is added. To avoid the temperature dependence on the fluid’s density and truly monitor its consistency, the temperature compensated density is introduced.

To compensate for temperature effects, the Rheonics Control Panel offers the following models Linear, Polynomial, or ASTM functions.

`2. Math model`

The SRD sensor can measure inline density, viscosity, and temperature. With the use of mathematical models, temperature compensated measurements can be obtained.

Below is the mathematical formula for the density linear model used in the RCP (Rheonics software).

Equation 1: Density Linear Model.

Where:

ρcomp - Compensated density, calculated by the Sensor.

ρL - Line density, read by the Sensor.

- Coefficient, specified by the user.

- Temperature, read by the Sensor.

Tref - Reference temperature, is the temperature around which the Sensor will compensate for the readings. This is defined and should be specified by the user.

`3. Checking the data`

The first step to achieving a compensated density requires the user to take samples of density at different temperatures, these temperatures must be higher and lower than the operation temperature range in your process. Once enough data is obtained (to see the linear behavior), the user should define the reference temperature. For this example, the blue point (15°C) is used as the typical set-point temperature of the process line.

The following steps outline the correct procedure for data analysis:

3.1. Select the reference temperature and density from data obtained in tests. Here, reference temperature and density are highlighted in blue in the next Table, we want to create a correlation at 15°C where we expect a density of 1.00 g/cc.

 Temperature [°C] Density [g/cc] 0 1.75 5 1.50 10 1.25 15 1.00 20 0.75 25 0.50 30 0.25

Table 1. Data points from inline measurements.

3.2. Plot data points of Density vs Temperature to study the behavior of the data. In this scenario, a straight line can represent the data behavior.

Figure 1: Plot chart Density vs Temperature

3.3To obtain coefficient A from equation 1, which is the slope of the line, we need to calculate it with the following equation 2. Another way to obtain the A coefficients is using the linear regression method.

Equation 2. Slope calculation

In that way, the calculated coefficient would be  A = -0.05. Then we need to calculate the density compensated with Equation 1.

 ρcomp = ρL + A (Tref - T) @15 °C Results ρcomp = 1.75 -0.05 (15- 0) @15 °C 1 ρcomp = 1.50 -0.05 (15- 5) @15 °C 1 ρcomp = 1.25 -0.05 (15- 10) @15 °C 1 ρcomp = 1.10 -0.05 (15- 15) @15 °C 1 ρcomp = 1.00 -0.05 (15- 20) @15 °C 1 ρcomp = 0.85 -0.05 (15- 25) @15 °C 1 ρcomp = 0.75 -0.05 (15- 30) @15 °C 1

Table 2. Compensated density calculation table.

With all the input parameters set on the Sensor through the RCP software, the temperature compensated viscosity will look like the next graph in Figure 2.

Figure 2. Expected results when applying the mathematical model.

`4. How to load models into the Sensor electronics?`

The calculation tab on RCP allows configuring the Sensor to run mathematical models for viscosity, density, and concentration. Expert mode needs to be enabled for this.

Figure 3. Calculation tab for the linear model of density.

The following steps are needed to load the models into the Sensor electronics:

1. In the dropdown list “Select Measurement to Apply Model” and choose “Density”.

2. In “Select Model from list” select the model you would like to use for the specific parameter. When you select the model, you will get more information about the specific equation used and the coefficients you will need to apply to that model.  Select “Density Linear Model”

3. Input A calculated coefficient. For this example, it has a value of -0.05.

4. Input reference temperature is used to find the coefficients models. In this example is 15°C.

5. Click “Upload Model” to load the model settings into Sensor electronics. The button should turn GREEN for a couple of seconds if the action was successful or turn RED if the operation was unsuccessful. This action will refresh the values for the uncompensated and compensated indicators. Here you can verify if the model is calculating the expected values. If not, you can correct and repeat the process.

6. Click “Load Configuration” to update the display and channel configurations in Sensor electronics.

4.1. Handling Sensor Outputs

For the SME-TRD, the compensated viscosity values can be shown on the display. Select the line to display the parameter:

Figure 4. Selecting read line for LCD display.

Select the analog channel to send data, this can be verified in the “Service” Tab

Figure 5. Selecting analog output channel

Measurement can always be accessed at the register address that is displayed.

Figure 6. Modbus TCP/IP register

4.2 Demonstration Video

Video 1. Configuration Density Linear model in RPC Software.