5 ms·
Unfortunately this is somewhat misleading and even wrong at times. A crucial aspect that many of the I/Q explanations miss is, that the I/Q representation (whi
by cycomanic 6y ago
Unfortunately this is somewhat misleading and even wrong at times.
A crucial aspect that many of the I/Q explanations miss is, that the I/Q representation (which is really phasor notation) is a feature of modulation onto a carrier wave, not baseband.
So the example starts of with drawing the sine wave and say we don't know the full wave, because we don't know if frequencies are positive or negative and because it's hard to determine the power (not even sure what he/she means there). That is wrong and directly contradicts Nyquist theory, if we sample a signal at twice it's maximum frequency we can fully reconstruct it. The reason the explanation goes wrong is because they bring in negative frequencies. Negative frequencies do not exist!
This is where the phasor/IQ representation comes in. If we modulate a signal onto a carrier wave, in other words we have a wave at some frequency and we modulate that wave in amplitude/phase/frequency, we generate frequencies higher and lower than that carrier frequency. The modulation can have components that correspond to the sine or cosine of that carrier wave. Importantly these components are orthogonal, so can carry independent data. That's where we use the phasor representation (IQ-modulation), and remove the carrier wave and represent this "artificial" baseband signal using complex numbers or sine or cosine components, or positive/negative frequencies (all these are equivalent). But it is important to remember that this is just a representation of a signal modulated onto a carrier as if there was no carrier.
That's where this explanation goes wrong.
- awelkie 6y agoExactly. I wrote this explanation, but you beat me to it, so I'll just post it here: The real reason we use I/Q sampling is because we want to frequency-shift a signal. Why do we want to frequency-shift a signal? In radio frequency applications the signal of interest almost always has a much lower bandwidth than its highest frequency. In other words, the signal has a small bandwidth (say 40 MHz) centered around a high center-frequency (say 2.4 GHz). If we want to digitize the signal, then one way would be to use a very high sample-rate ADC (e.g. a 2.4 GHz ADC). But these are very expensive, and a much better way of digitizing the signal is to use a mixer (a frequency shifter) to shift the signal to be centered around 0 Hz and then use a relatively low sample-rate ADC (e.g. a 40 MHz ADC). The way frequency shifting is done is by multipling the signal by a sine signal, which can be done in hardware. But this introduces a distortion to the signal because multiplying by a sine is not actually a frequency shift. It just so happens that this distortion is cancelled out by adding another copy of the signal multiplied with another sine delayed by 90°. But this addition needs to be complex (due to the relationship between sine functions and true frequency shifts), so what we do is sample the two distorted signals and do this complex addition with the digitial signals. So the reason we have complex samples is because that's the best way we've found to do frequency shifting using real-only sine waves (this explains why we don't use complex numbers in audio signal processing; there's no need to do frequency shifting!). This tutorial goes into the details and is the best explanation I've seen on quadrature sampling (another term for I/Q sampling): https://www.dsprelated.com/showarticle/192.php https://www.dsprelated.com/showarticle/192.php I think engineers (myself included) tend to get confused because using complex numbers makes the math simpler, and so they think that's the real reason we use them. All the talk about ambiguous frequencies or negative frequencies or needing to know the phase of a sample is true, but all of those problems could be solved without complex numbers simply by sampling twice as fast and then doing some math (again, audio DSP does just fine without quadrature sampling), so it's not a "real" reason to do this strange kind of sampling.
- marcan_42 6y agoThe reason why audio processing (not sampling) does fine without I/Q data is because our ears are almost completely insensitive to the phase relationships between different frequency components, and because additive frequency shifts are not musically useful. That is what is very hard to deal with without representing signals as I/Q. The audio world just doesn't care. Radio does. This is why most textbook audio equalizers (including those used in professional DAWs) have nonlinear phase by default (minimum-phase) unless you opt for a FIR or FFT based mode. That would never fly in radio.
- galangalalgol 6y agoAudio processing isn't shifted downto baseband or shifted at all, so there is no need for IQ. Its all real. If instead of a direct mix down to baseband, you tell the sdr to mix the minimum frequency in the signal you care about down to just above zero, you can work without i and q. For instance, if you mix an am radio freq down to audio frequency, its all real and you can hear it and represent it as an array of real values. Edit, this is how the Airspy sdr works, to avoid iq imbalance like you get in the direct conversion receivers in most sdrs. Second edit for terminology. Mixing is multiplying by a frquency to shift frequency. Baseband means you shifted the center of the frquencies you care about to zero, so half of the frequency content is negative. Negative frequencies are what drive that mean imaginary number into the whole thing.
- marcan_42 6y agoYou're making the mistake of assuming that the only purpose of IQ data is to represent negative frequencies after downconversion. This is not true. The IQ representation is extremely useful for certain kinds of processing, even if you're working in baseband. There are plenty of reasons to take a real baseband signal, run it through a Hilbert transform to get a Q, and process it as IQ data. It just so happens that audio DSP algorithms happen to almost never care about those exact kinds of processing, due to the way our ears and brains work. And thus, IQ data is not used in audio. But it's not because it's baseband. It's because our ears don't care about phase relationships (which is one thing you can more easily preserve in the IQ domain) and because frequency shifts like downconversion are not useful in music since they destroy the harmonic relationships in the sound.
- whatshisface 6y ago>The reason the explanation goes wrong is because they bring in negative frequencies. Negative frequencies do not exist! I agree that that's a place where the explanation goes wrong, but negative frequencies do exist, they cancel out the imaginary part of the positive frequency. A real-valued signal has equal amplitude at f and -f, if you're talking about Fourier transforms. Admittedly, Fourier transforms depart slightly from the more elementary definition of frequency as one divided by the period, but that's a linguistic snag, not a conceptual one.
- deleted 6y ago[deleted]
- rrss 6y agoI think the issues you mention are mostly just a matter of differing perspectives. The author starts from the perspective that the underlying signals are all fundamentally complex, and a real signal (the projection of the 'true' signal onto the real axis, or upconverted complex baseband) is transmitted for physical convenience (i.e. possible to build). It sounds like you start from the perspective that the underlying signals are real, and the "artificial" analytic signal is only introduced as a mathematical convenience ("negative frequencies do not exist!"). IMO either perspective is fine - neither is "wrong" or "right." > because it's hard to determine the power (not even sure what he/she means there) I think they are referring to the fact that having the analytic representation makes envelope detection trivial.
- brandmeyer 6y agoThis may be true for RF applications, but it isn't universally true. Three-phase power is also modeled this way and both positive and negative frequencies definitely exist. Three-phase/three-wire electric power doesn't have three linearly independent currents or line-to-line voltages. Rather than fight the constraint that Ia+Ib+Ic == 0, we transform the system into one in which the constraint doesn't exist. The three (redundant!) 120-degree three-phase signals are transformed into a virtual two-phase reference system and we operate on the two phases that way. Sometimes we even "frequency shift" the signal into the reference frame of a physical (or virtual) rotor. There are some interesting side-effects. In the alpha-beta (stator) frame, unbalanced three-phase load looks like the sum of a dominant positive 60 Hz and smaller negative 60Hz signal. Diode-rectified loads are dominated by the negative fifth and positive seventh harmonics in the stator reference frame, but are frequency-shifted to negative and positive sixth in the rotor's reference frame. Three-phase four-wire (A, B, C, and Neutral) does have three linearly independent currents and voltages. But their disturbances are so different from each other that it is frequently convenient to model this system as the sum of a complex alpha-beta line-to-line current plus a virtual common-mode phase (the zero phase). See also the Clarke and Park transforms.