Borrar filtros
Borrar filtros

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

10 visualizaciones (últimos 30 días)
TOM SALIC
TOM SALIC el 29 de Nov. de 2021
Editada: dpb el 29 de Nov. de 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)

Respuestas (0)

Categorías

Más información sobre View and Analyze Simulation Results en Help Center y File Exchange.

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by