Presentations

SMuRF Processing Notes

SMuRF Applications

SMuRF Filter Bank

SMuRF Resonator Frequency Measurement

SMuRF Pilot Tones

Zoom discussions

datetopiclink
4/26/21eta scans, firmware
4/27/21eta scans, firmware
4/28/21eta scans, tracking/flux ramp demodulation
4/29/21pilot tones
5/3/21polyphase filters, filter bank
5/5/21uMUX tracking, demodulation
5/6/21SMuRF tutorial
5/10/21

Closed Loop Tracking Transfer Function

uMUX simulator

5/12/21

5/13/21SMuRF Application Differences
5/13/21Pilot tones meeting
discussion about ADC/DAC data valid flags in the SMuRF headers
5/17/21RFSoC, IQ calibration
5/18/21IQ calibration, simulator5_18_21_SMuRF_Zoom.mp4


General background

S21 for a resonator

S21 for time delay


SMuRF Practice

https://github.com/slaclab/smurf-misc/tree/master/matlab

Here I'll generate an S21 curve.  What eta params should we use?

close all
clear
Fdsp  = 2.4e6;
% can place resonator +/- Fdsp/2
fres  = 300e3;
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];
fvtool([1, -z0], [1, -p0], 'Fs', Fdsp)

theta = 0.5;  % arbitrary phase offset, rad
tau   = 1e-9; % 1 ns delay

% digital frequency -- -pi to pi maps to -Fs/2 to Fs/2
w = linspace(-pi, pi, 2^13);
f = w*Fdsp/2/pi;                          % frequencies in Hz

[s21, w] = freqz(b, a, w);                % resonator S21
s21 = s21.*exp(-1j*theta);                % apply arb phase offset
s21 = s21.*exp(-1j*2*pi*f*tau);           % apply time delay

figure
subplot(2,1,1)
plot(f, 20*log10(abs(s21)), 'LineWidth', 2)
title('Resonator Transfer Function', 'FontSize', 12)
grid minor
xlabel('Frequency', 'FontSize', 12)
ylabel('Magnitude (dB)', 'FontSize', 12)

subplot(2,1,2)
plot(f, unwrap(angle(s21)), 'LineWidth', 2)
grid minor
xlabel('Frequency', 'FontSize', 12)
ylabel('Phase (rad)', 'FontSize', 12)

figure
plot(real(s21(1:10:end)), imag(s21(1:10:end)), '.', 'LineWidth', 2)
grid minor
title('S_{21}', 'FontSize', 12)
xlabel('Real S_{21}', 'FontSize', 12)
ylabel('Imag S_{21}', 'FontSize', 12)



Here's my result

%% 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

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:

%% 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);

Using Pickles cryostat at SLAC

You may need to install vncviewer, or for windows use RealVNC

sudo apt-get install tigervnc-viewer

SSH to smurf-srv24

ssh -L 5902:localhost:5902 cryo@smurf-srv24.slac.stanford.edu

Launch VNC viewer

vncviewer localhost:5902


Starting the Rogue server

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


Starting the PySMuRF client (jupyter-notebook)

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
  • No labels