As some of you may know, GNU Radio is a free and open-source software development toolkit that provides signal processing blocks for software-defined radios (SDR). It can be used as a simulation tool or as part of a real-time processing system when combined with external SDR platforms like Nutaq’s PicoSDR or ZeptoSDR. The main signal processing resource of these SDR platforms is FPGAs, which are very good at handling high sampling rate waveforms. However, there are some specific tasks where you want to simply call the atan function to get the phase of your complex signal, for example. In an FPGA, you need to implement the CORDIC algorithm to iteratively rotate your complex signal until you get an approximation of that phase. It’s definitely doable and easy to implement and simulate with the System Generator blockset but it will never be as fast or as easy as calling MATLAB’s atan function.
Like many of you, I’m a MATLAB kind of guy. Many of us use this software for our studies and thesis projects. The software isn’t meant to process data in real-time. It’s more than adequate, however, for quick prototyping and offline processing using recorded test vectors. So, when I learned about GNU Radio, I was happy to see that I wasn’t the only one searching for such a solution. I only know the bare minimum in regards to the Linux operating system but once GNU Radio is set up, playing with its blocks is a lot of fun (for installation instructions, see http://gnuradio.org/redmine/projects/gnuradio/wiki/InstallingGR). With Nutaq’s GNU Radio plug-in for the PicoSDR and ZeptoSDR platforms, all the tools are there to provide infinite possibilities.
All this being said, in reality, it’s not so simple. The GNU Radio community is small (which means limited support) and I rapidly faced a wall: its limited blockset. These two issues take us far away from a MATLAB/Simulink-style arrangement, but there is a solution! If there isn’t a block that suits your needs, you can create your own! There is a very good tutorial on the GNU Radio website (http://gnuradio.org/redmine/projects/gnuradio/wiki/OutOfTreeModules) that explains the exact steps required to create your own blocks. The beauty of this approach is two-fold: you can use either C++ or Python to program the behaviour of your custom block.
I was intimated at first because I don’t know Python and my C++ skills are very rusty. Still, I gave it a try, as my personal project is concerned with direction of arrival (DOA), which is a very good example of application that is much easier to do outside of an FPGA in MATLAB/C++/Python). Near the end of the tutorial, something caught my eye:
In the Python version of the tutorial, a library named NumPy is called. I went on the web to find out more about this library and its functions (http://wiki.scipy.org/NumPy_for_Matlab_Users). This is where I found the NumPy for MATLAB user’s page. It was quite the revelation! Go through this page yourself, and your conclusion will probably be the same as mine: it’s MATLAB for Python!
Pretty much every MATLAB command has an equivalent in NumPy. Also, the library is free, it’s automatically installed with GNU Radio and Python (Windows or Linux), and the community is much larger than GNU Radio alone.
I’m very excited to learn Python/NumPy and, even if I’m still at the tutorial level, mastering this approach will enhance GNU Radio with infinite possibilities. I will document my advancements regarding my DOA project with Nutaq solutions in subsequent posts, so stay tuned!