The calculation of point quantity for lighting based on android OS using ionic framework and rule based expert system

Received Jun 8, 2021 Revised Aug 10, 2021 Accepted Oct 24, 2021 At this time, the Covid-19 pandemic has not been finished so all activities and expenditure of funds must be economical. On the each building will be required electricity resources as a means for lighting the room. Reduced activities carried out outside the room make people carry out activities indoors, this results in a significant increase in electricity consumption for lighting. PT. PLN as the provider in Indonesia of electricity services for the community experiences a shortage of electricity resources and most of the electricity resources are used for lighting purposes. Indonesia as a developing country has a very large of population growth, so it requires many buildings as a place to live or a place of business and other activities. This paper will be discussion how a smartphone with an Android operating system can be used to determining the lighting requirements using the Ionic Framework and Rule Based Expert Systems. Using this application system, so electricity to lighting can be optimal and not too wasteful, which in turn can save on the use of electrical energy resources and can save of the cost.


INTRODUCTION
The covid-19 pandemic forces us to reduce all activities or activities that are likely to be affected or contracted by the virus, it is possible that it is also recommended to save costs to reduce the economic impact it causes [1]. The reduced activity of a person who is carried out outside the room tends to make everyone carry out activities indoors, this results in a significant increase in electricity consumption for room lighting [2]. The increase in human demand for electricity consumption as a light source will lead to new problems for the power source itself, from the creation of electrical energy sources to uses related to electrical energy [3]. The space in each building can be in the form of houses, offices, shops, apartments, warehouses, factories, and other buildings requiring lighting. Light intensity in lighting is an important aspect of a room, this arises because various problems will arise when the quality of the lighting intensity in the room lighting does not meet the standard elements that need to be applied [4]. Planning light in the lighting of a room must consider several factors, including the intensity of lighting when used for work, the intensity of lighting space in general, installation costs, energy consumption costs and maintenance costs [5], [6]. light in room lighting has an effect on eye health, even further bias on work safety and work productivity. Lighting intensity that is too small in room lighting should be avoided because the eyes will get tired easily if you see in less clear or  [7]. Excessive use of light in room lighting will also be related to the use of large electrical resources so that it needs to be regulated to get good and even lighting results, light in room lighting must consider the strength of lighting (illumination), the angle of light irradiation, the type and distance of the lamp placement as well as room functions, so that the use of electrical energy needs for indoor lighting can be saved [8].
Smartphones are advanced new technologies. The sophistication of smartphone technology can be used to develop an application based on android programming that can be applied to calculate the need for light in room lighting by implementing lighting models in building physics so that it can help overcome these problems [9], [10]. This research was conducted with the aim of making an application produced in the form of an android program that will process the data that has been entered so that in a relatively short time it can be seen the results of the calculation of lamp light requirements for room lighting, including calculating the quantity of light points needed by utilizing the ionic framework design [11], which is combined with the method of rule based expert systems [12], so that an optimal solution for lighting can be obtained and at the same time can be achieved saving electricity consumption which in turn can save costs in lighting problems.

RESEARCH METHOD
The implementation of activities in this research uses the research and development model [13], while to develop an application program in overcoming lighting problems in lighting, researchers apply the existing formulas in building physics and are packaged in rule based expert systems [12], [14] and ionic framework [11], [15].

Building physics for lighting models
The light source depends on the construction of the light source and the construction of the armature used, based on the distribution of light by the light source and the armature used in the lighting installation, which includes all electrical installations used to provide electric power to lamps and other electrical equipment, while the purpose of the lighting installation is to provide comfort to the eyes in carrying out tasks or jobs. Every lighting for each type of building is different, industrial lighting is certainly different from the lighting system in a house or building, to determine the required number of lights in a room it can be calculated [4], [5], [7], [8], [16], using the method the room utilization factor in the lighting model (N) and the formula is as follows: Room utilization with the lighting model (N) is obtained through a planning factor with a constant value of 1.25, lighting intensity (E) in lux units, room length (L) and room width (W) in meters, will be influenced by the room factor (k) which is multiplied. with the light flux (Φ) in lumens and the armature efficiency (ηLB) and the space utilization factor (ηR) in percent. Meanwhile, to find the value of the light flux Φ can be found through the following formula: is the power used in watts multiplied by the luminous efficacy lamp's in units (lumens per watt). For the room factor (k) it can be seen from the room dimension data, the formula is as: Variable (k) which is a room dimension will be determined by the variable (A) which is the width of the room in meters and variable (B) the length of the room in meters which is influenced by the variable (h), where to find out the value (h) can be calculated from H-0.85 in meters and (H) is the height of the room.

Rule based expert system
The rule based expert system method is a rule contained in an expert system that is adopted from an expert to get conclusions from existing conditions [17]. Expert systems will make extensive use of knowledge designed specifically for expert human level problem solving. An expert has expertise in a certain field that other people do not know or are unable to do in his/her field [18]. This stage can be seen as in Figure 1. The rule based method is usually used in research to overcome partial and inconsistent information within the framework by defining the set through a rule-based approach with tiered truth values, so that the truth value is obtained at the desired level of accuracy [19], [20]. Rule based expert systems are also used to determine the priority scale of cases that occur by sorting data and determining the stage of cases used for examination based on predetermined standard operating procedures. The results of this system indicate a good decision and ideal for solving cases with fast recommendations and priority of the main cases with high compatibility rate results [21]. The rule-based reasoning method allows experts as well as respondents to be involved in determining the criteria and rules to be applied [22], [23].

Ionic framework
The application program in this study was developed using the ionic framework because at this time it is one of the free and open source software. The advantages of the ionic framework that make it popular are its ease and ability to be developed by users with components that support almost all hardware platforms [24]. The multi-platform ionic framework environment is excellent for creating hybrid mobile applications. As shown in Figure 2. Ionic framework is built on top of AngularJS and Apache Cordova, Ionic provides tools and services to develop applications into hybrid mobile via web technology, CSS, Sass, HTML5 and others aplication [25].

Design of lighting systems
Lighting system design can be defined as the decomposition of a complete system into its component parts in order to identify and evaluate lighting problems in lighting. The analysis and design of the lighting system aims to gain an overall understanding of the lighting system requirements to be made [27]. The stages in the analysis and design of the system in making this application can be seen in Figure 3.
The first stage is to determine the input from the existing building physics data in the form of room function, room size, planning factor, light intensity, light flux, armature efficiency to the electrical power used. Furthermore, at the process stage the data will be processed using building physics formulas [4]- [8], [28] which are packaged in rule-based expert systems [17]- [23], [29], [30] which are built on the ionic framework [24]- [26], [31]. The result of this process will be an application system software that can determine the lighting requirements in the room even up to the quantity of light points based on Android.

Implementation of rule based
The method of representing knowledge in expert systems for power calculation systems and determining the number of light points uses a selection rule in the form of a rule application in the form of IF (condition) THEN (action) where the condition is the initial part that expresses a situation or premise (a statement starting with IF) and actions (statements beginning with THEN) are parts that state certain actions or conclusions that are expected if an initial condition or premise is true [32]. The application to be built is an application that can provide information in the form of electrical resource requirements for lighting and also the quantity of light points required, the building physics data used is limited to the formula to determine the lighting needs in the room. The method used in determining the calculation conclusion is the rule-based expert system method by determining and making a rule base, then taking the parameter data and making it the initial fact in the form of function and type of room, after all the initial facts are obtained, then the process is carried out, search for preliminary conclusions based on the rule basis so that a conclusion is obtained in the form of lighting strength with lux units, this rule is determined as in Table 1, then these conclusions are used as new facts for the search process for final conclusions in the form of electrical power requirements, lighting needs in lighting as well as determining the amount the required light point. Knowledge representation of the strength of lighting in the form of light intensity is built from the rules that become the knowledge base of the system to be built using logical operators in the form of IF -THEN [33]. The knowledge representation based on the rule based on the arrangement of light intensity is divided into two, namely the knowledge base rule on the rules for determining the value of lux and the rule on the knowledge base to find the lux mean value.
The rules of calculation: Rule 1 (IF function room is office THEN lux is 200 upto 500 AND lux average is 350) Rule 2 (IF function room is apartment or home THEN lux is 150 upto 250 AND lux average is 200) Rule 3 (IF function room is hospital or school or House of worship THEN lux is 200 upto 800 AND lux average is 500)

Ionic framework for android
Ionic Framework is an open source framework that provides a UI Toolkit for creating PWA, desktop, mobile (Android and iOS) web applications using web languages such as HTML, CSS, Javascript, etc. [34]. The needs in this study to create coding in the Ionic framework are Text Editor, Nodejs, and Ionic CLI. Then to create an APK and run it on the emulator, Android Studio and Android SDK are needed. After the installation of all the tools required by the Ionic framework is complete, a display will appear as shown in Figure 4. This means that coding and data export are ready to be done. The program development and coding process can be done in a text editor which will then be used as an APK file in Android format [35], the application file for determining the number of light points in lighting can be run after the file is built using Android Studio which is already integrated with the Android SDK.

Determines the light point
After the coding process is complete and the program can run as expected and there are no errors in program execution, the program can be built, then the build file can be run via the smartphone. The first time the application file determines the bright spot when running, the flowchart of the application program can be seen as shown in Figure 5. The application program for determining the point of light that is displayed in the lamp icon can be clicked or pressed, automatically when the icon is pressed a new window will appear in the form of an command to select the type or function of the room for which you want to know the lighting needs of the lamp, this will be shown in Figure 6.
After selecting the type or function of the room, the process will continue to a new window. This new window will contain brief data input instructions in the form of room length, room width, room height, lumens to be used and the amount of power required for each lamp to be used. Then after the data input is complete to find out the results of the calculation automatically using the building physics formula packaged in the rule based expert system method you have to press the process button. The all activity in this stages can be seen as shown in Figure 7. Given that the application program will later be uploaded to the Google Store, executing the program file and creating an application program build file can be done online. To monitor and update files that are already in the Google Store, it should be done periodically, this is done to overcome errors and developments that occur.

CONCLUSION
The Ionic framework combined with the rule based expert system method is very suitable to be used in developing this application program to determine the quantity of light points. There is a difference in the final result value between calculations carried out manually and calculations carried out by the system, however, according to experts in the field of building physics, it does not have a significant effect, because only the difference in fraction numbers is below one percent, this difference is due to calculations carried out by the system, done in a digital way. Ionic framework which is multi platform can build a system based on mobile hybrid, in this case a smartphone with an Android operating system, while rule based is very effective, fast and accurate in calculating lighting requirements by determining the quantity of lighting points.