Change in osmo-trx[master]: lms: User correct scale factor for transmit samples

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu Nov 29 12:22:18 UTC 2018


Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/12006


Change subject: lms: User correct scale factor for transmit samples
......................................................................

lms: User correct scale factor for transmit samples

Due to (I believe) a copy+paste mistake from the USRP1 code,
we were using only a scale range of up to 9830 when transmitting
samples, rather than the full 16 bit signed integer range up to
32767.

As a result, we were loosing almost two bits (MSBs) of resolution
as well as a lot of transmit power.

This changes the scale factor to 0.707 (1/sqrt(2)).

Please note that the much higher DAC output level means that the analog
gain should be reduced.  The theoretic range of up to 73dB should not
be used, but Lime Microsystems suggest a value of 61..67 dB.  This can
be achieved by using a "osmotrx tx-attenuation" value of 6..12 inside
the osmo-bts-trx configuration file.

Change-Id: I71702feaa11f53e7614a6938a984dd748405474a
---
M Transceiver52M/device/lms/LMSDevice.h
1 file changed, 8 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/06/12006/1

diff --git a/Transceiver52M/device/lms/LMSDevice.h b/Transceiver52M/device/lms/LMSDevice.h
index 349efbb..6635c13 100644
--- a/Transceiver52M/device/lms/LMSDevice.h
+++ b/Transceiver52M/device/lms/LMSDevice.h
@@ -28,7 +28,14 @@
 #include <iostream>
 #include <lime/LimeSuite.h>
 
-#define LIMESDR_TX_AMPL  0.3
+/* Definition of LIMESDR_TX_AMPL limits maximum amplitude of I and Q
+ * channels separately. Hence LIMESDR_TX_AMPL value must be 1/sqrt(2) =
+ * 0.7071.... to get an amplitude of 1 of the complex signal:
+ * 	A^2 = I^2 + Q^2
+ * 	A^2 = (1/sqrt(2))^2 + (1/sqrt(2))^2
+ * 	A^2 = 1/2 + 1/2
+ * 	A^2 = 1 */
+#define LIMESDR_TX_AMPL  0.707
 
 /** A class to handle a LimeSuite supported device */
 class LMSDevice:public RadioDevice {

-- 
To view, visit https://gerrit.osmocom.org/12006
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I71702feaa11f53e7614a6938a984dd748405474a
Gerrit-Change-Number: 12006
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181129/ea7d5427/attachment-0001.html>


More information about the gerrit-log mailing list