%% reachControlledLTISystem
% compute reachable sets for controlled LTI
% system
%
%% Syntax
%
% <html>
%        <div class="syntax">
% [R,auxTerm] = reachControlledLTISystem(Opts,R0,inpSets,Rpar,Rtran) <br>
%        </div>
% </html>
%
%% Description
% This function computes reachable sets for controlled linear
% time-invariant systems under the control law in [1, Eq. (8)]. We
% consider additional terms required for the multiplication of a
% zonotope and an interval matrix separately to ensure convexity of
% the subsequent optimization problem.
%
%% Input Arguments
%
%
% <html>
% <table cellspacing="0" cellpadding="4" width="" border="1" frame="box" rules="none" class="">
% <tbody valign="top">
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%            Opts
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            a structure containing the following options
%        </p>
%        <p class="table">
% <table cellspacing="0" cellpadding="4" width="" border="1" frame="box" rules="none" class="inner">
% <tbody valign="top">
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%            .TpOrTi
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            compute reachable sets at time point only
%            (Opts.TpOrTi = <tt>'Tp'</tt>) or also the time interval
%            reachable sets (Opts.TpOrTi = <tt>'Ti'</tt>)
%        </p>
%    </td>
%    </tr>
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%            .N
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            number of time-steps until safe terminal set is
%            reached starting in safe initial set
%            (positive integer)
%        </p>
%    </td>
%    </tr>
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%            .nx
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            dimension of the state space
%            (positive integer)
%        </p>
%    </td>
%    </tr>
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%            .nu
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            dimension of the control input space
%            (positive integer)
%        </p>
%    </td>
%    </tr>
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%            .XKX
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            feedback matrix for the extended system
%            dynamics
%            (double matrix of dimension Opts.nu,Opts.nx)
%        </p>
%    </td>
%    </tr>
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%            .taylor
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            struct containing the propagation matrices for
%            the linear system
%        </p>
%    </td>
%    </tr>
% </tbody>
% </table>
%        </p>
%    </td>
%    </tr>
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%            R0
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            initial set - horizontal concatenation of the
%            center and generator matrix of the zonotope
%            representing R0, i.e., [R0.c,R0.G]
%            (double matrix)
%        </p>
%    </td>
%    </tr>
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%            inpSets
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            multidimensional array storing the centers and
%            generators of the input correction zonotopes
%            (double array)
%        </p>
%    </td>
%    </tr>
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%            Rpar
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            particluar solution due to uncertain inputs -
%            horiontal concatenation of the center and
%            generator matrix of the zonotope
%            representing Rpar, i.e., [Rpar.c,Rpar.G]
%            (double matrix)
%        </p>
%    </td>
%    </tr>
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%            Rtrans
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            particular solution due to constant inputs  -
%            horiontal concatenation of the center and
%            generator matrix of the zonotope
%            representing Rtrans, i.e., [Rtrans.c,Rtrans.G]
%            (double matrix)
%        </p>
%    </td>
%    </tr>
% </tbody>
% </table>
% </html>
%
%% Output Arguments
%
%
% <html>
% <table cellspacing="0" cellpadding="4" width="" border="1" frame="box" rules="none" class="">
% <tbody valign="top">
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%            R
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            cell-array containing overall reachable sets
%        </p>
%    </td>
%    </tr>
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%            auxTerm
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            cell-array containing auxiliary terms required
%            for the constraints
%        </p>
%    </td>
%    </tr>
% </tbody>
% </table>
% </html>
%
%% See Also
% <computeTermRegZonoLinSyshelp.html |computeTermRegZonoLinSys|>
%
%% References
% * *[1] Gruber et al. (2021)*, Computing safe sets of linear
% sampled-data systems, IEEE Control Syst. Lett., vol. 5,
% no. 2, pp. 385-390
%

%%
% <html>
%   <hr>
%   <p class="copy">&copy; 2018-2026 I6 Technische Universit&auml;t M&uuml;nchen
%        <tt class="minicdot">&#149;</tt>
%        <a href="https://tumcps.github.io/AROC/">Website</a>
%        <tt class="minicdot">&#149;</tt>
%        <a href="file:txts/LICENSE.txt">License</a>
%   </p>
% <div>
% <table>
%  <tr>
%   <td style="background-color:#ffffff; border:0; width:25%; vertical-align:middle; text-align:center">
%             <img src="img/logoAroc.png" alt="logoAroc" height="40px">
%      </td>
%   <td style="background-color:#ffffff; border:0; width:25%; vertical-align:middle; text-align:center">
%      <img src="img/logoCora.png" alt="logoCora" height="40px"></td>
%   <td style="background-color:#ffffff; border:0; width:25%; vertical-align:middle; text-align:center">
%      <img src="img/logoChair.png" alt="logoChair" height="40px"></td>
%   <td style="background-color:#ffffff; border:0; width:25%; vertical-align:middle; text-align:center">
%      <img src="img/logoTum.png" alt="logoTum" height="40px"></td>
%  </tr>
% </table>
% </div>
% </html>
