How to plot 2D line with a maximal value
Mostra commenti meno recenti
Hello,
I'm trying to plot the power output of of a 10 kW wind turbine with respect to per second wind speed data. I would like a singular line following the output but instead I have these vertical line for each value - how can I correct it?
I would also like a solid line for my power curve but only a scatter graph gives me the shape I'm after.
Thank you for your help!


%% Code for 10 KW Wind turbine of Diameter 7.1m, rho = 1.16 at hub height 30m, cut in speed 3 m/s,
V = xlsread('windspeed.xlsx','F2:F86401');%wind data per second in a day
Vv= V';
%G = xlsread('windspeed.xlsx','H2:H86401');%generation based on capacity factor of 0.42
for k=1:length(V)
if V(k) < 3 || V(k)>26
P=0;
else P(k) = min( 10000, 0.5*1.16*35*V(k)^3);%power in watts
end
end
Pp = P/1000;%into kW
Pp1 = Pp';
E= (sum (Pp))/3600 %into kWh, energy produce on that day by the turbine
Cp = (E/(10*60*60*24/3600))
t =1:length(V);
figure (1)
plot (Pp)
title ('Power output per second');
xlabel('time (s)');
ylabel('Power out(kW)');
xlim([0 86400])
ylim([0 12])
figure (2)
scatter (Vv,Pp)
title ('Power Curve')
xlabel('time (s)')
ylabel('Power out(kW)')
xlim([0 30])
ylim([0 12])
5 Commenti
Rik
il 12 Mag 2020
Please attach the source excel file.
Mehmed Saad
il 12 Mag 2020
attach windspeed.xlsx
Walter Roberson
il 12 Mag 2020
P=0;
That is overwriting all of P with a scalar 0, instead of just writing to the "current" P, P(k)
Susannah Duncan
il 12 Mag 2020
Susannah Duncan
il 12 Mag 2020
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Smoothing in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



