12
Smarter Grid Solutions Industrial Placement RAFAEL HENRIQUE VARETO Scotland 2014 Computer Science Department of Computer and Information Sciences University of Strathclyde

Industrial Placement Report - SGS

Embed Size (px)

Citation preview

Page 1: Industrial Placement Report - SGS

Smarter Grid Solutions

Industrial Placement

RAFAEL HENRIQUE VARETO

Scotland 2014

Computer ScienceDepartment of Computer and Information Sciences

University of Strathclyde

Page 2: Industrial Placement Report - SGS

Industrial Placement

Rafael Henrique Vareto

November 20, 2014

1 Introduction

The development of Smart Grids is an intelligent way of managing power grids.It gathers information about supplier and consumer behaviours in order to im-prove efficiency and reliability. Smart grids are used on electricity networks,from the power plants and wind farms all the way to home and business con-sumers.

This is a report on my fieldwork placement at a smart grid technology com-pany. It describes most of activities executed during a full-time three-monthlong placement where I could delve into a software development environment.

The report initiates with a description of the organization with which I wasplaced, and an explanation of most of the activities I undertook in the courseof the placement. Then, it proceeds to discuss, analyse and reflect on theprofessional development acquired throughout the placement.

2 The Company

Smarter Grid Solutions (SGS)1 is a prominent dedicated smart grid technologycompany, with departments in Glasgow, London and New York.

The company focuses on Active Network Management [2], which uses soft-ware, automation and control to monitor the electricity grid in real time. Itpermits power companies to enhance the operation of their electricity grid andmanage their associated customers, without compromising safety and security.

Smarter Grid Solutions generates and distributes tools that help electricitydistribution companies and utilities to combine Distributed Energy Resources(DER) [5]. They work with an increasing number of large power corpora-tions and utilities in the UK, mainland Europe and the US, running smartgrid projects for both rural and urban electricity grids.

The company initiated from the notorious Institute for Energy and Envi-ronment at the University of Strathclyde2. It was founded in 2008 to commer-cialise the intellectual property behind Active Network Management and offerit to power companies confronting challenges with constrained electricity grids.Smarter Grid Solutions has since grown from the band of three co-founders to abusiness employing more than 50 people across London, New York and Glasgow.

1http://www.smartergridsolutions.com2http://www.strath.ac.uk

1

Page 3: Industrial Placement Report - SGS

IT in the Company

Having an innovative and technical approach demands a continual update oftechnology so that smart grid services continue to help power companies respondto imminent rises in demand for electricity. As a result, Smarter Grid Solutionsuses Active Network Management (ANM) techniques that enable power com-panies to attain a more flexible and responsive network.

Active Network Management involves a range of software, automation andcontrols that monitor the grid in real time to ensure it remains within its operat-ing constraints. ANM monitors and controls the grid so that power companiesand utilities can use this spare capacity for new connections. This approachcan create up to two or three times more capacity to host new generation anddemand. It includes real-time monitoring and integrated communications, pro-vides a new layer of grid management to enable greater, autonomous interactionwith controlled devices. The software is never switched off. It operates contin-uously, improving visibility and reliability to help tackle challenging technicalissues on the grid. The applications enable power companies and utilities tomaximise use of their existing assets, allowing them to avoid or defer makingcostly upgrades to the grid. This is a significant benefit as it means they canreduce costs for their customers.

Any improvement or new technology must satisfy all relevant standards,codes, and health and safety legislation. As the technology becomes more ad-vanced, this requirement will become increasingly important.

3 The Placement

As part of the Science Without Borders programme (SwB)3 at the University ofStrathclyde, Brazilian students are supposed to spend three months on place-ment with companies located in either Glasgow or the surrounding area.

My placement was at Smarter Grid Solutions, which took place at their mainoffice in Glasgow, but there are two other offices over the world, one in Londonand another in New York. I had a good time there, the company was great andI was working with experienced software engineers in the company’s technologyteam. I was initially offered a fixed term student placement, which began onMonday 2nd June 2014 and was supposed to end on Friday 29th August 2014.My hours of work were from 9.00am to 5.30pm with a one-hour unpaid lunchevery day. However, it seemed the company liked my work during that periodand they wondered if I could work there for a longer period. As a result, SGSextended my internship period through to Friday 31st October 2014.

At first, the software engineers decided that it would be simpler if I startedthe placement testing some software as I would understand how they were ex-ecuted and, consequently, absorb all the necessary information with no greatdifficulties. In the first month at Smarter Grid Solutions, they assigned me totest a set of tools yet in development called SGTest Tool Set. From the secondmonth onwards, I started to develop new features and fix some bugs for thesoftware that was previously being tested.

3Science without Borders (Ciencia sem Fronteiras) is a Brazilian Government scholarshipprogramme which aims to send Brazilian students on undergraduate sandwich courses, PhDsandwich courses and full PhDs to study at top universities around the world.

2

Page 4: Industrial Placement Report - SGS

I was occasionally asked to make adjustments in other projects SGS wasinvolved with while I was developing SGTest due to their higher priority. Inmost cases they were big challenges as I was not familiar with them. For thisreason, it took me some time to understand the project and the code before Icould effectively apply any requested modification. I believe all these demandsturned out to develop my object oriented and programming skills since I had todelve into either C-Sharp’s and Java’s standard libraries and class references.

The following sections will describe, with further details, the tasks and chal-lenges that were assigned to me and, in some cases, how I managed to havethem sorted out.

3.1 Regression Testing

Regression testing [6] is a software engineering technique that consists of re-evaluation of a software’s most recent versions to ensure the software is notfaulty after any sort of enhancement or configuration change.

Basically, there are three different regression testings:

• Test cases that comprise all the functionalities;

• Test cases that only involve the modified functionalities;

• New test cases for all the functionalities that are likely to be affected bythe modifications.

These tests were usually performed whenever there was a bug correction orthe addition of a new functionality. I made those tests in order to guaranteethat no fault resulted from any of the system modification. As you probablyalready know, it is useless to test a system, verify that it is free from bugs forone set of test cases and after system modifications, those test cases are notsuccessfully executed because the new changes can bring flaws to the system.

During my time at the SGS, I used the third test case above mentionedsince it is an efficient way of reduce the amount of faults that can be found ina constantly modified system. The performed regression testing was not onlyused for testing the correctness of the developed programs, but also for trackingthe quality of their output.

3.2 Tool Development

As it was mentioned before, I was responsible for testing the SGTest Tool Setwhen I started the internship at Smarter Grid Solutions. This set of toolscontains three applications: Test Builder and Test Executor. The former wasdesigned to schedule test steps to verify generators behaviour whereas the TestExec runs these test steps. They are independent applications, although theTest Exec can be invoked within the Test Builder.

Two other components were also developed: Test Builder Console and TestScheduler. The console is a programme that can execute a test or set of tests ona simulator or real-world environment through the command line. The Sched-uler is a method of scheduling tests, but now depreciated as I embedded thisfunctionality to the Test Builder.

Generically, SGTest makes it possible to construct tests on deterministicsystems by:

3

Page 5: Industrial Placement Report - SGS

• Inputting values to that system to trigger events.

• Observing and recording whether the triggered actions occurred correctly.

SGTest Tool Set provides a user-friendly way to construct and run tests forSGS ANM Algorithms [2]. These algorithms make use of proven and fail-safeapproaches, avoiding dependence on bad or unreliable data or non-deterministicand iterative simulation methods that could face issues associated with non-convergence or numerical instability. Presently, SGTest is oriented towards SGSPower Flow, but it has enough generic functionality to be used in testing otheralgorithms. SGS Power Flow [4] manages power flows in order to deal withthermal capacity constraints, creating higher capacity in the existing grid. SGSPower Flow can also be used to help connect generation, including renewables,as well as demand and storage devices.

Since I had to test these tools every time a modification was made, I could notuse real grid systems. Therefore, all tests were executed on simulation machines,which behaviour could be configured to be extremely similar to smart grids ineither Orkney or Shetland islands, to name but a few. The simulators couldbe virtual machine or PLC-based4, and they were developed at Smarter GridSolutions as well; however, long before the beginning of my internship.

3.2.1 SGS Test Builder

Test Builder is an Human-Machine Interface allowing user to quickly constructtests, run tests interactively and view test results. Nevertheless, the situationwas completely different when I first arrived at Smarter Grid Solutions. Thesoftware engineers assigned me several tasks in order to turn Test Builder intoa more complete application. As a result, I had to learn C-Sharp [3], a languageI had never used while at university, to ensure all demands were satisfied.

Figure 1: Test Builder interface

4Programmable logic controllers [1] are designed for multiple analogue and digital inputsand output arrangements, extended temperature ranges, immunity to electrical noise, andresistance to vibration and impact.

4

Page 6: Industrial Placement Report - SGS

Initially, the Test Builder only allowed users to create a sequence of test stepsto be executed. Users could also modify test step properties in order to modelpower grid behaviours. Apart from constructing and modifying test steps, allthe other features were developed during my placement period at Smarter GridSolutions. Some of these implemented features will be described in the followingparagraphs.

Test Builder could only work with a single database located in a predeter-mined in-code path. That is, the user could neither change the used database filenor its folder. Consequently, a feature was included to the application in ques-tion in favour of enabling users to work with different database files, regardlessof their location.

There was an application, SGS Test Scheduler, that was only used to de-termine the order test runs5 would be executed. When a test run was beingexecuted, the user did not have any idea of what was going on unless s/hewatched the Test Executor thoroughly since it kept no history record. But evenwatching the progress of the Test Exec was not straightforward to understandwhich test run was running, which failed or lost connection with the simulationserver. At some point, it was figured out that instead of having a stand-alonetest run scheduling component, it could be embedded in the Test Builder. Then,I had the idea of creating a new tab called Test Run to display the executionorder, re-execute, stop and delete scheduled test runs. Each row correspondsto a test run and, as a result, the row colour varies according to the test runresult:

• Cancelled by the User: The user can decide whenever he/she wants to stopa running test. If a test is cancelled, it is always highlighted in yellow.

• Failed: If a test run fails, the corresponding row is displayed in light red.

• Not executed: If a test run has not been executed yet, it is simply displayedin white background.

• Running: When a test runs, the corresponding row is highlighted in lightblue.

• Success: If a test run finishes successfully, its row’s background colour isswitched back to white, however the word Success is added to the columnResult.

In addition to the difficulty of knowing the active test run, the system didnot keep any record of whichever test steps failed or succeeded. That is, ifthere was an error, the user did not have any clue where it happened. Then,elaborating a solution could not be made promptly. Another tab, Test Results,was added to SGS Test Builder with the regard to displaying test step resultsto the user at real time. The row corresponding to the last executed test stepis always highlighted in light blue. This additional feature turned Test Builderinto a much more user-friendly application.

A third tab, Test Errors, was implemented; but unlike the previously men-tioned tab, Test Errors only displays test steps that have failed. Yet, the resultsare also constantly updated. There are figures related to the described tabs atthe attachment section in the end of this document.

5A sequence of test steps scheduled to execute is called a test run

5

Page 7: Industrial Placement Report - SGS

Each one of the tabs above grant the user total management of scheduledtest runs and their respective results:

• If the user decides to use some test builder results in a report, s/he canexport the data to a CSV file and open it with a spread sheet tool. Thesame can be done for the tabs Test Results and Test Errors.

• If the active test run contains an error and the user wants it either restartedor cancelled, s/he just needs to right-click the corresponding row, and thenchoose the wanted option.

• A scheduled test run can also be deleted by simply right-clicking its equiv-alent row and selecting the delete option. The same can also be done forTest Results and Test Errors.

3.2.2 SGS Test Executor

The Test Exec actually runs the tests and stores the results, all in the back-ground as it also runs as a Windows service.

At the beginning, Test Builder and Test Exec were completely independentSGTest Components. The Builder was used exclusively to set the executionorder of all test steps. On the other hand, the Executor did nothing but executethe tests through a straight communication with the simulation server using theSGRest protocol.

By the end of the internship, I managed to make the Executor run as aWindows service and, therefore, could call this service from within the TestBuilder. For the Exec could run in the background, the user would have no ideathat another application (service) was, in fact, executing all the necessary taskssuch as connecting to and modifying simulator’s values.

Figure 2: Invoking Exec from Builder

Picture 2 exemplifies how the user can add a new test run to the executionqueue and execute it using Test Exec as a background running service. To doso, all the user has to do is to right-click in one of the hierarchical nodes andthen choose to Run Test Suite, Group, or Test Set. The hierarchical nodes werecreated to group test steps according to their own characteristics, for example:all test steps that are related to a certain generator can be placed under thesame test group node, however they could be in different test sets if some of thetest steps are intended to release the generator whereas others are to trim it.

6

Page 8: Industrial Placement Report - SGS

As you can see in picture 7, there are different hierarchical nodes: Project >TestSuite > TestGroup > TestSet > TestStep. So, whenever the user wantsto add a node to the execution queue, such as a test suite, test group or testset; all its children test steps will be automatically executed as well. If a nodeis rearranged or deleted, the same will happen, recursively, to all this node’schildren.

4 Link with Academic activity

I do not think I could do any technical task at SGS without all I have learntduring four years at my university in Brazil and the extra year at the Universityof Strathclyde.

Unlike a company’s ambiance, at university students rarely develop an in-terdisciplinary work or assignment. It seems they have to constantly thinkbetween boundaries, and many times with minimal pressure. The latter usuallyis one the great advantages of being in a classroom rather then an office. Eventhough they are completely different environments, they depend on each otheras universities tend to focus on the industry’s trends and needs while companiesdemand good professional training of universities.

At Smarter Grid Solutions, I was constantly involved with different areasof Computer Science such as: Human-Machine Interface, Software Engineering,Computer Networks, Electronics, etc. And besides all that, I could use my skillsto solve and develop a real-world problem. Being in contact with a real-worldproblem is quite motivating, especially when you know that people will actuallydepend on and use the software that was in development.

5 Conclusion

I am certain I have learnt a lot more since I started, especially a new program-ming language: C-Sharp. It’s definitely true you learn a lot more when youwork as I had the opportunity to use part of the knowledge acquired in the pastfive years; besides, the “environment” at a company is completely different ofwhat I was used to so far, which was inside a university laboratory. Now manythings make more sense in my head than when I was just studying, and besidesall that, I ended up improving my network from the moment I applied for allthose internships.

It was great to have the opportunity to have a placement at such a goodcompany, especially when it does not seem so easy to get. From all my flatmates(we were eight), I was the only one who managed to get a placement to fulfilthe SwB programme. Maybe that’s because I started sending e-mails to manydifferent companies, in order to get a placement, early in the period I was inthe United Kingdom and that possibly made all the difference.

I am really thankful to the University of Strathclyde, the Science WithoutBorders Programme and to my professors from the Federal University of OuroPreto. I believe I would not have gone abroad if my professors hadn’t given methe right incentive, and without the financial support from the SwB. I loved thetime I spent at Strathclyde, and every time I needed help, the professors wereready to help me and solve all my doubts.

7

Page 9: Industrial Placement Report - SGS

References

[1] William Bolton. Programmable logic controllers. Newnes, 2009.

[2] R.A.F. Currie and G.W. Ault. Active network management, June 4 2013.US Patent 8,457,801.

[3] Anders Hejlsberg, Scott Wiltamuth, and Peter Golde. The C# programminglanguage. Adobe Press, 2006.

[4] Robert MacDonald, Colin Foote, and Smarter Grid Solutions Ltd-UK. Con-straint analysis techniques for active networks.

[5] D Pudjianto, C Ramsay, and G Strbac. Microgrids and virtual power plants:concepts to support the integration of distributed energy resources. Proceed-ings of the Institution of Mechanical Engineers, Part A: Journal of Powerand Energy, 222(7):731–741, 2008.

[6] Gregg Rothermel, Roland H. Untch, Chengyun Chu, and Mary Jean Harrold.Prioritizing test cases for regression testing. Software Engineering, IEEETransactions on, 27(10):929–948, 2001.

8

Page 10: Industrial Placement Report - SGS

Attachments

Figure 3: Test Builder - tab Test Runs

Figure 4: Test Builder - tab Test Results

9

Page 11: Industrial Placement Report - SGS

Figure 5: Test Builder - tab Test Errors

Figure 6: Test Executor during execution

10

Page 12: Industrial Placement Report - SGS

Figure 7: Nodes hierarchy

11