diff options
Diffstat (limited to '3432/CH7/EX7.27/Ex7_27.sce')
-rw-r--r-- | 3432/CH7/EX7.27/Ex7_27.sce | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/3432/CH7/EX7.27/Ex7_27.sce b/3432/CH7/EX7.27/Ex7_27.sce new file mode 100644 index 000000000..8c3c51a9a --- /dev/null +++ b/3432/CH7/EX7.27/Ex7_27.sce @@ -0,0 +1,41 @@ +//Example 7.27
+// SRL estimator design for a simple pendulum
+
+xdel(winsid())//close all graphics Windows
+clear;
+clc;
+//------------------------------------------------------------------
+// State space representation
+F=[0 1; -1 0];
+G=[0 1]';
+H=[1 0];
+J=0;
+
+//Transfer function
+sys=syslin('c',F,G,H,J)
+sysGG=ss2tf(sys)
+
+//Symmetric root locus for the inverted pendulum estimator design
+//------------------------------------------------------------------
+//Root locus design
+evans(sysGG*sysGG)
+zoom_rect([-5 -5 5 5])
+f=gca();
+f.x_location = "origin"
+f.y_location = "origin"
+xset("color",2);
+h=legend('');
+h.visible = "off"
+//Title, labels and grid to the figure
+exec .\fig_settings.sci; // custom script for setting figure properties
+title('Symmetric root locus for inverted the pendulum estimator design',...
+'fontsize',3);
+//------------------------------------------------------------------
+//pole locations for q=365; p=-3+-j3.18
+p=[-3+3.18*%i -3-3.18*%i]
+sig=real(p);
+omega=imag(p);
+plot(sig,omega,'ro')
+xstring(-4,1,["pole location at";"q=365"])
+xarrows([-3.5;-3.05],[2;3.1],-1.5,1)
+//------------------------------------------------------------------
|