Displaying report 1-1 of 1.
Reports until 11:00, Monday 22 August 2011
H2 General
jeffrey.kissel@LIGO.ORG - posted 11:00, Monday 22 August 2011 (1265)
CDS RMS Filter Block
J. Kissel, R. Lane, K. Arai, J. Garcia, R. Mittleman

An integral part of the suspension watchdog system is the aLIGO RCG's cdsRms block (design details to follow), so I wanted to give it a little extra attention. As of RCG 2.3 and later, this block is implemented with the following C Code:

1  float rms;
2  static float rms_avg;      // which means rms_avg is a persisent variable between loop iterations
3  if(feInit)                 // If it's the first loop cycle
4  {
5       rms_avg = 0.0;
6       } 
7  else 
8  {
9       // RMS: RMS
10       rms = ;
11       if(rms > 200000) rms = 200000;
12       if(rms < -200000) rms = -200000;
13       rms = rms * rms;                            // HERE'S THE SQUARE
14       rms_avg = rms * .00005 + rms_avg * 0.99995; // HERE'S THE LOW PASS, "MEAN"
15       rms = lsqrt(rms_avg);                       // HERE'S THE SQUARE ROOT
16        = rms;
17       }



Of particular interest here is the low pass filter that defines the averaging time constant (defined on line 14). Given the above c-code, the filter is defined in a standard format, with the following loop structure (taking x = rms * rms, A = 0.00005, and y = rms_avg):
       +---+
 x ----| A |-----( + )----------------------------- > y
       +---+       |                         |
                   |                         |
                   |  +-------+  +--------+  |
                   +--| (1-A) |--| z^(-1) |--+
                      +-------+  +--------+
which should nominally have a transfer function H(f) of 

y = A * x + y * (1-A) * exp(- 2 * pi * i * f * T)      // identical to line 14!!
y * (1 - (1-A) * exp(- 2 * pi * i * f * T) ) = A * x
H(f) = y / x = A / (1 - (1-A) * exp(- 2 * pi * i * f * T) )

where f is the frequency vector and T = 1/fs is the sampling time. This transfer function corresponds to a single pole at 

f = 1/(2*pi*T)*log(1/(1-A))

This means for a fixed A, the averaging pole is dependent on the sampling rate fs of the model using the RMS block. For future upgrades of the RCG, we should consider having an additional input to this block that defines A, such that the user can customize the filter time constant where needed, and have it adaptable to other model sampling rates.

For the suspension models, running at fs = 16384 Hz, this corresponds to a pole frequency of 0.13 Hz, indicating that the RMS block has a impulse response of about 7 sec. This is coincidentally just about the right response for a suspension watchdog, at least as a first iteration. (Further design details to come).

Images attached to this report
Non-image files attached to this report
Displaying report 1-1 of 1.