Energy Management in Buildings Using MATLAB

MATLAB is an applicable software in various aspects of engineering such as Electrical engineering and its different sub majors. There are a lot of examples and demos on these majors, although there is a few text or example on MATLAB application in energy management. In this text, I have provided a general application of energy management in buildings using MATLAB software. Considering limit source of fuel energy, we need to use energy and resources carefully and it is an economical and ecological challenge as well as being one which is important for survival and which can only be mastered by highly qualified engineers. A significant percentage of the energy used nationally is consumed in buildings, which means there are considerable potential for savings and a corresponding need for responsible behavior.The building sector worldwide uses up to 40% of primary energy requirements and also a considerable amount of overall water requirements. Building Energy Management Systems (BEMS), aims to improve environment within the building and may control temperature, carbon dioxide levels. BEMS is not sufficient enough due to human interference. Human is a dynamic part of the building; therefore he/she should be taken into account in the control strategy. Latest trends in designing Intelligent Building Energy management Systems (IBEMS) integrate a Man Machine Interface that could store the human’s preferences and adapt the control strategy accordingly. BEMS have been developed after the Energy crisis in the late 70’s combined with the fast development of computers science. The aims of these systems are to monitor and control the environmental parameters of the buildings and at the same time to minimize the energy consumption and cost. Since then, BEMS have become commercial tools and are implemented in a wide range of applications, especially in large office buildings; thus useful experience is available regarding their benefits and drawbacks. Systems linked to a BMS typically represent 40% of a building's energy usage; if lighting is included, this number approaches 70%. Some Benefits of BMS are: • Building tenant/occupants • Good control of internal comfort conditions • Possibility of individual room control • Increased staff productivity


Introduction
MATLAB is an applicable software in various aspects of engineering such as Electrical engineering and its different sub majors. There are a lot of examples and demos on these majors, although there is a few text or example on MATLAB application in energy management. In this text, I have provided a general application of energy management in buildings using MATLAB software. Considering limit source of fuel energy, we need to use energy and resources carefully and it is an economical and ecological challenge as well as being one which is important for survival and which can only be mastered by highly qualified engineers. A significant percentage of the energy used nationally is consumed in buildings, which means there are considerable potential for savings and a corresponding need for responsible behavior.The building sector worldwide uses up to 40% of primary energy requirements and also a considerable amount of overall water requirements. Building Energy Management Systems (BEMS), aims to improve environment within the building and may control temperature, carbon dioxide levels. BEMS is not sufficient enough due to human interference. Human is a dynamic part of the building; therefore he/she should be taken into account in the control strategy. Latest trends in designing Intelligent Building Energy management Systems (IBEMS) integrate a Man Machine Interface that could store the human's preferences and adapt the control strategy accordingly. BEMS have been developed after the Energy crisis in the late 70's combined with the fast development of computers science. The aims of these systems are to monitor and control the environmental parameters of the buildings and at the same time to minimize the energy consumption and cost. Since then, BEMS have become commercial tools and are implemented in a wide range of applications, especially in large office buildings; thus useful experience is available regarding their benefits and drawbacks. Trace Heating BEMS uses a control strategy with the following objectives: i. To obtain a flexible system for operator to maintain thermal, visual, security, illumination and air quality in a building. ii. To reduce the energy consumption for all loads in a building. iii. To provide a monitoring/controlling system in a building. The above objectives are achieved by the use of a fuzzy controller at each zone level of the building, supervised by a suitable cost function. The detailed description of the control strategy has been described in next parts.

Fuzzy systems
Fuzzy logic originally is identified and set forth by Lotfi A. Zadeh is a form of multivalued logic derived from fuzzy set theory to deal with reasoning that is fluid or approximate rather than fixed and exact. In contrast with "crisp logic", where binary sets have two-valued logic, fuzzy logic variables may have a truth value that ranges in degree between 0 and 1. Put more simply, fuzzy logic is a superset of conventional (boolean) logic that has been extended to handle the concept of partial truth, where the truth value may range between completely true and completely false. Furthermore, when linguistic variables are used, these degrees may be managed by specific functions. As the complexity of a system increases, it becomes more difficult and eventually impossible to make a precise statement about its behavior, eventually arriving at a point of complexity where the fuzzy logic method born in humans is the only way to get at the problem. Fuzzy logic is used in system control and analysis design, because it shortens the time for engineering development and sometimes, in the case of highly complex systems, is the only way to solve the problem. A fuzzy controller consists of the following major components depicted in figure 1:

Illumination system
Lighting or illumination is the deliberate application of light to achieve some aesthetic or practical effect. Lighting includes use of both artificial light sources such as lamps and natural illumination of interiors from daylight. Daylighting (through windows, skylights, etc.) is often used as the main source of light during daytime in buildings given its high quality and low cost. Artificial lighting represents a major component of energy consumption, accounting for a significant part of all energy consumed worldwide. Artificial lighting is most commonly provided today by electric lights, but gas lighting, candles, or oil lamps were used in the past, and still are used in certain situations. Proper lighting can enhance task performance or aesthetics, while there can be energy wastage and adverse health effects of poorly designed lighting. Indoor lighting is a form of fixture or furnishing, and a key part of interior design. Lighting can also be an intrinsic component of landscaping Providing daylight in a building does not by itself lead to energy efficiency. Even a well day building may have a high level of lighting energy use if the lighting controls are inappropriate. However, improved control in building management and automation system through research and development will definitely help to improve energy savings in buildings. This part presents the development of an automated fuzzy lighting/dimming control system. The schematic diagram of the system is shown in Fig. 1. Fuzzy logic is an innovative technology that allows the description of desired system behavior using everyday spoken language Fuzzy logic can be derived into three stages which are: Fuzzification, Fuzzy Inference and Defuzzification. In a typical application, all three stages must be employed.

Indoor natural lighting
What we have to do is solve an equation of the type Where E is the illumination level required at the work surface and A is the total area of the plane where the work is done. The factor Φ rec is the flux of light received on the working surface. The average indoor illuminance Ε in (lx) is calculated (DHW Li and JC Lam, 2000, "Measurements of solar radiation and illuminance on vertical surfaces and daylighting implications") using the equation: with θ z (deg) the solar zenith angle.

Artificial lighting
The Equation below is used to calculate the average artificial light intensity inside the buildings: Where: * AL u : The actuating signal of the artificial light controller, ranging from 0-1. This signal is driven by the artificial lighting fuzzy controller. The same signal is also fed into the building model (Archimed.bui) to drive the actuator for the artificial lights. If * 0 AL u = means that all lights are off. If * 1 AL u = means that all lights are on at full power.

Fuzzy controller for lighting
All lighting control systems are based on one of the following strategies: • Occupancy sensing, in which lights are turned on and off or dimmed according to occupancy; • Scheduling, in which lights are turned off according to a schedule; • Tuning, in which power to electric lights is reduced to meet current user needs; • Daylight harvesting (daylighting control), in which electric lights are dimmed or turned off in response to the presence of daylight; • Demand response, in which power to electric lights is reduced in response to utility curtailment signals or to reduce peak power charges at a facility; • Adaptive compensation, in which light levels are lowered at night to take advantage of the fact that people need and prefer less light at night than they do during the day. Daylight is a dynamic source of lighting and the variations in daylight can be quite large depending on season, location or latitude, and cloudiness. Different skylight levels can be found under the same sunlight conditions, and, even when the sky pattern remains the same, the range of solar illuminances may increase as a result of a momentary turbidity filter or scattering of particles over the sun. In consequence, any prediction system has to be flexible to allow for the multivariate changes that characterize the combination of sunlight and skylight. The proposed daylighting fuzzy control uses two sensing devices (an occupancy/motion sensor and a photosensor), continuously electronic dimming ballasts for every luminaries aiming the control of the electric lighting output, and a fuzzy controller. A proposed algorithm is assigned to control the illumination:

www.intechopen.com if illuminance is between 500 and 550 lux and motion sensor is ON then all lamps is full powered else use the fuzzy controller for lighting control
The input linguistic variables of the fuzzy controller are the level of the illuminance measured by the photosensor (A) while the output variable is the level of the DC control signal sent to electronic ballasts in the control zone (µ 1 ). The fuzzy membership functions of Input/Output variables are shown in figures 2 and 3:

Fig. 3. Membership Function of Output (DC Voltage Level)
A rule-based fuzzy controller is evaluated for this system as follow: 1. If A is DARK then DC-Output-Level is VERY-HIGH 2. If A is HALF-DARK then DC-Output-Level is HIGH 3. If A is MEDIUM then DC-Output-Level is MEDIUM 4. If A is HALF-LIGHT then DC-Output-Level is LOW 5. If A is LIGHT then DC-Output-Level is VERY-LOW Control surface of this system is shown in figure 4. As it is seen, the controller is very smooth action and it causes the ballast has a long life with a low harmonic feed into the grid.

HVAC system
In this part the role of fuzzy modeling in heating, ventilating and air conditioning (HVAC) and control models is presented. HVAC design professionals are required to evaluate numerous design alternatives and properly justify their final conceptual selection through modeling. This trend, coupled with the knowledge of experienced designers, increasing complexity of the systems, unwillingness to commit additional funds to the design phase itself, can only be satisfied by approaching the conceptual design process in more scientific, comprehensive and rational manner as against the current empirical and often adhoc approach. Fuzzy logic offers a promising solution to this conceptual design through fuzzy modeling. Numerous fuzzy logic studies are available in the non-mechanical engineering field and allied areas such as diagnostics, energy consumption analysis, maintenance, operation and its control. Relatively little exists in using fuzzy logic based systems for mechanical engineering and very little for HVAC conceptual design and control. Temperature and relative humidity are essential factors in meeting physiological requirements. To identify the FLC's variables, various (control or explicit) parameters may be considered depending on the HVAC system, sensors and actuators such as: • Room Temperature as a thermal comfort index • Relative Humidity • Difference between supply and room temperatures • Indoor Air Quality (CO2 concentration) • Outdoor Temperature • HVAC system actuators (valve positions, operating modes, fan speeds, etc.) As man is more sensitive to temperature than to humidity, most of the comforts airconditioning systems are designed to provide relatively accurate temperature control and relative humidity. Two parameters T (Temperature) and H (Humidity) are controlled by Fuzzy controller system in order to regulate the room temperature and humidity to their desired values, T ref and H ref (Zheng Xiaoqing, 2002 , "Self-Tuning Fuzzy Controller for Air-Conditioning Systems"). The block diagram of the air-conditioning control system is a simple closed loop system as shown in figure 5. www.intechopen.com As it is seen, two independent fuzzy controllers are assigned to control Temperature and Humidity parameters. Error signal and its derivation are fed to each fuzzy controller. The output of fuzzy controllers is assigned as inputs of air conditioner system. The output of system is feedback to controller to make a closed-loop controller. The control strategy used can be expressed by the following linguistic rules: If room temperature is higher than the set point, then increase the supply air fan speed. If room humidity is higher than the set point, then increase the chilled water valve opening. Seven linguistic variables are chosen for each of Temperature and Humidity error and also their derivations as follow:

Elevator system
With the advancement of intelligent computerized buildings in recent years, there have been strong demands for intelligent elevator control with more sophistication and diverse functions. The design criteria of an intelligent elevator control system would include optimizing the movement of a group of elevators with respect to time, energy, load, etc. In this paper, a new elevator group supervisory control system based on the ordinal structure fuzzy logic algorithm is proposed. The system determines the optimum car to answer a hall call using the knowledge and experiential rules of experts. Software has been developed to simulate the traffic flow of three elevator cars in a 15-floor building. The software simulates the movements of the cars as found in practical elevator systems. It can be verified through simulation that the new system can bring about considerable improvements in the average waiting time, riding time, etc. in comparison with conventional methods. In a conventional elevator system, the task of controlling a large number of elevators is numerically evaluated by calculating a specified fixed-evaluation function. It has been realized that knowledge and experiential rules of experts can be incorporated in the elevator system to improve performance. However, such expert knowledge is fragmentary and fuzzy which are difficult to organize. Furthermore, the choice of "good" rules and evaluation functions are too complicated in many cases. It is difficult to adequately incorporate such knowledge into products using conventional software and hardware technology. In order to overcome such problems as described above, a new elevator control system using fuzzy logic algorithm is proposed based on the ordinal structure theory. This system determines the optimum car within a group of elevators to answer a hall call using the knowledge and experiential rules of experts. Instead of using the simple up and down hall call buttons, destination oriented keypads at each floor is used. This system requires the passengers to enter their desired floors on the keypad before they enter the car. The system then assigns the passenger the respective optimal car to take through information displayed on dot matrix displays near the keypad. This new elevator supervisory control system has several objectives which can meet users' satisfaction. It can improve not only the average waiting time, but also the riding time, load, energy and so on. This paper discusses the design and operations of the proposed fuzzy logic elevator control system. In order to achieve good traffic performance, the elevator fuzzy control system uses six kinds of parameters as the control inputs and one parameter for the output. These parameters represent the criteria or objectives to be optimized in this elevator system which are as follows: Priority: Output of the fuzzy controller, where the elevator with highest value will be assigned. As can be observed, it is difficult to configure six kinds of parameters at a time using the conventional fuzzy reasoning method. Thus, the ordinal structure model of fuzzy reasoning is used. With this model, all the fuzzy inference rules are described in one dimensional space for each input and output. The membership function of the inputs and output variables are shown in Figures 9 and 10.