zigbee based voice control system for smart home

6
ZIGBEE BASED VOICE CONTROL SYSTEM FOR SMART HOME Y. Bala Krishna 1 , S. Nagendram 2 1 Research Scholar, Dept. of Electronics & Computer Engineering, K.L. University, A.P, India 2 Assistant Professor, Dept. of Electronics & Computer Engineering, K.L. University, A.P, India [email protected], [email protected] Abstract This paper details the overall design of a wireless home automation system (WHAS). This is fuelled by the need to provide supporting systems for the elderly and the disabled, especially those who live alone. The automation centre’s on recognition of voice commands and uses low-power RF ZigBee wireless communication modules which are relatively cheap. The home automation system is intended to control all lights and electrical appliances in a home or office using voice commands. The zigbee can receive the voice and send the voice data to the ARM9 controller and then the controller converts the voice into required format and then again send the data through the zigbee to the another zigbee and to the micro controller where the devices are attached to it. Based on the message it received it either turns ON/OFF the devices. 1. Introduction The demography of the world population shows a trend that the elderly population worldwide is increasing rapidly as a result of the increase of the average live expectancy of people [1]. Caring for and supporting this growing population is a concern for governments and nations around the globe. Home automation is one of the major growing industries that can change the way people live. Some of these home automation systems target those seeking luxury and sophisticated home automation platforms; others target those with special needs like the elderly and the disabled. The aim of the reported Wireless Home Automation System (WHAS) is to provide those with special needs with a system that can respond to voice commands and control the on/off status of electrical devices, such as lamps, fans, television etc, in the home. The system should be reasonably cheap, easy to configure, and easy to run. There have been several commercial and research projects on smart homes and voice recognition systems. Many new communication technologies such as GSM/GPRS networks, wireless sensor networks, Bluetooth, power line carriers and the Internet have been applied to home automation. For example, wireless sensor networks based on ZigBee protocol is widely used in smart homes and it has become the focus in this field. It consists of comfort and home automation, security and safety at home, ambient assistance (intelligence) and remote health monitoring. Guangming Song (Etc) [2] developed a wireless-controllable power outlet system. Figure 1: uControl Home Security, Monitoring and Automation (SMA) [3]. There have been several commercial and research projects on smart homes and voice recognition systems. Figure 1 shows an integrated platform for home security, monitoring and automation (SMA) from uControl [3]. The system is a 7-inch touch screen that can wirelessly be connected to security alarms and other home appliances. The home automation through this system requires holding and interacting with a large panel which constraints the physical movements of the user [4]. Another popular commercially available system for home automation is from Home Automated Living (HAL) [5]. HAL software taps the power of an existing PC to control the home. It provides speech command interface. A big advantage of this system is it can send commands Y Bala Krishna et al,Int.J.Computer Techology & Applications,Vol 3 (1),163-168 IJCTA | JAN-FEB 2012 Available [email protected] 163 ISSN:2229-6093

Upload: others

Post on 12-Sep-2021

18 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ZIGBEE BASED VOICE CONTROL SYSTEM FOR SMART HOME

ZIGBEE BASED VOICE CONTROL SYSTEM FOR SMART HOME

Y. Bala Krishna1, S. Nagendram 2 1 Research Scholar, Dept. of Electronics & Computer Engineering, K.L. University, A.P, India

2 Assistant Professor, Dept. of Electronics & Computer Engineering, K.L. University, A.P, India

[email protected], [email protected]

Abstract

This paper details the overall design of a wireless

home automation system (WHAS). This is fuelled by

the need to provide supporting systems for the elderly

and the disabled, especially those who live alone. The

automation centre’s on recognition of voice

commands and uses low-power RF ZigBee wireless

communication modules which are relatively cheap.

The home automation system is intended to control

all lights and electrical appliances in a home or

office using voice commands. The zigbee can receive

the voice and send the voice data to the ARM9

controller and then the controller converts the voice

into required format and then again send the data

through the zigbee to the another zigbee and to the

micro controller where the devices are attached to it.

Based on the message it received it either turns

ON/OFF the devices.

1. Introduction The demography of the world population shows a

trend that the elderly population worldwide is

increasing rapidly as a result of the increase of the

average live expectancy of people [1]. Caring for and

supporting this growing population is a concern for

governments and nations around the globe. Home

automation is one of the major growing industries

that can change the way people live. Some of these

home automation systems target those seeking luxury

and sophisticated home automation platforms; others

target those with special needs like the elderly and

the disabled. The aim of the reported Wireless Home

Automation System (WHAS) is to provide those with

special needs with a system that can respond to voice

commands and control the on/off status of electrical

devices, such as lamps, fans, television etc, in the

home. The system should be reasonably cheap, easy

to configure, and easy to run. There have been

several commercial and research projects on smart

homes and voice recognition systems. Many new

communication technologies such as GSM/GPRS

networks, wireless sensor networks, Bluetooth,

power line carriers and the Internet have been applied

to home automation. For example, wireless sensor

networks based on ZigBee protocol is widely used in

smart homes and it has become the focus in this field.

It consists of comfort and home automation, security

and safety at home, ambient assistance (intelligence)

and remote health monitoring. Guangming Song

(Etc) [2] developed a wireless-controllable power

outlet system.

Figure 1: uControl Home Security, Monitoring

and Automation (SMA) [3].

There have been several commercial and research

projects on smart homes and voice recognition

systems. Figure 1 shows an integrated platform for

home security, monitoring and automation (SMA)

from uControl [3]. The system is a 7-inch touch

screen that can wirelessly be connected to security

alarms and other home appliances. The home

automation through this system requires holding and

interacting with a large panel which constraints the

physical movements of the user [4]. Another popular

commercially available system for home automation

is from Home Automated Living (HAL) [5]. HAL

software taps the power of an existing PC to control

the home. It provides speech command interface. A

big advantage of this system is it can send commands

Y Bala Krishna et al,Int.J.Computer Techology & Applications,Vol 3 (1),163-168

IJCTA | JAN-FEB 2012 Available [email protected]

163

ISSN:2229-6093

Page 2: ZIGBEE BASED VOICE CONTROL SYSTEM FOR SMART HOME

all over the house using the existing highway of

electrical wires inside the home’s walls. No new

wires means HAL is easy and inexpensive to install.

However, most of these products sold in the market

are heavily priced and often require significant home

make over.

2. System Overview The Wireless Home Automation System (WHAS) is

an integrated system to facilitate elderly and disabled

people with an easy-to-use home automation system

that can be fully operated based on speech

commands. The system is constructed in a way that is

easy to install, configure, run, and maintain.

Figure 2: Functional block diagram of the

Wireless Home Automation System (WHAS).

Legends- A: Analogue, D: Digital

Figure 2 illustrates the sequence of activities in the

WHAS. The voice is captured using a microphone,

sampled, filtered and converted to digital data using

an analogue-to-digital converter. The data is then

compressed and sent serially as packets of binary

data. At the receiving end (Central Controller

Module), binary data are converted to analogue,

filtered and passed to the computer through the sound

card. A Visual Basic application program, running on

the PC, uses Microsoft Speech API library for the

voice recognition. Upon recognition of the

commands, control characters are sent wirelessly to

the specified appliance address. Consequently,

appliances can be turned ON or OFF depending on

the control characters received. The voice is captured

using a microphone, sampled, filtered and converted

to digital data using an analogue-to-digital converter.

3. Hardware Design In this section we present the hardware descriptions

of the three modules that constitute the WHAS.

3.1 Handheld Microphone Module (MM) The components of the microphone module are shown

in Figure 3. The system captures human voice using a

sampling rate (fs) of 8 kHz. It is known that the

highest frequency component of the human voice is

20 kHz, however the most significant parts of the

information is encoded in frequencies between 6 Hz

and 3.5 kHz [6].

Figure 3: Block diagram of the handheld

Microphone Module.

To meet Nyquist sampling criteria, an anti-aliasing

filter is used to block all the frequencies above the

Nyquist frequency (Fn).

3.2 Central Controller Module The functional blocks of the central controller

module are shown in Figure 4. At the central

controller module (coordinator), when data are

received, the received bytes are decompressed using

DPCM algorithm [7]. Decompressed data is assigned

to the digital-to-analogue converter (DAC). The

analogue output of the DAC is filtered and fed to the

computer as analogue signal through the sound card

of the PC.

Figure 4: Block diagram of the Central Controller

Module.

3.3 Appliance Control Module

Once the speech commands are recognised, control

charterers are sent to the specified appliance address

through ZigBee communication protocol. Each

appliance that has to be controlled has a relay

controlling circuit. The speech recognition system

uses a single-chip solution for voice recognition.

LD3320 is a voice chip for speech recognition based

on SI-ASR (speaker-independent automatic speech

recognition) technology. LD3320 has a highly

effective speaker-independent speech recognition

search engine module and a complete speaker-

independent speech recognition feature library inside.

Y Bala Krishna et al,Int.J.Computer Techology & Applications,Vol 3 (1),163-168

IJCTA | JAN-FEB 2012 Available [email protected]

164

ISSN:2229-6093

Page 3: ZIGBEE BASED VOICE CONTROL SYSTEM FOR SMART HOME

It can complete speech recognition at an accuracy

rate of 95%, not even requiring users to do their

own voice training to generate speech features for

training library. So the cost of voice recognition

module is lower than SUNPLUS SPCE061A in [8].

Figure 5. Speech recognition process

The speech recognition process of LD3320 is

shown as Figure 5. It first analyses the spectrum of

the voice input by MIC and then extracts the voice

features. After that, it’s compared with words in the

list of key words. Finally, the key word with the

highest score is output as the recognition result.

4. Software Design

Software design includes ADC sampling and

compression/decompression algorithms,

transmission and receiving, and voice recognition.

4.1 ADC sampling and data compression /

decompression

The portable microphone module implements

DPCM compression scheme. This compression

algorithm is inherently lossy because of the error

incurred due to the nature of the compression

algorithm.

Figure 6: DPCM Compression algorithm

The algorithm compresses each ADC sample from

12 bits of data down to 6-bit codes. This code

represents the difference between the actual sample

and the predicted value of the sample. The

predicted sample is obtained from the previous

iteration result. The difference between the sample

and the predicted value is then quantised. The 6 bit

code is then packed into bytes of data in order to

send them serially. In order to calculate the new

predicted value, the compression algorithm decodes

the difference and adds it into the current predicted

value.

Figure 7: DPCM Decompression Algorithm

Figure 6 shows the DPCM compression algorithm.

At the receiving end, data are decompressed to the

original form using the DPCM decompression

algorithm. Figure 7 shows the decoding algorithm

which basically matches the received code with the

quantised difference and adds this difference to the

predictor [9].

4.2 Voice Recognition Application

The voice recognition application implements

Microsoft speech API. The application compares

incoming speech with an obtainable predefined

dictionary. The Microsoft speech API run time

environment relies on two main engines: Automatic

Speech Recognition (ASR engine) and Text To

Speech (TTS engine) as shown in Figure 8. ASR

implements the Fast Fourier Transform (FFT) to

compute the spectrum of the fingerprint data [4].

Figure 8: Voice recognition application

hierarchy

Comparing the fingerprint with an existing

database returns a string of the text being spoken.

This string is represented by a control character that

gets sent to the corresponding appliance’s address.

The designed graphical user interface (GUI) offers

the user the choice of selecting the desired serial

communication port as well as it provides a record

Y Bala Krishna et al,Int.J.Computer Techology & Applications,Vol 3 (1),163-168

IJCTA | JAN-FEB 2012 Available [email protected]

165

ISSN:2229-6093

Page 4: ZIGBEE BASED VOICE CONTROL SYSTEM FOR SMART HOME

of all the commands that have been recognised and

executed. The application implements the hierarchy

described earlier in Figure 8 and the flow chart

shown in Figure 9. When designing the programme

GUI, making it a user friendly application was a

huge priority since the target clients need to avoid

any possible complications in the system. Control

characters corresponding to the recognised

commands are then sent serially from the central

controller module to the appliance control modules

that are connected to the home appliances.

Figure 9: Flow chart of the voice recognition

application

4.3 ZigBee RF communication

Zigbee protocol is the communication protocol

that’s used in this system. Zigbee offers 250 kbps

as maximum baud rate, however, 115200 bps was

used for sending and receiving as this was the

highest speed that the UART of the microcontroller

could be programmed to operate at. ZigBee is a

radio frequency (RF) communications standard

based on IEEE 802.15.4. Figure 2 depicts the

general architecture of a Zigbee based home

automation network [10]. All communication

between devices propagates through the

coordinator to the destination device. The wireless

nature of ZigBee helps overcome the intrusive

installation problem with the existing home

automation systems identified earlier. The ZigBee

standard theoretically provides 250kbps data rate,

and as 40kbps can meet the requirements of most

control systems, it is sufficient for controlling most

home automation devices [11]. The low installation

and running cost offered by ZigBee helps tackle the

expensive and complex architecture problems with

existing home automation systems, as identified

earlier.

5. Experimental Results and Discussions The prototype of the system has been fabricated

and tested. Figure 10 shows the microphone

module. Figure 11 shows the appliances control

module.

Figure 10: Microphone circuit board with

ZigBee module

Figure 11: Fabricated relay control unit

The graph in Figure 12 shows the response of the

speech recognition application to spoken

commands. The tests involved 35 subjects; the

trails were conducted with people with different

English accents. The test subjects were a mix of

male and female and 35 different voice commands

were sent by each person. Thus the test involved

sending a total of 1225 commands. 79.8% of these

commands were recognised correctly. When a

command is not recognised correctly, the software

ignores the command and does not transmit any

signals to the device control modules. The accuracy

of the recognition can be affected by background

noise, speed of the speaker, and the clearity of the

Y Bala Krishna et al,Int.J.Computer Techology & Applications,Vol 3 (1),163-168

IJCTA | JAN-FEB 2012 Available [email protected]

166

ISSN:2229-6093

Page 5: ZIGBEE BASED VOICE CONTROL SYSTEM FOR SMART HOME

spoken accent. These factors need to be studied

further in more details by conducting more tests.

Figure 12: Results of voice recognition

experiments showing percentage of correct

recognition for different ethnicity/accent

The system was tested in an apartment and

performed well up to 40m. With a clear line-of-

sight transmission (such as in a wide open

gymnasium) the reception was accurate up to 80m.

Additional tests are being planned involving a

bigger variety of commands.

6. Conclusions and Future Work In this paper, we proposed a voice control system

for zigbee-based home automation networks. In

outwork, SI-ASR (Speaker-Independent Automatic

Speech Recognition) has been used; making it

requires no training of recording. This speech

recognition control system uses human-computer

interaction to realize multiple menus choose

function. A home automation system based on

voice recognition was built and implemented. The

system is targeted at elderly and disabled people.

The prototype developed can control electrical

devices in a home or office. The system

implements Automatic Speech Recognition engines

through Microsoft speech APIs. The system

implements the wireless network using ZigBee RF

modules for their efficiency and low power

consumption. Multimedia streaming through the

network was implemented with the help of the

Differential Pulse Code Modulation (DPCM)

compression algorithms that allows to compress the

speech data to half of its original data size. The

preliminary test results are promising.

Future work will entail:

Adding confirmation commands to the

voice recognition system.

Integrating variable control functions to

improve the system versatility such as

providing control commands other than

ON/OFF commands. For example

“Increase Temperature”, “Dim Lights”

etc.

Integration of GSM or mobile server to

operate from a distance.

Design and integration of an online home

control panel.

AKNOWLEDGEMENT

We thank to our principal, Prof. K. Raja Shekar

Rao, for providing necessary facilities towards

carrying out this work. We acknowledge the

diligent efforts of our Head of the Department

Dr.S.Balaji in assisting us towards

implementation of this idea.

REFERENCES

[1] T. Birtley, (2010) Japan debates care for

elderly. [Cited 21/09/2010]. Available:

http://www.youtube.com/watch?v=C0UTqfigSec

[2] Guangming Song, Fei Ding, Weijuan Zhang

and Aiguo Song, “A Wireless Power Outlet System

for Smart Homes,” IEEE Transactions on

Consumer Electronics, Vol. 54, No. 4,

NOVEMBER 2008

[3](2010) uControl Home security system website.

[Cited 201014thOct].Available:

http://www.itechnews.net/2008/05/20/ucontrol-

home-security-system/

[4] R. Gadalla, “Voice Recognition System for

Massey University Smart house,” M. Eng thesis,

Massey University, Auckland, New Zealand, 2006.

[5] (2010) Home Automated Living website. [Cited

2010 14th Oct].Available:

http://www.homeautomatedliving.com/default.htm

[6] L. R. Rabiner and R. W. Schafer, Digital

Processing of Speech Signals, New Jersey, US:

Prentice Hall Inc, 2001

[7] B. Yukesekkaya, A. A. Kayalar, M. B. Tosun,

M. K. Ozcan, and A. Z. Alkar, “A GSM, Internet

and Speech Controlled WirelessInteractive Home

Automation System,” IEEE Transactions on

Consumer Electronics, vol. 52, pp. 837-843,

August 2006.

[8] Jinn-Kwei Guo, Chun-Lin Lu, Ju-Yun Chang,

Yi-Jing Li,Ya-Chi Huang, Fu-Jiun Lu and Ching-

Wen Hsu, “Interactive Voice-Controller Applied

to Home Automation,” 2009 Fifth International

Conference on Intelligent Information Hiding and

Multimedia Signal Processing

Y Bala Krishna et al,Int.J.Computer Techology & Applications,Vol 3 (1),163-168

IJCTA | JAN-FEB 2012 Available [email protected]

167

ISSN:2229-6093

Page 6: ZIGBEE BASED VOICE CONTROL SYSTEM FOR SMART HOME

[9] Voice Recoder Reference Design (AN 278),

Silicon Laboratories, 2006.

[10] Guangming Song, Fei Ding, Weijuan Zhang

and Aiguo Song, “A Wireless Power Outlet System

for Smart Homes,” IEEE Transactions on

Consumer Electronics, Vol. 54, No. 4,

NOVEMBER 2008

[11] Il-Kyu Hwang Dae-Sung Lee Jin-Wook Baek “Home Network Configuring Scheme for All

Electric Appliances Using ZigBee-based Integrated

Remote Controller,” IEEE Transactions on

Consumer Electronics, Vol.55, No.3,

AUGUST2009

BIOGRAPHIES

Y. Bala Krishna, presently doing an M.Tech in Department of

Electronics and Computer

Engineering in Koneru

Lakshmaiah University.

S.Nagendram, presently working

in K.L.University as an Asst.

Professor in Electronics and Computer Engineering

Y Bala Krishna et al,Int.J.Computer Techology & Applications,Vol 3 (1),163-168

IJCTA | JAN-FEB 2012 Available [email protected]

168

ISSN:2229-6093