CMU
UM


Function rscale:
Finding the scale factor to eliminate the steady-state error

Below is the function rscale.m. This function will find the scale factor for a full-state feedback system to eliminate the steady-state error. Copy the following text into a file rscale.m, and put it in the same directory as the Matlab software.


function[Nbar]=rscale(A,B,C,D,K)
% Given the single-input linear system: 
%       .
% 		x = Ax + Bu
%   	y = Cx + Du
% and the feedback matrix K,
% 
% the function rscale(A,B,C,D,K) finds the scale factor N which will 
% eliminate the steady-state error to a step reference 
% using the schematic below:
%
%                         /---------\
%      R         +     u  | .	    |
%      ---> N --->() ---->| X=Ax+Bu |--> y=Cx ---> y
%                -|       \---------/
%                 |             | 
%                 |<---- K <----|
%
%8/21/96 Yanjie Sun of the University of Michigan
%        under the supervision of Prof. D. Tilbury
%
s = size(A,1);
Z = [zeros([1,s]) 1];
N = inv([A,B;C,D])*Z';
Nx = N(1:s);
Nu = N(1+s);
Nbar=Nu + K*Nx;

Use your browser's "Back" button to return to the previous page.

8/29/96 YS