Tool For Detecting Waveform Distortions in Inverter Based Microgrids A Validation Study
Tool For Detecting Waveform Distortions in Inverter Based Microgrids A Validation Study
Tool For Detecting Waveform Distortions in Inverter Based Microgrids A Validation Study
vr
cos(ω t)
+ vpi(t) vin,rc(t)
-
+ ∫ + × + +
- Switch-mode +
inverter and filter
iac(t)
vd(t)
Load
vac(t)
aim at developing reliable and affordable solutions for easy system from the observed data, the impact of the inverter
diagnosis and correction of potential problems of microgrids controller will be identified. This section will present the
in rural areas. hypothesis and the results of the reverse engineering exercise.
The analytical approach and the assumptions made will be
In a previous contribution, the authors presented a method compared with a simulation and field measurement of voltage
for decomposing and analyzing electrical voltage and current waveforms.
waveforms to estimate the instantaneous frequency [4] by ap-
plying the Hilbert-Huang Transform [5]. We then suggested Fig. 2 shows a model of the microgrid. In the model, the dc
that the electrical waveforms were frequency modulated, of voltage vd (t) is supplied from a dc source. The dc voltage
considerable magnitude. This paper presents a validation vd (t) is converted to ac, vac (t), by using a dc/ac inverter.
study for a diagnosis tool for microgrids based on the The inverter is a steady-state single bridge inverter based
investigation of the system behind the microgrid and its on pulse-width modulation (pwm) [6] with a low-pass filter.
controllers. The validation procedure is based on providing The inverter has a controller that uses vd (t) and the iac (t)
first an analytical model of the distortion, supported by to control vac (t) so that ideally, the ac output voltage should
simulation data from a detailed Matlab model which then always be
are used to discuss and validate the results observed in the vac (t) = Vac cos ωo t. (1)
field data. The results from the analytical model and the
simulation model exhibit seemingly non-periodic properties where ωo is the fundamental grid frequency and is constant:
of the instantaneous frequencies when compared with the ωo = 2π · fo = 2π50 Hz. vac (t) is adjusted by vcontrol (t).
measured waveforms obtained at RUB CST’s stand-alone By assuming a optimal dc/ac inverter and filter, vac (t) will
microgrid. The expected grid frequency in such systems be
should be a stationary 50 Hz, while the observed frequencies vac (t) ∝ vcontrol (t). (2)
in this investigation show a distorted oscillatory frequency
with cycles of 10 ms on the grid frequency. The inverter controller used in this article is based on a
typical PV inverter controller [7], [8]. The frequency and
By better understanding the root cause of the phenomena phase-shift synctonization is not accounted for in this paper
behind the distortions on the microgrid, we gain better as the microgrid is islanded. The controller’s task is to
knowledge on how to design and tune the inverters to easier monitore and correct the output voltage vac . The controller’s
suit the environment where they will be applied. The authors main blocks are proportionalintegral (PI) controller and a
hope this can help to lay a foundation of a methodology to Resonant Controller (RC) as shown in the fig. 2.
diagnose microgrids so that we can contribute to providing
more reliable and less maintenance demanding electricity In this paper, a general signal will be written in the form
access to rural areas in the developing world.
x(t) = X + x̃(t). (3)
II. P ROBLEM I DENTIFICATION THROUGH A NALYTICAL This means that X is the constant dc part of x(t), and x̃(t)
M ODELLING is the time-varying ac part of x(t).
The authors have previously identified unexpected distortions The previous study leads us to believe that the distortions
on a stand-alone microgrid [4]. By reverse engineering the originate in an oscillation on the dc bus. By following the
1 0 100
vcontrol (t) Pac (Ω) ωac (t)
cos(ωo t) ωo + ǫ · cos(2ωo t)
0.5 80
Frequency [Hz]
-20
Magnitude [dB]
Voltage [pu]
0 60
-40
40
-0.5 -60
20
-1 -80
0 20 40 60 0 100 200 300 400 500 0 20 40 60
Time [ms] Frequency [Hz] Time [ms]
(a) vac (t) from (11) against an ideal ac (b) Frequency spectrum of vac (t). (c) Instantaneous frequency ωac (t) of
voltage waveform as in (1). vac (t) found using Hilbert-Huang Trans-
form. The amplitude of vac (t) was also
found and was constant.
Fig. 3: Analytical representation of vac (t) together with its frequency power spectrum and Hilbert-Huang transform.
argumentation in app. A; if the load is a resistance, the dc where C10 , C20 , B, φ1 , and φ2 are constants determined by
voltage can be modelled as vin,rc (t) through the RC controller. By assuming that the
fundamental frequency component of vac (t) has much larger
vd (t) = Vd + ṽ d (t) = Vd + Ṽ d cos(2ωo t). (4)
amplitude than its harmonics, we can approximate that
In the controller, the dc voltage, vd (t) is compared with a vac (t) ∗ hrc (t) ≈ Cac cos(ωo t + φac ) (10)
predefined reference dc voltage vr and results in a correction
signal where hrc is the impulse response of the RC controller, and
ve (t) = vr − vd (t). (5) Cac and φac are constant determined by B · vac (t) through
We assume a stable boost controller so that the correction the RC controller. As vcontrol is proportional to vac we get
signal vr is equal to Vd . The proportionalintegral controller that
(PI) uses the correction signal ve (t) as an input. The purpose
of the PI controller is to maintain a stable output amplitude vac (t) = C1 cos(ωt − φ1 ) + C2 cos(3ωt − φ2 ) (11)
of vac while there are slow-varying changes in the dc voltage
vd . Since the PI controller is a linear operation, it will only Where C1 , C2 , φ1 , and φ2 are constants determined by
alter the amplitudes and not any frequency component of vcontrol (t) through the dc/ac inverter. Note that the distortions
vd (t), resulting in an output of the PI controller in (11) is a sum of two frequency components, but is caused
by a multiplication operator in the controller.
vpi (t) = A cos(2ωo t − φ) (6)
where A and φ are the resulting amplitude and phase after
the PI controller. The resulting vpi (t) is used, together with III. VALIDATION M ETHODOLOGY
a signal proportional to the ac current to set the frequency Three sections will be presented to verify the characteristics
for the vin,rc (t) as an input to the resonant controller (RC). of the output voltage vac (t) as shown in sec. II and discuss
Assuming we have a resistive load, we also have that its consequences. The first approach is to use the analyti-
vac (t) = Rload · iac (t). (7) cal expression from (11) to calculate its frequency power
spectrum and Hilbert-Huang transform. Then, the result
The expression for the input to the resonant controller will be compared with the corresponding output voltage
vin,rc (t) is then given by obtained with a Matlab Simulink model of the same system.
vin,rc (t) = −A cos(2ωo t − φ) · cos(ωo t) + B 0 · vac The third step will consist of comparing the analytical and
A simulated models with the with the corresponding output
cos(ωt − φ) + cos(3ωt − φ) + B 0 · vac (t)
=− voltage waveform measured at an operating microgrid in the
2 field.
(8)
where B 0 is a constant to scale vac (t). The Resonant
Controller is a linear band amplifier that let all frequencies A. Analytical Model
pass, but amplifies the grid frequency ωo . Its purpose is to
maintain a stable grid-frequency. This gives a control voltage Fig. 3a shows vac (t) as described in (11) and an ideal ac
vcontrol (t) of voltage waveform as in (1) used as reference (red line).
The constants in (11) is based on reasonable values of the
vcontrol (t) = C10 cos(ωt − φ1 ) + C20 cos(3ωt − φ2 ) involved system parameters. By visual inspection of vac (t)
(9)
+ B · vac (t) we can see that it is not ideal.
1 0 90
vac,s (t) Pac,s (Ω) ωg,s (t)
cos(ωo t) 80
0.5
Magnitude [dB]
-20
Frequency [Hz]
70
Voltage [pu]
60
0 -40
50
-0.5 -60 40
30
-1 -80
20 40 60 80 0 100 200 300 400 500 20 40 60 80
Time [ms] Frequency [Hz] Time [ms]
(a) Simulated output from an dc/ac in- (b) Frequency spectrum of vac,s (t). (c) Instantaneous grid frequency ωg,s (t)
verter, vac,s (t) plotted against an ideal of vac,s (t) found using Hilbert-Huang
cosine. Transform. The amplitude of vac (t) was
also found and was constant.
Fig. 4: vac,s (t) together with its frequency power spectrum and Hilbert-Huang transform.
1) Frequency power spectrum: The Fourier transform is a where vi (t) is IMF number i that v(t) consist of, and vr (t) is
method to decompose any time series down to sinusoidal the residue. The residue vr (t) can be described as the offset
components with constant amplitude and frequency. The voltage or a monotone function. A general monocomponent
discrete Fourier transform can be used to define a frequency can be written on the form
power spectrum (periodogram) of a time series expressing
the power of each frequency component. The frequency vi (t) = Vi (t) · cos θi (t) (14)
power spectrum of a sampled version of vac (t) is then given where the instantaneous frequency ωi (t) for a monocompo-
by nent is defined as the rate of change of the phase θi (t), as
N −1
1 X shown in (15).
Pac (Ω) = | vac (n · Ts )e−jΩn |2 (12) dθi (t)
N n=0 ωi (t) = . (15)
dt
where Ω is the angular frequency variable, Ts is the sampling By simulating the analtytical expression of vac (t) we found
period, n is the discrete time variable, and N is the total that it satisfies the requirements for a monocomponent with a
number of samples. constant amplitude Vac for all reasonable variables for tuning
of the controller. This means that we can write vac (t) on the
In fig. 3b we have the frequency power spectrum of vac (t). form
The frequency power spectrum has a fundamental frequency
vac (t) = Vac cos θac (t) (16)
ωo , and one harmonic at 3ωo . Because of this, it is expected
that the frequency components ωo and 3ωo will be domi- Since Vac is constant the instantanious frequency, ωac (t), of
nating in the frequency power spectra of the simulated and vac (t) is unambiguous. The instantaneous frequency ωac (t)
measured ac voltage. is shown in fig. 3c. From the figure it is clear that the
2) Instantaneous Frequency: As mentioned in sec. I, the frequency changes over time. The instantanious frequency
motivation for investigating the source of the distortions was should ideally be ωac (t) = ωo . We approximated ωac (t) to
a study of electrical waveform data using the Hilbert-Huang ωac (t) ≈ ωo + cos(2ωo t) (17)
Transform (HHT) to obtain the instantaneous frequency and
amplitude of measured grid data from microgrids [4]. with an error of less than 11.7 %. The constant corresponds
to the magnitude of the oscillating frequency . Although
The instantaneous frequency is not well defined for multi- the error in (17) not neglectable, it is reasonable to expect
component signals [9], i.e. signals with more than one local a oscillating frequency with a periodicity of 2f1o in the
extrema for each zero crossing. The HHT therefore decom- simulations and measured voltage waveforms.
poses a multicomponent signal down to monocomponents.
For a general multicomponent signal v(t) the HHT uses a
method called the Empirical Mode Decomposition (EMD) to B. Analysis of microgrid simulations
obtain the fewest monocomponents possible to describe it. A simulation of the microgrid system in fig. 2 was imple-
These monocomponents are called Intrinsic mode functions mented using Simulink to verify the finding from sec. III-A.
(IMFs). A given voltage waveform v can be written as a sum The simulation was tailored to show as real conditions as
of IMFs on the form possible, and is simulating non-ideal conditions with con-
log2 N
X siderable line-impedance and a resistive load as experienced
v(t) = vr (t) + vi (t) (13) in the microgrid where we did the measurements. The letter
i=1 s will be added in subscript to variables to mark that they
1 90
vac,m (t) 0 ωg,m (t)
Pac,m (Ω) 80
cos(ωo t)
0.5
Frequency [Hz]
Magnitude [dB]
-20 70
Voltage [pu]
60
0 -40
50
-0.5 -60 40
30
-1 -80
20 40 60 80 0 100 200 300 400 500 20 40 60 80
Time [ms] Frequency [Hz] Time [ms]
(a) Measured output from an dc/ac in- (b) Frequency spectrum of vac,m (t). (c) Instantaneous grid frequency ωg,m (t)
verter, vac,m (t) plotted against an ideal of vac,m (t) estimated using Hilbert-
cosine. Huang Transform. The amplitude of
vac (t) was also estimated and was con-
stant.
Fig. 5: vac,m (t) together with its frequency power spectrum and Hilbert-Huang transform.
are found using the simulation. The ac voltage vac,s (t) is compared the analytical solution and the simulation results
shown in fig. 4a. vac,s (t) is distorted compared with a pure with the electrical voltage waveform measured on the output
sinusoidal waveform with frequency ωo , yet in a different of a physical single-bridge inverter in an islanded microgrid,
way than vac in fig. 3a. Unlike the analytical expression of vac,m (t). The microgrid used was at the The Royal Univer-
vac , the ac voltage vac,s (t) curves towards the right compared sity of Bhutan’s College of Science and Technology, and we
with a pure sinusoidal signal. It also contains ripples that collected the data during operation. The microgrid provided
are most probably caused by the distortions by the inverter’s power to their library, and the load impedance was mostly
pulse-width modulation that was not properly filtered by the resistive. The setup in fig. 2 and the simulation is modeled
low-pass filter. after this microgrid. The measured waveform, vac,m (t), is
shown in fig. 5a. It is visually similar to vac,s (t), except that
The frequency power spectrum of vac,s is given in fig. 4b.
its curving is towards the left instead of the right. It also has
The spectrum only shows harmonics between 0 and 500
harmonics caused by non-ideal filtering in the inverter.
Hz, although harmonics with higher frequencies are present.
From the plot, it is easy to identify the two most significant
The frequency power spectrum of vac,m (t) is given in fig.
peaks at ωo and 3ωo , especially with a prior knowledge of the
5b. As in the analytical and simulated voltage waveforms,
distortions resulting from vd (t) and the controller. However,
the frequency power spectrum of vac,m (t) has notable peaks
the frequency power spectrum does not have a significant
around ωo and 3ωo . Its harmonic at 5ωo has a larger
2ωo , as in the root of the problem, given by ṽ d .
magnitude than vac,s (t)’s fifth harmonic. The spectrum also
The ripples make vac,m (t) a multicomponent signal, so it was contain many harmonics with higher frequencies that are not
decomposed into two IMFs using EMD with zero residue. displayed in fig. 5b.
One IMF contains high-frequency distortions most probably
caused by non-ideal filtering of the pulse-width modulated As in sec. III-B, the measured voltage waveform vac,m (t) is
voltage waveform. This IMF will not be further analyzed in a multicomponent signal. Like vac,s (t), it was decomposed
this paper. The other monocomponent vg,s (t) corresponds down to two IMFs. One with high-frequency distortions and
to the grid-frequency. The monocomponent vg,s (t)’s ampli- the other corresponding to the grid, vg,m (t) The last IMF’s
tude is constant, making its instantaneous frequency ωg,s (t) instantaneous frequency, ωg,m (t), is shown in fig. 5c.
unambiguous and comparable with analytical ωac (t).
Like vac and vg,s , its amplitude is constant, making ωg,m
Fig. 4c shows the instantaneous frequency ωg,s (t), which
unambiguous. ωg,m (t) has, like ωg,s (t), a semi-periodic
has a semi-periodic behaviour similar to the results from
sec. III-A. It has a pattern with repetitions every 10 ms, or behaviour with periods of 10 ms ( 2f1o ).
written differently: 2f1o . The nonperiodic parts of ωg,s (t) can
be caused by the nonlinear properties of the inverter, and will Based on the similarities between the analytical observations,
be the focus for future studies, once the periodic phenomena the analysis of the simulation and the data from measured
have been explained properly. voltage waveforms in an operating microgrid, it is reason-
able to say that the hypothesis proposed by the authors in
previous works [4], that the semi-periodic fluctuations in the
C. Analysis of Microgrid Field Measurements
instantaneous frequency observed on microgrid data is the
The above analysis is without value if they do not correspond result of distortion ṽ d (t) on the dc bus vd (t) propagating
to the real world. Therefore, to validate the results, we through the microgrid controller, is correct.
IV. D ISCUSSION frequency. This notion of instantaneous frequency is new in
electrical systems and the case presented in this paper is an
A validation study for the relevance of the instantaneous
example that shows the existence of a time varying frequency
frequency concept on electrical microgrids has been outlined
caused by the control of the power electronics converter.
in this paper. The root cause of the distortions previously
Better understanding of this phenomena can enable more
detected on the microgrid and reported in this paper has
affordable diagnosis tools and reliable microgrids in rural
been verified by analytically examining how the intrinsic
areas.
oscillatory component of the dc voltage propagates through
the controller feedback of the PV inverter system; resulting
in an amplitude modulation, according to the analysis of A PPENDIX A
the mathematical expression of the output voltage waveform D C VOLTAGE
of the inverter. The voltage waveforms from the analytical A. PV power source
model, from the simulated model and from the measurement
on the grid give different information about the signals This appendix will concern the PV power source and boost
depending on the method used to analyze them. controller’s output voltage and current (see fig. 2). Fig.
6a shows a Thévenin equivalent of dc power supply. By
Discrete Fourier Transform based frequency power spectrum following the argumentation of Mohan at. al [6, p. 214] we
and Hilbert-Huang Transforms were used to study the results get that
from analysis, simulation and field measurements. The fre-
quency power spectrum of the analytical results shows two id (t) = Id + ĩd (t)
(18)
components; the one corresponding to the fundamental grid = Id + I˜d cos(2ωo t)
frequency (50 Hz) and a third harmonic (150 Hz). These two
frequency components are also observed when the simulated The simulation of the dc current id (t) is shown in fig. 6b.
and measured field data are analyzed using the frequency I˜d is the amplitude of ĩd (t). Equation (18) assumes that
power spectrum. However, a clear distinction between these Vd ṽ d (t) (19)
two frequency components was not well captured from the
Fourier analysis due to, among other things, the presence The dc voltage supply vd (t) will be described by
of multiple frequency components in the frequency power vd (t) = Vs − id (t) · Rs
spectrum.
= Vs − Rs · Id + Rs I˜d cos(2ωo t) (20)
When the Hilbert-Huang Transform was used to analyze the
= Vd + Ṽ d cos(2ωo t)
data (from analysis, simulations and field measurement), an
instantaneous oscillatory frequency, with a cycle of circa 10 where Vs is the constant dc power supply, Rs is the power
ms (100 Hz) was clearly identified. Although the oscillations supply’s internal resistance, Vd = Vs − Rs · Is , and Ṽ d =
were distorted compared with the analytical results, the Rs Iˆd . Fig. 6c shows the simulation of the dc voltage vd (t).
instantaneous oscillatory frequency was strikingly similar.
The root cause of this phenomena can be attributed to the ACKNOWLEDGMENT
propagation of the inherent 100 Hz oscillatory power that
characterizes single phase electrical systems. It was shown We would also like to thank Norden Huang for personally
in the analysis that the inverters dc bus is constrained to giving insight into his methods. His open-mindedness and
provide a dc current with an oscillatory component of twice generosity has been highly appreciated.
the frequency of the ac current on the inverter side. This The authors would like to acknowledge the contribution of
double frequency component of the current is the root of the Jon Are Suul for providing a simulation setup of a single
oscillatory component observed in the dc voltage at twice phase inverter.
the grid frequency. When this dc voltage is measured and
compared with the dc reference voltage and is given as the Thanks are in order for Tshewang Lhendup and, Cheku Dorji
input to the PI controller, it propagates through the inverter and my travel partner and coworker Håkon Duus for their
controller to the ac side through the pulse-width modulation. assistance in collecting electrical voltage waveform data.
This component appears as an oscillatory frequency of the The PV icon in fig. 2 were designed by Freepik.
ac voltage of the inverter, as observed when analyzed with
the HHT. R EFERENCES
From the observations of these results, the authors argue [1] ACME Portable. Flexpac (photograph). http://www.acmeportable.com/
that, the presence of time varying frequencies cannot not images/2014/11/norm-flexpac-2.jpg. [Online; accessed 30-June-2016].
be well captured by the Discrete Fourier Transform. The [2] United Nations Sustainability Goals. Affordable clean energy:
Hilbert-Huang transform however, by not making any a- why it matters. http://www.un.org/sustainabledevelopment/wp-content/
priory assumption of constant frequency or amplitude, is not uploads/2016/06/Why-it-Matters CleanEnergy 1p.pdf. [Online; ac-
cessed 30-June-2016].
constraining the interpretation of the data through a set of
[3] International Energy Agency. About energy access. https://www.iea.
constant frequency components as Fourier does. Through the org/topics/energypoverty/. [Online; accessed 30-June-2016].
concept of instantaneous frequency defined as the derivative [4] Geir Kulia, Marta Molinas, Lars Lundheim, and Bjørn B. Larsen.
of the phase angle with respect to time, the HHT does not Towards a real-time measurement platform for microgrids in isolated
remove from the data its intrinsic attribute of instantaneous communities. Procedia Engineering.
420
id (t) vd (t)
3.463
410
Rs id 3.462
Current [A]
Voltage [V]
400
3.461
390
3.46
Vs vd(t) 380
3.459
370
20 40 60 80 20 40 60 80
Time [ms] Time [ms]
(a) Thévenin equivalent of dc power sup- (b) Simulated dc current id (t). (c) Simulated dc voltage vd (t).
ply.
Fig. 6: Thévenin equivalent of dc power supply and simulated dc current and voltage id (t) and vd (t).