Signal-To-Noise (SNR) Ratio
A helpful indicator of "Noisy" PI Points
- Any comments \ corrections or recommendations about the contents of this blog will be appreciated.
- If you found this blog interesting, please share a few inputs about how you fine-tune compression & exception settings for your PI Points.
Data collection settings in the PI System, is a key topic since such settings eventually impact the data resolution in your data archive. We always aim for higher data resolutions in our data archive with the expectation that it will help us to achieve a high data-fidelity and enable any decision making process in our day-to-day activities in the plant to be reliable enough and based on "real" data. Such tendency to achieving an accurate representation of the raw-data is only natural but it can also be a major pitfall…
When very "aggressive" compression and exception limits are used, these may give rise to other negative effects which ultimately may impact the Signal-to-Noise ratio (SNR), namely acquiring more "Noise" than meaningful Data. In very large PI systems having thousands of tags, it might become a challenge to identify all those "noisy" points out there.
It is certainly possible to improve your SNR without using any sophisticated tools, complex math equations, extensive programming codes, PHD in statistics or a huge CAPEX budget. This blog is intended to provide a simplistic approach to easily identify "noisy" PI-Points in your PI System and encourages fine-tuning compression and exception limits to achieve a better SNR.
- The variables in discussion are Numerical variables having continuous real numbers. Strings, Booleans, Stepwise variables are out of scope.
- The focus of this guide is primarily in enhancing the SNR as an indicator of noise for numerical data points in the PI System and it does not cover the compression & exception topic end-to-end. For a complete coverage of this topic please see this OSI KB.
- In no way, should the contents of this article be regarded as a rigorous mathematical proof nor as a scientific axiom. It should be regarded more as heuristics and readers are encouraged to advise industry best practices, OSISoft's user guides and common sense to ensure correctness and accuracy of their data collection settings.
SIGNAL-TO-NOISE RATIO: What is it ?
[Wikipedia]: Signal-to-Noise Ratio (SNR) is a measure used for comparing the level of a desired signal to the level of background noise. SNR is defined as the ratio of signal power to the noise power, often expressed in decibels. A ratio higher than 1:1 (> 0 dB) indicates more signal than noise. Signal-to-noise ratio is sometimes used metaphorically to refer to the ratio of useful information to false or irrelevant data in a conversation or exchange.
Computing SNR: The signal to noise ratio (SNR) is defined as the ratio of the expected value (mean) to the standard deviation.
- s is the sample standard deviation
- X "hat" is the sample mean
- SNR is expressed in dB since the logarithmic scale provides means to emphasizing the differences between noise and the expected value.
SNR calculated for selected PI POINTs: The following examples demonstrate how SNR ratio aids in differentiating in between efficient compression & exception limits to poorly defined ones. For each of the following graphs, SNR was calculated based on the attached excel file.
Figure #4 shows a clear case of the Noise being "stronger" than the expected value (mean value). The SNR has a negative value due to the high degree of noise in the data.
HOW CAN SNR HELP US?
Often when we add new tags to the PI System, we encounter a common challenge in defining some of the tag's attributes – compression and exception limits. It is not trivial to define compression & exception limits in a way that will help us to avoid noise overshadowing our data and on the other hand also ensure data is captured in a high fidelity for the measured variable we want to monitor.
- This OSI KB provides the basic "rules of engagement" for properly defining essential point attributes for compression and exception limits.
- The SNR analysis is a complementary measure that is relatively easy to calculate and helps to identify "noisy" data points (existing or new).
- Overall, by considering both points above, one can make sure that their compression and exception limits are properly configured to avoid the "noisy" effect impacting trends and overshadowing data as well as achieving proper data resolution.
USING THE EXCEL TEMPLATE TO CALCULATE SNR
- The 1st worksheet in the excel file contains a brief explanation how to use the worksheet for calculating SNR.
- The 2nd worksheet contains a table of user-inputs and calculated values (see below).
- The 3rd worksheet contains a chart with all user-selected tags and their SNR values calculated vs. time.
- The inputs required from the user are as follows:
(1) A list of PI POINTs names.
(2) Required Time Frame for the SNR calculation.
- The following variables are calculated (or retrieved from the PI system):
Current value of the given pi-point
Unit of Measurement, retrieved from the pi-point configuration
Maximal value within the user-selected time-frame
Average value within the user-selected time-frame
Minimal value within the user-selected time-frame
Standard Deviation for the user-selected time-frame
"Zero", Retrieved from the pi-point configuration
Calculated in Excel based on "Zero" and "Span"
Span, Retrieved from the pi-point configuration
Compression Deviation, Retrieved from the pi-point configuration
Compression % Deviation, Retrieved from the pi-point configuration
Exception Deviation, Retrieved from the pi-point configuration
Exception % Deviation, Retrieved from the pi-point configuration
Note ! For a detailed description of all pi-point attributes please refer to the PI Data Archive system management guide.
Figure 5 - SNR Calculated for a few selected tags
PROCEDURE FOR CALCULATING & UNDERSTANDING SNR VALUES
Figure 6 - SNR calculated for selected tags
- Open the excel file and Go to the Report Tab.
- Populate the "Tag" column with PI Points that you would to analyze.
- Select a relevant* time-frame for the calculation.
*A relevant time frame is one which considers a fair sample size for the given variable's span.
- Review the values retrieved & calculated – Maximum, Minimum, Average and Standard Deviation to get a good idea of each pi point's data characteristic
- Open the "SNR_Chart" Tab to get a graphical representation of the SNR values calculated for the selected tags. Notice for example that the points "Reactor 455 Level" and "Tank 129 Pressure" show high degree of noise recorded in figure 7.
- Now that we've identified the "suspicious points" corresponding to SNR < 0. It is recommended to use PI Processbook\VISION or PI System Explorer to create a trend and visualize the data. Visualization helps in confirming the "suspicious points" with the naked eye as well as in deciding to what extent (and if) should our compression and\or exception limits be modified.
- Once we have decided and changed our compression and exception settings, it is best to wait for a while until a meaningful sample size is collected and afterwards repeat the procedure (from step#5) to make sure we've reduced the noise level to the desired level.
Figure 7 - SNR values plotted for the selected tags
|Be Careful! While the SNR measure is useful for identifying "noisy" data points, it should not be regarded as the only measure and as the "holy bible". Apply common sense! and OSI recommendations when you define compression & exception limits for your pi points to avoid "over-tuning" your attributes to a possible "information loss" scenario.|