| Description of fxp_alloc |
fxp_alloc
PURPOSE 
FXP_ALLOC - Control allocation using a fixed-point iterations.
SYNOPSIS 
function [u,iter] = fxp_alloc(B,v,umin,umax,Wv,Wu,ud,gam,u,imax)
DESCRIPTION 
CROSS-REFERENCE INFORMATION 
This function calls:
This function is called by:
- alloc_sim ALLOC_SIM - Control allocation simulation.
- qp_ca_sl Wrapper used in the QP control allocation Simulink block.
SOURCE CODE 
0001 function [u,iter] = fxp_alloc(B,v,umin,umax,Wv,Wu,ud,gam,u,imax)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036 m = length(umin);
0037
0038
0039 if nargin < 10
0040 imax = 100;
0041 [k,m] = size(B);
0042 if nargin < 9, u = (umin+umax)/2; end
0043 if nargin < 8, gam = 1e3; end
0044 if nargin < 7, ud = zeros(m,1); end
0045 if nargin < 6, Wu = eye(m); end
0046 if nargin < 5, Wv = eye(k); end
0047 end
0048
0049
0050 x = u - ud;
0051 xmin = umin - ud;
0052 xmax = umax - ud;
0053
0054
0055 e = 1/(gam+1);
0056
0057
0058 m = size(B,2);
0059
0060
0061
0062
0063
0064
0065 BzT_Q1 = B'*Wv'*Wv;
0066
0067 H = (1-e) * (BzT_Q1 * B) + e*Wu'*Wu;
0068
0069 w = 1/norm(H,'fro');
0070
0071
0072 Fv = (1-e) * w * BzT_Q1 * v;
0073 G = w*H - eye(m);
0074
0075 for iter = 1:imax
0076
0077 x = Fv - G*x;
0078
0079 x = max(xmin,min(xmax,x));
0080 end
0081
0082
0083 u = x + ud;
Generated on Wed 25-Aug-2004 14:38:35 by m2html © 2003
|
|