Skip to content

Commit

Permalink
build package
Browse files Browse the repository at this point in the history
  • Loading branch information
nvlinhvn committed May 10, 2024
1 parent 7e6b922 commit 547724f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 8 deletions.
39 changes: 31 additions & 8 deletions HSTransform.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,16 @@ Package for Hyperbolic S-transform

## 1. Introduction

HS Transform is a Python package for performing Hyperbolic S-transforms. The S-transform is a time-frequency representation that combines the best properties of the Short-time Fourier Transform and the Wavelet Transform. It provides simultaneous information on both the frequency content and temporal localization of a signal.
HS Transform is a Python package for performing Hyperbolic [S-transform](https://en.wikipedia.org/wiki/S_transform) [[1]](#1). The S-transform is a time-frequency representation that combines the best properties of the Short-time Fourier Transform and the Wavelet Transform. It provides simultaneous information on both the frequency content and temporal localization of a signal.

This is a work of my [published paper](https://ieeexplore.ieee.org/document/8423487)

### References

<a id="1">[1]</a>
Stockwell, R.G., Mansinha, L. & Lowe, R.P., (1996).
Localization of the complex spectrum: the S transform.
IEEE Trans. Signal Process., 44(4), 998–1001, doi:10.1109/78.492555

## 2. Dependencies

Expand Down Expand Up @@ -46,8 +55,8 @@ After installation, you can test the package using the included test scripts:

Here’s an example of how to use HS Transform to analyze a signal with voltage disturbance and power system fault:

```
from hstransform import HyperbolicSTransform as HSTransform
```python
from hstransform import HSTransform

# Create input signal (for example: Voltage signal)
t = np.linspace(0, 10, 100) # timeseries
Expand All @@ -65,13 +74,27 @@ hs = HSTransform()

# Perform the transform
signal = V_sag
S_transformed = st.fit_transform(t, signal)
S_transformed = hs.fit_transform(t, signal)
```

![alt text](./img/power_quality_disturbance.png)
![alt text](./img/power_quality_disturbance_trajectory.png)
![alt text](./img/fault_current.png)
![alt text](./img/fault_trajectory.png)
### 5.1 Power Quality Disturbance

![](https://raw.githubusercontent.com/nvlinhvn/HSTransform/main/img/power_quality_disturbance.png)

The figure showed HS-transform is able to detect the transient disturbances like notch, spike. Meanwhile, those signals from Morlet Wavelet transform are not obviously recognized.

![](https://raw.githubusercontent.com/nvlinhvn/HSTransform/main/img/power_quality_disturbance_trajectory.png)
We can see also different types of voltage disturbance can generate different real-imaginary trajectory in S-transform at different frequencies.

### 5.2 Power System Faults

![](https://raw.githubusercontent.com/nvlinhvn/HSTransform/main/img/fault_current.png)

As can be seen, both Wavelet and S-transform are able to detect when the fault occur (huge change in current magnitude). Wavelet transform seems more sensitive with noise with high distortion compared with HS-transform.

![](https://raw.githubusercontent.com/nvlinhvn/HSTransform/main/img/fault_trajectory.png)

We can also observe different types of faults can generate different real-imaginary trajectory in S-transform at varying levels of frequencies.

## 6. Communication

Expand Down
Binary file added dist/HSTransform-0.2.1-py3-none-any.whl
Binary file not shown.
Binary file added dist/HSTransform-0.2.1.tar.gz
Binary file not shown.

0 comments on commit 547724f

Please sign in to comment.