24
Indian Institute of Science Education and Research, Kolkata Summer Project Report Kramers-Kronig Relationship and its Application to LCR circuit Author: Swarnadeep Seth Supervisor: Dr. Bhavtosh Bansal A report submitted in fulfillment of the requirements for Summer Internship in the Department of Science and Technology July 2016

Kramers-Kronig Relationship and its Application to LCR circuit

  • Upload
    ucf

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Indian Institute of Science Education andResearch, Kolkata

Summer Project Report

Kramers-Kronig Relationship and itsApplication to LCR circuit

Author:

Swarnadeep Seth

Supervisor:

Dr. Bhavtosh Bansal

A report submitted in fulfillment of the requirements

for Summer Internship

in the

Department of Science and Technology

July 2016

Declaration of Authorship

I, Swarnadeep Seth, declare that this project titled, ’Kramers-Kronig Relationship and

its Application to LCR circuit’ and the works presented in it are done by me only. I

confirm that:

This work was done wholly or mainly while in candidature for a Summer Internship

at this University.

Where any part of this article has previously been submitted for a degree or any

other qualification at this University or any other institution, this has been clearly

stated.

Where I have consulted the published work of others, this is always clearly at-

tributed.

I have acknowledged all main sources of help.

Where the thesis is based on work done by myself jointly with others, I have made

clear exactly what was done by others and what I have contributed myself.

Signed:

Date:

i

“If we knew what it was we were doing, it would not be called research, would it?”

Albert Einstein

”We avoid the gravest difficulties when, giving up the attempt to frame hypotheses con-

cerning the constitution of matter, we pursue statistical inquiries as a branch of rational

mechanics.”

J. Willard Gibbs Elementary Principles in Statistical Mechanics (1902), ix.

Abstract

Kramers-Kronig Relationship and its Application to LCR circuit

by Swarnadeep Seth

This project is done mainly focusing on how we can quickly predict the imaginary

component of a function knowing only its real part and vice versa. This relationship is

given by Kramers and Kronig and we will use computational techniques to implement

it in real life situations. So we decided to take most simple case i.e series LCR circuit

to do that. In this project we have done the calculation both for theoretical function

and with experimental data. For taking the experimental data we have used Lock In

Amplifier which give very precise measurements and for computational purpose we have

taken the help of Python programs.

Acknowledgements

I want to express my gratitude to Dr.Bhavtosh Bansal as my instructor for his constant

help and encouragement to carry out the project. I also want to thank my project partner

Arnab Char for his collaboration. At last I will heartily congratulate ’Anaconda-Python

Distribution’ for their free Python packages (Pylab ,Matplotlib) which I used to generate

figures and doing the numerical calculations. In case of latex writing I want to thank

Miktex package and Steven Gunn for his latex template.

iv

Contents

Declaration of Authorship i

Abstract iii

Acknowledgements iv

List of Figures vi

Abbreviations vii

Symbols viii

1 Introduction to Kramers-Kronigs Equation 1

1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.2 Derivation of Kramers-Kronig Relationship . . . . . . . . . . . . . . . . . 2

2 Application of Kramers-Kronig Relationship 4

2.1 Application of Kramers-Kronig Relationship . . . . . . . . . . . . . . . . . 4

2.1.1 Method of application . . . . . . . . . . . . . . . . . . . . . . . . . 4

3 Application of KK Relationship in RLC circuit 6

3.1 Application on LCR circuit . . . . . . . . . . . . . . . . . . . . . . . . . . 6

3.1.1 Theoretical Conversion between Conductance and Susceptance . . 7

3.1.1.1 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . 8

3.1.2 Derivation of Conductance from Susceptance and vice versa usingexperimental Data . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

3.1.2.1 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . 10

4 Conclusion, Reference and Code Used 11

4.1 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

4.2 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

4.3 Appendix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

v

List of Figures

1.1 Plot of Contour of the function . . . . . . . . . . . . . . . . . . . . . . . . 2

3.1 Plot of Conductance or Real Part of Admittance . . . . . . . . . . . . . . 7

3.2 Plot of Susceptance or Imaginary Part of Admittance . . . . . . . . . . . 7

3.3 Plot of Susceptance derived from Conductance function using KK relationin Trapezoidal Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

3.4 Plot of Conductance derived from Susceptance function using KK relationin Trapezoidal Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

3.5 Plot of Imaginary part data from Real part data using KK relation inSimpson Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

3.6 Plot of Real part data from Imaginary part data using KK relation inSimpson Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

vi

Abbreviations

In this Project No Abbreviation has been made.

vii

Symbols

R Resistance in SI Unit

L Inductance in SI Unit

C Capacitance in SI Unit

ω Frequency

Z Impedance

Y Admittance

G Conductance

B Susceptance

viii

Chapter 1

Introduction to Kramers-Kronigs

Equation

1.1 Introduction

Every complex function has real and imaginary components. For instance if we con-

sider admittance of a complex network with inductors,capacitors or active components

we can easily find out the real and imaginary part and those are called conductance

and susceptance respectively. Kramers-Kronig gave a relationship using which one can

calculate real part to imaginary part and vice-verse. But for this the function χ(ω) has

to satisfy two criteria.

1. The function χ(ω) is analytic in the right half plane.

2. As |ω| → ∞ the function χ(ω)→ 0.

1

Chapter 1. Introduction to KK Relationship 2

1.2 Derivation of Kramers-Kronig Relationship

Figure 1.1: Plot of Contour of the function

For the function here we will consider the contour in the imaginary axis. The function

has singularity at the point iω. So we have to use Cauchy Principle value integration to

integrate over the range (−∞,∞). The integral can be written as

limR→∞

[∫ ir1

iR

χ(x)

(x− iw)dx+

∫ ir2

ir1

χ(x)

(x− iw)dx+

∫ −iRir2

χ(x)

(x− iw)dx+

∫γR

χ(x)

(x− iw)dx

]= 0

Now we can write,∫ ir1

i∞

χ(x)

(x− iw)dx = 0 (1.1)∫ −i∞

ir2

χ(x)

(x− iw)dx = 0 (1.2)

Chapter 1. Introduction to KK Relationship 3

Hence,

∫γδ

χ(x)

(x− iw)dx+

∫γR

χ(z)

(z − iw)dx = 0 where z=x+iy (1.3)

Now (1.4)∫γiR

χ(x)

(x− iw)dx = PV

∫ i∞

−i∞

χ(y)

(y − iw)dy (1.5)

= PV

∫ ∞−∞

χ(ix)

(ix− iw)idx (1.6)

= PV

∫ ∞−∞

χ(ix)

(x− w)dx (1.7)

limδ→0

∫γδ

χ(x)

(x− w)dx = lim

δ→0

∫ pi/2

−pi/2

χ(iw + δeit)

iw + δeit − iwiδeitdt (1.8)

= limδ→0

∫ pi/2

−pi/2iχ(iw + δeit)dt (1.9)

= iπχ(iw) (1.10)

PV

∫ ∞−∞

χ(x)

(x− w)dx+ iπχ(iω) = 0 (1.11)

⇒ χ(iω) = −PViπ

∫ ∞−∞

χ(ix)

(x− w)dx (1.12)

Comparing the Real and Imaginary part we can write,

<e(χ(iω)) = −PVπ

∫ ∞−∞

Im(χ(iω))

(x− ω)dx (1.13)

Im(χ(iω)) =PV

π

∫ ∞−∞

<e(χ(iω))

(x− ω)dx (1.14)

We have the KK relationship which can transform real part of a function to its conjugate

part and vice versa. But for numerical purpose doing Cauchy Principle Value integration

is difficult. So we will use another form of Kramers-kronig Relationship which can be

derived after some algebraic manipulation. Those can be written as

<e(χ(ıω)) =− 2

π

∫ ∞0

xIm(χ(ix))− ωIm(χ(iω))

(x2 − ω2)dx (1.15)

Im(χ(ıω)) =2ω

π

∫ ∞0

<e(χ(ix))−<e(χ(iω))

(x2 − ω2)dx (1.16)

We will use the last two relationships for further calculations.

Chapter 2

Application of Kramers-Kronig

Relationship

2.1 Application of Kramers-Kronig Relationship

Kramers-Kronig relationship has vast application in transformation of real part into

its conjugates and vice-versa. In practical case it is easy to measure the real part of

a complex function than its imaginary part. So using Kramers-kronig relation we can

predict the imaginary components without measuring it. This will also save time to

measure great number of data. Only one sided data will be enough to construct the

whole output function. Here we will show two examples in which the relationship will

be used. To determine the reactive part from its active part we have to integrate over the

domain (−∞,∞). And first of all the function should satisfy the two given conditions.

The integration can be done by various numerical methods. We will mostly use two

simple integration methods and these are Trapezoidal and Simpson 13 method. The

brief discussion about how we have use two methods along with KK relationship to find

the conjugate parts of a complex function is given below.

2.1.1 Method of application

For numerical integration it is almost impossible to set the integration range (0,∞). So

we have taken the range (0, 20000) for both the cases. Let suppose we have taken the

4

Chapter 2. Application Procedure 5

Real part and want to find out the Imaginary part. So we have to carry out integration of

the function 2ωπ<e(f(ω))−<e(f(x))

ω2−x2 over the considered range with respect to the integration

variable x for each value of ω. And the integrated values represents the imaginary part.

If we plot the integrated value against ω we can see the imaginary part of the function

and can also compare it plotting against the theoretical imaginary part function. For

deriving the real part from the imaginary part the KK relation will only change and rest

other procedure will remain same.

Chapter 3

Application of KK Relationship

in RLC circuit

3.1 Application on LCR circuit

LCR circuit consists of inductor, capacitor and resistance in series. So we can write the

impedance of the system as sum of all impedance of each components. The impedance of

resistor,capacitor and inductor are respectively R, 1iωC and iωL. Hence total impedance

of the system is

Z(iω) =1− ω2LC + iωRC

iωC.

So we can write admittance as Y (iω) = 1Z(iω)

Y (iω) =iωC

1− ω2LC + iωRC(3.1)

=iωC(1− ω2LC − iωRC)

(1− ω2LC)2 − (ωRC)2(3.2)

=ω2RC2

1− 2ω2LC + ω4L2C2 + ω2R2C2+ i

ωC − ω3LC2

1− 2ω2LC + ω4L2C2 + ω2R2C2(3.3)

We can also split up the admittance part as

Y (iω) = G(ω) + iB(ω) (3.4)

6

Chapter 3. Application to LCR 7

Hence

G(ω) =ω2RC2

1− 2ω2LC + ω4L2C2 + ω2R2C2(3.5)

B(ω) =ωC − ω3LC2

1− 2ω2LC + ω4L2C2 + ω2R2C2(3.6)

G(ω) and B(ω) are called Conductance and Susceptance respectively.

3.1.1 Theoretical Conversion between Conductance and Susceptance

Let us first fix the constant values. We will choose C = 10µF , L = 20mH and R = 1KΩ.

Now if we plot the Conductance and Susceptance respectively we will get,

Figure 3.1: Plot of Conductance or Real Part of Admittance

Figure 3.2: Plot of Susceptance or Imaginary Part of Admittance

We have integrated the Conductance function and got the following curve which is

plotted against the theoretical Susceptance curve.

Chapter 3. Application to LCR 8

Figure 3.3: Plot of Susceptance derived from Conductance function using KK relationin Trapezoidal Method

Similarly we can predict the real part from imaginary part and the plot is given below.

Figure 3.4: Plot of Conductance derived from Susceptance function using KK relationin Trapezoidal Method

3.1.1.1 Discussion

Doing the Kramers-Kronig integration in Trapezoidal method the global error is O(h2)

where h is the step size of the integration. So error is very less comparative to the values.

If we consider the blue curve in the Figure 3.3 (which is Susceptane curve derived from

Conductance curve using KK relationship) is not exactly equal to the Exact Susceptance

curve given in the Figure 3.2. The magnitude of maxima and minima occurred in the

derived curve is different but the qualitative behavior of the whole curve is almost

same along with position of maxima and minima. The same logic follows for the Exact

Conductance (Figure 3.1) and Derived Conductance Curve (Figure 3.4) also.

Chapter 3. Application to LCR 9

3.1.2 Derivation of Conductance from Susceptance and vice versa us-

ing experimental Data

We have constructed a circuit connecting a resistor, one capacitor and one inductor in

series. Using voltage regulator we can change the input voltage and its frequency and

we have connected a Lock-In Amplifier to measure the output voltage and frequency.

Through out the experiment input voltage is kept constant and the frequency is varied

from zero to 2500 Hz. Using Matlab we have changed the input frequency and the

output data is stored in a text file. We also have sorted out the real part and imaginary

part data and stored differently.

Now using a python program (given in Appendix) we have fed the real part data to the

KK relationship and integrated over the whole range and vice versa for the imaginary

part data. We have done simpson 13 integration to generate the output curve which is

the following.

Figure 3.5: Plot of Imaginary part data from Real part data using KK relation inSimpson Method

Figure 3.6: Plot of Real part data from Imaginary part data using KK relation inSimpson Method

Chapter 3. Application to LCR 10

3.1.2.1 Discussion

From the above plot it is clear that the predicted KK curve is very close to the exact

curve. But there are some error of integration. As we have used Simpson 13 integration

the global error is in order O(h4) where h is the step size. So we can conclude that that

overall behavior of the curves are almost same. We can also do Trapezoidal integration

but in that case the error will be O(h2) and h is the step size of the integration.

Note:[Here Red one represents the input data curve, Green one represents

actual curve and the Blue curve represents the data curve derived using KK

relationship.]

Chapter 4

Conclusion, Reference and Code

Used

4.1 Conclusion

The main importance of Kramers-Kronig Relationship is to help us to construct the

whole domain of data set using only one sided data. This drastically reduces the time

that needed to collect the whole range of experimental data. Moreover it is some time

difficult to have two sided data due to some constrains but this above method can rescue

us from those types of situation. We can also theoretically predict the conjugate part of

a function without finding it extensively.

4.2 References

[1] Network analysis and feedback amplifier design by Hendrik Wade Bode.

[2] Calculating the reactive power using the Kramers-Kronig relations by Verslag ten

behoeve van het.

[3] Craig F. Dohren, What did Kramers and Kronig do and how did they do it? European

Journal of Physics. 31, 573-577, 2010.

[4] J. Matthew Esteban and Mark E. Orazem, On the Application of the Kramers-Kronig

relations to Evaluate the Consistency of Electrochemical Impendance Data. Journal of

The Electrochemical Society, Vollume 138, 1991.

11

Chapter 4. Conclusion 12

4.3 Appendix

Python programs that are used in this project are given below:

1 from math import ∗

2 from pylab import ∗

3 # Li s t Names

===================================================================

4 X=[]

5 Y=[]

6 Z=[ ]

7 A=[]

8 B=[]

9 E=[]

10 # Reading the Data F i l e s

=======================================================

11 f i n Rea l=open ( ”Experimental−Real Value . dat” , ” r ” )

12 f i n Imag ina ry=open ( ”Experimental−Imaginary Value . dat” , ” r ” )

13 f o r i in f i n Rea l :

14 A. append ( i )

15 f i n Rea l . c l o s e ( )

16 f o r i in f i n Imag ina ry :

17 B. append ( i )

18 f i n Imag ina ry . c l o s e ( )

19 # Condit ions

===================================================================

20 a=0

21 b=len (A)−1

22 N=len (A)

23 h=1

24 # Function To be In t eg ra t ed

====================================================

25 de f f 1 ( i ) :

26 re turn B[ i ]

27 pr in t ”Your Input conta in s : ” , l en (B) , ”data po in t s ”

28 # Theo r i t i c a l Function Input

===================================================

29 de f f ( i ) :

30 re turn A[ i ]

Chapter 4. Conclusion 13

31 # KRAMERS−KRONIGS RELATIONSIP

==================================================

32 de f g (w, x ) :

33 i f x==w:

34 re turn 0

35 e l s e :

36 #return ( ( 2 . ∗w)/ pi ) ∗ ( ( f l o a t ( f (w) )− f l o a t ( f ( x ) ) ) /(w∗∗2−x∗∗2) )

37 re turn −((2 .) / p i ) ∗ ( (w∗ f l o a t ( f 1 (w) )−x∗ f l o a t ( f 1 ( x ) ) ) /(w∗∗2−x∗∗2) )

38 # Main Program [ Simpson In t e g r a t o r]========================================

39 w=0

40 whi le w<=2500:

41 s=0.0

42 X. append (w)

43 Y. append ( f1 (w) )

44 E. append ( f (w) )

45 f o r i in range (1 ,N) :

46 s=s +(2./3) ∗h∗g (w, a+i ∗h)

47 f o r i in range (1 ,N, 2 ) :

48 s=s +(2./3) ∗h∗g (w, a+i ∗h)

49 s=s +(1./3) ∗h∗g (w, a )

50 s=s +(1./3) ∗h∗g (w, b)

51 Z . append ( s )

52 w=w+1

53 # Figure Output

================================================================

54 f i g=f i g u r e ( )

55 p lo t (X,Y, ’ r ’ ) # Function Given to be In t eg ra t ed # RED

56 p lo t (X,E, ’ g ’ ) # Th e i r i t i c a l l y Obtained Curve # Green

57 p lo t (X, Z , ’b ’ ) # Obtained by Kramers−Kronigs # BLUE

58 x l ab e l ( ”Frequency (w) ” )

59 y l ab e l ( ”Conductance (G) and Susceptance Values (B) ” )

60 #t i t l e (”Kramers−Kronig Method to f i nd G to B( Simpson ) ”)

61 t i t l e ( ”Kramers−Kronig Method to f i nd Imaginary to Real ( Simpson ) ” )

62 g r id ( )

63 f i g . s a v e f i g ( ”KK Relation ( Simpson ) Imag inary to Rea l . png” , dpi=500)

Listing 4.1: Real Value Data input KK Relationship code

Chapter 4. Conclusion 14

1 from math import ∗

2 from pylab import ∗

3 # Li s t Names

===================================================================

4 X=[]

5 Y=[]

6 Z=[ ]

7 A=[]

8 B=[]

9 E=[]

10 # Reading the Data F i l e s

=======================================================

11 f i n Rea l=open ( ”Experimental−Real Value . dat” , ” r ” )

12 f i n Imag ina ry=open ( ”Experimental−Imaginary Value . dat” , ” r ” )

13 f o r i in f i n Rea l :

14 A. append ( i )

15 f i n Rea l . c l o s e ( )

16 f o r i in f i n Imag ina ry :

17 B. append ( i )

18 f i n Imag ina ry . c l o s e ( )

19 # Condit ions

===================================================================

20 a=0

21 b=len (A)−1

22 N=len (A)

23 h=1

24 # Function To be In t eg ra t ed

====================================================

25 de f f ( i ) :

26 re turn A[ i ]

27 pr in t ”Your Input conta in s : ” , l en (A) , ”data po in t s ”

28 # Theo r i t i c a l Function Input

===================================================

29 de f f 1 ( i ) :

30 re turn B[ i ]

31 # KRAMERS−KRONIGS RELATIONSIP

==================================================

32 de f g (w, x ) :

33 i f x==w:

34 re turn 0

35 e l s e :

Chapter 4. Conclusion 15

36 re turn ( ( 2 . ∗w)/ pi ) ∗ ( ( f l o a t ( f (w) )− f l o a t ( f ( x ) ) ) /(w∗∗2−x∗∗2) )

37 #return −((2.∗w)/ pi ) ∗ ( ( f (w)−f ( x ) ) /(w∗∗2−x∗∗2) )

38 # Main Program [ Simpson In t e g r a t o r]========================================

39 w=0

40 whi le w<=2500:

41 s=0.0

42 X. append (w)

43 Y. append ( f (w) )

44 E. append ( f1 (w) )

45 f o r i in range (1 ,N) :

46 s=s +(2./3) ∗h∗g (w, a+i ∗h)

47 f o r i in range (1 ,N, 2 ) :

48 s=s +(2./3) ∗h∗g (w, a+i ∗h)

49 s=s +(1./3) ∗h∗g (w, a )

50 s=s +(1./3) ∗h∗g (w, b)

51 Z . append ( s )

52 w=w+1

53 # Figure Output

================================================================

54 f i g=f i g u r e ( )

55 p lo t (X,Y, ’ r ’ ) # Function Given to be In t eg ra t ed # RED

56 p lo t (X,E, ’ g ’ ) # Th e i r i t i c a l l y Obtained Curve # Green

57 p lo t (X, Z , ’b ’ ) # Obtained by Kramers−Kronigs # BLUE

58 x l ab e l ( ”Frequency (w) ” )

59 y l ab e l ( ”Conductance (G) and Susceptance Values (B) ” )

60 t i t l e ( ”Kramers−Kronig Method to f i nd Real to Imaginary ( Simpson ) ” )

61 #t i t l e (”Kramers−Kronig Method to f i nd B to G( Simpson ) ”)

62 g r id ( )

63 f i g . s a v e f i g ( ”KK Relation ( Simpson ) Rea l to Imag inary . png” , dpi=500)

Listing 4.2: Imaginary Value Data input KK Relationship code