40m QIL Cryo_Lab CTN SUS_Lab TCS_Lab OMC_Lab CRIME_Lab FEA ENG_Labs OptContFac Mariner WBEEShop
  40m Log, Page 30 of 344  Not logged in ELOG logo
ID Date Authorup Type Category Subject
  6661   Tue May 22 20:01:26 2012 DenUpdateCDSerror monitor

I've created transmission error monitors in rfm, oaf, sus, lsc, scx, scy and ioo models. I tried to get data from every channel transmitted through PCIE and RFM. I also included some shared memory channels.

The medm screen is in the EF STATUS -> TEM. It shows 16384 for the channels that come from simulation plant. Others are 0, that's fine.

  6664   Tue May 22 23:36:02 2012 DenUpdatePEMmircophones

I've put 5 EM172 microphones close together and measured there signal and coherence. They are plugged in to accelerometer channels.



Then I've suspended microphones around the MC - 2 at MC2, 2 at MC1,3 and 1 at PSL. The amplifier box is above STS readout box.

 DSC_4288.JPG           DSC_4299.JPG       DSC_4304.JPG      DSC_4302.JPG

Microphone close to PSL gave a strong coherence with MC_F, as we already saw it using Blue Bird Microphone.

ACC_MC2_XY channels <=> MC2 microphones

ACC_MC1_XY channels <=> MC1,3 microphones

ACC_MC1_Z channel <=> PSL microphones



  6670   Thu May 24 01:17:13 2012 DenUpdateCDSPMC autolocker



    • Auto-locker for PMC, PSL things - DEN

 I wrote auto-locker for PMC. It is called autolocker_pmc, located in the scripts directory, svn commited. I connected it to the channel C1:PSL-PMC_LOCK.  It is currently running on rosalba. MC autolocker runs on op340m, but I could not execute the script on that machine

./autolock_pmc: Stale NFS file handle.

I did several tests, usually, the script locks PMC is a few seconds. However, if PMC DC output has been drift significantly, if might take longer as discussed below.

The algorithm:

       if autolocker if enabled, monitor PSL-PMC_PMCTRANSPD channel
       if TRANS is less then 0.4, start locking:
               disengage PMC servo by enabling PMC TEST 1
               change PSL-PMC_RAMP unless TRANS is higher then 0.4 (*)
               engage PMC servo by disabling PMC TEST 1
       else sleep for 1 sec

(*) is tricky. If RAMP (DC offset) is specified then TRANS will be oscillating in the range ( TRANS_MIN, TRANS_MAX ). We are interested only in the TRANS_MAX. To make sure, we estimate it right, TRANS channel is read 10 times and the maximum value is chosen. This works good.

Next problem is to find the proper range and step to vary DC offset RAMP. Of coarse, we can choose the maximum range (-7, 0) and minimum step 0.0001, but it will take too long to find the proper DC offset. For that reason autolocker tries to find a resonance close to the previous DC offset in the range (RAMP_OLD - delta, RAMP_OLD + delta), initial delta is 0.03 and step is 0.003. It resonance is not found in this region, then delta is multiplied by a factor of 2 and so on. During this process RAMP range is controlled not to be wider then (-7, 0).

The might be a better way to do this. For example, use the gradient descent algorithm and control the step adaptively. I'll do that if this realization will be too slow.

I've disabled autolocker_pmc for the night.

  6671   Thu May 24 02:55:36 2012 DenUpdatePEMacoustic noise in MCL

Mic in the PSL showed that fluctuations in the MCL in the frequency range 10 - 100 Hz are due to acoustic noise. I've measured MCL, MCL / PSL mic coherence 2 times with interval 300 seconds.

Surprisingly, acoustic noise level did not change but MC sometimes is more sensitive to acoustic noise, sometimes less.


  6673   Thu May 24 12:23:00 2012 DenUpdateGeneralconnection error monitor for the website

The main page of connection error monitor can be a scheme of computers and models with connections. If there is an error in connection, the corresponding arrows turns from green to red.



Each arrow is a line to a more detailed information about the channels.


  6674   Thu May 24 13:28:38 2012 DenUpdatePEMHEPA

HEPA filter was running at 90% of max. I reduced it to 20%. Acoustic noise moved down


The range of MCL oscillations has also decreased but fluctuations in the frequency range 10-100 are still present.

MCL is much more stable now.

mcl_90.png        mcl_20.png


  6680   Fri May 25 02:56:44 2012 DenUpdateSUSMC3 local damping

I've terminated input to AA filters and measured signal to coils C1:SUS-MC3_??COIL_OUT.



I compared this noise to the signal when OSEM are connected to ADC.



I made BNC -> LEMO board such that all LEMOs have the same signal equal to BNC signal. I provided excitation of 50 mV as white noise to the input of the AA filter and measured coherence between excitation and MC3 coil driver. The path is

AA -> ICS 110 -> Pentium -> Pentek -> AI -> Univ Dewhitening -> Coil Driver

As all inputs have the same signal, matrices that recombine the signals should not affect coherence. But what I got for coherence between AA IN / Dewhitening OUT is


  6681   Fri May 25 13:24:48 2012 DenUpdateSUSMC3

AA IN -> COIL DRIVER IN transfer function for MC3


I've provided excitation to the AA input, the same for all OSEM channels. In the digital domain coherence between C1:SUS-MC3_ULSEN_INMON / C1:SUS-MC3_ULCOIL_INMON and other channels OSEM -> COIL is 1 starting from 0.1Hz.


The only thing left to understand is why the coherence AA IN / COIL DRIVER IN measured in the analog domain is not 1 in the frequency range 0.1 - 1 Hz. It does not look like just SRS noise. I've connected Ch 1 and 2 to the source, coherence is close to 1.

  6689   Sat May 26 00:08:41 2012 DenUpdateIOOMC_F low frequency noise

 MC_F low frequency noise might be due to local damping electronics. I did not measure OSEM noise, but even without it electronics (AA -> ICS 110 -> ADC) provide sufficient amount of noise. 

These 2 image show electronics noise and coherence between OSEM signal / seismic

osem_noise.png           gur_suspos_coh.png

From these 2 plots we might think that SNR > 10 and coherence OSEM / GUR is high at the frequency range 0.1 - 10 Hz and this is not a big problem.

However, at low frequencies the length of seismic waves becomes large enough and relative oscillations of MC2 and MC13 decrease.

For 1 wave ( u(MC2) - u(MC1) ) / u(MC2) = sin(2 * pi * L  * f  / c), L - distance between MC1 and MC2 where 2 seismometers are located. So MC123 move according to seismic motion and electronics noise is not seen unless we look at MC Length. Here this noise is seen, because mirrors move in a synchronistic manner. 

To check this I measured seismic noise with 2 guralps at distance 12 meters - at MC1 and MC2. Then I've computed the difference between these signals. And indeed at low frequencies, relative motion is much less.

Green, blue - GUR1,2_X

Red - differential motion GUR1_X - GUR2_X



The following plot illustrates how electronics noise effects MC_F. Green is the signal to coils. Red - electronics noise. Blue, black, cyan - simulated contribution to MC_F for different seismic waves speed. Most probably seismic waves have waves in the range 50 - 800 m/s, others are deep. The plot shows that electronics noise is big enough to disturb coherence between MC_F and seismic noise. 


Here is a rough calculation of the seismic waves speed. The following plot shows the ratio of psd of differential MC2-MC1 motion to MC2 motion.


If seismometers would be very far, ratio would be 1 if we neglect the difference in transfer function SEISMOMETER -> ADC for each channel. The drift of the ratio from 1 to 1.3 demonstrates this effect. Ratio starts to decrease at 15 Hz according to sin (2*pi*L*f/c) ~ 2*pi*L/c * f. So 2*pi*L/c * f_0 = pi/2 => c = 4 * L * f = 600 m / sec.

  6691   Sat May 26 15:59:19 2012 DenUpdateIOOGuralp noise is high

As I've mentioned in yesterday's elog MC mirrors start to move in a synchronistic manner. I've plotted DELTA_GUR = GUR1_X - alpha * GUR2_X, where alpha = const to make the transfer functions SEISMOMETER -> ADC equal for each channel. I've noticed that DELTA_GUR decreases below 10 Hz compared to GUR1_X as theoretically predicted. But starting from 1 Hz DELTA_GUR starts to increase. I decided that this is Guralp noise floor. Today I checked this, this is indeed the case.

In the frequency range 0.01 - 1.5 Hz Gur noise is comparable to the signal DELTA_GUR. For that reason we see low coherence between MC_F and GUR1_X in this frequency range. 

gur_noise.png    MCF_GUR.png

Guralp noise floor was determined by placing 2 seimometers close to each other and subtracting by Wiener filtering.


Conclusion: To filter seismic noise out of MC_F we need more sensitive seimometeres.


  6692   Sat May 26 20:40:48 2012 DenUpdatePEMexperiments with seismic noise

I measured relative motion of 2 seismometers separated by 4, 18 and 38 feet.

DSC_4307.JPG         DSC_4308.JPG

Relative motion for difference distances between seismometers is presented below.

    psd_distance.png        ratio.png


Al frequencies f < fcrit relative motion becomes smaller then motion of each point. At these frequencies, the ratio relative / absolute motion can be approximated as ratio = C fa . The following table summarizes fcrit, C and a for different length between seismometers.


L, ft fcrit, Hz
C a
4 45 0.0074 1.30
18 30 0.0057 1.52
38 15 0.0208 1.43

Using this approximation we can estimate the desired noise floor of the seismometer to subtract seismic noise from MC_F


Desired seismometer noise should be 100 times less then Guralp's. ADC noise is still less then this level, so this will not be a problem.

Note: for longer cavities condition for seismometer noise becomes more week as fcrit decreases with length.

  6693   Sat May 26 23:57:11 2012 DenUpdatePEMGuralp noise

I've looked through the Guralp manual to figure out what noise do they declare. They present it in acceleration units in dB relative to 1 m2 / s4 / Hz. I've converted my measurements to this units and got


They declare much better noise. May be linoleum makes an effort. Do we have any isolation boxes?

  6695   Sun May 27 23:15:22 2012 DenUpdatePEMexperiments with seismometers

I wondered if linoleum is a reason of high Guralp noise. I measured Guralp noise in 3 cases: they stand on a very soft piece of paper, linulium and stone.

DSC_4309.JPG               DSC_4310.JPG                  DSC_4311.JPG

I've calibrated the noise to units m/s/sqrt(Hz). Using soft paper we get the worst noise, stone - the best, but noises do not differ that much and still much worse then declared noise in the manual.


  6696   Tue May 29 00:35:57 2012 DenUpdatePEMguralp readout box

I measured the frequency response of the Guralp readout box and noise by providing sin signal of amplitude 50 mV at 15 Hz for channels 1-3.


It turns out that the gain is ~250, while my liso model simulated it to be 200. This is because it is hard to approximate AD620 amplifier.

Noise of the box does not seem to be too bad at low frequencies.

  6697   Tue May 29 00:39:52 2012 DenUpdatePEMGuralp noise

I've connected Guralp output to the ADC without readout box. I've got the same noise at low frequencies and even worse noise at high frequencies. However, readout box was still used as DC supply and the signal was read from INPUT test points. I'll do the same experiment without touching readout box at all.


  6698   Tue May 29 00:48:51 2012 DenUpdatePEMsts readout box

STS readout box seems to be partly broken. I've terminated inputs from the seismometer and measured the output. I could not do this for vertical channel because it outputs 7 V DC + 500 mV AC signal. All the switches work fine, 5 V DC is indeed shown when auto zero, calibration, 1 sec resp, sig select are enables. The box has AC power supply that seems to work ok, all measured DC values are equal to the labels. Something is wrong with amplification.




  6699   Tue May 29 00:53:57 2012 DenUpdateCDSproblems

I've noticed several CDS problems:

  1. Communication sign on C1SUS model turns to red once in a while. I press diag reset and it is gone. But after some time comes back.
  2. On C1LSC machine red "U" lamp shines with a period ~5 sec.
  3. I was not able to read data from the SR785 using netgpibdata.py. Either connection is not established at all, or data starts to download and then stops in the middle. I've checked the cables, power supplies and everything, still the same thing.
  6712   Tue May 29 22:48:37 2012 DenUpdatePEMGuralp noise

I've checked whether the Guralp noise that we see comes not from seismometer but from ADC or readout box. I did 2 separate measurements . First, I've split 1 signal from Guralp into 2 before the input to AA board and subtracted one from another using Wiener filter. Second, I've connected inputs of channels 1 and 4 of the seismometer readout box and put the signal from seismometer to channel 1.


The plot shows that ADC and readout box do not contribute too much to the Guralp noise.

  6721   Wed May 30 22:51:32 2012 DenUpdatePEMguralp isolation box

When I've put Guralps inside the isolation box, the signal from seismometers increased and was out of AA board range. I've reduced the gain of the readout box by a factor of 2. Now R2 for channels 1-6 is (2000, 1050, 1050, 2000, 1050, 1050) Ohm.

The signal increased in the frequency range 30-50 Hz. Guralp noise become better. That's good. However, it is still worse then in the manual.

As Yuta is dancing on the isolation box, Guralp signal is most time out of the AA board range. So I calculated the noise based on 5 min data. This may be enough, but I'll repeat the experiment later with 30 min data.


  6730   Thu May 31 11:38:19 2012 DenUpdatePEMisolation system

I've put Guralps into the Steve's 2 box isolation system. Noise got better, coherence between 2 seismometers improved. We still need better performance. Probably, one device is noisy and we can not determine which one using these 2 seismometers. We need more seismometers. Sadly, STS-2 readout box is not working.

lin_box_noise2.png    lin_box_coh.png

  6747   Sun Jun 3 01:30:07 2012 DenUpdatePEMsts-2 and guralp in isolation box

We have 2 sts-2 readout box - pink and blue. Pink outputs 12 DVC - this a problem of amplifier. This box has a rectifier (the box works from AC power) and an amplifier for velocity channels. Mass positions, calibration channels are connected by a wire from input to output. The amplifier for velocity channels does not work properly, so I connected velocity channels directly to the output - the signal from sts-2 is large enough even without amplification. When I plugged sts-2 to pink readout board, on the velocity output I saw ~4 VDC. Sts-2 was needed to be recentered. I pressed AUTOZERO command, but this did not work out. Before I had checked that this readout box indeed gives an autozero logical signal - 5VDC for ~2 sec. I think it does not provides sts-2  with enough current, seismometer needs 0.1 A in autozero regime.

Blue readout box after switching it to 1 sec regime and zeroing sts-2 started to output reasonable signal for gains = 10. I tried gains = 100, X velocity channel started to output noise. Now the gain is 10 and the response is 120 sec. But at least this box works. Still performance is not clear as well as noise level. To determine this I've put sts-2 to isolation box.

DSC_4315.JPG                    DSC_4319.JPG

After I've put Guralps in the isolation and waited for a couple of days, Guralp noise has been improved a little more.

lin_box_noise.png                 mcl_gur.png

  6748   Sun Jun 3 23:50:00 2012 DenUpdateCDSbiquad=1

From now all models calculate iir filters using biquad form. I've added biquad=1 to cdsParameters to all models except c1cal, built, installed and restarted them.

  6806   Tue Jun 12 17:29:28 2012 DenUpdateCDSdq channels

All PEM and IOO DQ channels disappeared. These channels were commented in C1???.ini files though I've uncommented them a few weeks ago. It happened after these models were rebuild, C1???.ini files also changed. Why?

I added the channels back. mx_stream died on c1sus after I pressed DAQ reload on medm screen. For IOO model it is even worse. After pressing DAQ Reload for C1IOO model DACQ process dies on the FB and IOO machine suspends.

I rebooted IOO, restarted models and fb. Models work now, but there might be an easier way to add channels without rebooting machines and demons.

  6872   Mon Jun 25 21:54:52 2012 DenUpdateComputer Scripts / ProgramsPMC locker


I made a python script for relocking PMC.
It currently lives in /opt/rtcds/caltech/c1/scripts/PSL/PMC/PMClocker.py.

I thought we rewrite auto lockers once per year, but this time it took us only a month. I wrote it for PMC on May 24. Is it not working?

Could someone make it more clear why some scripts are written on bash, others on sh or python? I think we should elaborate a strict order. Masha and I can work on it if anyone else considers this issue as a problem.

  6996   Fri Jul 20 14:18:15 2012 DenUpdatePEMMCL, GUR calibration

I did a raw calibration of MCL and GUR. Accuracy is a factor of 2.

GUR path : 800 V/m/s => readout box (G~100) => ADC (0.7 mV/count)

MCL path : laser 1 MHz / V, cavity length ~ 25 m

I measured feedback signal before the laser with SR and avoided whitening filters for MC_F.


  6998   Sat Jul 21 14:05:21 2012 DenUpdatePSLPMC problems examined


WE found that the PMC EPICS values had not been toggled since the reboot and so the RF phase and Amplitude were totally wrong (we should replace this with a fixed oscillator box as we did with FSS).

Also, the NPRO SLOW slider was at -2 V which made the mode going into the PMC funny (although the mode was OK this morning before I started playing with the PMC sliders).

 PMC transmission is oscillating  in the range 0.5 - 0.85. PMC PZT voltage is 1-2 V.

FSS slow controls was -2.5 V. I adjusted it to 0 and PMC stabilized. PMC PZT voltage is 128, transmission is 0.845.

But most probably, slow control will drift again.


  6999   Sat Jul 21 14:48:33 2012 DenUpdateCDSRCG

As I've spent many hours trying to determine the error in my C code for online filter I decided to write about it to prevent people from doing it again.

I have a C function that was tested offline. I compiled and installed it on the front end machine without any errors. When I've restarted the model, it did not run.

I modified the function the following way

void myFunction()
if(STATEMENT) return;
some code

I've adjusted input parameters such that STATEMENT was always true. However the model either started or not depending on the code after if statement. It turned out that the model could not start because of the following lines

cosine[1] = 1.0 - 0.5*a*a + a*a*a*a/24 - a*a*a*a*a*a/720 + a*a*a*a*a*a*a*a/40320;
sine[1] = a - a*a*a/6 + a*a*a*a*a/120 - a*a*a*a*a*a*a/5040;

When I've split the sum into steps, the model began to run. I guess the conclusion is that we can not make too many arithmetical operations for one "=" . The most interesting thing is that these lines stood after true if-statement and should not be even executed. Possible explanation is that some compilers start to process code after if-statement during its slow comparison. In our case it could start and then broke down on these long expressions.

  7000   Sat Jul 21 18:04:02 2012 DenUpdateAdaptive Filteringfrequency domain filter

I've implemented online frequency domain filter and applied it to MC_F.


Magnitude of the filter output at 1 Hz is the same as MC_F. This means that it is not hard for FIR to match the resonance. The problem is with the phase. We can not match the resonance exactly. If the resonance is at f0 and we match at f0 +/- df then in the frequency range (f0, f0 +/- df) the phase is not matched for 180. I guess the filter does not diverge because df is small but also the filter can not account for this huge phase lag. We need to slightly change the simulated actuator TF and see how the filter will react.

  7021   Tue Jul 24 21:16:55 2012 DenUpdatedigital noisequantization test

I'm trying to get some intuition how digital noise due to quantization shows up in iir filters. I decided to do tests in C using Python to calculate psd and visualize. I've implemented Direct Form 1, 2, "Biquad" and "Low Noise" forms of realization of second-order iir filter from Matt's presentation. There is a typo in the "Low Noise Form" scheme - a1 and a2 gains should be switched. Other then that schemes correctly implement 2 order iir. 

The input signal to each filter was a sine wave plus white noise with small amplitude x[n] = sin(2*pi*f*t[n]) + g*random( [-1, 1] ),  g << 1, f=1kHz. Sampling frequency was 16384 Hz. All 4 forms implemented 2 order low-pass butterworth filter with cut-off frequency 0.2 Hz

iir_2.png iir_8.png

For g=1e-2 all implementations work fine. For g=1e-8 when quantization noise increases, all implementations give a lot of noise at low frequencies. I did not notice any significant difference between any of these implementations. I'll try to do more tests to figure out any difference in noise between the forms.

Quantization noise depends on the architecture of the processor, compiler and what not. But I do not think this can give a huge difference in results. We need to understand carefully digital noise during PSD estimation and all operations done at Matlab or Python.

  7031   Wed Jul 25 16:55:01 2012 DenUpdatedigital noisenotch, lowpass filters

 Direct Form 2 is noisy in the first test. This is the one similar to Matt's in his presentation. Input signal was a sine wave at 1 Hz with small amplitude white noise x[n] = sin(2*pi*1*t[n]) + 1e-10 * random( [-1, 1] ). It was filtered with a notch filter: f=1Hz, Q=100, depth=210dB. SOS representation was calculated in Foton. Sampling frequency is 16kHz.

iir_psd.png        iir_time.png   iir_coh.png

DF2 output noise level is the same if I change white noise amplitude while DF1, BQF, LNF can follow it. Time series show quantization noise of DF2. I've plotted coherence of the signals relative to DF1, because non of the signals will be coherent to it at low frequencies due to fft calculations.  

In the second test the input was white noise  x[n] = random( [-1, 1] ) It was filtered with a 2 order low-pass butterworth filter with cut-off frequency f = 0.25 Hz. SOS representation was calculated in Python. Sampling frequency is 16kHz.

iir_psd_lowpass.png         iir_time_lowpass.png      iir_coh_lowpass2.png

In this test all implementations work fine. I guess dtt works with single precision and for that reason we see disturbance in coherence when we do the same test online.

  7036   Thu Jul 26 10:22:03 2012 DenUpdatedigital noisenotch, lowpass filters


If the problem is the precision in DTT, then why would the noise change when the corner frequency of the filter is changed?

And how about checking for filter noise in the situation we saw online? 4th order low pass at 1 Hz or 8 Hz.

 This is because when we plot signals with sampling frequencies 2k and 16k with the same BW, we actually create psd/coherence using different numbers of points in FFT calculations as NFFT ~ fs/bw, fs-sampling frequency. So we secretly used 8 times more fft points for 16k signal then for 2k signal. Following plots demonstrate this effect. The first plot shows transfer function and coherence for filtering of 16k signal with butter('LowPass',4,8) and 2k signal with butter('LowPass',4,1)  when BW=0.1. There is a disturbance in coherence for 2k signal below 2 Hz. Now let's take BW=0.8 and plot transfer function and coherence for 16k signal. We can see the same effect of coherence disturbance.

same_bw.png    16384_bw0p8.png

The similar effect takes place when we change the cut-off frequency. The following plots show transfer function and coherence of two pairs of 2kHz signals. 4 order butterworth low-pass filter was used. For the first pair cut-off frequency was 1 Hz, for the second 10 Hz.  On the first plot BW=0.1 and there is a disturbance in coherence below 1 Hz. However on the second plot when BW=0.01, this effect is lost.

corners_bw0p1.png     corners_bw0p01.png

I guess my goal is to figure out when these effects come from fft calculations and when from digital filter noise.

  7037   Thu Jul 26 12:10:28 2012 DenUpdateCDSnew c1tst model for testing RCG code


I made a new model, c1tst, that we can use for debugging the FREQUENT RCG bugs that we keep encountering.  It's a bare model that runs on c1iscey.  Don't do any thing important in here, and don't leave it in some crappy state.  Clean if up when you're done.

 I wanted to test biquad form in this model. I added biquad=1 flag to cdsParameters, compiled, installed and restarted it. After that c1iscey suspended.

The same thing as we had several month ago

controls@c1iscey /opt/rtcds/caltech/c1/target/c1tst/c1tstepics 0$ cat iocC1.log

Starting iocInit
iocRun: All initialization complete
sh: iniChk.pl: command not found
Failed to load DAQ configuration file

  7041   Thu Jul 26 17:39:49 2012 DenUpdatedigital noisebiquad key is working

 I've filtered a 1 Hz sin wave excitation with a notch filter inside c1sus and c1rfm models. The biquad key is switched on in the last one, c1sus uses DF2. The results are indeed different.

df2_bqf.png    df2_bqf_spec.png

Still I do not like huge (2n+1) harmonics in the output of the biquad filter, I do not get them in the simulations. They are absent in the time series as well. So this is not a psd-estimation effect.



  7042   Thu Jul 26 21:31:44 2012 DenUpdatedigital noiseonline biquad works


   Still I do not like huge (2n+1) harmonics in the output of the biquad filter, I do not get them in the simulations. They are absent in the time series as well. So this is not a psd-estimation effect. 

 Excitation generator created these harmonics. When I applied low-pass butterworth filter, I've got the result of online filtering close to simulations. On the second graph blue is biquad filter output spectrum, red corresponds to DF2. 1 Hz sin wave was filtered with a notch filter of Q=100, depth=300 at 1 Hz.

df2_bqf_lp.png    df2_bqf_lp_spec.png

  7050   Mon Jul 30 14:24:25 2012 DenUpdatedigital noisebiquad key is working


What is "DQF"?  Is that the biquad?  And what is the difference between DF1 and DF2?  Why don't you just write out the name, so it's more clear.

DQF - biquad form
DF1 - direct form 1
DF2 - direct form 2
LNF - low-noise form
The difference between them is described in Matt's slides G0900928-v1. I think, LNF coefficients are incorrect in the presentation
  7052   Mon Jul 30 16:05:36 2012 DenUpdatedigital noisefilter checker

 We decided to write a script that will check online filters for digital noise. One method can be implemented using the following algorithm:

  • calculate filter output using single precision
  • calculate filter output using double precision and assume that it is precise
  • find digital noise at the output of the filter when single precision is used
  • extrapolate the result to the double precision filter dividing by 2D-S ~ 107, D - number of bits used in double precision mantissa, S - in single precision

Restriction: Single precision filter internal variables must be checked for overflows.

I applied this method to filtering a 1 Hz sine wave with a notch filter. Precise output should also be a 1 Hz wave => at other frequencies we see noise => digital noise spectrum should coincide with filter output. The plot shows the method worked out for this example.


Using this method I estimated digital noise of butter("LowPass", 2, 0.001) applied to white noise. Sampling frequency was 16 kHz. 

iir_psd_lp.png iir_time_lp.png

  7055   Tue Jul 31 00:27:52 2012 DenUpdatePEMtrillium

We have a Trillium for several days from Vladimir. I've put seismometer inside the foam box on linolium. I was not able to level the seismometer on granite as this Trillium does not have level screws. Does anybody know where they are?  Readout box stands on the foam box as seismometer cable is short (~2 meters).

Cables go to STS1 inputs (7-9) on ADC 3.

  7083   Fri Aug 3 13:05:28 2012 DenUpdatePEMshims

As we do not have legs for Trillium, I was advised to use shims to adjust the levels. However, they produce extra resonance at ~30 Hz + harmonics. Coherence is lost at these frequencies.


  7085   Sat Aug 4 17:32:31 2012 DenUpdatedigital noisefilter checker

The script estimates digital noise produces by online filters. First version of Matlab files and complied c files are in scripts/digital_noise directory.

Algorithm for 1 filter bank (max number of filters = 10):

  1.        extract sos - representation from Foton file for each filter (Matlab)
  2.        download data from corresponding DQ channel using NDS (Matlab)
  3.        find filters that are switched on (Matlab)
  4.        filter signal using Df2 and BQF with single and double precision (C)
  5.        estimate digital filter noise (Matlab)
  6.        calculate power spectral density and plot the result (Matlab)

More details on (2)

Often DQ channels have reduced sampling rate. In this case the script will upsample data adding zeros.

AI filter is not applied. But in the end only the frequency range (0, DQ RATE / 2) is analyzed.

More details on (3):

This is done by reading C1:MODEL-BANK_NAME_SW1R and C1:MODEL-BANK_NAME_SW2R channels.
_SW1R channel value is the sum of the following numbers:
  • input switch ON / OFF => 4 / 0
  • filters 1 - 6 ON /OFF
    • 1 => 48 / 0
    • 2 => 192 / 0
    • 3 => 768 / 0
    • 4 => 3072 / 0
    • 5 => 12288 / 0
    • 6 => 49152 / 0
    • If a switch is ON but there is no corresponding filter (one green and one red line under the switch) then the switch value is divided by 3

_SW2R channel value is the sum of the following numbers:

  • decimation switch ON / OFF => 512 / 0
  • output switch ON / OFF => 1024 / 0
  • filters 7 - 10 ON /OFF
    • 7 => 3 / 0
    • 8 => 12 / 0
    • 9 => 48 / 0
    • 10 => 192 / 0
    • If a switch is ON but there is no corresponding filter (one green and one red line under the switch) then the switch value is divided by 3

Note: as for now Matlab script assumes that input, output and decimation filters are switched ON and there are no turned ON filter switches that do not correspond to any filters

More details on (5)

Digital noise using double precision is estimated by extrapolation of digital noise with single precision. The last is calculated by subtracting outputs of the filters with single and double precision. Then this noise is multiplied by 3 * 10-7.

This extrapolation number was achieved by printf tests of the number 0.123456789012345678 with single and double precision on C. Using type 'float' variables 10 significant numbers show up, using type 'double' - 17.

I also did 'calibration tests' to achieve extrapolation number - signal was filters with an aggresive low-pass filter. At high frequencies filter output spectrum is flat => digital noise amplitude must be the same. The plot shows GUR1_X channel filtered with low-pass chebyshev type 1 filter.


However, extrapolation number is not the same for all cases. In the following example of analyzing BS_SUSPOS filter bank using extrapolation 3 * 10-7 we get noise that is slightly overestimated. In some other examples we need to take a larger number. But in average, I think, this is a good approximation.


To avoid extrapolation problem we can use long double precision (~19 digits). I was able to do this with gcc compiler. However, in mex compiler using long double in filter calculations, I do not get any better precision then using double precision. I'll think more about it.

  7086   Sun Aug 5 13:48:40 2012 DenUpdateCDSMove to RCG 2.5 tag release


I moved the RCG to the advLigoRTS-2.5 tag

 After that RFM -> OAF communication through PCIE became bad again. Inside CommData2.c cache flushing is not allowed

// If PCIE comms show errors, may want to add this cache flushing
            #if 0
            if(ipcInfo[ii].netType == IPCIE)
                clflush_cache_range (ipcInfo[ii].pIpcData->dBlock[sendBlock][ipcIndex].data, 16);

As a result, a significant part of MC_F and other signals is lost during RFM -> OAF transmission (270 - 330 out of 2048 per second)

erros.png   overview.png    oaf.png


Last time when I replaced 0 for 1, it suspended SUS machine because of the code bug. Alex modified a couple of files in the old version and it started to work. Do you know if this bug is fixed in the new version?

  7111   Tue Aug 7 23:33:34 2012 DenUpdateEnvironmentNearby EQ


 Just felt an EQ. Impulse moved some vertical blinds by several mm.

Tue Aug 07 23:26:06 2012 

 All optics except MC2 and ETMX are crazy

watchdogs.png      mc1.png    gur.png

  7147   Fri Aug 10 17:38:29 2012 DenUpdatePEMclassify seismic c code


Den and I also had trouble with a simple for loop in our model, so we talked to Alex who noted that the -O3 compiler unravels for loops in a buggy way. Thus, we have compiled c1pem using the -O compiler. 

Alex also modified RCG script to generate -O in the Makefile for c1pem model:

controls@pianosa:/opt/rtcds/rtscore/release/src/epics/util 127$ svn diff
feCodeGen.pl (revision 2999)
feCodeGen.pl (working copy)
@@ -3183,7 +3183,12 @@

print OUTM "\n";
print OUTM "ALL \+= user_mmap \$(TARGET_RTL)\n";
+# do not optimize c1pem
+if ($skeleton eq "c1pem") {
+print OUTM "EXTRA_CFLAGS += -O -w -I../../include\n";
+} else {
print OUTM "EXTRA_CFLAGS += -O3 -w -I../../include\n";
print OUTM "EXTRA_CFLAGS += -I/opt/gm/include\n";
print OUTM "EXTRA_CFLAGS += -I/opt/mx/include\n";

  7150   Fri Aug 10 21:37:15 2012 DenUpdatePEMgur, sts noise

 Using Guralp, STS-2 and Trillium I compared Gur and STS-2 self-noise assuming that Trillium noise is not worse then STS-2 noise.


Interesting that STS-2 (or Trillium if its noise is worse) noise is not too much better then Guralp noise.

  7153   Sat Aug 11 18:57:07 2012 DenUpdatePEMseismometer location

STS-2 - end of X arm

GUR 2 - isolation box

TRILLIUM - 1Y3 (DC power supply uses 1Y3 AC power, please do not close the door completely)

GUR 1 - end of Y arm

Now we have several "triangular seismic antennas". Different configurations can be chosen to compare the results.

  7157   Mon Aug 13 01:33:55 2012 DenUpdateGeneralMysterious banging on emergency door


[Masha, Sasha]

Sorry to spam the e-log, but did someone come knock loudly on the emergency exit door a few moments ago? It gave Sasha and I quite a fright, and we are rather worried.

 Probably, security. You can call 5555 and ask them. Otherwise you can ask them to come and check everything.

  7176   Tue Aug 14 11:49:15 2012 DenUpdateCDSDebugging of c1sus machine and c1rfm models



  We might just need to reduce the load on c1rfm, maybe by introducing a c1rfm2?


 A huge data flow goes from PEM to OAF through RFM. I think we need to make PEM and OAF run on the same machine and transmit signals through the shared memory.

  7185   Wed Aug 15 00:52:17 2012 DenUpdateWienerFilteringfilter calculation

A Matlab script to calculate Wiener filter coefficients and convert fir to iir is ready. Input is a file with zero mean witness and desired signals, output is a Foton zpk command to specify iir filter.

The plot shows comparison of offline fir , iir and online iir filtering. Spectrum below 4 Hz is still oscillating due to acoustic coupling, this is not a filtering effect. At 1 Hz actuator is badly compensated, more work should be done. Other then that online and offline filtering are the same.


  7189   Wed Aug 15 10:40:16 2012 DenUpdateCDSaa filters

The lack of AA filter for MCL signal is RFM model strongly disturbed entering to OAF signal


  7193   Wed Aug 15 13:24:12 2012 DenUpdateCDSRFM -> OAF

Transmission of signals between RFM and OAF is bad again. Now we do not see any errors in IPC_ERR monitors so models think that they get all data but the data is wrong


  7226   Sat Aug 18 19:29:56 2012 DenUpdatePEMEM 172 microphones noise

I've put EM 172 microphones inside Steve's isolation box to measure their noise. I've attached mics to each other and aligned them using the tape.

At low frequencies (below 1 Hz) the noise is limited by ADC as there is a 10 Hz high-pass filter inside mic readout box.

ADC noise is measured by splitting the signal from 1 mic into 2 ADC channels.


ELOG V3.1.3-