Documentation Center 
GRED = bstmr(G) GRED = bstmr(G,order) [GRED,redinfo] = bstmr(G,key1,value1,...) [GRED,redinfo] = bstmr(G,order,key1,value1,...)
bstmr returns a reduced order model GRED of G and a struct array redinfo containing the error bound of the reduced model and Hankel singular values of the phase matrix of the original system [2].
The error bound is computed based on Hankel singular values of the phase matrix of G. For a stable system these values indicate the respective state energy of the system. Hence, reduced order can be directly determined by examining these values.
With only one input argument G, the function will show a Hankel singular value plot of the phase matrix of G and prompt for model order number to reduce.
This method guarantees an error bound on the infinity norm of the multiplicative ∥ GRED–1(GGRED) ∥ ∞ or relative error ∥ G^{}–1(GGRED) ∥ ∞ for wellconditioned model reduction problems [1]:
This table describes input arguments for bstmr.
Argument  Description 

LTI model to be reduced (without any other inputs will plot its Hankel singular values and prompt for reduced order)  
(Optional) an integer for the desired order of the reduced model, or a vector of desired orders for batch runs 
A batch run of a serial of different reduced order models can be generated by specifying order = x:y, or a vector of integers. By default, all the antistable part of a system is kept, because from control stability point of view, getting rid of unstable state(s) is dangerous to model a system.
'MaxError' can be specified in the same fashion as an alternative for 'ORDER'. In this case, reduced order will be determined when the accumulated product of Hankel singular values shown in the above equation reaches the 'MaxError'.
This table describes output arguments.
Argument  Description 

GRED  LTI reduced order model. Become multidimension array when input is a serial of different model order array. 
REDINFO  A STRUCT array with three fields:

G can be stable or unstable, continuous or discrete.
Given a continuous or discrete, stable or unstable system, G, the following commands can get a set of reduced order models based on your selections:
rng(1234,'twister'); G = rss(30,5,4); G.d = zeros(5,4); [g1, redinfo1] = bstmr(G); % display Hankel SV plot % and prompt for order (try 15:20) [g2, redinfo2] = bstmr(G,20); [g3, redinfo3] = bstmr(G,[10:2:18]); [g4, redinfo4] = bstmr(G,'MaxError',[0.01, 0.05]); for i = 1:4 figure(i); eval(['sigma(G,g' num2str(i) ');']); end
[1] Zhou, K., "Frequencyweighted model reduction with L∞ error bounds," Syst. Contr. Lett., Vol. 21, 115125, 1993.
[2] Safonov, M.G., and R.Y. Chiang, "Model Reduction for Robust Control: A Schur Relative Error Method," International J. of Adaptive Control and Signal Processing, Vol. 2, p. 259272, 1988.