Anda di halaman 1dari 18

Travail  BONUS 

Bjelogrlic Nikola and Zaslavski Simon 23rd November 2011

Contents
Introduction 1 Using disposition 1.1 Important value . 1.2 A) using Matlab 1.3 A) Results . . . . 1.4 B) using Matlab 1.5 B) Results . . . . 3

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

4 . 4 . 4 . 8 . 9 . 12 13 13 14 15 18

2 Using T disposition 2.1 Important value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 Global results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Conclusion

Introduction
We solved the problem that has been given to us using Matlab computing and chain-matrix(also called ABCDparameters) we learn about in the section 3.6 of the teaching material. There are two main approches to this problem : One is by assuming the z-sized portions look like this( disposition) :

The second approach would resemble this (T disposition) :

Even though the second way will converge faster and allow us to avoid some precision problems that occured with Matlab using the rst way, we proceeded using both ways as we thought the expected result would probably be the rst one.

Chapter 1

Using disposition
1.1 Important value
Before writing any code, we rst had to nd some important value, as Z, Y, the chain-matrix parameters and Zc of the line. Z, Y and Zc have quite obvious formula : Z = jLs z (1.1)
Y = jCp z Zc = Ztot /Ytot = jLs d/jCp d = Ls /Cp = 50

(1.2) (1.3) (1.4) (1.5)

The rst forumla of the 3.6 section of the teaching material we will use is:
U2 = c11 U1 + c12 I1 I2 = c21 U1 + c22 I1

We can see that :


U2 = U1 Z I1

(1.6) (1.7) (1.8)

and that :
I2 + I1 = (U1 Z I1 ) Y I2 = Y U1 + (Y Z + 1) I1

So the chain-matrix is :
C=

1 Y

Z 1+YZ

1.2

A) using Matlab

Here is the Matlab function we use to get the lineimpendency from Ls, Cp, d, N and the frequence in an open circuit (ZL = +) :

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22

% Function line input impedance ( open line case ) % TRAVAIL " BONUS " 23.11.2011 % Nikola Bjelogrlic & Simon Zaslavski function ZIN = LineImpedance4open ( Ls , Cp , d , N , f ) % This function calculates input impedance for open lossless line % with line parameters Ls and Cp , and length d . % N is required number of line segments and f the frequency . delta_z = d / N ; omega = 2* pi * f ; % delta ( z ) is the length of each segment [ m ] % omega [ rad ]

Z = omega * Ls * delta_z * j ; % Impedance of each segment [ ohm ] Y = omega * Cp * delta_z * j ; % Admittance of each segment [ siemens ] % Chain matrix for each segment Cseg = [ 1 -Z ) % eq .3.6: U2 = c11 * U1 + c12 * I1 -Y 1+ Z * Y ]; % - I2 = c21 * U1 + c22 * I1 % Calculate equivalent chain matrix for all segmets Cd = Cseg ^ N ; % eq .3.6.3: C ( d ) = C ( dz )^ N % Calculate equivalent impedance of open line , i . e . with load --> + oo ZIN = - Cd (1 ,1)/ Cd (2 ,1); % Equivalent input impedance Zin = U2 / I2 [ ohm ]

Here is the Matlab function we use to get the lineimpendency from Ls, Cp, d, N and the frequence in an closed circuit (ZL = ZC ) :

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

% Function line input impedance % TRAVAIL " BONUS " 23.11.2011 % Nikola Bjelogrlic & Simon Zaslavski function ZIN = LineImpedance ( Ls , Cp , d , N , f , ZL ) % This function calculates input impedance of lossless line % with line parameters Ls and Cp , and length d . % N is required number of line segments , f the frequency % and ZL the load impedance . delta_z = d / N ; omega = 2* pi * f ; % delta ( z ) is the length of each segment [ m ] % omega [ rad ]

Z = omega * Ls * delta_z * j ; % Impedance of each segment [ ohm ] Y = omega * Cp * delta_z * j ; % Admittance of each segment [ siemens ] % Chain matrix for each segment Cseg = [ 1 -Z % eq .3.6: U2 = c11 * U1 + c12 * I1 -Y 1+ Z * Y ]; % - I2 = c21 * U1 + c22 * I1 % Calculate equivalent chain matrix for all segmets Cd = Cseg ^ N ; % eq .3.6.3: C ( d ) = C ( dz )^ N % Connect load and calculate equivalent impedance for line with load ZL ZIN = ( Cd (1 ,1)* ZL - Cd (1 ,2))/... ( Cd (2 ,2) - Cd (2 ,1)* ZL ); % Equivalent input impedance Zin = U2 / I2 [ ohm ]

Here is the Matlab script we used to initialise the values and call the function for every N from 0 to 1000, plot them, and write them in Matlab:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54

% Main matlab code for A ) % TRAVAIL " BONUS " 23.11.2011 % Nikola Bjelogrlic & Simon Zaslavski close all ; clear all ; % data Ls =250 e -9; % Line inductance [ H / m ] Cp =100 e -12; % Line capacitance [ F / m ] d =0.1; % Line length [ m ] % From eq .2.2.2 & eq .2.2.3 & eq .2.3.5: Zc = sqrt ( Ls / Cp ); % Caracteristic impedance [ ohm ] f1 =500 e6 ; f2 =1 e9 ; ZL2 = Zc ; % Parameter N =1000; % Frequency [ Hz ] for the first case % Frequency [ Hz ] for the second case % Load impedance [ ohm ] for different cases % Maximal number of segments to process for graphs

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Calculate input impedance for the first case % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %%%% Segmentation method approach %%%%%%%%%%%%%%%%%%%%%%%%%%%% Zeq = zeros (1 , N ); for n =1:1: N % Segmentation approach Zeq ( n ) = LineImpedance4open ( Ls , Cp ,d ,n , f1 ); f1 n Zeq ( n ) end % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %%%% Differential equiation approach %%%%%%%%%%%%%%%%%%%%%%%%% omega = 2* pi * f1 ; % Angular velocity [ rad ] Zp = omega * Ls * j ; % Impedance lineique [ ohm / m ] Yp = omega * Cp * j ; % Conductance lineique [( ohm * m )^( -1)] gamma = sqrt ( Zp * Yp ); % From eq .2.3.2 : Exposant de propagation [ m ^( -1)] C = [ cosh ( gamma * d ) - Zc * sinh ( gamma * d ) % From eq .3.6.2 - sinh ( gamma * d )/ Zc cosh ( gamma * d )]; % Calculate equivalent impedance for open line , i . e . with load --> + oo Zeq1 = - C (1 ,1)/ C (2 ,1); % Equivalent impedance Zeq = U2 / I2 [ ohm ] % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% figure (1); subplot (2 , 1 , 1); semilogx ( real ( Zeq ) , 'r ' , ' LineWidth ' ,2); grid on ; hold on ; plot (N , real ( Zeq1 ) , ' - mo ' , ' LineWidth ' ,2 , ' MarkerEdgeColor ' , 'k ' ,... ' MarkerFaceColor ' ,[.6 1 .5] , ' MarkerSize ' ,8) hold off ; xlabel ( ' Number of segments ' ); ylabel ( ' Real part [ \ Omega ] ' ); title ([ ' Equivalent Impedance for : ' MHz and load = + oo ' ]); frequency = ' , num2str ( f1 /1 e6 ) ,...

55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106

subplot (2 , 1 , 2); semilogx ( imag ( Zeq ) , 'b ' , ' LineWidth ' ,2); grid on ; hold on ; plot (N , imag ( Zeq1 ) , ' - mo ' , ' LineWidth ' ,2 , ' MarkerEdgeColor ' , 'k ' ,... ' MarkerFaceColor ' ,[.5 1 .5] , ' MarkerSize ' ,8) hold off ; xlabel ( ' Number of segments ' ); ylabel ( ' Imaginary part [ \ Omega ] ' ); % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Calculate input impedance for the second case % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %%%% Segmentation method approach %%%%%%%%%%%%%%%%%%%%%%%%%%%% Zeq = zeros (1 , N ); for n =1:1: N % Segmentation approach Zeq ( n ) = LineImpedance ( Ls , Cp ,d ,n , f2 , ZL2 ); f2 n Zeq ( n ) end % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %%%% Differential equiation approach %%%%%%%%%%%%%%%%%%%%%%%%% omega = 2* pi * f2 ; % Angular velocity [ rad ] Zp = omega * Ls * j ; % Impedance lineique [ ohm / m ] Yp = omega * Cp * j ; % Conductance lineique [( ohm * m )^( -1)] gamma = sqrt ( Zp * Yp ); % From eq .2.3.2 : Exposant de propagation [ m ^( -1)] C = [ cosh ( gamma * d ) - Zc * sinh ( gamma * d ) % From eq .3.6.2 - sinh ( gamma * d )/ Zc cosh ( gamma * d )]; % Connect load and calculate equivalent impedance of line with load ZL Zeq1 =( C (1 ,1)* ZL2 - C (1 ,2))/... ( C (2 ,2) - C (2 ,1)* ZL2 ); % Equivalent impedance Zeq = U2 / I2 [ ohm ] % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% figure (2); subplot (2 , 1 , 1); semilogx ( real ( Zeq ) , 'r ' , ' LineWidth ' ,2); grid on ; hold on ; plot (N , real ( Zeq1 ) , ' - mo ' , ' LineWidth ' ,2 , ' MarkerEdgeColor ' , 'k ' ,... ' MarkerFaceColor ' ,[.6 1 .5] , ' MarkerSize ' ,8) hold off ; xlabel ( ' Number of segments ' ); ylabel ( ' Real part [ \ Omega ] ' ); title ([ ' Equivalent Impedance for : frequency = ' , num2str ( f2 /1 e6 ) ,... ' MHz and load = ' , num2str ( ZL2 ) , ' \ Omega ' ]); subplot (2 , 1 , 2); semilogx ( imag ( Zeq ) , 'b ' , ' LineWidth ' ,2); grid on ; hold on ; plot (N , imag ( Zeq1 ) , ' - mo ' , ' LineWidth ' ,2 , ' MarkerEdgeColor ' , 'k ' ,... ' MarkerFaceColor ' ,[.5 1 .5] , ' MarkerSize ' ,8) hold off ; xlabel ( ' Number of segments ' ); ylabel ( ' Imaginary part [ \ Omega ] ' );

1.3

A) Results

Here are the expected results : 0 -31830j 0.5647 -17.5099j And here are plots :
f = 500M Hz et ZL = f = 1GHz et ZL = ZC N =1

0 -17.6352j 78.4045 +66.3865j

N =2

0 -12.1961j 60.8723 +2.3644j

N =3

0 -3.5033j 50.2082 +0.0028j

N = 10

N = 100

0 -0.3919j 50.0002 +0j

0 -0.0393j 50.0000 +0j

N =

Green dots are theorical values we should get.

1.4
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56

B) using Matlab

Here is the script we used to generate plots :


% Main matlab code for B ) ( figures ) % TRAVAIL " BONUS " 23.11.2011 % Nikola Bjelogrlic & Simon Zaslavski close all ; clear all ; % data Ls =250 e -9; % Line inductance [ H / m ] Cp =100 e -12; % Line capacitance [ F / m ] d =0.1; % Line length [ m ] % From eq .2.2.2 & eq .2.2.3 & eq .2.3.5: Zc = sqrt ( Ls / Cp ); % Caracteristic impedance [ ohm ] ZL =0; % Load impedance [ ohm ]

% Parameter N =100; % Number of segments to process idx =0; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Calculate and plot input impedance % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% for f =1 e6 :1 e6 :2 e9 % Frequencies [ Hz ] idx = idx +1; % %%%% Segmentation method approach %%%%%%%%%%%%%%%%%%%%%%%%%%%% Zeq ( idx ) = LineImpedance ( Ls , Cp ,d ,N ,f , ZL ); % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %%%% Differential equiation approach %%%%%%%%%%%%%%%%%%%%%%%%% omega = 2* pi * f ; % Angular velocity [ rad ] Zp = omega * Ls * j ; % Impedance lineique [ ohm / m ] Yp = omega * Cp * j ; % Conductance lineique [( ohm * m )^( -1)] gamma = sqrt ( Zp * Yp ); % From eq .2.3.2 : Exposant de propagation [ m ^( -1)] C = [ cosh ( gamma * d ) - Zc * sinh ( gamma * d ) % From eq .3.6.2 - sinh ( gamma * d )/ Zc cosh ( gamma * d )]; % Connect load and calculate equivalent impedance of line with load ZL Zeq1 ( idx )=( C (1 ,1)* ZL - C (1 ,2))/... ( C (2 ,2) - C (2 ,1)* ZL ); % Equivalent impedance Zeq = U2 / I2 [ ohm ] % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

end

% %%%% Segmentation method approach (100 segments ) %%%%%%%%%%%%%%%%% figure (1); subplot (2 , 1 , 1); plot ( real ( Zeq ) , 'r ' , ' LineWidth ' ,2); grid on ; hold on ; % plot (N , real ( Zeq1 ) , ' - mo ' , ' LineWidth ' ,2 , ' MarkerEdgeColor ' , 'k ' ,... % ' MarkerFaceColor ' ,[.6 1 .5] , ' MarkerSize ' ,8) hold off ; xlabel ( ' Frequency [ MHz ] ' ); ylabel ( ' Real part [ \ Omega ] ' ); title ({[ ' Equivalent Impedance for : diferent frequencies and load = ' ,... num2str ( ZL ) , ' \ Omega ' ] ,... [ ' Segmentation method approach (100 segments ) ' ]}); subplot (2 , 1 , 2); plot ( imag ( Zeq ) , 'b ' , ' LineWidth ' ,2);

57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79

% semilogy ( imag ( Zeq ) , 'b ' , ' LineWidth ' ,2); grid on ; hold on ; % plot (N , imag ( Zeq1 ) , ' - mo ' , ' LineWidth ' ,2 , ' MarkerEdgeColor ' , 'k ' ,... % ' MarkerFaceColor ' ,[.5 1 .5] , ' MarkerSize ' ,8) hold off ; xlabel ( ' Frequency [ MHz ] ' ); ylabel ( ' Imaginary part [ \ Omega ] ' ); % %%%% Differential equiation approach %%%%%%%%%%%%%%%%%%%%%%%%% figure (2); subplot (2 , 1 , 1); plot ( real ( Zeq1 ) , 'r ' , ' LineWidth ' ,2); grid on ; hold on ; xlabel ( ' Frequency [ MHz ] ' ); ylabel ( ' Real part [ \ Omega ] ' ); title ({[ ' Equivalent Impedance for : diferent frequencies and load = ' ,... num2str ( ZL ) , ' \ Omega ' ] ,... [ ' Differential equiation approach ' ]}); subplot (2 , 1 , 2); plot ( imag ( Zeq1 ) , 'b ' , ' LineWidth ' ,2); % semilogy ( imag ( Zeq ) , 'b ' , ' LineWidth ' ,2); grid on ; hold on ; xlabel ( ' Frequency [ MHz ] ' ); ylabel ( ' Imaginary part [ \ Omega ] ' );

And here is the one we used to complete the tables :

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

% Main matlab code for B ) ( results for table ) % TRAVAIL " BONUS " 23.11.2011 % Nikola Bjelogrlic & Simon Zaslavski close all ; clear all ; % data Ls =250 e -9; % Line inductance [ H / m ] Cp =100 e -12; % Line capacitance [ F / m ] d =0.1; % Line length [ m ] % From eq .2.2.2 & eq .2.2.3 & eq .2.3.5: Zc = sqrt ( Ls / Cp ); % Caracteristic impedance [ ohm ] ZL =0; % Load impedance [ ohm ]

% Parameter N =100; % Number of segments to process idx =0; % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Calculate and plot input impedance % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% for f =250 e6 :250 e6 :2 e9 % Frequencies [ Hz ] f % %%%% Segmentation method approach %%%%%%%%%%%%%%%%%%%%%%%%%%%% Zeq = LineImpedance ( Ls , Cp ,d ,N ,f , ZL )

10

26 27 28 29 30 31 32 33 34 35 36 37 38 39

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %%%% Differential equiation approach %%%%%%%%%%%%%%%%%%%%%%%%% omega = 2* pi * f ; % Angular velocity [ rad ] Zp = omega * Ls * j ; % Impedance lineique [ ohm / m ] Yp = omega * Cp * j ; % Conductance lineique [( ohm * m )^( -1)] gamma = sqrt ( Zp * Yp ); % From eq .2.3.2 : Exposant de propagation [ m ^( -1)] C = [ cosh ( gamma * d ) - Zc * sinh ( gamma * d ) % From eq .3.6.2 - sinh ( gamma * d )/ Zc cosh ( gamma * d )]; % Connect load and calculate equivalent impedance of line with load ZL Zeq1 =( C (1 ,1)* ZL - C (1 ,2))/... ( C (2 ,2) - C (2 ,1)* ZL ) % Equivalent impedance Zeq = U2 / I2 [ ohm ] % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

end

11

1.5

B) Results

We acvhieved the following results : For segmentational way of solving it and for the dierential approch : 250MHz 500MHz 0 0 +50.1977j -6.3531e+003j ZIN dif f 0 0 +50.0000i +8.1656e+017j And here are the plots :
ZIN seg

1GHz 0 +0.0065j 0 -6.1232e-015j

1.5GHz 0 -2.0835e+003j 0 +2.7219e+017j

2GHz 0 +0.0517j 0 -1.2246e-014j

12

Chapter 2

Using T disposition
2.1 Important value
As for the rst way, we'll rst provide some maths : Z, Y and Zc have the same obvious formula :
Z = jLs z Y = jCp z Zc = Ztot /Ytot = jLs d/jCp d = Ls /Cp = 50

(2.1) (2.2) (2.3) (2.4) (2.5)

The rst forumla of the 3.6 section of the teaching material we will use is:
U2 = c11 U1 + c12 I1 I2 = c21 U1 + c22 I1

We can see that :


I2 = Y (U1 Z Y Z I1 ) I1 = Y U1 ( + 1) I1 2 2 Y Z = I2 = Y U1 + ( + 1) I1 2 Z Z Y Z Y Z + I2 = ( + 1) U1 Z ( + 1) I1 2 2 2 4 Y Z 2 +1 C= Y Y Z Z ( + 1) 4 Y Z +1 2

(2.6) (2.7)

And that :
U2 = U1 I1

(2.8)

So the chain-matrix is :

(2.9)

13

2.2

Changes

There is just a few modication in the rest of the work, that's why we decided not to give you all the function over again. The diference in the way of doing is just changing
1 2 3

% Chain matrix for each segment Cseg = [ 1 -Z ) % eq .3.6: U2 = c11 * U1 + c12 * I1 -Y 1+ Z * Y ]; % - I2 = c21 * U1 + c22 * I1

to :
1 2 3

% Chain matrix for each segment Cseg = [ 1+ ZY2 -Z *(1+ ZY2 /2) % eq .3.6: U2 = c11 * U1 + c12 * I1 -Y 1+ ZY2 ]; % - I2 = c21 * U1 + c22 * I1

In LineImpedance4open and LineImpedance Matlab function and those value in the b section too. It's obvious that this way would give the same analytic value for N +, so the solution we get this way aren't false. As shown in the next result part, the T way gives us faster result and avoid some numerical "mistake" made by matlab(in T case, c12/c11 is much bigger than in the case, and that avoid some inaccuracy.

14

2.3

Global results
0 +7.4389j 1.9722 +60.1542j
N =1

f = 500M Hz Results for A) : et ZL = f = 1GHz et ZL = ZC

0 +1.9998j 37.5233 -15.1375j

N =2

0 +0.8938j 49.4967 -2.5780j

N =3

0 +0.0807j 49.9998 -0.0163j

N = 10

0 +8.0745e-004j 50.0000 +0j

N = 100

0 +8.0746e-006j 50.0000 +0j

N =

And here are plots :

Green dots are theorical values we should get.

15

Results for B) : 250MHz ZIN seg 0 +49.9998j ZIN dif f 0 +50.0000i

500MHz 0 -3.0960e+006j 0 +8.1656e+017j

1GHz 0 +0.0065j 0 -6.1232e-015j

1.5GHz 0 -1.1461e+005j 0 +2.7219e+017j

2GHz 0 +0.0517j 0 -1.2246e-014j

And here are the plots :

16

17

Conclusion
There is still some numerical problems(most important one : imaginary value are often negative when they should be positiv and positiv when they should be negative). Those errors comes from cropping made by matlab and we didn't nd a way to avoid this to happen. Nevertheless we achived the results we wanted to.

The matlab code can be downloaded at this adresse : http://tinyurl.com/cokep7q

18

Anda mungkin juga menyukai