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

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Sun Dec 2 09:24:20 UTC 2018


Harald Welte has submitted this change and it was merged. ( 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.

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

Approvals:
  Pau Espin Pedrol: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



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: merged
Gerrit-Change-Id: I71702feaa11f53e7614a6938a984dd748405474a
Gerrit-Change-Number: 12006
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181202/570268d9/attachment.htm>


More information about the gerrit-log mailing list