You are on page 1of 63

Design and analysis of a Grid Connected

Photovoltaic Power System


ABSTRACT
Photovoltaic (PV) systems proposes attractive alternative source of generation because
these can be placed near to the load centers when compared with other renewable source of
generation. It is therefore rooftop PV is the centre of attraction for majority PV systems. The
rooftop PV system in general is grid connected and supports the off grid load with battery
backup. The designed system must ensure total evacuation of generated power and with high
efficiency of conversion, and utilizes the resource adequately to maximize the utilization of
energy. This paper proposes single phase synchronous reference frame (SRF) theory based
current controlled PWM controller for the voltage source converter (VSC) to realize maximum
generated power evacuation by maintaining the DC link voltage constant without battery
support, low THD sinusoidal line synchronized current output, and limited reactive power
compensation based on the unutilized capacity of the inverter. PV power is being tracked always
at MPP through incremental conductance (IC) method. MATLAB based simulation results
shows the efficient working of rooftop PV with proposed control algorithms in grid connected
mode with limited reactive power conditioning.
CHAPTER 1
INTRODUCTION
1.1 Background
World is moving towards the greener sources of energy to make the planet pollution free
and environment friendly. The major utilization of these sources with grid integration is the
challenging task. It is therefore Distribution Generation (DGs) particularly single phase rooftop
PV system are major research area for grid integration, since these sources have huge
opportunity of generation near load terminal. The rooftop application involving single phase
DG’s fed with PV source can be not only utilized for household use but the excess energy can be
transferred to the grid through proper control scheme and adequate hardware. Control scheme
based on instantaneous PQ theory has been presented in some literatures for single phase system.
Other control scheme such as synchronous reference frame (SRF) is mainly used with three
phase system in which sinusoidal varying quantities are being transferred to dc quantities that
provides better and precise control than PQ based control even under distorted condition of
mains. But SRF based control scheme can be customized for single phase which can’t be utilized
to get the desired dc quantity to generate required reference command. PV sources are interfaced
with the grid through voltage source converters (VSC’s). VSC’s can be controlled either in
PWM based voltage control method or hysteresis based current controlled method (HCC). HCC
based controller gives fast response and better regulation but its major drawback lies with
Variable frequency. On the other hand the PWM based control gives fixed switching frequency
that could be utilized easily for proper design of LC or LCL filters. With PV sources connected
at the DC side of the inverter, it is utmost essential to fetch maximum power from the source to
make the system efficient. Out of different algorithm to track maximum power point (MPP) such
as perturb and observe (P&O), Incremental Conductance (IC) etc., IC based method provides fast
dynamics and control over fast changing insolation condition. In this paper new control scheme
based on SRF theory has been proposed for single phase rooftop PV grid connected system. The
VSC controller is designed in taking the advantage of both current and voltage controller which
is called current driven PWM based voltage controller. Through the VSC the maximum tracked
power is pumped into the grid through proper control on DC link voltage. By maintaining the
DC link voltage constant during operation, is ensured the total power being generated by PV
transferred across the DC bus by the inverter to the grid. Apart from active power transfer the
system could be well utilized for providing limited reactive power compensation based on
available capacity of the VSC. The detailed system configuration and various control schemes
are briefly discussed and explained. The rooftop PV system with proposed scheme is simulated
under the MATLAB simulink environment for grid connection to push real power into the grid
along with limited power conditioning. The contents are dealt in the following sections: (II)
System Configuration (III) PV array modeling and IC MPPT techniques, (IV) Control, (V)
MATLAB Simulation, (VI) Performance evaluation.

1.2 History

The photovoltaic effect was experimentally demonstrated first by French


physicist Edmond Becquerel. In 1839, at age 19, he built the world's first photovoltaic cell in
his father's laboratory. Willoughby Smith first described the "Effect of Light on Selenium during
the passage of an Electric Current" in a 20 February 1873 issue of Nature. In 1883 Charles
Fritts built the first solid state photovoltaic cell by coating the semiconductor selenium with a
thin layer of gold to form the junctions; the device was only around 1% efficient. In 1888
Russian physicist Aleksandr Stoletov built the first cell based on the outer photoelectric
effect discovered by Heinrich Hertz in 1887.

Albert Einstein explained the underlying mechanism of light instigated carrier excitation
—the photoelectric effect—in 1905, for which he received the Nobel Prize in Physics in 1921.
Russell Ohl patented the modern junction semiconductor solar cell in 1946 while working on the
series of advances that would lead to the transistor.

The first practical photovoltaic cell was publicly demonstrated on 25 April 1954 at Bell
Laboratories. The inventors were Daryl Chapin, Calvin Souther Fuller and Gerald Pearson.

Solar cells gained prominence when they were proposed as an addition to the
1958 Vanguard I satellite. By adding cells to the outside of the body, the mission time could be
extended with no major changes to the spacecraft or its power systems. In 1959 the United States
launched Explorer 6, featuring large wing-shaped solar arrays, which became a common feature
in satellites. These arrays consisted of 9600 Hoffman solar cells.

Improvements were gradual over the next two decades. The only significant use was in
space applications where they offered the best power-to-weight ratio. However, this success was
also the reason that costs remained high, because space users were willing to pay for the best
possible cells, leaving no reason to invest in lower-cost, less-efficient solutions. The price was
determined largely by the semiconductor industry; their move to integrated circuits in the 1960s
led to the availability of larger boules at lower relative prices. As their price fell, the price of the
resulting cells did as well. These effects lowered 1971 cell costs to some $100 per watt.

Berman's price reductions

Dr. Elliot Berman testing various solar arrays manufactured by his company, Solar Power
Corporation.

In late 1969, Elliot Berman was investigating organic solar cells, when he joined a team
at Exxon SPC who were looking for projects 30 years in the future. The group had concluded
that electrical power would be much more expensive by 2000, and felt that this increase in price
would make alternative energy sources more attractive, finding solar the most interesting. He
conducted a market study and concluded that a price per watt of about $20/watt would create
significant demand.

The first improvement was the realization that the standard semiconductor manufacturing
process was not ideal. The team eliminated the steps of polishing the wafers and coating them
with an anti-reflective layer, relying on the rough-sawn wafer surface. The team also replaced the
expensive materials and hand wiring used in space applications with a printed circuit board on
the back, acrylic plastic on the front, and silicone glue between the two, "potting" the cells. Solar
cells could be made using cast-off material from the electronics market.

Navigation market

SPC convinced Tideland Signal to use its panels to power navigational buoys, after
finding that Automatic Power, the market leader, had purchased and shelved a solar navigation
aid prototype from Hoffman Electronics to protect its battery business. Tideland's solar-powered
buoy quickly overtook Automatic.

The rapidly increasing number of offshore oil platforms and loading facilities led Arco to
buy Solar Power International (SPI), forming ARCO Solar. ARCO Solar's factory in Camarillo,
California was the first dedicated to building solar panels, and was in continual operation from
its purchase by ARCO in 1977 until 2011 when it was closed by Solar World.

Following the 1973 oil crisis oil companies used their higher profits to start solar firms,
and were for decades the largest producers. Exxon, ARCO, Shell, Amoco (later purchased by
BP) and Mobil all had major solar divisions during the 1970s and 1980s. Technology companies
also participated, including General Electric, Motorola, IBM, Tyco and RCA.
CHAPTER 2

SOLAR CELL

2.1 Introduction

A solar cell, or photovoltaic cell, is an electrical device that converts the energy
of light directly into electricity by the photovoltaic effect. It is a form of photoelectric cell,
defined as a device whose electrical characteristics, such as current, voltage, or resistance, vary
when exposed to light. Solar cells are the building blocks of photovoltaic modules, otherwise
known as solar panels. Solar cells are described as being photovoltaic irrespective of whether the
source is sunlight or an artificial light. They are used as a photo detector (for example infrared
detectors), detecting light or other electromagnetic radiation near the visible range, or measuring
light intensity.

The operation of a photovoltaic (PV) cell requires 3 basic attributes:

 The absorption of light, generating either electron-hole pairs or excitons.


 The separation of charge carriers of opposite types.
 The separate extraction of those carriers to an external circuit.

In contrast, a solar thermal collector supplies heat by absorbing sunlight, for the purpose of either
direct heating or indirect electrical power generation from heat. A "photo electrolytic cell" (photo
electro chemical cell), on the other hand, refers either to a type of photovoltaic cell (like that
developed by Edmond Becquerel and modern dye-sensitized solar cells), or to a device that splits
water directly into hydrogen and oxygen using only solar illumination.

2.2 Applications

Assemblies of photovoltaic cells are used to make solar modules which generate electrical power
from sunlight, as distinguished from a "solar thermal module" or "solar hot water panel." The
electrical energy generated from solar modules, colloquially referred to as solar power, is an
example of solar energy.
CHAPTER-III

POWER ELECTRONICS

3.1 Introduction:

Power electronics is the application of solid-state electronics for the control and
conversion of electric power. It also refers to a subject of research in electronic and electrical
engineering which deals with design, control, computation and integration of nonlinear, time
varying energy processing electronic systems with fast dynamics.

The first high power electronic devices were mercury-arc valves. In modern systems the
conversion is performed with semiconductor switching devices such as diodes, thyristors
and transistors, pioneered by R. D. Middle brook and others beginning in the 1950s. In contrast
to electronic systems concerned with transmission and processing of signals and data, in power
electronics substantial amounts of electrical energy are processed. An AC/DC converter
(rectifier) is the most typical power electronics device found in many consumer electronic
devices, e.g. television sets, personal computers, battery chargers, etc. The power range is
typically from tens of watts to several hundred watts. In industry a common application is
the variable speed drive (VSD) that is used to control an induction motor. The power range of
VSDs start from a few hundred watts and end at tens of megawatts.

The power conversion systems can be classified according to the type of the input and
output power

 AC to DC (rectifier)
 DC to AC (inverter)
 DC to DC (DC-to-DC converter)
 AC to AC (AC-to-AC converter)

3.2 History
Power electronics started with the development of the mercury arc rectifier. Invented
by Peter Cooper Hewitt in 1902, it was used to convert alternating current (AC) into direct
current (DC). From the 1920s on, research continued on applying thyratrons and grid-controlled
mercury arc valves to power transmission. Uno Lamm developed a valve with grading electrodes
making mercury valves usable for high voltage direct current transmission. In 1933 selenium
rectifiers were invented.

In 1947 the bipolar point-contact transistor was invented by Walter H. Brattain and John
Bardeen under the direction of William Shockley at Bell Telephone Laboratory. In 1948
Shockley's invention of the bipolar junction transistor improved the stability and performance of
transistors, and reduced costs. By the 1950s, semiconductor power diodes became available and
started replacing vacuum tubes. In 1956 the Silicon Controlled Rectifier (SCR) was introduced
by General Electric, greatly increasing the range of power electronics applications.[2]
In the 1960s the switching speed of bipolar junction transistors allowed for high
frequency DC/DC converters. In 1976 power MOSFET became commercially available. In 1982
the Insulated Gate Bipolar Transistor (IGBT) was introduced.
CHAPTER-IV
DC-DC CONVERTER
Controller design for any system needs knowledge about system behavior. Usually this involves
a mathematical description of the relation among inputs to the process, state variables, and output. This
description in the form of mathematical equations which describe behavior of the system (process) is
called model of the system. This paper describes an efficient method to learn, analyze and simulation of
power electronic converters, using system level nonlinear, and switched state- space models. The
MATLAB/SIMULINK software package can be advantageously used to simulate power converters. This
study aims at development of the models for all basic converters and studying its open loop response,
so these models can be used in case of design of any close loop scheme. Also as a complete exercise a
closed scheme case has been studied using cascaded control for a boost converter.

Simulink Model Construction of DC-DC Switching Converter


System modeling is probably the most important phase in any form of system control design
work. The choice of a circuit model depends upon the objectives of the simulation. If the goal is
to predict the behavior of a circuit before it is built. A good system model provides a designer
with valuable information about the system dynamics. Due to the difficulty involved in solving
general nonlinear equations, all the governing equations will be put together in block diagram
form and then simulated using Matlab’s Simulink program. Simulink will solve these nonlinear
equations numerically, and provide a simulated response of the system dynamics.

A. Modeling Procedure
To obtain a nonlinear model for power electronic circuits, one needs to apply Kirchhoff's circuit
laws. To avoid the use of complex mathematics, the electrical and semiconductor devices must
be represented as ideal components (zero ON voltages, zero OFF currents, zero switching times).
Therefore, auxiliary binary variables can be used to determine the state of the switches. It must
be ensure that the equations obtained by the use of Kirchhoff's laws should include all the
permissible states due to power semiconductor devices being ON or OFF.
The steps to obtain a system-level modeling and simulation of power electronic converters are
listed below.

1) Determine the state variables of the power circuit in order to write its switched state-space
model, e.g., inductor current and capacitor voltage.

2) Assign integer variables to the power semiconductor (or to each switching cell) ON and OFF
states.

3) Determine the conditions governing the states of the power semiconductors or the switching cell.

4) Assume the main operating modes of the converter (continuous or discontinuous conduction or
both) or the modes needed to describe all the possible circuit operational modes. Then, apply
Kirchhoff's laws and combine all the required stages into a switched state-space model, which is the
desired system-level model.

5) Write this model in the integral form, or transform the differential form to include the
semiconductors logical variables in the control vector: the converter will be represented by a set of
nonlinear differential equations.

6) Implement the derived equations with "SIMULINK" blocks (open loop system simulation is then
possible to check the obtained model).

7) Use the obtained switched space-state model to design linear or nonlinear controllers for the
power converter.

8) Perform closed-loop simulations and evaluate converter performance.

9) The algorithm for solving the differential equations and the step size should be chosen before
running any simulation. The two last steps are to obtain closed-loop simulations [2].

3 Simulation Open-Loop Modeling of DC-DC Converters

A. Buck Converter Modeling

The buck converter with ideal switching devices will be considered here which is operating with the
switching period of T and duty cycle D Fig. 1, [1]. The state equations corresponding to the converter in
continuous conduction mode (CCM) can be easily understood by applying Kirchhoff's voltage law on the
loop containing the inductor and Kirchhoff's current law on the node with the capacitor branch

connected to it. When the ideal switch is ON, the dynamics of the inductor current and the

capacitor voltage are given by,

and when the switch is OFF are presented by,

Fig 2 Open-loop modeling of Buck DC-DC converters

Fig.1 DC-DC Buck Converter


These equations are implemented in Simulink as shown in Fig. 2 using multipliers, summing blocks, and

gain blocks, and subsequently fed into two integrators to obtain the states and [2][3] [4].

B. Boost Converter Modeling


Fig. 3cycle
The boost converter of Fig. 3 with a switching period of T and a duty DC-DCofBoost Converter
D is given. Again, assuming
continuous conduction mode of operation, the state space equations when the main switch is ON are
shown by, [1].

and when the switch is OFF

Fig. 4 shows These equations in Simulink using multipliers, summing blocks, and gain blocks, and

subsequently fed into two integrators to obtain the states and , [2][3][4]

Fig. 4 Open-loop modeling of Boost DC-DC converters


C. Buck-Boost Converter Modeling
In Fig. 5 a DC-DC buck-boost converter is shown. The switching period is T and the duty cycle is D.
Assuming continuous conduction mode of operation, when the switch is ON, the state space
equations are given by, [1]

and when the switch is OFF

Fig. 5 DC-DC Buck-Boost Converter


These equations are implemented in Simulink as shown in Fig. 6 using multipliers, summing blocks, and

gain blocks, and subsequently fed into two integrators to obtain the states and , [2] [3] [4].

D. Cuk Converter Modeling

The Cuk converter of Fig. 7 with switching period of T and duty cycle of D is considered.
During the continuous conduction mode of operation, the state space equations are as follows,
[1]

When the switch is OFF the state space equations are represented
by
Fig.7 DC-DC Cuk converter

these equations are implemented in Simulink as shown in Fig. 8 using multipliers, summing blocks, and

gain blocks, and subsequently fed into two integrators to obtain the states and , [2] [3] [4].

E. Subsystems
Each of the power electronic models represents subsystems within the simulation environment.
These blocks have been developed so they can be interconnected in a consistent and simple
manner for the construction of complex systems. The subsystems are masked, meaning that the
user interface displays only the complete subsystem, and user prompts gather parameters for the
entire subsystem. Relevant parameters can be set by double-clicking a mouse or pointer on each
subsystem block, then entering the appropriate values in the resulting dialogue window [4].

To facilitate the subsequent simulation analysis and feedback controller verification, the
pulse-width-modulation signal to control the ideal switch can also be built into the masked
subsystem Fig. 9(a) and Fig. 9(b). For each converter to verity it’s working in open loop
configuration trigger pulses have been derived using a repeating sequence generator and duty
cycle block. Function block compares the duty cycle and saw tooth from repeating sequence-
derived trigger pulses are connected as an input to the switch control. Hence inputs for the
masked subsystem are duty ratio and input voltage, and the outputs are chosen to be inductor
current, capacitor voltage, and output voltage. When double-clicking the pointer on the masked
subsystem, one enters parameter values of the switching converter circuit in a dialogue window.
The intuitive signal flow interface in SIMULINK makes this mathematical model and its
corresponding masked subsystem very easy to create.

CHAPTER-V
SIMULATION RESULTS
5.1 Introduction:
Simulink is a software package for modeling, simulating, and analyzing dynamical
systems. It supports linear and nonlinear systems, modeled in continuous time, sampled time, or
a hybrid of the two. For modeling, Simulink provides a graphical user interface (GUI) for
building models as block diagrams, using click-and-drag mouse operations. Models are
hierarchical, so we can build models using both top-down and bottom-up approaches. We can
view the system at a high level, then double-click on blocks to go down through the levels to see
increasing levels of model detail. This approach provides insight into how a model is organized
and how its parts interact. After we define a model, we can simulate it, using a choice of
integration methods, either from the Simulink menus or by entering commands in MATLAB's
command window. Using scopes and other display blocks, we can see the simulation results
while the simulation is running. In addition, we can change parameters and immediately see what
happens, for "what if" exploration.
The simulation results can be put in the MATLAB workspace for post processing and
visualization. Simulink can be used to explore the behavior of a wide range of real-world
dynamic systems, including electrical circuits, shock absorbers, braking systems, and many other
electrical, mechanical, and thermodynamic systems.
Simulating a dynamic system is a two-step process with Simulink. First, we create a
graphical model of the system to be simulated, using Simulink's model editor. The model depicts
the time-dependent mathematical relationships among the system’s inputs, states, and outputs.
Then, we use Simulink to simulate the behavior of the system over a specified time span.
Simulink uses information that you entered into the model to perform the simulation.

5.2 Block Diagram

A Simulink block diagram is a pictorial model of a dynamic system. It consists of a set of


symbols, called blocks, interconnected by lines. Each block represents an elementary dynamic
system that produces an output either continuously (a continuous block) or at specific points in
time (a discrete block). The lines represent connections of block inputs to block outputs. Every
block in a block diagram is an instance of a specific type of block. The type of the block
determines the relationship between a block's outputs and its inputs, states, and time. A block
diagram can contain any number of instances of any type of block needed to model a system.
Blocks represent elementary dynamic systems that Simulink knows how to simulate. A block
comprises one or more of the following:

1) A set of inputs,
2) A set of states, and
3) A set of outputs.
A block's output is a function of time and the block's inputs and states (if any). The specific
function that relates a block's output to its inputs, states, and time depends on the type of block of
which the block is an instance. Continuous Versus discrete Blocks Simulink's standard block set
includes continuous blocks and discrete blocks. Continuous blocks respond continuously to
continuously changing input. Discrete blocks, by contrast, respond to changes in input only at
integral multiples of a fixed interval called the block's sample time. Discrete blocks hold their
output constant between successive sample time hits. Each discrete block includes a sample time
parameter that allows you to specify its sample rate. The Simulink blocks can be either
continuous or discrete, depending on whether they are driven by continuous or discrete blocks. A
block that can be either discrete or continuous is said to have an implicit sample rate. The
implicit sample time is continuous if any of the block's inputs are continuous. The implicit
sample time is equal to the shortest input sample time if all the input sample times are integral
multiples of the shortest time. Otherwise, the input sample time is equal to the fundamental
sample time of the inputs, where the fundamental sample time of a set of sample times is defined
as the greatest integer divisor of the set of sample times.

Simulink can optionally color code a block diagram to indicate the sample times of the
blocks it contains, e.g., black (continuous), magenta (constant), yellow (hybrid), red (fastest
discrete), and so on. The block contains block name, icon, and block library that contain the
block, the purpose of the block
5.3 Simulink Block Libraries

Simulink organizes its blocks into block libraries according to their behavior.

1) The Sources library contains blocks that generate signals.


2) The Sinks library contains blocks that display or write block output.
3) The Discrete library contains blocks that describe discrete-time components.
4) The Continuous library contains blocks that describe linear functions.
5) The Math library contains blocks that describe general mathematics functions.
6) The Functions & Tables library contains blocks that describe general functions
and table look-up operations.
7) The Nonlinear library contains blocks that describe nonlinear functions.
8) The Signal & Systems library contains blocks that allow multiplexing and
demultiplexing, implement external input/output, pass data to other parts of the model,
and perform other functions.
9) The Subsystems library contains blocks for creating various types of subsystems.
10) The Block sets and Toolboxes library contains the Extras block library of specialized
blocks.
5.4 Sub Systems

Simulink allows to model a complex system as a set of interconnected subsystems each


of which is represented by a block diagram. We create a subsystem using Simulink's Subsystem
block and the Simulink model editor. We can embed subsystems with subsystems to any depth to
create hierarchical models. We can create conditionally executed subsystems that are executed
only when a transition occurs on a triggering or enabling input.

5.5 Solvers
Simulink simulates a dynamic system by computing its states at successive time step
solver a specified time span, using information provided by the model. The process of computing
the successive states of a system from its model is known as solving the model. No single
method of solving a model suffices for all systems. Accordingly, Simulink provides a set of
programs, known as solvers, that each embody a particular approach to solving a model. The
Simulation Parameters dialog box allows us to choose the solver most suitable for our model.

5.5.1 Fixed-Step and Variable-Step Solvers


Fixed-step solvers solve the model at regular time intervals from the beginning to the end
of the simulation. The size of the interval is known as the step-size. We can specify the step size
or let the solver choose the step size. Generally decreasing the step size increases the accuracy of
the results while increasing the time required to simulate the system.
Variable-step solvers vary the step size during the simulation, reducing the step size to
increase accuracy when a model's states are changing rapidly and increasing the step size to
avoid taking unnecessary steps when the model's states are changing slowly. Computing the step
size adds to the computational overhead at each step but can reduce the total number of steps,
and hence simulation time, required to maintain a specified level of accuracy for models with
rapidly changing or piecewise continuous states.
5.5.2 Continuous and Discrete Solvers

Continuous solvers use numerical integration to compute a model's continuous states at


the current time step from the states at previous time steps and the state derivatives. Continuous
solvers rely on the model's blocks to compute the values of the model's discrete states at each
time step. Mathematicians have developed a wide variety of numerical integration techniques for
solving the ordinary differential equations (ODEs) that represent the continuous states of
dynamic systems. Simulink provides an extensive set of fixed-step and variable-step continuous
solvers, each implementing a specific ODE solution method. Some continuous solvers subdivide
the simulation time span into major and minor steps, where a minor time step represents a
subdivision of the major time step. The solver produces a result at each major time step. It use
results at the minor time steps to improve the accuracy of the result at the major time step.

Discrete solvers exist primarily to solve purely discrete models. They compute the next
simulation time-step for a model and nothing else. They do not compute continuous states and
they rely on the model's blocks to update the model's discrete states. We can use a continuous
solver, but not a discrete solver, to solve a model that contains both continuous and discrete
states. This is because a discrete solver does not handle continuous states. If you select a discrete
solver for a continuous model, Simulink disregards your selection and uses a continuous solver
instead when solving the model.
Simulink provides two discrete solvers, a fixed-step discrete solver and a variable-step
discrete solver. The fixed-step solver by default chooses a step size and hence simulation rate
fast enough to track state changes in the fastest block in our model. The variable-step solver
adjusts the simulation step size to keep pace with the actual rate of discrete state changes in our
model. This can avoid unnecessary steps and hence shorten simulation time for multirate models.

5.6 Model Execution Phase

In the simulation model execution phase, Simulink successively computes the states and
outputs of the system at intervals from the simulation start time to the finish time, using
information provided by the model. The successive time points at which the states and outputs
are computed are called time steps. The length of time between steps is called the step size. The
step size depends on the type of solver used to compute the system's continuous states, the
system's fundamental sample time, and whether the system's continuous states have
discontinuities (Zero Crossing Detection). At the start of the simulation, the model specifies the
initial states and outputs of the system to be simulated. At each step, Simulink computes new
values for the system's inputs, states, and outputs and updates the model to reflect the computed
values. At the end of the simulation, the model reflects the final values of the system's inputs,
states, and outputs. At each time step:

1) Simulink Updates the outputs of the models' blocks in sorted order. Simulink computes a
block's outputs by invoking the block's output function. Simulink passes the current time
and the block's inputs and states to the output function as it may require these arguments
to compute the block's output. Simulink updates the output of a discrete block only if the
current step is an integral multiple of the block's sample time.
2) Updates the states of the model's blocks in sorted order. Simulink computes a block's
discrete states by invoking its discrete state update function. Simulink computes a block's
continuous states by numerically integrating the time derivatives of the continuous states.
It computes the time derivatives of the states by invoking the block's continuous
derivatives function.
3) Optionally checks for discontinuities in the continuous states of blocks. Simulink uses a
technique called zero crossing detection to detect discontinuities in continuous states.
4) Computes the time for the next time step.
Simulink repeats steps 1 through 4 until the simulation stop time is reached.

5.6.1 Block Sorting Rules

Simulink uses the following basic update rules to sort the blocks:

1) Each block must be updated before any of the direct-feed through blocks that it drives.
This rule ensures that the inputs to direct-feed through blocks will be valid when
they are updated.
2) Non direct-feed through blocks can be updated in any order as long as they are updated
before any direct-feed through blocks that they drive. This rule can be met by putting all
non direct-feed through blocks at the head of the update list in any order. It thus allows
Simulink to ignore non direct-feed through blocks during the sorting process.

The result of applying these rules is an update list in which non direct-feed through blocks
appear at the head of the list in no particular order followed by direct-feed through blocks in the
order required to supply valid inputs to the blocks they drive. During the sorting process,
Simulink checks for and flags the occurrence of algebraic loops, that is, signal loops in which an
output of a direct-feed through block is connected directly or indirectly to one of the block's
inputs. Such loops seemingly create a deadlock condition since Simulink needs the input of a
direct-feed through block in order to compute its output. However, an algebraic loop can
represent a set of simultaneous algebraic equations (hence the name) where the block's input and
output are the unknowns. Further, these equations can have valid solutions at each time step.
Accordingly, Simulink assumes that loops involving direct-feed through blocks do, in fact,
represent a solvable set of algebraic equations and attempts to solve them each time the block is
updated during a simulation.

5.7 Determining Block Update Order


During a simulation, Simulink updates the states and outputs of a model's blocks once per
time step. The order in which the blocks are updated is therefore critical to the validity of the
results. In particular, if a block's outputs are a function of its inputs at the current time step, the
block must be updated after the blocks that drive its inputs. Otherwise, the block's outputs will be
invalid. The order in which blocks are stored in a model file is not necessarily the order in which
they need to be updated during a simulation. Consequently, Simulink sorts the blocks into the
correct order during the model initialization phase.
In order to create a valid update ordering, Simulink categorizes blocks according to the
relationship of outputs to inputs. Blocks whose current outputs depend on their current inputs are
called direct feed through blocks. All other blocks are called non direct-feed through blocks.
Examples of direct-feed through blocks include the Gain, Product, and Sum blocks. Examples of
non direct-feed through blocks include the Integrator block (its output is a function purely of its
state), the Constant block (it does not have an input), and the Memory block (its output is
dependent on its input in the previous time step). Simulink allows you to assign update priorities
to blocks. Simulink updates higher priority blocks before lower priority blocks. Simulink honors
the priorities only if they are consistent with its block sorting rules.
Some of SIMULINK blocks, which are used in this thesis, are given below.

1) Abs:

Purpose: Output the absolute value of the input.

Description: The Abs block implements the equation y = U, where U is the input and y is the
output.

2) Clock:

Purpose: Provide and display the system time.

Description: The clock block serves two purposes. When opened, it provides a window that
continuously displays the system time as a simulation progress. This time also available as the
output of the clock for any blocks whose behavior depends on time.

3) Constant:

Purpose: Inject a constant value.


Description: The output of the constant block is the value of the specified parameter
independent of time.

4) Demux:
Purpose: Separate a vector signal into scalar signals.
Description: The Demux block separates a vector line into several scalar lines. The number of
the outputs of the SIMULINK block must match the width of the input line. If the number of
outputs does not match the input width, SIMULINK signals an error for the block.

5) Derivative:

Purpose: Output the time derivative of the input.


Description: The Derivative block approximates the derivative of its input with du/dt, where du
is the change in input value since the previous simulator time step, and dt is the change in time
since the previous simulator time step. The accuracy of the results depends on the size of the
time steps taken in the simulation.

6) Discrete Transfer Function:

Purpose: Implement a discrete transfer function.


Description: Discrete Transfer Fcn block requires the specification of vectors for the numerator
and denominator. The vectors elements are treated as the coefficients of the numerator and
denominator polynomials in descending order of z. this block represents the method used in the
control system toolbox, while the filter block represents the method used in signal processing
toolbox. The two methods are identical when the numerator is the same length as the
denominator.

7) Discrete Zero-Pole:
Purpose: Provide a discrete transfer function in zero-pole form.
Description: This block implements a discrete single input-single output (SISO) zero-pole-gain
in terms of the delay operator z.

8) Fcn:

Purpose: Complete a general-purpose function of the input.


Description: The Fcn block applies the specified function to its input. This function must take
the form of a legal expression in C. It can be made up of the numbers, binary operators, unary
operators, parentheses, relational operator, functions of 1 variable, functions of 2 variable and
MATLAB variables.

9) From Workspace:

Purpose: Read data from a matrix.


Description: The specified matrix must have two or more columns. The first column must
contain monotonically increasing points. Each additional column contains data points
corresponding to the time point in its row.

10) Gain:

Purpose: Multiply its input by a constant.


Description: The Gain block implements Y=KU, where Y is the output, U is the input, and K is
the specified gain. The Gain block displays scalar gain data entered as variable or a constant. The
block displays the text as it appears in the dialog box.

11) In port:

Purpose: Provide a link to an external input and for linearization.


Description: In ports are the links from the outside world into a system. Inside a subsystem
block, there is an in port corresponding to each input port on the block. A signal that arrives at an
input port on a subsystem block flows out of the corresponding in port within that block. The
imports within a subsystem block must be numbered consecutively, starting with 1.
12) Integrator:

Purpose: Integrate a signal.


Description: The Integrator block integrates its input. Its single parameter is its initial condition.
The output of the integrator is simply its state, the integral. The initial value can be entered as a
constant or a variable.

13) Look-Up Table:

Purpose: Perform piecewise linear mapping of the input.


Description: The Look Up Table block implements the piecewise linear mapping described by
its two vector parameters. Input values are located in the input vector and corresponding output
values are taken from the same position in the output vector. Linear interpolation is used for
input values falling between specified input values.

4) Mux:
Purpose: Group several scalar lines into a vector line.
Description: The Mux block groups several scalar lines into a single vector line. The width of
the vector line is the same as the number of inputs specified. If the number of inputs does not
match the output width, SIMULINK signals an error for the block.

15) Out port:

Purpose: provide a link to an external output and for linearization.


Description: The Out port block provides a mechanism for labeling a system’s outputs. In a
subsystem, output ports correspond to outputs on the subsystem block.

16) Product:

Purpose: Multiply inputs together

Description: The Product block multiplies the value of each input to produce the output. If the
inputs are vectors, an element-by-element multiplication is performed. The number of inputs
parameter can be represented with a constant or a variable.

17) Relay:

Purpose: Switch output between two values.


Description: The Relay block allows the output to switch between two specified values. When
the relay is on, it remains on until the input drops below the specified value of Input for off.
When the relay is off, it remains off until the input exceeds the specified value of Input for on.

18) Scope:

Purpose: Display signals during simulation.


Description: While the simulation is running, the Scope block displays the output of the block
driving it. Opening a scope block produces a scope window. The title of this window matches the
name of the block.

19) Step Fcn:

Purpose: Generate step function.


Description: The Step Fcn block provides a step between two arbitrary levels at a specified time.
If system time is less than the step time parameter, the block’s output is the initial value. For time
greater than or equal to the step time, the output is the final value.

20) Subsystem:

Purpose: Group blocks into a subsystem

Description: Subsystem blocks represent one system within another system. Any set of blocks
and lines can be converted to a Subsystem block with the Group command on the options menu.
The Group command removes all selected objects from the active window and replaces them
within a Subsystem block. This new block, when opened, redisplays all of the grouped
objectives.
21) Sum:

Purpose: Sum outputs together

Description: The Sum block accepts scalar inputs only and adds the value of each input to
produce a scalar output. The list of signs parameter can be represented with a constant or a
combination of the symbols (+-).

22) Switch:

Purpose: Switch between two inputs.


Description: The Switch block uses its second input to control which of its other two inputs is
propagated to its output. If the signal on the second input is greater than or equal to zero, the first
input is propagated; otherwise, the third input drives the output.

23) To Workspace:

Purpose: Write data to a matrix.


Description: The To Workspace block creates a matrix with the specified name containing the
data from the vector input line. The matrix will have the same number of columns as the vector
width of the input with each channel of data being written to a different column. One row of data
is written for each simulation step containing the state of each element of the vector input. Every
time a simulation is finished, any existing matrix of the same name is over written; this block
does not append data. The matrix is not available in the workspace until the simulation is
terminated.

24) Zero-pole:
Purpose: Implement a transfer function specified in terms of poles and zeros.

Description: the Zero-Pole block implements a system with the specified zeros, poles, and gains
in the Laplace operator s.
Simulink is a graphical extension to MATLAB for modeling and simulation of systems. In
Simulink, systems are drawn on screen as block diagrams. Many elements of block diagrams are
available, such as transfer functions, summing junctions, etc., as well as virtual input and output
devices such as function generators and oscilloscopes. Simulink is integrated with MATLAB and
data can be easily transferred between the programs. In these tutorials, we will apply Simulink to
the examples from the MATLAB tutorials to model the systems, build controllers, and simulate
the systems. Simulink is supported on UNIX, Macintosh, and Windows environments; and is
included in the student version of MATLAB for personal computers.
Simulink is started from the MATLAB command prompt by entering the following command:
simulink
Alternatively, you can hit the New Simulink Model button at the top of the MATLAB
command window as shown below:

When it starts, Simulink brings up two windows. The first is the main Simulink window, which
appears as:
The second window is a blank, untitled, model window. This is the window into which a new
model can be drawn.

CHAPTER-VI
SYSTEM CONFIGURATION
Figure depicts the schematic diagram of single phase grid connected PV system
comprising PV panels, DC-DC converter, MPPT charge controller, tank capacitor, VSC and RL
loads.

Fig 6.1 Block diagram for system configuration of PVDGCC

IC based MPPT controller is used to extract the maximum available power from the PV panels.
Control based on tank capacitor voltage is used to control the transfer of maximum power to the
grid via VSC. The direct voltage controlled current driven VSC keeps the voltage across the tank
capacitor constant by regulating the power evacuation through voltage control. Proper design of
LCL filter at the output of VSC filters out harmonics at the PCC. The conventional 3 phase SRF
theory is modified to suit the single phase system. The modified SRF theory is applied to
decompose the load current to generate the reference reactive power current command.
Reference for the real current component is obtained by applying PI controller on the error
between measured voltage and the reference voltage.

6.1 MODELING OF PV ARRAYS


The basic equations that govern I-V characteristic of the ideal photovoltaic cell are
reported in literatures. The typical equation governing the PV arrays is given as
Where, Vt= , Ns-Number of cells connected in series; Rp=Equivalent parallel Resistance;
Rs= Equivalent contact series Resistance. Commercially available KC200GT Kyocera make PV
panels are considered here to design the array to deliver power of 800W by connecting 3 panels
in a string and similar 2 strings in parallel in MATLAB Simulink. The parameters of the panel
are shown in Table. The proposed charge controller operates to extract the maximum power at
one level of solar insolation by using Incremental Conductance based MPPT controller

Fig: 6.2 PV Panel model

6.2 CONTROL THEORY


The proposed system the 3 phase SRF based theory is modified for single phase system.
The heart of the control scheme lays with correct estimation of phase voltage though phase

locked loop (PLL), which is used for generation of unit template vectors. The output of
the PLL will be in phase with single phase voltage at PCC. For applying modified SRF theory to
single phase system, phase voltage or current is assumed as alpha (α) component in α-β frame
(stationary frame of reference), and β component is obtained by introducing phase delay of 90°
to alpha components as shown in Fig. Using modified SRF theory both DG and load currents are
transformed into d-q components and passed through low pass filter (LPF) to obtain only DC
components corresponding to fundamental frequency as shown in Fig. 7.3. For such

synchronized modified SRF theory based transformation components corresponds to


real and reactive power components respectively. Assuming current reference as
The α-β component is then transformed to d-q using equations

Id and Iq obtained through transformation is passed though LPF to obtain the at DC


quantities which after proper control on this DC quantity, it’s again converted back to α-β
component using

After transformation only α component is used for signal generation. In the photovoltaic
based grid connected system it is utmost important to extract MPP tracked power for economical
operation and to avoid panels heating due to under utilization. To guarantee this, constant DC
bus voltage is required to be maintained across DC link capacitor, and reference current is
generated to obtain the command voltage reference for PWM control of the VSC as shown in
Fig. The control forces the output current of VSC to closely follow the reference current. The
DG’s main task is to send maximum power to the grid via VSC. In the event of varying
insolation or during low insolation, the VSC capacity is not fully utilized for real power transfer.
The unutilized capacity can be used for limited reactive power compensation. The depth of
compensation is based on capacity remaining after deducting MPPT tracked
Fig. 6.3 Control Scheme for proposed System
reactive power component in load is determined and multiplied with ‘k’ showing the selective or
amount of power to be compensated as shown in Fig.. This reference reactive command is
compared with DG ‘ qDG’ component and error is passed through PI controller to generate
reference Vq * component. This voltage reference d-q component is then reverse transformed to
α-β using equations (8). Out of the two components in stationary frame of reference vα *
component is used for PWM gating signal generation.

LCL filter design:


Fig 6.5 shows the LCL filter which is placed at the VSC output terminal to get the filtered
output. Proper design of filter is crucial from the stability point of view. Applying KCL to the
LCL circuit following equations are synthesized

Where,
N(s) = sRC + 1
Fig.6.4 LCL model

D(s) = [(L2+Ls) L1C] s3 + [ (L2 + Ls) (R + R1) C + ( R2+ Rs) L1C + L1C] s2 + [ (R2+Rs)
(R1+Rc)C +R1C + L2 + Ls) s + [ (R2 + Rs) ]

Using above equations circuit can be modeled as block diagram as shown in Fig.6.4 For
checking the stability of the filter design bode plot is drawn in the MATLAB for the parameters
given in table as shown in Fig. From Fig. it can be seen that the plot have overshoot near
resonant frequency other plot with low damping and other with proposed system of LCL filter
parameters show no overshoot and proper damping. The adequate passive damping provided
avoids peak at resonant point and prevents loss of gain, by appropriately choosing the damping
ratio. By keeping L1 and L2 same, reactive interaction of filter capacitance gets minimized with
the line with minimized value of capacitance.
Fig.6.5 Block diagram representation of LCL filter

6.3 MATLAB-BASED SIMULATION


INTRODUCTION
Simulink is a software package for modeling, simulating, and analyzing dynamical
systems. It supports linear and nonlinear systems, modeled in continuous time, sampled time, or
a hybrid of the two. For modeling, Simulink provides a graphical user interface (GUI) for
building models as block diagrams, using click-and-drag mouse operations. Models are
hierarchical, so we can build models using both top-down and bottom-up approaches. We can
view the system at a high level, then double-click on blocks to go down through the levels to see
increasing levels of model detail. This approach provides insight into how a model is organized
and how its parts interact. After we define a model, we can simulate it, using a choice of
integration methods, either from the Simulink menus or by entering commands in MATLAB's
command window. Using scopes and other display blocks, we can see the simulation results
while the simulation is running. In addition, we can change parameters and immediately see what
happens, for "what if" exploration.
The simulation results can be put in the MATLAB workspace for post processing and
visualization. Simulink can be used to explore the behavior of a wide range of real-world
dynamic systems, including electrical circuits, shock absorbers, braking systems, and many other
electrical, mechanical, and thermodynamic systems.
Simulating a dynamic system is a two-step process with Simulink. First, we create a graphical model of
the system to be simulated, using Simulink's model editor. The model depicts the time-dependent
mathematical relationships among the system’s inputs, states, and outputs. Then, we use Simulink to
simulate the behavior of the system over a specified time span. Simulink uses information that you
entered into the model to perform the simulation.

5.2 BLOCK DIAGRAM

A Simulink block diagram is a pictorial model of a dynamic system. It consists of a set of


symbols, called blocks, interconnected by lines. Each block represents an elementary
dynamic system that produces an output either continuously (a continuous block) or at
specific points in time (a discrete block). The lines represent connections of block inputs to
block outputs. Every block in a block diagram is an instance of a specific type of block. The
type of the block determines the relationship between a block's outputs and its inputs, states,
and time. A block diagram can contain any number of instances of any type of block needed
to model a system. Blocks represent elementary dynamic systems that Simulink knows how
to simulate. A block comprises one or more of the following:

4) A set of inputs,
5) A set of states, and
6) A set of outputs.
A block's output is a function of time and the block's inputs and states (if any). The
specific function that relates a block's output to its inputs, states, and time depends on the type of
block of which the block is an instance. Continuous Versus discrete Blocks Simulink's standard
block set includes continuous blocks and discrete blocks. Continuous blocks respond
continuously to continuously changing input. Discrete blocks, by contrast, respond to changes in
input only at integral multiples of a fixed interval called the block's sample time. Discrete blocks
hold their output constant between successive sample time hits. Each discrete block includes a
sample time parameter that allows you to specify its sample rate. The Simulink blocks can be
either continuous or discrete, depending on whether they are driven by continuous or discrete
blocks. A block that can be either discrete or continuous is said to have an implicit sample rate.
The implicit sample time is continuous if any of the block's inputs are continuous. The implicit
sample time is equal to the shortest input sample time if all the input sample times are integral
multiples of the shortest time. Otherwise, the input sample time is equal to the fundamental
sample time of the inputs, where the fundamental sample time of a set of sample times is defined
as the greatest integer divisor of the set of sample times.
Simulink can optionally color code a block diagram to indicate the sample times of the
blocks it contains, e.g., black (continuous), magenta (constant), yellow (hybrid), red (fastest
discrete), and so on. The block contains block name, icon, and block library that contain the
block, the purpose of the block
5.3 SIMULINK BLOCK LIBRARIES

Simulink organizes its blocks into block libraries according to their behavior.

11) The Sources library contains blocks that generate signals.


12) The Sinks library contains blocks that display or write block output.
13) The Discrete library contains blocks that describe discrete-time components.
14) The Continuous library contains blocks that describe linear functions.
15) The Math library contains blocks that describe general mathematics functions.
16) The Functions & Tables library contains blocks that describe general functions and table
look-up operations.
17) The Nonlinear library contains blocks that describe nonlinear functions.
18) The Signal & Systems library contains blocks that allow multiplexing and demultiplexing,
implement external input/output, pass data to other parts of the model, and perform other
functions.
19) The Subsystems library contains blocks for creating various types of subsystems.
20) The Block sets and Toolboxes library contains the Extras block library of specialized blocks.

5.4 SUB SYSTEMS

Simulink allows to model a complex system as a set of interconnected subsystems each of which
is represented by a block diagram. We create a subsystem using Simulink's Subsystem block and the
Simulink model editor. We can embed subsystems with subsystems to any depth to create hierarchical
models. We can create conditionally executed subsystems that are executed only when a transition
occurs on a triggering or enabling input.

5.5 SOLVERS
Simulink simulates a dynamic system by computing its states at successive time step
solver a specified time span, using information provided by the model. The process of computing
the successive states of a system from its model is known as solving the model. No single
method of solving a model suffices for all systems. Accordingly, Simulink provides a set of
programs, known as solvers, that each embody a particular approach to solving a model. The
Simulation Parameters dialog box allows us to choose the solver most suitable for our model.
5.5.1 Fixed-Step and Variable-Step Solvers
Fixed-step solvers solve the model at regular time intervals from the beginning to the end
of the simulation. The size of the interval is known as the step-size. We can specify the step size
or let the solver choose the step size. Generally decreasing the step size increases the accuracy of
the results while increasing the time required to simulate the system.
Variable-step solvers vary the step size during the simulation, reducing the step size to
increase accuracy when a model's states are changing rapidly and increasing the step size to
avoid taking unnecessary steps when the model's states are changing slowly. Computing the step
size adds to the computational overhead at each step but can reduce the total number of steps,
and hence simulation time, required to maintain a specified level of accuracy for models with
rapidly changing or piecewise continuous states.
5.5.2 Continuous and Discrete Solvers

Continuous solvers use numerical integration to compute a model's continuous states at the
current time step from the states at previous time steps and the state derivatives. Continuous solvers
rely on the model's blocks to compute the values of the model's discrete states at each time step.
Mathematicians have developed a wide variety of numerical integration techniques for solving the
ordinary differential equations (ODEs) that represent the continuous states of dynamic systems.
Simulink provides an extensive set of fixed-step and variable-step continuous solvers, each
implementing a specific ODE solution method. Some continuous solvers subdivide the simulation time
span into major and minor steps, where a minor time step represents a subdivision of the major time
step. The solver produces a result at each major time step. It use results at the minor time steps to
improve the accuracy of the result at the major time step.

Discrete solvers exist primarily to solve purely discrete models. They compute the next
simulation time-step for a model and nothing else. They do not compute continuous states and
they rely on the model's blocks to update the model's discrete states. We can use a continuous
solver, but not a discrete solver, to solve a model that contains both continuous and discrete
states. This is because a discrete solver does not handle continuous states. If you select a discrete
solver for a continuous model, Simulink disregards your selection and uses a continuous solver
instead when solving the model.
Simulink provides two discrete solvers, a fixed-step discrete solver and a variable-step
discrete solver. The fixed-step solver by default chooses a step size and hence simulation rate
fast enough to track state changes in the fastest block in our model. The variable-step solver
adjusts the simulation step size to keep pace with the actual rate of discrete state changes in our
model. This can avoid unnecessary steps and hence shorten simulation time for multirate models.
5.6 MODEL EXECUTION PHASE

In the simulation model execution phase, Simulink successively computes the states and
outputs of the system at intervals from the simulation start time to the finish time, using
information provided by the model. The successive time points at which the states and outputs
are computed are called time steps. The length of time between steps is called the step size. The
step size depends on the type of solver used to compute the system's continuous states, the
system's fundamental sample time, and whether the system's continuous states have
discontinuities (Zero Crossing Detection). At the start of the simulation, the model specifies the
initial states and outputs of the system to be simulated. At each step, Simulink computes new
values for the system's inputs, states, and outputs and updates the model to reflect the computed
values. At the end of the simulation, the model reflects the final values of the system's inputs,
states, and outputs. At each time step:

5) Simulink Updates the outputs of the models' blocks in sorted order. Simulink computes a
block's outputs by invoking the block's output function. Simulink passes the current time
and the block's inputs and states to the output function as it may require these arguments
to compute the block's output. Simulink updates the output of a discrete block only if the
current step is an integral multiple of the block's sample time.
6) Updates the states of the model's blocks in sorted order. Simulink computes a block's
discrete states by invoking its discrete state update function. Simulink computes a block's
continuous states by numerically integrating the time derivatives of the continuous states.
It computes the time derivatives of the states by invoking the block's continuous
derivatives function.
7) Optionally checks for discontinuities in the continuous states of blocks. Simulink uses a
technique called zero crossing detection to detect discontinuities in continuous states.
8) Computes the time for the next time step.
Simulink repeats steps 1 through 4 until the simulation stop time is reached.

5.6.1 Block Sorting Rules


Simulink uses the following basic update rules to sort the blocks:

3) Each block must be updated before any of the direct-feed through blocks that it drives. This
rule ensures that the inputs to direct-feed through blocks will be valid when they are updated.
4) Non direct-feed through blocks can be updated in any order as long as they are updated before
any direct-feed through blocks that they drive. This rule can be met by putting all non direct-
feed through blocks at the head of the update list in any order. It thus allows Simulink to ignore
non direct-feed through blocks during the sorting process.
The result of applying these rules is an update list in which non direct-feed through
blocks appear at the head of the list in no particular order followed by direct-feed through blocks
in the order required to supply valid inputs to the blocks they drive. During the sorting process,
Simulink checks for and flags the occurrence of algebraic loops, that is, signal loops in which an
output of a direct-feed through block is connected directly or indirectly to one of the block's
inputs. Such loops seemingly create a deadlock condition since Simulink needs the input of a
direct-feed through block in order to compute its output. However, an algebraic loop can
represent a set of simultaneous algebraic equations (hence the name) where the block's input and
output are the unknowns. Further, these equations can have valid solutions at each time step.
Accordingly, Simulink assumes that loops involving direct-feed through blocks do, in fact,
represent a solvable set of algebraic equations and attempts to solve them each time the block is
updated during a simulation.

5.7 DETERMINING BLOCK UPDATE ORDER


During a simulation, Simulink updates the states and outputs of a model's blocks once per
time step. The order in which the blocks are updated is therefore critical to the validity of the
results. In particular, if a block's outputs are a function of its inputs at the current time step, the
block must be updated after the blocks that drive its inputs. Otherwise, the block's outputs will be
invalid. The order in which blocks are stored in a model file is not necessarily the order in which
they need to be updated during a simulation. Consequently, Simulink sorts the blocks into the
correct order during the model initialization phase.
In order to create a valid update ordering, Simulink categorizes blocks according to the
relationship of outputs to inputs. Blocks whose current outputs depend on their current inputs are
called direct feed through blocks. All other blocks are called non direct-feed through blocks.
Examples of direct-feed through blocks include the Gain, Product, and Sum blocks. Examples of
non direct-feed through blocks include the Integrator block (its output is a function purely of its
state), the Constant block (it does not have an input), and the Memory block (its output is
dependent on its input in the previous time step). Simulink allows you to assign update priorities
to blocks. Simulink updates higher priority blocks before lower priority blocks. Simulink honors
the priorities only if they are consistent with its block sorting rules.
Some of SIMULINK blocks, which are used in this thesis, are given below.

1) Abs:

Purpose: Output the absolute value of the input.

Description: The Abs block implements the equation y = U, where U is the input and y is the
output.

2) Clock:
Purpose: Provide and display the system time.

Description: The clock block serves two purposes. When opened, it provides a window that
continuously displays the system time as a simulation progress. This time also available as the
output of the clock for any blocks whose behavior depends on time.

3) Constant:

Purpose: Inject a constant value.


Description: The output of the constant block is the value of the specified parameter independent of
time.

4) Demux:

Purpose: Separate a vector signal into scalar signals.


Description: The Demux block separates a vector line into several scalar lines. The number of the
outputs of the SIMULINK block must match the width of the input line. If the number of outputs does
not match the input width, SIMULINK signals an error for the block.

5) Derivative:

Purpose: Output the time derivative of the input.


Description: The Derivative block approximates the derivative of its input with du/dt, where du is the
change in input value since the previous simulator time step, and dt is the change in time since the
previous simulator time step. The accuracy of the results depends on the size of the time steps taken in
the simulation.

6) Discrete Transfer Function:


Purpose: Implement a discrete transfer function.
Description: Discrete Transfer Fcn block requires the specification of vectors for the numerator and
denominator. The vectors elements are treated as the coefficients of the numerator and denominator
polynomials in descending order of z. this block represents the method used in the control system
toolbox, while the filter block represents the method used in signal processing toolbox. The two
methods are identical when the numerator is the same length as the denominator.

7) Discrete Zero-Pole:

Purpose: Provide a discrete transfer function in zero-pole form.


Description: This block implements a discrete single input-single output (SISO) zero-pole-gain in terms of
the delay operator z.

8) Fcn:

Purpose: Complete a general-purpose function of the input.


Description: The Fcn block applies the specified function to its input. This function must take the form of
a legal expression in C. It can be made up of the numbers, binary operators, unary operators,
parentheses, relational operator, functions of 1 variable, functions of 2 variable and MATLAB variables.

9) From Workspace:
Purpose: Read data from a matrix.
Description: The specified matrix must have two or more columns. The first column must contain
monotonically increasing points. Each additional column contains data points corresponding to the time
point in its row.

10) Gain:

Purpose: Multiply its input by a constant.

Description: The Gain block implements Y=KU, where Y is the output, U is the input, and K is
the specified gain. The Gain block displays scalar gain data entered as variable or a constant. The
block displays the text as it appears in the dialog box.

11) In port:

Purpose: Provide a link to an external input and for linearization.


Description: In ports are the links from the outside world into a system. Inside a subsystem
block, there is an in port corresponding to each input port on the block. A signal that arrives at an
input port on a subsystem block flows out of the corresponding in port within that block. The
imports within a subsystem block must be numbered consecutively, starting with 1.
12) Integrator:

Purpose: Integrate a signal.


Description: The Integrator block integrates its input. Its single parameter is its initial condition. The
output of the integrator is simply its state, the integral. The initial value can be entered as a constant or
a variable.

13) Look-Up Table:


Purpose: Perform piecewise linear mapping of the input.
Description: The Look Up Table block implements the piecewise linear mapping described by its two
vector parameters. Input values are located in the input vector and corresponding output values are
taken from the same position in the output vector. Linear interpolation is used for input values falling
between specified input values.

14) Mux:

Purpose: Group several scalar lines into a vector line.

Description: The Mux block groups several scalar lines into a single vector line. The width of the vector
line is the same as the number of inputs specified. If the number of inputs does not match the output
width, SIMULINK signals an error for the block.

15) Out port:

Purpose: provide a link to an external output and for linearization.


Description: The Out port block provides a mechanism for labeling a system’s outputs. In a subsystem,
output ports correspond to outputs on the subsystem block.

16) Product:
Purpose: Multiply inputs together

Description: The Product block multiplies the value of each input to produce the output. If the inputs are
vectors, an element-by-element multiplication is performed. The number of inputs parameter can be
represented with a constant or a variable.

17) Relay:

Purpose: Switch output between two values.

Description: The Relay block allows the output to switch between two specified values. When the relay
is on, it remains on until the input drops below the specified value of Input for off. When the relay is off,
it remains off until the input exceeds the specified value of Input for on.

18) Scope:

Purpose: Display signals during simulation.


Description: While the simulation is running, the Scope block displays the output of the block driving it.
Opening a scope block produces a scope window. The title of this window matches the name of the
block.

19) Step Fcn:

Purpose: Generate step function.


Description: The Step Fcn block provides a step between two arbitrary levels at a specified time.
If system time is less than the step time parameter, the block’s output is the initial value. For time
greater than or equal to the step time, the output is the final value.
20) Subsystem:

Purpose: Group blocks into a subsystem

Description: Subsystem blocks represent one system within another system. Any set of blocks and lines
can be converted to a Subsystem block with the Group command on the options menu. The Group
command removes all selected objects from the active window and replaces them within a Subsystem
block. This new block, when opened, redisplays all of the grouped objectives.

21) Sum:

Purpose: Sum outputs together

Description: The Sum block accepts scalar inputs only and adds the value of each input to produce a
scalar output. The list of signs parameter can be represented with a constant or a combination of the
symbols (+-).

22) Switch:

Purpose: Switch between two inputs.


Description: The Switch block uses its second input to control which of its other two inputs is
propagated to its output. If the signal on the second input is greater than or equal to zero, the first input
is propagated; otherwise, the third input drives the output.
23) To Workspace:

Purpose: Write data to a matrix.


Description: The To Workspace block creates a matrix with the specified name containing the data from
the vector input line. The matrix will have the same number of columns as the vector width of the input
with each channel of data being written to a different column. One row of data is written for each
simulation step containing the state of each element of the vector input. Every time a simulation is
finished, any existing matrix of the same name is over written; this block does not append data. The
matrix is not available in the workspace until the simulation is terminated.

24) Zero-pole:

Besides variab, signals, and even entire systems can be exchanged between MATLAB and
Simulink.
Simulink is a platform for multinomial simulation and Model-Based Design for dynamic
systems. It provides an interactive graphical environment and a customizable set of block libraries, and
can be extended for specialized applications.

TOOL BOXES OF MATLAB SIGNAL PROCESSING

The Signal Processing Blockset extends Simulink with efficient frame-based


processing and blocks for designing, implementing, and verifying signal processing systems. The
blockset enables you to model streaming data and multirate systems in communications, audio/video,
digital control, radar/sonar, consumer and medical electronics, and other numerically intensive
application areas.
Embedded Target for Motorola® MPC555

The Embedded Target for Motorola® MPC555 lets you deploy production code
generated from Real-Time Workshop Embedded Coder directly onto MPC5xx microcontrollers. You
can use the Embedded Target for Motorola MPC555 to execute code in real time on the Motorola
MPC5xx for on-target rapid prototyping, production deployment of embedded applications, or
validation and performance analysis.

Real-Time Windows Target

Real-Time Windows Target enables you to run Simulink and State flow models in
real time on your desktop or laptop PC. You can create and control a real-time execution entirely
through Simulink. Using Real-Time Workshop, you generate C code, compile it, and start real-time
execution on Microsoft Windows while interfacing to real hardware using PC I/O boards. Other
Windows applications continue to run during operation and can use all CPU cycles not needed by the
real-time task.

Real-Time Workshop

Real-Time Workshop generates and executes stand-alone C code for developing and
testing algorithms modeled in Simulink. The resulting code can be used for many real-time and non-
real-time applications, including simulation acceleration, rapid prototyping, and hardware-in-the-loop
testing. You can interactively tune and monitor the generated code using Simulink blocks and built-in
analysis capabilities, or run and interact with the code outside the MATLAB and Simulink environment.

Real-Time Workshop Embedded

Real-Time Workshop Embedded Coder generates C code from Simulink and Stateflow
models that has the clarity and efficiency of professional handwritten code. The generated code is
exceptionally compact and fast—essential requirements for embedded systems, on-target rapid
prototyping boards, microprocessors used in mass production, and real-time simulators. You can use
Real-Time Workshop Embedded Coder to specify, deploy, and verify production-quality software.
To let you make a side-by-side comparison between the capabilities and
characteristics of the code generated by Real-Time Workshop and Real-Time Workshop Embedded
Coder, the demos for both products have been placed together on the Real-Time Workshop.

SimDriveline

SimDriveline extends Simulink with tools for modeling and simulating the mechanics
of driveline (drivetrain) systems. These tools include components such as gears, rotating shafts, and
clutches; standard transmission templates; and engine and tire models. SimDriveline is optimized for
ease of use and speed of calculation for driveline mechanics. It is integrated with MathWorks control
design and code generation products, enabling you to design controllers and test them in real time
with the model of the mechanical system.

SimEvents

SimEvents extends Simulink with tools for modeling and simulating discrete-event
systems using queues and servers. With SimEvents you can create a discrete-event simulation model
in Simulink to model the passing of entities through a network of queues, servers, gates, and switches
based on events. You can configure entities with user-defined attributes to model networks in packet-
based communications, manufacturing, logistics, mission planning, supervisory control, service
scheduling, and other applications. SimEvents lets you model systems that are not time-driven but are
based on discrete events, such as the creation or movement of an entity, the opening of a gate, or the
change in value of a signal.

SimMechanics

SimMechanics extends Simulink with tools for modeling and simulating mechanical
systems. It is integrated with MathWorks control design and code generation products, enabling you
to design controllers and test them in real time with the model of the mechanical system.

Sim Power Systems


SimPowerSystems extends Simulink with tools for modeling and simulating basic
electrical circuits and detailed electrical power systems. These tools let you model the generation,
transmission, distribution, and consumption of electrical power, as well as its conversion into
mechanical power. SimPowerSystems is well suited to the development of complex, self-contained
power systems, such as those in automobiles, aircraft, manufacturing plants, and power utility
applications.

Simulink Accelerator

The Simulink Accelerator increases the simulation speed of your model by


accelerating model execution and using model profiling to help you identify performance bottlenecks.

Simulink Control Design

Simulink Control Design provides advanced functionality for performing linear


analysis of nonlinear models. You can extract linear approximations of a model to analyze
characteristics such as time and frequency responses and pole-zero dynamics. A graphical user
interface (GUI) and programming capabilities reduce the complexity and time required to develop the
linearized models.

Simulink Fixed Point

Simulink Fixed Point enables the intrinsic fixed-point capabilities of the Simulink
product family, letting you design control and signal processing systems that will be implemented
using fixed-point arithmetic.

Simulink Parameter Estimation

Simulink Parameter Estimation is a tool that helps you calibrate the response of
your Simulink model to the outputs of a physical system, eliminating the need to tune model
parameters by trial and error or develop your own optimization routines. You can use time-domain
test data and optimization methods to estimate model parameters and initial conditions and generate
adaptive lookup tables in Simulink.

Simulink Report Generator


The Simulink Report Generator automatically creates documentation from
Simulink and State flow models. You can document software requirements and design specifications
and produce reports from your models, all in a standard format. You can use the pre built templates
or create a template that incorporates your own styles and standards.

Simulink Response Optimization

Simulink Response Optimization is a tool that helps you tune design parameters
in Simulink models by optimizing time-based signals to meet user-defined constraints. It optimizes
scalar, vector, and matrix-type variables and constrains multiple signals at any level in the model.
Simulink Response Optimization supports continuous, discrete, and multirate models and enables you
to account for model uncertainty by conducting Monte Carlo simulations.

Simulink Verification and Validation

Simulink Verification and Validation enables you to develop requirements-


based designs and test cases in Simulink and State flow and measure test coverage. By linking
requirements to your design and test cases and performing coverage analysis at the model level, you
can trace requirements, validate your design, identify inadequate requirements, and expose
unnecessary constructs and design flaws.

State flow

Stateflow is an interactive design and simulation tool for event-driven systems. Stateflow provides the
language elements required to describe complex logic in a natural, readable, and understandable
form. It is tightly integrated with MATLAB and Simulink, providing an efficient environment for
designing embedded systems that contain control, supervisory, and mode logic.

The complete single phase grid connected PV system is simulated under MATLAB
simulink with RL load (R= 4 Ω, L= 4 mH) as shown in Fig.7.6. PV panels are connected in
series and parallel in such a way that array could deliver maximum power of 8.5 kW at 1000 W/
insolation level. IC based MPPT algorithm is verified by writing embedded MATLAB code.
LCL filter is connected at the output of VSC as per parameters given in the table II. The
simulated results are studied to compute the performance of single phase grid connected system
under limited available capacity of VSC. The parameters of the considered system are shown in
Table-

Fig.6.6 Single phase roof top PV MATLAB model for grid connected system
6.4 PERFORMANCE EVALUATION
Single phase grid connected photovoltaic based VSC with limited power conditioning is
simulated under MATLAB simulink environment. Fig. shows the waveform for PCC voltage,
source current, VSC current, load current, DC link voltage, MPPT power, and VSC output active
and reactive power respectively. To make the analysis more clear initial transient conditions is
not shown and analysis is started when sustained steady state is reached, i.e. starting from t =0.4s
onwards. With PCC point voltage maintained at 230 V total load demand which is 55.16 A is
shared between two sources – the grid source and the PV source connected at PCC as shown in
Fig. Assuming capacity of VSC 10.5 KVA, and available MPP power of 8.5 kW at 1000 W/m2
insolation, its capacity is shared between active and reactive power output of VSC. Till t=1s
when the insolation is at 1000 W/m2, the MPPT extracted 8.5 kW power for transfer through
VSC to maintain constant DC link voltage as shown in Fig.
Fig.6.7 Dynamic response of single phase roof top PV system for voltage at PCC, source current from grid , VSC
current, load current, DC link voltage , MPPT tracked power, Active and reactive power output of the VSC
Till t=1s VSC and grid sources shared 21.6 A and 34.2 A respectively for total load
demand as shown in Fig. During the same time VSC only supply a part of the total load reactive
power demand (3.8 KVAr) which is 2.3 KVAr as shown in Fig. At t = 1s insolation level has
changed to 800 W/m2 leading to decrease in PV power to 6.8 kW as shown in Fig. This decrease
in active power supply through VSC results into additional room created for more reactive power
compensation. As per the rating of VSC, full reactive compensation is provided through VSC
amounting to 3.8 KVAr as shown in Fig. In turn source current from grid and VSC current gets
redistributed after t = 1s to 26.8 A and 29.4 A respectively as shown in Fig. With the full reactive
power compensation after t = 1s source voltage and current comes in phase resulting into unity
power factor operation.

6.5 Extension circuit


Fig: 6.8 Single phase roof top PV MATLAB model for grid connected system by using fuzzy
logic controller

Fig 6.9 Dynamic response of single phase roof top PV system for voltage at PCC, source current
from grid , VSC current, load current, DC link voltage
Fig 6.10 Reactive and Acitve power supplied by Voltage souce converter.
Fig. 6.11 Dynamic response of single phase roof top PV system for voltage at PCC
Conclusion:
The complete single phase grid connected PV system is simulated under MATLAB
simulink with RL load (R= 4 Ω, L= 4 mH) as shown in Fig.6.8. PV panels are connected in
series and parallel in such a way that array could deliver maximum power of 8.5 kW at 1000 W/
insolation level. IC based MPPT algorithm is verified by writing embedded MATLAB code.
LCL filter is connected at the output of VSC as per parameters. The simulated results are studied
to compute the performance of single phase grid connected system under limited available
capacity of VSC.

CONCLUSION

The simulated results clearly demonstrates the ability of the proposed control scheme to
evacuate MPP tracked power from the PV array and provide limited reactive power
compensation with grid connected mode. The MPPT used in the control tracks the power very
fast even under step change of insolation, and the current controlled PWM controller inject
adequate generated current for self support of capacitor at DC bus and thereby providing storage
less operation. Single phase SRF based estimation is employed which provides rugged control
with cost effective solution. The proposed SRF based approach enable the control for providing
limited compensation of reactive power depending on available unutilized capacity of VSC. The
implemented scheme derives the advantage of simplicity and is capable of delivering under
varying insolation conditions effectively. Such technique is envisaged to benefit the PV rooftop
system and grid/microgrid by the limited compensation, thereby effectively utilizing the
connected hardware.
REFERENCES
1. Velasco de la Fuente, D. ; Garcera, G. ; Figueres, E. ; Guacaneme, J.“Reconfigurable control
scheme for a PV microinverter working in both grid connected and island modes,” IEEE Trans.
Industrial Electronics,2012.

2. Jmjun Liu ;Jun Yang ;Zhaoan Wang "A New Approach For Single-Phase Harmonic Current
Detecting And Its Applicationin in a Hybrid Active Power Filter," IEEE conf., 1999.

3. B. Singh, V. Verma, “,Selective compensation of power-quality problems through active


power filter by current decomposition”IEEE Trans. Power delivery., vol. 23, no. 2, April 2008.

4. Guohong Zeng; Rasmussen, T.W.; Lin Ma; Teodorescu, R., “Design and control of LCL-filter
with active damping for Active Power Filter,” IEEE International Symposium on Industrial
Electronics, pp. 2657-2562, 2010.

5. S.Mekhilef, "Performance of grid connected inverter with maximum power point tracker and
power factor control," International Journal of Power Electronics, vol. 1, pp. 49-62, 2008.

6. S.Mekh Femia, N.; Petrone, G.; Spagnuolo, G.; Vitelli, M., “A Technique for Improving P&O
MPPT Performances of Double-Stage Grid-Connected Photovoltaic Systems,” IEEE Trans.
Industrial Electronics, vol. 56, pp. 4473-4482, 2009.
7. M. G. Villalava,j. r. Gazoli,E. Ruppert F., “Modelling and circuit –based simulation of
Photovoltaic arrays” Brazilian Journal of Power Electronics,vol 14,no.4,pp. 35-45, 2009

8. B. Crowhurst, E.F. El-Saadany, L. El Chaar and L.A. Lamont "Single-Phase Grid-Tie Inverter
Control Using DQ Transform for Active and Reactive Load Power Compensation," IEEE
conf.,PECON, Malaysia,2010.

You might also like