# Expert Virtual Sensor

You can select an *Expert* template when creating a Virtual sensor in the Aranet cloud:

<div data-with-frame="true"><figure><img src="/files/s8Xlt9yQIYlJA2C48uHO" alt=""><figcaption></figcaption></figure></div>

This formula represents calculations to be made with measured data of **up to 10 sensors**. All input sensors must have the same *metric*. The result of the calculations will have the same *metric* as the input sensors.

Formula variables are:

* ***x(t)*** - input sensors measurement, *unit* is defined by the sensor's configuration;
* ***k*** -  slope, a real number in the range of *-1e+10* to *1e+10;*
* ***b*** - offset, the same *unit* as the input sensor;
* ***n*** - number of sensors, *min = 1*, *max = 10*;
* ***m*** - normalising factor, a real number in the range of *-1e+10* to *1e+10, **must not be equal to 0**.*&#x20;

Indeed, *Offset, Average and Sum* are special cases of the *Expert* formula.

Simple implementation of this formula can give you a more precise value of, f.e, average temperature in the room. Let's take, for example, a room where 3 pcs. of individually calibrated temperature sensors are placed:

<div data-with-frame="true"><figure><img src="/files/srGizO1ha5zdAA8x6sD7" alt=""><figcaption></figcaption></figure></div>

Sensors' offset values were obtained experimentally by comparing measured data with laboratory-grade thermometer data.

Sensor #1 has offset **b2 = -0.8°** and is placed near the Air Conditioner, so its measurements are affected by cold airflow and should be corrected by slope, let's say **k2 = 1.12.**

Sensor #2 has offset **b3 = 0.7°** and is placed in the centre of the room and its measurements are not affected by external influences, so the slope is **k3 = 1**.

Sensor #3 has offset **b1 = 0.6°** and is placed on the sunny side of the room, so in the daytime, its measured temperature is affected by sun radiation and should be corrected by slope, let's say **k1 = 0.914**.

In this case, consider **m = n = 3**, the last measurement readings are visible in the input column: **x1 = 24.5**, **x2 = 20.2**, **x3 = 20.1**. And the calculated virtual sensor out is **21.6°.** This value can be considered as the room's average temperature.

Let's say you want to compare the temperature between the indoor temperature without an air conditioner and the outdoor temperature. For that, you can create a virtual sensor that measures the delta between temperatures, and you can arrange alarm thresholds to get notifications when the sensor exceeds them. In this way, you can control when you should open or close your window to ventilate the room.

<div data-with-frame="true"><figure><img src="/files/fNLTIIHeFFpsqSllRnre" alt=""><figcaption></figcaption></figure></div>

Virtual sensor to create delta - now outdoors is close to 22.7 degrees Celsius hot and the room is 19.5, so you should use -1 as a multiplier to calculate the delta.\
The second step is Alarm based on the virtual sensor:

<div data-with-frame="true"><figure><img src="/files/blR6QGa3ZhqkCUVLg3zg" alt=""><figcaption></figcaption></figure></div>

Result - if the outside is hotter than indoors by at least 1 degree, I get notifications to open the window and cool the room in a natural way.  When during evening temperature drops lower than the room temperature, I am notified to close the window and maintain the room in a mild condition

And this is how you see it in notifications - Alarm is active as delta is above 1 degree.

<div data-with-frame="true"><figure><img src="/files/9NUijukYEUUj497Pg7m0" alt=""><figcaption></figcaption></figure></div>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.aranet.com/aranet-cloud-page/aranet-cloud-landing-page/user-interface-and-core-features/sensors/virtual-sensors/expert-virtual-sensor.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
