verification and implementation of pseudo-random-binary...
TRANSCRIPT
International Conference on Renewable Energies and Power Quality (ICREPQ’14)
La Coruña (Spain), 25th to 27th March, 2015 Renewable Energy and Power Quality Journal(RE&PQJ)
ISSN 2172-038 X, No.13, April 2015
Verification and Implementation of Pseudo-Random-Binary-Sequences for Online
Determination of Grid Impedance Spectrum
Udit Tewari
1, Surena Neshvad
2, Daniel Goldbach
1and Jürgen Sachau
2
1 Faculty of Energy Technology
FH Aachen, Campus Jülich
Jülich, Germany
e-mail: [email protected], [email protected]
2Interdisciplinary Centre for Security Reliability and Trust (SnT)
University of Luxembourg
Luxembourg City, Luxembourg
e-mail: [email protected], [email protected]
Abstract. Renewable energy technologies as Distributed
Energy Sources (DER) connected via power inverter on medium
or low voltage grid are expected to become a more important
part of future generation system. Therefore, it has to be ensured
that their integration doesn’t jeopardize the stability and
performance of the power system which can only be attained
with improved monitoring and control of system parameters on
real time basis such as the equivalent grid impedance seen from
the grid-tied DER. In order to ensure this, this paper investigates
a reliable and precise method for online equivalent grid
impedance estimation based on Pseudo-Random-Binary-
Sequences (PRBS), which has been extensively used in system
identification, communication and information theory. It allows
real time computation of complete spectrum of grid impedance
at the Point of Common Coupling (PCC) by injecting broad
spectrum identification patterns of harmonics and inter-
harmonics. The impedance spectrum thus, can be used for filter
design, power quality evaluations, grid status determination and
inverter tuning. In this paper, a PRBS-based active identification
method is tested and implemented on an off-grid system
consisting of a 3 phase inverter prototype developed in the lab
and has been used to identify the grid impedance spectrum of a 3
phase purely inductive load connected at the output of the
inverter. The results obtained confirm that the method estimates
the grid impedance spectrum over a significant frequency range
with high resolution on real time basis.
Key words
Inverter, Pulse Width Modulation (PWM), Pseudo-
Random-Binary-Sequences, Grid Impedance Spectrum
1. Introduction
The world’s collective capacity to generate power through
renewable energy sources has seen a significant growth in
the last few decades. These sources are considered to have
a long term potential to meet the entire world’s energy
demand and an effective way to reconfigure the present
energy supply structure while at the same time achieving
reduction in global CO2 emissions. Also constant
improvement in cost and efficiency and their use as DER
has reduced costs per kWh. The Medium-Term
Renewable Energy Market Report by the International
Energy Agency (IEA) published in August 2014 shows
that energy from renewable energy sources like Wind,
Solar and Hydro will likely rise to 26 percent by 2020
which is currently 22 percent of the world’s electricity [1].
In this context large part of renewable energy sources,
mainly wind and photovoltaic (PV) energy, has been used
as inverter based distributed power generators integrated
to the medium voltage grid or low voltage grid.Increased
use of such systems in future will therefore increase the
complexity of the grid and will require advanced and
intelligent monitoring and observation tools in order to
integrate them harmoniously and effectively to the grid. In
order to address these concerns, the equivalent grid
impedance seen from the inverter can be considered an
important parameter that will allow the device to react
instantaneously to critical conditions and to correct its
behaviour. It can be used to determine properties of the
grid that are hard to detect such as islanding conditions
[2], resonance frequencies in the grid and major
harmonics induced by load capacitance [3] and voltage
stability of the grid-tie inverter [4]. It can also be used for
inverter droop control optimization, by adjusting the
inverter output voltage amplitude and frequency for
controlling active and reactive power [5].
This paper reviews the grid impedance spectrum
identification technique proposed and presented in [8],
and describes its implementation on an off-grid system
consisting of a 3 phase PWM inverter prototype
developed at SnT Netpower Laboratory in order to verify
its performance in real settings and to determine the grid
impedance spectrum of the 3 phase load connected at the
output of the inverter. The paper is structured as follows:
Section 2 presents a brief review of PRBS and its
properties presented in [8]. Section 3 describes the PRBS
implementation on PWM and the method of determination
https://doi.org/10.24084/repqj13.420 596 RE&PQJ, Vol.1, No.13, April 2015
of grid impedance spectrum identification by PRBS
injection. The complete test setup implemented and used
in order to verify the performance in real settings is
presented in Section 4. Section 5 illustrates and discusses
the results obtained.
2. PRBS and their properties
Pseudo-Random-Binary-Sequences also known as
pseudo-noise (PN), linear feedback shift register (LFSR)
sequences or maximal length binary sequences (m-
sequences) [6] are random bit streams of ‘1’s or ‘0’s that
repeatthemselves. This is a desirable feature for
identification as it allows predicting of an incoming
sequence and it also makes it possible to register and
count errors that might occur in the sequence. A PRBS bit
stream can be generated by using a linear feedback shift
register (LFSR) which is a series of shift registers,
combined with logical XOR gates. Three parameters
characterize the sequence of bits it produces: the number
of bits L, the tap position, and the initial seed (sequence of
bits that initializes the register). An L-bit LFSR generates
2L-1 bits of PRBS. The power spectrum of the PRBS
sequence has an𝐬𝐢𝐧𝟐 𝒙
𝒙𝟐 envelope [6].
Figure 1: Power spectrum for PRBS sequence
The nulls in the power spectrum occur at 𝒇 =𝒏
𝑻, where T
is the bit duration and n is the integer. From 0 to 𝟏
𝑻 the
spectrum contains all the line frequencies with the spacing
of 𝟏
(𝟐𝑳−𝟏) 𝑻 Hz where L is the L-bit LFSR [6]. Thus, the
spectrum of PRBS is discrete but by careful optimization
between maximal length, sampling frequency and PRBS
bit frequency, a white noise like spectrum for a certain
frequency range can be obtained. A high amplitude
spectrum is necessary in order to achieve optimal energy
distribution and accuracy for impedance spectrum
measurement. In addition, the logic can also be easily
implemented on a digital controller with shift registers and
XOR gates and can be easily reconfigured depending
upon the spectrum desired. Thus, a short sequence can be
produced for coarse estimation, and a longer one for more
refined spectrum [8].
3. PRBS Implementation on PWM and Grid
Impedance identification
Pulse width modulation (PWM) technique is the heart of
most inverter signal generation systems and aims to
generate a signal, which after some filtering would result
in a good quality sinusoidal waveform of desired
fundamental frequency and magnitude. Generation of the
desired signal is achieved by comparing the desired
reference waveform (modulating signal) with the high
frequency triangular ‘carrier’ wave. The IGBTs are turned
ON or OFF depending on whether the output is set to
High or Low.
In order to implement the PRBS, the carrier wave is
modified in a manner so that the PRBS naturally overlaps
with the reference signal used for PWM generation. Each
carrier cycle is thus assigned a PRBS code up to a run
length of 2L-1
(L is number of bits of LFSR used) and
modified accordingly. Figure 2 shows the portion of
modified PWM in red colour with PRBS implemented on
it.
Figure 2: PRBS implementation on PWM: Modified Carrier
wave with ‘1 1 0 0 1’ code
For a PRBS code ‘1’, the carrier wave is set to the
minimal value of the carrier signal, regardless of the
amplitude of the reference signal and for code ‘0’, the
carrier wave is set to the maximal value of the carrier
signal, regardless of the amplitude of the reference signal
so that PWM never triggers in that time period. The
consequence of this carrier modification is that for
switching cycles correspondingto code ‘1’, the pulse
duration is widened and for code ‘0’ the pulse duration is
slightly narrowed. So, by giving small amount of energy
required for identification, these variations from the
original carrier are minimal and generate low amplitude,
broad spectrum harmonics [8].
Grid impedance spectrum identification is done by
measuring the output voltage and current with all
harmonics and inter-harmonics and then obtaining ratio of
their Fourier transform. The harmonics in the output
voltage and current for normal PWM generation are
mainly low frequency harmonics and switching
harmonics. The majority of the switching harmonics are
filtered at the output of the inverter and remaining low
frequency harmonics are low amplitude voltage and
current harmonics which can’t provide broad range grid
impedance spectrum. During the PRBS injection the
spectrum of the PRBS is overlapped over the naturally
generated harmonics which increases the possibility of
broad spectrum grid impedance measurement. The grid
impedance spectrum at PCC with all harmonics and inter-
https://doi.org/10.24084/repqj13.420 597 RE&PQJ, Vol.1, No.13, April 2015
harmonics is thus obtained by the Fourier transform of the
voltage and current at the PCC [8].
𝑍(𝑓) =𝐷𝐹𝑇 (𝑉(𝑡))
𝐷𝐹𝑇(𝐼(𝑡))= 𝑅𝑔𝑟𝑖𝑑 + 𝑗. 𝑋𝑔𝑟𝑖𝑑 (1)
Where ‘DFT’ denotes the Discrete Fourier Transform of
time domain measurement of voltage V(t) and current I(t)
at PCC. Therefore, by aligning and synchronizing the
PRBS codes with the fundamental frequency and
performing a Fourier transform over the complete cycle
render results containing minimum spectral leakage [8].
The next section describes the implemented test setup.
4. Test setup implementation
The test setup uses NI Single-Board RIO General Purpose
Inverter Control (GPIC), which is programmed using
LabVIEW and periodically generates PRBS. This section
describes the hardware and software implementation done.
A. Hardware
The general overview of the system implemented is
shown in Figure 3.
Figure 3: General overview of the System
The overall hardware design of Inverter has following
subsystems:
DC Power Supply: The DC power supply is variable
power source which has been used for simulating
Distributed Energy Resource connected to the inverter.
The DC power supply is a SM660-AR-11 with maximum
output of 3300 W and voltage and current range 0-330 V
and 0-11 A respectively.
Electrolyte Capacitor: It is used as a DC link between
the DC power supply and inverter to prevent large
transients generated at the output side of the inverter from
reaching back to the DC supply and to act as a buffer for
smoothing out DC voltage variations. Electrolyte
Capacitor with capacitance of 400 μF has been used as the
DC link capacitor with maximum rated voltage and
current, 1100 V (DC) and 40 A respectively.
Control Unit: The control unit consists of GPIC from
National Instruments (NI), Interface Card, IGBT Driver
and IGBT. The general overview of the control unit is
shown in Figure 4.
Figure 4: General overview of the control unit
NI Single-Board RIO GPIC is a typical stack of NI
sbRIO-9606 (Single-Board RIO) control and monitoring
system, NI GPIC RIO mezzanine card and custom
interface board which is configured as per the requirement
of the user. GPIC is programmed using a comprehensive
NI LabVIEW graphical system design toolchain that
includes simulation which make digital computing and
compiling quite user friendly. The interface card takes the
signal from the GPIC and appropriately delivers it to
IGBT drivers for switching of IGBTs. Thus, it allows
control of IGBT drivers which control IGBTs for
generating AC output voltage. It is connected to a base
board with IGBT driver which contains all necessary
components for optimal and safe driving of IGBT
modules. The gate signals produced are used for switching
the IGBTs which are connected to variable power DC
supply described earlier. The 3 phase AC output at the
IGBTs is then connected to the primary side of the
Transformer.
Transformer: The transformer used in this work is a 5
kVA, Dzn0 type, air core step up transformer and is used
to provide isolation of the output neutral from the source,
to step up the output voltage at IGBTs and to provide
impedance that limits fault current or acts as a noise filter.
The transformer is designed to work for with a PWM
switching frequency upto 16 kHz.
Output Filter: The LCL Filter used reduces the
harmonics in the current generated by IGBTs switching
and obtain low current distortions. It has a maximum rated
operating voltage of 480 V with 56 A per phase for 50 Hz
frequency.
Circuit breaker: A 4-pole circuit breaker from is used
to connect or disconnect the inverter from the load. The
maximum voltage and current rating are 6000 V and 15 A.
Voltage and Current Sensors: Two voltage sensors
and one current sensor are connected in the inverter circuit
to measure and to control the output voltage and current of
the inverter. Voltage sensors are connected before and
after the breaker and measured voltages are sent into the
https://doi.org/10.24084/repqj13.420 598 RE&PQJ, Vol.1, No.13, April 2015
GPIC for PWM generation. Current is measured after the
breaker. Figure 5 shows the inverter cabinet with all
hardware components implemented.
Figure 5: Lab Inverter Setup
B. Software
All the simulations of the system and the control were
developed using LabVIEW, which is the system design
software created by National Instruments. The main
program is called VI (Virtual Instrument) and it can have
a number of Sub-VIs. The GPIC used in this paper for
inverter control has three different programming levels:
Host Computer (highest level): Provides user an
interface for programming and monitoring of the system.
Real-Time (medium level): Executes the control
algorithm received from Host Computer and sends the
data to the FPGA level for processing. The processed data
is then received at Real-Time level and communicated to
the Host Computer.
FPGA level (low level): Does simple processing of the
data, and sends out the control command. It is also the
fastest, since processing is done in hardware rather than
software.
When the program is running, each level does its own job.
The actual FPGA and Real Time programming done has
been briefly described.
C. FPGA programming
Inside the FPGA, the inverter control is implemented
using 5 different control loops:
Analog input loop: Analog input loop reads
simultaneously the instantaneous values at the output of
the inverter from the interface card with analog input pins.
PWM generation Loop: Generates high speed PWM
signals based on the outputs of the control loop. The
sawtooth waveform and PRBS is generated with a Sub-VI
and is started by a Restart PRBS function that injects on
the sawtooth waveform for a limited cycles depending
upon the Iteration Stop value set and initial seed value
specified. The loop also has a Sub-VI which marks the
starting of the PRBS injection. Thus, the PRBS generation
takes place only when the voltage of Phase A is zero. An
11-bit LFSR is implemented with a PRBS sequence length
of 2047 and has 4 taps so that it can be used for all LFSR
upto 16 bit. The PRBS generator generates modified
sawtooth with PRBS at 4 different magnitudes depending
on the selection of the Binary Selector switches provided
for the control and PRBS code generated i.e. ‘0’ or ‘1’.
Where Sequence 1 is the PRBS with lowest magnitude
and Sequence 4 is the PRBS with highest
magnitude.Sawtooth waveform for PWM and modified
PWM is generated using LabVIEW FPGA DDS (Direct
Digital Synthesis) generator. The FPGA DDS generator
generates repetitive waveforms with high degree of
frequency and phase control. The reference waveform to
be generated is specified in the look up table in FPGA
DDS generator which is a straight line when PRBS is not
activated. Figure 6 shows table preview of the look up
table for sawtooth waveform generation.
Figure 6: Configuring the sawtooth lookup table
Similarly the lookup table for the Sequence 1 to Sequence
4 has been implemented. When the PRBS is activated, the
output waveform is generated depending on the code
value generated by the PRBS generator and binary
selector switch configuration selected. Figure 7 shows a
table preview of the lookup table implemented for PRBS
code ‘0’ and PRBS code ‘1’ with PRBS sequence 2
selection.
Figure 7: Table preview of the lookup table for PRBS code '0'
and ‘1’
The waveform generation operates at 12.8 kHz. The
sawtooth waveform generated is then compared with three
phase sine voltage signal generated by the control loop for
PWM generation. The PWM generated controls the
switching of IGBTs.
Reference Sine: The loop generates a reference three
phase sine signal which is the signal that is desired at the
output and used in analysis loop to synchronize the output
voltage of the inverter with the desired signal.
Analysis Loop: The analysis loop is synchronized with
Analog Input Loop and computes the coordinate
transformations, RMS value of voltage and active and
reactive power of the inverter.
Control Loop: Uses PID control algorithm in the d-q
reference frames to control voltage.
https://doi.org/10.24084/repqj13.420 599 RE&PQJ, Vol.1, No.13, April 2015
D. Real-Time Programming
In the FPGA the memory is not endless so each of the
memories, logic blocks etc. should be carefully used. In
order to reduce the stress on FPGA and to increase its
reliability the major complex operations are implemented
in Real-Time. The Real-Time VI implemented has a front
and back panel. The front panel is used for user interaction
and is used for display and control and in the back panel
the actual programming has been done.
5. Results
A three phase inductive load of 80 mH is connected to the
output of the inverter and with the grid impedance
identification technique discussed the impedance spectrum
for the inductor is identified.
For the impedance spectrum measurement inverter output
is set to AC voltage of 10 V with DC power supply to 50
V. An 11-bit PRBS code on each phase is injected with
the initial seed value ‘10100110000’ and voltage and
current values are measured only for Phase in our
experiment. PRBS is injected for sequence length of 2047
which is approximately 160 ms with PRBS settings at
width Sequence 2. The Voltage is measured across Phase
A and neutral of the inductor and current is measured by
measuring voltage across a shunt resistor of 1 Ω. The
measurement data is collected through an oscilloscope and
then Fourier transform of voltage and current is then done
in MATLAB. Figure 8 shows the inverter with inductive
load used for the experiment.
Figure 8: Inverter with Inductive Load and Shunt Resistor
A summary of the system parameters for the experimental
is listed in the table below:
Table 1: System Parameters
PRBS code polynomial 𝒙𝟏𝟏 + 𝒙𝟗 + 𝒙𝟔 + 𝒙𝟓 + 𝟏
Sampling Frequency 100 kHz
Carrier Frequency 12.8 kHz
Codes per fundamental cycle 256
PRBS carrier duty cycle 10%
Load Parameters 1Ω, 80 mH
DC Voltage Source 50 V
With these system settings the voltage and current
waveform seen on the oscilloscope at the output of the
inverter is shown in Figure 9. The yellow plot corresponds
to the voltage and pink to the current. The scope plots
shown are not filtered and data from these plots has been
used for grid impedance spectrum identification. The
harmonic content is partially due to the switching
frequency, partially due to the PRBS code injected.
Figure 9: Inverter Output Voltage and Current
The results were obtained by PRBS injection using
Sequence 2 for impedance spectrum identification of the
inductive load. The voltage and current seen before and
after the PRBS injected is shown in Figure 10. The yellow
plot corresponds to the voltage, pink to the current and the
blue line shows the period for which the PRBS is injected.
Figure 10: Voltage and Current Waveform with and without
PRBS injection using Sequence 2
The data measured is then processed in MATLAB to plot
the voltage and current spectrum when PRBS is injected
and to plot the impedance spectrum upto a frequency of
1250 Hz. The frequency of 1250 Hz has been chosen as
cut-off because as per EN50160 [9] the harmonic orders
up to 25 of fundamental frequency are considered as
principally informative. The voltage and the current
spectrum when PRBS is injected are shown in Figure 11
and Figure 12.
Figure 11: Voltage spectrum during PRBS injection
https://doi.org/10.24084/repqj13.420 600 RE&PQJ, Vol.1, No.13, April 2015
Figure 12: Current Spectrum during PRBS Injection
The impedance spectrum obtained from the voltage and
current spectrum for the inductive load for PRBS
sequence 2 is shown in Figure 13. The blue plot
corresponds to the theoretical impedance spectrum and the
red plot corresponds to the estimated impedance spectrum
obtained by PRBS injection.
Figure 13: Impedance Spectrum Estimation for Inductive Load
Voltage spectrum and Current spectrum observed here
exhibit the PRBS characteristics which mean that the
proposed technique is implemented correctly on the
inverter. Also the calculated impedance spectrum is close
to the theoretical impedance spectrum of the inductive
load. Also despite of the system noise while taking
measurements through oscilloscope impedance
measurement has not been affected which is attributed to
correlation properties of the PRBS that makes it resilient
to noise. In order to improve results, and alleviate the
spectral instability of the PRBS, the data has been
averaged over 20 Hz wide frequency bins. This has a
smoothing effect on the obtained plot, and dampens the
slight mismatches between Voltage and current spectrums.
The results obtained are very satisfying up to 500 Hz. On
higher frequencies, the results are less accurate, mainly
due to the low SNR of the PRBS injected harmonics.
Nevertheless, the results are acceptable, but improvements
can be obtained either by increasing the PRBS strength on
higher frequencies, using a higher order LFSR, or by
widening the frequency bins over higher frequencies.
6. Conclusions
The results obtained confirm that the proposed technique
estimates the equivalent grid impedance over a significant
frequency range with high resolution on a real time basis.
It also provides a high degree of flexibility and is easy to
implement with no additional hardware requirements.
Several points for improvement are envisaged for further
research. The modified PWM inverter hardware proposed
in this research has output voltage limitations due to the
DC power supply source used. A possible future work
could be the implementation of a better DC power supply
source to produce higher voltages at the output of the
inverter. Though for the different power level, the control
will be practically identical but with the increase of
voltage there is possibility of decreasing the impedance
estimation error. Finally, after verification of this novel
method of online grid spectrum identification technique
the future research aims on implementing prototype of an
island grid in the SnT Netpower lab by connecting two
inverters and then using PRBS for determining the
impedance parameters between them in order to verify
that the proposed technique is robust to a realistic
environment and would represent a promising grid
monitoring and diagnostic tool.
Acknowledgement This work was conducted at the “Interdisciplinary Centre
for Security, Reliability and Trust” (SnT) at the University
of Luxembourg in collaboration with CREOS S.A., the
Luxemburgish utility provider. It is supported by the
National Research Fund, Luxembourg (SR/4881120).
References [1] "Policy uncertainty threatens to slow renewable energy
momentum," International Energy Agency, Paris, Medium-
Term Renewable Energy Market Report 2014.
[2] L. Asiminoaei, E. Teodorescu, F. Blaabjerg, U. Borup,
“Implementation and Test of an Online Embedded Grid
Impedance Estimation Technique for PV Inverters, IEEE
Transaction on Industrial Electronics, August 2005
[3] H. Langkowski, T Thanh, K. Dettmann, D. Schulz, „Grid
Impèedance Determination – Relevancy for GRid
Integration of Renewable Energy Systems“, IEEE 35th
Annual Industrial Electronics IECON ’09, November 2009
[4] K. De Brabandere, B. Bolsens, J. Van den Keybus, A.
Woyte, J. Driesen, R. Belmans, “A Voltage and Frequency
Droop Control Method for Parallel Inverters“, IEEE 35th
Annual Power Electronics Specialists Conference, 2004
[5] J. Sun, “Impedance-Based Stability Criterion for Grid-
Connected Inverters”, IEEE Transactions on Power
Electronics, November 2011
[6] R.N. Mutagi, “Pseudo Noise Sequences for Engineers”,
IEEE Electronics and Comm. Eng. Journal, April 1996
[7] H. Okawara. (2013, June) ADVANTEST Corporation
website. [Online]. www.advantest.com
[8] S. Neshvad, J. Sachau, and S. Chatzinotas, "Online
Determination of Grid Impedance Spectrum through
Pseudo-Random Excitation of a Pulse Width Modulator,"
Renewable Energy and Power Quality Journal, April 2014.
[9] EN 50160 , Power Quality Guide, “Merkmale der
Spannung in öffentlichen Elektrizitätsversorgungsnetzen“
August 2007
0 200 400 600 800 1000 1200 14000
500
1000
1500
2000
2500
https://doi.org/10.24084/repqj13.420 601 RE&PQJ, Vol.1, No.13, April 2015