**5. AppLux Mobile Application**

There is no doubt that lighting has an essential role in our lives. For this reason, the application developed aims to control the minimum lighting levels in order to guarantee eye comfort at the same time that it helps reduce energy consumption derived from over-illumination. To carry out this task, the application measures the illuminance level of a space and compares it with the minimum level required by regulations according to the locations profiles.

To ease the use of the application, it has been developed with a user register. Thus, the application adapts to the user requirements, showing only the relevant information about the evaluations performed previously, making it possible for the application to be used by more than one user. Due to the high investigation interest, when a new user is registered in the system, he agrees to give the measurement information for research purposes.

From the application, any user can manage their own information through the following options:

	- *Name*. Helps the managemen<sup>t</sup> of different areas stored on the device.
	- *Space type*. Defines where the activities are carried out, indoors or outdoors.
	- *Area of establishment*. Defines the general purpose of the area.
	- *Zone type*. Regarding the previous value, helps to clarify the task performed in the area.
	- *Dimensions of the space*. To know the amount of measurement points to calculate the average illuminance of the space.
	- *Edit location information*. It is possible to see and edit the characteristics of the selected location. In addition, the information about the different measurements done in this location can be displayed but never edited.
	- *View location information*. It is possible to access the location information through this option, including the historic values of the light measurements performed on it (Figure 4c).
	- *Measure and evaluate light quality*. To evaluate the illuminance level, a process of measurement is needed (Figure 4d). To start it, the first task is to choose the method to read the illumination from a selector, where there are two options:
		- Manual input.
		- Mobile's ambient light sensor.

Once the lighting sensor is selected, it is possible to perform the evaluation, comparing two values which are displayed by the application:


To carry out the evaluation, with the values displayed on the screen, it is required that the previous result of the measurement is stored. Once we pulse the button to start the evaluation, the result will be shown in an alert dialog.

*Delete locations*. When this option is pressed, all the information related to this location (description and measurements) will be deleted.

One of the most important points of the application is the method to perform the measurement of the illuminance to be able to carry out the evaluation. The importance of performing a good measurement is an important point to be able to compare with those specified in the regulations. To calculate the illuminance of an area, it is necessary to perform different measurements distributed on a grid to guarantee the compliance of the regulation in all the areas. To know where to perform those measurements, the application will give the number of points and their distribution in the area. Thereby, the program will calculate the value as average maintenance illuminance to compare with those defined by the regulations. In addition, the need to enter multiple measured points allows the

uniformity of the area to be calculated. This point is important to guarantee eye comfort and it is another parameter determined by the regulations.


**Figure 4.** AppLux application's screens. (**a**) Location list; (**b**) Location options; (**c**) View Location; (**d**) New Measurement.

### **6. Evaluation of the System**

As a feedback step, and in order to check the application, it was essential to make a validation to verify its effectiveness. To perform this task, the following reviews were carried out:


### *6.1. Evaluation of the Lighting Measurement*

There is no doubt that the data acquisition has an important role in the developed application. For that reason, an evaluation of the accuracy of the application's measurements has been performed. The measurement methodology evaluated is based on the ambient light sensor.

To ensure that the obtained information is as accurate as possible, all the measurements were performed in the same scenario, in a dark room with a light bulb and a dimmer. The light source was a 220 W dimmable incandescent light bulb and it was connected to a dimmer, which controlled the light intensity level as desired. As a reference value for the measurements, the authors used a standard lux meter modeled PCE-174 () [40], which has an accuracy of 5% of reading, which had been previously calibrated.

When the measured data obtained with the smartphone was compared with the data acquired from a reference lux meter, an absolute error of 39.08% was obtained, which was not good enough. Despite this huge difference, when analyzing the data, it is possible to appreciate that the tendency of this measure is similar to the data obtained from the lux meter. This indicates that it is necessary to make the sensor go through a process of calibration to adjust the model developed to the characteristics of the devices. To ensure the accuracy of this calibration, all the measured points were used in order to have a good sample of data, where different lux levels were measured to find the calibration factor of the device. The calibration defines which digital output value relates to which luminance input signal. This relationship between scene luminance and digital output levels of a digital image capture

system is called optoelectronic conversion function (OECF) [21]. Once the calibrated factor is obtained to acquire the real measured data, it is necessary to multiply the measured value by this factor as Equation (1) shows.

$$L\mathfrak{u}\mathfrak{x}\_{real} = L\mathfrak{u}\mathfrak{x}\_{measured} \times \mathbb{C}\_{calibration} \tag{1}$$

After calibrating the measures performed with the calibration factor, the absolute error of the measurements was reduced to 13.74%. However, if we analyze again the accuracy of the data, it is possible to sort out different groups. In the case of the mobile phone used, it was possible to divide the measurements into three groups and recalculate the calibration factor of each one separately, and the accuracy of the sensor can be increased showing an absolute error of 8.41%. The number of groups and the range of the values may vary depending on the device used. Figure 5 shows the data analysis of this measurement methodology.

**Figure 5.** Mobile ambient light sensor vs. Luxmeter.

Due to the importance of good calibration, an option has been integrated into the application to calibrate the ambient light sensor, reducing the error of the measurements.

### *6.2. Evaluation of the Lighting Analysis*

To answer the second question, a practical evaluation of the developed tool was performed. This time the validation was focused on testing if the application was able to analyze the lighting requirements of a working space. Therefore, two different kinds of scenarios were selected:


Despite having shown that it is possible to use the mobile phone as measurement tool, for this evaluation the measurements were taken with a calibrated luxmeter and incorporated into the mobile tool to perform the analysis. As a result, a total of 30 evaluations were divided as shown in Table 1.


**Table 1.** Lighting evaluations performed.

In order to make a complete evaluation of the analysis performed by the developed tool, and to also evaluate the user satisfaction with the results, the study was divided in two, one for each sort of scenario evaluated.
