```
n = 8;
i = 1:n;
Ceff = 0.03*ones(n,1);
Vth = 0.36*ones(n,1);
Vmin = 0.6*ones(n,1);
Vmax = 1.5*ones(n,1);
alpha = 1.2*ones(n,1);
Fmax = [1900e6*ones(n,1)]';
k = (((Vmax - Vth).^alpha)/Vmax)*ones(n,1);
P = [2400 2400 2400 2400 9600 7800 4800 4800];
D = [2400 2400 2400 2400 4000 4000 4800 4800];
C = [35 40 165 165 570 570 180 720];
F = [800e6 1000e6 1200e6 1400e6 1600e6 1800e6 2000e6 2200e6];
%V = [0.9 1 1.1 1.2 1.3 1.4 1.5 1.6];
Fmin = [min(F)*ones(1,n)];
M = Ceff * Fmax;
N = C(i) * M;
%N = constant1( Ceff, Fmax, C )
S = [F./Fmax];
Smin = Fmin/Fmax;
emin = C./Smin;
e = C./S;
cvx_begin gp
variable V(i)
for i = 1:n;
E(i) = sum(N(i).*(V(i).^2));
end
minimize (E(i))
subject to
for i = 1:n
T1 = (e./P);
end
for i = 1:n;
T2 = (( P - D)/P).*e;
end
for i = 1:n;
T3 = T2/D;
T = T1+T2+T3;
end
T <= 1;
e = emin;
M = (V(i)-Vth)
%G = M^1.2
k*V(i) <= S(i);
Vmin <= V(i) <= Vmax;
cvx_end
fprintf(1,'\nThe energy consumed %3.2f.\n',cvx_optval);
%disp('Optimal Voltage levels are: '), V
```

## RESULT

Calling SDPT3 4.0: 80650 variables, 2 equality constraints

num. of constraints = 2

dim. of linear var = 3

dim. of free var = 80647 *** convert ublk to lblk

SDPT3: Infeasible path-following algorithms

## version predcorr gam expon scale_data

NT 1 0.000 1 0

it pstep dstep pinfeas dinfeas gap prim-obj dual-obj cputime

## 0|0.000|0.000|1.0e+01|5.4e+04|5.0e+10|-2.000000e+01 0.000000e+00| 0:0:00| chol 1 1

1|0.618|0.967|3.8e+00|1.8e+03|3.3e+08|-1.571563e+01 -3.197674e+01| 0:0:00| chol 1 1

2|1.000|0.986|2.8e-07|2.5e+01|9.3e+05|-1.722002e+00 -2.635998e+01| 0:0:00| chol 1 1

3|1.000|0.986|5.6e-08|4.9e-01|3.6e+03|-1.733398e+00 -2.087847e+00| 0:0:00| chol 1 1

4|1.000|0.982|1.8e-08|4.6e-02|5.7e+01|-1.810161e+00 -1.814781e+00| 0:0:00| chol 1 1

5|0.989|0.989|9.7e-10|4.2e-03|8.9e-01|-1.811308e+00 -1.811309e+00| 0:0:00| chol 1 1

6|0.989|0.989|9.3e-12|3.7e-04|1.3e-02|-1.811320e+00 -1.811315e+00| 0:0:00| chol 1 1

7|1.000|1.000|6.7e-12|5.4e-06|3.4e-05|-1.811321e+00 -1.811320e+00| 0:0:01| chol 1 1

8|0.989|0.989|4.2e-13|1.4e-08|1.9e-08|-1.811321e+00 -1.811321e+00| 0:0:01|

stop: max(relative gap, infeasibilities) < 1.49e-08

## number of iterations = 8

primal objective value = -1.81132058e+00

dual objective value = -1.81132058e+00

gap := trace(XZ) = 1.85e-08

relative gap = 4.01e-09

actual relative gap = -1.15e-09

rel. primal infeas (scaled problem) = 4.21e-13

rel. dual " " " = 1.43e-08

rel. primal infeas (unscaled problem) = 0.00e+00

rel. dual " " " = 0.00e+00

norm(X), norm(y), norm(Z) = 1.3e+00, 2.0e+00, 2.0e+00

norm(A), norm(b), norm© = 3.0e+00, 1.9e+00, 3.0e+00

Total CPU time (secs) = 0.64

CPU time per iteration = 0.08

termination code = 0

DIMACS: 4.2e-13 0.0e+00 1.4e-08 0.0e+00 -1.1e-09 4.0e-09

Status: Solved

Optimal value (cvx_optval): +5.01714e+10

The energy consumed 50171400004.34.