ENERGY MONITOR 0.2
Loading...
Searching...
No Matches
_signal_operation Class Reference

#include <signal_operation.h>

Public Member Functions

signal add (signal &base_sig1, signal &base_sig2, int mode=INTERSECT)
 
void add (signal &base_sig1, signal &base_sig2, signal &resultant, int mode=INTERSECT)
 we check the summing boundaries for the two signals and keep summing intersecting values until we reach the end of domain the domain is defined by the mode of both time sets
 
signal multiply (signal &base_sig1, signal &base_sig2, int mode=INTERSECT)
 
void multiply (signal &base_sig1, signal &base_sig2, signal &resultant, int mode=INTERSECT)
 
double phase_diff (signal &base_sig1, signal &base_sig2)
 calculates phase difference based on maximas and minimas times
 
double integ_vpower (signal base_sig1, int power)
 
signal add (signal &base_sig1, double val)
 
void add (signal &base_sig1, signal &resultant, double val)
 
signal multiply (signal &base_sig1, double val)
 
void multiply (signal &base_sig1, signal &resultant, double val)
 
signal logarithmic (signal *base_sig)
 
void firstO_lowPass_filter (signal &base_sig, signal &resultant, double cutOff_freq, int order=1, double avg_sample_time=-1)
 first order IIR(INFINITE IMPULSE RESPONSE) low pass filter
output = (1 - filter_parameter)*last_output + filter_parameter*input for the resultant signal
 
signal highPass_filter (signal base_sig, int order=1)
 
signal bangReject_filter (signal base_sig, int order=1)
 
signal bandPass_filter (signal base_sig, int order=1)
 
signal factor_frequency (signal base_sig, float increase_ratio)
 
signal toSignal (std::vector< double > value, std::vector< double > time)
 takes two Vectors one for time and and the other for values respectively and returns a signal
 
signal toSignal (std::vector< std::vector< double > > table)
 takes a vector of vectors one for time and and the other for values respectively and returns a signal
 
bool subsignal_time_based (signal &base_sig, signal &sub_sig, double time_start, double time_end)
 create subSignal from bigger ones based on time boundaries
 
signal subsignal_value_based (signal &base_sig, double value1, double value2)
 
signal subsignal_value_time_based (signal &base_sig, double value1, double time_after)
 
signal timeShift (signal &base_sig, double timeShift)
 
signal concatenate (signal firstSignal, signal secondSignal)
 
bool isSuccessfull ()
 

Static Public Member Functions

static void refreshSettings ()
 

Detailed Description

Definition at line 24 of file signal_operation.h.

Member Function Documentation

◆ add() [1/4]

signal _signal_operation::add ( signal & base_sig1,
double val )
inline

Definition at line 52 of file signal_operation.h.

◆ add() [2/4]

signal _signal_operation::add ( signal & base_sig1,
signal & base_sig2,
int mode = INTERSECT )
inline

Definition at line 31 of file signal_operation.h.

◆ add() [3/4]

void _signal_operation::add ( signal & base_sig1,
signal & base_sig2,
signal & resultant,
int mode = INTERSECT )

we check the summing boundaries for the two signals and keep summing intersecting values until we reach the end of domain the domain is defined by the mode of both time sets

Parameters
base_sig1the first signal to add
base_sig2the second signal to add
modethe mode of operation (UNION for UNION summation INTERSECT for intersect summation)
Returns
result signal

Definition at line 34 of file signal_operation.cpp.

◆ add() [4/4]

void _signal_operation::add ( signal & base_sig1,
signal & resultant,
double val )

Definition at line 292 of file signal_operation.cpp.

◆ bandPass_filter()

signal _signal_operation::bandPass_filter ( signal base_sig,
int order = 1 )

◆ bangReject_filter()

signal _signal_operation::bangReject_filter ( signal base_sig,
int order = 1 )

◆ concatenate()

signal _signal_operation::concatenate ( signal firstSignal,
signal secondSignal )

◆ factor_frequency()

signal _signal_operation::factor_frequency ( signal base_sig,
float increase_ratio )

◆ firstO_lowPass_filter()

void _signal_operation::firstO_lowPass_filter ( signal & base_sig,
signal & resultant,
double cutOff_freq,
int order = 1,
double avg_sample_time = -1 )

first order IIR(INFINITE IMPULSE RESPONSE) low pass filter
output = (1 - filter_parameter)*last_output + filter_parameter*input for the resultant signal

Parameters
base_sigThe signal that needs filtering
resultantThe signal that holds the filtered signal can be the base_signal
cutOff_freqThe cutoff frequency for this filter
orderOptional argument for cascading the filter for higher orders default is 1 for first order
avg_sample_timeOptional argument for providing the avg_sample_time and not doing the analysis

Definition at line 306 of file signal_operation.cpp.

◆ highPass_filter()

signal _signal_operation::highPass_filter ( signal base_sig,
int order = 1 )

◆ integ_vpower()

double _signal_operation::integ_vpower ( signal base_sig1,
int power )

◆ isSuccessfull()

bool _signal_operation::isSuccessfull ( )
inline

Definition at line 104 of file signal_operation.h.

◆ logarithmic()

signal _signal_operation::logarithmic ( signal * base_sig)

◆ multiply() [1/4]

signal _signal_operation::multiply ( signal & base_sig1,
double val )
inline

Definition at line 58 of file signal_operation.h.

◆ multiply() [2/4]

signal _signal_operation::multiply ( signal & base_sig1,
signal & base_sig2,
int mode = INTERSECT )
inline

Definition at line 39 of file signal_operation.h.

◆ multiply() [3/4]

void _signal_operation::multiply ( signal & base_sig1,
signal & base_sig2,
signal & resultant,
int mode = INTERSECT )

Definition at line 128 of file signal_operation.cpp.

◆ multiply() [4/4]

void _signal_operation::multiply ( signal & base_sig1,
signal & resultant,
double val )

Definition at line 279 of file signal_operation.cpp.

◆ phase_diff()

double _signal_operation::phase_diff ( signal & ref_sig,
signal & sig2 )

calculates phase difference based on maximas and minimas times

Parameters
base_sig1the reference signal
base_sig2the signal to compare with
Returns
the phase difference

Definition at line 232 of file signal_operation.cpp.

◆ refreshSettings()

void _signal_operation::refreshSettings ( )
static

Definition at line 20 of file signal_operation.cpp.

◆ subsignal_time_based()

bool _signal_operation::subsignal_time_based ( signal & base_sig,
signal & sub_sig,
double time_start,
double time_end )

create subSignal from bigger ones based on time boundaries

Parameters
base_sigthe Bigger signal we create subsets from
sub_sigthe smaller signal we extracted
time_startthe start time of the sub signal
time_endthe end time of the sub signal
Returns
true if the sub_signal was extracted successfully .ie time domain intersection else return false

Definition at line 335 of file signal_operation.cpp.

◆ subsignal_value_based()

signal _signal_operation::subsignal_value_based ( signal & base_sig,
double value1,
double value2 )

◆ subsignal_value_time_based()

signal _signal_operation::subsignal_value_time_based ( signal & base_sig,
double value1,
double time_after )

◆ timeShift()

signal _signal_operation::timeShift ( signal & base_sig,
double timeShift )

◆ toSignal() [1/2]

signal _signal_operation::toSignal ( std::vector< double > value,
std::vector< double > time )

takes two Vectors one for time and and the other for values respectively and returns a signal

◆ toSignal() [2/2]

signal _signal_operation::toSignal ( std::vector< std::vector< double > > table)

takes a vector of vectors one for time and and the other for values respectively and returns a signal


The documentation for this class was generated from the following files: