Confluence will be unusable 23-July-2024 at 06:00 due to a Crowd upgrade.
...
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 |