summaryrefslogtreecommitdiff
path: root/3432/CH3/EX3.21/Ex3_21.sce
diff options
context:
space:
mode:
Diffstat (limited to '3432/CH3/EX3.21/Ex3_21.sce')
-rw-r--r--3432/CH3/EX3.21/Ex3_21.sce42
1 files changed, 42 insertions, 0 deletions
diff --git a/3432/CH3/EX3.21/Ex3_21.sce b/3432/CH3/EX3.21/Ex3_21.sce
new file mode 100644
index 000000000..57a2481db
--- /dev/null
+++ b/3432/CH3/EX3.21/Ex3_21.sce
@@ -0,0 +1,42 @@
+//Example 3.21
+//Series, Parallel and Feedback connections of TF blocks
+//to get effective TF.
+
+clear;
+clc;
+//------------------------------------------------------------------
+//Transfer function block G1
+num1=[2];
+den1=[1];
+Ns=poly(num1,'s','coeff');
+Ds=poly(den1,'s','coeff');
+sysG1=syslin('c',Ns/Ds);
+
+//Transfer function block G2
+num2=[4];
+den2=[0 1];
+Ns=poly(num2,'s','coeff');
+Ds=poly(den2,'s','coeff');
+sysG2=syslin('c',Ns/Ds);
+
+//Transfer function block G4
+num4=[1];
+den4=[0 1];
+Ns=poly(num4,'s','coeff');
+Ds=poly(den4,'s','coeff');
+sysG4=syslin('c',Ns/Ds);
+
+//Transfer function block G6
+num6=[1];
+den6=[1];
+Ns=poly(num6,'s','coeff');
+Ds=poly(den6,'s','coeff');
+sysG6=syslin('c',Ns/Ds);
+
+//Effective transfer function
+// (+) operator for paralle connection,
+// (*) operator for series connection
+// (/.)operator for feedback connection
+sysG=(sysG1 + sysG2) * sysG4 /. sysG6
+disp(sysG, "The effective transfer function is")
+//------------------------------------------------------------------