Christopher Pelczar1, Markus Stubbe2, Hans-Peter Beck,and Oliver Zirn1,
Institute of Process and Production Control Technology1,
Institute of Electrical Power Engineering2,
Clausthal University of Technology, Germany, christopher.pelczar@tu-clausthal.de
Abstract
We designed an FPGA-based current controller for the Virtual Synchronous Machine (VISMA),
a grid-tie inverter which has synchronous machine properties. A VISMA system with the FPGA
controller was implemented. The complete signal chain is digital, reducing calibration efforts
and increasing the level of system integration. The current tracking performance of the in
verter controlled by PWM and hysteresis current control algorithms implemented in FPGA was
measured and compared.
1 Introduction
The VISMA is a power electronics device that can be used for connecting renewable energy
resources and electric vehicles to the grid. When connected to the grid, the VISMA behaves
like an electromechanical synchronous machine and offers the same beneficial properties to
the grid, e.g. transient damping and the electrical effects of the rotating mass.
Figure 1 shows a simplified schematic of the VISMA system. The VISMA performs a real
time simulation of a synchronous machine, taking the grid voltages measured at the Point of
Common Coupling (PCC) as inputs, and calculates the phase currents that an electromagnetic
synchronous machine would produce under the same conditions on the grid [1, 2, 3, 4]. These
currents are fed into the grid using a current controller, which controls the switching states of
the IGBTs of a 3-phase inverter. For the VISMA to truly behave like a synchronous machine,
the desired currents must be fed into the grid without delay and the current tracking error kept
We designed and implemented the VISMA system shown in Figure 2 comprising a 3-phase
inverter with an LCL output filter, an FPGA board where the current controller and safety/super
visory functions are implemented, and a microprocessor board, where the real-time synchro
nous machine simulation is executed. A custom data acquisition board was designed to mea
sure the voltages and currents used for controller feedback.
2 Current Controllers
Two current controllers were tested with the VISMA system, a standard 2-point hysteresis cur
rent controller and a PWM controller. Prior to implementing the controllers in FPGA, simulations
of system were performed in the program PLECS [5], which allowed testing different
control strategies and inverter configurations. Figure 3 presents the simulated and measured
response of the hysteresis controller feeding a current with the form of a step function into a
short circuit and shows the validity of the simulation model.
2.1 Hysteresis current controller
The hysteresis current controller used in the VISMA is a standard two-point current controller.
In previous VISMA versions, this controller was implemented as an analog circuit. The main
problems experienced with the analog circuit were the temperature-dependent drift of the con
troller and the calibration effort. Also, parameters such as the hysteresis limits were constant
and not easily changeable.
The digital implementation of the hysteresis current controller requires a fast sampling rate
on the current measurement channels. In our system, we used Analog-to-Digital Convert-
Figure 3: Simulated (a) and measured (b) step response of the hysteresis current controller
ers (ADCs) with a sampling frequency of 1 MSPS per channel. Separate current controllers
operating in parallel were implemented for each phase in FPGA. The high sampling rate is
required to reduce hysteresis limit violations, the effect of which is illustrated in Figure 4. Hys
teresis limit violations occur when there is a delay in switching the IGBTs, which can be a result
of low-bandwidth current sensors, a too slow sampling frequency in case of digital controllers,
and the IGBT switching and dead times. The hysteresis limit violations can be asymmetrical if
the grid voltage is non-zero, which causes different rates of change of current in the positive
and negative directions. Asymmetrical hysteresis limit violations cause the average value of the
current in one switching period to be different from the desired value, creating a current tracking
error. This is illustrated in Figure 5, which shows the desired grid current id Hysteresis limits
Grid current Desired current Filter current, filter current i, andthe grid voltage u, when a zero-current is fed into the grid using a hysteresis current controller
implemented in FPGA with 1 A hysteresis limits.
Figure 5: Zero-current fed into the grid using hysteresis current controller
2.2 PWM Current Controller
Voltage Hysteresis limits Desired current Filter current
As an alternative to the hysteresis current controller, we designed and implemented a PWM
based current controller for the VISMA. The architecture of the PWM controller is presented in
Figure 6.
Figure 6: Architecture of PWM current controller with feed-forward grid voltage compensators
The PWM controller consists of a Proportional Integral (PI) feedback controller Gc and feed
forward grid voltage compensation controllers GF1 and GF2. Gsets the desired inverter
output voltage to be equal to the grid voltage. Under DC conditions, if the inverter output
voltage and grid voltage are equal, no current flows between the inverter and the grid. Because
the grid voltage is an AC voltage, a current will flow into the filter capacitor. This grid current is
compensated by the controller GF2F1. Using the grid-voltage compensation controllers improves
the control performance as compared to using a feedback controller alone.
In the PWM current controller, the filter current if is used as the feedback signal. To understand
why, let us consider the state space equations of the LCL filter, which have the following form:
Based on this model, we can calculate the transfer functions:
where G1f(s) relates the filter current ifto the inverter voltage ui and G(s) relates the grid
current igto the inverter voltage ui1g. The root-locus diagrams of these transfer functions are
presented in Figure 7.
Figure 7: Root-locus diagrams of transfer functions G1g(b)
The transfer function G1fonly has negative poles, whereas G1g
1f(b)(a) and Ghas positive poles and becomes
unstable already for small values of the proportional gain. This means that only G
should beused, i.e. the filter current if can be used for feedback.
To find the values of the proportional and integral gains of the feedback controller G, the
analogy to a mechanical system where a motor drives a load connected to the motor through an
elastic coupling was used. Zirn [6, 7] showed that velocity control of the load is only possible by
using the motor velocity as feedback. For the mechanical system, [6, 7] provides an analytical
solution to the problem of finding the optimal proportional gain Kp optand the integral gain K
of a PI feedback controller. The mechanical system has an open-loop transfer function analogous
to that of the electrical system, G1f.
where, in electrical system, !0 is the resonance frequency, is the total inductance of the
system, and is the ratio of the inverter site filter inductance Lto the total system inductance.
The optimal proportional gain and the integral gain of the feedback controller can be calculated:
The calculated proportional gain resulted in good current tracking performance. For the elec
trical system, the integral gain Kshould be chosen lower than the calculated value, as no
overshoot in the current is desired.
2.3 Comparison of controller performance
The performance of the PWM and hysteresis current controllers was experimentally compared
for different configurations of the LCL filter. For sinusoidal currents, the comparison was made
based on the Total Harmonic Distortion (THD) of the currents fed into the grid and the differ
ence between the RMS values of the measured grid currents and desired currents. Also, as
a measure of the current tracking performance, we defined the tracking error as the difference
between the desired and measured grid currents and implemented in FPGA a block that mea
sures the Sum of Square Errors (SSE) over multiple periods. A high SSE indicates poor current
tracking performance.
Table 1: Measured grid current I, THD, and SSE for a 16 A current fed into the grid using
different controllers and LCL filter configurations
Table 1 presents the measured grid current I, THD, and SSE of 16 A currents (nominal current)
fed into the grid using different controller and LCL filter configurations.
Figure 8: Step-function current fed into the grid using hysteresis (a) and PWM (b) current
controllers
Figure 9: VISMA current fed into the grid using hysteresis (a) and PWM (b) current controllers
when a grid fault (short circuit close to the VISMA system) occurs
Because the VISMA can work as a generator, feeding power into the grid, as a motor, drawing
power from the grid to charge the battery, and supply or consume reactive power, measure
ments were performed for different phase angles between the voltage and the current. Both
PWM and hysteresis current controllers were found to have good performance.
In some cases, the currents fed into the grid by the VISMA are not sinusoidal; therefore, the cur
rent controller should also be able to feed in currents which are not sine waves. Figure 8 shows
currents which have the form of a step function fed into the grid using hysteresis and PWM
current controllers. The grid current i
has less overshoot and a shorter settling time when the
PWM controller is used. This can be of advantage for the VISMA, e.g. during grid faults or
for transient damping, when non-sinusoidal currents are fed in. Figure 9 shows the response
of the VISMA to a power network fault (short-circuit). It can be seen that the PWM controller
produces less oscillations of the grid current and has better current tracking performance.
3 Conclusion
A VISMA system with a digital, FPGA-based current controller was implemented and tested
with PWM and hysteresis current control algorithms. In the PWM controller, grid-voltage com
pensation feed-forward controllers were implemented to improve control performance. The
PWM and hysteresis controllers were compared. The PWM control algorithm is more com
plex than the hysteresis current controller algorithm, requiring more space in FPGA and the
measurement of the grid voltage, which is needed for the feed-forward compensators. It was
found that both controllers are suitable for the VISMA, but the PWM controller offers superior
performance when non-sinusoidal currents are fed into the grid because of its lower overshoot
and shorter settling time, which results in better current tracking performance.
References
[1] Ralf Hesse. Virtuelle Synchronmaschine. PhD thesis, Clausthal University of Technology,
June 2007.
[2] Hans-Peter Beck and Ralf Hesse. Virtual Synchronous Machine. In 9th International Conference
on Electrical Power Quality and Utilization, October 2007.
[3] Christopher Pelczar, Markus Stubbe, Dirk Turschner, and Oliver Zirn. Mobile Virtual Synchronous
Machine for V2G Applications. In 17th World Congress on ITS, 2010.
[4] Yong Chen, R. Hesse, D. Turschner, and H.-P. Beck. Improving the grid power quality
using virtual synchronous machines. In Power Engineering, Energy and Electrical Drives
(POWERENG), 2011 International Conference on, pages 1 –6, may 2011.
[5] Piece-wise Linear Electrical Circuit Simulation User Manual, 2010.
[6] Oliver Zirn. Machine Tool Analysis – Modelling, Simulation and Control of Machine Tool
Manipulators - A Habilitation Thesis. Department of Mechanical & Process Engineering,
ETH Zurich, May 2008.
[7] Oliver Zirn, Christian Vetter, and Karl-Heinz Sauermann. Automatisierungstechnik im
Maschineningenieurwesen. Papierflieger Verlag GmbH, 1 edition, 2011.