Index: mttroot/mtt/lib/control/PPP/ppp_lin_run.m ================================================================== --- mttroot/mtt/lib/control/PPP/ppp_lin_run.m +++ mttroot/mtt/lib/control/PPP/ppp_lin_run.m @@ -1,6 +1,6 @@ -function [t,y,u,t_e,y_e,e_e] = ppp_lin_run (Name,Simulate,ControlType,w,x_0,p_c,p_o) +function [t,y,u,y_c,t_e,y_e,e_e] = ppp_lin_run (Name,Simulate,ControlType,w,x_0,p_c,p_o) ## usage: [t,y,u,t_e,y_e,e_e] = ppp_lin_run (Name,Simulate,ControlType,w,x_0,p_c,p_o) ## ## ## Linear closed-loop PPP of lego system (and simulation) @@ -244,10 +244,11 @@ ppp_ustar2h(Ustar); ## Control loop y = []; + y_c = []; u = []; t = []; y_e = []; t_e = []; e_e = []; @@ -307,10 +308,11 @@ ## Save data if Simulate t = [t;ti']; y = [y;yi']; + y_c = [y_c;(C_c*xsi)']; u = [u;ui']; else t = [t;t_i]; y = [y;y_i']; u = [u;u_i'];