1 Introduction

In health wireless communications, often patients who need critical care are getting limited medical access and thus timely help is denied to such patients. In such cases wireless sensors come to much needed help and patients are connected to health monitor system and all the critical medical parameters can be checked continuously by connecting them to the Wi-Fi system that is present in the hospital premises and proper medical care can be given. In this particular scenario, cognitive radio hardware is of great help which allows heterogeneous communication. The CRN system designed in this work uses D2V algorithm to sense the users who are following different protocols and are allotted channels and their temperature is monitored. Thus our health monitoring system is of great importance under which no patient is denied the necessary medical care.

The different protocols considered are Bluetooth and Xbee. In the proposed method, the users are considered to be dynamic and designed in such a way that the system keeps track of the distance from the user to the cognitive base station. A threshold distance is set and only when the user reaches the distance, the user starts to sense and transmit its data. Hence the user utilizes the spectrum only when it is present in the specified threshold range and when it leaves the range, that particular band becomes vacant. Such vacant bands are called as spectrum holes and could be assigned to the other users.

Hence implementing the CR in this mechanism, results in control of Transmit power which increases the CR network lifetime, Packet Delivery Ratio (PDR) with improved performance. This is a novel idea in implementing CR concept and implementing the same by designing hardware makes it more innovative, as there are very few CR hardware platforms designed and implemented in the world today. The system has many practical applications such as energy management, process and industry automation, wireless sensor networks etc. In our work, one such application called Hospital Management System is considered and implemented using our Test bed in our Lab.

Resource allocation method in OFDM-based CR Networks is studied in [1]. Biomedical signals are transmitted in telemedicine systems primarily using Bluetooth, ZigBee, and other wireless standards [25]. Performance of heterogeneous cognitive radio sensor networks through RoF-MIMO technologies is analysed in [6]. A comparative study of wireless protocols: Bluetooth, UWB, ZigBee and Wi-Fi are carried out in [7]. Service discovery and device identification in cognitive radio networks using GNU radio and Universal Software Radio Peripheral (USRP) platform has been carried out in [8]. Wi-Fi whitespace has been exploited for ZigBee performance assurance in [9]. Cognitive radio enabled vehicular communications in heterogeneous networks is implemented in [10]. Problems related to transmission power control in cognitive radio networks are studied in [11]. Algorithm for opportunistic spectrum sharing with multiple co channel primary transmitters has been developed in [12]. Probabilistic resource allocation for opportunistic spectrum access has been carried out in [13]. A novel method of distributed spectrum aware clustering in cognitive radio sensor networks has been carried out in [14]. In [15], localisation and privacy preservation in cognitive radio networks has been studied.

Authors in [16] proposed a test bed which focuses on demonstrating the dynamic spectrum access and modulation adaptation parameters. However, they do not address the location information utilization. Also, the cognitive engine of the test bed lacks any spectrum prediction technique. Additionally, none of the WSN features could be emulated in this test bed configuration. Authors in [17] have developed a very elegant test bed which is capable of demonstrating almost all the cognitive radio functionalities. However, it does not use location information, multi-hop communication and clustering which are significant features of a WSN. Moreover, it is difficult to emulate the sensor mobility in the bulky platform. Authors in [18] have discussed another elegant architecture of cognitive radio test bed and its functionalities, but it is not suitable for demonstrating the basic functionalities of a WSN with cognitive capabilities. Authors in [19] discuss a cognitive radio test bed which is the closest in emulating sensor network functionalities. However, it lacks location information to demonstrate the localization and clustering phenomena of WSN.

2 The Proposed System for Medical Applications

One of the important applications of cognitive radio networks is in the field of Healthcare services. CRN hardware has been designed and presented in this paper for Hospital Management System. In a real time scenario, both primary and secondary users coexist and the proposed system utilises the spectrum for both the users based on their distance from the hardware. A novel method of D2V (Dynamic Distance Vector) Algorithm is proposed in this paper and the same has been implemented in the CRN hardware (Bio Cog). The base station in the Bio Cog hardware transmits the beacon signal, which is detected by the users. Depending on the Received Signal Strength Indicator (RSSI), the system calculates the distance at which the user is located and frequency band is allocated accordingly. Further using D2V algorithm, power allocation is also determined by the system, i.e. nearby user needs to transmit less power and user away from the base station needs to transmit more power. Thus the power is optimally utilised by all the users and thus capacity of the system is enhanced.

2.1 Bio Cog

A Cognitive Network Hardware (CNH) for the Biological signal transmission has been designed for serving two applications which are as follows:

  • Spectrum sensing—an efficient usage of the spectrum for the medical applications.

  • Energy efficiency among the user devices and the cognitive network devices (CRD).

The Bio Cog hardware is useful for the Hospital Management System in such a way that the spectrum sensing/spectrum allocation will take place without changing the infrastructure networks already implemented in the hospitals.

Consider the heterogeneous networks incorporated in the hospital, i.e. Wi-Fi and Bluetooth has been utilized in the hospitals for the data transmission. Implementing the Bio Cog Hardware uses the spectrum of the existing protocols even though the medical devices are working with the different protocols i.e. Wi-Fi, Bluetooth, XBee protocols, etc. Implementing this hardware does not require any infrastructure changes. It can allocate the frequency spectrum for the heterogeneous networks with the advantage of increase in efficiency and energy less mechanisms.

2.2 Spectrum Sensing Mechanism in CR

There are various spectrum sensing techniques available for cognitive hardware networks. The methods which are available are mentioned as follows:

  • Matched filter detection

  • Cyclo-stationary feature detection

  • Energy detection

  • FFT method

Bio Cog network presented in this paper, uses the D2V algorithm which can allocate the frequency bands depending on the distance of the users from the cognitive radio base station. This algorithm saves the energy of the end user device and also the cognitive network hardware (Bio Cog) devices.

2.3 Sensing Mechanisms in the Cognitive Hardware

Each user needs to send data in this frame format as shown in Table 1:

Table 1 User data frame format

The components of data frame format are:

  • Device ID: Device name

  • SA: Source address

  • RSSI: Received signal strength indicator

  • Power: Power allocation

  • Channel: Channel allocation

  • ADC: Sensor values from users

  • DA: Destination address

Each user will send the data in this frame format which is sensed by the cognitive hardware and frequency is allocated to the particular user irrespective of the network which has been utilized.

3 Description of Bio Cog

Working mechanism used in this work for Bio Cog hardware which supports for the heterogeneous network i.e. Wi-Fi, Bluetooth and Xbee is shown in Fig. 1.

Fig. 1
figure 1

Bio Cog hardware which supports heterogeneous network

The Test bed for the Bio Cog hardware has been designed with the ARM as the major case for the detection and sensing the spectrum among the heterogeneous networks. Bio Cog Hardware works with the heterogeneous networks i.e. Wi-Fi, Bluetooth and the XBee protocols. Once the Bio Cog hardware is connected in the environment, it senses the spectrum which is available. The system also senses the new users who come with the same protocol (or) different protocols in CRN, the channel of the particular users, checks the availability of the spectrum i.e. white holes among the networks. The system allocates channel in accordance with the available spectrum. When the patient monitoring medical device (PMMD) enters into the hospital which works with the XBee mechanism, our hardware senses the white holes among the XBee networks and allocates the frequencies to the users. Similar is the case for other networks also.

3.1 Proposed Algorithm: D2V Algorithm in Cognitive Radio Networks

A novel algorithm, i.e. D2V algorithm is used in the cognitive radio system designed and implemented in this paper. Bio Cog hardware designed for CRN, senses and allocates the spectrum using the new proposed D2V (Dynamic Distance Vector) algorithm. The algorithm works with the concept of three tier threshold architectures. The Localization can be decided by the receiver signal strength indicator (RSSI), which is used to measure the distance between the users and the hardware. The advantage of this algorithm is that it uses an energy efficiency mechanism in which the energy/power will be allocated depending upon the distance of the users.

The mathematical model of D2V algorithm for sensing and allocation functions of Bio Cog hardware is given by the following Eqs. (1) and (2).

$$F_{s} (d,E) = \left\{ {\begin{array}{*{20}l} {d\;for\;d \le d_{t} ;} \hfill & \quad {E\;for\;E \le E_{t} } \hfill \\ 0 \hfill & \quad {otherwise} \hfill \\ \end{array} } \right.$$
(1)

where Fs (d, E) = sensing function for the algorithm as a function of distance and energy. dt = threshold distance which is set for sensing the location. Et = threshold energy depending upon the distance.

Allocation of spectrum is done using the following equation

$$F_{a} (d_{a} ) = \left\{ {\begin{array}{*{20}l} {d_{a} (S)} \hfill & {d_{a} \ge 100^{ \circ } \,{\text{F}}} \hfill \\ {d_{a} } \hfill & {d_{a} < 100^{ \circ } \,{\text{F}}} \hfill \\ \end{array} } \right.$$
(2)

where Fa (da) = Allocation Function of the algorithm. da(s) = spectrum is allocated for the priority user with high temperature.

RSSI is calculated as a ratio of received signal power to the reference signal power, i.e.

$${\text{RSSI}} = 10\log \left( {{\text{P}}_{\text{R}} /{\text{P}}_{\text{ref}} } \right)$$
(3)

where PR is the received power and Pref is the reference power.

D2V algorithm implemented in the Bio Cog hardware is explained in the flow chart given in Fig. 2. Depending on the type of data which is being sent, in accordance with the intelligent priority mechanism, spectrum will be allocated to the users.

Fig. 2
figure 2

D2V algorithm

3.2 Bio Cog Spectrum Sensing Mechanism

Mechanism for the sensing that works in heterogeneous network of health care system and experimental setup for Bio Cog are shown in Figs. 3 and 4.

Fig. 3
figure 3

Bio Cog spectrum sensing mechanism

Fig. 4
figure 4

Experimental setup for the Bio Cog network

User data is collected by temperature sensor (S) and given to the ADC (A) Encoder (C) and then passed through the channel, X.

The Test bed for the Bio Cog Hardware has been designed with the ARM as the major case for the detection and sensing the spectrum among the heterogeneous networks.

Bio Cog Hardware works with the heterogeneous networks i.e. Wi-Fi, Bluetooth and the ZigBee protocols. Once the Bio Cog hardware is connected in the environment, it senses the spectrum which is available, even new users come with the same protocol (or) different protocols (CRN) senses the channel of the particular users, checks the availability of the spectrum i.e. white holes among the networks, allocates in accordance with the available spectrum. In detailed manner, assume the patient monitoring medical devices (PMMC) enters into hospital which works with the ZigBee mechanisms; our hardware senses the white holes among the ZigBee networks/other networks and allocates the frequencies to the users.

3.3 Channel Allocation by Bio Cog

Channel allocation algorithm used in Bio Cog is shown in Fig. 5.

Fig. 5
figure 5

Channel allocation algorithm

3.4 Energy Efficiency Mechanisms

Table 2 shows the power allocation to the users depending upon their distance.

Table 2 Power allocation to users

4 Test Bed Experimental Setup

4.1 Details of the Board (Hardware)

The main core Board of Bio Cog Hardware developed with the dual ARM—seven TDMI cores which has been has the following features.

Embedded Artists LPC2148 Education Board with NXP’s ARM7TDMI LPC2148 microcontroller lets you get up-and-running quickly. The small form factor board offers many unique features that ease your learning curve and program development.

  • NXP ARM7TDMI LPC2148 microcontroller with 512 Kbyte program Flash and 32 + 8 Kbyte SRAM

  • 12.0000 MHz crystal for maximum execution speed and standard serial bit rates—Phase-locked loop (PLL) multiplies frequency with five; 5 × 12 MHz = 60 MHz

  • 32.768 kHz RTC crystal

  • Onboard peripherals:

    • 2 × 16 character LCD with background light

    • Joystick switch

    • UART-to-USB bridge interface on UART #0

    • USB 2.0 device interface

    • RGB-LED, each colour can be controlled via PWM signal

    • Eight LEDs

    • Temperature sensor (LM75) on I2C bus

    • Pushbutton on P0.14 (interrupt input)

    • 8 × 8 LED matrix, controlled via shift registers in the SPI bus

    • MMC/SD memory card interface

    • Step motor (bipolar driving)

    • Interface to Max Stream XBee™ module (note that XBee module is not included)

    • Piezoelectric buzzer

    • Two analog inputs

    • Low-pass filtering of PWM signal

    • One analog output—reset button.

  • Connectors

    • Mini-B USB connector to UART#0 UART-to-serial bridge

    • Mini-B USB connector to LPC2148 device interface

    • MMC/SD memory card connector

    • JTAG

    • 64 pin expansion connector, all LPC2148 I/O pins are available on connector

    • 2.1 mm power supply connector.

  • 2 Kbit I2C E2PROM for storing non-volatile parameters:

    • Onboard low-dropout voltage and reset generation—generates +3.3 V (and +5 V if 9-15VDC is used to power the board)—+3.3 V available for external circuits, up to 300 mA

    • Power supply—9-15 VDC, ≥200 mA from 2.1 mm power connector—can also be powered directly from any of mini-B USB connectors

    • Simple and automatic program download (ISP) via UART-to-serial bridge channel—circuit that automatically controls the boot loader from UART-to-serial bridge channel

    • Dimensions: 156 × 110 mm—four layer PCB (FR-4 material) for best noise immunity

Wi-Fi/Bluetooth/ZigBee transceivers features are embedded into the Bio Cog hardware. Snapshot of Bio Cog test bed and hardware with indication of all three protocols are given in Figs. 6 and 7.

Fig. 6
figure 6

Experimental setup of Bio Cog hardware test bed

Fig. 7
figure 7

Bio Cog hardware with indication of zigbee and Wi-Fi protocols

4.2 Wi-Fi Module

The RTX4140 Wi-Fi Module is a small form-factor, single stream, 802.11b/g/n Wi-Fi module with on-board low power application processor. It is targeted at applications that send infrequent data packets over the network. Typically, these 802.11 applications will place a higher priority on system cost, power consumption, ease of use, and fast wakeup times as compared to high throughput. Bio Cog Setup with two Xbee users in Wi-Fi environment is shown in Fig. 8.

Fig. 8
figure 8

Bio Cog hardware with Xbee users in Wi-Fi network

The RTX4140 has been optimized for client applications in the home, enterprise, smart grid, home automation and control that have lower data rates and transmit or receive data on an infrequent basis. Wi-Fi Module an ideal solution for low power automation and sensor solutions because of its high efficiency and low power consumption. The RTX4140 Wi-Fi Module can be used to design applications using 802.11b/g/n communication protocols. The module includes an integrated antenna. The interface includes power supply pins, ADC ports, DAC ports, analog comparator, GPIO ports, SPI, I2C and UART ports.

A number of I/O’s are available to allow a wide range of applications. These include timers, serial communication interfaces, analog comparators, Analog-to-Digital Converters, Digital-to-Analog Converters, crystal oscillators and a debug interface.

4.3 Bluetooth

Bluetooth is a wireless technology standard for exchanging data over short distances (using short-wavelength UHF radio waves in the ISM band from 2.4 to 2.485 GHz from fixed and mobile devices, and building personal area networks (PANs). Invented by telecom vendor Ericsson in 1994, it was originally conceived as a wireless alternative to RS-232 data cables. It can connect several devices, overcoming problems of synchronization.

4.4 XBee

XBee or ZigBee is a specification for a suite of high-level communication protocols used to create personal area networks built from small, low-power digital radios. XBee is based on an IEEE 802.15.4 standard. Its low power consumption limits transmission distances to 10–100 meters line-of-sight, depending on power output and environmental characteristics, XBee devices can transmit data over long distances by passing data through a mesh network of intermediate devices to reach more distant ones. XBee is typically used in low data rate applications that require long battery life and secure networking (ZigBee networks are secured by 128 bit symmetric encryption keys). XBee has a defined rate of 250 Kbps, best suited for intermittent data transmissions from a sensor or input device.

4.5 Bio Cog Software and Hardware

The following Fig. 9 shows the Bio Cog software and hardware.

Fig. 9
figure 9

Bio Cog software and hardware

5 Results

5.1 Bio Cog: An Interactive Spectrum Sensing System for Medical Application

Bio Cog hardware for cognitive radio network is tested in the laboratory setup and the results are shown below.

  • Result 1: Spectrum allotment for Wi-Fi user when no other users are there in the network is shown in Fig. 10.

    Fig. 10
    figure 10

    Wi-Fi sensing

  • Result 2: Spectrum allotment for Bluetooth user when Wi-Fi user is already using the network is shown in Fig. 11.

    Fig. 11
    figure 11

    Bluetooth sensing in the backdrop of Wi-Fi user

  • Result 3: Xbee user is allotted channel without interfering with Wi-Fi and Bluetooth users (Fig. 12).

    Fig. 12
    figure 12

    Xbee sensing when Wi-Fi and Bluetooth users are in the network

  • Result 4: Two Xbee users are allotted two different vacant channels in the absence of Wi-Fi and Bluetooth users, and shown in Fig. 13.

    Fig. 13
    figure 13

    Two Xbee users allocated channel

5.2 Throughput Versus Time Plot

Throughput rate will vary depending upon the number of users and the type of user activity that the user performs through time. Performance of the Bio Cog hardware is assessed by the throughput in terms of percentage. Data rates are different for different wireless protocols. For example, in the case of Zigbee protocol, data rates are typically up to 250 Kbps and for Bluetooth, data rates are up to 1 Mbps. Throughput of the Bio Cog hardware is calculated using Eq. (4) shown below.

$${\text{Throughput}}\left( {\text{kbps}} \right) = \left( {{\text{Total\_data\_received} {/} \text{Simulation\_time}}} \right) \times \left( {8/1000} \right)$$
(4)

Throughput results obtained in different cases are shown in Fig. 14a–c. These graphs are plotted showing time (in min) versus throughput (in percentage) with respect to user activity. Throughput in terms of percentage of the channel capacity (channel data rate) of the selected wireless protocol is taken into consideration in these graphs. Different combinations of protocols are considered and throughput graphs are plotted during different intervals of time. These results show that the Bio Cog hardware designed works well even when multiple users are present in the network. Throughputs (in percentage) of the order of 80–90 % of channel capacity are achieved in the system, even though more number of users and different protocols are simultaneously using the network.

Fig. 14
figure 14

a Throughput with 1-Wi-Fi user. b Throughput with 1-Wi-Fi user and 1-Wi-Fi and 1-BT user. c Throughput with 2-Wi-Fi users, 2-Wi-Fi and 2-BT users and 2-Wi-Fi, 2-BT and 1-Zigbee users

5.3 Performance Graphs

  • Case 1: Performance of the Bio Cog hardware with single Wi-Fi user is shown in Fig. 14a.

  • Case 2 and 3: Performance of the Bio Cog hardware has been calculated when the number of users increases with different wireless protocols. The graphs clearly show the efficiency of the Bio Cog hardware is still stable even when the number of users increases in the network.

6 Conclusion

In this paper, cognitive radio network hardware for Hospital Management System is designed and the same is implemented with different protocols, i.e. Wi-Fi, Zigbee and Bluetooth, for any number of users. A new algorithm (D2V algorithm) has been incorporated to increase energy efficiency thus utilising the bandwidth efficiently. With this new method, the life time of the medical equipment will also increase, which is a salient feature of the proposed cognitive radio network. The proposed method also ensures timely medical attention to critical patients, which is one of the major challenges in the present health system. Once the patients are registered in the hospital management system, D2V algorithm comes into picture and according to their distance, frequency bands are allocated to the all patients. With the above mentioned figures, throughput for Bio Cog hardware is maintained at good rate even though the number of users has been increased. The same throughput can be achieved even when the protocols are increased. The designed Bio Cog Hardware proves to be most efficient in handling the different protocols in accordance to the different priority levels of the users. With more algorithms to be coined, still the throughput and efficiency can be further increased. The hardware designed and implemented in this paper can be extended to other areas of communication, process automation, military communication applications, etc.