Yazılım tanımlı ağlar ve nesnelerin interneti temelli akıllı şebekelerde anomali tespiti
Anomaly detection in smart grids based on software-defined networks and the internet of things
Yazar: HİLAL YILDIZ
Danışman: DR. ÖĞR. ÜYESİ MUSA BALTA
Sakarya Üniversitesi / Fen Bilimleri Enstitüsü / Bilgisayar Mühendisliği Ana Bilim Dalı / Siber Güvenlik Bilim Dalı
Derece: Yüksek Lisans, 2023
Konu: Bilgisayar Mühendisliği Bilimleri-Bilgisayar ve Kontrol = Computer Engineering and Computer Science and Control

Özet:
Günümüzde kullanılan geleneksel elektrik şebekelerinin sahip olduğu güvenilirlik sorunları, maliyet verimsizliği ve arz talep dengesinin sağlanamaması gibi olumsuzluklar yeni bir teknolojinin geliştirilmesine zemin hazırlamıştır. Son yıllarda adından sıkça söz ettiren akıllı şebekeler, esneklik, ölçeklenebilirlik, programlanabilirlik ve güvenilirlik gibi özellikleriyle bu ihtiyaca cevap verebilecek nitelikteki bir teknolojidir. Enerjinin üretim, iletim, dağıtım ve tüketim aşamalarında verim sağlarken sürdürülebilir enerji üretimini de destekler. Bunların yanı sıra, birçok cihazın ve protokolün bir arada çalıştığı heterojen ağ yapısı sebebiyle çeşitli zorlukları da beraberinde getirmektedir. Akıllı şebekelerdeki bu sorunların çözümü olarak önerilen SDN (Software Defined Networks, Yazılım tanımlı ağlar) ağ paradigması, merkezi yönetim sistemiyle ağ kaynaklarının kontrol edildiği bir teknolojidir. Cihazların performansını, izlenebilirliğini ve güvenliğini artırması sebebiyle SDN'nin akıllı şebeke ile entegrasyonu, enerji sektörünü daha verimli, güvenli ve sürdürülebilir bir hale getirirken aynı zamanda akıllı şebekelerin gelecekte daha yaygın kullanılması için önemli bir adımdır. Bunlarla beraber bu entegrasyon, enerji tüketicilerine, doğru faturalandırma ve tüketim analizi imkanı da tanır. Bunun ana sebeplerinden biri olan akıllı sayaçlar, akıllı şebekelerde tüketim alanındaki evlerde enerji üretim ve tüketim verilerinin anlık elde edilmesini sağlamaktadır. Günümüzde evlerde kullanımı oldukça yaygınlaşan IoT (Internet of Things, Nesnelerin interneti) destekli cihazların gelişmiş veri toplama ve işleme özellikleri, akıllı sayaçların sağladığı avantajlar ile birleştirildiğinde tüketicinin, evindeki enerji tüketimini anlık olarak izleyebildiği bir sistem haline gelir. Bu sistem, günümüzde oldukça yaygınlaşan akıllı ev sistemleridir. 
Tüm bunlar ışığında bu tez çalışmasında, hem bahsi geçen teknolojilerin nasıl bir arada kullanılabileceğine dair bir bakış açısı sunmak hem de sonraki akademik çalışmalarda kullanılmak üzere gerçek enerji tüketim verilerini elde edebilmek amacıyla yazılım tanımlı ağlar ve nesnelerin interneti temelli akıllı ev mimarisi önerilmiştir. Önerilen bu mimari, günümüz akıllı ev sistemleri ve kullanıcıların beklentilerine göre tasarlanmış ve ardından Mininet isimli simülatörde gerçeklenmiştir. Akıllı evde bulunması planlanan 8 akıllı cihazın enerji tüketim bilgileri, detaylı literatür ve sektör araştırmaları sonucunda elde edilerek simülasyonunu sağlayacak kodlar geliştirilmiştir. Bu kapsamda simülatör çalıştırılarak bu tez çalışmasının bir diğer çıktısı olan enerji tüketim değerlerine ait veri seti oluşturulmuştur. Bu veriler, evdeki cihazlara karşı yaşanabilecek olası siber saldırıları da içerebileceğinden bunun tespiti için makine öğrenme algoritmaları kullanılarak enerji tüketiminin normal/anormal sınıflandırılması yapılmıştır. Kullanılan 6 farklı algoritmanın performans karşılaştırmasında rastgele orman modelinin en yüksek performansa sahip olduğu görülmüştür.

Abstract:
The problems such as reliability problems, cost inefficiency and supply-demand balance of the traditional electricity networks used today due to old technologies and one-way communication systems have paved the way for the development of a new technology. Smart grids, which have made a name for themselves in recent years, are a technology that can meet this need with their features such as flexibility, scalability, programmability and reliability.
It is possible to forecast energy demand and production, optimize energy resources and manage energy consumption thanks to the features of smart grids based on instant data collection, analysis and processing at every stage of energy generation, transmission, distribution and consumption. It is also important in terms of energy efficiency, as it prevents imbalances between energy demand and production, enabling more efficient use of energy resources. Thanks to real-time monitoring and management of energy consumption, it offers consumers the opportunity to consume energy at lower prices and real-time billing. In addition, the energy consumption habits of consumers are monitored, and suggestions are made to save energy.
Because of these advantages, smart grids are considered as an important part of the transformation process in the energy sector. However, some concerns such as energy security and privacy protection during the development and implementation of these systems are among the issues that are gaining more and more importance with the rapid spread of smart grids. In addition, due to the heterogeneous network structure in which many devices and protocols work together, it brings with it various difficulties. Examples of these challenges are managing integrated structures and solving problems.
SDN (Software defined networks) paradigm is suggested as a solution to such problems in smart networks. Based on the control of network resources with a central management system, this technology offers a different approach from traditional methods. In traditional network management, the control function is built into the network devices and the devices work in a structure that is connected to each other with fixed links. In other words, network components perform network management and control by communicating directly with each other thanks to the operating systems on them. On the other hand, in SDN technology, network management and control are performed by a central software controller, and connections between network components are created and managed on a software basis. The SDN structure is based on the separation of bus and control planes in the network. Network traffic is routed and managed in the bus plane, while centralized control of the network is provided in the control plane. Thanks to this working structure, the performance of the devices can be better managed, new services can be deployed more quickly, and the security of the network can be ensured more effectively.
The integration of SDN with the smart grid, as it increases the performance, traceability, and security of devices, is an important step for the future use of smart grids more widely, while making the energy sector more efficient, secure and sustainable. However, this integration plays an important role in how smart grids deal with heavy data traffic, thanks to the granularity feature of SDN. In addition, the heterogeneous structure of smart grids with different standards and protocols can achieve high performance with the management of the SDN controller. On the other hand, with this integration, energy consumers are provided with the opportunity of accurate billing and consumption analysis. Smart meters, which is one of the main reasons for this, provide instantaneous acquisition of energy production and consumption data in houses in the consumption domain of smart grids. These data obtained through smart meters can be collected and analyzed. In this way, it becomes possible for consumers to save money by monitoring their energy consumption habits.
IoT (Internet of Things) supported devices, which are widely used in homes today, are especially important in terms of collecting energy consumption data in a wider range. These devices can be white goods such as washing machines, refrigerators, dishwashers, as well as lighting, air conditioning systems or other sensor devices. IoT powered devices help transfer energy production/consumption and process data more accurately and reliably. This data then allows consumers to monitor and optimize their energy consumption in their homes. In addition, energy suppliers can use this data to manage their resources and become more efficient in terms of energy consumption. When these advanced data collection and processing features of IoT supported devices are combined with the advantages of smart meters, it becomes a system where the consumer can instantly monitor the energy consumption in their home. This system is called smart home systems, which are very common today.
Examples of IoT supported smart home systems are smart lighting, heating, security systems, air/water quality monitoring, smart lock systems and energy management systems. These automation systems aim to facilitate human life by personalizing the control of living spaces. Thanks to IoT devices, homeowners can control these systems remotely and make their daily lives easier. For example, monitoring energy use with a smart thermostat can optimize energy consumption by controlling the temperature in the home, which can also help homeowners save energy.
Monitoring and management of the smart home system is possible with the existence of a central management system. An example of this is the HEM (Home Energy Management) software. HEM software can be explained as a system in which energy consumption data is read from devices and managed according to user demands via the control panel. Devices in the smart home send their data here. Processes such as the analysis and processing of this data, the management of the house within the framework of certain rules and the storage of system data are carried out by HEM. Thanks to this software, users are given detailed information about the status and energy consumption of smart devices in their homes. Thus, the traceability of the smart home and the manageability of energy consumption are ensured.
All these technologies have some disadvantages as well as the advantages provided by their own working structures and integrations. For example, smart grids are vulnerable to cyber-attacks due to their heterogeneous structure that includes many different devices and protocols. Since the devices and energy consumption habits of consumers can be monitored in the smart grid architecture, it focuses on violating the private life of individuals. These data, collected for reasons such as increasing energy efficiency and offering lower energy bills to consumers, constitute an important weakness in the protection of privacy. For this reason, it is necessary to take measures to protect private life in smart grids.
The use of SDN technology in smart networks also brings some security problems. The single point failure problem that SDN has due to its controls structure is a major security problem as it can make network systems vulnerable. While this issue can be circumvented by decentralizing SDN management using multiple controls, the newly exposed problem of a malicious node acting as controls is another challenge.
On the other hand, although the widespread use of IoT technologies provides great convenience in human life, it leads to security vulnerabilities and various risks if precautions are not taken. Privacy and security risks, risk of exposure to cyberattacks, data integrity issues, and network compatibility issues are among the risks that need attention. IoT devices form a network by connecting to each other over the internet, and the intervention of unauthorized persons in these networks may pose a security risk. In addition, the differences between these devices and the security of the different networks used also greatly affect IoT security.
These security issues are a major concern, especially when it comes to IoT-based smart homes. For example, cyber attackers can control the heating or cooling systems of the house. They can cause property damage by increasing their energy bills, or worse, they can cause a fire in the house by manipulating the heating system, causing loss of life and property. In addition, cyber attackers can also gain access to the personal data of the hosts. This data may include information about the host's movements, preferences, habits, location information, and even health.
As a result, the security of smart grids, SDN and IoT-based smart homes should be brought into focus and necessary precautions should be taken. Various security mechanisms can be used for this, such as network traffic monitoring, intrusion detection and prevention systems, firewalls, authentication and data traffic encryption.
In the light of all these, in this thesis, software-defined and IoT-based smart home architecture is proposed in order to both provide a perspective on how the mentioned technologies can be used together and to obtain real energy consumption data to be used in future academic studies.
In this architectural structure, the smart network structure proposed by NIST and consisting of 7 components (generation, transmission, distribution, consumption, market, service provider, management) was planned on the basis of SDN and the home area network within the consumption domain was designed as an IoT-based smart home system.
The proposed architecture in the study is modeled using a network virtualization tool called Mininet. In order to run the model in the simulation environment, the studies in the sector and the literature were examined in detail and the factors affecting the energy consumption and consumption values were determined for each smart device. In the light of the obtained parameters, a software has been developed that runs the model in the simulation environment in a realistic way. This software can imitate the energy consumed by the devices within the framework of the main features (energy class, volume, program, etc.) that affect the energy consumption.
In the second stage of the study, comprehensive working scenarios were determined by considering today's smart home structures and user profiles. System and consumption data were collected by running the scenarios in the simulator environment. The data set, which is an output of the study, was created by arranging the generated data in an appropriate format. The data set was prepared by considering previous studies to contribute to the literature. In addition, a second data set including home attack scenarios was created to examine smart home systems within the framework of cyber security.
In the third stage of the study, the performance comparison of machine learning algorithms was made in the detection of anomalies in the created data sets. While choosing the algorithms to be used, attention was paid to the compatibility with the data set as well as the fact that it was preferred in other studies in the literature in terms of comparison. As a result, it has been concluded that the artificial neural network model has the best performance for anomaly detection in the smart home system energy consumption dataset.