Virtual Sensors

A virtual sensor is a regression model that computes a measured quantity from existing signals rather than measuring it with dedicated hardware. Where the target quantity can be reconstructed from channels that are already recorded, the physical sensor can be dropped from the series product. Data Sensors trains such models from your own measurement data and exports them as standalone C, C++, Python or MATLAB code.

today Pressure sensor dropped in production measures directly with a virtual sensor Existing channels Speed · Load · Temperature Model on the ECU exported C code computes Measured value p identical quantity Control loop
The dashed route is the one dropped in production; the blue one takes its place. Both end at the same measured value, and the control loop receives the same figure either way.

What is a virtual sensor

Many quantities measured in a vehicle or a machine depend systematically on other quantities that are already recorded. A torque depends on speed, injection quantity and temperature; a pressure depends on load, flow rate and operating point. Where such a relationship exists, it can be determined from measurement data as a regression: the model takes the existing channels as inputs and returns the target quantity.

A model of this kind is called a virtual sensor (also a soft sensor in the literature). It supplies a measured value without a transducer being fitted at that point.

Create Virtual Sensor dialog with input and output channels selected, training data source, and auto-tune hyperparameters enabled

When a physical sensor can be dropped (and when it cannot)

The sensor is dropped from the series product, not from development. Training requires the target quantity to be measured and recorded with a physical sensor. It is therefore still needed during testing, as the reference on the test bench or in the test vehicle, to determine the relationship and to assess the accuracy of the model. In the series product, the model then takes its place.

Nor does a virtual sensor replace a quantity that cannot in principle be reconstructed from the existing channels. If the information is not present in the input signals, no model can derive it. Evaluation on a held-out validation split, that is on data the model was not trained on, gives an indication. A poor result there can have several causes: too little data, an operating range that is not covered, or input quantities that do not carry the relationship. Which of these applies can be narrowed down by extending the data set and the input selection.

Whether a virtual sensor may replace a measuring point is decided by the responsible department, on the basis of its own validation and the standards that apply to the product.

Where Data Sensors fits in

Data Sensors covers the path from the measurement file to deployable code: loading measurement data (CSV, MAT, MDF/MF4, TXT or a decoded CAN trace), selecting the input channels and the target signal, training a model (random forest, XGBoost or neural network, with hyperparameters determined automatically) and exporting the result as standalone code.

Every trained sensor appears as a signal of its own in the virtual signals panel, separate from the real channels, and can be examined there directly against the loaded measurement. Training runs entirely on your own machine: no cloud upload, no account, no separate Python environment.

Virtual Signals panel showing a trained Random Forest signal with edit and delete buttons

Further reading