ID 
Date 
Author 
Type 
Category 
Subject 
5777

Tue Nov 1 18:16:50 2011 
Den  Update  Adaptive Filtering  Adaptive filter witness and EP SNR 
Quote: 
Coherence of seismometers to MCL:
STS1 is located at the vertex. xaxis along the x arm.
GUR1 is located at the IMC MC2 mirror. Same orientation.
=> 1. Only the xdirection has good coherence (to be expected)
2. Only good coherence at 1.54Hz (huh?)
So probably other noise sources are dominating. Let's look into noise projections. Remember IMC autoalignment is off.
A quick adaptive filter run with only the GUR1 and STS1 witnesses applied only to MCL didn't really do anything. Some more thought needs to be invested into the AA and shaping filters.

The possible explanation to this effect is the following:
Seismic noise mainly consists of the Love and Rayleigh surface waves. In the simulations we've taken 2 perpendicular Love waves and 2 perpendicular Rayleigh waves that interfere under the test mirrors. This interference produces both translational and tilt movements. Then we can see the coherence between translational motion and cavity length.
1. The coherence at big frequencies is small due to the passive isolation.
2. The coherence at 1 Hz is 0 due to the wire resonance.
3. The coherence between 1 and 10 Hz is reasonable. At the real 40m's measurements we can see only good coherence for gur1_x and sts1_x but this is the matter of adjusting seismic waves amplitude and direction. In the simulation we've assumed that all waves are of the same amplitude. The really interesting thing is that
4. The coherence below 0.8 Hz began to grow. We don't see this in real measurements.
But let's simulate the seismometer measurements. It measures not only translational motion but also tilt and with amplitude proportional to g / omega^2. On the Figure below the spectrum of translation motion, tilt and tilt as seen by seismometer is presented. We can see that at low frequencies tilt begins to dominate over the translational motion. We assumed the speed of waves in the region 30  60 m/sec.
Let's now plot the coherence between the cavity length and seismometer signal.
We can see that the coherence between seismic signal from measured by seismometer and cavity length is gone below 1 Hz where tilt becomes important.
Now let's try to filter out the seismic noise from the cavity length using both static Wiener filtering and adaptive Mfxlms algorithm. For both filters we've used AA filter before the filters and also AI filter after adaptive filter. The downsampling ratio was 4, the sample frequency 256. We can see that nothing is really subtracted due to the pollution of the seismometer signal due to tilt motion.
Assume we do the same computational experiment but with the seismometers that measure only ground translational motion and tilt do not affect on them. Then we have a reasonable subraction of seismic noise at low frequencies even with the filters of the length 100 as shown on the figure below.
Let's look through an order of magnitude analysis. Assume ground motion consists of only one wave with amplitude A and only vertical movement: z(t) = A*sin(2 pi 0.1 t). So the frequency of the wave is 0.1 Hz. If A = 10^{6} m => the amplitude of the suspended mirror motion is also approximately 10^{6} m, as we have no isolation at low frequencies. The tilt angle has the amplitude alpha = 2*pi*A/lambda, where lambda  wavelength of the ground wave, lambda = v/f = 40/0.1 = 400 m, v  speed of the wave, f  frequency. Then alpha = 10^{8} rad. If the distance between ground and mirror suspension point is 1 m, then mirror motion amplitude due to tilt is B = 10^{8} m << A.
It turns out that tilt does not effect much on the cavity length compared to the ground translational motion, but it affects a lot on the seismometer signals, that are used as witness signals in the filtering. For that reason we need tiltmeters to filter seismometer signals in order to obtain pure translational ground motion. 
5810

Fri Nov 4 14:18:24 2011 
MIrko  Update  Adaptive Filtering  Coherence between seismometers and MC length 
Looking into the coherence between the seismometers and IMC length (MC_F):
FIrst with the seismometers only AC filtered at around 0.003 Hz and AA30Hz:
Ignore the increase in coherence at very low frequencies. That is an artefact.
Then with an additional filter single complex pole @1Hz Q=1000 (giving 20dB per decade in attenuation above 1Hz) , only for GUR1X:

5811

Fri Nov 4 15:24:13 2011 
Mirko  Update  Adaptive Filtering  Adaptive FF on the MC doesn't make sense 
[Den, Jenne, Mirko]
Here is the story:
1. High gain
The control loop has a high gain at the interesting frequencies. The error point (EP) before the servo is approx. zero and the information how much the mirror would move is in the feedback point (FB) behind the servo. The mirror doesn’t actually move because of the high gain. This is the case of the grav. wave detectors and medium frequencies (> approx. 50Hz, <<1kHz). Adding feedforward (FF) to this doesn’t actually keep the mirror quieter. In fact if you look into the FB and subtract the seismic you make the mirror move more. Yes this is the case we have for the mode cleaner, doesn’t make sense.
In a real GW detector FF however isn’t totally useless. The FB tells you how much the mirror moves, due to GWs, seismic etc. When you record the FB and subtract (offline) the seismic you get closer to the real GW signal.
2. Low gain
When you, for technical reasons, can’t have a high gain in your control loop the EP contains information of how the mirror actually moves. You can then feed this into the adaptive filter and add its output to the FB. This will minimize the EP reducing the actual mirror motion. This is the case we will have for most or all other degrees of freedom in the 40m.
The reason we have so much gain in the mode cleaner length control is that we don’t actually move mirrors around. We change the frequency of the incoming laser light. You can do that crazy fast with a big amplitude. This gives us a high UGF and lots of gain in the 1Hz range we are interested in.
We now change the adaptive filter to look at the EP for all DOFs except for the MC. We calculate the effect of the FF on the MC length signal without ever applying the FF to the MC length control. 
5816

Fri Nov 4 21:52:58 2011 
Den  Update  Adaptive Filtering  coherence 
[Mirko, Den]
We still think about the coherence between seismic noise and mode cleaner length. We beleive that
1. Below ~0.1 Hz tilt affects on the seismometers as was simulated http://nodus.ligo.caltech.edu:8080/40m/5777
2. From 0.1 to 1 Hz is an interesting region. We try to figure out why we do not see any coherence here. Tilt does not seem to dominate.
At 1 Hz coherence might be lost because of the sharp resonance. For example, if the mirror is suspended to the platform by wires with f = 1 Hz and Q = 1000, then the coherence between platform motion and mirror motion will be lost as shown on the figure below.
For this reason we tried to "help" to the adaptive filter to guess transfer function between the ground motion and mirror motion by multiplying seimometer signal by the platform > mirror transfer function. As we do not know exactly eigen frequency and Q of the wires, we did a parametric simulation as shown on the figure below
The maximum coherence that we could achieve with treak was 0.074 compared to 0.056 without. This was achieved at f=1.0011 Hz but with surprisingly high Q = 330. And though this did not help, we should keep in mind the tecnique of "helping" the adaptive filter to guess the transfer function if we partly know it.
Another unexpected thing is that we see come coherence between gur1_x and mode cleaner WFS pitch signal at frequencies 0.1  1 Hz
From this we can suggest that either mode MC_F channel does not completely reflect the mc length at low frequencies or WFS2 shows weard signal. 
5825

Sun Nov 6 21:09:03 2011 
rana  Update  Adaptive Filtering  coherence 
Quote: 
[Mirko, Den]
We still think about the coherence between seismic noise and mode cleaner length. We beleive that

The 'helping' trick is a good one: we should use our best guess for the stackTF and the pendulumTF and put it into the IIR filter bank to prefilter the seismometer signals before they get to the MC mirrors. Also should remember that the signal we send to suppress the seismic motion is applied to the pendulum as a force, not a displacement.
The 3 Hz fast cutoff in the MC_F signal is a good clue. It means that at low frequencies, perhaps the noise source is going through a digital 3 Hz elliptic or Chebychev filter. 
5835

Mon Nov 7 16:42:56 2011 
Jenne  Update  Adaptive Filtering  BLRMS's to monitor OAF channels 
I copied Mirko's PEM BLRMS block, and made it a library part. I don't know where such things should live, so I just left it in isc/c1/models. Probably it should move to cds/common/models. To make the oaf compile, you have to put a link in /opt/rtcds/caltech/c1/core/branches/branch2.1/src/epics/simLink , and point to wherever the model is living.
I then put BLRMSs on the control signals coming into the OAF, and after the Correction filter bank in the Adapt blocks, so we can check out what we're sending to the optics. 
5842

Tue Nov 8 18:06:43 2011 
Mirko  Update  Adaptive Filtering  Noise injections to MC13 PIT & YAW 
With fancy analysis tools approaching usability I looked some more into noise projections from PIT,YAW motion of the MC mirrors to MC length.
Injection channels are: C1:IOOMC1PIT_EXC. Actual injection signal is recorded in C1:IOOMC1PIT_OUT and similar.
Source channels for the projection are C1:IOOWFS1_I_PIT_OUT_DQ and similar.
Response channel is C1:OAFMCL_IN_IN1 or C1:IOOMC_F_DQ.
MC autoalignment was off.
1. Fixed sine injection @ 0.5Hz
Every injection lasted 4mins.
Start time 
DOF 
Amplitude [counts_pk] 
rough SNR in ASD BW 0.04Hz 
16:09 
MC1PIT 
25 
 
16:14 
MC1YAW 
40 
12 
16:21 
MC2PIT 
35 
5 
16:26 
MC2YAW 
35 
5 
16:34 
MC3PIT 
45 
5 
16:39 
MC3YAW 
45 
 
2. Filtered white noise injection
Generated white noise from 0.5Hz20Hz, then filtered that in the C1:IOOMC1PIT and similar filters by the following TF, (Notch 1Hz, Q=3, 40dB & 2 zeros @ 1.1Hz)
All injections lasted 4mins. I left the filters in the first filter bank but disabled them.
Start time 
DOF 
Amp. @ 0.5Hz [counts_pk (?)] 
17:01 
MC1PIT 
250 
17:10 
MC1YAW 
400 
17:16 
MC2PIT 
400 
17:21 
MC2YAW 
400 
17:26 
MC3PIT 
500 
17:31 
MC3YAW 
500 

Attachment 2: MC1PIT_Noise_inj.png


Attachment 3: Noise_Inj_MC2PIT.png


Attachment 4: Noise_Inj_MC2YAW.png


Attachment 5: Noise_Inj_MC3PIT.png


Attachment 6: Inj_Noise_MC3YAW.png


Attachment 7: Inj_Noise_MC1YAW.png


5848

Wed Nov 9 14:23:35 2011 
Jenne  Update  Adaptive Filtering  OAF MC Delay Measurement 
As described in elog 2063 and the mevans document, we need to measure the TF of the OAF's plant, to find the delay.
At DC, the phase is 2.5deg, and at 32Hz, the delay is 4.6Hz (extrapolated from the points at ~30deg and ~38deg). The DTT file is in /users/Templates/OAF/OAFMCLDelay9Nov2011.xml .
This gives a phase lag of 7.1deg at the Nyquist freq.
7.1 / 180 * 32 = 1.26, so ~1 cycle delay. Not so much. The new ADCs are waaaay faster than the old 110Bs. Yay! 
Attachment 1: OAFMCLDelay9Nov2011.pdf


5856

Wed Nov 9 20:35:58 2011 
Mirko  Update  Adaptive Filtering  Seismic noise injection into the MC 
Very elaborated measurement ;)
On 111108:
18:40 Stomp near STS1 for 2mins
18:47 Jump near GUR1 for 2mins
18:52 Walk from MC2 approx. halfway to vertex for 2mins
Tried to see if jumping / stomping the ground near STS1 / vertex or GUR1 / MC2 would show up in the seismometer or MC length data.
In GUR1 jumping / stomping clearly shows up in the timeseries. Also it clearly shows up as a low frequency signal if you walk to a position near MC2. E.g. walk from the vertex to MC2. Stop near the cones. Gives a big dip on GUR1X, that recovers in 1020sec if you remain stationary. Big "hill" if you come from xarm end and stop on the x side of MC2. So probably lots of tilt to GUR1X coupling at low frequencies.
Nothing was really visible in spectra (see below).
Resonances:
There appear to be a lot of resonances in the 1020Hz range, see e.g. 1st attached pic.
Coherence:
Looking at the coherence of difference axis of the seismometers. Kind of dirty measurement, could have all kinds of reasons.
Quite a bit of coherence in STS1 at 56Hz. Possibly limiting the STS1X to MCF coherence to up to 4Hz?

Attachment 1: Inj_spectra_at_GUR1_all_DOFs.fig

Attachment 2: Inj_spectra_at_GUR1_all_DOFs.png


Attachment 3: Inj_spectra_at_STS1_all_DOFs.fig

Attachment 4: Inj_spectra_at_STS1_all_DOFs.png


Attachment 7: Coherence_GUR.fig

Attachment 8: Coherence_STS1.fig

5858

Wed Nov 9 21:32:38 2011 
Mirko  Update  Adaptive Filtering  Put accelerometers 46 on top of MC2 tank 
Put the accelerometers on top of MC2. Orientated as the arms,GUR1 and STS1:
Should be fixed a bit more rigidly.
Looking into the signals at a quiet time:
Hmm. Either the acc. are mislabeled or there is really bad xy coupling. The connectors in the back of the acc. power supply / amplifier box are in ascending order. 
Attachment 3: Coherence_quiet_time.fig

5864

Thu Nov 10 16:44:54 2011 
Mirko  Update  Adaptive Filtering  Looking into MC_F & PSL misalignment 
[Den, Mirko]
While doing the things below we accidentally misaligned the PSL laser. Thanks to Suresh and Jenne for realigning!!
There are a lot of strange features in MC_F (see for example http://nodus.ligo.caltech.edu:8080/40m/5738 )
To get some better understanding of the signals in the control loop we looked some more into what happens to the MC feedback signal after it exits the MC servo board (D040180 see DCC).
The MC_F signal is actually the servo signal: http://nodus.ligo.caltech.edu:8080/40m/5695
The Thorlabs temperature controller is actually used in the PZT path!
We measured the LP filter in the PZT path (that is kind of mislabeled as temp.)

5867

Thu Nov 10 22:00:38 2011 
Mirko  Update  Adaptive Filtering  Looking into MC_F & PSL misalignment 
Quote: 
[Den, Mirko]
While doing the things below we accidentally misaligned the PSL laser. Thanks to Suresh and Jenne for realigning!!
There are a lot of strange features in MC_F (see for example http://nodus.ligo.caltech.edu:8080/40m/5738 )
To get some better understanding of the signals in the control loop we looked some more into what happens to the MC feedback signal after it exits the MC servo board (D040180 see DCC).
The MC_F signal is actually the servo signal: http://nodus.ligo.caltech.edu:8080/40m/5695
The Thorlabs temperature controller is actually used in the PZT path!
We measured the LP filter in the PZT path (that is kind of mislabeled as temp.)

We looked into the signal from the MC servo board at different position at the PSL table.
We looked into the FB going into the temp. and PZT parts of the FB.
Temp.:
PZT:
We also looked at the signal in just in front of the FSS box No idea why the elog doesn't preview these pdfs.
Lots of extra noise there. We will check out where that comes from.

5869

Fri Nov 11 00:55:53 2011 
Den  Update  Adaptive Filtering  MC_F 
[Mirko, Den]
Not satisfactory work of adaptive filtering make us to think about the signals that we use. Now we try to deal with mode cleaner and analize its length. We take MC_F channel. We know that MC_F is used as a feedback signal to the laser frequency and laser changes it's frequency linear to the input modulation signal up to ~1kHz. Than is MC_F is length of MC, not velocity or acceleration. If so, it's form due to seismic noise + company of other noises + stacks and wires should be approximately like the left plot. Instead we see the right plot.
Possibly, leftplot form signal is not possible to transmit through the wires and adc. Most signal at medium and high frequencies would be lost because of wire and adc noise. For that reason mode cleaner length signal might be amplified at frequecnies >~20 Hz by some bandpass filter.
Where is this highpass filter and what is the form of this filter?
It might be just after the photodetector in order not to transmit real mode cleaner length through the wires. But if wires and not very noisy, it could be somewhere before ADC.
But anyway, for the laser frequency feedback the corresponding low pass filter should be used.
Where is this lowpass filter and what is the form of the filter?
We followed the mode cleaner length signal up to TT FSS and measured the mode cleaner length, that is used as an input to TT FSS. As shown http://nodus.ligo.caltech.edu:8080/40m/5867 MC_F is different from the signal that is given to TT FSS. This is not clear because we do not have smth that could effect on the signal that much before branch node and recording of MC_F. The main difference is the cut off at the MC_F signal at 3 Hz. It might be a digital filter but we do not see any filters between adc_0_0 up to MC_F test point  straight line. This means that we have an analog filter somewhere between that blue box where the branch point is and ADC. We need to find it. But at least, we do not have a lowpass filter before FSS. So it is probably after it.
So, we need to find the 3 filters that we think affect on the MC_F channel in order to figure out why we have such a bad coherence between seismic signal and mode cleaner length. 
5871

Fri Nov 11 10:30:27 2011 
rana  Update  Adaptive Filtering  MC_F 
There should be a whitening filter in the Pentek Generic DAQ board (Eurocard with 8 differential LEMO inputs). It used to be that the MC_L channel came in through here and I believe it has 2 stages of 150:15 pole:zero filters.
I don't remember if it is one or two stages, but this should be easy to measure with a function generator or by driving this input using the MC2 UL Coil monitor and doing the transfer function in DTT (as Koji and Jenne did for the demod boards). 
5879

Sat Nov 12 02:00:36 2011 
Mirko  Update  Adaptive Filtering  MCF and other signals 
Regarding http://nodus.ligo.caltech.edu:8080/40m/5867 and http://nodus.ligo.caltech.edu:8080/40m/5869 :
MC_F signal:
The measurements on p. 5867 were done using the ADC attached to the PEM computer. There was a big difference between the MC_F signal recorded directly after the server board and the signal just before the FSS board as recorded by a PEM channel.
To understand how this happens we measured the signal at different places with a spec. analyzer:
1. WIth a locked MC measuring the signal just before the PEM ADCs (meaning after a 60ft BNC cable)
2. Same position, but unlocked and seemingly dark MC
3. Locked MC, signal just before the FSS box
4. MC_F signal that is usually going into the Pentek Generic board and is recorded in C1:IOO
=> The 60ft BNC cable adds a considerable amount of noise, but doesn't fundamentally change the signal. It is weird that the signal is white from approx. 4Hz on.
Due to Jenne's measurement ( http://nodus.ligo.caltech.edu:8080/40m/5848 ) we know the TF from MCL through PD, mixer Pentek and into C1:IOO looks like this:
This is with the double HP from 15Hz on that should be in the Pentek. So one might expect a less white signal going into the FSS board...
PEM ADCs
The dark noise in the PEM ADCs is actually a factor 10 higher than in the IOO ADCs. Still ok wrt the the seismometers.
We also tried to measure essentially the dark noise of the whole seismometer readout (seismometer box, then ADC). That seemed ok, but is of limited value since the seismometer electronics behave a bit strange when there is no seismometer connected.

Attachment 3: Compare_signals_at_all_places.fig

Attachment 5: Channels_attached_to_the_PEM_ADC.fig

5882

Sat Nov 12 02:46:13 2011 
Den  Update  Adaptive Filtering  stacks and ground 
We measured the coherence between the seismometer near the MC2 stack and accelerometers on the vacuum tank where MC2 is. Because accelerometers produce small signals at low frequencies, which are comparable with adc noise, we amplified the accelerometer signal by a factor of 20. We could not do it more because though adc has 40 V range, the black box that follows the channel sockets can transmit only 2.5 V max amplitude signal. Probably, this was done because old adc accepted 2 V max amplitude.
We were able to found some coherence at 0.11 Hz though the accelerometer signal is rather noisy. So to consider stack as a noise source is still possible. This measurement should be better done with two seismometers, one on the floor, the other on the stack. From the figure we can also see that tilt affects the x and y seismometer signals from 0.1 Hz. Green line (zcomponent) is much lower that red and blue lines (x and y). Tilt affects on horisontal axes of the seismometer much more than on vertical.
What we also think about is that at low frequencies mirrors start to move approximately the same and seismometers can help us to figure out small reletive displacement of the mirrors which form the MC length. We can estimate the critical frequency by presenting the ground motion as interference of surface waves with different velocities and amplitudes. For only 1 wave we have for the relation of MC length to the seismometer read out ~sin (2*pi*f/v*L). f  frequency of the wave, v speed, L  length between the mirrors. We can see that below 1 Hz we have ~sin (f/2). At this point seismometer signal could lose coherence with MC length signal. We could try to subtract seismometer signals from corresponding axes, but gur1 and sts1 has different calibrations. Moreover, the noise floor of the seismometers might not allow us to measure the differential signal. We'll try to simulate this scenario and find seismometer calibration or measure it. We are basicly interested only in the ratio of calibraion fucntions of 2 seismometers. 
5900

Tue Nov 15 22:31:39 2011 
Mirko  Update  Adaptive Filtering  Towards wiener filtering and improved OAFing 
[Jenne, Mirko]
1. We should help the OAF by compensating for the actuator TF:
The actuator TF, from adaptive filter output to MC2, through PD, mixer, Pentek and into C1:IOO looks like this:
If we assume a whiteish error signal that the adaptive code tries to compensate for its job gets extra complicated because it has to invert this TF. So we really should compensate for that. Easiest place for that is the CORR filter directly behind the adaptive code block.
Using the TF measurement from above I used the vectfit (" /cvs/cds/caltech/apps/mDV/extra/firfit_forFotonMirkoComplex.m" ) to get fit a corresponding digital filter:
If we invert swap the zeros and poles in the digital filter we get the inverted TF.
(Todo: Figure out how to invert the TF. Just switching the poles and zeros doesn't work).
2. Wiener filtering
The idea was to use the adaptive filtering only for small corrections to the wiener filtering. So we really should try to get the wiener filtering going.
Howto:
1. Get data for STS1X and GUR1X and MC_F in matlab. E.g. via ligodv
2. Check the MC was in lock the entire time.
3, Filter MC_F with the actuator TF, so the wiener filter knows about that and compensates for it
4. Calculate the wiener filter " h1winolevLigoDV.m "
5. Export the data to the workspace. It is also saved to the disc as "h1filtcoeffTS.mat". Make sure there are first the witnesses, then MC_F
6. Execute " /cvs/cds/caltech/apps/mDV/extras/LHO/firfit_for_FotonMirko.m" while one directory higher.
7. Copy the digital filter in SOS form that is printed into the matlab command line and put it into the corresponding filter in the OAF model via foton.
With data from 111115 04:00 to 05:45. Sampling freq. 256Hz. 8000 Taps => length = 30.2s. Prefiltered to notch the 60Hz line in MC_F, but not compensation the actuator TF. This results in the following wiener filter and corresponding SOS filter to be copied into foton.
STS1X:
GUR1X:

Attachment 3: MCL_round_trip.fig

Attachment 6: STS1X_Wiener_filter_data_from_111115.fig

Attachment 7: GUR1X_Wiener_filter_data_from_111115.fig

5919

Wed Nov 16 23:50:40 2011 
Den  Update  Adaptive Filtering  seismic noise injection 
[Micro, Den]
Analyzing coherence of seismic noise and mode cleaner length we've figured out that at some days the coherence below 1 Hz is still present. For example, at Nov 13 we can see some coherence compared to most other dates when we are not able to see coherence as shown on the figure. On the top plot  psd of MC_L and GUR1_X at Nov 13 (red and blue) and Nov 15 (black and cyan). On the bottom plot is presented coherence between MC_L and GUR1_X on Nov 13 (red) and Nov 15 (black)
We can divide the psd plot for 2 parts  below 1 Hz and above 1 Hz. Above 1 Hz seismic noise on Nov 15 (cyan) was higher then on Nov 13 (blue) and correspondently MC_L at that region was higher on Nov 15. Below 1 Hz seismic noise was higher on Nov 13 but MC_L is still lower that on Nov 15. That is surprising. From the coherence plot we can say that once we have some more seismic noise than usually, we immediately see coherence.
Because of this we wanted to find out the level of the X noise that makes seismic noise invisible. We injected seismic noise by doing smooth physical exercises near MC_2 (1.5 m and 3 m apart). The MC_2 was in lock during the experiment.
In the coherence plot we can see that coherence between GUR1_X and MC_L increased with noise injection. The highest coherenced we obtained sittind down and standing up smoothly near MC_2 at distance 1.5 m. We did not want to come clother and break the lock. This measurement tells us that the X noise is approximately 34 times higher than seismic noise in the range 0.1  1 Hz. That means that it is approximately 1e6  1e8 m/sqrt(Hz) in this region. This noise goes down at frequencies from 2 Hz and not seen because of seismic noise. Actually, seismic noise can be filtered out with the Wiener filter and then we'll see the spectrum of X noise.
We now try to figure out the method to estimate the contribution of OSEM noise to the X noise. 
5932

Thu Nov 17 22:24:19 2011 
Den  Update  Adaptive Filtering  MC1_COIL 
Analyzing coherence between MC length and signals on MC1, MC2 and MC3 coils we have noticed that MC1 COIL signal is not coherent to MC length at all at interesting frequencies 0.1  1 Hz.
We try to explain this phenomena.

Attachment 1: MC1COILcrop.pdf


Attachment 2: MC2COILcrop.pdf


Attachment 3: MC3COILcrop.pdf


6065

Sat Dec 3 18:29:20 2011 
Den  Update  Adaptive Filtering  coherence 
I've looked through the coherence between the MC length and seismometers after the ifstatement problem was fixed. Coherence improved for all seismometers but is still not 1. It is possible that contribution from X, Y, Z directions split the coherence between them but at ~0.203 Hz we do not see much coherence for all these directions.
I looked at the coherence between MC2 OSEM signal and MC_F when the AUTO LOCKER is ON and OFF. I thought that we'll ses the same coherence for both regimes as laser is locker to the MC length. However, I figured out the coherence is worse when AUTO LOCKER is ON at frequencies 0.20.3 Hz.
The first idea that comes to mind is that when feedback to the laser is provided, the pressure to the mirrors from the laser beam is changed. 
6068

Mon Dec 5 02:55:30 2011 
Den  Update  Adaptive Filtering  C1OAF 
I've added filter banks for correction path in the C1OAF model to use AA filters. I compiled and installed the new version. I runs but does not sync. Probably, I've made a mistake in the some names of epics channels. Leave it for now, figure out tomorrow. If someone needs an old version, it is in the /opt/rtcds/caltech/c1/userapps/trunk/isc/c1/models/c1oaf_BACKUP20111204.mdl file. Corresponding medm screen is in the /opt/rtcds/caltech/c1/userapps/trunk/isc/common/medm/OAF_OVERVIEW.adl file. 
6070

Mon Dec 5 10:13:13 2011 
Jenne  Update  Adaptive Filtering  C1OAF 
Quote: 
I've added filter banks for correction path in the C1OAF model to use AA filters. I compiled and installed the new version. I runs but does not sync. Probably, I've made a mistake in the some names of epics channels. Leave it for now, figure out tomorrow. If someone needs an old version, it is in the /opt/rtcds/caltech/c1/userapps/trunk/isc/c1/models/c1oaf_BACKUP20111204.mdl file. Corresponding medm screen is in the /opt/rtcds/caltech/c1/userapps/trunk/isc/common/medm/OAF_OVERVIEW.adl file.

The general rule in the 40m is that if it's not an 'emergency', i.e. something is wrong with the computers and preventing the main locking work, no model recompilingtype activities at nighttime.
Also, if you do things and recompile, you need to do an svn checkin. That's where backups are kept. We don't want to clutter folders with backups anymore. 
6078

Wed Dec 7 00:11:58 2011 
Den  Update  Adaptive Filtering  OfflineAF 
I did offline adaptive filtering with yesterday's 3 hours of MCF and GUR1X data. It turns out that normalizedlms can strongly outperform static Wiener filtering!
This is interesting. It might be something inside MC_F that Wiener static does not see. I think the problem is either with seismometer noise or tilt. 
Attachment 2: offlineaf_coh.png


6093

Fri Dec 9 13:28:09 2011 
Den  Update  Adaptive Filtering  C1OAF 
I tried to figure out why red NO SYNC label became present in the C1OAF_GDS_TP screen after I added AA filters to the C1OAF model.
C1OAF model contains 8 libraries C1OAF_ADAPT for 8 DOF. I changed C1OAF_ADAPT library to C1OAF_ADAPT_AA library where I added 28 AA filters for 28 witness channels. It turns out that if I use this library for all 8 DOF then I see NO SYNC label, if only for one DOF (MCL) then I see green IOP label. This means that using AA filters for each DOF too much channels of filters are created for online system to operate. I think there is some number inside the code that one can not exceed. Analyzing compilation output after "make c1oaf" I figured out that without using AA filters we have 632 filters and using AA we have 856 filters.
For now I'll use AA filters for MCL only. 
6094

Fri Dec 9 14:33:16 2011 
Alex Ivanov  Update  Adaptive Filtering  C1OAF 
Quote: 
I tried to figure out why red NO SYNC label became present in the C1OAF_GDS_TP screen after I added AA filters to the C1OAF model.
C1OAF model contains 8 libraries C1OAF_ADAPT for 8 DOF. I changed C1OAF_ADAPT library to C1OAF_ADAPT_AA library where I added 28 AA filters for 28 witness channels. It turns out that if I use this library for all 8 DOF then I see NO SYNC label, if only for one DOF (MCL) then I see green IOP label. This means that using AA filters for each DOF too much channels of filters are created for online system to operate. I think there is some number inside the code that one can not exceed. Analyzing compilation output after "make c1oaf" I figured out that without using AA filters we have 632 filters and using AA we have 856 filters.
For now I'll use AA filters for MCL only.

I have a feeling we are not fitting into preallocated memory space in the shared memory between the frontend process and the epics process. Filter module data is overwriting some other data and that's why we are not getting a sync light. I suggest we upgrade to 2.4 code first and then we will figure out a way to expand memory areas to fit 856 filters. 
6100

Fri Dec 9 17:53:31 2011 
Den  Update  Adaptive Filtering  C1OAF 
[Jenne, Den]
AA filters for witness channels are added to the oaf model. It is working now and the number of memory used is not critical. NO SYNC is not present any more. 
6110

Tue Dec 13 01:20:38 2011 
Den  Update  Adaptive Filtering  Modifications to LSC, RFM models, added OAF model 
Quote: 
[Jenne, Mirko, with supervision from Jamie]
We are starting to create the new OAF model, so that it works with the new CDS system.

Why did you place Matt's code inside the simulink library and use the same library for all DOFs? I think this won't work out. Inside the .c code there are static variables. If all DOF use the same ADAPT_XFCODE() function, it means that they all mess there signals and coefficients with each other! Or the RCD during the compilation creates a copy of the function with the name of a library name in front? For example, ADAPT_MCL_ADAPT_XFCODE(). But then in the RCG manual it is claimed to name the .c file the same.
This problem can be fixed by creating .c files with proper names for each DOF. But here a memory question may arise. For 1 DOF we now have 28 witness channel. If we have a several minute filter, we use 28 * 10^{4}(filter length) * 3 (FIR coefficients, adapt input, corr input) * 8 (number of bytes in 1 double) = 6.7 Mb / DoF. For 8 DOF we'll allocate ~55 Mb of memory in the kernel. The c1lsc cache size is 6 Mb per cpu. So we are definitely out of cache and it will take some time for a processor to communicate with ram. I wonder if it is OKEY for us to allocate this amount of memory as static arrays inside the kernel.
Now we use 6.7 Mb of memory because it seems to be a mistake with placing the same function for all DOF and we actually allocate for 1.

6137

Mon Dec 19 17:17:02 2011 
Den  Update  Adaptive Filtering  filter tap dependence 
Online filter diverges. I did offline simulations with current ccode. Offline filter also diverges, even in the simplest case
witness = randn(1e6, 1); target = witness + 0.01*randn(1e6, 1);
I tried to create a new implementation of FXLMS algorithm as a c code. Then with this c code I did offline filtering with MCL and GUR signals and compared the error signals depending on the length of the filter.
One can see the code at the svn
adaptOnline  start here and choose algorithm
adaptive_filtering  Matlab implementation of AF
current_version.c  current version of the Filter (Matt's)
fxlms_filter.c  new version of the FXLMS filter
oaf.c  agent between Matlab and C (edited Matt's file)
Data samples can be found at nodus /users/den/wiener_filtering/data 
6199

Sun Jan 15 10:28:02 2012 
Den  Update  Adaptive Filtering  delays 
We can account for delays in the oaf system by compensating it in the adaptive path of the filter. But using only this procedure is not enough. Parameters mu and tau should be chosen accurately:
w = (1  tau) * w;
w += mu * dw / norm;
NLMS algorithm without considering delays works well for mode cleaner length and gur1 seismometer signals, significantly reducing MC_F with parameters mu=1, tau=0. These parameters are considered because nlms algorithm should converge with the highest speed when mu=1. However, if the system has a delay so at time moment n:
error_signal [n] = desired_signal [n]  filter_output [ndelay];
then the adaptive filter diverges for the same parameters mu=1 and tau=0 even for delay=1. For that reason we make the same calculations with tau = 1e4 and tau = 1e2 without reducing mu conserving the adaptation rate and get the same result as nlms algorithm without delays. Next figure shows MC_F signal, error after applying enlms filter with tau=1e4 and tau=1e2. "e" is added to show that a small number (epsilon) is added to the norm of the signal in order to prevent the filter from diverging in the beginning of the process when the norm is not welldetermined yet.
The test was done offline with the sampling frequency 2048 Hz, without downsampling and any filters. We can see that tau=1e4 is still not enough, tau=1e3 or tau=1e2 is as good as nlms without delays, tau=1e1 and high are also bad.
Correctly choosing tau we have some freedom for delay compensation in the adaptation path. This is important as we do not know exactly what is the delay in the real system. We can measure it approximately. In order to figure out the range of reasonable delay errors we make a test with delay = 1, but to the adaptation path we give delays from 0 to 10. It turns out that adaptation path delays greater then 5 make the filter diverge, delays in the range 03 produce a reasonable error. In the figure below errors with adaptation path delays = 1 (correct) and 3 are presented.

6200

Sun Jan 15 11:40:30 2012 
Den  Update  Adaptive Filtering  downsampling 
Here for the downsampling process we use a lowpass Bessel digital filter of order 6, normalized cutoff frequency = 0.1. In the plot presented below we compare the results with downsampling ratio = 1, 2, 4.
We can see that increasing the downsampling ratio, we increase the error of the filter. Moreover, the error at some particular frequency f seems to depend on the ratio f/Fs, where Fs  sampling frequency (2048 Hz) devided by downsampling ratio. Error is the same for all curves below 1 Hz but then begins to increase as we increase the sownsampling ratio. In order to figure out what the problem is  mistake in the filter code, inaccurate upsample algorithm or this is NLMS particularity, I've changed sampling frequency in the chans/daq/C1PEM.ini and C1IOO.ini files from 2048 Hz to 512 Hz for corresponding channels. Now, we compare the error from the filter working with 2048 Hz frequency, downsampling ratio = 4, lowpass filter = Bessel of order 6, normalized cutoff = 0.1 and filter working with 512 Hz sampling frequency, without downsampling and with corresponding Bessel lowpass filter with normalized frequency 0.4.
MC_F measurement at 2048 Hz was done during the day, for that reason red curved is slightly higher then green in the resonance frequencies. But still we can see that these two cases are very much alike. For this reason, it seems that NLMS filter works better with higher sampling frequencies. 
6201

Sun Jan 15 12:18:00 2012 
Den  Update  Adaptive Filtering  running time 
In order to figure out what downsampling ratio we can take, we need to determine the running time of the fxlms_filter() function. If the filter length is equal to 5000, downsampling ratio is equal to 1, number of witness channels is 1 then with ordinary compilation without speed optimization one call runs for 0.054 ms (milli seconds). The test was done on the 3 GHz Intel processor. With speed optimization flags the situation is better
O1 0.014 ms, O3 0.012 ms
However, Alex said that speed optimization is not supported at RCG because it produce unstable execution time for some reason. However, by default the kernel should optimize for size Os. With this flag the running time is also 0.012 ms. We should check if the frontend machine compilers indeed use Os flag during the compilation and also play with speed optimization flags. Flags O3 and Os together might also give some speed improvement.
But for now we have time value = 0.012 ms as running time for 5000 coefficient filter, 1 witness channel and downsample ratio = 1. Now, we need to check how this time is scaled if we change the parameters.
5000 cofficients  0.012 ms
10000 coefficients  0.024 ms
15000 coefficients  0.036 ms
20000 coefficients  0.048 ms
We can see that filter length scaling is linear. Now we check downsampling ratio
ratio=1  0.048 ms
ratio=2  0.024 ms
ratio=4  0.012 ms
Running time on the dependance of downsample ratio is also linear as well as on the dependence of the number of witness channels and degrees of freedom.
If we want to filter 8 DOF with approximately 10 witness channels for each DOF, then 5000 length filter will make 1 cycle for ~1 ms, that is good enough to make the downsample ratio equal to 4.
Things get a little bit complicated when the code is called for the first time. Some time is taken to initialize variables and check input data. As a result the running time of the first cycle is ~0.1 ms for 1 DOF that is ~10 times more then running time of an ordinary cycle. This effect takes place at this moment when one presses reset button in the c1oaf model  the filter becomes suspended for a while. To solve this problem the initialization should be divided by several (~10) parts. 
6296

Sat Feb 18 17:01:26 2012 
Den  Update  Adaptive Filtering  static variables 
In order to prevent different DOF from redetermining static variables in the adaptive code, I've created a separate code for each DOF with the name ADAPT_XFCODE_{$DOF}.c
I've provided the links for these files in the c1oaf.mdl, compiled and run it. Now there are no conflicts between DOFs. 
6297

Sat Feb 18 18:29:38 2012 
Den  Update  Adaptive Filtering  online filtering 
I tried to filter MC_F from seismic noise measured by GUR1 seismometer. I've used 8000 tap filter, downsample ratio=8, delay=1. In the Figure the output of the filter is presented with MC_F signal.
We can see that output is close to the MC_F, but the phase for some reason is not zero. It should not be at 1 Hz  10 Hz due to the actuator. But below these frequencies I do not see any reasons for the output phase to differ from MC_F phase. But it is possible, the phase of the actuator is evaluated very rough and the adaptive filter can't match it. 
6332

Tue Feb 28 16:12:59 2012 
Den  Update  Adaptive Filtering  lunch talk 
Just to be clear what I said at the meeting, I write all this down here. Adaptive filtering of real signals (MC_F and GUR1_X) with all noises inside is
This is offline filtering but with real signals and with the Ccode that is compiled at the 40m now. We can reduce the MC_F signal by ~100 below 10 Hz, but the problem is that reducing the adaptation gain, the error increases. As a result when we move towards FxLMS algorithm with AA, AI and downsampling, we have to take the gain equal to ~1e2 and we do not reduce any noise.
The second demonstration of this problem is static Wiener filtering. This is the result
We can see that adaptive filtering outperforms the "optimal" filtering. This is because an adaptive filter can follow the changes of coefficients immediately while the Wiener filter averages them. This is the mathematical formulation:
mcl_real = coeff _real* seismic_noise_real + other_noise
mcl_real  the real length of the MC,
coeff_real  real coefficients, that represent the transfer function between seismic noise and MC length,
other_noise  noise uncorrelated to the seismic noise seismic_noise_real
But in the world of our measured signals we have the equation
mcl_measured = coeff * seismic_noise_measured + other_noise
mcl_measured = TF_mcl * mcl_real
seismic_noise_measured = TF_seis * seismic_noise_real
where TF_mcl and TF_seis  transfer functions from the real world to measurements.
It seems to me that TF_mcl or TF_seis are not constants and for that reason the TF between measured seismic noise and mcl is not constant. But it is exactly what an adaptive or Wiener filter tries to define:
coeff(time) = average(coeff(time)) + delta(coeff(time))
The result of applying average(coeff) is the green line in the Figure 2  error after applying the Wiener filtering.
delta(coeff)  the changing part of the transfer function is caught by the adaptive filtering. The lower the gain, the lower is the capability of adaptive filter to catch these changes. Theoretically. the error after applying adaptive filter can be presented like this:
E(error*error) = E(other_noises*other_noises) + 1/(2mu)*mu*E(other_noises*other_noises) + 1/ {mu*(2mu)} * Tr(Q) * A
where mu = adaptation gain
Q  covariance matrix of delta(coeff)
A  norm of the seismic signal
The first term in this equation is the dispersion of other noises, the second term is the error of the adaptive filter due to nonzero gain, the third term is due to the changes in the transfer function  we can see that it is proportional to 1/mu. This term explains why the error increases while mu decreases.
Now I'm looking for the part in the path of the signals where the transfer function can change. As I mentioned above, this is not a change in the real world, it is the change in the measured signlals. My first guess is the quantization error  we do not have not enough counts. If this is not the case, I'll move to other things of the signal path. 
6490

Thu Apr 5 18:24:55 2012 
Den  Configuration  Adaptive Filtering  oaf starts to work 
Today I tried to make the lms filter to work online. I played around with the signals (GUR1_X and MC_F) to prewhiten them and in the end the following configuration worked out:
1. mu = 0.03, tau = 1e5, downsample=8, nCoeff = 4000, delay = 5 (sampleandhold delay is not included in the new code, it should be added here!)
2. witness pass: AA32 = cheby1("LowPass", 4, 1, 32) AND 0.1:0
3. witness adaptation path: AA32 AND AI32 = cheby1("LowPass", 4, 1, 32) AND 0.1:0
4. error path: AA32 AND 0.1:0 AND anti_1Hz. Before I added anti_1Hz filter oaf did nothing. This filter tries to approximate the actuator transfer function. Note, it is not in the witness adaptation path. This is some sort of whitening.
5. correction path: AI32, gain = 1
Convergence time ~ 5 mins. The performance of the filter is far not perfect compared to the offline implementation. But it deals with a stack though.

6491

Fri Apr 6 09:57:24 2012 
Den  Update  Adaptive Filtering  static starts to work 
I made static filter to work to evaluate the actuator TF.. Here is the result of static filtering:
What I did:
I did offline simulation of the MC_F Wiener filtering using 2 witness signals  GUR1X and GUR1Y. I've downsampled the data from 2048 to 128 Hz and applied the Wiener filter with 10000 for each witness channel:
Result of the filtering Filter coefficients for gur1x and then gur1y
Gur1x > MC_F transfer function Gur1y > MC_F transfer function
Then using vectfit I approximated obtained transfer functions in the region 0.5  20 Hz. I used a window function and then weights to get a more precise result in this range using only 8 poles and zeros.
I obtained the zpkmodel for each witness channel and entered it into the FOTON splitting it into 2 parts before that because FOTON does not like too long filters. These zpkmodels are at the C1:OAFSTATIC_STATMTX_8_8 and C1:OAFSTATIC_STATMTX_8_9 filter banks.
GUR1X:
z =
7.527339430029315 +31.603999069997801i
7.527339430029230 31.603999069997823i
27.897703898191267 + 0.000000000000071i
6.437806394766186 + 9.893955654289517i
6.437806394766159  9.893955654289510i
1.114401249545640 + 5.479278396987240i
0.176877296954015 + 0.000000000000006i
1.114401249545616  5.479278396987245i
p =
0.407251778925379 + 6.263247012022007i
0.407251778925379  6.263247012022007i
0.230672968859081 + 6.846868757063707i
0.230672968859081  6.846868757063707i
2.871419857491615 +13.707864827517826i
2.871419857491615 13.707864827517826i
2.134260618362721 +18.319129999777648i
2.134260618362721 18.319129999777648i
k =
4.113285626223658e04
GUR1Y
z =
17.961416874092624 +13.631821252434328i
17.961416874092642 13.631821252434353i
8.788634771726304 + 7.653357335975781i
8.788634771726285  7.653357335975777i
0.037906973323273 + 5.133348020858679i
0.164348392996182 + 3.588803405511463i
0.164348392996187  3.588803405511474i
0.037906973323277  5.133348020858679i
p =
0.027577318242359 + 5.174655410828068i
0.027577318242359  5.174655410828068i
0.500384298611703 + 6.310552036591990i
0.500384298611703  6.310552036591990i
0.237055716999485 + 6.881204941979009i
0.237055716999485  6.881204941979009i
1.408223271160550 +14.874570175309771i
1.408223271160550 14.874570175309771i
k =
2.723835471763049e04
Then I approximated the reversed actuator TF and placed it to the C1:OAFSUS_MC2_OUT filter bank. The gain to the static filter output is 1.
P.S. Also the static matrix was filled with 1 for some reason. Here is the script to fix it if if will be bad again
for i in {1..8}
do
for j in {1..28}
do
element="C1:OAFSTATIC_STATMTX_"$i"_"$j"_GAIN"
ezcawrite $element 0
done
done

6492

Fri Apr 6 10:31:07 2012 
Den  Update  Adaptive Filtering  static and adaptive 
I've run static and adaptive filters simultaneously. AA32 filters rotate the phase of the witness signals GUR1X and GUR1Y and now the performance of the static filter is worse. Next time I'll recalculate Wiener filter coefficients taking this into account. But still 2 filters together can deal with a stack better.

6493

Fri Apr 6 11:14:34 2012 
Jenne  Update  Adaptive Filtering  static and adaptive 
Quote: 
I've run static and adaptive filters simultaneously. AA32 filters rotate the phase of the witness signals GUR1X and GUR1Y and now the performance of the static filter is worse. Next time I'll recalculate Wiener filter coefficients taking this into account. But still 2 filters together can deal with a stack better.

This is super awesome! I'm totally excited!! 
6551

Thu Apr 19 22:18:24 2012 
Den  Update  Adaptive Filtering  oaf algorithm: old vs new 
Here are the issues that I found not quite accurate in the old oaf code:
1. There is no need to calculate the norm of the witness signal every time from zero:
norm += (*pBufAdapt) * (*pBufAdapt); // add to the norm
Every step the witness signal vector is the same except the first and last values
wit[i].norm += histAdpt[nCoeff]*histAdpt[nCoeff]  histAdpt[0]*histAdpt[0];
This step will reduce the number of multiplications and summations from 3*M/k to 2*M/k, M  filter length, k  downsample ratio.
2. Old code filter corrects filter coefficients with a delay equal to k=downsample ratio (pretty big):
witness o o o o o o o o o o o o o o o o o o o o o
error o o o o o o o o o o o o o o o o o o o o o
We want the filter to work at green points and skip red points computing output and correcting coefficients at this time (downsample ratio in this example is 4). Old code
 grabs error signal
 calculates output during next k1 red points and 1 green point
 corrects coefficients using this error during next k1 red points and 1 green point
But LMS algorithm should correct coefficients according to the latest error. As we calculate output and correct coefficients before the latest error signal will be available, we should change the order:
 grabs error signal
 corrects coefficients using this error during next k1 red points and 1 green point
 calculates output during next k1 red points and 1 green point
This scheme is completely equivalent to the ordinary LMS algorithm, as now we correct coefficients according to the latest error signal and so do not add any delay.
3. So long soft start is probably not needed for the LMS filter, it makes the filter to converge longer
// modify adaptation gain for soft start
if( state.iWait < state.nFIR )
{
adaptGain = 0.0;
decayRate = 1.0; // clear FIR coeffs after reset
}
As far as I understand this is done to prevent the filter from huge coefficients variations in the beginning when norm is not calculated yet. Instead we can just introduce some small
epsilon = 10.0;
to prevent the filter from divergence in the beginning
delta = mu * error / (wit[i].norm + epsilon);
Though some soft start might be needed by not so long  it will take several minutes before the adaptation gain will take it's specified value. 
6553

Fri Apr 20 23:02:25 2012 
Den  Update  Adaptive Filtering  frequency domain filter 
DFTLMS is a frequency domain adaptive filter that demonstrates faster convergence compared to the timedomain LMS filter. I've tested Discrete Fourier Transform (DFTLMS) filter. It converts witness signal to the frequency domain using DFT and corrects the eigenvalues of the covariance matrix to make them as equal to each other as possible (does prewhitenning of the witness signal).
Left plot compares learning curves for time domain LMS and DFTLMS algorithms on the simulated data from seismometers and mcl (number of averages = 30) Right plot shows the evolution of the filter coefficients norm (Euclidean norms of the coefficient vector). Though LMS algorithm works in the time domain and DFTLMS in the frequency domain, the coefficient vectors must have the same length, because we Fourier Transform is achieved by applying a unitary operator => vector norm must not change.
Plots show that both algorithms converge to the same coefficients vector norm, but DFTLMS does it much faster then LMS.
Online realization:
Good news: algorithm complexity is linear in filter length. Though the algorithm does Fourier transform, its complexity is still O(M), M  number of coefficients. Simulations show that DFTLMS is ~89 times slower then LMS. This is not so bad, may be we can do even slightly better.
Bad news: downsample process is not simple. Due to Fourier transform, the filter needs the whole witness signal vector before calculating the output. This is sad and in contrast with LMS algorithm where we could start to calculate the new output immediately after computing the previous output. We either need to calculate the whole output immediately or introduce delay in the output or approximate Fourier transform with some previous witness signal values.
Realization in the kernel: I asked Alex about complex numbers, exponents, sin and cos functions in the kernel c and he answers that we do not have complex numbers, about exp, cos, sin he is not sure. But for DFTLMS algorithm we are able to get round of these difficulties. Complex numbers will be presented as 2 real numbers. Then exp (a) = cos(a) + i*sin(a). All what we need for DFTLMS are sin(2 * pi * k / M) and cos(2 * pi * k / M), k=0,1,2,...,M1. Fortunately, M  (filter length) is big enough, typical value pi/M ~ 0.001 and we can calculate sin(2*pi/M) and cos(2*pi/M) using Taylor series. As the argument is small, 56 terms will be enough to get precision ~1e20. Then we build the whole table of cos and sin according to induction cos(2*pi/M*k) = cos(2*pi/M*(k1))cos(2*pi/M)  sin(2*pi/M*(k1))sin(2*pi/M), sin(2*pi/M*k) = cos(2*pi/M*(k1))sin(2*pi/M) + sin(2*pi/M*(k1))cos(2*pi/M). We should do it only once, so the algorithm will build these values in the beginning during first several iterations, then will use them.
The main problem is downsampling. I need to think more about it. 
6642

Fri May 11 23:33:41 2012 
Den  Update  Adaptive Filtering  offline vs online 
I've compared offline Wiener filtering with online static + adaptive filtering for MC_F with GUR1_XYZ and GUR2_XYZ as witness signals
Note: online filter works up to 32 Hz (AI filter at 32 Hz is used). There is no subtraction up from this frequency, just MC_F was measured in different times for online and offline filtering. This difference in MC_F in frequency range 20100 Hz showed up again as before with microphone testing. One can see it in 1 minute. Smth is noisy.
Reasons why online filter is worse then offline:
1. FIR > IIR conversion produces error. Now I'm using VECTFIT approximation with 16 poles (splitting into 2 filter banks), this not enough. I tried to use 50 and split them into 5 filter banks, but this scheme is not working: zpk > sos conversion produces error and the result filter works completely wrong.
2. Actuator TF. VECTFIT works very good here  we have only 1 resonance. However, it should be measured precisely.
3. Account for AA and AI filters that rotate the phase at 110 Hz by ~ 10 degrees. 
7000

Sat Jul 21 18:04:02 2012 
Den  Update  Adaptive Filtering  frequency 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 f_{0 }and we match at f_{0} +/ df then in the frequency range (f_{0}, f_{0 }+/ 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._{
} 
7234

Mon Aug 20 13:02:57 2012 
Den  Update  Adaptive Filtering  1 Hz resonance 
Static filter was adjusted to filter 1 Hz resonance in MCL and it could do it. Stack is not great in this experiment due to the phase mismatch. I'll fix it.

7252

Wed Aug 22 20:33:51 2012 
Den  Update  Adaptive Filtering  MC_L in ARMS 
Jenne and I did adaptive filtering of MC_L and measured how X and Y ARM control signals change compared to nonfiltered MC_L. We did the test during 1.5 Hz seismic noise activity and adaptive filter was able to subtract it. However, it adds noise at high frequencies, It is not seen in MC_L but it is present in the ARMs control signals.
I'll investigate this problem. May be we need to reduce adaptation gain. In this experiment it was 0.1 and adaptive filter convergence time was equal to 12 mins.

7589

Mon Oct 22 20:44:49 2012 
Ayaka  Update  Adaptive Filtering  microphone noise 
I will do some experiments on acoustic noise canceling during my stay.
Now I am planning to cancel acoustic noise from PMC and see how the acoustic noise work and how we should place microphones.
First, I measured the noise in microphones and its circuit.
blue, green, red, solid lines; microphone signals
blue, green, red, dashed lines; uncoherent noise in signals
yellow, black, solid lines; circuit noise (signal input is open, not connected to the microphones)
We can see the acoustic signal above 1 Hz, and the circuit does not seem to limit its sensitivity. But I do not know why yellow and black is so different. I will check it tomorrow. 
7592

Tue Oct 23 00:51:41 2012 
Jamie  Update  Adaptive Filtering  microphone noise 
Quote: 
I will do some experiments on acoustic noise canceling during my stay.
Now I am planning to cancel acoustic noise from PMC and see how the acoustic noise work and how we should place microphones.a
First, I measured the noise in microphones and its circuit.
blue, green, red, solid lines; microphone signals
blue, green, red, dashed lines; uncoherent noise in signals
yellow, black, solid lines; circuit noise (signal input is open, not connected to the microphones)
We can see the acoustic signal above 1 Hz, and the circuit does not seem to limit its sensitivity. But I do not know why yellow and black is so different. I will check it tomorrow.

Hi, Ayaka. It would be good if you could give a little bit more detail about this plot:
 What exactly are the "signals"? Are you making a sound somehow? If so, what is producing the sound? What is it's spectrum?
 Are the blue/green/red traces from three different microphones?
 Coherence usually implies a comparison between two signals. Is something being compared in the dashed traces?
 Are the yellow and black traces from different amplifiers?
 What are the units of the Y axis?

7596

Tue Oct 23 10:24:42 2012 
Ayaka  Update  Adaptive Filtering  microphone noise 
Quote: 
Quote: 
I will do some experiments on acoustic noise canceling during my stay.
Now I am planning to cancel acoustic noise from PMC and see how the acoustic noise work and how we should place microphones.a
First, I measured the noise in microphones and its circuit.
blue, green, red, solid lines; microphone signals
blue, green, red, dashed lines; uncoherent noise in signals
yellow, black, solid lines; circuit noise (signal input is open, not connected to the microphones)
We can see the acoustic signal above 1 Hz, and the circuit does not seem to limit its sensitivity. But I do not know why yellow and black is so different. I will check it tomorrow.

Hi, Ayaka. It would be good if you could give a little bit more detail about this plot:
 What exactly are the "signals"? Are you making a sound somehow? If so, what is producing the sound? What is it's spectrum?
 Are the blue/green/red traces from three different microphones?
 Coherence usually implies a comparison between two signals. Is something being compared in the dashed traces?
 Are the yellow and black traces from different amplifiers?
 What are the units of the Y axis?

Sorry for my poor explanation.
I measured this by the same way as you measured the instrumental noise of seismometers.
I put the three microphones at the same place so that the three can hear the same sound. I did not make any sounds, just put them in the lab.
The signals from microphones are all amplified by the circuit.
And I took the correlations of each signals and two others and got the noise (dashed lines) by subtracting the correlated signal from the original signal.
So,
The signal is the acoustic sound in the lab, amplified by the circuit.
Three lines are from three different microphones.
Dashed lines are subtraction of coherent signal from the original.
Yellow and black lines are from different amplifiers in the same circuit box. The circuit has 6 channels.
I did not calibrate the signals I got by DTT since I do not know the calibration factor now. It is just the number I got from the real time system.

7607

Wed Oct 24 14:15:34 2012 
Ayaka  Update  Adaptive Filtering  microphone noise 
Previous results
I am measuring the noise level of the microphones. The circuit does not seems to limit their sensitivities but the circuit's noise seems to be different from other channels.
Measurement
I measured the circuit noise of all 6 channels. (input open)
(mic_open.png)
The noise level is about 10 times different from the others.
Comparing the acoustic signal, microphone+circuit noise, and ADC noise;
(mic_noise.png)
 blue; acoustic signal
 green; microphone+circuit noise
 red; circuit (the data was not took simultaneously.)
 sky blue; ADC noise
To do
I will remake the circuit though the circuit does not limit the sensitivity. I would like to make sure that the circuit does not affect badly and to make the circuit noise level the same.
At the same time, I will get the PMC control signal and see coherence between it and acoustic sound. 
Attachment 1: mic_open.png


Attachment 2: mic_noise.png


7609

Wed Oct 24 15:29:52 2012 
rana  Update  Adaptive Filtering  microphone noise 
We have to change the sample rate and AA filter for the mic channels before going too far with the circuit design. 
7610

Wed Oct 24 17:02:01 2012 
Jenne  Update  Adaptive Filtering  microphone noise 
Quote: 
We have to change the sample rate and AA filter for the mic channels before going too far with the circuit design.

To save the mic channels at higher than 2k (which we should do), we either have to move them to a different model, change the rate of the PEM model, or see if you can save data faster than the model runs (which I can't imagine is possible). 