2012 International Conference on Advances in Computing and Communications
GNU RADIO BASED CONTROL SYSTEM Anand R, Gintu Xavier, Hariharan V, Neethu Prasannan, Rakesh Peter, Soman K.P Centre For Excellence in Computational Engineering and Networking Amrita Vishwa Vidyapeetham Coimbatore-641112,India
[email protected] [email protected]
Abstract—This paper is an attempt to reveal the untapped immense power of the GNU Radio - an open source software, in control and monitoring systems, both real time applications and class-room demonstrations. GNU Radio has already gained wide acceptance and glory in communication and signal processing. As a novel attempt to bring the controlling capability of GNU Radio to limelight, an experiment for temperature control, out of its innumerable applications, and the possibility of a revolution by this free open source software is predicted and explained through this paper. This paper describes the hardware and software requirements for the temperature control experiment with SBHS (Single Board Heater System) using GNU Radio and describes the recommended classroom demonstration.
C++ software module in the grc-window which can be connected and executed for generating the output. The performance of the system is also analysed by changing the system parameters. II. GNU R ADIO GNU Radio is an open source toolkit for buiding software radios, in which all the signal processing operations can be done by using software. In other words, the same piece of the hardware can be modified to perform different functions at different times, allowing the hardware to be specifically tailored to the application at hand [3].
Keywords-Control system experiments, GNU Radio, SBHS.
I. I NTRODUCTION GNU Radio in communication system is not a new concept, but its application in real time control system and monitoring has not yet been widely experimented with. The non availability of the pre-assembled software building blocks unlike in communication system might be the reason for the lack of interest shown in this field. GNU radio, besides wideband transceiver adoption, goes further, introducing the possibility to reprogram the entire system which can be utilized for designing any control experiments [4]. We consider this paper as a trigger to set this trend.
GNU radio is an emerging technology, thought to build flexible radio systems, multiservice, multistandard, multiband, reconfgurable and reprogrammable by software [4]. The flexibility of software systems and adaptability to a variable environment will make them mainstream for many different applications. GNU Radio provides a library of signal processing blocks for performing various processes [3]. GNU Radio applications are primarily written using the Python programming language, while the supplied performance-critical signal processing path is implemented in C++ using processor floating-point extensions, where available. Thus, the developer is able to implement real-time, high-throughput radio systems in a simple-to-use, rapidapplication-development environment. It is an attractive platform for communication systems, because of its reconfigurability and multimode operations. Applications of GNU Radio can be extended to control and monitoring systems, if the software is equipped with all possible control blocks.
LabView is the current ‘centrepiece’ for the graphical system design which provide tools to create and deploy measurement and control systems but at the cost of thousands for the simulation software and lakhs for the real time experimenting software. GNU serves the same purpose free of cost, though its performance as of now is not par the LabView [5]. GNU can take-over the current trends, if all the possible and necessary modules for control experiments are made available for the users. This idea itself opens a wide range of experimentation and developmental opportunities to make GNU a complete multipurpose software package.
For communication experiments, GNU Radio with USRP [9] receivers were being used which costs around 1000 dollars. Due to the high cost many students were not able to do real time communication experiments. In recent scenario Realtek RTL2832U has been introduced which makes GNU Radio based receivers available at a affordable cost around
The experiment discussed in this paper can be done by directly installing the python codes from the source repository [1]. This process automatically generates the corresponding 978-0-7695-4723-7/12 $26.00 © 2012 IEEE DOI 10.1109/ICACC.2012.59
259
Fig. 2.
External View
other measurement issues such as noise.
Fig. 1.
The Spoken Tutorial Effort for SBHS is being contributed by Anuradha Amrutkar, Shalini Shrivastava and Rupak Rokade from IIT Bombay. The preliminary work on SBHS was contributed by Inderpreet Arora and Kaushik Venkata Belusonti, former students of IIT Bombay [2].
Single Board Heater System - Block Diagram
20 dollars. With this, one can receive digital TV, audio receiver, GSM and Remote Sensing Satellite signals. So by adding a low power, low cost transmitter one can do wireless communication control experiments using GNU Radio in academic level. It can even be used as a GPS receiver. This is likely to cause a revolution in Communication Engineering Education [8].
V. T EMPERATURE CONTROL AND MONIRORING M ODULE USING GNU R ADIO
OF
SBHS
Out of the innumerable control experiments possible, here we demonstrate the power of GNU Radio through a temperature control experiment, which we conducted using SBHS module. This device aims to serve a small portable lab for an individual or an institute. The application of this device is in the Control Systems area of Engineering. Different types of control experiments like open loop, closed loop, PID controller can be performed on the SBHS device. The user is however expected to have a fair understanding of Control System terminologies, for example Transfer Function.
III. O PEN S OURCE DATA ACQUISITION S YSTEM GNU Radio can be used as an Open Source Data Acquisition System by adding necessary blocks. Blocks can be written either in C++ or Python. These blocks would perform the operation of interacting with the DAQ(Data Acquisition) device and setting the control parameters. Once set, the values retrieved from the device can be plotted using necessary sink.
VI. E XPERIMENTAL SETUP Prior to performing the experiment in GNU Radio, certain software packages are mandatory. The installation of repository software pacakages requires utmost care for the proper functioning. The basic steps required to implement SBHS in GNU Radio are
IV. S INGLE B OARD H EATER S YSTEM A single-board heater system is a low cost, open source, lab-in-a-box setup [6]. It consists of a heater assembly, fan, temperature sensor, ATmega16 microcontroller and associated circuitry. A block diagram representation of the same is shown in Fig.1. A stainless steel blade whose temperature has to be controlled serves as the plant. Nichrome helical coil with 20 turns kept at a small distance from the steel blade, acts as the heater element. AD590, a monolithic integrated circuit temperature transducer, is soldered beneath the steel plate. A computer fan, a low cost and commercially off the shelf component, is used to cool the plate from below [7].
1.
Installing GNU Radio Since it is an open source, the best and easiest way to get GNU Radio software is to install it directly from source. GNU Radio is designed and tested well in Linux operating system. Fedora and Mandrake seem to work best at this point. While installing Linux, care has to be taken to include the development tools and the x-window tools, which makes the installation much easier. Complete installation of Linux is a good option for beginners.
The plant has a small time constant, less than a minute, that allows completion of an experiment in a short time. This in turn facilitates performance of a large number of experiments in a single laboratory session. The speed of response not being too fast allows the measurements to be seen with naked eye, as it happens in industrial systems. It also demonstrates
2.
260
Installing SBHS Module in GNU Radio
B. Plot Sink
Once the GNU Radio is installed, the preassembled blocks are available on the GRC window. For our experiment purpose the required blocks are not available. To access SBHS control kit using GNU Radio, install SBHS module and plot sink module [1].
Plot sink reads the samples from the SBHS block and gives the graphical representation of heater temperature and fan speed. ‘Decimation’ and ‘vec length’ are the parameters inside the plot sink block. In the output we can see the variation of heater current with fan speed. The output is obtained as a continuous waveform. The manual option provides an opportunity to interpret the waveform at a particular instant of time by freezing the frame.
Matplotlib based Plotting module for GNU Radio requires: matplotlib, wxpython, numpy, pylab. matplotsink˙py - Matplotlib WxPython wrapper library (Eli Bendersky). plot sink.py - Python hierarchical interfacing Matplotlib with GR.
block
for
plot sink.xml - GRC XML for Plotsink block.
VII. B LOCK PARAMETERS The SBHS Source block interfaces with SBHS module. The two inputs to this block are heater current and fan speed and the output is Heater Temperature. We can change the parameters of the block as per our requirement. A. SBHS Soure Block
Fig. 4.
Plot Sink Block
VIII. E XPERIMENTAL D EMONSTRATION AND R ESULTS
Fig. 3.
Fig. 5.
SBHS Soure Block
The SBHS module is connected to PC via USB. Then the GRC window is opened and SBHS Source with Plot Sink is connected to it. Two variable block is connected to the system to vary fan speed and heater temperature. The output plot is obtained after execution of the program. The performance of the system can be experimented by varying fan speed and
Various parameters inside SBHS block are 1. 2. 3.
Experimental set-up
Sample Rate :Number of data plotted per second Fan Speed :The speed of fan in SBHS Heater Temperature :The temperature of heater in SBHS
261
heater temperature. IX. R ESULTS The implementation of Single Board heater System Experiment done using GNU Radio is shown in Fig.6. Also Fig.7 gives the resultant output plot showing the variation of heater temperature versus the fan speed. A GUI is provided in order to vary the heater temperature and the fan speed. As the heater temperature increases the temperature of the SBHS system also increases gradually. The temperature of the system can be reduced by varying the fan speed with the aid of GUI. From this experiment it can be noticed that temperature of the system and the heater temperature follows a direct relationship whereas the system follows an inverse relationship with the fan speed. Fig. 7.
Output Plot
of performing real time control and monitoring and thereby revolutionizing the existing scenario. R EFERENCES
Fig. 6.
X. C ONCLUSION
[1] “Source code repository”, http://github/r4b10n/, accessed on April 2012. [2] “Spoken Tutorial for Single Board Heater System”, http://spokentutorial.org/wiki/index.php/Single Board Heater System, accessed on April 2012. [3] Jeffrey H. Reed, “Software Radio A Modern Approach to Radio Engineering”, Printice Hall 2005. [4] Enrico Buracchini, “The Software Radio Concept”, IEEE Communications Magazine,2000. [5] Kannan M. Moudgalya, “Identification of transfer function of a single board heater system through step response experiments, 2009. [6] I. Arora, K. M. Moudgalya, and S. Malewar, “A low cost, open source, single-board heater system” in International Conference on E-Learning in Industrial Electronics. AZ, USA: IEEE, November 2010. [7] Kannan M. Moudgalya, Inderpreet Arora, “A Virtual Laboratory for Distance Education”, IEEE, 2010. [8] “USB TV tuners used for SDR”, http://hackaday.com/2012/04/13/thoseusb-tv-tuners-used-for-sdr-can-also-grab-gps-data/, accessed on May 2012. [9] “Universal Software Radio Peripheral”, http://en.wikipedia.org/wiki/Universal Software Radio Peripheral, accessed on April 2012.
GRC Block
AND
F UTURE W ORK
The SBHS-based temperature control is one possible labin-a-box setup for temperature control. This experiment successfully controls the temperature of the SBHS system, but the fan needs to be operated manually. The system can be made as a closed loop, that is, for the given temperature profile, the heater temperature and the fan speed can be automated. Other possible future work includes development of low-cost lab-in-a-box type hardware setup for performing classroom demonstrations for various other control experiments and generating python codes for the same. Frequency response of the system for various signals could be analyzed using GNU Radio. Creating a repository of preassembled software control blocks to make GNU Radio a fully fledged control and monitoring software package can also be taken up as a challenging future work. This is expected to make GNU Radio an efficient open source data acquisition system capable
262