diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /2048/CH12/EX12.10 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '2048/CH12/EX12.10')
-rwxr-xr-x | 2048/CH12/EX12.10/gpc_pid_test.sce | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/2048/CH12/EX12.10/gpc_pid_test.sce b/2048/CH12/EX12.10/gpc_pid_test.sce new file mode 100755 index 000000000..5f9436051 --- /dev/null +++ b/2048/CH12/EX12.10/gpc_pid_test.sce @@ -0,0 +1,34 @@ +// PID controller, tuned with GPC, as discussed in Example 12.5 on page 452.
+// 12.10
+
+exec('gpc_pid.sci',-1);
+exec('zpowk.sci',-1);
+exec('xdync.sci',-1);
+exec('rowjoin.sci',-1);
+exec('polsize.sci',-1);
+exec('left_prm.sci',-1);
+exec('t1calc.sci',-1);
+exec('indep.sci',-1);
+exec('seshft.sci',-1);
+exec('makezero.sci',-1);
+exec('move_sci.sci',-1);
+exec('colsplit.sci',-1);
+exec('clcoef.sci',-1);
+exec('cindep.sci',-1);
+
+A = [1 -1.95 0.935];
+B=-0.015;
+C=1;
+degA=2;
+degB=0;
+degC=0;
+N1=1;
+N2=5;
+Nu=2;
+gamm=0.05;
+gamma_y=1;
+lambda=0.02;
+
+[Kp,Ki,Kd] = ...
+gpc_pid(A,degA,B,degB,C,degC,N1,N2,Nu,lambda,gamm,gamma_y)
+
|