Voice-controlled lighting system – VŠB – Technical University of Ostrava
This application was developed and is operated as part of the ‘PROMOTIC SCHOOL VERSION’ user guide.
Jan Vaňuš, Ing., VŠB-TU Ostrava, FEI, Department 452, jan.vanus@vsb.cz, http://www.fei.vsb.cz
To teach modern methods of controlling building services functions, a laboratory assignment on voice control of building services functions (including voice control of lighting) using the NIKOBUS bus system. Voice commands are spoken in a real-world environment. Such an environment within a building may include various background noises from fans, air conditioning, a running computer, the radio, the television, a vacuum cleaner, etc. All these additional noises affect the quality of speech signal processing and, consequently, the recognition of the speech signal required to subsequently execute the desired operational and technical function. This article compares the success rate of recognising voice commands for controlling lighting in a flat using the MyVoice software in a real-world environment.
Basic description and breakdown of the laboratory task
For the voice control of building services functions, the entire task is divided into several parts:
- Visualisation of the control of building services functions using the PROMOTIC system,
- Voice control of building services functions using the MyVoice software.
1. Visualisation of the control of building services functions
The control of building services functions refers, for example, to switching lights on and off, regulating heating or air conditioning, lowering and raising roller shutters, awnings or garage doors, and operating security systems, etc. In the laboratory demonstration task used in teaching, the following building services functions are controlled:
- switching lights on and off,
- switching a fan on and off,
- switching a boiler on and off,
- switching electric heating on and off,
- measuring room temperature.
The entire system for visualising operational and technical functions consists of hardware and software components (Figure 1):
a) Hardware components:
- PCI6221 measurement card (installed in a PC),
- CB-68LP terminal block,
- RAS-0515 relay module,
- PT 009 demonstration panel with the NIKOBUS bus system,
b) Software components:
- PROMOTIC visualisation system,
- OPC server,
- ODBC driver,
- MySQL – database management system.
1.1 Description of the NIKOBUS bus system
The NIKOBUS bus system is an intelligent electrical installation used for the automation of operational and technical functions in buildings and flats. The bus-based electrical installation has a modular design, meaning that the individual devices are interconnected via a common bus cable.
All components of the NIKOBUS bus system can be divided into three functional groups:
- sensors,
- actuators,
- system devices and components.
- Figure 1 Block diagram illustrating the wiring of the entire system.
- Figure 1: Block diagram illustrating the wiring of the entire system.
There are three types of actuators, or control units: switching, roller-shutter and dimming. The bus-connected push-buttons are linked to the switching, roller-shutter and dimming units via a two-wire cable – the NIKOBUS bus. The NIKOBUS bus is galvanically isolated from the 230V mains supply and is powered by a safe low voltage of 9V DC (SELV). In the application described, a switching unit is used as the actuator to control the lighting, whilst bus-connected push-buttons and a bus converter for switches are used as sensors. The switching unit is used to simulate the switching on and off of lights in a flat. The activation of individual functions is indicated both by connected light bulbs and by the visualisation of the laboratory task, implemented using visualisation software.
1.2 Description of application visualisation using the PROMOTIC visualisation software
The PROMOTIC visualisation software is an object-oriented SCADA software tool for creating applications that monitor, control and visualise technological processes.
In the PROMOTIC system, an application is built using objects. In accordance with the principles of object-oriented programming, these objects have their own name, properties (variables) and functions (methods). Each type of object has its own specific function and method of use [5, 6]. The main visualisation screen for the laboratory task is shown in Figure 2. Other visualisation applications available to students include a trends and events screen, an alarms screen, and a web presentation displaying the current status of the visualised process on the internet.
2. Voice control of lighting
The MyVoice software is used in the laboratory task for voice control of lighting in a flat. The MyVoice software was developed by the Czech company Fugasoft. It is designed to recognise voice commands. Its function is to replace control via a mouse and keyboard with control using only the human voice, without the need to record these voice commands. MyVoice does not support the PROMOTIC software or its applications, but it allows users to add their own functions and commands. The link between the PROMOTIC SCADA system and MyVoice is provided by the PmaKey object, which enables control of PROMOTIC applications via keyboard shortcuts. These keyboard shortcuts are used to control operational and technical functions within the PROMOTIC application. User-defined functions are created in the MyVoice software on the ‘Applications’ tab—
—
—Figure 3: The MyVoice environment for configuring command groups.
First, a group called ‘PROMOTIC’ was created. Individual commands within this group were then defined one by one using the ‘Add’ button. In the window that appeared, the name of the function and its literal pronunciation were entered. An example would be entering the function ‘turn_on_lights’ to switch on all the lights in the flat (Table 1). The defined function ‘turn_on_lights’ is pronounced ‘zapnoucvjetla’ and has the keyboard shortcut Shift+F5. Before actually running the MyVoice programme, it is necessary to configure the programme for a specific speaker and for the specific microphone being used in the ‘User Configuration’ settings (Figure 4). The process, referred to in the experimental section as ‘learning’, involves setting the microphone gain and recognising the speaker who is speaking at any given moment. The ‘learning’ process influences the success rate of recognising individual speakers in a specific application.
- Figure 4: The MyVoice interface for configuring the microphone and speaker.
In the described implementation of MyVoice, the following voice commands have been created for controlling the lighting, for which corresponding keyboard shortcuts have been defined.
Function name Function pronunciation Keyboard shortcut
turn_lights_on Turn_lights_on Shift+F5
turn_lights_off Turn_lights_off Ctrl+F5
light1 First_light F5
light2Second_light F6
light3 Third_light F7
- Table 1: Overview of programmed voice commands for voice-controlled lighting.
Experimental section
In the experimental section, the recognition accuracy of the voice commands ‘turn_lights_on’ and ‘turn_lights_off’ was compared using the MyVoice software. The voice commands were spoken by a single speaker under the following conditions:
- no interference,
- interference from a fan (Table 4),
- interference from a fan and a radio (Table 4).
The experiment was conducted such that, for the conditions set out above (1 to 3), the MyVoice software:
- no configuration was carried out for a specific speaker and specific conditions (Figure 4) (the test was conducted ‘without training’),
- a configuration was carried out for a specific speaker and specific conditions (Figure 4) (the test was conducted ‘with training’).
Conditions under which the command ‘turn on the lights’ was spoken
Recognition success rate
1 no interference, no training 100%
2 no interference, with training 100%
3 with interference – fan, without training 97%
4 with interference – fan, with training 96%
5 with interference – fan + radio, without training 81%
6 with interference – fan + radio, with training 92%
| Podmínky, při kterých byl vyřčen povel zapnout světla | Úspěšnost rozpoznání | |
|---|---|---|
| 1 | bez rušení, bez učení | 100% |
| 2 | bez rušení, s učením | 100% |
| 3 | s rušením - ventilátor, bez učení | 98% |
| 4 | s rušením - ventilátor, s učením | 100% |
| 5 | s rušením - ventilátor+rádio, bez učení | 90% |
| 6 | s rušením - ventilátor+rádio, s učením | 98% |
- Tabulka 3: Úspěšnost rozpoznání pro hlasový povel 'vypnout světla'.
The SSNR segment-based criterion [8] was used to calculate the signal-to-noise ratio (for the commands ‘turn on the light’ and ‘turn off the light’) relative to noise (from the fan and the radio). Approximate SSNR ratios are given in Table 4. A positive SSNR value indicates that the speech signal power is greater than the noise power. A negative SSNR value indicates that the speech signal power is less than the noise power.
Ratio of speech signal to noise SSNR [dB]
1 switch on the light – fan noise SSNR1 = -0.0959 [dB]
2 switch on the light – fan noise + radio noise SSNR2 = -0.8931 [dB]
3 switch off the light – fan noise SSNR3 = -1.2138 [dB]
4 switch off the light – fan noise + radio noise SSNR4 = -2.57 [dB]
- Table 4: Calculated SSNR values for the speech-to-noise ratio.
Conclusion
This article describes the implementation of voice-controlled lighting using the MyVoice speech recognition software, the PROMOTIC SCADA system and the NIKOBUS bus system. In the experimental section, a comparison was carried out of the recognition success rates for the voice commands ‘turn on the lights’ and ‘turn off the lights’, spoken by a single speaker under real-world conditions in a flat. By ‘real-world conditions’, we mean typical background noise in a flat, such as additive noise from a fan or additive interference from a radio (Figures 1 and 2, Tables 2 and 3). The MyVoice software achieved a 100 per cent recognition success rate when the experiment was conducted without additive interference. The worst recognition success rates were observed under the conditions of maximum interference (additive noise from a fan + interference from a radio; SSNR3 = –1.2138 [dB] and SSNR4 = –2.57 [dB]). A higher recognition success rate can be observed when the command ‘turn off the lights’ is spoken. The command ‘turn on the lights’ contains an unvoiced glottal stop ‘z’ in the first word ‘turn on’, known as a fricative [3, 7]. When the command ‘turn on the lights’ was spoken, additive noise (SSNR1 = -0.0959 [dB] and SSNR2 = -0.8931 [dB]) masked this consonant in some cases, resulting in unsuccessful recognition. The experimental section shows that the MyVoice software demonstrated good performance in speech recognition. In the case of a real-world environment with excessive noise, a signal processor with an adaptive filter implementing the LMS algorithm can be used to remove additive noise within a noise-reduction application.
References:
[1] Jan J.: Digital Filtering, Analysis and Signal Restoration, VUTIUM Publishing House, Brno 2002, ISBN 80-214-1558-4 (2nd revised edition)
[2] http://www.fit.vutbr.cz/study/courses/ZRE/public
[3] Uhlíř J., Sovka P., Pollák P., Hanžl V., Čmejla R.: Voice Communication Technology, ČVUT Publishing House, Prague 2007, ISBN 978-80-01-03888-8
[4] Pávek J.: Nikobus Intelligent Electrical Installation – Nikobus System, User Manual v.1, Moeller Elektrotechnika, spol. s r.o., Prague, 2004
[6] PROMOTIC Visualisation Software Manual, MICROSYS, 2003
[7] Psutka J., Muller L., Matoušek J., Radová V.: We Speak Czech with the Computer, ACADEMIA, Prague 2006, ISBN 80-200-1309-1
[8] Sedláček M., Šmíd R.: MATLAB in Measurement, CTU Press, Prague 2005, ISBN 80-01-02851-85 Ing. Jan Vaňuš Ph.D., VŠB – Technical University of Ostrava, FEI, Dept. 420, Web: http://www.fei.vsb.cz