The OpenHA namespace is almost empty.
Everything in the namespaces of OpenHA submodules is public. In general, it is recommended to import functions from submodule namespaces. For example, the function acai()
(defined in OpenHA\assessment\attribute\degree_of_controllablity.py
) should be imported like this:
from OpenHA.assessment.attribute import acai
result = acai(...)
This form of importing submodules is preferred for all submodules.
In some cases, the public API is one level deeper. For example, the OpenHA.assessment.attribute
module is public, and the functions it contains are not available in the OpenHA.assessment
namespace. Sometimes it may result in more easily understandable code if functions are imported from one level deeper.
The OpenHA is aimed to be an open source framework to help users from various fields to build their own PHM applications. However, objectively, the focus of our research is mainly concentrated on multicopters. Most of the functions included in this package are based on our research achievements, which are appliable for multicopters. The proposed algorithms or theories have been published and the papers are available on the official homepage. That is the best we can do so far. So you are welcome to join us to develop your new health assessment algorithms for other platforms including multicopters, such as planes, ships, vehicles, etc.
On the other hand, some other excellent packages and open-source projects are depended on by OpenHA to avoid reinventing the wheel. These packages provide have been optimized by experienced engineers or programmers. We don't have the reason or motivation to reinvent the wheel since they have provided us with powerful tools to process data. Some of the most commonly used packages are introduced as follows.
NumPy. NumPy is the fundamental package for scientific computing in Python. It contains lots of classes and functions that you may need in scientific computing and it's also the foundation of many other packages. If you don't know it, go to learn it first. By the way, importing this package in the following way is recommended.
xxxxxxxxxx
import numpy as np
SciPy. SciPy is a collection of mathematical algorithms and convenience functions built on the Numpy extension of Python. It adds significant power to the interactive Python session by providing the user with high-level commands and classes for manipulating and visualizing data. With SciPy, an interactive Python session becomes a data-processing and system-prototyping environment rivaling systems, such as MATLAB, IDL, Octave, R-Lab, and SciLab.
matplotlib. Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations in Python. We may develop more top-level functions to make it more convenient to visualize your assessment results in the future. Anyway, matplotlib is always the first choice if you want to plot a variable in Python. By the way, it is recommended to use the following magic command to make it interactive in Jupyter Notebook.
xxxxxxxxxx
%matplotlib widget # or `%matplotlib ipympl` alternatively
import matplotlib.pyplot as plt
scikit-learn. Scikit-learn is an open source machine learning library that supports supervised and unsupervised learning. It also provides various tools for model fitting, data preprocessing, model selection, model evaluation, and many other utilities.
ProgPy. The NASA Prognostics Python Packages (ProgPy) are a set of open-sourced python packages supporting research and development of prognostics and health management tools. They implement architectures and common functionality of prognostics, supporting researchers and practitioners. ProgPy consists of a set of packages. See the documentation specific to each package for more information.
Once again, if some algorithms are unavailable in the above packages or projects, you are welcome to report an issue in GitHub to let us know, or you can implement it and create a Pull Request. We will check it as soon as possible.
There is a table of all the submodules and functions defined in OpenHA.
All the documentations are available via the links.
OpenHA.assessment
OpenHA.processing
OpenHA.prognotics
OpenHA.core
functions | description |
---|---|
get_interval | |
load_ANN | Loads an object saved with torch.save() or tf.train.Saver() from a file. |
split_dataset | Split the dataset into train and test subsets randomly. |
OpenHA.assessment.attribute
functions | description |
---|---|
acai | Computes the degree of controllability (DOC) based on the Availability Control Authority Index, namely ACAI, which is proposed by Guang-Xu Du. |
control_allocation | Returns the control allocation matrix of a multicopter. |
doc_disturbance_rejection_kang | Compute the new measure representing degree of controllability for disturbance rejection. |
doc_gramian | Compute the Gramian-matrix-based DOC. |
doc_recovery_region | Computes the DOC based on the recovery region. |
profust_reliability | Compute the profust reliability according to the research by Zhiyao Zhao. |
trapezoidal_membership_func | Returns the degree of membership of the state x to a set, whose membership function is trapezoidal |
OpenHA.assessment.system
functions | description |
---|---|
analytical_hierarchy_process | Computes the weight of each element according to pairwise comparison matrix A . |
gate_and | Calculates probability of an "AND" gate. |
gate_not | Calculates probability of a "NOT" gate. |
gate_or | Calculates probability of an "OR" gate. |
gate_xor | Calculates probability of a "XOR" gate. |
sum_by_weight | Calculates the weighted sum. |
OpenHA.processing.feature
functions | description |
---|---|
average_rectified_value | Calculates the average rectified value. |
central_moment | Calculates the k-th central moment. |
kurtosis | Compute the kurtosis. |
raw_moment | Calculates the k-th raw moment. |
skewness | Compute the skewness. |
variance | Calculates the variance. |
OpenHA.processing.preprocessing
functions | description |
---|---|
interpolation | Interpolation. |
local_outlier_factor | The Local Outlier Factors (LOF) of all the points are computed. |
OpenHA.prognostics.data_based
functions | description |
---|---|
bay_set_model | Train Bayesian network model. |
baynet_inference | Reload pre-trained Bayesian network model and predict the probability of faults. |
OpenHA.prognostics.model_based
Under developing...