Non-linear Optimization problem to maximize the sum-rate using fmincon
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi, kindly review my problem and suggest me a solution for it, i have been trying to solve this problem for 2weeks but am not able to find any solution that how should i solve this problem. In the main function code below all values are constant except phi(x), which i have to optimze.
the main function is given below, with fmincon code plus constraints.
function Rsumm= my_problem(x)
global n
Bn=2000;
Beta=0.3;
A=4000;
h=rand(1,n);
C=(0.0002224*h/(0.05*3.9811e-21));
R=((x*Bn)+A*log2(1+(1-Beta-x)*C));
Rsumm=-sum(R);
end
clear all
clc
global n
n_vec=2:2:8;
throughput=[];
for n=n_vec
initial_guess=0.00002;
x0=initial_guess;
lb=0.02;
ub=0.7;
A = [];
b = [];
Aeq=[];
Beq=[];
[x,fval]= fmincon(@(x) my_problem(x),x0,A,b,[],[],lb,ub,@my_constraint);
max=-(fval);
throughput=[throughput max];
end
plot(n_vec,throughput,'-b*')
function [c,ceq]=my_constraint(x)
c=my_problem(x)-20*1000;
ceq=[];
end

in the above attached picture the author maximize the Rsum with two variables but i have to use only the highlighted one phi(x), and in constraints i mentioned the highlighted constraints.
the problem here is that the author used the over all sum of the equation for n number but in maximzation problem only phi (x) is considered. i am confused here and also donnot know how to solve this problem for this type of equation.
should i take x(n) in the function code?? and single x in fmincon code or try something different.
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Find more on Nonlinear Optimization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!