Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Fork of nucf446-cuboid-balance1_strong by
Diff: IIR_filter.cpp
- Revision:
- 17:e9e75de5fe32
- Parent:
- 10:600d7cf652e7
- Child:
- 20:0319a4a56db8
--- a/IIR_filter.cpp Wed Apr 04 13:28:00 2018 +0000
+++ b/IIR_filter.cpp Wed Apr 04 14:17:07 2018 +0000
@@ -109,11 +109,6 @@
A[k] = a[k];
yk[k] = 0.0f;
}
- //B[0] = K*k0/k2;
- //B[1] = 2.0f*B[0];
- //B[2] = B[0];
- //A[0] = (2.0f*k0 - 8.0f)/k2;
- //A[1] = (k0 - k1 + 4.0f)/k2;
// dc-gain
this->K = 1.0f;
@@ -150,22 +145,3 @@
yk[0] = ret;
return ret;
}
-
-// (B[0] + B[1]*z^-1 + ... + B[nb]*z^-nb)*U(z) = (1 + A[0]*z^-1 + ... + A[na-1]*z^-na))*Y(z)
-/*
-IIR_filter::IIR_filter(float *a[], float *b[], float K){
-
- this->A = A[0];
- this->B = B[0];
- nb = sizeof(B)/sizeof(B[0]);
- na = sizeof(A)/sizeof(A[0]);
- uk = (float*)malloc((nb+1)*sizeof(float));
- yk = (float*)malloc(na*sizeof(float));
- for(int ii=0; ii<nb; ii++){
- uk[ii] = 0.0f;
- }
- for(int ii=0; ii<na; ii++){
- yk[ii] = 0.0f;
- }
- this->K = K; %%% THIS IMPLEMENTATION SUITS NOT THE RESET PROCESS %%%
-}*/
\ No newline at end of file
