0 views

Uploaded by Chân Gà Nướng

- Design of Delta Sigma Modulators for Integrated Sensor Applications
- Cherry Thesis
- The Technology of Computer Music 1969
- multirate signal processing.pdf
- Elective 3
- Lal Kishore Supposedly 1
- Worksheet 33 A level
- Datasheet DVB-C Channel Receiver
- Ms Operating Manual MS 1
- BLUE_EYES
- TRKx 10DC4ER Datasheet D
- 18. FPGA-Based Fused Smart-Sensor for Tool-Wear Area Quantitative Estimation in CNC Machine Inserts
- DE-2-India Bix
- Doc-Automatic Light Control
- Camshaft Sensor (2)
- DAC
- lmh6518
- GET-8502.pdf
- dd11
- 7UM62xx_Manual_A7_V046300_en

You are on page 1of 14

060042 Bucharest, Splaiul Independenţei, nr. 313, sector 6

Parallelization of a Power System Protection

Algorithm

Master of Engineer

by

Buddhika Priyashantha KANDAMULLA ARACHCHIGE

Supervised by

Assoc. Prof. Dr. Ing. Catalin PETRESCU

This Bachelor Thesis study was conducted at Faculty of Automatic Control and Computers, UPB

University POLITEHNICA of Bucharest

FACULTY OF AUTOMATIC CONTROL AND COMPUTERS

Departament of Power Systems Engineering

060042 Bucuharest, Splaiul Independenţei, nr. 313, sector 6

CONTENTS

CHAPTER 1 – Intorduction.......................................................................................................3

2.1 Frequency Calculation..................................................................................................................4

2.2 Amplitude and Phase Angle Calculation.......................................................................................8

2.3 Calculation of Different Parameters for the algorithm..................................................................9

REFERENCES.................................................................................................................................14

Acronyms

AC Alternative Current

ADC Analog to Digital Converter

API Application Programming Interface

CT Current Transformer

DC Direct Current

DSP Digital Signal Processor

FDC Fault Detection Core

FPGA Field Programmable Gate Array

IEEE Institute of Electronic and Electrical Engineers

MV Medium Voltage

OpenMP Open Multi-Processing

PAC Protection Algorithm Core

RCA Relay Characteristic Angle

SPC Root Mean Square

TDMS Test & Data Management Software

VT Voltage Transformer

2

University POLITEHNICA of Bucharest

FACULTY OF AUTOMATIC CONTROL AND COMPUTERS

Departament of Power Systems Engineering

060042 Bucuharest, Splaiul Independenţei, nr. 313, sector 6

Chapter 1: Introduction

Distance Protection algorithm is widely used in Power System Protection. In this thesis work

it is suggested to implement and analyze this algorithm.

During this semester mostly focused on signal processing of the input signal. Frequency

calculation algorithm is simulated in Matlab in order to verify its correct functionality. After

that the algorithm was implemented in C programming language as a serial programming

code. Here instead of voltage and current inputs, around 6000 ADC values with 12 bit

resolution were used. 24 kHz sampling frequency was used.

Also as future work for next semester, code analyzing Oracle Sun Studio Analyzer. Based on

the analyzer’s result possible optimization methods will be implemented. Also serial will be

transformed in to a parallel code. Fork-Join Model will be used for penalization and

OpenMP will be used as the API.

3

University POLITEHNICA of Bucharest

FACULTY OF AUTOMATIC CONTROL AND COMPUTERS

Departament of Power Systems Engineering

060042 Bucuharest, Splaiul Independenţei, nr. 313, sector 6

a. Input signal’s frequency calculation

b. Input signal’s amplitude and phase angle calculation using Discrete Fourier

Transform

c. Calculation of Different Parameters for the algorithm

The goal of this frequency calculation algorithm is to find out time interval between two

successive zero-crossing points t1 and t2 .

t1 t2

Once two successive zero crossing points are known frequency of the wave can be calculated

as following equation.

1

f =

2(t2 - t1 )

In order to calculate zero crossing point following method is used in the algorithm.

Step 1: As shown in Fig. 2.1, data samples related to a half cycle are save in a memory buffer.

For the next half cycle data values will be rewrite in the same memory buffer. Let’s consider a

50 Hz signal and 24 kHz sampling frequency.

Number of samples per sec. = 24 000 samples

24000 1

Nr. Of samples per cycle = � s = 480 samples/cycle

1s 50

4

University POLITEHNICA of Bucharest

FACULTY OF AUTOMATIC CONTROL AND COMPUTERS

Departament of Power Systems Engineering

060042 Bucuharest, Splaiul Independenţei, nr. 313, sector 6

So, there will be around 240 data samples to be saved in the memory buffer.

Saving data samples into memory buffer is done, only when data samples are within V_min

and V_max.

V_max

t1

V_min

So in algorithm first two consecutive V_min and V_max values are sorted. Then only sample

values between V_min and V_max are selected. The condition is fi V_max finds first, then

save in to buffer all values, until V_min is met. If V_min is the first, save all values into

buffer until V_max is met.

Now approximately 240 data samples are find out in ascending or descending order

(depending on which half cycle). But these values are just positive values. Since ADC

samples are 12 bit highest possible value is 4096 and minimum value is 0. So Medium value

is 2048.

To convert data samples above 2048 positive and below 2048 negative, following equation is

used.

V [i] = V [i ] - 2048

Step 2: Choose 17 data samples closest zero crossing point of the input signal

There can be used two methods to find out 17 data samples around zero-crossing point. It is

very important to choose exact 17 data samples, because in matrix calculation it is considered

there are exat 17 data samples in the V[i] matrix.

Method 1: Consider 2048 as medium data point and select 8 data samples above and

below of 2048.

Method 2: Choose 17 data samples which moves from 1 to 240 (1-17, 2-18, 3-19 etc).

In each instance calculate sum of 17 data samples. Observe the sign of the sum and select the

first data sample of which sign of the sum changes. In this thesis this method was

implementd.

5

University POLITEHNICA of Bucharest

FACULTY OF AUTOMATIC CONTROL AND COMPUTERS

Departament of Power Systems Engineering

060042 Bucuharest, Splaiul Independenţei, nr. 313, sector 6

interpolate on 17 data samples

this range

Here the target is to find out polynomial equation which lie on those selected 17 data samples.

To achieve higher accuracy 3rd order polynomial equation is selected to fitting 17 data

samples.

y = Ax 3 + Bx 2 + Cx + D

Y = V [-8]

X=8

X=-8

V [8]

6

University POLITEHNICA of Bucharest

FACULTY OF AUTOMATIC CONTROL AND COMPUTERS

Departament of Power Systems Engineering

060042 Bucuharest, Splaiul Independenţei, nr. 313, sector 6

Here the target is to find out polynomial equation which lie on those selected 17 data samples.

To achieve higher accuracy 3rd order polynomial equation is selected to fitting 17 data

samples.

Let’s consider when x = -8. Here X-axis means time axis. So distance between two data

samples (x = -8 and x = -7) is a sampling period.

For x = -8, if voltage value is V [-8], this is the value on Y-axis.

matrix form as follows.

(-8)3

� (-8) 2 (-8) 1� �Vn -8 �

� 3 � �

(-7)

� (-7) 2 ( -7) 1� �Vn -7 ��

�

(-6)3 (-6) 2 ( -6) 1� �Vn -6 �

� 3 � � �

(-5)

� (-5) 2 (-5) 1� �Vn -5 �

�

(-4)3 (-4) 2 ( -4) 1 � �Vn - 4 �

� 3 � � �

(-3)

� (-3) 2 (-3) 1� �Vn -3 �

�

(-2)3 (-2) 2 ( -2) 1 � �V �

� � �A � �n - 2 �

(-1)3

� (-1) 2 (-1) 1� � � � Vn -1 �

� ���B� � �

�0 0 0 0� = Vn

�C� � �

�13 12 1 1� � � � Vn +1 �

� 3 �� D� � �

�2 22 2 1� �Vn + 2 �

�33 32 3 1� �Vn +3 �

� 3 � � �

�4 42 4 1� �Vn + 4 �

�53 52 5 1� �V �

� 3 � �n + 5 �

�6 62 6 1� �Vn + 6 �

� 3 � �V �

�7 72 7 1� �n + 7 �

�

�8

3

82 8 1�� �

�Vn +8 ��

C[4][1] = V[17][1]

X [17][4] �

For further simplicity let it denote as

X�C=V

Using least squares method coefficients of the 3rd order interpolant polynomial can be find as

follows:

( )

-1

C = XT X XT . V

1 44 2 4 43

X_const

7

University POLITEHNICA of Bucharest

FACULTY OF AUTOMATIC CONTROL AND COMPUTERS

Departament of Power Systems Engineering

060042 Bucuharest, Splaiul Independenţei, nr. 313, sector 6

Step 4: Calculate Y-axis values, when X-axis values are -8, 8 and centre point of the range.

Y = V [-8]

Zero-crossing point

Y = V [0]

X=8

X=-8 X=0

Y = V [8]

Since V[-8] and V[0] have same sign, it is clear zero-crossing point is not within that range.

So we can halve the searching range by removing values from X = -8 to X = 0. By repeating

the process 4 times, we can find out closest two data points (above and below) to the zero-

crossing point.

If we continue the process for the 5th time, then centre point would be half away from each

data point. Let’s consider finally remained X = 1 and X = 2. Then centre point would be

X=1.5. If zero-crossing point is between X=1 and X=1.5. So the closest data point to the zero

crossing point is X=1.

To calculate time stamp ( t1 ) when zero crossing was happened for the first time, a data sample

count from X_min or X_max to X=1 should take. Let’s imagine data sample count is 125.

1000ms

t1 = �125 ADC samples = 5.02ms

24000 ADC samples

Since input signal’s sampling frequency is 24 kHz, there are 480 sampling values per period.

Using discrete Fourier Transform basic component of the signal is calculated.

8

University POLITEHNICA of Bucharest

FACULTY OF AUTOMATIC CONTROL AND COMPUTERS

Departament of Power Systems Engineering

060042 Bucuharest, Splaiul Independenţei, nr. 313, sector 6

2 N -1 � 2p i 2p i �

B= ��

N i =0

V(i) �

�cos

� N

- j sin

N �

�; Where N = 480

�Bimag �

Amplitude of the signal is V = Breal

2

+ Bimag

2

and phase angle is q = arctan � �

�Breal �

The algorithm can be adapted to any type of short circuit situation of the power system. In this

thesis work, for simplicity only a Single Phase to Ground short-circuit current is considered.

So the impedance used in the algorithm is Phase to ground impedance ( Z P -G ). Also

algorithm needs three phase currents and voltages.

VP -G

Z P -G =

I P -G + 3 �k0 �

I0

I0 � �

� 1 1 1 �� IA �

� � 1 � 2 �� �

I1 �= �

� 1 a a � �

�I B �Where a = e j 2p 3

3

�

� � �

I2 � 1 a2 a �

� ��

�IC ��

V0 � �

� 1 1 1 �� VA �

� � 1 � 2 �� �

V1 �= �

� 1 a a �� VB �Where a = e j 2p 3

�

3

�

� � �

V2 � 1 a2 a �

� ��

VC �

� �

V0 V1 V2

Z0 = , Z1 = and Z 2 =

I0 I1 I2

iii. Constant k0

( Z 0 - Z1 )

k0 =

3� Z1

9

University POLITEHNICA of Bucharest

FACULTY OF AUTOMATIC CONTROL AND COMPUTERS

Departament of Power Systems Engineering

060042 Bucuharest, Splaiul Independenţei, nr. 313, sector 6

Beforehand, the algorithm was tested using MATLAB, in order to verify the accurate

functionality of the algorithm. When algorithm implemented in MATLAB, calculated

frequency values as follows. The result is vary form 50.018 Hz to 50.026 Hz, and it confirms

algorithm is quite accurate.

1. Algorithm is adapted only one single type of fault (Phase to Earth Short-Circuit) can

be occurred in power systems.

2. Currents and Voltages of healthy phases, before the fault and during the steady-state

short current, remain same.

10

University POLITEHNICA of Bucharest

FACULTY OF AUTOMATIC CONTROL AND COMPUTERS

Departament of Power Systems Engineering

060042 Bucuharest, Splaiul Independenţei, nr. 313, sector 6

Only current and voltage change in faulted phase was taken into consideration. Current and

voltage of healthy phases are considered as constants.

3. For each current and voltage input signal, two files were created with approx. 6000 of

ADC readings with 12 bit resolution

Approximately 6000 (Approx. for 12 cycles) ADC readings with 12 bit resolution of a 100V

analogue voltage signal were generated to represent voltage signal. These ADC readings are

stored in a text file called “Voltage_measurement.txt” and the programme directly read ADC

values from that file.

So, 100 V = 4096 and 0V = 0. And the sensitivity is 100V/4096, which is approximately 24

mV. On the other words voltage changes less than 24 mV will not be take into consideration.

As an example:

4096

ADC reading for 68 V = �68 V ; 2785

100 V

11

University POLITEHNICA of Bucharest

FACULTY OF AUTOMATIC CONTROL AND COMPUTERS

Departament of Power Systems Engineering

060042 Bucuharest, Splaiul Independenţei, nr. 313, sector 6

In the same way, another 6000 (Approx. for 12 cycles) ADC readings with 12 bit resolution

for 1A analogue current signals were generated to represent current signal. These ADC

readings are stored in a text file “Current_measurement.txt”.

In each text files for current and voltage, contains around 5300 Pre-fault ADC values and

around 700 Fault Steady-state ADC values of Phase to Earth Short-Circuit.

12

University POLITEHNICA of Bucharest

FACULTY OF AUTOMATIC CONTROL AND COMPUTERS

Departament of Power Systems Engineering

060042 Bucuharest, Splaiul Independenţei, nr. 313, sector 6

ii. Analyze the serial code using Sun Studio Analyzer of UPB’s NCIT cluster

resource.

iii. Code Parallelization

There are number of methods can be adapted to improve the code performance. Using

assembly language, slower segments of the code can make more efficient. In this particular

case among all other optimization methods, parallelization can be considered as most

important method to improve code efficiency and to reduce computational time.

At the moment code is written as a serial code. In order to transform serial code into a parallel

code, Fork-join Model is selected. OpenMP is chosen as Application Programming

Interface (API)

According to the Fork-join model, in code there would be parallel segments of the code and

parallel segments of the code. Program execution is based on a Master Thread. During serial

regions of the code, there only be master thread and during parallel regions of the code there

will another threads who work parallel with the master thread.

First step of parallelization is to identify where the concurrency in the program. Then

algorithm strategy should be organized. As we discussed earlier this algorithm consist with

three main segments: frequency calculation, Amplitude-Phase angle calculation and

Parameters of algorithm calculation.

13

University POLITEHNICA of Bucharest

FACULTY OF AUTOMATIC CONTROL AND COMPUTERS

Departament of Power Systems Engineering

060042 Bucuharest, Splaiul Independenţei, nr. 313, sector 6

References

hardware, IET Journals, ISSN 1751-8687, 14th June 2015

[2] Lawrence, D.; Donnal, J. S. ; Leeb, S.; He, Y., Non-contact Measurement of Line Voltage, IEEE

Sensors Journal, Volume: 16(24), pp 8990-8997, 2016,

[3] Abdel-Salama, M., Kamela, R., Sayed, k., Khalafa, M., Design and implementation of a multi-

function DSP-based-numerical relay, Electric Power Systems Research Journal, Volume 143, Pages

32–43, http://dx.doi.org/10.1016/j.epsr.2016.10.033, 2016

J. McConnell, J. Mizener, et al., IEEE standard inverse-time characteristic equations for overcurrent

relays, IEEE Trans. Power Deliv. 14 (3)(1999) 868–872.

[5] Over-Current Relay Model Implementation for Real Time Simulation & Hardware-In-the-Loop

(HIL) Validation Muhammad Shoaib Almas, Rujiroj Leelaruji, and Luigi Vanfretti Royal Institute of

Technology (KTH) Teknikringen 33, SE-lOO 44, Stockholm.

[7] Network Protection and Automation Guide (Protective Relays, Measurement & Control),

ALSTOM GRID, May 2011

14

- Design of Delta Sigma Modulators for Integrated Sensor ApplicationsUploaded byAlexander Decker
- Cherry ThesisUploaded bychoochi
- The Technology of Computer Music 1969Uploaded byipires
- multirate signal processing.pdfUploaded byajaipaulose
- Elective 3Uploaded byANTBLE
- Lal Kishore Supposedly 1Uploaded byasd123007
- Worksheet 33 A levelUploaded byVijay Bhaskar
- Datasheet DVB-C Channel ReceiverUploaded byconti51
- Ms Operating Manual MS 1Uploaded byFrancisco Javier Zepeda Iribarren
- BLUE_EYESUploaded byChinmoy Behura
- TRKx 10DC4ER Datasheet DUploaded byachillemario
- 18. FPGA-Based Fused Smart-Sensor for Tool-Wear Area Quantitative Estimation in CNC Machine InsertsUploaded byThan Trong Khanh Dat
- DE-2-India BixUploaded bybhag
- Doc-Automatic Light ControlUploaded byBenazir Begam
- Camshaft Sensor (2)Uploaded byharioharry6096
- DACUploaded byKirti Susan Varghese
- lmh6518Uploaded byΠΑΝΑΓΙΩΤΗΣΠΑΝΑΓΟΣ
- GET-8502.pdfUploaded byAndré Luiz
- dd11Uploaded byAnonymous BoP7nnB
- 7UM62xx_Manual_A7_V046300_enUploaded byRakib U Khan
- Mechatronics QBUploaded bysankark_mdu
- slaa075Uploaded byManidhar Parvatam
- DS3153 730 Digitizer Family r5Uploaded byJairo González
- Ad7177-2bruz-Rl7 Datasheet (PDF) 32 Bit 2Uploaded byAl Rohim
- cc2541Uploaded bygilgil48
- la_outgoing.docUploaded bydoğancan
- 4500BUploaded byveeresh1000
- Lec PU March05Uploaded byMuhammad Awais Ashfaq
- ece360Uploaded byMary Joy Andaya
- Major DocumentationUploaded byKråñthï Kïråñ

- AbbUploaded bySajjad Pirzada
- Relay Coordination Chapter3Uploaded byChân Gà Nướng
- 1Uploaded byChân Gà Nướng
- Chapter4 APPUploaded byChân Gà Nướng
- Sincronism 25 LicentaUploaded byChân Gà Nướng
- SEE - Lucrarea 1 - Metode by RoxUploaded byChân Gà Nướng
- 104525919-Dms-Telvent.pdfUploaded byChân Gà Nướng
- nep2.pdfUploaded byChân Gà Nướng
- Metoda NewtonUploaded byChân Gà Nướng
- ETAPA IUploaded byChân Gà Nướng
- Mathematic FormulationUploaded byChân Gà Nướng
- 2018.10.10-Tema-1Uploaded byChân Gà Nướng
- acord_bilateral.docUploaded byChân Gà Nướng
- Master_Thesis_Semestru2_15Iunie2018.docUploaded byChân Gà Nướng
- Colagen lichid Ch Alpha Plus.docxUploaded byChân Gà Nướng
- 0001 Monica Gets a New Roommate - La Moglie Mancata S1-D1-AUploaded byChân Gà Nướng
- 0001 Monica Gets a New Roommate - La Moglie Mancata S1-D1-AUploaded byChing-Chiao Chang
- TEMA PROT_doan Van Khanh2401Uploaded byChân Gà Nướng
- Sample Certificate UPBUploaded byChân Gà Nướng
- AC inputUploaded byChân Gà Nướng
- AC input.docxUploaded byChân Gà Nướng
- Measurement Function in RelayUploaded byChân Gà Nướng
- Hvdc LightUploaded byChân Gà Nướng
- a-cbr116-200-enUploaded byChân Gà Nướng
- bridge_diode_3p.pdfUploaded byChân Gà Nướng
- 00_what_ist_srfUploaded byChân Gà Nướng
- IER-1-crt-scc-2015Uploaded byChân Gà Nướng

- pppUploaded byCharan Tej
- Simelectronics Matlab UserguideUploaded byJiraya15
- MIL-HDBK-1553A.191Uploaded byPradeep Chandra
- Proteccion lineasUploaded byKevin Broussard
- NED-JOURUploaded byIka Yume
- icosphiUploaded byArvind Sharma
- Comparator ApplicationsUploaded byasdfrew
- EE6425_0809_S1_LPC10Uploaded byMansoor Khan
- Zero Crossing Detectors as a Group Are Not a WellUploaded bySyed Arsal
- Atmel-2508-Zero-Cross-Detector_ApplicationNote_AVR182.pdfUploaded byarmando nolasco rodriguez