# tune_rom

Starting from a balanced DLTI, this function determines the number of states N required in a ROM (obtained either through ‘residualisation’ or ‘truncation’ as specified in method - see also librom.modred) to match the frequency response of SSb over the frequency array, kv, with absolute accuracy tol. gv contains the balanced system Hankel singular value, and is used to determine the upper bound for the ROM order N.

Unless kv does not conver the full Nyquist frequency range, the ROM accuracy is not guaranteed to increase monothonically with the number of states. To account for this, two criteria can be used to determine the ROM convergence:

convergence=’all’: in this case, the number of ROM states N is chosen

such that any ROM of order greater than N produces an error smaller than tol. To guarantee this the ROM frequency response is computed for all N<=Nb, where Nb is the number of balanced states. This method is numerically inefficient.

convergence=’min’: atempts to find the minimal number of states to

achieve the accuracy tol.

Note: - the input state-space model, SSb, must be balanced. - the routine in not implemented for numerical efficiency and assumes that SSb is small.