# Minimization of losses of dc-dc boost converter

(mehmet) #1

Hello, I try to optimization of boost converter. Goal function is sum of losses of all materials in boost converter circuit. Although I made effort too much. But I did’nt solve the problem : Disciplined convex programming error:
Cannot perform the operation: {real affine} .* {log-convex}
Before I had this problem, I applied monomial approximation to goal function.
Goal Function:
minimize(fs2/1000000 + (2361183241434823Vcfs)/47223664828696452136960 + (9Io)/(2Vc) + (375Io^2 + 60Io + 13)^2/(7200000fs^2) + (375Io2^2 + 60Io2 + 13)^2/(720000fs2^2) + (89Io^2Vc^2)/25000 + (178Io2^2)/(5Vc^2) + 89/(480L2^2fs2^2) + (9Io2Vc)/200 + (89Vc^2)/(192000L^2fs^2) + (191Io2fs2)/(25000000Vc) + (417743823682484117IoVc^(191/91)fs)/144115188075855872000000000 + (13exp(-((50000log(Vc) - 7911622136533237/68719476736)(144Io2^2L2^2fs2^2 + 25))/(50000(48Io2^2L2^2fs2^2 + 25)))(48Io2^2L2^2fs2^2 + 25))/(60000L2^2fs2^2) + (13Vc^3*(192Io^2L^2fs^2 + 25))/(240000000L^2fs^2)) %simplified
subject to:
0.1
10^-6<=L<=1010^-3; % Lmin<=L<=Lmax
0.1
10^-6<=C<=10010^-6; % Cmin<=C<=Cmax
10
10^3<=fs<=800*10^3; % FSmin<=FS<=FSmax

``````-(Vi*exp(-(Vi*(1125899906842624*log(Vc) - 2592480341699211))/(1125899906842624*(Vi - 10)))*(Vi - 10))/(10*L*fs)<=(0.15*Io);
-(exp(-(Vi*(1125899906842624*log(Vc) - 2592480341699211))/(1125899906842624*(Vi - 10)))*(Vi - 10))/(10*C*Rload*fs)<=(0.01);
L*fs>=-(Vi^2*exp(-(2*(log(Vc) - 2592480341699211/1125899906842624)*(Vi - 5))/(Vi - 10))*(Vi - 10))/(200*Io);
(Vi*exp(2592480341699211/1125899906842624))/(10*Vc*(C*L)^(1/2))>=(2*pi*a*fs);

0.1*10^-6<=L2<=10*10^-3;                                                                                          % L2min<=L2<=L2max
0.1*10^-6<=C2<=100*10^-6;                                                                                         % C2min<=C2<=C2max
10*10^3<=fs2<=800*10^3;                                                                                           % FS2min<=FS2<=FS2max

5/(Io2*L2*fs2) <= 3/20

exp(2592480341699211/1125899906842624)/(C2*Vc*fs2) <= 2/5

(5*Vc*exp(-2592480341699211/1125899906842624))/(4*Io2) <= L2*fs2

(pi*fs2)/500 <= Vc/(20*(C2*L2)^(1/2))

(5*L2)/(Vc*(C2*L2)^(1/2)) <= 1
``````

cvx_end

(mehmet) #2

Sorry. Assigned parameters by me and variables :

a=0.001;
Rc=0.05;
Rc2=0.05;
RL=0.089;
RL2=0.089;
%Io=2
Tswon=10^-8;
Tswoff=10^-8;
Tswon2=10^-8;
Tswoff2=10^-8;
%Vc=10
Vc2=20;
Vf=0.9;
Vf2=0.9;
Vi=5;
delta_ic=0.1;
Rds=5.210^-3;
Rds2=5.2
10^-3;
Qrrsch=5010^-9;
Qrrsch2=50
10^-9;
Qrrdb=25*10^-8;

variables L C fs Vc Io L2 C2 fs2 Io2

(Mark L. Stone) #3

Can you please provide a complete reproducible example, with no missing lines of code (I don’t even see cvx_begin). Use the Preformnatted text icon to apply to the entire code. Indicate which line of code the error message occurs at.

(Michael C. Grant) #4

@Mark_L_Stone from now on I am going to mark as “Nonconvex” any question involving DCP errors that make no attempt at all to show that the problem is actually convex and/or could satisfy the rules outlined in the FAQ—even if it is (and I doubt it is in this case).

@myazagan please read the FAQ. You would not attempted to enter the problem as written if you had.

(mehmet) #5

clear all
close all

a=0.001;
Rc=0.05;
Rc2=0.05;
RL=0.089;
RL2=0.089;
%Io=2
Tswon=10^-8;
Tswoff=10^-8;
Tswon2=10^-8;
Tswoff2=10^-8;
%Vc=10
Vc2=20;
Vf=0.9;
Vf2=0.9;
Vi=5;
delta_ic=0.1;
Rds=5.210^-3;
Rds2=5.2
10^-3;
Qrrsch=5010^-9;
Qrrsch2=50
10^-9;
Qrrdb=25*10^-8;

%%%%%%%%%%%%%%%%%%%%%%%%%% CVX PROGRAMI %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
cvx_begin gp

``````variables L C fs Vc Io L2 C2 fs2 Io2

%minimize((2361183241434823*Vc*fs*exp(-2592480341699211/1125899906842624))/4722366482869645213696+(9*Io*exp(2592480341699211/1125899906842624))/(20*Vc)+(375*Io^2 + 60*Io + 13)^2/(7200000*fs^2)+(89*Io^2*Vc^2*exp(-2592480341699211/562949953421312))/250+(91*Io*Vc^(191/91)*fs*exp(-2720679919035985/562949953421312))/250000000+(89*Vc^2*exp(-2592480341699211/562949953421312))/(1920*L^2*fs^2)+(13*Vc^3*exp(-7777441025097633/1125899906842624)*(192*Io^2*L^2*fs^2 + 25))/(240000*L^2*fs^2)+fs2/1000000+(13*exp(-((50000*log(Vc) - 8101501067810034375/70368744177664)*(144*Io2^2*L2^2*fs2^2 + 25))/(50000*(48*Io2^2*L2^2*fs2^2 + 25)))*(48*Io2^2*L2^2*fs2^2 + 25))/(60000*L2^2*fs2^2)+(375*Io2^2 + 60*Io2 + 13)^2/(720000*fs2^2)+(89*Io2^2*exp(2592480341699211/562949953421312))/(250*Vc^2)+(9*Io2*Vc*exp(-2592480341699211/1125899906842624))/20+(191*Io2*fs2*exp(2592480341699211/1125899906842624))/(250000000*Vc)+89/(480*L2^2*fs2^2))%Monomial Aprrx Yapılmış
minimize(fs2/1000000 + (2361183241434823*Vc*fs)/47223664828696452136960 + (9*Io)/(2*Vc) + (375*Io^2 + 60*Io + 13)^2/(7200000*fs^2) + (375*Io2^2 + 60*Io2 + 13)^2/(720000*fs2^2) + (89*Io^2*Vc^2)/25000 + (178*Io2^2)/(5*Vc^2) + 89/(480*L2^2*fs2^2) + (9*Io2*Vc)/200 + (89*Vc^2)/(192000*L^2*fs^2) + (191*Io2*fs2)/(25000000*Vc) + (417743823682484117*Io*Vc^(191/91)*fs)/144115188075855872000000000 + (13*exp(-((50000*log(10) - 7911622136533237/68719476736)*(144*Io2^2*L2^2*fs2^2 + 25))/(50000*(48*Io2^2*L2^2*fs2^2 + 25)))*(48*Io2^2*L2^2*fs2^2 + 25))/(60000*L2^2*fs2^2) + (13*Vc^3*(192*Io^2*L^2*fs^2 + 25))/(240000000*L^2*fs^2))%simplify edilmiş
``````

subject to
%%%%%%%%%%%%%%%%%%%%%%% KAT-1 KISITLAMAR %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0.110^-6<=L<=1010^-3; % Lmin<=L<=Lmax
0.110^-6<=C<=10010^-6; % Cmin<=C<=Cmax
1010^3<=fs<=80010^3; % FSmin<=FS<=FSmax

``````-(Vi*exp(-(Vi*(1125899906842624*log(Vc) - 2592480341699211))/(1125899906842624*(Vi - 10)))*(Vi - 10))/(10*L*fs)<=(0.15*Io);
-(exp(-(Vi*(1125899906842624*log(Vc) - 2592480341699211))/(1125899906842624*(Vi - 10)))*(Vi - 10))/(10*C*Rload*fs)<=(0.01);
L*fs>=-(Vi^2*exp(-(2*(log(Vc) - 2592480341699211/1125899906842624)*(Vi - 5))/(Vi - 10))*(Vi - 10))/(200*Io);
(Vi*exp(2592480341699211/1125899906842624))/(10*Vc*(C*L)^(1/2))>=(2*pi*a*fs);
``````

%%%%%%%%%%%%%%%%%%%%%%% KAT-2 KISITLAMAR %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

``````  0.1*10^-6<=L2<=10*10^-3;                                                                                          % L2min<=L2<=L2max
0.1*10^-6<=C2<=100*10^-6;                                                                                         % C2min<=C2<=C2max
10*10^3<=fs2<=800*10^3;                                                                                           % FS2min<=FS2<=FS2max

%(10*exp(((log(Vc) - 2592480341699211/1125899906842624)*(Vc2 - 20))/(Vc2 - 10))*(Vc2 - 10))/(Io2*L2*Vc2*fs2)<=0.15   %monomial yapılmış (1)
5/(Io2*L2*fs2) <= 3/20

%(exp(-(10*(log(Vc) - 2592480341699211/1125899906842624))/(Vc2 - 10))*(Vc2 - 10))/(C2*Rload2*Vc2*fs2)<=0.01          %monomial yapılmış (2)
exp(2592480341699211/1125899906842624)/(C2*Vc*fs2) <= 2/5

%L2*fs2>=(50*exp((2*(log(Vc) - 2592480341699211/1125899906842624)*(Vc2 - 15))/(Vc2 - 10))*(Vc2 - 10))/(Io2*Vc2^2)    %monomial yapılmış (3)
(5*Vc*exp(-2592480341699211/1125899906842624))/(4*Io2) <= L2*fs2

%(10*Vc*exp(-2592480341699211/1125899906842624))/(Vc2*(C2*L2)^(1/2))>=(2*pi*a*fs2);                                  %monomial yapılmış (4)
(pi*fs2)/500 <= Vc/(20*(C2*L2)^(1/2))

(5*L2)/(Vc*(C2*L2)^(1/2)) <= 1
``````

cvx_end

(mehmet) #6

For the first time in this form an I am new

(mehmet) #7

The error line “minimize()”. If you help me, I will be happy. Thank you.

(Mark L. Stone) #8

The whole program ran for me without warning message or error message, with the result that the problem is infeasible. (For the technically inclined, I got the same result both with and without CVXQUAD’s version of exponential.m)

What is the output from
`cvx_version`

(mehmet) #9

Program has already run in this case. But the problematic part of the purpose function is given below:
(13exp(-((50000log(10) - 7911622136533237/68719476736)
Could you convert inside of logaritmic function to Vc. That is ,Could you run in this case ?(13exp(-((50000log(Vc) - 7911622136533237/68719476736)

(mehmet) #10

clear all
close all

a=0.001;
Rc=0.05;
Rc2=0.05;
RL=0.089;
RL2=0.089;
%Io=2
Tswon=10^-8;
Tswoff=10^-8;
Tswon2=10^-8;
Tswoff2=10^-8;
%Vc=10
Vc2=20;
Vf=0.9;
Vf2=0.9;
Vi=5;
delta_ic=0.1;
Rds=5.210^-3;
Rds2=5.2
10^-3;
Qrrsch=5010^-9;
Qrrsch2=50
10^-9;
Qrrdb=25*10^-8;

%%%%%%%%%%%%%%%%%%%%%%%%%% CVX PROGRAMI %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
cvx_begin gp

``````variables L C fs Vc Io L2 C2 fs2 Io2

%minimize((2361183241434823*Vc*fs*exp(-2592480341699211/1125899906842624))/4722366482869645213696+(9*Io*exp(2592480341699211/1125899906842624))/(20*Vc)+(375*Io^2 + 60*Io + 13)^2/(7200000*fs^2)+(89*Io^2*Vc^2*exp(-2592480341699211/562949953421312))/250+(91*Io*Vc^(191/91)*fs*exp(-2720679919035985/562949953421312))/250000000+(89*Vc^2*exp(-2592480341699211/562949953421312))/(1920*L^2*fs^2)+(13*Vc^3*exp(-7777441025097633/1125899906842624)*(192*Io^2*L^2*fs^2 + 25))/(240000*L^2*fs^2)+fs2/1000000+(13*exp(-((50000*log(Vc) - 8101501067810034375/70368744177664)*(144*Io2^2*L2^2*fs2^2 + 25))/(50000*(48*Io2^2*L2^2*fs2^2 + 25)))*(48*Io2^2*L2^2*fs2^2 + 25))/(60000*L2^2*fs2^2)+(375*Io2^2 + 60*Io2 + 13)^2/(720000*fs2^2)+(89*Io2^2*exp(2592480341699211/562949953421312))/(250*Vc^2)+(9*Io2*Vc*exp(-2592480341699211/1125899906842624))/20+(191*Io2*fs2*exp(2592480341699211/1125899906842624))/(250000000*Vc)+89/(480*L2^2*fs2^2))%Monomial Aprrx Yapılmış
minimize(fs2/1000000 + (2361183241434823*Vc*fs)/47223664828696452136960 + (9*Io)/(2*Vc) + (375*Io^2 + 60*Io + 13)^2/(7200000*fs^2) + (375*Io2^2 + 60*Io2 + 13)^2/(720000*fs2^2) + (89*Io^2*Vc^2)/25000 + (178*Io2^2)/(5*Vc^2) + 89/(480*L2^2*fs2^2) + (9*Io2*Vc)/200 + (89*Vc^2)/(192000*L^2*fs^2) + (191*Io2*fs2)/(25000000*Vc) + (417743823682484117*Io*Vc^(191/91)*fs)/144115188075855872000000000 + (13*exp(-((50000*log(Vc) - 7911622136533237/68719476736)*(144*Io2^2*L2^2*fs2^2 + 25))/(50000*(48*Io2^2*L2^2*fs2^2 + 25)))*(48*Io2^2*L2^2*fs2^2 + 25))/(60000*L2^2*fs2^2) + (13*Vc^3*(192*Io^2*L^2*fs^2 + 25))/(240000000*L^2*fs^2))%simplify edilmiş
``````

subject to
%%%%%%%%%%%%%%%%%%%%%%% KAT-1 KISITLAMAR %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0.110^-6<=L<=1010^-3; % Lmin<=L<=Lmax
0.110^-6<=C<=10010^-6; % Cmin<=C<=Cmax
1010^3<=fs<=80010^3; % FSmin<=FS<=FSmax

``````-(Vi*exp(-(Vi*(1125899906842624*log(Vc) - 2592480341699211))/(1125899906842624*(Vi - 10)))*(Vi - 10))/(10*L*fs)<=(0.15*Io);
-(exp(-(Vi*(1125899906842624*log(Vc) - 2592480341699211))/(1125899906842624*(Vi - 10)))*(Vi - 10))/(10*C*Rload*fs)<=(0.01);
L*fs>=-(Vi^2*exp(-(2*(log(Vc) - 2592480341699211/1125899906842624)*(Vi - 5))/(Vi - 10))*(Vi - 10))/(200*Io);
(Vi*exp(2592480341699211/1125899906842624))/(10*Vc*(C*L)^(1/2))>=(2*pi*a*fs);
``````

%%%%%%%%%%%%%%%%%%%%%%% KAT-2 KISITLAMAR %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

``````  0.1*10^-6<=L2<=10*10^-3;                                                                                          % L2min<=L2<=L2max
0.1*10^-6<=C2<=100*10^-6;                                                                                         % C2min<=C2<=C2max
10*10^3<=fs2<=800*10^3;                                                                                           % FS2min<=FS2<=FS2max

%(10*exp(((log(Vc) - 2592480341699211/1125899906842624)*(Vc2 - 20))/(Vc2 - 10))*(Vc2 - 10))/(Io2*L2*Vc2*fs2)<=0.15   %monomial yapılmış (1)
5/(Io2*L2*fs2) <= 3/20

%(exp(-(10*(log(Vc) - 2592480341699211/1125899906842624))/(Vc2 - 10))*(Vc2 - 10))/(C2*Rload2*Vc2*fs2)<=0.01          %monomial yapılmış (2)
exp(2592480341699211/1125899906842624)/(C2*Vc*fs2) <= 2/5

%L2*fs2>=(50*exp((2*(log(Vc) - 2592480341699211/1125899906842624)*(Vc2 - 15))/(Vc2 - 10))*(Vc2 - 10))/(Io2*Vc2^2)    %monomial yapılmış (3)
(5*Vc*exp(-2592480341699211/1125899906842624))/(4*Io2) <= L2*fs2

%(10*Vc*exp(-2592480341699211/1125899906842624))/(Vc2*(C2*L2)^(1/2))>=(2*pi*a*fs2);                                  %monomial yapılmış (4)
(pi*fs2)/500 <= Vc/(20*(C2*L2)^(1/2))

(5*L2)/(Vc*(C2*L2)^(1/2)) <= 1
``````

cvx_end

(Mark L. Stone) #12

What are you trying to do with this? The parentheses don’t balance, but if they did, perhaps it would be log-affine. In any event, please read the Geometric Programming section of the CVX User’s Guide http://cvxr.com/cvx/doc/gp.html as well as the CVX FAQ Why isn’t CVX accepting my model? READ THIS FIRST! to make sure you are following CVX’s rules.

Edit: I found another post by you, waiting for moderator approval, which now immediately precedes this post. The objective function in that post violates CVX’s DCP rules, as described in the CVX Users’ Guide, and so I will presume it is non-convex.

(mehmet) #13

I understood. But what should I do to convert to CVX?

(Mark L. Stone) #14

You should either formulate a convex problem enterable into CVX, or if you have a non-convex problem, use some other tool. Have you read Why isn't CVX accepting my model? READ THIS FIRST! yet?

(mehmet) #15

The minimized objective function is the sum of the circuit of all losses. “minimize(Pboost)” The parameters that make up the Pboost : Pboost=Pcapacitor+Pinductor+Pswitching+Pdiode
On the advice of an instructor, I apply the following steps to make this stage convex as far as I’m concerned:

1. I calculated all the losses myself. I wrote numerically in total form as minimize (…) for side by side two stage boost converter. My variables: Io,Io2,Vc,fs,L,L2,C,C2,fs2
2. I had erro message like log-affine*log-convex
3. I simpified all numeric values inside minimize(…) by using “syms”, “simplify”. But I didn’t run.
4. I applied monomial approximation. But I didn’t. And, I have error message: real-affine*log-convex.