Hello community, here is the log from the commit of package octave-forge-control for openSUSE:Factory checked in at 2015-10-06 13:26:28 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/octave-forge-control (Old) and /work/SRC/openSUSE:Factory/.octave-forge-control.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "octave-forge-control" Changes: -------- --- /work/SRC/openSUSE:Factory/octave-forge-control/octave-forge-control.changes 2015-09-11 09:04:23.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.octave-forge-control.new/octave-forge-control.changes 2015-10-06 13:26:31.000000000 +0200 @@ -1,0 +2,7 @@ +Sat Oct 3 08:30:44 UTC 2015 - dmitr...@opensuse.org + +- Update to versiob 2.8.5 + * Bug fixes + * Matlab compatibility improvements + +------------------------------------------------------------------- Old: ---- control-2.8.4.tar.gz New: ---- control-2.8.5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ octave-forge-control.spec ++++++ --- /var/tmp/diff_new_pack.BZDYXE/_old 2015-10-06 13:26:31.000000000 +0200 +++ /var/tmp/diff_new_pack.BZDYXE/_new 2015-10-06 13:26:31.000000000 +0200 @@ -18,7 +18,7 @@ %define octpkg control Name: octave-forge-%{octpkg} -Version: 2.8.4 +Version: 2.8.5 Release: 0 Summary: Computer-Aided Control System Design (CACSD) Tools License: GPL-3.0+ ++++++ control-2.8.4.tar.gz -> control-2.8.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/control/DESCRIPTION new/control/DESCRIPTION --- old/control/DESCRIPTION 2015-09-02 16:41:23.000000000 +0200 +++ new/control/DESCRIPTION 2015-10-01 14:32:55.000000000 +0200 @@ -1,6 +1,6 @@ Name: control -Version: 2.8.4 -Date: 2015-09-02 +Version: 2.8.5 +Date: 2015-10-01 Author: Lukas Reichlin <lukas.reich...@gmail.com> Maintainer: Lukas Reichlin <lukas.reich...@gmail.com> Title: Control Systems diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/control/INDEX new/control/INDEX --- old/control/INDEX 2015-09-02 16:41:23.000000000 +0200 +++ new/control/INDEX 2015-10-01 14:32:55.000000000 +0200 @@ -163,6 +163,8 @@ db2mag mag2db options + pid + pidstd repsys strseq test_control diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/control/NEWS new/control/NEWS --- old/control/NEWS 2015-09-02 16:41:23.000000000 +0200 +++ new/control/NEWS 2015-10-01 14:32:55.000000000 +0200 @@ -1,6 +1,27 @@ Summary of important user-visible changes for releases of the control package =============================================================================== +control-2.8.5 Release Date: 2015-10-01 Release Manager: Lukas Reichlin +=============================================================================== + +** nyquist, nichols + Specifying a frequency range no longer errors out, + i.e. nyquist (sys, {wmin, wmax}) + +** pid, pidstd + New functions for improved Matlab compatibility. + +** ss + Support ss (a, b, c, 0) for Matlab compatibility. + (Thanks to Thomas Vasileiou) + +** tf + Fixed a problem which caused the expression below to fail. + + tf (Boeing707) \ tf (Boeing707) + + +=============================================================================== control-2.8.4 Release Date: 2015-09-02 Release Manager: Lukas Reichlin =============================================================================== Files old/control/doc/control.pdf and new/control/doc/control.pdf differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/control/doc/control.tex new/control/doc/control.tex --- old/control/doc/control.tex 2015-09-02 16:41:23.000000000 +0200 +++ new/control/doc/control.tex 2015-10-01 14:32:56.000000000 +0200 @@ -5,7 +5,7 @@ @c use chapter name instead of title in the header of even pages @c @settitle CACSD Tools for GNU Octave @afourpaper -@set VERSION 2.8.4 +@set VERSION 2.8.5 @finalout @c @afourwide @c %**end of header diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/control/doc/functions.texi new/control/doc/functions.texi --- old/control/doc/functions.texi 2015-09-02 16:41:23.000000000 +0200 +++ new/control/doc/functions.texi 2015-10-01 14:32:56.000000000 +0200 @@ -7560,6 +7560,42 @@ @end example @end deftypefn +@section pid +@findex pid + + @deftypefn{Function File} {@var{C} =} pid (@var{Kp}) + @deftypefnx{Function File} {@var{C} =} pid (@var{Kp}, @var{Ki}) + @deftypefnx{Function File} {@var{C} =} pid (@var{Kp}, @var{Ki}, @var{Kd}) + @deftypefnx{Function File} {@var{C} =} pid (@var{Kp}, @var{Ki}, @var{Kd}, @var{Tf}) + Return the transfer function @var{C} of the @acronym{PID} controller + in parallel form with first-order roll-off. + + @example + @group + Ki Kd s + C(s) = Kp + ---- + -------- + s Tf s + 1 + @end group + @end example + @end deftypefn +@section pidstd +@findex pidstd + + @deftypefn{Function File} {@var{C} =} pidstd (@var{Kp}) + @deftypefnx{Function File} {@var{C} =} pidstd (@var{Kp}, @var{Ti}) + @deftypefnx{Function File} {@var{C} =} pidstd (@var{Kp}, @var{Ti}, @var{Td}) + @deftypefnx{Function File} {@var{C} =} pidstd (@var{Kp}, @var{Ti}, @var{Td}, @var{N}) + Return the transfer function @var{C} of the @acronym{PID} controller + in standard form with first-order roll-off. + + @example + @group + 1 Td s + C(s) = Kp (1 + ---- + ----------) + Ti s Td/N s + 1 + @end group + @end example + @end deftypefn @section repsys @findex repsys diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/control/inst/@tf/__sys2ss__.m new/control/inst/@tf/__sys2ss__.m --- old/control/inst/@tf/__sys2ss__.m 2015-09-02 16:41:23.000000000 +0200 +++ new/control/inst/@tf/__sys2ss__.m 2015-10-01 14:32:55.000000000 +0200 @@ -24,7 +24,7 @@ ## Special thanks to Vasile Sima and Andras Varga for their advice. ## Author: Lukas Reichlin <lukas.reich...@gmail.com> ## Created: October 2009 -## Version: 0.7 +## Version: 0.8 function [retsys, retlti] = __sys2ss__ (sys) @@ -47,7 +47,7 @@ if (any (tmp(:))) # non-proper transfer function ## separation into strictly proper and polynomial part [numq, numr] = cellfun (@deconv, num, den, "uniformoutput", false); - numr = cellfun (@(num_v, len_d) num_v(end-len_d+2:end), ... + numr = cellfun (@(num_v, len_d) num_v(max(1,end-len_d+2):end), ... numr, num2cell (len_den), "uniformoutput", false); numq = cellfun (@__remove_leading_zeros__, numq, "uniformoutput", false); numr = cellfun (@__remove_leading_zeros__, numr, "uniformoutput", false); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/control/inst/__adjust_ss_data__.m new/control/inst/__adjust_ss_data__.m --- old/control/inst/__adjust_ss_data__.m 2015-09-02 16:41:23.000000000 +0200 +++ new/control/inst/__adjust_ss_data__.m 2015-10-01 14:32:55.000000000 +0200 @@ -21,28 +21,32 @@ ## Author: Lukas Reichlin <lukas.reich...@gmail.com> ## Created: October 2010 -## Version: 0.2 +## Version: 0.3 function [a, b, c, d, tsam] = __adjust_ss_data__ (a, b, c, d, tsam); - if (isempty (a)) # static system - a = []; # avoid [](nx0) or [](0xn) + if (isempty (a)) # static system + a = []; # avoid [](nx0) or [](0xn) tsam = -2; endif if (isempty (d)) - if (all (size (c) == 0)) # ss (a, b), ss (a, b, [], [], ...), but allow c(0xn) and d(0xm) + if (all (size (c) == 0)) # ss (a, b), ss (a, b, [], [], ...), but allow c(0xn) and d(0xm) c = eye (size (a)); d = zeros (rows (a), columns (b)); - else # ss (a, b, c), ss (a, b, c, [], ...) + else # ss (a, b, c), ss (a, b, c, [], ...) d = zeros (rows (c), columns (b)); endif endif - if (isempty (b) && isempty (c)) # sys = ss ([], [], [], d) + if (isempty (b) && isempty (c)) # sys = ss ([], [], [], d) b = zeros (0, columns (d)); - c = zeros (rows(d), 0); + c = zeros (rows (d), 0); tsam = -2; endif + if (is_real_scalar (d) && d == 0) # ss (a, b, c, 0) (for matlab compatibility) + d = zeros (rows (c), columns (b)); # test d == 0 to avoid ss (0) returning 0x0 model + endif + endfunction diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/control/inst/__frequency_vector__.m new/control/inst/__frequency_vector__.m --- old/control/inst/__frequency_vector__.m 2015-09-02 16:41:23.000000000 +0200 +++ new/control/inst/__frequency_vector__.m 2015-10-01 14:32:55.000000000 +0200 @@ -75,8 +75,8 @@ elseif (strcmpi (wbounds, "ext")) # plots with implicit frequencies if (nargin == 4) - dec_min = repmat ({log10 (wmin)}, 1, len); - dec_max = repmat ({log10 (wmax)}, 1, len); + dec_min = repmat ({log10(wmin)}, 1, len); + dec_max = repmat ({log10(wmax)}, 1, len); endif idx = cellfun (@(zp, dec_min, dec_max) find (zp > 10^dec_min & zp < 10^dec_max), ... diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/control/inst/pid.m new/control/inst/pid.m --- old/control/inst/pid.m 1970-01-01 01:00:00.000000000 +0100 +++ new/control/inst/pid.m 2015-10-01 14:32:55.000000000 +0200 @@ -0,0 +1,59 @@ +## Copyright (C) 2009-2015 Lukas F. Reichlin +## +## This file is part of LTI Syncope. +## +## LTI Syncope is free software: you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## (at your option) any later version. +## +## LTI Syncope is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with LTI Syncope. If not, see <http://www.gnu.org/licenses/>. + +## -*- texinfo -*- +## @deftypefn{Function File} {@var{C} =} pid (@var{Kp}) +## @deftypefnx{Function File} {@var{C} =} pid (@var{Kp}, @var{Ki}) +## @deftypefnx{Function File} {@var{C} =} pid (@var{Kp}, @var{Ki}, @var{Kd}) +## @deftypefnx{Function File} {@var{C} =} pid (@var{Kp}, @var{Ki}, @var{Kd}, @var{Tf}) +## Return the transfer function @var{C} of the @acronym{PID} controller +## in parallel form with first-order roll-off. +## +## @example +## @group +## Ki Kd s +## C(s) = Kp + ---- + -------- +## s Tf s + 1 +## @end group +## @end example +## @end deftypefn + +## Author: Lukas Reichlin <lukas.reich...@gmail.com> +## Created: June 2015 +## Version: 0.1 + +## TODO: discrete-time case, dozens of options, ... +## If you wish to kill time with this repetitive task, +## I'm happy to add your work :-) + +function C = pid (Kp = 1, Ki = 0, Kd = 0, Tf = 0) + + if (! is_real_scalar (Kp, Ki, Kd, Tf) || nargin > 4) + print_usage (); + endif + + if (Kd == 0) # catch cases like pid (2, 0, 0, 3) + Tf = 0; + endif + + if (Ki == 0) # minimal realization if num(3) == 0 and den(3) == 0 + C = tf ([Kp*Tf+Kd, Kp], [Tf, 1]); + else + C = tf ([Kp*Tf+Kd, Kp+Ki*Tf, Ki], [Tf, 1, 0]); + endif + +endfunction diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/control/inst/pidstd.m new/control/inst/pidstd.m --- old/control/inst/pidstd.m 1970-01-01 01:00:00.000000000 +0100 +++ new/control/inst/pidstd.m 2015-10-01 14:32:55.000000000 +0200 @@ -0,0 +1,64 @@ +## Copyright (C) 2009-2015 Lukas F. Reichlin +## +## This file is part of LTI Syncope. +## +## LTI Syncope is free software: you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## (at your option) any later version. +## +## LTI Syncope is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with LTI Syncope. If not, see <http://www.gnu.org/licenses/>. + +## -*- texinfo -*- +## @deftypefn{Function File} {@var{C} =} pidstd (@var{Kp}) +## @deftypefnx{Function File} {@var{C} =} pidstd (@var{Kp}, @var{Ti}) +## @deftypefnx{Function File} {@var{C} =} pidstd (@var{Kp}, @var{Ti}, @var{Td}) +## @deftypefnx{Function File} {@var{C} =} pidstd (@var{Kp}, @var{Ti}, @var{Td}, @var{N}) +## Return the transfer function @var{C} of the @acronym{PID} controller +## in standard form with first-order roll-off. +## +## @example +## @group +## 1 Td s +## C(s) = Kp (1 + ---- + ----------) +## Ti s Td/N s + 1 +## @end group +## @end example +## @end deftypefn + +## Author: Lukas Reichlin <lukas.reich...@gmail.com> +## Created: September 2015 +## Version: 0.1 + +## TODO: discrete-time case, dozens of options, ... +## NOTE: I don't see any need to implement 'pid' and 'pidstd' +## as LTI classes like the 'dark side' does. +## Returning a transfer function seems to be sufficient. +## These functions' sole purpose is to help novice users +## running their scripts with as little changes as possible. + +function C = pidstd (Kp = 1, Ti = inf, Td = 0, N = inf) + + if (! is_real_scalar (Kp, Ti, Td, N) || nargin > 4) + print_usage (); + endif + + if (Kp == 0) # pidstd (0) + C = tf (0); + elseif (Ti == inf && N == inf) # pidstd (Kp, inf, Td) + C = tf (Kp*[Td, 1], [1]); + elseif (Ti == inf) # pidstd (Kp, inf, Td, N) + C = tf (Kp*[N*Td+Td, N], [Td, N]); + elseif (N == inf) # pidstd (Kp, Ti, Td), pidstd (Kp, Ti) + C = tf (Kp*[Td*Ti, Ti, 1], [Ti, 0]); + else # pidstd (Kp, Ti, Td, N) + C = tf (Kp*[N*Td*Ti+Td*Ti, N*Ti+Td, N], [Td*Ti, N*Ti, 0]); + endif + +endfunction