Skip to content
Snippets Groups Projects
Commit 24e20b14 authored by Rolf Bork's avatar Rolf Bork
Browse files

Modified the DAQ decimation filters as per LIGO T1600059.

git-svn-id: https://redoubt.ligo-wa.caltech.edu/svn/advLigoRTS/trunk@4166 6dcd42c9-f523-4c6d-aada-af552506706e
parent 0c2d5ddd
No related branches found
No related tags found
No related merge requests found
......@@ -119,89 +119,103 @@ unsigned int excnum[DAQ_GDS_MAX_TP_ALLOWED]; // Current EXC nums
double mydouble;
#ifdef CORE_BIQUAD
// Decimation filter coefficient definitions.
static double dCoeff2x[13] =
{0.014605318489015,
0.0061330534633199, -0.3067718521410701, 1.0061297523961799, 1.6898970546512500,
-0.1416634327119900, -0.7218542081231900, 1.1639392962956800, 1.5641813375750999,
-0.2223002987598800, -1.1002072247518702, 2.4322961493728101, 2.5543892233808201};
static double dCoeff4x[13] =
{0.0032897561126272,
0.5262606025434300, -0.0761411615790100, 0.1130468884239699, 0.5092319101840799,
0.5730930806734700, -0.1812069602474000, 0.4535162982982299, 0.6837579627174200,
0.6560226277436600, -0.2732748286521299, 1.9218491283142201, 1.9903219392643201};
static double dCoeff8x[13] =
{0.0019451746049824,
0.7581968768203300, -0.0208065724495400, -0.0885007357744900, 0.1313472736383900,
0.8177667403664499, -0.0484926355391700, 0.0804638221493899, 0.1881713856561398,
0.8916285940607900, -0.0710046059171400, 1.0789961400704899, 0.9517899355931499};
static double dCoeff16x[13] =
{0.0010292496296221,
0.8821795273490400, -0.0050811632845900, -0.0793910648843901, 0.0333482444819799,
0.9213891226266799, -0.0116267556958600, -0.0147463176669200, 0.0522378040105400,
0.9631231120650900, -0.0166459584776699, 0.3524249070977401, 0.3726558365549801};
static double dCoeff32x[13] =
{0.00099066651652901,
0.9407723671890900, -0.0013021996687700, -0.0495970976842000, 0.0083283354579400,
0.9629941014830901, -0.0029486095232200, -0.0209238527730700, 0.0131334362206199,
0.9856499106827501, -0.0041756491626799, 0.0901459629393901, 0.1003204030939602};
static double dCoeff64x[13] =
{9.117708813402705e-05,
0.9884411147668981, -0.0002966277054097, -0.0097345801570645, 0.0015276773706276,
0.9958880030565560, -0.0005974359311846, 0.0001273101399277, 0.0036418711521875,
-0.0079580196372524, -0.0079580196372524, 1.9920419803627476, 1.9920419803627476};
static double dCoeff128x[13] =
{4.580254440937838e-05,
0.9942785038368447, -0.0000743648654229, -0.0052652981867765, 0.0003818331109557,
0.9980915472248755, -0.0001494958409671, -0.0008478627563595, 0.0009110941777979,
-0.0039867920479109, -0.0039867920479109, 1.9960132079520891, 1.9960132079520891};
static double dCoeff256x[13] =
{2.296084727953743e-05,
0.9971538121386385, -0.0000186174099586, -0.0027321307580492, 0.0000954396933539,
0.9990827274780281, -0.0000373907471043, -0.0006520772714058, 0.0002278045034618,
-0.0019953660573223, -0.0019953660573223, 1.9980046339426778, 1.9980046339426778};
// BIQUAD Decimation filter coefficient definitions.
// dCOEFF 2x *************************************************************************
static double dCoeff2x[13] = {0.02717257186578,
-0.1159055409088, -0.40753832312918, 2.66236735378793, 3.37073457156755,
-0.49505157452475, -1.10461941102831, 1.40184470311617, 1.79227686661261,
-0.74143396593712, -1.62740819248313, 0.72188475979666, 0.83591053325065};
// dCOEFF 4x *************************************************************************
static double dCoeff4x[13] = {0.00426219526013,
0.46640482430571, -0.10620935923005, 2.50932081620118, 2.93670663266542,
0.43602772908265, -0.31016854747127, 0.75143527373544, 1.00523899718152,
0.44571894955428, -0.47692045639835, 0.36664098129003, 0.4440015753374};
// dCOEFF 8x *************************************************************************
static double dCoeff8x[13] = {0.00162185538923,
0.73342532779703, -0.02862365091314, 1.44110125961504, 1.67905228090487,
0.77657563380963, -0.08304311675394, 0.18851328163424, 0.32889453107067,
0.83213081484618, -0.12573495191273, 0.0940911979108501, 0.13622543115194};
// dCOEFF 16x *************************************************************************
static double dCoeff16x[13] = {0.00112590539483,
0.86616831686611, -0.00753654634986012, 0.48586805026482, 0.61216318704885,
0.90508101474565, -0.0215349711544799, 0.0149886842581499, 0.08837269835802,
0.94631370100442, -0.0320417955561, 0.0141281606027401, 0.0357726640422202};
// dCOEFF 32x *************************************************************************
static double dCoeff32x[13] = {0.00102945292275,
0.93288074072411, -0.00194092797014001, 0.10751900551591, 0.17269733682166,
0.9570539169953, -0.00548573773340011, -0.0149997987966302, 0.0224605464746699,
0.98100244642901, -0.00807148639261013, -0.00189235941040011, 0.00903370776797985};
// dCOEFF 64x *************************************************************************
static double dCoeff64x[13] = {0.00101894798776,
0.96638168022541, -0.000492974627960052, 0.01147570619135, 0.04460105133798,
0.97969775930388, -0.00138449271550001, -0.0132857101503898, 0.00563203783023014,
0.99249184543014, -0.0020244997813601, -0.00322227927422025, 0.00226137551427974};
// dCOEFF 128x *************************************************************************
static double dCoeff128x[13] = {0.00102359688929,
0.98317523053482, -0.000124254191099959, -0.00545789721985002, 0.01124261805423,
0.9901470788001, -0.000347773996469902, -0.00809690612593994, 0.00140824107749005,
0.9967468102523, -0.000506888877139899, -0.00218112074794985, 0.000565180122610309};
// dCOEFF 256x *************************************************************************
static double dCoeff256x[13] = {0.00102849104272,
0.99158359864769, -3.11926170200039e-05, -0.00556878740432998, 0.00281642133096005,
0.99514878857652, -8.7150981279982e-05, -0.00441208984599983, 0.000351970596200069,
0.99849900371282, -0.000126813612729926, -0.00123294150072994, 0.000141241173720053};
#else
// Decimation filter coefficient definitions.
static double dCoeff2x[13] =
{0.014605318489015,
-1.00613305346332, 0.31290490560439, -0.00000330106714, 0.99667220785946,
-0.85833656728801, 0.58019077541120, 0.30560272900767, 0.98043281669062,
-0.77769970124012, 0.87790692599199, 1.65459644813269, 1.00000000000000};
static double dCoeff4x[13] =
{0.0032897561126272,
-1.52626060254343, 0.60240176412244, -1.41321371411946, 0.99858678588255,
-1.57309308067347, 0.75430004092087, -1.11957678237524, 0.98454170534006,
-1.65602262774366, 0.92929745639579, 0.26582650057056, 0.99777026734589};
static double dCoeff8x[13] =
{0.0019451746049824,
-1.75819687682033, 0.77900344926987, -1.84669761259482, 0.99885145868275,
-1.81776674036645, 0.86625937590562, -1.73730291821706, 0.97396693941237,
-1.89162859406079, 0.96263319997793, -0.81263245399030, 0.83542699550059};
static double dCoeff16x[13] =
{0.0010292496296221,
-1.88217952734904, 0.88726069063363, -1.96157059223343, 1.00000000000000,
-1.92138912262668, 0.93301587832254, -1.93613544029360, 1.00000000000000,
-1.96312311206509, 0.97976907054276, -1.61069820496735, 1.00000000000000};
static double dCoeff32x[13] =
{0.00099066651652901,
-1.94077236718909, 0.94207456685786, -1.99036946487329, 1.00000000000000,
-1.96299410148309, 0.96594271100631, -1.98391795425616, 1.00000000000000,
-1.98564991068275, 0.98982555984543, -1.89550394774336, 1.00000000000000};
static double dCoeff64x[13] =
{9.117708813402705e-05,
-1.9884411147668981, 0.9887377424723078, -1.9981756949239626, 1.0000000000000000,
-1.9958880030565560, 0.9964854389877406, -1.9957606929166283, 1.0000000000000002,
-0.9920419803627476, 0.0000000000000000, 1.0000000000000000, 0.0000000000000000};
static double dCoeff128x[13] =
{4.580254440937838e-05,
-1.9942785038368447, 0.9943528687022676, -1.9995438020236211, 0.9999999999999998,
-1.9980915472248755, 0.9982410430658426, -1.9989394099812350, 1.0000000000000000,
-0.9960132079520891, 0.0000000000000000, 1.0000000000000000, 0.0000000000000000};
static double dCoeff256x[13] =
{2.296084727953743e-05,
-1.9971538121386385, 0.9971724295485971, -1.9998859428966878, 1.0000000000000002,
-1.9990827274780281, 0.9991201182251324, -1.9997348047494339, 0.9999999999999999,
-0.9980046339426777, 0.0000000000000000, 1.0000000000000000, 0.0000000000000000};
// SOS Decimation filter coefficient definitions.
// dCOEFF 2x *************************************************************************
static double dCoeff2x[13] = {0.02717257186578,
-0.8840944590912, 0.29163278222038, 1.77827289469673, 1,
-0.50494842547525, 0.60956783650356, 0.89689627764092, 1,
-0.25856603406288, 0.88597422654601, 0.46331872573378, 1};
// dCOEFF 4x *************************************************************************
static double dCoeff4x[13] = {0.00426219526013,
-1.46640482430571, 0.57261418353576, 1.04291599189547, 1,
-1.43602772908265, 0.74619627655392, -0.68459245534721, 1,
-1.44571894955428, 0.92263940595263, -1.07907796826425, 1};
// dCOEFF 8x *************************************************************************
static double dCoeff8x[13] = {0.00162185538923,
-1.73342532779703, 0.76204897871017, -0.29232406818199, 1,
-1.77657563380963, 0.85961875056357, -1.58806235217539, 1,
-1.83213081484618, 0.95786576675891, -1.73803961693533, 1};
// dCOEFF 16x *************************************************************************
static double dCoeff16x[13] = {0.00112590539483,
-1.86616831686611, 0.87370486321597, -1.38030026660129, 1,
-1.90508101474565, 0.92661598590013, -1.8900923304875, 1,
-1.94631370100442, 0.97835549656052, -1.93218554040168, 1};
// dCOEFF 32x *************************************************************************
static double dCoeff32x[13] = {0.00102945292275,
-1.93288074072411, 0.93482166869425, -1.8253617352082, 1,
-1.9570539169953, 0.9625396547287, -1.97205371579193, 1,
-1.98100244642901, 0.98907393282162, -1.98289480583941, 1};
// dCOEFF 64x *************************************************************************
static double dCoeff64x[13] = {0.00101894798776,
-1.96638168022541, 0.96687465485337, -1.95490597403406, 1,
-1.97969775930388, 0.98108225201938, -1.99298346945427, 1,
-1.99249184543014, 0.9945163452115, -1.99571412470436, 1};
// dCOEFF 128x *************************************************************************
static double dCoeff128x[13] = {0.00102359688929,
-1.98317523053482, 0.98329948472592, -1.98863312775467, 1,
-1.9901470788001, 0.99049485279657, -1.99824398492604, 1,
-1.9967468102523, 0.99725369912944, -1.99892793100025, 1};
// dCOEFF 256x *************************************************************************
static double dCoeff256x[13] = {0.00102849104272,
-1.99158359864769, 0.99161479126471, -1.99715238605202, 1,
-1.99514878857652, 0.9952359395578, -1.99956087842252, 1,
-1.99849900371282, 0.99862581732555, -1.99973194521355, 1};
#endif
// History buffers for decimation IIR filters
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment