Control Panel Graphing: Difference between revisions
No edit summary |
|||
(3 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 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 | 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. | 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 | 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 icon next to the data type that you want to plot. This will open up a new window:
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](https://cdn.phidgets.com/docs/images/thumb/e/ea/ChartLength.jpg/400px-ChartLength.jpg.png)
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](https://cdn.phidgets.com/docs/images/thumb/b/be/GraphingLongInterval.jpg/600px-GraphingLongInterval.jpg.png)
Filtering
You can perform filtering on the raw data in order to reduce noise in your graph.
![Filtertype.jpg](https://cdn.phidgets.com/docs/images/thumb/b/bd/Filtertype.jpg/400px-Filtertype.jpg.png)
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](https://cdn.phidgets.com/docs/images/thumb/e/e5/Lowpass.jpg/820px-Lowpass.jpg.png)
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](https://cdn.phidgets.com/docs/images/thumb/1/18/Highpass.jpg/850px-Highpass.jpg.png)
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](https://cdn.phidgets.com/docs/images/thumb/d/d4/ChartTypes.jpg/600px-ChartTypes.jpg.png)
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](https://cdn.phidgets.com/docs/images/thumb/5/5b/Voltage-badConnection-raw.jpg/600px-Voltage-badConnection-raw.jpg.png)
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](https://cdn.phidgets.com/docs/images/thumb/e/ec/Voltage-badConnection-fft.jpg/600px-Voltage-badConnection-fft.jpg.png)
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
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").