Table of Contents |
---|
SMuRF Applications Resonator Frequency Measurement
SMuRF Processing NotesResonator Frequency Measurement
date | topic | link |
---|---|---|
4/26/21 | eta scans, firmware | |
4/27/21 | eta scans, firmware | |
4/28/21 | eta scans, tracking/flux ramp demodulation | |
4/29/21 | pilot tones | |
5/3/21 | polyphase filters, filter bank | |
5/5/21 | uMUX tracking, demodulation | |
5/6/21 | SMuRF tutorial | |
5/10/21 | Closed Loop Tracking Transfer Function uMUX simulator | |
5/12/21 | ||
5/13/21 | SMuRF Application Differences | |
5/13/21 | Pilot tones meeting discussion about ADC/DAC data valid flags in the SMuRF headers | |
5/17/21 | RFSoC, IQ calibration | |
5/18/21 | IQ calibration, simulator | 5_18_21_SMuRF_Zoom.mp4 |
...
https://github.com/slaclab/smurf-misc/tree/master/matlab
Here I'll generate an S21 curve. What eta params should we use?
...
Code Block |
---|
%% Here's the real test -- move the resonator and see how it responds apply_eta = @(x, eta_offset, eta) (x + eta_offset)*eta; % can place resonator +/- Fdsp/2 dfres = 1e3; % move the resonator from it's original frequency fres = 300e3 + dfres; fnorm = fres/Fdsp; z0 = 0.98*exp(1j*2*pi*fnorm); p0 = 0.95*exp(1j*2*pi*(fnorm+0.002)); b = [1, -z0]; a = [1, -p0]; [s21, w] = freqz(b, a, w); % resonator S21 s21 = s21.*exp(-1j*theta); % apply arb phase offset s21 = s21.*exp(-1j*2*pi*tau*f); % apply time delay s21_eta = apply_eta(s21, eta_offset, eta); % apply eta disp(['We moved the resonator ', num2str(dfres), 'Hz and measured ', num2str(round(imag(s21_eta(ftone)))), ' Hz error']) >> We moved the resonator 1000Hz and measured -984 Hz error |
How I got that:
Define a cost function eta_cost.m
Code Block |
---|
function cost = eta_cost(s21, idx, eta_offset, eta_phase)
% we can initially calibrate eta_offset as pure imag number
s21_eta = (s21 + 1j*eta_offset)*exp(1j*eta_phase);
s21_eta_diff = diff(s21_eta);
s21_idx = s21_eta(idx);
s21_idx_diff = s21_eta_diff(idx);
cost = imag(s21_idx).^2 + real(s21_idx_diff).^2;
end |
Then run minimization:
Code Block |
---|
%% first calculate eta offset and eta phase
df = f(2) - f(1); % our scan frequency steps
apply_eta = @(x, eta_offset, eta) (x + eta_offset)*eta;
v = [0, 0];
eta_min_f = @(x) eta_cost(s21, idx, x(1), x(2));
a = fminsearch(eta_min_f, v);
eta_offset = 1j*a(1);
eta = exp(1j*a(2));
s21_eta = apply_eta(s21, eta_offset, eta);
% calculate eta_mag
eta_mag = 2*df/imag(s21_eta(idx + 1) - s21_eta(idx - 1));
eta = eta*eta_mag;
s21_corr = apply_eta(s21, eta_offset, eta); |
You may need to install vncviewer, or for windows use RealVNC
Code Block |
---|
sudo apt-get install tigervnc-viewer |
SSH to smurf-srv24
Code Block |
---|
ssh -L 5902:localhost:5902 cryo@smurf-srv24.slac.stanford.edu |
Launch VNC viewer
Code Block |
---|
vncviewer localhost:5902 |
Code Block |
---|
cryo@smurf-srv24:~$ cd /home/cryo/docker/smurf/dev_sw/slotN/v5.0.1
cryo@smurf-srv24:~/docker/smurf/dev_sw/slotN/v5.0.1$ ./run.sh -N 3; sleep 5; docker logs smurf_server_s3 -f |
Code Block |
---|
cryo@smurf-srv24:~$ cd docker/pysmurf/dev/v4.1.0/
cryo@smurf-srv24:~/docker/pysmurf/dev/v4.1.0$ ./run.sh
cryo@smurf-srv24:/usr/local/src/pysmurf$ jupyter-notebook |