# What about IQ imbalance - DC offset calibration?

**URL:** <https://discourse.myriadrf.org/t/what-about-iq-imbalance-dc-offset-calibration/900>\
**Category:** LimeSDR\
**Created:** [8 March 2017 13:41 UTC](https://discourse.myriadrf.org/t/what-about-iq-imbalance-dc-offset-calibration/900 "2017-03-08T13:41:52Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Kc7noa](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/kc7noa/32/144_2.png) [@Kc7noa](https://discourse.myriadrf.org/u/Kc7noa)\
**Post date:** [13 March 2017 15:17 UTC](https://discourse.myriadrf.org/t/what-about-iq-imbalance-dc-offset-calibration/900/21 "2017-03-13T15:17:00Z")

</div>

I dont know …

But i think there is a convention that a certain signal level into a receiver should show a certain VU meter level.

And that level display would be calibrated in computer software … I think that the available software are not matured enough to have that – maybe SdrRadio, but i have always felt that a signal level is some what irrelevant. if it can be heard , good. If not, then improve the signal to noise ratio or gain of the antenna.

---

<div class="post-metadata">

**Author:** ![N1JEZ](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/n1jez/32/288_2.png) [@N1JEZ](https://discourse.myriadrf.org/u/N1JEZ)\
**Post date:** [13 March 2017 20:47 UTC](https://discourse.myriadrf.org/t/what-about-iq-imbalance-dc-offset-calibration/900/22 "2017-03-13T20:47:25Z")

</div>

-73 dBm is equal to S9 below 30 MHz (the HF world)  
-93 dBm is equal to S9 on 6M and up.

---

<div class="post-metadata">

**Author:** ![cswiger](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/cswiger/32/197_2.png) [@cswiger](https://discourse.myriadrf.org/u/cswiger)\
**Post date:** [14 March 2017 12:41 UTC](https://discourse.myriadrf.org/t/what-about-iq-imbalance-dc-offset-calibration/900/23 "2017-03-14T12:41:40Z")

</div>

I ran this yesterday after discovering it:

./LimeSuiteCalibrate.py --freqStart 1e6 --freqStop 2e9

and later my cell phones would not register with known working sim! It worked previously so backed out ~/.limesuite/LMS7002M\_cache\_values.db and created a new one with LimeUtil --make and then it worked again. Stock installation of OpenBTS, only changed the GSM.Radio.C0 value, and Calibrate breaks it.

---

<div class="post-metadata">

**Author:** ![andrewback](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@andrewback](https://discourse.myriadrf.org/u/andrewback)\
**Post date:** [15 March 2017 08:51 UTC](https://discourse.myriadrf.org/t/what-about-iq-imbalance-dc-offset-calibration/900/24 "2017-03-15T08:51:40Z")

</div>

@cswiger thanks for spotting this! Looks like the LimeSuiteCalibrate method of doing a sweep to pre-populate the DB _may_ now be incompatible / sub-optimal. We’re looking into this and plan to have a verified, supported solution to doing sweeps and advance populating the database soon.

---

<div class="post-metadata">

**Author:** ![Roman](https://avatars.discourse-cdn.com/v4/letter/r/ed8c4c/32.png) [@Roman](https://discourse.myriadrf.org/u/Roman)\
**Post date:** [15 March 2017 16:58 UTC](https://discourse.myriadrf.org/t/what-about-iq-imbalance-dc-offset-calibration/900/25 "2017-03-15T16:58:22Z")

</div>

Is there any description what exactly this calibration procedure performs? It seems that many users here do not understand the goal and methods involved.

---

<div class="post-metadata">

**Author:** ![Kc7noa](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/kc7noa/32/144_2.png) [@Kc7noa](https://discourse.myriadrf.org/u/Kc7noa)\
**Post date:** [15 March 2017 22:05 UTC](https://discourse.myriadrf.org/t/what-about-iq-imbalance-dc-offset-calibration/900/26 "2017-03-15T22:05:13Z")

</div>

Im wondering, once the calibration routine is done, does the values used for all three LNA paths … the calibration is done for internal paths, but what about external parts?

I would think that calibration is neaded to compensate for phase/amplitude error from I/Q transformer down into the ADC/DAC … Would it not be better to have a coxial jumper from Rx1\_H to Tx1\_W etc to account for all the parts?

When i look at a signal around 3.4Ghz the display (gqrx) does not look like the calibration is being applied or it can be improved apon.

I don’t know where the shorting path is that is incorporated into LimeSDR is.

---

<div class="post-metadata">

**Author:** ![hTo137](https://avatars.discourse-cdn.com/v4/letter/h/ba8739/32.png) [@hTo137](https://discourse.myriadrf.org/u/hTo137)\
**Post date:** [29 March 2017 22:01 UTC](https://discourse.myriadrf.org/t/what-about-iq-imbalance-dc-offset-calibration/900/27 "2017-03-29T22:01:58Z")

</div>

Any news to report on this?

I think sub-optimal is optimistic. But it’s possible that I am not clear on what to expect. Or in other words my expectations are incorrect. But I can only blame myself since no one else set them.

However, after running LimeSuiteCalibrate.py I could no longer rx where I was rxing fine before I ran it. I just deleted the ~/.limesuite/LMS7002M\_cache\_values.db and I guess soapylms must have recreated it. Now I can rx again.

---

<div class="post-metadata">

**Author:** ![andrewback](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@andrewback](https://discourse.myriadrf.org/u/andrewback)\
**Post date:** [30 March 2017 08:39 UTC](https://discourse.myriadrf.org/t/what-about-iq-imbalance-dc-offset-calibration/900/28 "2017-03-30T08:39:21Z")

</div>

Hi @hTo137, hopefully @joshblum and/or @Zack can provide an update.

---

<div class="post-metadata">

**Author:** ![Kc7noa](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/kc7noa/32/144_2.png) [@Kc7noa](https://discourse.myriadrf.org/u/Kc7noa)\
**Post date:** [30 March 2017 22:41 UTC](https://discourse.myriadrf.org/t/what-about-iq-imbalance-dc-offset-calibration/900/29 "2017-03-30T22:41:06Z")

</div>

are you saying that there is a crash … or gqrx or what ever, does no longer like your settings?

If the computer has no I/Q values to correct for … it seems reasonable that it also has a lowered CPU load would allow a Rx to operate.

---

<div class="post-metadata">

**Author:** ![Kc7noa](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/kc7noa/32/144_2.png) [@Kc7noa](https://discourse.myriadrf.org/u/Kc7noa)\
**Post date:** [30 March 2017 22:44 UTC](https://discourse.myriadrf.org/t/what-about-iq-imbalance-dc-offset-calibration/900/30 "2017-03-30T22:44:01Z")

</div>

I’m stil wondering how to do manually do a I/Q calibration in LimeSuiteGUI that would be amended to the values created/saved by the automatic I/Q python program …

The values generated for frequency’s above 2ghz are not all that great and should be improved apon.

---

<div class="post-metadata">

**Author:** ![hTo137](https://avatars.discourse-cdn.com/v4/letter/h/ba8739/32.png) [@hTo137](https://discourse.myriadrf.org/u/hTo137)\
**Post date:** [31 March 2017 02:37 UTC](https://discourse.myriadrf.org/t/what-about-iq-imbalance-dc-offset-calibration/900/31 "2017-03-31T02:37:58Z")

</div>

> [@Kc7noa](#):
>
> are you saying that there is a crash … or gqrx or what ever, does no longer like your settings?

Here are the steps to reproduce what I reported:

1. rm ~/.limesuite/LMS7002M\_cache\_values.db
2. rx and see lots of the data I want to see
3. run LimeSuiteCalibrate.py
4. rx and see much much less data and sometimes none at all
5. rm ~/.limesuite/LMS7002M\_cache\_values.db
6. rx and see lots of the data I want to see

> [@](#):
>
> If the computer has no I/Q values to correct for … it seems reasonable that it also has a lowered CPU load would allow a Rx to operate.

I don’t understand this.

---

<div class="post-metadata">

**Author:** ![Kc7noa](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/kc7noa/32/144_2.png) [@Kc7noa](https://discourse.myriadrf.org/u/Kc7noa)\
**Post date:** [31 March 2017 04:09 UTC](https://discourse.myriadrf.org/t/what-about-iq-imbalance-dc-offset-calibration/900/32 "2017-03-31T04:09:05Z")

</div>

The lack of I/Q correction values means that your cpu(s) have less work to do … FFT values are not combined in the LimeSDR-USB’ fpga.

What you discribe sounds like what is normal – combination of gain settings and lack im image rejection (due to no I/Q correction values) – this always leands its self to a higher noise floor which gives the software more to show on the display.

I hope you are using shielding for your lime and bpf for the area of Rx …

The lime ADC has a ~70db therotical dynamic sampeling range … the analogue gain is best adjusted to maximise this… you can get alot of false signals (images or mixture of sheilding/Lo harmonics) with no input filtering, shielding or out of range gain settings.

---

<div class="post-metadata">

**Author:** ![hTo137](https://avatars.discourse-cdn.com/v4/letter/h/ba8739/32.png) [@hTo137](https://discourse.myriadrf.org/u/hTo137)\
**Post date:** [4 April 2017 19:53 UTC](https://discourse.myriadrf.org/t/what-about-iq-imbalance-dc-offset-calibration/900/33 "2017-04-04T19:53:15Z")

</div>

@Kc7noa

What you’re saying then is that the LimeSuiteCalibrate.py provides I/Q correction values and stores them in the sqlite db?

Those values are then used by the LimeSDR and those corrections are making it so that I can no longer rx because the LimeSDR is now more finely tuned?

But if I had a BPF (Band Pass Filter) and better shielding I would probably be able to rx after calibration?

---

<div class="post-metadata">

**Author:** ![Kc7noa](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/kc7noa/32/144_2.png) [@Kc7noa](https://discourse.myriadrf.org/u/Kc7noa)\
**Post date:** [4 April 2017 20:23 UTC](https://discourse.myriadrf.org/t/what-about-iq-imbalance-dc-offset-calibration/900/34 "2017-04-04T20:23:56Z")

</div>

> [@hTo137](#):
>
> sqlite db

Some where … that is used … least it looks as though gqrx/soapysdr does …

I dont think you need shielding as much as a bandpass filter or a low pass – hard to decifer from my location if you have FM station mixing or AM broadcast … or a combination of both …

AND … i cant discern if your getting some configuration issue that’s being caught and mitigated in an unknown way … it helps alot to run gqrx from terminal so you can see most communication between gqrx and soapysdr …

So im 75% confident that with a filter for the frequency your trying to Rx – and adjustments of the 3 gain levels you should achieve your goal.

---

<div class="post-metadata">

**Author:** ![hTo137](https://avatars.discourse-cdn.com/v4/letter/h/ba8739/32.png) [@hTo137](https://discourse.myriadrf.org/u/hTo137)\
**Post date:** [4 April 2017 21:01 UTC](https://discourse.myriadrf.org/t/what-about-iq-imbalance-dc-offset-calibration/900/35 "2017-04-04T21:01:49Z")

</div>

> [@Kc7noa](#):
>
> I dont think you need shielding as much as a bandpass filter or a low pass – hard to decifer from my location if you have FM station mixing or AM broadcast … or a combination of both …

Far as I can tell we’re not even talking about the same thing.

---

<div class="post-metadata">

**Author:** ![hTo137](https://avatars.discourse-cdn.com/v4/letter/h/ba8739/32.png) [@hTo137](https://discourse.myriadrf.org/u/hTo137)\
**Post date:** [4 April 2017 23:19 UTC](https://discourse.myriadrf.org/t/what-about-iq-imbalance-dc-offset-calibration/900/36 "2017-04-04T23:19:22Z")

</div>

> [@cswiger](#):
>
> I ran this yesterday after discovering it:
> 
> ./LimeSuiteCalibrate.py --freqStart 1e6 --freqStop 2e9
> 
> and later my cell phones would not register with known working sim! It worked previously so backed out ~/.limesuite/LMS7002M\_cache\_values.db and created a new one with LimeUtil --make and then it worked again. Stock installation of OpenBTS, only changed the GSM.Radio.C0 value, and Calibrate breaks it.

I experienced a similar problem. I removed that ~/.limesuite/LMS7002M\_cache\_values.db  
and it reappeared when I ran GRC. I guess that a new one is created if it doesn’t exist by SoapyLMS7.

---

<div class="post-metadata">

**Author:** ![rast](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@rast](https://discourse.myriadrf.org/u/rast)\
**Post date:** [5 April 2017 01:29 UTC](https://discourse.myriadrf.org/t/what-about-iq-imbalance-dc-offset-calibration/900/37 "2017-04-05T01:29:13Z")

</div>

> [@hTo137](#):
>
> I experienced a similar problem. I removed that ~/.limesuite/LMS7002M\_cache\_values.db  
> and it reappeared when I ran GRC. I guess that a new one is created if it doesn’t exist by SoapyLMS7.

So are you saying that the GRC created a default corrections table (with no corrections) ???

---

<div class="post-metadata">

**Author:** ![jpadden](https://avatars.discourse-cdn.com/v4/letter/j/848f3c/32.png) [@jpadden](https://discourse.myriadrf.org/u/jpadden)\
**Post date:** [5 April 2017 04:05 UTC](https://discourse.myriadrf.org/t/what-about-iq-imbalance-dc-offset-calibration/900/38 "2017-04-05T04:05:04Z")

</div>

> and adjustments of the 3 gain levels

Any docs on adjusting the 3 gain levels? What acceptable ranges are? What you are looking for when adjust each of the 3?

Also, I think I am seeing RX quality issues with my OAI install. I see it sourcing the calibration db.

```
Connecting to device: LimeSDR-USB, media=USB 3.0, module=STREAM, addr=1d50:6108, serial=0009060B00472726
[INFO] LMS7002M cache /home/enb/.limesuite/LMS7002M_cache_values.db

```

Should I have run the calibration script? I am using a bpf/duplexer for the band I’m using.

---

<div class="post-metadata">

**Author:** ![Kc7noa](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/kc7noa/32/144_2.png) [@Kc7noa](https://discourse.myriadrf.org/u/Kc7noa)\
**Post date:** [5 April 2017 04:38 UTC](https://discourse.myriadrf.org/t/what-about-iq-imbalance-dc-offset-calibration/900/39 "2017-04-05T04:38:44Z")

</div>

> [@jpadden](#):
>
> and adjustments of the 3 gain levels
> 
> Any docs on adjusting the 3 gain levels? What acceptable ranges are? What you are looking for when adjust each of the 3?

Not that im aware of …

LNA gain is kinda dependent on frequency … below 10Mhz best to be kept to 3db or less up around 3ghz i almost max LNA… TIA around 12db ( adjust by sight of noise and noise floor – same with LNA) then the last is prety much a digital gain so any place you want to adjust the min/max for the 70db dynamic range of the ADC/DAC …

I try to adjust all 3 at a place that each barely raises the noise floor …

* * *

Not sure what AIO is …

The I/Q calibration will lower the observed noise floor … but not by much … with a uncalibrated I/Q there are image signals of the 90Deg and 270deg probable outcomes of the FFT that also is shown – and added or subtracted against the FFT of the 180deg/0deg outcome …

I have noticed that there are Large spikes at certin intervals … like when i have my system set for 250000 samples per/sec at 6Mhz and 12Mhz 18 … on up … and change the sample rate to 3000000 and they move elsewhere …not sure if its a bug but i need to investigate more and try to find out if its something with gqrx or soapysdr – i dont have a working windows environment …

---

<div class="post-metadata">

**Author:** ![Kc7noa](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/kc7noa/32/144_2.png) [@Kc7noa](https://discourse.myriadrf.org/u/Kc7noa)\
**Post date:** [8 April 2017 11:23 UTC](https://discourse.myriadrf.org/t/what-about-iq-imbalance-dc-offset-calibration/900/40 "2017-04-08T11:23:25Z")

</div>

So … how does some one do a manual calibration at a single frequency?

[Previous page](https://discourse.myriadrf.org/t/what-about-iq-imbalance-dc-offset-calibration/900.md?page=1)

[Next page](https://discourse.myriadrf.org/t/what-about-iq-imbalance-dc-offset-calibration/900.md?page=3)
