The objective of this research was to develop control solutions for building services systems and total building energy management methods as well as to demonstrate some new solutions in a real building. The main focus was in residential buildings but many of the results can also be applied to non-domestic buildings. The subtasks of the research dealt with intelligent systems in building energy management in general, control of air-conditioning, heating and lighting, building total energy management and demonstration of the results. Ten new control and energy management solutions were developed. In addition, other theoretical and experimental examinations as well as general inspections were made. First it was found out how learning and intelligent methods have been used in controlling building services and in building energy management. Also the usage of intelligent systems in tuning of controllers was studied. A fuzzy logic based automatic tuner for a PI controller of a heating coil was developed within the project. Effects of the properties of a fuzzy controller on the control result were examined using a simple system. It was found out that the membership functions need to cover the examined area widely enough. In the project, control of water circulated heating was examined. A method was developed that automatically forms a compensation curve between outdoor air temperature and either supply water temperature or supply water pressure. Simulations showed that the curve is found quickly and that average room temperatures stay close to the setpoint. The method developed is simple and it requires only little computation power and memory. If this method would be implemented into all suitable residential buildings in Finland, this would save about 830 GWh of heating energy, about 40 GWh of electrical energy and about 4 million € in maintenance costs annually. The return water of a radiator network can be used as a main energy source for heating coils of air-handling units when the supply air temperature setpoint is kept close to room temperature. In the project, an intelligent and learning room temperature control algorithm was developed for a constant air volume system and was developed further for a variable air volume system. The algorithm suits especially buildings/apartments that are used periodically. The operation of the algorithm was tested in simulations and in experimental tests in a real building. According to the simulations, up to a fifth of both the heating energy and the electricity consumption of fans can be saved in residential buildings during winter. The energy consumption decreases because by using the developed algorithm the room air temperature can be dropped from its normal value and the air flow rate can be reduced when there is nobody present. The temperature can again be raised to its normal level and the building ventilated before somebody returns to the building. The algorithm is able to adapt to the thermodynamics of the building and to learn the time required for the temperature increase. The occupant can prioritize maximum energy saving or comfort by using a control switch accordingly. The algorithm was tested in a low-energy building where the energy consumption is much lower than in a normal modern building. In a tight and well-insulated building the temperature changes are slow, hence the smaller savings. However, even in the lowenergy building the algorithm reduced the already low energy consumption. In addition, an implementation solution of the intelligent indoor control algorithm for a big office complex was made. Also the equivalent Java code was programmed. The optimisation of the energy management of a ventilation system during operation was examined using a mathematical optimisation method. Linear programming was applied in an air heated system for a comfort oriented as well as a cost oriented case. In the cost oriented case, the method clearly favoured heating by increasing the air flow. The method worked well. It was also studied how to implement an automated ventilation control method in a residential building with centralized exhaust ventilation or with separate supply and exhaust ventilation in each apartment. If the air flows in each room can be controlled with control dampers, the method enables the ventilation to be steered into the rooms where it is needed the most. Based on the study, a practically workable control solution was presented. Issues related to integrated control of artificial light and daylight were studied. In addition, a fuzzy logic based algorithm for integrated control of natural daylight and blinds combined was developed. Simulation results in different daylight conditions showed that the controller worked satisfactorily. A total energy management problem was discussed. The total energy management concept was dealt with using a case study. In addition, properties of an intelligent system integration were clarified. It is essential that the intelligent system integration means more than just an open data transfer. Depending on the case, energy savings of about 10.40% can be reached by using intelligent system integration. Using real measurements, factors affecting the total energy consumption of a residential building were examined to be used in a neural network or a fuzzy logic model predicting the energy need. A linear regression model was formed to predict the power consumption. Relatively good predictions for heating powers were easy to calculate even with a simple linear model. Reliable information on occupancy is needed in advanced control of building services systems. Hints can be received for example from occupancy sensors, by monitoring water or electricity consumption or carbon dioxide concentration, or by a combination of the previous. Security systems are likely to convey the most reliable information in this respect.