|
ENERGY MONITOR 0.2
|
signal class the parent class for every other signal or any form of time-sorted (time,value) vectors More...
#include <signal.h>
Classes | |
| struct | _analytics |
| struct | _subSignals |
| struct | maximas_minimas |
| (time, value) representation of peaks and troughs of a signal More... | |
| struct | pattern |
Public Member Functions | |
| const maximas_minimas * | get_valMaximas () const |
| get value peaks in the signal | |
| const maximas_minimas * | get_valMinimas () const |
| get value troughs in the signal | |
| const maximas_minimas * | get_dvBdtMaximas () const |
| const maximas_minimas * | get_dvBdtMinimas () const |
| const bool | isTimeAnalysed () |
| check if the signal was analysed in the time domain | |
| bool | dataViable () |
| bool | loadData (std::string name, std::string fileLocation=settings.get_setting("signal","import_path")) |
| load data from a file directly if it has the following format (time,value) | |
| bool | loadData (v_container _data) |
| load data first two columns from a dataTable structure into this signal with order (time,value) | |
| bool | loadData (std::vector< double > time, std::vector< double > vals) |
| load data from a time vector and a values vector | |
| bool | analyse () |
| generalized huge analysis in the time domain fetches basic data | |
| bool | pdf_export (std::string name, std::string file_address=settings.get_setting("signal","export_path")) |
| export valuable signal report (images and text)//in the pdf format | |
| bool | exportSignal (std::string name, bool export_all=false, sig_exp expType=sig_exp::csv, std::string fileLocation=settings.get_setting("signal","export_path")) |
| export the signal data to a specific file | |
| bool | importSignal (std::string name, std::string fileLocation=settings.get_setting("signal","import_path")) |
| import a signal in the .sig binary format | |
| void | set_trigger_level (double v) |
| sets the trigger level for the trigger level based frequency calculation | |
| void | set_hysteresis (double upThreshold, double lowThreshold) |
| sets the hysteresis parameters for the hysteresis trigger frequency calculations | |
| const _analytics * | get_analytics () const |
| get analytics of the time_domain analysed signal | |
| const v_container * | get_signal_data () const |
| get any values in the signal data table | |
| void | make_subsignals (std::vector< pattern > &pattern, _subSignals &sig) |
| a function that keeps generating subsignals based on the pattern provided that holds pattern start time and pattern endtime | |
| _subSignals * | subSignal_periodBased () |
| get the subSignals generated from this signal based on their periodic times pattern | |
| _subSignals * | subSignal_valueBased () |
| get the subSignals generated from this signal based on their rms for periods times pattern | |
Protected Types | |
| enum | freq_calc_t { triggerLevel = 1 , peakNdtrough = 2 , triggerHysteresis = 3 } |
| decide the frequency calculation type More... | |
| enum class | pattern_type { periodic = 1 , transient = 2 } |
| using | json = nlohmann::json |
Protected Member Functions | |
| void | putValue (double val, int row, int col) |
| easy abstracted values insersion | |
| double | getValue (int row, int col) |
| easy abstracted values extraction | |
| void | refreshData () |
| refresh the dataTable that we use | |
| double | _dvBdt (double v1, double v2, double t1, double t2) |
| double | _dv2Bdt2 (double v1, double v2, double v3, double t1, double t2) |
| double | _vdt (double v1, double v2, double t1, double t2) |
| bool | pre_analyze () |
| Makes variable data out of the time-value data such as slopes and areas wrt to time. | |
| void | interpolate () |
| INTERPOLATIONS FOR FIXING LOW SAMPLE SIGNALS/DIFFERENT SAMPLING RATES. | |
| bool | soft_analyze () |
| soft time tomain analysis | |
| bool | update_local_maximas_minimas () |
| EVALUATE MAXIMAS/MINIMAS using SLOPE DATA. | |
| bool | post_local_maximas_minimas () |
| filter local MAXIMAS and MINIMAS and update ptp data (only top maximas and lowest minimas) | |
| bool | frequency_peakNdtrough () |
| calculate frequency based on Local maximas and minimas and their times respectively | |
| bool | frequency_triggerLevel () |
| calculate frequency based on crossing trigger level times | |
| bool | frequency_triggerHysteresis () |
| calculate the base_frequency with hysteresis added for noise ignorance | |
| bool | deduce_baseFrequency () |
| deduce base frequency + angular + number of periods for the signal | |
| bool | deduce_avg_rms () |
| rms and avg based on integer number of signals analysis only | |
| bool | update_slope_maximas_minimas () |
| VALUES ANALYTICS THAT EVALUATE MAXIMAS_MINIMAS using SLOPE DATA. | |
| bool | period_pattern_analysis () |
| analyse regions of the signal basesd on their periodic times (connected similar periodic times = 1 continous signal) periodic time rapid change/phase shifts in a period = transients; connected transients are considered a singular non periodic signal; | |
| bool | pattern_analyze () |
| analyse changes in the signal and store any continous patterns detected for future interval Based signal analysis | |
| std::vector< double[2]> | forrierTransform (signal base_sig) |
Protected Attributes | |
| struct signal::_analytics | analytics |
| double | min_max_accuracy = stod(settings.get_setting("signal","min_max_accuracy")) |
| double | maxima_diff_rounding = stod(settings.get_setting("signal","maxima_diff_rounding")) |
| double | minima_diff_rounding = stod(settings.get_setting("signal","minima_diff_rounding")) |
| bool | smaller_extremas_ignored = stoi(settings.get_setting("signal","smaller_extremas_ignored")) |
| double | period_diff_accuracy = stod(settings.get_setting("signal","period_diff_accuracy")) |
| bool | periodic_avg_rms = stoi(settings.get_setting("signal","periodic_avg&rms")) |
| int | frequency_calc_type = stoi(settings.get_setting("signal","frequency_calc_type")) |
| v_container | signal_data |
| maximas_minimas | val_maximas |
| maximas_minimas | val_minimas |
| maximas_minimas | dvBdt_maximas |
| maximas_minimas | dvBdt_minimas |
| std::vector< double > | rising_trigger_times |
| rising edges detected are stored here mainly used by trigger level frequency calculation and hysteresis frequency calculation | |
| std::vector< double > | falling_trigger_times |
| rising edges detected are stored here mainly used by trigger level frequency calculation and hysteresis frequency calculation | |
| std::vector< double > | rising_periods |
| rising edges detected are stored here mainly used by trigger level frequency calculation and hysteresis frequency calculation | |
| std::vector< double > | falling_periods |
| rising edges detected are stored here mainly used by trigger level frequency calculation and hysteresis frequency calculation | |
| std::vector< pattern > | periods_pattern |
| struct signal::_subSignals | subSignals_period_based |
| struct signal::_subSignals | subSignals_value_based |
| double | _trigger_level = 0 |
| signal value for detecting edges and calculating frequency based on | |
| double | _hysteresis_high_threshold = 5 |
| double | _hysteresis_low_threshold = -5 |
| int | minimum_periodic_periodNum = stoi(settings.get_setting("signal", "minimum_periodic_periodNum") ) |
| bool | timeDomain_analysed = false |
| bool | data_viable = false |
Friends | |
| class | _signal_operation |
signal class the parent class for every other signal or any form of time-sorted (time,value) vectors
|
protected |
|
protected |
|
strongprotected |
|
protected |
Definition at line 62 of file signal.cpp.
|
protected |
Definition at line 57 of file signal.cpp.
|
protected |
Definition at line 66 of file signal.cpp.
| bool signal::analyse | ( | ) |
generalized huge analysis in the time domain fetches basic data
Definition at line 674 of file signal.cpp.
| bool signal::dataViable | ( | ) |
Definition at line 52 of file signal.cpp.
|
protected |
rms and avg based on integer number of signals analysis only
Definition at line 540 of file signal.cpp.
|
protected |
deduce base frequency + angular + number of periods for the signal
Definition at line 521 of file signal.cpp.
| bool signal::exportSignal | ( | std::string | name, |
| bool | export_all = false, | ||
| sig_exp | expType = sig_exp::csv, | ||
| std::string | fileLocation = settings.get_setting("signal","export_path") ) |
export the signal data to a specific file
| name | the name of the file to export to |
| export_all | if true will export all time mapped signal data including areas and slopes if false only values and times get exported |
| expType | the format to export the signal in Options (sig_exp::csv default) (sig_exp::sig compressed binary format representation of the signal) |
| fileLocation | the file location to export to default is export_path from config.json |
Definition at line 725 of file signal.cpp.
|
protected |
|
protected |
calculate frequency based on Local maximas and minimas and their times respectively
Definition at line 349 of file signal.cpp.
|
protected |
calculate the base_frequency with hysteresis added for noise ignorance
Definition at line 484 of file signal.cpp.
|
protected |
calculate frequency based on crossing trigger level times
Definition at line 426 of file signal.cpp.
| const signal::_analytics * signal::get_analytics | ( | ) | const |
get analytics of the time_domain analysed signal
Definition at line 691 of file signal.cpp.
|
inline |
|
inline |
| const v_container * signal::get_signal_data | ( | ) | const |
get any values in the signal data table
Definition at line 696 of file signal.cpp.
|
inline |
get value peaks in the signal
|
inline |
get value troughs in the signal
|
inlineprotected |
| bool signal::importSignal | ( | std::string | name, |
| std::string | fileLocation = settings.get_setting("signal","import_path") ) |
import a signal in the .sig binary format
| name | name of the file |
| fileLocation | path to the file default is import_path in config.json |
Definition at line 776 of file signal.cpp.
|
protected |
INTERPOLATIONS FOR FIXING LOW SAMPLE SIGNALS/DIFFERENT SAMPLING RATES.
|
inline |
| bool signal::loadData | ( | std::string | name, |
| std::string | fileLocation = settings.get_setting("signal","import_path") ) |
load data from a file directly if it has the following format (time,value)
| name | the name of the file including the extension |
| fileLocation | the location or path to the file default argument is path from config.json file |
| bool signal::loadData | ( | std::vector< double > | time, |
| std::vector< double > | vals ) |
load data from a time vector and a values vector
| time | the time vector passed by value |
| vals | the values vector passed by value |
Definition at line 38 of file signal.cpp.
| bool signal::loadData | ( | v_container | _data | ) |
load data first two columns from a dataTable structure into this signal with order (time,value)
| _data | the dataTable that gets passed by value (seperate copy for signal data) |
Definition at line 32 of file signal.cpp.
| void signal::make_subsignals | ( | std::vector< pattern > & | pattern, |
| _subSignals & | sig ) |
a function that keeps generating subsignals based on the pattern provided that holds pattern start time and pattern endtime
| pattern | the pattern vector provided for subsignals generation |
| sig | the vector of type signal to return subsignals in |
Definition at line 701 of file signal.cpp.
|
protected |
analyse changes in the signal and store any continous patterns detected for future interval Based signal analysis
Definition at line 663 of file signal.cpp.
| bool signal::pdf_export | ( | std::string | name, |
| std::string | file_address = settings.get_setting("signal","export_path") ) |
export valuable signal report (images and text)//in the pdf format
| name | the name of the file to export to |
| file_address | the file address to to export to |
Definition at line 842 of file signal.cpp.
|
protected |
analyse regions of the signal basesd on their periodic times (connected similar periodic times = 1 continous signal) periodic time rapid change/phase shifts in a period = transients; connected transients are considered a singular non periodic signal;
Definition at line 591 of file signal.cpp.
|
protected |
filter local MAXIMAS and MINIMAS and update ptp data (only top maximas and lowest minimas)
**BLOCK FOR UPDATING
Definition at line 245 of file signal.cpp.
|
protected |
Makes variable data out of the time-value data such as slopes and areas wrt to time.
does pre analytic operation like getting slopes and _areas wrt and adds them to the datatable data
Definition at line 77 of file signal.cpp.
|
inlineprotected |
|
inlineprotected |
| void signal::set_hysteresis | ( | double | upThreshold, |
| double | lowThreshold ) |
sets the hysteresis parameters for the hysteresis trigger frequency calculations
| upThreshold | upper threshold for the hysteresis block |
| lowThreshold | lower threshold for the hysteresis block |
Definition at line 837 of file signal.cpp.
| void signal::set_trigger_level | ( | double | v | ) |
sets the trigger level for the trigger level based frequency calculation
| v | value of the trigger level |
Definition at line 831 of file signal.cpp.
|
protected |
soft time tomain analysis
Definition at line 573 of file signal.cpp.
| signal::_subSignals * signal::subSignal_periodBased | ( | ) |
get the subSignals generated from this signal based on their periodic times pattern
Definition at line 712 of file signal.cpp.
| signal::_subSignals * signal::subSignal_valueBased | ( | ) |
get the subSignals generated from this signal based on their rms for periods times pattern
Definition at line 717 of file signal.cpp.
|
protected |
EVALUATE MAXIMAS/MINIMAS using SLOPE DATA.
Definition at line 153 of file signal.cpp.
|
protected |
VALUES ANALYTICS THAT EVALUATE MAXIMAS_MINIMAS using SLOPE DATA.
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |