Adaptive oscillator for gait phase identification.
Project description
Adaptive Oscillator
AOs can be described as a mathematical tool able to synchronize with a rhythmic and periodic signal by continuously estimating its fundamental features (i.e. frequency, amplitude, phase, and offset). For their properties, AOs found applications in gait pattern estimation strategies, where they are used to mimic the dynamics of the neuromechanical oscillators in charge of the rhythmical human locomotion. In addition, as gait periodicity can be captured by sensors recording joint kinematics, their application does not require a complex sensory network.
Install
To install the library run: pip install adaptive-oscillator
Development
- Install Poetry
make initto create the virtual environment and install dependenciesmake formatto format the code and check for errorsmake testto run the test suitemake cleanto delete the temporary files and directoriespoetry publish --buildto build and publish to https://pypi.org/project/adaptive-oscillator
Usage
"""Basic usage for the adaptive oscillator."""
def main() -> None:
"""Run a simple demonstration."""
# Initialize system
controller = AOController(show_plots=True)
while True:
t, x_axis_angle, x_axis_vel = read_from_sensor()
th = np.deg2rad(x_axis_angle)
dth = np.deg2rad(x_axis_vel)
controller.step(t=t, x=th, x_dot=dth)
controller.plot_results()
if __name__ == "__main__":
main()
Results
The plot below shows the results being plotted in real time.
Repo Structure
The files and folders below are used for development purposes. This repo tree can be updated with make tree.
├── docs
│ ├── adaptive oscillators.pdf
│ └── results.png
├── src
│ └── adaptive_oscillator
│ ├── log_files
│ │ ├── __init__.py
│ │ ├── main.py
│ │ └── parser.py
│ ├── utils
│ │ ├── __init__.py
│ │ ├── log_utils.py
│ │ ├── plot_utils.py
│ │ └── time_utils.py
│ ├── __init__.py
│ ├── __main__.py
│ ├── base_classes.py
│ ├── controller.py
│ ├── definitions.py
│ └── oscillator.py
├── tests
│ ├── __init__.py
│ ├── adaptive_oscillator_test.py
│ ├── base_classes_test.py
│ ├── conftest.py
│ ├── controller_test.py
│ ├── parser_utils_test.py
│ ├── plot_utils_test.py
│ ├── time_utils_test.py
│ └── utils_for_test.py
├── .gitignore
├── .pre-commit-config.yaml
├── CONTRIBUTING.md
├── LICENSE
├── Makefile
├── README.md
├── poetry.lock
├── pyproject.toml
└── repo_tree.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file adaptive_oscillator-0.2.1.tar.gz.
File metadata
- Download URL: adaptive_oscillator-0.2.1.tar.gz
- Upload date:
- Size: 19.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.14.2 Darwin/25.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4503e171ce74bcd45d513191425d2404a72eb05bfeccc8ba8c9947f94981ad5
|
|
| MD5 |
06fe53847f359e6c786af43671da7932
|
|
| BLAKE2b-256 |
cd92426ae138ce7d3c31c00e9613d34de389399b929f3d207d7caa98a4738e0e
|
File details
Details for the file adaptive_oscillator-0.2.1-py3-none-any.whl.
File metadata
- Download URL: adaptive_oscillator-0.2.1-py3-none-any.whl
- Upload date:
- Size: 22.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.14.2 Darwin/25.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c5f13ce4eebb670c5ed17da8c1ea4ab2fca5d8821214ea483a1e1e79a01f2d0
|
|
| MD5 |
faee7913ab4fe72f9379155529db8320
|
|
| BLAKE2b-256 |
1d779b8a61fa0227deb3076b996f3c3f551e94b925e721eb1fe0255367972a08
|