What You’ll Learn 📈
Differentiate between basic statistics, array statistics, classification, and counting within the Dewesoft math module
Compute basic statistics for sampled data—mean, RMS, peak, min/max, variance, standard deviation, crest factor, and coefficient of variation
Choose between time-based vs sample-based statistical calculations and understand how they differ, especially with asynchronous signals
Apply array statistics (e.g., windowed RMS or moving statistics) to analyze data segments over time
Use classification math to count the number of samples that meet specific criteria (e.g., above a threshold)
Configure counting functions for event detection—tracking signal crossings, pulses, or discrete events
Visualize statistical results live: output channels, tables, trend displays and incorporate them into dashboards for monitoring
Export statistical outputs for reporting, analysis, or integration into external processing tools
Course overview
This course explores in-depth how to leverage DewesoftX’s powerful statistical math engine to extract meaningful insights from raw measurement data. It begins with enabling the Math module and adding statistical functions via the Add math dropdown, covering basic, array, classification, and counting types.
You’ll dive into basic statistics: calculating RMS, mean, peak values, crest factor, variance, and more, and learn how to set up output channels and choose calculation modes (such as single-value, windowed, or run-based) during acquisition . The course emphasizes understanding time-based vs sample-based calculations—highlighting how sample alignment can significantly affect results with asynchronous data, as detailed in Dewesoft’s support documentation.
Next, you’ll master array statistics to compute metrics over dynamic data blocks, and classification functions to tag or count samples meeting defined conditions. These are powerful tools for detecting anomalies, threshold breaches, or event-based trends.
The training also covers counting algorithms for event detection—tracking discrete events like pulses or crossings—and shows how to visualize and monitor these metrics live via output channels and interactive displays.
By completion, you’ll be able to export statistical summaries and trend data for reporting or further processing, empowering data analysts and test engineers to validate system performance, detect anomalies, and summarize behavior effectively using DewesoftX.
Introduction to statistical calculations and counting
Dewesoft offers a variety of data acquisition sources. Simply taking raw measurements is often insufficient to achieve the desired results. Therefore, data processing is one of the most important features, allowing you to recalculate signals, apply filters, or perform other signal processing tasks.
The following section provides an overview of the Statistics and Counting math modules and explains how to use them for different purposes.
Enabling mathematics
The Statistics module is part of the Mathematics module, so you first need to ensure that the Mathematics module is enabled. On the Dewesoft Setup screen, next to the Analog and other available tabs, a Math tab should be displayed, as shown in the image below.
You can add a new statistic in Dewesoft by navigating to Math → Add Math, where you can choose from three types of statistics::
Basic statistics,
Array statistics and
Classification.
Similarly, Counting can be found and added from the Add Math drop-down menu.
What is basic statistics?
The Basic Statistics math module provides fundamental statistical quantities of the signal, such as RMS, Average, Min, Max, Sum, and Peak. These statistical functions are displayed as output channels.
A new basic statistic can be added by selecting Add Math, as described previously. Alternatively, you can adjust existing statistics by clicking the Setup button located in the upper-right corner of the already activated basic statistics line. In both cases, the following window will open:
As shown in the picture above, the Basic Statistics Setup window can generally be divided into four major parts:window in four major parts:
1. | Input | Under Input group you can select desired input channels for which you want to calculate desired statistics. The statistics support multiple input channels. |
2. | Output channels | Here it can be selected which statistics need to be calculated. Those will be then shown as separate output channels. |
3. | Calculation type | In the Calculation type group you can define parameters for calculation. |
4. | Output | Output area offers a quick preview of calculated statistics on a selected Input, which will be outputted as a channel, based on selected options under Output channels and Calculation type. |
Output channels - statistical functions
To select a statistical function, simply click (check) the box next to its name in the Output Channels section:
RMS calculates the root mean square value of the signal.
Quadratic RMS is similar to RMS, except that all values are squared twice and then summed.
Median is the numerical value separating the higher half of a data sample from the lower half.
Average calculates the mean or middle point of the signal.
Peak is the maximum deviation of the signal from the average value.
Peak-to-peak is the difference between the minimum and maximum values.
Crest factor is the ratio between the peak and RMS value and provides an indication of spikes in the signal. Pure sine waves have a crest factor of 1.41.
Sum provides the total of all acquired values based on the selected calculation type (sample- or time-dependent).
Minimum calculates the minimum value of the signal over the specified period.
Maximum calculates the maximum value of the signal over the specified period. This is a very intensive operation and is therefore unavailable in Running mode.
Time of minimum calculates the exact time at which the minimum value occurs.
Time of maximum calculates the exact time at which the maximum value occurs.
Variance indicates how the possible values of a signal are spread around the expected value.
COV (coefficient of variation) is a normalized measure of the dispersion of a probability distribution. It is calculated as the ratio between the standard deviation and the mean.
Standard deviation measures the spread of the signal values around the mean, showing how widely the values in a data set are distributed. If the data points are close to the mean, the standard deviation is small; if all data values are equal, the standard deviation is zero.
Calculation type
In this section, five basic calculation types will be described:
Block based,
Running,
Single value,
Triggered blocks and
Start-stop blocks.
Time and sample based calculation
Before we discuss the calculation types, it is important to note that the Block-based and Running calculation types are computed according to the specified time interval or the number of samples.
Time-based (in seconds) defines the time interval for calculation. In our example, 0.1 seconds means that the statistical quantities will be calculated over 0.1-second intervals. Therefore, the resulting channels will have an update interval of 0.1 seconds.
With time-based calculation, each signal is resampled to a synchronous sample, and each of these synchronous samples is used as an input element for the statistical calculations.
Sample-based (number of samples) defines the number of samples used for calculation. The resulting channels will have an update interval corresponding to the defined sample block size. It is important to note that every single sample is used as an input value for the statistical calculations.
Asynchronous signals are not interpolated; each of their values is carried forward to the next sample.
Examples:
Single value, Sample-based calculation:
If you have only two samples in a measurement with values of 5 and 10, the single-value average for a sample-based calculation will equal 7.5. This calculation is independent of time or when the two samples were acquired.
Single value, Time-based calculation:
In this case, the calculation is based on time, so the average depends on each sample's time duration and when the samples were acquired. For example, in a 10-second measurement with two samples—one with a value of 5 at 2 seconds and the other with a value of 10 at 4 seconds, as shown in Image 6—the single-value average will equal 7.
Block based
Block-based calculation computes the statistical quantities over a specific time interval defined by the block size.
The block size can be defined either by time or by the number of samples.
Overlap is useful when a specific time interval is required, but a higher update rate of the resulting channels is still desired. Overlap determines (similar to FFT averaging) how much "old" data is included in the next calculation. This increases the update rate of the results while keeping the same number of data points. Overlap can be specified either as a percentage or as an absolute value.
In the example shown in the picture, the quantities will be updated at 0.1-second intervals with 50% overlap. This means that the second block will not be calculated at the end of the first block, but halfway through it. Therefore, the first block will cover 0 to 0.1 seconds, the second block 0.05 to 0.15 seconds, the third block 0.1 to 0.2 seconds, and so on.
Running
Running calculation is an extreme form of overlapping. In this case, the second block is calculated after only one sample following the first block. The block size has the same meaning as in block-based calculation.
With this method, we can only calculate RMS, Average, Quadratic RMS, Variance, and Standard Deviation statistical functions, because all others would be too computationally intensive (especially Minimum and Maximum, while all other functions are related to these two).
Single value
Single Value is the simplest calculation and has no settings. It outputs only one value at the end of the measurement. Although the result is updated during the measurement, only the final value will be stored in the data file.
Triggered blocks
The Triggered Blocks option calculates the statistical value based on a specific trigger event. The calculation begins at the start of the acquisition. When a trigger event is detected, the first calculation stops, the statistical value is recorded along with its timestamp, and a new calculation begins. Any channel can be defined as the trigger channel, and the settings for the trigger condition are the same as those used for alarms or storage triggers.
Start/stop blocks
The Start/Stop Blocks option calculates the statistical value beginning at a specific trigger event. When a start event is detected, the calculation begins. When a stop condition is detected, the value is recorded in the resulting channel along with the timestamp of the stop event. The calculation then waits until the next start event occurs. The start and stop channels can be any channel, including different channels, and the trigger conditions have the same options as those used for alarms or storage triggers.
What is array statistics?
An array is a systematic arrangement of objects, typically organized in rows and columns. Array statistics can be used to calculate statistical values from the array.
Several options are available when using array statistics:
Minimum finds the minimum value in the array. Two output channels are created: Class and Value. Class indicates which index of the array holds the parameter, and Value represents the minimum value itself.
Index of Minimum shows the position of the minimum in the array.
Axis Position of Minimum shows the position of the minimum in axis units.
Maximum finds the maximum value in the array. Two output channels are created: Class and Value. Class indicates which index of the array holds the parameter, and Value represents the maximum value itself.
Index of Maximum shows the position of the maximum in the array.
Axis Position of Maximum shows the position of the maximum in axis units.
Average calculates the average value of all elements in the array.
Sum calculates the sum of all elements in the array.
Variance calculates the variance of all elements in the array.
Array area
The output channel can be calculated from the full array area, or a custom array area can be specified.
If we want to use only a selected area from the data array, we need to define the area using the From and To coordinates. In these two fields, we enter two numbers representing the coordinates of the array. The first number corresponds to the x-coordinate (0,0), and the second number corresponds to the y-coordinate (0,0).
When working with arrays, this means defining the top-left corner and the bottom-right corner of the table that we want to use as the array area.
What is classification?
Classification is a procedure used to count values from a channel and sort them into classes. A classical example from primary school would involve creating classes and counting the number of students with specific weights or heights.
In the measurement field, classification is applied in various contexts. For example, it can be used to determine the distribution of power grid frequencies over time or to analyze the distribution of sound levels to which a certain area or workplace is exposed.
The default setup of the Classification math module looks like this:
Calculation type
First, we need to define the result of the classification. This is done in the Calculation Type area of the classification setup, where there are three options to choose from:
Single value based – The result will be a single array containing the result of the entire run.
Block based – The result will be a set of arrays, with each array corresponding to a defined block size. The block size is defined in seconds. For example, if the block size is 2 seconds and data is acquired for 10 seconds, we will obtain 5 arrays of classification values, each representing 2 seconds of data.
Running – A running total is the cumulative sum of a sequence of numbers, updated each time a new number is added to the sequence by adding the new value to the previous running total.
The option Show class as a separate channel is available only when the Single value based calculation type is selected. It creates a single-value channel for each class element, which provides a convenient way to display the values in the multimeter.
Class definition
For class definition, we need to set the following parameters:
Lower limit – Sets the lower boundary for the start of counting. All values below this level will be included in the first class.
Upper limit – Sets the upper boundary for the end of counting. All values above this level will be included in the last class.
Class count – Defines the number of classes. In the example above, the width of each class is 5/20 = 0.25. The first and last classes have half the width, so the first class ranges from 0 to 0.125. The second class has a midpoint of 0.25 and ranges from 0.125 to 0.375, and so on.
Histogram type – Defines the output format of the data (amplitude).
Absolute count – Each class value represents the number of samples within the class. Values are cumulative and always count up.
Relative count – Each class value represents the number of samples in the class normalized to the total number of counted samples. The sum of all classes is always 1.
Relative count [%] – Same as relative count, but expressed as a percentage. The sum of all classes is always 100.
Density – Provides the empirical probability density. Each class value represents the number of samples normalized to the total number of samples and divided by the class width. In this case, the value does not depend on the number of classes within a range.
Density [%] – Same as density, but multiplied by 100.
Distribution – Provides the empirical probability distribution. Each class value represents the sum of all lower classes plus the number of samples in the current class, normalized to the total number of samples. The highest class has a value of 1.
Distribution [%] – Same as distribution, but expressed as a percentage. The highest class has a value of 100.
Statistics and distribution
There are also several special output channels available, which are defined under Statistics:
Skewness – Measures the asymmetry of the probability distribution.
Kurtosis – Measures the "peakedness" of the distribution.
Additionally, we can output a list of distribution point values. Distribution points are the class values at which the distribution reaches a specified value.
Currently, distribution points work only when Distribution is chosen as the histogram type. Histograms can be viewed in the 2D graph during measurement and analysis. If block-based calculation is selected, a 3D graph can also be used to display the history of classifications.
What is counting?
Counting is a standard procedure used to reduce the amount of data for analysis. For example, counting is applied in road load data collection, where there may be a static load with an additional dynamic load on top.
As described in the Introduction section, counting, like statistics, can be found within the Dewesoft Math module, and its default setup appears as follows:
Counting is based on rain-flow analysis. This is because the only values of interest for analysis are the heights of load cycles and the average static load of each cycle.
Counting setup definition
The counting procedure counts the peaks and valleys of the signal.
Local extreme detection
The Hysteresis under Local Extreme Detection is defined as a percentage of the class width. This helps prevent excessive false counts when the signal is noisy.
Algorithm settings
There are several Counting Methods to choose from:
Peak Counting – counts the number of peaks in the signal within specific classes. You can choose the counting direction:
Peaks
Valleys
Both peaks and valleys
Range Counting – counts the range between successive peak and valley pairs. Ranges are positive when the slope between peaks and valleys is positive. You can choose to count in:
Positive direction
Negative direction
Both directions
Level Crossing – counts the number of times the signal crosses various levels. As with range counting, you must choose the counting direction.
There are also three possible output values under Data Normalization:
Absolute – outputs the number of cycles as a value, which increases over time.
Relative – outputs the number of cycles normalized to the absolute number of cycles; the sum of all values will always equal 1.
Relative [%] – outputs the number of cycles normalized to the absolute number of cycles and multiplied by 100; the sum of all values will always equal 100.
Visualization
For all options, you must also define Visualization – the number of classes for the average value, minimum, and maximum value. Alternatively, you can define the minimum and maximum values based on the range of input parameters.
Page 1 of 6