clp_rock.m

来自「导弹控制系统的鲁棒控制设计实例」· M 代码 · 共 43 行

M
43
字号
% Simulation of the closed-loop rocket stabilization system
%
% flight time
t = input ('Enter time t = ');
% closed-loop interconnection
sim_rock
clp_ic = starp(sim_ic,K);
%
% response to the reference input
timedata = [0 3 6];
stepdata = [15 -15 15];   % g
tf = 9;                   % final time value
pert = abv(0,0,0,0,0,0,0);
ref = step_tr(timedata,stepdata,0.001,tf);
noise1 = 0;
noise2 = 0;
noise = abv(noise1,noise2);
y = trsp(clp_ic,abv(pert,ref,noise),tf,0.001);
%
figure(1)
vplot(ref,'m--',sel(y,10,1),'c-'), grid
title('Response in n_{y}')
xlabel('Time (secs)')
ylabel('n_{y} (g)')
%legend('r','n_{y1}',4)
%
figure(2)
vplot(sel(y,9,1),'c-'), grid
title('Response in d\theta/dt')
xlabel('Time (secs)')
ylabel('d\theta/dt (rads/sec)')
%
figure(3)
vplot(sel(y,11,1),'r-'), grid
title('Fins deflection')
xlabel('Time (secs)')
ylabel('\delta (rads)')
%
figure(4)
vplot(sel(y,12,1),'r-'), grid
title('Closed-loop control')
xlabel('Time (secs)')
ylabel('\delta^o (rads)')

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?