//--------------------------------------------------------------------------- // // Design of the HGO based VSC for a car (Quanser). // // Developed for Scilab 2.7. // // Rio de Janeiro, January 30, 2004. // // Author: Jose' Paulo V. S. da Cunha // // Revised in January 31, 2004. // //--------------------------------------------------------------------------- // Load libraries: exec("MRCtools.sci"); //-------------------------------------------------------------------- // // Begining of design. // //-------------------------------------------------------------------- // Laplace complex variable definition: s=poly(0,"s"); // Reference model denominator: // Specified poles (rad/s): pm1 = -5; pm2 = -10; Km = (-pm1) * (-pm2); Dm = (s-pm1) * (s-pm2); Wm1 = Dm/Km; // State filters state space form: PHI = [ -10 ] GAMMA = [ 1 ] // // PLANT PARAMETERS: // // Nominal high frequency gain: Kpnom = 25.8/10.7; // Nominal electromechanical pole: p1nom = -13.4; // Upper bound for the input disturbance: bar_d = 0.3; // Tables of admissible plant parameters: Kptable = [ 25.8/10.7; 17.0/10.7; 32.0/10.7; 25.8/10.7; 17.0/10.7; 32.0/10.7; 25.8/10.7; 17.0/10.7; 32.0/10.7 ]; p1table = [ -13.4; -13.4; -13.4; -9.5; -9.5; -9.5; -15.0; -15.0; -15.0 ]; // // DESIGN: // // State filters transfer function matrix form: [lGAMMA,cGAMMA] = size(GAMMA); [N,d]=coff(PHI); A = N*GAMMA; Lambda = d*eye(cGAMMA,cGAMMA); // Nominal parameter matrix computation (theta_null is a dummy matrix): [theta_nom,theta_null]=mrcmatch(Kpnom,s*(s-p1nom),Wm1,A,Lambda); theta_nom //= zeros(4,1) //adopted_theta_nom = theta_nom; // // Design of the UV-MRAC: // // Initializing the UV-MRAC constants tables: c1 = zeros(9); cd = zeros(9); // // Compute the constants for each admissible actuators failure: // for i=1:9, [theta,theta_null]=mrcmatch(Kptable(i),s*(s-p1table(i)),Wm1,A,Lambda); c1(i) = norm(theta_nom-theta,2); cd(i) = norm(1-(theta(1:lGAMMA))'*inv(-PHI)*GAMMA,2); end; // Display the results: c1 hat_d = cd*bar_d // Suggested values for the HGO small parameter: epsilon = 0.01