aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dpd/README.md14
-rw-r--r--dpd/dpd.ini4
-rwxr-xr-xdpd/main.py13
3 files changed, 18 insertions, 13 deletions
diff --git a/dpd/README.md b/dpd/README.md
index fc84bad..307a2f5 100644
--- a/dpd/README.md
+++ b/dpd/README.md
@@ -103,14 +103,12 @@ This configuration file is different from usual defaults in several respects:
* 4x oversampling: 8192000 sample rate
* a very small digital gain, which will be overridden by the DPDCE
* predistorter enabled
- * UHD output with a rather low TX gain, which will be overridden by DPDCE
-
-The DPDCE uses automatic gain control for both TX and RX gain to get both a
-high quantisation quality for the most frequent amplitude regions and a high
-enough back-off so the peaks are also quantised correctly. This means that the
-output power will stay at the same level, but the DPDCE may change TX gain to
-trade it with digital gain and also change RX gain. This also implies that you
-should *not modify txgain, rxgain, digital gain or coefficient settings manually!*
+
+The TX gain should be chosen so that you can drive your amplifier into
+saturation with a digital gain of 0.1, so that there is margin for the DPD to
+operate.
+
+You should *not modify txgain, rxgain, digital gain or coefficient settings manually!*
When the DPDCE is used, it controls these settings, and there are command line
options for you to define initial values.
diff --git a/dpd/dpd.ini b/dpd/dpd.ini
index af5c2fb..31d6140 100644
--- a/dpd/dpd.ini
+++ b/dpd/dpd.ini
@@ -18,7 +18,7 @@ gainmode=var
rate=8192000
# keep in mind that the DPDCE will set the digital gain through the RC!
-digital_gain=0.01
+digital_gain=0.001
[firfilter]
enabled=1
@@ -43,7 +43,7 @@ filename=dpd.iq
device=
master_clock_rate=32768000
type=b200
-txgain=55
+txgain=80
channel=13C
refclk_source=internal
pps_source=none
diff --git a/dpd/main.py b/dpd/main.py
index f17d7df..2d9426b 100755
--- a/dpd/main.py
+++ b/dpd/main.py
@@ -57,6 +57,9 @@ parser.add_argument('-i', '--iterations', default=10, type=int,
parser.add_argument('-L', '--lut',
help='Use lookup table instead of polynomial predistorter',
action="store_true")
+parser.add_argument('--enable-txgain-agc',
+ help='Enable the TX gain AGC',
+ action="store_true")
parser.add_argument('--plot',
help='Enable all plots, to be more selective choose plots in GlobalConfig.py',
action="store_true")
@@ -113,7 +116,7 @@ else:
dt = datetime.datetime.now().isoformat()
logging.basicConfig(format='%(asctime)s - %(module)s - %(levelname)s - %(message)s',
datefmt='%Y-%m-%d %H:%M:%S',
- level=logging.DEBUG)
+ level=logging.INFO)
logging_path = None
logging.info("DPDCE starting up with options: {}".format(cli_args))
@@ -213,7 +216,11 @@ if cli_args.measure:
#tx_shoulder_tuple = MS.average_shoulders(txframe_aligned)
sys.exit(0)
-tx_agc = TX_Agc(adapt, c)
+# Disable TXGain AGC by default, so that the experiments are controlled
+# better.
+tx_agc = None
+if cli_args.enable_txgain_agc:
+ tx_agc = TX_Agc(adapt, c)
state = 'report'
i = 0
@@ -225,7 +232,7 @@ while i < num_iter:
if state == 'measure':
# Get Samples and check gain
txframe_aligned, tx_ts, rxframe_aligned, rx_ts, rx_median = meas.get_samples()
- if tx_agc.adapt_if_necessary(txframe_aligned):
+ if tx_agc and tx_agc.adapt_if_necessary(txframe_aligned):
continue
# Extract usable data from measurement