• No results found

Implementation of an Automatic Voltage Regulator for Synchronous Machines on an FPGA

N/A
N/A
Protected

Academic year: 2022

Share "Implementation of an Automatic Voltage Regulator for Synchronous Machines on an FPGA"

Copied!
40
0
0

Loading.... (view fulltext now)

Full text

(1)

UPTEC E 19013

Examensarbete 30 hp Juni 2019

Implementation of an Automatic Voltage Regulator for Synchronous Machines on an FPGA

Eric Fjärstedt

(2)

Teknisk- naturvetenskaplig fakultet UTH-enheten

Besöksadress:

Ångströmlaboratoriet Lägerhyddsvägen 1 Hus 4, Plan 0

Postadress:

Box 536 751 21 Uppsala

Telefon:

018 – 471 30 03

Telefax:

018 – 471 30 00

Hemsida:

http://www.teknat.uu.se/student

Abstract

Implementation of an Automatic Voltage Regulator for Synchronous Machines on an FPGA

Eric Fjärstedt

Synchronous generators used for hydro power and nuclear power is a well known topology but there is a vast amount of intricate

technologies and methods to making them function properly. This masters thesis covers the development, implementation and verification of a magnetisation system for a synchronous generator. The software implementation is made in the LabVIEW programming environment and uses a high performance CompactRIO with an FPGA for measurements,

calculation and output control signals. Together with several

peripheral devices, the CompactRIO forms an excitation system and most importantly, an automatic voltage regulator. This system keeps the output voltage of the generator stable and has a variety of safety features such as over excitation limits, under excitation limits and a V/Hz limiter. The resulting system successfully monitors and controls the generator characteristics and the controllers, based on PI controllers, have short rise times, low overshoot and no significant static error. This magnetisation system was verified on a 185 kW synchronous machine and all functions showed satisfying results with the exception of the implemented power system stabiliser which need to be re-tuned.

Handledare: Urban Lundin

(3)

Svensk sammanfattning

Synkrongeneratorer som används inom vattenkraft och kärnkraft är ansvariga för den sta- bilitet som elnätet har idag. Detta är huvudsakligen på grund av deras stora mekaniska tröghetsmoment men även på grund av de kringliggande system som styr generatorernas egenskaper. Här kommer saker som frekvensregulatorer, spänningsregulatorer och effek- tstabilisering in i bilden.

I forskningsgruppen inom vattenkraft vid elektricitetslära på Uppsala Universitet an- vänds en synkronmaskin för utveckling och forskningsprojekt. Denna synkronmaskin är i behov av en automatisk spänningsregulator, vilket är detta examensarbetes huvudmål att utveckla. En automatisk spänningsregulator är en mjukvaru- och hårdvarukombination vars huvuduppgift är att se till att generatorns terminalspänning hålls vid önskvärd nivå.

Synkronmaskinen består av två delar, en rotor och en stator. Statorn är i grund och botten en cirkulär järnkärna med tre kopparlindningar som bildar en trefaskoppling. När ett roterande magnetfält passerar dessa tre lindningar induceras en spänning och en ström genom lindningarna som sedan kopplas till elnätet för distribution. För att skapa det roterande magnetfältet används rotorn som också är en järnkärna med lindningar.

Rotorn består däremot endast av en elektrisk krets av kopparlindningar som bildar en eller ett flertal elektromagneter. Genom att rotera rotorn med hjälp av vattenkraftstur- biner, ångturbiner eller liknande kan alltså ett roterande magnetfält skapas av rotorn som sedan inducerar spänningen i statorn.

Den inducerade spänningen i rotorn bestäms av flertalet parametrar men den vikti- gaste variabeln är rotorlindningsströmmen. Statorspänningen är proportionell mot ström- men genom rotorlindningarna och detta kan utnyttjas för att bygga upp en automatisk spänningsregulator. Genom en kombination av mätinstrument, kraftfulla datorer och strömtillförselutrustning kan statorspänningen styras noggrannt och snabbt.

Detta examensarbete är en dokumentation av implementationen av en automatisk spän- ningsregulator gjord i LabVIEW, som är en vanlig programmeringsmiljö på avdelningen för elektricitetslära. Utöver de spänningsreglerande funktionerna innehåller mjukvaran även flertalet begränsningsfunktioner och en effektstabilisator.

Resultatet av arbetet är en fungerande automatisk spänningsregulator med kringsystem som verifierats på en synkrongenerator med nominell effekt på 185 kW där samtliga funk- tioner förutom effektstabiliseringen fungerat med tillfredsställande resultat. Det framtida arbeten som krävs är en omstämmning av den implementerade effektstabilisatorn för op- timalt resultat. Mjukvaran har ett användarvänligt gränssnitt och denna dokumentation inkluderar även en användarmanual för mjukvaran.

(4)

Contents

1 Introduction 1

1.1 Background . . . 1

1.2 Purpose and Goals . . . 1

1.3 Boundaries and Limitations . . . 1

2 Theory 2 2.1 Synchronous Machines . . . 2

2.2 Rotor Excitation . . . 2

2.3 LabVIEW and FPGA programming . . . 3

2.4 Control theory . . . 4

2.4.1 Per Unit System . . . 4

2.4.2 FCR . . . 4

2.4.3 AVR . . . 5

2.4.4 VAR/cos(ϕ) Regulation . . . 5

2.5 Phase Locked Loop . . . 5

2.6 Discretisation of continuous systems . . . 8

3 Method 9 3.1 Hardware . . . 9

3.2 Software . . . 10

3.3 Measurements . . . 12

3.4 Testing . . . 12

3.4.1 Disconnected from grid . . . 14

3.4.2 Connected to grid . . . 14

3.5 Regulation . . . 14

3.6 Safety features . . . 16

4 Results 17 4.1 Software and Interface . . . 17

4.2 FCR testing and verification . . . 18

4.3 Disconnected from grid . . . 20

4.3.1 No load step response . . . 20

4.3.2 Load connected step response . . . 21

4.4 Connected to grid . . . 25

5 Discussion 26

6 Conclusion 29

7 Acknowledgements 30

8 Appendix 32

(5)

Nomenclature

• ADC - Analog to Digital Converter

• AVR - Automatic Voltage Regulator

• cRIO - National Instruments Compact Re-configurable Input Output PAC

• DAC - Digital to Analog Converter

• DSOGI - Dual Second Order Generalized Integrator

• FCR - Field Current Regulator

• FIFO - First In First Out (Buffer)

• FPGA - Field Programmable Gate Array

• GUI - Graphical User Interface

• HMI - Human Machine Interface

• LabVIEW - Graphical programming environment

• MATLAB - Calculation and analysis software

• p.u. - Per Unit

• PAC - Programmable Automation Controller

• PI-controller - Proportional Integrating controller

• PLL - Phase Locked Loop

• PSS - Power System Stabilizer

• RT - Real Time, refers to cRIO software segment

• VAR - Volt Ampere Reactive

(6)

1 Introduction

1.1 Background

Hydro power electricity production is a well known and used technology. In Sweden, hydro power contributes to 40 % of the annual electricity production. Hydro power in Sweden is largely used to automatically regulate the power grid when it comes to hourly, daily and even seasonal variations in electricity consumption. In hydro power, synchronous machines are almost exclusively used during generation and contribute to the grid stability with their large inertia. The department of electricity at Uppsala University works with and conducts research on the topic of hydro power generators and their peripheral devices.

Currently, the department is implementing a field winding magnetization system for a hydro power station in Porjus, northern Sweden. The magnetization system is in need of a controller, specifically an automatic voltage regulator, in order to act as a foundation for the magnetization system and to regulate the output voltage of the machine to stay within the desired range.

1.2 Purpose and Goals

The purpose is to create a LabVIEW-implementation of an Automatic Voltage Regulator (AVR) to control the output voltage of the generator. The software should also include a Power System Stabilizer (PSS), protective limiting functions and a few more regula- tion options such as Field Current Regulation (FCR) and power factor regulation. The hardware that will be used is a CompactRIO with an Field Programmable Gate Array (FPGA) and a Real-Time system which handles measurements, calculations and output signals.

To verify and confirm that the system operates according to specifications, tests will be conducted on a 185 kW generator that is used for development and research at Upp- sala University. The AVR will be controlling a DC power supply to magnetize the field winding of the generator and the rest of the parameters will be monitored by the AVR.

1.3 Boundaries and Limitations

This master thesis does not research or implement the mechanical input power regulation of synchronous machines since the system only controls the field current and not the active input power.

(7)

2 Theory

2.1 Synchronous Machines

Figure 1: Cross section of a synchronous machine[1].

The synchronous machine is an electrical generator/motor which, as its name implies, always rotates at synchronous speed with the power grid. It consists of a wound rotor, often with salient poles which acts as electromagnets that can be fed externally via slip rings. The rotor can have different number of poles to change the relationship between the electrical frequency and mechanical frequency according to

fel= p

2fmech (1)

where p is the number of poles in the rotor. The stator consists of a laminated steel sheet structure with slots and windings in a three-phase configuration. A cross section of a synchronous machine can be seen in Figure 1. During grid connection, the stator creates a rotating magnetic field which must be matched by the mechanical frequency of the rotor. The terminal voltage of the generator is proportional to the rotational frequency of the rotor and the field current through the rotor windings according to

E =√

2πf N φ (2)

where N is the number of turns per phase, f is the frequency and the magnetic flux φ is proportional to the field current magnitude. This means that by varying the field current, the terminal voltage of the generator can be controlled. The magnetic flux is however not completely linearly proportional to the field current but follows a curve that can be seen in Figure 2.

2.2 Rotor Excitation

The rotor of the synchronous machine must be magnetized in order for the synchronous machine to function properly. The magnetization of the rotor is often referred to as rotor

(8)

Figure 2: The characteristic relationship between magnetic flux and field current[2].

excitation. Some machines use permanent magnets to do this but this offers no control of the performance of the machine aside from changing the mechanical power input on the rotor. By having a wound rotor that can be supplied with current from an external power source, the output voltage and the relationship between active and reactive power can be controlled.

A common way to do this is by using slip rings connected to the rotor windings and carbon brushes that are fixed to the static construction. The carbon brushed are con- nected to an external power supply which controls the current through the field windings, allowing for control of several aspects of the machine.

2.3 LabVIEW and FPGA programming

LabVIEW is a graphical programming language designed to be used by engineers and developers and offers a more intuitive interaction than normal code based programming.

LabVIEW automatically creates a Graphical User Interface (GUI) which allows the user to interact with the program in a very straight forward way. This way of programming is quite different compared to code based programming but has a lot of applications within development of industrial automation[3].

A Field Programmable Gate Array (FPGA) is a type of hardware programming that functions slightly different from standard software programming. In FPGA program- ming, a unique hardware based circuit is built for each program. This offers high per- formance and high throughput at very high clock frequencies. As opposed to software programming, the FPGA can run separate loops in true parallel while still interacting with each other. This is one of the key features which makes the FPGA environment great for development of industrial automation.

(9)

2.4 Control theory

Two of the most fundamental building blocks in automatic control theory are the Proportional- Integrating (PI) controller and the lead/lag controller. The PI-controller is a negative feedback loop which amplifies and integrates the error from the input signal and generates an output signal according to

U (s) = e(s)(Kp +Ki

s ) (3)

where e(s) is the error between the set value and the actual value, U is the output and Kp and Ki are the tuning constants for the controller.

The lead/lag controller is also a type of controller but is very similar to a filter and is often referred to as a lead/lag filter. The general transfer function of a lead/lag controller is

G(s) = Kτzs + 1

τps + 1 (4)

where K is the gain and τi are the filter tuning constants. The relationship between τz

and τp decides whether it is a lead or lag controller. If τpz, it is a lag controller and vice versa, where τi ≥ 0. This transfer function can be tuned by moving the zero and the pole, by changing the values of τz and τp, to create a desirable transfer function. The tuning of these filters can be done easily with the help of Bode plots. By placing several of these filters in cascade, one can create precise phase lag and gain control for specific frequencies.

2.4.1 Per Unit System

The Per Unit system is a simple way to normalize magnitudes of voltages, powers, cur- rents, according to

u[pu] = U [V ]

Unominal[V ] (5)

By setting a nominal voltage and power, the actual voltage and power can be seen in relation to each other without having to convert between units. This is very useful for power system modelling and in the case of this thesis, the controller applications. All of the controllers are using the Per Unit (p.u.) system which allows for all of the controllers to be tuned with the same proportional and integrating constants.

2.4.2 FCR

The Field Current Regulator (FCR) is a simple PI-controller that monitors the field winding current and compares it to the actual current fed from the supply. The FCR is most suitable to be used during development and testing but can also be used during start-up of the machine to excite the rotor windings and confirm functionality before the AVR takes over for grid synchronization. The FCR is also responsible for certain safety features such as under excitation limits and over excitation limits. The rotor should never

(10)

lose excitation during synchronous operation since it would cause the machine to slip out of phase and potentially trigger a shutdown. There is also a thermal limit to how high the field winding current can be which is why there is an over excitation limit. Both of these cases are handled by the FCR as a take-over function when any of the limits are reached.

2.4.3 AVR

The Automatic Voltage Regulator functions on the same principle as the FCR but mon- itors the stator terminal voltage instead. This is the most important of the controllers and is used during normal operation. In AVR mode, the generator ignores the magnitude of the field current and the relationship between active and reactive power as long as they stay within boundaries and its only concern is to keep the voltage of the machine at the desired magnitude. This is the fundamental principle of keeping grid stability at a high level. Since power must be produced and consumed at the same time, synchronous machines can compensate for variations in load by varying the mechanical input power to change the active output power and by varying the field winding current to change the relationship between active and reactive power.

2.4.4 VAR/cos(ϕ) Regulation

The Volt-Ampere Regulator, also referred to as a Reactive Power Regulator or cos(ϕ) regulator, functions on the same principle as the FCR and AVR but monitors the reactive power output of the machine. This mode is not very practical in synchronous applications and relies on the grid to keep the voltage of the stator at the desired level. However, it can be used to control the relationship between the active and reactive power in experimental setups. This mode would be more applicable in off grid situations or for "island grid"

applications.

2.5 Phase Locked Loop

A Phase Locked Loop (PLL) is a control system which has most of its applications with grid connection of variable sources. PLLs is often used for DC-AC conversion with three- phase inverters. The idea is to monitor a three-phase grid system and generate a similar signal in order to output power to the grid from a DC source. A PLL can also be used for its great monitoring capabilities when measuring voltages and currents in a three-phase system such as a synchronous machine. PLLs can be used to derive several of the im- portant magnitudes of a synchronous machine such as the electrical frequency, terminal voltage, stator current and the angle ϕ between the two.

A PLL takes a three-phase system, referred to as ABC-domain and uses two transforma- tions, αβ transformation, also referred to as Clarke transformation and dq-transformation, also referred to as Park transformation. This is to represent the rotating ABC system as a two component system that is very similar to a DC representation.

(11)

The Clarke transformation takes a rotating three-phase system and simplifies it to the two non zero components, α and β according to

uαβ(t) = 2 3

1 −1212 0

3

2

3 2

 ua(t) ub(t) uc(t)

 (6)

where ua,b,c denotes the ABC voltage components.This is a simplified version that does not take zero component γ into account. For this application, the zero component is not required but is important when studying unbalanced three-phase systems.

Next, the PLL performs a Park transformation which requires α and β as well as the angle of a rotating reference system as an input. This reference system is key to changing the rotating system into a DC-representation of the three-phase system. The algorithm makes an initial guess at which frequency the system should be rotating and then uses a PI-controller to increase or decrease the frequency, thus also changing the phase until the three-phase system and the reference systems match. The Park transformation is defined as

udq(t) = r2

3

 cos(θ) sin(θ)

−sin(θ) cos(θ)

 uα(t) uβ(t)



(7) which again is a simplified version, not taking into account the zero component. The re- sult is a two component system that can be represented with d and q as two vectors that are orthogonal to each other. The resulting vector between them contains the magnitude of the three-phase system as well as the angle between the reference system and the actual system. By using this as an input for the PI-controller and having the set value of q as zero, the PLL will lock onto the ABC system and produce a matching simulated system.

A visual representation of the ABC, α β and dq domains can be seen in figures 3, 4 and 5.

While locked on, the PLL provides the amplitude of the voltage in the ABC system as well as the frequency and by performing the same algorithms on the currents of the ABC system, the amplitude and the angle of the current can be obtained. At this point, the PLL provides all of the necessary units and their magnitudes to calculate the remain- ing units of interest such as active and reactive power. A properly implemented PLL can converge incredibly quickly and has a very high performance when it comes to calculating frequency, voltages, currents and the angle ϕ.

(12)

Figure 3: Visual representation of the ABC domain.

Figure 4: Visual representation of the α β domain.

(13)

Figure 5: Visual representation of the dq domain

2.6 Discretisation of continuous systems

In programming, a continuous system such as a transfer function in Laplace domain is rather difficult to implement without modification. This is because the Programmable Automation Controller (PAC) works in discrete time and does not easily utilize Laplace transforms or similar continuous domains. A continuous system can be converted to a discrete system with methods such as Euler’s method[4] but is much easier to do with software. MATLAB includes a continuous to discrete function (c2d) which can be used for this purpose. If c2d is supplied with a system such as

G(s) = s + 1

2s + 1 (8)

together with a sampling time Ts, which is the time in seconds between measurements that the discrete controller will be sampling with, MATLAB would return something similar to

G(z) = 0.1z + 0.01809

z − 0.8819 (9)

where z is the discrete input value, sampled by the controller. This is more useful to the PAC since it is now in discrete time. With increased order of the transfer function, the complexity increases and the discrete approximation of the continuous system becomes less accurate if the sampling time is not decreased.

(14)

3 Method

Overview

A graphical overview of the connections between the subsystems can be seen in Figure 6.

It illustrates the general flow of information and power between the Programmable Logic Controller (PAC), the power supply, the synchronous machine and the electrical grid.

Figure 6: An overview of the connections of the system.

3.1 Hardware

Programmable Automation Controller

The most central piece of hardware was the PAC, which in this case was a CompactRIO- 9074 (cRIO). The cRIO is an industrial grade, high performance embedded controller which features both a microcontroller, running a real-time operating system in combina- tion with an FPGA[5]. The cRIO is a modular device and in the case of the cRIO-9074 has 8 module slots. These modules come in a variety of models with different functional- ities such as Digital to Analog converters (DAC), Analog to Digital Converters (ADC), Digital Input/Output modules and so on. For this project, the modules that were used are NI9264[6], NI9201[7], NI9205[8], and NI9221[9].

The NI 9246 is a ±10 V analog output module used for sending control signals to the power supply. The NI9201 is a ±10 V analog input module used for monitoring the return signals from the power supply. The NI9221 is a ±60 V analog input module which is used for measuring the generator voltage. The NI9205 is a ±10 V analog input module used for measuring the voltage signals from the Hall-effect sensors that are measuring the stator current of the generator.

(15)

Synchronous Machine

The synchronous machine which was used for testing is a 12 pole 185 kW synchronous machine with slip rings. The rated voltage of the generator’s terminals is 156 V line to line and the rated field current is 12.5 A.

Power Supply

As a power supply, an EA-PS 8160-170[10] from Elektro-Automatik was used. This is a 10 kW power supply with an output capability of up to 160 V and 170 A within the capability curve seen in Figure 7. It has an analog interface for controlling a set voltage, current or power. The power supply also returns the actual voltage on the output and the output current through the circuit as analog signals which can be read by the PAC.

This power supply was connected with cables to the carbon brushes feeding the slip rings

Figure 7: Power capability diagram for the EA-8000 series[10].

of the rotor. The analog interface used a 15 pin D-Sub connector which connected the cRIO and the power supply together.

3.2 Software

The software was divided into three main programs, the Human Machine Interface (HMI), the Real-Time (RT) main program loop and the FPGA measurement and high perfor- mance calculation program. An overview of the interactions between these pieces of softwares can be seen in Figure 8.

(16)

Figure 8: Overview of the connectivity between pieces of software.

PC Human Machine Interface

The HMI is a LabVIEW program which runs on a PC and simply acts as a display for controlling, viewing and logging data from the cRIO. The PC communicates with the cRIO via LAN, utilizing a functionality called NetworkStream[11].

cRIO, Real-Time program

The RT main program loop receives and sends data to the PC via NetworkStream and can also function without the PC HMI but is less intuitive to a novice user. This pro- gram has several loops that perform different tasks. The main task of the RT-system is to control the AVR and FCR which are responsible for regulating the characteristics of the generator. It also has certain safety features such as over/under excitation limits, V/Hz limiter and also monitors many other aspects of the system. One of the more complex features is the Power System Stabilizer (PSS) which utilizes four lag compensators in cascade to add phase lag to the input signal. With a filtered signal of the active output power of the machine, supplied by the FPGA as an input, the PSS adds a signal on top of the field current in attempt to dampen low frequency oscillations in the output power of the synchronous machine.

FPGA program

The last piece of software is the FPGA code which is actually a hardware code but is programmed in a similar manner to the other programs. The FPGA:s most important

(17)

task is to act as high performance measurement device. The cRIO modules convert the measurement data to digital signals for the FPGA to process. The three-phase voltage and current signals are sampled with a rate of 10 kHz and are fed to one of the main loops of the FPGA. The FPGA has a Dual Second Order Integrator Phase Locked Loop (DSOGI PLL)[12] which takes the six input signals, voltages and currents, from the three-phase system and performs a complex line of calculations, seen in section 2.5. It outputs the system voltage amplitude, current amplitude, electrical angle ϕ and electrical frequency which are then used by the rest of the code to calculate the generator characteristics.

Data is sent from the FPGA to the RT system via a ‘First In First Out’ (FIFO) buffer which streams six channels of data sampled with 10 kHz.

3.3 Measurements

The voltage measurements on the synchronous machine terminals were done with the help of three voltage dividers in a wye (Y) configuration. This means that the measurements are line-to-neutral which is not necessarily going to be possible on every synchronous machine since there may not be a neutral point available. This is because the neutral point is often wired inside of the machine and is unavailable for external connections.

The voltage dividers are used to keep the voltage signals within the span of ±60 V which is what the NI9221 module can interpret. These values are later scaled and calibrated within the software.

The current measurements use three hall-effect sensors of the model HAL 100-S[13].

The sensors can measure currents of up to ±300 A and sends a signal of ±15 V. This is sampled by the NI9205 module and is scaled and calibrated within the software as well.

The last measurements required are the field winding current and field winding voltage which are both returned as analog signals from the power supply and measured with the NI9201.

3.4 Testing

The first test for verification was done with a smaller setup where the cRIO was control- ling a similar power supply to the EA-PS 8160-170 but with lower ratings. The power supply was connected to a large coil with a high inductance and low resistance which acts as a replacement for the field windings of the synchronous machine. The experi- mental setup of this test can be seen in Figure 9. The software was run in FCR mode and a few step response tests were made to make sure the code was working properly, to estimate overshoot and rise time but also to give an indication of the sensitivity of the PI-controller.

(18)

Figure 9: Testbench containing the cRIO-9074 on the top left, a power supply to the right and the large inductor in the bottom of the figure.

(19)

3.4.1 Disconnected from grid

During these tests, the setup is the same as in Figure 10 but instead of a grid connection, the synchronous machine was connected to a resistive load which can handle up to 70 kW of active power. Also, a few no load tests were performed before connecting the generator to the load. The FCR and AVR went through step response tests, both with and without the load connected, to see how the controller performed and to measure the rise time and overshoot of the controller.

Furthermore, the V/Hz limiter was verified by performing tests that forced the volt- age to levels higher than the V/Hz limiter allows. All tests were performed with the generator at an electrical frequency of approximately 50 Hz. The synchronous machine gets its mechanical input power from a motor which is controlled by external hardware.

3.4.2 Connected to grid

These tests were intended to have a configuration as seen in Figure 10 and to monitor the parameters of the generator and evaluate the performance of the software in a grid connected scenario. Due to lacking hardware and time constraints, the synchronous machine was never grid connected and therefore, these tests were never carried through.

3.5 Regulation

An overview of the control system can be seen in Figure 10. This is a heavily simplified representation and does not include all of the intricate functions of the software. The overall system was based on the IEEE DC4C[14] because of its suitability with the ex- citation hardware available. This model is suitable for synchronous machines using slip rings and a voltage or current source for excitation. However, some of the features have been adapted to function within the LabVIEW environment.

AVR, FCR and VAR regulator

The AVR, FCR and VAR regulator were all made to accept input values that are nor- malised with the p.u. system. This means that the three controllers could utilize the same PI-controller. The PSS and limiting functions were made to act as inputs to the AVR and their influence on the AVR can be tuned and limited easily.

(20)

Figure 10: A simplified representation of the regulation system as a whole.

Power System Stabilizer

The PSS was based on the IEEE PSS1A[14] model which is one of the simplest versions, using only one input which in this case was the active power output of the synchronous machine. A block diagram of the PSS1A model can be seen in Figure 11. It consists of a washout filter, which is a high pass filter that filters out DC-levels. It was implemented with a Butterworth filter with an order of 4 and a cut-off frequency set to 0.1 Hz. The filter is followed by a gain control and a series of lag controllers. The last part is a limiting function to decide how much the PSS is allowed to influence the field current.

Figure 11: Simplified representation of the PSS1A model where the input can be ac- tive power, mechanical frequency, or similar and the output is added to the AVR/FCR input[14].

The lag controllers were tuned with the help of Bode plots using MATLAB. A continuous representation of what this looks like can be seen in Figure 12, where the Bode plot of the implemented lag controller can be seen. The lag controller was designed with a gain control that can be tuned. Changing the gain would graphically, in Figure 12, correspond to shifting the gain curve up or down.

(21)

Figure 12: Bode plot showing gain and phase shift for the implemented lag controller.

3.6 Safety features

The V/Hz limiter was based on a design by ABB[15] and the block diagram for it can be seen in Figure 13. It compares the normalized terminal voltage and electrical frequency of the machine. If this relationship exceeds 1.07 p.u., an integrator reduces the field current of the machine to protect it from thermal damage due to heat losses from high field current. This also reduces the risk of magnetic saturation of the rotor[15]. The aggressiveness of the V/Hz limiter can be tuned by the operator by changing the gain of the limiter. It should be noted that the integrator of the V/Hz limiter is reset to zero upon returning to normal operation.

Figure 13: Block diagram for the V/Hz limiter.

(22)

4 Results

4.1 Software and Interface

The HMI consists of a window with tabs to change between the different controller modes and can be seen in Figure 14. The activation of any controller disables the other con- trollers and the selected controller instantly takes over. It is also impossible to inactivate the selected controller without choosing a new one in order to prevent human input error or loss of control. The HMI is made to be immune to human input error but in a worst case scenario, there is a fail-safe, which is the under excitation limiter that takes over and regulates the field current in the case of an error.

Next, there is a ‘settings’ page, as seen in Figure 14, where the user can input the synchronous machine properties as well as tune the main controller for the AVR, FCR and VAR regulator. The safety features such as maximum/minimum field current can also be chosen in the ‘settings’ page.

Figure 14: HMI for the AVR and the Settings page.

The HMI controls the RT system with a take-over function and in the case of the PC losing connection or other error, the RT system will retain the last values sent from the HMI and keep the machine running with the last input from the HMI. During a disconnect, the PC and RT both attempt to establish a new connection once every second. The RT system is designed to be controlled by the PC HMI and should never be started without the PC HMI unless the user has enough understanding of the software. This information is available in the User Manual in the appendix 8.

(23)

4.2 FCR testing and verification

The FCR test results can be seen in figures 15 through 17. This was a verification of the system which during a step function from 0 to 1 p.u. resulted in a rise time of 120 ms and an overshoot of 2.4 %, illustrated in Figure 16. The under excitation limiter can be seen working during the times where the set value is below 0.2 p.u. which in this case was the minimum allowed field current. This setup was only a test bench which can be seen in Figure 9. Two examples of improperly tuned PI-controllers can be seen in figures 15 and 17. In Figure 17, the effects of the over excitation limiter can be seen when the controller overshoots too much as the limit was set to 1.1 p.u. in this case.

Figure 15: The FCR reacting to a large step response while under-tuned, Kp=0.02, Ki=0

(24)

Figure 16: The FCR reacting to a large step response while properly tuned, Kp=0.1, Ki=0.02

Figure 17: The FCR reacting to a large step response while over-tuned, Kp=0.2, Ki=0.1

(25)

4.3 Disconnected from grid

4.3.1 No load step response

The following tests were performed with the synchronous machine running at 50 Hz with no load connected.

FCR

The step response for the FCR can be seen in Figure 18. The rise time is 0.462 seconds and the overshoot is 6.7 %.

Figure 18: Step response for FCR with synchronous machine at 50 Hz.

AVR

The step response for the AVR can be seen in Figure 19. The rise time is 0.642 seconds and the overshoot is 3.3 %.

(26)

Figure 19: Step response for AVR with synchronous machine at 50 Hz 4.3.2 Load connected step response

AVR

The following tests were performed with a near purely resistive three phase load connected to the synchronous machine. Figure 20 shows the AVR responding to steps of 0.25 p.u.

and also shows the active power output of the machine. During these tests, the active power peaked at around 38 kW while the electrical frequency was around 50 Hz.

(27)

Figure 20: AVR step response while load connected at 50 Hz

In Figure 21, which shows the same test as in Figure 20, the electrical frequency and active power can be seen as the AVR reacts to large steps.

(28)

Figure 21: Frequency and active power for AVR step response.

V/Hz limiter

In Figure 22, a test where the voltage was deliberately raised to 1.2 p.u. in order to trigger the V/Hz limiter can be seen.

(29)

Figure 22: V/Hz limiter acting to lower the voltage repeatedly when voltage was set to 1.2 p.u.

PSS

The results of the PSS being active during load connected operation can be seen in Figure 23. The PSS was active from times 12.5 to 28 seconds and inactive for the rest of the test.

(30)

Figure 23: Active power, voltage and PSS influence during load connected testing.

4.4 Connected to grid

Unfortunately, due to time constraints and the synchronization equipment being out of order, no grid connected tests could be performed.

(31)

5 Discussion

Time constraints

During initial planning, verification tests were intended to be started much earlier than they were. This was mainly due to different researchers and research groups occupying the synchronous machine which was delayed due to unforeseeable reasons. This resulted in the verification tests being delayed by approximately nine weeks. Unfortunately, this led to one of the functionalities not working properly, since tuning it would require longer access to the synchronous machine, more about this in section ‘PSS’ below. Furthermore, the synchronisation equipment for the machine was deemed to be out of order which resulted in that no grid connected tests were performed.

FCR

The FCR, which is the foundation of the excitation system functions according to expec- tations and with proper tuning, has a fast response time and little to no static error. This can be seen in Figure 16 where it is evident that the controller performs its task with satisfactory results. Some noise can be seen and is mostly due to mismatches between the measurement resolution between the power supply and the PAC. There is also another artifact which is very evident in Figure 17 where the jaggedness of the curve is a result of the relatively low update frequency of the power supply. This is something that may vary between power supplies and is more of a measurement artifact than an actual error.

AVR

The AVR, which is the main purpose of this masters thesis, performs its task of control- ling the generator voltage according to requirements. The no load step responses results are fast with little overshoot of a few percent and little to no static error. However, the load connected step responses are slightly slower. This is due to the fact that the current in the stator produces magnetic fields that oppose the field which originally induced the voltage in the windings. This is called Counter Electro Motive Force (CEMF) and causes the AVR to be more sluggish. This could be taken into consideration when tuning the AVR by making it more aggressive but this would result in overshoot during no load configurations.

During normal operation, the AVR would not go through the abuse that the verifica- tion tests have done. However, it is worth noting that during non grid connected tests, the frequency of the synchronous machine is fluctuating when large steps are made with the AVR. This is something that is outside the scope of this masters thesis but is shown in Figure 21 where it can be seen that the electrical frequency is heavily influenced by the AVR.

(32)

VAR controller

The reactive power controller was implemented in a similar manner to the AVR and FCR but could not be verified since there were no grid connected tests. This is because the load connected to the synchronous generator is nearly purely resistive which means it cannot produce or consume reactive power. The VAR controller can only be used when the generator is connected to the grid and could act in unforeseeable ways if used when the generator is connected to a purely resistive load.

PSS

The PSS was simple to implement by following IEEE standards but is difficult to tune properly. This is because when designing the PSS, the designer may not know the specific characteristics of the synchronous machine or the low frequency oscillations in the local grid caused by spikes in electricity consumption in nearby facilities. However, by following IEEE standards, the frequency band in which the PSS acts can be determined. Tuning the controller can be done in many ways but in this case, it was done with Bode plots, utilizing MATLAB as a tool. This is in theory an effective way of tuning the PSS but during discretisation, the characteristics change slightly. This resulted in the PSS not performing its intended task but instead, induced oscillations in the active power output of the machine. During early tests and simulations, the PSS seemed to fulfill its purpose of filtering and adding phase lag to the input signal. In reality however, the PSS needed to be tuned on location while running tests. Due to testing being delayed, causing time restraints, this was not possible. The PSS could with relatively little effort be re-tuned to function properly but when the need for this was discovered, there was no more time for further testing. However, the PSS limiting functions properly and the maximum influence of the PSS on the field current is limited and does not cause uncontrolled output signals.

The influence of the PSS can be seen in Figure 23. This PSS in particular was designed to only affect frequencies of around 0.2-1.5 Hz when tuning the lag controllers of the PSS.

The PSS was inactivated during times 0-12.5 and 28-36 seconds and it is clear that the PSS introduces low frequency oscillations in the active power output even though there were no oscillations before.

Safety Functions

The under excitation limiter can be seen acting in almost every Figure of the results and is the reason why there is always a current running through the rotor windings, even when the set value of the controller is zero. Similarly, for the over excitation limiter which can be seen acting in Figure 17, it acts to stop the current from exceeding specified values and keeps the rotor from overheating. Both these limiters act according to what the user has set as minimum/maximum current in the settings of the software. They act as take-over functions if the current ever goes out of bounds. It is worth noting that if the controller is tuned extremely aggressively, the current could theoretically go out of bounds for short amounts of time due to the relatively slow update frequency of the

(33)

power supply. However, the software is designed to never be able to request currents that are out of bounds from the power supply.

The V/Hz limiter can be seen acting in Figure 22 where an over voltage error was de- liberately triggered to confirm functionality of the V/Hz limiter. This safety feature is difficult to say if it meets expectations since its aggressiveness needs to be tuned. Tuning this would require more time with the synchronous machine in question than this masters thesis has had room for. However, the V/Hz limiter performs its intended task of lowering the field current, resulting in a lower terminal voltage if the relationship between voltage and frequency exceeds its limits. The longer the error is present, the more aggressive it becomes until the voltage returns within bounds. As soon as the voltage level is within bounds again, the V/Hz limiter stops acting instantly and does not overshoot when the voltage is returned to the desired level. The test was a somewhat unrealistic scenario since the AVR was forcing the voltage higher than 1.07 p.u. but the V/Hz limiter was reducing the voltage at the same time, causing the repeated attempts of lowering the voltage that can be seen in Figure 22. In a real scenario, the voltage would not oscillate in this way.

(34)

6 Conclusion

In summary, the result of this masters thesis is a LabVIEW implementation of an auto- matic voltage regulator which has been tested and verified on a synchronous generator.

The software also includes a power system stabilizer, which is in need of re-tuning, vari- ous safety features such as over- and under excitation limits and a V/Hz limiter. It also includes additional controllers, a field current regulator and a reactive power regulator which can be used for experimental setups.

(35)

7 Acknowledgements

Firstly, I would like to thank my supervisor Urban Lundin for his guidance, support and contributions to this masters thesis. Secondly, I want to thank my assistant supervisor Johan Abrahamsson for his support with programming details and for sharing his knowl- edge in the LabVIEW environment. Lastly, I would like to thank and direct credit to Martin Fregelius for allowing me to access and adapt large pieces of his code which has saved me a tremendous amount of time.

(36)

References

[1] S. Nasir. Introduction to Synchronous Motor. Visited 2019-05-31. url: https : //www.theengineeringprojects.com/2016/10/introduction- synchronous- motor.html.

[2] Synchronous Generators I. Visited 2019-05-07. url: http://www.egr.unlv.edu/

~eebag/Synchronous%20Generator%20I.pdf.

[3] National Instruments. What is LabVIEW? Tech. rep. url: http://www.ni.com/

sv-se/shop/labview.html.

[4] Lunds Tekniska Högskola. The Explicit Euler Method. url: http://www.maths.

lth.se/na/courses/FMN050/media/material/part14.pdf.

[5] National Instruments. CompactRIO Controllers. url: http://www.ni.com/pdf/

product-flyers/compactrio-controller.pdf.

[6] National Instruments. NI-9264 Module. Tech. rep. url:http://www.ni.com/pdf/

manuals/374404a_02.pdf.

[7] National Instruments. NI-9201 Module. Tech. rep. url:http://www.ni.com/pdf/

manuals/373783a_02.pdf.

[8] National Instruments. NI-9205 Module. Tech. rep. url:http://www.ni.com/pdf/

manuals/374188a_02.pdf.

[9] National Instruments. NI-9221 Module. Tech. rep. url:http://www.ni.com/pdf/

manuals/375905a_02.pdf.

[10] Elektro Automatik. EA-PS 8000 3U. Tech. rep. url:https://elektroautomatik.

com/media/pdf/8e/45/65/datasheet_ps8000-3u.pdf.

[11] National Instruments. Lossless Communication with Network Streams. url: http:

//www.ni.com/sv-se/innovations/white-papers/10/lossles%20-communication- with-network-streams--components--archite.html.

[12] Pablo Cossutta et al. “High speed fixed point DSOGI PLL implementation on FPGA for synchronization of grid connected power converters”. In: 2014 IEEE 23rd International Symposium on Industrial Electronics (ISIE). IEEE. 2014, pp. 1372–

1377.

[13] LEM. Current Transducer HAL 50 .. 600-S. url: http : / / www . farnell . com / datasheets/2693317.pdf?_ga=2.262994185.40770711.1559552452-77493299.

1540888245&_gac=1.60153183.1559552452.Cj0KCQjwitPnBRCQARIsAA5n84kAf9E1kVUtJxyXPUKl9hJ_

O5WL_r_J5UK3nV5OOXhOpM2r3tXMwxAaAgW-EALw_wcB.

[14] D Lee. “IEEE recommended practice for excitation system models for power sys- tem stability studies (ieee std 421.5-1992)”. In: Energy Development and Power Generating Committee of the Power Engineering Society 95.96 (Revised 2016).

[15] B. Nyberg M. Wahlén. Spänningsregulator HPC 840. Tech. rep.

(37)

8 Appendix

User Manual

This user manual will take you through how to configure the setup for a given synchronous machine. Firstly, open the Main PC program and go to the settings tab. In the settings tab, seen in Figure 24 you need to configure the nominal voltage, electrical frequency, nominal power and nominal field current for the synchronous machine. The program op- erates mostly in the p.u. system and will therefore require these parameters to function properly.

Figure 24: Overview of settings page.

Here, you must also set the field current minimum/maximum which is responsible for limiting the field current. Typically, the field current minimum can will be 0.2 p.u. and the maximum field current will be 1.2 p.u. Furthermore, the PI-controller responsible for the AVR, FCR and VAR controller can be tuned from the settings page during operation.

Note that all of these values can be set as the default values by right-clicking the control and selecting Data Operations −→ Make Current Value Default. Upon saving and closing the program, it will now retain the desired values when opening the program.

When starting the program, all controllers will be disabled and the controller will be in the default mode, where the output is turned off. To activate any of the controllers, click the boolean control for one of the controllers under their respective tab. This can

(38)

be seen in Figure 25 and is works identically for all controllers. Note that only one con- troller can be active at any point and the HMI prevents user input error during normal operation.

Figure 25: Overview of the AVR controls.

Once a controller is activated, the desired value can be set by the slide control seen in 25 and the controller will be active. When starting the machine, always start in AVR or FCR mode. If any of the controllers are active, the field current will be regulated to at least the minimum field current in order to avoid loss of synchronization. The PC HMI is designed to run together with the RT program. Both of these programs must run at the start of the synchronous machine. Always use the ‘Stop’ button to end the program and make sure that the set values are at a minimum when preparing to shut down the synchronous machine.

Advanced settings

The RT code running on the cRIO also has a user interface with several groups of control.

The first part is calibrating the measurements. The six raw measurements for voltages and currents are first offset and then scaled by a desired factor. These controls can be seen on the top left of Figure 26. Next, the phase sequence can be adjusted in the case

(39)

that the hardware connections are in the wrong order. To diagnose this, one can use the graphs at the bottom of the interface, seen in Figure 27, where the voltage and current wave forms are shown. The phase sequence being correct is vital for the PLL to function properly.

Furthermore, the DSOGI-PLL and the PSS can be tuned under their respective sections and the aggressiveness of the V/Hz limiter can be tuned under the section ‘Regulator parameters’. The rest of the parameters are designed to be controlled by the PC HMI and are sent via NetworkStream as a take-over function. One of the very application specific things in the RT code is the ‘DC-supply signals’ which are tailored for a certain power supply. In the case of the EA-PS 8170-170, it needs three analog signals, the maximum power, maximum voltage and maximum current. It is possible to limit the field winding voltage by reducing ‘VSELECT’. These three values can be between 0 and 10 where 10 V represents the maximum value of each parameter, 160 V, 170 A and 10 kW. The low- est value will decide which mode the supply is in, constant voltage, constant current or constant power. In the case of this AVR, it should be in constant current mode during normal operation.

It is possible to tune the DSOGI and the PLL but this is not recommended since they are already well suited for 50 Hz signals. it is worth noting that if the electrical frequency of the generator is not close to 50 Hz, the voltage and currents will be dampened by the DSOGI and will give values that are lower than the actual voltage/current.

Lastly, for the ‘DC-supply signals’, there is the ‘Output on/off’ and ‘Remote’ boolean control. The ‘Output on/off’ button is controlled by the PC HMI as long as a controller (AVR/FCR/VAR) is selected. The ‘Remote’ control decides if the power supply is con- trolled by the cRIO or the interface on the supply itself. If this control is activated, the cRIO will lose control of the power supply. This can be used as a soft shutdown of the output of the power supply.

As a last remark, the code is commented as much as possible for future users but tamper- ing or changing the code in the block diagram without proper knowledge of the program may cause it to fail.

(40)

Figure 26: Overview of RT Main program.

Figure 27: Graphical indication for deciding the phase sequence.

References

Related documents

The definitions of these dimensions go in line with how the original model defined them, where the intention is to identify factors that could be said to impact the

Studies of control systems, both for permanent magnet synchronous machines and for brushless DC motors, are presented and experimentally verified.. Design studies of generators for

R20) during the machine starting, when the slip decreases from 1 to 0, the slip power is always positive and represents a power extracted from the rotor in form of heat (joule losses

The construction of the integrand function in (43) does not pose special difficulties, even though the TF shows frequency dependent parame- ters. In the frequency domain, it just

It manages to interpret and to reproduce many effects, which are related to the outbreak of eddy currents in the rotor of a salient pole synchronous machine, such as the main

Specifically, as the number of antennas grows large, a larger portion of the total power budget needs to be allocated for pilot signals, especially for low path loss users..

Shinnaka, “A New Speed-Varying Ellipse Voltage Injection Method for Sensorless Drive of Permanent-Magnet Synchronous Motors With Pole Saliency - New PLL Method Using High-

Operators are assigned to specific machines, which also have improved the performance (Chadwick 2008). 2000) in a gold mine in Chile, failure data for a manually