update 20180607 1400
This commit is contained in:
parent
eeba0459c5
commit
bf9f159394
|
@ -6,6 +6,7 @@
|
|||
|
||||
# PDF output - usually a bad idea to keep this in Git
|
||||
*.pdf
|
||||
!data/**/*.pdf
|
||||
|
||||
# Latexmk
|
||||
*.fdb_latexmk
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
- [x] Umbau
|
||||
- [x] **packed** union based data structures (removes the need for magic numbers
|
||||
- [ ] safe types inside `pi2cproto.h`
|
||||
- [ ] old
|
||||
- [ ] ~~old~~
|
||||
- [x] ballast
|
||||
- [x] reused
|
||||
- remaining compatability to v1
|
||||
|
@ -24,6 +24,8 @@
|
|||
- missing `__attribute__((packed))` declarations
|
||||
- [x] why are `digipoti` and `anapoti` only readable from `0x02` and 0x04` not partial?
|
||||
- same as above
|
||||
- [ ] instability on mass spi communication
|
||||
- timebased / overflow ?
|
||||
|
||||
- Calibration
|
||||
- [x] characterize adcbehaviour
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
time/s,v_ps/v,dv_ps/v,v_pit48/v,dv_pit48/v,v_keith/v,v_set/v
|
||||
13.313,43.039,0.006,42.177,0.042,43.110,43.000
|
||||
26.148,43.516,0.010,42.621,0.042,43.586,43.500
|
||||
38.952,44.004,0.006,43.085,0.039,44.072,44.000
|
||||
51.764,44.497,0.005,43.576,0.055,44.566,44.500
|
||||
64.650,44.998,0.011,44.056,0.038,45.072,45.000
|
||||
77.457,45.491,0.009,44.563,0.046,45.567,45.500
|
||||
90.270,46.002,0.007,45.088,0.061,46.074,46.000
|
||||
103.151,46.510,0.007,45.562,0.054,46.585,46.500
|
||||
115.961,47.000,0.007,46.026,0.096,47.074,47.000
|
||||
132.470,47.477,0.006,46.475,0.081,47.559,47.500
|
||||
145.285,48.002,0.007,46.964,0.201,48.077,48.000
|
||||
162.967,48.495,0.002,47.466,0.206,48.574,48.500
|
||||
175.817,48.981,0.006,47.833,0.425,49.058,49.000
|
||||
188.953,49.495,0.006,48.484,0.213,49.577,49.500
|
||||
207.095,49.990,0.005,48.958,0.209,50.071,50.000
|
||||
219.895,50.477,0.007,49.446,0.221,50.561,50.500
|
||||
232.955,50.966,0.007,49.841,0.146,51.049,51.000
|
||||
245.762,51.484,0.010,50.340,0.031,51.562,51.500
|
||||
258.574,51.952,0.009,50.842,0.079,52.038,52.000
|
||||
272.588,52.435,0.006,51.325,0.078,52.524,52.500
|
||||
287.068,52.973,0.011,51.830,0.052,53.057,53.000
|
|
|
@ -1 +0,0 @@
|
|||
/remote_media/m03/home/pi/adccalib_48.csv
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,68 +0,0 @@
|
|||
#! /usr/bin/python3
|
||||
|
||||
import scipy.optimize as opt
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
import matplotlib.pyplot as plt
|
||||
import VisTools.plotting as vt
|
||||
|
||||
plt.ioff()
|
||||
plt.style.use('bmh')
|
||||
fig, axarr = plt.subplots(2,1, sharex='col',figsize=(11.88, 8.4))
|
||||
data = pd.read_csv("./adccalib_48.csv")
|
||||
|
||||
data['Dv'] = data['v_pit48/v'] - data['v_keith/v']
|
||||
print(data)
|
||||
|
||||
axarr[0].errorbar(
|
||||
data['v_set/v'],
|
||||
data['v_pit48/v'],
|
||||
yerr=data['dv_pit48/v'],
|
||||
label="V$_{MONITOR\_48V}$",
|
||||
fmt='.'
|
||||
)
|
||||
axarr[0].errorbar(
|
||||
data['v_set/v'],
|
||||
data['v_ps/v'],
|
||||
yerr=data['dv_ps/v'],
|
||||
label="V$_{PS}$",
|
||||
fmt='.'
|
||||
)
|
||||
|
||||
axarr[1].errorbar(
|
||||
data['v_set/v'],
|
||||
data['Dv'],
|
||||
yerr=data['dv_pit48/v'],
|
||||
label=" absolute Error of ADC",
|
||||
fmt='.'
|
||||
)
|
||||
|
||||
# fit to abs dist
|
||||
linfnc = lambda x,m,c: x*m+c
|
||||
|
||||
pfinal, pcov = opt.curve_fit(
|
||||
linfnc,
|
||||
data['v_set/v'],
|
||||
data['Dv'],
|
||||
p0=(.1,2.6),
|
||||
sigma=[.5 for e in range(data['Dv'].size)]
|
||||
)
|
||||
|
||||
print( pfinal )
|
||||
|
||||
axarr[1].plot(
|
||||
data['v_set/v'],
|
||||
data['v_keith/v']*pfinal[0]+pfinal[1]
|
||||
)
|
||||
|
||||
vt.annotate_val(plt, pfinal[0], np.sqrt(pcov[0][0]), name="V48[2]", data_pos=(44, 3))
|
||||
|
||||
plt.xlabel('V$_{set}$/V')
|
||||
axarr[0].set_ylabel('V$_{IN}$/V')
|
||||
axarr[0].set_title("PowerIt ADC Calibration: 48V Input")
|
||||
axarr[1].set_ylabel('$\Delta$V$_{IN}$ / V')
|
||||
axarr[0].legend()
|
||||
#-plt.savefig("2kw_direct.png")
|
||||
|
||||
plt.tight_layout()
|
||||
plt.savefig("adccalib_48.eps", format='eps', dpi=1000)
|
|
@ -0,0 +1,71 @@
|
|||
#! /usr/bin/python3
|
||||
|
||||
import scipy.optimize as opt
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
import matplotlib.pyplot as plt
|
||||
import VisTools.plotting as vt
|
||||
|
||||
plt.ioff()
|
||||
plt.style.use('bmh')
|
||||
fig, axarr = plt.subplots(
|
||||
2,
|
||||
1,
|
||||
figsize=(10, 8),
|
||||
gridspec_kw={'height_ratios':[2, 1]},
|
||||
sharex="col"
|
||||
)
|
||||
data = pd.read_csv("./adccalib_v10.csv", comment="#")
|
||||
|
||||
data['Dv'] = data['v_pit10'] / data['v_keith']
|
||||
print(data)
|
||||
|
||||
axarr[0].errorbar(
|
||||
data['v_keith'],
|
||||
data['v_pit10'],
|
||||
yerr=data['dv_pit10'],
|
||||
label="V$_{MONITOR\_48V}$",
|
||||
fmt='.'
|
||||
)
|
||||
p =axarr[1].errorbar(
|
||||
data['v_keith'],
|
||||
data['Dv'],
|
||||
yerr=data['dv_pit10'],
|
||||
label=" absolute Error of ADC",
|
||||
fmt='.',
|
||||
alpha=.3
|
||||
)
|
||||
|
||||
# fit to abs dist
|
||||
linfnc = lambda x,m,c: x*m+c
|
||||
|
||||
pfinal = vt.fit_linear(
|
||||
data.v_keith,
|
||||
data.Dv,
|
||||
(0,0)
|
||||
)
|
||||
|
||||
axarr[1].plot(
|
||||
data.v_keith,
|
||||
linfnc(data.v_keith, pfinal[0].n, pfinal[1].n),
|
||||
color=p[0].get_color()
|
||||
)
|
||||
|
||||
print( pfinal )
|
||||
|
||||
|
||||
vt.annotate_unc(
|
||||
plt,
|
||||
pfinal[1],
|
||||
name="\Delta V48[1]",
|
||||
data_pos=(47, 1.1),
|
||||
formatting='f')
|
||||
|
||||
plt.xlabel('V$_{IN,EXT} / V$')
|
||||
axarr[0].set_ylabel('V$_{IN,PIT} / V$')
|
||||
axarr[0].set_title("PowerIt ADC Calibration: 48V Input")
|
||||
axarr[1].set_ylabel('($V_{IN,PIT} / V_{IN,EXT}$) / V')
|
||||
#-plt.savefig("2kw_direct.png")
|
||||
|
||||
plt.tight_layout()
|
||||
plt.savefig("adccalib_v10.pdf", dpi=1000)
|
|
@ -0,0 +1,73 @@
|
|||
#! /usr/bin/python3
|
||||
|
||||
import scipy.optimize as opt
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
import matplotlib.pyplot as plt
|
||||
import VisTools.plotting as vt
|
||||
|
||||
plt.ioff()
|
||||
plt.style.use('bmh')
|
||||
fig, axarr = plt.subplots(
|
||||
2,
|
||||
1,
|
||||
figsize=(10, 8),
|
||||
gridspec_kw={'height_ratios':[2, 1]},
|
||||
sharex="col"
|
||||
)
|
||||
|
||||
for f in ["ana", "digi"]:
|
||||
data = pd.read_csv("./adccalib_v18" + f + ".csv", comment="#")
|
||||
|
||||
data['Dv'] = data['v_pit18'+f] / data['v_keith']
|
||||
print(data)
|
||||
|
||||
axarr[0].errorbar(
|
||||
data['adcval'],
|
||||
data['v_pit18'+f],
|
||||
yerr=data['dv_pit18'+f],
|
||||
label="V$_{MONITOR\_48V}$",
|
||||
fmt='.'
|
||||
)
|
||||
p =axarr[1].errorbar(
|
||||
data['adcval'],
|
||||
data['Dv'],
|
||||
yerr=data['dv_pit18'+f],
|
||||
label=" absolute Error of ADC",
|
||||
fmt='.',
|
||||
alpha=.3
|
||||
)
|
||||
|
||||
# fit to abs dist
|
||||
linfnc = lambda x,m,c: x*m+c
|
||||
|
||||
pfinal = vt.fit_linear(
|
||||
data.adcval,
|
||||
data.Dv,
|
||||
(0,0)
|
||||
)
|
||||
|
||||
axarr[1].plot(
|
||||
data.adcval,
|
||||
linfnc(data.adcval, pfinal[0].n, pfinal[1].n),
|
||||
color=p[0].get_color()
|
||||
)
|
||||
|
||||
print( pfinal )
|
||||
|
||||
|
||||
vt.annotate_unc(
|
||||
plt,
|
||||
pfinal[1],
|
||||
name="\Delta 1V8"+f+"[1]",
|
||||
data_pos=(np.mean(data.adcval), 1.1),
|
||||
formatting='f')
|
||||
|
||||
plt.xlabel('V$_{IN,EXT} / V$')
|
||||
axarr[0].set_ylabel('V$_{IN,PIT} / V$')
|
||||
axarr[0].set_title("PowerIt ADC Calibration: 1V8 Output")
|
||||
axarr[1].set_ylabel('($V_{IN,PIT} / V_{IN,EXT}$) / V')
|
||||
#-plt.savefig("2kw_direct.png")
|
||||
|
||||
plt.tight_layout()
|
||||
plt.savefig("adccalib_v18" + f + ".pdf", dpi=1000)
|
|
@ -0,0 +1,71 @@
|
|||
#! /usr/bin/python3
|
||||
|
||||
import scipy.optimize as opt
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
import matplotlib.pyplot as plt
|
||||
import VisTools.plotting as vt
|
||||
|
||||
plt.ioff()
|
||||
plt.style.use('bmh')
|
||||
fig, axarr = plt.subplots(
|
||||
2,
|
||||
1,
|
||||
figsize=(10, 8),
|
||||
gridspec_kw={'height_ratios':[2, 1]},
|
||||
sharex="col"
|
||||
)
|
||||
data = pd.read_csv("./adccalib_v48.csv", comment="#")
|
||||
|
||||
data['Dv'] = data['v_pit48'] / data['v_keith']
|
||||
print(data)
|
||||
|
||||
axarr[0].errorbar(
|
||||
data['v_keith'],
|
||||
data['v_pit48'],
|
||||
yerr=data['dv_pit48'],
|
||||
label="V$_{MONITOR\_48V}$",
|
||||
fmt='.'
|
||||
)
|
||||
p =axarr[1].errorbar(
|
||||
data['v_keith'],
|
||||
data['Dv'],
|
||||
yerr=data['dv_pit48'],
|
||||
label=" absolute Error of ADC",
|
||||
fmt='.',
|
||||
alpha=.3
|
||||
)
|
||||
|
||||
# fit to abs dist
|
||||
linfnc = lambda x,m,c: x*m+c
|
||||
|
||||
pfinal = vt.fit_linear(
|
||||
data.v_keith,
|
||||
data.Dv,
|
||||
(0,0)
|
||||
)
|
||||
|
||||
axarr[1].plot(
|
||||
data.v_set,
|
||||
linfnc(data.v_keith, pfinal[0].n, pfinal[1].n),
|
||||
color=p[0].get_color()
|
||||
)
|
||||
|
||||
print( pfinal )
|
||||
|
||||
|
||||
vt.annotate_unc(
|
||||
plt,
|
||||
pfinal[1],
|
||||
name="\Delta V48[1]",
|
||||
data_pos=(47, 1.1),
|
||||
formatting='f')
|
||||
|
||||
plt.xlabel('V$_{IN,EXT} / V$')
|
||||
axarr[0].set_ylabel('V$_{IN,PIT} / V$')
|
||||
axarr[0].set_title("PowerIt ADC Calibration: 48V Input")
|
||||
axarr[1].set_ylabel('($V_{IN,PIT} / V_{IN,EXT}$) / V')
|
||||
#-plt.savefig("2kw_direct.png")
|
||||
|
||||
plt.tight_layout()
|
||||
plt.savefig("adccalib_v48.pdf", dpi=1000)
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -6,10 +6,11 @@ import pandas as pd
|
|||
import matplotlib.pyplot as plt
|
||||
import VisTools.plotting as vt
|
||||
import VisTools.tex as vtt
|
||||
import sys
|
||||
#import uncertainties as unc
|
||||
#import uncertainties.unumpy as unp
|
||||
|
||||
append = "_20180605"
|
||||
append = str(sys.argv[1])
|
||||
|
||||
plt.ioff()
|
||||
plt.style.use('bmh')
|
||||
|
|
|
@ -6,10 +6,11 @@ import pandas as pd
|
|||
import matplotlib.pyplot as plt
|
||||
import VisTools.plotting as vt
|
||||
import VisTools.tex as vtt
|
||||
import sys
|
||||
#import uncertainties as unc
|
||||
#import uncertainties.unumpy as unp
|
||||
|
||||
append = ""#"_20180529"
|
||||
append = str(sys.argv[1])
|
||||
|
||||
plt.ioff()
|
||||
plt.style.use('bmh')
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
\postdate{\par\vspace{3cm}}
|
||||
|
||||
\author{Patrick Nisblé}
|
||||
\title{$<$ on the calibration and regulation of a PowerIt, english $>$}
|
||||
\title{Calibration and Regulation of BrainScaleS' PowerIt Subsystems}
|
||||
\begin{document}
|
||||
\maketitle
|
||||
\thispagestyle{empty}
|
||||
|
@ -29,7 +29,7 @@
|
|||
\begin{figure}
|
||||
\centering
|
||||
\hspace*{-.16\columnwidth}
|
||||
\includegraphics[width=1.3\columnwidth]{./data/m04_cycledepends/cycledepends.pdf}
|
||||
\includegraphics[width=1.3\columnwidth]{./data/m04_cycledepends/cycledepends_20180530.pdf}
|
||||
\caption{plotted difference from set input voltage, and fitted linearly, May 30th 2018, $\approx$25\si\degree C}
|
||||
\end{figure}
|
||||
\include{parts/intro}
|
||||
|
|
Loading…
Reference in New Issue