Filter löschen
Filter löschen

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

10 Ansichten (letzte 30 Tage)
TOM SALIC
TOM SALIC am 29 Nov. 2021
Bearbeitet: dpb am 29 Nov. 2021
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)

Antworten (0)

Kategorien

Mehr zu View and Analyze Simulation Results finden Sie in Help Center und File Exchange

Produkte


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by