summaryrefslogtreecommitdiff
path: root/2048/DEPENDENCIES/desired.sci
diff options
context:
space:
mode:
Diffstat (limited to '2048/DEPENDENCIES/desired.sci')
-rw-r--r--2048/DEPENDENCIES/desired.sci11
1 files changed, 11 insertions, 0 deletions
diff --git a/2048/DEPENDENCIES/desired.sci b/2048/DEPENDENCIES/desired.sci
new file mode 100644
index 000000000..d84e6c918
--- /dev/null
+++ b/2048/DEPENDENCIES/desired.sci
@@ -0,0 +1,11 @@
+// Calculation of desired closed loop characteristic polynomial, as discussed in Sec. 7.7.
+// 9.4
+
+// function [phi,dphi] = desired(Ts,rise,epsilon)
+// Based on transient requirements,
+// calculates closed loop characteristic polynomial
+
+function [phi,dphi] = desired(Ts,rise,epsilon)
+Nr = rise/Ts; omega = %pi/2/Nr; rho = epsilon^(omega/%pi);
+phi = [1 -2*rho*cos(omega) rho^2]; dphi = length(phi)-1;
+endfunction;