============================================================================ >>> pSARC SARC_ALLOC( pMIMO pmimo , string *instname ) The "SARC_ALLOC" function allocates a SARC data structure DIMENSIONED to handle the MIMO circuit passed in parameter The relevant MIMO informations are duplicated in the SARC data structure THEREFORE, the user should in fact access ALL its relevant model informations, never through a "pMIMO" pointer, but through the "pSARC" pointer returned by the call ============================================================================ >>> int SARC_STEPY( pSARC psarc , MIMO_FTYPE *array_Y , MIMO_FTYPE *array_U ) The "SARC_STEPY" function computes the "Y" output vector resulting from the SARC STEP evaluation on the "U" input vector In order to take into account the latest simulation setup, the function FIRST checks if any modeling parameters have changed: psarc->h or any psarc->RLC[ k ] component values THEN, and only when NECESSARY, the matrices A, B, C , D , ... are recalculated FINALLY, and only when "array_U" is NOT a NULL pointer, the "Y" STEP evaluation is performed The return value will be 0 if no matrice recalculation performed 1 001 if "h" was found different 2 010 if some "R" components have changed 4 100 if some "L" or "C" components have changed ( thus, forcing a "STATE" vector "BURST" ) n xxx the bitwise "OR" value of the 001, 010, 100 Therefore a positive return value corresponds to the kind of percussion expected NOTE: This package implements a SARC "S0B" therefore the FIRST CALL of this function returns a vector of ZEROS ============================================================================ >>> void SARC_ERRY( pSARC psarc , MIMO_FTYPE *array_YE , MIMO_FTYPE *array_YM ) The "SARC_ERRY" function computes the "Y" vector ERRORs resulting from the input vector "U" INTERPOLATION STEP with YE[ k ] is the Y[ k ] output INTERPOLATION STEP ERROR YM[ k ] is the Y[ k ] output MAX( ABS ( INTERPOLATION STEP ERROR ) ) Therefore, at the end of the simulation, YM[ k ] contains a MAJORANT of the overall Y[ k ] output RUNTIME ERROR WARNING: when enabled, this call must be performed AFTER the "SARC_STEPY )" function NOTE: This package implements a SARC "S0B" therefore the FIRST CALL of this function returns vectors of ZEROS ============================================================================ >>> void SARC_POLES( pSARC psarc , MIMO_FTYPE *POLES ) This function CALCULATES the "POLES" (that are the psarc->A "EIGEN" values) and SAVES them as a matrix POLES[ n , 2 ] with POLES[ k , 0 ] = REAL part and POLES[ k , 1 ] = IMAGINARY part DIMENSION: POLES[ nstate ][ 2 ] ============================================================================ >>> void SARC_PRINTPOLES( pSARC psarc ) This function CALCULATES the "POLES" (that are the psarc->A "EIGEN" values) and PRINTS them as a matrix POLES[ n , 2 ] with POLES[ k , 0 ] = REAL part and POLES[ k , 1 ] = IMAGINARY part ============================================================================ >>> The "sarc_printmatrix" function is not to be called directly The "SARC_api.h" MACRO SARC_PRINTMATRIX( psarc , mat ) does "printf" the content of the SARC EIGEN matrix "pSARC->mat" example: SARC_PRINTMATRIX( psarc , A ) does printf ======== >>> SARC MIMO_rlc -> i1 -> POLES -5.000000000000E+02 3.161882350752E+04 -5.000000000000E+02 -3.161882350752E+04 ============================================================================