MATLAB: Is it possible to scale the LTI models for greater accuracy in Control Systems Toolbox 6.0 (R14)

Control System Toolbox

I have created a stable transfer function in Control System toolbox 6.0(R14). However, when I try to plot the step and impulse responses for this transfer function using the STEP and IMPULSE functions, the response does not appear to be completely stable.
I would like to introduce some scaling to this transfer function so that the generated step and impulse responses are completely stable.

Best Answer

The ability to scale the LTI models is available with the help of the PRESCALE function in Control System Toolbox 8.2 (R2008b). Note that the LTI model must be in state space form before it is passed in to the PRESCALE function.
For previous versions of the Control System Toolbox, refer to an example below in which a transfer function is scaled using the appropriate coefficients.
num = [8.76e+020 4.06464e+027];
den = [1 6.8e+007 3.09e+014 4.38e+020 2.03e+026];
pzmap(num,den) % Poles are on the left half of s-plane. System is stable.
step(num,den); %Response appears to be tending to a steady state value.
s = 1e6; % Introduction of the scaling coefficients. Replacing s with 1e6 in the %following step & divide numerator and denominator by 1e25
v = s .^ [4 3 2 1 0];
den1 = ( den .* v )/ 1e25;
num1 = ( num .* [ss 1]) / 1e25;
step(num1,den1)% Now, the response is much more stable.
In the stable response plot, we notice that time has also been scaled by a factor of 1e6. For a better understanding of the significance of scaling, we could also inspect the condition number for the system matrix A.
The condition number of a matrix measures the sensitivity of the solution of a system of linear equations to errors in the data. It gives an indication of the accuracy of the results from matrix inversion and the linear equation solution. Condition numbers with values closer to 1 indicate well conditioned matrices.
This inspection can be done for each of the above two cases as follows.
[a1 b1 c1 d1]=tf2ss(num,den); % not scaled
[a2 b2 c2 d2]=tf2ss(num1,den1); % scaled
cond(a1) % Condition number of the non scaled matrix a1
cond(a2) % Condition number of the scaled matrix a2