-
Notifications
You must be signed in to change notification settings - Fork 10
freq_amp_ramping
In the pulse sequence mode, we have an option to do a simple frequency and amplitude ramp of the RF signal. To recap, the syntax when adding a DDS pulse is like this:
DDS = [('DDS_0', start_time, duration, frequency, amplitude, phase, frequency_ramp_rate, amplitude_ramp_rate),
]Now supposed we want to create a DDS pulse (with a fixed amplitude) that consists of a frequency ramp as shown in the figure below, how do we write it?

So we will assume that other variables are defined as
amp = WithUnit(-20, 'dBm')
phase = WithUnit(0,'deg')
amp_ramp_rate = WithUnit(0,'dBm')Also we will skip writing WithUnit because it's pretty tiring to have to type it all the time. Don't forget to put it in in the real code.
So the figure above is written like this:
DDS = [('DDS_0', start_time = 0 ms, duration = 50 ms, freq = 40 MHz, freq_ramp = 0 MHz/ms),
('DDS_0', start_time = 50 ms, duration = 70 ms, freq = 75.0 MHz, freq_ramp = 0.875 MHz/ms),
('DDS_0', start_time = 120 ms, duration = 200 ms, freq = 20 MHz, freq_ramp = 0 MHz/ms),
]The first pulse and the third pulse are quite simple. But make sure you understand the second pulse. The frequency in the pulse is the "target" frequency, which is 75.0 MHz in this case. And "freq_ramp" rate is how fast you ramp to that frequency. If this is 0 MHz/ms, it just jumps to the new frequency like usual. You have to make sure that it reaches the target frequency in time. In our case, the duration of the 2nd pulse is 70 ms. You change the frequency from 40 MHz to 75 MHz (which is by 35 MHz). So the slowest ramp you can do is 35 MHz/70 ms = 0.5 MHz/ms.
Doing ramps in amplitude is similar.