6

I'm planning to build a data acquisition system for a software-defined radio receiver. Basically, it just uses an ADC which samples an analog signal and send the signal to a processor. And then a stream of samples would be fed into a host computer with Software-Defined Radio software packages for signal processing. And since the frequency I'm working on is fairly low, I want to simply run the ADC at twice the Nyquist frequency without having separate I/Q channels, and also, I plan to use Zero-IF.

Most SDR programs designed to natively work with analytic signals, not real signals, so converting the real samples of the signal to I/Q components inside the hardware on the fly before it reaches the host computer is desirable. However, I don't have any prior knowledge on signal processing, and I'm struggling to come up with a solution, but after reading everything I can find on the web, there are basically two options (as mentioned, I don't have any DSP knowledge, it's possible that I'm misguided.).

  1. Digital Downconversion: Multiply the signal with sin(ωt) and cos(ωt) independently for I and Q. It's basically recreates an I/Q mixer digitally, and common in Low-IF radio receivers.

    • To me, this concept appears easy to understand, and its implementation is straightforward, just multiply. Although it would mean the frequency of my analytic signal must be shifted, but I don't think it's a big deal, I may as well upconvert the signal a little bit or switch to Low-IF, if DDC is easier overall.
  2. Hilbert Transform: Compute the Discrete Hilbert Transform on the real samples to obtain the analytic signal.

    • To me, I have no idea on how to implement it. It seems to be a lot of different approaches of doing it.

      (1) Calculate the Hilbert Transform via direct convolution. This method seems to suffer from a number of limitations. André Bergner said "a direct convolution is very slow opposed to a FFT based [...] Secondly, the HT kernel has a singularity at zero and the numerical computation of the convolution integral is ill-posed".

      (2) Calculate the FFT. Deleting the negative frequencies. Applying the inverse FFT.

      (3) Model the transform as a time-invariant filter and implement it as such.

Initially, I thought using digital downconvertion would be convenient because... First, I don't know what I'm supposed to do to implement a Hilbert Transform, especially when using it on incoming samples on the fly, digital downconvertion seems to be easier to implement. Also, a Hilbert Transform looks like a "lossy" process, and some information would be lost due window size of the FFT/filter, but DDC is "lossless". Also, DDC looks much faster as only multiplication is used.

But at a closer look, it isn't really the case. In DDC, both the I and Q channel needs to be filtered afterwards as well, by definition all practical digital filters are approximations, it's incorrect to say DDC is less "lossy" than DHT. Also, the requirement of using two filters rather than modeling the DHT in a single digital filter, means that DDC potentially is slower the DHT. There are also various concerns about the numerically-controller oscillators in DDC.

My questions are,

  1. If the objective is only for creating a naive implementation for obtaining I/Q components from a stream of samples for a real signal on the fly, which method is better in terms of simplicity and ease of understanding?

  2. If the objective is for creating an output of the best "quality", which method is preferable?

  3. If the objective is for creating an efficient program on a signal processor with limited computing power, which method is better in terms of performance?

  4. If a Hilbert Transformer is desirable, what would be an appropriate method to implement it? Are there any reference implementation? What should I start from? In particular, the hilbert() function is most scientific computing software packages seems only designed to work on an existing array of data, but not a continuous stream of data, an implementation with demonstration of using windowing is appreciated.

  5. Overall, which method is appropriate for my application?

比尔盖子
  • 163
  • 1
  • 5
  • Both approaches can work. In my opinion, #1 is both the easiest to understand and to implement. One question about your project description, though: how do you intend to implement a zero-IF receiver with only one ADC? Inherently, once you've downconverted your signal to a zero IF (baseband), you need to have both I and Q components to represent it. If you want to sample it with one ADC only, then you would need to use some nonzero IF. You can often get better performance by doing this if you can. – Jason R Jan 21 '20 at 02:42
  • I found another interesting approach proposed by Rick Lyons. In the description, it is actual combined both approaches and find a computation optimize solution. – Howard Su Mar 05 '21 at 05:07

1 Answers1

4

[Update: I mentioned a possible +3dB processing gain by including the Hilbert Transform prior to DDC for the case of a real IF signal in the first version of this post, which @MattL questioned so I dug into this further and confirmed that there is no such processing gain, so the only advantage to doing that would be to simplify filtering since it would provide an image rejection.]

  1. For a quick implementation I recommend sampling to a digital IF frequency ($F_s/4$ is an excellent choice), and then doing a digital down conversion with a complex NCO (quadrature down-conversion) which creates the I/Q components for your baseband signal. Note if the IF frequency could be guaranteed to be exactly $F_s/4$, or if an approximate result is ok because you can do a phase rotation at baseband to correct residual frequency offsets, then the two outputs (sine and cosine) of the complex NCO would simply be:

    1 0 -1 0 1 0 -1 0

    0 1 0 -1 0 1 0 -1

    Very convenient!

    Also $F_s/4$ or any multiple thereof such as $3F_s/4$, $5F_s/4$, etc for undersampling which provides the same result as above also simplifies your analog filtering since your alias frequencies (that you must filter out prior to conversion) will be spaced at equal distances in this case.

  2. For optimum performance, a Hilbert Transform can be included either digitally at the digital IF frequency prior to the quadrature down-conversion OR in the analog prior to the ADC to convert your real signal $s(t)$ to a complex signal $s(t) + j\hat s(t)$ where $\hat s (t) $ is the Hilbert Transform of $s(t)$. The narrower your actual signal bandwidth as a fraction of the IF frequency, the easier it is to implement. In the analog they are done with quadrature hybrids that provide an in-phase and quadrature representation of the signal such as these here: https://www.minicircuits.com/WebStore/90_180_degree_hybrid.html and there are common digital filter design techniques (in Matlab/Octave and Python) available to design a Hilbert transform digitally.

    The benefit of this approach is to eliminate image frequencies which simplifies filtering requirements. I explain this in more detail with the help of graphics at this posting here: Frequency shifting of a quadrature mixed signal

    Other variants: Do the quadrature hybrid in the analog and then use two ADC's to sample each output as I and Q. If the sampling rate is at the carrier frequency at the output of the quadrature hybrid then the ADC will perform the down conversion function, or the ADC’s can be at an IF frequency with a full complex digital downconverter done digitally. Do the downconversion with two analog mixers where the RF or IF signal is fed into the input of both mixers and the sine and cosine of the carrier is multiplied with each creating baseband I and Q signals that can then be directly sampled by dual ADC’s. When the mixers are directly at the RF carrier this is called Zero-IF. If a quadrature hybrid can be included prior to the mixers this would offer the same advantages to be described above at the complexity of doing that.

  3. For this one I think you will need to answer once you are familiar with the options. What has best performance for limited computing power is difficult to answer generally. Certainly option 1 is simpler and has a 3 dB penalty over doing 2 but that may not be an issue for you. That is the trade you will need to make.

  4. I wouldn't be able to provide detailed design instructions (beyond what is typically answered here), but digitally this is done as a digital filter design; you design two all-pass digital filters that pass all frequencies in your pass band and each has a phase that tracks the other offset by 90° (Phase tracking filters). The tools I mentioned (Matlab/Octave/Python Scipy.Signal) all have tools to help come up with such filter coefficients.

  5. Looking forward to hearing about your progress and what you decide for that!

Dan Boschen
  • 50,942
  • 2
  • 57
  • 135
  • Do you have a reference for that 3 dB advantage of the Hilbert transform method over down-conversion and low pass filtering? At a first glance I don't really see why that should be the case. – Matt L. Jan 21 '20 at 09:12
  • "Similar to this approach is to do the quadrature hybrid in the analog and then use two ADC's to sample directly at baseband." - Yes, I'm aware of this approach but I read that it requires additional calibrations and corrections to avoid spurious signals due to I/Q imbalance, and it's especially difficult to match the two analog signal paths if I want to build them from discrete electronic parts, which is my motivation to do it in the digital domain even it requires a faster single-channel ADC. – 比尔盖子 Jan 21 '20 at 10:41
  • Yes I am always motivated to do it in the digital domain, but all that matching you mention is also done for a most part in the digital domain. If you simply buy one of the components I mentioned it is trivial. If you signal is narrow band compared the carrier frequency where you do the 90 degree split, it is also trivial to make. I have built analog variants with decades of bandwidth but that is not so trivial. – Dan Boschen Jan 21 '20 at 12:24
  • @MattL no reference and always the chance I am mistaken. This is something I have verified on my own designs but consider this simple example of a real signal at the input to a lossless analog 90 degree splitter with a finite SNR where the noise has also been amplified above thermal prior to the split. The SNR at each output will be the same - agree? – Dan Boschen Jan 21 '20 at 12:28
  • This output represents a complex signal... if the input was $cos(\omega t)$ the output of the splitter is $e^{j\omega t)$ or $e^{-j\omega t)$ depending on which outputs you call I and Q. This puts the signal completely in the positive or negative frequency carrier. When you multiply with the conjugate exponential carrier - we simply shift the frequency axis in one direction but don’t change the SNR. If we didn’t do the Hilbert, the same shift would happen but half the signal would have been at twice the IF frequency and filtered out (-3dB signal loss). Am I missing anything? – Dan Boschen Jan 21 '20 at 12:36
  • Further the digital down converter would be a full complex multiplier with 4 multipliers with cross and dot terms—- I’ll be sure to mention that – Dan Boschen Jan 21 '20 at 12:45
  • (Unless the analytic Signal completely occupies the real axis, in which case two multipliers would be fine.) – Dan Boschen Jan 21 '20 at 18:26
  • @MattL. Did my explanation make sense? I want to be sure I am not missing anything so let me know. Even more simply: splitting in quadrature is lossless and does not change the SNR (in the analog there is a small implementation loss as I mention). The full complex multiplier simply shifts the frequency origin. So if we do the quadrature split we put all the signal at the new origin, if not we lose 3 dB due to the other image. Does that make sense to you? – Dan Boschen Jan 22 '20 at 14:39
  • @DanBoschen: I think about it like this: a phase splitter with a Hilbert transformer throws away components at negative frequencies, whereas a down-converter followed by a low pass filter throws away components at twice the carrier frequency. In this sense I think both methods are equivalent and should result in the same SNR. Basically, these two methods just interchange the filtering and the down-conversion operations. – Matt L. Jan 22 '20 at 15:19
  • @MattL. yes and can be explained as not needing the image reject filter - but if the image frequency is far enough apart the filtering is trivial compared to implementing the Hilbert. This explanation may be clearer and what I wrote may be misleading. I’ll simulate to confirm what I am talking about and share the results. Thanks – Dan Boschen Jan 22 '20 at 15:54
  • I agree with @MattL. that using either the DDC or the Hilbert transform method will yield same SNR. To see a particular example of how complex baseband can improve SNR in a radar (either DDC or digital Hilbert), you can look at this documentaton by Texas Instruments: http://www.ti.com/lit/wp/spyy007/spyy007.pdf – Envidia Jan 22 '20 at 16:32
  • @Envidia the question specifically is if you put a Hilbert in front of the DDC (and use a full complex four multiplier DDC) would that improve the SNR or be the same. Not Hilbert or DDC. Do you have thoughts on that? – Dan Boschen Jan 22 '20 at 16:57
  • @DanBoschen I have not really seen putting a Hilbert before a quad mixer as you describe, mostly for some very specific issues in the systems we design. As is done in many systems, I'm used to either an IQ analog channel to mix down to an IF and sample with two ADCs or a single real channel that samples with a single ADC and then goes into a DDC. At the end of the day, the final filtering of a complex baseband signal should eliminate more out of band noise for the SNR improvement no matter how you got there. Like you, I have simulations to confirm this, as documentation in rather limited. – Envidia Jan 22 '20 at 17:27
  • @Envidia yes I tend to think Matt may be right as putting the additional Hilbert would indeed eliminate half the images but not change the SNR for the image of interest (the structure is identical to image reject mixers or single sideband downconverters it is just that those structures effectively only give the real of the output). I may have seen a 3 dB improvement for other reasons given the elimination of those images. Quadrature sampling is not as common given the added complexity so I do want to double check with a simulation. – Dan Boschen Jan 22 '20 at 19:45
  • @MattL. And Envidia I also am far from confident so will delete all that in the answer until I can confirm this. Thanks for your inputs – Dan Boschen Jan 22 '20 at 19:58
  • @MattL. Another mental model but still haven’t confirmed: consider when we don’t use Hilbert and only one side of the full complex DDC with our real IF signal (two multipliers with quadrature LO, typical approach) we agree that we throw half the signal away, it is simply shifting the frequency axis and we select one side band to go through our complex baseband filter. The other sideband is completely correlated with independent noise. So if we could add that coherently instead of filtering it out we would get a 3 dB improvement, right? Not yet concluding and will simulate. – Dan Boschen Jan 23 '20 at 14:52
  • For instance I1 as our real IF we create I1+jQ1 with a 90 degree splitter. I1 and Q1 are completely correlated when we remove the 90 degrees. Our DDC LO is I2-jQ2, also both the same carrier frequency with a 90 degree shift between them. Our real output would be I1I2 + Q1Q2 with the Hilbert and just I1I2 without. Due to the two 90 degrees shifts with Q1 and Q2, isn’t Q1Q2 completely correlated to I1I2 this 3 dB advantage for optionally using it? Same for the Q output channel. – Dan Boschen Jan 23 '20 at 14:59
  • @MattL. OK!! Thank you Matt for bringing up the question. I got to the bottom of my own confusion--- including almost having a validated sim showing the 3 dB improvement. In all my explanations above, the assumption is the noise is uncorrelated but the signal is. This would only occur if the noise was locally generated such as quantization noise or thermal noise floor but that condition would fall into bad practice and resolved by adding gain (or increasing number of bits in the digital). – Dan Boschen Jan 23 '20 at 18:50
  • So for my quadrature hybrid analogy, the signal and the noise on each output of a lossless analog quadrature hybrid would indeed each be down 3 dB, BUT importantly the amplified noise component from the input would be correlated on each output once we remove the 90° phase shift. So both signal and noise would move together just as you suspected. – Dan Boschen Jan 23 '20 at 18:51
  • @DanBoschen: Great you cleared that up! – Matt L. Jan 23 '20 at 18:58
  • @Envidia Want you to see that I got to the bottom of it as you and Matt suspected. As far as limited documentation this may interest you- this is the datasheet for Zilog's Z87200 spread spectrum modem chip (I used this many years ago to implement a 5.8 GHz spread spectrum transceiver so I think this is where I was first introduced to doing quadrature sampling): http://www.zilog.com/appnotes_download.php?FromPage=DirectLink&dn=PS0102&ft=Product%20Specification%20(Data%20Sheet)%20%20&f=YUhSMGNEb3ZMM2QzZHk1NmFXeHZaeTVqYjIwdlpHOWpjeTkzYVhKbGJHVnpjeTk2T0RjeU1EQXVjR1Jt – Dan Boschen Jan 23 '20 at 19:04
  • @MattL.Yes I simulated the whole thing and saw the 3 dB improvement and the fail was generating independent noise on I and Q (which makes sense on its own, if it was thermal noise for example) but does not represent the noise at the output of a Hilbert Transform--- In that case the signal and the noise are really both the "signal of interest" and one and the same. Ugh. – Dan Boschen Jan 23 '20 at 19:07
  • 1
    @DanBoschen Thanks for the datasheet! This stuff is just another one of those examples of something that is seemingly simple enough to pick up and use but is difficult when it comes down to explaining the details for a general case given all of the assumptions and theoretical particularities involved...almost to the point of getting philosophical. – Envidia Jan 23 '20 at 19:17