I/Q data shows the changes in magnitude (or amplitude) and phase of a sine wave. If amplitude and phase changes occur in an orderly, predetermined fashion, you can use these amplitude and phase changes to encode information upon a sine wave, a process known as modulation.
Modulation changes a higher frequency carrier signal in proportion to a lower frequency message, or information, signal. I/Q data is highly prevalent in RF communications systems, and more generally in signal modulation, because it is a convenient way to modulate signals.
Any sine wave can reperesneted as a complex function.So we can used data of phase and amplitude in our modulation simulatenously that is called I/Q Modulation.
Fig1:Block diagram I/Q modulation
So we convert our raw data to phase and quadratue that can be showed in a complex plane.For sendng data in SDR we used a I/Q format that we can call it complex format. In other words if you study electromagnetic fields course you can see wave equation is in complex.So in SDR we convert data data digital in our DSP (computer that gnuradio run is on it) to complex data. you can see output of osmocom source in gnuradio is set to comlex type;
Fig2:osmocom source in gnuradio
How i can capture I/Q file?
you can easy capture I/Q file in SDR# ,GQRX,Gnuradio In this blog post i prefer used GQRX I/Q capture file you can see in below video.
The file I/Q that i capture shared here.
For see more data a good tool is for seeing phase and quadrartue is iq.you can see snapshot of it,it is opensource under license MIT.
Fig3:snapshot of iq software
IQ file is raw data in SDR, every signal that we capture with a centeral frequency and a bandwidth.The IQ file has large volume , when you start capturing I/Q recording data with bandwidth 5MB and 30 second long time it can exceed more than 1GB.
Converting IQ File :
There is a tool SoX can covert IQ file to wav. you can uses this to convert iq file to wav format.you can capture iq file in RTL-SDR with this command.
rtl_sdr -f 94900000 -s 1024000 -g 50 iq.raw
Now you can convert the above to 96k 16bit wav format with below:
sox -e unsigned-integer -r 1024k -t raw -b 8 -c 2 iq.raw -r 96k -b 16 iq.wav
SoX handles the following audio file formats:It even support effect audio, you can see more on here link
- Raw files in various binary formats
- Raw textual data
- Amiga 8svx files
- Apple/SGI AIFF files
- SUN .au files
- PCM, u-law, A-law
- G7xx ADPCM files (read only)
- mutant DEC .au files
- NeXT .snd files
- AVR files
- CDDA (Compact Disc Digital Audio format)
- CVS and VMS files (continuous variable slope)
- Grandstream ring-tone files
- GSM files
- HTK files
- LPC-10 files
- Macintosh HCOM files
- Amiga MAUD files
- AMR-WB & AMR-NB (with optional libamrwb & libamrnb libraries)
- MP2/MP3 (with optional libmad, libtwolame and libmp3lame libraries)
- MP4, AAC, AC3, WAVPACK, AMR-NB files (with optional ffmpeg library)
- AVI, WMV, Ogg Theora, MPEG video files (with optional ffmpeg library)
Now we now every signal I/Q can have a modulation like AM,FM,PM or Digital FSK,ASK,PSK,GFSK os for playing them we should demulate them first and we can play them easily.Gnuradio is the tool that used it is great , it support most of modulaton communication.