A class for signal processing. More...
#include <Signal.h>
Static Public Member Functions | |
static int | SmoothSpline (int aDegree, double aDeltaT, double aCutOffFrequency, int aN, double *aTimes, double *aSignal, double *rFilteredSignal) |
Generalized, cross-validatory spline smoothing (Adv. | |
static int | LowpassIIR (double aDeltaT, double aCutOffFrequency, int aN, double *aSignal, double *rFilteredSignal) |
3rd ORDER LOWPASS IIR BUTTERWORTH DIGITAL DIGITAL FILTER | |
static int | LowpassFIR (int aOrder, double aDeltaT, double aCutoffFrequency, int aN, double *aSignal, double *rFilteredSignal) |
LOWPASS FIR NONRECURSIVE DIGITAL FILTER. | |
static int | BandpassFIR (int aOrder, double aDeltaT, double aLowFrequency, double aHighFrequency, int aN, double *aSignal, double *aFilteredSignal) |
BANDPASS FIR NONRECURSIVE DIGITAL FILTER. | |
static double * | Pad (int aPad, int aN, const double aSignal[]) |
Pad a signal with a specified number of data points. | |
static void | Pad (int aPad, OpenSim::Array< double > &aSignal) |
Pad a signal with a specified number of data points. | |
static int | ReduceNumberOfPoints (double aDistance, Array< double > &rTime, Array< double > &rSignal) |
Remove points in a signal based on the angle between adjacent segments in the signal. | |
static double | sinc (double x) |
SINC(X) = SIN(X) / X. | |
static double | hamming (int k, int M) |
Hamming Window- dampens gibs phenominon infiltering functions. |
A class for signal processing.
int Signal::BandpassFIR | ( | int | M, | |
double | T, | |||
double | f1, | |||
double | f2, | |||
int | N, | |||
double * | sig, | |||
double * | sigf | |||
) | [static] |
BANDPASS FIR NONRECURSIVE DIGITAL FILTER.
Note that sig and sigf must point to distinct locations in memory which do not overlap.
PARAMETERS
M | Order of filter (should be 30 or greater). | |
T | Sample interval in seconds. lowend cutoff frequency in Hz highend cutoff frequency in Hz | |
N | Number of data points in the signal. | |
sig | The sampled signal. | |
sigf | The filtered signal. |
double Signal::hamming | ( | int | k, | |
int | M | |||
) | [static] |
Hamming Window- dampens gibs phenominon infiltering functions.
int Signal::LowpassFIR | ( | int | M, | |
double | T, | |||
double | f, | |||
int | N, | |||
double * | sig, | |||
double * | sigf | |||
) | [static] |
LOWPASS FIR NONRECURSIVE DIGITAL FILTER.
It is permissible for sig and sigf to be the same array or overlap.
PARAMETERS
M | Order of filter (should be 30 or greater). | |
T | Sample interval in seconds. | |
f | Cutoff frequency in Hz. | |
N | Number of data points in the signal. | |
sig | The sampled signal. | |
sigf | The filtered signal. |
int Signal::LowpassIIR | ( | double | T, | |
double | fc, | |||
int | N, | |||
double * | sig, | |||
double * | sigf | |||
) | [static] |
3rd ORDER LOWPASS IIR BUTTERWORTH DIGITAL DIGITAL FILTER
It is assumed that enough memory is allocated at sigf. Note also that the first and last three data points are not filtered.
T | Sample interval in seconds. | |
fc | Cutoff frequency in Hz. | |
N | Number of data points in the signal. | |
sig | The sampled signal. | |
sigf | The filtered signal. |
void Signal::Pad | ( | int | aPad, | |
OpenSim::Array< double > & | aSignal | |||
) | [static] |
Pad a signal with a specified number of data points.
The signal is prepended and appended with a reflected and negated portion of the signal of the appropriate size so as to preserve the value and slope of the signal.
PARAMETERS
aPad | Size of the pad-- number of points to prepend and append. | |
rSignal | Signal to be padded. |
double * Signal::Pad | ( | int | aPad, | |
int | aN, | |||
const double | aSignal[] | |||
) | [static] |
Pad a signal with a specified number of data points.
The signal is prepended and appended with a reflected and negated portion of the signal of the appropriate size so as to preserve the value and slope of the signal.
PARAMETERS
aPad | Size of the pad-- number of points to prepend and append. | |
aN | Number of data points in the signal. | |
aSignal | Signal to be padded. |
int Signal::ReduceNumberOfPoints | ( | double | aDistance, | |
Array< double > & | rTime, | |||
Array< double > & | rSignal | |||
) | [static] |
Remove points in a signal based on the angle between adjacent segments in the signal.
The end points of the signal are always retained.
aAngle | If the angle between two adjacent segments is less than aAngle the point in common between the two segments is removed. This is evaluate for each point in the signal. | |
rTime | Array of time values. This array is altered. | |
rSignal | Array of signal values. This array is altered. |
double Signal::sinc | ( | double | x | ) | [static] |
SINC(X) = SIN(X) / X.
int Signal::SmoothSpline | ( | int | degree, | |
double | T, | |||
double | fc, | |||
int | N, | |||
double * | times, | |||
double * | sig, | |||
double * | sigf | |||
) | [static] |
Generalized, cross-validatory spline smoothing (Adv.
Engng. Softw. 8:104-113)
degree | Degree of the spline. | |
T | Sample interval in seconds. | |
fc | Cutoff frequency in Hz. | |
N | Number of data points in the signal. | |
times | The times for a specified signal samples. | |
sig | The sampled signal. | |
sigf | The filtered signal. |