next up previous
Next: Frequency response Up: Control examples Previous: Mixed-sensitivity

PID

-->exec(SCI+'/demos/control/scheme.dem');
\fbox{\epsfig{file=foo0_100.eps,width=3.75in}}
-->s=poly(0,'s');z=poly(0,'z');
-->select n
--> case 0
-->  warning('Demo stops!');return;
--> case 1
-->  mode(1)
-->  dom='c';
-->  s=poly(0,'s');
-->  str='[(s-1)/(s^2+5*s+1)]';
-->  rep=x_dialog('Nominal plant?',str);
-->  if rep==[] then return,end
-->  Plant=evstr(rep);
-->  Plant=syslin('c',Plant);
 closed loop eigenvalues
! - 4.2630173              !
! - 0.0957641 + 0.5574093i !
! - 0.0957641 - 0.5574093i !
Congratulations: closed-loop is STABLE !!!
-->mode(1)
-->[Spid,Rpid,Tpid]=sensi(P22,Kpid);  //Sensitivity functions
-->Tpid(5)=clean(Tpid(5));
-->disp(clean(ss2tf(Spid)),'Sensitivity function');
 Sensitivity function
                            2            3
     1.1363636s + 5.6818182s + 1.1363636s
    --------------------------------------
                                       2   3
    1.3636364 + 1.1363636s + 4.4545455s + s
-->disp(clean(ss2tf(Tpid)),'Complementary sensitivity function');
 Complementary sensitivity function
                            2            3
      1.3636364 - 1.2272727s - 0.1363636s
    ---------------------------------------
                                       2   3
    1.3636364 + 1.1363636s + 4.4545455s + s


 

Scilab group