Feedforward Closedloop Learning: bandpass.h Source File

Feedforward Closedloop Learning

bandpass.h
1 class Bandpass;
2
3 #ifndef _Bandpass
4 #define _Bandpass
5
6 #include <assert.h>
7
8 #include "globals.h"
9
10
14 class Bandpass {
15 public:
19 Bandpass();
20
24 double filter(double v);
25
30 void calcPolesZeros(double f,double r);
31
35 void setParameters(double frequency, double Qfactor);
36
40 void impulse(char* name);
41
45 void calcNorm(double f);
46
50 void transfer(char* name);
51
56 inline double getOutput() {return actualOutput;};
57
61 void reset();
62
63 private:
64
68 double norm;
69
73 double denominator0;
74 double denominator1;
75 double denominator2;
76
80 double enumerator0;
81 double enumerator1;
82 double enumerator2;
83
87 double buffer0;
88 double buffer1;
89 double buffer2;
90
96 double actualOutput;
97
98 double output;
99 };
100
101 #endif
Bandpass::getOutput
double getOutput()
Gets the output of the filter.
Definition: bandpass.h:56
Bandpass::calcNorm
void calcNorm(double f)
Normalises the output with f.
Definition: bandpass.cpp:91
Bandpass::setParameters
void setParameters(double frequency, double Qfactor)
sets the filter parameters
Definition: bandpass.cpp:24
Bandpass::reset
void reset()
Sets the output to zero again.
Definition: bandpass.cpp:16
Bandpass::impulse
void impulse(char *name)
Generates an acsii file with the impulse response of the filter.
Definition: bandpass.cpp:47
Bandpass::transfer
void transfer(char *name)
Generates an ASCII file with the transfer function.
Bandpass::filter
double filter(double v)
Filter.
Definition: bandpass.cpp:73
Bandpass::Bandpass
Bandpass()
Constructor.
Definition: bandpass.cpp:10
Bandpass::calcPolesZeros
void calcPolesZeros(double f, double r)
Calculates the coefficients The frequency is the normalized frequency in the range [0....
Definition: bandpass.cpp:108
Bandpass
Creates memory traces at specified length.
Definition: bandpass.h:14