Adam is always on the lookout for good, low-cost tools that make prototyping easier. GNU Octave is one of them.
Finding the best way to process your data can be complicated. I recently became involved in a project where I needed to filter out data from an RF signal. Because I am not an RF designer with years of experience, I actually had to do a bit of reinventing the wheel. With a recording of data in hand, one option was to try and feed that data into a microcontroller, write up some test code, and then analyze the results. Another option was to use GNU Octave.
GNU Octave is a MATLAB-type environment that allows for numerical simulation. Information about the history of GNU Octave can be found here. MATLAB is an interpreted language that is coupled with the program by the same name. The main difference between MATLAB and GNU Octave is that MATLAB costs many thousands of dollars, whereas GNU Octave is an open-source program.
GNU Octave comes in a few flavors. First there is a console-based version, which lacks any GUI control or code editor. There is also a new GUI version that attempts to give the tool a similar look and feel as the MATLAB environment. Up until recently, GNU Octave was primarily compiled for Linux-based distributions. There were a few Windows-based distributions, but most of these do not work well under the GUI mode (the console mode works well). The best version that I have found for Windows is a project by Assistant Professor Israel Herraiz of the Polytechnic University of Madrid. This version of GNU Octave, which is called Octave UPM, can be downloaded from here. Do not worry that the page is in Spanish -- you should still be able to navigate to the download easily.
Now that we know where to get GNU Octave for our favorite operating system, what can we do with it? The list of things is actually rather extensive. I was first introduced to the MATLAB language when I was in college. We used it to perform iterations for a design project. Now I use it for designing filters and then passing data through the filter to see the result. GNU Octave has many specialized packages with library functions that are very useful. The functions for each of these packages are well documented. Once you have loaded a specific package, all you need to do is type, "help 'function_name'" and you will be presented with the documentation for that function.
For my current project, I am using the Standard Package as well as the Signal Package to take data that has been recorded as a *.wav file, import it, and manipulate it. I then choose the samples that I want to analyze. From there, I can then take that data and plot the results with a simple line of code. Thus far, to achieve all of this I have needed to use only three lines of code. What if I want to use a Butterworth filter? Typing in (after having loaded the Signal Package) "help 'butter'" brings up seven different options for the Butterworth filter function. In this case I want to choose the appropriate method for a band-pass Butterworth filter with a low cutoff of 4,500 to 5,500 Hz. What if I want to test a Chebyshev filter? That is covered too. In fact, there are five different functions for this, each with a different method.
Do I have to learn another language to use this? The MATLAB programming language is not that difficult to learn. In fact, this was my first exposure to programming. It is an interpreted language, and hence it can be slow to run for very large programs. Because of its popularity in universities, there are many tutorials and books on how to program in MATLAB. I am not an expert in this language, but it has not been very hard to get back into using it after being away for about seven years. I am still a little rusty, but it is coming back. For example, to read the read the wave file, filter it for the appropriate band-pass, and then plot the results, the only code that was required was as follows:
This is the beauty of the MATLAB language -- it is a very efficient language to accomplish small tasks like this one quickly. This has allowed me to experiment very rapidly with my data and then decide on the best method to use. In a matter of an hour, I was able to analyze the data and test a few different methods for my project.
I am always on the lookout for good, low-cost tools that make prototyping easier. GNU Octave is one of them. Do you have any favorites that you would like to pass along?