Can someone explain me IQ? - Page 1
Forum section: electronics / beginners

author: metrologist
author_rank: Super Contributor
timestamp: October 09, 2017, 10:38:22 pm
content: I started reading this site and became skeptical about 1/3 way through.http://whiteboard.ping.se/SDR/IQ

author: coppice
author_rank: Super Contributor
timestamp: October 09, 2017, 10:48:15 pm
content: Unless you can be a little more specific about what puzzles you, I don't think anyone can help very much, beyond posting links to other articles covering the same ground.

author: metrologist
author_rank: Super Contributor
timestamp: October 09, 2017, 11:55:35 pm
content: I will watchDave'sAlan's video. I mentioned I became skeptical because the concepts presented could be merely mental exercises. For example, negative frequency. Is that merely a mathematical construct? Also, what real physical property is represented by Q?

author: Brumby
author_rank: Unknown
timestamp: October 10, 2017, 12:25:21 am
content: I think of negative frequency in the same way as a left-handed thread. Your looking at the same thing as you would normally - but with a difference in direction, which is mathematically described by a change of sign.Don't get too wrapped up withliteralinterpretations.You have learned to use complex arithmetic for AC waveforms. There is nothing imaginary about the physical reality of those waveforms, but the maths just works.

author: CatalinaWOW
author_rank: Super Contributor
timestamp: October 10, 2017, 03:07:53 am
content: I would suggest watching the video again, particularly the first few minutes. Q is the amplitude of the quadrature phase component. It has physical reality before the I and Q signals are added, and after they are demodulated. In the fully modulated signal you can't point at any single property and say that it is Q, but it has as much reality as the song modulated into the FM signal your boombox plays.I didn't catch any reference to negative frequency in the video. When negative frequencies do crop up in electronics they are a math tool to more easily calculate the real observable values.

author: RoGeorge
author_rank: Super Contributor
timestamp: October 10, 2017, 02:41:39 pm
content: Quote from: metrologist on October 09, 2017, 11:55:35 pmThat page you linked at the beginning,http://whiteboard.ping.se/SDR/IQ,has a very misleading title. Forget about that page for a while. While the information presented there is correct, that is not a good page to start. In fact, it's a terrible place to start understanding what is happening with the IQ modulation. That page only makes sense for someone who already have a good grasp of the subject. IMHO is more like a cheat-sheet, or recapitulation material, and not an introductory course.Regarding the negative frequency: those questions you asked are very hard to answer, also very old, and in fact are philosophical questions, like e.g. "Are numbers real?". I don't know, numbers are concepts, they does not "exist" in a material way, but they can be very real when written in bold at the end of an invoice.Another similar question could be about the number 0. Does it exist? Why would I need the number zero? Human intuition refused it at first, and we struggled for centuries to calculate without using zero. Then we accepted number zero as a useful tool, and now we take it for granted. Same with negative numbers. Same with complex numbers. You will see a lot of complex numbers while talking about IQ. Do complex numbers actually exist? Again, very debatable, but it doesn't matter. The only thing that matters is that complex numbers are useful.Almost offtopic, this is one of the best series of videos I ever seen about imaginary numbers "Imaginary Numbers Are Real" by Welch LabsCode:https://www.youtube.com/watch?v=T647CGsuOVU&list=PLiaHhY2iBX9g6KIvZ_703G3KJXapKkNaFDon't worry if sometimes the math produces results that doesn't make any sense. If the math was correct, then no matter how crazy the result is, there is an interpretation for it, but for now the negative frequency meaning is not relevant. Not when we want to understand what is happening.TL;DR- I and Q are 2 outputs from the local oscillator (LO). I and Q have the same constant amplitude and frequency as the LO. They both came from the same local oscillator, except one of them, Q, was delayed (phase shifted by exactly 90 degrees, always). "I" stands from "In phase output" and "Q" stands from "Quadrature output" of the LO ("Q" is nothing more than a shifted "I", they are all fixed oscillations from the LO, and are all not yet modulated in any way).- Now, we want to make a radio station. Imagine each I and Q output have its own volume potentiometer, VI and VQ. The output voltages from the 2 potentiometers are added together, and then sent to the Tx antenna.- We are allowed to play with the VI and VQ potentiometer's knobs, but we are not allow to modify the LO in any way.- The crazy trick is that any kind of modulation we want (amplitude modulation, phase modulation, frequency modulation, or all of them at once) can be achieved by simply turning VI and VQ knobs in the rhythm of the modulator signal.- Even crazier than that, the same trick and the same schematic also works in reverse, so in a receiver we can demodulate any type of modulation.Please note that the proper name for the signals representing the output of the potentiometers VI and VQ would be something like I(t) and Q(t). I(t) and Q(t) are not the same as I and Q. I(t) and Q(t) are oscillations with variable amplitude in time, because we are turning the knobs of VI and VQ in the rhythm of the modulator signals. Sometimes, if not most of the time, when people are talking about I and Q, they are thinking about the variable signals I(t) and Q(t) coming from the cursor of the potentiometers, and not the constant oscillations I and Q coming from the LO. This can be very, very confusing.Also confusing at the first look, "I" and "Q" notations from the SDR have nothing in common with the notation "I" for Electric Current (Ampere) and "Q" for Quality Factor of a resonant circuit. It is just a coincidence that the letters I and Q were reused in SDR.

author: metrologist
author_rank: Super Contributor
timestamp: October 10, 2017, 03:43:14 pm
content: What I was wondering was, if I take my power supply and simply turn the knob up and down to create a sine wave, then what is Q?I understand the quadrature signal, but in context of the page I linked, which we will forget about, mentioned the 3rd dimension, the corkscrew illustration.I can understand mathematically the formulas and concepts of imaginary numbers or negative frequency. I understand complex impedance and i j vectors and what they represent physically. I immediately could not see what the period of a negative frequency would be in the real world, for example.Alan's video discusses mixing two signals in quadrature and modulating them with a function, which is basically what I remembered about it. In my case, I am thinking Q is zero. I never had a problem with zero nor even evaluating the limit of the undefined condition.Now, I wanted to explore IQ modulation more and tried downloading a polar plot plug-in for Excel. It was giving me cardiod shape when plotting a straight cosine function, and then a circle as I was expecting. And then two pedals when I make the I function a sine function. I think the plug-in is a little goofy how it plots, and I cannot figure out how to make it plot using both coordinate values.

author: coppice
author_rank: Super Contributor
timestamp: October 10, 2017, 03:55:32 pm
content: Quote from: metrologist on October 10, 2017, 03:43:14 pmYou vary one thing and ask why a second independent variable doesn't exist? Are you being serious about this?

author: metrologist
author_rank: Super Contributor
timestamp: October 10, 2017, 04:01:38 pm
content: Quote from: coppice on October 10, 2017, 03:55:32 pmWell, if you take the PoV of this particular subforum and read the article I linked up to the second bullet, then yes. He basically shows a typical sine wave, thenQuote

author: RoGeorge
author_rank: Super Contributor
timestamp: October 10, 2017, 05:18:48 pm
content: There are 4 signals entering in in a quadrature modulator, namely 1, 2, 4, 5:I - input for the IxMultiplier - I is produced by the local oscillator - I has constant amplitude, constant frequency, we are not allowed to change I, I and Q are always on, and are both mandatorymI(t) - input for the IxMultiplier - mI(t) is the modulator signal that we want to transmit, e.g. audio voiceI(t) - output from the IxMultiplier - I(t) is just I modulated MA by mI(t), I(t) = I * mI(t)Q - input for the QxMultiplier - Q is produced by the local oscillator - Q has constant amplitude, constant frequency, we are not allowed to change Q, I and Q are always on, and are both mandatorymQ(t) - input for the QxMultiplier - mQ(t) is the modulator signal that we want to transmit, e.g another audio, this time audio music, not voiceQ(t) - output from the IxMultiplier - Q(t) is just Q modulated MA by mQ(t), Q(t) = I * mQ(t)Ant(t) - is the sum between I(t) and Q(t). Ant(t) = I(t) + Q(t). Ant(t) is the signal for the Tx antennaPlease note that we are using 2 completely different audio signals,voice = mI(t)for the IxMultiplier andmusic = mQ(t)for the QxMultiplier. We can send 2 audio signals at once.What would be the question(s) using the above notations, please?Which signals, from 1 to 7 do you have, and which one are you asking about?

author: Howardlong
author_rank: Super Contributor
timestamp: October 10, 2017, 05:27:17 pm
content: Rick Lyons’ piece here is pretty good.https://dspguru.com/files/QuadSignals.pdfAlso look up the series of four QEX articles from the ARRL by Gerald Youngblood for a really practical treatise:https://sites.google.com/site/thesdrinstitute/A-Software-Defined-Radio-for-the-MassesBetter still, open Excel or Octave and work some numbers yourself :-)

author: metrologist
author_rank: Super Contributor
timestamp: October 10, 2017, 05:38:10 pm
content: Quote from: RoGeorge on October 10, 2017, 05:18:48 pmDon't I(t) and Q(t) have to go to a summing mixer or some other device before Ant(t)?I would have signal 8, which you did not list. That is Ant(r). I know nothing about the 7 you list and that is the point. I also have I and Q streaming outputs for post processing. I think Alan has a couple more videos for me to watch.I will look at the other texts too. Thanks.

author: RoGeorge
author_rank: Super Contributor
timestamp: October 10, 2017, 06:29:05 pm
content: Indeed, I(t) and Q(t) are added (or summed mixed) together, and they will produce the final signal listed at point 7: Ant(t) = I(t) + Q(t)The missing signal number 8 you were asking about is exactly Ant(t), the one listed at point 7.

author: suicidaleggroll
author_rank: Super Contributor
timestamp: October 10, 2017, 06:54:25 pm
content: Quote from: metrologist on October 10, 2017, 03:43:14 pmDo you have access to any programming languages with visualization? Matlab, IDL, Python, etc?If so, try the following. I'm going to write this in IDL since I have it right in front of me, but you can translate it to any other language.Create a time series from 0-10 sec at a sample rate of 100 Hz:IDL> fs = 100d0IDL> time = dindgen(fs*10)/fsNow use it to create a real sine wave with a frequency of 10 HzIDL> data = sin(time*10*2*!dpi)Now take the FFT and plot the resultIDL> fdata = fft(data)IDL> plot, abs(fdata)You'll see two spikes, one at index 100 (10 Hz), and one at index 900 (-10 Hz)Now create a complex sine wave, where I is the same as before, but Q is the cosineIDL> data = complex(sin(time*10*2*!dpi),cos(time*10*2*!dpi))IDL> plot, abs(fdata)Now there's just one spike at index 900 (-10 Hz)Now switch the Q to the negative cosineIDL> data = complex(sin(time*10*2*!dpi),-cos(time*10*2*!dpi))IDL> plot, abs(fdata)Now the spike has moved to index 100 (10 Hz)You can kind of think of it like looking at the output of a rotary encoder. One output can tell you the speed it's moving, but you need two outputs with a 90 deg phase shift to tell you the direction. That's what I and Q are.

author: metrologist
author_rank: Super Contributor
timestamp: October 10, 2017, 07:33:31 pm
content: I don't have experience with those tools, but can visualize the process. I'll figure out how to get Excel to make polar plots and write some modulation formats.From the perspective of IQ modulated signals and looking from that pov it makes sense.When someone sent me the link in my OP, I was from the perspective of an o-scope and simple sine wave, which according to the article could be described by it's I and Q components. I first wondered how a simple sine wave can have a negative frequency.

author: RoGeorge
author_rank: Super Contributor
timestamp: October 10, 2017, 08:54:49 pm
content: Again, that webpage is like trying to explain Ohm's law starting from complex impedance.I might be wrong, but it seems to me that the real question from this topic is: "That webpage was talking about a negative frequency? Does this make any sense in the real world? Can a frequency be negative?"The short answer is no, there is no such thing like a negative frequency.The definition for "frequency", both as the common word "frequency", or as the "frequency" definition used in Physics, does not allow negative values.In some cases, yes, we can extend the definition for the concept of "frequency", and attach to it whatever interpretation we need for a negative sign, so we end up talking about negative frequency, and it makes sense, but only for that particular approach.In the real world, there is no such thing like an oscillation of "-1KHz".It's just like the philosophical problem with number zero:In the real world, there is no such thing like "zero apples".There could be some apples, or no apples, but in the real world there is no such thing like "zero apples". Some will argue that "zero apples" is the same as "no apples", but this is not true. If I give you a basket with "zero apples", how do you know they are "zero apples" and not "zero nuts"? So no, "zero apples" usually is not the same as "no apples". But, yes, in some specific context, where we calculate only about apples, it totally makes sense to talk about "zero apples", and to say that "zero apples" is the same as "no apples".

author: metrologist
author_rank: Super Contributor
timestamp: October 10, 2017, 09:46:42 pm
content: so in my example, with the pure sine function, there is zero Q?OK, what you said, but also better understanding what the I and Q components of a signal are. I can appreciate a negative value of either I and Q functions, so that would make sense in a real world representation. Seems there would be two solutions for it, too, like an image.

author: RoGeorge
author_rank: Super Contributor
timestamp: October 11, 2017, 12:33:56 am
content: Quote from: metrologist on October 10, 2017, 09:46:42 pmIn your example, my understanding is that the power supply plays the role of the LO from a quadrature modulator, right?If so, then you produced just the I component. You didn't produced the other mandatory signal, Q. In order to talk about that corkscrew 3D chart, we need to create the other signal, the delayed I, which is named Q. Without creating Q, the fancy 3D chart doesn't make any sense, the Q projection plane does not exist, and it would be just a 2D chart for a usual sinus curve, not a 3D helicoid.Let's imagine the following problem: we want to learn about wiring in parallel 2 precharged capacitors, one being twice as big as the first one, each with it's own initial voltage. What would be the final voltage when put in parallel?And, we found a webpage with complicated charts, and explanations about exponential discharge, and the alternative representation of any e^^x with imaginary numbers, and a bunch of many other very complicated points of view. Another representation of the same problem will be to treat the capacitor as a transmission line, and in this case the voltage will vary in stairs, not continuously, totally confusing, but correct.In the first place, we don't need all the e^^-t bullshit, or transmission lines, even if all that theory is correct, and sometimes necessary. To understand our final voltage problem, all we need to know is the conservation of charges and the definitions of capacitance, so why to talk about exponential functions, or transmission lines in a webpage called "Parallel capacitor's voltage for dummies".Now, the initial question from the SDR "What would be Q, then?", translated to our capacitors voltage problem will become something like: "I have only one capacitor, what would be the the second capacitor?", or "I have one capacitor, does that means that the other one has 0 Farads?".Long story short, for me it was very useful to have an experimental approach in order to build some practical understanding. Once I arrived myself at the same conclusion as the one from the minute 8:13 in the posted video, it all started to make sense. Only afterwards I started to match that understanding with the many possible approaches for a quadrature mixer, and the crazy math and charts corresponding to them. From here, the complexity can escalate pretty fast, especially when the quadrature modulator is used for digital communications.I did it like that:- generate the fixed signals I and Q with the soundcard, using a free programs named "Soundcard Scope".- use the line out Left and Right channels as I and Q from the LO.- put an external 10K volume potentiometer on each Left and Right line out. These 2 potentiometers are our multipliers from the quadrature modulator block diagram. The cursor position will represent mI(t) and mQ(t), and the potentiometers cursor's voltages will be I(t) and Q(t).- from each cursor of the 2 potentiometers put a series 100K resistor, then tie the other end of the resistors together, at the tip of the oscilloscope probe. The 2 resistors will be our additive mixer for I(t) and Q(t), and the tip of the probe will be Ant(t).- synchronize the oscilloscope with the generated I- play with both potentiometers by moving both cursors at once, and observe how the amplitude of the Ant(t) can be changed from the potentiometers. Nothing new here. This would be amplitude modulation.- now turn one potentiometer in one direction, and the other in the oposite directions. Let's disregard the amplitude of Ant(t), and pay attention only to the phase of Ant(t) relative to I. Notice that we can change the phase of the Ant(t) relative to the I signal without altering the phase of the I or Q from the LO! That means we can have phase modulation too, not only amplitude modulation. It all depends of how the mI(t) and mQ(t) are changing relative to each other.- phase modulation with a continuously increasing phase shift is the same as a frequency modulation, so by carefully varying mI(t) and mQ(t) ratios, we can have any kind of modulation: AM, PM or FM.Until now, all the experiments were made thinking only about time domain. Only after building a minimal grasp for what happens in the time domain, I started to look at the same signals in the frequency domain, and build from there.

author: radiogeek381
author_rank: Regular Contributor
timestamp: October 11, 2017, 12:40:35 am
content: OK... This one could go on for a while.I second the recommendation of Lyons -- he writes well and his books are quite good.I and Q come into their own when you are dealing with more than one frequency. Any interesting signal has more than one frequency component.The SetupImagine that you have two signals at 1.001 MHz and 1.004 MHz. (they're sinusoids at sin(2pi 1.001e6 * t) and sin(2 pi 1.004e6 * t) ) You want to hear the upper one, and not hear the lower one.You could build a filter at 1.004 MHz but if it was narrow enough to eliminate the other signal, it would likely be difficult or impossible to build. (This is the architecture for a Tuned Radio Frequency receiver. Great technology in 1922.)You could beat the signal down with a 0.9 MHz local oscillator to get a 100kHz IF, filter out the signal at 104 kHz with something a little more realizable. That's a heterodyne receiver.But if you're doing things with an SDR (or even some pretty fancy analog stuff -- seehttps://www.arrl.org/files/file/Technology/tis/info/pdf/9301032.pdf) you can take advantage of an interesting property of sin and cos functions.Beating the Signals with a SINIf you beat the 1.001 and 1.004 MHz signals with a carrier at 1.002 MHz (sin(2 pi 1.002e6 * t) ), you'll get four resulting frequencies -- 1kHz, 2kHz, 2.003MHz, and 2.006MHz. We aren't interested in the higher signals. (The four products come from the fact that sin(a) * sin(b) = 1/2 * ( cos(a - b) - cos (a + b) ) so we get the sum and difference frequencies.)So the output signal from the mixer isR(t) = cos(2 pi 1e3 t) - cos(2 pi 2.003e6 t) + cos(- 2 pi 2e3 t ) - cos(2 pi 2.006e6 t)Ignoring the signals at 2MHz , our lower frequencies give us a signal (ignoring the 1/2 for now) of cos(2 * pi * 1e3 * t) + cos(- 2 * pi * 2e3 * t)) Adding that we know that cos(a) == cos(-a)Q(t) = cos(2 pi 1e3 t) + cos(2 pi 2e3 t)Beating the Signals with a COSineWhat happens if we also multiply our input signals with cos(2 pi 1.002e6 * t) ? Well, digging back to our teenage trigonometry,cos(a)sin(b) = 1/2 (sin(a + b) - sin(a - b)So our signal from the cosine side of the house gives usB(t) = sin(2 pi 2.003e6 t) - sin(2 pi 1e3 t) + sin(2 pi 2.006e6 t) - sin(- 2 pi 2e3 t)Hmmm.. eliminating the 2MHz parts and remembering that sin(a) == -sin(-a)I(t) = sin(2 pi 2e3 t) - sin(2 pi 1e3 t)Still we're stuck with having to filter out one of the two signals.I Meets Q (With Mr. Hilbert In Between)But there is a glimmer of hope here. What if we could take C(t) and rotate it (phase shift) all frequencies by 90 degrees? Remember that sin(a + 90deg) = cos(a)...PhaseShift( I(t) ) sin(2 pi 2e3 t) - sin(2 pi 1e3 t) ===> cos(2 pi 2e3 t) - cos(2 pi 1e3 t)And if we add that to our S(t) we getUSB(t) = 2 cos(2 pi 2e3 t)If we subtract PhaseShift( I ) from Q we getLSB(t) = 2 cos(2 pi 1e3 t)!!!!! Wow,,, I got an I and a Q out of two tones and picked out the one that I wanted.2. Negative frequencies are no more a fiction than the derivative of a function is a fiction,providedyou think of frequency as "change in phase per unit time". Then you aren't looking at periods, you're looking at angles. One of the things you get with I and Q is a representation of the signal in a form where you can express it as an amplitude and a phase angle. Positive frequencies will sweep a vector around a circle in a counterclockwise direction (phase angle growing -- on your white board, not in 3 dimensional space).. Negative frequencies sweep the vector in a clockwise direction (phase angle decreasing). This is not purely academic -- the basic FM demodulator works like this in IQ space.3. The magic 90 degree phase shift is a real bear to implement over a wide bandwidth in analog form. Rick Campbell did a great job in his R2 design -- cited earlier. But in an SDR the 90 degree phase shift is easily realized with a widget called a Hilbert Transformer. It is an all-pass filter with a constant phase shift for all frequencies of pi/2 .I and Q are your friends. (Well, mine anyway...)

author: rs20
author_rank: Super Contributor
timestamp: October 11, 2017, 12:52:00 am
content: Quote from: metrologist on October 10, 2017, 03:43:14 pmCrucial point is this: if you have just a sine wave, and nothing else, you don't have anything but a sine wave. No I, no Q, none of that.I and Q only become relevant terms when you have a signal (your sinewave, for example),ANDa local oscillator (LO). The I and Q are only meaningful when describing the relationship/interaction between the two. If your LO and your signal have the same frequency, then you'll either have a DC I or DC Q, or some combination thereof, when you mix. If your LO and signal have difference frequencies, the I and Q that you get out will vary. If you plot the I and Q on a plot, the resulting vector will wind around at a frequency corresponding to the difference in the frequencies; and the direction that the vector winds around is determined by whether the LO or your signal has the higher frequency. And indeed, since the winding can occur in a clockwise or counterclockwise direction, it's perfectly reasonably top describe one of those directions using negative frequencies.

author: hamster_nz
author_rank: Super Contributor
timestamp: October 11, 2017, 10:48:01 pm
content: Quote from: metrologist on October 09, 2017, 11:55:35 pmImagine a rotating disk, viewed edge-on, with a pole stuck towards the outside - maybe roundabout in a play park, with somebody standing on towards the edge of it.Looking from afar, with the disk spinning clockwise at 10 rpm, you will see the pole move move back and forth, at 10 cycles per minute. moving from left, to furthest away, to the right, to the nearest - From side-on and at a distance you can't see the difference between nearest and furthest away, you can only see left/right motion.The disk slows down by 5 rpm, and you see them moving back and forth, at 5 cycles per minute.The disk slows down by another 5 rpm, and you see the pole stopped.The disk slow the down by another 5 rpm (i.e. now spinning counter clockwise at 5rpm), and you see the the pole moving back and forth at -5 cycles per minute. If you consider spinning clockwise as "positive frequency" then you are seeing a "negative frequency". It looks exactly like the positive frequency, but is different.The hidden dimension, the one you can't see, is 180 degrees out of phase. Rather than "moving from left, to furthest away, right, nearest" it is now "moving from left, nearest, right, furthest away", but it all looks like left<->right motion to you looking from afar.So when you down-convert an RF signal by X Hz, you are in effect "unwinding it" by X Hz. Signals at X+100 Hz and X-100Hz both look like 100Hz signals in the 'I' dimension, but one is a "negative frequency" - without the Q information you can't tell them apart.

author: sean87
author_rank: Regular Contributor
timestamp: October 11, 2017, 10:52:51 pm
content: It takes some IQ to master the IQ

author: hamster_nz
author_rank: Super Contributor
timestamp: October 11, 2017, 10:54:20 pm
content: Quote from: metrologist on October 10, 2017, 03:43:14 pmIf you are creating a 1Hz signal then you are creating an equal amount of 1Hz and -1Hz.Mathematically cos(x) and cos(-x) are always equal, but when you add sin(x) to sin(-x) you always get zero, so your totaled Q value is zero.However, if you multiply that with an 100Hz signal, you end up with a mix of 50% 101Hz and 50% 99Hz, showing its deeper nature as a summation of two signals...

author: rs20
author_rank: Super Contributor
timestamp: October 12, 2017, 12:26:31 am
content: Quote from: hamster_nz on October 11, 2017, 10:54:20 pmWrong, this is totally nonsensical. What you're saying is that any sinewave I encounter in nature is somehow "fundamentally" a cosine and definitely not a sine. What the?It's only when I introduced my own LO signal, perhaps at 1 Hz, and compared the phase of the two 1 Hz waves, that the terms I and Q even begin to take on any meaning. After all, I refers to the signal that is in-phase with the LO, and Q refers to the signal that is in quadrature with the LO. No LO means that the terms I and Q have lost any useful meaning.

author: Awesome14
author_rank: Regular Contributor
timestamp: October 12, 2017, 04:10:38 am
content: Quote from: metrologist on October 09, 2017, 11:55:35 pmMathematicians can make sense out of negative frequency, negative resistance, or a negative square root. I just try not to think about it too much. It's no less real. But if you read the entire paper you cited in the OP, I/Q is a just mathematical construct. A good one, too.

author: Doc Daneeka
author_rank: Contributor
timestamp: October 12, 2017, 04:51:16 am
content: I had some similar arguments once after someone asked me to explain what harmonics are, then 'do they really exist'A simple analogy could be: you have 10 objects in a pile on the table. I say it is two groups of objects one of 7 and one of 3. Most people wouldn't have a problem with that. Do these two groups really exist? what does it matter if for instance you only care about how many there are? thinking of the pile as two groups combined works out the same as one big pile, or three or ten individual, whatever.I and Q are similar: You have a sinusoidal signal, a reference point in time called 0, now you say what amplitudes of cosine and sine when added together give me that signal? The answer is I and Q. Do I and Q actually exist? Maybe you are physically combining an I and Q to get your signal. maybe not. The thing is it does not matter, the result s of anything you do to the signal are the same if you consider it as 'just a signal' or a sum of two components I and Q, which is why we use I and Q (it simplifies calculations for instance)You just have two choices for your model (important to know there is a difference between our abstract models and physical reality) - one signal or I and Q components. I and Q don't exist any more (or less) than 'a sinusoidal function of t'

author: rs20
author_rank: Super Contributor
timestamp: October 12, 2017, 05:19:24 am
content: ^ Spot on. I had said in an earlier message that an LO is required to make the terms I and Q make sense (I = in phase with LO, Q = in quadrature with LO). But indeed, as Doc Daneeka points out, all you have to do is define a particular point in time as your t=0 point, and you may, if you choose, thereby define I and Q to be the sine and cosine components (where sin means sin(omega*t) and cos means cos(omega*t), which only makes unambiguous sense if you have a defined, absolute t=0 reference point).

author: hamster_nz
author_rank: Super Contributor
timestamp: October 12, 2017, 09:51:00 am
content: Quote from: rs20 on October 12, 2017, 12:26:31 amI'll take you through it slowly....Make yourself comfortable with the symmetry in the sin() and cos() functions: sin(x) = -sin(-x) and cos(x) = cos(-x) (seehttps://brilliant.org/wiki/symmetry-in-trigonometric-graphs/)Say you have a cosine wave, with an amplitude of 2:f(x) = 2cos(x).You can make it a complex, but with a zero imaginary component.f(x) = 2cos(x) + i*0You can decompose that into two halves:- one a positive frequency (phase advancing with x)g(x) = cos(x)+i*sin(x)- one with negative frequency (phase decreasing with x)h(x) = cos(-x)-i*-sin(-x)(note that because of the symmetries these are almost the same functions, but with opposite signs on the second imaginary term so they cancel each other out).That gives you an equivalent function of:f(x) = 2cos(x) = g(x) + h(x) = cos(x)+i*sin(x) + cos(-x)+i*sin(-x)And if you want to check then you can use the symmetries to reduce everything back to f(x) = 2cos(x).f(x) = cos(x)+i*sin(x) + cos(-x)+i*sin(-x)f(x) = cos(x)+cos(-x) + i(sin(x)+sin(-x))f(x) = 2cos(x) + i*0So far so good.What have we just done?We have split the cos(x) into two complex functions (g(x) and h(x), that when added give you the original, real-valued, signal f(x). If you graph each of these halves on the complex plain, you have two points spinning around (0,0), one spinning, clockwise, the other counter clockwise. However, if you add them together and graph them, you just get a point that moves to along the real axis, tracing out 2cos(x).Note that both halves start at 1+i*0 when x=0 - but of course you already knew that because they are half of the 2cos() function.What about Sines?For f(x) = 2sin(x) you can decompose it into a slightly more confusing, less clear halves:g(x) = sin( x) + i * cos(x)h(x) = -sin(-x) - i * cos(-x)Once again see how that uses the symmetries of sin(x) = -sin(-x) and cos(x) = cos(-x), with the imaginary terms cancelling each other out.One is a function of the 'positive' frequency, the other the 'negative' frequency, which when added together give the original completely real-valued function.When viewed on the complex plane these are also two points rotating around (0,0) in different directions, but unlike the cos() wave (where both are at 1+0i when x=0), one point is at 0+1i, the other point at 0-1i when x = 0.Why is this useful?It then becomes pretty visually intuitive why multiplying a baseband signal with a carrier gives the "sum+difference" side bands - the g(x) half gives you the upper side band, the h(x) half gives you the lower side band.It also becomes pretty clear what is going on when generate / demodulate USB and LSB signals.It also becomes clear that multiplying by a I+Q carrier is pretty much 'moving the zero point' on the frequency spectrum, and you just need special care for what happens to those pesky 'negative' frequencies.So what is the point to all this?It is just as valid, and sometimes helpful to view any 'real' signal (such as somebody tracing a sine wave with a PSU) as the sum of positive and negative frequencies that have an imaginary component. I sure makes a lot of SDR math / DSP stuff more intuitive and easier to grok.This is just like how it is sometime helpful to view a real signal as a summation of sine and cosine waves.I mean really, is that 3 minute song on the radio music really an nearly infinite group of sine+cosine waves of different phases and amplitudes?

author: rs20
author_rank: Super Contributor
timestamp: October 12, 2017, 10:14:12 am
content: Quote from: hamster_nz on October 12, 2017, 09:51:00 amYep, I agree with everything you wrote in your second message. Still calling out the total nonsensicality of your original message where you said that a hand-made sinusoid definitively has "a totalled Q value of zero" without specifiying any absolute time base or LO.