Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
nvlinhvn committed May 10, 2024
1 parent 87b0cfd commit 217bbb8
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 20 deletions.
2 changes: 1 addition & 1 deletion HSTransform.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: HSTransform
Version: 0.1.1
Version: 0.2.1
Summary: A Package to Compute S-transform with Hyperbolic Window
Author: Linh V Nguyen
Author-email: linhvietnguyen.ee@gmail.com
Expand Down
10 changes: 5 additions & 5 deletions HSTransform.egg-info/requires.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
numpy
scipy
pandas
matplotlib
pytest
numpy>=1.21.2
scipy>=1.7.1
pandas>=1.3.3
matplotlib>=3.4.3
pytest>=6.2.5
39 changes: 31 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,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 part 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 @@ -33,7 +42,7 @@ 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:

```
<pre>
from hstransform import HyperbolicSTransform as HSTransform

# Create input signal (for example: Voltage signal)
Expand All @@ -52,13 +61,27 @@ hs = HSTransform()

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

### 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)

![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)
We can also observeo different types of faults can generate different real-imaginary trajectory in S-transform at varying level of frequencies.

## 6. Communication

Expand Down
Binary file removed dist/HSTransform-0.1.1-py3-none-any.whl
Binary file not shown.
Binary file removed dist/HSTransform-0.1.1.tar.gz
Binary file not shown.
12 changes: 6 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

setup(
name='HSTransform',
version='0.1.1',
version='0.2.1',
packages=find_packages(),
license='MIT',
author='Linh V Nguyen',
Expand All @@ -23,11 +23,11 @@
long_description=long_description,
long_description_content_type="text/markdown",
install_requires=[
'numpy',
'scipy',
'pandas',
'matplotlib',
'pytest'
'numpy>=1.21.2',
'scipy>=1.7.1',
'pandas>=1.3.3',
'matplotlib>=3.4.3',
'pytest>=6.2.5'
],
classifiers=[
'Development Status :: 4 - Beta',
Expand Down

0 comments on commit 217bbb8

Please sign in to comment.