Beruflich Dokumente
Kultur Dokumente
A power system is said to be well designed when it gives a good quality of reliable
power supply. Good quality means, the voltage level is within the reasonable limits.
Practically all the equipments in the power system correspond to their rated voltages or at the
most variations are within say ± 5%. If the voltage variation is more than the pre-specified
limits, the performance of the equipments suffers and the life of most of the equipment
sacrificed. Higher the reactive load, greater is the voltage variation. The voltage variation at a
node is an indication of the unbalance between the reactive power generated and consumed
by that node. If the reactive power generated is greater than consumed, the voltage goes up
and vice-versa. Traditional solutions to congestion and voltage security problems were to
install new costly transmission lines that are often faced with public resistance, or
mechanically switched capacitor banks that have limited benefits for dynamic performance
due to switching time and frequency. The introduction of new technologies has lead to some
changes in the linearity of the transmission and distribution. The non-linear loads inject the
harmonics in the transmission line. This affects the loads in the system. Hence, the
compensation is needed to provide the less harmonic power supply to the loads in that
system. For this, I have used hybrid active power filter having active and passive power
filters connected in series to compensate the harmonics.
Electric Power quality is a term, which has captured increasing attention in power
engineering in the recent years. Even though this subject has always been of interest to power
engineers, it has assumed considerable interest in the 1990's. Electric power quality means
different things for different people. To most electric power engineers, the term refers to a
certain sufficiently high grade of electric service but beyond that, there is no universal
agreement. The measure of power quality depends upon the needs of the equipment that is
being supplied. What is good power quality for an electric motor may not be good enough for
a personal computer. Usually the term power quality refers to maintaining a sinusoidal
waveform of bus voltages at rated voltage and frequency. The waveform of electric power at
generation stage is purely sinusoidal and free from any distortion. Many of the Power
1
conversion and consumption equipment are also designed to function under pure sinusoidal
voltage waveforms. However, many devices distort the waveform. These distortions may
propagate all over the electrical network. In recent years, there has been an increased use of
non-linear loads, which has resulted in an increased fraction of non-sinusoidal currents and
voltages in Electric Network.
Harmonic distortion in power system will cause additional power losses and
malfunctioning of protective relay and switchgears. Harmonic treatment can be performed by
two methods: Filtering and cancellation.
1.2.1 Filtering
A harmonic filter consists of a capacitor bank and an induction coil. The filter is
designed or tuned to the predetermined non-linear load and to filter a predetermined
harmonic frequency range. Usually this frequency range only accounts for one harmonic
frequency. This application is mostly used when specified for an UPS or variable frequency
drive motor in a manufacturing plant.
1.2.2 Cancellation
2
transformers can be used to treat existing harmonics in buildings or facilities. This same
application can be designed into new construction to prevent future harmonics problems.
3
CHAPTER 02
DESCRIPTION OF THE PROJECT
2.1 EXISTING SYSTEM
In the existing system, the normal alternating load is connected to three phase supply
with a filtering unit. The hybrid active power filter is used to filter the harmonics. The various
disadvantages of the existing system includes, three phase system increases the complexity in
developing the prototype. Cost of the system is high and additions of passive filters introduce
series harmonics into the line. The transformers make the compensation unit more bulky and
increase the cost of the system. Control Scheme is more complex. No error minimization
concepts were implemented.
In the proposed system I have used the hybrid active power filter connected to the load
and the compensation technique is implemented using PIC microcontroller. To balance the
load current we have used proportional controller. The microcontroller gets the input from the
signal conditioning unit which is used to provide processed digital signals and calculates the
current and voltage at any instant which are provided by hall sensor and potential transformer
respectively. The line current is monitored for zero crossing so that the compensation could
be provided. This is done with the help of zero crossing detector. With the output of the
microcontroller, the inverter unit is correspondingly switched on and off so that the inverter
4
acts as converter and rectifier thus providing the sinusoidal waveform as the output. Equal
and opposite current is injected in to the line. Thus the harmonics can be eliminated
effectively using this proposed system.
The main advantage of the hybrid active power filter is that it requires a small rated
converter compared to the similar pure active filter. The single phase hybrid active power
filter consists of shunt passive filter and series active power filter. The shunt passive power
filter is connected in parallel with the load and suppresses the harmonic current produced by
the load, whereas the active power filter connected in series to the source acts as a harmonic
isolator between the source and the load. For active filter control, pulse width modulation is
developed and the modulation index is selected by the DC bus voltage of the active filter.
This is helpful in injecting the compensating current or voltage direct to the AC lines. The
utilization of auto transformer to the phase shift section of the load in such a way that cancels
low order harmonics. By replacing the existing power distribution transformers with the
transformer that include phase shifted transformer that include phase shifted winding on the
secondary and/or that have high level of reactance between primary and secondary windings.
This active filter provides fast corrective action even with drastically changing non-linear
loads. The complete cancellation of harmonics will be achieved if the filter generates the
current equal and opposite to the present harmonics or voltage in phase with the system. In
5
practice, ideal compensating would be achieved by PWM methods, which have good
characteristics of harmonic elimination.
In this project there are various blocks in between the source and the load. The hybrid
technology for filter is obtained by connecting the passive power filter in parallel with the
active power filter.
6
2.4 LINEAR LOAD
These are the AC electrical loads where the voltage and current waveforms are
sinusoidal. The current at any time is proportional to voltage. Linear loads are power factor
improvement capacitors, incandescent lamps, heaters, etc.
In AC circuits, linear loads’ voltage and current waveforms are sinusoidal, so the
current at any time is proportional to voltage and these loads does not change the
shape of the waveform of the current, but may change the relative timing (phase)
between voltage and current.
Linear loads’ impedance remains fixed with changing the applied voltage. The fixed
impedance means that the current drawn by the linear load will be sinusoidal as like
the voltage and the current at any time will be proportional to voltage.
Linear loads do not produce any new frequency (harmonics) or change the applied
frequency.
The connection of the linear load in the transmission line is simulated as shown
below.
7
2.5 NON-LINEAR LOAD
This applies to those ac loads where the current is not proportional to the voltage.
Foremost among loads, meeting their definition is gas discharge lighting having saturated
ballast coils and thyristor (SCR) controlled loads. The nature of non-linear loads is to
generate harmonics in the current waveform. This distortion of the current waveform leads to
distortion of the voltage waveform. Under these conditions, the voltage waveform is no
longer proportional to the current. Examples for Non-Linear Loads are Electronic equipment,
electronic/electric-discharge lighting, adjustable-speed drive systems, computer, LASER
printers, Switched Mode Power Supply, Rectifier, Programmable Logic Controller,
electronic ballast, refrigerator, television and similar equipments.
Non-linear loads change the shape of the current waveform from a sine wave to some
other form.
Non-linear loads create harmonic currents in addition to the original (fundamental
frequency) AC current causing distortion of the current waveform leads to distortion
of the voltage waveform. Under these conditions, the voltage waveform is no longer
proportional to the current.
Non-linear loads’ impedance changes with the applied voltage. The changing
impedance means that the current drawn by the non-linear load will not be sinusoidal
even when it is connected to a sinusoidal voltage.
These non-sinusoidal currents contain harmonic currents that interact with the
impedance of the power distribution system to create voltage distortion that can affect
both the distribution system equipment and the loads connected to it.
8
The simulated diagram for the non linear load is shown below.
From the above discussion, it is known that there are many differences between linear
and non-linear loads. Some of the important points have been tabulated below.
9
CHAPTER 03
The description of the project is provided below. Each and every circuit has its own
function. Functions and details of the various blocks used in the project are also discussed.
As we all know any invention of latest technology cannot be activated without the source
of power. So it this fast moving world we deliberately need a proper power source which will
be apt for a particular requirement. All the electronic components starting from diode to Intel
IC’s only work with a DC supply ranging from ± 5v to ± 12v. We are utilizing for the same,
the cheapest and commonly available energy source of 230v-50Hz and stepping down,
rectifying, filtering and regulating the voltage.
10
Resistors R1 and R2 maintain line load regulation. At the secondary side of the
transformer the voltage will be of 15 V AC. The following table shows the various ranges of
voltages obtained from various components used in the project.
A regulated power supply consists of an ordinary power supply and a voltage regulating
device. The output from the ordinary power supply unit is fed to the voltage regulating
device that provides the final output, which remains constant irrespective of the variations in
the ac input voltage or variations in the output current. There are three types of regulated
power supply. They are as follows.
The fixed RPS is the one, which produces the output of a positive voltage. Its
magnitude depends upon the regulator IC used. The regulated power supply for
microcontroller unit +5v, 300 mA and its waveform respectively are shown below.
11
Figure 10: RPS Waveform
The adjustable power supply uses a variable resistor of 2.2.k (40%) and LM17 for
getting the power supply as desired. The LM317 is an adjustable three-terminal positive-
voltage regulator capable of supplying more than 1.5 A over an output-voltage range of 1.2 V
to 37 V. It is exceptionally easy to use and requires only two external resistors to set the
output voltage. Furthermore, both line and load Regulation are better than standard fixed
regulators. In addition to having higher performance than fixed regulators, this device
includes on-chip current limiting, thermal overload protection, and safe-operating-area
protection. All overload protection remains fully functional, even if the ADJUST terminal is
disconnected.
12
The LM317 is versatile in its applications, including uses in programmable output
regulation and local on-card regulation. Or, by connecting a fixed resistor between the
ADJUST and OUTPUT terminals, the LM317 can function as a precision current regulator.
An optional output capacitor can be added to improve transient response. The ADJUST
terminal can be bypassed to achieve very high ripple-rejection ratios, which are difficult to
achieve with standard three-terminal regulators. The LM317 is characterized for operation
over the virtual junction temperature range of 0°C to 125°C.
The dual regulated power supply produces the output of a positive and a negative voltage
to the equipments. The project uses the dual RPS for gate driver unit ± 12v, 500ma, zero
crossing detector ±12v, 500ma, and signal conditioning unit ± 12v, 500ma.
13
Figure 13: Dual RPS waveform
Voltage transformers enable not only measurements but also control of the basic electric
quantities (voltage, power and electric energy, frequency, power factor) and contribute to
increase the reliability of the operation of the electric power systems. Safe operation of the
electric energy loads is not possible without voltage transformers. Voltage transformers are
being used from voltages as low as 400V in power networks on substations of the electric
power system, distribution stations of the power network, distribution stations of the industry
facilities, high voltage laboratories and as supply transformers or test transformers. High
requirements of the contemporary protection circuits (short times of its operation) especially
refer to the voltage transformer operation in transient state. It is necessary to systematically
make laboratory studies of their methological properties in this state. Voltage transformer is
an element of connection between power lines on the primary side of the voltage transformer
and protection circuits and or measurement circuits connected to its secondary side.
14
Figure 14: Potential Transformer
As we are dealing with single phase ac supply, the voltage and the current in the range of
230V and 5A are to be lowered in order to calculate for compensating current. These are
done with the help of Hall Effect current sensors. This sensor works under Hall Effect
principle that is whenever a current carrying conductor is placed into a magnetic field; a
voltage will be generated perpendicular to both the current and the field. If the Hall voltage is
measured when no magnetic field is present, the output is zero. However, if the voltage at
each output terminal is measured with respect to ground, a non-zero voltage will appear. This
is the common mode voltage (CMV), and is the same at each output terminal. The potential is
zero. A differential amplifier can be integrated with the Hall element using standard bipolar
transistor technology. Temperature compensation is also easily integrated. When the
magnetic field is absent, current distribution is uniform and no potential difference is seen
across the output.
15
Figure 15: Current Flow in Hall Effect Sensor without Magnetic Field
Figure 16: Current Flow in Hall Effect Sensor with Magnetic Field
In the experimental set-up, the power level current of ±10 A is transduced to ±5V.
The 5 turns are wound to carry a 50 AT mmf in the primary. Let the input current be ii. The
number of turns on the primary side is 5. Thus ampere turns on the primary side is 5 i1. With
the conversion Ratio of 1:1000, the secondary output current is given as i o= (ii*5)/1000=
0.005ii A
This output current is producing an output voltage vo across 100 Ω, according to the
equation. vo= iio×Ro = 0.005ii×100 = 0.5ii V. Thus, ±10 A input current is transduced into ±5
16
V with isolation. The printed circuit board (PCB) for Hall Effect current transducer is
developed.
The analog to digital converter accepts only the signal in the range of 0-3V. Hence, the
bipolar ± 5V output of the sensors is processed to the required voltage level using the signal
conditioning circuit. In electronics, signal conditioning means manipulating an analog signal
in such a way that it meets the requirements is the next stage for further processing. Most
common use is in analog-to-digital converters. In control engineering applications, it is
common to have a sensing stage (which consists of a sensor), a signal conditioning stage
(where usually amplification of the signal is done) and a processing stage (normally carried
out by an ADC and a microcontroller). Operational amplifiers (op-amps) are commonly
employed are to carry out the amplification of the signal conditioning stage.
17
3.5.2 Level Shifter
The signal conditioning unit is use to sense the voltage and current in the circuit. Here
the attenuator reduces the amplitude without distorting its waveform, level shifter acts as
summer and precision rectifier as a clamper.
18
Figure 19: Output Waveform of Signal Conditioning Circuit
Types of devices that use signal conditioning include signal filters, instrument
amplifiers, sample-and-hold amplifiers, isolation amplifiers, signal isolators, multiplexers,
bridge conditioners, analog-to-digital converters, digital-to-analog converters, frequency
converters or translators, voltage converters or inverters, frequency-to-voltage converters,
voltage-to-frequency converters, current-to-voltage converters, current loop converters, and
charge converters.
Filtering is the most common signal conditioning function, as usually mot all the signal
frequency spectrum contains valid data. As we are using non-linear loads that are both ac and
dc loads the load current will be distorted. This in turn affects the supply voltage. This will
end by providing multiple zero crossings at the voltage waveforms. So in order to find the
accurate amount of magnitude of filter current and its phase angle, we need to know whether
the current is lagging or leading. For that, we go for synchronous circuit. It does consist of
two low pass filter circuits; all pass filters and a zero crossing circuit.
19
3.6.1 Low Pass Filter
Low pass filter passes through low frequency AC signals, stops high frequency
signals.The multiple zero crossings caused by the harmonic current, if it is lesser we can use
only one second order low pass filter or else for severe cases we use two such filters. After
that the ripples may also be caused by the second order low pass filter, will be eliminated by
the all pass filter. Then the output is fed to the ZCD circuit.
It produces an output stage whenever the input crosses the reference input. It provides
both gain adjust and phase adjust. The ZCD will provide an uprising pulse for positive rising
voltage and down going pulses for negative voltage. This is used for providing compensation
for the circuit. The zero crossing detector has four parts- Phase adjust and gain adjust,
Voltage follower or unity gain, Sine to square wave generator, Precision rectifier or push pull
amplifier. The ZCD, which produces an output state change whenever the input crosses the
reference input. In this case, the reference input is connected to ground. The output of the
comparator can easily drive multiple outputs, which can include a relay, a control gate and a
LED indicator. This circuit works with either open-drain or push-pull types of comparator
output, depending upon the load to be driven.
The load, in many cases, can also act as a pull-up device, so that a pull-up resister is not
required. Alternatively, push-pull outputs can actively pull-up the output to shutdown the
load. In either case an output resistor and its associated power consumption are not required.
The IC used here, TL064 is a high speed J-FET input quad operational amplifier.
20
Figure 22: Pin diagram of TL064
The device high input impedance, low input bias current low input offset current and
low offset voltage temperature coefficient. It finds applications in Audio distribution
amplifier, Precision rectifier, Instrumentation Amplifier, 0.5-Hz Square-Wave Oscillator,
High-Q Notch Filter, Low-Level Light Detector Preamplifier, AC Amplifier, Microphone
Preamplifier with Tone Control, Instrumentation Amplifier, IC Preamplifier. The ZCD
provides gain adjust i.e. adjusts the amplitude value of the input signal as per the reference
value and phase adjust to adjust the angle of the waveform accordingly.
IRF540 MOSFETS are used as a voltage source inverter, which is used to switch the
supply from the capacitor to the distribution line. It also consists of a diode connected anti
parallel to the MOSFET inside will charge the capacitor with the supply voltage. Switching
speed depends on the pulse produced by the PIC microcontroller based on the values
obtained for the compensation current. The voltage that is stored in the capacitor is
discharged to the supply line through this inverter circuit.
21
Figure 24: IRF 540 MOSFET
Due to non linear load the current wave form will got distorted by harmonics, so to
eliminate the harmonic current we are injecting the same value of current with the help of an
inverter and the dc storage capacitor. This MOSFET has specifically been designed to
minimize input capacitance and gate charge. It is therefore suitable as primary switch in
advanced high efficiency, high-frequency isolated DC-DC converters for Telecom and
Computer applications. It is also intended for any applications with low gate drive
requirements.
ID
Type VDSS RDS (ON)
22
Figure 25: Pin Diagram of MOSFET IRF540
The VSI used here is a single phase inverter. Four VSI are connected as a common
inverter. This VSI has 120° conduction mode. There are two modes of operation. Each
diagonal pair conducts only for one-half cycle. That is MOSFET S1 and S2 for positive half
cycle and S3 and S4 for negative half cycle. In mode I S1 and S4 switches conduct thus
positive half cycle is generated. In mode II the other switches S2 and S3 conduct to generate
the negative half cycle. During the non conduction mode of the switches, they act as diodes,
forming a bridge rectifier. This DC is used to charge the capacitor which is connected as the
source to the VSI unit. This bridge rectifier gets its supply from the transmission line. When
the switching pulse is provided to the switches, in mode I operation, it gives an output in a
pulsed form to compensate the current.
The boost inductor plays an important role in power factor correction (PFC). It provides
Isolation between Shield and Winding: 4.5KVrms. All parts have Faraday Shield (except
Toroid). Also it provides Isolation between Winding: 1500 Vrms.
23
Its features are :
For inverter circuit it is necessary to electrically isolate the MOSFET from the control
circuit. The gate driver circuits are used for providing isolation between the high voltage side
and low voltage side. By using the opto coupler, the input signal and the module are isolated
from each other. Also since the opto coupler does not limit the output pulse width; it is
suitable for changing pulse widths or PWM controllers, to wide ranges. It is currently most
widely used. Furthermore, this way the turn-on and turn-off characteristics determined by
gate resistance can be set separately, so it commonly used to ensure the best settings. A gate
driver is a power amplifier that accepts a low-power input from a controller IC and produces
a high-current drive input for the gate of a high-power transistor such as an IGBT or power
MOSFET. Gate drivers can be provided either on-chip or as a discrete module. In essence, a
gate driver consists of a level shifter in combination with an amplifier. The circuit is powered
by using an adjustable power supply which uses LM317.
24
3.9.1 OPTO ISOLATOR
Since the MOSFET’s used to switch the capacitor voltage into the supply line there
will be switching transients produced by them. These switching transients in turn will affect
the pulses developed by the PIC18F4550 and by time the micro controller itself. So in order
to protect the microcontroller and the control circuit from power circuit we are providing
isolation circuit. Once the logical gate signals G1-G4 are available for four MOSFET
switches, these have to be isolated before giving to the gate terminals of the switches. An
opto-coupler (IC 6N136) is used to provide isolation of logic gate pulse from power circuit.
Since there are four switches in VSI, therefore four units of opto-couplers are used. However,
only three isolated regulated DC voltage supplies are required. Two isolated DC power
supplies for upper two switches of the inverter and one isolated power supply for lower two
switches as emitter is common for these switches. The response of Opto-coupler depends on
the value of output resistance, this is designed based on the value of supply voltage and
current withstand capability of photo transistor in Opto-coupler IC.
25
3.10 PIC 18F4550 MICRO CONTROLLER
26
3.10.2 Peripheral Features
High current sink/source 25 mA /25 mA
Three external interrupts
Enhanced Capture/ Compare/ PWM (ECCP) module
Compatible 10-bit, up to 13-channels Analog-to-Digital Converter module
Dual analog comparators
Capture 16-bit, max. resolution 6.25 ns
Compare 16-bit, max. resolution 100 ns
27
Figure 29: Pin Diagram of PIC18F4550
The PIC 18F4550 is used to provide the switching pulses to the VSI. Due to the reduced
instruction set of this microcontroller, the program can be easily made. In addition, it has a
high ADC sampling as compares to the other families of microcontrollers i.e. 16 family,
8051, ATMEL, etc. It has an operating time of 83ns. Thus, the switching to the VSI is done at
high speed and further compensation is easily acquired.
28
20 RD1/SPP1
21 RD2/SPP2
22 RD3/SPP3
23 RC4/D-/VM
24 RC5/D+/VP
25 RC6/TX/CK
26 RC7/RX/DT/SDO
27 RD4/SPP4
28 RD5/SPP5/P1B
29 RD6/SPP6/P1C
30 RD7/SPP7/P1D
31 VSS
32 VDD
33 RB0/AN12/INT0/SDI/SDA
34 RB1/AN10/INT1/SCK/SCL
35 RB2/AN8/INT2/VMO
36 RB3/AN9/CCP2/VPO
37 RB4/AN11/KBI0/CSSPP
38 RB5/KBI1/PGM
39 RB6/KBI2/PGC
40 RB7/KBI3/PGD
29
3.10.5 Tools
MP Lab IDE
o C and assembly environment
o Debugger included
o C compiler included
Programmers
o Variable cost
o CCS compiler, Proteus, ICDE2, PICKit2, etc.
Software Development Tools
o Libraries by Microchip
Here the CCS (custom compute service) compiler is used to program the PIC
microcontroller. To give the input PWM pulses to the VSI the program is done in such a way
that it compares the input current, line current and load current and switches the VSI as
required i.e., when the reference current and the line current coincides the output pulse is
generated and the compensating current is produced. The comparator can be fixed easily in
18F4550. The software coding is given in Chapter 05.
30
CHAPTER 04
4.1 INTRODUCTION
The active power filter is used for both harmonic elimination and reactive power
compensation. The filter current contains both harmonic and reactive component of load
current. The objective of the control scheme and compensation algorithm is to compute the
sinusoidal reference source current equivalent to the average load power and thereby obtain
the reference filter current.
The proportional integral control of capacitor voltage is a widely reported single phase
control algorithm. The block diagram of the proposed control scheme is shown below. Here
the capacitor voltage of VSI is controlled to a reference value using a proportional integral
(PI) controller thereby obtaining power balance between source, load and converter. The
actual capacitor voltage is compared 18 with a reference value and this difference is given as
input to PI controller. The PI controller output is multiplied by a unity sine function in phase
with voltage to generate the reference source current.
Vc ref
Im Imsinωt
Capacitor vc(t) PI Controller
X
Voltage Sensor
- +
The algorithm is claimed to draw only least compensation current from the source. A
response time of less than one cycle was obtained. It can compensate under both sinusoidal
and distorted source voltage. However, like other indirect methods, the performance of this
method also depends on the careful selection of the control parameters. Also an initial
31
estimate of source current is required as input before starting of the active power filter. It is a
control loop feedback mechanism. The weighted sum of these three is used to adjust the
process i.e. error in process. The proposed algorithm can compute the reference source
current instantaneously over time and also provides a transient response of half cycle (full
cycle) for load current containing odd (odd and even) harmonics under both sinusoidal and
distorted supply voltages with odd (odd and even) harmonics.
If the sending end and receiving end voltages are maintained to be constant the
regulation would be better. To maintain the regulation the distortions made by the non linear
loads are to be eliminated. Since the reactive power required by this loads are heavier, the
generator can’t provide that much power.
The reactive power can be compensated either by improving the receiving voltage or by
reducing the line reactance. Since the line reactance is fixed, it can be done only by
increasing the voltage. Hence, on injecting the current into the distribution we can improve
the voltage and compensate the reactive power.
ΔV= (RP+QX)/V
δV= (XP-RQ)/V
δV<< (V+ΔV)
E-V= (RP+QX)/V=ΔV
E-V= [XQ]/V
32
So the reactive power can be compensated either by improving the receiving voltage or
by reducing the line reactance. Since the line reactance is fixed, it can be done only by
increasing the voltage. Hence on injecting the current into the distribution we can improve
the voltage and compensate the reactive power.
With that the average power can be calculated as the product of vt (t) and il (t),
is(t) = imssin(t-φs)
33
With the load current and the fundamental current, the injecting current can be found out as,
The ideal active power filter with no losses and infinite band width has been considered
for the discussion. However, in case of actual circuit the copper and core losses of the circuit
components and the switching losses of the inverter come into picture. In addition, the
bandwidth of filter is limited by the maximum switching frequency of the inverter switches.
An actual filter comprised of full bridge voltage source inverter and a dc storage capacitor.
The filter is connected to load at PCC through interface inductor (Lf). The resistance Rf
models the losses in the inverter. Each MOSFET switch in the inverter has an anti-parallel
diode to allow the current in reverse direction. To realize reference filter current generated
using the above algorithm, the single-phase full bridge voltage source inverter is operated in
a pre-defined hysteresis band (±h) current control.
34
Thus, the diagonal switches pairs (S1− S2) and (S3 − S4) are operated in complimentary
mode in such a way to track the reference filter current.
35
CHAPTER 05
SOFTWARE CODINGS
5 SOFTWARE REQUIREMENTS
In this project MATLAB is used for obtaining simulated output for each and every unit
required for compensation. Other than MATLAB, CCS (custom compute service) compiler is
used for PIC programming. We can also se PROTEUS software for obtaining the visualized
results and check the program. We go for CCS compiler which is an embedded C language,
because it is easy to handle with. Now let us discuss about the MATLAB software and the
coding in this section.
MATLAB is an interactive system whose basic data element is an array that does not
require dimensioning. This allows us to solve many technical computing problems,
especially those with matrix and vector formulations, in a fraction of the time it would take to
write a program in a scalar non interactive language such as C or FORTRAN. The name
MATLAB stands for matrix laboratory. MATLAB was originally written to provide easy
access to matrix software developed by the LINPACK and EISPACK projects. Today,
MATLAB engines incorporate the LAPACK and BLAS libraries, embedding the state of the
36
art in software for matrix computation. MATLAB is a high-level language and interactive
environment that enables us to perform computationally intensive tasks faster than with
traditional programming languages such as C, C++ and FORTRAN. MATLAB features a
family of add-on application-specific solutions called toolboxes. Very important to most
users of MATLAB, toolboxes allow us to learn and apply specialized technology. Toolboxes
are comprehensive collections of MATLAB functions (M-files) that extend the MATLAB
environment to solve particular classes of problems. Areas in which toolboxes are available
include signal processing, control systems, neural networks, fuzzy logic, wavelets,
simulation, aerospace, bioinformatics, image processing and many others. Areas in which
block sets are available include aerospace, communications, RF, signal processing, video and
image processing.
Functions for integrating MATLAB based algorithms with external applications and
languages, such as C, C++, FORTRAN, Java, COM, and Microsoft Excel.
5.2 SIMULINK
37
create batch processing scripts, customize the modeling environment, and define signal,
parameter, and test data.
With Simulink, we can quickly create, model, and maintain a detailed block diagram
of your system using a comprehensive set of predefined blocks. Simulink provides tools for
hierarchical modeling, data management, and subsystem customization, making it easy to
create concise, accurate representations, regardless of your system's complexity.
38
5.2.2 Selecting and Customizing Blocks
Continuous and discrete dynamics blocks, such as Integration and Unit Delay.
We can customize these built-in blocks or create new ones directly in Simulink and
place them into your own libraries. Additional block sets (available separately) extend
Simulink with specific functionality for aerospace, communications, radio frequency, signal
processing, video and image processing, and other applications. We can model Physical
system in Simulink. Simscape, SimDriveline, SimHydraulics, SimMechanics and
SimPowerSystem (all available separately) provide expanded capabilities for
modelling physical systems, such as those with mechanical, electrical, and hydraulic
components.
When we incorporate MATLAB code, we can call MATLAB functions for data analysis
and visualization. Additionally, Simulink helps in using Embedded MATLAB code to design
embedded algorithms that can then be deployed through code generation with the rest of your
model. We can also incorporate hand-written C, FORTRAN, and ADA code directly into a
model, enabling us to create custom blocks in your model.
With Simulink, we build models by dragging and dropping blocks from the library
browser onto the graphical editor and connecting them with lines that establish mathematical
relationships between the blocks. We can arrange the model by using graphical editing
functions, such as copy, paste, undo, align, distribute, and resize.
39
Figure 34: Building a Model
The Simulink user interface gives us complete control over what we can see and use
onscreen. We can add your commands and submenus to the editor and context menus. We
can also disable and hide menus, menu items, and dialog box controls.
Simulink lets us to organize our model into clear, manageable levels of hierarchy by
using subsystems and model referencing. Subsystems encapsulate a group of blocks and
signals in a single block. We can add a custom user interface to a subsystem that hides the
subsystem's contents and makes the subsystem appear as an atomic block with its own icon
and parameter dialog box. We can also segment your model into design components to
model, simulate, and verify each component independently. Components can be saved as
separate models by using model referencing, or as subsystems in a library. They are
compatible with configuration management systems, such as CVS and Clear Case, and with
any registered source control provider application on Windows platforms. We can reuse the
design components on multiple projects, easily maintaining audit and revision histories.
Organizing our models in this way lets us to select the level of detail appropriate to the
design task.
5.4 PROGRAM
#include <18f4550.h>
#fuses HS,NOWDT,PROTECT,NOPUT,NOBROWNOUT
#use delay(clock=20000000)
40
unsigned char zcd=0,flag=0,flag1=0;
#INT_COMP
voidisr()
if(C2OUT==1)
flag1=1;
else
flag1=0;}
void main()
io_init(0x0f,0x01,0x00,0x00,0x0f);
portc=0;
delay_ms(200);
setup_comparator(A0_A3_A1_A2);
delay_ms(200);
enable_interrupts(INT_COMP);
enable_interrupts(GLOBAL);
delay_ms(200);
while(TRUE)
if(portb_0==1)
41
{
portc_0=portc_1=0;
if(flag1==0)
portd_3=portd_2=0;
else
portd_3=portd_2=1;
delay_us(5);
else if(portb_0==0)
portc_2=portc_3=0;
if(flag1==0)
portd_0=portd_1=1;
delay_us(5);
else
42
{
portd_0=portd_1=0;
delay_us(5);
43
CHAPTER 06
The steady state and dynamic performance of the filter are validated through digital
simulation using MATLAB. The switching of the inverter is controlled by monitoring the
reference and the actual currents of the filter. The actual filter current (if) is compared with
reference filter current hysteresis band envelope (i*f ± h). When if is greater or equal to (i*f +
h), the switches S3 − S4 are closed. This corresponds to Switch s = −1. When if is less or
equal to i*f − h, the switches S3 − S4 re open and this corresponds to Switch s = 1.
Accordingly, gates commands are given to the inverter. The simulated system consists of a
distorted source voltage supplying power to load containing a RL load and a full bridge
rectifier with highly inductive load. The PCC voltage is considered distorted with 20% third
harmonic and 3% fifth harmonic components. The total harmonic distortion of supply
voltage and load current are found to be 19.55% and 23.38% respectively. The simulation
uses a hysteresis band of 10% of the peak value of source current. The figure shows the
supply voltage and compensated source current for eliminating harmonics only. The
simulation studies are conducted for both types of compensation i.e harmonic elimination
plus reactive power compensation and harmonic elimination only.
44
The input current is sinusoidal waveforms with distortions.
45
As mentioned before the linear load has the chracteristics of unchanged load current
as shown below. Linear loads do not produce any new frequency (harmonics) or change the
applied frequency.
The non-linear load changes the shape of the current waveform from a sine wave to
some other form. Non-linear loads create harmonic currents in addition to the original
(fundamental frequency) AC current causing distortion of the current waveform leads to
distortion of the voltage waveform. Under these conditions, the voltage waveform is no
longer proportional to the current.
46
The passive filter give the output with much limited harmonics, but it is not a pure
sine waveform.
The combination of passive filter with the shunt active power filter will produce the
compensated current (shown in light shade) and the dark shade shows the output from the
HAPF.
The proposed algorithm is tested using a prototype of single phase active power
filter developed in the laboratory. The details of the system parameters for experimental set
up are given in table below. The supply voltage and load current are distorted. The load
current is result of combination of RL load and a rectifier load with an RL load at dc side.
47
Table 06: System Parameters for Simulation
S.No Parameter Value
1 Supply Voltage 230 V, Stiff source
6.2 OBSERVATIONS
From the above-simulated results, it is observed that with the application of PI theory,
the total harmonic distortions are much reduced. As compared with passive filter and active
filter output which are obtained separately, the hybrid configuration gives better results.
Further discussions can be made to bring the distortions down. The sampling of 1
sample/second is obtained with the help of PIC18F4550. In the program the PWM pulse is
generated as such to switch the VSI for the sampling. But 1 sample/second is not enough for
perfect harmonic reduction. For simultaneous sampling we have to go for 720
samples/second. This is not possible with PIC. But using dsPIC for the same can give better
results. Also the PI controller provides less stability and the system order is changed. To
overcome this disadvantage we should go for other controller such as PD controller or PID
controller.
48
The comparative analysis of features of various controlling techniques is listed below.
10
6 2
3
7
1
8
9
11
49
2. Voltage source inverter
3. Gate driver circuit
4. Dual voltage regulated power supply for the gate driver unit
5. Boost inductor
6. Hall effect sensor
7. Zero crossing detector
8. Dual RPS for signal conditioning unit and ZCD
9. Signal conditioning unit
10. Regulated power supply
11. Potential transformer
(a) (b)
Figure 44: Load Voltage and Load Current (a) Linear Load (b) Non Linear Load
(a) (b)
Figure 45: ZCD Output (a) Linear Load (b) Non Linear Load
50
Figure 46: Switching Sequence
(a) (b)
Figure 47: Filter Output (a) Active Filter (b) Passive Filter
51
CHAPTER 07
CONCLUSION
The details of PIC based Hybrid active power filter is presented. The design of
various building blocks such as transducer circuits, signal conditioning circuits and Opto-
isolation circuits are clearly illustrated and explained. Based on the design details illustrated,
a prototype HAPF is developed in the laboratory. The experimental results demonstrate the
compensator effectively compensates harmonic components of the load current and
consequently utility currents are balanced and sinusoidal with unity phase relationship with
their voltages in respective phases. A new single phase active power filter algorithm is
implemented which provides a response time of half cycle / full cycle for load current
containing odd/even harmonics. Also, the method can work irrespective of supply voltage
quality, whether it is sinusoidal or distorted. A prototype model of active power filter is
implemented in laboratory and detailed experimental studies are carried out. It is observed
that the experimental results are consistent with the simulation results.
7.1 ADVANTAGES
MOSFET is a better choice in terms of cost efficiency.
Unity power factor can be achieved.
Harmonic current are greatly reduced.
Effective power factor correction can be obtained.
Use of microcontroller facilities flexibility in programming.
Future modification in the program can be done easily.
PI controller is used for greater error minimization.
In the present project, PIC microcontroller PI theory is used to switch the MOSFET
accordingly to produce the compensation current. In future design of a suitable DSP
processor based VSI with IGBT instead of MOSFETS can be implemented. The PID
controller can be used for increased sampling time and by increasing the rating of capacitor
voltage sensor based on the capacitor voltage selection can give improved results. A suitable
52
variable non linear load for testing can be designed. If the testing results are satisfied with
single phase model of STATCOM single phase series compensation can be implemented.
REFERENCES
[1] “Performance Evaluation of Hybrid Active Power Filter”, Narayan Prasad Gupta,
Preeti Gupta, Dr. Deepika Masand, 2012 International Conference on
Communication Systems and Network Technologies.
[2] “A New Hybrid Active Power Filter for Harmonic Suppression and Reactive Power
Compensation”, ZHAO Wei, LUO an, PENG Jianchun, DENG Xia, PENG ke,
CICED 2008.
[3] “An Analysis And Simulation of Shunt Hybrid Active Power Filter”, MA Yue, ZHU
Ling, Proceeding of International Conference on Electrical Machines and Systems
2007.
[4] “A Single-Phase Hybrid Active Power Filter using Extension p-q Theorem for
Photovoltaic Application”, P. C. Tan and Z. Salam and A. Jusoh, IEEE PEDS 2005.
[5] “Design and Implementation of A Shunt Active Power Filter with Reduced Dc Link
Voltage”, O. Ucak, I. Kocabas, A. Terciyanli, 2007.
[6] “Design and Implementation of Hybrid Active Power Filter”, G.NageswaraRao,
Dr.K.ChandraSekhar, Dr. P.SangameswaraRaju, International Journal of Computer
Applications (0975 – 8887) Volume 8– No.10, October 2010.
[7] “Enhancement of Power quality using active power filter”, G.Ravindra, P.Ramesh,
Dr.T.Devaraju, International Journal of Scientific and Research Publications,
Volume 2, Issue 5, May 2012.
[8] “A New Hybrid Active Power Filter (APF) Topology”, Sangsun Kim, Prasad N.
Enjeti, IEEE transactions on power electronics, vol. 17, no. 1, January 2002
[9] “Enhancement of Power Quality using active power filter in a Medium-Voltage
Distribution Network switching loads”, M. Chandra Sekhar, B. KiranBabu,
International Journal of Modern Engineering Research , Vol.2, Issue.2, Mar-Apr
2012.
[10] “New Control Strategy To Improve Power Quality Using A Hybrid Power Filter”, S.
P. Litrán, P. Salmerón, R. S. Herrera, and J. R. Vázquez, 2008.
53
[11] “Research on Power Factor Correction Boost Inductor Design Optimization –
Efficiency vs. Power Density”, Qingnan Li, Michael A. E. Andersen, and Ole C.
Thomsen, 2011.
[12] Hirofumi Akagi,” New Trends in Active Filters for Power conditioning”, IEEE
trans. on Industry Applications, Vol. 32, Dec. 1996.
[13] Darwin Rivas, Luis Moran, Juan Dixon, Jose Espinoza, “A simple control scheme
for Hybrid Active Power Filter”, IEEE, 2000.
[14] Samadaei, E. Lesan, S. Cherati, S.M, “A new Schematic for hybrid active power
filter controller”, IEEE Applied Power Electronics Colloquium, 2011, April 2011,
pp. 143 – 148.
[15] H.Akagi, “Modern active filters and traditional passive filters”, Bulletin of the
polish academy of sciences technical sciences, Vol. 54, No. 3, 2006, pp. 255-269.
[16] Muljadi E., McKenna H.E., “Power quality issues in a Hybrid Power system”, IEEE
Transaction on Industrial applications, vol 3 June 2002, pp 803 – 809.
[17] IEEE Std. 519-1992.
[18] Suresh Kumar. K. S, Dr. Ashok. S, “Power quality Issues and remedial measures”,
Nalanda Digital Library National Institute of Technology, 2000.
[19] Dr.Bimbhra, DanpatRai and sons publications “Power Electronics”.
[20] C.L.Wadhwa, New age International publishers” Electrical power systems”.
[21] I.J.Nagrath, D.P.Kothari, Tata McGraw Hill publishers, “Power system Engineering
and power system analysis”.
[22] A.Chakrabarthi, M.L.Soni, P.V.Gupta, U.S.Batnagar, DanpatRai and sons
Publications,” A Text Book on Power System Engineering”.
[23] Hirofumi Akagi, “The state of the art of active filters for power conditioning”,
http://www.akg.ee.titech.ac.jp, pp.1-15.
[24] http://o.mneina.googlepages.com/what_is_microcontroller.html
[25] http://en.wikibooks.org/wiki/Embedded_Systems/PIC_Microcontroller
[26] http://en.wikipedia.org/wiki/PIC_microcontroller
[27] http://ww1.microchip.com/downloads/en/devicedoc/39632e.pdf
[28] http://www.futurlec.com/Microchip/PIC18F4550.shtml
[29] www.google.com
54