KiVAR = [0:0.002:0.2];
N = length(KiVAR);
for I = 1:N
    Kp = 0.22;
    Ki = KiVAR(I);
    Kd = 0;
    sim('Project_2_PSK_2019.slx')
    K = length(RMSerror);
    E(I)=RMSerror(K);
    U(I)=RMSeffort(K);
    J(I)=sqrt((E(I)^2)+(U(I)^2));
end
plot(KiVAR,E,'*', KiVAR,U,'-', KiVAR,J, 'o'), grid on, xlabel('Ki'), ylabel('E[*],U[-],J[o]')
