From: <par...@us...> - 2010-10-09 11:25:02
|
Revision: 7825 http://octave.svn.sourceforge.net/octave/?rev=7825&view=rev Author: paramaniac Date: 2010-10-09 11:24:56 +0000 (Sat, 09 Oct 2010) Log Message: ----------- control: sys_prune for frd models Added Paths: ----------- trunk/octave-forge/main/control/devel/@frd/__sys_prune__.m trunk/octave-forge/main/control/devel/test_frd.m Removed Paths: ------------- trunk/octave-forge/main/control/devel/frd_test.m Added: trunk/octave-forge/main/control/devel/@frd/__sys_prune__.m =================================================================== --- trunk/octave-forge/main/control/devel/@frd/__sys_prune__.m (rev 0) +++ trunk/octave-forge/main/control/devel/@frd/__sys_prune__.m 2010-10-09 11:24:56 UTC (rev 7825) @@ -0,0 +1,33 @@ +## Copyright (C) 2010 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 this program. If not, see <http://www.gnu.org/licenses/>. + +## -*- texinfo -*- +## Submodel extraction and reordering for FRD objects. +## This file is part of the Model Abstraction Layer. +## For internal use only. + +## Author: Lukas Reichlin <luk...@gm...> +## Created: October 2010 +## Version: 0.1 + +function sys = __sys_prune__ (sys, out_idx, in_idx, st_idx = ":") + + sys.lti = __lti_prune__ (sys.lti, out_idx, in_idx); + + sys.H = sys.H(out_idx, in_idx, :); + +endfunction \ No newline at end of file Deleted: trunk/octave-forge/main/control/devel/frd_test.m =================================================================== --- trunk/octave-forge/main/control/devel/frd_test.m 2010-10-09 09:39:21 UTC (rev 7824) +++ trunk/octave-forge/main/control/devel/frd_test.m 2010-10-09 11:24:56 UTC (rev 7825) @@ -1,64 +0,0 @@ -sys = frd (1, 1) - -sys = frd (2+5i, 3, 0.1) - -sys = frd (ones (2, 3, 5), 1:5) - -frd - -frd ([], []) - - - -P_ss = Boeing707; -w = logspace (-2, 2, 500); -H = freqresp (P_ss, w); -P_frd = frd (H, w); - -figure (1) -subplot (2, 1, 1) -sigma (P_ss) -subplot (2, 1, 2) -sigma (P_frd) - -figure (2) -subplot (2, 1, 1) -sigma (P_ss, [], 1) -subplot (2, 1, 2) -sigma (P_frd, [], 1) - -figure (3) -subplot (2, 1, 1) -sigma (P_ss, [], 2) -subplot (2, 1, 2) -sigma (P_frd, [], 2) - -figure (4) -subplot (2, 1, 1) -sigma (P_ss, [], 3) -subplot (2, 1, 2) -sigma (P_frd, [], 3) - - -sys1 = frd (reshape (1:60, 3, 4, []), 1:5) -sys1.' - -sys2 = frd (reshape (1:45, 3, 3, []), 1:5) -inv (sys2) - -%{ -P = frd ((1:45)*(1-2i), logspace (-2,3,45)) - -figure (1) -sigma (P) -sigma (P, [], 0) - -figure (2) -sigma (P, [], 1) - -figure (3) -sigma (P, [], 2) - -figure (4) -sigma (P, [], 3) -%} \ No newline at end of file Copied: trunk/octave-forge/main/control/devel/test_frd.m (from rev 7824, trunk/octave-forge/main/control/devel/frd_test.m) =================================================================== --- trunk/octave-forge/main/control/devel/test_frd.m (rev 0) +++ trunk/octave-forge/main/control/devel/test_frd.m 2010-10-09 11:24:56 UTC (rev 7825) @@ -0,0 +1,78 @@ +sys = frd (1, 1) + +sys = frd (2+5i, 3, 0.1) + +sys = frd (ones (2, 3, 5), 1:5) + +frd + +frd ([], []) + + + +P_ss = Boeing707; +w = logspace (-2, 2, 500); +H = freqresp (P_ss, w); +P_frd = frd (H, w); + +figure (1) +subplot (2, 1, 1) +sigma (P_ss) +subplot (2, 1, 2) +sigma (P_frd) + +figure (2) +subplot (2, 1, 1) +sigma (P_ss, [], 1) +subplot (2, 1, 2) +sigma (P_frd, [], 1) + +figure (3) +subplot (2, 1, 1) +sigma (P_ss, [], 2) +subplot (2, 1, 2) +sigma (P_frd, [], 2) + +figure (4) +subplot (2, 1, 1) +sigma (P_ss, [], 3) +subplot (2, 1, 2) +sigma (P_frd, [], 3) + + +sys1 = frd (reshape (1:60, 3, 4, []), 1:5) +sys1.' + +sys2 = frd (reshape (1:45, 3, 3, []), 1:5) +inv (sys2) + + +P_ss = Boeing707; +T_ss = feedback (P_ss); + +P_frd = frd (P_ss); +T_frd = feedback (P_frd); + +figure (5) +subplot (2, 1, 1) +sigma (T_ss) +subplot (2, 1, 2) +sigma (T_frd) + + +%{ +P = frd ((1:45)*(1-2i), logspace (-2,3,45)) + +figure (1) +sigma (P) +sigma (P, [], 0) + +figure (2) +sigma (P, [], 1) + +figure (3) +sigma (P, [], 2) + +figure (4) +sigma (P, [], 3) +%} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |