diff options
Diffstat (limited to '2048/DEPENDENCIES/ch_pol.sci')
-rwxr-xr-x | 2048/DEPENDENCIES/ch_pol.sci | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/2048/DEPENDENCIES/ch_pol.sci b/2048/DEPENDENCIES/ch_pol.sci new file mode 100755 index 000000000..fa5fa8af2 --- /dev/null +++ b/2048/DEPENDENCIES/ch_pol.sci @@ -0,0 +1,10 @@ +// function [phi,psi] = ch_pol(N,epsilon)
+// Returns desired characteristic polynomial and numerator
+// N = rise time in number of sample times
+// epsilon = overshoot as a fraction of ss gain
+
+function [phi,psi] = ch_pol(N,epsilon)
+omega = %pi/2/N; r = epsilon^(omega/%pi);
+phi = [1 -2*r*cos(omega) r^2];
+psi = [1-r*cos(omega) (r^2-r*cos(omega))];
+endfunction;
|