聯系方式

您當前位置:首頁 >> Java編程Java編程

日期:2019-06-01 10:33

Version 1.0 16 May 2019

EH2745 Computer Applications

in Power Systems

Assignment II

Assignment II P4 2018

EH2745 Computer Applications in Power Systems

Overview

The purpose of Assignment II is to let you use the K-Nearest Neighbour algorithm to analyze a

database from a sample power system. You will use the skills you have acquired in Java

programming and Machine learning to implement the algorithm and solve this problem.

As well as in Assignment I, you are free to work on your own or in groups of two.

Assignment

A database of measurements has been developed from conducting power flow on a sample 9 bus

system. The sample 9 bus system has been extracted from CIM XML. The data represents a

number of different operational states in the system, these states are listed below.

High load rate during peak hours

Shut down of generator for maintenance

Low load rate during night

Disconnection of a line for maintenance

The data is made available to you as a relational database and as CSV textfiles. The files are available

on the Canvas Assignment pages.

Task 1: k-Means Clustering

Develop a k-Means clustering algorithm and use it to identify the operational states in the database.

Choose a suitable label for the states and link each cluster to one of the scenarios mentioned above

with logical reason.

Task 2: k-NN Classification

Develop a Java application to identify a previously unknown state of the system based on voltage

measurements using a k-NN algorithm. Validate the developed model with the Test Set. Also

provided.

The assignment is graded as Pass by a group that submits a Java program in accordance with the

requirements stated above.

To Pass with distinction and gain bonus points for the exam, the quality of the solution should

exceed those requirements. Examples of factors that determine the quality of the solution are:

Adherence to good programming style

Flexibility of the program to allow other input data

Presentation of results, and interaction with the program in a GUI

Database and ancillary documents

In Annex 1, the information about the 9 bus power system is provided to help you gain a better

understanding of the system.

In Annex 2, the guide will show how to import the database to MySQL Workbench on your

computers.

Assignment II P4 2018

EH2745 Computer Applications in Power Systems

3

Submission of solutions

The screencast in which you present your solution shall be uploaded on youtube and you will

provide us with link to it. It is necessary that in your screencast you run your code and show the

results as a proof that your code is working.

June 11th 2019 at 21:00

In the screencast, each group member must present approximately 50% of the work. In addition,

you are requested to upload the source code of your solution as an Eclipse archive on github.

Also, with the source code, include a 1-2 page explanation of how you identified and labeled the

power system states.

References and plagiarism

Please note that when solving the assignments co-operation between students is allowed and even

encouraged. However, the project groups are responsible for the content of their own program

and plagiarism will result in an immediate failing of the assignment in addition to a written report

to KTH’s central disciplinary committee. This means that all groups should write their own

programs. You are not allowed to source code from other groups and you are not allowed to copy

source code from the internet.

Assignment II P4 2018

EH2745 Computer Applications in Power Systems

4

Annex 1: Power System information

The single line diagram of the 9 bus system is shown below along with the active and reactive

power of the load and generation busses. These are all the information you need regarding the

power system. Unlike Assignment I, knowledge of line impedances or the y matrix is not needed.

Load Bus number Active Power (Pd)

EH2745 Computer Applications in Power Systems

5

Bus 1 is the slack bus along with generation capable of supplying the system should another

generation falls out of the operation.

Annex 2: SQL Data Import Guide

Follow the guide to successfully import the SQL file and create the database.

Step 1. Save the file “Assignment2_data.sql” to a folder on your PC.

Step 2. Start the MySQL Workbench and start your server.

Step 3. Choose “New Query Tab” to write an SQL script. You have to create a separate

database to store imported data. Write the following two lines and execute them.

create database if not exists subtables;

use subtables;

“subtables” is the name of the database but a name of the database can be changed to any name

so create one of your own choice. On the Navigator panel, choose “Data Import/ Restore”.

Assignment II P4 2018

EH2745 Computer Applications in Power Systems

6

Step 4. Once the “Administration – Data Import” tab opens, choose “Import from SelfContained

File”. Then click on the button next to the folder bar to choose the file you

just saved. On the “Default Target Schema” section choose the database “subtables” or

whatever database name you created in Step 3.

Step 5. Now click on “Start Import” on the bottom of the screen. If you see the message

below, you have successfully imported the SQL database.

Assignment II P4 2018

EH2745 Computer Applications in Power Systems

7

Step 6. In order to view the database, go back to the SQL script you made for “subtables”

and just write the following line and execute it.

select * from analog_meas;

Assignment II P4 2018

EH2745 Computer Applications in Power Systems

8

The first column of the table shows the rdf_ID of the voltage amplitude or angle associated with

the current bus. The second column indicates what kind of measurement is being shown. Given

that these are results from a power flow calculations, the measurements are related to voltage or

angle. The third column shows the value of the voltage or angle. The last column is the rdf_ID of

the substation (or bus in this case) from which the measurement is taken.

If you wish to view the information about the 9 bus (or 9 substation) just type the following line

and execute.

select * from Substations;

Now you have all the information you need to complete the assignment. Good luck!


版權所有:編程輔導網 2018 All Rights Reserved 聯系方式:QQ:99515681 電子信箱:[email protected]
免責聲明:本站部分內容從網絡整理而來,只供參考!如有版權問題可聯系本站刪除。

25选5一等奖多少钱