Control Panel Graphing: Difference between revisions

From Phidgets Support
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__


In the [[Phidget Control Panel]], open the channel for your device and click on the [[Image:plot.jpg|link=]] icon next to the data type that you want to plot. This will open up a new window:
In the Windows version of the [[Phidget Control Panel]], open the channel for your device and click on the [[Image:plot.jpg|link=]] icon next to the data type that you want to plot. This will open up a new window:


[[Image:plot2.jpg|link=]]
[[Image:plot2.jpg|link=|850px]]


== Raw Data Graph ==
== Raw Data Graph ==
Line 49: Line 49:
You can change the Chart Type selection to apply transforms to the data that may provide further insights into your sensor data.
You can change the Chart Type selection to apply transforms to the data that may provide further insights into your sensor data.


[[Image:ChartTypes.jpg|400px|center|link=]]
[[Image:ChartTypes.jpg|600px|center|link=]]


=== Fast Fourier Transform (FFT) ===
=== Fast Fourier Transform (FFT) ===
Line 63: Line 63:




The FFT plot reveals that a significant fraction of the noise is coming from a 60Hz source; in this case, the signal wire was left disconnected and picking up noise from the power grid. You can increase the graph length to sharpen the frequency spikes, just know this will take the graph longer to react to changes in the incoming data.  
The FFT plot reveals that a significant fraction of the noise is coming from a 60Hz source; in this case, the signal wire was left disconnected and picking up noise from the power grid.


In general, the FFT plot is most useful for analyzing sensor data where frequency has useful real-world implications, such as measuring vibrations of an accelerometer, or checking for 50/60Hz interference form the power grid.
You can increase the graph length to sharpen the frequency spikes, just know this will take the graph longer to react to changes in the incoming data. In general, the FFT plot is most useful for analyzing sensor data where frequency has useful real-world implications, such as measuring vibrations of an accelerometer, or checking for 50/60Hz interference.


=== Allan Deviation ===
=== Allan Deviation ===
Line 76: Line 76:
If you need more complex functionality such as logging multiple sensors to the same sheet or performing calculations on the data, you'll need to write your own program. This graphing tool is intended as a jumping-off point to better understand your sensors individually, so you can get a feel for how to use them in your applications.
If you need more complex functionality such as logging multiple sensors to the same sheet or performing calculations on the data, you'll need to write your own program. This graphing tool is intended as a jumping-off point to better understand your sensors individually, so you can get a feel for how to use them in your applications.


The quickest way to get started is to download some [{{SERVER}}/?view=code_samples sample code] for your desired programming language and then search Google for information on logging or plotting data in that language (e.g. "how to log to csv in python").
The quickest way to get started is to download some [{{SERVER}}/?view=code_samples sample code] for your desired programming language and then search the internet for information on logging or plotting data in that language (e.g. "how to log to csv in python").

Latest revision as of 16:19, 11 October 2022


In the Windows version of the Phidget Control Panel, open the channel for your device and click on the Plot.jpg icon next to the data type that you want to plot. This will open up a new window:

Plot2.jpg

Raw Data Graph

The default graph is the Raw Data graph. This graph displays the readings from your sensor over time. This can be very helpful in visualizing sensor data in a much more concrete way than just reading numbers from the Control Panel Example.

Chart Length

You can adjust the amount of time displayed on your graph by adjusting the Chart Length slider. This can be helpful for setting up your graph to display data on timescales you are most interested in.

ChartLength.jpg


Longer Graphs

If you want to monitor a sensor over a period of hours using the Phidget Control Panel Graphing tool, you can do so by slowing down the Data Interval of your device, which will increase the amount of time that you can display on the graph.

GraphingLongInterval.jpg

Filtering

You can perform filtering on the raw data in order to reduce noise in your graph.

Filtertype.jpg

Low-Pass Filter

This filter reduces and removes high frequency components of the graphed data. It's generally used to smooth out your graph, since high-frequency noise can make a graph harder to read. Select "Low Pass Filter" from the drop down menu and move the slider to select the averaging window. The larger the averaging window, the smoother the line will be.

Note that if your filter is comparable to or longer than the period of the signal you are trying to measure, you will start to filter out the data you want along with the noise.

Lowpass.jpg


High-Pass Filter

Unlike the low-pass filter, this filter is used specifically to look at the high-frequency components of your signal. This can be used on very short timescales to characterize the high-frequency noise in the system, or it can be used over longer timescales to remove offsets to more easily gauge the scale of periodic signals. As a rule of thumb, be sure the time on the filter is longer than the period of the signal you are interested in, or you will see distortions.

Select "High Pass Filter" from the drop down menu to remove low-frequencies and offsets from your data.

Highpass.jpg

Other Chart Types

You can change the Chart Type selection to apply transforms to the data that may provide further insights into your sensor data.

ChartTypes.jpg

Fast Fourier Transform (FFT)

The FFT graph type will transform your data into a frequency plot, which can sometimes reveal hidden information about your data. For example, if you look at this raw voltage data:

Voltage-badConnection-raw.jpg


It's clear that there's just under 1mV of noise in the signal, but just from looking at the raw data it may be unclear where the noise is coming from; is it the sensor itself, or something external? Switching to the FFT plot gives us a clue:

Voltage-badConnection-fft.jpg


The FFT plot reveals that a significant fraction of the noise is coming from a 60Hz source; in this case, the signal wire was left disconnected and picking up noise from the power grid.

You can increase the graph length to sharpen the frequency spikes, just know this will take the graph longer to react to changes in the incoming data. In general, the FFT plot is most useful for analyzing sensor data where frequency has useful real-world implications, such as measuring vibrations of an accelerometer, or checking for 50/60Hz interference.

Allan Deviation

Gyro-allan.jpg

Allan Deviation is a very specialized type of graph used to compare noise characteristics between sensors. Interpreting the Allan Deviation plot is outside the scope of this guide, but in general your sensor should be stabilized (e.g. if it's a spatial, it should be stationary. If it's a temperature sensor, the ambient temperature should be kept at a static level).

More Complex Graphing

If you need more complex functionality such as logging multiple sensors to the same sheet or performing calculations on the data, you'll need to write your own program. This graphing tool is intended as a jumping-off point to better understand your sensors individually, so you can get a feel for how to use them in your applications.

The quickest way to get started is to download some sample code for your desired programming language and then search the internet for information on logging or plotting data in that language (e.g. "how to log to csv in python").