final report for print
-
Upload
surya-teja -
Category
Documents
-
view
37 -
download
0
Transcript of final report for print
1
CHAPTER – 1
INTRODUCTION
2
1 . INTRODUCTION
The main essential characteristic of the grid is that the electric power generated
should be equal to the energy demand at any time. If they are not equal, then there
is a chance of loss of synchronization and it could lead to tripping of load and in
worst cases, tripping of the grid itself. So there is a need for a sustainable technology
that can meet the demand whenever needed. There is also a need of effective
integration of new energy generating mechanism, its energy storage and
transmission. All these together will improve not only the reliability of grid but also
the cost incurred in meeting them. A storage system helps in improving the
capability of system to provide energy when it is needed and store the energy
whenever it is produced in excess. There are many energy storage technologies like
Lead Acid Battery Storage and Lithium Ion Battery Storage, Superconducting
Magnetic Energy Storage, Fly Wheel Storage and Pumped Hydro Systems (PHS).
Among these the pumped hydro storage technology is found to be more optimal
when storage capacity and efficiency were compared [1].
In future pumped hydro storage will stand alone as the most reliable technology
available for grid power storage. In the past decade, there has been a tremendous
increase in the wind and solar energy generation due to tax incentives and other
policies. So developing the Pumped Hydro Storage plants near the places where
there is a heavy chance of wind and solar energy generation can lead to improved
grid reliability and it will reduce the need of additional fossil-fuelled generation.
The characteristics like grid reliability are considered because of the reason that
the wind blow is seasonal and solar energy is available only during daytime [3].
There is more demand for the development of energy storage systems as essential
components for using renewable energy systems more efficiently and in large
amounts. The variable speed pumped storage technology provides fast response in
adjusting frequency regulation in both the generation and pumping. PHS is the least
expensive method of energy storage as it does not require any additional fossil fuels
for generating electricity. It is an emission free renewable resource. It is the best
storage alternative while meeting the demand for bulk loads and is very quick in
3
response. It is also having a high overall efficiency of about 70-80%. But these
systems need lot of resources such as proper landscapes for installing the systems
[4]. The main limitation of the PHS system is that it needs minimum one dam along
the river streams or any water bodies that has a constant flow of water resources.
So initiatives should be taken to implement the projects in sites where there will be
minimal effects to the environment surrounding it. For that a feasibility study has
to be done in those areas where the plant implementation is proposed. New
approaches like locating reservoirs that are physically separated from existing river
systems must be encouraged. Efforts should be taken to reduce the evaporation and
seepage losses. There should be regular treatment to the Pumped Hydro Systems
for better performance. But these systems will need less investment compared to
flywheel, SMES, and battery storage technologies [5], [6]. In these plants, the
energy is stored in the form of potential energy of water pumped up from a lower
elevation reservoir to a higher elevation [7]. During periods of high electrical
demand, the stored water is released through turbines to produce electric power by
running an electrical machine (like Synchronous or Induction) in generating mode
and during the process of pumping water from lower elevation to higher elevation,
the electrical machine is operated in motoring mode [8],[9]. The motoring mode
and generating mode can be achieved by either fixed or variable speed operations.
The generating set operates at constant speed and during this fixed speed operation,
power input is directly dependent upon the pumping head and cannot be adjusted.
In variable speed operation, pump mode enables operation with adjustable power
input at each of the required pumping head [10], [11], [12], thus providing regulated
pump operation.
Pump-turbine machines can be designed as fixed or variable speed machines.
Presently in our project we have simulated a variable speed machine system using
DFIM as machine. We only presented the motoring mode of the system i.e.,
connected to the pump.
1.1 Objective
The project proposes a new control scheme for running DFIM in motoring
mode by connecting to a pump. The frequency and voltage for stator side are kept
4
constant. The rotor speed is adjusted and based on the speed the rotor voltage and
frequency is given to the rotor through fuzzy logic controller.
The objectives include:
Developing a DFIM system running at variable speed connected to a
pump.
Simulation of the DFIM system using MATLAB/SIMULINK for
variable speeds by giving torque input using pump characteristics.
Implementation of control logic using dsPIC30f4011.
1.2 Project Overview:
Figure 1.1 Block Diagram
The objective of this project is load regulation. It involves storing energy
optimally whenever there is low demand for energy. Energy is stored by using the
excess energy to pump water upstream and store it at a higher elevation. For this
purpose, a DFIM is operated in motoring mode at different sub synchronous speeds.
5
It is operated at variable speeds to run a pump. This is useful in a pumped hydro
system which is one of the more efficient and reliable storage systems.
The simulation was done in Matlab. First, open loop test is done and the
required values of voltages and angles which are to be given to the rotor side of the
machine are found out for different sub synchronous speeds. These values were
used to build a fuzzy logic controller. This fuzzy inference system is used in closed
loop. For a pump, the torque is directly proportional to square of the speed. So,
when load is set on the pump depending upon how much excess power is generated,
the fuzzy system generates the required values of voltages and angles to run the
machine at required speed.
The voltages and angles generated by fuzzy system along with slip
frequency are taken by SVPWM to generate pulses for the inverter. This was
attempted in hardware by using dsPIC.
6
CHAPTER – 2
LITERATURE SURVEY
7
2 . LITERATURE SURVEY
2.1 . Steady State Analysis and Dynamic Modelling of Doubly Fed
Induction Machine:
Figure 2.1 Doubly Fed Induction Machine
DFIM is a Wound Rotor Induction Machine with AC supply given to both
stator and rotor. The PWM back to back inverter is connected to the rotor side. The
main advantage of this system is the capability of rotor circuit in allowing the
bidirectional flow of power in both sub-synchronous mode and super-synchronous
mode. The power rating of the converter is also reduced as it is connected to the
rotor side. It is to note that the number of turns in stator should be more than the
number of turns in the rotor. With the voltage reduction in the rotor side, it is
possible to operate at a lower DC bus voltage. Consequently the voltage ratings for
the devices and the capacitor bank can be optimized. So, for the same power rating,
the power generated by this system is higher compared to other systems. Its speed
range is very high. It can run both in sub synchronous mode and super synchronous
mode based on the requirement.
8
Figure 2.2 Modes of operation of DFIM
Variable speed operation is having more advantages than fixed speed for large
scale turbine. The main advantage of the DFIM is that the power processed by the
power converter is only the slip power, it is only a fraction of total power. If it is
operated within a speed range preferably around the synchronous speed, then the
power converter rating can be reduced drastically. This is more advantageous for
centrifugal loads as pumps. The speed limit is set by the rating of the converter we
deploy in the system. If it goes beyond this speed then the converter loses control.
So it will have a little problem in starting. To solve this problem, starting resistors
or autotransformers can be used. It is applicable to PHS as the system is having
apparatus of high capacity. In a grid controlled DFIM system, the voltage and
frequency are imposed by the grid. So, the active power and reactive power control
should be taken care of. If it is made to run as stand-alone, voltage and frequency
should also be regulated. The active and reactive power flow control is the main
concept behind the control methods. The active and reactive power oscillations of
DFIM under voltage sag are very less and are only for fraction of seconds. If the
reference reactive power is set then the reactive power suddenly increases and then
reduces to the rated value. Even the DC link voltage will oscillate for some time
and settles quickly. When the grid voltage reduces, the rotor flux also gets reduced.
9
Under voltage swell i.e., when voltage is increased to more than rated value the
active power again oscillates and settles at rated value. The reactive power suddenly
reduces and comes to the rated value.
Compared to the Synchronous machine and Induction machine drives, DFIM
has better efficiency. It does not require high rating power converters as they can
be connected to the rotor side with half the power rating. They have better dynamic
stability than the other machines under variable speed operation. The time taken for
them to convert from motor to generator is less compared to other machines. The
amount of power generated using the same size machine for DFIM will be more
compared to other machines. During motor condition in sub-synchronous mode, the
rotor generates power and in super synchronous mode, it absorbs power. In
generator condition the rotor absorbs power at sub synchronous mode and produces
power in super synchronous mode.
When comparing the dynamic behavior the factors voltage drop test, testing for
torque perturbations, behavior of the systems based on inter area oscillations are
considered. When compared the synchronous machine has less voltage drop and
the variable speed machine DFIM has high voltage drop but the time taken to
stabilize the active power and reactive power is less. In case of torque disturbances
the variable speed has more advantage than the fixed speed as the change in torque
is stabilized by the change in the speed which has to compensate by power flow
control in synchronous machine. In a variable speed system the torque disturbances
will never be a problem. The synchronous machine provides good damping for
active power oscillations only until certain frequency while the variable speed
machine provides good damping for a better frequency range. With or without
Power System Stabilizer, the behavior of reactive power and stator voltage are
similar. If we consider reactive power, the behavior of synchronous and variable
speed machines fluctuates for different frequency ranges. For one frequency range,
one machine behaves better than the other. For a lower frequency range, the variable
speed machine has better behavior because it has constant amplitude. For a higher
frequency range, the synchronous machine has better behavior. Compared to DFIG
with same speed and power, a synchronous machine has smaller dimensions and
10
inertia with a larger air gap. With lesser rotor current, DFIG can generate same
active and reactive power as a synchronous machine. So, synchronous machine is
not as cost effective as DFIG.
Steady State Analysis of Doubly Fed Induction Machine:
The steady state analysis of DFIM consists of equivalent circuit of it. In this
circuit
It is assumed that both the stator and the rotor are connected in the
star configuration; however, only one phase of the stator and rotor three-
phase windings is represented.
The stator is supplied by the grid at constant and balanced three-
phase AC voltage amplitude and frequency.
The rotor is supplied also at constant and balanced AC voltage
amplitude and frequency, independently from the stator, for instance, by a
back-to-back voltage source converter.
To represent steady state voltage and current magnitudes, the
analysis is carried out using classical phasor theory: DFIG
Vs = supply stator voltage
Vr = supply rotor voltage
Is = induced Stator Current
Ir = induced rotor current
Es = induced EMF in the stator
Ers= induced emf in the rotor
The equivalent circuit of DFIM is
11
Figure 2.3 Steady State Equivalent Circuit of DFIM
So when representing the equivalent circuit the equation w.r.t is given by
𝑉𝑟
𝑠− 𝐸𝑠 = (
𝑅𝑟
𝑠+ 𝑗𝑤𝑠𝐿𝑟) 𝐼𝑟 𝑎𝑡 𝑓𝑠
By this equation we can understand that the injected voltage on the rotor side
can be determined if the rotor current and stator voltage are known at a particular
slip.
The rotor voltage is given by
𝑉2𝑝′ = 𝐸 + 𝐼2𝑝′ (𝑅2
𝑠+ 𝑗𝑋2)
𝓋2𝑝 = 𝑉2𝑝′ (
𝑠
𝑎) 𝑤. 𝑟. 𝑡 𝑠𝑡𝑎𝑡𝑜𝑟
The rotor current and frequency are given by
𝐼2𝑝 = 𝑎𝐼2𝑝′
𝑓𝑟 = 𝑓𝑠 − (𝑃𝑁
120)
The real power and reactive power supplied to the load were given by
𝑝1 = 3𝑅𝑒(𝑉1𝑝𝐼1𝑝∗ )
𝑞1 = 3𝐼𝑚(𝑉1𝑝𝐼1𝑝∗ )
12
The real power and reactive power supplied to the load from rotor were given
by
𝑝2 = ±3𝑅𝑒(𝑉2𝑝𝐼2𝑝∗ )
𝑞2 = 3𝐼𝑚(𝑉2𝑝𝐼2𝑝∗ )
The output mechanical power is given by
𝑝𝑚 = 3𝐼2𝑝2 𝑅2 (
1 − 𝑠
𝑠) − 𝑝2 (
1 − 𝑠
𝑠)
Dynamic Modelling of DFIM:
2.1.2.1 Features of Dynamic Modelling:
Dynamic Modelling explains and defines the behaviour of the machine’s
variables in transition periods as well as in the steady state.
By means of the dynamic model it is possible to know at all times the
continuous performance of the variables of the machine, such as torque,
currents, and fluxes.
In this way, by using the information provided by the dynamic model, it is
possible to know how the transition from one state to another is going to be
achieved, allowing one to detect unsafe behaviours, such as instabilities or
high transient currents.
The dynamic model also provides additional information of the system
during the steady state operation, such as dynamic oscillations, torque or
current ripples.
2.1.2.2 Dynamic Modelling based on Space Vector Theory:
It is represented in general in differential equation form, is often structured as a
compact set of model equations.
13
The DFIM equivalent electric circuit is shown below,
Figure 2.4 Dynamic Modeling equivalent circuit of DFIM
The instantaneous stator voltages, current and fluxes of the machine can be
described by the following electric equations
𝑣𝑎𝑠(𝑡) = 𝑅𝑠𝑖𝑎𝑠(𝑡) +𝑑𝜓𝑎𝑠(𝑡)
𝑑𝑡
𝑣𝑏𝑠(𝑡) = 𝑅𝑠𝑖𝑏𝑠(𝑡) +𝑑𝜓𝑏𝑠(𝑡)
𝑑𝑡
𝑣𝑐𝑠(𝑡) = 𝑅𝑠𝑖𝑐𝑠(𝑡) +𝑑𝜓𝑐𝑠(𝑡)
𝑑𝑡
Rs is the stator resistance; ias(t), ibs(t) and ics(t) are the stator currents of phases
a, b, and c; vas(t), vbs(t), and vcs(t) are the applied stator voltages; and cas(t),
cbs(t), and ccs(t) are the stator fluxes
The rotor magnitudes are described by the following equations. Here, Rr is
the rotor resistance referred to the stator; iar(t), ibr(t), and icr(t) are the stator
referred rotor currents of phases a, b and c; var(t), vbr(t) and vcr(t) are the
stator referred rotor voltages; and car(t), cbr(t) and ccr(t) are the rotor fluxes.
𝑣𝑎𝑟(𝑡) = 𝑅𝑟𝑖𝑎𝑟(𝑡) +𝑑𝜓𝑎𝑟(𝑡)
𝑑𝑡
𝑣𝑏𝑟(𝑡) = 𝑅𝑟𝑖𝑏𝑟(𝑡) +𝑑𝜓𝑏𝑟(𝑡)
𝑑𝑡
14
𝑣𝑐𝑟(𝑡) = 𝑅𝑟𝑖𝑐𝑟(𝑡) +𝑑𝜓𝑐𝑟(𝑡)
𝑑𝑡
Alpha-beta Model: the voltage equations of the DFIM in space vector form:
𝑠𝑠 = 𝑅𝑠𝑖𝑠
𝑠 +𝑑𝑠
𝑠
𝑑𝑡
𝑟𝑟 = 𝑅𝑟𝑖𝑟
𝑟 +𝑑𝑟
𝑟
𝑑𝑡
superscripts “s” and “r” indicate that space vectors are referred to stator and
rotor reference frames, respectively and the correlation between the fluxes
and the currents, in space vector notation, is given by the following equation
where Ls and Lr are the stator and rotor inductances, Lm is the magnetizing
inductance
𝑠𝑠 = 𝐿𝑠𝑖𝑠
𝑠 + 𝐿𝑚𝑖𝑟𝑠
𝑟𝑟 = 𝐿𝑚𝑖𝑠
𝑟 + 𝐿𝑟𝑖𝑟𝑟
For transforming all equations into stator reference frame we use the
equation
Now the equations become:
𝑠𝑠 = 𝑅𝑠𝑖𝑠
𝑠 +𝑑𝑠
𝑠
𝑑𝑡
𝑟𝑠 = 𝑅𝑟𝑖𝑟
𝑠 +𝑑𝑟
𝑠
𝑑𝑡− 𝑗𝜔𝑚𝑟
𝑠
𝑠𝑠 = 𝐿𝑠𝑖𝑠
𝑠 + 𝐿𝑚𝑖𝑟𝑠
𝑟𝑠 = 𝐿𝑚𝑖𝑠
𝑠 + 𝐿𝑟𝑖𝑟𝑠
15
Fuzzy Logic
2.1.3.1 Introduction:
Fuzzy logic has two different meanings. In a narrow sense, fuzzy logic is
logical system, which is an extension of multivalued logic. However, in a wider
sense fuzzy logic is almost synonymous with the theory of fuzzy sets, a theory
which relates to classes of objects with unsharp boundaries in which membership
is a matter of degree. Fuzzy logic is all about the relative importance of precision.
Fuzzy logic can be blended with conventional control techniques. It is
flexible and tolerant of imprecise data. It can also model nonlinear functions of
arbitrary complexity. Fuzzy logic is based on natural language.
2.1.3.2 Overview of fuzzy logic:
The point of fuzzy logic is to map an input space to an output space, and the
primary mechanism for doing this is a list of if-then statements called rules. All
rules are evaluated in parallel, and the order of the rules is unimportant. The rules
themselves are useful because they refer to variables and the adjectives that describe
those variables.
2.1.3.3 Fuzzy Sets:
Fuzzy logic starts with the concept of a fuzzy set. A fuzzy set is a set without
a crisp, clearly defined boundary. It can contain elements with only a partial degree
of membership. In fuzzy logic, the truth of any statement becomes a matter of
degree.
2.1.3.4 Membership Functions:
A membership function (MF) is a curve that defines how each point in the
input space is mapped to a membership value (or degree of membership) between
0 and 1. The input space is sometimes referred to as the universe of discourse, a
fancy name for a simple concept.
16
2.1.3.5 Rules:
Using if-then rules is a three-part process. Resolve all fuzzy statements in
the antecedent to a degree of membership between 0 and 1. If there is only one part
to the antecedent, then this is the degree of support for the rule. If there are multiple
parts to the antecedent, apply fuzzy logic operators and resolve the antecedent to a
single number between 0 and 1. This is the degree of support for the rule. Use the
degree of support for the entire rule to shape the output fuzzy set. The consequent
of a fuzzy rule assigns an entire fuzzy set to the output. This fuzzy set is represented
by a membership function that is chosen to indicate the qualities of the consequent.
2.1.3.6 Mamdani’s fuzzy inference method:
Mamdani system expects the output membership functions to be fuzzy sets.
After the aggregation process, there is a fuzzy set for each output variable that needs
defuzzification. It is possible, and in many cases much more efficient, to use a single
spike as the output membership function rather than a distributed fuzzy set. This
type of output is sometimes known as a singleton output membership function, and
it can be thought of as a pre-defuzzified fuzzy set. It enhances the efficiency of the
defuzzification process because it greatly simplifies the computation required by
the more general Mamdani method, which finds the centroid of a two-dimensional
function. Rather than integrating across the two-dimensional function to find the
centroid, you use the weighted average of a few data points. Sugeno-type systems
support this type of model. In general, Sugeno-type systems can be used to model
any inference system in which the output membership functions are either linear or
constant.
Space Vector Pulse Width Modulation (SVPWM):
The space vector is produced when a balanced 3phase AC is provided. The
space vector is a vector moves freely in space with synchronous speed. Now, in
analogy with the fluxes, if a three phase balanced voltage is applied to the windings
of a three-phase machine, a rotating voltage space vector may be talked of. The
resultant voltage space-vector will be rotating uniformly at the synchronous speed
17
and will have a magnitude equal to 1.5 times the peak magnitude of the phase
voltage.
In three phase voltage source inverters, the two switches of each inverter
pole conduct in a complementary manner. Thus the six switches of the three poles
will have a total of eight different switching combinations. Out of these eight
combinations, two combinations wherein all the upper switches or all the lower
switches of each pole are simultaneously ON result in zero output voltage from the
inverter. These two combinations are referred as null states of the inverter. The
remaining six switching combinations, wherein either two of the high side (upper)
switches and one of the low side (lower) switch conduct, or vice versa, are active
states. During the six active states the phase voltages output by the inverter to a
balanced 3-phase linear load are
Figure2.5 six active switching states with sectors
Figure.6 space vector output voltages for 3 phase inverters
18
It is assumed that the three-phase system is balanced:
𝑉𝑎0 + 𝑉𝑏0 + 𝑉𝑐0 = 0
These are the instantaneous phase voltages
𝑉𝑎 = 𝑉 sin 𝜃 𝑡
𝑉𝑏 = 𝑉 sin (𝜃𝑡 +2𝜋
3)
𝑉𝑏 = 𝑉 sin (𝜃𝑡 +4𝜋
3)
When the three phase voltages are applied to an AC machine a rotating flux is
created. This flux is represented as one rotating voltage vector. The magnitude
and angle of this vector can be calculated with Clark's Transformation:
𝑉𝑟𝑒𝑓 = 𝑉𝛼 + 𝑗𝑉𝛽=2
3(𝑉𝑎 + 𝑎𝑉𝑏 + 𝑎2𝑉𝑐), a is given by
a=𝑒𝑗2𝜋
3
From this we get,
From this the time periods t1, t2, t0 can be calculated by
Where Tc=T1+T2+T0
19
CHAPTER – 3
SIMULATION
20
3 . SIMULATION
The Simulation of the DFIM is made using the MATLAB/SIMULINK. The
machine speed and torque are given as input. The speed and torque are related by
the pump characteristics as torque is proportional to square of speed. Torque is
given positive and the machine runs as motor. The main objective is to obtain
different speeds for different torque values and optimize the power taken out from
the grid. So the speed reference is given to the machine based on the power available
on the grid. So the frequency of grid helps in giving this parameter.
The parameters that required for simulation are measured by doing no load
test and block rotor test on the machine. The parameters are found to be
Power Output (VA): 1100VA
Voltage Line to Line: 415 V
Frequency: 50Hz
R stator =6.4Ω ; L stator= 0.183H
R rotor =9.8903Ω ; L rotor =0.0224H
L mutual = 0.208H Pole pairs = 3.
The figure shown below is the Simulink model of the simulation. It consists
of a three phase asynchronous induction machine connected to the inverter. The
voltage is injected on the rotor side by giving the Space Vector Pulse Width
Modulation (SVPWM) pulses. The machine parameters are fed to the asynchronous
machine model and a fuzzy control method is used to control the machine speed for
different voltage and slip frequencies injected to the rotor.
The speed parameter is given as input to the machine and voltage and angle
to be injected to the rotor are obtained by fuzzy logic control. Then these parameters
are fed to the SVPWM generator. The generated pulses are fed to inverter as pulses
and the desired voltage and slip frequency values are produced. The torque and
power are measured by power measuring blocks. The total mechanical power
should be equal to sum of rotor and stator input power which is observed in
21
simulation. This method will provide a new method of controlling speed with
optimizing power loss.
3.1 Simulation Block Diagram
Figure 3.1 Simulation of Block Diagram
22
3.2 Input blocks:
Figure 3.2 showing the speed input and torque being estimated for measuring the output
mechanical power.
The speed is first converted to rad/sec to the rotor side of the machine and the torque
input is estimated from the sped input and is given by the equation
T= (0.957870572e-3)*N2.
Where N is speed and T is Torque.
23
Figure 3.3 Asynchronous Machine given input from both stator and rotor
The stator side is supplied from the three phase AC source and the rotor side is
supplied from the inverter. The inverter is fed from a DC source. When the machine
runs in sub-synchronous motor operation then the rotor will give out the power
which is proportional to the slip of the machine. And the rotor supply is at slip
frequency. The DC voltage given in the system is 80V (but given the turns ratio the
voltage is given as 715 volts). The supply given to the rotor side from the inverter
is given with slip frequency fs. Where fs = (f-fr). Where fr is frequency of rotation
of rotor.
24
3.3 Subsystem for SVPWM Pulse Generation:
Figure 3.4 Subsystem developed for giving pulses to the rotor side inverter
After measuring the rotor voltage angle and slip frequency through the control loop
the parameters are given to a VVVF source and the voltage, instantaneous angle is
measured with PLL and given to the ABC to DQ conversion block and from there
to Alpha-Beta then to pulses generator. Thus the pulses are generated and given to
the inverter on the rotor side.
3.4 Design of Fuzzy Logic Controller:
To control the Doubly Fed Induction Machine by using a set of predefined rules
obtained from open-loop test, a fuzzy inference system can be used. Fuzzy inference
process helps in formulating the mapping from a given input to an output using
fuzzy logic. Here, Mamdani-type fuzzy inference system is used.
Calculating Values of Voltage Magnitude and Angle to be given to Rotor
for Different Speeds:
For designing the fuzzy logic controller, we need to know the values of
inputs and outputs to be given and taken from the fuzzy inference system.
25
Here the input is speed reference and outputs are voltage magnitude and
voltage angle which are to be given to the rotor. The magnitude and angles are given
to the rotor along with slip frequency. Speed of the rotor depends to a large extent
on the slip frequency given to the rotor. Through trial and error, the values of
voltage and angle were found for approximately 20 different slip values using open
loop test.
Table 1 Speed voltage and Angle for fuzzy logic algorithm
SPEED
(rpm) VOLTAGE MAGNITUDE(V) VOLTAGE ANGLE
900 20 20
850 40 40
800 46 45
750 60 61
700 110 80
650 113 85
600 125 100
550 155 110
500 170 115
450 180 117
400 190 119
350 200 119
300 215 119
200 246 119
26
The relation between speed and voltage is found to be linear.
Figure 3.5 Speed(X) Vs Voltage (Y)
The relation between speed and angle is linear for higher values of speed. For
lower values of speed, the angle required to be given is almost constant.
Figure 3.6 Speed (X) Vs Angle(Y)
27
Now that the inputs and outputs are found out, the fuzzy inference system can be
designed which can take any value between 0 and 1000 as speed reference input
and it can generate corresponding voltages and angles.
3.5 Building the Fuzzy Inference System:
The graphical tools which were used to build and edit fuzzy inference system are:
1. Fuzzy Inference System (FIS) Editor
2. Membership Function Editor
3. Rule Editor
FIS Editor:
This editor displays information about fuzzy inference system. Here, we use a 1
input and 2 output system. The input is load in terms of speed and outputs are
voltage magnitude and voltage angle to be given to sub-system which generates
reference signals for inverter.
Figure 3.7 Mamdani System
28
Membership Function Editor:
The membership functions associated with all input and output variables of the
fuzzy system can be edited here. The membership function type chosen for load
torque is trapezoidal type. For voltage and angle the membership function type
chosen is Gaussian. Here, the load torque being in terms of speed is split into 16
membership functions with a range from 0 to 1000. The voltage is in the range of 0
to 300 while the angle is in the range of 0 to 120.
Any changes in membership functions are reflected in the rules. Based on the values
obtained in the open loop test, the membership functions are edited so that every
input from 0 to 1000 can be mapped to a certain voltage output and angle output by
using if-then rules.
The membership functions for load torque, voltage and angle are shown below.
Figure 3.8 Load Torque
29
For example, let us consider the membership function with the name as 850. This
membership function takes all values between 825 and 875. Similarly, membership
function with name 500 takes all values from 475 to 525. The membership functions
used here are trapezoidal membership functions. The membership functions are
made to overlap each other. This is because, if overlapping is not done, the border
values give wrong results when used in simulation.
Figure 3.9 Voltage
For voltage and angle, the membership functions used here are gaussian
membership functions. The angle varies from 20 degrees to 119 degrees
proportionally with slip and voltage increases from 20V to 277V for slip varying
from 0.1 to 0.9.
Also the magnitude of voltage generated is same for all values in a particular
membership function. Similarly the magnitude of angle generated is also same for
a particular membership function. So make the behavior linear, we need to use more
membership functions. This helps in making the result piecewise linear.
30
Figure 3.10 Angle
Rule Editor:
Based on the open-loop test values, all the inputs can be mapped to corresponding
outputs by using the if-then rules. The rule editor is shown below. Each membership
function is labelled by its peak value. This makes the rule editing easier.
31
Figure 3.11 Rules
Now, the fuzzy inference system is designed. It is then exported to Matlab
workspace and used in Simulink.
32
3.6 Simulation Results
The simulation is tested by using a step-load input varying from 0 to 10 N-m. The load is
given in terms of speed. For this variable load, the rotor speed, stator power, rotor power,
mechanical power and rotor torque are plotted.
The results are shown below.
Table 2 Closed Loop Simulation results
SPEED
(rpm)
VOLTAGE
MAGNITUDE(V)
VOLTAGE
ANGLE
STATOR
ACTIVE
POWER(W)
ROTOR ACTIVE
POWER(W)
900 20 20 110 -90
850 40 40 960 -53
800 46 45 920 -97
750 60 61 855 -112
700 110 80 630 -142.5
650 113 85 560 -210
600 125 100 500 -230
550 155 110 400 -290
500 170 115 350 -310
450 180 117 305 -290
400 190 119 290 -260
350 200 119 280 -195
300 215 119 250 -175
200 246 119 200 -147
33
Figure 3.12 Rotor input speed (Y) Vs. Time(X)
Figure 3.13 rotor output speed(Y) Vs. Time(X)
34
Figure 3.14 Rotor torque output(Y) Vs. Time(X)
Figure 3.15 Stator active power, rotor active power and mechanical power (from top to
bottom) (Y) Vs. Time(X)
35
Figure 3.16 Stator active power(Y) Vs. Time(X)
Figure 3.17 Rotor active power(Y) Vs. Time(X)
36
Figure 3.18 Output Mechanical Power(Y) Vs. Time(X)
3.7 Inference:
1. Rotor speed increases proportionally with the increase in load. As the slip
frequency varies, rotor speed varies according to the value of slip frequency
given to the rotor.
2. Stator active power and mechanical power also increase with the increase
in load.
3. Rotor power, being directly proportionally to slip and stator active power
will decrease in magnitude as the load increases. This is because as load
increases, slip decreases.
4. But for lower values of load, the rotor power behaves differently because
the value of stator active power is very low.
5. Rotor torque increases proportionally with increase in load.
6. For operating Doubly Fed Induction Machine with a pump, the machine
must run at a speed proportional to the load on the pump because torque of
the pump is directly proportional to the square of the speed. Here the speed
control is done according to pump characteristics.
7. For higher load torque on the pump, we run the DFIM at higher speed and
vice versa.
37
CHAPTER - 4
HARDWARE DEVELOPMENT
38
4 . HARDWARE DEVELOPMENT
4.1 Introduction:
In the hardware circuit, the speed input to the dsPIC is given through potentiometer.
The voltage and angle generated from the fuzzy logic for a particular speed are
given to the SVPWM within the program. The grid frequency is given to the dsPIC
by using an ADC and PT. The grid frequency is taken by PT. Now, the PT sends a
voltage signal to ADC. ADC gives the signal to dsPIC. Now, the dsPIC uses the
values of slip frequency along with the voltage and angle to generate inverter pulses.
Figure 4.1 Hardware Block Diagram
The coding for the digital signal processor is done in MPLAB IDE v8.46 from
Microchip Technology Inc. The programming was done in C platform. For this
MPLAB has a language tool suite add-on called MPLAB C30 compiler. The
complete standard C library is provided with the MPLAB C compiler for dsPIC
DSCs. MPLAB allows the user to view certain waveforms in its logic
analyser like PWM, port outputs etc. Also different types of inputs can be
given to the simulator using stimulus by register injection, clock stimulus,
asynchronous stimulus etc. The register values can be viewed through watch
39
window. The code is converted to hex file format after compiling and the
dsPIC30F4011 DSC is programmed using Lab Pro IC programmer.
For implementing control algorithm of DFIG the timer modules, ADC module and
PWM modules are used. In order to implement the control algorithm for DFIG the
code for the project is divided into different modules. The ADC module and
PWM modules were tested independently using the clock stimulus and the
logic analyser which is available in the MPLAB. Finally the complete program
for implementing the control algorithm is done by clubbing all the individual
programs.
The different sections of the program are as follows:
A frequency control algorithm for determining the output frequency of
the PWM.
A voltage control algorithm for fixing the output voltage magnitude
PWM module for generating the SVPWM pulses
Fuzzy logic programme for generating voltage and angle with a particular
speed
Different timer modules for co-ordinating different peripherals.
4.2 dsPIC30F4011 Digital Signal Microcontroller:
It is a 16 bit high performance digital signal controller which uses Modified
Harvard Architecture. The C Compiler optimized instruction set architecture with
flexible addressing modes. It is having 83 Base Instructions. Each instruction is
24-bit wide, 16-bit wide data path. The main specialty of dsPIC30f4011 is 24
Kbytes on-Chip Flash Program Space (8K instruction words) which is very efficient
in storing the look up tables. It is possible to use DC to 40 MHz external clock
input. But in our purpose we are using 20MHz crystal oscillator to give
external clock input. So each instruction will take .2 micro seconds execution
time. There are 12 peripherals and 29 interrupt sources are available in the
controller. We can assign priority to different interrupt sources. Among these
40
peripherals the peripherals used for implementing the control algorithm for
DFIG includes the following.
I/O Ports
Timers
10-bit A/D Converter
Motor control PWM module
UART Module
4.3 Implementation of Control Algorithm:
Initially the value of speed is given by a anolog pin to channel CH0 from
AN1.
Then with fuzzy logic the voltage and angle for that particular speed is
estimated.
This voltage and angle value will be fed to SVPWM control algorithm made
in the programme to provide six inverter pulses.
4.4 Timer Circuit for ADC:
The device has got 5 16bit timers, which can be operated either in timer mode or in
counter mode. The one of the important feature of these timers are that it can be
operated in pairs, so that we will get 32bit count. In this work two timers are used
here.Timer1 is used to update the PDC and Timer3 to update the value to the
ADC.Timer1 is configured to operate for 0.3ms to update the PDC register
Timer2 is configured to operate for .8ms to trigger the ADC module. The
flow chart for ADC sampling process is given in the figure. The TxCON and PRx
are the registers which need to be configured while doing programming with
the timers.
4.5 Motor Control PWM module:
The dsPIC30F4011 has a dedicated peripheral module for generating PWM pulses,
called the MCPWM module. The device has got 3 PWM modules with 2 PWM
pins per module. The PWM pins can be configured to work in independent
mode or in complimentary mode. In this work it is configured to operate in
41
complimentary mode. A programmable dead time generator is also present to
introduce sufficient dead time when working in complimentary mode. In this work
a dead time of 3μsec is used. The MCPWM module can be operated in different
modes like free-running mode, edge triggered mode, centre aligned mode, up-
down counting mode etc. In this work up-down counting mode is chosen. The
switching frequency of SPWM is 2.5 kHz. The PWM module is configured to
operate at this frequency. The count to be loaded for this in PTPER register is
calculated as follows
4.6 ADC Module:
The10-bit high-speed analog-to-digital converter (A/D) allows conversion of an
analog input signal to a 10-bit digital number. This module is based on a
successive approximation register (SAR) architecture, and provides a maximum
sampling rate of 500 ksps. The A/D module has 16 analog inputs which are
multiplexed into four sample and hold amplifiers. The output of the sample and
hold is the input into the converter, which generates the result. The A/D module is
having six 16 bit configuration registers which includes ADCON1,
DCON2,ADCON3, ADPCFG, ADCHS, ADCSSL.
For the closed loop control algorithm for the DFIG, both the speed as well
as the stator voltage references is giving to the ADC pins in terms of analog
values. AN0 pin holds the speed reference and AN1 pin holds the stator voltage
reference. A sampling time of .8mSec is used for sampling. Simultaneous sampling
is enabled by configuring the ADCON1 register, so that timing complications
will be eliminated. The conversion and sampling is configured to automatic mode.
That is internal counter ends sampling and the next sampling starts immediately
after previous conversion. Interrupts are generated after every 2nd sample/covert
sequence. A/D conversion clock is set to 2Tcy = 0.1μs. The sampled values will be
stored in ADCBUF0&ADCBUF1 registers.
42
The result of the ADC is a 10 bit digital value. Since the reference voltage to the
ADC is 5V, therefore when a 5V analog signal is detected then the result stored in
the ADC buffer will be 1023 (2^10 – 1). Hence when x voltage is detected, then
the value of x can be obtained as, x*(1000/1023). Here the value needed is from 0
to 1000 as this value is given for varying speed.
4.7 Implementation of Space Vector Algorithm:
Space vector pulse width modulation technique was used for the switching of
SEMIKRON inverter in this project due to the following merits.
High DC link voltage utilisation.
Very much suited for digital implementation
Reduced harmonics and losses.
The space vector modulation technique is somewhat similar to the
Sine+3rd harmonic PWM technique but the method of implementation is different.
Similar to the rotating magnetic field in the case of 3 phase machines, that is if
a three phase balanced voltage is applied to the windings of a three-phase
machine, a rotating voltage space vector may be talked of. The resultant voltage
space-vector will be rotating uniformly at the synchronous speed and will
have a magnitude equal to 1.5 times the peak magnitude of the phase voltage.
Each vector corresponds to a switching state, at that state we will obtain the
corresponding voltage magnitude at the 3phase output as mentioned in the fig
5.5(a). The intermediate magnitudes will obtained by the combination of the
fundamental switching states. The fundamental frequency can be adjusted by
adjusting the angular velocity of the vector. The phase sequence of the output
voltage can be controlled by changing the direction of rotation of the vector. Both
are very important as far as this project is concern.
43
Figure 4.1 a) 3-phased balanced voltages b) resulting space vector
4.8 Algorithm for SVPWM:
1. First find out the input dc link voltage (Edc), desired output frequency
‘f OP’ desired phase sequence of output voltage, desired magnitude of output
voltage and the desired switching frequency. During each sampling time
period three switching take place, where one turn-on and one turn-off
is taken as one switching.
2. Calculate magnitude factor ‘α’ from the knowledge of input dc link voltage
and the desired output voltage.
α Edc= 3/2 times peak of phase voltage. (5.4.a)
3. Also calculate the sampling time period
TS= 1/(3 fSW) (5.4.b)
4. Initialize sector position = I, and angle ‘θ’ = 0. Assume the rotating space
voltage vector to remain stalled at this position for the sampling time
period ‘TS’. Calculate the time duration for active and null state vectors by the
equations.
5. Output the inverter switching pulses as per the calculated time durations so as
to realize the space vectors in the following sequence: V (111), V1(101),
V2(100), V7(000).
44
6. Calculate the next position angle = + 2 for clockwise rotation, and = − 2 for
anti-clockwise rotation. Recalculate the time durations as in step (3) above but
this time the switching sequence will be V7(000), V2(100), V1(101), V8(111).
7. Step (4) is to be repeated but every time the switching sequence alternates
between the sequences given in steps 4 and 5. When the space vector enters
sector-II (θ ≥ π/3), the vector is replace by V2 and V2 is replaced by V3. The
process continues to produce a continuously rotating voltage space vector of
fixed magnitude and fixed speed.
4.9 Flowchart:
The flow chart algorithm is presented below
Figure 4.2 Flow Chart of the Program
4.10 Voltage transducer:
This part of the project work describes hardware control circuit design both
for controlling the stator voltage and frequency of the DFIG. potential transducer
is designed for 500V line voltage and a current transducer of 25A is designed in
order to obtain the rotor current and the values obtained after the design are
standardized.
45
The pic cannot withstand DFIG stator voltage directly. The input that is given
to the pic should be in the range of (0-5) v. So the stator voltage of DFIG has to be
scaled down to 5v. For that we need the potential transformer. In this project, we
need to convert a 500V to a 2.5V. So we selected the potential transformer LV-20P.
As per the data sheet of the potential transformer the primary current of the PT
should not exceed 10mA. So it is essential to introduce a power resistor in the
primary circuit to limit the primary current. The design procedure of the potential
transformer is given below. The PT is designed for maximum of 500V input voltage
Maximum allowable primary current in PT=10mA. So the value of the resistor that
has to be added to the primary circuit is known from the current and the voltage
values stated above
Input resistance to the PT = 94kΩ (standardized value)
Input current =500/94k= 5.319mA
PT turns ratio (n) =2500:1000
Secondary current =5.319mA*2.5=13.297mA=0.01329A
Secondary rms voltage=2.5/1.414=1.7677V
Measuring resistance needed= 133.0Ω
The connection diagram of the PT is shown below and the measuring
Resistance is selected in such a way that the maximum potential drop across the
secondary should be 2.5V
46
Figure 4.3 shows the circuit of potential transducer
4.11 Frequency to voltage converter:
The rectified input from the precision rectifier is given to the frequency to
voltage converter. Now the voltage-to-frequency converter provides an output
frequency accurately proportional to its input voltage.
Figure2.3
Figure 4.4 Frequency to voltage converter
4.12 Frequency multiplier:
A frequency multiplier has the property that the frequency of the output signal
has an integer multiple of the input frequency. Based on this property the frequency
47
input from the converter circuit is given to the frequency multiplier to get desired
frequency.
Figure 2.4
Figure 4.5 Frequency Multiplier
4.13 Analog to digital Conversion:
The AD76071 is a 14-bit, simultaneous sampling, analog-to- digital data
acquisition system (DAS). The part contains analog input clamp protection; a
second-order antialiasing filter, a track- and-hold amplifier, a 14-bit charge
redistribution, successive approximation analog-to-digital converter (ADC); a
flexible digital filter; a 2.5 V reference and reference buffer; and high speed serial
and parallel interfaces. The AD7607 operates from a single 5 V supply and can
accommodate ±10 V and ±5 V true bipolar input signals while sampling at
throughput rates of up to 200 kSPS for all channels.
The input clamp protection circuitry can tolerate voltages of up to ±16.5 V.
The AD7607 has 1 MΩ analog input impedance, regardless of sampling frequency.
The single supply operation, on-chip filtering, and high input impedance eliminate
the need for driver op amps and external bipolar supplies. The AD7607 antialiasing
filter has a 3 dB cutoff frequency of 22 kHz and provides 40 dB antialias rejection
when sampling at 200 kSPS. The flexible digital filter is pin driven and can be used
to simplify external filtering.
48
4.14 Features of AD7607:
1) ICAD7607 has 8 simultaneously sampled inputs, True bipolar analog input
ranges: (±10, ±5) V Single 5 V analog supply and 2.3 V to 5.25 V VDRIVE, Fully
integrated data acquisition solution.
2) Analog input clamp protection Input buffer with 1 MΩ analog input impedance
Second-order antialiasing analog filter On-chip accurate reference and reference
buffer 14-bit ADC with 200 KSPS on all channels.
3) Flexible parallel/serial interface SPI/QSPI™/MICROWIRE™/DSP compatible
Pin-compatible solutions from 14 bits to 18 bits Performance 7 kV ESD rating on
analog input channels.
4) Fast throughput rate: 200 kSPS for all channels 85.5 dB SNR at 50 kSPS INL
±0.25 LSB, DNL ±0.25 LSB.
5) Low power: 100 mW at 200 kSPS Standby mode: 25 mW typical 64-lead LQFP
package.
Applications of AD7607: Power-line monitoring and protection systems Multiphase motor control
Instrumentation and control systems Multi axis positioning systems Data
acquisition systems (DAS).
Testing the ICAD7607: To test the working condition of the ICAD7607, A simple trainer kit of two in
number is needed to give the digital inputs and analog input to the ICAD7607 and
corresponding digitals outputs can be obtained. Analog Supply Voltage of about
4.75 V to 5.25 V can be given to the ICAD7607. (i.e Vcc) and supply voltage is
applied to the internal front-end amplifiers and to the ADC core. These supply pins
should be decoupled to AGND. All the AGND pins should be commonly grounded
(i.e AGND pins. whereas the analog ground should be given separately grounded.
49
Wiring circuit of the ICAD7607:
Figure 4.6 ADC7607 wiring circuit
Explanation and interconnections of the pins In AD-7607:
Pin PAR/SER/BYTE (6) with DB (16-22): DB016-DB22 are considered as the
output data bits when Pin PAR/SER/BYTE=0 (i.e logic low) all these pins acts as
the 3-state parallel input and output pins. When PAR/SER/BYTE= 1 (i.e logic high)
all the pins from 16 to 22 should be tied to DGND.
Pins RD/SCLK(12) and CS(13): When RD and CS are low these pins are used to
output DB13 to DB9 of the conversion result.
Pin CS and SCLK with DB7/DOUTA ,DB8/DOUTB: CS and RD/SCLK is logic
low these pins is used to output DB7 of the conversion result and when
PAR/SER/BYTE (6) pin is logic high the pin acts as DOUTA and outputs serial
conversion data.
50
Pin PAR/SER/BYTE (6) with DB15/BYTE SEL and DB14/HBEN: To operate
AD7607 in parallel byte interface mode both the pins PAR/SER/BYTE (6) and
DB15/BYTE SEL should be given logic high. Where HBEN pin is used to select
the most significant byte (MSB) or the least significant (LSB) of the conversion
result in output first.
HBEN=1, then MSB is the output first.
HBEN=0, then LSB byte is output first.
Guide lines to be noted:
1) Power supply of 4.75v to 5.25v and not exceeding that should
be given to the pins as shown in the above circuit.
2) Analog ground and digital ground should be given separately.
3) IC-AD7607 should not be given supply for the long duration
which will over heat the IC and that may lead to malfunctioning
of the IC-AD7607.
Implemented hardware circuit:
51
4.15 RESULTS
The dsPIC is programmed with the control algorithm. The waveforms shown
below are SVPWM generated pulses from dsPIC for different speed inputs. The
given input frequency is 2.5kHz and duty period of 0.4ms.
Figure.4.7 Waveform produced for 600 rpm input parameter
Figure4.8 Waveform produced for 450 rpm input parameter
52
CHAPTER – 6
CONCLUSION AND FUTURE SCOPE
53
5 . CONCLUSION AND FUTURE SCOPE
5.1 Conclusion:
The power demand has been growing at a quick rate across all parts of the
world and this is accompanied by a continual decline in the availability of fossil
fuels. So, the present world is leaning towards renewable energy resources and
energy storage technologies. Pumped hydro storage is one of the more reliable and
efficient storage systems. This project focussed on operating a Doubly Fed
Induction Machine at variable speeds to run a pump which is useful in a pumped
hydro system.
There is a necessity for controlling the speed of DFIM. When used in a
Pumped Hydro System, DFIM will operate both in motoring and generating modes
depending upon the power from the grid. Excess power from the grid is used to run
the machine as a motor at a ‘particular speed’ to operate the pump. This speed is
decided by the amount of excess power from the grid. More excess power will help
the pump to operate on larger loads because higher speed is set on the DFIM. For a
pump, the torque is directly proportional to the square of the speed. So, a pump will
be able to handle higher load with a proportionally smaller increase in its speed. For
a DFIM, to control the speeds over a wide range, rotor side control is preferred. By
feeding the rotor with power and varying the frequency of the AC power given to
the rotor, speed can be effectively controlled.
In this project, a DFIM was operated at variable speeds in motoring mode to
run a pump by using fuzzy logic control. The simulation was done in MATLAB
using the experimented values obtained from the open loop test. A d-q axis model
of DFIM was developed by analysing the steady state behaviour of the system
mathematically. The closed loop control of the DFIM involved giving accurate
voltages and angles along with slip frequency to the rotor side of the machine for
different load torques.
The rotor side inverter pulses are obtained using the Space Vector Pulse
Width Modulation. SVPWM pulses were obtained from the values of rotor voltage
54
and frequency which are taken from the open loop test. The various simulation
waveforms support the validity of the proposed analysis. It has been shown that for
obtaining various speeds, the slip frequency and the voltage given to the rotor
should be adjusted. From this we can conclude that the DFIM can run at a wide
speed range with optimal power loss.
5.2 Future Scope:
The system can further be improved by applying the generating mode of
operation to the present motoring mode and can be made as a Pump-Turbine system
with DFIM connected to it. Also advanced control methods like vector control can
be used. This will show better results compared to the simulation results in this
project.
The project can be further improved by using a solar cell instead of a DC
source. Also, grid side control and rotor side control can be implemented
simultaneously. Importance must be given to reducing the losses.
55
REFERENCES
56
REFERENCES
[1] Andreas Oberhofer, “Energy Storage Technologies & Their Role in Renewable
Integration,” Global Energy Network Institute, July 2012.
[2] “Rating the Energy Storage Options”, May 2012,
http://www.realclearenergy.org/charticles/2012/05/21/rating_the_energy_stora
ge_options.html
[3] Michael Manwaring, Debbie Mursch and Kelly Tilford, “Challenges and
Opportunities for New Pumped Storage Development”, NHA-Pumped Storage
Development Council, 2013.
[4] “Hydroelectric pumped storage technology: international experience,” Task
Committee on Pumped Storage, Committee on Hydropower of the Energy
Division of the American Society of Civil Engineers, New York: American
Society of Civil Engineers, 1995..
[5] Chris Greacen, “A comparison of the feasibility of battery storage and pumped
hydro electric storage for a solar PV-powered mini grid”, JGSEE, May 2006.
[6] Haisheng Chen, Thang Ngoc Cong and Wei Yang, “Progress in Electrical
Energy Storage System: A critical review”, Progress in Natural Science 19,
2009, pp.291-312.M. Young, The Technical Writer's Handbook. Mill Valley,
CA: University Science, 1989.
[7] __, “Hydro NEWS,” issue.14, Oct 2008, www.vatech-hydro.com.
[8] A. Schwery, E. Fass, J.M. Henry, W. Bach and A. Mirzaian, “Pump storage
power plant: ALSTOM's long experience and technological innovation”,
www.ALSTOM.com.
[9] Anagnostopoulos J. S., Papantonis D. E, “Pumping station design for a pumped-
storage wind-hydro power plant”, Energy Conversion and Management,
Volume 48, Issue 11, November 2007, Pages 3009-3017.
[10] “Advantages of Variable Speed Pump Turbines for adjusting Power
Supply,” Mitsubishi Heavy Industries Technical Review, Vol. 48, No. 3,
September 2011.
57
[11] R. J. Kerkman, T. A. Lipo, W. G. Newman, J. E. Thirkell, “An Inquiry into
Adjustable Speed Operation of a Pumped Hydro Plant, Part I – Machine Design
and Performance,” in IEEE Transactions on Power Apparatus and Systems,
Vol. PAS-99, No.5 Sept./Oct. 1980.
[12] R. J. Kerkman, T. A. Lipo, W. G. Newman, J. E. Thirkell, “An Inquiry into
Adjustable Speed Operation of a Pumped Hydro Plant, Part II – System
Analysis,” in IEEE Transactions on Power Apparatus and Systems, Vol. PAS-
99, No.5 Sept./Oct. 1980.
[13] Mahdi Johar, Ahmad Radan, Mohammad Reza Miveh and Sohrab
Mirsaeidi, “Comparison of DFIG and Synchronous Machine for Storage Hydro-
Power Generation”, International Journal of Pure and Applied Sciences and
Technology, 3-10-11.
[14] Rajib Datta and V. T. Ranganathan, “Variable-Speed Wind Power
Generation Using Doubly Fed Wound Rotor Induction Machine-Comparison
with Alternative Schemes,” IEEE Transactions on Energy Conversion, Vol. 17,
No. 3, September 2002.
[15] P.Girihar Kini, “Effect of Voltage and Load Variations on Efficiencies of a
Motor-Pump System”,IEEE transactions on energy conversions,Vol.25,N0.2,
June 2010.
[16] Xibo Yuan and Jianyun Chai, “A Converter-Based Starting Method and
Speed Control of Doubly Fed Induction Machine with Centrifugal Loads”,
IEEE TRANSACTIONS ON INDUSTRY APPLICATIONS, VOL. 47, NO. 3,
MAY/JUNE 2011.
[17] Dorin O. Neacsu, “SPACE VECTOR MODULATION –An Introduction,”
The 27th Annual Conference of the IEEE Industrial Electronics Society, 2001.
[18] Subrata.K.Mondal and Bimal.K.Bose, “Space Vector Pulse Width
Modulation of Three-Level Inverter Extending Operation Into Overmodulation
Region,” IEEE transactions on Power Electronics, Vol.18, No.2, March 2003.
58
APPENDIX
59
APPENDIX
EMBEDDED C PROGRAMME FOR dsPIC30F4011
#include <p30f4011.h>
# include <math.h>
#define VECTOR1 0X00 // 0 degrees
#define VECTOR2 0x2aaa // 60 degrees 0010 1010 1010 1010
#define VECTOR3 0x5555 // 120 degrees 0101 0101 0101 0101
#define VECTOR4 0x8000 // 180 degrees 1000 0000 0000 0000
#define VECTOR5 0xaaaa // 240 degrees 1010 1010 1010 1010
#define VECTOR6 0xd555 // 300 degrees 1101 0101 0101 0101
#define SIXTY_DEG 0x2aaa // 60 degrees 0010 1010 1010 1010
void pdc_update(void);
unsigned int fuzzylogic_voltage(unsigned int);
unsigned int fuzzylogic_angle(unsigned int);
void SVM(int , unsigned int );
int sinetable[]__attribute__((far,section(".const,r")))=0,201,401,602,803,1003,1204,1404,1605,1805,2005,2206,2406,2606,2806,3006,3205,3405,3605,3804,4003,4202,4401,4600,4799,4997,5195,5393,5591,5789,5986,6183,6380,6577,6773,6970,7166,7361,7557,7752,7947,8141,8335,8529,8723,8916,9109,9302,9494,9686,9877,10068,10259,10449,10639,10829,11018,11207,11395,11583,11771,11958,12144,12331,12516,12701,12886,13070,13254,13437,13620,13802,13984,14165,14346,14526,14706,14885,15063,15241,15419,15595,15772,15947,16122,16297,16470,16643,16816,16988,17159,17330,17500,17669,17838,18006,18173,18340,18506,18671,18835,18999,19162,19325,19487,19647,19808,19967,20126,20284,20441,20598,20753,20908,21062,21216,21368,21520,21671,21821,21970,22119,22266,22413,22559,22704,22848,22992,23134,23276,23417,23557,23696,23834,23971,24107,24243,24377,24511,24644,24776,24906,25036,25165,25293,25420,25547,25672,25796,25919,26042,26163,26283,26403,26521,26638,26755,26870,26984,27098,27210,27321,27431,27541, 27649,27756,27862,27967,28071,28174,28276,28377;
unsigned int t1,t2,tb=0,duty_r,duty_y,duty_b,ntv;
float t,f,f1,n,fslip,freq;
unsigned int voltage,theta=0,k,speed,slip;
float wref,vref,We,Ts,Vmag,mag1,mag,k1,s,Vll,fsli,fslip;
void initiate_all(void);
main ()
60
TRISB=0x0000;
PORTBbits.RB0=1; //for making adc work
initiate_all();
PTCONbits.PTEN=1; // PWM time base is ON
T3CONbits.TON=1; //timer C on
ADCON1bits.ADON=1; // A/D converter module is operating
ADCON1bits.SAMP=1; //At least one A/D sample/hold amplifier is sampling
IPC9bits.PWMIP=7; //Interrupt Priority Control Register 9/ 111= Interrupt is priority 7 (highest priority interrupt)
while(1)
while(IFS0bits.T3IF==0); //if timer three interrupt flag is not set
while(!IFS0bits.ADIF); //ADC interrupt is set
k=ADCBUF0; //value taken from ADC buffer 0 is given to k
speed=k*0.977517;//for 5volts 1000 rpm,it implies that 1023 value is 1000..so 1000/1023 gives the actual speed
slip=(1000-speed)/1000;
freq=slip*50;
fslip=50-((6*freq)/120); //slip frequency
if(fslip<0)
ntv=1;
else
ntv=0;
wref=6.28*fslip;
IFS0bits.ADIF=0;
IFS0bits.T3IF=0;
61
vref=fuzzylogic_voltage(speed);
k1=wref*Ts*10430; // 2pi rad => 65535(2^16) rad
s=(long)k1;
Vmag=(vref*sqrt(2)*1.15470054)/250;
mag1=Vmag*32768; //Vmag is the returned value from fuzzy programme
mag=(long)mag1;
return 0;
void initiate_all()
TRISF=0x00; //port initialisation
PORTFbits.RF0=0; //taking port f bits as input
PORTFbits.RF1=0;
Ts =0.0002; // Sampling time = 2.5kHz
k1=We*Ts*10430; // 2pi rad => 65535(2^16) rad
s=(long)k1;
theta=fuzzylogic_angle(speed);
Vmag=(vref*sqrt(2)*1.15470054)/250;
mag1=Vmag*32768; //Vmag*2^15
mag=(long)mag1;
// ADC module //
//************************************************//
T3CON=0X0030; //1:256 prescalar value
PR3=0XFA8; //Period register with value FA8
TMR3=0; //32 bit module of timer register it is main significant bit…. PR3 is used to compare from this register
IFS0bits.T3IF=0; //Timer 3 interrupt bit is cleared
ADPCFG=0x0000;
ADCON1=0x0040; //0000 0000 0100 0000//GP Timer3 compare ends sampling and starts conversion
ADCON2=0x0000; //0000 0001 0000 0000// converts CH0
62
ADCON3=0x0707; //0000 0111 0000 0111// convertion clock select bits_4*Tcy,7Tad
ADCHS=0x0000; //input select register, AN1 in CH0
ADCSSL=0x0000; //AN1in ch0
IFS0bits.ADIF=0; //clear the interrupt for ADC
// PWM Module //
//**********************************************//
PTCON = 0x0003; //up down counting mode.
PWMCON1 = 0x00FF; // Pulses with complimentary output
//DTCON1 = 0x0082; // prescalar 4, value= 3, therefore delay = tcy*4*3=2.4us
PWMCON2bits.IUE=1;
PTPER = 1000; // PWM period is .4msec
PTMR=0;
PDC1 =PTPER;
PDC2 =PTPER;
PDC3 =PTPER;
IFS2bits.PWMIF = 0;
IEC2bits.PWMIE=1;
tb=0;
unsigned int fuzzylogic_voltage(unsigned int speed)
unsigned int voltage;
if(speed>900)
voltage=20;
else if((speed>825)&&(speed<875))
voltage=40;
else if((speed>775)&&(speed<825))
63
voltage=46;
else if((speed>725)&&(speed<775))
voltage=60;
else if((speed>675)&&(speed<725))
voltage=110;
else if((speed>625)&&(speed<675))
voltage=113;
else if((speed>575)&&(speed<625))
voltage=125;
else if((speed>525)&&(speed<575))
voltage=155;
else if((speed>500)&&(speed<525))
voltage=170;
else if((speed>400)&&(speed<500))
voltage=190;
else if((speed>300)&&(speed<400))
64
voltage=215;
else if((speed>200)&&(speed<300))
voltage=246;
else
voltage=250;
return voltage;
unsigned int fuzzylogic_angle(unsigned int speed)
unsigned int angle_rotor;
if(speed>900)
angle_rotor=20;
else if((speed>825)&&(speed<875))
angle_rotor=40;
else if((speed>775)&&(speed<825))
angle_rotor=45;
else if((speed>725)&&(speed<775))
angle_rotor=61;
65
else if((speed>675)&&(speed<725))
angle_rotor=80;
else if((speed>625)&&(speed<675))
angle_rotor=85;
else if((speed>575)&&(speed<625))
angle_rotor=100;
else if((speed>525)&&(speed<575))
angle_rotor=110;
else if((speed>500)&&(speed<525))
angle_rotor=115;
else if((speed>400)&&(speed<500))
angle_rotor=119;
else if((speed>300)&&(speed<400))
angle_rotor=119;
else if((speed>200)&&(speed<300))
angle_rotor=119;
66
else
angle_rotor=119;
return angle_rotor;
void __attribute__((interrupt, no_auto_psv)) _PWMInterrupt (void)
if (theta >0xffff)
theta=0;//goes to beginning
SVM(mag,theta);
pdc_update();
theta=theta+s;
IFS2bits.PWMIF = 0;
void SVM(int mindx, unsigned int angle)
PORTFbits.RF1=1;
unsigned int angle1, angle2;
unsigned int half_t0,t1,t2,tpwm;
tpwm = 2000; //tpwm= Tsamp*2, *2 done for PDC, cos Actual PDC = PDC/2
if(mindx > 28300)
mindx = 28300;
if(angle < VECTOR2)
angle2 = angle - VECTOR1;
angle1 = SIXTY_DEG - angle2;
t1 = sinetable[(unsigned char)(angle1 >> 6)];
67
t2 = sinetable[(unsigned char)(angle2 >> 6)];
t1 = ((long)t1*(long)mindx) >> 15;
t1 = ((long)t1*(long)tpwm) >> 15;
t2 = ((long)t2*(long)mindx) >> 15;
t2 = ((long)t2*(long)tpwm) >> 15;
half_t0 = (tpwm - t1 - t2) >> 1;
// Calculate duty cycles for Sector 1 (0 - 59 degrees)
duty_r = t1 + t2 + half_t0;
duty_y = t2 + half_t0;
duty_b= half_t0;
else if(angle < VECTOR3)
angle2 = angle - VECTOR2;
angle1 = SIXTY_DEG - angle2;
t1 = sinetable[(unsigned char)(angle1 >> 6)];
t2 = sinetable[(unsigned char)(angle2 >> 6)];
t1 = ((long)t1*(long)mindx) >> 15;
t1 = ((long)t1*(long)tpwm) >> 15;
t2 = ((long)t2*(long)mindx) >> 15;
t2 = ((long)t2*(long)tpwm) >> 15;
half_t0 = (tpwm - t1 - t2) >> 1;
// Calculate duty cycles for Sector 2 (60 - 119 degrees)
duty_r = t1 + t2 + half_t0;
duty_y = t2 + half_t0;
duty_b= half_t0;
else if(angle < VECTOR4)
angle2 = angle - VECTOR3;
angle1 = SIXTY_DEG - angle2;
t1 = sinetable[(unsigned char)(angle1 >> 6)];
68
t2 = sinetable[(unsigned char)(angle2 >> 6)];
t1 = ((long)t1*(long)mindx) >> 15;
t1 = ((long)t1*(long)tpwm) >> 15;
t2 = ((long)t2*(long)mindx) >> 15;
t2 = ((long)t2*(long)tpwm) >> 15;
half_t0 = (tpwm - t1 - t2) >> 1;
// Calculate duty cycles for Sector 3 (120 - 179 degrees)
duty_r = t1 + t2 + half_t0;
duty_y = t2 + half_t0;
duty_b= half_t0;
else if(angle < VECTOR5)
angle2 = angle - VECTOR4;
angle1 = SIXTY_DEG - angle2;
t1 = sinetable[(unsigned char)(angle1 >> 6)];
t2 = sinetable[(unsigned char)(angle2 >> 6)];
t1 = ((long)t1*(long)mindx) >> 15;
t1 = ((long)t1*(long)tpwm) >> 15;
t2 = ((long)t2*(long)mindx) >> 15;
t2 = ((long)t2*(long)tpwm) >> 15;
half_t0 = (tpwm - t1 - t2) >> 1;
// Calculate duty cycles for Sector 4 (180 - 239 degrees)
duty_r = t1 + t2 + half_t0;
duty_y = t2 + half_t0;
duty_b= half_t0;
else if(angle < VECTOR6)
angle2 = angle - VECTOR5;
angle1 = SIXTY_DEG - angle2;
t1 = sinetable[(unsigned char)(angle1 >> 6)];
69
t2 = sinetable[(unsigned char)(angle2 >> 6)];
t1 = ((long)t1*(long)mindx) >> 15;
t1 = ((long)t1*(long)tpwm) >> 15;
t2 = ((long)t2*(long)mindx) >> 15;
t2 = ((long)t2*(long)tpwm) >> 15;
half_t0 = (tpwm - t1 - t2) >> 1;
// Calculate duty cycles for Sector 5 (240 - 299 degrees)
duty_r = t1 + t2 + half_t0;
duty_y = t2 + half_t0;
duty_b= half_t0;
else
angle2 = angle - VECTOR6;
angle1 = SIXTY_DEG - angle2;
t1 = sinetable[(unsigned char)(angle1 >> 6)];
t2 = sinetable[(unsigned char)(angle2 >> 6)];
t1 = ((long)t1*(long)mindx) >> 15;
t1 = ((long)t1*(long)tpwm) >> 15;
t2 = ((long)t2*(long)mindx) >> 15;
t2 = ((long)t2*(long)tpwm) >> 15;
half_t0 = (tpwm - t1 - t2) >> 1;
// Calculate duty cycles for Sector 6 ( 300 - 359 degrees )
duty_r = t1 + t2 + half_t0;
duty_y = t2 + half_t0;
duty_b= half_t0;
PORTFbits.RF1=0;
pdc_update()
if(ntv==1)
70
PDC1=duty_r;
PDC2=duty_b;
PDC3=duty_y;
else
PDC1=duty_r;
PDC2=duty_y;
PDC3=duty_b;