Merge branch 'master' of ssh://acereca.ddns.net:11444/acereca/BaTh

This commit is contained in:
acereca 2018-06-04 10:26:12 +02:00
commit fa874ba9b3
6 changed files with 81 additions and 66 deletions

1
.gitignore vendored
View File

@ -32,3 +32,4 @@ data/raspi-i2c/i2c2.py
data/raspi-i2c/i2c
data/m03_poticalib/poticalib_ana.py
data/m02_adccalib_48/adccalib_48.py
data/m04_cycledepends/cycledepends.csv

View File

@ -10,12 +10,3 @@ compile_pdf:
paths:
- thesis.pdf
data_processing:
image: python_datascience
variables:
MPLBACKEND: agg
script:
- cd data && python3 processing.py
artifacts:
paths:
- data/2kw_direct.png

View File

@ -5,89 +5,89 @@ import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import VisTools.plotting as vt
import uncertainties as unc
import uncertainties.unumpy as unp
plt.ioff()
plt.style.use('bmh')
fig, axarr = plt.subplots(2,1,figsize=(11.88, 8.4))
fig, axarr = plt.subplots(
2,
1,
figsize=(10, 8),
gridspec_kw = {'height_ratios':[4,1]}
)
plt.subplots_adjust(hspace=.5)
data = pd.read_csv("./" + __file__[:-3].split("_")[1] + ".csv", comment="#")
fits = np.array([])
errs = np.array([])
colors = np.array([])
data['dv_pit48/v'] /= 2
data['Dv'] = data['v_pit48/v'] - data['v_set/v']
data['Dvk'] = data['v_keith/v'] - data['v_set/v']
print(data)
# fit to abs dist
linfnc = lambda x,m,c: x*m+c
p = axarr[0].errorbar(
data[data.cycles == 0]['v_set/v'],
data[data.cycles == 0]['Dvk'],
label="relative Error of ADC, keith",
fmt='.'
)
pfinal, pcov = opt.curve_fit(
linfnc,
data[data.cycles == 0]['v_set/v'],
data[data.cycles == 0]['Dvk'],
p0=(.1,2.6),
sigma=[.5 for e in range(data[data.cycles == 0]['Dv'].size)]
)
axarr[0].plot(
data[data.cycles == 0]['v_set/v'],
data[data.cycles == 0]['v_set/v']*pfinal[0]+pfinal[1],
label="fitted, keith",
color = p[0].get_color()
)
for i in range(8):
def plot_and_linfit(col: str,fil, l: str):
p = axarr[0].errorbar(
data[data.cycles == i]['v_set/v'],
data[data.cycles == i]['Dv'],
yerr=data[data.cycles == i]['dv_pit48/v'],
label="relative Error of ADC, scaler: "+str(i),
fmt='.'
data[fil]['v_set/v'],
data[fil][col],
alpha = 0.3,
label=None,
fmt='.',
antialiased=True
)
pfinal, pcov = opt.curve_fit(
linfnc,
data[data.cycles == i]['v_set/v'],
data[data.cycles == i]['Dv'],
p0=(.1,2.6),
sigma=[.5 for e in range(data[data.cycles == i]['Dv'].size)]
)
axarr[0].plot(
data[data.cycles == i]['v_set/v'],
data[data.cycles == i]['v_set/v']*pfinal[0]+pfinal[1],
label="fitted, scaler: "+str(i),
vals = vt.lm_plot(
data[fil],
'v_set/v',
col,
None,
'dv_pit48/v',
l,
fig=axarr[0],
color = p[0].get_color()
)
fits = np.append(fits, pfinal[0])
errs = np.append(errs, np.sqrt(pcov[0][0]))
colors = np.append(colors, p[0].get_color() )
return vals, p
#vt.annotate_val(plt, pfinal[0], np.sqrt(pcov[0][0]), name="V48[2]", data_pos=(44, 3))
for i in range(8):
val, p = plot_and_linfit(
'Dv',
data.cycles == i,
'$f_{}={{m:.3f}}\\cdot x{{c:+.3f}}V$'.format(i))
fits = np.append(fits, val[0])
#errs = np.append(errs, np.sqrt(pcov[0][0]))
#colors = np.append(colors, p[0].get_color() )
print(fits)
plot_and_linfit('Dvk', data.cycles == 0, 'reference measurement')
print(fits[0].n)
for i in range(8):
axarr[1].errorbar(
i,
fits[i],
yerr = errs[i],
fits[i].n,
yerr = fits[i].s,
fmt='.',
c = colors[i]
#c = colors[i],
)
axarr[0].set_xlabel('V$_{set}$/V')
axarr[0].set_title("PowerIt ADC Calibration: dependency on measurement cycles")
#axarr[0].set_title("PowerIt ADC Calibration: dependency on measurement cycles")
axarr[0].set_ylabel('$\Delta$V$_{IN}$ / V')
axarr[1].set_xlabel('sampleTicks scaler')
axarr[1].set_ylabel('$\Delta(\Delta$V$_{IN})$')
axarr[1].set_xlabel('scaler value')
axarr[1].set_ylabel('$m = \Delta$Gain')
axarr[0].legend(
bbox_to_anchor=(0, -.29,1, 1),
loc="lower left",
mode="expand",
borderaxespad=0,
ncol=3)
plt.savefig(
"./" + __file__[:-3].split("_")[1] + ".pdf",
dpi=1000,
bbox_inches='tight')
plt.tight_layout()
plt.savefig("./" + __file__[:-3].split("_")[1] + ".eps", format='eps', dpi=1000)

View File

@ -2,9 +2,25 @@
\chapter{Intro}
\section{The Hardware}
\section{Premise}
The hardware used in this thesis is a PowerIt board, developed in the electronic visions group. It functions as power supply inside of the Waferscale System\footnote{
\section{Hardware Overview}
The hardware used in this thesis is a PowerIt board, developed in the electronic visions group\footnote{
%TODO
}. It functions as power supply inside of the Waferscale System\footnote{
%TODO
}. In which it iis providing the HICANN Chips with ~1.8V and the FPGAs with 9.6V.
} (fig. \ref{wss}).
\begin{figure}[h]
\centering
\includegraphics[width=.9\textwidth]{../InternReport/img/waferscale_system.png}
\caption{WSS}
\label{wss}
\end{figure}
In which it is providing the Wafer with 1.8V and the FPGAs with 9.6V. Its maximum rated Pwerdraw is 2kW.
<containing intro to system and board>
\section{Measurement Hardware}
<contains circuits to all measureing adcs, and description of the measureing process>

View File

@ -7,6 +7,8 @@
\usepackage{hyperref}
\usepackage{tcolorbox}
\usepackage{enumitem,amssymb}
\usepackage{graphicx}
\usepackage{svg}
\definecolor{myteal}{HTML}{228c9c}
%\DeclareTColorBox{blockbox}{ O{width=\textwidth} }{boxrule=0mm, colframe=myteal, valign lower=bottom, on line, lower separated=false, height=.6\textheight, #1}

View File

@ -20,7 +20,12 @@
\tableofcontents
\include{./tabs/registerbuffer}
%\include{parts/intro}
\begin{figure}
\centering
\hspace*{-.16\columnwidth}
\includegraphics[width=1.3\columnwidth]{./data/m04_cycledepends/cycledepends.pdf}
\end{figure}
\include{parts/intro}
%\include{parts/tasks}
%\include{parts/theory}
%\include{parts/experiments}