OP-AMP Optimization CVX
3 views (last 30 days)
Show older comments
Hey all. This is my first post here at MATLAB central. I am trying to run a CVX optimization for a 2 stage opamp. I have used the following document for my equations. Once my script is finished running it returns with a "Status: Failed". Can you please help me with hints or anything. Here is my code:
if true
% code
% Device sizing
clear; clc;
% given variables
mun = 600*(10^-2)^2;
mup = 200*(10^-2)^2;
Vtn = 0.7;
Vtp = -0.9;
lamn = 1/0.03;
lamp = 1/0.06;
Cox = 346*10^-6;
Vomin = 0.1*5;
Vomax = 0.9*5;
Vcmmin = 2.5 - 0.25;
Vcmmax = 2.5 + 0.25;
Vdd = 5;
Vss = 0;
%cvx optimization
cvx_begin gp
variables L1 L2 L3 L4 L5 L6 L7 L8 W1 W2 W3 W4 W5 W6 W7 W8 Ib I5 I7 I1 I2
minimize (5*(Ib+I5+I7));
subject to
%symmetry and matching
W1/W2 == 1;
L1/L2 == 1;
W3/W4 == 1;
L3/L4 == 1;
L5/L7 == 1;
L5/L6 == 1;
%physical size limits
L1 >= 0.8*10^-6;
L2 >= 0.8*10^-6;
L3 >= 0.8*10^-6;
L4 >= 0.8*10^-6;
L5 >= 0.8*10^-6;
L6 >= 0.8*10^-6;
L7 >= 0.8*10^-6;
L8 >= 0.8*10^-6;
W1 >= 2*10^-6;
W2 >= 2*10^-6;
W3 >= 2*10^-6;
W4 >= 2*10^-6;
W5 >= 2*10^-6;
W6 >= 2*10^-6;
W7 >= 2*10^-6;
W8 >= 2*10^-6;
%area limits
L1*W1 + L2*W2 + L3*W3 + L4*W4+ L5*W5 + L6*W6 + L7*W7 <= 10000*(10^-6)^2;
%input offset requirements
(W3/L3)/(W6/L6)== (1/2)*((W5/L5)/(W7/L7));
(W4/L4)/(W6/L6)== (1/2)*((W5/L5)/(W7/L7));
%bias conditions
I5 == (W5*L8*Ib)/(L5*W8);
I7 == (W7*L8*Ib)/(L7*W8);
I1 == I5/2;
%more bias conditions : p
sqrt((I1*L3)/((mun*Cox)/(2*W3))) <= Vcmmin - Vss - Vtp - Vtn;
sqrt((I2*L3)/((mun*Cox)/(2*W3))) <= Vcmmin - Vss - Vtp - Vtn;
sqrt((I1*L1)/((mup*Cox)/(2*W1))) + sqrt((I5*L5)/((mup*Cox)/(2*W5))) <= Vdd-Vcmmax + Vtp;
sqrt((I7*L6)/((mun*Cox)/(2*W6))) <= Vomin - Vss;
sqrt((I7*L7)/((mup*Cox)/(2*W7))) <= Vdd - Vomax;
%small sig tf constraints
Av = (2*Cox)/((lamn+lamp)^2)*sqrt(mun*mup*((W2*W6)/(L2*L6*I1*I7)));
cvx_end
end
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!