By Ivan Surya 1 111 2030
BACHELOR’S DEGREE in
MECHANICAL ENGINEERING – MECHATRONICS CONCENTRATION FACULTY OF ENGINEERING AND INFORMATION TECHNOLOGY
SWISS GERMAN UNIVERSITY EduTown BSD City
Tangerang 15339 Indonesia
August 2016
Revision after Thesis Defense on 26th July 2016
STATEMENT BY THE AUTHOR
I hereby declare that this submission is my own work and to the best of my knowledge, it contains no material previously published or written by another person, nor material which to a substantial extent has been accepted for the award of any other degree or diploma at any educational institution, except where due acknowledgement is made in the thesis.
Ivan Surya
____________________________________________
Student
_____________
Date
Approved by:
Prof. Dr.-Ing. Egon Ortjohann
____________________________________________
Thesis Advisor
_____________
Date
Dr. Rusman Rusyadi, B.Sc, M.Sc.
____________________________________________
Thesis Co-Advisor
_____________
Date
Dr. Ir. Gembong Baskoro, M.Sc.
____________________________________________
Dean
_____________
Date
ABSTRACT
DEVELOPMENT OF A REAL-TIME SCHEDULER SYSTEM WITH API FOR LINUX BASED SMART GRID SYSTEM
By Ivan Surya
Prof. Dr.-Ing. Egon Ortjohann, Advisor Dr. Rusman Rusyadi, B.Sc, M.Sc, Co-Advisor
SWISS GERMAN UNIVERISTY
Presently, smart grid concept has been promoted worldwide. The main targets of the concept are to increase the efficiency of power system operation and facilitate the grid integration of renewable energy sources. In this thesis scheduler software functions have to be developed on Linux operating system platform. The functions are expected to enable smart power system operation on distribution management system (DMS). In combination with communication technologies, the functions can interact with distributed intelligent power components. More specifically, the tasks in this thesis include enabling multi-controller capability for the real-time scheduler system, using web service description language to controller the scheduler functions, executing binary files stored in the database to operate the management system, implementing a professional logging system, and developing an API for the real-time scheduler system.
Keywords: Smart Grid, Controller, Scheduler, Task, RabbitMQ, MySQL, JSON, C Programming, Notepad++, Rapid Prototyping, Renewable Energy, Mantis BugTracker, SmartSVN.
© Copyright 2016 by Ivan Surya All rights reserved
DEDICATION
I dedicate this work to my family, my advisor and co-advisor, all of my lecturers, my supervisor and my closest friends.
ACKNOWLEDGEMENTS
First of all I wish to express my gratitude to Prof. Dr.-Ing. Egon Ortjohann and the people that works at Power Systems and Power Economics Laboratory in South Westphalia University of Applied Science for their support and patience.
I would also like to especially thank Mr. Andreas Schmelter and Mr. Sasiphong Leksawat who both have greatly helped me for completing this thesis work and taught me how to write a good and professional looking documentation.
I thank my family, especially my father and mother who are always there when I am at my worst and to always have a confidence in my abilities to not only complete a degree, but to complete it with excellence.
To all lecturers of Mechatronics Engineering for knowledges and insights that they have shared to me during my study at Swiss German University.
To my friend, Janice Yip who indirectly and constantly motivates me to finish my work.
To my colleague, Kelvin Susanto for his help in my thesis work notably in WSDL.
And last but not least, to my Mechatronics Engineering 2012 classmates, especially my group of close friends; Charles Logis, Dennis Adrian Tjahjadi, William Irawan, Nicolas Aditya Siswanto, Johan Soegiharto, Samuel Loanka, Kevin Tirtaatmadja, and Kevin Susanto for the last 4 years and for their support and assistance during my thesis work.
TABLE OF CONTENTS
Page
STATEMENT BY THE AUTHOR ... 2
ABSTRACT ... 3
DEDICATION ... 5
ACKNOWLEDGEMENTS ... 6
TABLE OF CONTENTS ... 7
LIST OF FIGURES ... 12
LIST OF TABLES ... 16
CHAPTER 1 - Introduction ... 17
1.1 Background ... 17
1.2 Problem Statement ... 18
1.3 Thesis Purpose ... 19
1.4 Hypothesis ... 19
1.5 Thesis Scope ... 19
1.6 Thesis Limitation ... 20
1.7 Significance of Study ... 20
CHAPTER 2 - Literature Review ... 21
2.1 Smart Grid ... 21
2.1.1 Decentralized System ... 22
2.2 Smart Grid Cluster Controller ... 22
2.3 Linux ... 24
2.3.1 Philosphy of Linux ... 25
2.3.1.1 Command-Line Interface ... 26
2.3.1.2 Linux User ... 27
2.3.1.3 Linux Path Structure and Commands ... 28
2.3.2 Community Enterprise Operating System (CentOS) ... 31
2.3.3 Debian ... 32
2.4 MySQL Database ... 32
2.4.1 MySQL DBMS ... 33
2.4.2 MySQL Connector/C ... 35
2.5 RabbitMQ ... 37
2.5.1 Benefits of RabbitMQ and JSON in the Real-time Scheduler System .. 38
2.5.2 Erlang Programming Language ... 38
2.6 Web Service Description Language ... 39
2.6.1 Types ... 40
2.6.2 Message ... 41
2.6.3 Port Type ... 42
2.6.4 Binding ... 42
2.6.5 Port ... 43
2.6.6 Service ... 43
2.7 Java Script Object Notation ... 46
2.7.1 JSON Schema ... 48
2.8 C Programming Language ... 50
2.8.1 C Design ... 50
2.8.2 C Programming Language Overview ... 51
2.9 Editor Software Notepad++ ... 53
2.10 Subversion and SmartSVN ... 54
2.11 Mantis Bugtracker ... 56
3.2 Methodology Used – Rapid Prototyping ... 58
3.3 Planning ... 60
3.3.1 Exploratory ... 60
3.3.2 Define Objectives and Scope ... 60
3.4 Analyzing ... 61
3.4.1 System Requirements Identification ... 61
3.4.2 Inspect the Pertinent Tools ... 62
3.5 Design ... 62
3.5.1 Develop the Process Outline ... 62
3.6 Implementation ... 63
3.6.1 Identify, Design, and Produce Independent Sub-Process ... 63
3.6.2 Testing Process - Simulation ... 64
3.6.3 Address Technical Complications ... 64
3.6.4 Address Non-Technical Complications ... 64
3.7 Checking Prototype ... 64
CHAPTER 4 - Results and Discussion ... 66
4.1 Introduction ... 66
4.2 Planning ... 66
4.2.1 Exploratory ... 66
4.2.2 Define Objectives and Scopes... 68
4.3 Analyzing ... 69
4.3.1 System Requirements Identification ... 69
4.3.2 Inspect the Pertinent Tools ... 71
4.4 Design ... 72
4.4.2 Design the Sub-Process ... 74
4.4.3 Real-time Smart Grid Scheduler System ... 74
4.4.3.1 Controller ... 77
4.4.3.2 Schedule ... 82
4.4.3.3 Task ... 93
4.4.4 Real-Time Scheduler System Database ... 97
4.4.5 Application Program Interface Function ... 105
4.4.5.1 JSON-C Implementation ... 111
4.4.5.2 JSON-Queue-Tool ... 116
4.4.5.3 Message-Sender-Tool ... 116
4.5 Implementation ... 121
4.5.1 Testing Process - Simulation ... 121
4.5.2 Address Technical Complications ... 125
4.6 Results Conclusion ... 126
4.6.1 Environment ... 126
4.6.2 Performances ... 127
4.6.3 Address Non-Technical Complications ... 127
CHAPTER 5 – CONCLUSIONS AND RECOMMENDATIONS ... 130
5.1 Conclusions ... 130
5.1.1 Real-Time Scheduler System Multi-Controller Capability ... 130
5.1.2 Scheduler System API ... 131
5.1.3 Scheduler Functions Controlled by WSDL, JSON, and RabbitMQ .... 131
5.2 Further Studies ... 131
CURRICULUM VITAE ... 139