Sie sind auf Seite 1von 4

Mediterranean Conference on Embedded Computing

MECO - 2012

Bar, Montenegro

Hydro Power Plant Governor Testing Using


Hardware-In-The-Loop Simulation
Emil Zaev, Atanasko Tuneski, Darko Babunski, Laze
Trajkovski, Aleksandar Nospal

Gerhard Rath
Institute for Automation
University of Leoben, MUL
8700 Leoben, Austria
gerhard.rath@unileoben.ac.at

Faculty of Mechanical Engineering


Ss. Cyril and Methodius University, UKIM
1000 Skopje, R. Macedonia
emil.zaev@mf.edu.mk

Abstract Today Hardware-in-the-loop is standard testing


procedure in controller design procedure. Once the design of the
controller is completed using off-line desktop simulations and the
algorithm is transferred in C code, it is necessary to test the code
as well as the final controller for his capabilities of running in
real-time. In the process of designing the hydro turbine speed
governor this is more than necessary since the controller and the
real hydraulic actuator are integrated part. With the purpose of
real-time testing of the controllers for hydropower plant speed
governors a general model of a Hydro power plant with Francis
turbine is created using Matlab/Simulink. The model is then
translated to C code using Matlab Real-Time Workshop and run
in real-time on a powerful industrial PLC. Through I/O interface
the virtual hydro power plant and real speed governor (actuator
together with controller) are combined as a closed loop control
system. Easy parameter changing and monitoring of the whole
process is accomplished through PC program which is in
communication with the real-time simulation system through
Object Linking and Embedding (OPC) connection. With this
testing bench the controller can be tested in two ways: together
with the real hydraulic actuator or a scaled physical model of it,
if the real hydraulic actuator is available or with the real-time
model of the hydraulic actuator if the real hydraulic actuator is
not available. In this way we can examine and adjust the
performance of governor before installing it to the power plant.
By using this test system, the efficiency and security of the speed
governor can be improved.

Once the designs of the controller are complete using desktop


simulation (off-line) where plant model is used to develop the
controller (Model-Based Design) and the algorithm exists in
production code (for example using automatic code
generation), it is necessary to test the code as well as the
production controller if it is capable of running in real-time.
This can be done in two ways: (1) With connection of the
controller with the hardware prototype which is more
expensive and time consuming or, (2) With connection of the
controller with the plant model running on a real-time platform
which reduces the costs in later phases of development [6]. The
second procedure is also called Hardware-In-The-Loop (HIL).
This gives the ability to test the controller in condition that
would damage equipment and personal.

Keywords- governor; power plant; real-time; simulation; model

A. Model of the Hydro Power Plant


The general model represents HPP in isolated operation and
includes the dynamics of the following subsystems: hydraulic
subsystem (penstock and turbine), governor subsystem and
electrical subsystem. Details about HPP modeling can be found
in [1], and [2]. The model is created in Matlab/ Simulink (Fig.
1.). The model uses per unit values for all the parameters and
can be easy changed for different hydraulic power plants. The
model also contains a sub model of a governors hydraulic sub
system (system proportional valve-hydraulic cylinder). Details
about modeling of a system proportional valve-hydraulic
cylinder can be found in [3] and [4]. This provides the
opportunity to use the same general model when the real
governor is present or simulated.

I.

INTRODUCTION

Real-time simulations are simulations where some of the


components of the tested system are real and some are
simulated. The reason for the real-time requirement is mostly
that one part of the investigated system is not simulated, but
real [6]. The first approaches to real-time simulation were
probably realized in flight simulation (1956), where the cockpit
is moved according to aircraft motions, e.g. for the training of
pilots. Here, the cockpit and the pilot were real, and the
motions were generated by electrical and hydraulic actuators.
Today, real-time simulations with hardware-in-the-loop (HIL)
are standard testing procedure in controller design procedure.

With the purpose of real-time testing of the controllers for


hydropower plant governors a HIL testing stand is created in
the laboratory of the Faculty of Mechanical Engineering in
Skopje (MFS). This system is described in the next chapters:
In chapter II a Simulink model of the Hydro Power Plant
(HPP) and a procedure for automatic code generation using
Real-time workshop is presented. In chapter III the
constitutional parts of the HIL platform are given. Chapter IV
contains the conclusions.
II.

MODELING FOR HARDWARE IN THE LOOP SIMULATION

Mediterranean Conference on Embedded Computing

MECO - 2012

Bar, Montenegro

combined as a closed loop control system. Easy parameter


changing and monitoring of the whole process is accomplished
through PC program which is in communication with the realtime simulation system through Object Linking and
Embedding (OPC) connection. With this testing bench the
controller can be tested in three ways: (1) Together with a
scaled physical model of the real hydraulic actuator as it is
done in the laboratory of the MFS (Fig.2), (2) Together with
the real hydraulic actuator if the real hydraulic actuator is
available, (3) Together with the real-time model of the
hydraulic actuator if the real hydraulic actuator is not available.
PID
Controller
Real-time Inputs

Hydraulic System Electrical


and turbine
System
Real-time Outputs

III.

STRUCTURE OF THE HIL PLATFORM

The structure of the HIL system for testing the controller


code for the hydro turbine governor is shown on Fig. 3.

Figure 1. General model of the HPP

B. Automatic Code Generation


The real-time platform runs the code of the mathematical
model of the HPP and the code of the controller (usually this is
PID controller). The creation process included the following
steps: Nonlinear modeling of a Hydro power plant with Francis
turbine and controller design using Matlab/Simulink. Model
transformation for real-time simulations including I/O
parameter blocks. The model is then translated to C code using
Matlab automatic code generator Real-Time Workshop and run
in real-time on a powerful industrial Programmable Logic
Controller (PLC).

Figure 3. Structure of the HIL platform

HIL platform is consisted of the following parts: real-time


platform (industrial PLC), PC monitoring program and
hydraulic system.

Figure 2. Steps for automatic code generation

Through I/O interface the virtual hydro power plant and


real speed governor (actuator together with controller) are

Mediterranean Conference on Embedded Computing

MECO - 2012

Bar, Montenegro

Figure 5. On-line parameter changing and logging trough the SCADA


program

Figure 4. View of the system in automation laboratory.

A. Real-time Platform
The heart of the Real-time platform used in this particular
case is based on powerful B&R X20 PLC and has possibility to
run on 0.4 ms (non-confirmed). In addition to the PLC the
platform also contains an FESTO amplifier for proportional
valve. Simulation model of HPP runs on the platform in realtime in cycling steps of 1 ms. Real-time simulation of this
nonlinear model requested powerful real-time platform since
cycling time step depends from the hardware platform
possibilities. Time step bigger than 10 ms usually is too big
time step for the solver to give stable and accurate results in the
area of simulation of hydraulic systems.
Figure 6. Unit Panel of the SCADA program

B. PC Monitoring program
Monitoring program is running on a standard PC and is
created using specialized software for Supervisory Control and
Data Acquisition (SCADA) programing from National
Instruments called Lookout. The reason for choosing a
program like this is the opportunity for data logging of a big
amount of data in real-time in database or/and Excel file.
Through the SCADA interface parameters of the governor (like
proportional, integral and derivative constant Kp, Ki and Kd)
can be easily changed and the results of those changings can be
monitored and saved for an analysis. This program gives
opportunity to test the performances of the hydraulic cylinder
and proportional valve separately from the power plant
introducing different type of direct input signals (sinusoidal,
random) in open loop or closed loop. The performances can
also be check when the system is connected to the model of the
power plant.

Control structure of the SCADA application is in the


pyramidal form [5]. On the top there is so called Main Panel
which presents basic information to the operator. From this
panel the operator can go further to the panels which present
particular power units. Unit Panel of the SCADA program
gives overview of the characteristic constitutional parts of
hydroelectric power plant connected with Francis turbine:
downstream penstock, turbine, generator, wicket gate and
governor.
C. Hydraulc Subsystem
Hydraulic subsystem is consisted from pump, PLC,
amplifier, proportional valve, position sensor and cylinder. The
proportional valve is controlled from the PLC on which the
model of controller is running together with the model of the
HPP.

Mediterranean Conference on Embedded Computing

MECO - 2012

Bar, Montenegro

extended nonlinear modeling of a HPP with Francis turbine


done with Matlab/Simulink. The model is then translated to C
code using Matlab Real-Time Workshop and run in real-time
on a PLC. Through I/O interface the virtual hydro power plant
and real speed governor (actuator together with controller) are
combined as a closed loop control system. Easy parameter
changing and monitoring of the whole process is accomplished
through PC program which is in communication with the realtime simulation system through OPC connection. With this
testing bench the controller can be tested in the following
ways: Together with a scaled physical model of the real
hydraulic actuator, together with the real hydraulic actuator or
together with the real-time model of the hydraulic actuator. The
testing bench gives possibility to test real-time capabilities of
the controller, to test the controller in extreme conditions and to
test the performances of the governor (closing and opening
time, dead bend, amplification coefficients).
In future this HIL platform can be transformed in a
simulator for treeing the future SCADA operators in HPP.
REFERENCES
[1]
[2]

Figure 7. Hydraulic subsystem

IV.

CONCLUSION

Hardware-in-the-loop (HIL) platform for testing the


governor performance is successfully established in automation
laboratory of MFS. HIL platform is consisted of three parts:
real-time platform (industrial PLC), PC monitoring and logging
program and hydraulic system. The creation process included

[3]
[4]

[5]
[6]

P. Kundur, Power system stability and control. McGraw-Hill, Inc. 1994.


M. Calovic, Regulacija elektroenergetskih sistema. Elektrotehnicki
fakultet Beograd, Beograd, 1997.
H. E. Merritt, Hydraulic control systems. John Wiley & Sons, Inc., 1967
E. Zaev, G. Rath, A. Tuneski, D. Babunski, Non-linear modeling and
HIL simulation of hydraulic cylinder for hydro turbine governing
system, ZEMAK, Ohrid, 2010
B. Strah, O. Kuljacha, Nova turbinska regulacija na HE Miljacka,
Brodarski institut Zagreb.
R. Isermann, J. Schanit, and S. Sinsel, Hardware-in-the-loop simulation
for the design and testing of engine-control systems, Pergamon,
Control Engineering Practice 7, 1999.
.

Das könnte Ihnen auch gefallen