Azzera filtri
Azzera filtri

How do I to plot bar graph normalized to compare two controller

10 visualizzazioni (ultimi 30 giorni)
Hello everybody,
I am trying to achieve the same graph on the image below. I want to compare the results of two controllers for a wind turbine. As in the picture, the output data should be normalized against the "base" controller (blue bar). The values displayed are the root-mean square (RMS) of the error. The .mat file contains the data: "Result_base" and "Result_fuzzy".
Thanks for any help
load('data.mat')
error=[12.1,5.0e+3];
for idx=1:2
% norm_jonkman(:,idx)=(Result_jonkman(:,idx)-min(Result_jonkman(:,idx)))/(max(Result_jonkman(:,idx))-min(Result_jonkman(:,idx)));
% norm_fuzzy(:,idx)=(Result_fuzzy(:,idx)-min(Result_fuzzy(:,idx)))/(max(Result_fuzzy(:,idx)-min(Result_fuzzy(:,idx))));
RMS_base(idx)=rms( Result_base(:,idx)-error(idx));
RMS_Fuzzy(idx)=rms(Result_fuzzy(:,idx)-error(idx));
y(idx,:)= [1-( (RMS_base(idx)- RMS_base(idx))/RMS_base(idx)) 1-((RMS_Fuzzy(idx)- RMS_base(idx))/RMS_base(idx));];
end
figure;
bar(y)

Risposte (0)

Categorie

Scopri di più su View and Analyze Simulation Results in Help Center e File Exchange

Prodotti


Release

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by