for printout

96
DEVELOPMENT OF A VARIABLE SPEED PUMP USING DOUBLY FED INDUCTION MACHINE A PROJECT REPORT submitted by CB.EN.U4EEE10015 A.SURYA TEJA CB.EN.U4EEE10017 B.VISHAL CB.EN.U4EEE10035 L.NARAYANAREDDY CB.EN.U4EEE10057 S.VAMSI KRISHNA in partial fulfillment for the award of the degree of BACHELOR OF TECHNOLOGY IN ELECTRICAL AND ELECTRONICS ENGINEERING AMRITA SCHOOL OF ENGINEERING, COIMBATORE

Upload: surya-teja

Post on 16-Apr-2017

143 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: for printout

DEVELOPMENT OF A VARIABLE SPEED PUMP USING

DOUBLY FED INDUCTION MACHINE

A PROJECT REPORT

submitted by

CB.EN.U4EEE10015 A.SURYA TEJA

CB.EN.U4EEE10017 B.VISHAL

CB.EN.U4EEE10035 L.NARAYANAREDDY

CB.EN.U4EEE10057 S.VAMSI KRISHNA

in partial fulfillment for the award of the degree

of

BACHELOR OF TECHNOLOGY

IN

ELECTRICAL AND ELECTRONICS ENGINEERING

AMRITA SCHOOL OF ENGINEERING, COIMBATORE

AMRITA VISHWA VIDYAPEETHAMAMRITANAGAR, COIMBATORE- 641112

May 2014

Page 2: for printout

AMRITA VISHWA VIDYAPEETHAM

AMRITA SCHOOL OF ENGINEERING, COIMBATORE, 641112

BONAFIDE CERTIFICATE

This is to certify that the project report entitled “Development of variable speed pumped hydro system using doubly fed induction machine” submitted by “A.SURYATEJA(EEE10015),B.VISHAL(EEE10017),L.NARAYANAREDDY(EEE10035), S.VAMSIKRISHNA (EEE10057)” in partial fulfillment of the requirements for the award of the Degree Bachelor of Technology in “ELECTRICAL AND ELECTRONICS Engineering” is a bonafide record of the work carried out under my guidance and supervision at Amrita School of Engineering, Coimbatore.

Mr. S. R.MOHANRAJAN Dr. K.C.SINDHU THAMPATTY

SUPERVISOR CHAIRPERSON

Assistant Professor (SG) Department of Electrical andDepartment of Electrical and Electronics Engineering, Electronics Engineering, Amrita School of Engineering,Amrita School of Engineering, Amrita Nagar, Coimbatore-641112Amrita Nagar, Coimbatore-641112

This project report was evaluated by us on……….

INTERNAL EXAMINER EXTERNAL EXAMINER

Page 3: for printout
Page 4: for printout

ABSTRACTEffective integration of energy generating mechanism with energy storage will help in

meeting the power demand at all times. Supply side management of power can be done

using pumped storage systems. The best machine suited for this system is DFIM. This

thesis is related to operating a DFIM in motoring mode to run a pump. The DFIM operates

in motoring mode during low loads so that excess power is given to the storage system.

Depending upon how much excess power is generated in the grid, the speed of the DFIM is

set and the load of the pump varies according to pump characteristics. In this thesis, the

DFIM was operated at all sub-synchronous speeds by using a fuzzy logic control

mechanism. The control mechanism involves giving accurate voltages, angles and slip

frequency to the rotor side of the machine to control the speed. Open loop test was done to

get the relationship between speed and rotor voltage as well as speed and rotor angle. This

was used in closed loop with a fuzzy logic controller.

CONTENTS

Page 5: for printout

1 . INTRODUCTION........................................................................................................6

1.1 OBJECTIVE..........................................................................................................8

1.1.1 The objectives include:...............................................................................8

2 LITERATURE SURVEY..................................................................................................9

3 . STUDY STATE ANALYSIS AND DYNAMIC MODELLING OF DOUBLY FED INDUCTION MACHINE:12

3.1 STEADY STATE ANALYSIS OF DOUBLY FED INDUCTION MACHINE:...................15

3.2 DYNAMIC MODELLING of DOUBLY FED INDUCTION MACHINE:.......................17

3.2.1 Features of Dynamic Modeling:................................................................17

3.2.2 Dynamic Modeling based on Space Vector Theory:.................................17

4 . SIMULATION...........................................................................................................20

4.1 SIMULATION BLOCK DIAGRAM........................................................................21

4.2 Input blocks:.....................................................................................................22

4.3 Output measurement:......................................................................................23

4.4 DESIGN OF FUZZY LOGIC CONTROLLER:..........................................................26

4.4.1 CALUCLATING VALUES OF VOLTAGE MAGNITUDE AND ANGLE TO BE GIVEN TO ROTOR FOR DIFFERENT SPEEDS:..............................................................................26

4.5 BUILDING THE FUZZY INFERENCE SYSTEM:.....................................................28

4.5.1 FIS Editor:.................................................................................................28

4.5.2 Membership Function Editor:...................................................................29

4.5.3 Rule Editor:...............................................................................................32

4.6 SIMULATION RESULTS.....................................................................................34

4.7 INFERENCE:......................................................................................................40

5 . SOFTWARE DEVELOPMENT....................................................................................40

5.1 Introduction:....................................................................................................40

5.2 dsPIC30F4011 Digital Signal Microcontroller:...................................................41

5.3 Implementation of Control Algorithm:.............................................................42

5.4 Timer Circuit for ADC:.......................................................................................42

5.5 Motor Control PWM module:..........................................................................42

5.6 ADC Module:....................................................................................................43

5.7 Implementation of Space Vector Algorithm:....................................................44

5.8 Algorithm for SVPWM:.....................................................................................45

5.9 Flowchart:........................................................................................................46

5.10 Conclusion:.......................................................................................................46

Page 6: for printout

6 . HARDWARE DESIGN...............................................................................................47

6.1 Introduction:....................................................................................................47

6.2 Current transducer:.........................................................................................47

6.3 Voltage transducer:.........................................................................................48

6.4 BI-QUAD FILTER................................................................................................49

6.4.1 Application of bi-quad filter:...................................................................50

6.5 Precision rectifier:............................................................................................50

6.6 Frequency to voltage converter:.....................................................................51

6.7 Frequency multiplier:......................................................................................51

6.8 Analog to digital Conversion:..........................................................................52

6.9 Features of AD7607:........................................................................................53

6.9.1 Applications of AD7607:..........................................................................53

6.9.2 Testing the ICAD7607:.............................................................................53

LIST OF FIGURES

Page 7: for printout

Figure 3.1 Doubly Fed Induction Machine.......................................................................13Figure 3.2 Modes of operation of DFIM..........................................................................14Figure 3.3 Steady State Equivalent Circuit of DFIM..........................................................17Figure 3.4 Dynamic Modeling equivalent circuit of DFIM................................................19Figure 4.1 Simulation of Block Diagram...........................................................................23Figure 4.2 showing the speed input and torque being estimated for measuring the o/p mechanical power...............................................................................................................................24Figure 4.3 Asynchronous Machine given input from both stator and rotor.....................24Figure 4.4 showing the output parameters being measured...........................................25Figure 4.5 Power output measurement block..................................................................26Figure 4.6 Subsystem developed for giving pulses to the rotor side inverter..................26Figure 4.7 Speed(X) Vs Voltage (Y)...................................................................................28Figure 4.8 Speed(X) Vs Angle(Y).......................................................................................29Figure 4.9 Mamdani System.............................................................................................30Figure 4.10 Load Torque..................................................................................................31Figure 4.11 Voltage..........................................................................................................32Figure 4.12 Angle............................................................................................................33Figure 4.13 Rules..............................................................................................................34Figure 4.14 Rotor input speed..........................................................................................36Figure 4.15 rotor output speed........................................................................................36Figure 4.16 Rotor torque output......................................................................................37Figure 4.17 Stator active power, rotor active power and mechanical power (from top to bottom).........................................................................................................................................38Figure 4.18 Stator active power......................................................................................39Figure 4.19 Rotor active power........................................................................................39Figure 4.20 Output Mechanical Power.............................................................................40Figure 5.1 a) 3-phased balanced voltages b) resulting space vector.................................45Figure 5.2 Flow Chart of the Programme.........................................................................47Figure 6.1 shows the circuit of LA-25NP current transducer............................................48Figure 6.2 shows the circuit of potential transducer........................................................50Figure 6.3 shows a typical three-operational amplifier circuit.........................................51Figure 6.4 precision rectifier............................................................................................52Figure 6.5 Frequency to voltage converter......................................................................52Figure 6.6 Frequency Multiplier.......................................................................................53

LIST OF TABLESTable 1 Speed voltage and Angle for fuzzylogic algorithm...............................................26Table 2 Closed Loop Simulation results............................................................................33

Page 8: for printout

LIST OF SYMBOLS

SYMBOLS DESCRIPTION UNIT

Rs Stator Resistance Ω

R Load Resistance Ω

X Load Reactance Ω

Xls Stator Leakage Reactance Ω

Xlr’ Rotor Leakage Reactance Ω

Rr’ Rotor Resistance Ω

Xm’ Magnetizing Reactance Ω

Ls Stator inductance H

Lr Rotor inductance H

Lm Mutual inductance H

E Air gap voltage V

s Slip

a Stator to rotor turns ratio

β Pitch angle Degree

ω Angular Frequency rad/s

Vdc DC link Voltage V

V Wind Speed m/s

ρ Air density kg/

v Volume of air

Cp Power coefficient

A Rotor swept area

Pt

λ

Turbine Power

Tip speed ratio

W

Page 9: for printout

Vds d axis stator voltage V

Vqs

Vdr

Vqr

P

N

ids

iqs

idr

iqr

Te

Tm

q axis rotor voltage

d axis stator voltage

q axis rotor voltage

No of poles

Speed of rotor

Rotor electrical angular velocity

Rotor angular velocity

d axis stator current

q axis rotor current

d axis stator current

q axis rotor current

d axis stator flux

q axis stator flux

d axis rotor flux

q axis rotor flux

Stator real power

Stator reactive power

Rotor real power

Rotor reactive power

Stator current

Stator equivalent or rotor current

Stator Voltage

Electrical torque

Mechanical torque

V

V

V

rpm

rad/s

rad/s

A

A

A

A

web

web

web

web

W

W

W

W

A

A

V

Nm

Nm

Page 10: for printout

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

Page 11: for printout

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 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.

Page 12: for printout

1.1 OBJECTIVEThe 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

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.

1.1.1 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.

Page 13: for printout

2 LITERATURE SURVEY

[2.1] Andreas Oberhofer, “Energy Storage Technologies & Their Role in

Renewable Integration,” Global Energy Network Institute, July 2012.

“This paper presents an analysis on type of Energy Storage Techniques available

and their advantages and disadvantages. It describes the advantages of Pumped

Hydro Systems advantages over the other storage technologies. A critical

observation is made on the benefits, problems and possible impacts in the future.”

[2.2] 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.

“This paper deals with advantages and capabilities of variable speed storage –

pumping plants. These features were compared with conventional synchronous

ones in this paper. Different viewpoints such as structure and steady state

behaviour are focused for comparing the application of Doubly Fed

Induction Generators (DFIG) and synchronous ones in storage hydro plants.

Dynamic stimulations are also used to evaluate the performance of variable-

speed versus synchronous fixed-speed generation units.”

[2.3] 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.

“ In this paper the DFIM is connected to grid and is controlled from rotor side.

The machine is compared in both fixed speed and variable speed systems using

cage rotor induction machine. The comparison is made using the major hardware

components required, energy output and operating region. This paper in detail

explains the advantages and flexibility of variable speed systems compared to

fixed speed systems. The DFIM is controlled from the rotor side in this paper. The

speed is controlled by varying the supply on the rotor side and connecting the

Page 14: for printout

both rotor and stator to the grid. This paper shows that even though more

simple and reliable, Fixed Speed Systems have some limitations. The energy

capture can be increased significantly with connecting the DFIM for the variable

speed system.”

[2.4] 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.

“This paper deals with a three phase induction motor connected to a centrifugal

pump model. In this model a DC motor is connected instead of pump to get the

Induction machine system characteristics. This model shows that a DC machine

can be used to replace the pump for determining the machine characteristics. The

motor pump system is subjected to voltage and load variations to justify the

system and for better result analysis.”

[2.5] 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.

“This paper deals with the speed control of DFIM connected with a converter on

the rotor side and rotor shaft connected to a centrifugal load. The paper presents

the converter based starting method for running the induction machine with

centrifugal loads. The machine is tested for variable speed operation. The

machine is again connected to the DC machine for analysis. This paper explains

the advantage of DFIM system connected to the pump.”

[2.6] Dorin O. Neacsu, “SPACE VECTOR MODULATION –An Introduction,”

The 27th Annual Conference of the IEEE Industrial Electronics Society, 2001.

“This is a tutorial presented by the author on the basics of Space Vector Pulse

Width Modulation. The basics on Vectoral Analysis of Three Phase Converter,

Pulse Width Modulation and Selection of the switching sequence were explained

in detail. The Comparison is made on the different methods of generating

Page 15: for printout

SVPWM and the THD, Number of Switching States and dominant harmonics

were analysed.”

[2.7] 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.

This Paper deals with the Space Vector Pulse Width Technique and it’s over

modulation and under modulation methods. The paper deals with Space Vector

PWM and its control algorithm for DSP based implementation. The voltage and

angle were given as inputs to the algorithm and it creates SVPWM pulses using it

at 1.0 kHz switching frequency. In this method the switching states are distributed

such that the neutral point voltage always remains balanced. An open loop V/f

controlled induction motor drive has been evaluated using both over modulated

and under modulated strategies by giving the voltage and frequency in whole

speed range.”

Page 16: for printout

3 . STUDY STATE ANALYSIS AND DYNAMIC

MODELLING OF DOUBLY FED INDUCTION

MACHINE:

Figure 3.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 [21]. 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 [24]. 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 [25]. 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 [26], [27].

Page 17: for printout

Figure 3.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

Page 18: for printout

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. 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 [30], [31]. 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 [32]. 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[33]. 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 [34]. 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

Page 19: for printout

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 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.

3.1 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: [1]_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

Page 20: for printout

Figure 3.3 Steady State Equivalent Circuit of DFIM

So when representing the equivalent circuit the equation w.r.t is given by

V r

s−E s=( Rr

s+ jws Lr)I rat f s

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

V 2 p '=E+ I 2 p ' ( R2s

+ jX 2)v2p=V 2 p

' ( sa )w . r .t statorThe rotor current and frequency are given by

I 2p=a I 2p '

f r=f s−( PN120 )The real power and reactive power supplied to the load were given by

p1=3 ℜ (V 1 p I1 p¿ )

q1=3ℑ(V 1p I 1p¿ )

Page 21: for printout

The real power and reactive power supplied to the load from rotor were given

by

p2=±3 ℜ (V 2 p I 2 p¿ )

q2=3 ℑ(V 2p I 2 p¿ )

The output mechanical power is given by

pm=3 I 2 p2 R2( 1−s

s )−p2( 1−ss )

3.2 DYNAMIC MODELLING of DOUBLY FED INDUCTION MACHINE:

3.2.1 Features of Dynamic Modeling: Dynamic Modeling explains and defines the behavior 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 behaviors, 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.

3.2.2 Dynamic Modeling based on Space Vector Theory:It is represented in general in differential equation form, is often structured as a

compact set of model equations.

Page 22: for printout

The DFIM equivalent electric circuit is shown below,

Figure 3.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

vas (t )=R s ias (t )+dψas(t)dt

vbs (t )=Rs ibs (t )+dψbs(t)dt

vcs (t )=R s ics (t )+dψcs(t)dt

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)

Page 23: for printout

are the stator referred rotor voltages; and car(t), cbr(t) and ccr(t) are the

rotor fluxes.

var (t )=R r iar (t )+dψar (t)dt

vbr ( t )=R r ibr (t )+dψbr (t)dt

vcr (t )=Rr icr (t )+dψ cr(t)dt

Alpha-beta Model: the voltage equations of the DFIM in space vector

form:

vss=R s is

s+d ψ s

s

dt

vrr=Rr ir

r+d ψ r

r

dt

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

ψss=Ls i s

s+Lm irs

ψ rr=Lm is

r+Lr irr

For transforming all equations into stator reference frame we use the

equation

Now the equations become:

vss=R s is

s+d ψ s

s

dt

vrs=Rr ir

s+d ψ r

s

dt− j ωmψr

s

ψss=Ls i s

s+Lm irs

ψ rs=Lm is

s+Lr irs

Page 24: for printout

4 . 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

Page 25: for printout

observed in simulation. This method will provide a new method of controlling

speed with optimizing power loss.

4.1 SIMULATION BLOCK DIAGRAM

Figure 4.5 Simulation of Block Diagram

Page 26: for printout

4.2 Input blocks:

Figure 4.6 showing the speed input and torque being estimated for measuring the o/p 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.

Figure 4.7 Asynchronous Machine given input from both stator and rotor

Page 27: for printout

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.

4.3 Output measurement:

Figure 4.8 showing the output parameters being measured

The parameters needed to be measured are selected from bus selector that is given

to the measurement pin of machine. The rotor currents, Electromagnetic torque,

Speed and Rotor angle are measured from it.

Page 28: for printout

Figure 4.9 Power output measurement block

For measuring the instantaneous active and reactive power . The blocks will give

the mean value of power when the 3-phase voltage and power are given to it.

The rotor and stator real and reactive power are measured by the blocks as shown

in Fig.6. The blocks will give the mean value of power when the 3-phase voltage

and power are given to it.

Figure 4.10 Subsystem developed for giving pulses to the rotor side inverter

Page 29: for printout

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.

4.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.

4.4.1 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.

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 fuzzylogic 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

Page 30: for printout

600 125 100

550 155 110

500 170 115

450 180 117

400 190 119

350 200 119

300 215 119

200 246 119

The relation between speed and voltage is found to be linear.

Figure 4.11 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.

Page 31: for printout

Figure 4.12 Speed(X) Vs Angle(Y)

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.

4.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

4.5.1 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.

Page 32: for printout

Figure 4.13 Mamdani System

4.5.2 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.

Page 33: for printout

Figure 4.14 Load Torque

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.

Page 34: for printout

Figure 4.15 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.

Page 35: for printout

Figure 4.16 Angle

4.5.3 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.

Page 36: for printout

Figure 4.17 Rules

Now, the fuzzy inference system is designed. It is then exported to Matlab

workspace and used in Simulink.

4.6 SIMULATION RESULTSThe 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

Page 37: for printout

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

Page 38: for printout

Figure 4.18 Rotor input speed

Figure 4.19 rotor output speed

Page 39: for printout

Figure 4.20 Rotor torque output

Figure 4.21 Stator active power, rotor active power and mechanical power (from top to bottom)

Page 40: for printout

Figure 4.22 Stator active power

Page 41: for printout

Figure 4.23 Rotor active power

Figure 4.24 Output Mechanical Power

Page 42: for printout

4.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.

Page 43: for printout

5 . SOFTWARE DEVELOPMENT

5.1 Introduction: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

window. The code is converted to hex file format after compiling and the

dsPIC30F4011 DSC is programmed using LabProg 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.

Page 44: for printout

5.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 speciality 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 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

5.3 Implementation of Control Algorithm: Initially the value of speed is given by a anolog pin to channel CH0 from

AN1.

Then with fuzzylogic 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.

5.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

Page 45: for printout

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.

5.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 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

5.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.

Page 46: for printout

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.

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.

5.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

Page 47: for printout

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.

Figure 5.25 a) 3-phased balanced voltages b) resulting space vector

5.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)

Page 48: for printout

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).

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

5.9 Flowchart:

The flow chart algorithm is presented below

Page 49: for printout

Figure 5.26 Flow Chart of the Programme

5.10 Conclusion:Coding of the controller was performed in MPLAB. The output pulses were

observed in logic analyser. Both the fundamental voltage and frequency are

varying precisely with the references given in the ADC pin of the dsPIC.

Page 50: for printout

6 . HARDWARE DESIGN

6.1 Introduction: 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.

6.2 Current transducer: Current transducer is generally used for the electronic measurements of currents:

DC, AC, pulsed mixed with a galvanic isolation between the primary circuit and

the secondary circuit. Current transducer is preferred usually due to its added

features and advantages like accuracy, linearity, low temperature drift, optimized

response time, wide frequency band width, no insertion losses, high immunity to

external interference and also due to its current over load capability. So for the

above features and advantages the current transducer that best suites is LA 25-NP

for which the primary current nominal is in the range of (5-25) A. Based on the

data sheet of LA 25-NP design is done and explained below.

Figure: 1.1

Figure 6.27 shows the circuit of LA-25NP current transducer

Page 51: for printout

The relation between the turn’s ratio and the currents is given below

T . R=n= NpNs

= IsIp

Is = Ip (NpNs )

Where the turn’s ratio is decided based on the recommended connections stated in

the data sheet.

From the above diagram primary current (IP) *(1/1000) = IS

25*1.414*(1/1000) = IS =0.0353A

2.5v = IS*RM

RM = 2.5/0.0353= 70.82 ohms

6.3 Voltage transducer: 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

Page 52: for printout

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

Figure: 1.2

Figure 6.28 shows the circuit of potential transducer

6.4 BI-QUAD FILTERThe bi-quad configuration is a useful circuit for producing band pass and low-pass

responses, whereas the bi-quad and the state variable filter circuit configuration

can have Q-factor values of 400 or greater and at high frequencies operation of bi-

quad filter gives an efficient way of filtering the responses of the various inputs

given. So in this project bi-quad filter is used to filter the voltage response taken

from the speed of the rotor.

Page 53: for printout

Figure: 2.1

Figure 6.29 shows a typical three-operational amplifier circuit

6.4.1 Application of bi-quad filter: 1) It is easily tunable using single resistor tuning (normally a stereo or ganged

potentiometer).

2) It can be configured to produce a Butterworth or a Chebychev response by

changing the damping (1/Q)

6.5 Precision rectifier:A simple rectifier circuit uses a diode and there is a turn on voltage for the diode.

The input voltage has to exceed the turn on voltage (0.6v for ordinary si diode)

before rectification is achieved. A precision rectifier is an active circuit using an

op amp and a diode in the feedback loop. This over comes the turn on Knee

voltage. The op amp reduces the turn –on voltage of a diode in its feedback loop

by a factor equal to the open loop gain of the op amp. For practical op amp gains

this reduces the forward voltage to a fraction of mv. Thus giving a precision

rectifier or near ideal diode characteristic for the rectifier function. This is how a

precision rectifier circuit differs from the simple rectifier circuit. In this project the

voltage pulses taken from the bi-quad filter is rectified by using precision rectifier

circuit.

Figure 2.2

Page 54: for printout

Figure 6.30 precision rectifier

6.6 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 6.31 Frequency to voltage converter

6.7 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

input from the converter circuit is given to the frequency multiplier to get desired

frequency.

Page 55: for printout

Figure 2.4

Figure 6.32 Frequency Multiplier

6.8 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

Page 56: for printout

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.

6.9 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.

6.9.1 Applications of AD7607:Power-line monitoring and protection systems Multiphase motor control

Instrumentation and control systems Multi axis positioning systems Data

acquisition systems (DAS).

6.9.2 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.eVcc) 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.

Page 57: for printout

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,420

2,4401,4600,4799,4997,5195,5393,5591,5789,5986,6183,6380,6577,6773,6970,7

166,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

Page 58: for printout

,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 ()

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)

Page 59: for printout

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;

vref=fuzzylogic_voltage(speed);

Page 60: for printout

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

Page 61: for printout

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

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;

Page 62: for printout

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))

voltage=46;

else if((speed>725)&&(speed<775))

voltage=60;

Page 63: for printout

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;

Page 64: for printout

else if((speed>300)&&(speed<400))

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;

Page 65: for printout

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;

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;

Page 66: for printout

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;

else

Page 67: for printout

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)

Page 68: for printout

mindx = 28300;

if(angle < VECTOR2)

angle2 = angle - VECTOR1;

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 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)];

Page 69: for printout

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)];

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;

Page 70: for printout

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;

Page 71: for printout

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 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;

Page 72: for printout

// 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)

PDC1=duty_r;

PDC2=duty_b;

PDC3=duty_y;

else

PDC1=duty_r;

PDC2=duty_y;

PDC3=duty_b;