Message Boards Message Boards

0
|
3889 Views
|
3 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Is an analytic optimization solution possible?

Posted 2 years ago

Is an analytic solution possible for this problem: find an expression for maximum of p subject to constraints f=0, g=0, h=0? The feasible range is: T1, T2, R, Rthhot, Rthcold, and Z>0.

I know how to solve it using either FindMaximum or Langrage multiplier if I assign numerical values to T1, T2, R, Rthhot, Rthcold, and Z. I'd like to know if it's possible to find an analytic solution if I leave T1, T2, R, Rthhot, Rthcold and Z as parameters.

p[X_, Y_, Rload_, Rth_, S_] := S^2*(X - Y)^2*Rload/(R + Rload)^2;

f[X_, Y_, Rload_, Rth_, S_] := -(T1 - X)/Rthhot + (X - Y)/Rth + S^2*X*(X - Y)/(R + Rload) - 
0.5*S^2*Rload*(X - Y)^2/(R + Rload)^2;

g[X_, Y_, Rload_, Rth_, S_] := (Y - T2)/Rthcold - (X - Y)/Rth - S^2*Y*(X - Y)/(R + Rload) - 
0.5*S^2*Rload*(X - Y)^2/(R + Rload)^2;

h[X_, Y_, Rload_, Rth_, S_] := S^2*Rth/R - Z;
POSTED BY: H Li
3 Replies

@Frank Kampas posted some code years ago that may help you.

Regards.

POSTED BY: Neil Singer
Posted 2 years ago

I tried the code, but it was unsuccessful.

Perhaps I should pose the question differently:

This is the problem: the parameters are T1, T2, R, Rthhot, Rthcold, and Z with feasible range >0. The variables are Rth and Rload.

X and Y are functions of Rload and Rth given by the 2 equations:

0=-(T1 - X)/Rthhot + (X - Y)/Rth + S^2*X*(X - Y)/(R + Rload) + (-1)*0.5*S^2*Rload*(X - Y)^2/(R + Rload)^2

0=(Y - T2)/Rthcold - (X - Y)/Rth - S^2*Y*(X - Y)/(R + Rload) + (-1)*0.5*S^2*Rload*(X - Y)^2/(R + Rload)^2;

and S is a function of Rth is given by:

0=S^2*Rth/R - Z;

I am trying to maximize power as a function of Rload and Rth:

Power=S^2*(X - Y)^2*Rload/(R + Rload)^2;

I know how to solve it using either FindMaximum or Langrage multiplier if I assign numerical values to T1, T2, R, Rthhot, Rthcold, and Z. I'd like to know if it's possible to find an analytic solution if I leave T1, T2, R, Rthhot, Rthcold and Z as parameters. Here is an example of my code:

T1 = 310; 
T2 = 300;  
Rthhot = 0.1; 
Rthcold = 6; 
R = 6; 
Z = 1/305 ;

Solve[{-(T1 - X)/Rthhot + (X - Y)/Rth + S^2*X*(X - Y)/(R + Rload) - 
0.5*S^2*Rload*(X - Y)^2/(R + Rload)^2 ==0, (Y - T2)/Rthcold - (X - Y)/Rth - S^2*Y*(X - Y)/(R + 
Rload) - 0.5*S^2*Rload*(X - Y)^2/(R + Rload)^2 == 0,
S^2*Rth/R - Z == 0, 
Grad[S^2*(X - Y)^2*Rload/(R + Rload)^2, {X, Y, Rload, Rth, S}] == 
lambda1 Grad[-(T1 - X)/Rthhot + (X - Y)/Rth + 
   S^2*X*(X - Y)/(R + Rload) - 
   0.5*S^2*Rload*(X - Y)^2/(R + Rload)^2, {X, Y, Rload, Rth, S}] +
lambda2 Grad[(Y - T2)/Rthcold - (X - Y)/Rth - 
   S^2*Y*(X - Y)/(R + Rload) - 
   0.5*S^2*Rload*(X - Y)^2/(R + Rload)^2, {X, Y, Rload, Rth, S}] +
lambda3 Grad[S^2*Rth/R - Z, {X, Y, Rload, Rth, S}]}]

And this code works fine. But if I leave T1, T2, R, Rthhot, Rthcold, and Z as parameters it keeps running for a few days without finding a solution.

POSTED BY: Updating Name

This may be a start:

jacobian = D[{p[X, Y, Rload, Rth, S], f[X, Y, Rload, Rth, S],
    g[X, Y, Rload, Rth, S], h[X, Y, Rload, Rth, S]},
   {{X, Y, Rload, Rth, S}}];
eqs = Minors[jacobian, 4] // First // Simplify
sol34 = Solve[
   eqs[[3]] == 0 && eqs[[4]] == 0 &&
    S != 0 && Rth != 0 && 
    Rload != 0] // FullSimplify
Simplify[eqs /. sol34]
fgh = FullSimplify[{f[X, Y, Rload, Rth, S], g[X, Y, Rload, Rth, S],
     h[X, Y, Rload, Rth, S]} /. sol34];
Solve[fgh[[1]] == 0]
Solve[fgh[[2]] == 0]
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract