-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsb_nleq.m
36 lines (35 loc) · 1.18 KB
/
sb_nleq.m
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
function [in, jacobian] = sb_nleq(vn)
%Non-linear elements parameters
paramName.Is = 5.011e-15;
paramName.betaF = 1122;
paramName.betaR = 1.271;
paramName.Vt = 26e-3;
%BJT currents
IName1 = -paramName.Is/paramName.betaF*(exp( vn(1)/paramName.Vt ) ...
-1) - paramName.Is/paramName.betaR* (exp( (vn(1)-vn(2) ...
)/paramName.Vt ) - 1);
IName2 = -paramName.Is* (exp( vn(1)/paramName.Vt )-1) + ...
paramName.Is*(paramName.betaR+1)/paramName.betaR*(exp( (vn(1)- ...
vn(2))/paramName.Vt ) - 1);
%BJT jacobian
dIName1dVName1 = -paramName.Is/paramName.betaF/paramName.Vt* ...
exp( vn(1) /paramName.Vt ) - paramName.Is/ ...
paramName.betaR/paramName.Vt* exp( (vn(1)-vn(2))/ ...
paramName.Vt );
dIName1dVName2 = paramName.Is/paramName.betaR/paramName.Vt* ...
exp( (vn(1)-vn(2)) /paramName.Vt );
dIName2dVName1 = -paramName.Is/paramName.Vt* exp( ...
vn(1) /paramName.Vt ) + paramName.Is*(paramName.betaR ...
+1)/paramName.betaR/paramName.Vt* exp( (vn(1)-vn(2))/paramName. ...
Vt ) ;
dIName2dVName2 = -paramName.Is*(paramName.betaR+1)/paramName.betaR/ ...
paramName.Vt* exp( (vn(1)-vn(2)) /paramName.Vt );
in = [...
IName1
IName2
];
jacobian = [...
dIName1dVName1 dIName1dVName2;...
dIName2dVName1 dIName2dVName2 ...
];
end