%% param_approxAbstrErrLin
% computes a parameterized approximation of the
% abstraction error and its reachable set for the successive
% convexification approach.
%
%% Syntax
%
% <html>
%        <div class="syntax">
% [paramAbstrErr,paramReachAbstrErr] = param_approxAbstrErrLin(R_delta,R_delta_tr,opts) <br>
%        </div>
% </html>
%
%% Description
% This function computes a parameterized approximation of the
% abstraction error for the successive convexification approach,
% which is based on the conservative linearization approach for
% reachablity analysis of nonlinear systems [2]. The approximation is
% the quadratic function proposed in [1], which satisfies the
% conditions characterizing suitable approximations of the Lagrange
% remainderdefined therein.
%
%% Input Argument
%
% <html>
% <table cellspacing="0" cellpadding="4" width="" border="1" frame="box" rules="none" class="">
% <tbody valign="top">
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%             termReg
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            terminal region (class: zonotope)
%        </p>
%    </td>
%    </tr>
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%             termReg_tr
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            termReg enlarged by the trust region
%            (class: zonotope)
%        </p>
%    </td>
%    </tr>
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%             opts
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            structure containing the algorithm settings
%        </p>
%    </td>
%    </tr>
% </tbody>
% </table>
% </html>
%
%% Outputs
%
% <html>
% <table cellspacing="0" cellpadding="4" width="" border="1" frame="box" rules="none" class="">
% <tbody valign="top">
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%             lagrRem
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            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">
%            .set
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            zonotope representing the (parameterized) Lagrange
%            remainder
%        </p>
%    </td>
%    </tr>
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%            .idx
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            generator to index (XxUxW) map for parameterized
%            generators
%        </p>
%    </td>
%    </tr>
% </tbody>
% </table>
%        </p>
%    </td>
%    </tr>
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%            abstr_error
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            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">
%            .param_set
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            quadratic part of the error solution
%            (class: zonotope)
%        </p>
%    </td>
%    </tr>
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%            .exp_set
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            terms for extrapolation of the error
%            solution (class: zonotope)
%        </p>
%    </td>
%    </tr>
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%            .const_set
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            constrant part of the error solution
%            (class:zonotope)
%        </p>
%    </td>
%    </tr>
%    <tr bgcolor="#F2F2F2">
%    <td>
%        <p class="table">
%            .var
%        </p>
%    </td>
%    <td>
%        <p class="table">
%            indices of states that for the
%            parameterization of field param_set
%        </p>
%    </td>
%    </tr>
% </tbody>
% </table>
%        </p>
%    </td>
%    </tr>
% </tbody>
% </table>
% </html>
%
%% See also
% <terminalRegionhelp.html |terminalRegion|>, <termRegNonlinSysLinApproachhelp.html |termRegNonlinSysLinApproach|>
%
%% References
% [1] L. Schäfer et al. "Scalable Computation of Robust Control
% Invariant Sets of Nonlinear Systems", 2023, IEEE Transactions
% on Automatic Control
% [2] M. Althoff et al. "Reachability Analysis of Nonlinear Systems
% with Uncertain Parameters using Conservative Linearization",
% 2008 47th IEEE Conference on Decision and Control, 2008,
% pp. 4042-4048
%

%%
% <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>
