API Reference

Guidelines for importing functions from OpenHA

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:

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.

Dependencies

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.

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.

API definition

There is a table of all the submodules and functions defined in OpenHA.

All the documentations are available via the links.

OpenHA.core

functionsdescription
get_interval 
load_ANNLoads an object saved with torch.save() or tf.train.Saver() from a file.
split_datasetSplit the dataset into train and test subsets randomly.

OpenHA.assessment.attribute

functionsdescription
acaiComputes the degree of controllability (DOC) based on the Availability Control Authority Index, namely ACAI, which is proposed by Guang-Xu Du.
control_allocationReturns the control allocation matrix of a multicopter.
doc_disturbance_rejection_kangCompute the new measure representing degree of controllability for disturbance rejection.
doc_gramianCompute the Gramian-matrix-based DOC.
doc_recovery_regionComputes the DOC based on the recovery region.
profust_reliabilityCompute the profust reliability according to the research by Zhiyao Zhao.
trapezoidal_membership_funcReturns the degree of membership of the state x to a set, whose membership function is trapezoidal

OpenHA.assessment.system

functionsdescription
analytical_hierarchy_processComputes the weight of each element according to pairwise comparison matrix A.
gate_andCalculates probability of an "AND" gate.
gate_notCalculates probability of a "NOT" gate.
gate_orCalculates probability of an "OR" gate.
gate_xorCalculates probability of a "XOR" gate.
sum_by_weightCalculates the weighted sum.

OpenHA.processing.feature

functionsdescription
average_rectified_valueCalculates the average rectified value.
central_momentCalculates the k-th central moment.
kurtosisCompute the kurtosis.
raw_momentCalculates the k-th raw moment.
skewnessCompute the skewness.
varianceCalculates the variance.

OpenHA.processing.preprocessing

functionsdescription
interpolationInterpolation.
local_outlier_factorThe Local Outlier Factors (LOF) of all the points are computed.

OpenHA.prognostics.data_based

functionsdescription
bay_set_modelTrain Bayesian network model.
baynet_inferenceReload pre-trained Bayesian network model and predict the probability of faults.

OpenHA.prognostics.model_based

Under developing...