How to optimize a linear system of complex-valued equations

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

Hi QD
by the 'minimum value of y' do you mean the minimum for abs(y)? If so, you set
a = dc/f, x = f/d and y = 0 [1]
then the two equations reduce to
c = c
f = f
So [1] is a solution that minimizes abs(y). No optimization with e is necessary,
Proman
Proman 2020년 10월 28일
편집: Proman 2020년 10월 28일
Hi David
Thank you for your answer.
Well I am totally with your answer yet I am not supposed to use it but I may have been wrong in the way I asked my question. in the first place, you are absolutely right about the cost function as abs(y) but let me generalize my problem. my main problem is a system of 63 linear complex-valued equations and in anyways I can not follow this procedure to optimize it.
Let me put it this way:
Imagine that I have a system of 3 linear equations as follows:
a1x + a2y + a3z = a4
a5x + a6y + a7z = a8
a9x + a10y + a11z = a12
where a1 to a12 are complex cofficients and x, y and z are complex unknowns. Now I have a cost function (to be minimzed as) as:
cost = abs(i*C*(z + y))
where i is sqrt(-1) and C is a constant. for example, since y and z are the unkonws of interest in the system, how can I minimize cost function by adjusting a1, a6 and a12, to get appropriate complex values of z and y in a way that my cost function becomes as minimized as possible. I mean, I want to see for which image(a1) image(a6), image(a12), image(z), image(y), real(a1), real(a6), real(a12), real(z) and image(y) values, cost becomes minimum.
Trivial with your example:
a4, a8, a12 = 0,
Then x, y, z == 0 satisfied the linear system. Your cost is 0, the smallest possible.
Proman
Proman 2020년 10월 28일
편집: Proman 2020년 10월 28일
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 2020년 10월 28일
편집: Proman 2020년 10월 28일
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|')

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

제품

릴리스

R2019b

질문:

2020년 10월 27일

편집:

2020년 10월 28일

Community Treasure Hunt

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

Start Hunting!

Translated by