prt_rock.m
来自「导弹控制系统的鲁棒控制设计实例」· M 代码 · 共 32 行
M
32 行
%Simulation of the pertrurbed closed-loop rocket stabilization systems
%
sim_rock
%
[pert_1, pert_2, pert_3, pert_4, pert_5, pert_6, pert_7] ...
= ndgrid([-1 1], [-1 1], [-1 1], [-1 1], [-1 1], [-1 1], [-1 1]);
%
for j = 1:128 % 2^7
delta = diag([pert_1(j), pert_2(j), ... % alpha
pert_3(j), pert_4(j), pert_5(j), ... % theta
pert_6(j), pert_7(j)]); % acceleration
clp = starp(delta,starp(sim_ic,K));
%
% response to the reference input
timedata = [0 3 6];
stepdata = [15 -15 15]; % g
tf = 9; % final time value
ref = step_tr(timedata,stepdata,0.01,tf);
noise1 = 0;
noise2 = 0;
noise = abv(noise1,noise2);
y = trsp(clp,abv(ref,noise),tf,0.01);
figure(1)
vplot(ref,'m--',sel(y,3,1),'c-')
hold on
end
%
grid
title('Transient responses of the perturbed systems')
xlabel('Time (secs)')
ylabel('n_{y} (g)')
hold off
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?