Diff of the two buildlogs: -- --- b1/build.log 2024-11-19 12:09:32.582422406 +0000 +++ b2/build.log 2024-11-19 12:11:55.419948538 +0000 @@ -1,6 +1,6 @@ I: pbuilder: network access will be disabled during build -I: Current time: Tue Nov 19 00:05:23 -12 2024 -I: pbuilder-time-stamp: 1732017923 +I: Current time: Tue Dec 23 08:32:31 +14 2025 +I: pbuilder-time-stamp: 1766428351 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/unstable-reproducible-base.tgz] I: copying local configuration @@ -29,54 +29,86 @@ dpkg-source: info: applying lapack-3.10.0.patch I: Not using root during the build. I: Installing the build-deps -I: user script /srv/workspace/pbuilder/8749/tmp/hooks/D02_print_environment starting +I: user script /srv/workspace/pbuilder/36597/tmp/hooks/D01_modify_environment starting +debug: Running on ionos16-i386. +I: Changing host+domainname to test build reproducibility +I: Adding a custom variable just for the fun of it... +I: Changing /bin/sh to bash +'/bin/sh' -> '/bin/bash' +lrwxrwxrwx 1 root root 9 Dec 22 18:32 /bin/sh -> /bin/bash +I: Setting pbuilder2's login shell to /bin/bash +I: Setting pbuilder2's GECOS to second user,second room,second work-phone,second home-phone,second other +I: user script /srv/workspace/pbuilder/36597/tmp/hooks/D01_modify_environment finished +I: user script /srv/workspace/pbuilder/36597/tmp/hooks/D02_print_environment starting I: set - BUILDDIR='/build/reproducible-path' - BUILDUSERGECOS='first user,first room,first work-phone,first home-phone,first other' - BUILDUSERNAME='pbuilder1' - BUILD_ARCH='i386' - DEBIAN_FRONTEND='noninteractive' - DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=11 ' - DISTRIBUTION='unstable' - HOME='/root' - HOST_ARCH='i386' + BASH=/bin/sh + BASHOPTS=checkwinsize:cmdhist:complete_fullquote:extquote:force_fignore:globasciiranges:globskipdots:hostcomplete:interactive_comments:patsub_replacement:progcomp:promptvars:sourcepath + BASH_ALIASES=() + BASH_ARGC=() + BASH_ARGV=() + BASH_CMDS=() + BASH_LINENO=([0]="12" [1]="0") + BASH_LOADABLES_PATH=/usr/local/lib/bash:/usr/lib/bash:/opt/local/lib/bash:/usr/pkg/lib/bash:/opt/pkg/lib/bash:. + BASH_SOURCE=([0]="/tmp/hooks/D02_print_environment" [1]="/tmp/hooks/D02_print_environment") + BASH_VERSINFO=([0]="5" [1]="2" [2]="32" [3]="1" [4]="release" [5]="i686-pc-linux-gnu") + BASH_VERSION='5.2.32(1)-release' + BUILDDIR=/build/reproducible-path + BUILDUSERGECOS='second user,second room,second work-phone,second home-phone,second other' + BUILDUSERNAME=pbuilder2 + BUILD_ARCH=i386 + DEBIAN_FRONTEND=noninteractive + DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=21 ' + DIRSTACK=() + DISTRIBUTION=unstable + EUID=0 + FUNCNAME=([0]="Echo" [1]="main") + GROUPS=() + HOME=/root + HOSTNAME=i-capture-the-hostname + HOSTTYPE=i686 + HOST_ARCH=i386 IFS=' ' - INVOCATION_ID='c103c8704f3b43829c07a9840df7d1c0' - LANG='C' - LANGUAGE='en_US:en' - LC_ALL='C' - LD_LIBRARY_PATH='/usr/lib/libeatmydata' - LD_PRELOAD='libeatmydata.so' - MAIL='/var/mail/root' - OPTIND='1' - PATH='/usr/sbin:/usr/bin:/sbin:/bin:/usr/games' - PBCURRENTCOMMANDLINEOPERATION='build' - PBUILDER_OPERATION='build' - PBUILDER_PKGDATADIR='/usr/share/pbuilder' - PBUILDER_PKGLIBDIR='/usr/lib/pbuilder' - PBUILDER_SYSCONFDIR='/etc' - PPID='8749' - PS1='# ' - PS2='> ' + INVOCATION_ID=f1881c9481d144199246f778bd450f68 + LANG=C + LANGUAGE=de_CH:de + LC_ALL=C + LD_LIBRARY_PATH=/usr/lib/libeatmydata + LD_PRELOAD=libeatmydata.so + MACHTYPE=i686-pc-linux-gnu + MAIL=/var/mail/root + OPTERR=1 + OPTIND=1 + OSTYPE=linux-gnu + PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path + PBCURRENTCOMMANDLINEOPERATION=build + PBUILDER_OPERATION=build + PBUILDER_PKGDATADIR=/usr/share/pbuilder + PBUILDER_PKGLIBDIR=/usr/lib/pbuilder + PBUILDER_SYSCONFDIR=/etc + PIPESTATUS=([0]="0") + POSIXLY_CORRECT=y + PPID=36597 PS4='+ ' - PWD='/' - SHELL='/bin/bash' - SHLVL='2' - SUDO_COMMAND='/usr/bin/timeout -k 18.1h 18h /usr/bin/ionice -c 3 /usr/bin/nice /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.8W0k2m5L/pbuilderrc_ZxgD --distribution unstable --hookdir /etc/pbuilder/first-build-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/unstable-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.8W0k2m5L/b1 --logfile b1/build.log octave-control_4.0.1-1.dsc' - SUDO_GID='112' - SUDO_UID='107' - SUDO_USER='jenkins' - TERM='unknown' - TZ='/usr/share/zoneinfo/Etc/GMT+12' - USER='root' - _='/usr/bin/systemd-run' - http_proxy='http://46.16.76.132:3128' + PWD=/ + SHELL=/bin/bash + SHELLOPTS=braceexpand:errexit:hashall:interactive-comments:posix + SHLVL=3 + SUDO_COMMAND='/usr/bin/timeout -k 24.1h 24h /usr/bin/ionice -c 3 /usr/bin/nice -n 11 /usr/bin/unshare --uts -- /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.8W0k2m5L/pbuilderrc_S2N3 --distribution unstable --hookdir /etc/pbuilder/rebuild-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/unstable-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.8W0k2m5L/b2 --logfile b2/build.log octave-control_4.0.1-1.dsc' + SUDO_GID=112 + SUDO_UID=107 + SUDO_USER=jenkins + TERM=unknown + TZ=/usr/share/zoneinfo/Etc/GMT-14 + UID=0 + USER=root + _='I: set' + http_proxy=http://213.165.73.152:3128 I: uname -a - Linux ionos2-i386 6.1.0-27-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.115-1 (2024-11-01) x86_64 GNU/Linux + Linux i-capture-the-hostname 6.1.0-27-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.115-1 (2024-11-01) x86_64 GNU/Linux I: ls -l /bin - lrwxrwxrwx 1 root root 7 Aug 4 21:30 /bin -> usr/bin -I: user script /srv/workspace/pbuilder/8749/tmp/hooks/D02_print_environment finished + lrwxrwxrwx 1 root root 7 Aug 4 2024 /bin -> usr/bin +I: user script /srv/workspace/pbuilder/36597/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy @@ -643,7 +675,7 @@ Get: 523 http://deb.debian.org/debian unstable/main i386 dh-octave all 1.8.0 [22.7 kB] Get: 524 http://deb.debian.org/debian unstable/main i386 libslicot0 i386 5.9-1+b1 [1291 kB] Get: 525 http://deb.debian.org/debian unstable/main i386 libslicot-dev i386 5.9-1+b1 [1414 kB] -Fetched 214 MB in 5s (42.2 MB/s) +Fetched 214 MB in 3s (64.8 MB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package netbase. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 19952 files and directories currently installed.) @@ -2797,7 +2829,11 @@ Building tag database... -> Finished parsing the build-deps I: Building the package -I: Running cd /build/reproducible-path/octave-control-4.0.1/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-genchanges -S > ../octave-control_4.0.1-1_source.changes +I: user script /srv/workspace/pbuilder/36597/tmp/hooks/A99_set_merged_usr starting +Not re-configuring usrmerge for unstable +I: user script /srv/workspace/pbuilder/36597/tmp/hooks/A99_set_merged_usr finished +hostname: Name or service not known +I: Running cd /build/reproducible-path/octave-control-4.0.1/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-genchanges -S > ../octave-control_4.0.1-1_source.changes dpkg-buildpackage: info: source package octave-control dpkg-buildpackage: info: source version 4.0.1-1 dpkg-buildpackage: info: source distribution unstable @@ -2862,12 +2898,12 @@ LDFLAGS="-Wl,-z,relro -llapack -lblas -L/usr/lib/gcc/i686-linux-gnu/14 -L/usr/lib/gcc/i686-linux-gnu/14/../../../i386-linux-gnu -L/usr/lib/gcc/i686-linux-gnu/14/../../../../lib -L/lib/i386-linux-gnu -L/lib/../lib -L/usr/lib/i386-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/i686-linux-gnu/14/../../.. -lgfortran -lm -lquadmath" \ /usr/bin/mkoctfile --verbose -Wall -Wno-deprecated-declarations __control_slicot_functions__.cc common.cc TG04BX.f -lslicot /usr/bin/mkoctfile --verbose -Wall -Wno-deprecated-declarations __control_helper_functions__.cc -g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-control-4.0.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wno-deprecated-declarations __control_helper_functions__.cc -o /tmp/oct-Eqn3Zp.o -gfortran -c -fPIC -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-control-4.0.1=. -fstack-protector-strong -Wall -Wno-deprecated-declarations TG04BX.f -o /tmp/oct-6HYPrE.o -g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-control-4.0.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wno-deprecated-declarations __control_slicot_functions__.cc -o /tmp/oct-zZxbZQ.o -g++ -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-control-4.0.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wno-deprecated-declarations -o __control_helper_functions__.oct /tmp/oct-Eqn3Zp.o -shared -Wl,-Bsymbolic -Wl,-z,relro -llapack -lblas -L/usr/lib/gcc/i686-linux-gnu/14 -L/usr/lib/gcc/i686-linux-gnu/14/../../../i386-linux-gnu -L/usr/lib/gcc/i686-linux-gnu/14/../../../../lib -L/lib/i386-linux-gnu -L/lib/../lib -L/usr/lib/i386-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/i686-linux-gnu/14/../../.. -lgfortran -lm -lquadmath -flto=auto -ffat-lto-objects -Wl,-z,relro -g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-control-4.0.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wno-deprecated-declarations common.cc -o /tmp/oct-YNd8lt.o -g++ -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-control-4.0.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wno-deprecated-declarations -o __control_slicot_functions__.oct /tmp/oct-6HYPrE.o /tmp/oct-zZxbZQ.o /tmp/oct-YNd8lt.o -lslicot -shared -Wl,-Bsymbolic -Wl,-z,relro -llapack -lblas -L/usr/lib/gcc/i686-linux-gnu/14 -L/usr/lib/gcc/i686-linux-gnu/14/../../../i386-linux-gnu -L/usr/lib/gcc/i686-linux-gnu/14/../../../../lib -L/lib/i386-linux-gnu -L/lib/../lib -L/usr/lib/i386-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/i686-linux-gnu/14/../../.. -lgfortran -lm -lquadmath -flto=auto -ffat-lto-objects -Wl,-z,relro +g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-control-4.0.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wno-deprecated-declarations __control_helper_functions__.cc -o /tmp/oct-hP1xPG.o +gfortran -c -fPIC -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-control-4.0.1=. -fstack-protector-strong -Wall -Wno-deprecated-declarations TG04BX.f -o /tmp/oct-TLUlVq.o +g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-control-4.0.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wno-deprecated-declarations __control_slicot_functions__.cc -o /tmp/oct-h2N7kP.o +g++ -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-control-4.0.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wno-deprecated-declarations -o __control_helper_functions__.oct /tmp/oct-hP1xPG.o -shared -Wl,-Bsymbolic -Wl,-z,relro -llapack -lblas -L/usr/lib/gcc/i686-linux-gnu/14 -L/usr/lib/gcc/i686-linux-gnu/14/../../../i386-linux-gnu -L/usr/lib/gcc/i686-linux-gnu/14/../../../../lib -L/lib/i386-linux-gnu -L/lib/../lib -L/usr/lib/i386-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/i686-linux-gnu/14/../../.. -lgfortran -lm -lquadmath -flto=auto -ffat-lto-objects -Wl,-z,relro +g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-control-4.0.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wno-deprecated-declarations common.cc -o /tmp/oct-fCVzbT.o +g++ -I/usr/include/octave-9.2.0/octave/.. -I/usr/include/octave-9.2.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-control-4.0.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wno-deprecated-declarations -o __control_slicot_functions__.oct /tmp/oct-TLUlVq.o /tmp/oct-h2N7kP.o /tmp/oct-fCVzbT.o -lslicot -shared -Wl,-Bsymbolic -Wl,-z,relro -llapack -lblas -L/usr/lib/gcc/i686-linux-gnu/14 -L/usr/lib/gcc/i686-linux-gnu/14/../../../i386-linux-gnu -L/usr/lib/gcc/i686-linux-gnu/14/../../../../lib -L/lib/i386-linux-gnu -L/lib/../lib -L/usr/lib/i386-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/i686-linux-gnu/14/../../.. -lgfortran -lm -lquadmath -flto=auto -ffat-lto-objects -Wl,-z,relro make[1]: Leaving directory '/build/reproducible-path/octave-control-4.0.1/src' copyfile /build/reproducible-path/octave-control-4.0.1/./src/__control_helper_functions__.oct /build/reproducible-path/octave-control-4.0.1/./src/__control_slicot_functions__.oct /build/reproducible-path/octave-control-4.0.1/./inst/i686-pc-linux-gnu-api-v59 The control package was installed into the directory @@ -2880,545 +2916,1295 @@ Checking package... Run the unit tests... Checking m files ... -[inst/issample.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/issample.m -***** assert (issample (1)) -***** assert (issample (pi)) -***** assert (issample (0), false) -***** assert (issample (-1), false) -***** assert (issample (-1, 1), false) -***** assert (issample ("a"), false) -***** assert (issample (eye (2)), false) -***** assert (issample (2+2i), false) -***** assert (issample (1, 0)) -***** assert (issample (0, 0)) -***** assert (issample (-1, 0), false) -***** assert (issample (pi, 0)) -***** assert (issample ("b", 0), false) -***** assert (issample (rand (3,2), 0), false) -***** assert (issample (2+2i, 0), false) -***** assert (issample (0+2i, 0), false) -***** assert (issample (-1, -1)) -***** assert (issample (0, -1), false) -***** assert (issample (1, -1)) -***** assert (issample (pi, -1)) -***** assert (issample (-pi, -1), false) -***** assert (issample ("b", -1), false) -***** assert (issample (rand (3,2), -1), false) -***** assert (issample (-2+2i, -1), false) -***** error (issample (-1, "ab")) -***** error (issample ()) -***** error (issample (-1, -1, -1)) -***** error (issample (1, pi)) -***** error (issample (5, rand (2,3))) -***** error (issample (0, 1+2i)) -30 tests, 30 passed, 0 known failure, 0 skipped -[inst/dlyap.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/dlyap.m -***** shared X, X_exp - A = [3.0 1.0 1.0 - 1.0 3.0 0.0 - 0.0 0.0 3.0]; +[inst/pzmap.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/pzmap.m +***** demo + z = tf('z',1); + G1z = (z+1)/(z-0.75)/(z^2-1*z+1); + pzmap(G1z); +***** demo + s = tf('s'); + G1 = 1/(2*s^2+3*s+4); + G2 = (1-s)/(1+s)/(s^2+s+1); + pzmap(G1,G2); +***** test + s = tf('s'); + G = (s-1)/(s-2)/(s-3); + [pol zer] = pzmap(G); + assert(sort(pol), [2 3]', 2*eps); + assert(zer, 1, eps); +***** test + s = tf('s'); + g = 1/(2*s^2+3*s+4); + pol = pzmap(g); + assert(sort(pol), sort(roots([2 3 4]')), eps); +2 tests, 2 passed, 0 known failure, 0 skipped +[inst/filt.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/filt.m +***** shared num, den, n1, d1, n2, d2, n2e, d2e + num = [0, 3]; + den = [1, 4, 2]; + sys = filt (num, den); + [n1, d1] = filtdata (sys, "vector"); + [n2, d2] = tfdata (sys, "vector"); + n2e = [3, 0]; + d2e = [1, 4, 2]; +***** assert (n1, num, 1e-4); +***** assert (d1, den, 1e-4); +***** assert (n2, n2e, 1e-4); +***** assert (d2, d2e, 1e-4); +4 tests, 4 passed, 0 known failure, 0 skipped +[inst/@lti/norm.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/norm.m +***** shared H2, Hinf + sys = ss (-1, 1, 1, 0); + H2 = norm (sys, 2); + Hinf = norm (sys, inf); +***** assert (H2, 0.7071, 1.5e-5); +***** assert (Hinf, 1, 5e-4); +***** shared H2, Hinf + a = [ 2.417 -1.002 0.5488 + 2 0 0 + 0 0.5 0 ]; + b = [ 1 + 0 + 0 ]; + c = [-0.424 0.436 -0.4552 ]; + d = [ 1 ]; + sys = ss (a, b, c, d, 0.1); + H2 = norm (sys, 2); + Hinf = norm (sys, inf); +***** assert (H2, 1.2527, 1.5e-5); +***** assert (Hinf, 2.7, 0.1); +4 tests, 4 passed, 0 known failure, 0 skipped +[inst/@lti/sminreal.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/sminreal.m +***** shared B, C - B = [25.0 24.0 15.0 - 24.0 32.0 8.0 - 15.0 8.0 40.0]; + A = ss (-2, 3, 4, 5); + B = A / A; + C = sminreal (B); # no states should be removed - X = dlyap (A.', -B); +***** assert (C.a, B.a); +***** assert (C.b, B.b); +***** assert (C.c, B.c); +***** assert (C.d, B.d); +***** shared A, B, D, E - X_exp = [2.0000 1.0000 1.0000 - 1.0000 3.0000 0.0000 - 1.0000 0.0000 4.0000]; + A = ss (-1, 1, 1, 0); + B = ss (-2, 3, 4, 5); + C = [A, B]; + D = sminreal (C(:, 1)); + E = sminreal (C(:, 2)); -***** assert (X, X_exp, 1e-4); -***** shared X, X_exp - A = [3.0 1.0 1.0 - 1.0 3.0 0.0 - 0.0 0.0 3.0]; +***** assert (D.a, A.a); +***** assert (D.b, A.b); +***** assert (D.c, A.c); +***** assert (D.d, A.d); +***** assert (E.a, B.a); +***** assert (E.b, B.b); +***** assert (E.c, B.c); +***** assert (E.d, B.d); +12 tests, 12 passed, 0 known failure, 0 skipped +[inst/@lti/prescale.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/prescale.m +***** shared Ao, Bo, Co, SCALEo, MAXREDo, Ae, Be, Ce, SCALEe, MAXREDe + A = [ 0.0 1.0000e+000 0.0 0.0 0.0 + -1.5800e+006 -1.2570e+003 0.0 0.0 0.0 + 3.5410e+014 0.0 -1.4340e+003 0.0 -5.3300e+011 + 0.0 0.0 0.0 0.0 1.0000e+000 + 0.0 0.0 0.0 -1.8630e+004 -1.4820e+000 ]; - B = [1.0 0.2 2.0 - 0.5 0.5 1.0 - 1.0 -2.0 1.0]; + B = [ 0.0 0.0 + 1.1030e+002 0.0 + 0.0 0.0 + 0.0 0.0 + 0.0 8.3330e-003 ]; - X = dlyap (A.', -B); + C = [ 1.0000e+000 0.0 0.0 0.0 0.0 + 0.0 0.0 1.0000e+000 0.0 0.0 + 0.0 0.0 0.0 1.0000e+000 0.0 + 6.6640e-001 0.0 -6.2000e-013 0.0 0.0 + 0.0 0.0 -1.0000e-003 1.8960e+006 1.5080e+002 ]; - X_exp = [0.1390 -0.0514 0.1831 - -0.0086 0.0676 0.0422 - 0.2005 -0.3233 -0.0362]; + MAXRED = 0.0; -***** assert (X, X_exp, 1e-4); -***** shared X, X_exp - A = [1.0 2.0 3.0 - 6.0 7.0 8.0 - 9.0 2.0 3.0]; + [Ao, Bo, Co, MAXREDo, SCALEo] = __sl_tb01id__ (A, B, C, MAXRED); - B = [7.0 2.0 3.0 - 2.0 1.0 2.0 - 3.0 4.0 1.0]; + Ae = [ 0.0000000D+00 0.1000000D+05 0.0000000D+00 0.0000000D+00 0.0000000D+00 + -0.1580000D+03 -0.1257000D+04 0.0000000D+00 0.0000000D+00 0.0000000D+00 + 0.3541000D+05 0.0000000D+00 -0.1434000D+04 0.0000000D+00 -0.5330000D+03 + 0.0000000D+00 0.0000000D+00 0.0000000D+00 0.0000000D+00 0.1000000D+03 + 0.0000000D+00 0.0000000D+00 0.0000000D+00 -0.1863000D+03 -0.1482000D+01 ]; - C = [271.0 135.0 147.0 - 923.0 494.0 482.0 - 578.0 383.0 287.0]; + Be = [ 0.0000000D+00 0.0000000D+00 + 0.1103000D+04 0.0000000D+00 + 0.0000000D+00 0.0000000D+00 + 0.0000000D+00 0.0000000D+00 + 0.0000000D+00 0.8333000D+02 ]; - X = dlyap (-A, B, C); + Ce = [ 0.1000000D-04 0.0000000D+00 0.0000000D+00 0.0000000D+00 0.0000000D+00 + 0.0000000D+00 0.0000000D+00 0.1000000D+06 0.0000000D+00 0.0000000D+00 + 0.0000000D+00 0.0000000D+00 0.0000000D+00 0.1000000D-05 0.0000000D+00 + 0.6664000D-05 0.0000000D+00 -0.6200000D-07 0.0000000D+00 0.0000000D+00 + 0.0000000D+00 0.0000000D+00 -0.1000000D+03 0.1896000D+01 0.1508000D-01 ]; - X_exp = [2.0000 3.0000 6.0000 - 4.0000 7.0000 1.0000 - 5.0000 3.0000 2.0000]; + SCALEe = [0.1000000D-04 0.1000000D+00 0.1000000D+06 0.1000000D-05 0.1000000D-03 ]; -***** assert (X, X_exp, 1e-4); -***** shared X, X_exp - A = [3.0 1.0 1.0 - 1.0 3.0 0.0 - 1.0 0.0 2.0]; + MAXREDe = 0.3488E+10; - E = [1.0 3.0 0.0 - 3.0 2.0 1.0 - 1.0 0.0 1.0]; +***** assert (Ao, Ae, 1e-4); +***** assert (Bo, Be, 1e-4); +***** assert (Co, Ce, 1e-4); +***** assert (MAXREDo, MAXREDe, 1e6); +***** assert (SCALEo, SCALEe.', 1e-4); +***** shared Ao, Eo, Bo, Co, LSCALEo, RSCALEo, Ae, Ee, Be, Ce, LSCALEe, RSCALEe + A = [ -1 0 0 0.003 + 0 0 0.1000 0.02 + 100 10 0 0.4 + 0 0 0 0.0]; - B = [ -3.0 -10.0 7.0 - -10.0 -14.0 -2.0 - 7.0 -2.0 9.0 ]; + E = [ 1 0.2 0 0.0 + 0 1 0 0.01 + 300 90 6 0.3 + 0 0 20 0.0]; - X = dlyap (A, B, [], E); + B = [ 10 0 + 0 0 + 0 1000 + 10000 10000]; - X_exp = [-2.0000 -1.0000 0.0000 - -1.0000 -3.0000 -1.0000 - 0.0000 -1.0000 -3.0000]; + C = [ -0.1 0.0 0.001 0.0 + 0.0 0.01 -0.001 0.0001]; -***** assert (X, X_exp, 1e-4); + TRESH = 0.0; + + [Ao, Eo, Bo, Co, LSCALEo, RSCALEo] = __sl_tg01ad__ (A, E, B, C, TRESH); + + Ae = [ -1.0000 0.0000 0.0000 0.3000 + 0.0000 0.0000 1.0000 2.0000 + 1.0000 0.1000 0.0000 0.4000 + 0.0000 0.0000 0.0000 0.0000]; + + Ee = [ 1.0000 0.2000 0.0000 0.0000 + 0.0000 1.0000 0.0000 1.0000 + 3.0000 0.9000 0.6000 0.3000 + 0.0000 0.0000 0.2000 0.0000 ]; + + Be = [100.0000 0.0000 + 0.0000 0.0000 + 0.0000 100.0000 + 100.0000 100.0000 ]; + + Ce = [ -0.0100 0.0000 0.0010 0.0000 + 0.0000 0.0010 -0.0010 0.0010]; + + LSCALEe = [ 10.0000 10.0000 0.1000 0.0100 ]; + + RSCALEe = [ 0.1000 0.1000 1.0000 10.0000 ]; + +***** assert (Ao, Ae, 1e-4); +***** assert (Eo, Ee, 1e-4); +***** assert (Bo, Be, 1e-4); +***** assert (Co, Ce, 1e-4); +***** assert (LSCALEo, LSCALEe.', 1e-4); +***** assert (RSCALEo, RSCALEe.', 1e-4); +***** shared Ao, Bo, Co, INFOo, Ae, Be, Ce, SCALEe + A = [ 0.0 1.0000e+000 0.0 0.0 0.0 + -1.5800e+006 -1.2570e+003 0.0 0.0 0.0 + 3.5410e+014 0.0 -1.4340e+003 0.0 -5.3300e+011 + 0.0 0.0 0.0 0.0 1.0000e+000 + 0.0 0.0 0.0 -1.8630e+004 -1.4820e+000 ]; + + B = [ 0.0 0.0 + 1.1030e+002 0.0 + 0.0 0.0 + 0.0 0.0 + 0.0 8.3330e-003 ]; + + C = [ 1.0000e+000 0.0 0.0 0.0 0.0 + 0.0 0.0 1.0000e+000 0.0 0.0 + 0.0 0.0 0.0 1.0000e+000 0.0 + 6.6640e-001 0.0 -6.2000e-013 0.0 0.0 + 0.0 0.0 -1.0000e-003 1.8960e+006 1.5080e+002 ]; + + SYS = ss (A, B, C); + + [SYSo, INFOo] = prescale (SYS); + + [Ao, Bo, Co] = ssdata (SYSo); + + Ae = [ 0.0000000D+00 0.1000000D+05 0.0000000D+00 0.0000000D+00 0.0000000D+00 + -0.1580000D+03 -0.1257000D+04 0.0000000D+00 0.0000000D+00 0.0000000D+00 + 0.3541000D+05 0.0000000D+00 -0.1434000D+04 0.0000000D+00 -0.5330000D+03 + 0.0000000D+00 0.0000000D+00 0.0000000D+00 0.0000000D+00 0.1000000D+03 + 0.0000000D+00 0.0000000D+00 0.0000000D+00 -0.1863000D+03 -0.1482000D+01 ]; + + Be = [ 0.0000000D+00 0.0000000D+00 + 0.1103000D+04 0.0000000D+00 + 0.0000000D+00 0.0000000D+00 + 0.0000000D+00 0.0000000D+00 + 0.0000000D+00 0.8333000D+02 ]; + + Ce = [ 0.1000000D-04 0.0000000D+00 0.0000000D+00 0.0000000D+00 0.0000000D+00 + 0.0000000D+00 0.0000000D+00 0.1000000D+06 0.0000000D+00 0.0000000D+00 + 0.0000000D+00 0.0000000D+00 0.0000000D+00 0.1000000D-05 0.0000000D+00 + 0.6664000D-05 0.0000000D+00 -0.6200000D-07 0.0000000D+00 0.0000000D+00 + 0.0000000D+00 0.0000000D+00 -0.1000000D+03 0.1896000D+01 0.1508000D-01 ]; + + SCALEe = [0.1000000D-04 0.1000000D+00 0.1000000D+06 0.1000000D-05 0.1000000D-03 ]; + +***** assert (Ao, Ae, 1e-4); +***** assert (Bo, Be, 1e-4); +***** assert (Co, Ce, 1e-4); +***** assert (INFOo.SL.^-1, SCALEe.', 1e-4); +***** assert (INFOo.SR, SCALEe.', 1e-4); +***** shared Ao, Eo, Bo, Co, INFOo, Ae, Ee, Be, Ce, LSCALEe, RSCALEe + A = [ -1 0 0 0.003 + 0 0 0.1000 0.02 + 100 10 0 0.4 + 0 0 0 0.0]; + + E = [ 1 0.2 0 0.0 + 0 1 0 0.01 + 300 90 6 0.3 + 0 0 20 0.0]; + + B = [ 10 0 + 0 0 + 0 1000 + 10000 10000]; + + C = [ -0.1 0.0 0.001 0.0 + 0.0 0.01 -0.001 0.0001]; + + SYS = dss (A, B, C, [], E); + + [SYSo, INFOo] = prescale (SYS); + + [Ao, Bo, Co, ~, Eo] = dssdata (SYSo); + + Ae = [ -1.0000 0.0000 0.0000 0.3000 + 0.0000 0.0000 1.0000 2.0000 + 1.0000 0.1000 0.0000 0.4000 + 0.0000 0.0000 0.0000 0.0000]; + + Ee = [ 1.0000 0.2000 0.0000 0.0000 + 0.0000 1.0000 0.0000 1.0000 + 3.0000 0.9000 0.6000 0.3000 + 0.0000 0.0000 0.2000 0.0000 ]; + + Be = [100.0000 0.0000 + 0.0000 0.0000 + 0.0000 100.0000 + 100.0000 100.0000 ]; + + Ce = [ -0.0100 0.0000 0.0010 0.0000 + 0.0000 0.0010 -0.0010 0.0010]; + + LSCALEe = [ 10.0000 10.0000 0.1000 0.0100 ]; + + RSCALEe = [ 0.1000 0.1000 1.0000 10.0000 ]; + +***** assert (Ao, Ae, 1e-4); +***** assert (Eo, Ee, 1e-4); +***** assert (Bo, Be, 1e-4); +***** assert (Co, Ce, 1e-4); +***** assert (INFOo.SL, LSCALEe.', 1e-4); +***** assert (INFOo.SR, RSCALEe.', 1e-4); +22 tests, 22 passed, 0 known failure, 0 skipped +[inst/@lti/plus.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/plus.m +***** shared M, Me + A1 = [ 1.0 0.0 -1.0 + 0.0 -1.0 1.0 + 1.0 1.0 2.0 ]; + + B1 = [ 1.0 1.0 0.0 + 2.0 0.0 1.0 ].'; + + C1 = [ 3.0 -2.0 1.0 + 0.0 1.0 0.0 ]; + + D1 = [ 1.0 0.0 + 0.0 1.0 ]; + + A2 = [-3.0 0.0 0.0 + 1.0 0.0 1.0 + 0.0 -1.0 2.0 ]; + + B2 = [ 0.0 -1.0 0.0 + 1.0 0.0 2.0 ].'; + + C2 = [ 1.0 1.0 0.0 + 1.0 1.0 -1.0 ]; + + D2 = [ 1.0 1.0 + 0.0 1.0 ]; + + sys1 = ss (A1, B1, C1, D1); + sys2 = ss (A2, B2, C2, D2); + sys = sys1 + sys2; + [A, B, C, D] = ssdata (sys); + M = [A, B; C, D]; + + Ae = [ 1.0000 0.0000 -1.0000 0.0000 0.0000 0.0000 + 0.0000 -1.0000 1.0000 0.0000 0.0000 0.0000 + 1.0000 1.0000 2.0000 0.0000 0.0000 0.0000 + 0.0000 0.0000 0.0000 -3.0000 0.0000 0.0000 + 0.0000 0.0000 0.0000 1.0000 0.0000 1.0000 + 0.0000 0.0000 0.0000 0.0000 -1.0000 2.0000 ]; + + Be = [ 1.0000 2.0000 + 1.0000 0.0000 + 0.0000 1.0000 + 0.0000 1.0000 + -1.0000 0.0000 + 0.0000 2.0000 ]; + + Ce = [ 3.0000 -2.0000 1.0000 1.0000 1.0000 0.0000 + 0.0000 1.0000 0.0000 1.0000 1.0000 -1.0000 ]; + + De = [ 2.0000 1.0000 + 0.0000 2.0000 ]; + + Me = [Ae, Be; Ce, De]; + +***** assert (M, Me, 1e-4); +1 test, 1 passed, 0 known failure, 0 skipped +[inst/@lti/connect.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/connect.m +***** shared T, Texp + P = Boeing707; + I = ss (-eye (2)); + I.inname = P.outname; + I.outname = P.inname; + T = connect (P, I, P.inname, P.outname); + Texp = feedback (P); +***** assert (T.a, Texp.a, 1e-4); +***** assert (T.b, Texp.b, 1e-4); +***** assert (T.c, Texp.c, 1e-4); +***** assert (T.d, Texp.d, 1e-4); 4 tests, 4 passed, 0 known failure, 0 skipped -[inst/btamodred.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/btamodred.m -***** shared Mo, Me, Info, HSVe - A = [ -26.4000, 6.4023, 4.3868; - 32.0000, 0, 0; - 0, 8.0000, 0 ]; +[inst/@lti/d2d.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/d2d.m +***** shared num, den, z, p, k + H1 = zpk (0.7, 0.5, 1, 0.1); + H2 = d2d (H1, 0.05); + H3 = d2d (H2, 0.1); + [num, den] = tfdata (H2, "vector"); + [z, p, k] = zpkdata (H3, "vector"); +***** assert (num, [1.00000 -0.82426], 1e-4); +***** assert (den, [1.00000 -0.70711], 1e-4); +***** assert (z, 0.7, 1e-4); +***** assert (p, 0.5, 1e-4); +***** assert (k, 1.0, 1e-4); +5 tests, 5 passed, 0 known failure, 0 skipped +[inst/@lti/c2d.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/c2d.m +***** shared Mo, Me + A = [ 1.0 0.5 + 0.5 1.0 ].'; - B = [ 16 - 0 - 0 ]; + B = [ 0.0 -1.0 + 1.0 0.0 ].'; - C = [ 9.2994 1.1624 0.1090 ]; + C = [ -1.0 0.0 + 0.0 1.0 ].'; - D = [ 0 ]; + D = [ 1.0 0.0 + 0.0 -1.0 ].'; - G = ss (A, B, C, D); % "scaled", false + [Ao, Bo, Co, Do] = __sl_ab04md__ (A, B, C, D, 1.0, 1.0, false); - AV = [ -1.0000, 0, 4.0000, -9.2994, -1.1624, -0.1090; - 0, 2.0000, 0, -9.2994, -1.1624, -0.1090; - 0, 0, -3.0000, -9.2994, -1.1624, -0.1090; - 16.0000, 16.0000, 16.0000, -26.4000, 6.4023, 4.3868; - 0, 0, 0, 32.0000, 0, 0; - 0, 0, 0, 0, 8.0000, 0 ]; + Ae = [ -1.0000 -4.0000 + -4.0000 -1.0000 ]; - BV = [ 1 - 1 - 1 - 0 - 0 - 0 ]; + Be = [ 2.8284 0.0000 + 0.0000 -2.8284 ]; - CV = [ 1 1 1 0 0 0 ]; + Ce = [ 0.0000 2.8284 + -2.8284 0.0000 ]; - DV = [ 0 ]; + De = [ -1.0000 0.0000 + 0.0000 -3.0000 ]; - V = ss (AV, BV, CV, DV); + Mo = [Ao, Bo; Co, Do]; + Me = [Ae, Be; Ce, De]; - [Gr, Info] = btamodred (G, 2, "left", V); +***** assert (Mo, Me, 1e-4); +***** shared Mo, Me + A = [ 1.0 0.5 + 0.5 1.0 ].'; - Ae = [ 9.1900 0.0000 - 0.0000 -34.5297 ]; + B = [ 0.0 -1.0 + 1.0 0.0 ].'; - Be = [ -11.9593 - -16.9329 ]; + C = [ -1.0 0.0 + 0.0 1.0 ].'; - Ce = [ -2.8955 -6.9152 ]; + D = [ 1.0 0.0 + 0.0 -1.0 ].'; - De = [ 0.0000 ]; + [Ao, Bo, Co, Do] = ssdata (c2d (ss (A, B, C, D), 2, "tustin")); - # Since btamodred approximates the input/output behavior only - # input/output behavior is tested using n first Markov parameters. - # The state space representaton might have different signs - # of the states. - # By multiplying the matrices for the Markov parameters, numeric errors - # would propagate, therefor the accuracy of the results are limited to - # the accuracy of the given expected results + Ae = [ -1.0000 -4.0000 + -4.0000 -1.0000 ]; - [Ao,Bo,Co,Do] = ssdata (Gr); - Ao = round (Ao*1e4)/1e4; - Bo = round (Bo*1e4)/1e4; - Co = round (Co*1e4)/1e4; - Do = round (Do*1e4)/1e4; + Be = [ 2.8284 0.0000 + 0.0000 -2.8284 ]; - n = size(Ao,1); - m = size(Bo,2); - p = size(Co,1); - Mo = zeros (p,(n+1)*m); - Me = zeros (p,(n+1)*m); - Mo(:,1:m) = Do; - Me(:,1:m) = De; - - Aoi = eye (n,n); - Aei = eye (n,n); - for i = 1:n - Mo(:,(i-1)*m+1:i*m) = Co*Aoi*Bo; - Me(:,(i-1)*m+1:i*m) = Ce*Aei*Be; - Aoi = Aoi*Ao; - Aei = Aei*Ae; - endfor + Ce = [ 0.0000 2.8284 + -2.8284 0.0000 ]; - HSVe = [ 3.8253 0.2005 ].'; + De = [ -1.0000 0.0000 + 0.0000 -3.0000 ]; -***** xtest assert (Mo, Me, 1e-4); -***** assert (Info.hsv, HSVe, 1e-4); -2 tests, 2 passed, 0 known failure, 0 skipped -[inst/fitfrd.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/fitfrd.m -***** shared Yo, Ye - SYS = ss (-1, 1, 1, 0); - T = 0:0.1:50; - Ye = step (SYS, T); - W = logspace (-2, 2, 100); - FR = frd (SYS, W); - N = 1; - SYSID = fitfrd (FR, N, 1); - Yo = step (SYSID, T); -***** assert (Yo, Ye, 1e-2); + Mo = [Ao, Bo; Co, Do]; + Me = [Ae, Be; Ce, De]; + +***** assert (Mo, Me, 1e-4); +***** shared Mo, Me + A = [ 1.0 0.5 + 0.5 1.0 ]; + + B = [ 0.0 -1.0 + 1.0 0.0 ]; + + C = [ -1.0 0.0 + 0.0 1.0 ]; + + D = [ 1.0 0.0 + 0.0 -1.0 ]; + + [Ao, Bo, Co, Do] = ssdata (d2c (c2d (ss (A, B, C, D), 2, "tustin"), "tustin")); + + Mo = [Ao, Bo; Co, Do]; + Me = [A, B; C, D]; + +***** assert (Mo, Me, 1e-4); +***** shared Mo, Me + A = [ 1.0 0.5 + 0.5 1.0 ]; + + B = [ 0.0 -1.0 + 1.0 0.0 ]; + + C = [ -1.0 0.0 + 0.0 1.0 ]; + + D = [ 1.0 0.0 + 0.0 -1.0 ]; + + [Ao, Bo, Co, Do] = ssdata (d2c (c2d (ss (A, B, C, D), 2, "zoh"), "zoh")); + + Mo = [Ao, Bo; Co, Do]; + Me = [A, B; C, D]; + +***** assert (Mo, Me, 1e-4); +***** shared Mo, Me + A = [ 1.0 0.5 + 0.5 1.0 ]; + + B = [ 0.0 -1.0 + 1.0 0.0 ]; + + C = [ -1.0 0.0 + 0.0 1.0 ]; + + D = [ 1.0 0.0 + 0.0 -1.0 ]; + + [Ao, Bo, Co, Do] = ssdata (c2d (ss (A, B, C, D), 2, "foh")); + + Ae = [ 11.4019 8.6836 + 8.6836 11.4019 ]; + + Be = [ 37.5206 -43.4256 + 43.4256 -37.5206 ]; + + Ce = [ -1.0000 0.0000 + 0.0000 1.0000 ]; + + De = [ -0.0690 2.5056 + 2.5056 -2.0690 ]; + + Mo = [Ao, Bo; Co, Do]; + Me = [Ae, Be; Ce, De]; + +***** assert (Mo, Me, 1e-4); +***** shared Mo, Me + A = [ 1.0 0.5 + 0.5 1.0 ]; + + B = [ 0.0 -1.0 + 1.0 0.0 ]; + + C = [ -1.0 0.0 + 0.0 1.0 ]; + + D = [ 1.0 0.0 + 0.0 -1.0 ]; + + [Ao, Bo, Co, Do] = ssdata (d2c (c2d (ss (A, B, C, D), 2, "prewarp", 1000), "prewarp", 1000)); + + Mo = [Ao, Bo; Co, Do]; + Me = [A, B; C, D]; + +***** assert (Mo, Me, 1e-4); +***** shared Aex, Aexint, Aex_exp, Aexint_exp + A = [ 5.0 4.0 3.0 2.0 1.0 + 1.0 6.0 0.0 4.0 3.0 + 2.0 0.0 7.0 6.0 5.0 + 1.0 3.0 1.0 8.0 7.0 + 2.0 5.0 7.0 1.0 9.0 ]; + + Aex_exp = [ 1.8391 0.9476 0.7920 0.8216 0.7811 + 0.3359 2.2262 0.4013 1.0078 1.0957 + 0.6335 0.6776 2.6933 1.6155 1.8502 + 0.4804 1.1561 0.9110 2.7461 2.0854 + 0.7105 1.4244 1.8835 1.0966 3.4134 ]; + + Aexint_exp = [ 0.1347 0.0352 0.0284 0.0272 0.0231 + 0.0114 0.1477 0.0104 0.0369 0.0368 + 0.0218 0.0178 0.1624 0.0580 0.0619 + 0.0152 0.0385 0.0267 0.1660 0.0732 + 0.0240 0.0503 0.0679 0.0317 0.1863 ]; + + [Aex, Aexint] = __sl_mb05nd__ (A, 0.1, 0.0001); + +***** assert (Aex, Aex_exp, 1e-4); +***** assert (Aexint, Aexint_exp, 1e-4); +8 tests, 8 passed, 0 known failure, 0 skipped +[inst/@lti/dcgain.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/dcgain.m +***** assert( dcgain( tf(1,[1,1]) ) , 1 ) +***** assert( dcgain( tf(2,[1,1]) ) , 2 ) +***** assert( dcgain( ss([0,1;-2,-3],[0;1],[1,0],0) ) , 0.5 ) +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/@lti/inv.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/inv.m +***** shared M, Me + A = [ 1.0 2.0 0.0 + 4.0 -1.0 0.0 + 0.0 0.0 1.0 ]; + + B = [ 1.0 0.0 + 0.0 1.0 + 1.0 0.0 ]; + + C = [ 0.0 1.0 -1.0 + 0.0 0.0 1.0 ]; + + D = [ 4.0 0.0 + 0.0 1.0 ]; + + sys = ss (A, B, C, D); + sysinv = inv (sys); + [Ai, Bi, Ci, Di] = ssdata (sysinv); + M = [Ai, Bi; Ci, Di]; + + Ae = [ 1.0000 1.7500 0.2500 + 4.0000 -1.0000 -1.0000 + 0.0000 -0.2500 1.2500 ]; + + Be = [-0.2500 0.0000 + 0.0000 -1.0000 + -0.2500 0.0000 ]; + + Ce = [ 0.0000 0.2500 -0.2500 + 0.0000 0.0000 1.0000 ]; + + De = [ 0.2500 0.0000 + 0.0000 1.0000 ]; + + Me = [Ae, -Be; -Ce, De]; + +***** assert (M, Me, 1e-4); 1 test, 1 passed, 0 known failure, 0 skipped -[inst/btaconred.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/btaconred.m -***** shared Mo, Me, Info, HSVCe - A = [ -1. 0. 4. - 0. 2. 0. - 0. 0. -3. ]; +[inst/@lti/zero.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/zero.m +***** shared z, z_exp + A = [ -0.7 -0.0458 -12.2 0 + 0 -0.014 -0.2904 -0.562 + 1 -0.0057 -1.4 0 + 1 0 0 0 ]; - B = [ 1. - 1. - 1. ]; + B = [ -19.1 -3.1 + -0.0119 -0.0096 + -0.14 -0.72 + 0 0 ]; - C = [ 1. 1. 1. ]; + C = [ 0 0 -1 1 + 0 0 0.733 0 ]; - D = [ 0. ]; + D = [ 0 0 + 0.0768 0.1134 ]; - G = ss (A, B, C, D, "scaled", true); + sys = ss (A, B, C, D, "scaled", true); + z = sort (zero (sys)); - AC = [ -26.4000, 6.4023, 4.3868; - 32.0000, 0, 0; - 0, 8.0000, 0 ]; + z_exp = sort ([-13.2759; 12.5774; -0.0155]); - BC = [ -16 - 0 - 0 ]; +***** assert (z, z_exp, 1e-4); +***** shared z, z_exp, info, rank_exp, infz_exp, kronr_exp, kronl_exp + A = [ 1.0 0.0 0.0 0.0 0.0 0.0 + 0.0 1.0 0.0 0.0 0.0 0.0 + 0.0 0.0 3.0 0.0 0.0 0.0 + 0.0 0.0 0.0 -4.0 0.0 0.0 + 0.0 0.0 0.0 0.0 -1.0 0.0 + 0.0 0.0 0.0 0.0 0.0 3.0 ]; - CC = [ 9.2994 1.1624 0.1090 ]; + B = [ 0.0 -1.0 + -1.0 0.0 + 1.0 -1.0 + 0.0 0.0 + 0.0 1.0 + -1.0 -1.0 ]; - DC = [ 0 ]; + C = [ 1.0 0.0 0.0 1.0 0.0 0.0 + 0.0 1.0 0.0 1.0 0.0 1.0 + 0.0 0.0 1.0 0.0 0.0 1.0 ]; - K = ss (AC, BC, CC, DC, "scaled", true); + D = [ 0.0 0.0 + 0.0 0.0 + 0.0 0.0 ]; - [Kr, Info] = btaconred (G, K, 2, "weight", "input", "feedback", "+"); + sys = ss (A, B, C, D, "scaled", true); + [z, ~, info] = zero (sys); - Ae = [ 9.1900 0.0000 - 0.0000 -34.5297 ]; + z_exp = [ 2.0000 + -1.0000 ]; - Be = [ -11.9593 - 86.3137 ]; + rank_exp = 2; + infz_exp = 2; + kronr_exp = zeros (1, 0); + kronl_exp = 2; - Ce = [ 2.8955 -1.3566 ]; +***** assert (z, z_exp, 1e-4); +***** assert (info.rank, rank_exp); +***** assert (info.infz, infz_exp); +***** assert (info.kronr, kronr_exp); +***** assert (info.kronl, kronl_exp); +***** shared z, z_exp, info, rank_exp, infz_exp, kronr_exp, kronl_exp + A = [ 1 0 0 0 0 0 0 0 0 + 0 1 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 0 + 0 0 0 1 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 + 0 0 0 0 0 1 0 0 0 + 0 0 0 0 0 0 1 0 0 + 0 0 0 0 0 0 0 1 0 + 0 0 0 0 0 0 0 0 1 ]; - De = [ 0.0000 ]; + E = [ 0 0 0 0 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 + 0 1 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 + 0 0 0 1 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 + 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 1 0 0 + 0 0 0 0 0 0 0 1 0 ]; - # Since btaconred approximates an output controller, - # only its input/output behavior is important and is tested - # using n first Markov parameters. - # The state space representaton might have different signs - # of the states. - # By multiplying the matrices for the Markov parameters, numeric errors - # would propagate, therefor the accuracy of the results are limited to - # the accuracy of the given expected results + B = [ -1 0 0 + 0 0 0 + 0 0 0 + 0 -1 0 + 0 0 0 + 0 0 0 + 0 0 -1 + 0 0 0 + 0 0 0 ]; - [Ao,Bo,Co,Do] = ssdata (Kr); - Ao = round (Ao*1e4)/1e4; - Bo = round (Bo*1e4)/1e4; - Co = round (Co*1e4)/1e4; - Do = round (Do*1e4)/1e4; + C = [ 0 1 1 0 3 4 0 0 2 + 0 1 0 0 4 0 0 2 0 + 0 0 1 0 -1 4 0 -2 2 ]; - n = size(Ao,1); - m = size(Bo,2); - p = size(Co,1); - Mo = zeros (p,(n+1)*m); - Me = zeros (p,(n+1)*m); - Mo(:,1:m) = Do; - Me(:,1:m) = De; + D = [ 1 2 -2 + 0 -1 -2 + 0 0 0 ]; + + sys = dss (A, B, C, D, E, "scaled", true); + [z, ~, info] = zero (sys); + + z_exp = 1; + + rank_exp = 11; + infz_exp = [0, 1]; + kronr_exp = 2; + kronl_exp = 1; + +***** assert (z, z_exp, 1e-4); +***** assert (info.rank, rank_exp); +***** assert (info.infz, infz_exp); +***** assert (info.kronr, kronr_exp); +***** assert (info.kronl, kronl_exp); +***** shared p, pi, z, zi, k, ki, p_tf, pi_tf, z_tf, zi_tf, k_tf, ki_tf + P = ss (-2, 3, 4, 5); + Pi = inv (P); + + p = pole (P); + [z, k] = zero (P); + + pi = pole (Pi); + [zi, ki] = zero (Pi); + + P_tf = tf (P); + Pi_tf = tf (Pi); + + p_tf = pole (P_tf); + [z_tf, k_tf] = zero (P_tf); + + pi_tf = pole (Pi_tf); + [zi_tf, ki_tf] = zero (Pi_tf); + +***** assert (p, zi, 1e-4); +***** assert (z, pi, 1e-4); +***** assert (k, inv (ki), 1e-4); +***** assert (p_tf, zi_tf, 1e-4); +***** assert (z_tf, pi_tf, 1e-4); +***** assert (k_tf, inv (ki_tf), 1e-4); +***** shared z_inv, z_tra, z_inp, z_out, z_sys, z_inv_e, z_tra_e, z_inp_e, z_out_e, z_sys_e + A = diag ([1, 1, 3, -4, -1, 3]); - Aoi = eye (n,n); - Aei = eye (n,n); - for i = 1:n - Mo(:,(i-1)*m+1:i*m) = Co*Aoi*Bo; - Me(:,(i-1)*m+1:i*m) = Ce*Aei*Be; - Aoi = Aoi*Ao; - Aei = Aei*Ae; - endfor + B = [ 0, -1 + -1, 0 + 1, -1 + 0, 0 + 0, 1 + -1, -1 ]; + + C = [ 1, 0, 0, 1, 0, 0 + 0, 1, 0, 1, 0, 1 + 0, 0, 1, 0, 0, 1 ]; + + D = zeros (3, 2); + + SYS = ss (A, B, C, D); - HSVCe = [ 3.8253 0.2005 ].'; + z_inv = zero (SYS); + z_tra = zero (SYS, "transmission"); + z_inp = zero (SYS, "input decoupling"); + z_out = zero (SYS, "output decoupling"); + z_sys = zero (SYS, "system"); -***** xtest assert (Mo, Me, 1e-4); -***** assert (Info.hsvc, HSVCe, 1e-4); -2 tests, 2 passed, 0 known failure, 0 skipped -[inst/dsort.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/dsort.m -***** shared s_exp, ndx_exp, s_obs, ndx_obs - p = [-0.2410+0.5573i; - -0.2410-0.5573i; - 0.1503; - -0.0972; - -0.2590]; - s_exp = [ -0.2410+0.5573i; - -0.2410-0.5573i; - -0.2590; - 0.1503; - -0.0972]; - ndx_exp = [ 1; - 2; - 5; - 3; - 4]; - [s_obs, ndx_obs] = dsort(p); -***** assert(s_obs, s_exp, 0); -***** assert(ndx_obs, ndx_exp, 0); -2 tests, 2 passed, 0 known failure, 0 skipped -[inst/damp.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/damp.m -***** test - A = [-1, 0, 0; - 0, -2, 0; - 0, 0, -3 ]; + z_inv_e = [2; -1]; + z_tra_e = [2]; + z_inp_e = [-4]; + z_out_e = [-1]; + z_sys_e = [-4, -1, 2]; + +***** assert (z_inv, z_inv_e, 1e-4); +***** assert (z_tra, z_tra_e, 1e-4); +***** assert (z_inp, z_inp_e, 1e-4); +***** assert (z_out, z_out_e, 1e-4); +***** assert (z_sys, z_sys_e, 1e-4); +***** shared z_inv, z_tra, z_inp, z_out, z_sys, z_inv_e, z_tra_e, z_inp_e, z_out_e, z_sys_e + A = diag ([1, 1, 3, -4, -1, 3]); + + B = [ 0, -1 + -1, 0 + 1, -1 + 0, 0 + 0, 1 + -1, -1 ]; + + C = [ 1, 0, 0, 1, 0, 0 + 0, 1, 0, 1, 0, 1 + 0, 0, 1, 0, 0, 1 ]; + + D = zeros (3, 2); - Wn_exp = [1; - 2; - 3 ]; + E = eye (6); + + SYS = dss (A, B, C, D, E); - zeta_exp = [1; - 1; + z_inv = zero (SYS); + z_tra = zero (SYS, "transmission"); + z_inp = zero (SYS, "input decoupling"); + z_out = zero (SYS, "output decoupling"); + z_sys = zero (SYS, "system"); + + z_inv_e = [2; -1]; + z_tra_e = [2]; + z_inp_e = [-4]; + z_out_e = [-1]; + z_sys_e = [-4, -1, 2]; + +***** assert (z_inv, z_inv_e, 1e-4); +***** assert (z_tra, z_tra_e, 1e-4); +***** assert (z_inp, z_inp_e, 1e-4); +***** assert (z_out, z_out_e, 1e-4); +***** assert (z_sys, z_sys_e, 1e-4); +27 tests, 27 passed, 0 known failure, 0 skipped +[inst/@lti/minreal.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/minreal.m +***** shared C, D + + A = ss (-2, 3, 4, 5); + B = A / A; + C = minreal (B, 1e-15); + D = ss (1); + +***** assert (C.a, D.a); +***** assert (C.b, D.b); +***** assert (C.c, D.c); +***** assert (C.d, D.d); +***** shared M, Me + A = [ 1.0 2.0 0.0 + 4.0 -1.0 0.0 + 0.0 0.0 1.0 ]; + + B = [ 1.0 + 0.0 + 1.0 ]; + + C = [ 0.0 1.0 -1.0 + 0.0 0.0 1.0 ]; + + D = zeros (2, 1); + + [Ar, Br, Cr] = __sl_tb01pd__ (A, B, C, 0.0, true); + M = [Ar, Br; Cr, D]; + + Ae = [ 1.0000 -1.4142 1.4142 + -2.8284 0.0000 1.0000 + 2.8284 1.0000 0.0000 ]; + + Be = [-1.0000 + 0.7071 + 0.7071 ]; + + Ce = [ 0.0000 0.0000 -1.4142 + 0.0000 0.7071 0.7071 ]; + + De = zeros (2, 1); + + Me = [Ae, Be; Ce, De]; + +***** assert (M, Me, 1e-4); +***** shared Ar, Br, Cr, Dr, Er, Ae, Be, Ce, De, Ee, num, den, num2, den2, num3, num3a, den3, den3a + A = [ -2 -3 0 0 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 + 0 0 -2 -3 0 0 0 0 0 + 0 0 1 0 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 + 0 0 0 0 0 1 0 0 0 + 0 0 0 0 0 0 1 0 0 + 0 0 0 0 0 0 0 1 0 + 0 0 0 0 0 0 0 0 1 ]; + + E = [ 1 0 0 0 0 0 0 0 0 + 0 1 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 0 + 0 0 0 1 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 + 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 1 0 0 + 0 0 0 0 0 0 0 1 0 ]; + + B = [ 1 0 + 0 0 + 0 1 + 0 0 + -1 0 + 0 0 + 0 -1 + 0 0 + 0 0 ]; + + C = [ 1 0 1 -3 0 1 0 2 0 + 0 1 1 3 0 1 0 0 1 ]; + + D = zeros (2, 2); + + sys = dss (A, B, C, D, E, "scaled", true); + sysmin = minreal (sys, 0.0); + [Ar, Br, Cr, Dr, Er] = dssdata (sysmin); + [num,den]=tfdata(sys); + sysmin = minreal (sys, 1e-6); + [num2,den2]=tfdata(sysmin); + sys3 = dss (Ar, Br, Cr, Dr, Er, "scaled", true); + [num3,den3]=tfdata(sys3); + sysmin3 = minreal (sys3, 1e-6); + [num3a,den3a]=tfdata(sysmin3); + +***** assert (num, num2 , 1e-4); +***** assert (den, den2 , 1e-4); +***** assert (num3, num3a , 1e-4); +***** assert (den3, den3a , 1e-4); +***** assert (num, num3a, 1e-4); +***** assert (den, den3a, 1e-4); +***** shared a, b, c, d + s = tf ("s"); + G1 = (s+1)*s*5/(s+1)/(s^2+s+1); + G2 = tf ([1, 1, 1], [2, 2, 2]); + G1min = minreal (G1); + G2min = minreal (G2); + a = G1min.num{1, 1}; + b = G1min.den{1, 1}; + c = G2min.num{1, 1}; + d = G2min.den{1, 1}; +***** assert (a, [5, 0], 1e-4); +***** assert (b, [1, 1, 1], 1e-4); +***** assert (c, 0.5, 1e-4); +***** assert (d, 1, 1e-4); +15 tests, 15 passed, 0 known failure, 0 skipped +[inst/@lti/mtimes.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/mtimes.m +***** shared sysmat, sysmat_exp + sys1 = ss ([0, 1; -3, -2], [0; 1], [-5, 1], [2]); + sys2 = ss ([-10], [1], [-40], [5]); + sys3 = sys2 * sys1; + [A, B, C, D] = ssdata (sys3); + sysmat = [A, B; C, D]; + A_exp = [ -10 -5 1 + 0 0 1 + 0 -3 -2 ]; + B_exp = [ 2 + 0 1 ]; + C_exp = [ -40 -25 5 ]; + D_exp = [ 10 ]; + sysmat_exp = [A_exp, B_exp; C_exp, D_exp]; +***** assert (sysmat, sysmat_exp) +1 test, 1 passed, 0 known failure, 0 skipped +[inst/@lti/isminimumphase.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/isminimumphase.m +***** assert (isminimumphase (tf (1, [1, 0])), true); +1 test, 1 passed, 0 known failure, 0 skipped +[inst/@lti/pole.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/pole.m +***** shared pol_exp, pol_obs + A = [-1, 0, 0; + 0, -2, 0; + 0, 0, -3]; + pol_exp = [-3; + -2; + -1]; + pol_obs = pole (ss (A, ones (3, 1))); - P_exp = [-1; - -2; - -3 ]; +***** assert(pol_obs, pol_exp, 0); +***** shared pol, pol_exp, infp, kronr, kronl, infp_exp, kronr_exp, kronl_exp + A = [ 1 0 0 0 0 0 0 0 0 + 0 1 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 0 + 0 0 0 1 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 + 0 0 0 0 0 1 0 0 0 + 0 0 0 0 0 0 1 0 0 + 0 0 0 0 0 0 0 1 0 + 0 0 0 0 0 0 0 0 1 ]; - [Wn_obs, zeta_obs, P_obs] = damp (ss (A, ones (3, 1))); + E = [ 0 0 0 0 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 + 0 1 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 + 0 0 0 1 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 + 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 1 0 0 + 0 0 0 0 0 0 0 1 0 ]; - assert (Wn_obs, Wn_exp, 0); - assert (zeta_obs, zeta_exp, 0); - assert (P_obs, P_exp, 0); -***** test - H = tf ([2, 5, 1], [1, 2, 3]); + B = [ -1 0 0 + 0 0 0 + 0 0 0 + 0 -1 0 + 0 0 0 + 0 0 0 + 0 0 -1 + 0 0 0 + 0 0 0 ]; - Wn_exp = [1.7321; - 1.7321 ]; + C = [ 0 1 1 0 3 4 0 0 2 + 0 1 0 0 4 0 0 2 0 + 0 0 1 0 -1 4 0 -2 2 ]; - zeta_exp = [0.5774; - 0.5774 ]; + D = [ 1 2 -2 + 0 -1 -2 + 0 0 0 ]; - P_exp = [-1.0000 + 1.4142i; - -1.0000 - 1.4142i ]; + sys = dss (A, B, C, D, E, "scaled", true); + [pol, ~, infp, kronr, kronl] = __sl_ag08bd__ (A, E, [], [], [], true); - [Wn_obs, zeta_obs, P_obs] = damp (H); + pol_exp = zeros (0,1); - assert (Wn_obs, Wn_exp, 1e-4); - assert (zeta_obs, zeta_exp, 1e-4); - assert (P_obs, P_exp, 1e-4); -***** test - H = tf ([5, 3, 1], [1, 6, 4, 4], 0.01); + infp_exp = [0, 3]; + kronr_exp = zeros (1,0); + kronl_exp = zeros (1,0); - Wn_exp = [193.4924; - 193.4924; - 356.5264 ]; +***** assert (pol, pol_exp, 1e-4); +***** assert (infp, infp_exp); +***** assert (kronr, kronr_exp); +***** assert (kronl, kronl_exp); +5 tests, 5 passed, 0 known failure, 0 skipped +[inst/@lti/horzcat.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/horzcat.m +***** shared M, Me + A1 = [ 1.0 0.0 -1.0 + 0.0 -1.0 1.0 + 1.0 1.0 2.0 ]; - zeta_exp = [ 0.0774; - 0.0774; - -0.4728 ]; + B1 = [ 1.0 1.0 0.0 + 2.0 0.0 1.0 ].'; - P_exp = [-0.3020 + 0.8063i; - -0.3020 - 0.8063i; - -5.3961 + 0.0000i ]; + C1 = [ 3.0 -2.0 1.0 + 0.0 1.0 0.0 ]; - [Wn_obs, zeta_obs, P_obs] = damp (H); + D1 = [ 1.0 0.0 + 0.0 1.0 ]; - assert (Wn_obs, Wn_exp, 1e-4); - assert (zeta_obs, zeta_exp, 1e-4); - assert (P_obs, P_exp, 1e-4); -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/fwcfconred.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/fwcfconred.m -***** shared Mo, Me, Info, HSVe - A = [ 0 1.0000 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 - 0 0 -0.0150 0.7650 0 0 0 0 - 0 0 -0.7650 -0.0150 0 0 0 0 - 0 0 0 0 -0.0280 1.4100 0 0 - 0 0 0 0 -1.4100 -0.0280 0 0 - 0 0 0 0 0 0 -0.0400 1.850 - 0 0 0 0 0 0 -1.8500 -0.040 ]; + A2 = [-3.0 0.0 0.0 + 1.0 0.0 1.0 + 0.0 -1.0 2.0 ]; - B = [ 0.0260 - -0.2510 - 0.0330 - -0.8860 - -4.0170 - 0.1450 - 3.6040 - 0.2800 ]; + B2 = [ 0.0 -1.0 0.0 + 1.0 0.0 2.0 ].'; - C = [ -.996 -.105 0.261 .009 -.001 -.043 0.002 -0.026 ]; + C2 = [ 1.0 1.0 0.0 + 1.0 1.0 -1.0 ]; - D = [ 0.0 ]; + D2 = [ 1.0 1.0 + 0.0 1.0 ]; - G = ss (A, B, C, D); % "scaled", false + sys1 = ss (A1, B1, C1, D1); + sys2 = ss (A2, B2, C2, D2); + sys = [sys1, sys2]; + [A, B, C, D] = ssdata (sys); + M = [A, B; C, D]; - F = [ 4.472135954999638e-002 6.610515358414598e-001 4.698598960657579e-003 3.601363251422058e-001 1.032530880771415e-001 -3.754055214487997e-002 -4.268536964759344e-002 3.287284547842979e-002 ]; + Ae = [ 1.0000 0.0000 -1.0000 0.0000 0.0000 0.0000 + 0.0000 -1.0000 1.0000 0.0000 0.0000 0.0000 + 1.0000 1.0000 2.0000 0.0000 0.0000 0.0000 + 0.0000 0.0000 0.0000 -3.0000 0.0000 0.0000 + 0.0000 0.0000 0.0000 1.0000 0.0000 1.0000 + 0.0000 0.0000 0.0000 0.0000 -1.0000 2.0000 ]; - L = [ 4.108939884667451e-001 - 8.684600000000012e-002 - 3.852317308197148e-004 - -3.619366874815911e-003 - -8.803722876359955e-003 - 8.420521094001852e-003 - 1.234944428038507e-003 - 4.263205617645322e-003 ]; + Be = [ 1.0000 2.0000 0.0000 0.0000 + 1.0000 0.0000 0.0000 0.0000 + 0.0000 1.0000 0.0000 0.0000 + 0.0000 0.0000 0.0000 1.0000 + 0.0000 0.0000 -1.0000 0.0000 + 0.0000 0.0000 0.0000 2.0000 ]; - [Kr, Info] = fwcfconred (G, F, L, 2, "method", "bfsr", "cf", "right", "feedback", "+"); - [Ao, Bo, Co, Do] = ssdata (Kr); + Ce = [ 3.0000 -2.0000 1.0000 1.0000 1.0000 0.0000 + 0.0000 1.0000 0.0000 1.0000 1.0000 -1.0000 ]; - Ae = [ -0.4334 0.4884 - -0.1950 -0.1093 ]; + De = [ 1.0000 0.0000 1.0000 1.0000 + 0.0000 1.0000 0.0000 1.0000 ]; - Be = [ -0.4231 - -0.1785 ]; + Me = [Ae, Be; Ce, De]; - Ce = [ -0.0326 -0.2307 ]; +***** assert (M, Me, 1e-4); +1 test, 1 passed, 0 known failure, 0 skipped +[inst/@lti/d2c.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/d2c.m +***** shared Mo, Me + A = [ 1.0 0.5 + 0.5 1.0 ]; - De = [ 0.0000 ]; + B = [ 0.0 -1.0 + 1.0 0.0 ]; - HSVe = [ 3.3073 0.7274 0.1124 0.0784 0.0242 0.0182 0.0101 0.0094 ].'; + C = [ -1.0 0.0 + 0.0 1.0 ]; + + D = [ 1.0 0.0 + 0.0 -1.0 ]; + + [Ao, Bo, Co, Do] = ssdata (d2c (c2d (ss (A, B, C, D), 2, "tustin"), "tustin")); Mo = [Ao, Bo; Co, Do]; - Me = [Ae, Be; Ce, De]; + Me = [A, B; C, D]; + +***** assert (Mo, Me, 1e-4); +***** shared Mo, Me + A = [ 1.0 0.5 + 0.5 1.0 ]; + + B = [ 0.0 -1.0 + 1.0 0.0 ]; + + C = [ -1.0 0.0 + 0.0 1.0 ]; + + D = [ 1.0 0.0 + 0.0 -1.0 ]; + + [Ao, Bo, Co, Do] = ssdata (d2c (c2d (ss (A, B, C, D), 2, "zoh"), "zoh")); + + Mo = [Ao, Bo; Co, Do]; + Me = [A, B; C, D]; + +***** assert (Mo, Me, 1e-4); +***** shared Mo, Me + A = [ 1.0 0.5 + 0.5 1.0 ]; + + B = [ 0.0 -1.0 + 1.0 0.0 ]; + + C = [ -1.0 0.0 + 0.0 1.0 ]; + + D = [ 1.0 0.0 + 0.0 -1.0 ]; + + [Ao, Bo, Co, Do] = ssdata (d2c (c2d (ss (A, B, C, D), 2, "prewarp", 1000), "prewarp", 1000)); + + Mo = [Ao, Bo; Co, Do]; + Me = [A, B; C, D]; ***** assert (Mo, Me, 1e-4); -***** assert (Info.hsv, HSVe, 1e-4); -2 tests, 2 passed, 0 known failure, 0 skipped -[inst/kalman.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/kalman.m -***** shared m, m_exp, g, g_exp, x, x_exp - sys = ss (-2, 1, 1, 3); - [est, g, x] = kalman (sys, 1, 1, 1); - [a, b, c, d] = ssdata (est); - m = [a, b; c, d]; - m_exp = [-2.25, 0.25; 1, 0; 1, 0]; - g_exp = 0.25; - x_exp = 0; -***** assert (m, m_exp, 1e-2); -***** assert (g, g_exp, 1e-2); -***** assert (x, x_exp, 1e-2); 3 tests, 3 passed, 0 known failure, 0 skipped -[inst/margin.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/margin.m -***** shared margin_c, margin_c_exp, margin_d, margin_d_exp - sysc = tf ([24], [1, 6, 11, 6]); - [gamma_c, phi_c, w_gamma_c, w_phi_c] = margin (sysc); - sysd = c2d (sysc, 0.3); - [gamma_d, phi_d, w_gamma_d, w_phi_d] = margin (sysd); +[inst/@lti/feedback.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/feedback.m +***** shared M, Me + A1 = [ 1.0 0.0 -1.0 + 0.0 -1.0 1.0 + 1.0 1.0 2.0 ]; - margin_c = [gamma_c, phi_c, w_gamma_c, w_phi_c]; - margin_d = [gamma_d, phi_d, w_gamma_d, w_phi_d]; + B1 = [ 1.0 1.0 0.0 + 2.0 0.0 1.0 ].'; - ## results from this implementation and the "dark side" diverge - ## from the third digit after the decimal point on + C1 = [ 3.0 -2.0 1.0 + 0.0 1.0 0.0 ]; - gamma_c_exp = 2.50; - phi_c_exp = 35.43; - w_gamma_c_exp = 3.32; - w_phi_c_exp = 2.06; + D1 = [ 1.0 0.0 + 0.0 1.0 ]; - gamma_d_exp = 1.41; - phi_d_exp = 18.60; - w_gamma_d_exp = 2.48; - w_phi_d_exp = 2.04; + A2 = [-3.0 0.0 0.0 + 1.0 0.0 1.0 + 0.0 -1.0 2.0 ]; - margin_c_exp = [gamma_c_exp, phi_c_exp, w_gamma_c_exp, w_phi_c_exp]; - margin_d_exp = [gamma_d_exp, phi_d_exp, w_gamma_d_exp, w_phi_d_exp]; + B2 = [ 0.0 -1.0 0.0 + 1.0 0.0 2.0 ].'; -***** assert (margin_c, margin_c_exp, 1e-2); -***** assert (margin_d, margin_d_exp, 1e-2); -2 tests, 2 passed, 0 known failure, 0 skipped -[inst/bode.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/bode.m -***** demo - s = tf('s'); - g = 1/(2*s^2+3*s+4); - bode(g); -***** test - s = tf('s'); - K = 1; - T = 2; - g = K/(1+T*s); - [mag phas w] = bode(g); - mag_dB = 20*log10(mag); - index = find(mag_dB < -3,1); - w_cutoff = w(index); - assert (1/T, w_cutoff, eps); + C2 = [ 1.0 1.0 0.0 + 1.0 1.0 -1.0 ]; + + D2 = [ 1.0 1.0 + 0.0 1.0 ]; + + sys1 = ss (A1, B1, C1, D1); + sys2 = ss (A2, B2, C2, D2); + sys = feedback (sys1, sys2); + [A, B, C, D] = ssdata (sys); + M = [A, B; C, D]; + + Ae = [-0.5000 -0.2500 -1.5000 -1.2500 -1.2500 0.7500 + -1.5000 -0.2500 0.5000 -0.2500 -0.2500 -0.2500 + 1.0000 0.5000 2.0000 -0.5000 -0.5000 0.5000 + 0.0000 0.5000 0.0000 -3.5000 -0.5000 0.5000 + -1.5000 1.2500 -0.5000 1.2500 0.2500 1.2500 + 0.0000 1.0000 0.0000 -1.0000 -2.0000 3.0000 ]; + + Be = [ 0.5000 0.7500 + 0.5000 -0.2500 + 0.0000 0.5000 + 0.0000 0.5000 + -0.5000 0.2500 + 0.0000 1.0000 ]; + + Ce = [ 1.5000 -1.2500 0.5000 -0.2500 -0.2500 -0.2500 + 0.0000 0.5000 0.0000 -0.5000 -0.5000 0.5000 ]; + + De = [ 0.5000 -0.2500 + 0.0000 0.5000 ]; + + Me = [Ae, Be; Ce, De]; + +***** assert (M, Me, 1e-4); +***** shared S1, S2 + P = ss (-2, 3, 4, 5); # meaningless numbers + C = ss (-1, 1, 1, 0); # ditto + L = P * C; + I = eye (size (L)); + S1 = feedback (I, L); + S2 = inv (I + L); +***** assert (S1.a, S2.a, 1e-4); +***** assert (S1.b, S2.b, 1e-4); +***** assert (S1.c, S2.c, 1e-4); +***** assert (S1.d, S2.d, 1e-4); +5 tests, 5 passed, 0 known failure, 0 skipped +[inst/@lti/subsref.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/subsref.m +***** shared a + s = tf ("s"); + G = (s+1)*s*5/(s+1)/(s^2+s+1); + a = G(1,1).num{1,1}(1); +***** assert (a, 5, 1e-4); 1 test, 1 passed, 0 known failure, 0 skipped -[inst/esort.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/esort.m -***** shared s_exp, ndx_exp, s_obs, ndx_obs - p = [-0.2410+0.5573i; - -0.2410-0.5573i; - 0.1503; - -0.0972; - -0.2590]; - s_exp = [ 0.1503; - -0.0972; - -0.2410+0.5573i; - -0.2410-0.5573i; - -0.2590]; - ndx_exp = [ 3; - 4; - 1; - 2; - 5]; - [s_obs, ndx_obs] = esort(p); -***** assert(s_obs, s_exp, 0); -***** assert(ndx_obs, ndx_exp, 0); -2 tests, 2 passed, 0 known failure, 0 skipped -[inst/obsv.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/obsv.m -***** assert (obsv ([1, 0; 0, -0.5], [8, 8]), [8, 8; 8, -4]); +[inst/hsvd.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/hsvd.m +***** shared hsv, hsv_exp + a = [ -0.04165 0.0000 4.9200 -4.9200 0.0000 0.0000 0.0000 + -5.2100 -12.500 0.0000 0.0000 0.0000 0.0000 0.0000 + 0.0000 3.3300 -3.3300 0.0000 0.0000 0.0000 0.0000 + 0.5450 0.0000 0.0000 0.0000 -0.5450 0.0000 0.0000 + 0.0000 0.0000 0.0000 4.9200 -0.04165 0.0000 4.9200 + 0.0000 0.0000 0.0000 0.0000 -5.2100 -12.500 0.0000 + 0.0000 0.0000 0.0000 0.0000 0.0000 3.3300 -3.3300]; + + b = [ 0.0000 0.0000 + 12.5000 0.0000 + 0.0000 0.0000 + 0.0000 0.0000 + 0.0000 0.0000 + 0.0000 12.500 + 0.0000 0.0000]; + + c = [ 1.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 + 0.0000 0.0000 0.0000 1.0000 0.0000 0.0000 0.0000 + 0.0000 0.0000 0.0000 0.0000 1.0000 0.0000 0.0000]; + + sys = ss (a, b, c, [], "scaled", true); + hsv = hsvd (sys, "alpha", 0.0); + + hsv_exp = [2.5139; 2.0846; 1.9178; 0.7666; 0.5473; 0.0253; 0.0246]; + +***** assert (hsv, hsv_exp, 1e-4); 1 test, 1 passed, 0 known failure, 0 skipped -[inst/pzmap.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/pzmap.m -***** demo - z = tf('z',1); - G1z = (z+1)/(z-0.75)/(z^2-1*z+1); - pzmap(G1z); -***** demo - s = tf('s'); - G1 = 1/(2*s^2+3*s+4); - G2 = (1-s)/(1+s)/(s^2+s+1); - pzmap(G1,G2); +[inst/impulse.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/impulse.m ***** test - s = tf('s'); - G = (s-1)/(s-2)/(s-3); - [pol zer] = pzmap(G); - assert(sort(pol), [2 3]', 2*eps); - assert(zer, 1, eps); + t=0:0.1:.3; + sys=tf(0.9375,[1 2 4]); + y=impulse(sys,t); + assert (y(1), 0, eps); + assert (y(2), 0.084405001160727, 2*eps); + assert (y(3), 0.150460144774958, 2*eps); + assert (y(4), 0.199104909042133, 2*eps); +***** test + t=0:0.1:.4; + sys=tf(0.9375,[1 2 4]); + sys2=c2d(sys, 0.1, "impulse"); + y=impulse(sys2,t); + assert (y(1), 0, eps); + assert (y(2), 0.084405001160727, 2*eps); + assert (y(3), 0.150460144774958, 2*eps); + assert (y(4), 0.199104909042133, 2*eps); ***** test + s = tf("s"); + R = 1/s; + y= impulse(R); + assert (y(1), 1, eps); +***** demo + clf; s = tf('s'); g = 1/(2*s^2+3*s+4); - pol = pzmap(g); - assert(sort(pol), sort(roots([2 3 4]')), eps); -2 tests, 2 passed, 0 known failure, 0 skipped + impulse(g); + title ("Impulse response of a PT2 transfer function"); +***** demo + clf; + s = tf('s'); + g = 1/(2*s^2+3*s+4); + h = c2d(g,0.1); + impulse(h); + title ("Impulse response of a discretized PT2 transfer function"); +3 tests, 3 passed, 0 known failure, 0 skipped [inst/hinfsyn.m] >>>>> /build/reproducible-path/octave-control-4.0.1/inst/hinfsyn.m ***** shared M, M_exp @@ -3586,172 +4372,2584 @@ ***** assert (M, M_exp, 1e-1); ***** assert (GAM, GAM_exp, 1e-3); 4 tests, 4 passed, 0 known failure, 0 skipped -[inst/filt.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/filt.m -***** shared num, den, n1, d1, n2, d2, n2e, d2e - num = [0, 3]; - den = [1, 4, 2]; - sys = filt (num, den); - [n1, d1] = filtdata (sys, "vector"); - [n2, d2] = tfdata (sys, "vector"); - n2e = [3, 0]; - d2e = [1, 4, 2]; -***** assert (n1, num, 1e-4); -***** assert (d1, den, 1e-4); -***** assert (n2, n2e, 1e-4); -***** assert (d2, d2e, 1e-4); -4 tests, 4 passed, 0 known failure, 0 skipped -[inst/covar.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/covar.m -***** shared p, q, p_exp, q_exp - sys = ss (-1, 1, 1, 0); - [p, q] = covar (sys, 5); - p_exp = 2.5000; - q_exp = 2.5000; -***** assert (p, p_exp, 1e-4); -***** assert (q, q_exp, 1e-4); -***** shared p, q, p_exp, q_exp - sys = ss ([-0.2, -0.5; 1, 0], [2; 0], [1, 0.5], [0], 0.1); - [p, q] = covar (sys, 5); - p_exp = 30.3167; - q_exp = [27.1493, -3.6199; -3.6199, 27.1493]; -***** assert (p, p_exp, 1e-4); -***** assert (q, q_exp, 1e-4); -4 tests, 4 passed, 0 known failure, 0 skipped -[inst/@iddata/detrend.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/@iddata/detrend.m -***** shared DATD, Z - DAT = iddata ({[(1:10).', (1:2:20).'], [(10:-1:1).', (20:-2:1).']}, {[(41:50).', (46:55).'], [(61:70).', (-66:-1:-75).']}); - DATD = detrend (DAT, "linear"); - Z = zeros (10, 2); -***** assert (DATD.y{1}, Z, 1e-10); -***** assert (DATD.y{2}, Z, 1e-10); -***** assert (DATD.u{1}, Z, 1e-10); -***** assert (DATD.u{2}, Z, 1e-10); -4 tests, 4 passed, 0 known failure, 0 skipped -[inst/@iddata/iddata.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/@iddata/iddata.m -***** error (iddata); -***** error (iddata ((1:10).', (1:11).')); -***** warning (iddata (1:10)); -***** warning (iddata (1:10, 1:10)); -4 tests, 4 passed, 0 known failure, 0 skipped -[inst/@iddata/cat.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/@iddata/cat.m -***** error (cat (1, iddata (1, 1), iddata ({2, 3}, {2, 3}))); +[inst/thiran.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/thiran.m +***** shared num, den, expc + expc = [1, 0.5294, -0.04813, 0.004159]; + sys = thiran (2.4, 1); + [num, den] = tfdata (sys, "vector"); +***** assert (den, expc, 1e-4); +***** assert (num, fliplr (expc), 1e-4); +***** shared num, den + sys = thiran (0.5, 0.1); + [num, den] = tfdata (sys, "vector"); +***** assert (den, [1, 0, 0, 0, 0, 0], eps); +***** assert (num, 1, eps); +***** error (thiran (-1, 1)); +***** error (thiran (1, -1)); +***** error (thiran ([1 2 3], 1)); +7 tests, 7 passed, 0 known failure, 0 skipped +[inst/lyapchol.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/lyapchol.m +***** shared U, U_exp, X, X_exp + + A = [ -1.0 37.0 -12.0 -12.0 + -1.0 -10.0 0.0 4.0 + 2.0 -4.0 7.0 -6.0 + 2.0 2.0 7.0 -9.0 ].'; + + B = [ 1.0 2.5 1.0 3.5 + 0.0 1.0 0.0 1.0 + -1.0 -2.5 -1.0 -1.5 + 1.0 2.5 4.0 -5.5 + -1.0 -2.5 -4.0 3.5 ].'; + + U = lyapchol (A, B); + + X = U.' * U; # use lyap at home! + + U_exp = [ 1.0000 0.0000 0.0000 0.0000 + 3.0000 1.0000 0.0000 0.0000 + 2.0000 -1.0000 1.0000 0.0000 + -1.0000 1.0000 -2.0000 1.0000 ].'; + + X_exp = [ 1.0000 3.0000 2.0000 -1.0000 + 3.0000 10.0000 5.0000 -2.0000 + 2.0000 5.0000 6.0000 -5.0000 + -1.0000 -2.0000 -5.0000 7.0000 ]; + +***** assert (U, U_exp, 1e-4); +***** assert (X, X_exp, 1e-4); +***** shared U, U_exp, X, X_exp + + A = [ -1.0 3.0 -4.0 + 0.0 5.0 -2.0 + -4.0 4.0 1.0 ].'; + + E = [ 2.0 1.0 3.0 + 2.0 0.0 1.0 + 4.0 5.0 1.0 ].'; + + B = [ 2.0 -1.0 7.0 ].'; + + U = lyapchol (A, B, E); + + U_exp = [ 1.6003 -0.4418 -0.1523 + 0.0000 0.6795 -0.2499 + 0.0000 0.0000 0.2041 ]; + +***** assert (U, U_exp, 1e-4); +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/initial.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/initial.m +***** shared initial_c, initial_c_exp, initial_d, initial_d_exp + + A = [ -2.8 2.0 -1.8 + -2.4 -2.0 0.8 + 1.1 1.7 -1.0 ]; + + B = [ -0.8 0.5 0 + 0 0.7 2.3 + -0.3 -0.1 0.5 ]; + + C = [ -0.1 0 -0.3 + 0.9 0.5 1.2 + 0.1 -0.1 1.9 ]; + + D = [ -0.5 0 0 + 0.1 0 0.3 + -0.8 0 0 ]; + + x_0 = [1, 2, 3]; + + sysc = ss (A, B, C, D); + + [yc, tc, xc] = initial (sysc, x_0, 0.2, 0.1); + initial_c = [yc, tc, xc]; + + sysd = c2d (sysc, 2); + + [yd, td, xd] = initial (sysd, x_0, 4); + initial_d = [yd, td, xd]; + + ## expected values computed by the "dark side" + + yc_exp = [ -1.0000 5.5000 5.6000 + -0.9872 5.0898 5.7671 + -0.9536 4.6931 5.7598 ]; + + tc_exp = [ 0.0000 + 0.1000 + 0.2000 ]; + + xc_exp = [ 1.0000 2.0000 3.0000 + 0.5937 1.6879 3.0929 + 0.2390 1.5187 3.0988 ]; + + initial_c_exp = [yc_exp, tc_exp, xc_exp]; + + yd_exp = [ -1.0000 5.5000 5.6000 + -0.6550 3.1673 4.2228 + -0.5421 2.6186 3.4968 ]; + + td_exp = [ 0 + 2 + 4 ]; + + xd_exp = [ 1.0000 2.0000 3.0000 + -0.4247 1.5194 2.3249 + -0.3538 1.2540 1.9250 ]; + + initial_d_exp = [yd_exp, td_exp, xd_exp]; + +***** assert (initial_c, initial_c_exp, 1e-4) +***** assert (initial_d, initial_d_exp, 1e-4) +2 tests, 2 passed, 0 known failure, 0 skipped +[inst/@ss/ss2ss.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/@ss/ss2ss.m +***** test + A = [1 2 3; 4 5 6; 7 8 9]; + B = [1; 2; 3]; + C = [-1 0 1]; + D = 0; + + [T E] = eig(A); + + original_system = ss(A,B,C,D); + transformed_system = ss2ss(original_system,T); + assert(transformed_system.a, [0.5755 2.006 -0.8179; 6.684 13.62 -2.585; -4.476 -7.826 0.8073],e-14); + assert(transformed_system.b, [-0.5789; -3.148; 1.631],e-14); + assert(transformed_system.c, [0.8912 -0.2231 1.112],e-14); + assert(transformed_system.d, 0); + retransformed_system = ss2ss(transformed_system,inv(T)); + assert(original_system.a,retransformed_system.a,e-14); + assert(original_system.b,retransformed_system.b,e-14); + assert(original_system.c,retransformed_system.c,e-14); + assert(original_system.d,retransformed_system.d,e-14); 1 test, 1 passed, 0 known failure, 0 skipped -[inst/@iddata/filter.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/@iddata/filter.m -***** shared DATD, Z - DAT = iddata ({[(1:10).', (1:2:20).'], [(10:-1:1).', (20:-2:1).']}, {[(41:50).', (46:55).'], [(61:70).', (-66:-1:-75).']}); - DATD = detrend (DAT, "linear"); - Z = zeros (10, 2); -***** assert (DATD.y{1}, Z, 1e-10); -***** assert (DATD.y{2}, Z, 1e-10); -***** assert (DATD.u{1}, Z, 1e-10); -***** assert (DATD.u{2}, Z, 1e-10); -4 tests, 4 passed, 0 known failure, 0 skipped -[inst/@iddata/fft.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/@iddata/fft.m -***** shared DATD, Y, U - Y = 1:10; - U = 20:-2:1; - W = warning ("query", "iddata:transpose"); - warning ("off", W.identifier); - DAT = iddata (Y, U); - DATD = fft (DAT); - warning (W.identifier, W.state); -***** assert (DATD.y{1}, Y, 1e-10); -***** assert (DATD.u{1}, U, 1e-10); +[inst/db2mag.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/db2mag.m +***** assert (db2mag (40), 100); +***** assert (db2mag (-20), 0.1); 2 tests, 2 passed, 0 known failure, 0 skipped -[inst/hnamodred.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/hnamodred.m -***** shared Mo, Me, Info, HSVe - A = [ -3.8637 -7.4641 -9.1416 -7.4641 -3.8637 -1.0000 - 1.0000, 0 0 0 0 0 - 0 1.0000 0 0 0 0 - 0 0 1.0000 0 0 0 - 0 0 0 1.0000 0 0 - 0 0 0 0 1.0000 0 ]; +[inst/dare.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/dare.m +***** shared x, l, g, xe, le, ge + a = [ 0.4 1.7 + 0.9 3.8]; - B = [ 1 - 0 - 0 - 0 - 0 - 0 ]; + b = [ 0.8 + 2.1]; - C = [ 0 0 0 0 0 1 ]; + c = [ 1 -1]; - D = [ 0 ]; + r = 3; - G = ss (A, B, C, D); # "scaled", false + [x, l, g] = dare (a, b, c.'*c, r); - AV = [ 0.2000 -1.0000 - 1.0000 0 ]; + xe = [ 1.5354 1.2623 + 1.2623 10.5596]; - BV = [ 1 - 0 ]; + le = [-0.0022 + 0.2454]; - CV = [ -1.8000 0 ]; + ge = [ 0.4092 1.7283]; - DV = [ 1 ]; +***** assert (x, xe, 1e-4); +***** assert (sort (l), sort (le), 1e-4); +***** assert (g, ge, 1e-4); +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/place.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/place.m +***** shared A, B, C, P, Kexpected + A = [0, 1; 3, 2]; + B = [0; 1]; + C = [2, 1]; # C is needed for ss; it doesn't matter what the value of C is + P = [-1, -0.5]; + Kexpected = [3.5, 3.5]; +***** assert (place (ss (A, B, C), P), Kexpected, 2*eps); +***** assert (place (A, B, P), Kexpected, 2*eps); +***** shared F, F_exp, ev_ol, ev_cl + A = [-6.8000 0.0000 -207.0000 0.0000 + 1.0000 0.0000 0.0000 0.0000 + 43.2000 0.0000 0.0000 -4.2000 + 0.0000 0.0000 1.0000 0.0000]; - V = ss (AV, BV, CV, DV); + B = [ 5.6400 0.0000 + 0.0000 0.0000 + 0.0000 1.1800 + 0.0000 0.0000]; - [Gr, Info] = hnamodred (G, "left", V, "tol1", 1e-1, "tol2", 1e-14); - [Ao, Bo, Co, Do] = ssdata (Gr); + P = [-0.5000 + 0.1500i + -0.5000 - 0.1500i]; - Ae = [ -0.2391 0.3072 1.1630 1.1967 - -2.9709 -0.2391 2.6270 3.1027 - 0.0000 0.0000 -0.5137 -1.2842 - 0.0000 0.0000 0.1519 -0.5137 ]; + ALPHA = -0.4; + TOL = 1e-8; - Be = [ -1.0497 - -3.7052 - 0.8223 - 0.7435 ]; + F = place (A, B, P, ALPHA, TOL); - Ce = [ -0.4466 0.0143 -0.4780 -0.2013 ]; + F_exp = - [-0.0876 -4.2138 0.0837 -18.1412 + -0.0233 18.2483 -0.4259 -4.8120]; - De = [ 0.0219 ]; + ev_ol = sort (eig (A)); + ev_cl = sort (eig (A - B*F)); - # Since hnamodred approximates the input/output behavior only - # input/output behavior is tested using n first Markov parameters. - # The state space representaton might have different signs - # of the states. - # By multiplying the matrices for the Markov parameters, numeric errors - # would propagate, therefor the accuracy of the results are limited to - # the accuracy of the given expected results +***** assert (F, F_exp, 1e-4); +***** assert (ev_ol(3:4), ev_cl(3:4), 1e-4); +4 tests, 4 passed, 0 known failure, 0 skipped +[inst/obsv.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/obsv.m +***** assert (obsv ([1, 0; 0, -0.5], [8, 8]), [8, 8; 8, -4]); +1 test, 1 passed, 0 known failure, 0 skipped +[inst/lyap.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/lyap.m +***** shared X, X_exp + A = [1, 2; -3, -4]; + Q = [3, 1; 1, 1]; + X = lyap (A, Q); + X_exp = [ 6.1667, -3.8333; + -3.8333, 3.0000]; +***** assert (X, X_exp, 1e-4); +***** shared X, X_exp + A = [2.0 1.0 3.0 + 0.0 2.0 1.0 + 6.0 1.0 2.0]; - [Ao,Bo,Co,Do] = ssdata (Gr); - Ao = round (Ao*1e4)/1e4; - Bo = round (Bo*1e4)/1e4; - Co = round (Co*1e4)/1e4; - Do = round (Do*1e4)/1e4; + B = [2.0 1.0 + 1.0 6.0]; - n = size(Ao,1); - m = size(Bo,2); - p = size(Co,1); - Mo = zeros (p,(n+1)*m); - Me = zeros (p,(n+1)*m); - Mo(:,1:m) = Do; - Me(:,1:m) = De; + C = [2.0 1.0 + 1.0 4.0 + 0.0 5.0]; + + X = lyap (A, B, -C); + + X_exp = [-2.7685 0.5498 + -1.0531 0.6865 + 4.5257 -0.4389]; + +***** assert (X, X_exp, 1e-4); +***** shared X, X_exp + A = [ 3.0 1.0 1.0 + 1.0 3.0 0.0 + 1.0 0.0 2.0]; + + E = [ 1.0 3.0 0.0 + 3.0 2.0 1.0 + 1.0 0.0 1.0]; + + B = [-64.0 -73.0 -28.0 + -73.0 -70.0 -25.0 + -28.0 -25.0 -18.0]; + + X = lyap (A.', -B, [], E.'); + + X_exp = [-2.0000 -1.0000 0.0000 + -1.0000 -3.0000 -1.0000 + 0.0000 -1.0000 -3.0000]; + +***** assert (X, X_exp, 1e-4); +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/damp.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/damp.m +***** test + A = [-1, 0, 0; + 0, -2, 0; + 0, 0, -3 ]; + + Wn_exp = [1; + 2; + 3 ]; + + zeta_exp = [1; + 1; + 1 ]; + + P_exp = [-1; + -2; + -3 ]; + + [Wn_obs, zeta_obs, P_obs] = damp (ss (A, ones (3, 1))); + + assert (Wn_obs, Wn_exp, 0); + assert (zeta_obs, zeta_exp, 0); + assert (P_obs, P_exp, 0); +***** test + H = tf ([2, 5, 1], [1, 2, 3]); + + Wn_exp = [1.7321; + 1.7321 ]; + + zeta_exp = [0.5774; + 0.5774 ]; + + P_exp = [-1.0000 + 1.4142i; + -1.0000 - 1.4142i ]; + + [Wn_obs, zeta_obs, P_obs] = damp (H); + + assert (Wn_obs, Wn_exp, 1e-4); + assert (zeta_obs, zeta_exp, 1e-4); + assert (P_obs, P_exp, 1e-4); +***** test + H = tf ([5, 3, 1], [1, 6, 4, 4], 0.01); + + Wn_exp = [193.4924; + 193.4924; + 356.5264 ]; + + zeta_exp = [ 0.0774; + 0.0774; + -0.4728 ]; + + P_exp = [-0.3020 + 0.8063i; + -0.3020 - 0.8063i; + -5.3961 + 0.0000i ]; + + [Wn_obs, zeta_obs, P_obs] = damp (H); + + assert (Wn_obs, Wn_exp, 1e-4); + assert (zeta_obs, zeta_exp, 1e-4); + assert (P_obs, P_exp, 1e-4); +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/acker.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/acker.m +***** test + # https://en.wikipedia.org/wiki/Ackermann's_formula#Example + A = [1 1; 1 2]; + B = [1; 0]; + P = roots ([1 11 30]); + K = acker(A,B,P); + assert (K, [14 57]); +1 test, 1 passed, 0 known failure, 0 skipped +[inst/__dss2ss__.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/__dss2ss__.m +***** shared a, b, c, e, ranke, rnka22, q, z, a_exp, b_exp, c_exp, e_exp, q_exp, z_exp - Aoi = eye (n,n); - Aei = eye (n,n); - for i = 1:n - Mo(:,i*m+1:(i+1)*m) = Co*Aoi*Bo; - Me(:,i*m+1:(i+1)*m) = Ce*Aei*Be; - Aoi = Aoi*Ao; - Aei = Aei*Ae; + e = [1, 2, 0, 0; 0, 1, 0, 1; 3, 9, 6, 3; 0, 0, 2, 0]; + a = [-1, 0, 0, 3; 0, 0, 1, 2; 1, 1, 0, 4; 0, 0, 0, 0]; + b = [1, 0; 0, 0; 0, 1; 1, 1]; + c = [-1, 0, 1, 0; 0, 1, -1, 1]; + + [a, e, b, c, ranke, rnka22, q, z] = __sl_tg01fd__ (a, e, b, c, true, 0.0); + + e_exp = [10.1587 5.8230 1.3021 0.0000; + 0.0000 -2.4684 -0.1896 0.0000; + 0.0000 0.0000 1.0338 0.0000; + 0.0000 0.0000 0.0000 0.0000]; + + a_exp = [ 2.0278 0.1078 3.9062 -2.1571; + -0.0980 0.2544 1.6053 -0.1269; + 0.2713 0.7760 -0.3692 -0.4853; + 0.0690 -0.5669 -2.1974 0.3086]; + + b_exp = [-0.2157 -0.9705; + 0.3015 0.9516; + 0.7595 0.0991; + 1.1339 0.3780]; + + c_exp = [ 0.3651 -1.0000 -0.4472 -0.8165; + -1.0954 1.0000 -0.8944 0.0000]; + + q_exp = [-0.2157 -0.5088 0.6109 0.5669; + -0.1078 -0.2544 -0.7760 0.5669; + -0.9705 0.1413 -0.0495 -0.1890; + 0.0000 0.8102 0.1486 0.5669]; + + z_exp = [-0.3651 0.0000 0.4472 0.8165; + -0.9129 0.0000 0.0000 -0.4082; + 0.0000 -1.0000 0.0000 0.0000; + -0.1826 0.0000 -0.8944 0.4082]; + +***** assert (a, a_exp, 1e-4); +***** assert (e, e_exp, 1e-4); +***** assert (b, b_exp, 1e-4); +***** assert (c, c_exp, 1e-4); +***** assert (q, q_exp, 1e-4); +***** assert (z, z_exp, 1e-4); +***** assert (ranke, 3); +***** assert (rnka22, 1); +***** shared mms + + mm = tf ([3, 5, 0], [4, 1]); + mms = ss (mm); +***** error (__dss2ss__ (mms.a, mms.b, mms.c, mms.d, mms.e)); +***** test + A = [1 0; 0 1]; + B = [1; 0]; + C = [1 0]; + D = 0; + E = [1 0; 0 0]; + + sys = dss (A, B, C, D, E); + [Ao, Bo, Co, Do] = ssdata (sys); + + assert (Ao, 1, 1e-4); + assert (Bo, 1, 1e-4); + assert (Co, 1, 1e-4); + assert (Do, 0, 1e-4); +10 tests, 10 passed, 0 known failure, 0 skipped +[inst/fwcfconred.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/fwcfconred.m +***** shared Mo, Me, Info, HSVe + A = [ 0 1.0000 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 + 0 0 -0.0150 0.7650 0 0 0 0 + 0 0 -0.7650 -0.0150 0 0 0 0 + 0 0 0 0 -0.0280 1.4100 0 0 + 0 0 0 0 -1.4100 -0.0280 0 0 + 0 0 0 0 0 0 -0.0400 1.850 + 0 0 0 0 0 0 -1.8500 -0.040 ]; + + B = [ 0.0260 + -0.2510 + 0.0330 + -0.8860 + -4.0170 + 0.1450 + 3.6040 + 0.2800 ]; + + C = [ -.996 -.105 0.261 .009 -.001 -.043 0.002 -0.026 ]; + + D = [ 0.0 ]; + + G = ss (A, B, C, D); % "scaled", false + + F = [ 4.472135954999638e-002 6.610515358414598e-001 4.698598960657579e-003 3.601363251422058e-001 1.032530880771415e-001 -3.754055214487997e-002 -4.268536964759344e-002 3.287284547842979e-002 ]; + + L = [ 4.108939884667451e-001 + 8.684600000000012e-002 + 3.852317308197148e-004 + -3.619366874815911e-003 + -8.803722876359955e-003 + 8.420521094001852e-003 + 1.234944428038507e-003 + 4.263205617645322e-003 ]; + + [Kr, Info] = fwcfconred (G, F, L, 2, "method", "bfsr", "cf", "right", "feedback", "+"); + [Ao, Bo, Co, Do] = ssdata (Kr); + + Ae = [ -0.4334 0.4884 + -0.1950 -0.1093 ]; + + Be = [ -0.4231 + -0.1785 ]; + + Ce = [ -0.0326 -0.2307 ]; + + De = [ 0.0000 ]; + + HSVe = [ 3.3073 0.7274 0.1124 0.0784 0.0242 0.0182 0.0101 0.0094 ].'; + + Mo = [Ao, Bo; Co, Do]; + Me = [Ae, Be; Ce, De]; + +***** assert (Mo, Me, 1e-4); +***** assert (Info.hsv, HSVe, 1e-4); +2 tests, 2 passed, 0 known failure, 0 skipped +[inst/care.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/care.m +***** shared x, l, g, xe, le, ge + a = [-3 2 + 1 1]; + + b = [ 0 + 1]; + + c = [ 1 -1]; + + r = 3; + + [x, l, g] = care (a, b, c.'*c, r); + + xe = [ 0.5895 1.8216 + 1.8216 8.8188]; + + le = [-3.5026 + -1.4370]; + + ge = [ 0.6072 2.9396]; + +***** assert (x, xe, 1e-4); +***** assert (l, le, 1e-4); +***** assert (g, ge, 1e-4); +***** shared x, l, g, xe, le, ge + a = [ 0.0 1.0 + 0.0 0.0]; + + b = [ 0.0 + 1.0]; + + c = [ 1.0 0.0 + 0.0 1.0 + 0.0 0.0]; + + d = [ 0.0 + 0.0 + 1.0]; + + [x, l, g] = care (a, b, c.'*c, d.'*d); + + xe = [ 1.7321 1.0000 + 1.0000 1.7321]; + + le = [-0.8660 + 0.5000i + -0.8660 - 0.5000i]; + + ge = [ 1.0000 1.7321]; + +***** assert (x, xe, 1e-4); +***** assert (l, le, 1e-4); +***** assert (g, ge, 1e-4); +***** shared x, xe + a = [ 0.0 1.0 + 0.0 0.0 ]; + + e = [ 1.0 0.0 + 0.0 1.0 ]; + + b = [ 0.0 + 1.0 ]; + + c = [ 1.0 0.0 + 0.0 1.0 + 0.0 0.0 ]; + + d = [ 0.0 + 0.0 + 1.0 ]; + + x = care (a, b, c.'*c, d.'*d, [], e); + + xe = [ 1.7321 1.0000 + 1.0000 1.7321 ]; + +***** assert (x, xe, 1e-4); +7 tests, 7 passed, 0 known failure, 0 skipped +[inst/ltimodels.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/ltimodels.m +***** shared ltisys + ltisys = tf (12); +***** assert (ltisys.ts, 0); +***** assert (isstaticgain (ltisys)); +***** assert (isct (ltisys)); +***** assert (! isdt (ltisys)); +***** shared ltisys + ltisys = ss (17); +***** assert (ltisys.ts, 0); +***** assert (isstaticgain (ltisys)); +***** assert (! isdt (ltisys)); +***** assert (isct (ltisys)); +***** shared ltisys + ltisys = tf ({[0 9],[0 0 10]},{2,5},2); +***** assert (ltisys.ts, 2); +***** assert (isstaticgain (ltisys)); +***** assert (isdt (ltisys)); +***** assert (! isct (ltisys)); +***** shared ltisys + ltisys = tf (1, [1 1]); +***** assert (ltisys.ts, 0); +***** assert (isct (ltisys)); +***** assert (! isdt (ltisys)); +***** shared ltisys, ts + ts = 0.1; + ltisys = ss (-1, 1, 1, 0, ts); +***** assert (ltisys.ts, ts); +***** assert (! isct (ltisys)); +***** assert (isdt (ltisys)); +***** shared ltisys + ltisys = ss ([],[],[], 3); +***** assert (ltisys.ts, 0); +***** assert (isstaticgain (ltisys)); +***** assert (isct (ltisys)); +***** assert (! isdt (ltisys)); +***** shared Ac, Bc, Ace, Bce + A = [ 17.0 24.0 1.0 8.0 15.0 + 23.0 5.0 7.0 14.0 16.0 + 4.0 6.0 13.0 20.0 22.0 + 10.0 12.0 19.0 21.0 3.0 + 11.0 18.0 25.0 2.0 9.0 ]; + + B = [ -1.0 -4.0 + 4.0 9.0 + -9.0 -16.0 + 16.0 25.0 + -25.0 -36.0 ]; + + tol = 0; + + A = A.'; # There's a little mistake in the example + # program of routine AB01OD in SLICOT 5.0 + + [Ac, Bc, U, ncont] = __sl_ab01od__ (A, B, tol); + + Ace = [ 12.8848 3.2345 11.8211 3.3758 -0.8982 + 4.4741 -12.5544 5.3509 5.9403 1.4360 + 14.4576 7.6855 23.1452 26.3872 -29.9557 + 0.0000 1.4805 27.4668 22.6564 -0.0072 + 0.0000 0.0000 -30.4822 0.6745 18.8680 ]; + + Bce = [ 31.1199 47.6865 + 3.2480 0.0000 + 0.0000 0.0000 + 0.0000 0.0000 + 0.0000 0.0000 ]; + +***** assert <45008> (Ac, Ace, 1e-4); +***** assert (Bc, Bce, 1e-4); +***** shared ac, ec, bc, cc, q, z, ncont, ac_e, ec_e, bc_e, cc_e, q_e, z_e, ncont_e + + a = [ 2 0 2 0 -1 3 1 + 0 1 0 0 1 0 0 + 0 0 0 1 0 0 1 + 0 0 2 0 -1 3 1 + 0 0 0 1 0 0 1 + 0 1 0 0 1 0 0 + 0 0 0 1 0 0 1 ]; + + e = [ 0 0 1 0 0 0 0 + 0 0 0 0 0 1 0 + 0 0 0 0 0 0 1 + 0 0 0 0 0 0 1 + 0 0 0 1 0 0 0 + 0 0 1 0 -1 0 0 + 1 3 0 2 0 0 0 ]; + + b = [ 2 1 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 1 2 3 ]; + + c = [ 1 0 0 1 0 0 1 + 0 -1 1 0 -1 1 0 ]; + + tol = 0; + + [ac, ec, bc, cc, q, z, ncont] = __sl_tg01hd__ (a, e, b, c, tol); + + ncont_e = 3; + + ac_e = [ 0.0000 0.0000 0.0000 0.0000 -1.2627 0.4334 0.4666 + 0.0000 2.0000 0.0000 -3.7417 -0.8520 0.2924 -0.4342 + 0.0000 0.0000 1.7862 0.3780 -0.2651 -0.7723 0.0000 + 0.0000 0.0000 0.0000 3.7417 0.8520 -0.2924 0.4342 + 0.0000 0.0000 0.0000 0.0000 -1.5540 0.5334 0.5742 + 0.0000 0.0000 0.0000 0.0000 -0.6533 0.2242 0.2414 + 0.0000 0.0000 0.0000 0.0000 -0.5892 0.2022 0.2177 ]; + + ec_e = [ -1.8325 1.0000 2.3752 0.0000 -0.8214 0.2819 1.8016 + 0.4887 0.0000 0.3770 -0.5345 0.1874 0.5461 0.0000 + -0.1728 0.0000 -0.1333 -1.1339 0.1325 0.3861 0.0000 + 0.0000 0.0000 0.0000 0.0000 0.8520 -0.2924 0.4342 + 0.0000 0.0000 0.0000 0.0000 -1.0260 -0.1496 0.0000 + 0.0000 0.0000 0.0000 0.0000 0.0000 1.1937 0.0000 + 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 1.0000 ]; + + bc_e = [ 1.0000 2.0000 3.0000 + 2.0000 1.0000 0.0000 + 0.0000 0.0000 0.0000 + 0.0000 0.0000 0.0000 + 0.0000 0.0000 0.0000 + 0.0000 0.0000 0.0000 + 0.0000 0.0000 0.0000 ]; + + cc_e = [ 0.0000 1.0000 0.0000 0.0000 -1.2627 0.4334 0.4666 + 0.3665 0.0000 -0.9803 -1.6036 0.1874 0.5461 0.0000 ]; + + q_e = [ 0.0000 1.0000 0.0000 0.0000 0.0000 0.0000 0.0000 + 0.0000 0.0000 0.7071 0.0000 0.2740 -0.6519 0.0000 + 0.0000 0.0000 0.0000 0.0000 0.8304 0.3491 -0.4342 + 0.0000 0.0000 0.0000 -1.0000 0.0000 0.0000 0.0000 + 0.0000 0.0000 0.0000 0.0000 0.4003 0.1683 0.9008 + 0.0000 0.0000 0.7071 0.0000 -0.2740 0.6519 0.0000 + 1.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 ]; + + z_e = [ 0.0000 1.0000 0.0000 0.0000 0.0000 0.0000 0.0000 + -0.6108 0.0000 0.7917 0.0000 0.0000 0.0000 0.0000 + 0.4887 0.0000 0.3770 -0.5345 0.1874 0.5461 0.0000 + 0.0000 0.0000 0.0000 0.0000 -0.4107 0.1410 0.9008 + 0.6108 0.0000 0.4713 0.2673 -0.1874 -0.5461 0.0000 + -0.1222 0.0000 -0.0943 -0.8018 -0.1874 -0.5461 0.0000 + 0.0000 0.0000 0.0000 0.0000 -0.8520 0.2924 -0.4342 ]; + +***** assert <45008> (ac, ac_e, 1e-4); +!!!!! known bug: https://octave.org/testfailure/?45008 +ASSERT errors for: assert (ac,ac_e,1e-4) + + Location | Observed | Expected | Reason + (3,3) -1.7862 1.7862 Abs err 3.5724 exceeds tol 0.0001 by 4 + (1,5) 1.4113 -1.2627 Abs err 2.674 exceeds tol 0.0001 by 3 + (2,5) 0.706 -0.852 Abs err 1.558 exceeds tol 0.0001 by 2 + (3,5) -0.052188 -0.2651 Abs err 0.21291 exceeds tol 0.0001 by 0.2 + (4,5) -0.706 0.852 Abs err 1.558 exceeds tol 0.0001 by 2 + (5,5) -1.9898 -1.554 Abs err 0.4358 exceeds tol 0.0001 by 0.4 + (6,5) 0.011224 -0.6533 Abs err 0.66452 exceeds tol 0.0001 by 0.7 + (7,5) 0.15568 -0.5892 Abs err 0.74488 exceeds tol 0.0001 by 0.7 + (1,6) -0.0050932 0.4334 Abs err 0.43849 exceeds tol 0.0001 by 0.4 + (2,6) -0.70821 0.2924 Abs err 1.0006 exceeds tol 0.0001 by 1 + (3,6) -0.052025 -0.7723 Abs err 0.72028 exceeds tol 0.0001 by 0.7 + (4,6) 0.70821 -0.2924 Abs err 1.0006 exceeds tol 0.0001 by 1 + (5,6) 0.0071807 0.5334 Abs err 0.52622 exceeds tol 0.0001 by 0.5 + (6,6) -4.0506e-05 0.2242 Abs err 0.22424 exceeds tol 0.0001 by 0.2 + (7,6) -0.00056182 0.2022 Abs err 0.20276 exceeds tol 0.0001 by 0.2 + (1,7) 0.090251 0.4666 Abs err 0.37635 exceeds tol 0.0001 by 0.4 + (2,7) -3.8858e-16 -0.4342 Abs err 0.4342 exceeds tol 0.0001 by 0.4 + (3,7) 0.81316 0 Abs err 0.81316 exceeds tol 0.0001 by 0.8 + (4,7) 1.1725e-15 0.4342 Abs err 0.4342 exceeds tol 0.0001 by 0.4 + (5,7) -0.12724 0.5742 Abs err 0.70144 exceeds tol 0.0001 by 0.7 + (6,7) 0.00071777 0.2414 Abs err 0.24068 exceeds tol 0.0001 by 0.2 + (7,7) 0.0099555 0.2177 Abs err 0.20774 exceeds tol 0.0001 by 0.2 +shared variables + ac = + + -0.0000 0.0000 0.0000 0.0000 1.4113 -0.0051 0.0903 + 0 2.0000 -0.0000 -3.7417 0.7060 -0.7082 -0.0000 + 0 0 -1.7862 0.3780 -0.0522 -0.0520 0.8132 + 0 0 0 3.7417 -0.7060 0.7082 0.0000 + 0 0 0 -0.0000 -1.9898 0.0072 -0.1272 + 0 0 0 0 0.0112 -0.0000 0.0007 + 0 0 0 0 0.1557 -0.0006 0.0100 + + ec = + + -1.8325 1.0000 -2.3752 0.0000 1.4106 1.4062 0.1805 + 0.4887 -0.0000 -0.3770 -0.5345 0.0369 0.0368 -0.5750 + -0.1728 0.0000 0.1333 -1.1339 0.0261 0.0260 -0.4066 + 0 0 -0.0000 -0.0000 -0.7060 0.7082 -0.0000 + 0 0 0 0 -1.0010 -0.0020 0.0318 + 0 0 0 0 0 -1.0010 0.0316 + 0 0 0 0 0 0 1.2223 + + bc = + + 1 2 3 + 2 1 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + + cc = + + Columns 1 through 5: + + -3.5153e-18 1.0000e+00 9.6723e-17 1.8014e-16 1.4113e+00 + 3.6651e-01 -4.4660e-17 9.8026e-01 -1.6036e+00 3.6902e-02 + + Columns 6 and 7: + + -5.0932e-03 9.0251e-02 + 3.6787e-02 -5.7499e-01 + + q = + + 0 1.0000 -0.0000 0.0000 -0.0000 0.0000 -0.0000 + 0 -0.0000 0.7071 0.0000 0.0553 0.0550 0.7028 + 0 -0.0000 -0.0000 0.0000 -0.7053 0.7089 -0.0000 + 0 0.0000 0.0000 -1.0000 -0.0000 0.0000 0.0000 + 0 0 -0.0000 0.0000 -0.7046 -0.7010 0.1103 + 0 -0.0000 0.7071 0.0000 -0.0553 -0.0550 -0.7028 + 1.0000 0 0 0 0 0 0 + + z = + + 0.0000 1.0000 0 0 0 0 0 + -0.6108 0.0000 -0.7917 0.0000 0 0 0 + 0.4887 -0.0000 -0.3770 -0.5345 0.0369 0.0368 -0.5750 + 0.0000 -0.0000 -0.0000 -0.0000 0.7053 0.7031 0.0903 + 0.6108 -0.0000 -0.4713 0.2673 -0.0369 -0.0368 0.5750 + -0.1222 0.0000 0.0943 -0.8018 -0.0369 -0.0368 0.5750 + -0.0000 0.0000 0.0000 0.0000 0.7060 -0.7082 -0.0000 + + ncont = 3 + ac_e = + + 0 0 0 0 -1.2627 0.4334 0.4666 + 0 2.0000 0 -3.7417 -0.8520 0.2924 -0.4342 + 0 0 1.7862 0.3780 -0.2651 -0.7723 0 + 0 0 0 3.7417 0.8520 -0.2924 0.4342 + 0 0 0 0 -1.5540 0.5334 0.5742 + 0 0 0 0 -0.6533 0.2242 0.2414 + 0 0 0 0 -0.5892 0.2022 0.2177 + + ec_e = + + -1.8325 1.0000 2.3752 0 -0.8214 0.2819 1.8016 + 0.4887 0 0.3770 -0.5345 0.1874 0.5461 0 + -0.1728 0 -0.1333 -1.1339 0.1325 0.3861 0 + 0 0 0 0 0.8520 -0.2924 0.4342 + 0 0 0 0 -1.0260 -0.1496 0 + 0 0 0 0 0 1.1937 0 + 0 0 0 0 0 0 1.0000 + + bc_e = + + 1 2 3 + 2 1 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + + cc_e = + + 0 1.0000 0 0 -1.2627 0.4334 0.4666 + 0.3665 0 -0.9803 -1.6036 0.1874 0.5461 0 + + q_e = + + 0 1.0000 0 0 0 0 0 + 0 0 0.7071 0 0.2740 -0.6519 0 + 0 0 0 0 0.8304 0.3491 -0.4342 + 0 0 0 -1.0000 0 0 0 + 0 0 0 0 0.4003 0.1683 0.9008 + 0 0 0.7071 0 -0.2740 0.6519 0 + 1.0000 0 0 0 0 0 0 + + z_e = + + 0 1.0000 0 0 0 0 0 + -0.6108 0 0.7917 0 0 0 0 + 0.4887 0 0.3770 -0.5345 0.1874 0.5461 0 + 0 0 0 0 -0.4107 0.1410 0.9008 + 0.6108 0 0.4713 0.2673 -0.1874 -0.5461 0 + -0.1222 0 -0.0943 -0.8018 -0.1874 -0.5461 0 + 0 0 0 0 -0.8520 0.2924 -0.4342 + + ncont_e = 3 +***** assert <45008> (ec, ec_e, 1e-4); +!!!!! known bug: https://octave.org/testfailure/?45008 +ASSERT errors for: assert (ec,ec_e,1e-4) + + Location | Observed | Expected | Reason + (1,3) -2.3752 2.3752 Abs err 4.7504 exceeds tol 0.0001 by 5 + (2,3) -0.37702 0.377 Abs err 0.75402 exceeds tol 0.0001 by 0.8 + (3,3) 0.1333 -0.1333 Abs err 0.2666 exceeds tol 0.0001 by 0.3 + (1,5) 1.4106 -0.8214 Abs err 2.232 exceeds tol 0.0001 by 2 + (2,5) 0.036902 0.1874 Abs err 0.1505 exceeds tol 0.0001 by 0.2 + (3,5) 0.026094 0.1325 Abs err 0.10641 exceeds tol 0.0001 by 0.1 + (4,5) -0.706 0.852 Abs err 1.558 exceeds tol 0.0001 by 2 + (5,5) -1.001 -1.026 Abs err 0.024979 exceeds tol 0.0001 by 0.02 + (1,6) 1.4062 0.2819 Abs err 1.1243 exceeds tol 0.0001 by 1 + (2,6) 0.036787 0.5461 Abs err 0.50931 exceeds tol 0.0001 by 0.5 + (3,6) 0.026012 0.3861 Abs err 0.36009 exceeds tol 0.0001 by 0.4 + (4,6) 0.70821 -0.2924 Abs err 1.0006 exceeds tol 0.0001 by 1 + (5,6) -0.0020342 -0.1496 Abs err 0.14757 exceeds tol 0.0001 by 0.1 + (6,6) -1.001 1.1937 Abs err 2.1947 exceeds tol 0.0001 by 2 + (1,7) 0.1805 1.8016 Abs err 1.6211 exceeds tol 0.0001 by 2 + (2,7) -0.57499 0 Abs err 0.57499 exceeds tol 0.0001 by 0.6 + (3,7) -0.40658 0 Abs err 0.40658 exceeds tol 0.0001 by 0.4 + (4,7) -3.3646e-16 0.4342 Abs err 0.4342 exceeds tol 0.0001 by 0.4 + (5,7) 0.031795 0 Abs err 0.031795 exceeds tol 0.0001 by 0.03 + (6,7) 0.031632 0 Abs err 0.031632 exceeds tol 0.0001 by 0.03 + (7,7) 1.2223 1 Abs err 0.22226 exceeds tol 0.0001 by 0.2 +shared variables + ac = + + -0.0000 0.0000 0.0000 0.0000 1.4113 -0.0051 0.0903 + 0 2.0000 -0.0000 -3.7417 0.7060 -0.7082 -0.0000 + 0 0 -1.7862 0.3780 -0.0522 -0.0520 0.8132 + 0 0 0 3.7417 -0.7060 0.7082 0.0000 + 0 0 0 -0.0000 -1.9898 0.0072 -0.1272 + 0 0 0 0 0.0112 -0.0000 0.0007 + 0 0 0 0 0.1557 -0.0006 0.0100 + + ec = + + -1.8325 1.0000 -2.3752 0.0000 1.4106 1.4062 0.1805 + 0.4887 -0.0000 -0.3770 -0.5345 0.0369 0.0368 -0.5750 + -0.1728 0.0000 0.1333 -1.1339 0.0261 0.0260 -0.4066 + 0 0 -0.0000 -0.0000 -0.7060 0.7082 -0.0000 + 0 0 0 0 -1.0010 -0.0020 0.0318 + 0 0 0 0 0 -1.0010 0.0316 + 0 0 0 0 0 0 1.2223 + + bc = + + 1 2 3 + 2 1 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + + cc = + + Columns 1 through 5: + + -3.5153e-18 1.0000e+00 9.6723e-17 1.8014e-16 1.4113e+00 + 3.6651e-01 -4.4660e-17 9.8026e-01 -1.6036e+00 3.6902e-02 + + Columns 6 and 7: + + -5.0932e-03 9.0251e-02 + 3.6787e-02 -5.7499e-01 + + q = + + 0 1.0000 -0.0000 0.0000 -0.0000 0.0000 -0.0000 + 0 -0.0000 0.7071 0.0000 0.0553 0.0550 0.7028 + 0 -0.0000 -0.0000 0.0000 -0.7053 0.7089 -0.0000 + 0 0.0000 0.0000 -1.0000 -0.0000 0.0000 0.0000 + 0 0 -0.0000 0.0000 -0.7046 -0.7010 0.1103 + 0 -0.0000 0.7071 0.0000 -0.0553 -0.0550 -0.7028 + 1.0000 0 0 0 0 0 0 + + z = + + 0.0000 1.0000 0 0 0 0 0 + -0.6108 0.0000 -0.7917 0.0000 0 0 0 + 0.4887 -0.0000 -0.3770 -0.5345 0.0369 0.0368 -0.5750 + 0.0000 -0.0000 -0.0000 -0.0000 0.7053 0.7031 0.0903 + 0.6108 -0.0000 -0.4713 0.2673 -0.0369 -0.0368 0.5750 + -0.1222 0.0000 0.0943 -0.8018 -0.0369 -0.0368 0.5750 + -0.0000 0.0000 0.0000 0.0000 0.7060 -0.7082 -0.0000 + + ncont = 3 + ac_e = + + 0 0 0 0 -1.2627 0.4334 0.4666 + 0 2.0000 0 -3.7417 -0.8520 0.2924 -0.4342 + 0 0 1.7862 0.3780 -0.2651 -0.7723 0 + 0 0 0 3.7417 0.8520 -0.2924 0.4342 + 0 0 0 0 -1.5540 0.5334 0.5742 + 0 0 0 0 -0.6533 0.2242 0.2414 + 0 0 0 0 -0.5892 0.2022 0.2177 + + ec_e = + + -1.8325 1.0000 2.3752 0 -0.8214 0.2819 1.8016 + 0.4887 0 0.3770 -0.5345 0.1874 0.5461 0 + -0.1728 0 -0.1333 -1.1339 0.1325 0.3861 0 + 0 0 0 0 0.8520 -0.2924 0.4342 + 0 0 0 0 -1.0260 -0.1496 0 + 0 0 0 0 0 1.1937 0 + 0 0 0 0 0 0 1.0000 + + bc_e = + + 1 2 3 + 2 1 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + + cc_e = + + 0 1.0000 0 0 -1.2627 0.4334 0.4666 + 0.3665 0 -0.9803 -1.6036 0.1874 0.5461 0 + + q_e = + + 0 1.0000 0 0 0 0 0 + 0 0 0.7071 0 0.2740 -0.6519 0 + 0 0 0 0 0.8304 0.3491 -0.4342 + 0 0 0 -1.0000 0 0 0 + 0 0 0 0 0.4003 0.1683 0.9008 + 0 0 0.7071 0 -0.2740 0.6519 0 + 1.0000 0 0 0 0 0 0 + + z_e = + + 0 1.0000 0 0 0 0 0 + -0.6108 0 0.7917 0 0 0 0 + 0.4887 0 0.3770 -0.5345 0.1874 0.5461 0 + 0 0 0 0 -0.4107 0.1410 0.9008 + 0.6108 0 0.4713 0.2673 -0.1874 -0.5461 0 + -0.1222 0 -0.0943 -0.8018 -0.1874 -0.5461 0 + 0 0 0 0 -0.8520 0.2924 -0.4342 + + ncont_e = 3 +***** assert <45008> (bc, bc_e, 1e-4); +***** assert <45008> (cc, cc_e, 1e-4); +!!!!! known bug: https://octave.org/testfailure/?45008 +ASSERT errors for: assert (cc,cc_e,1e-4) + + Location | Observed | Expected | Reason + (2,3) 0.98026 -0.9803 Abs err 1.9606 exceeds tol 0.0001 by 2 + (1,5) 1.4113 -1.2627 Abs err 2.674 exceeds tol 0.0001 by 3 + (2,5) 0.036902 0.1874 Abs err 0.1505 exceeds tol 0.0001 by 0.2 + (1,6) -0.0050932 0.4334 Abs err 0.43849 exceeds tol 0.0001 by 0.4 + (2,6) 0.036787 0.5461 Abs err 0.50931 exceeds tol 0.0001 by 0.5 + (1,7) 0.090251 0.4666 Abs err 0.37635 exceeds tol 0.0001 by 0.4 + (2,7) -0.57499 0 Abs err 0.57499 exceeds tol 0.0001 by 0.6 +shared variables + ac = + + -0.0000 0.0000 0.0000 0.0000 1.4113 -0.0051 0.0903 + 0 2.0000 -0.0000 -3.7417 0.7060 -0.7082 -0.0000 + 0 0 -1.7862 0.3780 -0.0522 -0.0520 0.8132 + 0 0 0 3.7417 -0.7060 0.7082 0.0000 + 0 0 0 -0.0000 -1.9898 0.0072 -0.1272 + 0 0 0 0 0.0112 -0.0000 0.0007 + 0 0 0 0 0.1557 -0.0006 0.0100 + + ec = + + -1.8325 1.0000 -2.3752 0.0000 1.4106 1.4062 0.1805 + 0.4887 -0.0000 -0.3770 -0.5345 0.0369 0.0368 -0.5750 + -0.1728 0.0000 0.1333 -1.1339 0.0261 0.0260 -0.4066 + 0 0 -0.0000 -0.0000 -0.7060 0.7082 -0.0000 + 0 0 0 0 -1.0010 -0.0020 0.0318 + 0 0 0 0 0 -1.0010 0.0316 + 0 0 0 0 0 0 1.2223 + + bc = + + 1 2 3 + 2 1 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + + cc = + + Columns 1 through 5: + + -3.5153e-18 1.0000e+00 9.6723e-17 1.8014e-16 1.4113e+00 + 3.6651e-01 -4.4660e-17 9.8026e-01 -1.6036e+00 3.6902e-02 + + Columns 6 and 7: + + -5.0932e-03 9.0251e-02 + 3.6787e-02 -5.7499e-01 + + q = + + 0 1.0000 -0.0000 0.0000 -0.0000 0.0000 -0.0000 + 0 -0.0000 0.7071 0.0000 0.0553 0.0550 0.7028 + 0 -0.0000 -0.0000 0.0000 -0.7053 0.7089 -0.0000 + 0 0.0000 0.0000 -1.0000 -0.0000 0.0000 0.0000 + 0 0 -0.0000 0.0000 -0.7046 -0.7010 0.1103 + 0 -0.0000 0.7071 0.0000 -0.0553 -0.0550 -0.7028 + 1.0000 0 0 0 0 0 0 + + z = + + 0.0000 1.0000 0 0 0 0 0 + -0.6108 0.0000 -0.7917 0.0000 0 0 0 + 0.4887 -0.0000 -0.3770 -0.5345 0.0369 0.0368 -0.5750 + 0.0000 -0.0000 -0.0000 -0.0000 0.7053 0.7031 0.0903 + 0.6108 -0.0000 -0.4713 0.2673 -0.0369 -0.0368 0.5750 + -0.1222 0.0000 0.0943 -0.8018 -0.0369 -0.0368 0.5750 + -0.0000 0.0000 0.0000 0.0000 0.7060 -0.7082 -0.0000 + + ncont = 3 + ac_e = + + 0 0 0 0 -1.2627 0.4334 0.4666 + 0 2.0000 0 -3.7417 -0.8520 0.2924 -0.4342 + 0 0 1.7862 0.3780 -0.2651 -0.7723 0 + 0 0 0 3.7417 0.8520 -0.2924 0.4342 + 0 0 0 0 -1.5540 0.5334 0.5742 + 0 0 0 0 -0.6533 0.2242 0.2414 + 0 0 0 0 -0.5892 0.2022 0.2177 + + ec_e = + + -1.8325 1.0000 2.3752 0 -0.8214 0.2819 1.8016 + 0.4887 0 0.3770 -0.5345 0.1874 0.5461 0 + -0.1728 0 -0.1333 -1.1339 0.1325 0.3861 0 + 0 0 0 0 0.8520 -0.2924 0.4342 + 0 0 0 0 -1.0260 -0.1496 0 + 0 0 0 0 0 1.1937 0 + 0 0 0 0 0 0 1.0000 + + bc_e = + + 1 2 3 + 2 1 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + + cc_e = + + 0 1.0000 0 0 -1.2627 0.4334 0.4666 + 0.3665 0 -0.9803 -1.6036 0.1874 0.5461 0 + + q_e = + + 0 1.0000 0 0 0 0 0 + 0 0 0.7071 0 0.2740 -0.6519 0 + 0 0 0 0 0.8304 0.3491 -0.4342 + 0 0 0 -1.0000 0 0 0 + 0 0 0 0 0.4003 0.1683 0.9008 + 0 0 0.7071 0 -0.2740 0.6519 0 + 1.0000 0 0 0 0 0 0 + + z_e = + + 0 1.0000 0 0 0 0 0 + -0.6108 0 0.7917 0 0 0 0 + 0.4887 0 0.3770 -0.5345 0.1874 0.5461 0 + 0 0 0 0 -0.4107 0.1410 0.9008 + 0.6108 0 0.4713 0.2673 -0.1874 -0.5461 0 + -0.1222 0 -0.0943 -0.8018 -0.1874 -0.5461 0 + 0 0 0 0 -0.8520 0.2924 -0.4342 + + ncont_e = 3 +***** assert <45008> (q, q_e, 1e-4); +!!!!! known bug: https://octave.org/testfailure/?45008 +ASSERT errors for: assert (q,q_e,1e-4) + + Location | Observed | Expected | Reason + (2,5) 0.055297 0.274 Abs err 0.2187 exceeds tol 0.0001 by 0.2 + (3,5) -0.70528 0.8304 Abs err 1.5357 exceeds tol 0.0001 by 2 + (5,5) -0.7046 0.4003 Abs err 1.1049 exceeds tol 0.0001 by 1 + (6,5) -0.055297 -0.274 Abs err 0.2187 exceeds tol 0.0001 by 0.2 + (2,6) 0.055012 -0.6519 Abs err 0.70691 exceeds tol 0.0001 by 0.7 + (3,6) 0.70893 0.3491 Abs err 0.35983 exceeds tol 0.0001 by 0.4 + (5,6) -0.70098 0.1683 Abs err 0.86928 exceeds tol 0.0001 by 0.9 + (6,6) -0.055012 0.6519 Abs err 0.70691 exceeds tol 0.0001 by 0.7 + (2,7) 0.70279 0 Abs err 0.70279 exceeds tol 0.0001 by 0.7 + (3,7) -1.9854e-16 -0.4342 Abs err 0.4342 exceeds tol 0.0001 by 0.4 + (5,7) 0.11031 0.9008 Abs err 0.79049 exceeds tol 0.0001 by 0.8 + (6,7) -0.70279 0 Abs err 0.70279 exceeds tol 0.0001 by 0.7 +shared variables + ac = + + -0.0000 0.0000 0.0000 0.0000 1.4113 -0.0051 0.0903 + 0 2.0000 -0.0000 -3.7417 0.7060 -0.7082 -0.0000 + 0 0 -1.7862 0.3780 -0.0522 -0.0520 0.8132 + 0 0 0 3.7417 -0.7060 0.7082 0.0000 + 0 0 0 -0.0000 -1.9898 0.0072 -0.1272 + 0 0 0 0 0.0112 -0.0000 0.0007 + 0 0 0 0 0.1557 -0.0006 0.0100 + + ec = + + -1.8325 1.0000 -2.3752 0.0000 1.4106 1.4062 0.1805 + 0.4887 -0.0000 -0.3770 -0.5345 0.0369 0.0368 -0.5750 + -0.1728 0.0000 0.1333 -1.1339 0.0261 0.0260 -0.4066 + 0 0 -0.0000 -0.0000 -0.7060 0.7082 -0.0000 + 0 0 0 0 -1.0010 -0.0020 0.0318 + 0 0 0 0 0 -1.0010 0.0316 + 0 0 0 0 0 0 1.2223 + + bc = + + 1 2 3 + 2 1 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + + cc = + + Columns 1 through 5: + + -3.5153e-18 1.0000e+00 9.6723e-17 1.8014e-16 1.4113e+00 + 3.6651e-01 -4.4660e-17 9.8026e-01 -1.6036e+00 3.6902e-02 + + Columns 6 and 7: + + -5.0932e-03 9.0251e-02 + 3.6787e-02 -5.7499e-01 + + q = + + 0 1.0000 -0.0000 0.0000 -0.0000 0.0000 -0.0000 + 0 -0.0000 0.7071 0.0000 0.0553 0.0550 0.7028 + 0 -0.0000 -0.0000 0.0000 -0.7053 0.7089 -0.0000 + 0 0.0000 0.0000 -1.0000 -0.0000 0.0000 0.0000 + 0 0 -0.0000 0.0000 -0.7046 -0.7010 0.1103 + 0 -0.0000 0.7071 0.0000 -0.0553 -0.0550 -0.7028 + 1.0000 0 0 0 0 0 0 + + z = + + 0.0000 1.0000 0 0 0 0 0 + -0.6108 0.0000 -0.7917 0.0000 0 0 0 + 0.4887 -0.0000 -0.3770 -0.5345 0.0369 0.0368 -0.5750 + 0.0000 -0.0000 -0.0000 -0.0000 0.7053 0.7031 0.0903 + 0.6108 -0.0000 -0.4713 0.2673 -0.0369 -0.0368 0.5750 + -0.1222 0.0000 0.0943 -0.8018 -0.0369 -0.0368 0.5750 + -0.0000 0.0000 0.0000 0.0000 0.7060 -0.7082 -0.0000 + + ncont = 3 + ac_e = + + 0 0 0 0 -1.2627 0.4334 0.4666 + 0 2.0000 0 -3.7417 -0.8520 0.2924 -0.4342 + 0 0 1.7862 0.3780 -0.2651 -0.7723 0 + 0 0 0 3.7417 0.8520 -0.2924 0.4342 + 0 0 0 0 -1.5540 0.5334 0.5742 + 0 0 0 0 -0.6533 0.2242 0.2414 + 0 0 0 0 -0.5892 0.2022 0.2177 + + ec_e = + + -1.8325 1.0000 2.3752 0 -0.8214 0.2819 1.8016 + 0.4887 0 0.3770 -0.5345 0.1874 0.5461 0 + -0.1728 0 -0.1333 -1.1339 0.1325 0.3861 0 + 0 0 0 0 0.8520 -0.2924 0.4342 + 0 0 0 0 -1.0260 -0.1496 0 + 0 0 0 0 0 1.1937 0 + 0 0 0 0 0 0 1.0000 + + bc_e = + + 1 2 3 + 2 1 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + + cc_e = + + 0 1.0000 0 0 -1.2627 0.4334 0.4666 + 0.3665 0 -0.9803 -1.6036 0.1874 0.5461 0 + + q_e = + + 0 1.0000 0 0 0 0 0 + 0 0 0.7071 0 0.2740 -0.6519 0 + 0 0 0 0 0.8304 0.3491 -0.4342 + 0 0 0 -1.0000 0 0 0 + 0 0 0 0 0.4003 0.1683 0.9008 + 0 0 0.7071 0 -0.2740 0.6519 0 + 1.0000 0 0 0 0 0 0 + + z_e = + + 0 1.0000 0 0 0 0 0 + -0.6108 0 0.7917 0 0 0 0 + 0.4887 0 0.3770 -0.5345 0.1874 0.5461 0 + 0 0 0 0 -0.4107 0.1410 0.9008 + 0.6108 0 0.4713 0.2673 -0.1874 -0.5461 0 + -0.1222 0 -0.0943 -0.8018 -0.1874 -0.5461 0 + 0 0 0 0 -0.8520 0.2924 -0.4342 + + ncont_e = 3 +***** assert <45008> (z, z_e, 1e-4); +!!!!! known bug: https://octave.org/testfailure/?45008 +ASSERT errors for: assert (z,z_e,1e-4) + + Location | Observed | Expected | Reason + (2,3) -0.79175 0.7917 Abs err 1.5834 exceeds tol 0.0001 by 2 + (3,3) -0.37702 0.377 Abs err 0.75402 exceeds tol 0.0001 by 0.8 + (5,3) -0.47128 0.4713 Abs err 0.94258 exceeds tol 0.0001 by 0.9 + (6,3) 0.094256 -0.0943 Abs err 0.18856 exceeds tol 0.0001 by 0.2 + (3,5) 0.036902 0.1874 Abs err 0.1505 exceeds tol 0.0001 by 0.2 + (4,5) 0.70532 -0.4107 Abs err 1.116 exceeds tol 0.0001 by 1 + (5,5) -0.036902 -0.1874 Abs err 0.1505 exceeds tol 0.0001 by 0.2 + (6,5) -0.036902 -0.1874 Abs err 0.1505 exceeds tol 0.0001 by 0.2 + (7,5) 0.706 -0.852 Abs err 1.558 exceeds tol 0.0001 by 2 + (3,6) 0.036787 0.5461 Abs err 0.50931 exceeds tol 0.0001 by 0.5 + (4,6) 0.70312 0.141 Abs err 0.56212 exceeds tol 0.0001 by 0.6 + (5,6) -0.036787 -0.5461 Abs err 0.50931 exceeds tol 0.0001 by 0.5 + (6,6) -0.036787 -0.5461 Abs err 0.50931 exceeds tol 0.0001 by 0.5 + (7,6) -0.70821 0.2924 Abs err 1.0006 exceeds tol 0.0001 by 1 + (3,7) -0.57499 0 Abs err 0.57499 exceeds tol 0.0001 by 0.6 + (4,7) 0.090251 0.9008 Abs err 0.81055 exceeds tol 0.0001 by 0.8 + (5,7) 0.57499 0 Abs err 0.57499 exceeds tol 0.0001 by 0.6 + (6,7) 0.57499 0 Abs err 0.57499 exceeds tol 0.0001 by 0.6 + (7,7) -1.8005e-16 -0.4342 Abs err 0.4342 exceeds tol 0.0001 by 0.4 +shared variables + ac = + + -0.0000 0.0000 0.0000 0.0000 1.4113 -0.0051 0.0903 + 0 2.0000 -0.0000 -3.7417 0.7060 -0.7082 -0.0000 + 0 0 -1.7862 0.3780 -0.0522 -0.0520 0.8132 + 0 0 0 3.7417 -0.7060 0.7082 0.0000 + 0 0 0 -0.0000 -1.9898 0.0072 -0.1272 + 0 0 0 0 0.0112 -0.0000 0.0007 + 0 0 0 0 0.1557 -0.0006 0.0100 + + ec = + + -1.8325 1.0000 -2.3752 0.0000 1.4106 1.4062 0.1805 + 0.4887 -0.0000 -0.3770 -0.5345 0.0369 0.0368 -0.5750 + -0.1728 0.0000 0.1333 -1.1339 0.0261 0.0260 -0.4066 + 0 0 -0.0000 -0.0000 -0.7060 0.7082 -0.0000 + 0 0 0 0 -1.0010 -0.0020 0.0318 + 0 0 0 0 0 -1.0010 0.0316 + 0 0 0 0 0 0 1.2223 + + bc = + + 1 2 3 + 2 1 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + + cc = + + Columns 1 through 5: + + -3.5153e-18 1.0000e+00 9.6723e-17 1.8014e-16 1.4113e+00 + 3.6651e-01 -4.4660e-17 9.8026e-01 -1.6036e+00 3.6902e-02 + + Columns 6 and 7: + + -5.0932e-03 9.0251e-02 + 3.6787e-02 -5.7499e-01 + + q = + + 0 1.0000 -0.0000 0.0000 -0.0000 0.0000 -0.0000 + 0 -0.0000 0.7071 0.0000 0.0553 0.0550 0.7028 + 0 -0.0000 -0.0000 0.0000 -0.7053 0.7089 -0.0000 + 0 0.0000 0.0000 -1.0000 -0.0000 0.0000 0.0000 + 0 0 -0.0000 0.0000 -0.7046 -0.7010 0.1103 + 0 -0.0000 0.7071 0.0000 -0.0553 -0.0550 -0.7028 + 1.0000 0 0 0 0 0 0 + + z = + + 0.0000 1.0000 0 0 0 0 0 + -0.6108 0.0000 -0.7917 0.0000 0 0 0 + 0.4887 -0.0000 -0.3770 -0.5345 0.0369 0.0368 -0.5750 + 0.0000 -0.0000 -0.0000 -0.0000 0.7053 0.7031 0.0903 + 0.6108 -0.0000 -0.4713 0.2673 -0.0369 -0.0368 0.5750 + -0.1222 0.0000 0.0943 -0.8018 -0.0369 -0.0368 0.5750 + -0.0000 0.0000 0.0000 0.0000 0.7060 -0.7082 -0.0000 + + ncont = 3 + ac_e = + + 0 0 0 0 -1.2627 0.4334 0.4666 + 0 2.0000 0 -3.7417 -0.8520 0.2924 -0.4342 + 0 0 1.7862 0.3780 -0.2651 -0.7723 0 + 0 0 0 3.7417 0.8520 -0.2924 0.4342 + 0 0 0 0 -1.5540 0.5334 0.5742 + 0 0 0 0 -0.6533 0.2242 0.2414 + 0 0 0 0 -0.5892 0.2022 0.2177 + + ec_e = + + -1.8325 1.0000 2.3752 0 -0.8214 0.2819 1.8016 + 0.4887 0 0.3770 -0.5345 0.1874 0.5461 0 + -0.1728 0 -0.1333 -1.1339 0.1325 0.3861 0 + 0 0 0 0 0.8520 -0.2924 0.4342 + 0 0 0 0 -1.0260 -0.1496 0 + 0 0 0 0 0 1.1937 0 + 0 0 0 0 0 0 1.0000 + + bc_e = + + 1 2 3 + 2 1 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + 0 0 0 + + cc_e = + + 0 1.0000 0 0 -1.2627 0.4334 0.4666 + 0.3665 0 -0.9803 -1.6036 0.1874 0.5461 0 + + q_e = + + 0 1.0000 0 0 0 0 0 + 0 0 0.7071 0 0.2740 -0.6519 0 + 0 0 0 0 0.8304 0.3491 -0.4342 + 0 0 0 -1.0000 0 0 0 + 0 0 0 0 0.4003 0.1683 0.9008 + 0 0 0.7071 0 -0.2740 0.6519 0 + 1.0000 0 0 0 0 0 0 + + z_e = + + 0 1.0000 0 0 0 0 0 + -0.6108 0 0.7917 0 0 0 0 + 0.4887 0 0.3770 -0.5345 0.1874 0.5461 0 + 0 0 0 0 -0.4107 0.1410 0.9008 + 0.6108 0 0.4713 0.2673 -0.1874 -0.5461 0 + -0.1222 0 -0.0943 -0.8018 -0.1874 -0.5461 0 + 0 0 0 0 -0.8520 0.2924 -0.4342 + + ncont_e = 3 +***** assert (ncont, ncont_e); +***** shared ao, eo, bo, co, q, z, nobsv, ao_e, eo_e, bo_e, co_e, q_e, z_e, nobsv_e + + a = [ 2 0 0 0 0 0 0 + 0 1 0 0 0 1 0 + 2 0 0 2 0 0 0 + 0 0 1 0 1 0 1 + -1 1 0 -1 0 1 0 + 3 0 0 3 0 0 0 + 1 0 1 1 1 0 1 ]; + + e = [ 0 0 0 0 0 0 1 + 0 0 0 0 0 0 3 + 1 0 0 0 0 1 0 + 0 0 0 0 1 0 2 + 0 0 0 0 0 -1 0 + 0 1 0 0 0 0 0 + 0 0 1 1 0 0 0 ]; + + b = [ 1 0 + 0 -1 + 0 1 + 1 0 + 0 -1 + 0 1 + 1 0 ]; + + c = [ 2 0 0 0 0 0 1 + 1 0 0 0 0 0 2 + 0 0 0 0 0 0 3 ]; + + tol = 0; + + [ao, eo, bo, co, q, z, nobsv] = __sl_tg01id__ (a, e, b, c, tol); + + nobsv_e = 3; + + ao_e = [ 0.2177 0.2414 0.5742 0.4342 0.0000 -0.4342 0.4666 + 0.2022 0.2242 0.5334 -0.2924 -0.7723 0.2924 0.4334 + -0.5892 -0.6533 -1.5540 0.8520 -0.2651 -0.8520 -1.2627 + 0.0000 0.0000 0.0000 3.7417 0.3780 -3.7417 0.0000 + 0.0000 0.0000 0.0000 0.0000 1.7862 0.0000 0.0000 + 0.0000 0.0000 0.0000 0.0000 0.0000 2.0000 0.0000 + 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 ]; + + eo_e = [ 1.0000 0.0000 0.0000 0.4342 0.0000 0.0000 1.8016 + 0.0000 1.1937 -0.1496 -0.2924 0.3861 0.5461 0.2819 + 0.0000 0.0000 -1.0260 0.8520 0.1325 0.1874 -0.8214 + 0.0000 0.0000 0.0000 0.0000 -1.1339 -0.5345 0.0000 + 0.0000 0.0000 0.0000 0.0000 -0.1333 0.3770 2.3752 + 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 1.0000 + 0.0000 0.0000 0.0000 0.0000 -0.1728 0.4887 -1.8325 ]; + + bo_e = [ 0.4666 0.0000 + 0.4334 0.5461 + -1.2627 0.1874 + 0.0000 -1.6036 + 0.0000 -0.9803 + 1.0000 0.0000 + 0.0000 0.3665 ]; + + co_e = [ 0.0000 0.0000 0.0000 0.0000 0.0000 2.0000 1.0000 + 0.0000 0.0000 0.0000 0.0000 0.0000 1.0000 2.0000 + 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 3.0000 ]; + + q_e = [ 0.0000 0.0000 0.0000 0.0000 0.0000 1.0000 0.0000 + 0.0000 0.0000 0.0000 0.0000 0.7917 0.0000 -0.6108 + 0.0000 0.5461 0.1874 -0.5345 0.3770 0.0000 0.4887 + 0.9008 0.1410 -0.4107 0.0000 0.0000 0.0000 0.0000 + 0.0000 -0.5461 -0.1874 0.2673 0.4713 0.0000 0.6108 + 0.0000 -0.5461 -0.1874 -0.8018 -0.0943 0.0000 -0.1222 + -0.4342 0.2924 -0.8520 0.0000 0.0000 0.0000 0.0000 ]; + + z_e = [ 0.0000 0.0000 0.0000 0.0000 0.0000 1.0000 0.0000 + 0.0000 -0.6519 0.2740 0.0000 0.7071 0.0000 0.0000 + -0.4342 0.3491 0.8304 0.0000 0.0000 0.0000 0.0000 + 0.0000 0.0000 0.0000 -1.0000 0.0000 0.0000 0.0000 + 0.9008 0.1683 0.4003 0.0000 0.0000 0.0000 0.0000 + 0.0000 0.6519 -0.2740 0.0000 0.7071 0.0000 0.0000 + 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 1.0000 ]; + +***** assert <45008> (ao, ao_e, 1e-4); +!!!!! known bug: https://octave.org/testfailure/?45008 +ASSERT errors for: assert (ao,ao_e,1e-4) + + Location | Observed | Expected | Reason + (1,1) 0.0099555 0.2177 Abs err 0.20774 exceeds tol 0.0001 by 0.2 + (2,1) -0.00056182 0.2022 Abs err 0.20276 exceeds tol 0.0001 by 0.2 + (3,1) 0.15568 -0.5892 Abs err 0.74488 exceeds tol 0.0001 by 0.7 + (1,2) 0.00071777 0.2414 Abs err 0.24068 exceeds tol 0.0001 by 0.2 + (2,2) -4.0506e-05 0.2242 Abs err 0.22424 exceeds tol 0.0001 by 0.2 + (3,2) 0.011224 -0.6533 Abs err 0.66452 exceeds tol 0.0001 by 0.7 + (1,3) -0.12724 0.5742 Abs err 0.70144 exceeds tol 0.0001 by 0.7 + (2,3) 0.0071807 0.5334 Abs err 0.52622 exceeds tol 0.0001 by 0.5 + (3,3) -1.9898 -1.554 Abs err 0.4358 exceeds tol 0.0001 by 0.4 + (1,4) 1.1725e-15 0.4342 Abs err 0.4342 exceeds tol 0.0001 by 0.4 + (2,4) 0.70821 -0.2924 Abs err 1.0006 exceeds tol 0.0001 by 1 + (3,4) -0.706 0.852 Abs err 1.558 exceeds tol 0.0001 by 2 + (1,5) 0.81316 0 Abs err 0.81316 exceeds tol 0.0001 by 0.8 + (2,5) -0.052025 -0.7723 Abs err 0.72028 exceeds tol 0.0001 by 0.7 + (3,5) -0.052188 -0.2651 Abs err 0.21291 exceeds tol 0.0001 by 0.2 + (5,5) -1.7862 1.7862 Abs err 3.5724 exceeds tol 0.0001 by 4 + (1,6) -3.8858e-16 -0.4342 Abs err 0.4342 exceeds tol 0.0001 by 0.4 + (2,6) -0.70821 0.2924 Abs err 1.0006 exceeds tol 0.0001 by 1 + (3,6) 0.706 -0.852 Abs err 1.558 exceeds tol 0.0001 by 2 + (1,7) 0.090251 0.4666 Abs err 0.37635 exceeds tol 0.0001 by 0.4 + (2,7) -0.0050932 0.4334 Abs err 0.43849 exceeds tol 0.0001 by 0.4 + (3,7) 1.4113 -1.2627 Abs err 2.674 exceeds tol 0.0001 by 3 +shared variables + ao = + + 0.0100 0.0007 -0.1272 0.0000 0.8132 -0.0000 0.0903 + -0.0006 -0.0000 0.0072 0.7082 -0.0520 -0.7082 -0.0051 + 0.1557 0.0112 -1.9898 -0.7060 -0.0522 0.7060 1.4113 + 0 0 -0.0000 3.7417 0.3780 -3.7417 0.0000 + 0 0 0 0 -1.7862 -0.0000 0.0000 + 0 0 0 0 0 2.0000 0.0000 + 0 0 0 0 0 0 -0.0000 + + eo = + + 1.2223 0.0316 0.0318 -0.0000 -0.4066 -0.5750 0.1805 + 0 -1.0010 -0.0020 0.7082 0.0260 0.0368 1.4062 + 0 0 -1.0010 -0.7060 0.0261 0.0369 1.4106 + 0 0 0 -0.0000 -1.1339 -0.5345 0.0000 + 0 0 0 -0.0000 0.1333 -0.3770 -2.3752 + 0 0 0 0 0.0000 -0.0000 1.0000 + 0 0 0 0 -0.1728 0.4887 -1.8325 + + bo = + + 9.0251e-02 -5.7499e-01 + -5.0932e-03 3.6787e-02 + 1.4113e+00 3.6902e-02 + 1.8014e-16 -1.6036e+00 + 9.6723e-17 9.8026e-01 + 1.0000e+00 -4.4660e-17 + -3.5153e-18 3.6651e-01 + + co = + + 0 0 0 0 0 2 1 + 0 0 0 0 0 1 2 + 0 0 0 0 0 0 3 + + q = + + 0 0 0 0 0 1.0000 0.0000 + 0 0 0 0.0000 -0.7917 0.0000 -0.6108 + -0.5750 0.0368 0.0369 -0.5345 -0.3770 -0.0000 0.4887 + 0.0903 0.7031 0.7053 -0.0000 -0.0000 -0.0000 0.0000 + 0.5750 -0.0368 -0.0369 0.2673 -0.4713 -0.0000 0.6108 + 0.5750 -0.0368 -0.0369 -0.8018 0.0943 0.0000 -0.1222 + -0.0000 -0.7082 0.7060 0.0000 0.0000 0.0000 -0.0000 + + z = + + -0.0000 0.0000 -0.0000 0.0000 -0.0000 1.0000 0 + 0.7028 0.0550 0.0553 0.0000 0.7071 -0.0000 0 + -0.0000 0.7089 -0.7053 0.0000 -0.0000 -0.0000 0 + 0.0000 0.0000 -0.0000 -1.0000 0.0000 0.0000 0 + 0.1103 -0.7010 -0.7046 0.0000 -0.0000 0 0 + -0.7028 -0.0550 -0.0553 0.0000 0.7071 -0.0000 0 + 0 0 0 0 0 0 1.0000 + + nobsv = 3 + ao_e = + + 0.2177 0.2414 0.5742 0.4342 0 -0.4342 0.4666 + 0.2022 0.2242 0.5334 -0.2924 -0.7723 0.2924 0.4334 + -0.5892 -0.6533 -1.5540 0.8520 -0.2651 -0.8520 -1.2627 + 0 0 0 3.7417 0.3780 -3.7417 0 + 0 0 0 0 1.7862 0 0 + 0 0 0 0 0 2.0000 0 + 0 0 0 0 0 0 0 + + eo_e = + + 1.0000 0 0 0.4342 0 0 1.8016 + 0 1.1937 -0.1496 -0.2924 0.3861 0.5461 0.2819 + 0 0 -1.0260 0.8520 0.1325 0.1874 -0.8214 + 0 0 0 0 -1.1339 -0.5345 0 + 0 0 0 0 -0.1333 0.3770 2.3752 + 0 0 0 0 0 0 1.0000 + 0 0 0 0 -0.1728 0.4887 -1.8325 + + bo_e = + + 0.4666 0 + 0.4334 0.5461 + -1.2627 0.1874 + 0 -1.6036 + 0 -0.9803 + 1.0000 0 + 0 0.3665 + + co_e = + + 0 0 0 0 0 2 1 + 0 0 0 0 0 1 2 + 0 0 0 0 0 0 3 + + q_e = + + 0 0 0 0 0 1.0000 0 + 0 0 0 0 0.7917 0 -0.6108 + 0 0.5461 0.1874 -0.5345 0.3770 0 0.4887 + 0.9008 0.1410 -0.4107 0 0 0 0 + 0 -0.5461 -0.1874 0.2673 0.4713 0 0.6108 + 0 -0.5461 -0.1874 -0.8018 -0.0943 0 -0.1222 + -0.4342 0.2924 -0.8520 0 0 0 0 + + z_e = + + 0 0 0 0 0 1.0000 0 + 0 -0.6519 0.2740 0 0.7071 0 0 + -0.4342 0.3491 0.8304 0 0 0 0 + 0 0 0 -1.0000 0 0 0 + 0.9008 0.1683 0.4003 0 0 0 0 + 0 0.6519 -0.2740 0 0.7071 0 0 + 0 0 0 0 0 0 1.0000 + + nobsv_e = 3 +***** assert <45008> (eo, eo_e, 1e-4); +!!!!! known bug: https://octave.org/testfailure/?45008 +ASSERT errors for: assert (eo,eo_e,1e-4) + + Location | Observed | Expected | Reason + (1,1) 1.2223 1 Abs err 0.22226 exceeds tol 0.0001 by 0.2 + (1,2) 0.031632 0 Abs err 0.031632 exceeds tol 0.0001 by 0.03 + (2,2) -1.001 1.1937 Abs err 2.1947 exceeds tol 0.0001 by 2 + (1,3) 0.031795 0 Abs err 0.031795 exceeds tol 0.0001 by 0.03 + (2,3) -0.0020342 -0.1496 Abs err 0.14757 exceeds tol 0.0001 by 0.1 + (3,3) -1.001 -1.026 Abs err 0.024979 exceeds tol 0.0001 by 0.02 + (1,4) -3.3646e-16 0.4342 Abs err 0.4342 exceeds tol 0.0001 by 0.4 + (2,4) 0.70821 -0.2924 Abs err 1.0006 exceeds tol 0.0001 by 1 + (3,4) -0.706 0.852 Abs err 1.558 exceeds tol 0.0001 by 2 + (1,5) -0.40658 0 Abs err 0.40658 exceeds tol 0.0001 by 0.4 + (2,5) 0.026012 0.3861 Abs err 0.36009 exceeds tol 0.0001 by 0.4 + (3,5) 0.026094 0.1325 Abs err 0.10641 exceeds tol 0.0001 by 0.1 + (5,5) 0.1333 -0.1333 Abs err 0.2666 exceeds tol 0.0001 by 0.3 + (1,6) -0.57499 0 Abs err 0.57499 exceeds tol 0.0001 by 0.6 + (2,6) 0.036787 0.5461 Abs err 0.50931 exceeds tol 0.0001 by 0.5 + (3,6) 0.036902 0.1874 Abs err 0.1505 exceeds tol 0.0001 by 0.2 + (5,6) -0.37702 0.377 Abs err 0.75402 exceeds tol 0.0001 by 0.8 + (1,7) 0.1805 1.8016 Abs err 1.6211 exceeds tol 0.0001 by 2 + (2,7) 1.4062 0.2819 Abs err 1.1243 exceeds tol 0.0001 by 1 + (3,7) 1.4106 -0.8214 Abs err 2.232 exceeds tol 0.0001 by 2 + (5,7) -2.3752 2.3752 Abs err 4.7504 exceeds tol 0.0001 by 5 +shared variables + ao = + + 0.0100 0.0007 -0.1272 0.0000 0.8132 -0.0000 0.0903 + -0.0006 -0.0000 0.0072 0.7082 -0.0520 -0.7082 -0.0051 + 0.1557 0.0112 -1.9898 -0.7060 -0.0522 0.7060 1.4113 + 0 0 -0.0000 3.7417 0.3780 -3.7417 0.0000 + 0 0 0 0 -1.7862 -0.0000 0.0000 + 0 0 0 0 0 2.0000 0.0000 + 0 0 0 0 0 0 -0.0000 + + eo = + + 1.2223 0.0316 0.0318 -0.0000 -0.4066 -0.5750 0.1805 + 0 -1.0010 -0.0020 0.7082 0.0260 0.0368 1.4062 + 0 0 -1.0010 -0.7060 0.0261 0.0369 1.4106 + 0 0 0 -0.0000 -1.1339 -0.5345 0.0000 + 0 0 0 -0.0000 0.1333 -0.3770 -2.3752 + 0 0 0 0 0.0000 -0.0000 1.0000 + 0 0 0 0 -0.1728 0.4887 -1.8325 + + bo = + + 9.0251e-02 -5.7499e-01 + -5.0932e-03 3.6787e-02 + 1.4113e+00 3.6902e-02 + 1.8014e-16 -1.6036e+00 + 9.6723e-17 9.8026e-01 + 1.0000e+00 -4.4660e-17 + -3.5153e-18 3.6651e-01 + + co = + + 0 0 0 0 0 2 1 + 0 0 0 0 0 1 2 + 0 0 0 0 0 0 3 + + q = + + 0 0 0 0 0 1.0000 0.0000 + 0 0 0 0.0000 -0.7917 0.0000 -0.6108 + -0.5750 0.0368 0.0369 -0.5345 -0.3770 -0.0000 0.4887 + 0.0903 0.7031 0.7053 -0.0000 -0.0000 -0.0000 0.0000 + 0.5750 -0.0368 -0.0369 0.2673 -0.4713 -0.0000 0.6108 + 0.5750 -0.0368 -0.0369 -0.8018 0.0943 0.0000 -0.1222 + -0.0000 -0.7082 0.7060 0.0000 0.0000 0.0000 -0.0000 + + z = + + -0.0000 0.0000 -0.0000 0.0000 -0.0000 1.0000 0 + 0.7028 0.0550 0.0553 0.0000 0.7071 -0.0000 0 + -0.0000 0.7089 -0.7053 0.0000 -0.0000 -0.0000 0 + 0.0000 0.0000 -0.0000 -1.0000 0.0000 0.0000 0 + 0.1103 -0.7010 -0.7046 0.0000 -0.0000 0 0 + -0.7028 -0.0550 -0.0553 0.0000 0.7071 -0.0000 0 + 0 0 0 0 0 0 1.0000 + + nobsv = 3 + ao_e = + + 0.2177 0.2414 0.5742 0.4342 0 -0.4342 0.4666 + 0.2022 0.2242 0.5334 -0.2924 -0.7723 0.2924 0.4334 + -0.5892 -0.6533 -1.5540 0.8520 -0.2651 -0.8520 -1.2627 + 0 0 0 3.7417 0.3780 -3.7417 0 + 0 0 0 0 1.7862 0 0 + 0 0 0 0 0 2.0000 0 + 0 0 0 0 0 0 0 + + eo_e = + + 1.0000 0 0 0.4342 0 0 1.8016 + 0 1.1937 -0.1496 -0.2924 0.3861 0.5461 0.2819 + 0 0 -1.0260 0.8520 0.1325 0.1874 -0.8214 + 0 0 0 0 -1.1339 -0.5345 0 + 0 0 0 0 -0.1333 0.3770 2.3752 + 0 0 0 0 0 0 1.0000 + 0 0 0 0 -0.1728 0.4887 -1.8325 + + bo_e = + + 0.4666 0 + 0.4334 0.5461 + -1.2627 0.1874 + 0 -1.6036 + 0 -0.9803 + 1.0000 0 + 0 0.3665 + + co_e = + + 0 0 0 0 0 2 1 + 0 0 0 0 0 1 2 + 0 0 0 0 0 0 3 + + q_e = + + 0 0 0 0 0 1.0000 0 + 0 0 0 0 0.7917 0 -0.6108 + 0 0.5461 0.1874 -0.5345 0.3770 0 0.4887 + 0.9008 0.1410 -0.4107 0 0 0 0 + 0 -0.5461 -0.1874 0.2673 0.4713 0 0.6108 + 0 -0.5461 -0.1874 -0.8018 -0.0943 0 -0.1222 + -0.4342 0.2924 -0.8520 0 0 0 0 + + z_e = + + 0 0 0 0 0 1.0000 0 + 0 -0.6519 0.2740 0 0.7071 0 0 + -0.4342 0.3491 0.8304 0 0 0 0 + 0 0 0 -1.0000 0 0 0 + 0.9008 0.1683 0.4003 0 0 0 0 + 0 0.6519 -0.2740 0 0.7071 0 0 + 0 0 0 0 0 0 1.0000 + + nobsv_e = 3 +***** assert <45008> (bo, bo_e, 1e-4); +!!!!! known bug: https://octave.org/testfailure/?45008 +ASSERT errors for: assert (bo,bo_e,1e-4) + + Location | Observed | Expected | Reason + (1,1) 0.090251 0.4666 Abs err 0.37635 exceeds tol 0.0001 by 0.4 + (2,1) -0.0050932 0.4334 Abs err 0.43849 exceeds tol 0.0001 by 0.4 + (3,1) 1.4113 -1.2627 Abs err 2.674 exceeds tol 0.0001 by 3 + (1,2) -0.57499 0 Abs err 0.57499 exceeds tol 0.0001 by 0.6 + (2,2) 0.036787 0.5461 Abs err 0.50931 exceeds tol 0.0001 by 0.5 + (3,2) 0.036902 0.1874 Abs err 0.1505 exceeds tol 0.0001 by 0.2 + (5,2) 0.98026 -0.9803 Abs err 1.9606 exceeds tol 0.0001 by 2 +shared variables + ao = + + 0.0100 0.0007 -0.1272 0.0000 0.8132 -0.0000 0.0903 + -0.0006 -0.0000 0.0072 0.7082 -0.0520 -0.7082 -0.0051 + 0.1557 0.0112 -1.9898 -0.7060 -0.0522 0.7060 1.4113 + 0 0 -0.0000 3.7417 0.3780 -3.7417 0.0000 + 0 0 0 0 -1.7862 -0.0000 0.0000 + 0 0 0 0 0 2.0000 0.0000 + 0 0 0 0 0 0 -0.0000 + + eo = + + 1.2223 0.0316 0.0318 -0.0000 -0.4066 -0.5750 0.1805 + 0 -1.0010 -0.0020 0.7082 0.0260 0.0368 1.4062 + 0 0 -1.0010 -0.7060 0.0261 0.0369 1.4106 + 0 0 0 -0.0000 -1.1339 -0.5345 0.0000 + 0 0 0 -0.0000 0.1333 -0.3770 -2.3752 + 0 0 0 0 0.0000 -0.0000 1.0000 + 0 0 0 0 -0.1728 0.4887 -1.8325 + + bo = + + 9.0251e-02 -5.7499e-01 + -5.0932e-03 3.6787e-02 + 1.4113e+00 3.6902e-02 + 1.8014e-16 -1.6036e+00 + 9.6723e-17 9.8026e-01 + 1.0000e+00 -4.4660e-17 + -3.5153e-18 3.6651e-01 + + co = + + 0 0 0 0 0 2 1 + 0 0 0 0 0 1 2 + 0 0 0 0 0 0 3 + + q = + + 0 0 0 0 0 1.0000 0.0000 + 0 0 0 0.0000 -0.7917 0.0000 -0.6108 + -0.5750 0.0368 0.0369 -0.5345 -0.3770 -0.0000 0.4887 + 0.0903 0.7031 0.7053 -0.0000 -0.0000 -0.0000 0.0000 + 0.5750 -0.0368 -0.0369 0.2673 -0.4713 -0.0000 0.6108 + 0.5750 -0.0368 -0.0369 -0.8018 0.0943 0.0000 -0.1222 + -0.0000 -0.7082 0.7060 0.0000 0.0000 0.0000 -0.0000 + + z = + + -0.0000 0.0000 -0.0000 0.0000 -0.0000 1.0000 0 + 0.7028 0.0550 0.0553 0.0000 0.7071 -0.0000 0 + -0.0000 0.7089 -0.7053 0.0000 -0.0000 -0.0000 0 + 0.0000 0.0000 -0.0000 -1.0000 0.0000 0.0000 0 + 0.1103 -0.7010 -0.7046 0.0000 -0.0000 0 0 + -0.7028 -0.0550 -0.0553 0.0000 0.7071 -0.0000 0 + 0 0 0 0 0 0 1.0000 + + nobsv = 3 + ao_e = + + 0.2177 0.2414 0.5742 0.4342 0 -0.4342 0.4666 + 0.2022 0.2242 0.5334 -0.2924 -0.7723 0.2924 0.4334 + -0.5892 -0.6533 -1.5540 0.8520 -0.2651 -0.8520 -1.2627 + 0 0 0 3.7417 0.3780 -3.7417 0 + 0 0 0 0 1.7862 0 0 + 0 0 0 0 0 2.0000 0 + 0 0 0 0 0 0 0 + + eo_e = + + 1.0000 0 0 0.4342 0 0 1.8016 + 0 1.1937 -0.1496 -0.2924 0.3861 0.5461 0.2819 + 0 0 -1.0260 0.8520 0.1325 0.1874 -0.8214 + 0 0 0 0 -1.1339 -0.5345 0 + 0 0 0 0 -0.1333 0.3770 2.3752 + 0 0 0 0 0 0 1.0000 + 0 0 0 0 -0.1728 0.4887 -1.8325 + + bo_e = + + 0.4666 0 + 0.4334 0.5461 + -1.2627 0.1874 + 0 -1.6036 + 0 -0.9803 + 1.0000 0 + 0 0.3665 + + co_e = + + 0 0 0 0 0 2 1 + 0 0 0 0 0 1 2 + 0 0 0 0 0 0 3 + + q_e = + + 0 0 0 0 0 1.0000 0 + 0 0 0 0 0.7917 0 -0.6108 + 0 0.5461 0.1874 -0.5345 0.3770 0 0.4887 + 0.9008 0.1410 -0.4107 0 0 0 0 + 0 -0.5461 -0.1874 0.2673 0.4713 0 0.6108 + 0 -0.5461 -0.1874 -0.8018 -0.0943 0 -0.1222 + -0.4342 0.2924 -0.8520 0 0 0 0 + + z_e = + + 0 0 0 0 0 1.0000 0 + 0 -0.6519 0.2740 0 0.7071 0 0 + -0.4342 0.3491 0.8304 0 0 0 0 + 0 0 0 -1.0000 0 0 0 + 0.9008 0.1683 0.4003 0 0 0 0 + 0 0.6519 -0.2740 0 0.7071 0 0 + 0 0 0 0 0 0 1.0000 + + nobsv_e = 3 +***** assert <45008> (co, co_e, 1e-4); +***** assert <45008> (q, q_e, 1e-4); +!!!!! known bug: https://octave.org/testfailure/?45008 +ASSERT errors for: assert (q,q_e,1e-4) + + Location | Observed | Expected | Reason + (3,1) -0.57499 0 Abs err 0.57499 exceeds tol 0.0001 by 0.6 + (4,1) 0.090251 0.9008 Abs err 0.81055 exceeds tol 0.0001 by 0.8 + (5,1) 0.57499 0 Abs err 0.57499 exceeds tol 0.0001 by 0.6 + (6,1) 0.57499 0 Abs err 0.57499 exceeds tol 0.0001 by 0.6 + (7,1) -1.8005e-16 -0.4342 Abs err 0.4342 exceeds tol 0.0001 by 0.4 + (3,2) 0.036787 0.5461 Abs err 0.50931 exceeds tol 0.0001 by 0.5 + (4,2) 0.70312 0.141 Abs err 0.56212 exceeds tol 0.0001 by 0.6 + (5,2) -0.036787 -0.5461 Abs err 0.50931 exceeds tol 0.0001 by 0.5 + (6,2) -0.036787 -0.5461 Abs err 0.50931 exceeds tol 0.0001 by 0.5 + (7,2) -0.70821 0.2924 Abs err 1.0006 exceeds tol 0.0001 by 1 + (3,3) 0.036902 0.1874 Abs err 0.1505 exceeds tol 0.0001 by 0.2 + (4,3) 0.70532 -0.4107 Abs err 1.116 exceeds tol 0.0001 by 1 + (5,3) -0.036902 -0.1874 Abs err 0.1505 exceeds tol 0.0001 by 0.2 + (6,3) -0.036902 -0.1874 Abs err 0.1505 exceeds tol 0.0001 by 0.2 + (7,3) 0.706 -0.852 Abs err 1.558 exceeds tol 0.0001 by 2 + (2,5) -0.79175 0.7917 Abs err 1.5834 exceeds tol 0.0001 by 2 + (3,5) -0.37702 0.377 Abs err 0.75402 exceeds tol 0.0001 by 0.8 + (5,5) -0.47128 0.4713 Abs err 0.94258 exceeds tol 0.0001 by 0.9 + (6,5) 0.094256 -0.0943 Abs err 0.18856 exceeds tol 0.0001 by 0.2 +shared variables + ao = + + 0.0100 0.0007 -0.1272 0.0000 0.8132 -0.0000 0.0903 + -0.0006 -0.0000 0.0072 0.7082 -0.0520 -0.7082 -0.0051 + 0.1557 0.0112 -1.9898 -0.7060 -0.0522 0.7060 1.4113 + 0 0 -0.0000 3.7417 0.3780 -3.7417 0.0000 + 0 0 0 0 -1.7862 -0.0000 0.0000 + 0 0 0 0 0 2.0000 0.0000 + 0 0 0 0 0 0 -0.0000 + + eo = + + 1.2223 0.0316 0.0318 -0.0000 -0.4066 -0.5750 0.1805 + 0 -1.0010 -0.0020 0.7082 0.0260 0.0368 1.4062 + 0 0 -1.0010 -0.7060 0.0261 0.0369 1.4106 + 0 0 0 -0.0000 -1.1339 -0.5345 0.0000 + 0 0 0 -0.0000 0.1333 -0.3770 -2.3752 + 0 0 0 0 0.0000 -0.0000 1.0000 + 0 0 0 0 -0.1728 0.4887 -1.8325 + + bo = + + 9.0251e-02 -5.7499e-01 + -5.0932e-03 3.6787e-02 + 1.4113e+00 3.6902e-02 + 1.8014e-16 -1.6036e+00 + 9.6723e-17 9.8026e-01 + 1.0000e+00 -4.4660e-17 + -3.5153e-18 3.6651e-01 + + co = + + 0 0 0 0 0 2 1 + 0 0 0 0 0 1 2 + 0 0 0 0 0 0 3 + + q = + + 0 0 0 0 0 1.0000 0.0000 + 0 0 0 0.0000 -0.7917 0.0000 -0.6108 + -0.5750 0.0368 0.0369 -0.5345 -0.3770 -0.0000 0.4887 + 0.0903 0.7031 0.7053 -0.0000 -0.0000 -0.0000 0.0000 + 0.5750 -0.0368 -0.0369 0.2673 -0.4713 -0.0000 0.6108 + 0.5750 -0.0368 -0.0369 -0.8018 0.0943 0.0000 -0.1222 + -0.0000 -0.7082 0.7060 0.0000 0.0000 0.0000 -0.0000 + + z = + + -0.0000 0.0000 -0.0000 0.0000 -0.0000 1.0000 0 + 0.7028 0.0550 0.0553 0.0000 0.7071 -0.0000 0 + -0.0000 0.7089 -0.7053 0.0000 -0.0000 -0.0000 0 + 0.0000 0.0000 -0.0000 -1.0000 0.0000 0.0000 0 + 0.1103 -0.7010 -0.7046 0.0000 -0.0000 0 0 + -0.7028 -0.0550 -0.0553 0.0000 0.7071 -0.0000 0 + 0 0 0 0 0 0 1.0000 + + nobsv = 3 + ao_e = + + 0.2177 0.2414 0.5742 0.4342 0 -0.4342 0.4666 + 0.2022 0.2242 0.5334 -0.2924 -0.7723 0.2924 0.4334 + -0.5892 -0.6533 -1.5540 0.8520 -0.2651 -0.8520 -1.2627 + 0 0 0 3.7417 0.3780 -3.7417 0 + 0 0 0 0 1.7862 0 0 + 0 0 0 0 0 2.0000 0 + 0 0 0 0 0 0 0 + + eo_e = + + 1.0000 0 0 0.4342 0 0 1.8016 + 0 1.1937 -0.1496 -0.2924 0.3861 0.5461 0.2819 + 0 0 -1.0260 0.8520 0.1325 0.1874 -0.8214 + 0 0 0 0 -1.1339 -0.5345 0 + 0 0 0 0 -0.1333 0.3770 2.3752 + 0 0 0 0 0 0 1.0000 + 0 0 0 0 -0.1728 0.4887 -1.8325 + + bo_e = + + 0.4666 0 + 0.4334 0.5461 + -1.2627 0.1874 + 0 -1.6036 + 0 -0.9803 + 1.0000 0 + 0 0.3665 + + co_e = + + 0 0 0 0 0 2 1 + 0 0 0 0 0 1 2 + 0 0 0 0 0 0 3 + + q_e = + + 0 0 0 0 0 1.0000 0 + 0 0 0 0 0.7917 0 -0.6108 + 0 0.5461 0.1874 -0.5345 0.3770 0 0.4887 + 0.9008 0.1410 -0.4107 0 0 0 0 + 0 -0.5461 -0.1874 0.2673 0.4713 0 0.6108 + 0 -0.5461 -0.1874 -0.8018 -0.0943 0 -0.1222 + -0.4342 0.2924 -0.8520 0 0 0 0 + + z_e = + + 0 0 0 0 0 1.0000 0 + 0 -0.6519 0.2740 0 0.7071 0 0 + -0.4342 0.3491 0.8304 0 0 0 0 + 0 0 0 -1.0000 0 0 0 + 0.9008 0.1683 0.4003 0 0 0 0 + 0 0.6519 -0.2740 0 0.7071 0 0 + 0 0 0 0 0 0 1.0000 + + nobsv_e = 3 +***** assert <45008> (z, z_e, 1e-4); +!!!!! known bug: https://octave.org/testfailure/?45008 +ASSERT errors for: assert (z,z_e,1e-4) + + Location | Observed | Expected | Reason + (2,1) 0.70279 0 Abs err 0.70279 exceeds tol 0.0001 by 0.7 + (3,1) -1.9854e-16 -0.4342 Abs err 0.4342 exceeds tol 0.0001 by 0.4 + (5,1) 0.11031 0.9008 Abs err 0.79049 exceeds tol 0.0001 by 0.8 + (6,1) -0.70279 0 Abs err 0.70279 exceeds tol 0.0001 by 0.7 + (2,2) 0.055012 -0.6519 Abs err 0.70691 exceeds tol 0.0001 by 0.7 + (3,2) 0.70893 0.3491 Abs err 0.35983 exceeds tol 0.0001 by 0.4 + (5,2) -0.70098 0.1683 Abs err 0.86928 exceeds tol 0.0001 by 0.9 + (6,2) -0.055012 0.6519 Abs err 0.70691 exceeds tol 0.0001 by 0.7 + (2,3) 0.055297 0.274 Abs err 0.2187 exceeds tol 0.0001 by 0.2 + (3,3) -0.70528 0.8304 Abs err 1.5357 exceeds tol 0.0001 by 2 + (5,3) -0.7046 0.4003 Abs err 1.1049 exceeds tol 0.0001 by 1 + (6,3) -0.055297 -0.274 Abs err 0.2187 exceeds tol 0.0001 by 0.2 +shared variables + ao = + + 0.0100 0.0007 -0.1272 0.0000 0.8132 -0.0000 0.0903 + -0.0006 -0.0000 0.0072 0.7082 -0.0520 -0.7082 -0.0051 + 0.1557 0.0112 -1.9898 -0.7060 -0.0522 0.7060 1.4113 + 0 0 -0.0000 3.7417 0.3780 -3.7417 0.0000 + 0 0 0 0 -1.7862 -0.0000 0.0000 + 0 0 0 0 0 2.0000 0.0000 + 0 0 0 0 0 0 -0.0000 + + eo = + + 1.2223 0.0316 0.0318 -0.0000 -0.4066 -0.5750 0.1805 + 0 -1.0010 -0.0020 0.7082 0.0260 0.0368 1.4062 + 0 0 -1.0010 -0.7060 0.0261 0.0369 1.4106 + 0 0 0 -0.0000 -1.1339 -0.5345 0.0000 + 0 0 0 -0.0000 0.1333 -0.3770 -2.3752 + 0 0 0 0 0.0000 -0.0000 1.0000 + 0 0 0 0 -0.1728 0.4887 -1.8325 + + bo = + + 9.0251e-02 -5.7499e-01 + -5.0932e-03 3.6787e-02 + 1.4113e+00 3.6902e-02 + 1.8014e-16 -1.6036e+00 + 9.6723e-17 9.8026e-01 + 1.0000e+00 -4.4660e-17 + -3.5153e-18 3.6651e-01 + + co = + + 0 0 0 0 0 2 1 + 0 0 0 0 0 1 2 + 0 0 0 0 0 0 3 + + q = + + 0 0 0 0 0 1.0000 0.0000 + 0 0 0 0.0000 -0.7917 0.0000 -0.6108 + -0.5750 0.0368 0.0369 -0.5345 -0.3770 -0.0000 0.4887 + 0.0903 0.7031 0.7053 -0.0000 -0.0000 -0.0000 0.0000 + 0.5750 -0.0368 -0.0369 0.2673 -0.4713 -0.0000 0.6108 + 0.5750 -0.0368 -0.0369 -0.8018 0.0943 0.0000 -0.1222 + -0.0000 -0.7082 0.7060 0.0000 0.0000 0.0000 -0.0000 + + z = + + -0.0000 0.0000 -0.0000 0.0000 -0.0000 1.0000 0 + 0.7028 0.0550 0.0553 0.0000 0.7071 -0.0000 0 + -0.0000 0.7089 -0.7053 0.0000 -0.0000 -0.0000 0 + 0.0000 0.0000 -0.0000 -1.0000 0.0000 0.0000 0 + 0.1103 -0.7010 -0.7046 0.0000 -0.0000 0 0 + -0.7028 -0.0550 -0.0553 0.0000 0.7071 -0.0000 0 + 0 0 0 0 0 0 1.0000 + + nobsv = 3 + ao_e = + + 0.2177 0.2414 0.5742 0.4342 0 -0.4342 0.4666 + 0.2022 0.2242 0.5334 -0.2924 -0.7723 0.2924 0.4334 + -0.5892 -0.6533 -1.5540 0.8520 -0.2651 -0.8520 -1.2627 + 0 0 0 3.7417 0.3780 -3.7417 0 + 0 0 0 0 1.7862 0 0 + 0 0 0 0 0 2.0000 0 + 0 0 0 0 0 0 0 + + eo_e = + + 1.0000 0 0 0.4342 0 0 1.8016 + 0 1.1937 -0.1496 -0.2924 0.3861 0.5461 0.2819 + 0 0 -1.0260 0.8520 0.1325 0.1874 -0.8214 + 0 0 0 0 -1.1339 -0.5345 0 + 0 0 0 0 -0.1333 0.3770 2.3752 + 0 0 0 0 0 0 1.0000 + 0 0 0 0 -0.1728 0.4887 -1.8325 + + bo_e = + + 0.4666 0 + 0.4334 0.5461 + -1.2627 0.1874 + 0 -1.6036 + 0 -0.9803 + 1.0000 0 + 0 0.3665 + + co_e = + + 0 0 0 0 0 2 1 + 0 0 0 0 0 1 2 + 0 0 0 0 0 0 3 + + q_e = + + 0 0 0 0 0 1.0000 0 + 0 0 0 0 0.7917 0 -0.6108 + 0 0.5461 0.1874 -0.5345 0.3770 0 0.4887 + 0.9008 0.1410 -0.4107 0 0 0 0 + 0 -0.5461 -0.1874 0.2673 0.4713 0 0.6108 + 0 -0.5461 -0.1874 -0.8018 -0.0943 0 -0.1222 + -0.4342 0.2924 -0.8520 0 0 0 0 + + z_e = + + 0 0 0 0 0 1.0000 0 + 0 -0.6519 0.2740 0 0.7071 0 0 + -0.4342 0.3491 0.8304 0 0 0 0 + 0 0 0 -1.0000 0 0 0 + 0.9008 0.1683 0.4003 0 0 0 0 + 0 0.6519 -0.2740 0 0.7071 0 0 + 0 0 0 0 0 0 1.0000 + + nobsv_e = 3 +***** assert (nobsv, nobsv_e); +***** shared NUM, DEN, NUMe, DENe + A = [ -1.0 0.0 0.0 + 0.0 -2.0 0.0 + 0.0 0.0 -3.0 ]; + + B = [ 0.0 1.0 -1.0 + 1.0 1.0 0.0 ].'; + + C = [ 0.0 1.0 1.0 + 1.0 1.0 1.0 ]; + + D = [ 1.0 0.0 + 0.0 1.0 ]; + + [NUM, DEN] = tfdata (ss (A, B, C, D)); + ## remove possibly existing idendical pole/zero pairs + for i=1:2 + for j=1:2 + gcdij = polygcd (NUM{i,j},DEN{i,j}); + if length (gcdij) > 1 + NUM{i,j} = deconv (NUM{i,j}, gcdij); + DEN{i,j} = deconv (DEN{i,j}, gcdij); + endif + endfor endfor - HSVe = [ 2.6790 2.1589 0.8424 0.1929 0.0219 0.0011 ].'; + NUMe = {[1, 5, 7], [1]; [1], [1, 5, 5]}; + DENe = {[1, 5, 6], [1, 2]; [1, 5, 6], [1, 3, 2]}; -***** assert (Mo, Me, 1e-3); +***** assert (NUM, NUMe, 1e-4); +***** assert (DEN, DENe, 1e-4); +***** shared NUM, DEN, NUMe, DENe + A = [ 0 ]; + + B = [ 1 ]; + + C = [ 1 ]; + + D = [ 0 ]; + + [NUM, DEN] = tfdata (ss (A, B, C, D)); + + NUMe = {[1]}; + + DENe = {[1, 0]}; + +***** assert (NUM, NUMe, 1e-4); +***** assert (DEN, DENe, 1e-4); +***** shared Mo, Me + INDEX = [ 3 3 ]; + + DCOEFF = [ 1.0 6.0 11.0 6.0 + 1.0 6.0 11.0 6.0 ]; + + UCOEFF = zeros (2, 2, 4); + + u11 = [ 1.0 6.0 12.0 7.0 ]; + u12 = [ 0.0 1.0 4.0 3.0 ]; + u21 = [ 0.0 0.0 1.0 1.0 ]; + u22 = [ 1.0 8.0 20.0 15.0 ]; + + UCOEFF(1,1,:) = u11; + UCOEFF(1,2,:) = u12; + UCOEFF(2,1,:) = u21; + UCOEFF(2,2,:) = u22; + + [Ao, Bo, Co, Do] = __sl_td04ad__ (UCOEFF, DCOEFF, INDEX, 0); + + Ae = [ 0.5000 -0.8028 0.9387 + 4.4047 -2.3380 2.5076 + -5.5541 1.6872 -4.1620 ]; + + Be = [ -0.2000 -1.2500 + 0.0000 -0.6097 + 0.0000 2.2217 ]; + + Ce = [ 0.0000 -0.8679 0.2119 + 0.0000 0.0000 0.9002 ]; + + De = [ 1.0000 0.0000 + 0.0000 1.0000 ]; + + Mo = [Ao, Bo; Co, Do]; + Me = [Ae, Be; Ce, De]; + +***** assert (Mo, Me, 1e-4); +43 tests, 33 passed, 0 known failure, 10 skipped +[inst/sigma.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/sigma.m +***** shared sv_exp, w_exp, sv_obs, w_obs + A = [1, 2; 3, 4]; + B = [5, 6; 7, 8]; + C = [4, 3; 2, 1]; + D = [8, 7; 6, 5]; + w = [2, 3, 4]; + sv_exp = [7.9176, 8.6275, 9.4393; + 0.6985, 0.6086, 0.5195]; + w_exp = [2; 3; 4]; + [sv_obs, w_obs] = sigma (ss (A, B, C, D), w); +***** assert (sv_obs, sv_exp, 1e-4); +***** assert (w_obs, w_exp, 1e-4); +2 tests, 2 passed, 0 known failure, 0 skipped +[inst/cfconred.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/cfconred.m +***** shared Mo, Me, Info, HSVe + A = [ 0 1.0000 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 + 0 0 -0.0150 0.7650 0 0 0 0 + 0 0 -0.7650 -0.0150 0 0 0 0 + 0 0 0 0 -0.0280 1.4100 0 0 + 0 0 0 0 -1.4100 -0.0280 0 0 + 0 0 0 0 0 0 -0.0400 1.850 + 0 0 0 0 0 0 -1.8500 -0.040 ]; + + B = [ 0.0260 + -0.2510 + 0.0330 + -0.8860 + -4.0170 + 0.1450 + 3.6040 + 0.2800 ]; + + C = [ -.996 -.105 0.261 .009 -.001 -.043 0.002 -0.026 ]; + + D = [ 0.0 ]; + + G = ss (A, B, C, D); % "scaled", false + + F = [ 4.4721e-002 6.6105e-001 4.6986e-003 3.6014e-001 1.0325e-001 -3.7541e-002 -4.2685e-002 3.2873e-002 ]; + + L = [ 4.1089e-001 + 8.6846e-002 + 3.8523e-004 + -3.6194e-003 + -8.8037e-003 + 8.4205e-003 + 1.2349e-003 + 4.2632e-003 ]; + + [Kr, Info] = cfconred (G, F, L, 4, "method", "bfsr-bta", "cf", "left", "feedback", "+"); + [Ao, Bo, Co, Do] = ssdata (Kr); + + Ae = [ 0.5946 -0.7336 0.1914 -0.3368 + 0.5960 -0.0184 -0.1088 0.0207 + 1.2253 0.2043 0.1009 -1.4948 + -0.0330 -0.0243 1.3440 0.0035 ]; + + Be = [ 0.0015 + -0.0202 + 0.0159 + -0.0544 ]; + + Ce = [ 0.3534 0.0274 0.0337 -0.0320 ]; + + De = [ 0.0000 ]; + + HSVe = [ 4.9078 4.8745 3.8455 3.7811 1.2289 1.1785 0.5176 0.1148 ].'; + + Mo = [Ao, Bo; Co, Do]; + Me = [Ae, Be; Ce, De]; + +***** xtest assert (Mo, Me, 1e-4); ***** assert (Info.hsv, HSVe, 1e-4); 2 tests, 2 passed, 0 known failure, 0 skipped +[inst/h2syn.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/h2syn.m +***** shared M, M_exp + A = [-1.0 0.0 4.0 5.0 -3.0 -2.0 + -2.0 4.0 -7.0 -2.0 0.0 3.0 + -6.0 9.0 -5.0 0.0 2.0 -1.0 + -8.0 4.0 7.0 -1.0 -3.0 0.0 + 2.0 5.0 8.0 -9.0 1.0 -4.0 + 3.0 -5.0 8.0 0.0 2.0 -6.0]; + + B = [-3.0 -4.0 -2.0 1.0 0.0 + 2.0 0.0 1.0 -5.0 2.0 + -5.0 -7.0 0.0 7.0 -2.0 + 4.0 -6.0 1.0 1.0 -2.0 + -3.0 9.0 -8.0 0.0 5.0 + 1.0 -2.0 3.0 -6.0 -2.0]; + + C = [ 1.0 -1.0 2.0 -4.0 0.0 -3.0 + -3.0 0.0 5.0 -1.0 1.0 1.0 + -7.0 5.0 0.0 -8.0 2.0 -2.0 + 9.0 -3.0 4.0 0.0 3.0 7.0 + 0.0 1.0 -2.0 1.0 -6.0 -2.0]; + + D = [ 0.0 0.0 0.0 -4.0 -1.0 + 0.0 0.0 0.0 1.0 0.0 + 0.0 0.0 0.0 0.0 1.0 + 3.0 1.0 0.0 1.0 -3.0 + -2.0 0.0 1.0 7.0 1.0]; + + P = ss (A, B, C, D); + K = h2syn (P, 2, 2); + M = [K.A, K.B; K.C, K.D]; + + KA = [ 88.0015 -145.7298 -46.2424 82.2168 -45.2996 -31.1407 + 25.7489 -31.4642 -12.4198 9.4625 -3.5182 2.7056 + 54.3008 -102.4013 -41.4968 50.8412 -20.1286 -26.7191 + 108.1006 -198.0785 -45.4333 70.3962 -25.8591 -37.2741 + -115.8900 226.1843 47.2549 -47.8435 -12.5004 34.7474 + 59.0362 -101.8471 -20.1052 36.7834 -16.1063 -26.4309]; + + KB = [ 3.7345 3.4758 + -0.3020 0.6530 + 3.4735 4.0499 + 4.3198 7.2755 + -3.9424 -10.5942 + 2.1784 2.5048]; + + KC = [ -2.3346 3.2556 0.7150 -0.9724 0.6962 0.4074 + 7.6899 -8.4558 -2.9642 7.0365 -4.2844 0.1390]; + + KD = [ 0.0000 0.0000 + 0.0000 0.0000]; + + M_exp = [KA, KB; KC, KD]; + +***** assert (M, M_exp, 1e-4); +***** shared M, M_exp + A = [-0.7 0.0 0.3 0.0 -0.5 -0.1 + -0.6 0.2 -0.4 -0.3 0.0 0.0 + -0.5 0.7 -0.1 0.0 0.0 -0.8 + -0.7 0.0 0.0 -0.5 -1.0 0.0 + 0.0 0.3 0.6 -0.9 0.1 -0.4 + 0.5 -0.8 0.0 0.0 0.2 -0.9]; + + B = [-1.0 -2.0 -2.0 1.0 0.0 + 1.0 0.0 1.0 -2.0 1.0 + -3.0 -4.0 0.0 2.0 -2.0 + 1.0 -2.0 1.0 0.0 -1.0 + 0.0 1.0 -2.0 0.0 3.0 + 1.0 0.0 3.0 -1.0 -2.0]; + + C = [ 1.0 -1.0 2.0 -2.0 0.0 -3.0 + -3.0 0.0 1.0 -1.0 1.0 0.0 + 0.0 2.0 0.0 -4.0 0.0 -2.0 + 1.0 -3.0 0.0 0.0 3.0 1.0 + 0.0 1.0 -2.0 1.0 0.0 -2.0]; + + D = [ 1.0 -1.0 -2.0 0.0 0.0 + 0.0 1.0 0.0 1.0 0.0 + 2.0 -1.0 -3.0 0.0 1.0 + 0.0 1.0 0.0 1.0 -1.0 + 0.0 0.0 1.0 2.0 1.0]; + + P = ss (A, B, C, D, 1); # value of sampling time doesn't matter + K = h2syn (P, 2, 2); + M = [K.A, K.B; K.C, K.D]; + + KA = [-0.0551 -2.1891 -0.6607 -0.2532 0.6674 -1.0044 + -1.0379 2.3804 0.5031 0.3960 -0.6605 1.2673 + -0.0876 -2.1320 -0.4701 -1.1461 1.2927 -1.5116 + -0.1358 -2.1237 -0.9560 -0.7144 0.6673 -0.7957 + 0.4900 0.0895 0.2634 -0.2354 0.1623 -0.2663 + 0.1672 -0.4163 0.2871 -0.1983 0.4944 -0.6967]; + + KB = [-0.5985 -0.5464 + 0.5285 0.6087 + -0.7600 -0.4472 + -0.7288 -0.6090 + 0.0532 0.0658 + -0.0663 0.0059]; + + KC = [ 0.2500 -1.0200 -0.3371 -0.2733 0.2747 -0.4444 + 0.0654 0.2095 0.0632 0.2089 -0.1895 0.1834]; + + KD = [-0.2181 -0.2070 + 0.1094 0.1159]; + + M_exp = [KA, KB; KC, KD]; + +***** assert (M, M_exp, 1e-4); +2 tests, 2 passed, 0 known failure, 0 skipped +[inst/estim.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/estim.m +***** shared m, m_exp + sys = ss (-2, 1, 1, 3); + est = estim (sys, 5); + [a, b, c, d] = ssdata (est); + m = [a, b; c, d]; + m_exp = [-7, 5; 1, 0; 1, 0]; +***** assert (m, m_exp, 1e-4); +***** shared m, m_exp + sys = ss (-1, 2, 3, 4); + est = estim (sys, 5); + [a, b, c, d] = ssdata (est); + m = [a, b; c, d]; + m_exp = [-16, 5; 3, 0; 1, 0]; +***** assert (m, m_exp, 1e-4); +2 tests, 2 passed, 0 known failure, 0 skipped +[inst/gram.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/gram.m +***** test + a = [-1 0 0; 1/2 -1 0; 1/2 0 -1]; + b = [1 0; 0 -1; 0 1]; + c = [0 0 1; 1 1 0]; ## it doesn't matter what the value of c is + Wc = gram (ss (a, b, c), "c"); + assert (a * Wc + Wc * a.' + b * b.', zeros (size (a))) +***** test + a = [-1 0 0; 1/2 -1 0; 1/2 0 -1]; + b = [1 0; 0 -1; 0 1]; ## it doesn't matter what the value of b is + c = [0 0 1; 1 1 0]; + Wo = gram (ss (a, b, c), "o"); + assert (a.' * Wo + Wo * a + c.' * c, zeros (size (a))) +***** test + a = [-1 0 0; 1/2 -1 0; 1/2 0 -1]; + b = [1 0; 0 -1; 0 1]; + Wc = gram (a, b); + assert (a * Wc + Wc * a.' + b * b.', zeros (size (a))) +***** test + a = [-1 0 0; 1/2 1 0; 1/2 0 -1] / 2; + b = [1 0; 0 -1; 0 1]; + c = [0 0 1; 1 1 0]; ## it doesn't matter what the value of c is + d = zeros (rows (c), columns (b)); ## it doesn't matter what the value of d is + Ts = 0.1; ## Ts != 0 + Wc = gram (ss (a, b, c, d, Ts), "c"); + assert (a * Wc * a.' - Wc + b * b.', zeros (size (a)), 1e-12) +***** test + a = [-1 0 0; 1/2 1 0; 1/2 0 -1] / 2; + b = [1 0; 0 -1; 0 1]; ## it doesn't matter what the value of b is + c = [0 0 1; 1 1 0]; + d = zeros (rows (c), columns (b)); ## it doesn't matter what the value of d is + Ts = 0.1; ## Ts != 0 + Wo = gram (ss (a, b, c, d, Ts), "o"); + assert (a.' * Wo * a - Wo + c.' * c, zeros (size (a)), 1e-12) +5 tests, 5 passed, 0 known failure, 0 skipped +[inst/bode.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/bode.m +***** demo + s = tf('s'); + g = 1/(2*s^2+3*s+4); + bode(g); +***** test + s = tf('s'); + K = 1; + T = 2; + g = K/(1+T*s); + [mag phas w] = bode(g); + mag_dB = 20*log10(mag); + index = find(mag_dB < -3,1); + w_cutoff = w(index); + assert (1/T, w_cutoff, eps); +1 test, 1 passed, 0 known failure, 0 skipped +[inst/kalman.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/kalman.m +***** shared m, m_exp, g, g_exp, x, x_exp + sys = ss (-2, 1, 1, 3); + [est, g, x] = kalman (sys, 1, 1, 1); + [a, b, c, d] = ssdata (est); + m = [a, b; c, d]; + m_exp = [-2.25, 0.25; 1, 0; 1, 0]; + g_exp = 0.25; + x_exp = 0; +***** assert (m, m_exp, 1e-2); +***** assert (g, g_exp, 1e-2); +***** assert (x, x_exp, 1e-2); +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/covar.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/covar.m +***** shared p, q, p_exp, q_exp + sys = ss (-1, 1, 1, 0); + [p, q] = covar (sys, 5); + p_exp = 2.5000; + q_exp = 2.5000; +***** assert (p, p_exp, 1e-4); +***** assert (q, q_exp, 1e-4); +***** shared p, q, p_exp, q_exp + sys = ss ([-0.2, -0.5; 1, 0], [2; 0], [1, 0.5], [0], 0.1); + [p, q] = covar (sys, 5); + p_exp = 30.3167; + q_exp = [27.1493, -3.6199; -3.6199, 27.1493]; +***** assert (p, p_exp, 1e-4); +***** assert (q, q_exp, 1e-4); +4 tests, 4 passed, 0 known failure, 0 skipped +[inst/esort.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/esort.m +***** shared s_exp, ndx_exp, s_obs, ndx_obs + p = [-0.2410+0.5573i; + -0.2410-0.5573i; + 0.1503; + -0.0972; + -0.2590]; + s_exp = [ 0.1503; + -0.0972; + -0.2410+0.5573i; + -0.2410-0.5573i; + -0.2590]; + ndx_exp = [ 3; + 4; + 1; + 2; + 5]; + [s_obs, ndx_obs] = esort(p); +***** assert(s_obs, s_exp, 0); +***** assert(ndx_obs, ndx_exp, 0); +2 tests, 2 passed, 0 known failure, 0 skipped +[inst/ctrb.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/ctrb.m +***** assert (ctrb ([1, 0; 0, -0.5], [8; 8]), [8, 8; 8, -4]); +1 test, 1 passed, 0 known failure, 0 skipped [inst/moen4.m] >>>>> /build/reproducible-path/octave-control-4.0.1/inst/moen4.m ***** shared SYS, X0, INFO, Ae, Be, Ce, De, Ke, Qe, Rye, Se, X0e @@ -6323,1946 +9521,315 @@ -0.2534 0.5567 0.3655 -0.2708 -0.2559 0.6360 0.3995 -0.3958 -0.2582 0.6567 0.4175 -0.2383 - -0.2604 0.6446 0.4565 -0.4358 - -0.2618 0.5815 0.3395 -0.2633 - -0.2665 0.5052 0.3425 -0.2233 - -0.2708 0.5100 0.4235 -0.3608 - -0.2728 0.6079 0.3875 -0.2883 - -0.2742 0.7203 0.3615 -0.4683 - -0.2795 0.7793 0.3085 -0.3733 - -0.2924 0.8673 0.3805 -0.4158 - -0.3020 0.9995 0.5025 -0.6983 - -0.3037 1.0591 0.4755 -0.5208 - -0.3040 1.0871 0.5245 -0.5933 - -0.3049 1.1507 0.5525 -0.6233 - -0.3058 1.2644 0.5195 -0.6358 - -0.3004 1.4334 0.4955 -0.8358 - -0.2875 1.5499 0.4055 -0.6808 - -0.2652 1.5844 0.4605 -0.8508 - -0.2284 1.5971 0.3825 -0.8783 - -0.1892 1.6190 0.1465 -0.5958 - -0.1537 1.6781 0.1075 -0.9083 - -0.1213 1.6967 0.0525 -0.7883 - -0.1047 1.6351 0.0045 -0.5783 - -0.1042 1.5375 0.0525 -0.8158 - -0.1170 1.3787 0.0375 -0.5208 - -0.1449 1.2041 0.1245 -0.4508 - -0.1783 1.0765 0.1865 -0.4958 - -0.2074 0.9696 0.2285 -0.3758 - -0.2269 0.8117 0.3565 -0.4383 - -0.2434 0.5263 0.3285 -0.0883 - -0.2634 0.1883 0.3275 0.0292 - -0.2766 -0.1724 0.4035 -0.0358 - -0.2855 -0.6067 0.3515 0.5092 - -0.2971 -0.9636 0.3975 0.5592 - -0.3002 -1.1742 0.4425 0.4867 - -0.2883 -1.3005 0.3975 0.6967 - -0.2630 -1.3348 0.3585 0.5892 - -0.2244 -1.3593 0.2655 0.6317 - -0.1732 -1.4072 0.2425 0.5767 - -0.1119 -1.4491 0.2175 0.5367 - -0.0519 -1.5377 0.1075 0.7042 - -0.0045 -1.6482 0.0515 0.6342 - 0.0222 -1.7353 -0.0215 0.8067 - 0.0255 -1.7833 -0.0095 0.8492 - 0.0200 -1.7957 0.0855 0.6017 - 0.0138 -1.8427 0.0605 0.8717 - 0.0079 -1.9256 0.0775 0.8342 - 0.0100 -2.0111 0.0645 0.7467 - 0.0160 -2.0729 -0.0805 1.0792 - 0.0231 -2.0740 -0.0975 0.8967 - 0.0388 -2.0445 -0.1065 0.8617 - 0.0597 -1.9906 -0.1435 1.0067 - 0.0807 -1.9170 -0.1825 0.8017 - 0.0969 -1.8479 -0.3205 0.9292 - 0.1029 -1.7495 -0.3275 0.8542 - 0.1043 -1.6604 -0.2355 0.6392 - 0.1001 -1.6211 -0.2395 0.8142 - 0.0841 -1.5806 -0.2095 0.7817 - 0.0630 -1.5319 -0.1415 0.6667 - 0.0489 -1.5022 -0.0715 0.6367 - 0.0469 -1.4700 -0.0835 0.6692 - 0.0566 -1.3234 -0.1335 0.6092 - 0.0811 -1.0251 -0.0935 0.2617 - 0.1115 -0.7103 -0.2095 0.3017 - 0.1288 -0.4227 -0.3555 0.2692 - 0.1352 -0.1704 -0.2835 -0.2308 - 0.1320 -0.0594 -0.2505 -0.0183 - 0.1065 -0.0067 -0.2275 0.0967 - 0.0680 0.1685 -0.1365 -0.3083 - 0.0335 0.4148 -0.0715 -0.3258 - 0.0049 0.5997 -0.0175 -0.3758 - -0.0195 0.7006 -0.0445 -0.4033 - -0.0351 0.7637 -0.0225 -0.4233 - -0.0299 0.8425 0.0905 -0.6383 - -0.0055 0.9276 0.0615 -0.5283 - 0.0178 1.0462 -0.0975 -0.3783 - 0.0368 1.2729 -0.1145 -0.6858 - 0.0674 1.4969 -0.0265 -0.9283 - 0.1083 1.6066 -0.1025 -0.7658 - 0.1448 1.7228 -0.2695 -0.7558 - 0.1778 1.9169 -0.3095 -1.0808 - 0.2111 2.1262 -0.3605 -1.0633 - 0.2372 2.3387 -0.4795 -1.0733 - 0.2550 2.5757 -0.5415 -1.3358 - 0.2666 2.7617 -0.4935 -1.4108 - 0.2636 2.7910 -0.4535 -1.3158 - 0.2380 2.7246 -0.5335 -1.2708 - 0.1975 2.6043 -0.4965 -1.3383 - 0.1524 2.3566 -0.3465 -1.1458 - 0.1037 2.0830 -0.2385 -0.9383 - 0.0570 1.8917 -0.1875 -1.0133 - 0.0150 1.7363 -0.2315 -0.7908 - -0.0242 1.6378 -0.1455 -0.8158 - -0.0589 1.5875 -0.0665 -0.9083 - -0.0979 1.5152 -0.1345 -0.6183 - -0.1459 1.4203 -0.0325 -0.7233 - -0.1901 1.3044 0.1315 -0.7433 - -0.2209 1.1849 0.2195 -0.6183 - -0.2339 1.0649 0.2275 -0.6983 - -0.2355 0.9365 0.1425 -0.4533 - -0.2337 0.8784 0.1855 -0.4658 - -0.2214 0.8990 0.2485 -0.6558 - -0.1964 0.9349 0.1745 -0.5258 - -0.1659 0.9811 0.1785 -0.6333 - -0.1372 0.9916 0.1725 -0.5783 - -0.1158 0.9395 0.1425 -0.5083 - -0.0970 0.8657 0.1345 -0.6183 - -0.0792 0.8086 0.0965 -0.4358 - -0.0657 0.8370 0.1385 -0.4958 - -0.0552 0.9112 0.1155 -0.5783 - -0.0518 0.9266 -0.0175 -0.4133 - -0.0560 0.9192 -0.0425 -0.5208 - -0.0578 0.8932 0.0005 -0.5783 - -0.0564 0.8007 -0.0235 -0.4083 - -0.0591 0.6940 -0.0925 -0.3358 - -0.0655 0.6191 -0.1015 -0.3833 - -0.0735 0.5441 -0.0995 -0.2783 - -0.0841 0.4197 -0.1085 -0.1608 - -0.0892 0.2639 -0.0675 -0.2483 - -0.0801 0.1240 -0.0085 -0.2133 - -0.0661 -0.0027 -0.0185 -0.0408 - -0.0647 -0.0929 -0.1255 0.0367 - -0.0828 -0.1350 -0.1705 0.0342 - -0.1111 -0.1750 -0.0195 -0.0983 - -0.1424 -0.2431 0.1145 -0.0458 - -0.1823 -0.3343 0.1235 0.1642 - -0.2282 -0.4034 0.1845 0.0017 - -0.2684 -0.4463 0.2355 0.0017 - -0.3042 -0.4858 0.2235 0.1692 - -0.3374 -0.5038 0.2585 0.0742 - -0.3619 -0.5260 0.3695 0.0692 - -0.3751 -0.5692 0.4925 0.0867 - -0.3804 -0.6271 0.4655 0.1342 - -0.3838 -0.6946 0.3635 0.2492 - -0.3849 -0.7012 0.4405 0.1317 - -0.3802 -0.6456 0.5245 0.1767 - -0.3685 -0.5710 0.5145 0.1717 - -0.3432 -0.4960 0.4965 -0.0458 - -0.3091 -0.5027 0.3875 0.1642 - -0.2816 -0.5650 0.2855 0.2767 - -0.2575 -0.6307 0.2745 0.0492 - -0.2333 -0.7767 0.2115 0.3092 - -0.2177 -0.9320 0.2115 0.4467 - -0.2103 -0.9808 0.2295 0.3017 - -0.2077 -0.9820 0.1235 0.4517 - -0.2091 -0.9672 0.0925 0.4017 - -0.2067 -0.9320 0.1505 0.2667 - -0.1964 -0.9354 0.1875 0.3117 - -0.1862 -1.0067 0.1385 0.4092 - -0.1835 -1.1249 0.0845 0.4417 - -0.1878 -1.2659 0.1145 0.4717 - -0.1971 -1.4192 0.1755 0.5892 - -0.2082 -1.5634 0.2345 0.5917 - -0.2205 -1.6030 0.2205 0.7092 - -0.2334 -1.4712 0.2515 0.5992 - -0.2378 -1.2802 0.2915 0.3067 - -0.2371 -1.1340 0.1805 0.4742 - -0.2418 -1.0239 0.1895 0.3717 - -0.2467 -0.9961 0.2855 0.1917 - -0.2506 -1.0394 0.2625 0.4892 - -0.2481 -1.0708 0.3205 0.2867 - -0.2255 -1.1285 0.3115 0.2942 - -0.1851 -1.2190 0.2515 0.5392 - -0.1284 -1.2780 0.2205 0.3617 - -0.0568 -1.3066 0.0485 0.4992 - 0.0190 -1.3093 -0.0745 0.5842 - 0.0980 -1.3169 -0.0975 0.3817 - 0.1790 -1.3629 -0.1905 0.4917 - 0.2470 -1.3928 -0.3335 0.5942 - 0.2906 -1.3799 -0.4495 0.5667 - 0.3119 -1.3872 -0.4345 0.4267 - 0.3070 -1.4366 -0.4805 0.6267 - 0.2694 -1.4497 -0.5195 0.7092 - 0.2157 -1.4180 -0.3445 0.3267 - 0.1572 -1.4131 -0.2795 0.5917 - 0.0900 -1.4020 -0.2475 0.6467 - 0.0252 -1.3726 -0.1455 0.2942 - -0.0329 -1.3701 -0.1075 0.5992 - -0.0863 -1.3388 0.0435 0.4792 - -0.1235 -1.2708 0.1565 0.2142 - -0.1478 -1.2320 0.1245 0.4817 - -0.1728 -1.2034 0.1555 0.4392 - -0.1952 -1.1628 0.2365 0.2667 - -0.2103 -1.1065 0.2765 0.3317 - -0.2217 -0.9840 0.3265 0.2767 - -0.2321 -0.8129 0.3975 0.1317 - -0.2489 -0.6673 0.3905 0.1867 - -0.2823 -0.5045 0.3435 0.2217 - -0.3208 -0.2971 0.4725 -0.1183 - -0.3473 -0.1283 0.6145 -0.1808 - -0.3655 0.0017 0.6595 -0.0633 - -0.3824 0.1148 0.6585 -0.2158 - -0.3984 0.1791 0.6025 -0.1708 - -0.4094 0.2068 0.6665 -0.2083 - -0.4057 0.1834 0.7515 -0.2908 - -0.3881 0.1013 0.7285 -0.1283 - -0.3652 0.0076 0.6865 -0.0358 - -0.3341 -0.0852 0.6455 -0.0683 - -0.2841 -0.1695 0.5685 -0.0783 - -0.2157 -0.2379 0.4245 0.0317 - -0.1411 -0.3204 0.2975 0.1167 - -0.0709 -0.4622 0.1965 0.1842 - -0.0090 -0.6683 0.0635 0.2967 - 0.0471 -0.8651 -0.0275 0.2617 - 0.0923 -0.9752 -0.1435 0.4992 - 0.1202 -0.9762 -0.1835 0.5592 - 0.1442 -0.9324 -0.0975 0.1967 - 0.1675 -0.9128 -0.2015 0.4142 - 0.1732 -0.8419 -0.3305 0.5317 - 0.1625 -0.6695 -0.2815 0.1442 - 0.1441 -0.4938 -0.2375 0.1892 ]; - - DAT = iddata (UY(:, 3:4), UY(:, 1:2)); - - [SYS, X0] = moen4 (DAT, "s", 15, "n", 8, "rcond", 0.0, "tol", -1.0); - - Ae = [ 0.9893 0.0081 -0.0844 0.0299 0.1262 0.0815 -0.0379 0.1779 - 0.0076 0.9694 0.1352 0.1793 0.0965 -0.1041 -0.0373 -0.0045 - 0.0018 -0.0115 0.9413 -0.3450 0.1674 0.0302 -0.1098 -0.0087 - 0.0036 -0.0197 0.1766 0.6550 -0.1178 0.6168 0.0028 0.0085 - -0.0010 -0.0032 -0.0507 0.0624 0.9293 -0.0034 0.0229 -0.4511 - 0.0032 -0.0012 -0.0397 0.1255 0.1578 0.1833 0.7586 0.3125 - 0.0029 -0.0048 0.0422 0.2343 0.0321 -0.6549 -0.0374 0.2232 - -0.0036 0.0028 0.0080 -0.2437 0.1074 0.1599 -0.1012 0.2106 ]; - - Ce = [ -0.2226 0.2072 -0.3129 -0.3937 0.1722 0.3232 -0.2113 0.2928 - -0.1680 -0.2205 0.0698 0.4049 0.3210 -0.1143 -0.2451 0.4844 ]; - - Be = [ 0.0857 0.0026 - -0.6433 -0.0314 - 0.2445 0.0044 - 1.8942 0.0488 - 0.0549 0.0151 - -2.2093 -0.0622 - -2.5072 -0.0925 - 0.8189 0.0280 ]; - - De = [ -0.4997 0.0451 - -1.0011 -0.5567 ]; - - # Since moen4 identifies the input/output behavior only - # input/output behavior is tested using n first Markov parameters. - # The state space representaton might have different signs - # of the states. - # By multiplying the matrices for the Markov parameters, numeric errors - # would propagate, therefor the accuracy of the results are limited to - # the accuracy of the given expected results - [Ao,Bo,Co,Do] = ssdata (SYS); - Ao = round (Ao*1e4)/1e4; - Bo = round (Bo*1e4)/1e4; - Co = round (Co*1e4)/1e4; - Do = round (Do*1e4)/1e4; - - n = size(Ao,1); - m = size(Bo,2); - p = size(Co,1); - Mo = zeros (p,(n+1)*m); - Me = zeros (p,(n+1)*m); - Mo(:,1:m) = Do; - Me(:,1:m) = De; - - Aoi = eye (n,n); - Aei = eye (n,n); - for i = 1:n - Mo(:,i*m+1:(i+1)*m) = Co*Aoi*Bo; - Me(:,i*m+1:(i+1)*m) = Ce*Aei*Be; - Aoi = Aoi*Ao; - Aei = Aei*Ae; - endfor - - assert (Mo, Me, 1e-3); -9 tests, 9 passed, 0 known failure, 0 skipped -[inst/bstmodred.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/bstmodred.m -***** shared Mo, Me, Info, HSVe - A = [ -0.04165 0.0000 4.9200 -4.9200 0.0000 0.0000 0.0000 - -5.2100 -12.500 0.0000 0.0000 0.0000 0.0000 0.0000 - 0.0000 3.3300 -3.3300 0.0000 0.0000 0.0000 0.0000 - 0.5450 0.0000 0.0000 0.0000 -0.5450 0.0000 0.0000 - 0.0000 0.0000 0.0000 4.9200 -0.04165 0.0000 4.9200 - 0.0000 0.0000 0.0000 0.0000 -5.2100 -12.500 0.0000 - 0.0000 0.0000 0.0000 0.0000 0.0000 3.3300 -3.3300 ]; - - B = [ 0.0000 0.0000 - 12.500 0.0000 - 0.0000 0.0000 - 0.0000 0.0000 - 0.0000 0.0000 - 0.0000 12.500 - 0.0000 0.0000 ]; - - C = [ 1.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 - 0.0000 0.0000 0.0000 1.0000 0.0000 0.0000 0.0000 - 0.0000 0.0000 0.0000 0.0000 1.0000 0.0000 0.0000 ]; - - D = [ 0.0000 0.0000 - 0.0000 0.0000 - 0.0000 0.0000 ]; - - sys = ss (A, B, C, D, "scaled", true); - - [sys_red, Info] = bstmodred (sys, "beta", 1.0, "tol1", 0.1, "tol2", 0.0); - - # Expected results - Ae = [ 1.2729 0.0000 6.5947 0.0000 -3.4229 - 0.0000 0.8169 0.0000 2.4821 0.0000 - -2.9889 0.0000 -2.9028 0.0000 -0.3692 - 0.0000 -3.3921 0.0000 -3.1126 0.0000 - -1.4767 0.0000 -2.0339 0.0000 -0.6107 ]; - - Be = [ 0.1331 -0.1331 - -0.0862 -0.0862 - -2.6777 2.6777 - -3.5767 -3.5767 - -2.3033 2.3033 ]; - - Ce = [ -0.6907 -0.6882 0.0779 0.0958 -0.0038 - 0.0676 0.0000 0.6532 0.0000 -0.7522 - 0.6907 -0.6882 -0.0779 0.0958 0.0038 ]; - - De = [ 0.0000 0.0000 - 0.0000 0.0000 - 0.0000 0.0000 ]; - - HSVe = [ 0.8803 0.8506 0.8038 0.4494 0.3973 0.0214 0.0209 ].'; - - # Since bstmodred reduces the model while approximaton the input/output - # behavior, only input/output behavior is tested by means of the first - # n markov parameters. The state space representation is not unique. - # By multiplying the matrices for the Markov parameters, numeric errors - # would propagate, therefor the accuracy of the results are limited to - # the accuracy of the given expected results - - [Ao, Bo, Co, Do] = ssdata (sys_red); - Ao = round (Ao*1e4)/1e4; - Bo = round (Bo*1e4)/1e4; - Co = round (Co*1e4)/1e4; - Do = round (Do*1e4)/1e4; - - n = size(Ao,1); - m = size(Bo,2); - p = size(Co,1); - Mo = zeros (p,(n+1)*m); - Me = zeros (p,(n+1)*m); - Mo(:,1:m) = Do; - Me(:,1:m) = De; - - Aoi = eye (n,n); - Aei = eye (n,n); - for i = 1:n - Mo(:,(i-1)*m+1:i*m) = Co*Aoi*Bo; - Me(:,(i-1)*m+1:i*m) = Ce*Aei*Be; - Aoi = Aoi*Ao; - Aei = Aei*Ae; - endfor - -***** assert (Mo, Me, 1e-4) -***** assert (Info.hsv, HSVe, 1e-4) -2 tests, 2 passed, 0 known failure, 0 skipped -[inst/care.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/care.m -***** shared x, l, g, xe, le, ge - a = [-3 2 - 1 1]; - - b = [ 0 - 1]; - - c = [ 1 -1]; - - r = 3; - - [x, l, g] = care (a, b, c.'*c, r); - - xe = [ 0.5895 1.8216 - 1.8216 8.8188]; - - le = [-3.5026 - -1.4370]; - - ge = [ 0.6072 2.9396]; - -***** assert (x, xe, 1e-4); -***** assert (l, le, 1e-4); -***** assert (g, ge, 1e-4); -***** shared x, l, g, xe, le, ge - a = [ 0.0 1.0 - 0.0 0.0]; - - b = [ 0.0 - 1.0]; - - c = [ 1.0 0.0 - 0.0 1.0 - 0.0 0.0]; - - d = [ 0.0 - 0.0 - 1.0]; - - [x, l, g] = care (a, b, c.'*c, d.'*d); - - xe = [ 1.7321 1.0000 - 1.0000 1.7321]; - - le = [-0.8660 + 0.5000i - -0.8660 - 0.5000i]; - - ge = [ 1.0000 1.7321]; - -***** assert (x, xe, 1e-4); -***** assert (l, le, 1e-4); -***** assert (g, ge, 1e-4); -***** shared x, xe - a = [ 0.0 1.0 - 0.0 0.0 ]; - - e = [ 1.0 0.0 - 0.0 1.0 ]; - - b = [ 0.0 - 1.0 ]; - - c = [ 1.0 0.0 - 0.0 1.0 - 0.0 0.0 ]; - - d = [ 0.0 - 0.0 - 1.0 ]; - - x = care (a, b, c.'*c, d.'*d, [], e); - - xe = [ 1.7321 1.0000 - 1.0000 1.7321 ]; - -***** assert (x, xe, 1e-4); -7 tests, 7 passed, 0 known failure, 0 skipped -[inst/thiran.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/thiran.m -***** shared num, den, expc - expc = [1, 0.5294, -0.04813, 0.004159]; - sys = thiran (2.4, 1); - [num, den] = tfdata (sys, "vector"); -***** assert (den, expc, 1e-4); -***** assert (num, fliplr (expc), 1e-4); -***** shared num, den - sys = thiran (0.5, 0.1); - [num, den] = tfdata (sys, "vector"); -***** assert (den, [1, 0, 0, 0, 0, 0], eps); -***** assert (num, 1, eps); -***** error (thiran (-1, 1)); -***** error (thiran (1, -1)); -***** error (thiran ([1 2 3], 1)); -7 tests, 7 passed, 0 known failure, 0 skipped -[inst/acker.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/acker.m -***** test - # https://en.wikipedia.org/wiki/Ackermann's_formula#Example - A = [1 1; 1 2]; - B = [1; 0]; - P = roots ([1 11 30]); - K = acker(A,B,P); - assert (K, [14 57]); -1 test, 1 passed, 0 known failure, 0 skipped -[inst/lyap.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/lyap.m -***** shared X, X_exp - A = [1, 2; -3, -4]; - Q = [3, 1; 1, 1]; - X = lyap (A, Q); - X_exp = [ 6.1667, -3.8333; - -3.8333, 3.0000]; -***** assert (X, X_exp, 1e-4); -***** shared X, X_exp - A = [2.0 1.0 3.0 - 0.0 2.0 1.0 - 6.0 1.0 2.0]; - - B = [2.0 1.0 - 1.0 6.0]; - - C = [2.0 1.0 - 1.0 4.0 - 0.0 5.0]; - - X = lyap (A, B, -C); - - X_exp = [-2.7685 0.5498 - -1.0531 0.6865 - 4.5257 -0.4389]; - -***** assert (X, X_exp, 1e-4); -***** shared X, X_exp - A = [ 3.0 1.0 1.0 - 1.0 3.0 0.0 - 1.0 0.0 2.0]; - - E = [ 1.0 3.0 0.0 - 3.0 2.0 1.0 - 1.0 0.0 1.0]; - - B = [-64.0 -73.0 -28.0 - -73.0 -70.0 -25.0 - -28.0 -25.0 -18.0]; - - X = lyap (A.', -B, [], E.'); - - X_exp = [-2.0000 -1.0000 0.0000 - -1.0000 -3.0000 -1.0000 - 0.0000 -1.0000 -3.0000]; - -***** assert (X, X_exp, 1e-4); -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/__dss2ss__.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/__dss2ss__.m -***** shared a, b, c, e, ranke, rnka22, q, z, a_exp, b_exp, c_exp, e_exp, q_exp, z_exp - - e = [1, 2, 0, 0; 0, 1, 0, 1; 3, 9, 6, 3; 0, 0, 2, 0]; - a = [-1, 0, 0, 3; 0, 0, 1, 2; 1, 1, 0, 4; 0, 0, 0, 0]; - b = [1, 0; 0, 0; 0, 1; 1, 1]; - c = [-1, 0, 1, 0; 0, 1, -1, 1]; - - [a, e, b, c, ranke, rnka22, q, z] = __sl_tg01fd__ (a, e, b, c, true, 0.0); - - e_exp = [10.1587 5.8230 1.3021 0.0000; - 0.0000 -2.4684 -0.1896 0.0000; - 0.0000 0.0000 1.0338 0.0000; - 0.0000 0.0000 0.0000 0.0000]; - - a_exp = [ 2.0278 0.1078 3.9062 -2.1571; - -0.0980 0.2544 1.6053 -0.1269; - 0.2713 0.7760 -0.3692 -0.4853; - 0.0690 -0.5669 -2.1974 0.3086]; - - b_exp = [-0.2157 -0.9705; - 0.3015 0.9516; - 0.7595 0.0991; - 1.1339 0.3780]; - - c_exp = [ 0.3651 -1.0000 -0.4472 -0.8165; - -1.0954 1.0000 -0.8944 0.0000]; - - q_exp = [-0.2157 -0.5088 0.6109 0.5669; - -0.1078 -0.2544 -0.7760 0.5669; - -0.9705 0.1413 -0.0495 -0.1890; - 0.0000 0.8102 0.1486 0.5669]; - - z_exp = [-0.3651 0.0000 0.4472 0.8165; - -0.9129 0.0000 0.0000 -0.4082; - 0.0000 -1.0000 0.0000 0.0000; - -0.1826 0.0000 -0.8944 0.4082]; - -***** assert (a, a_exp, 1e-4); -***** assert (e, e_exp, 1e-4); -***** assert (b, b_exp, 1e-4); -***** assert (c, c_exp, 1e-4); -***** assert (q, q_exp, 1e-4); -***** assert (z, z_exp, 1e-4); -***** assert (ranke, 3); -***** assert (rnka22, 1); -***** shared mms - - mm = tf ([3, 5, 0], [4, 1]); - mms = ss (mm); -***** error (__dss2ss__ (mms.a, mms.b, mms.c, mms.d, mms.e)); -***** test - A = [1 0; 0 1]; - B = [1; 0]; - C = [1 0]; - D = 0; - E = [1 0; 0 0]; - - sys = dss (A, B, C, D, E); - [Ao, Bo, Co, Do] = ssdata (sys); - - assert (Ao, 1, 1e-4); - assert (Bo, 1, 1e-4); - assert (Co, 1, 1e-4); - assert (Do, 0, 1e-4); -10 tests, 10 passed, 0 known failure, 0 skipped -[inst/place.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/place.m -***** shared A, B, C, P, Kexpected - A = [0, 1; 3, 2]; - B = [0; 1]; - C = [2, 1]; # C is needed for ss; it doesn't matter what the value of C is - P = [-1, -0.5]; - Kexpected = [3.5, 3.5]; -***** assert (place (ss (A, B, C), P), Kexpected, 2*eps); -***** assert (place (A, B, P), Kexpected, 2*eps); -***** shared F, F_exp, ev_ol, ev_cl - A = [-6.8000 0.0000 -207.0000 0.0000 - 1.0000 0.0000 0.0000 0.0000 - 43.2000 0.0000 0.0000 -4.2000 - 0.0000 0.0000 1.0000 0.0000]; - - B = [ 5.6400 0.0000 - 0.0000 0.0000 - 0.0000 1.1800 - 0.0000 0.0000]; - - P = [-0.5000 + 0.1500i - -0.5000 - 0.1500i]; - - ALPHA = -0.4; - TOL = 1e-8; - - F = place (A, B, P, ALPHA, TOL); - - F_exp = - [-0.0876 -4.2138 0.0837 -18.1412 - -0.0233 18.2483 -0.4259 -4.8120]; - - ev_ol = sort (eig (A)); - ev_cl = sort (eig (A - B*F)); - -***** assert (F, F_exp, 1e-4); -***** assert (ev_ol(3:4), ev_cl(3:4), 1e-4); -4 tests, 4 passed, 0 known failure, 0 skipped -[inst/mag2db.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/mag2db.m -***** assert (mag2db (100), 40); -***** assert (mag2db (0.1), -20); -2 tests, 2 passed, 0 known failure, 0 skipped -[inst/impulse.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/impulse.m -***** test - t=0:0.1:.3; - sys=tf(0.9375,[1 2 4]); - y=impulse(sys,t); - assert (y(1), 0, eps); - assert (y(2), 0.084405001160727, 2*eps); - assert (y(3), 0.150460144774958, 2*eps); - assert (y(4), 0.199104909042133, 2*eps); -***** test - t=0:0.1:.4; - sys=tf(0.9375,[1 2 4]); - sys2=c2d(sys, 0.1, "impulse"); - y=impulse(sys2,t); - assert (y(1), 0, eps); - assert (y(2), 0.084405001160727, 2*eps); - assert (y(3), 0.150460144774958, 2*eps); - assert (y(4), 0.199104909042133, 2*eps); -***** test - s = tf("s"); - R = 1/s; - y= impulse(R); - assert (y(1), 1, eps); -***** demo - clf; - s = tf('s'); - g = 1/(2*s^2+3*s+4); - impulse(g); - title ("Impulse response of a PT2 transfer function"); -***** demo - clf; - s = tf('s'); - g = 1/(2*s^2+3*s+4); - h = c2d(g,0.1); - impulse(h); - title ("Impulse response of a discretized PT2 transfer function"); -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/cfconred.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/cfconred.m -***** shared Mo, Me, Info, HSVe - A = [ 0 1.0000 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 - 0 0 -0.0150 0.7650 0 0 0 0 - 0 0 -0.7650 -0.0150 0 0 0 0 - 0 0 0 0 -0.0280 1.4100 0 0 - 0 0 0 0 -1.4100 -0.0280 0 0 - 0 0 0 0 0 0 -0.0400 1.850 - 0 0 0 0 0 0 -1.8500 -0.040 ]; - - B = [ 0.0260 - -0.2510 - 0.0330 - -0.8860 - -4.0170 - 0.1450 - 3.6040 - 0.2800 ]; - - C = [ -.996 -.105 0.261 .009 -.001 -.043 0.002 -0.026 ]; - - D = [ 0.0 ]; - - G = ss (A, B, C, D); % "scaled", false - - F = [ 4.4721e-002 6.6105e-001 4.6986e-003 3.6014e-001 1.0325e-001 -3.7541e-002 -4.2685e-002 3.2873e-002 ]; - - L = [ 4.1089e-001 - 8.6846e-002 - 3.8523e-004 - -3.6194e-003 - -8.8037e-003 - 8.4205e-003 - 1.2349e-003 - 4.2632e-003 ]; - - [Kr, Info] = cfconred (G, F, L, 4, "method", "bfsr-bta", "cf", "left", "feedback", "+"); - [Ao, Bo, Co, Do] = ssdata (Kr); + -0.2604 0.6446 0.4565 -0.4358 + -0.2618 0.5815 0.3395 -0.2633 + -0.2665 0.5052 0.3425 -0.2233 + -0.2708 0.5100 0.4235 -0.3608 + -0.2728 0.6079 0.3875 -0.2883 + -0.2742 0.7203 0.3615 -0.4683 + -0.2795 0.7793 0.3085 -0.3733 + -0.2924 0.8673 0.3805 -0.4158 + -0.3020 0.9995 0.5025 -0.6983 + -0.3037 1.0591 0.4755 -0.5208 + -0.3040 1.0871 0.5245 -0.5933 + -0.3049 1.1507 0.5525 -0.6233 + -0.3058 1.2644 0.5195 -0.6358 + -0.3004 1.4334 0.4955 -0.8358 + -0.2875 1.5499 0.4055 -0.6808 + -0.2652 1.5844 0.4605 -0.8508 + -0.2284 1.5971 0.3825 -0.8783 + -0.1892 1.6190 0.1465 -0.5958 + -0.1537 1.6781 0.1075 -0.9083 + -0.1213 1.6967 0.0525 -0.7883 + -0.1047 1.6351 0.0045 -0.5783 + -0.1042 1.5375 0.0525 -0.8158 + -0.1170 1.3787 0.0375 -0.5208 + -0.1449 1.2041 0.1245 -0.4508 + -0.1783 1.0765 0.1865 -0.4958 + -0.2074 0.9696 0.2285 -0.3758 + -0.2269 0.8117 0.3565 -0.4383 + -0.2434 0.5263 0.3285 -0.0883 + -0.2634 0.1883 0.3275 0.0292 + -0.2766 -0.1724 0.4035 -0.0358 + -0.2855 -0.6067 0.3515 0.5092 + -0.2971 -0.9636 0.3975 0.5592 + -0.3002 -1.1742 0.4425 0.4867 + -0.2883 -1.3005 0.3975 0.6967 + -0.2630 -1.3348 0.3585 0.5892 + -0.2244 -1.3593 0.2655 0.6317 + -0.1732 -1.4072 0.2425 0.5767 + -0.1119 -1.4491 0.2175 0.5367 + -0.0519 -1.5377 0.1075 0.7042 + -0.0045 -1.6482 0.0515 0.6342 + 0.0222 -1.7353 -0.0215 0.8067 + 0.0255 -1.7833 -0.0095 0.8492 + 0.0200 -1.7957 0.0855 0.6017 + 0.0138 -1.8427 0.0605 0.8717 + 0.0079 -1.9256 0.0775 0.8342 + 0.0100 -2.0111 0.0645 0.7467 + 0.0160 -2.0729 -0.0805 1.0792 + 0.0231 -2.0740 -0.0975 0.8967 + 0.0388 -2.0445 -0.1065 0.8617 + 0.0597 -1.9906 -0.1435 1.0067 + 0.0807 -1.9170 -0.1825 0.8017 + 0.0969 -1.8479 -0.3205 0.9292 + 0.1029 -1.7495 -0.3275 0.8542 + 0.1043 -1.6604 -0.2355 0.6392 + 0.1001 -1.6211 -0.2395 0.8142 + 0.0841 -1.5806 -0.2095 0.7817 + 0.0630 -1.5319 -0.1415 0.6667 + 0.0489 -1.5022 -0.0715 0.6367 + 0.0469 -1.4700 -0.0835 0.6692 + 0.0566 -1.3234 -0.1335 0.6092 + 0.0811 -1.0251 -0.0935 0.2617 + 0.1115 -0.7103 -0.2095 0.3017 + 0.1288 -0.4227 -0.3555 0.2692 + 0.1352 -0.1704 -0.2835 -0.2308 + 0.1320 -0.0594 -0.2505 -0.0183 + 0.1065 -0.0067 -0.2275 0.0967 + 0.0680 0.1685 -0.1365 -0.3083 + 0.0335 0.4148 -0.0715 -0.3258 + 0.0049 0.5997 -0.0175 -0.3758 + -0.0195 0.7006 -0.0445 -0.4033 + -0.0351 0.7637 -0.0225 -0.4233 + -0.0299 0.8425 0.0905 -0.6383 + -0.0055 0.9276 0.0615 -0.5283 + 0.0178 1.0462 -0.0975 -0.3783 + 0.0368 1.2729 -0.1145 -0.6858 + 0.0674 1.4969 -0.0265 -0.9283 + 0.1083 1.6066 -0.1025 -0.7658 + 0.1448 1.7228 -0.2695 -0.7558 + 0.1778 1.9169 -0.3095 -1.0808 + 0.2111 2.1262 -0.3605 -1.0633 + 0.2372 2.3387 -0.4795 -1.0733 + 0.2550 2.5757 -0.5415 -1.3358 + 0.2666 2.7617 -0.4935 -1.4108 + 0.2636 2.7910 -0.4535 -1.3158 + 0.2380 2.7246 -0.5335 -1.2708 + 0.1975 2.6043 -0.4965 -1.3383 + 0.1524 2.3566 -0.3465 -1.1458 + 0.1037 2.0830 -0.2385 -0.9383 + 0.0570 1.8917 -0.1875 -1.0133 + 0.0150 1.7363 -0.2315 -0.7908 + -0.0242 1.6378 -0.1455 -0.8158 + -0.0589 1.5875 -0.0665 -0.9083 + -0.0979 1.5152 -0.1345 -0.6183 + -0.1459 1.4203 -0.0325 -0.7233 + -0.1901 1.3044 0.1315 -0.7433 + -0.2209 1.1849 0.2195 -0.6183 + -0.2339 1.0649 0.2275 -0.6983 + -0.2355 0.9365 0.1425 -0.4533 + -0.2337 0.8784 0.1855 -0.4658 + -0.2214 0.8990 0.2485 -0.6558 + -0.1964 0.9349 0.1745 -0.5258 + -0.1659 0.9811 0.1785 -0.6333 + -0.1372 0.9916 0.1725 -0.5783 + -0.1158 0.9395 0.1425 -0.5083 + -0.0970 0.8657 0.1345 -0.6183 + -0.0792 0.8086 0.0965 -0.4358 + -0.0657 0.8370 0.1385 -0.4958 + -0.0552 0.9112 0.1155 -0.5783 + -0.0518 0.9266 -0.0175 -0.4133 + -0.0560 0.9192 -0.0425 -0.5208 + -0.0578 0.8932 0.0005 -0.5783 + -0.0564 0.8007 -0.0235 -0.4083 + -0.0591 0.6940 -0.0925 -0.3358 + -0.0655 0.6191 -0.1015 -0.3833 + -0.0735 0.5441 -0.0995 -0.2783 + -0.0841 0.4197 -0.1085 -0.1608 + -0.0892 0.2639 -0.0675 -0.2483 + -0.0801 0.1240 -0.0085 -0.2133 + -0.0661 -0.0027 -0.0185 -0.0408 + -0.0647 -0.0929 -0.1255 0.0367 + -0.0828 -0.1350 -0.1705 0.0342 + -0.1111 -0.1750 -0.0195 -0.0983 + -0.1424 -0.2431 0.1145 -0.0458 + -0.1823 -0.3343 0.1235 0.1642 + -0.2282 -0.4034 0.1845 0.0017 + -0.2684 -0.4463 0.2355 0.0017 + -0.3042 -0.4858 0.2235 0.1692 + -0.3374 -0.5038 0.2585 0.0742 + -0.3619 -0.5260 0.3695 0.0692 + -0.3751 -0.5692 0.4925 0.0867 + -0.3804 -0.6271 0.4655 0.1342 + -0.3838 -0.6946 0.3635 0.2492 + -0.3849 -0.7012 0.4405 0.1317 + -0.3802 -0.6456 0.5245 0.1767 + -0.3685 -0.5710 0.5145 0.1717 + -0.3432 -0.4960 0.4965 -0.0458 + -0.3091 -0.5027 0.3875 0.1642 + -0.2816 -0.5650 0.2855 0.2767 + -0.2575 -0.6307 0.2745 0.0492 + -0.2333 -0.7767 0.2115 0.3092 + -0.2177 -0.9320 0.2115 0.4467 + -0.2103 -0.9808 0.2295 0.3017 + -0.2077 -0.9820 0.1235 0.4517 + -0.2091 -0.9672 0.0925 0.4017 + -0.2067 -0.9320 0.1505 0.2667 + -0.1964 -0.9354 0.1875 0.3117 + -0.1862 -1.0067 0.1385 0.4092 + -0.1835 -1.1249 0.0845 0.4417 + -0.1878 -1.2659 0.1145 0.4717 + -0.1971 -1.4192 0.1755 0.5892 + -0.2082 -1.5634 0.2345 0.5917 + -0.2205 -1.6030 0.2205 0.7092 + -0.2334 -1.4712 0.2515 0.5992 + -0.2378 -1.2802 0.2915 0.3067 + -0.2371 -1.1340 0.1805 0.4742 + -0.2418 -1.0239 0.1895 0.3717 + -0.2467 -0.9961 0.2855 0.1917 + -0.2506 -1.0394 0.2625 0.4892 + -0.2481 -1.0708 0.3205 0.2867 + -0.2255 -1.1285 0.3115 0.2942 + -0.1851 -1.2190 0.2515 0.5392 + -0.1284 -1.2780 0.2205 0.3617 + -0.0568 -1.3066 0.0485 0.4992 + 0.0190 -1.3093 -0.0745 0.5842 + 0.0980 -1.3169 -0.0975 0.3817 + 0.1790 -1.3629 -0.1905 0.4917 + 0.2470 -1.3928 -0.3335 0.5942 + 0.2906 -1.3799 -0.4495 0.5667 + 0.3119 -1.3872 -0.4345 0.4267 + 0.3070 -1.4366 -0.4805 0.6267 + 0.2694 -1.4497 -0.5195 0.7092 + 0.2157 -1.4180 -0.3445 0.3267 + 0.1572 -1.4131 -0.2795 0.5917 + 0.0900 -1.4020 -0.2475 0.6467 + 0.0252 -1.3726 -0.1455 0.2942 + -0.0329 -1.3701 -0.1075 0.5992 + -0.0863 -1.3388 0.0435 0.4792 + -0.1235 -1.2708 0.1565 0.2142 + -0.1478 -1.2320 0.1245 0.4817 + -0.1728 -1.2034 0.1555 0.4392 + -0.1952 -1.1628 0.2365 0.2667 + -0.2103 -1.1065 0.2765 0.3317 + -0.2217 -0.9840 0.3265 0.2767 + -0.2321 -0.8129 0.3975 0.1317 + -0.2489 -0.6673 0.3905 0.1867 + -0.2823 -0.5045 0.3435 0.2217 + -0.3208 -0.2971 0.4725 -0.1183 + -0.3473 -0.1283 0.6145 -0.1808 + -0.3655 0.0017 0.6595 -0.0633 + -0.3824 0.1148 0.6585 -0.2158 + -0.3984 0.1791 0.6025 -0.1708 + -0.4094 0.2068 0.6665 -0.2083 + -0.4057 0.1834 0.7515 -0.2908 + -0.3881 0.1013 0.7285 -0.1283 + -0.3652 0.0076 0.6865 -0.0358 + -0.3341 -0.0852 0.6455 -0.0683 + -0.2841 -0.1695 0.5685 -0.0783 + -0.2157 -0.2379 0.4245 0.0317 + -0.1411 -0.3204 0.2975 0.1167 + -0.0709 -0.4622 0.1965 0.1842 + -0.0090 -0.6683 0.0635 0.2967 + 0.0471 -0.8651 -0.0275 0.2617 + 0.0923 -0.9752 -0.1435 0.4992 + 0.1202 -0.9762 -0.1835 0.5592 + 0.1442 -0.9324 -0.0975 0.1967 + 0.1675 -0.9128 -0.2015 0.4142 + 0.1732 -0.8419 -0.3305 0.5317 + 0.1625 -0.6695 -0.2815 0.1442 + 0.1441 -0.4938 -0.2375 0.1892 ]; - Ae = [ 0.5946 -0.7336 0.1914 -0.3368 - 0.5960 -0.0184 -0.1088 0.0207 - 1.2253 0.2043 0.1009 -1.4948 - -0.0330 -0.0243 1.3440 0.0035 ]; + DAT = iddata (UY(:, 3:4), UY(:, 1:2)); - Be = [ 0.0015 - -0.0202 - 0.0159 - -0.0544 ]; + [SYS, X0] = moen4 (DAT, "s", 15, "n", 8, "rcond", 0.0, "tol", -1.0); - Ce = [ 0.3534 0.0274 0.0337 -0.0320 ]; + Ae = [ 0.9893 0.0081 -0.0844 0.0299 0.1262 0.0815 -0.0379 0.1779 + 0.0076 0.9694 0.1352 0.1793 0.0965 -0.1041 -0.0373 -0.0045 + 0.0018 -0.0115 0.9413 -0.3450 0.1674 0.0302 -0.1098 -0.0087 + 0.0036 -0.0197 0.1766 0.6550 -0.1178 0.6168 0.0028 0.0085 + -0.0010 -0.0032 -0.0507 0.0624 0.9293 -0.0034 0.0229 -0.4511 + 0.0032 -0.0012 -0.0397 0.1255 0.1578 0.1833 0.7586 0.3125 + 0.0029 -0.0048 0.0422 0.2343 0.0321 -0.6549 -0.0374 0.2232 + -0.0036 0.0028 0.0080 -0.2437 0.1074 0.1599 -0.1012 0.2106 ]; - De = [ 0.0000 ]; + Ce = [ -0.2226 0.2072 -0.3129 -0.3937 0.1722 0.3232 -0.2113 0.2928 + -0.1680 -0.2205 0.0698 0.4049 0.3210 -0.1143 -0.2451 0.4844 ]; - HSVe = [ 4.9078 4.8745 3.8455 3.7811 1.2289 1.1785 0.5176 0.1148 ].'; + Be = [ 0.0857 0.0026 + -0.6433 -0.0314 + 0.2445 0.0044 + 1.8942 0.0488 + 0.0549 0.0151 + -2.2093 -0.0622 + -2.5072 -0.0925 + 0.8189 0.0280 ]; - Mo = [Ao, Bo; Co, Do]; - Me = [Ae, Be; Ce, De]; + De = [ -0.4997 0.0451 + -1.0011 -0.5567 ]; -***** xtest assert (Mo, Me, 1e-4); -***** assert (Info.hsv, HSVe, 1e-4); -2 tests, 2 passed, 0 known failure, 0 skipped -[inst/lyapchol.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/lyapchol.m -***** shared U, U_exp, X, X_exp + # Since moen4 identifies the input/output behavior only + # input/output behavior is tested using n first Markov parameters. + # The state space representaton might have different signs + # of the states. + # By multiplying the matrices for the Markov parameters, numeric errors + # would propagate, therefor the accuracy of the results are limited to + # the accuracy of the given expected results + [Ao,Bo,Co,Do] = ssdata (SYS); + Ao = round (Ao*1e4)/1e4; + Bo = round (Bo*1e4)/1e4; + Co = round (Co*1e4)/1e4; + Do = round (Do*1e4)/1e4; - A = [ -1.0 37.0 -12.0 -12.0 - -1.0 -10.0 0.0 4.0 - 2.0 -4.0 7.0 -6.0 - 2.0 2.0 7.0 -9.0 ].'; + n = size(Ao,1); + m = size(Bo,2); + p = size(Co,1); + Mo = zeros (p,(n+1)*m); + Me = zeros (p,(n+1)*m); + Mo(:,1:m) = Do; + Me(:,1:m) = De; + + Aoi = eye (n,n); + Aei = eye (n,n); + for i = 1:n + Mo(:,i*m+1:(i+1)*m) = Co*Aoi*Bo; + Me(:,i*m+1:(i+1)*m) = Ce*Aei*Be; + Aoi = Aoi*Ao; + Aei = Aei*Ae; + endfor - B = [ 1.0 2.5 1.0 3.5 - 0.0 1.0 0.0 1.0 - -1.0 -2.5 -1.0 -1.5 - 1.0 2.5 4.0 -5.5 - -1.0 -2.5 -4.0 3.5 ].'; + assert (Mo, Me, 1e-3); +9 tests, 9 passed, 0 known failure, 0 skipped +[inst/dlyapchol.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/dlyapchol.m +***** shared U, U_exp - U = lyapchol (A, B); + A = [ 0.5000 0.5000 -0.5000 + 0.0000 1.0000 -0.5000 + 1.0000 -0.5000 0.0000 ]; - X = U.' * U; # use lyap at home! + B = [ -2.0 ; 1.0 ; -1.0 ]; - U_exp = [ 1.0000 0.0000 0.0000 0.0000 - 3.0000 1.0000 0.0000 0.0000 - 2.0000 -1.0000 1.0000 0.0000 - -1.0000 1.0000 -2.0000 1.0000 ].'; + U = dlyapchol (A, B); - X_exp = [ 1.0000 3.0000 2.0000 -1.0000 - 3.0000 10.0000 5.0000 -2.0000 - 2.0000 5.0000 6.0000 -5.0000 - -1.0000 -2.0000 -5.0000 7.0000 ]; + U_exp = [ 5.6042 5.1284 1.9562 + 0.0000 3.4313 -1.6716 + 0.0000 0.0000 2.5621 ]; ***** assert (U, U_exp, 1e-4); -***** assert (X, X_exp, 1e-4); -***** shared U, U_exp, X, X_exp +***** shared U, U_exp - A = [ -1.0 3.0 -4.0 - 0.0 5.0 -2.0 - -4.0 4.0 1.0 ].'; + A = [ 0.5000 0.5000 -0.5000 + 0.0000 1.0000 -0.5000 + 1.0000 -0.5000 0.0000 ]; - E = [ 2.0 1.0 3.0 - 2.0 0.0 1.0 - 4.0 5.0 1.0 ].'; + B = [ -2.0 ; 1.0 ; -1.0 ]; - B = [ 2.0 -1.0 7.0 ].'; + E = [ 2.0000 0.0000 0.0000 + 0.0000 2.0000 0.0000 + 0.0000 0.0000 2.0000 ]; - U = lyapchol (A, B, E); + U = dlyapchol (A, B, E); - U_exp = [ 1.6003 -0.4418 -0.1523 - 0.0000 0.6795 -0.2499 - 0.0000 0.0000 0.2041 ]; + U_exp = [ 1.0488 -0.3546 0.4644 + 0.0000 0.6560 -0.5187 + 0.0000 0.0000 0.4099 ]; ***** assert (U, U_exp, 1e-4); -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/dare.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/dare.m -***** shared x, l, g, xe, le, ge - a = [ 0.4 1.7 - 0.9 3.8]; - - b = [ 0.8 - 2.1]; - - c = [ 1 -1]; - - r = 3; - - [x, l, g] = dare (a, b, c.'*c, r); - - xe = [ 1.5354 1.2623 - 1.2623 10.5596]; - - le = [-0.0022 - 0.2454]; - - ge = [ 0.4092 1.7283]; - -***** assert (x, xe, 1e-4); -***** assert (sort (l), sort (le), 1e-4); -***** assert (g, ge, 1e-4); -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/sigma.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/sigma.m -***** shared sv_exp, w_exp, sv_obs, w_obs - A = [1, 2; 3, 4]; - B = [5, 6; 7, 8]; - C = [4, 3; 2, 1]; - D = [8, 7; 6, 5]; - w = [2, 3, 4]; - sv_exp = [7.9176, 8.6275, 9.4393; - 0.6985, 0.6086, 0.5195]; - w_exp = [2; 3; 4]; - [sv_obs, w_obs] = sigma (ss (A, B, C, D), w); -***** assert (sv_obs, sv_exp, 1e-4); -***** assert (w_obs, w_exp, 1e-4); 2 tests, 2 passed, 0 known failure, 0 skipped -[inst/ctrb.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/ctrb.m -***** assert (ctrb ([1, 0; 0, -0.5], [8; 8]), [8, 8; 8, -4]); -1 test, 1 passed, 0 known failure, 0 skipped -[inst/@lti/norm.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/norm.m -***** shared H2, Hinf - sys = ss (-1, 1, 1, 0); - H2 = norm (sys, 2); - Hinf = norm (sys, inf); -***** assert (H2, 0.7071, 1.5e-5); -***** assert (Hinf, 1, 5e-4); -***** shared H2, Hinf - a = [ 2.417 -1.002 0.5488 - 2 0 0 - 0 0.5 0 ]; - b = [ 1 - 0 - 0 ]; - c = [-0.424 0.436 -0.4552 ]; - d = [ 1 ]; - sys = ss (a, b, c, d, 0.1); - H2 = norm (sys, 2); - Hinf = norm (sys, inf); -***** assert (H2, 1.2527, 1.5e-5); -***** assert (Hinf, 2.7, 0.1); -4 tests, 4 passed, 0 known failure, 0 skipped -[inst/@lti/connect.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/connect.m -***** shared T, Texp - P = Boeing707; - I = ss (-eye (2)); - I.inname = P.outname; - I.outname = P.inname; - T = connect (P, I, P.inname, P.outname); - Texp = feedback (P); -***** assert (T.a, Texp.a, 1e-4); -***** assert (T.b, Texp.b, 1e-4); -***** assert (T.c, Texp.c, 1e-4); -***** assert (T.d, Texp.d, 1e-4); -4 tests, 4 passed, 0 known failure, 0 skipped -[inst/@lti/minreal.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/minreal.m -***** shared C, D - - A = ss (-2, 3, 4, 5); - B = A / A; - C = minreal (B, 1e-15); - D = ss (1); - -***** assert (C.a, D.a); -***** assert (C.b, D.b); -***** assert (C.c, D.c); -***** assert (C.d, D.d); -***** shared M, Me - A = [ 1.0 2.0 0.0 - 4.0 -1.0 0.0 - 0.0 0.0 1.0 ]; - - B = [ 1.0 - 0.0 - 1.0 ]; - - C = [ 0.0 1.0 -1.0 - 0.0 0.0 1.0 ]; - - D = zeros (2, 1); - - [Ar, Br, Cr] = __sl_tb01pd__ (A, B, C, 0.0, true); - M = [Ar, Br; Cr, D]; - - Ae = [ 1.0000 -1.4142 1.4142 - -2.8284 0.0000 1.0000 - 2.8284 1.0000 0.0000 ]; - - Be = [-1.0000 - 0.7071 - 0.7071 ]; - - Ce = [ 0.0000 0.0000 -1.4142 - 0.0000 0.7071 0.7071 ]; - - De = zeros (2, 1); - - Me = [Ae, Be; Ce, De]; - -***** assert (M, Me, 1e-4); -***** shared Ar, Br, Cr, Dr, Er, Ae, Be, Ce, De, Ee, num, den, num2, den2, num3, num3a, den3, den3a - A = [ -2 -3 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 - 0 0 -2 -3 0 0 0 0 0 - 0 0 1 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 - 0 0 0 0 0 1 0 0 0 - 0 0 0 0 0 0 1 0 0 - 0 0 0 0 0 0 0 1 0 - 0 0 0 0 0 0 0 0 1 ]; - - E = [ 1 0 0 0 0 0 0 0 0 - 0 1 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 - 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 - 0 0 0 0 0 0 0 1 0 ]; - - B = [ 1 0 - 0 0 - 0 1 - 0 0 - -1 0 - 0 0 - 0 -1 - 0 0 - 0 0 ]; - - C = [ 1 0 1 -3 0 1 0 2 0 - 0 1 1 3 0 1 0 0 1 ]; - - D = zeros (2, 2); - - sys = dss (A, B, C, D, E, "scaled", true); - sysmin = minreal (sys, 0.0); - [Ar, Br, Cr, Dr, Er] = dssdata (sysmin); - [num,den]=tfdata(sys); - sysmin = minreal (sys, 1e-6); - [num2,den2]=tfdata(sysmin); - sys3 = dss (Ar, Br, Cr, Dr, Er, "scaled", true); - [num3,den3]=tfdata(sys3); - sysmin3 = minreal (sys3, 1e-6); - [num3a,den3a]=tfdata(sysmin3); - -***** assert (num, num2 , 1e-4); -***** assert (den, den2 , 1e-4); -***** assert (num3, num3a , 1e-4); -***** assert (den3, den3a , 1e-4); -***** assert (num, num3a, 1e-4); -***** assert (den, den3a, 1e-4); -***** shared a, b, c, d - s = tf ("s"); - G1 = (s+1)*s*5/(s+1)/(s^2+s+1); - G2 = tf ([1, 1, 1], [2, 2, 2]); - G1min = minreal (G1); - G2min = minreal (G2); - a = G1min.num{1, 1}; - b = G1min.den{1, 1}; - c = G2min.num{1, 1}; - d = G2min.den{1, 1}; -***** assert (a, [5, 0], 1e-4); -***** assert (b, [1, 1, 1], 1e-4); -***** assert (c, 0.5, 1e-4); -***** assert (d, 1, 1e-4); -15 tests, 15 passed, 0 known failure, 0 skipped -[inst/@lti/prescale.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/prescale.m -***** shared Ao, Bo, Co, SCALEo, MAXREDo, Ae, Be, Ce, SCALEe, MAXREDe - A = [ 0.0 1.0000e+000 0.0 0.0 0.0 - -1.5800e+006 -1.2570e+003 0.0 0.0 0.0 - 3.5410e+014 0.0 -1.4340e+003 0.0 -5.3300e+011 - 0.0 0.0 0.0 0.0 1.0000e+000 - 0.0 0.0 0.0 -1.8630e+004 -1.4820e+000 ]; - - B = [ 0.0 0.0 - 1.1030e+002 0.0 - 0.0 0.0 - 0.0 0.0 - 0.0 8.3330e-003 ]; - - C = [ 1.0000e+000 0.0 0.0 0.0 0.0 - 0.0 0.0 1.0000e+000 0.0 0.0 - 0.0 0.0 0.0 1.0000e+000 0.0 - 6.6640e-001 0.0 -6.2000e-013 0.0 0.0 - 0.0 0.0 -1.0000e-003 1.8960e+006 1.5080e+002 ]; - - MAXRED = 0.0; - - [Ao, Bo, Co, MAXREDo, SCALEo] = __sl_tb01id__ (A, B, C, MAXRED); - - Ae = [ 0.0000000D+00 0.1000000D+05 0.0000000D+00 0.0000000D+00 0.0000000D+00 - -0.1580000D+03 -0.1257000D+04 0.0000000D+00 0.0000000D+00 0.0000000D+00 - 0.3541000D+05 0.0000000D+00 -0.1434000D+04 0.0000000D+00 -0.5330000D+03 - 0.0000000D+00 0.0000000D+00 0.0000000D+00 0.0000000D+00 0.1000000D+03 - 0.0000000D+00 0.0000000D+00 0.0000000D+00 -0.1863000D+03 -0.1482000D+01 ]; - - Be = [ 0.0000000D+00 0.0000000D+00 - 0.1103000D+04 0.0000000D+00 - 0.0000000D+00 0.0000000D+00 - 0.0000000D+00 0.0000000D+00 - 0.0000000D+00 0.8333000D+02 ]; - - Ce = [ 0.1000000D-04 0.0000000D+00 0.0000000D+00 0.0000000D+00 0.0000000D+00 - 0.0000000D+00 0.0000000D+00 0.1000000D+06 0.0000000D+00 0.0000000D+00 - 0.0000000D+00 0.0000000D+00 0.0000000D+00 0.1000000D-05 0.0000000D+00 - 0.6664000D-05 0.0000000D+00 -0.6200000D-07 0.0000000D+00 0.0000000D+00 - 0.0000000D+00 0.0000000D+00 -0.1000000D+03 0.1896000D+01 0.1508000D-01 ]; - - SCALEe = [0.1000000D-04 0.1000000D+00 0.1000000D+06 0.1000000D-05 0.1000000D-03 ]; - - MAXREDe = 0.3488E+10; - -***** assert (Ao, Ae, 1e-4); -***** assert (Bo, Be, 1e-4); -***** assert (Co, Ce, 1e-4); -***** assert (MAXREDo, MAXREDe, 1e6); -***** assert (SCALEo, SCALEe.', 1e-4); -***** shared Ao, Eo, Bo, Co, LSCALEo, RSCALEo, Ae, Ee, Be, Ce, LSCALEe, RSCALEe - A = [ -1 0 0 0.003 - 0 0 0.1000 0.02 - 100 10 0 0.4 - 0 0 0 0.0]; - - E = [ 1 0.2 0 0.0 - 0 1 0 0.01 - 300 90 6 0.3 - 0 0 20 0.0]; - - B = [ 10 0 - 0 0 - 0 1000 - 10000 10000]; - - C = [ -0.1 0.0 0.001 0.0 - 0.0 0.01 -0.001 0.0001]; - - TRESH = 0.0; - - [Ao, Eo, Bo, Co, LSCALEo, RSCALEo] = __sl_tg01ad__ (A, E, B, C, TRESH); - - Ae = [ -1.0000 0.0000 0.0000 0.3000 - 0.0000 0.0000 1.0000 2.0000 - 1.0000 0.1000 0.0000 0.4000 - 0.0000 0.0000 0.0000 0.0000]; - - Ee = [ 1.0000 0.2000 0.0000 0.0000 - 0.0000 1.0000 0.0000 1.0000 - 3.0000 0.9000 0.6000 0.3000 - 0.0000 0.0000 0.2000 0.0000 ]; - - Be = [100.0000 0.0000 - 0.0000 0.0000 - 0.0000 100.0000 - 100.0000 100.0000 ]; - - Ce = [ -0.0100 0.0000 0.0010 0.0000 - 0.0000 0.0010 -0.0010 0.0010]; - - LSCALEe = [ 10.0000 10.0000 0.1000 0.0100 ]; - - RSCALEe = [ 0.1000 0.1000 1.0000 10.0000 ]; - -***** assert (Ao, Ae, 1e-4); -***** assert (Eo, Ee, 1e-4); -***** assert (Bo, Be, 1e-4); -***** assert (Co, Ce, 1e-4); -***** assert (LSCALEo, LSCALEe.', 1e-4); -***** assert (RSCALEo, RSCALEe.', 1e-4); -***** shared Ao, Bo, Co, INFOo, Ae, Be, Ce, SCALEe - A = [ 0.0 1.0000e+000 0.0 0.0 0.0 - -1.5800e+006 -1.2570e+003 0.0 0.0 0.0 - 3.5410e+014 0.0 -1.4340e+003 0.0 -5.3300e+011 - 0.0 0.0 0.0 0.0 1.0000e+000 - 0.0 0.0 0.0 -1.8630e+004 -1.4820e+000 ]; - - B = [ 0.0 0.0 - 1.1030e+002 0.0 - 0.0 0.0 - 0.0 0.0 - 0.0 8.3330e-003 ]; - - C = [ 1.0000e+000 0.0 0.0 0.0 0.0 - 0.0 0.0 1.0000e+000 0.0 0.0 - 0.0 0.0 0.0 1.0000e+000 0.0 - 6.6640e-001 0.0 -6.2000e-013 0.0 0.0 - 0.0 0.0 -1.0000e-003 1.8960e+006 1.5080e+002 ]; - - SYS = ss (A, B, C); - - [SYSo, INFOo] = prescale (SYS); - - [Ao, Bo, Co] = ssdata (SYSo); - - Ae = [ 0.0000000D+00 0.1000000D+05 0.0000000D+00 0.0000000D+00 0.0000000D+00 - -0.1580000D+03 -0.1257000D+04 0.0000000D+00 0.0000000D+00 0.0000000D+00 - 0.3541000D+05 0.0000000D+00 -0.1434000D+04 0.0000000D+00 -0.5330000D+03 - 0.0000000D+00 0.0000000D+00 0.0000000D+00 0.0000000D+00 0.1000000D+03 - 0.0000000D+00 0.0000000D+00 0.0000000D+00 -0.1863000D+03 -0.1482000D+01 ]; - - Be = [ 0.0000000D+00 0.0000000D+00 - 0.1103000D+04 0.0000000D+00 - 0.0000000D+00 0.0000000D+00 - 0.0000000D+00 0.0000000D+00 - 0.0000000D+00 0.8333000D+02 ]; - - Ce = [ 0.1000000D-04 0.0000000D+00 0.0000000D+00 0.0000000D+00 0.0000000D+00 - 0.0000000D+00 0.0000000D+00 0.1000000D+06 0.0000000D+00 0.0000000D+00 - 0.0000000D+00 0.0000000D+00 0.0000000D+00 0.1000000D-05 0.0000000D+00 - 0.6664000D-05 0.0000000D+00 -0.6200000D-07 0.0000000D+00 0.0000000D+00 - 0.0000000D+00 0.0000000D+00 -0.1000000D+03 0.1896000D+01 0.1508000D-01 ]; - - SCALEe = [0.1000000D-04 0.1000000D+00 0.1000000D+06 0.1000000D-05 0.1000000D-03 ]; - -***** assert (Ao, Ae, 1e-4); -***** assert (Bo, Be, 1e-4); -***** assert (Co, Ce, 1e-4); -***** assert (INFOo.SL.^-1, SCALEe.', 1e-4); -***** assert (INFOo.SR, SCALEe.', 1e-4); -***** shared Ao, Eo, Bo, Co, INFOo, Ae, Ee, Be, Ce, LSCALEe, RSCALEe - A = [ -1 0 0 0.003 - 0 0 0.1000 0.02 - 100 10 0 0.4 - 0 0 0 0.0]; - - E = [ 1 0.2 0 0.0 - 0 1 0 0.01 - 300 90 6 0.3 - 0 0 20 0.0]; - - B = [ 10 0 - 0 0 - 0 1000 - 10000 10000]; - - C = [ -0.1 0.0 0.001 0.0 - 0.0 0.01 -0.001 0.0001]; - - SYS = dss (A, B, C, [], E); - - [SYSo, INFOo] = prescale (SYS); - - [Ao, Bo, Co, ~, Eo] = dssdata (SYSo); - - Ae = [ -1.0000 0.0000 0.0000 0.3000 - 0.0000 0.0000 1.0000 2.0000 - 1.0000 0.1000 0.0000 0.4000 - 0.0000 0.0000 0.0000 0.0000]; - - Ee = [ 1.0000 0.2000 0.0000 0.0000 - 0.0000 1.0000 0.0000 1.0000 - 3.0000 0.9000 0.6000 0.3000 - 0.0000 0.0000 0.2000 0.0000 ]; - - Be = [100.0000 0.0000 - 0.0000 0.0000 - 0.0000 100.0000 - 100.0000 100.0000 ]; - - Ce = [ -0.0100 0.0000 0.0010 0.0000 - 0.0000 0.0010 -0.0010 0.0010]; - - LSCALEe = [ 10.0000 10.0000 0.1000 0.0100 ]; - - RSCALEe = [ 0.1000 0.1000 1.0000 10.0000 ]; - -***** assert (Ao, Ae, 1e-4); -***** assert (Eo, Ee, 1e-4); -***** assert (Bo, Be, 1e-4); -***** assert (Co, Ce, 1e-4); -***** assert (INFOo.SL, LSCALEe.', 1e-4); -***** assert (INFOo.SR, RSCALEe.', 1e-4); -22 tests, 22 passed, 0 known failure, 0 skipped -[inst/@lti/horzcat.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/horzcat.m -***** shared M, Me - A1 = [ 1.0 0.0 -1.0 - 0.0 -1.0 1.0 - 1.0 1.0 2.0 ]; - - B1 = [ 1.0 1.0 0.0 - 2.0 0.0 1.0 ].'; - - C1 = [ 3.0 -2.0 1.0 - 0.0 1.0 0.0 ]; - - D1 = [ 1.0 0.0 - 0.0 1.0 ]; - - A2 = [-3.0 0.0 0.0 - 1.0 0.0 1.0 - 0.0 -1.0 2.0 ]; - - B2 = [ 0.0 -1.0 0.0 - 1.0 0.0 2.0 ].'; - - C2 = [ 1.0 1.0 0.0 - 1.0 1.0 -1.0 ]; - - D2 = [ 1.0 1.0 - 0.0 1.0 ]; - - sys1 = ss (A1, B1, C1, D1); - sys2 = ss (A2, B2, C2, D2); - sys = [sys1, sys2]; - [A, B, C, D] = ssdata (sys); - M = [A, B; C, D]; - - Ae = [ 1.0000 0.0000 -1.0000 0.0000 0.0000 0.0000 - 0.0000 -1.0000 1.0000 0.0000 0.0000 0.0000 - 1.0000 1.0000 2.0000 0.0000 0.0000 0.0000 - 0.0000 0.0000 0.0000 -3.0000 0.0000 0.0000 - 0.0000 0.0000 0.0000 1.0000 0.0000 1.0000 - 0.0000 0.0000 0.0000 0.0000 -1.0000 2.0000 ]; - - Be = [ 1.0000 2.0000 0.0000 0.0000 - 1.0000 0.0000 0.0000 0.0000 - 0.0000 1.0000 0.0000 0.0000 - 0.0000 0.0000 0.0000 1.0000 - 0.0000 0.0000 -1.0000 0.0000 - 0.0000 0.0000 0.0000 2.0000 ]; - - Ce = [ 3.0000 -2.0000 1.0000 1.0000 1.0000 0.0000 - 0.0000 1.0000 0.0000 1.0000 1.0000 -1.0000 ]; - - De = [ 1.0000 0.0000 1.0000 1.0000 - 0.0000 1.0000 0.0000 1.0000 ]; - - Me = [Ae, Be; Ce, De]; - -***** assert (M, Me, 1e-4); -1 test, 1 passed, 0 known failure, 0 skipped -[inst/@lti/feedback.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/feedback.m -***** shared M, Me - A1 = [ 1.0 0.0 -1.0 - 0.0 -1.0 1.0 - 1.0 1.0 2.0 ]; - - B1 = [ 1.0 1.0 0.0 - 2.0 0.0 1.0 ].'; - - C1 = [ 3.0 -2.0 1.0 - 0.0 1.0 0.0 ]; - - D1 = [ 1.0 0.0 - 0.0 1.0 ]; - - A2 = [-3.0 0.0 0.0 - 1.0 0.0 1.0 - 0.0 -1.0 2.0 ]; - - B2 = [ 0.0 -1.0 0.0 - 1.0 0.0 2.0 ].'; - - C2 = [ 1.0 1.0 0.0 - 1.0 1.0 -1.0 ]; - - D2 = [ 1.0 1.0 - 0.0 1.0 ]; - - sys1 = ss (A1, B1, C1, D1); - sys2 = ss (A2, B2, C2, D2); - sys = feedback (sys1, sys2); - [A, B, C, D] = ssdata (sys); - M = [A, B; C, D]; - - Ae = [-0.5000 -0.2500 -1.5000 -1.2500 -1.2500 0.7500 - -1.5000 -0.2500 0.5000 -0.2500 -0.2500 -0.2500 - 1.0000 0.5000 2.0000 -0.5000 -0.5000 0.5000 - 0.0000 0.5000 0.0000 -3.5000 -0.5000 0.5000 - -1.5000 1.2500 -0.5000 1.2500 0.2500 1.2500 - 0.0000 1.0000 0.0000 -1.0000 -2.0000 3.0000 ]; - - Be = [ 0.5000 0.7500 - 0.5000 -0.2500 - 0.0000 0.5000 - 0.0000 0.5000 - -0.5000 0.2500 - 0.0000 1.0000 ]; - - Ce = [ 1.5000 -1.2500 0.5000 -0.2500 -0.2500 -0.2500 - 0.0000 0.5000 0.0000 -0.5000 -0.5000 0.5000 ]; - - De = [ 0.5000 -0.2500 - 0.0000 0.5000 ]; - - Me = [Ae, Be; Ce, De]; - -***** assert (M, Me, 1e-4); -***** shared S1, S2 - P = ss (-2, 3, 4, 5); # meaningless numbers - C = ss (-1, 1, 1, 0); # ditto - L = P * C; - I = eye (size (L)); - S1 = feedback (I, L); - S2 = inv (I + L); -***** assert (S1.a, S2.a, 1e-4); -***** assert (S1.b, S2.b, 1e-4); -***** assert (S1.c, S2.c, 1e-4); -***** assert (S1.d, S2.d, 1e-4); -5 tests, 5 passed, 0 known failure, 0 skipped -[inst/@lti/isminimumphase.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/isminimumphase.m -***** assert (isminimumphase (tf (1, [1, 0])), true); -1 test, 1 passed, 0 known failure, 0 skipped -[inst/@lti/sminreal.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/sminreal.m -***** shared B, C - - A = ss (-2, 3, 4, 5); - B = A / A; - C = sminreal (B); # no states should be removed - -***** assert (C.a, B.a); -***** assert (C.b, B.b); -***** assert (C.c, B.c); -***** assert (C.d, B.d); -***** shared A, B, D, E - - A = ss (-1, 1, 1, 0); - B = ss (-2, 3, 4, 5); - C = [A, B]; - D = sminreal (C(:, 1)); - E = sminreal (C(:, 2)); - -***** assert (D.a, A.a); -***** assert (D.b, A.b); -***** assert (D.c, A.c); -***** assert (D.d, A.d); -***** assert (E.a, B.a); -***** assert (E.b, B.b); -***** assert (E.c, B.c); -***** assert (E.d, B.d); -12 tests, 12 passed, 0 known failure, 0 skipped -[inst/@lti/dcgain.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/dcgain.m -***** assert( dcgain( tf(1,[1,1]) ) , 1 ) -***** assert( dcgain( tf(2,[1,1]) ) , 2 ) -***** assert( dcgain( ss([0,1;-2,-3],[0;1],[1,0],0) ) , 0.5 ) -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/@lti/plus.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/plus.m -***** shared M, Me - A1 = [ 1.0 0.0 -1.0 - 0.0 -1.0 1.0 - 1.0 1.0 2.0 ]; - - B1 = [ 1.0 1.0 0.0 - 2.0 0.0 1.0 ].'; - - C1 = [ 3.0 -2.0 1.0 - 0.0 1.0 0.0 ]; - - D1 = [ 1.0 0.0 - 0.0 1.0 ]; - - A2 = [-3.0 0.0 0.0 - 1.0 0.0 1.0 - 0.0 -1.0 2.0 ]; - - B2 = [ 0.0 -1.0 0.0 - 1.0 0.0 2.0 ].'; - - C2 = [ 1.0 1.0 0.0 - 1.0 1.0 -1.0 ]; - - D2 = [ 1.0 1.0 - 0.0 1.0 ]; - - sys1 = ss (A1, B1, C1, D1); - sys2 = ss (A2, B2, C2, D2); - sys = sys1 + sys2; - [A, B, C, D] = ssdata (sys); - M = [A, B; C, D]; - - Ae = [ 1.0000 0.0000 -1.0000 0.0000 0.0000 0.0000 - 0.0000 -1.0000 1.0000 0.0000 0.0000 0.0000 - 1.0000 1.0000 2.0000 0.0000 0.0000 0.0000 - 0.0000 0.0000 0.0000 -3.0000 0.0000 0.0000 - 0.0000 0.0000 0.0000 1.0000 0.0000 1.0000 - 0.0000 0.0000 0.0000 0.0000 -1.0000 2.0000 ]; - - Be = [ 1.0000 2.0000 - 1.0000 0.0000 - 0.0000 1.0000 - 0.0000 1.0000 - -1.0000 0.0000 - 0.0000 2.0000 ]; - - Ce = [ 3.0000 -2.0000 1.0000 1.0000 1.0000 0.0000 - 0.0000 1.0000 0.0000 1.0000 1.0000 -1.0000 ]; - - De = [ 2.0000 1.0000 - 0.0000 2.0000 ]; - - Me = [Ae, Be; Ce, De]; - -***** assert (M, Me, 1e-4); -1 test, 1 passed, 0 known failure, 0 skipped -[inst/@lti/inv.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/inv.m -***** shared M, Me - A = [ 1.0 2.0 0.0 - 4.0 -1.0 0.0 - 0.0 0.0 1.0 ]; - - B = [ 1.0 0.0 - 0.0 1.0 - 1.0 0.0 ]; - - C = [ 0.0 1.0 -1.0 - 0.0 0.0 1.0 ]; - - D = [ 4.0 0.0 - 0.0 1.0 ]; - - sys = ss (A, B, C, D); - sysinv = inv (sys); - [Ai, Bi, Ci, Di] = ssdata (sysinv); - M = [Ai, Bi; Ci, Di]; - - Ae = [ 1.0000 1.7500 0.2500 - 4.0000 -1.0000 -1.0000 - 0.0000 -0.2500 1.2500 ]; - - Be = [-0.2500 0.0000 - 0.0000 -1.0000 - -0.2500 0.0000 ]; - - Ce = [ 0.0000 0.2500 -0.2500 - 0.0000 0.0000 1.0000 ]; - - De = [ 0.2500 0.0000 - 0.0000 1.0000 ]; - - Me = [Ae, -Be; -Ce, De]; - -***** assert (M, Me, 1e-4); -1 test, 1 passed, 0 known failure, 0 skipped -[inst/@lti/c2d.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/c2d.m -***** shared Mo, Me - A = [ 1.0 0.5 - 0.5 1.0 ].'; - - B = [ 0.0 -1.0 - 1.0 0.0 ].'; - - C = [ -1.0 0.0 - 0.0 1.0 ].'; - - D = [ 1.0 0.0 - 0.0 -1.0 ].'; - - [Ao, Bo, Co, Do] = __sl_ab04md__ (A, B, C, D, 1.0, 1.0, false); - - Ae = [ -1.0000 -4.0000 - -4.0000 -1.0000 ]; - - Be = [ 2.8284 0.0000 - 0.0000 -2.8284 ]; - - Ce = [ 0.0000 2.8284 - -2.8284 0.0000 ]; - - De = [ -1.0000 0.0000 - 0.0000 -3.0000 ]; - - Mo = [Ao, Bo; Co, Do]; - Me = [Ae, Be; Ce, De]; - -***** assert (Mo, Me, 1e-4); -***** shared Mo, Me - A = [ 1.0 0.5 - 0.5 1.0 ].'; - - B = [ 0.0 -1.0 - 1.0 0.0 ].'; - - C = [ -1.0 0.0 - 0.0 1.0 ].'; - - D = [ 1.0 0.0 - 0.0 -1.0 ].'; - - [Ao, Bo, Co, Do] = ssdata (c2d (ss (A, B, C, D), 2, "tustin")); - - Ae = [ -1.0000 -4.0000 - -4.0000 -1.0000 ]; - - Be = [ 2.8284 0.0000 - 0.0000 -2.8284 ]; - - Ce = [ 0.0000 2.8284 - -2.8284 0.0000 ]; - - De = [ -1.0000 0.0000 - 0.0000 -3.0000 ]; - - Mo = [Ao, Bo; Co, Do]; - Me = [Ae, Be; Ce, De]; - -***** assert (Mo, Me, 1e-4); -***** shared Mo, Me - A = [ 1.0 0.5 - 0.5 1.0 ]; - - B = [ 0.0 -1.0 - 1.0 0.0 ]; - - C = [ -1.0 0.0 - 0.0 1.0 ]; - - D = [ 1.0 0.0 - 0.0 -1.0 ]; - - [Ao, Bo, Co, Do] = ssdata (d2c (c2d (ss (A, B, C, D), 2, "tustin"), "tustin")); - - Mo = [Ao, Bo; Co, Do]; - Me = [A, B; C, D]; - -***** assert (Mo, Me, 1e-4); -***** shared Mo, Me - A = [ 1.0 0.5 - 0.5 1.0 ]; - - B = [ 0.0 -1.0 - 1.0 0.0 ]; - - C = [ -1.0 0.0 - 0.0 1.0 ]; - - D = [ 1.0 0.0 - 0.0 -1.0 ]; - - [Ao, Bo, Co, Do] = ssdata (d2c (c2d (ss (A, B, C, D), 2, "zoh"), "zoh")); - - Mo = [Ao, Bo; Co, Do]; - Me = [A, B; C, D]; - -***** assert (Mo, Me, 1e-4); -***** shared Mo, Me - A = [ 1.0 0.5 - 0.5 1.0 ]; - - B = [ 0.0 -1.0 - 1.0 0.0 ]; - - C = [ -1.0 0.0 - 0.0 1.0 ]; - - D = [ 1.0 0.0 - 0.0 -1.0 ]; - - [Ao, Bo, Co, Do] = ssdata (c2d (ss (A, B, C, D), 2, "foh")); - - Ae = [ 11.4019 8.6836 - 8.6836 11.4019 ]; - - Be = [ 37.5206 -43.4256 - 43.4256 -37.5206 ]; - - Ce = [ -1.0000 0.0000 - 0.0000 1.0000 ]; - - De = [ -0.0690 2.5056 - 2.5056 -2.0690 ]; - - Mo = [Ao, Bo; Co, Do]; - Me = [Ae, Be; Ce, De]; - -***** assert (Mo, Me, 1e-4); -***** shared Mo, Me - A = [ 1.0 0.5 - 0.5 1.0 ]; - - B = [ 0.0 -1.0 - 1.0 0.0 ]; - - C = [ -1.0 0.0 - 0.0 1.0 ]; - - D = [ 1.0 0.0 - 0.0 -1.0 ]; - - [Ao, Bo, Co, Do] = ssdata (d2c (c2d (ss (A, B, C, D), 2, "prewarp", 1000), "prewarp", 1000)); - - Mo = [Ao, Bo; Co, Do]; - Me = [A, B; C, D]; - -***** assert (Mo, Me, 1e-4); -***** shared Aex, Aexint, Aex_exp, Aexint_exp - A = [ 5.0 4.0 3.0 2.0 1.0 - 1.0 6.0 0.0 4.0 3.0 - 2.0 0.0 7.0 6.0 5.0 - 1.0 3.0 1.0 8.0 7.0 - 2.0 5.0 7.0 1.0 9.0 ]; - - Aex_exp = [ 1.8391 0.9476 0.7920 0.8216 0.7811 - 0.3359 2.2262 0.4013 1.0078 1.0957 - 0.6335 0.6776 2.6933 1.6155 1.8502 - 0.4804 1.1561 0.9110 2.7461 2.0854 - 0.7105 1.4244 1.8835 1.0966 3.4134 ]; - - Aexint_exp = [ 0.1347 0.0352 0.0284 0.0272 0.0231 - 0.0114 0.1477 0.0104 0.0369 0.0368 - 0.0218 0.0178 0.1624 0.0580 0.0619 - 0.0152 0.0385 0.0267 0.1660 0.0732 - 0.0240 0.0503 0.0679 0.0317 0.1863 ]; - - [Aex, Aexint] = __sl_mb05nd__ (A, 0.1, 0.0001); - -***** assert (Aex, Aex_exp, 1e-4); -***** assert (Aexint, Aexint_exp, 1e-4); -8 tests, 8 passed, 0 known failure, 0 skipped -[inst/@lti/mtimes.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/mtimes.m -***** shared sysmat, sysmat_exp - sys1 = ss ([0, 1; -3, -2], [0; 1], [-5, 1], [2]); - sys2 = ss ([-10], [1], [-40], [5]); - sys3 = sys2 * sys1; - [A, B, C, D] = ssdata (sys3); - sysmat = [A, B; C, D]; - A_exp = [ -10 -5 1 - 0 0 1 - 0 -3 -2 ]; - B_exp = [ 2 - 0 - 1 ]; - C_exp = [ -40 -25 5 ]; - D_exp = [ 10 ]; - sysmat_exp = [A_exp, B_exp; C_exp, D_exp]; -***** assert (sysmat, sysmat_exp) -1 test, 1 passed, 0 known failure, 0 skipped -[inst/@lti/zero.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/zero.m -***** shared z, z_exp - A = [ -0.7 -0.0458 -12.2 0 - 0 -0.014 -0.2904 -0.562 - 1 -0.0057 -1.4 0 - 1 0 0 0 ]; - - B = [ -19.1 -3.1 - -0.0119 -0.0096 - -0.14 -0.72 - 0 0 ]; - - C = [ 0 0 -1 1 - 0 0 0.733 0 ]; - - D = [ 0 0 - 0.0768 0.1134 ]; - - sys = ss (A, B, C, D, "scaled", true); - z = sort (zero (sys)); - - z_exp = sort ([-13.2759; 12.5774; -0.0155]); - -***** assert (z, z_exp, 1e-4); -***** shared z, z_exp, info, rank_exp, infz_exp, kronr_exp, kronl_exp - A = [ 1.0 0.0 0.0 0.0 0.0 0.0 - 0.0 1.0 0.0 0.0 0.0 0.0 - 0.0 0.0 3.0 0.0 0.0 0.0 - 0.0 0.0 0.0 -4.0 0.0 0.0 - 0.0 0.0 0.0 0.0 -1.0 0.0 - 0.0 0.0 0.0 0.0 0.0 3.0 ]; - - B = [ 0.0 -1.0 - -1.0 0.0 - 1.0 -1.0 - 0.0 0.0 - 0.0 1.0 - -1.0 -1.0 ]; - - C = [ 1.0 0.0 0.0 1.0 0.0 0.0 - 0.0 1.0 0.0 1.0 0.0 1.0 - 0.0 0.0 1.0 0.0 0.0 1.0 ]; - - D = [ 0.0 0.0 - 0.0 0.0 - 0.0 0.0 ]; - - sys = ss (A, B, C, D, "scaled", true); - [z, ~, info] = zero (sys); - - z_exp = [ 2.0000 - -1.0000 ]; - - rank_exp = 2; - infz_exp = 2; - kronr_exp = zeros (1, 0); - kronl_exp = 2; - -***** assert (z, z_exp, 1e-4); -***** assert (info.rank, rank_exp); -***** assert (info.infz, infz_exp); -***** assert (info.kronr, kronr_exp); -***** assert (info.kronl, kronl_exp); -***** shared z, z_exp, info, rank_exp, infz_exp, kronr_exp, kronl_exp - A = [ 1 0 0 0 0 0 0 0 0 - 0 1 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 - 0 0 0 0 0 1 0 0 0 - 0 0 0 0 0 0 1 0 0 - 0 0 0 0 0 0 0 1 0 - 0 0 0 0 0 0 0 0 1 ]; - - E = [ 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 - 0 1 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 - 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 - 0 0 0 0 0 0 0 1 0 ]; - - B = [ -1 0 0 - 0 0 0 - 0 0 0 - 0 -1 0 - 0 0 0 - 0 0 0 - 0 0 -1 - 0 0 0 - 0 0 0 ]; - - C = [ 0 1 1 0 3 4 0 0 2 - 0 1 0 0 4 0 0 2 0 - 0 0 1 0 -1 4 0 -2 2 ]; - - D = [ 1 2 -2 - 0 -1 -2 - 0 0 0 ]; - - sys = dss (A, B, C, D, E, "scaled", true); - [z, ~, info] = zero (sys); - - z_exp = 1; - - rank_exp = 11; - infz_exp = [0, 1]; - kronr_exp = 2; - kronl_exp = 1; - -***** assert (z, z_exp, 1e-4); -***** assert (info.rank, rank_exp); -***** assert (info.infz, infz_exp); -***** assert (info.kronr, kronr_exp); -***** assert (info.kronl, kronl_exp); -***** shared p, pi, z, zi, k, ki, p_tf, pi_tf, z_tf, zi_tf, k_tf, ki_tf - P = ss (-2, 3, 4, 5); - Pi = inv (P); - - p = pole (P); - [z, k] = zero (P); - - pi = pole (Pi); - [zi, ki] = zero (Pi); - - P_tf = tf (P); - Pi_tf = tf (Pi); - - p_tf = pole (P_tf); - [z_tf, k_tf] = zero (P_tf); - - pi_tf = pole (Pi_tf); - [zi_tf, ki_tf] = zero (Pi_tf); - -***** assert (p, zi, 1e-4); -***** assert (z, pi, 1e-4); -***** assert (k, inv (ki), 1e-4); -***** assert (p_tf, zi_tf, 1e-4); -***** assert (z_tf, pi_tf, 1e-4); -***** assert (k_tf, inv (ki_tf), 1e-4); -***** shared z_inv, z_tra, z_inp, z_out, z_sys, z_inv_e, z_tra_e, z_inp_e, z_out_e, z_sys_e - A = diag ([1, 1, 3, -4, -1, 3]); - - B = [ 0, -1 - -1, 0 - 1, -1 - 0, 0 - 0, 1 - -1, -1 ]; - - C = [ 1, 0, 0, 1, 0, 0 - 0, 1, 0, 1, 0, 1 - 0, 0, 1, 0, 0, 1 ]; - - D = zeros (3, 2); - - SYS = ss (A, B, C, D); - - z_inv = zero (SYS); - z_tra = zero (SYS, "transmission"); - z_inp = zero (SYS, "input decoupling"); - z_out = zero (SYS, "output decoupling"); - z_sys = zero (SYS, "system"); - - z_inv_e = [2; -1]; - z_tra_e = [2]; - z_inp_e = [-4]; - z_out_e = [-1]; - z_sys_e = [-4, -1, 2]; - -***** assert (z_inv, z_inv_e, 1e-4); -***** assert (z_tra, z_tra_e, 1e-4); -***** assert (z_inp, z_inp_e, 1e-4); -***** assert (z_out, z_out_e, 1e-4); -***** assert (z_sys, z_sys_e, 1e-4); -***** shared z_inv, z_tra, z_inp, z_out, z_sys, z_inv_e, z_tra_e, z_inp_e, z_out_e, z_sys_e - A = diag ([1, 1, 3, -4, -1, 3]); - - B = [ 0, -1 - -1, 0 - 1, -1 - 0, 0 - 0, 1 - -1, -1 ]; - - C = [ 1, 0, 0, 1, 0, 0 - 0, 1, 0, 1, 0, 1 - 0, 0, 1, 0, 0, 1 ]; - - D = zeros (3, 2); - - E = eye (6); - - SYS = dss (A, B, C, D, E); - - z_inv = zero (SYS); - z_tra = zero (SYS, "transmission"); - z_inp = zero (SYS, "input decoupling"); - z_out = zero (SYS, "output decoupling"); - z_sys = zero (SYS, "system"); - - z_inv_e = [2; -1]; - z_tra_e = [2]; - z_inp_e = [-4]; - z_out_e = [-1]; - z_sys_e = [-4, -1, 2]; - -***** assert (z_inv, z_inv_e, 1e-4); -***** assert (z_tra, z_tra_e, 1e-4); -***** assert (z_inp, z_inp_e, 1e-4); -***** assert (z_out, z_out_e, 1e-4); -***** assert (z_sys, z_sys_e, 1e-4); -27 tests, 27 passed, 0 known failure, 0 skipped -[inst/@lti/subsref.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/subsref.m -***** shared a - s = tf ("s"); - G = (s+1)*s*5/(s+1)/(s^2+s+1); - a = G(1,1).num{1,1}(1); -***** assert (a, 5, 1e-4); -1 test, 1 passed, 0 known failure, 0 skipped -[inst/@lti/d2d.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/d2d.m -***** shared num, den, z, p, k - H1 = zpk (0.7, 0.5, 1, 0.1); - H2 = d2d (H1, 0.05); - H3 = d2d (H2, 0.1); - [num, den] = tfdata (H2, "vector"); - [z, p, k] = zpkdata (H3, "vector"); -***** assert (num, [1.00000 -0.82426], 1e-4); -***** assert (den, [1.00000 -0.70711], 1e-4); -***** assert (z, 0.7, 1e-4); -***** assert (p, 0.5, 1e-4); -***** assert (k, 1.0, 1e-4); -5 tests, 5 passed, 0 known failure, 0 skipped -[inst/@lti/d2c.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/d2c.m -***** shared Mo, Me - A = [ 1.0 0.5 - 0.5 1.0 ]; - - B = [ 0.0 -1.0 - 1.0 0.0 ]; - - C = [ -1.0 0.0 - 0.0 1.0 ]; - - D = [ 1.0 0.0 - 0.0 -1.0 ]; - - [Ao, Bo, Co, Do] = ssdata (d2c (c2d (ss (A, B, C, D), 2, "tustin"), "tustin")); - - Mo = [Ao, Bo; Co, Do]; - Me = [A, B; C, D]; - -***** assert (Mo, Me, 1e-4); -***** shared Mo, Me - A = [ 1.0 0.5 - 0.5 1.0 ]; - - B = [ 0.0 -1.0 - 1.0 0.0 ]; - - C = [ -1.0 0.0 - 0.0 1.0 ]; - - D = [ 1.0 0.0 - 0.0 -1.0 ]; - - [Ao, Bo, Co, Do] = ssdata (d2c (c2d (ss (A, B, C, D), 2, "zoh"), "zoh")); - - Mo = [Ao, Bo; Co, Do]; - Me = [A, B; C, D]; - -***** assert (Mo, Me, 1e-4); -***** shared Mo, Me - A = [ 1.0 0.5 - 0.5 1.0 ]; - - B = [ 0.0 -1.0 - 1.0 0.0 ]; - - C = [ -1.0 0.0 - 0.0 1.0 ]; - - D = [ 1.0 0.0 - 0.0 -1.0 ]; - - [Ao, Bo, Co, Do] = ssdata (d2c (c2d (ss (A, B, C, D), 2, "prewarp", 1000), "prewarp", 1000)); - - Mo = [Ao, Bo; Co, Do]; - Me = [A, B; C, D]; - -***** assert (Mo, Me, 1e-4); -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/@lti/pole.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/@lti/pole.m +[inst/pole.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/pole.m ***** shared pol_exp, pol_obs A = [-1, 0, 0; 0, -2, 0; @@ -8270,8 +9837,7 @@ pol_exp = [-3; -2; -1]; - pol_obs = pole (ss (A, ones (3, 1))); - + pol_obs = pole(A); ***** assert(pol_obs, pol_exp, 0); ***** shared pol, pol_exp, infp, kronr, kronl, infp_exp, kronr_exp, kronl_exp A = [ 1 0 0 0 0 0 0 0 0 @@ -8326,1907 +9892,599 @@ ***** assert (kronr, kronr_exp); ***** assert (kronl, kronl_exp); 5 tests, 5 passed, 0 known failure, 0 skipped -[inst/h2syn.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/h2syn.m -***** shared M, M_exp - A = [-1.0 0.0 4.0 5.0 -3.0 -2.0 - -2.0 4.0 -7.0 -2.0 0.0 3.0 - -6.0 9.0 -5.0 0.0 2.0 -1.0 - -8.0 4.0 7.0 -1.0 -3.0 0.0 - 2.0 5.0 8.0 -9.0 1.0 -4.0 - 3.0 -5.0 8.0 0.0 2.0 -6.0]; - - B = [-3.0 -4.0 -2.0 1.0 0.0 - 2.0 0.0 1.0 -5.0 2.0 - -5.0 -7.0 0.0 7.0 -2.0 - 4.0 -6.0 1.0 1.0 -2.0 - -3.0 9.0 -8.0 0.0 5.0 - 1.0 -2.0 3.0 -6.0 -2.0]; - - C = [ 1.0 -1.0 2.0 -4.0 0.0 -3.0 - -3.0 0.0 5.0 -1.0 1.0 1.0 - -7.0 5.0 0.0 -8.0 2.0 -2.0 - 9.0 -3.0 4.0 0.0 3.0 7.0 - 0.0 1.0 -2.0 1.0 -6.0 -2.0]; - - D = [ 0.0 0.0 0.0 -4.0 -1.0 - 0.0 0.0 0.0 1.0 0.0 - 0.0 0.0 0.0 0.0 1.0 - 3.0 1.0 0.0 1.0 -3.0 - -2.0 0.0 1.0 7.0 1.0]; - - P = ss (A, B, C, D); - K = h2syn (P, 2, 2); - M = [K.A, K.B; K.C, K.D]; - - KA = [ 88.0015 -145.7298 -46.2424 82.2168 -45.2996 -31.1407 - 25.7489 -31.4642 -12.4198 9.4625 -3.5182 2.7056 - 54.3008 -102.4013 -41.4968 50.8412 -20.1286 -26.7191 - 108.1006 -198.0785 -45.4333 70.3962 -25.8591 -37.2741 - -115.8900 226.1843 47.2549 -47.8435 -12.5004 34.7474 - 59.0362 -101.8471 -20.1052 36.7834 -16.1063 -26.4309]; - - KB = [ 3.7345 3.4758 - -0.3020 0.6530 - 3.4735 4.0499 - 4.3198 7.2755 - -3.9424 -10.5942 - 2.1784 2.5048]; - - KC = [ -2.3346 3.2556 0.7150 -0.9724 0.6962 0.4074 - 7.6899 -8.4558 -2.9642 7.0365 -4.2844 0.1390]; - - KD = [ 0.0000 0.0000 - 0.0000 0.0000]; - - M_exp = [KA, KB; KC, KD]; - -***** assert (M, M_exp, 1e-4); -***** shared M, M_exp - A = [-0.7 0.0 0.3 0.0 -0.5 -0.1 - -0.6 0.2 -0.4 -0.3 0.0 0.0 - -0.5 0.7 -0.1 0.0 0.0 -0.8 - -0.7 0.0 0.0 -0.5 -1.0 0.0 - 0.0 0.3 0.6 -0.9 0.1 -0.4 - 0.5 -0.8 0.0 0.0 0.2 -0.9]; - - B = [-1.0 -2.0 -2.0 1.0 0.0 - 1.0 0.0 1.0 -2.0 1.0 - -3.0 -4.0 0.0 2.0 -2.0 - 1.0 -2.0 1.0 0.0 -1.0 - 0.0 1.0 -2.0 0.0 3.0 - 1.0 0.0 3.0 -1.0 -2.0]; - - C = [ 1.0 -1.0 2.0 -2.0 0.0 -3.0 - -3.0 0.0 1.0 -1.0 1.0 0.0 - 0.0 2.0 0.0 -4.0 0.0 -2.0 - 1.0 -3.0 0.0 0.0 3.0 1.0 - 0.0 1.0 -2.0 1.0 0.0 -2.0]; - - D = [ 1.0 -1.0 -2.0 0.0 0.0 - 0.0 1.0 0.0 1.0 0.0 - 2.0 -1.0 -3.0 0.0 1.0 - 0.0 1.0 0.0 1.0 -1.0 - 0.0 0.0 1.0 2.0 1.0]; - - P = ss (A, B, C, D, 1); # value of sampling time doesn't matter - K = h2syn (P, 2, 2); - M = [K.A, K.B; K.C, K.D]; +[inst/margin.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/margin.m +***** shared margin_c, margin_c_exp, margin_d, margin_d_exp + sysc = tf ([24], [1, 6, 11, 6]); + [gamma_c, phi_c, w_gamma_c, w_phi_c] = margin (sysc); + sysd = c2d (sysc, 0.3); + [gamma_d, phi_d, w_gamma_d, w_phi_d] = margin (sysd); - KA = [-0.0551 -2.1891 -0.6607 -0.2532 0.6674 -1.0044 - -1.0379 2.3804 0.5031 0.3960 -0.6605 1.2673 - -0.0876 -2.1320 -0.4701 -1.1461 1.2927 -1.5116 - -0.1358 -2.1237 -0.9560 -0.7144 0.6673 -0.7957 - 0.4900 0.0895 0.2634 -0.2354 0.1623 -0.2663 - 0.1672 -0.4163 0.2871 -0.1983 0.4944 -0.6967]; + margin_c = [gamma_c, phi_c, w_gamma_c, w_phi_c]; + margin_d = [gamma_d, phi_d, w_gamma_d, w_phi_d]; - KB = [-0.5985 -0.5464 - 0.5285 0.6087 - -0.7600 -0.4472 - -0.7288 -0.6090 - 0.0532 0.0658 - -0.0663 0.0059]; + ## results from this implementation and the "dark side" diverge + ## from the third digit after the decimal point on - KC = [ 0.2500 -1.0200 -0.3371 -0.2733 0.2747 -0.4444 - 0.0654 0.2095 0.0632 0.2089 -0.1895 0.1834]; + gamma_c_exp = 2.50; + phi_c_exp = 35.43; + w_gamma_c_exp = 3.32; + w_phi_c_exp = 2.06; - KD = [-0.2181 -0.2070 - 0.1094 0.1159]; + gamma_d_exp = 1.41; + phi_d_exp = 18.60; + w_gamma_d_exp = 2.48; + w_phi_d_exp = 2.04; - M_exp = [KA, KB; KC, KD]; + margin_c_exp = [gamma_c_exp, phi_c_exp, w_gamma_c_exp, w_phi_c_exp]; + margin_d_exp = [gamma_d_exp, phi_d_exp, w_gamma_d_exp, w_phi_d_exp]; -***** assert (M, M_exp, 1e-4); +***** assert (margin_c, margin_c_exp, 1e-2); +***** assert (margin_d, margin_d_exp, 1e-2); 2 tests, 2 passed, 0 known failure, 0 skipped -[inst/gram.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/gram.m -***** test - a = [-1 0 0; 1/2 -1 0; 1/2 0 -1]; - b = [1 0; 0 -1; 0 1]; - c = [0 0 1; 1 1 0]; ## it doesn't matter what the value of c is - Wc = gram (ss (a, b, c), "c"); - assert (a * Wc + Wc * a.' + b * b.', zeros (size (a))) -***** test - a = [-1 0 0; 1/2 -1 0; 1/2 0 -1]; - b = [1 0; 0 -1; 0 1]; ## it doesn't matter what the value of b is - c = [0 0 1; 1 1 0]; - Wo = gram (ss (a, b, c), "o"); - assert (a.' * Wo + Wo * a + c.' * c, zeros (size (a))) -***** test - a = [-1 0 0; 1/2 -1 0; 1/2 0 -1]; - b = [1 0; 0 -1; 0 1]; - Wc = gram (a, b); - assert (a * Wc + Wc * a.' + b * b.', zeros (size (a))) -***** test - a = [-1 0 0; 1/2 1 0; 1/2 0 -1] / 2; - b = [1 0; 0 -1; 0 1]; - c = [0 0 1; 1 1 0]; ## it doesn't matter what the value of c is - d = zeros (rows (c), columns (b)); ## it doesn't matter what the value of d is - Ts = 0.1; ## Ts != 0 - Wc = gram (ss (a, b, c, d, Ts), "c"); - assert (a * Wc * a.' - Wc + b * b.', zeros (size (a)), 1e-12) -***** test - a = [-1 0 0; 1/2 1 0; 1/2 0 -1] / 2; - b = [1 0; 0 -1; 0 1]; ## it doesn't matter what the value of b is - c = [0 0 1; 1 1 0]; - d = zeros (rows (c), columns (b)); ## it doesn't matter what the value of d is - Ts = 0.1; ## Ts != 0 - Wo = gram (ss (a, b, c, d, Ts), "o"); - assert (a.' * Wo * a - Wo + c.' * c, zeros (size (a)), 1e-12) -5 tests, 5 passed, 0 known failure, 0 skipped -[inst/ltimodels.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/ltimodels.m -***** shared ltisys - ltisys = tf (12); -***** assert (ltisys.ts, 0); -***** assert (isstaticgain (ltisys)); -***** assert (isct (ltisys)); -***** assert (! isdt (ltisys)); -***** shared ltisys - ltisys = ss (17); -***** assert (ltisys.ts, 0); -***** assert (isstaticgain (ltisys)); -***** assert (! isdt (ltisys)); -***** assert (isct (ltisys)); -***** shared ltisys - ltisys = tf ({[0 9],[0 0 10]},{2,5},2); -***** assert (ltisys.ts, 2); -***** assert (isstaticgain (ltisys)); -***** assert (isdt (ltisys)); -***** assert (! isct (ltisys)); -***** shared ltisys - ltisys = tf (1, [1 1]); -***** assert (ltisys.ts, 0); -***** assert (isct (ltisys)); -***** assert (! isdt (ltisys)); -***** shared ltisys, ts - ts = 0.1; - ltisys = ss (-1, 1, 1, 0, ts); -***** assert (ltisys.ts, ts); -***** assert (! isct (ltisys)); -***** assert (isdt (ltisys)); -***** shared ltisys - ltisys = ss ([],[],[], 3); -***** assert (ltisys.ts, 0); -***** assert (isstaticgain (ltisys)); -***** assert (isct (ltisys)); -***** assert (! isdt (ltisys)); -***** shared Ac, Bc, Ace, Bce - A = [ 17.0 24.0 1.0 8.0 15.0 - 23.0 5.0 7.0 14.0 16.0 - 4.0 6.0 13.0 20.0 22.0 - 10.0 12.0 19.0 21.0 3.0 - 11.0 18.0 25.0 2.0 9.0 ]; - - B = [ -1.0 -4.0 - 4.0 9.0 - -9.0 -16.0 - 16.0 25.0 - -25.0 -36.0 ]; - - tol = 0; - - A = A.'; # There's a little mistake in the example - # program of routine AB01OD in SLICOT 5.0 - - [Ac, Bc, U, ncont] = __sl_ab01od__ (A, B, tol); - - Ace = [ 12.8848 3.2345 11.8211 3.3758 -0.8982 - 4.4741 -12.5544 5.3509 5.9403 1.4360 - 14.4576 7.6855 23.1452 26.3872 -29.9557 - 0.0000 1.4805 27.4668 22.6564 -0.0072 - 0.0000 0.0000 -30.4822 0.6745 18.8680 ]; - - Bce = [ 31.1199 47.6865 - 3.2480 0.0000 - 0.0000 0.0000 - 0.0000 0.0000 - 0.0000 0.0000 ]; - -***** assert <45008> (Ac, Ace, 1e-4); -***** assert (Bc, Bce, 1e-4); -***** shared ac, ec, bc, cc, q, z, ncont, ac_e, ec_e, bc_e, cc_e, q_e, z_e, ncont_e - - a = [ 2 0 2 0 -1 3 1 - 0 1 0 0 1 0 0 - 0 0 0 1 0 0 1 - 0 0 2 0 -1 3 1 - 0 0 0 1 0 0 1 - 0 1 0 0 1 0 0 - 0 0 0 1 0 0 1 ]; - - e = [ 0 0 1 0 0 0 0 - 0 0 0 0 0 1 0 - 0 0 0 0 0 0 1 - 0 0 0 0 0 0 1 - 0 0 0 1 0 0 0 - 0 0 1 0 -1 0 0 - 1 3 0 2 0 0 0 ]; - - b = [ 2 1 0 - 0 0 0 - 0 0 0 - 0 0 0 - 0 0 0 - 0 0 0 - 1 2 3 ]; - - c = [ 1 0 0 1 0 0 1 - 0 -1 1 0 -1 1 0 ]; - - tol = 0; - - [ac, ec, bc, cc, q, z, ncont] = __sl_tg01hd__ (a, e, b, c, tol); - - ncont_e = 3; - - ac_e = [ 0.0000 0.0000 0.0000 0.0000 -1.2627 0.4334 0.4666 - 0.0000 2.0000 0.0000 -3.7417 -0.8520 0.2924 -0.4342 - 0.0000 0.0000 1.7862 0.3780 -0.2651 -0.7723 0.0000 - 0.0000 0.0000 0.0000 3.7417 0.8520 -0.2924 0.4342 - 0.0000 0.0000 0.0000 0.0000 -1.5540 0.5334 0.5742 - 0.0000 0.0000 0.0000 0.0000 -0.6533 0.2242 0.2414 - 0.0000 0.0000 0.0000 0.0000 -0.5892 0.2022 0.2177 ]; - - ec_e = [ -1.8325 1.0000 2.3752 0.0000 -0.8214 0.2819 1.8016 - 0.4887 0.0000 0.3770 -0.5345 0.1874 0.5461 0.0000 - -0.1728 0.0000 -0.1333 -1.1339 0.1325 0.3861 0.0000 - 0.0000 0.0000 0.0000 0.0000 0.8520 -0.2924 0.4342 - 0.0000 0.0000 0.0000 0.0000 -1.0260 -0.1496 0.0000 - 0.0000 0.0000 0.0000 0.0000 0.0000 1.1937 0.0000 - 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 1.0000 ]; - - bc_e = [ 1.0000 2.0000 3.0000 - 2.0000 1.0000 0.0000 - 0.0000 0.0000 0.0000 - 0.0000 0.0000 0.0000 - 0.0000 0.0000 0.0000 - 0.0000 0.0000 0.0000 - 0.0000 0.0000 0.0000 ]; - - cc_e = [ 0.0000 1.0000 0.0000 0.0000 -1.2627 0.4334 0.4666 - 0.3665 0.0000 -0.9803 -1.6036 0.1874 0.5461 0.0000 ]; - - q_e = [ 0.0000 1.0000 0.0000 0.0000 0.0000 0.0000 0.0000 - 0.0000 0.0000 0.7071 0.0000 0.2740 -0.6519 0.0000 - 0.0000 0.0000 0.0000 0.0000 0.8304 0.3491 -0.4342 - 0.0000 0.0000 0.0000 -1.0000 0.0000 0.0000 0.0000 - 0.0000 0.0000 0.0000 0.0000 0.4003 0.1683 0.9008 - 0.0000 0.0000 0.7071 0.0000 -0.2740 0.6519 0.0000 - 1.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 ]; - - z_e = [ 0.0000 1.0000 0.0000 0.0000 0.0000 0.0000 0.0000 - -0.6108 0.0000 0.7917 0.0000 0.0000 0.0000 0.0000 - 0.4887 0.0000 0.3770 -0.5345 0.1874 0.5461 0.0000 - 0.0000 0.0000 0.0000 0.0000 -0.4107 0.1410 0.9008 - 0.6108 0.0000 0.4713 0.2673 -0.1874 -0.5461 0.0000 - -0.1222 0.0000 -0.0943 -0.8018 -0.1874 -0.5461 0.0000 - 0.0000 0.0000 0.0000 0.0000 -0.8520 0.2924 -0.4342 ]; - -***** assert <45008> (ac, ac_e, 1e-4); -!!!!! known bug: https://octave.org/testfailure/?45008 -ASSERT errors for: assert (ac,ac_e,1e-4) - - Location | Observed | Expected | Reason - (3,3) -1.7862 1.7862 Abs err 3.5724 exceeds tol 0.0001 by 4 - (1,5) 1.4113 -1.2627 Abs err 2.674 exceeds tol 0.0001 by 3 - (2,5) 0.706 -0.852 Abs err 1.558 exceeds tol 0.0001 by 2 - (3,5) -0.052188 -0.2651 Abs err 0.21291 exceeds tol 0.0001 by 0.2 - (4,5) -0.706 0.852 Abs err 1.558 exceeds tol 0.0001 by 2 - (5,5) -1.9898 -1.554 Abs err 0.4358 exceeds tol 0.0001 by 0.4 - (6,5) 0.011224 -0.6533 Abs err 0.66452 exceeds tol 0.0001 by 0.7 - (7,5) 0.15568 -0.5892 Abs err 0.74488 exceeds tol 0.0001 by 0.7 - (1,6) -0.0050932 0.4334 Abs err 0.43849 exceeds tol 0.0001 by 0.4 - (2,6) -0.70821 0.2924 Abs err 1.0006 exceeds tol 0.0001 by 1 - (3,6) -0.052025 -0.7723 Abs err 0.72028 exceeds tol 0.0001 by 0.7 - (4,6) 0.70821 -0.2924 Abs err 1.0006 exceeds tol 0.0001 by 1 - (5,6) 0.0071807 0.5334 Abs err 0.52622 exceeds tol 0.0001 by 0.5 - (6,6) -4.0506e-05 0.2242 Abs err 0.22424 exceeds tol 0.0001 by 0.2 - (7,6) -0.00056182 0.2022 Abs err 0.20276 exceeds tol 0.0001 by 0.2 - (1,7) 0.090251 0.4666 Abs err 0.37635 exceeds tol 0.0001 by 0.4 - (2,7) -3.8858e-16 -0.4342 Abs err 0.4342 exceeds tol 0.0001 by 0.4 - (3,7) 0.81316 0 Abs err 0.81316 exceeds tol 0.0001 by 0.8 - (4,7) 1.1725e-15 0.4342 Abs err 0.4342 exceeds tol 0.0001 by 0.4 - (5,7) -0.12724 0.5742 Abs err 0.70144 exceeds tol 0.0001 by 0.7 - (6,7) 0.00071777 0.2414 Abs err 0.24068 exceeds tol 0.0001 by 0.2 - (7,7) 0.0099555 0.2177 Abs err 0.20774 exceeds tol 0.0001 by 0.2 -shared variables - ac = - - -0.0000 0.0000 0.0000 0.0000 1.4113 -0.0051 0.0903 - 0 2.0000 -0.0000 -3.7417 0.7060 -0.7082 -0.0000 - 0 0 -1.7862 0.3780 -0.0522 -0.0520 0.8132 - 0 0 0 3.7417 -0.7060 0.7082 0.0000 - 0 0 0 -0.0000 -1.9898 0.0072 -0.1272 - 0 0 0 0 0.0112 -0.0000 0.0007 - 0 0 0 0 0.1557 -0.0006 0.0100 - - ec = - - -1.8325 1.0000 -2.3752 0.0000 1.4106 1.4062 0.1805 - 0.4887 -0.0000 -0.3770 -0.5345 0.0369 0.0368 -0.5750 - -0.1728 0.0000 0.1333 -1.1339 0.0261 0.0260 -0.4066 - 0 0 -0.0000 -0.0000 -0.7060 0.7082 -0.0000 - 0 0 0 0 -1.0010 -0.0020 0.0318 - 0 0 0 0 0 -1.0010 0.0316 - 0 0 0 0 0 0 1.2223 - - bc = - - 1 2 3 - 2 1 0 - 0 0 0 - 0 0 0 - 0 0 0 - 0 0 0 - 0 0 0 - - cc = - - Columns 1 through 5: - - -3.5153e-18 1.0000e+00 9.6723e-17 1.8014e-16 1.4113e+00 - 3.6651e-01 -4.4660e-17 9.8026e-01 -1.6036e+00 3.6902e-02 - - Columns 6 and 7: - - -5.0932e-03 9.0251e-02 - 3.6787e-02 -5.7499e-01 - - q = - - 0 1.0000 -0.0000 0.0000 -0.0000 0.0000 -0.0000 - 0 -0.0000 0.7071 0.0000 0.0553 0.0550 0.7028 - 0 -0.0000 -0.0000 0.0000 -0.7053 0.7089 -0.0000 - 0 0.0000 0.0000 -1.0000 -0.0000 0.0000 0.0000 - 0 0 -0.0000 0.0000 -0.7046 -0.7010 0.1103 - 0 -0.0000 0.7071 0.0000 -0.0553 -0.0550 -0.7028 - 1.0000 0 0 0 0 0 0 - - z = - - 0.0000 1.0000 0 0 0 0 0 - -0.6108 0.0000 -0.7917 0.0000 0 0 0 - 0.4887 -0.0000 -0.3770 -0.5345 0.0369 0.0368 -0.5750 - 0.0000 -0.0000 -0.0000 -0.0000 0.7053 0.7031 0.0903 - 0.6108 -0.0000 -0.4713 0.2673 -0.0369 -0.0368 0.5750 - -0.1222 0.0000 0.0943 -0.8018 -0.0369 -0.0368 0.5750 - -0.0000 0.0000 0.0000 0.0000 0.7060 -0.7082 -0.0000 - - ncont = 3 - ac_e = - - 0 0 0 0 -1.2627 0.4334 0.4666 - 0 2.0000 0 -3.7417 -0.8520 0.2924 -0.4342 - 0 0 1.7862 0.3780 -0.2651 -0.7723 0 - 0 0 0 3.7417 0.8520 -0.2924 0.4342 - 0 0 0 0 -1.5540 0.5334 0.5742 - 0 0 0 0 -0.6533 0.2242 0.2414 - 0 0 0 0 -0.5892 0.2022 0.2177 - - ec_e = - - -1.8325 1.0000 2.3752 0 -0.8214 0.2819 1.8016 - 0.4887 0 0.3770 -0.5345 0.1874 0.5461 0 - -0.1728 0 -0.1333 -1.1339 0.1325 0.3861 0 - 0 0 0 0 0.8520 -0.2924 0.4342 - 0 0 0 0 -1.0260 -0.1496 0 - 0 0 0 0 0 1.1937 0 - 0 0 0 0 0 0 1.0000 - - bc_e = - - 1 2 3 - 2 1 0 - 0 0 0 - 0 0 0 - 0 0 0 - 0 0 0 - 0 0 0 - - cc_e = - - 0 1.0000 0 0 -1.2627 0.4334 0.4666 - 0.3665 0 -0.9803 -1.6036 0.1874 0.5461 0 - - q_e = - - 0 1.0000 0 0 0 0 0 - 0 0 0.7071 0 0.2740 -0.6519 0 - 0 0 0 0 0.8304 0.3491 -0.4342 - 0 0 0 -1.0000 0 0 0 - 0 0 0 0 0.4003 0.1683 0.9008 - 0 0 0.7071 0 -0.2740 0.6519 0 - 1.0000 0 0 0 0 0 0 - - z_e = - - 0 1.0000 0 0 0 0 0 - -0.6108 0 0.7917 0 0 0 0 - 0.4887 0 0.3770 -0.5345 0.1874 0.5461 0 - 0 0 0 0 -0.4107 0.1410 0.9008 - 0.6108 0 0.4713 0.2673 -0.1874 -0.5461 0 - -0.1222 0 -0.0943 -0.8018 -0.1874 -0.5461 0 - 0 0 0 0 -0.8520 0.2924 -0.4342 - - ncont_e = 3 -***** assert <45008> (ec, ec_e, 1e-4); -!!!!! known bug: https://octave.org/testfailure/?45008 -ASSERT errors for: assert (ec,ec_e,1e-4) - - Location | Observed | Expected | Reason - (1,3) -2.3752 2.3752 Abs err 4.7504 exceeds tol 0.0001 by 5 - (2,3) -0.37702 0.377 Abs err 0.75402 exceeds tol 0.0001 by 0.8 - (3,3) 0.1333 -0.1333 Abs err 0.2666 exceeds tol 0.0001 by 0.3 - (1,5) 1.4106 -0.8214 Abs err 2.232 exceeds tol 0.0001 by 2 - (2,5) 0.036902 0.1874 Abs err 0.1505 exceeds tol 0.0001 by 0.2 - (3,5) 0.026094 0.1325 Abs err 0.10641 exceeds tol 0.0001 by 0.1 - (4,5) -0.706 0.852 Abs err 1.558 exceeds tol 0.0001 by 2 - (5,5) -1.001 -1.026 Abs err 0.024979 exceeds tol 0.0001 by 0.02 - (1,6) 1.4062 0.2819 Abs err 1.1243 exceeds tol 0.0001 by 1 - (2,6) 0.036787 0.5461 Abs err 0.50931 exceeds tol 0.0001 by 0.5 - (3,6) 0.026012 0.3861 Abs err 0.36009 exceeds tol 0.0001 by 0.4 - (4,6) 0.70821 -0.2924 Abs err 1.0006 exceeds tol 0.0001 by 1 - (5,6) -0.0020342 -0.1496 Abs err 0.14757 exceeds tol 0.0001 by 0.1 - (6,6) -1.001 1.1937 Abs err 2.1947 exceeds tol 0.0001 by 2 - (1,7) 0.1805 1.8016 Abs err 1.6211 exceeds tol 0.0001 by 2 - (2,7) -0.57499 0 Abs err 0.57499 exceeds tol 0.0001 by 0.6 - (3,7) -0.40658 0 Abs err 0.40658 exceeds tol 0.0001 by 0.4 - (4,7) -3.3646e-16 0.4342 Abs err 0.4342 exceeds tol 0.0001 by 0.4 - (5,7) 0.031795 0 Abs err 0.031795 exceeds tol 0.0001 by 0.03 - (6,7) 0.031632 0 Abs err 0.031632 exceeds tol 0.0001 by 0.03 - (7,7) 1.2223 1 Abs err 0.22226 exceeds tol 0.0001 by 0.2 -shared variables - ac = - - -0.0000 0.0000 0.0000 0.0000 1.4113 -0.0051 0.0903 - 0 2.0000 -0.0000 -3.7417 0.7060 -0.7082 -0.0000 - 0 0 -1.7862 0.3780 -0.0522 -0.0520 0.8132 - 0 0 0 3.7417 -0.7060 0.7082 0.0000 - 0 0 0 -0.0000 -1.9898 0.0072 -0.1272 - 0 0 0 0 0.0112 -0.0000 0.0007 - 0 0 0 0 0.1557 -0.0006 0.0100 - - ec = - - -1.8325 1.0000 -2.3752 0.0000 1.4106 1.4062 0.1805 - 0.4887 -0.0000 -0.3770 -0.5345 0.0369 0.0368 -0.5750 - -0.1728 0.0000 0.1333 -1.1339 0.0261 0.0260 -0.4066 - 0 0 -0.0000 -0.0000 -0.7060 0.7082 -0.0000 - 0 0 0 0 -1.0010 -0.0020 0.0318 - 0 0 0 0 0 -1.0010 0.0316 - 0 0 0 0 0 0 1.2223 - - bc = - - 1 2 3 - 2 1 0 - 0 0 0 - 0 0 0 - 0 0 0 - 0 0 0 - 0 0 0 - - cc = - - Columns 1 through 5: - - -3.5153e-18 1.0000e+00 9.6723e-17 1.8014e-16 1.4113e+00 - 3.6651e-01 -4.4660e-17 9.8026e-01 -1.6036e+00 3.6902e-02 - - Columns 6 and 7: - - -5.0932e-03 9.0251e-02 - 3.6787e-02 -5.7499e-01 - - q = - - 0 1.0000 -0.0000 0.0000 -0.0000 0.0000 -0.0000 - 0 -0.0000 0.7071 0.0000 0.0553 0.0550 0.7028 - 0 -0.0000 -0.0000 0.0000 -0.7053 0.7089 -0.0000 - 0 0.0000 0.0000 -1.0000 -0.0000 0.0000 0.0000 - 0 0 -0.0000 0.0000 -0.7046 -0.7010 0.1103 - 0 -0.0000 0.7071 0.0000 -0.0553 -0.0550 -0.7028 - 1.0000 0 0 0 0 0 0 - - z = - - 0.0000 1.0000 0 0 0 0 0 - -0.6108 0.0000 -0.7917 0.0000 0 0 0 - 0.4887 -0.0000 -0.3770 -0.5345 0.0369 0.0368 -0.5750 - 0.0000 -0.0000 -0.0000 -0.0000 0.7053 0.7031 0.0903 - 0.6108 -0.0000 -0.4713 0.2673 -0.0369 -0.0368 0.5750 - -0.1222 0.0000 0.0943 -0.8018 -0.0369 -0.0368 0.5750 - -0.0000 0.0000 0.0000 0.0000 0.7060 -0.7082 -0.0000 - - ncont = 3 - ac_e = - - 0 0 0 0 -1.2627 0.4334 0.4666 - 0 2.0000 0 -3.7417 -0.8520 0.2924 -0.4342 - 0 0 1.7862 0.3780 -0.2651 -0.7723 0 - 0 0 0 3.7417 0.8520 -0.2924 0.4342 - 0 0 0 0 -1.5540 0.5334 0.5742 - 0 0 0 0 -0.6533 0.2242 0.2414 - 0 0 0 0 -0.5892 0.2022 0.2177 - - ec_e = - - -1.8325 1.0000 2.3752 0 -0.8214 0.2819 1.8016 - 0.4887 0 0.3770 -0.5345 0.1874 0.5461 0 - -0.1728 0 -0.1333 -1.1339 0.1325 0.3861 0 - 0 0 0 0 0.8520 -0.2924 0.4342 - 0 0 0 0 -1.0260 -0.1496 0 - 0 0 0 0 0 1.1937 0 - 0 0 0 0 0 0 1.0000 - - bc_e = - - 1 2 3 - 2 1 0 - 0 0 0 - 0 0 0 - 0 0 0 - 0 0 0 - 0 0 0 - - cc_e = - - 0 1.0000 0 0 -1.2627 0.4334 0.4666 - 0.3665 0 -0.9803 -1.6036 0.1874 0.5461 0 - - q_e = - - 0 1.0000 0 0 0 0 0 - 0 0 0.7071 0 0.2740 -0.6519 0 - 0 0 0 0 0.8304 0.3491 -0.4342 - 0 0 0 -1.0000 0 0 0 - 0 0 0 0 0.4003 0.1683 0.9008 - 0 0 0.7071 0 -0.2740 0.6519 0 - 1.0000 0 0 0 0 0 0 - - z_e = - - 0 1.0000 0 0 0 0 0 - -0.6108 0 0.7917 0 0 0 0 - 0.4887 0 0.3770 -0.5345 0.1874 0.5461 0 - 0 0 0 0 -0.4107 0.1410 0.9008 - 0.6108 0 0.4713 0.2673 -0.1874 -0.5461 0 - -0.1222 0 -0.0943 -0.8018 -0.1874 -0.5461 0 - 0 0 0 0 -0.8520 0.2924 -0.4342 - - ncont_e = 3 -***** assert <45008> (bc, bc_e, 1e-4); -***** assert <45008> (cc, cc_e, 1e-4); -!!!!! known bug: https://octave.org/testfailure/?45008 -ASSERT errors for: assert (cc,cc_e,1e-4) - - Location | Observed | Expected | Reason - (2,3) 0.98026 -0.9803 Abs err 1.9606 exceeds tol 0.0001 by 2 - (1,5) 1.4113 -1.2627 Abs err 2.674 exceeds tol 0.0001 by 3 - (2,5) 0.036902 0.1874 Abs err 0.1505 exceeds tol 0.0001 by 0.2 - (1,6) -0.0050932 0.4334 Abs err 0.43849 exceeds tol 0.0001 by 0.4 - (2,6) 0.036787 0.5461 Abs err 0.50931 exceeds tol 0.0001 by 0.5 - (1,7) 0.090251 0.4666 Abs err 0.37635 exceeds tol 0.0001 by 0.4 - (2,7) -0.57499 0 Abs err 0.57499 exceeds tol 0.0001 by 0.6 -shared variables - ac = - - -0.0000 0.0000 0.0000 0.0000 1.4113 -0.0051 0.0903 - 0 2.0000 -0.0000 -3.7417 0.7060 -0.7082 -0.0000 - 0 0 -1.7862 0.3780 -0.0522 -0.0520 0.8132 - 0 0 0 3.7417 -0.7060 0.7082 0.0000 - 0 0 0 -0.0000 -1.9898 0.0072 -0.1272 - 0 0 0 0 0.0112 -0.0000 0.0007 - 0 0 0 0 0.1557 -0.0006 0.0100 - - ec = - - -1.8325 1.0000 -2.3752 0.0000 1.4106 1.4062 0.1805 - 0.4887 -0.0000 -0.3770 -0.5345 0.0369 0.0368 -0.5750 - -0.1728 0.0000 0.1333 -1.1339 0.0261 0.0260 -0.4066 - 0 0 -0.0000 -0.0000 -0.7060 0.7082 -0.0000 - 0 0 0 0 -1.0010 -0.0020 0.0318 - 0 0 0 0 0 -1.0010 0.0316 - 0 0 0 0 0 0 1.2223 - - bc = - - 1 2 3 - 2 1 0 - 0 0 0 - 0 0 0 - 0 0 0 - 0 0 0 - 0 0 0 - - cc = - - Columns 1 through 5: - - -3.5153e-18 1.0000e+00 9.6723e-17 1.8014e-16 1.4113e+00 - 3.6651e-01 -4.4660e-17 9.8026e-01 -1.6036e+00 3.6902e-02 - - Columns 6 and 7: - - -5.0932e-03 9.0251e-02 - 3.6787e-02 -5.7499e-01 - - q = - - 0 1.0000 -0.0000 0.0000 -0.0000 0.0000 -0.0000 - 0 -0.0000 0.7071 0.0000 0.0553 0.0550 0.7028 - 0 -0.0000 -0.0000 0.0000 -0.7053 0.7089 -0.0000 - 0 0.0000 0.0000 -1.0000 -0.0000 0.0000 0.0000 - 0 0 -0.0000 0.0000 -0.7046 -0.7010 0.1103 - 0 -0.0000 0.7071 0.0000 -0.0553 -0.0550 -0.7028 - 1.0000 0 0 0 0 0 0 - - z = - - 0.0000 1.0000 0 0 0 0 0 - -0.6108 0.0000 -0.7917 0.0000 0 0 0 - 0.4887 -0.0000 -0.3770 -0.5345 0.0369 0.0368 -0.5750 - 0.0000 -0.0000 -0.0000 -0.0000 0.7053 0.7031 0.0903 - 0.6108 -0.0000 -0.4713 0.2673 -0.0369 -0.0368 0.5750 - -0.1222 0.0000 0.0943 -0.8018 -0.0369 -0.0368 0.5750 - -0.0000 0.0000 0.0000 0.0000 0.7060 -0.7082 -0.0000 - - ncont = 3 - ac_e = - - 0 0 0 0 -1.2627 0.4334 0.4666 - 0 2.0000 0 -3.7417 -0.8520 0.2924 -0.4342 - 0 0 1.7862 0.3780 -0.2651 -0.7723 0 - 0 0 0 3.7417 0.8520 -0.2924 0.4342 - 0 0 0 0 -1.5540 0.5334 0.5742 - 0 0 0 0 -0.6533 0.2242 0.2414 - 0 0 0 0 -0.5892 0.2022 0.2177 - - ec_e = - - -1.8325 1.0000 2.3752 0 -0.8214 0.2819 1.8016 - 0.4887 0 0.3770 -0.5345 0.1874 0.5461 0 - -0.1728 0 -0.1333 -1.1339 0.1325 0.3861 0 - 0 0 0 0 0.8520 -0.2924 0.4342 - 0 0 0 0 -1.0260 -0.1496 0 - 0 0 0 0 0 1.1937 0 - 0 0 0 0 0 0 1.0000 - - bc_e = - - 1 2 3 - 2 1 0 - 0 0 0 - 0 0 0 - 0 0 0 - 0 0 0 - 0 0 0 - - cc_e = - - 0 1.0000 0 0 -1.2627 0.4334 0.4666 - 0.3665 0 -0.9803 -1.6036 0.1874 0.5461 0 - - q_e = - - 0 1.0000 0 0 0 0 0 - 0 0 0.7071 0 0.2740 -0.6519 0 - 0 0 0 0 0.8304 0.3491 -0.4342 - 0 0 0 -1.0000 0 0 0 - 0 0 0 0 0.4003 0.1683 0.9008 - 0 0 0.7071 0 -0.2740 0.6519 0 - 1.0000 0 0 0 0 0 0 - - z_e = - - 0 1.0000 0 0 0 0 0 - -0.6108 0 0.7917 0 0 0 0 - 0.4887 0 0.3770 -0.5345 0.1874 0.5461 0 - 0 0 0 0 -0.4107 0.1410 0.9008 - 0.6108 0 0.4713 0.2673 -0.1874 -0.5461 0 - -0.1222 0 -0.0943 -0.8018 -0.1874 -0.5461 0 - 0 0 0 0 -0.8520 0.2924 -0.4342 - - ncont_e = 3 -***** assert <45008> (q, q_e, 1e-4); -!!!!! known bug: https://octave.org/testfailure/?45008 -ASSERT errors for: assert (q,q_e,1e-4) - - Location | Observed | Expected | Reason - (2,5) 0.055297 0.274 Abs err 0.2187 exceeds tol 0.0001 by 0.2 - (3,5) -0.70528 0.8304 Abs err 1.5357 exceeds tol 0.0001 by 2 - (5,5) -0.7046 0.4003 Abs err 1.1049 exceeds tol 0.0001 by 1 - (6,5) -0.055297 -0.274 Abs err 0.2187 exceeds tol 0.0001 by 0.2 - (2,6) 0.055012 -0.6519 Abs err 0.70691 exceeds tol 0.0001 by 0.7 - (3,6) 0.70893 0.3491 Abs err 0.35983 exceeds tol 0.0001 by 0.4 - (5,6) -0.70098 0.1683 Abs err 0.86928 exceeds tol 0.0001 by 0.9 - (6,6) -0.055012 0.6519 Abs err 0.70691 exceeds tol 0.0001 by 0.7 - (2,7) 0.70279 0 Abs err 0.70279 exceeds tol 0.0001 by 0.7 - (3,7) -1.9854e-16 -0.4342 Abs err 0.4342 exceeds tol 0.0001 by 0.4 - (5,7) 0.11031 0.9008 Abs err 0.79049 exceeds tol 0.0001 by 0.8 - (6,7) -0.70279 0 Abs err 0.70279 exceeds tol 0.0001 by 0.7 -shared variables - ac = - - -0.0000 0.0000 0.0000 0.0000 1.4113 -0.0051 0.0903 - 0 2.0000 -0.0000 -3.7417 0.7060 -0.7082 -0.0000 - 0 0 -1.7862 0.3780 -0.0522 -0.0520 0.8132 - 0 0 0 3.7417 -0.7060 0.7082 0.0000 - 0 0 0 -0.0000 -1.9898 0.0072 -0.1272 - 0 0 0 0 0.0112 -0.0000 0.0007 - 0 0 0 0 0.1557 -0.0006 0.0100 - - ec = - - -1.8325 1.0000 -2.3752 0.0000 1.4106 1.4062 0.1805 - 0.4887 -0.0000 -0.3770 -0.5345 0.0369 0.0368 -0.5750 - -0.1728 0.0000 0.1333 -1.1339 0.0261 0.0260 -0.4066 - 0 0 -0.0000 -0.0000 -0.7060 0.7082 -0.0000 - 0 0 0 0 -1.0010 -0.0020 0.0318 - 0 0 0 0 0 -1.0010 0.0316 - 0 0 0 0 0 0 1.2223 - - bc = - - 1 2 3 - 2 1 0 - 0 0 0 - 0 0 0 - 0 0 0 - 0 0 0 - 0 0 0 - - cc = - - Columns 1 through 5: - - -3.5153e-18 1.0000e+00 9.6723e-17 1.8014e-16 1.4113e+00 - 3.6651e-01 -4.4660e-17 9.8026e-01 -1.6036e+00 3.6902e-02 - - Columns 6 and 7: - - -5.0932e-03 9.0251e-02 - 3.6787e-02 -5.7499e-01 - - q = - - 0 1.0000 -0.0000 0.0000 -0.0000 0.0000 -0.0000 - 0 -0.0000 0.7071 0.0000 0.0553 0.0550 0.7028 - 0 -0.0000 -0.0000 0.0000 -0.7053 0.7089 -0.0000 - 0 0.0000 0.0000 -1.0000 -0.0000 0.0000 0.0000 - 0 0 -0.0000 0.0000 -0.7046 -0.7010 0.1103 - 0 -0.0000 0.7071 0.0000 -0.0553 -0.0550 -0.7028 - 1.0000 0 0 0 0 0 0 - - z = - - 0.0000 1.0000 0 0 0 0 0 - -0.6108 0.0000 -0.7917 0.0000 0 0 0 - 0.4887 -0.0000 -0.3770 -0.5345 0.0369 0.0368 -0.5750 - 0.0000 -0.0000 -0.0000 -0.0000 0.7053 0.7031 0.0903 - 0.6108 -0.0000 -0.4713 0.2673 -0.0369 -0.0368 0.5750 - -0.1222 0.0000 0.0943 -0.8018 -0.0369 -0.0368 0.5750 - -0.0000 0.0000 0.0000 0.0000 0.7060 -0.7082 -0.0000 - - ncont = 3 - ac_e = - - 0 0 0 0 -1.2627 0.4334 0.4666 - 0 2.0000 0 -3.7417 -0.8520 0.2924 -0.4342 - 0 0 1.7862 0.3780 -0.2651 -0.7723 0 - 0 0 0 3.7417 0.8520 -0.2924 0.4342 - 0 0 0 0 -1.5540 0.5334 0.5742 - 0 0 0 0 -0.6533 0.2242 0.2414 - 0 0 0 0 -0.5892 0.2022 0.2177 - - ec_e = - - -1.8325 1.0000 2.3752 0 -0.8214 0.2819 1.8016 - 0.4887 0 0.3770 -0.5345 0.1874 0.5461 0 - -0.1728 0 -0.1333 -1.1339 0.1325 0.3861 0 - 0 0 0 0 0.8520 -0.2924 0.4342 - 0 0 0 0 -1.0260 -0.1496 0 - 0 0 0 0 0 1.1937 0 - 0 0 0 0 0 0 1.0000 - - bc_e = - - 1 2 3 - 2 1 0 - 0 0 0 - 0 0 0 - 0 0 0 - 0 0 0 - 0 0 0 - - cc_e = - - 0 1.0000 0 0 -1.2627 0.4334 0.4666 - 0.3665 0 -0.9803 -1.6036 0.1874 0.5461 0 - - q_e = - - 0 1.0000 0 0 0 0 0 - 0 0 0.7071 0 0.2740 -0.6519 0 - 0 0 0 0 0.8304 0.3491 -0.4342 - 0 0 0 -1.0000 0 0 0 - 0 0 0 0 0.4003 0.1683 0.9008 - 0 0 0.7071 0 -0.2740 0.6519 0 - 1.0000 0 0 0 0 0 0 - - z_e = - - 0 1.0000 0 0 0 0 0 - -0.6108 0 0.7917 0 0 0 0 - 0.4887 0 0.3770 -0.5345 0.1874 0.5461 0 - 0 0 0 0 -0.4107 0.1410 0.9008 - 0.6108 0 0.4713 0.2673 -0.1874 -0.5461 0 - -0.1222 0 -0.0943 -0.8018 -0.1874 -0.5461 0 - 0 0 0 0 -0.8520 0.2924 -0.4342 - - ncont_e = 3 -***** assert <45008> (z, z_e, 1e-4); -!!!!! known bug: https://octave.org/testfailure/?45008 -ASSERT errors for: assert (z,z_e,1e-4) - - Location | Observed | Expected | Reason - (2,3) -0.79175 0.7917 Abs err 1.5834 exceeds tol 0.0001 by 2 - (3,3) -0.37702 0.377 Abs err 0.75402 exceeds tol 0.0001 by 0.8 - (5,3) -0.47128 0.4713 Abs err 0.94258 exceeds tol 0.0001 by 0.9 - (6,3) 0.094256 -0.0943 Abs err 0.18856 exceeds tol 0.0001 by 0.2 - (3,5) 0.036902 0.1874 Abs err 0.1505 exceeds tol 0.0001 by 0.2 - (4,5) 0.70532 -0.4107 Abs err 1.116 exceeds tol 0.0001 by 1 - (5,5) -0.036902 -0.1874 Abs err 0.1505 exceeds tol 0.0001 by 0.2 - (6,5) -0.036902 -0.1874 Abs err 0.1505 exceeds tol 0.0001 by 0.2 - (7,5) 0.706 -0.852 Abs err 1.558 exceeds tol 0.0001 by 2 - (3,6) 0.036787 0.5461 Abs err 0.50931 exceeds tol 0.0001 by 0.5 - (4,6) 0.70312 0.141 Abs err 0.56212 exceeds tol 0.0001 by 0.6 - (5,6) -0.036787 -0.5461 Abs err 0.50931 exceeds tol 0.0001 by 0.5 - (6,6) -0.036787 -0.5461 Abs err 0.50931 exceeds tol 0.0001 by 0.5 - (7,6) -0.70821 0.2924 Abs err 1.0006 exceeds tol 0.0001 by 1 - (3,7) -0.57499 0 Abs err 0.57499 exceeds tol 0.0001 by 0.6 - (4,7) 0.090251 0.9008 Abs err 0.81055 exceeds tol 0.0001 by 0.8 - (5,7) 0.57499 0 Abs err 0.57499 exceeds tol 0.0001 by 0.6 - (6,7) 0.57499 0 Abs err 0.57499 exceeds tol 0.0001 by 0.6 - (7,7) -1.8005e-16 -0.4342 Abs err 0.4342 exceeds tol 0.0001 by 0.4 -shared variables - ac = - - -0.0000 0.0000 0.0000 0.0000 1.4113 -0.0051 0.0903 - 0 2.0000 -0.0000 -3.7417 0.7060 -0.7082 -0.0000 - 0 0 -1.7862 0.3780 -0.0522 -0.0520 0.8132 - 0 0 0 3.7417 -0.7060 0.7082 0.0000 - 0 0 0 -0.0000 -1.9898 0.0072 -0.1272 - 0 0 0 0 0.0112 -0.0000 0.0007 - 0 0 0 0 0.1557 -0.0006 0.0100 - - ec = - - -1.8325 1.0000 -2.3752 0.0000 1.4106 1.4062 0.1805 - 0.4887 -0.0000 -0.3770 -0.5345 0.0369 0.0368 -0.5750 - -0.1728 0.0000 0.1333 -1.1339 0.0261 0.0260 -0.4066 - 0 0 -0.0000 -0.0000 -0.7060 0.7082 -0.0000 - 0 0 0 0 -1.0010 -0.0020 0.0318 - 0 0 0 0 0 -1.0010 0.0316 - 0 0 0 0 0 0 1.2223 - - bc = - - 1 2 3 - 2 1 0 - 0 0 0 - 0 0 0 - 0 0 0 - 0 0 0 - 0 0 0 - - cc = - - Columns 1 through 5: - - -3.5153e-18 1.0000e+00 9.6723e-17 1.8014e-16 1.4113e+00 - 3.6651e-01 -4.4660e-17 9.8026e-01 -1.6036e+00 3.6902e-02 - - Columns 6 and 7: - - -5.0932e-03 9.0251e-02 - 3.6787e-02 -5.7499e-01 - - q = - - 0 1.0000 -0.0000 0.0000 -0.0000 0.0000 -0.0000 - 0 -0.0000 0.7071 0.0000 0.0553 0.0550 0.7028 - 0 -0.0000 -0.0000 0.0000 -0.7053 0.7089 -0.0000 - 0 0.0000 0.0000 -1.0000 -0.0000 0.0000 0.0000 - 0 0 -0.0000 0.0000 -0.7046 -0.7010 0.1103 - 0 -0.0000 0.7071 0.0000 -0.0553 -0.0550 -0.7028 - 1.0000 0 0 0 0 0 0 - - z = - - 0.0000 1.0000 0 0 0 0 0 - -0.6108 0.0000 -0.7917 0.0000 0 0 0 - 0.4887 -0.0000 -0.3770 -0.5345 0.0369 0.0368 -0.5750 - 0.0000 -0.0000 -0.0000 -0.0000 0.7053 0.7031 0.0903 - 0.6108 -0.0000 -0.4713 0.2673 -0.0369 -0.0368 0.5750 - -0.1222 0.0000 0.0943 -0.8018 -0.0369 -0.0368 0.5750 - -0.0000 0.0000 0.0000 0.0000 0.7060 -0.7082 -0.0000 - - ncont = 3 - ac_e = - - 0 0 0 0 -1.2627 0.4334 0.4666 - 0 2.0000 0 -3.7417 -0.8520 0.2924 -0.4342 - 0 0 1.7862 0.3780 -0.2651 -0.7723 0 - 0 0 0 3.7417 0.8520 -0.2924 0.4342 - 0 0 0 0 -1.5540 0.5334 0.5742 - 0 0 0 0 -0.6533 0.2242 0.2414 - 0 0 0 0 -0.5892 0.2022 0.2177 - - ec_e = - - -1.8325 1.0000 2.3752 0 -0.8214 0.2819 1.8016 - 0.4887 0 0.3770 -0.5345 0.1874 0.5461 0 - -0.1728 0 -0.1333 -1.1339 0.1325 0.3861 0 - 0 0 0 0 0.8520 -0.2924 0.4342 - 0 0 0 0 -1.0260 -0.1496 0 - 0 0 0 0 0 1.1937 0 - 0 0 0 0 0 0 1.0000 - - bc_e = - - 1 2 3 - 2 1 0 - 0 0 0 - 0 0 0 - 0 0 0 - 0 0 0 - 0 0 0 - - cc_e = - - 0 1.0000 0 0 -1.2627 0.4334 0.4666 - 0.3665 0 -0.9803 -1.6036 0.1874 0.5461 0 - - q_e = - - 0 1.0000 0 0 0 0 0 - 0 0 0.7071 0 0.2740 -0.6519 0 - 0 0 0 0 0.8304 0.3491 -0.4342 - 0 0 0 -1.0000 0 0 0 - 0 0 0 0 0.4003 0.1683 0.9008 - 0 0 0.7071 0 -0.2740 0.6519 0 - 1.0000 0 0 0 0 0 0 - - z_e = - - 0 1.0000 0 0 0 0 0 - -0.6108 0 0.7917 0 0 0 0 - 0.4887 0 0.3770 -0.5345 0.1874 0.5461 0 - 0 0 0 0 -0.4107 0.1410 0.9008 - 0.6108 0 0.4713 0.2673 -0.1874 -0.5461 0 - -0.1222 0 -0.0943 -0.8018 -0.1874 -0.5461 0 - 0 0 0 0 -0.8520 0.2924 -0.4342 - - ncont_e = 3 -***** assert (ncont, ncont_e); -***** shared ao, eo, bo, co, q, z, nobsv, ao_e, eo_e, bo_e, co_e, q_e, z_e, nobsv_e - - a = [ 2 0 0 0 0 0 0 - 0 1 0 0 0 1 0 - 2 0 0 2 0 0 0 - 0 0 1 0 1 0 1 - -1 1 0 -1 0 1 0 - 3 0 0 3 0 0 0 - 1 0 1 1 1 0 1 ]; - - e = [ 0 0 0 0 0 0 1 - 0 0 0 0 0 0 3 - 1 0 0 0 0 1 0 - 0 0 0 0 1 0 2 - 0 0 0 0 0 -1 0 - 0 1 0 0 0 0 0 - 0 0 1 1 0 0 0 ]; - - b = [ 1 0 - 0 -1 - 0 1 - 1 0 - 0 -1 - 0 1 - 1 0 ]; - - c = [ 2 0 0 0 0 0 1 - 1 0 0 0 0 0 2 - 0 0 0 0 0 0 3 ]; - - tol = 0; - - [ao, eo, bo, co, q, z, nobsv] = __sl_tg01id__ (a, e, b, c, tol); - - nobsv_e = 3; - - ao_e = [ 0.2177 0.2414 0.5742 0.4342 0.0000 -0.4342 0.4666 - 0.2022 0.2242 0.5334 -0.2924 -0.7723 0.2924 0.4334 - -0.5892 -0.6533 -1.5540 0.8520 -0.2651 -0.8520 -1.2627 - 0.0000 0.0000 0.0000 3.7417 0.3780 -3.7417 0.0000 - 0.0000 0.0000 0.0000 0.0000 1.7862 0.0000 0.0000 - 0.0000 0.0000 0.0000 0.0000 0.0000 2.0000 0.0000 - 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 ]; - - eo_e = [ 1.0000 0.0000 0.0000 0.4342 0.0000 0.0000 1.8016 - 0.0000 1.1937 -0.1496 -0.2924 0.3861 0.5461 0.2819 - 0.0000 0.0000 -1.0260 0.8520 0.1325 0.1874 -0.8214 - 0.0000 0.0000 0.0000 0.0000 -1.1339 -0.5345 0.0000 - 0.0000 0.0000 0.0000 0.0000 -0.1333 0.3770 2.3752 - 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 1.0000 - 0.0000 0.0000 0.0000 0.0000 -0.1728 0.4887 -1.8325 ]; - - bo_e = [ 0.4666 0.0000 - 0.4334 0.5461 - -1.2627 0.1874 - 0.0000 -1.6036 - 0.0000 -0.9803 - 1.0000 0.0000 - 0.0000 0.3665 ]; - - co_e = [ 0.0000 0.0000 0.0000 0.0000 0.0000 2.0000 1.0000 - 0.0000 0.0000 0.0000 0.0000 0.0000 1.0000 2.0000 - 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 3.0000 ]; - - q_e = [ 0.0000 0.0000 0.0000 0.0000 0.0000 1.0000 0.0000 - 0.0000 0.0000 0.0000 0.0000 0.7917 0.0000 -0.6108 - 0.0000 0.5461 0.1874 -0.5345 0.3770 0.0000 0.4887 - 0.9008 0.1410 -0.4107 0.0000 0.0000 0.0000 0.0000 - 0.0000 -0.5461 -0.1874 0.2673 0.4713 0.0000 0.6108 - 0.0000 -0.5461 -0.1874 -0.8018 -0.0943 0.0000 -0.1222 - -0.4342 0.2924 -0.8520 0.0000 0.0000 0.0000 0.0000 ]; - - z_e = [ 0.0000 0.0000 0.0000 0.0000 0.0000 1.0000 0.0000 - 0.0000 -0.6519 0.2740 0.0000 0.7071 0.0000 0.0000 - -0.4342 0.3491 0.8304 0.0000 0.0000 0.0000 0.0000 - 0.0000 0.0000 0.0000 -1.0000 0.0000 0.0000 0.0000 - 0.9008 0.1683 0.4003 0.0000 0.0000 0.0000 0.0000 - 0.0000 0.6519 -0.2740 0.0000 0.7071 0.0000 0.0000 - 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 1.0000 ]; - -***** assert <45008> (ao, ao_e, 1e-4); -!!!!! known bug: https://octave.org/testfailure/?45008 -ASSERT errors for: assert (ao,ao_e,1e-4) - - Location | Observed | Expected | Reason - (1,1) 0.0099555 0.2177 Abs err 0.20774 exceeds tol 0.0001 by 0.2 - (2,1) -0.00056182 0.2022 Abs err 0.20276 exceeds tol 0.0001 by 0.2 - (3,1) 0.15568 -0.5892 Abs err 0.74488 exceeds tol 0.0001 by 0.7 - (1,2) 0.00071777 0.2414 Abs err 0.24068 exceeds tol 0.0001 by 0.2 - (2,2) -4.0506e-05 0.2242 Abs err 0.22424 exceeds tol 0.0001 by 0.2 - (3,2) 0.011224 -0.6533 Abs err 0.66452 exceeds tol 0.0001 by 0.7 - (1,3) -0.12724 0.5742 Abs err 0.70144 exceeds tol 0.0001 by 0.7 - (2,3) 0.0071807 0.5334 Abs err 0.52622 exceeds tol 0.0001 by 0.5 - (3,3) -1.9898 -1.554 Abs err 0.4358 exceeds tol 0.0001 by 0.4 - (1,4) 1.1725e-15 0.4342 Abs err 0.4342 exceeds tol 0.0001 by 0.4 - (2,4) 0.70821 -0.2924 Abs err 1.0006 exceeds tol 0.0001 by 1 - (3,4) -0.706 0.852 Abs err 1.558 exceeds tol 0.0001 by 2 - (1,5) 0.81316 0 Abs err 0.81316 exceeds tol 0.0001 by 0.8 - (2,5) -0.052025 -0.7723 Abs err 0.72028 exceeds tol 0.0001 by 0.7 - (3,5) -0.052188 -0.2651 Abs err 0.21291 exceeds tol 0.0001 by 0.2 - (5,5) -1.7862 1.7862 Abs err 3.5724 exceeds tol 0.0001 by 4 - (1,6) -3.8858e-16 -0.4342 Abs err 0.4342 exceeds tol 0.0001 by 0.4 - (2,6) -0.70821 0.2924 Abs err 1.0006 exceeds tol 0.0001 by 1 - (3,6) 0.706 -0.852 Abs err 1.558 exceeds tol 0.0001 by 2 - (1,7) 0.090251 0.4666 Abs err 0.37635 exceeds tol 0.0001 by 0.4 - (2,7) -0.0050932 0.4334 Abs err 0.43849 exceeds tol 0.0001 by 0.4 - (3,7) 1.4113 -1.2627 Abs err 2.674 exceeds tol 0.0001 by 3 -shared variables - ao = - - 0.0100 0.0007 -0.1272 0.0000 0.8132 -0.0000 0.0903 - -0.0006 -0.0000 0.0072 0.7082 -0.0520 -0.7082 -0.0051 - 0.1557 0.0112 -1.9898 -0.7060 -0.0522 0.7060 1.4113 - 0 0 -0.0000 3.7417 0.3780 -3.7417 0.0000 - 0 0 0 0 -1.7862 -0.0000 0.0000 - 0 0 0 0 0 2.0000 0.0000 - 0 0 0 0 0 0 -0.0000 - - eo = - - 1.2223 0.0316 0.0318 -0.0000 -0.4066 -0.5750 0.1805 - 0 -1.0010 -0.0020 0.7082 0.0260 0.0368 1.4062 - 0 0 -1.0010 -0.7060 0.0261 0.0369 1.4106 - 0 0 0 -0.0000 -1.1339 -0.5345 0.0000 - 0 0 0 -0.0000 0.1333 -0.3770 -2.3752 - 0 0 0 0 0.0000 -0.0000 1.0000 - 0 0 0 0 -0.1728 0.4887 -1.8325 - - bo = - - 9.0251e-02 -5.7499e-01 - -5.0932e-03 3.6787e-02 - 1.4113e+00 3.6902e-02 - 1.8014e-16 -1.6036e+00 - 9.6723e-17 9.8026e-01 - 1.0000e+00 -4.4660e-17 - -3.5153e-18 3.6651e-01 - - co = - - 0 0 0 0 0 2 1 - 0 0 0 0 0 1 2 - 0 0 0 0 0 0 3 - - q = - - 0 0 0 0 0 1.0000 0.0000 - 0 0 0 0.0000 -0.7917 0.0000 -0.6108 - -0.5750 0.0368 0.0369 -0.5345 -0.3770 -0.0000 0.4887 - 0.0903 0.7031 0.7053 -0.0000 -0.0000 -0.0000 0.0000 - 0.5750 -0.0368 -0.0369 0.2673 -0.4713 -0.0000 0.6108 - 0.5750 -0.0368 -0.0369 -0.8018 0.0943 0.0000 -0.1222 - -0.0000 -0.7082 0.7060 0.0000 0.0000 0.0000 -0.0000 - - z = - - -0.0000 0.0000 -0.0000 0.0000 -0.0000 1.0000 0 - 0.7028 0.0550 0.0553 0.0000 0.7071 -0.0000 0 - -0.0000 0.7089 -0.7053 0.0000 -0.0000 -0.0000 0 - 0.0000 0.0000 -0.0000 -1.0000 0.0000 0.0000 0 - 0.1103 -0.7010 -0.7046 0.0000 -0.0000 0 0 - -0.7028 -0.0550 -0.0553 0.0000 0.7071 -0.0000 0 - 0 0 0 0 0 0 1.0000 - - nobsv = 3 - ao_e = - - 0.2177 0.2414 0.5742 0.4342 0 -0.4342 0.4666 - 0.2022 0.2242 0.5334 -0.2924 -0.7723 0.2924 0.4334 - -0.5892 -0.6533 -1.5540 0.8520 -0.2651 -0.8520 -1.2627 - 0 0 0 3.7417 0.3780 -3.7417 0 - 0 0 0 0 1.7862 0 0 - 0 0 0 0 0 2.0000 0 - 0 0 0 0 0 0 0 - - eo_e = - - 1.0000 0 0 0.4342 0 0 1.8016 - 0 1.1937 -0.1496 -0.2924 0.3861 0.5461 0.2819 - 0 0 -1.0260 0.8520 0.1325 0.1874 -0.8214 - 0 0 0 0 -1.1339 -0.5345 0 - 0 0 0 0 -0.1333 0.3770 2.3752 - 0 0 0 0 0 0 1.0000 - 0 0 0 0 -0.1728 0.4887 -1.8325 - - bo_e = - - 0.4666 0 - 0.4334 0.5461 - -1.2627 0.1874 - 0 -1.6036 - 0 -0.9803 - 1.0000 0 - 0 0.3665 - - co_e = - - 0 0 0 0 0 2 1 - 0 0 0 0 0 1 2 - 0 0 0 0 0 0 3 - - q_e = - - 0 0 0 0 0 1.0000 0 - 0 0 0 0 0.7917 0 -0.6108 - 0 0.5461 0.1874 -0.5345 0.3770 0 0.4887 - 0.9008 0.1410 -0.4107 0 0 0 0 - 0 -0.5461 -0.1874 0.2673 0.4713 0 0.6108 - 0 -0.5461 -0.1874 -0.8018 -0.0943 0 -0.1222 - -0.4342 0.2924 -0.8520 0 0 0 0 - - z_e = - - 0 0 0 0 0 1.0000 0 - 0 -0.6519 0.2740 0 0.7071 0 0 - -0.4342 0.3491 0.8304 0 0 0 0 - 0 0 0 -1.0000 0 0 0 - 0.9008 0.1683 0.4003 0 0 0 0 - 0 0.6519 -0.2740 0 0.7071 0 0 - 0 0 0 0 0 0 1.0000 - - nobsv_e = 3 -***** assert <45008> (eo, eo_e, 1e-4); -!!!!! known bug: https://octave.org/testfailure/?45008 -ASSERT errors for: assert (eo,eo_e,1e-4) - - Location | Observed | Expected | Reason - (1,1) 1.2223 1 Abs err 0.22226 exceeds tol 0.0001 by 0.2 - (1,2) 0.031632 0 Abs err 0.031632 exceeds tol 0.0001 by 0.03 - (2,2) -1.001 1.1937 Abs err 2.1947 exceeds tol 0.0001 by 2 - (1,3) 0.031795 0 Abs err 0.031795 exceeds tol 0.0001 by 0.03 - (2,3) -0.0020342 -0.1496 Abs err 0.14757 exceeds tol 0.0001 by 0.1 - (3,3) -1.001 -1.026 Abs err 0.024979 exceeds tol 0.0001 by 0.02 - (1,4) -3.3646e-16 0.4342 Abs err 0.4342 exceeds tol 0.0001 by 0.4 - (2,4) 0.70821 -0.2924 Abs err 1.0006 exceeds tol 0.0001 by 1 - (3,4) -0.706 0.852 Abs err 1.558 exceeds tol 0.0001 by 2 - (1,5) -0.40658 0 Abs err 0.40658 exceeds tol 0.0001 by 0.4 - (2,5) 0.026012 0.3861 Abs err 0.36009 exceeds tol 0.0001 by 0.4 - (3,5) 0.026094 0.1325 Abs err 0.10641 exceeds tol 0.0001 by 0.1 - (5,5) 0.1333 -0.1333 Abs err 0.2666 exceeds tol 0.0001 by 0.3 - (1,6) -0.57499 0 Abs err 0.57499 exceeds tol 0.0001 by 0.6 - (2,6) 0.036787 0.5461 Abs err 0.50931 exceeds tol 0.0001 by 0.5 - (3,6) 0.036902 0.1874 Abs err 0.1505 exceeds tol 0.0001 by 0.2 - (5,6) -0.37702 0.377 Abs err 0.75402 exceeds tol 0.0001 by 0.8 - (1,7) 0.1805 1.8016 Abs err 1.6211 exceeds tol 0.0001 by 2 - (2,7) 1.4062 0.2819 Abs err 1.1243 exceeds tol 0.0001 by 1 - (3,7) 1.4106 -0.8214 Abs err 2.232 exceeds tol 0.0001 by 2 - (5,7) -2.3752 2.3752 Abs err 4.7504 exceeds tol 0.0001 by 5 -shared variables - ao = - - 0.0100 0.0007 -0.1272 0.0000 0.8132 -0.0000 0.0903 - -0.0006 -0.0000 0.0072 0.7082 -0.0520 -0.7082 -0.0051 - 0.1557 0.0112 -1.9898 -0.7060 -0.0522 0.7060 1.4113 - 0 0 -0.0000 3.7417 0.3780 -3.7417 0.0000 - 0 0 0 0 -1.7862 -0.0000 0.0000 - 0 0 0 0 0 2.0000 0.0000 - 0 0 0 0 0 0 -0.0000 - - eo = - - 1.2223 0.0316 0.0318 -0.0000 -0.4066 -0.5750 0.1805 - 0 -1.0010 -0.0020 0.7082 0.0260 0.0368 1.4062 - 0 0 -1.0010 -0.7060 0.0261 0.0369 1.4106 - 0 0 0 -0.0000 -1.1339 -0.5345 0.0000 - 0 0 0 -0.0000 0.1333 -0.3770 -2.3752 - 0 0 0 0 0.0000 -0.0000 1.0000 - 0 0 0 0 -0.1728 0.4887 -1.8325 - - bo = +[inst/dsort.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/dsort.m +***** shared s_exp, ndx_exp, s_obs, ndx_obs + p = [-0.2410+0.5573i; + -0.2410-0.5573i; + 0.1503; + -0.0972; + -0.2590]; + s_exp = [ -0.2410+0.5573i; + -0.2410-0.5573i; + -0.2590; + 0.1503; + -0.0972]; + ndx_exp = [ 1; + 2; + 5; + 3; + 4]; + [s_obs, ndx_obs] = dsort(p); +***** assert(s_obs, s_exp, 0); +***** assert(ndx_obs, ndx_exp, 0); +2 tests, 2 passed, 0 known failure, 0 skipped +[inst/btaconred.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/btaconred.m +***** shared Mo, Me, Info, HSVCe + A = [ -1. 0. 4. + 0. 2. 0. + 0. 0. -3. ]; - 9.0251e-02 -5.7499e-01 - -5.0932e-03 3.6787e-02 - 1.4113e+00 3.6902e-02 - 1.8014e-16 -1.6036e+00 - 9.6723e-17 9.8026e-01 - 1.0000e+00 -4.4660e-17 - -3.5153e-18 3.6651e-01 + B = [ 1. + 1. + 1. ]; - co = + C = [ 1. 1. 1. ]; - 0 0 0 0 0 2 1 - 0 0 0 0 0 1 2 - 0 0 0 0 0 0 3 + D = [ 0. ]; - q = + G = ss (A, B, C, D, "scaled", true); - 0 0 0 0 0 1.0000 0.0000 - 0 0 0 0.0000 -0.7917 0.0000 -0.6108 - -0.5750 0.0368 0.0369 -0.5345 -0.3770 -0.0000 0.4887 - 0.0903 0.7031 0.7053 -0.0000 -0.0000 -0.0000 0.0000 - 0.5750 -0.0368 -0.0369 0.2673 -0.4713 -0.0000 0.6108 - 0.5750 -0.0368 -0.0369 -0.8018 0.0943 0.0000 -0.1222 - -0.0000 -0.7082 0.7060 0.0000 0.0000 0.0000 -0.0000 + AC = [ -26.4000, 6.4023, 4.3868; + 32.0000, 0, 0; + 0, 8.0000, 0 ]; - z = + BC = [ -16 + 0 + 0 ]; - -0.0000 0.0000 -0.0000 0.0000 -0.0000 1.0000 0 - 0.7028 0.0550 0.0553 0.0000 0.7071 -0.0000 0 - -0.0000 0.7089 -0.7053 0.0000 -0.0000 -0.0000 0 - 0.0000 0.0000 -0.0000 -1.0000 0.0000 0.0000 0 - 0.1103 -0.7010 -0.7046 0.0000 -0.0000 0 0 - -0.7028 -0.0550 -0.0553 0.0000 0.7071 -0.0000 0 - 0 0 0 0 0 0 1.0000 + CC = [ 9.2994 1.1624 0.1090 ]; - nobsv = 3 - ao_e = + DC = [ 0 ]; - 0.2177 0.2414 0.5742 0.4342 0 -0.4342 0.4666 - 0.2022 0.2242 0.5334 -0.2924 -0.7723 0.2924 0.4334 - -0.5892 -0.6533 -1.5540 0.8520 -0.2651 -0.8520 -1.2627 - 0 0 0 3.7417 0.3780 -3.7417 0 - 0 0 0 0 1.7862 0 0 - 0 0 0 0 0 2.0000 0 - 0 0 0 0 0 0 0 + K = ss (AC, BC, CC, DC, "scaled", true); - eo_e = + [Kr, Info] = btaconred (G, K, 2, "weight", "input", "feedback", "+"); - 1.0000 0 0 0.4342 0 0 1.8016 - 0 1.1937 -0.1496 -0.2924 0.3861 0.5461 0.2819 - 0 0 -1.0260 0.8520 0.1325 0.1874 -0.8214 - 0 0 0 0 -1.1339 -0.5345 0 - 0 0 0 0 -0.1333 0.3770 2.3752 - 0 0 0 0 0 0 1.0000 - 0 0 0 0 -0.1728 0.4887 -1.8325 + Ae = [ 9.1900 0.0000 + 0.0000 -34.5297 ]; - bo_e = + Be = [ -11.9593 + 86.3137 ]; - 0.4666 0 - 0.4334 0.5461 - -1.2627 0.1874 - 0 -1.6036 - 0 -0.9803 - 1.0000 0 - 0 0.3665 + Ce = [ 2.8955 -1.3566 ]; - co_e = + De = [ 0.0000 ]; - 0 0 0 0 0 2 1 - 0 0 0 0 0 1 2 - 0 0 0 0 0 0 3 + # Since btaconred approximates an output controller, + # only its input/output behavior is important and is tested + # using n first Markov parameters. + # The state space representaton might have different signs + # of the states. + # By multiplying the matrices for the Markov parameters, numeric errors + # would propagate, therefor the accuracy of the results are limited to + # the accuracy of the given expected results - q_e = + [Ao,Bo,Co,Do] = ssdata (Kr); + Ao = round (Ao*1e4)/1e4; + Bo = round (Bo*1e4)/1e4; + Co = round (Co*1e4)/1e4; + Do = round (Do*1e4)/1e4; - 0 0 0 0 0 1.0000 0 - 0 0 0 0 0.7917 0 -0.6108 - 0 0.5461 0.1874 -0.5345 0.3770 0 0.4887 - 0.9008 0.1410 -0.4107 0 0 0 0 - 0 -0.5461 -0.1874 0.2673 0.4713 0 0.6108 - 0 -0.5461 -0.1874 -0.8018 -0.0943 0 -0.1222 - -0.4342 0.2924 -0.8520 0 0 0 0 + n = size(Ao,1); + m = size(Bo,2); + p = size(Co,1); + Mo = zeros (p,(n+1)*m); + Me = zeros (p,(n+1)*m); + Mo(:,1:m) = Do; + Me(:,1:m) = De; + + Aoi = eye (n,n); + Aei = eye (n,n); + for i = 1:n + Mo(:,(i-1)*m+1:i*m) = Co*Aoi*Bo; + Me(:,(i-1)*m+1:i*m) = Ce*Aei*Be; + Aoi = Aoi*Ao; + Aei = Aei*Ae; + endfor - z_e = + HSVCe = [ 3.8253 0.2005 ].'; - 0 0 0 0 0 1.0000 0 - 0 -0.6519 0.2740 0 0.7071 0 0 - -0.4342 0.3491 0.8304 0 0 0 0 - 0 0 0 -1.0000 0 0 0 - 0.9008 0.1683 0.4003 0 0 0 0 - 0 0.6519 -0.2740 0 0.7071 0 0 - 0 0 0 0 0 0 1.0000 +***** xtest assert (Mo, Me, 1e-4); +***** assert (Info.hsvc, HSVCe, 1e-4); +2 tests, 2 passed, 0 known failure, 0 skipped +[inst/issample.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/issample.m +***** assert (issample (1)) +***** assert (issample (pi)) +***** assert (issample (0), false) +***** assert (issample (-1), false) +***** assert (issample (-1, 1), false) +***** assert (issample ("a"), false) +***** assert (issample (eye (2)), false) +***** assert (issample (2+2i), false) +***** assert (issample (1, 0)) +***** assert (issample (0, 0)) +***** assert (issample (-1, 0), false) +***** assert (issample (pi, 0)) +***** assert (issample ("b", 0), false) +***** assert (issample (rand (3,2), 0), false) +***** assert (issample (2+2i, 0), false) +***** assert (issample (0+2i, 0), false) +***** assert (issample (-1, -1)) +***** assert (issample (0, -1), false) +***** assert (issample (1, -1)) +***** assert (issample (pi, -1)) +***** assert (issample (-pi, -1), false) +***** assert (issample ("b", -1), false) +***** assert (issample (rand (3,2), -1), false) +***** assert (issample (-2+2i, -1), false) +***** error (issample (-1, "ab")) +***** error (issample ()) +***** error (issample (-1, -1, -1)) +***** error (issample (1, pi)) +***** error (issample (5, rand (2,3))) +***** error (issample (0, 1+2i)) +30 tests, 30 passed, 0 known failure, 0 skipped +[inst/lsim.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/lsim.m +***** test + n = 5; + m = 3; + p = 2; + A = diag ([0:-2:-2*(n-1)]); + B = [ (1:1:n)' (-1:1:n-2)' (2:1:n+1)']; + C = [1 0 1 0 0 ; 0 1 0 1 1 ]; + D = zeros (p,m); - nobsv_e = 3 -***** assert <45008> (bo, bo_e, 1e-4); -!!!!! known bug: https://octave.org/testfailure/?45008 -ASSERT errors for: assert (bo,bo_e,1e-4) + sys = ss(A, B, C, D); + dt = 0.1; + t = 0:dt:1; + x0 = zeros(n,1); + u = [ sin(2*t') cos(3*t') sin(4*t') ]; + [y1, t1] = lsim(sys, u, t, x0); + [y2, t2] = lsim(sys, u', t, x0); - Location | Observed | Expected | Reason - (1,1) 0.090251 0.4666 Abs err 0.37635 exceeds tol 0.0001 by 0.4 - (2,1) -0.0050932 0.4334 Abs err 0.43849 exceeds tol 0.0001 by 0.4 - (3,1) 1.4113 -1.2627 Abs err 2.674 exceeds tol 0.0001 by 3 - (1,2) -0.57499 0 Abs err 0.57499 exceeds tol 0.0001 by 0.6 - (2,2) 0.036787 0.5461 Abs err 0.50931 exceeds tol 0.0001 by 0.5 - (3,2) 0.036902 0.1874 Abs err 0.1505 exceeds tol 0.0001 by 0.2 - (5,2) 0.98026 -0.9803 Abs err 1.9606 exceeds tol 0.0001 by 2 -shared variables - ao = + sysd = c2d (sys, dt, 'foh'); + x0 = x0 - sysd.userdata * u(1,:)'; # foh-doscretization + [y3, t3] = lsim(sysd, u, [], x0); + [y4, t4] = lsim(sysd, u', [], x0); - 0.0100 0.0007 -0.1272 0.0000 0.8132 -0.0000 0.0903 - -0.0006 -0.0000 0.0072 0.7082 -0.0520 -0.7082 -0.0051 - 0.1557 0.0112 -1.9898 -0.7060 -0.0522 0.7060 1.4113 - 0 0 -0.0000 3.7417 0.3780 -3.7417 0.0000 - 0 0 0 0 -1.7862 -0.0000 0.0000 - 0 0 0 0 0 2.0000 0.0000 - 0 0 0 0 0 0 -0.0000 + assert (y1,y2,1e-4); + assert (y1,y3,1e-4); + assert (y1,y4,1e-4); +***** demo + clf; + A = [-3 0 0; + 0 -2 1; + 10 -17 0]; + B = [4; + 0; + 0]; + C = [0 0 1]; + D = 0; + sys = ss(A,B,C,D); + t = 0:0.01:10; + u = zeros (length(t) ,1); + x0 = [0 0.1 0]; + lsim(sys, u, t, x0); +1 test, 1 passed, 0 known failure, 0 skipped +[inst/btamodred.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/btamodred.m +***** shared Mo, Me, Info, HSVe + A = [ -26.4000, 6.4023, 4.3868; + 32.0000, 0, 0; + 0, 8.0000, 0 ]; - eo = + B = [ 16 + 0 + 0 ]; - 1.2223 0.0316 0.0318 -0.0000 -0.4066 -0.5750 0.1805 - 0 -1.0010 -0.0020 0.7082 0.0260 0.0368 1.4062 - 0 0 -1.0010 -0.7060 0.0261 0.0369 1.4106 - 0 0 0 -0.0000 -1.1339 -0.5345 0.0000 - 0 0 0 -0.0000 0.1333 -0.3770 -2.3752 - 0 0 0 0 0.0000 -0.0000 1.0000 - 0 0 0 0 -0.1728 0.4887 -1.8325 + C = [ 9.2994 1.1624 0.1090 ]; - bo = + D = [ 0 ]; - 9.0251e-02 -5.7499e-01 - -5.0932e-03 3.6787e-02 - 1.4113e+00 3.6902e-02 - 1.8014e-16 -1.6036e+00 - 9.6723e-17 9.8026e-01 - 1.0000e+00 -4.4660e-17 - -3.5153e-18 3.6651e-01 + G = ss (A, B, C, D); % "scaled", false - co = + AV = [ -1.0000, 0, 4.0000, -9.2994, -1.1624, -0.1090; + 0, 2.0000, 0, -9.2994, -1.1624, -0.1090; + 0, 0, -3.0000, -9.2994, -1.1624, -0.1090; + 16.0000, 16.0000, 16.0000, -26.4000, 6.4023, 4.3868; + 0, 0, 0, 32.0000, 0, 0; + 0, 0, 0, 0, 8.0000, 0 ]; - 0 0 0 0 0 2 1 - 0 0 0 0 0 1 2 - 0 0 0 0 0 0 3 + BV = [ 1 + 1 + 1 + 0 + 0 + 0 ]; - q = + CV = [ 1 1 1 0 0 0 ]; - 0 0 0 0 0 1.0000 0.0000 - 0 0 0 0.0000 -0.7917 0.0000 -0.6108 - -0.5750 0.0368 0.0369 -0.5345 -0.3770 -0.0000 0.4887 - 0.0903 0.7031 0.7053 -0.0000 -0.0000 -0.0000 0.0000 - 0.5750 -0.0368 -0.0369 0.2673 -0.4713 -0.0000 0.6108 - 0.5750 -0.0368 -0.0369 -0.8018 0.0943 0.0000 -0.1222 - -0.0000 -0.7082 0.7060 0.0000 0.0000 0.0000 -0.0000 + DV = [ 0 ]; - z = + V = ss (AV, BV, CV, DV); - -0.0000 0.0000 -0.0000 0.0000 -0.0000 1.0000 0 - 0.7028 0.0550 0.0553 0.0000 0.7071 -0.0000 0 - -0.0000 0.7089 -0.7053 0.0000 -0.0000 -0.0000 0 - 0.0000 0.0000 -0.0000 -1.0000 0.0000 0.0000 0 - 0.1103 -0.7010 -0.7046 0.0000 -0.0000 0 0 - -0.7028 -0.0550 -0.0553 0.0000 0.7071 -0.0000 0 - 0 0 0 0 0 0 1.0000 + [Gr, Info] = btamodred (G, 2, "left", V); - nobsv = 3 - ao_e = + Ae = [ 9.1900 0.0000 + 0.0000 -34.5297 ]; - 0.2177 0.2414 0.5742 0.4342 0 -0.4342 0.4666 - 0.2022 0.2242 0.5334 -0.2924 -0.7723 0.2924 0.4334 - -0.5892 -0.6533 -1.5540 0.8520 -0.2651 -0.8520 -1.2627 - 0 0 0 3.7417 0.3780 -3.7417 0 - 0 0 0 0 1.7862 0 0 - 0 0 0 0 0 2.0000 0 - 0 0 0 0 0 0 0 + Be = [ -11.9593 + -16.9329 ]; - eo_e = + Ce = [ -2.8955 -6.9152 ]; - 1.0000 0 0 0.4342 0 0 1.8016 - 0 1.1937 -0.1496 -0.2924 0.3861 0.5461 0.2819 - 0 0 -1.0260 0.8520 0.1325 0.1874 -0.8214 - 0 0 0 0 -1.1339 -0.5345 0 - 0 0 0 0 -0.1333 0.3770 2.3752 - 0 0 0 0 0 0 1.0000 - 0 0 0 0 -0.1728 0.4887 -1.8325 + De = [ 0.0000 ]; - bo_e = + # Since btamodred approximates the input/output behavior only + # input/output behavior is tested using n first Markov parameters. + # The state space representaton might have different signs + # of the states. + # By multiplying the matrices for the Markov parameters, numeric errors + # would propagate, therefor the accuracy of the results are limited to + # the accuracy of the given expected results - 0.4666 0 - 0.4334 0.5461 - -1.2627 0.1874 - 0 -1.6036 - 0 -0.9803 - 1.0000 0 - 0 0.3665 + [Ao,Bo,Co,Do] = ssdata (Gr); + Ao = round (Ao*1e4)/1e4; + Bo = round (Bo*1e4)/1e4; + Co = round (Co*1e4)/1e4; + Do = round (Do*1e4)/1e4; - co_e = + n = size(Ao,1); + m = size(Bo,2); + p = size(Co,1); + Mo = zeros (p,(n+1)*m); + Me = zeros (p,(n+1)*m); + Mo(:,1:m) = Do; + Me(:,1:m) = De; + + Aoi = eye (n,n); + Aei = eye (n,n); + for i = 1:n + Mo(:,(i-1)*m+1:i*m) = Co*Aoi*Bo; + Me(:,(i-1)*m+1:i*m) = Ce*Aei*Be; + Aoi = Aoi*Ao; + Aei = Aei*Ae; + endfor - 0 0 0 0 0 2 1 - 0 0 0 0 0 1 2 - 0 0 0 0 0 0 3 + HSVe = [ 3.8253 0.2005 ].'; - q_e = +***** xtest assert (Mo, Me, 1e-4); +***** assert (Info.hsv, HSVe, 1e-4); +2 tests, 2 passed, 0 known failure, 0 skipped +[inst/ctrbf.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/ctrbf.m +***** shared Ao, Bo, Co, Zo, Ae, Be, Ce, Ze, NCONT + A = [ -1.0 0.0 0.0 + -2.0 -2.0 -2.0 + -1.0 0.0 -3.0 ]; - 0 0 0 0 0 1.0000 0 - 0 0 0 0 0.7917 0 -0.6108 - 0 0.5461 0.1874 -0.5345 0.3770 0 0.4887 - 0.9008 0.1410 -0.4107 0 0 0 0 - 0 -0.5461 -0.1874 0.2673 0.4713 0 0.6108 - 0 -0.5461 -0.1874 -0.8018 -0.0943 0 -0.1222 - -0.4342 0.2924 -0.8520 0 0 0 0 + B = [ 1.0 0.0 0.0 + 0.0 2.0 1.0 ].'; - z_e = + C = [ 0.0 2.0 1.0 + 1.0 0.0 0.0 ]; - 0 0 0 0 0 1.0000 0 - 0 -0.6519 0.2740 0 0.7071 0 0 - -0.4342 0.3491 0.8304 0 0 0 0 - 0 0 0 -1.0000 0 0 0 - 0.9008 0.1683 0.4003 0 0 0 0 - 0 0.6519 -0.2740 0 0.7071 0 0 - 0 0 0 0 0 0 1.0000 + [Ao, Bo, Co, Zo, NCONT] = ctrbf (A, B, C); - nobsv_e = 3 -***** assert <45008> (co, co_e, 1e-4); -***** assert <45008> (q, q_e, 1e-4); -!!!!! known bug: https://octave.org/testfailure/?45008 -ASSERT errors for: assert (q,q_e,1e-4) + Ae = [ -3.0000 2.2361 + 0.0000 -1.0000 ]; - Location | Observed | Expected | Reason - (3,1) -0.57499 0 Abs err 0.57499 exceeds tol 0.0001 by 0.6 - (4,1) 0.090251 0.9008 Abs err 0.81055 exceeds tol 0.0001 by 0.8 - (5,1) 0.57499 0 Abs err 0.57499 exceeds tol 0.0001 by 0.6 - (6,1) 0.57499 0 Abs err 0.57499 exceeds tol 0.0001 by 0.6 - (7,1) -1.8005e-16 -0.4342 Abs err 0.4342 exceeds tol 0.0001 by 0.4 - (3,2) 0.036787 0.5461 Abs err 0.50931 exceeds tol 0.0001 by 0.5 - (4,2) 0.70312 0.141 Abs err 0.56212 exceeds tol 0.0001 by 0.6 - (5,2) -0.036787 -0.5461 Abs err 0.50931 exceeds tol 0.0001 by 0.5 - (6,2) -0.036787 -0.5461 Abs err 0.50931 exceeds tol 0.0001 by 0.5 - (7,2) -0.70821 0.2924 Abs err 1.0006 exceeds tol 0.0001 by 1 - (3,3) 0.036902 0.1874 Abs err 0.1505 exceeds tol 0.0001 by 0.2 - (4,3) 0.70532 -0.4107 Abs err 1.116 exceeds tol 0.0001 by 1 - (5,3) -0.036902 -0.1874 Abs err 0.1505 exceeds tol 0.0001 by 0.2 - (6,3) -0.036902 -0.1874 Abs err 0.1505 exceeds tol 0.0001 by 0.2 - (7,3) 0.706 -0.852 Abs err 1.558 exceeds tol 0.0001 by 2 - (2,5) -0.79175 0.7917 Abs err 1.5834 exceeds tol 0.0001 by 2 - (3,5) -0.37702 0.377 Abs err 0.75402 exceeds tol 0.0001 by 0.8 - (5,5) -0.47128 0.4713 Abs err 0.94258 exceeds tol 0.0001 by 0.9 - (6,5) 0.094256 -0.0943 Abs err 0.18856 exceeds tol 0.0001 by 0.2 -shared variables - ao = + Be = [ 0.0000 -2.2361 + 1.0000 0.0000 ]; - 0.0100 0.0007 -0.1272 0.0000 0.8132 -0.0000 0.0903 - -0.0006 -0.0000 0.0072 0.7082 -0.0520 -0.7082 -0.0051 - 0.1557 0.0112 -1.9898 -0.7060 -0.0522 0.7060 1.4113 - 0 0 -0.0000 3.7417 0.3780 -3.7417 0.0000 - 0 0 0 0 -1.7862 -0.0000 0.0000 - 0 0 0 0 0 2.0000 0.0000 - 0 0 0 0 0 0 -0.0000 + Ce = [ -2.2361 0.0000 + 0.0000 1.0000 ]; - eo = + Ze = [ 0.0000 1.0000 0.0000 + -0.8944 0.0000 -0.4472 + -0.4472 0.0000 0.8944 ]; - 1.2223 0.0316 0.0318 -0.0000 -0.4066 -0.5750 0.1805 - 0 -1.0010 -0.0020 0.7082 0.0260 0.0368 1.4062 - 0 0 -1.0010 -0.7060 0.0261 0.0369 1.4106 - 0 0 0 -0.0000 -1.1339 -0.5345 0.0000 - 0 0 0 -0.0000 0.1333 -0.3770 -2.3752 - 0 0 0 0 0.0000 -0.0000 1.0000 - 0 0 0 0 -0.1728 0.4887 -1.8325 +***** assert (Ao(1:NCONT, 1:NCONT), Ae, 1e-4); +***** assert (Bo(1:NCONT, :), Be, 1e-4); +***** assert (Co(:, 1:NCONT), Ce, 1e-4); +***** assert (Zo, Ze, 1e-4); +4 tests, 4 passed, 0 known failure, 0 skipped +[inst/mag2db.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/mag2db.m +***** assert (mag2db (100), 40); +***** assert (mag2db (0.1), -20); +2 tests, 2 passed, 0 known failure, 0 skipped +[inst/hnamodred.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/hnamodred.m +***** shared Mo, Me, Info, HSVe + A = [ -3.8637 -7.4641 -9.1416 -7.4641 -3.8637 -1.0000 + 1.0000, 0 0 0 0 0 + 0 1.0000 0 0 0 0 + 0 0 1.0000 0 0 0 + 0 0 0 1.0000 0 0 + 0 0 0 0 1.0000 0 ]; - bo = + B = [ 1 + 0 + 0 + 0 + 0 + 0 ]; - 9.0251e-02 -5.7499e-01 - -5.0932e-03 3.6787e-02 - 1.4113e+00 3.6902e-02 - 1.8014e-16 -1.6036e+00 - 9.6723e-17 9.8026e-01 - 1.0000e+00 -4.4660e-17 - -3.5153e-18 3.6651e-01 + C = [ 0 0 0 0 0 1 ]; - co = + D = [ 0 ]; - 0 0 0 0 0 2 1 - 0 0 0 0 0 1 2 - 0 0 0 0 0 0 3 + G = ss (A, B, C, D); # "scaled", false - q = + AV = [ 0.2000 -1.0000 + 1.0000 0 ]; - 0 0 0 0 0 1.0000 0.0000 - 0 0 0 0.0000 -0.7917 0.0000 -0.6108 - -0.5750 0.0368 0.0369 -0.5345 -0.3770 -0.0000 0.4887 - 0.0903 0.7031 0.7053 -0.0000 -0.0000 -0.0000 0.0000 - 0.5750 -0.0368 -0.0369 0.2673 -0.4713 -0.0000 0.6108 - 0.5750 -0.0368 -0.0369 -0.8018 0.0943 0.0000 -0.1222 - -0.0000 -0.7082 0.7060 0.0000 0.0000 0.0000 -0.0000 + BV = [ 1 + 0 ]; - z = + CV = [ -1.8000 0 ]; - -0.0000 0.0000 -0.0000 0.0000 -0.0000 1.0000 0 - 0.7028 0.0550 0.0553 0.0000 0.7071 -0.0000 0 - -0.0000 0.7089 -0.7053 0.0000 -0.0000 -0.0000 0 - 0.0000 0.0000 -0.0000 -1.0000 0.0000 0.0000 0 - 0.1103 -0.7010 -0.7046 0.0000 -0.0000 0 0 - -0.7028 -0.0550 -0.0553 0.0000 0.7071 -0.0000 0 - 0 0 0 0 0 0 1.0000 + DV = [ 1 ]; - nobsv = 3 - ao_e = + V = ss (AV, BV, CV, DV); - 0.2177 0.2414 0.5742 0.4342 0 -0.4342 0.4666 - 0.2022 0.2242 0.5334 -0.2924 -0.7723 0.2924 0.4334 - -0.5892 -0.6533 -1.5540 0.8520 -0.2651 -0.8520 -1.2627 - 0 0 0 3.7417 0.3780 -3.7417 0 - 0 0 0 0 1.7862 0 0 - 0 0 0 0 0 2.0000 0 - 0 0 0 0 0 0 0 + [Gr, Info] = hnamodred (G, "left", V, "tol1", 1e-1, "tol2", 1e-14); + [Ao, Bo, Co, Do] = ssdata (Gr); - eo_e = + Ae = [ -0.2391 0.3072 1.1630 1.1967 + -2.9709 -0.2391 2.6270 3.1027 + 0.0000 0.0000 -0.5137 -1.2842 + 0.0000 0.0000 0.1519 -0.5137 ]; - 1.0000 0 0 0.4342 0 0 1.8016 - 0 1.1937 -0.1496 -0.2924 0.3861 0.5461 0.2819 - 0 0 -1.0260 0.8520 0.1325 0.1874 -0.8214 - 0 0 0 0 -1.1339 -0.5345 0 - 0 0 0 0 -0.1333 0.3770 2.3752 - 0 0 0 0 0 0 1.0000 - 0 0 0 0 -0.1728 0.4887 -1.8325 + Be = [ -1.0497 + -3.7052 + 0.8223 + 0.7435 ]; - bo_e = + Ce = [ -0.4466 0.0143 -0.4780 -0.2013 ]; - 0.4666 0 - 0.4334 0.5461 - -1.2627 0.1874 - 0 -1.6036 - 0 -0.9803 - 1.0000 0 - 0 0.3665 + De = [ 0.0219 ]; - co_e = + # Since hnamodred approximates the input/output behavior only + # input/output behavior is tested using n first Markov parameters. + # The state space representaton might have different signs + # of the states. + # By multiplying the matrices for the Markov parameters, numeric errors + # would propagate, therefor the accuracy of the results are limited to + # the accuracy of the given expected results - 0 0 0 0 0 2 1 - 0 0 0 0 0 1 2 - 0 0 0 0 0 0 3 + [Ao,Bo,Co,Do] = ssdata (Gr); + Ao = round (Ao*1e4)/1e4; + Bo = round (Bo*1e4)/1e4; + Co = round (Co*1e4)/1e4; + Do = round (Do*1e4)/1e4; - q_e = + n = size(Ao,1); + m = size(Bo,2); + p = size(Co,1); + Mo = zeros (p,(n+1)*m); + Me = zeros (p,(n+1)*m); + Mo(:,1:m) = Do; + Me(:,1:m) = De; + + Aoi = eye (n,n); + Aei = eye (n,n); + for i = 1:n + Mo(:,i*m+1:(i+1)*m) = Co*Aoi*Bo; + Me(:,i*m+1:(i+1)*m) = Ce*Aei*Be; + Aoi = Aoi*Ao; + Aei = Aei*Ae; + endfor - 0 0 0 0 0 1.0000 0 - 0 0 0 0 0.7917 0 -0.6108 - 0 0.5461 0.1874 -0.5345 0.3770 0 0.4887 - 0.9008 0.1410 -0.4107 0 0 0 0 - 0 -0.5461 -0.1874 0.2673 0.4713 0 0.6108 - 0 -0.5461 -0.1874 -0.8018 -0.0943 0 -0.1222 - -0.4342 0.2924 -0.8520 0 0 0 0 + HSVe = [ 2.6790 2.1589 0.8424 0.1929 0.0219 0.0011 ].'; - z_e = +***** assert (Mo, Me, 1e-3); +***** assert (Info.hsv, HSVe, 1e-4); +2 tests, 2 passed, 0 known failure, 0 skipped +[inst/fitfrd.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/fitfrd.m +***** shared Yo, Ye + SYS = ss (-1, 1, 1, 0); + T = 0:0.1:50; + Ye = step (SYS, T); + W = logspace (-2, 2, 100); + FR = frd (SYS, W); + N = 1; + SYSID = fitfrd (FR, N, 1); + Yo = step (SYSID, T); +***** assert (Yo, Ye, 1e-2); +1 test, 1 passed, 0 known failure, 0 skipped +[inst/dlyap.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/dlyap.m +***** shared X, X_exp + A = [3.0 1.0 1.0 + 1.0 3.0 0.0 + 0.0 0.0 3.0]; - 0 0 0 0 0 1.0000 0 - 0 -0.6519 0.2740 0 0.7071 0 0 - -0.4342 0.3491 0.8304 0 0 0 0 - 0 0 0 -1.0000 0 0 0 - 0.9008 0.1683 0.4003 0 0 0 0 - 0 0.6519 -0.2740 0 0.7071 0 0 - 0 0 0 0 0 0 1.0000 + B = [25.0 24.0 15.0 + 24.0 32.0 8.0 + 15.0 8.0 40.0]; - nobsv_e = 3 -***** assert <45008> (z, z_e, 1e-4); -!!!!! known bug: https://octave.org/testfailure/?45008 -ASSERT errors for: assert (z,z_e,1e-4) + X = dlyap (A.', -B); - Location | Observed | Expected | Reason - (2,1) 0.70279 0 Abs err 0.70279 exceeds tol 0.0001 by 0.7 - (3,1) -1.9854e-16 -0.4342 Abs err 0.4342 exceeds tol 0.0001 by 0.4 - (5,1) 0.11031 0.9008 Abs err 0.79049 exceeds tol 0.0001 by 0.8 - (6,1) -0.70279 0 Abs err 0.70279 exceeds tol 0.0001 by 0.7 - (2,2) 0.055012 -0.6519 Abs err 0.70691 exceeds tol 0.0001 by 0.7 - (3,2) 0.70893 0.3491 Abs err 0.35983 exceeds tol 0.0001 by 0.4 - (5,2) -0.70098 0.1683 Abs err 0.86928 exceeds tol 0.0001 by 0.9 - (6,2) -0.055012 0.6519 Abs err 0.70691 exceeds tol 0.0001 by 0.7 - (2,3) 0.055297 0.274 Abs err 0.2187 exceeds tol 0.0001 by 0.2 - (3,3) -0.70528 0.8304 Abs err 1.5357 exceeds tol 0.0001 by 2 - (5,3) -0.7046 0.4003 Abs err 1.1049 exceeds tol 0.0001 by 1 - (6,3) -0.055297 -0.274 Abs err 0.2187 exceeds tol 0.0001 by 0.2 -shared variables - ao = + X_exp = [2.0000 1.0000 1.0000 + 1.0000 3.0000 0.0000 + 1.0000 0.0000 4.0000]; - 0.0100 0.0007 -0.1272 0.0000 0.8132 -0.0000 0.0903 - -0.0006 -0.0000 0.0072 0.7082 -0.0520 -0.7082 -0.0051 - 0.1557 0.0112 -1.9898 -0.7060 -0.0522 0.7060 1.4113 - 0 0 -0.0000 3.7417 0.3780 -3.7417 0.0000 - 0 0 0 0 -1.7862 -0.0000 0.0000 - 0 0 0 0 0 2.0000 0.0000 - 0 0 0 0 0 0 -0.0000 +***** assert (X, X_exp, 1e-4); +***** shared X, X_exp + A = [3.0 1.0 1.0 + 1.0 3.0 0.0 + 0.0 0.0 3.0]; - eo = + B = [1.0 0.2 2.0 + 0.5 0.5 1.0 + 1.0 -2.0 1.0]; - 1.2223 0.0316 0.0318 -0.0000 -0.4066 -0.5750 0.1805 - 0 -1.0010 -0.0020 0.7082 0.0260 0.0368 1.4062 - 0 0 -1.0010 -0.7060 0.0261 0.0369 1.4106 - 0 0 0 -0.0000 -1.1339 -0.5345 0.0000 - 0 0 0 -0.0000 0.1333 -0.3770 -2.3752 - 0 0 0 0 0.0000 -0.0000 1.0000 - 0 0 0 0 -0.1728 0.4887 -1.8325 + X = dlyap (A.', -B); - bo = + X_exp = [0.1390 -0.0514 0.1831 + -0.0086 0.0676 0.0422 + 0.2005 -0.3233 -0.0362]; - 9.0251e-02 -5.7499e-01 - -5.0932e-03 3.6787e-02 - 1.4113e+00 3.6902e-02 - 1.8014e-16 -1.6036e+00 - 9.6723e-17 9.8026e-01 - 1.0000e+00 -4.4660e-17 - -3.5153e-18 3.6651e-01 +***** assert (X, X_exp, 1e-4); +***** shared X, X_exp + A = [1.0 2.0 3.0 + 6.0 7.0 8.0 + 9.0 2.0 3.0]; - co = + B = [7.0 2.0 3.0 + 2.0 1.0 2.0 + 3.0 4.0 1.0]; - 0 0 0 0 0 2 1 - 0 0 0 0 0 1 2 - 0 0 0 0 0 0 3 + C = [271.0 135.0 147.0 + 923.0 494.0 482.0 + 578.0 383.0 287.0]; - q = + X = dlyap (-A, B, C); - 0 0 0 0 0 1.0000 0.0000 - 0 0 0 0.0000 -0.7917 0.0000 -0.6108 - -0.5750 0.0368 0.0369 -0.5345 -0.3770 -0.0000 0.4887 - 0.0903 0.7031 0.7053 -0.0000 -0.0000 -0.0000 0.0000 - 0.5750 -0.0368 -0.0369 0.2673 -0.4713 -0.0000 0.6108 - 0.5750 -0.0368 -0.0369 -0.8018 0.0943 0.0000 -0.1222 - -0.0000 -0.7082 0.7060 0.0000 0.0000 0.0000 -0.0000 + X_exp = [2.0000 3.0000 6.0000 + 4.0000 7.0000 1.0000 + 5.0000 3.0000 2.0000]; - z = +***** assert (X, X_exp, 1e-4); +***** shared X, X_exp + A = [3.0 1.0 1.0 + 1.0 3.0 0.0 + 1.0 0.0 2.0]; - -0.0000 0.0000 -0.0000 0.0000 -0.0000 1.0000 0 - 0.7028 0.0550 0.0553 0.0000 0.7071 -0.0000 0 - -0.0000 0.7089 -0.7053 0.0000 -0.0000 -0.0000 0 - 0.0000 0.0000 -0.0000 -1.0000 0.0000 0.0000 0 - 0.1103 -0.7010 -0.7046 0.0000 -0.0000 0 0 - -0.7028 -0.0550 -0.0553 0.0000 0.7071 -0.0000 0 - 0 0 0 0 0 0 1.0000 + E = [1.0 3.0 0.0 + 3.0 2.0 1.0 + 1.0 0.0 1.0]; - nobsv = 3 - ao_e = + B = [ -3.0 -10.0 7.0 + -10.0 -14.0 -2.0 + 7.0 -2.0 9.0 ]; - 0.2177 0.2414 0.5742 0.4342 0 -0.4342 0.4666 - 0.2022 0.2242 0.5334 -0.2924 -0.7723 0.2924 0.4334 - -0.5892 -0.6533 -1.5540 0.8520 -0.2651 -0.8520 -1.2627 - 0 0 0 3.7417 0.3780 -3.7417 0 - 0 0 0 0 1.7862 0 0 - 0 0 0 0 0 2.0000 0 - 0 0 0 0 0 0 0 + X = dlyap (A, B, [], E); - eo_e = + X_exp = [-2.0000 -1.0000 0.0000 + -1.0000 -3.0000 -1.0000 + 0.0000 -1.0000 -3.0000]; - 1.0000 0 0 0.4342 0 0 1.8016 - 0 1.1937 -0.1496 -0.2924 0.3861 0.5461 0.2819 - 0 0 -1.0260 0.8520 0.1325 0.1874 -0.8214 - 0 0 0 0 -1.1339 -0.5345 0 - 0 0 0 0 -0.1333 0.3770 2.3752 - 0 0 0 0 0 0 1.0000 - 0 0 0 0 -0.1728 0.4887 -1.8325 +***** assert (X, X_exp, 1e-4); +4 tests, 4 passed, 0 known failure, 0 skipped +[inst/bstmodred.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/bstmodred.m +***** shared Mo, Me, Info, HSVe + A = [ -0.04165 0.0000 4.9200 -4.9200 0.0000 0.0000 0.0000 + -5.2100 -12.500 0.0000 0.0000 0.0000 0.0000 0.0000 + 0.0000 3.3300 -3.3300 0.0000 0.0000 0.0000 0.0000 + 0.5450 0.0000 0.0000 0.0000 -0.5450 0.0000 0.0000 + 0.0000 0.0000 0.0000 4.9200 -0.04165 0.0000 4.9200 + 0.0000 0.0000 0.0000 0.0000 -5.2100 -12.500 0.0000 + 0.0000 0.0000 0.0000 0.0000 0.0000 3.3300 -3.3300 ]; - bo_e = + B = [ 0.0000 0.0000 + 12.500 0.0000 + 0.0000 0.0000 + 0.0000 0.0000 + 0.0000 0.0000 + 0.0000 12.500 + 0.0000 0.0000 ]; - 0.4666 0 - 0.4334 0.5461 - -1.2627 0.1874 - 0 -1.6036 - 0 -0.9803 - 1.0000 0 - 0 0.3665 + C = [ 1.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 + 0.0000 0.0000 0.0000 1.0000 0.0000 0.0000 0.0000 + 0.0000 0.0000 0.0000 0.0000 1.0000 0.0000 0.0000 ]; - co_e = + D = [ 0.0000 0.0000 + 0.0000 0.0000 + 0.0000 0.0000 ]; - 0 0 0 0 0 2 1 - 0 0 0 0 0 1 2 - 0 0 0 0 0 0 3 + sys = ss (A, B, C, D, "scaled", true); - q_e = + [sys_red, Info] = bstmodred (sys, "beta", 1.0, "tol1", 0.1, "tol2", 0.0); - 0 0 0 0 0 1.0000 0 - 0 0 0 0 0.7917 0 -0.6108 - 0 0.5461 0.1874 -0.5345 0.3770 0 0.4887 - 0.9008 0.1410 -0.4107 0 0 0 0 - 0 -0.5461 -0.1874 0.2673 0.4713 0 0.6108 - 0 -0.5461 -0.1874 -0.8018 -0.0943 0 -0.1222 - -0.4342 0.2924 -0.8520 0 0 0 0 + # Expected results + Ae = [ 1.2729 0.0000 6.5947 0.0000 -3.4229 + 0.0000 0.8169 0.0000 2.4821 0.0000 + -2.9889 0.0000 -2.9028 0.0000 -0.3692 + 0.0000 -3.3921 0.0000 -3.1126 0.0000 + -1.4767 0.0000 -2.0339 0.0000 -0.6107 ]; - z_e = + Be = [ 0.1331 -0.1331 + -0.0862 -0.0862 + -2.6777 2.6777 + -3.5767 -3.5767 + -2.3033 2.3033 ]; - 0 0 0 0 0 1.0000 0 - 0 -0.6519 0.2740 0 0.7071 0 0 - -0.4342 0.3491 0.8304 0 0 0 0 - 0 0 0 -1.0000 0 0 0 - 0.9008 0.1683 0.4003 0 0 0 0 - 0 0.6519 -0.2740 0 0.7071 0 0 - 0 0 0 0 0 0 1.0000 + Ce = [ -0.6907 -0.6882 0.0779 0.0958 -0.0038 + 0.0676 0.0000 0.6532 0.0000 -0.7522 + 0.6907 -0.6882 -0.0779 0.0958 0.0038 ]; - nobsv_e = 3 -***** assert (nobsv, nobsv_e); -***** shared NUM, DEN, NUMe, DENe - A = [ -1.0 0.0 0.0 - 0.0 -2.0 0.0 - 0.0 0.0 -3.0 ]; + De = [ 0.0000 0.0000 + 0.0000 0.0000 + 0.0000 0.0000 ]; - B = [ 0.0 1.0 -1.0 - 1.0 1.0 0.0 ].'; + HSVe = [ 0.8803 0.8506 0.8038 0.4494 0.3973 0.0214 0.0209 ].'; - C = [ 0.0 1.0 1.0 - 1.0 1.0 1.0 ]; + # Since bstmodred reduces the model while approximaton the input/output + # behavior, only input/output behavior is tested by means of the first + # n markov parameters. The state space representation is not unique. + # By multiplying the matrices for the Markov parameters, numeric errors + # would propagate, therefor the accuracy of the results are limited to + # the accuracy of the given expected results - D = [ 1.0 0.0 - 0.0 1.0 ]; + [Ao, Bo, Co, Do] = ssdata (sys_red); + Ao = round (Ao*1e4)/1e4; + Bo = round (Bo*1e4)/1e4; + Co = round (Co*1e4)/1e4; + Do = round (Do*1e4)/1e4; - [NUM, DEN] = tfdata (ss (A, B, C, D)); - ## remove possibly existing idendical pole/zero pairs - for i=1:2 - for j=1:2 - gcdij = polygcd (NUM{i,j},DEN{i,j}); - if length (gcdij) > 1 - NUM{i,j} = deconv (NUM{i,j}, gcdij); - DEN{i,j} = deconv (DEN{i,j}, gcdij); - endif - endfor + n = size(Ao,1); + m = size(Bo,2); + p = size(Co,1); + Mo = zeros (p,(n+1)*m); + Me = zeros (p,(n+1)*m); + Mo(:,1:m) = Do; + Me(:,1:m) = De; + + Aoi = eye (n,n); + Aei = eye (n,n); + for i = 1:n + Mo(:,(i-1)*m+1:i*m) = Co*Aoi*Bo; + Me(:,(i-1)*m+1:i*m) = Ce*Aei*Be; + Aoi = Aoi*Ao; + Aei = Aei*Ae; endfor - - NUMe = {[1, 5, 7], [1]; [1], [1, 5, 5]}; - DENe = {[1, 5, 6], [1, 2]; [1, 5, 6], [1, 3, 2]}; - -***** assert (NUM, NUMe, 1e-4); -***** assert (DEN, DENe, 1e-4); -***** shared NUM, DEN, NUMe, DENe - A = [ 0 ]; - - B = [ 1 ]; - - C = [ 1 ]; - - D = [ 0 ]; - - [NUM, DEN] = tfdata (ss (A, B, C, D)); - - NUMe = {[1]}; - - DENe = {[1, 0]}; - -***** assert (NUM, NUMe, 1e-4); -***** assert (DEN, DENe, 1e-4); -***** shared Mo, Me - INDEX = [ 3 3 ]; - - DCOEFF = [ 1.0 6.0 11.0 6.0 - 1.0 6.0 11.0 6.0 ]; - - UCOEFF = zeros (2, 2, 4); - - u11 = [ 1.0 6.0 12.0 7.0 ]; - u12 = [ 0.0 1.0 4.0 3.0 ]; - u21 = [ 0.0 0.0 1.0 1.0 ]; - u22 = [ 1.0 8.0 20.0 15.0 ]; - - UCOEFF(1,1,:) = u11; - UCOEFF(1,2,:) = u12; - UCOEFF(2,1,:) = u21; - UCOEFF(2,2,:) = u22; - - [Ao, Bo, Co, Do] = __sl_td04ad__ (UCOEFF, DCOEFF, INDEX, 0); - - Ae = [ 0.5000 -0.8028 0.9387 - 4.4047 -2.3380 2.5076 - -5.5541 1.6872 -4.1620 ]; - - Be = [ -0.2000 -1.2500 - 0.0000 -0.6097 - 0.0000 2.2217 ]; - - Ce = [ 0.0000 -0.8679 0.2119 - 0.0000 0.0000 0.9002 ]; - - De = [ 1.0000 0.0000 - 0.0000 1.0000 ]; - - Mo = [Ao, Bo; Co, Do]; - Me = [Ae, Be; Ce, De]; - -***** assert (Mo, Me, 1e-4); -43 tests, 33 passed, 0 known failure, 10 skipped -[inst/lsim.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/lsim.m -***** test - n = 5; - m = 3; - p = 2; - A = diag ([0:-2:-2*(n-1)]); - B = [ (1:1:n)' (-1:1:n-2)' (2:1:n+1)']; - C = [1 0 1 0 0 ; 0 1 0 1 1 ]; - D = zeros (p,m); - - sys = ss(A, B, C, D); - dt = 0.1; - t = 0:dt:1; - x0 = zeros(n,1); - u = [ sin(2*t') cos(3*t') sin(4*t') ]; - [y1, t1] = lsim(sys, u, t, x0); - [y2, t2] = lsim(sys, u', t, x0); - - sysd = c2d (sys, dt, 'foh'); - x0 = x0 - sysd.userdata * u(1,:)'; # foh-doscretization - [y3, t3] = lsim(sysd, u, [], x0); - [y4, t4] = lsim(sysd, u', [], x0); - - assert (y1,y2,1e-4); - assert (y1,y3,1e-4); - assert (y1,y4,1e-4); -***** demo - clf; - A = [-3 0 0; - 0 -2 1; - 10 -17 0]; - B = [4; - 0; - 0]; - C = [0 0 1]; - D = 0; - sys = ss(A,B,C,D); - t = 0:0.01:10; - u = zeros (length(t) ,1); - x0 = [0 0.1 0]; - lsim(sys, u, t, x0); -1 test, 1 passed, 0 known failure, 0 skipped -[inst/db2mag.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/db2mag.m -***** assert (db2mag (40), 100); -***** assert (db2mag (-20), 0.1); + +***** assert (Mo, Me, 1e-4) +***** assert (Info.hsv, HSVe, 1e-4) 2 tests, 2 passed, 0 known failure, 0 skipped [inst/ncfsyn.m] >>>>> /build/reproducible-path/octave-control-4.0.1/inst/ncfsyn.m @@ -10544,274 +10802,52 @@ ***** assert (CK, CKe, 1e-4); ***** assert (DK, DKe, 1e-4); 27 tests, 27 passed, 0 known failure, 0 skipped -[inst/ctrbf.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/ctrbf.m -***** shared Ao, Bo, Co, Zo, Ae, Be, Ce, Ze, NCONT - A = [ -1.0 0.0 0.0 - -2.0 -2.0 -2.0 - -1.0 0.0 -3.0 ]; - - B = [ 1.0 0.0 0.0 - 0.0 2.0 1.0 ].'; - - C = [ 0.0 2.0 1.0 - 1.0 0.0 0.0 ]; - - [Ao, Bo, Co, Zo, NCONT] = ctrbf (A, B, C); - - Ae = [ -3.0000 2.2361 - 0.0000 -1.0000 ]; - - Be = [ 0.0000 -2.2361 - 1.0000 0.0000 ]; - - Ce = [ -2.2361 0.0000 - 0.0000 1.0000 ]; - - Ze = [ 0.0000 1.0000 0.0000 - -0.8944 0.0000 -0.4472 - -0.4472 0.0000 0.8944 ]; - -***** assert (Ao(1:NCONT, 1:NCONT), Ae, 1e-4); -***** assert (Bo(1:NCONT, :), Be, 1e-4); -***** assert (Co(:, 1:NCONT), Ce, 1e-4); -***** assert (Zo, Ze, 1e-4); +[inst/@iddata/detrend.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/@iddata/detrend.m +***** shared DATD, Z + DAT = iddata ({[(1:10).', (1:2:20).'], [(10:-1:1).', (20:-2:1).']}, {[(41:50).', (46:55).'], [(61:70).', (-66:-1:-75).']}); + DATD = detrend (DAT, "linear"); + Z = zeros (10, 2); +***** assert (DATD.y{1}, Z, 1e-10); +***** assert (DATD.y{2}, Z, 1e-10); +***** assert (DATD.u{1}, Z, 1e-10); +***** assert (DATD.u{2}, Z, 1e-10); 4 tests, 4 passed, 0 known failure, 0 skipped -[inst/initial.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/initial.m -***** shared initial_c, initial_c_exp, initial_d, initial_d_exp - - A = [ -2.8 2.0 -1.8 - -2.4 -2.0 0.8 - 1.1 1.7 -1.0 ]; - - B = [ -0.8 0.5 0 - 0 0.7 2.3 - -0.3 -0.1 0.5 ]; - - C = [ -0.1 0 -0.3 - 0.9 0.5 1.2 - 0.1 -0.1 1.9 ]; - - D = [ -0.5 0 0 - 0.1 0 0.3 - -0.8 0 0 ]; - - x_0 = [1, 2, 3]; - - sysc = ss (A, B, C, D); - - [yc, tc, xc] = initial (sysc, x_0, 0.2, 0.1); - initial_c = [yc, tc, xc]; - - sysd = c2d (sysc, 2); - - [yd, td, xd] = initial (sysd, x_0, 4); - initial_d = [yd, td, xd]; - - ## expected values computed by the "dark side" - - yc_exp = [ -1.0000 5.5000 5.6000 - -0.9872 5.0898 5.7671 - -0.9536 4.6931 5.7598 ]; - - tc_exp = [ 0.0000 - 0.1000 - 0.2000 ]; - - xc_exp = [ 1.0000 2.0000 3.0000 - 0.5937 1.6879 3.0929 - 0.2390 1.5187 3.0988 ]; - - initial_c_exp = [yc_exp, tc_exp, xc_exp]; - - yd_exp = [ -1.0000 5.5000 5.6000 - -0.6550 3.1673 4.2228 - -0.5421 2.6186 3.4968 ]; - - td_exp = [ 0 - 2 - 4 ]; - - xd_exp = [ 1.0000 2.0000 3.0000 - -0.4247 1.5194 2.3249 - -0.3538 1.2540 1.9250 ]; - - initial_d_exp = [yd_exp, td_exp, xd_exp]; - -***** assert (initial_c, initial_c_exp, 1e-4) -***** assert (initial_d, initial_d_exp, 1e-4) -2 tests, 2 passed, 0 known failure, 0 skipped -[inst/pole.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/pole.m -***** shared pol_exp, pol_obs - A = [-1, 0, 0; - 0, -2, 0; - 0, 0, -3]; - pol_exp = [-3; - -2; - -1]; - pol_obs = pole(A); -***** assert(pol_obs, pol_exp, 0); -***** shared pol, pol_exp, infp, kronr, kronl, infp_exp, kronr_exp, kronl_exp - A = [ 1 0 0 0 0 0 0 0 0 - 0 1 0 0 0 0 0 0 0 - 0 0 1 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 - 0 0 0 0 0 1 0 0 0 - 0 0 0 0 0 0 1 0 0 - 0 0 0 0 0 0 0 1 0 - 0 0 0 0 0 0 0 0 1 ]; - - E = [ 0 0 0 0 0 0 0 0 0 - 1 0 0 0 0 0 0 0 0 - 0 1 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 - 0 0 0 1 0 0 0 0 0 - 0 0 0 0 1 0 0 0 0 - 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 - 0 0 0 0 0 0 0 1 0 ]; - - B = [ -1 0 0 - 0 0 0 - 0 0 0 - 0 -1 0 - 0 0 0 - 0 0 0 - 0 0 -1 - 0 0 0 - 0 0 0 ]; - - C = [ 0 1 1 0 3 4 0 0 2 - 0 1 0 0 4 0 0 2 0 - 0 0 1 0 -1 4 0 -2 2 ]; - - D = [ 1 2 -2 - 0 -1 -2 - 0 0 0 ]; - - sys = dss (A, B, C, D, E, "scaled", true); - [pol, ~, infp, kronr, kronl] = __sl_ag08bd__ (A, E, [], [], [], true); - - pol_exp = zeros (0,1); - - infp_exp = [0, 3]; - kronr_exp = zeros (1,0); - kronl_exp = zeros (1,0); - -***** assert (pol, pol_exp, 1e-4); -***** assert (infp, infp_exp); -***** assert (kronr, kronr_exp); -***** assert (kronl, kronl_exp); -5 tests, 5 passed, 0 known failure, 0 skipped -[inst/hsvd.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/hsvd.m -***** shared hsv, hsv_exp - a = [ -0.04165 0.0000 4.9200 -4.9200 0.0000 0.0000 0.0000 - -5.2100 -12.500 0.0000 0.0000 0.0000 0.0000 0.0000 - 0.0000 3.3300 -3.3300 0.0000 0.0000 0.0000 0.0000 - 0.5450 0.0000 0.0000 0.0000 -0.5450 0.0000 0.0000 - 0.0000 0.0000 0.0000 4.9200 -0.04165 0.0000 4.9200 - 0.0000 0.0000 0.0000 0.0000 -5.2100 -12.500 0.0000 - 0.0000 0.0000 0.0000 0.0000 0.0000 3.3300 -3.3300]; - - b = [ 0.0000 0.0000 - 12.5000 0.0000 - 0.0000 0.0000 - 0.0000 0.0000 - 0.0000 0.0000 - 0.0000 12.500 - 0.0000 0.0000]; - - c = [ 1.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 - 0.0000 0.0000 0.0000 1.0000 0.0000 0.0000 0.0000 - 0.0000 0.0000 0.0000 0.0000 1.0000 0.0000 0.0000]; - - sys = ss (a, b, c, [], "scaled", true); - hsv = hsvd (sys, "alpha", 0.0); - - hsv_exp = [2.5139; 2.0846; 1.9178; 0.7666; 0.5473; 0.0253; 0.0246]; - -***** assert (hsv, hsv_exp, 1e-4); -1 test, 1 passed, 0 known failure, 0 skipped -[inst/estim.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/estim.m -***** shared m, m_exp - sys = ss (-2, 1, 1, 3); - est = estim (sys, 5); - [a, b, c, d] = ssdata (est); - m = [a, b; c, d]; - m_exp = [-7, 5; 1, 0; 1, 0]; -***** assert (m, m_exp, 1e-4); -***** shared m, m_exp - sys = ss (-1, 2, 3, 4); - est = estim (sys, 5); - [a, b, c, d] = ssdata (est); - m = [a, b; c, d]; - m_exp = [-16, 5; 3, 0; 1, 0]; -***** assert (m, m_exp, 1e-4); +[inst/@iddata/fft.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/@iddata/fft.m +***** shared DATD, Y, U + Y = 1:10; + U = 20:-2:1; + W = warning ("query", "iddata:transpose"); + warning ("off", W.identifier); + DAT = iddata (Y, U); + DATD = fft (DAT); + warning (W.identifier, W.state); +***** assert (DATD.y{1}, Y, 1e-10); +***** assert (DATD.u{1}, U, 1e-10); 2 tests, 2 passed, 0 known failure, 0 skipped -[inst/@ss/ss2ss.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/@ss/ss2ss.m -***** test - A = [1 2 3; 4 5 6; 7 8 9]; - B = [1; 2; 3]; - C = [-1 0 1]; - D = 0; - - [T E] = eig(A); - - original_system = ss(A,B,C,D); - transformed_system = ss2ss(original_system,T); - assert(transformed_system.a, [0.5755 2.006 -0.8179; 6.684 13.62 -2.585; -4.476 -7.826 0.8073],e-14); - assert(transformed_system.b, [-0.5789; -3.148; 1.631],e-14); - assert(transformed_system.c, [0.8912 -0.2231 1.112],e-14); - assert(transformed_system.d, 0); - retransformed_system = ss2ss(transformed_system,inv(T)); - assert(original_system.a,retransformed_system.a,e-14); - assert(original_system.b,retransformed_system.b,e-14); - assert(original_system.c,retransformed_system.c,e-14); - assert(original_system.d,retransformed_system.d,e-14); +[inst/@iddata/filter.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/@iddata/filter.m +***** shared DATD, Z + DAT = iddata ({[(1:10).', (1:2:20).'], [(10:-1:1).', (20:-2:1).']}, {[(41:50).', (46:55).'], [(61:70).', (-66:-1:-75).']}); + DATD = detrend (DAT, "linear"); + Z = zeros (10, 2); +***** assert (DATD.y{1}, Z, 1e-10); +***** assert (DATD.y{2}, Z, 1e-10); +***** assert (DATD.u{1}, Z, 1e-10); +***** assert (DATD.u{2}, Z, 1e-10); +4 tests, 4 passed, 0 known failure, 0 skipped +[inst/@iddata/iddata.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/@iddata/iddata.m +***** error (iddata); +***** error (iddata ((1:10).', (1:11).')); +***** warning (iddata (1:10)); +***** warning (iddata (1:10, 1:10)); +4 tests, 4 passed, 0 known failure, 0 skipped +[inst/@iddata/cat.m] +>>>>> /build/reproducible-path/octave-control-4.0.1/inst/@iddata/cat.m +***** error (cat (1, iddata (1, 1), iddata ({2, 3}, {2, 3}))); 1 test, 1 passed, 0 known failure, 0 skipped -[inst/dlyapchol.m] ->>>>> /build/reproducible-path/octave-control-4.0.1/inst/dlyapchol.m -***** shared U, U_exp - - A = [ 0.5000 0.5000 -0.5000 - 0.0000 1.0000 -0.5000 - 1.0000 -0.5000 0.0000 ]; - - B = [ -2.0 ; 1.0 ; -1.0 ]; - - U = dlyapchol (A, B); - - U_exp = [ 5.6042 5.1284 1.9562 - 0.0000 3.4313 -1.6716 - 0.0000 0.0000 2.5621 ]; - -***** assert (U, U_exp, 1e-4); -***** shared U, U_exp - - A = [ 0.5000 0.5000 -0.5000 - 0.0000 1.0000 -0.5000 - 1.0000 -0.5000 0.0000 ]; - - B = [ -2.0 ; 1.0 ; -1.0 ]; - - E = [ 2.0000 0.0000 0.0000 - 0.0000 2.0000 0.0000 - 0.0000 0.0000 2.0000 ]; - - U = dlyapchol (A, B, E); - - U_exp = [ 1.0488 -0.3546 0.4644 - 0.0000 0.6560 -0.5187 - 0.0000 0.0000 0.4099 ]; - -***** assert (U, U_exp, 1e-4); -2 tests, 2 passed, 0 known failure, 0 skipped Checking C++ files ... Done running the unit tests. Summary: 361 tests, 351 passed, 0 known failures, 10 skipped @@ -10837,8 +10873,8 @@ dpkg-gencontrol: warning: package octave-control: substitution variable ${octave:Upstream-Description} unused, but is defined dh_md5sums -O--buildsystem=octave dh_builddeb -O--buildsystem=octave -dpkg-deb: building package 'octave-control' in '../octave-control_4.0.1-1_i386.deb'. dpkg-deb: building package 'octave-control-dbgsym' in '../octave-control-dbgsym_4.0.1-1_i386.deb'. +dpkg-deb: building package 'octave-control' in '../octave-control_4.0.1-1_i386.deb'. dpkg-genbuildinfo --build=binary -O../octave-control_4.0.1-1_i386.buildinfo dpkg-genchanges --build=binary -O../octave-control_4.0.1-1_i386.changes dpkg-genchanges: info: binary-only upload (no source code included) @@ -10846,12 +10882,14 @@ dpkg-buildpackage: info: binary-only upload (no source included) dpkg-genchanges: info: including full source code in upload I: copying local configuration +I: user script /srv/workspace/pbuilder/36597/tmp/hooks/B01_cleanup starting +I: user script /srv/workspace/pbuilder/36597/tmp/hooks/B01_cleanup finished I: unmounting dev/ptmx filesystem I: unmounting dev/pts filesystem I: unmounting dev/shm filesystem I: unmounting proc filesystem I: unmounting sys filesystem I: cleaning the build env -I: removing directory /srv/workspace/pbuilder/8749 and its subdirectories -I: Current time: Tue Nov 19 00:09:31 -12 2024 -I: pbuilder-time-stamp: 1732018171 +I: removing directory /srv/workspace/pbuilder/36597 and its subdirectories +I: Current time: Tue Dec 23 08:34:51 +14 2025 +I: pbuilder-time-stamp: 1766428491