Mark the knee point on a graph
조회 수: 19 (최근 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
댓글 수: 0
채택된 답변
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
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
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.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!