# I / Q Signal Study with SDR using Adobe Audition

I learned about SDR receivers and transceivers from radio amateurs a very long time ago, when I did not even have the Internet. Oddly enough, very few people understood this technique. Being engaged in audio processing at that time, I caught the idea and the basic principle of SDR operation. As I understood at the time, SDR is a normal direct conversion receiver, which mainly consists of a mixer and a reference oscillator of a fixed or tunable frequency. An antenna and a local oscillator output are wired to the mixer inputs, and the mixer output is fed to a sound card. Due to the fact that the stations have a narrow band and the sound card is much wider, it is possible in some way to programmatically re-configure from station to station within a fixed wide frequency band. Besides, it is possible to process the received signal at the same time using DSP. I already came across separate DSP programs that process the signal from the low-frequency output of the radio receiver (noise reduction, narrowband filter, etc.). The idea seemed to me rather tempting, and I became interested in this issue deeper.

After some time, I managed to assemble my own SDR transceiver using one of the schemes provided to me. There were two schemes in total. In one circuit, a generator with switchable quartz to the desired amateur radio frequency band served as a reference frequency, and the tuning was performed programmatically. The second circuit contained a DDS synthesizer, which is able to generate any frequency (within its limits), which is set from the computer by the control program. It is possible to rebuild both software and hardware. I chose the second scheme. The management program is very sophisticated. First of all, it allows you not only to hear the station and see its spectrum, but also to see the whole spectrum of the broadband signal that comes to the sound card. Moreover, it is possible with the help of a mouse to instantly rebuild a station whose spectrum is visible on the screen. This is one of the key features of SDR. At one of the radio amateurs, who collected the same scheme before me, I fully observed how it all works in practice. The first thing that surprised me was that both channels were involved in the sound card: L and R. It would seem, and where is the stereo? This is now, I clearly understand everything, but at the time when the Internet in the ordinary homes of provincial cities were in their infancy, there was practically no detailed technical information. In addition, with a 48 kHz sampling rate of the sound card, the width of the review is not 24 (as I thought, according to the Kotelnikov theorem), but the same 48 kHz. No one gave me a clear explanation of why this is so. But I intuitively understood: this is precisely due to the fact that both audio channels are involved. A signal is transmitted through one channel, say, the first half of the entire spectrum of the review and in the second - the second half. But it is not so! It was known from practice that if one of the two channels that come to the sound card disappears, half of the spectrum does not disappear on the screen, but a “mirror” effect will be observed: the spectrum will acquire symmetry about the center of the entire spectral panorama. And if you change channels in places, the whole spectrum will be mirrored. I found the answers to all the questions myself when I assembled this SDR transceiver. Consider a brief block diagram of the receiving path SDR. And if you change channels in places, the whole spectrum will be mirrored. I found the answers to all the questions myself when I assembled this SDR transceiver. Consider a brief block diagram of the receiving path SDR. And if you change channels in places, the whole spectrum will be mirrored. I found the answers to all the questions myself when I assembled this SDR transceiver. Consider a brief block diagram of the receiving path SDR.

The scheme is very simple. I paid special attention to the “Divider by 4” node. The fact is that the key mixer works in “dual channel mode”. To select a special stereo signal (it is called the I / Q signal), it is necessary to send two identical signals in frequency from the local oscillator, but out of phase by 90 degrees. The shift is achieved by pre-shaping the frequency by the synthesizer 4 times more and dividing it by 4 using triggers (classic digital microelectronics). It is worth noting that the signal has a sawtooth shape (the comparator is part of the synthesizer), and the key mixer is a regular switch from the field of the same digital logic. Without going into the details of the software and hardware structure of the SDR, I’ll immediately state that the program manages the reorganization of the synthesizer directly (without an intermediate FPGA or MC).

So, I figured out the scheme and software, I designed and configured everything. Then, using Adobe Audition 1.5, I started analyzing a fragment of the I / Q signal that I recorded from the output of my SDR, tuning the frequency of one of the amateur bands somewhere in the middle. The figure shows a screenshot of the program, which shows the phase diagram and the spectral view of the fragment.

Narrow-band stations with a width of approximately 3 kHz can be seen on the spectrum. The left and right channels are identical in appearance, but different in form of the wave, which is confirmed by the phase diagram. At the hearing, both channels sound the same, if you listen to them separately. But while listening at the same time with headphones, you can pay attention to the phase shift. The phase shift value is 90 degrees. One can guess not only from the analysis of the diagram, but also from the analysis of the diagram. Above, I paid attention to the fact that the second channel is formed from the key mixer after the “mixture” of the input signal (from the antenna) with the synthesizer frequency shifted in phase by 90 degrees. However, the right channel is not a direct result of a phase shift of 90 degrees from the left channel (also tested). And even from the point of view of "informatics", in fact, it would be the same signal. And the above was concluded

Watching the panorama of the radio broadcast and at the same time the I / Q spectrum of the signal in Adobe Audition in audio recording mode, I managed to understand that visually the spectrum of each channel is a “convolution” of the entire spectrum of radio broadcast relative to the center. Further experiments in Adobe Audition with a phase shift of 90 degrees and various combinations of the summation and subtraction of the channels helped me to understand everything. Empirically confirmed the next thought. The “I” (left channel) signal is the sum (mix) of two signals: the signal responsible for the left half of the ether spectrum, and the signal, but shifted by 90 degrees, responsible for the right half of the ether spectrum. The signal “Q” (of the right channel) is the sum (mix) of two signals: the signal responsible for the right half of the ether spectrum, and the signal, but shifted by 90 degrees, responsible for the left half of the spectrum of the ether. Inverse dependencies are also very similar. I will show these transformations abstractly using mathematical formulas.

Let two different signals be given

Denote$$ signal shifted by $$, and

For the operator$$ shift on $$The following obvious properties are characteristic:

1. Consistent application of the shift operator$$ times at the corners $$ gives an angle shift $$equal to the sum of the above angles:

2. Amplitude of any signal $$ at $$ times can be changed before or after operator primpeniya $$, while the result does not change:

3. The result of the shift signal $$equal to the sum $$ pieces of signals $$on the corner $$ equal to the sum of the results of the shift at the same angle of the above signals:

4. Signal $$phase shifted by $$ gives the "antiphase" of the original signal:

According to my statement

From this view, you can uniquely extract signals. $$ and $$ like this:

Similarly for $$:

Now let's try to test the formulas in practice using Adobe Audition. In fact, there are many more convenient programs for modeling signals, ranging from MatLab, but I work precisely in Adobe Audition. We will work with a fragment of the I / Q signal, the form of which was depicted in the screenshot above. It is required from this signal according to the formulas to distinguish the signal L, which corresponds to the left half of the spectrum in the SDR panorama, and the signal R for the right half. This can be done in many ways, but I will consider one of them.

First you need to save separately the signal I and the signal Q (the left and right channels as two mono) in the files “i.wav” and “q.wav”, respectively. Then, on each of the saved files, perform a phase shift operation of 90 degrees. This is done using the “Graphical Phase Shift” effect in the “Filters” section. Select the preset “+90 Degrees” from the list and use it.

In fact, in general, you can manually set the frequency-phase characteristic using the graph, because the processing is based on direct and inverse FFT. But in this case it is not necessary, since a shift of 90 degrees to all frequency components is required. After applying the effect, we save the result in separate files with the names “i90.wav” and “q90.wav”. Then in the “Multitrek” mode of operation we collect the stereo mix, according to formulas (1) and (2). In the left channel - the first formula, and in the right - the second. There are two terms in the formula, the second with a negative sign. The first track is the first term in the first formula. There we place the corresponding signal, more precisely, the file (“i.wav”). The second track is the second term of the first formula (“q90.wav”). But it still needs to “hang” the inversion effect. This can be done using the Channel Mixer effect and set it up as shown in the picture. Both tracks are fully output to the left channel. Similarly for the third and fourth tracks (the second formula). The coefficient 1/2 in the formulas can be neglected, the samples and so quiet. If you need to take it into account, you need to set the volume of each track to -6 dB.

After exporting the mix, a new file will be created, the spectrum of which is shown in the figure below.

The left channel of this file represents the signal that corresponds to the left half of the spectrum of the radio broadcast panorama. Right - the same. In the picture, it is visually seen from the spectrum that the channels are different up to a small “SLR”, which in my case is caused by certain technical nuances.

Thus, any two signals using the above formulas can be “folded” into the I / Q representation and “expanded” back.

All the above thoughts have the right to exist, but in fact everything is much simpler (or more complicated). Later, I found out the facts that are obvious today: the I / Q signal is something else than an ordinary complex signal with a real and imaginary component. The synthesizer in the SDR transceiver unit, issuing a pair of signals together with a divider, can be called a complex local oscillator. The spectrum of the complex I / Q signal that arrives at the sound card, oddly enough, has a negative component. At a sampling frequency of 48 kHz, the signal bandwidth will be from -24 to 24 kHz. The L signal, which I extracted from I / Q, is the signal for the negative part of the spectrum of the I / Q signal, and the R signal is for the positive part.

In practice, it is much more interesting to get from the I / Q signal not a couple of signals (in halves), as I did earlier, but a signal with the same 48 kHz band, but so that the spectrum lies completely in the positive frequency range (shift the spectrum to the right by 24 kHz) . Such a signal will be at a sampling rate of 96 kHz. To obtain such a signal using Adobe Audition, you must perform a quadrature modulation operation, according to a known algorithm. This operation is inverse to the quadrature detection operation, which just happens in the SDR path of the receiver at the hardware level, “shifting” the entire spectrum of the radio broadcast to the left by the local oscillator frequency.

Let's try doing quadrature modulation in Adobe Audition, guided by the well-known flowchart below.

I will describe the shortly done actions. First, for formality, the source file must be upsamplified from 48 to 96 kHz (although, in fact, this procedure is optional). Then it is necessary in an empty file (with a sampling frequency of 96 kHz) to generate a 24 kHz sinusoidal tone at full volume that is as long as the original I / Q signal fragment. This will be a sine signal.

In the same way, we create a tone in the second new file, but only change the “Start Phase” parameter from 0 to 90. This will create a cosine signal. According to the flowchart, it is necessary to multiply in pairs the sine signal with the “Q” component and the cosine signal with the “I” component, then the results are added. First, copy the “Q” component (right channel) from the original I / Q signal to the clipboard. Then we will use the function from the “Edit” menu “Mix insert with“ Modulation ”,“ From buffer 1 ”parameters, pre-selecting the entire wave area with sine.

After clicking on the “OK” button, the clipboard signal will multiply with the selected signal. The result of multiplication will replace the sine signal. We perform similar operations for the cosine signal and the “Q” channel. Then the resulting results are mixed in the "Multitrek" mode and immediately export the mix to "mono". The result is a signal whose spectrum is shown in the figure below.

This is exactly the image of the same spectrum, which is drawn on the SDR panorama. With all the operations in Adobe Audition given in this article, it is possible to select any narrow-band radio station from an I / Q record. In some cases, it may be necessary to slightly modify the above operation (if it is necessary to turn the spectrum upside down). Plus, you need a bandpass filter, AGC, and other effects as needed.

In conclusion, it is worth noting a few points regarding SDR technology. At present, SDR with “direct digitization” of the entire radio frequency band (directly from the antenna input) up to several gigahertz exist and is quite accessible. It is much more interesting and perfect. The SDR through the sound card is already “past century”. In addition, such topics as “DVB tuner as an SDR receiver”, “SDR online” are the most popular topics. Surely most modern readers who have heard at least something about SDR will mean exactly that. But this is a completely different subject.

After some time, I managed to assemble my own SDR transceiver using one of the schemes provided to me. There were two schemes in total. In one circuit, a generator with switchable quartz to the desired amateur radio frequency band served as a reference frequency, and the tuning was performed programmatically. The second circuit contained a DDS synthesizer, which is able to generate any frequency (within its limits), which is set from the computer by the control program. It is possible to rebuild both software and hardware. I chose the second scheme. The management program is very sophisticated. First of all, it allows you not only to hear the station and see its spectrum, but also to see the whole spectrum of the broadband signal that comes to the sound card. Moreover, it is possible with the help of a mouse to instantly rebuild a station whose spectrum is visible on the screen. This is one of the key features of SDR. At one of the radio amateurs, who collected the same scheme before me, I fully observed how it all works in practice. The first thing that surprised me was that both channels were involved in the sound card: L and R. It would seem, and where is the stereo? This is now, I clearly understand everything, but at the time when the Internet in the ordinary homes of provincial cities were in their infancy, there was practically no detailed technical information. In addition, with a 48 kHz sampling rate of the sound card, the width of the review is not 24 (as I thought, according to the Kotelnikov theorem), but the same 48 kHz. No one gave me a clear explanation of why this is so. But I intuitively understood: this is precisely due to the fact that both audio channels are involved. A signal is transmitted through one channel, say, the first half of the entire spectrum of the review and in the second - the second half. But it is not so! It was known from practice that if one of the two channels that come to the sound card disappears, half of the spectrum does not disappear on the screen, but a “mirror” effect will be observed: the spectrum will acquire symmetry about the center of the entire spectral panorama. And if you change channels in places, the whole spectrum will be mirrored. I found the answers to all the questions myself when I assembled this SDR transceiver. Consider a brief block diagram of the receiving path SDR. And if you change channels in places, the whole spectrum will be mirrored. I found the answers to all the questions myself when I assembled this SDR transceiver. Consider a brief block diagram of the receiving path SDR. And if you change channels in places, the whole spectrum will be mirrored. I found the answers to all the questions myself when I assembled this SDR transceiver. Consider a brief block diagram of the receiving path SDR.

The scheme is very simple. I paid special attention to the “Divider by 4” node. The fact is that the key mixer works in “dual channel mode”. To select a special stereo signal (it is called the I / Q signal), it is necessary to send two identical signals in frequency from the local oscillator, but out of phase by 90 degrees. The shift is achieved by pre-shaping the frequency by the synthesizer 4 times more and dividing it by 4 using triggers (classic digital microelectronics). It is worth noting that the signal has a sawtooth shape (the comparator is part of the synthesizer), and the key mixer is a regular switch from the field of the same digital logic. Without going into the details of the software and hardware structure of the SDR, I’ll immediately state that the program manages the reorganization of the synthesizer directly (without an intermediate FPGA or MC).

So, I figured out the scheme and software, I designed and configured everything. Then, using Adobe Audition 1.5, I started analyzing a fragment of the I / Q signal that I recorded from the output of my SDR, tuning the frequency of one of the amateur bands somewhere in the middle. The figure shows a screenshot of the program, which shows the phase diagram and the spectral view of the fragment.

Narrow-band stations with a width of approximately 3 kHz can be seen on the spectrum. The left and right channels are identical in appearance, but different in form of the wave, which is confirmed by the phase diagram. At the hearing, both channels sound the same, if you listen to them separately. But while listening at the same time with headphones, you can pay attention to the phase shift. The phase shift value is 90 degrees. One can guess not only from the analysis of the diagram, but also from the analysis of the diagram. Above, I paid attention to the fact that the second channel is formed from the key mixer after the “mixture” of the input signal (from the antenna) with the synthesizer frequency shifted in phase by 90 degrees. However, the right channel is not a direct result of a phase shift of 90 degrees from the left channel (also tested). And even from the point of view of "informatics", in fact, it would be the same signal. And the above was concluded

Watching the panorama of the radio broadcast and at the same time the I / Q spectrum of the signal in Adobe Audition in audio recording mode, I managed to understand that visually the spectrum of each channel is a “convolution” of the entire spectrum of radio broadcast relative to the center. Further experiments in Adobe Audition with a phase shift of 90 degrees and various combinations of the summation and subtraction of the channels helped me to understand everything. Empirically confirmed the next thought. The “I” (left channel) signal is the sum (mix) of two signals: the signal responsible for the left half of the ether spectrum, and the signal, but shifted by 90 degrees, responsible for the right half of the ether spectrum. The signal “Q” (of the right channel) is the sum (mix) of two signals: the signal responsible for the right half of the ether spectrum, and the signal, but shifted by 90 degrees, responsible for the left half of the spectrum of the ether. Inverse dependencies are also very similar. I will show these transformations abstractly using mathematical formulas.

Let two different signals be given

$$

They represent signals, respectively, for the left and for the right half of the spectrum of the entire panorama, as mentioned above. In order not to pile on the formulas, in the following we will designate all signals without the time argument.$$.Denote$$ signal shifted by $$, and

$$

Similarly$$

Where $$ - the operator of the signal phase shift $$.For the operator$$ shift on $$The following obvious properties are characteristic:

1. Consistent application of the shift operator$$ times at the corners $$ gives an angle shift $$equal to the sum of the above angles:

$$

2. Amplitude of any signal $$ at $$ times can be changed before or after operator primpeniya $$, while the result does not change:

$$

3. The result of the shift signal $$equal to the sum $$ pieces of signals $$on the corner $$ equal to the sum of the results of the shift at the same angle of the above signals:

$$

4. Signal $$phase shifted by $$ gives the "antiphase" of the original signal:

$$

According to my statement

$$

$$

From this view, you can uniquely extract signals. $$ and $$ like this:

$$

$$

Proving these formulas using the properties listed above is not difficult.$$

$$

$$

Similarly for $$:

$$

$$

$$

Now let's try to test the formulas in practice using Adobe Audition. In fact, there are many more convenient programs for modeling signals, ranging from MatLab, but I work precisely in Adobe Audition. We will work with a fragment of the I / Q signal, the form of which was depicted in the screenshot above. It is required from this signal according to the formulas to distinguish the signal L, which corresponds to the left half of the spectrum in the SDR panorama, and the signal R for the right half. This can be done in many ways, but I will consider one of them.

First you need to save separately the signal I and the signal Q (the left and right channels as two mono) in the files “i.wav” and “q.wav”, respectively. Then, on each of the saved files, perform a phase shift operation of 90 degrees. This is done using the “Graphical Phase Shift” effect in the “Filters” section. Select the preset “+90 Degrees” from the list and use it.

In fact, in general, you can manually set the frequency-phase characteristic using the graph, because the processing is based on direct and inverse FFT. But in this case it is not necessary, since a shift of 90 degrees to all frequency components is required. After applying the effect, we save the result in separate files with the names “i90.wav” and “q90.wav”. Then in the “Multitrek” mode of operation we collect the stereo mix, according to formulas (1) and (2). In the left channel - the first formula, and in the right - the second. There are two terms in the formula, the second with a negative sign. The first track is the first term in the first formula. There we place the corresponding signal, more precisely, the file (“i.wav”). The second track is the second term of the first formula (“q90.wav”). But it still needs to “hang” the inversion effect. This can be done using the Channel Mixer effect and set it up as shown in the picture. Both tracks are fully output to the left channel. Similarly for the third and fourth tracks (the second formula). The coefficient 1/2 in the formulas can be neglected, the samples and so quiet. If you need to take it into account, you need to set the volume of each track to -6 dB.

After exporting the mix, a new file will be created, the spectrum of which is shown in the figure below.

The left channel of this file represents the signal that corresponds to the left half of the spectrum of the radio broadcast panorama. Right - the same. In the picture, it is visually seen from the spectrum that the channels are different up to a small “SLR”, which in my case is caused by certain technical nuances.

Thus, any two signals using the above formulas can be “folded” into the I / Q representation and “expanded” back.

All the above thoughts have the right to exist, but in fact everything is much simpler (or more complicated). Later, I found out the facts that are obvious today: the I / Q signal is something else than an ordinary complex signal with a real and imaginary component. The synthesizer in the SDR transceiver unit, issuing a pair of signals together with a divider, can be called a complex local oscillator. The spectrum of the complex I / Q signal that arrives at the sound card, oddly enough, has a negative component. At a sampling frequency of 48 kHz, the signal bandwidth will be from -24 to 24 kHz. The L signal, which I extracted from I / Q, is the signal for the negative part of the spectrum of the I / Q signal, and the R signal is for the positive part.

In practice, it is much more interesting to get from the I / Q signal not a couple of signals (in halves), as I did earlier, but a signal with the same 48 kHz band, but so that the spectrum lies completely in the positive frequency range (shift the spectrum to the right by 24 kHz) . Such a signal will be at a sampling rate of 96 kHz. To obtain such a signal using Adobe Audition, you must perform a quadrature modulation operation, according to a known algorithm. This operation is inverse to the quadrature detection operation, which just happens in the SDR path of the receiver at the hardware level, “shifting” the entire spectrum of the radio broadcast to the left by the local oscillator frequency.

Let's try doing quadrature modulation in Adobe Audition, guided by the well-known flowchart below.

I will describe the shortly done actions. First, for formality, the source file must be upsamplified from 48 to 96 kHz (although, in fact, this procedure is optional). Then it is necessary in an empty file (with a sampling frequency of 96 kHz) to generate a 24 kHz sinusoidal tone at full volume that is as long as the original I / Q signal fragment. This will be a sine signal.

In the same way, we create a tone in the second new file, but only change the “Start Phase” parameter from 0 to 90. This will create a cosine signal. According to the flowchart, it is necessary to multiply in pairs the sine signal with the “Q” component and the cosine signal with the “I” component, then the results are added. First, copy the “Q” component (right channel) from the original I / Q signal to the clipboard. Then we will use the function from the “Edit” menu “Mix insert with“ Modulation ”,“ From buffer 1 ”parameters, pre-selecting the entire wave area with sine.

After clicking on the “OK” button, the clipboard signal will multiply with the selected signal. The result of multiplication will replace the sine signal. We perform similar operations for the cosine signal and the “Q” channel. Then the resulting results are mixed in the "Multitrek" mode and immediately export the mix to "mono". The result is a signal whose spectrum is shown in the figure below.

This is exactly the image of the same spectrum, which is drawn on the SDR panorama. With all the operations in Adobe Audition given in this article, it is possible to select any narrow-band radio station from an I / Q record. In some cases, it may be necessary to slightly modify the above operation (if it is necessary to turn the spectrum upside down). Plus, you need a bandpass filter, AGC, and other effects as needed.

In conclusion, it is worth noting a few points regarding SDR technology. At present, SDR with “direct digitization” of the entire radio frequency band (directly from the antenna input) up to several gigahertz exist and is quite accessible. It is much more interesting and perfect. The SDR through the sound card is already “past century”. In addition, such topics as “DVB tuner as an SDR receiver”, “SDR online” are the most popular topics. Surely most modern readers who have heard at least something about SDR will mean exactly that. But this is a completely different subject.