| Description of qp_ca_sl |
qp_ca_sl
PURPOSE 
Wrapper used in the QP control allocation Simulink block.
SYNOPSIS 
function u = qp_ca_sl(arg,B,plim,rlim,T,Wv,Wu,ud,alg,imax,gam,tol)
DESCRIPTION 
CROSS-REFERENCE INFORMATION 
This function calls:
- cgi_alloc CGI_ALLOC - Control allocation based on cascading generalized inverses.
- fxp_alloc FXP_ALLOC - Control allocation using a fixed-point iterations.
- ip_alloc IP_ALLOC - Control allocation using interior point method.
- mls_alloc MLS_ALLOC - Control allocation using minimal least squares.
- sls_alloc SLS_ALLOC - Control allocation using sequential least squares.
- wls_alloc WLS_ALLOC - Control allocation using weighted least squares.
- wlsc_alloc WLSC_ALLOC - C implementation of WLS_ALLOC.
This function is called by:
SOURCE CODE 
0001 function u = qp_ca_sl(arg,B,plim,rlim,T,Wv,Wu,ud,alg,imax,gam,tol)
0002
0003
0004
0005
0006 [k,m] = size(B);
0007
0008
0009 v = arg(1:k);
0010 uprev = arg(k+1:end);
0011
0012
0013 if isempty(rlim)
0014 umin = plim(:,1);
0015 umax = plim(:,2);
0016 else
0017 umin = max(plim(:,1),uprev+rlim(:,1)*T);
0018 umax = min(plim(:,2),uprev+rlim(:,2)*T);
0019 end
0020 u0 = mean([umin umax]')';
0021 W0 = zeros(m,1);
0022
0023 switch lower(alg)
0024 case 'sls'
0025 u = sls_alloc(B+j,v,umin,umax,Wv,Wu,ud,u0,W0,imax);
0026 case 'mls'
0027 u = mls_alloc(B,v,umin,umax,Wv,Wu,ud,u0,W0,imax);
0028 case 'wls'
0029 u = wls_alloc(B,v,umin,umax,Wv,Wu,ud,gam,u0,W0,imax);
0030 case 'wlsc'
0031 u = wlsc_alloc(B,v,umin,umax,Wv,Wu,ud,gam,u0,W0,imax);
0032 case 'ip'
0033 u = ip_alloc(B,v,umin,umax,ud,gam,tol,imax);
0034 case 'fxp'
0035 u = fxp_alloc(B,v,umin,umax,Wv,Wu,ud,gam,u0,imax);
0036 case 'cgi'
0037 u = cgi_alloc(B,v,umin,umax,Wv,Wu,ud);
0038 end
Generated on Wed 25-Aug-2004 14:38:35 by m2html © 2003
|
|