//------------------------------------------------------------------------- // // Example of the peaking phenomena in a second order HGO. // // Author: Jose Paulo V. S. da Cunha // // Rio de Janeiro, January 04, 2004. // //------------------------------------------------------------------------- // // Error equation in this example: d(xe(t))/dt = Ae(epsilon) xe(t) // // Ae(1): Ae1 = [-2 1 ; -1 0 ]; // Ae(epsilon): epsilon = 0.1; Ae2 = [-2/epsilon 1 ; -1/epsilon^2 0 ]; // Initial condition (xe(0)): xe0 = [ 1 ; 0 ]; // lambda_alpha=delta_l is chosen such that the peak value of the impulse // response of the the FOAF is not too large and its response is not too // slow: delta_l = 0.3 delta_u = 0.01 epsilon1 = 0.1 epsilon2 = 0.000001 ho = 10 // The optimal k1 is computed such that the peak value of the impulse // response is minimum. [c,Gamma,c_gamma_max,gamma_max,c_delta_l,ttime,g_norm]=first_order_filter(Ae1,eye(2,2),eye(2,2),delta_u,delta_l,epsilon1,epsilon2,ho); k1 = c_delta_l lambda_alpha = delta_l //k1 = c //lambda_alpha = Gamma // Computes the norms of the impulse responses and of the upper bounds: xe2 = norm(xe0,2); time = []; norms = []; for t=0:0.004:2 do y1 = norm(expm(Ae1*t)*xe0,2); uy1 = k1*exp(-lambda_alpha*t)*xe2; y2 = norm(expm(Ae2*t)*xe0,2); uy2 = k1/epsilon*exp(-lambda_alpha*t/epsilon)*xe2; time = [ time ; t ]; norms = [ norms ; [ y1 , uy1 , y2 , uy2 ] ]; end // Plots the norms: xbasc(); xset("default"); xset("font size",6); xset("line style",1); xset("thickness",2); plot2d(time,norms,rect=[0,0,2,12],nax=[5,4,2,6]); // Plot grids and comments: xset("line style",2); xset("thickness",1); xset("mark size",0); xgrid(1); xtitle('','t (s)','Norms and upper bounds');