main content

angular rate control in the hl-凯发k8网页登录

this is part 2 of the example series on design and tuning of the flight control system for the hl-20 vehicle. this part deals with closing the inner loops controlling the body angular rates.

control architecture

open the hl-20 model with its flight control system.

open_system('csthl20_control')

this 6-dof model is adapted from (aerospace blockset). the model is configured to simulate the final approach to the landing site. the "guidance system" generates the glideslope trajectory and corresponding roll, angle of attack (alpha), and sideslip angle (beta) commands. the "flight control system" is tasked with adjusting the control surfaces to track these commands. the "controller" block inside the "flight control system" is a variant subsystem with different autopilot configurations.

the "baseline" and "classical" controllers use a classic cascaded-loop architecture with three inner p-only loops to control the angular rates p,q,r, and three outer pi loops to control the angular positions phi,alpha,beta. the six proportional gains and three integral gains are all scheduled as a function of alpha and beta. the "baseline" variant contains the baseline design featured in (aerospace blockset). parts 2 and 3 of this series use the "classical" variant to walk through the tuning process. the active variant is controlled by the workspace variable ctype. set its value to 2 to activate the "classical" variant of the controller.

% select "classical" variant of controller
ctype = 2;
% call model update to make sure only active variant signals are analyzed during linearization
set_param('csthl20_control', 'simulationcommand', 'update');

note that this variant uses a mix of lookup tables and matlab function blocks to schedule the autopilot gains.

setup for controller tuning

in part 1 of this series (), we obtained linearized models of the "hl20 airframe" and "controls selector" blocks for 40 different aircraft orientations (40 different pairs of (alpha,beta) values). load these arrays of linearized models.

load csthl20_trimdata g7 cs
size(g7)
8x5 array of state-space models.
each model has 34 outputs, 9 inputs, and 7 states.
size(cs)
8x5 array of state-space models.
each model has 6 outputs, 5 inputs, and 0 states.

the sltuner interface is a convenient way to obtain linearized models of "csthl20_control" that are suitable for control system design and analysis. through this interface you can designate the signals and points of interest in the model and specify which blocks you want to tune.

st0 = sltuner('csthl20_control');
st0.ts = 0;   % ask for continuous-time linearizations

here the points of interest include the angular and rate demands, the corresponding responses, and the deflections da,de,dr.

ap = {'da;de;dr'
   'hl20 airframe/pqr'
   'alpha_deg'
   'beta_deg'
   'phi_deg'
   'controller/classical/demands'  % angular demands
   'p_demand'
   'q_demand'
   'r_demand'};
st0.addpoint(ap)

since we already obtained linearized models of the "hl20 airframe" and "controls selector" blocks as a function of (alpha,beta), the simplest way to linearize the entire model "csthl20_control" is to replace each nonlinear component by a family of linear models. this is called "block substitution" and is often the most effective way to linearize complex models at multiple operating conditions.

% replace "hl20 airframe" block by 8-by-5 array of linearized models g7
blocksub1 = struct('name','csthl20_control/hl20 airframe','value',g7);
% replace "controls selector" by cs
blocksub2 = struct('name','csthl20_control/flight control system/controls selector','value',cs);
% replace "actuators" by direct feedthrough (ignore saturations and second-order actuator dynamics)
blocksub3 = struct('name','csthl20_control/actuators','value',eye(6));
st0.blocksubstitutions = [blocksub1 ; blocksub2 ; blocksub3];

you are now ready for the control design part.

closing the inner loops

begin with the three inner loops controlling the angular rates p,q,r. to get oriented, plot the open-loop transfer function from deflections (da,de,dr) to angular rates (p,q,r). with the sltuner interface, you can query the model for any transfer function of interest.

% note: the second 'da;de;dr' opens all feedback loops at the plant input
gpqr = getiotransfer(st0,'da;de;dr','pqr','da;de;dr');
bode(gpqr(1,1),gpqr(2,2),gpqr(3,3),{1e-1,1e3}), grid
legend('da to p','de to q','dr to r')

this bode plot suggests that the diagonal terms behave as integrators (up to the sign) beyond 5 rad/s. this justifies using proportional-only control. consistent with the baseline design, set the target bandwidth for the p,q,r loops to 30, 22.5, and 37.5 rad/s, respectively. the gains kp, kq, kr for each (alpha,beta) value are readily obtained from the plant frequency response at these frequencies, and the phase plots indicate that kp should be positive (negative feedback) and kq, kr should be negative (positive feedback).

% compute kp,kq,kr for each (alpha,beta) condition. resulting arrays
% have size [1 1 8 5]
kp = 1./abs(evalfr(gpqr(1,1),30i));
kq = -1./abs(evalfr(gpqr(2,2),22.5i));
kr = -1./abs(evalfr(gpqr(3,3),37.5i));
bode(gpqr(1,1)*kp,gpqr(2,2)*kq,gpqr(3,3)*kr,{1e-1,1e3}), grid
legend('da to p','de to q','dr to r')

to conclude the inner-loop design, push these gain values to the corresponding lookup tables in the simulink model and refresh the sltuner object.

mws = get_param('csthl20_control','modelworkspace');
mws.assignin('kp',squeeze(kp))
mws.assignin('kq',squeeze(kq))
mws.assignin('kr',squeeze(kr))
refresh(st0)

next you need to tune the outer loops controlling roll, angle of attack, and sideslip angle. part 3 of this series () shows how to tune a classic siso architecture and part 4 () looks into the benefits of a mimo architecture.

related topics

    网站地图