Displaying report 1-1 of 1.
Reports until 10:37, Tuesday 05 November 2019
H1 AOS (CAL, CDS, SUS)
vladimir.bossilkov@LIGO.ORG - posted 10:37, Tuesday 05 November 2019 - last comment - 11:38, Friday 08 November 2019(53008)
Importing SUS model to foton filterbank using foton.py

Continuing from conclusion of aLOG.

I have sought to import SUS models into foton using the foton.py library linked in the last alog, which was written by Lee McCuller.

I have produced a script which takes the TST transfer function to update the foton filters for Pcal via a python script, avoiding the need to 'quack' the filter with matlab scripts.

The quack scripts have a lot of error handling so that filters are compatible with foton. Here I directly input the filters with foton, with all its built in error handling.

I produce a filter that is arguably more accurate than what matlab is putting into foton... since I handle the DC gain with more precision.

I compare how matlab and my script fare against the original intended TF, by comparing the TFs that foton sees the inputs to be. You will note that the TF's have a bit of an error in magnitude at high frequency, I suspect that is due to the fact that the 1/f^2 filter (titled '1:1') is built within foton, and there is some difference from the system modelled in matlab.

Caveats of this process:
Until there is an update to the python control library, there is no clean way of recovering to true DC gain of a ZPK TF, without importing the SS model generated by matlab. One also needs to import the ZPK model generated by matlab, because the python control library doesn't make the same changes to the SS to produce the ZPK, and I get a bit of a magnitude error at around 2 Hz.
Hence, I end up importing both the SS and ZPK models that matlab spits out, which is not great.


If you want to play with this, be concious that you must change paths to things.

I will be putting this in the relevant places in the CalSVN, and writing up some more robust documentation going forward.

Images attached to this report
Non-image files attached to this report
Comments related to this report
vladimir.bossilkov@LIGO.ORG - 11:38, Friday 08 November 2019 (53098)

Improved the main filter updating script - removed need for loading the SS TF using a bit of code from pyDARM, for which I fixed some python3 related bug. Added some more comments and removed unneeded comments.

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