-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUntitled2.m
More file actions
47 lines (40 loc) · 1.18 KB
/
Untitled2.m
File metadata and controls
47 lines (40 loc) · 1.18 KB
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
L=820e-9; % H
f=181e6; % Hz
w=2*pi*f; % 1/s
f1=220e6; % Hz
f2=240e6; % Hz
Rohmic=300; % Ohm
C=1/(w^2*L)*1e12 % F
% C=0.82 pF
x=linspace(300,700,1000);
y=sensitivity(f1*2*pi,C,x,5e4,'Rohmic',Rohmic);
yu=sensitivity(f1*2*pi,C+C/20,x,5e4,'Rohmic',Rohmic);
yd=sensitivity(f1*2*pi,C-C/20,x,5e4,'Rohmic',Rohmic);
y1=sensitivity(f2*2*pi,C,x,5e4,'Rohmic',Rohmic);
y1u=sensitivity(f2*2*pi,C+C/20,x,5e4,'Rohmic',Rohmic);
y1d=sensitivity(f2*2*pi,C-C/20,x,5e4,'Rohmic',Rohmic);
figure,plot(x,y,'b',x,y1,'r');
[~,index]=max(yu);
L=1/(w^2*C*e-12)
util.plot.vline(x(index),'b--');
[~,index]=max(yd);
util.plot.vline(x(index),'b--');
[~,index]=max(y1u);
util.plot.vline(x(index),'r--');
[~,index]=max(y1d);
util.plot.vline(x(index),'r--');
[msens,index]=max(y);
L1=x(index);
[msens,index]=max(y1);
L2=x(index);
meanL=mean([L1,L2])
sens1=sensitivity(f1*2*pi,0.9429,meanL,5e4,'Rohmic',Rohmic)
sens2=sensitivity(f2*2*pi,0.9429,meanL,5e4,'Rohmic',Rohmic)
fun=@(x)sensitivity(f1*2*pi,0.9429,x,5e4,'Rohmic',Rohmic)-sensitivity(f2*2*pi,0.9429,x,5e4,'Rohmic',Rohmic);
[optL,~]=fsolve(fun,meanL);
optL
optsens=sensitivity(f1*2*pi,0.9429,optL,5e4)
set(gca,'FontSize',20);
xlabel('L (nH)')
ylabel('sensitivity (V/\Omega)')
%%