Commit 70e96d11 authored by Gautam Venugopalan's avatar Gautam Venugopalan
Browse files

Adding XARM OLTF model known as of now

parent b155f29a
# POX11
D_POX:
label: POX RFPD transimpedance
k: 2100 # V/W (3000 V/A AC transimpedance)
# Whitening filter
F_WHT:
label: Whitening filter
p:
- 150
- 150
z:
- 15
- 15
k: 1.99e4 # 30 dB variable gain set
# Anti-Aliasing filter
F_AA: # From Koji's LISO fit, Elog: 40m/14939
label: Anti-aliasing filter
p:
- 5.2860544577e3 + 503.1473053928e-3j
- 5.2860544577e3 - 503.1473053928e-3j
- 5.9752193716e3 + 1.0543411596j
- 5.9752193716e3 - 1.0543411596j
- 8.9271953580e3 + 3.5384364788j
- 8.9271953580e3 - 3.5384364788j
- 8.2181747850e3 + 3.4220607928j
- 8.2181747850e3 - 3.4220607928j
- 182.1403534923e3 + 1.1187869426j # This has almost no effect
- 182.1403534923e3 - 1.1187869426j # This has almost no effect
z:
- 13.5305051680e3 + 423.6130434049e6j
- 13.5305051680e3 - 423.6130434049e6j
- 15.5318357741e3 + 747.6895990654e3j
- 15.5318357741e3 - 747.6895990654e3j
- 23.1746351749e3 + 1.5412966100e6j
- 23.1746351749e3 - 1.5412966100e6j
k: 1151.5553385205317
delay: 24.4846075283e-9
# # ADC
# F_ADC:
# k: 3276.75 # cts/V
# Unwhitening filter (From foton FM1 on C1LSC_POX11 filter bank)
F_UNWHT:
label: Unwhitening filter
z:
- 142.399
- 161.249
p:
- 14.6203
- 15.558
k: 0.0099143
# XARM Feedback Filter (From foton)
F_XARM:
label: LSC_XARM digital filter
z:
- 0.357143 + 0.349927j # FM1 0.5,0.5:1m,1m
- 0.357143 - 0.349927j # FM1 0.5,0.5:1m,1m
- 1.66667 + 4.71405j # FM2 Boost5
- 1.66667 - 4.71405j # FM2 Boost5
- 17.8571 + 17.4964j # FM3 25:3.2
- 17.8571 - 17.4964j # FM3 25:3.2
- 8.75 + 33.8886j # FM4 LSClock
- 8.75 - 33.8886j # FM4 LSClock
- 3000 # FM4 LSClock
- 10 # FM4 LSClock
- 350 # FM4 LSClock
- 1 # FM5 ALS&LSClock
- 1.25 + 4.84123j # FM6 Bounce
- 1.25 - 4.84123j # FM6 Bounce
- 7.5 + 29.0474j # FM6 Bounce
- 7.5 - 29.0474j # FM6 Bounce
- 2.36321 + 16.32989j # FM8 BoiunceRG (Res Gain 16.5, 7, 50)
- 2.36321 - 16.32989j # FM8 BoiunceRG (Res Gain 16.5, 7, 50)
p:
- 0.000714286 + 0.000699854j # FM1 0.5,0.5:1m,1m
- 0.000714286 - 0.000699854j # FM1 0.5,0.5:1m,1m
- 0.5 + 2.95804j # FM2 Boost5
- 0.5 - 2.95804j # FM2 Boost5
- 0.16 + 3.19599j # FM3 25:3.2
- 0.16 - 3.19599j # FM3 25:3.2
- 0.5 + 2.95804j # FM4 LSClock
- 0.5 - 2.95804j # FM4 LSClock
- 1 # FM4 LSClock
- 2121.32 + 2121.32j # FM4 LSClock
- 2121.32 - 2121.32j # FM4 LSClock
- 700 # FM4 LSClock
- 3000 # FM5 ALS&LSClock
- 2.5 + 9.68246j # FM6 Bounce
- 2.5 - 9.68246j # FM6 Bounce
- 0.166 + 16.5992j # FM6 Bounce
- 0.166 - 16.5992j # FM6 Bounce
- 0.00747313 + 16.5j # FM8 BoiunceRG (Res Gain 16.5, 7, 50)
- 0.00747313 - 16.5j # FM8 BoiunceRG (Res Gain 16.5, 7, 50)
k: 17276060.744236216 # FM1-6,8
# ETMX Filter Bank (From foton)
F_ETMX:
label: LSC ETMX digital filter
z:
- 0 + 622.0815353544971j # FM4 EXYvio1
- 0 - 622.0815353544971j # FM4 EXYvio1
- 0 + 623.1524814731055j # FM4 EXYvio1
- 0 - 623.1524814731055j # FM4 EXYvio1
- 0 + 624.8247092287556j # FM4 EXYvio1
- 0 - 624.8247092287556j # FM4 EXYvio1
- 0 + 625.9002871058856j # FM4 EXYvio1
- 0 - 625.9002871058856j # FM4 EXYvio1
- 0 + 629.0322151195008j # FM4 EXYvio1
- 0 - 629.0322151195008j # FM4 EXYvio1
- 0 + 630.1305886071473j # FM4 EXYvio1
- 0 - 630.1305886071473j # FM4 EXYvio1
- 0 + 631.8456940609268j # FM4 EXYvio1
- 0 - 631.8456940609268j # FM4 EXYvio1
- 0 + 632.9488836977904j # FM4 EXYvio1
- 0 - 632.9488836977904j # FM4 EXYvio1
- 0 + 1921.089953044665j # FM6 genVio3
- 0 - 1921.089953044665j # FM6 genVio3
- 0 + 1926.250987473915j # FM6 genVio3
- 0 - 1926.250987473915j # FM6 genVio3
- 0 + 1933.74792065509j # FM6 genVio3
- 0 - 1933.74792065509j # FM6 genVio3
- 0 + 1938.936487734663j # FM6 genVio3
- 0 - 1938.936487734663j # FM6 genVio3
- 0 + 2546.721446650343j # FM6 genVio3
- 0 - 2546.721446650343j # FM6 genVio3
- 0 + 2562.288365307237j # FM6 genVio3
- 0 - 2562.288365307237j # FM6 genVio3
- 0 + 2584.951751533616j # FM6 genVio3
- 0 - 2584.951751533616j # FM6 genVio3
- 0 + 2600.670483870412j # FM6 genVio3
- 0 - 2600.670483870412j # FM6 genVio3
- 0 + 1284.16942829497j # FM9 EXVio2,3
- 0 - 1284.16942829497j # FM9 EXVio2,3
- 0 + 1284.648745568631j # FM9 EXVio2,3
- 0 - 1284.648745568631j # FM9 EXVio2,3
- 0 + 1285.333483767501j # FM9 EXVio2,3
- 0 - 1285.333483767501j # FM9 EXVio2,3
- 0 + 1285.813199751862j # FM9 EXVio2,3
- 0 - 1285.813199751862j # FM9 EXVio2,3
- 0 + 1891.67152893201j # FM9 EXVio2,3
- 0 - 1891.67152893201j # FM9 EXVio2,3
- 0 + 1892.438448211211j # FM9 EXVio2,3
- 0 - 1892.438448211211j # FM9 EXVio2,3
- 0 + 1893.534031414222j # FM9 EXVio2,3
- 0 - 1893.534031414222j # FM9 EXVio2,3
- 0 + 1894.30156815553j # FM9 EXVio2,3
- 0 - 1894.30156815553j # FM9 EXVio2,3
p:
- 4.250893222257642 + 618.6200047982438j # FM4 EXYvio1
- 4.250893222257642 - 618.6200047982438j # FM4 EXYvio1
- 0.4704190478147293 + 620.1160038419657j # FM4 EXYvio1
- 0.4704190478147293 - 620.1160038419657j # FM4 EXYvio1
- 4.360292283911622 + 625.4819867668341j # FM4 EXYvio1
- 4.360292283911622 - 625.4819867668341j # FM4 EXYvio1
- 0.4825422649601813 + 627.0164100772637j # FM4 EXYvio1
- 0.4825422649601813 - 627.0164100772637j # FM4 EXYvio1
- 0.4763114105172931 + 627.8834378568797j # FM4 EXYvio1
- 0.4763114105172931 - 627.8834378568797j # FM4 EXYvio1
- 4.324776729529191 + 629.3720546476234j # FM4 EXYvio1
- 4.324776729529191 - 629.3720546476234j # FM4 EXYvio1
- 0.4886732386876071 + 634.9830090694893j # FM4 EXYvio1
- 0.4886732386876071 - 634.9830090694893j # FM4 EXYvio1
- 4.437167691794887 + 636.5097298175853j # FM4 EXYvio1
- 4.437167691794887 - 636.5097298175853j # FM4 EXYvio1
- 37.68046403478398 + 1862.180028029188j # FM6 genVio3
- 37.68046403478398 - 1862.180028029188j # FM6 genVio3
- 3.396861857020714 + 1893.920534623237j # FM6 genVio3
- 3.396861857020714 - 1893.920534623237j # FM6 genVio3
- 3.527254614661147 + 1966.621023458503j # FM6 genVio3
- 3.527254614661147 - 1966.621023458503j # FM6 genVio3
- 40.44870861840533 - 1998.987519878998j # FM6 genVio3
- 40.44870861840521 + 1998.987519878999j # FM6 genVio3
- 116.8318873565561 + 2369.476431157465j # FM6 genVio3
- 116.8318873565561 - 2369.476431157465j # FM6 genVio3
- 10.79271098912167 + 2465.276430356367j # FM6 genVio3
- 10.79271098912167 - 2465.276430356367j # FM6 genVio3
- 11.75436102556852 + 2684.937011660174j # FM6 genVio3
- 11.75436102556852 - 2684.937011660174j # FM6 genVio3
- 137.1859735430245 + 2782.27920776066j # FM6 genVio3
- 137.1859735430245 - 2782.27920776066j # FM6 genVio3
- 6.180441801315788 + 1277.747294804996j # FM9 EXVio2,3
- 6.180441801315788 - 1277.747294804996j # FM9 EXVio2,3
- 0.7221979618406482 + 1280.016115730498j # FM9 EXVio2,3
- 0.7221979618406482 - 1280.016115730498j # FM9 EXVio2,3
- 0.7278215789317729 + 1289.983358437154j # FM9 EXVio2,3
- 0.7278215789317729 - 1289.983358437154j # FM9 EXVio2,3
- 6.250553896004597 + 1292.242300443259j # FM9 EXVio2,3
- 6.250553896004597 - 1292.242300443259j # FM9 EXVio2,3
- 10.37632895785745 + 1881.390452452763j # FM9 EXVio2,3
- 10.37632895785745 - 1881.390452452763j # FM9 EXVio2,3
- 1.212685059730672 + 1885.025723590108j # FM9 EXVio2,3
- 1.212685059730672 - 1885.025723590108j # FM9 EXVio2,3
- 1.22294455603008 + 1900.973312120171j # FM9 EXVio2,3
- 1.22294455603008 - 1900.973312120171j # FM9 EXVio2,3
- 10.50423829652716 + 1904.582412649661j # FM9 EXVio2,3
- 10.50423829652716 - 1904.582412649661j # FM9 EXVio2,3
k: 0.993717390802063
# ETMX Actuation (m/cts) (Estimated on Sep 24th, 2021)
A_ETMX:
label: ETMX suspension actuation
p:
- 1
- 1
k: 2.70896e-7
# Anti-Aliasing filter (Assumed 8-pole on D68L8E)
F_AI: # From Koji's LISO fit, Elog: 40m/14939
label: Anti-imaging filter
p:
- 5.2860544577e3 + 503.1473053928e-3j
- 5.2860544577e3 - 503.1473053928e-3j
- 5.9752193716e3 + 1.0543411596j
- 5.9752193716e3 - 1.0543411596j
- 8.9271953580e3 + 3.5384364788j
- 8.9271953580e3 - 3.5384364788j
- 8.2181747850e3 + 3.4220607928j
- 8.2181747850e3 - 3.4220607928j
- 182.1403534923e3 + 1.1187869426j # This has almost no effect
- 182.1403534923e3 - 1.1187869426j # This has almost no effect
z:
- 13.5305051680e3 + 423.6130434049e6j
- 13.5305051680e3 - 423.6130434049e6j
- 15.5318357741e3 + 747.6895990654e3j
- 15.5318357741e3 - 747.6895990654e3j
- 23.1746351749e3 + 1.5412966100e6j
- 23.1746351749e3 - 1.5412966100e6j
k: 1151.5553385205317
delay: 24.4846075283e-9
import control
import control.matlab as mat
from yaml import full_load
import numpy as np
def parseZPKModel(zpk):
for key in ['z', 'p']:
if key not in zpk:
zpk[key] = []
elif not isinstance(zpk[key], list):
zpk[key] = [zpk[key]]
z = 2*np.pi*np.array(zpk['z'], dtype=np.complex128)
p = 2*np.pi*np.array(zpk['p'], dtype=np.complex128)
zpk['ABCD'] = mat.zpk2ss(-z, -p, zpk['k'])
zpk['SS'] = control.ss(*zpk['ABCD'])
if 'delay' in zpk:
num, den = control.pade(zpk['delay'], 4)
zpk['DelayTF'] = control.tf(num, den)
zpk['SS'].append(zpk['DelayTF'])
return zpk
def series(alsCtrl, subSys):
out = alsCtrl[subSys[0]]['SS']
for ii in range(1, len(subSys)):
out = control.series(out, alsCtrl[subSys[ii]]['SS'])
return out
def sys2TF(ss, freq):
mag, ph, _ = control.freqresp(ss, 2 * np.pi * freq)
return mag.flatten() * np.exp(1j*ph.flatten())
def parseZPKfromYaml(filename):
with open(filename, 'r') as f:
ctrlSys = full_load(f)
for k, v in ctrlSys.items():
for k1, v1 in v.items():
if isinstance(v1, str):
try:
ctrlSys[k][k1] = eval(v1)
except BaseException:
ctrlSys[k][k1] = v1
elif isinstance(v1, list):
for k2, v2 in enumerate(v1):
if isinstance(v2, str):
ctrlSys[k][k1][k2] = eval(v2)
ctrlSys[k] = parseZPKModel(v)
return ctrlSys
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment