<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 2016 - Serge Steer - INRIA
 *
 * This file is hereby licensed under the terms of the GNU GPL v2.0,
 * pursuant to article 5.3.4 of the CeCILL v.2.1.
 * For more information, see the COPYING file which you should have received
 * along with this program.
 *
 -->
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
          xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML"
          xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org"
          xml:lang="en" xml:id="ss2zp">
    <refnamediv>
        <refname>ss2zp</refname>
        <refpurpose>SIMO state space system to zero pole gain representation</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Syntax</title>
        <synopsis>[z, p, k] = ss2zp(S)</synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Arguments</title>
        <variablelist>
            <varlistentry>
                <term>S</term>
                <listitem>
                    <para>
                        a single input linear system in state space representation.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>z</term>
                <listitem>
                    <para>
                        a matrix, the ith column contains the transmission zeros relative to the ith output.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>p</term>
                <listitem>
                    <para>
                        a column vector, the poles of the system
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>k</term>
                <listitem>
                    <para>
                        a column vector, the ith element contains the gain  relative to the ith output.
                    </para>
                </listitem>
            </varlistentry>

        </variablelist>
    </refsection>
    <refsection>
        <title>Description</title>
        <para>
            Converts a SIMO state space system into zero pole gain representation.
        </para>
        <para>
            The zeros and gain are computed using the upper triangular
            Kronecker form (see <link linkend="kroneck">kroneck</link>)
            of the matrix pencil
            <latex><![CDATA[\left[\begin{array}{ll}A-s I& B\\C &
          D\end{array}\right]]]></latex>
        </para>
    </refsection>
    <refsection>
        <title>Examples</title>
        <programlisting role="example"><![CDATA[
a=[ 0.9, 0,   -4.2;
    0.2, 0.1,  0.6;
    6.4, 0.1,  -4];

b=[-0.1;0;-0.1];
c=[2,0,-2;0,-1,3];
d=[2;0];
S=syslin('c',a,b,c,d);
[z,p,k]=ss2zp(S)

h=ss2tf(S(1,1))
roots(h.num)
 ]]></programlisting>
        </refsection>
        <refsection>
            <title>References</title>
            <para>
                A. Emami-Naeini, P. Van Dooren "CComputation of zeros of linear multivariable systems" Automatica. Vol. 18, 1982, p. 415
            </para>
        </refsection>
        <refsection role="see also">
            <title>See Also</title>
            <simplelist type="inline">
                <member>
                    <link linkend="trzeros">trzeros</link>
                </member>
                <member>
                    <link linkend="systmat">systmat</link>
                </member>
                <member>
                    <link linkend="kroneck">kroneck</link>
                </member>
                <member>
                    <link linkend="zp2ss">zp2ss</link>
                </member>
            </simplelist>
        </refsection>
        <refsection role="history">
            <title>History</title>
            <revhistory>
                <revision>
                    <revnumber>6.0</revnumber>
                    <revdescription>
                        <para>Function added.</para>
                    </revdescription>
                </revision>
            </revhistory>
        </refsection>

    </refentry>
