#170: Basics of IQ Signals and IQ modulation & demodulation - A tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

Great video. Anybody know how a transmitter and receiver get their phases in sync? seems like a common reference is needed.

👍︎︎ 1 👤︎︎ u/Scissorhands_Igloo 📅︎︎ Sep 04 2014 🗫︎ replies

So that was very helpful, but I don't fully understand the "demodulation" mentioned at the end. Once you have the added I and Q waveforms, how can you retrieve any meaningful extra information by reversing this? Why would you bother? You'd have no way of knowing that the I and Q you've extracted were the original waveforms, due to the properties of addition.

I mean I know it's done so I must be missing something here, probably around the fact you know they must be 90 degrees out of phase, but I still don't see how that helps you.

👍︎︎ 1 👤︎︎ u/MisterNetHead 📅︎︎ Sep 04 2014 🗫︎ replies
Captions
in today's video we're going to cover a topic that's been requested for quite some time that's to look at the fundamentals of IQ signals or quadrature signals including IQ modulation and demodulation now to present this right we need to understand a couple of concepts kind of in order just the basics of a sine wave what makes up its amplitude frequency and phase and then how we can represent amplitude modulation of that sine wave as well as frequency and phase modulation we'll talk about what quadrature signals are it's actually a very simple definition and then what happens when we add quadrature signals together and that's kind of the key to the whole thing and then how we can use all of this to modulate demodulate process and analyze IQ signals now this should be review for everybody just the components of a sine wave I owe a sine wave has got a certain amplitude we call that a and then basically just follows this shape here you know using a sinusoid function two pi times the frequency which is one over the period times time plus some offset in phase if we want to shift this way for back and forth so you know very simply if we're going to modulate this waveform the properties that typically can get modulated are the amplitude the frequency or the phase that's amplitude AM FM or PM type modulation and just about all modulation types are really just functions of those three things or combinations of those three things so just focusing in on amplitude modulation or essentially doing is taking the amplitude term and making it some function of time maybe like a slowly varying sine wave and using that you multiply against the sinusoid function and what we do is basically modulate or change the amplitude of that sine wave in response to that baseband signal now normally the modulating envelope if you will the baseband signal is much slower than the carrier so you really can't see that they've looked at something on the scope and might look you know kind of like this picture here will actually go take a look at it on the scope here's an example of just a live sine wave at ten megahertz shown on the scope we can see a couple of cycles of it see its amplitude and its frequency and if we add some amplitude modulation to that we can kind of see it varying up or down we slow this down so we can actually see the baseband envelope and I'll change the trigger to trigger to be synchronous with my baseband signal now we can actually see the amplitude of that signal varying in response to you know a lower frequency baseband and that's what's essentially very common with amplitude modulation of RF signals is that the variation of the amplitude component with respect to the RF component is typically much slower and that's a very typical of what you'd see of the envelope of the RF signal for amplitude modulation okay so now that we know essentially the components of a sine wave what it looks like and what it looks like when it's amplitude modulated let's add another concept here of what are quadrature signals that's actually pretty simple basically the definition is that of two signals are 90 degrees apart in phase they're said to be in quadrature very simple just a quarter cycle in fact a cosine wave and a sine wave are quadrature waveforms you'll actually see them both plotted here the black waveform is a sine wave and the pink waveform is a cosine wave we can see that they're separated by a quarter cycle or ninety degrees so they are quadrature waveforms each one of them can obviously have its own amplitude and essentially four quadrature waveforms what we do is we basically say that the amplitude of the cosine wave we call that I or the in phase signal okay so that's I times the cosine of two pi F T maybe there's another fascia there would be another phase shift in this case and then the amplitude of the quadrature waveform or the sine waveform is Q so that's kind of given by this definition here so Q times the sine so since these are ninety degrees out of phase these are quadrature signals so since all of the argument here is going to be the same there are identical waveforms that just shifted by 90 degrees the only thing we really need to know are the I and Q values and if we start changing the I and Q values versus time will change essentially the resulting sum of these two waveforms so let's take a look at what happens when we add these two waveforms together and some of the cool properties associated with that now the adding of quadrature signals is really kind of the key for all of the quadrature modulation we're going to be talking about so let's look at the example here I've got a cosine wave and a sine wave so the I and the Q waveforms if there's two those two amplitudes are equal and we're going to get a resulting sum of those that's going to have a phase shift that's midway between them or about 45 degrees okay if we assume that one zero this one's 90 this one's going to be 45 now if the magnitude I and Q are varied in the same direction at the same time it'll make these signals bigger or smaller the resulting sum will just be bigger or smaller so you know very simply we can amplitude modulate the sum by amplitude modulating the I and Q waveforms in an identical way now let's look at what happens if we don't vary the I and Q components in identical way if they're varied differently so let's look at an extreme let's say we had I equal to one okay but Q equal to zero so that's like takes that out of the picture so the sum is just going to be the I way for them so it's just going to look like the cosine wave so this waveform shifts over you know by 45 degrees similarly if we made I equal to 0 and Q equal to 1 the output would look like the sine wave would shift this way you know full 90 degrees from the cosine wave so we can see by varying the I and Q differently we can actually cause a phase shift or a phase modulation of the resulting sum now of course frequency modulation is just a form of phase modulation so that works as well so you can see by appropriately varying the I and the Q as a function of time we can cause the resulting sum of those waveforms to have amplitude modulation frequency modulation phase modulation really any combination of all of that so so through simple amplitude modulation of I and Q we can create complex modulation in the resulting sum and that's really the whole key with IQ modulation and IQ signals and why they're really used in modern software-defined radio and a lot of other applications let's take a look at that using some math on the scope so I've got putting into the scope here - ten megahertz sine waves that are in quadrature you can see the 90 degree phase shift between the two if we add them up using the math waveform here just change the scale of that we can see the resulting sum at is it shifted you know in phase with respect to these two it's right in the middle now if I you know knock the amplitude of one of these down to zero you can see how that waveform shifted in phase okay I bring that waveform back up and turn the other one to zero you can see that waveform shift in phase again so we can see how varying the amplitudes in a different way will cause a phase shift and of course if we vary the amplitude of both of these signals like if I vary one signal and bring it up in amplitude we can see that that sum is coming up we're getting a little bit of the phase shift because they're now different in amplitude we switch to the other waveform and bring its amplitude up by the same amount okay now we can see that signal is shifted back in phase and the resulting sum is big so we can see how we can get a phase modulation as well as an amplitude modulation by varying the magnitude of I and Q and again that's really the whole key we can do very complex modulations by simply doing amplitude modulation of I and Q waveforms now another way to visualize or represent IQ signals and the resulting sum of those signals as a diagram called a phasor diagram and this can be really useful for certain modulation types and the way a phasor diagram works is this the amplitude of signal is basically represented by the length of this vector going from with the center representing zero and the longer that arrow or that vector is the higher the amplitude of the signal and then the phase of the signal with respect to 0 degrees like a cosine is represented by the angle okay of that Ray starting from the center so it really is kind of a representation of the I and Q components so look at what I mean by that let's say when the i and the q components are equal like i have here i is equal to 1 right and q is equal to 1 so I have an I've al u that's equal to the Q value the resulting sum of those gives me this vector in this dimension I could see I've got about a 45 degree phase shift as opposed to say 90 or 0 so I could see I've got that 45 degree phase shift and I can calculate out with simple geometry you know essentially what the magnitude of that waveform is right it's the square root of I squared plus Q squared okay so I can actually see you know everything about that signal by looking at the phasor diagram and for example if the Q was brought to zero the Q component went to zero then this waveform would come all the way down here and all we'd have left is just the I component similarly if I is brought to zero then the wave form will go all the way up here that the Ray will go away up here we'd have a 90 degree phase shift and the amplitude just would just be the Q value so we can see the phasor diagram can be really useful to represent both the I and Q components right the amplitude of those two I and Q waveforms as well as what the resulting sum is doing this type of phasor diagram is very often used to help visualize many different digitally modulated RF signals because often times the digital modulation is going to be forcing the carrier to be going to certain amplitude and phase combinations to represent a given symbol or set of bits so let's walk our way into that a little bit we also get one of the one of the simpler digital modulation types or BPSK binary phase-shift keying and that's essentially where the phase of the carrier is just altered between no essentially zero degrees and 180 degrees for essentially inverting the waveform so from an IQ standpoint it's actually very simple you know either I or Q could be set to zero and then the other one varies between plus 1 and minus 1 and that essentially just inverts the waveform it's like multiplying by you know remember this is the amplitude of a cosine wave so I multiply it by plus 1 we get this multiplied by minus 1 the signal just inverts itself so let's go look at that signal live and see what I mean so here's what that looks like with some real signals I'm just saying it's using a mixer here to take a 10 megahertz RF signal at a 1 megahertz square wave if that varies between essentially a plus and minus value and using that to modulate the RF signal so here's my 10 megahertz RF signal here's my square wave that's going positive and negative positive and negative and you can actually see the phase shift of this RF signal now essentially going from being in phase with the carrier to being 180 degrees out of phase with the carrier back in phase again you can actually see the phase reversals occurring at each of the digital signal transitions so that's the simple way of creating or representing essentially a a BPSK phase modulated RF signal by simply varying the amplitude the I or the Q component of a quadrature waveform pair now of course on the phasor diagram this will be represented by a signal that varies between this and rotating around to this so essentially going from here to here to here bouncing back and forth now between those two points between essentially zero degrees and 180 degrees back and forth of course when we take that the next logical step is let's say we vary not only the I between plus and minus one but how about we vary the Q between plus and minus one and we you know basically quadrature modulate those take quadrature carrier of zero and 90 degrees multiply them together so essentially have one of these sitting here and one of these sitting here the difference that these two waveforms will be 90 degrees offset and what happens is when when that happens as you wind up with four combinations right you have a combination whether both 1 and we saw that earlier when we first started talking about summing IQ waveform as the resulting output is at 45 degrees now if the eye is night making a negative 1 and the Q is 1 the phase shift to be 135 when I and Q are both negative 1 the phase shift to be 225 and then when I is plus 1 and Q is negative 1 we'd have 315 now if we look at that on the constellation diagram that's kind of the one that was kind of plotted out here so these four constellation points kind of represent the positive inq negative i+ q negative I and Q and then negative Q positive i those four constellation points and that's what they're called constellation points so if we looked at a QPSK signal in this constellation diagram we ideally have four points representing essentially those four combinations of I and Q and that's why this is a real nice handy way of looking at many of these quadrature or qualm modulated RF signals so I put together this little bit of an assembly here to kind of show the QPSK modulation I have a pair of mixers each of them is doing essentially that BPSK modulation they're being fed with carriers that are in quadrature and I've got them fed with digital signals to create the modulation so let's zoom in on a scope screen and see what we've got we zoom in here we can see that here's my digital signals here and they're very both of them are varying between you know essentially a negative and positive value so they're both negative and that one's negative this one's positive this one's positive that's positive then this one is positive and that's negative so those are the four states that we talked about now you can actually see how that's now affecting the carrier so we're jumping a quarter cycle from here to here at that transition you're maintaining that phase and this transition is jumping us another quarter cycle and so on this this transition is causing another quarter cycle jump so this is what the carrier looks like and how the phase changes for a QPSK signal of course that would be represented by those four constellation points equal amplitude okay and all four states but a different phase in all four states versus really just two more aspects of this the inq signals don't necessarily have to just be ones and zeros or plus ones and minus ones they can be essentially any analog value as we discussed earlier we can essentially create amplitude frequency or phase modulation by simply amplitude modulating these quadrature carriers so really any modulation type am/fm PM single sideband double sideband bpsk qpsk whatever it might be any modulation type can be represented by the appropriate generation of I and Q waveforms and this is a very common thing and software-defined transmitters because these baseband signals are relatively low frequency and they can be synthesized very easily in hardware and then or even in software and then fed to a D to a converter for example even all this processing many times will happen digitally so we can create any RF signal with just simply quadrature carriers and the appropriate I and Q of course all this works in the opposite direction just as well for demodulating signals essentially if you take any RF signal and then D modulate it with quadrature local oscillators to create the I and Q data streams there is enough information in the I and Q to fully demodulate that signal whether you're doing it for receiving the signal that to listen to it or to grab data out of it or to analyze the signal once you've got a signal represented by its I and Q components you know everything there is to know about that signal and again this is the basis again for most software-defined radios or SDR because all these IQ signals can easily be generated or analyzed in software and process through ADCs and DACs and things like that for a lot of common low cost software-defined radios the sound card is actually used as the ADC and DAC and then the samples from the sound card in a computer are used to modulate signals and demodulate signals I hope you enjoyed this little tour through IQ signals and what IQ and quadrature signals are how they can be used to modulate and demodulate signals and what's meant by things like constellation diagrams when we're talking about digitally modulated RF signals if you like what you see please subscribe if you have any questions certainly put them it was questions or comments in the the video here and thanks again for watching as always
Info
Channel: w2aew
Views: 351,930
Rating: 4.9769201 out of 5
Keywords: W2AEW, Tek, Tektronix, IQ, IQ modulation, Quadrature Amplitude Modulation (Signal Modulation Mode), QAM, quadrature, in phase, phase, modulation, demodulation, Signal Processing (Field Of Study), Electronic, AM, FM, BPSK, QPSK, 16QAM, analog, digital, RF, mixer, scope, oscilloscope, baseband, modulator, tutorial, basics, definition, SDR, software defined radio, transmitter, receiver, radio, radio receiver, Electrical Engineering (Industry), signal, educational
Id: h_7d-m1ehoY
Channel Id: undefined
Length: 19min 0sec (1140 seconds)
Published: Tue Sep 02 2014
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.