finding simultaneously maximum values of three vectors (optimal point)
Afficher commentaires plus anciens
Hi Everyone.
I'm looking for a way to find an optimal operation point for a system. I have three vectors each as imporatant operating values of the system. Vectors A, B and C. Their dimension are lets say 1X16. Now I am looking for a Point at wich the vectors A, B and C have simultaneously their greatest Values. So I am not looking for the maximum of A, B and C individually, but together they should be as high as possible. This is the optimal operating point of the system.
I have attached the picture of the plots of A B and C as a function of lets say time or distance or anything else. While A ab B increase with lets say time C decreases. At the beginning the increase in A and B are high and it gets lower with the time. C behaves other way around.
There should be an optimal point regarding the time in wich A B and C are high enough. Do have any idea of how to solve such a problem in matlab?
I hope I could describe this problem in a half way decent way!
Thanks and best regards!
2 commentaires
Azzi Abdelmalek
le 17 Jan 2014
You have to define what optimal point means? What is your criterion?
Babak
le 17 Jan 2014
Réponses (2)
Azzi Abdelmalek
le 17 Jan 2014
Define a criterion
J=w1*A+w2*B+w3*C
out=max(J)
% w1, w2 and w3 are chosen to make your three signals closer.
12 commentaires
Babak
le 17 Jan 2014
Azzi Abdelmalek
le 17 Jan 2014
A, B and C are not the criterion, they are your signals. you can choose w1, w2, and w3 to make A,B and C the same scale, or make any signal with greater scale or lower, that's what I meant by criterion, you can also add to your criterion J the signal D
J=w1*A+w2*B+w3*C+w4./D % (since you are looking for the minimum of D, we suppose all A,B,C, and D all positive)
out=max(J) % J is your criterion
Babak
le 17 Jan 2014
Azzi Abdelmalek
le 17 Jan 2014
Modifié(e) : Azzi Abdelmalek
le 17 Jan 2014
You avoid using weight, if you want weight to be equal, by normalizing your signals
AA=(A-min(A))/(max(A)-min(A))
BB=(B-min(B))/(max(B)-min(B))
CC=(C-min(C))/(max(C)-min(C))
DD=(D-min(D))/(max(D)-min(D))
[out,index]=max(AA+BB+CC+1./D)
José-Luis
le 17 Jan 2014
What does that achieve?
Azzi Abdelmalek
le 17 Jan 2014
Modifié(e) : Azzi Abdelmalek
le 17 Jan 2014
Making the 4 signals the same scale. And sorry, there is no sum
Babak
le 17 Jan 2014
José-Luis
le 17 Jan 2014
I think we are overcomplicating things.
t = 1:10;
s1 = rand(10,1);
your_idx = find(s1 == max(s1));
your_time = t(your_idx);
Azzi Abdelmalek
le 17 Jan 2014
Babak, just work with second column, for each signal, the time is the same for your 4 signals (is it right?)
AA=(A-min(A))/(max(A)-min(A))
BB=(B-min(B))/(max(B)-min(B))
CC=(C-min(C))/(max(C)-min(C))
DD=(D-min(D))/(max(D)-min(D))
[out,index]=max(AA+BB+CC+1./D)
time_max=t(index)% t is your vector time
Babak
le 17 Jan 2014
Babak
le 17 Jan 2014
Babak
le 18 Jan 2014
José-Luis
le 17 Jan 2014
max(A+B+C)
6 commentaires
Azzi Abdelmalek
le 17 Jan 2014
Babak commented
Thank you very much for your answer but somehow there is a problem with that. Because there can not be a certain value for this. A B and C have totaly different units. lets say A is the power, B is the reynolds number and C is the latent heat. for instance. I am actually looking for the point of time at wich A B and C have their maximal value
now I have another question:
What if there would be a vector D and I wanted the maximum of A, B and c and simultaneously the minimum of D?
Babak
le 17 Jan 2014
max([A;B;C],2)
Babak
le 17 Jan 2014
José-Luis
le 17 Jan 2014
It gives you the maximum value for A,B, and C. I would recommend you to read the documentation. And as Azzi said, if you want to optimize some system, you need to place weights on every variable. How you place those weights is generally arbitrary. My original answer placed equal weight in all values.
Babak
le 17 Jan 2014
Catégories
En savoir plus sur Manual Performance Optimization dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!