README for retuning the LSC feedforward Code located /opt/rtcds/userapps/release/lsc/h1/scripts/feedforward Aim is not to turn off FF during measurement and measure the residual between the excitation ad the current feedforward. ### Run excitations ### Optional step: While the IFO is still in Observe you can make a reference on the passive MICH_excitation_comparison.xml plot to later see how much the new FF has improved. IFO in Commissioning mode with Calibration Lines off (to avoid artifacts like in alog#72537). sitemap > LSC > Overview > IFO_FF 1. Prepare for MICHFF_excitation: Ramp MICHFF gain to 0, turn off all FF's off but keep High Pass on, turn off INPUT, ramp gain back to 1. 2. Run MICHFF_excitation.xml excitation. Take 30 averages. This measures pre-shaping of filter. 3. Undo the setup: Ramp MICHFF gain to 0, turn back on FF and INPUT, ramp gain back to 1. 4. Run MICH_excitation.xml excitation. Take 30 averages. This measures what the current FF is doing. Save these templates ### Do Analysis ### Open Tune_LSC_FF_Iterative.ipynb using command 'code', this will open in visual studio. ## Load Data Export diaggui data into text files. For measurement and FF measurement, export coherence and transfer function between MICH_OUT_DQ and CAL_DELTAL. As ASCII text file, call correct name mich/michff_coherence.txt and mich/michff_tf.txt ## Running Filters *Can later change this section to use Craig's filter grabber code* Find current feedforward filter using foton (sitemap > LSC > Overview > IFO_FF > MICHFF) with s-plane as "s (rad/s)". Copy this into gedit and find and replace (i* to 1j*) and (: to ,) and split into z, p and k to change it to a python compatible form. Copy into Running Filters section of notebook. Check that current feedforward look reasonable - could check against foton Bode plot. ## Couplings Coherence check and then only sum correction when coherence is high. Check that the “measurement” which is the residual only changes it by a few percent (and expect “New” to be lower than “Running” which is the original. ?? true?) ## MICH fit Want fit to be between 7 to 250 Hz but there will be features that aren’t real that you don’t want to include in fitting. Edit idx under Mich Fit section to minimize strange things (e.g. change idx = (mich_fr>7)*(mich_fr<250) to idx = (mich_fr>7)*(mich_fr<150)+(mich_fr>160)*(mich_fr<250) to avoid fitting to strange feature in 150 to 160Hz region). Can change xlim(150,160) to zoom in on features. Chose the best order of fit. Want to aim for the lowest Residual but avoid any strange features like peaks in the Abs plot. Change o = # of favorite order. Check the filter looks as expected and create the foton zpk filter design. ### Install new FF ### Copy the foton zpk filter into an old filter in MICHFF. Need to turn off read only mode from file menu. Check for high Q peaks you don't want: Highlight whole zpk filter, click zpk. Change the settings to Complex format: Mag/Q, Root location: Normalized. If there are zeros with Q >100, check they are expected. [If not wanted, can make a Bode plot reference, remove the lines for the unwanted zero and pole pair and re-plot to see if the filter looks better at the frequency.] Check the shape including the high pass filter (will be on together during observing) and check the step response doesn't have anything too large in the first few seconds. Rename the filter to todays date, always on, ramp, 3s ramp time. Save. With Operator's permission, click “Coeffienct load” on cds overview h1lsc screen. Ramp MICH FF Gain to zero, turn off filter, turn on new filter, gain ramp back to 1. New filter is new on! Check darm before and after and rerun the MICH_excitation_comparison.xml plot. Edit main() LOWNOISE_LENGTH_CONTROL of ISC_LOCK guardian code to turn on the correct MICHFF. Accept filter change in sdf observe.snap and safe.snap. Write alog.