Skip to content

adding three new posts, and removing a duplicate #61

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .README.md.swp
Binary file not shown.
74 changes: 0 additions & 74 deletions content/post/pmu-siting.md

This file was deleted.

42 changes: 42 additions & 0 deletions content/post/point-on-wave-1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
date: '2021-08-06T01:00:00Z'
description: Exploring point on wave data using spectral analysis
featuredImage: '/assets/images/post/point-on-wave-2/fig1.png'
tags: ["btrdb", "python", "angles", "wams", "analytics", "phasors"]

title: Point on Wave Data (Part 1)
author: miles
---


PMU phasor data is created from point-on-wave (POW) data, which is the raw voltage waveform of a node on the power grid. Below is a window of POW data from the GridSweep sensor, which has a sampling rate of 4.3kHz, measuring the voltage at a household outlet in Oakland, CA [1]. This means we are measuring the voltage at a node of the distribution grid in that area. This data can be found at POW/GridSweep in the NI4AI database.

![png](/assets/images/post/point-on-wave-1/fig1.png)

As you can see, raw POW data is visually hard to interpret. One thing we can do is look at its frequency spectrum using the discrete fourier transform (DFT):

![png](/assets/images/post/point-on-wave-1/fig2.png)

From the spectrum, we see most of the signal power at the base frequency of 60Hz, as well as significant power in the odd harmonics at 180Hz, 300Hz, 420Hz, etc.

One thing we can do with point-on-wave data that we cannot do with phasor data is compute the harmonic distortion present in the voltage signal. The total harmonic distortion (THD) compares the power present in the fundamental frequency of 60Hz to the power present in the higher-order harmonics. The formula for THD is as follows:

$$
THD = \sqrt{\frac{V_2^2 + V_3^2 + V_4^2 + ... + V_n^2}{V_1}}
$$

Where $V_1$, $V_2$, $V_n$ correspond to the 1st, 2nd, and nth harmonic, respectively.

To compute the THD, we need to look at the peaks of the signal’s DFT. To get a more accurate estimate of the peak magnitude, we interpolate between the DFT data points by fitting the data to cubic polynomials, as shown below. This is done using the [spline interpolation](https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.splrep.html) functions provided by scipy.

![png](/assets/images/post/point-on-wave-1/fig3.png)

The plot above of the 7th harmonic near 420Hz illustrates that the true maximum frequency lies somewhere between the discrete frequencies computed by the DFT. Using an interpolation allows us to get a closer estimate of the maximum. In this way, we find the 7th harmonic, $V_7$, of the formula for the THD above.

To compute the THD, we find the maximum amplitude for each harmonic in the spectrum. Computing the THD this way, we get the following value:

```python
THD = 0.038
```

Which means the total power in the harmonics are 3.8% of the power of the fundamental frequency of 60Hz.
31 changes: 31 additions & 0 deletions content/post/point-on-wave-2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
date: '2021-08-06T01:00:00Z'
description: Visualizing point on wave data with spectrograms
featuredImage: '/assets/images/post/point-on-wave-2/fig2.png'
tags: ["btrdb", "python", "angles", "wams", "analytics", "phasors"]

title: Point on Wave Data (Part 2)
author: miles
---


We can also visualize how the spectrum changes in time by computing the spectrogram. After taking a spectrogram, we see

![png](/assets/images/post/point-on-wave-2/fig1.png)


We see the harmonics present in the spectrogram as well.

Additionally, because this data has a high sampling frequency as well as a long time window, we see the frequency domain with a high level of detail. Zooming into the low frequencies we see some interesting features:

![png](/assets/images/post/point-on-wave-2/fig2.png)


Horizontal lines are sustained oscillations, and we see some sustained oscillation at subharmonics 30Hz and 15Hz. Vertical lines are transient events that contain many frequency components over a short amount of time.
We see pings which are transient events with frequencies centered around 20Hz.
We also see a sustained oscillation that changes its frequency in a seemingly random manner.
Since this data is initially unlabelled, a next step is to identify these different signals in the spectrogram. Having information about devices that may be affecting the local household voltage will help to associate these signals.


## References
[1] Data recorded during on-going U.S. Dept of Energy Project "GridSweep: Frequency Response of Low-Inertial Bulk Grids": 24 hours of GPS-time-stamped 4.3kHz point-on-wave sampling at 29-bit resolution, single-phase 120-volt nominal, recorded at Alex McEachern's residential kitchen in Alameda, California, USA on 2021/05/10 - 2021/05/11.
Loading