How to optimize a linear system of complex-valued equations

1 visualización (últimos 30 días)
Proman
Proman el 27 de Oct. de 2020
Editada: Proman el 28 de Oct. de 2020
Hello everyone
I have a linear system of complex-valued equations as follows
ax + by = c
dx + ey = f
where a,b,c,d,e, and f are complex-valeued coefficients and x and y are my complex-valued unkonwns. I intend to conduct an algorithm like genetic algorithm to optimize "a" and "e" to get the optimized (min for example) value of "y". Would you please help me how I can manage to do this? thanks in advance for your time devoted to this question.
  5 comentarios
Proman
Proman el 28 de Oct. de 2020
Editada: Proman el 28 de Oct. de 2020
Well that's absolutely correct but I have constraints for my decision variables. In other words, I intend to run the optimization process using an standard algorithm like genetic algorithm or PSO. In that way, how can I accomplish my optimization?
Proman
Proman el 28 de Oct. de 2020
Editada: Proman el 28 de Oct. de 2020
This is my main problem. Ro1 matrix is the coeffient maatrix which is 8*8. and it has 8 unknows. I want to optimize R1(4) + R1(7) to minimze cost function for 1<g3<2 and 1<Oc1<4.
%%%Part I ==> Constants Input
format long
g2 = 3.5155;
g3 = g2;
g1 = 0;
CP = 200;
Oc1 = 0;
k = 10000;
%%Part II => Bistability Relation, Im and Re part of Rho21 based on
% different values of Oc (D21=D32=0)
%%Preallocating Matrices
G21 = zeros(1,k);
G2 = zeros(1,k);
G3 = zeros(1,k);
G1 = zeros(1,k);
G31 = zeros(1,k);
G32 = zeros(1,k);
OC1 = zeros(1,k);
rho1 = zeros(1,k);
cost = zeros(1,k);
y2 = zeros(1,k);
y3 = zeros(1,k);
C = zeros(1,k);
wp = zeros(1,k);
OP = linspace(0,50,k);
for j = 1 :k
G2(1,j) = g2;
G3(1,j) = g3;
G1(1,j) = g1;
G21(1,j) = (G1(1,j) + G2(1,j)) ./ 2;
G32(1,j) = (G3(1,j) + G2(1,j)) ./ 2;
G31(1,j) = (G3(1,j) + G1(1,j)) ./ 2;
OC1(1,j) = Oc1;
C(1,j) = CP;
Ro1 = [-G2(1,j) -(1i*OP(1,j)) 0 (1i*OP(1,j)) 0 0 0 -G2(1,j);
-(2i*OP(1,j)) (-1i*wp(1,j)-G21(1,j)) -(1i*OC1(1,j)) 0 0 0 0 -(1i*OP(1,j));
0 -(1i*OC1(1,j)) (-1i*wp(1,j)-G31(1,j)) 0 (1i*OP(1,j)) 0 0 0;
(2i*OP(1,j)) 0 0 (1i*wp(1,j)-G21(1,j)) 0 (1i*OC1(1,j)) 0 (1i*OP(1,j));
(1i*OC1(1,j)) 0 (1i*OP(1,j)) 0 -G32(1,j) 0 0 (2i*OC1(1,j));
0 0 0 (1i*OC1(1,j)) 0 (1i*wp(1,j)-G31(1,j)) -(1i*OP(1,j)) 0;
-(1i*OC1(1,j)) 0 0 0 0 -(1i*OP(1,j)) -G32(1,j) -(2i*OC1(1,j));
0 0 0 0 (1i*OC1(1,j)) 0 -(1i*OC1(1,j)) -G3(1,j)];
B1 = [-G2(1,j);-(1i*OP(1,j));0;(1i*OP(1,j));(1i*OC1(1,j));0;-(1i*OC1(1,j));0];
R1 = Ro1 \ B1;
rho1(1,j) = R1(4) + R1(7);
%input-output relation : |x| in terms of |y|
cost(1,j) = (2 .* OP(1,j)) - (1i .* C(1,j) .* rho1(1,j));
end
%%%Part III ==> Plotting
figure
plot(abs(cost),OP)
xlabel('input |y|')
ylabel('output |x|')

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Genetic Algorithm en Help Center y File Exchange.

Productos


Versión

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by