From 708330a57aefe55f3ded7ae06399cfacb201e996 Mon Sep 17 00:00:00 2001 From: occheung Date: Thu, 20 Jan 2022 17:00:54 +0800 Subject: [PATCH] suservo.py: remove unnecessary import --- 4410-4412.tex | 8 ++++---- examples/suservo.py | 2 -- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/4410-4412.tex b/4410-4412.tex index 405bd50..c98de35 100644 --- a/4410-4412.tex +++ b/4410-4412.tex @@ -821,16 +821,16 @@ In the following example, the amplitude of DDS is proportional to the ADC input First, initialize the RTIO, SU-Servo and its channel. Note that the programmable gain of the Sampler is $10^0=1$, the input range is [-10V, 10V]. -\inputcolorboxminted{firstline=12,lastline=19}{examples/suservo.py} +\inputcolorboxminted{firstline=10,lastline=17}{examples/suservo.py} Next, setup the PI control as an IIR filter. It has -1 proportional gain $k_p$ and no integrator gain $k_i$. -\inputcolorboxminted{firstline=20,lastline=27}{examples/suservo.py} +\inputcolorboxminted{firstline=18,lastline=25}{examples/suservo.py} Then, configure the DDS frequency to 10 MHz with 3V input offset. When input voltage $\geq$ offset voltage, the DDS output amplitude is 0. -\inputcolorboxminted{firstline=28,lastline=32}{examples/suservo.py} +\inputcolorboxminted{firstline=26,lastline=30}{examples/suservo.py} SU-Servo encodes the ADC voltage in a linear scale [-1, 1]. Therefore, 3V is converted to 0.3. @@ -838,7 +838,7 @@ Note that the ASF of all DDS channels are capped at 1.0, the amplitude clips whe Finally, enable the SU-Servo channel with the IIR filter programmed beforehand. -\inputcolorboxminted{firstline=34,lastline=35}{examples/suservo.py} +\inputcolorboxminted{firstline=32,lastline=33}{examples/suservo.py} A 10 MHz DDS signal is generated from the example above, with amplitude controllable by ADC. The RMS voltage of the DDS channel against the ADC voltage is plotted. diff --git a/examples/suservo.py b/examples/suservo.py index f700fab..2f05353 100644 --- a/examples/suservo.py +++ b/examples/suservo.py @@ -1,6 +1,4 @@ from artiq.experiment import * -from scipy import signal -import numpy class SUServoExample(EnvExperiment):