Mark the knee point on a graph

26 次查看(过去 30 天)
Hi
I want to mark the knee point on the graph like the picture attached.
This point is the maximum power meaning ( a certain value of voltage * value of current ) gives the maximum power possible. However, it is not maximum voltage with maximum current.
In the graph 15.981 * 6.40876 gives the maximum power of this curve.
Any help regarding this?
Thanks

采纳的回答

Alan Stevens
Alan Stevens 2021-2-26
Calculate a vector of values of P = V.*I then choose the maximum. Something like:
P = V.*I;
indx = find(P==max(P));
Vp = V(indx);
Ip = I(indx);
then plot(Ip,Vp,'s')
  1 个评论
Adam Danz
Adam Danz 2021-2-26
I was writing a demo based on these data while you were getting two great answers. I'll include it here.
data = [ 0 0.124
0.624 0.122
1.248 0.12
1.872 0.118
2.497 0.116
3.121 0.114
3.745 0.112
4.369 0.11
4.7 0.103
4.934 0.1
5.165 0.091
5.336 0.085
5.566 0.078
5.927 0.057
6.07 0.045
6.113 0.037
6.137 0.034
6.21 0.025
6.294 0.02
6.373 0.004
6.389 0.002
6.407 0];
T = array2table(data, 'VariableNames', {'Volts','Amps'});
yyaxis left
plot(T.Volts,T.Amps)
xlabel('Volts (V)')
ylabel('Current (Amps)')
T.Power = T.Volts .* T.Amps;
yyaxis right
plot(T.Volts, T.Power)
ylim([0,1])
ylabel('Power (W)')
[~, maxPowerIdx] = max(T.Power);
xline(T.Volts(maxPowerIdx), 'k-','Max power point')
yyaxis left
hold on
plot(T.Volts(maxPowerIdx), T.Amps(maxPowerIdx), 'ko')

请先登录,再进行评论。

更多回答(1 个)

Yu Lu
Yu Lu 2021-2-26
Hello,
As my understanding you have two arrays v and c
v = [<Your Data>]; % voltage
c = [<Your Data>]; % current
and you want to find the place that has the maximum dot product of these two arrays, in MATLAB you can do:
[maxPower, maxIndices] = max(v.*c);
to get the maximum power value and the indices of voltage and current that product maximum power.
With the indices you can set marker at the position or create data tip on the position use the datatip function.

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by