VPlot understanding
조회 수: 6 (최근 30일)
이전 댓글 표시
Hi
I am not too familiar with vplot and the Robust Control Toolbox and I have an error I dont understand:
First the codes Program olp_rock.m
% Generates the open-loop connection for the
% rocket stabilization system and displays
% frequency responses
% olp_rock.m
clear
%-----------------------------------------------------
% flight time
t = 50;
% open-loop interconnection
sys_rock
%
% nominal frequency response
G_ny1_u = sel(G_rock,10,8);
[A,B,C,D] = unpck(G_ny1_u);
omega = logspace(-1,3,10000);
[magp phasep] = bode(A,B,C,D,1,omega);
mag = 20*log10(magp);
figure(1)
semilogx(omega,mag,'r'), grid
xlabel('Frequency (rad/s)'), ylabel('Magnitude')
title('Magnitude plot of G_{n_{y}\delta^o}')
figure(2)
semilogx(omega,phasep,'b'), grid
xlabel('Frequency (rad/s)'), ylabel('Phase (deg)')
title('Phase plot of G_{n_{y}\delta^o}')
%
omega = logspace(-1,5,100);
Wa_g = frsp(Wa,omega);
figure(5)
vplot('liv,lm',Wa_g,'m-'), grid
title('Accelerometer frequency response')
xlabel('Frequency (rad/sec)')
ylabel('Magnitude')
%
omega = logspace(-1,5,100);
Wan_g = frsp(Wan,omega);
figure(6)
vplot('liv,lm',Wan_g,'m-'), grid
title('Accelerometer noise weight')
xlabel('Frequency (rad/sec)')
ylabel('Magnitude')
%
omega = logspace(-1,5,100);
Wg_g = frsp(Wg,omega);
figure(3)
vplot('liv,lm',Wg_g,'m-'), grid
title('Rate gyro frequency response')
xlabel('Frequency (rad/sec)')
ylabel('Magnitude')
%
omega = logspace(-1,5,100);
Wgn_g = frsp(Wgn,omega);
figure(4)
vplot('liv,lm',Wgn_g,'m-'), grid
title('Rate gyro noise weight')
xlabel('Frequency (rad/sec)')
ylabel('Magnitude')
%
omega = logspace(-2,3,100);
Wm_g = frsp(Wm,omega);
figure(7)
vplot('liv,lm',Wm_g,'r-'), grid
title('Model frequency response')
xlabel('Frequency (rad/sec)')
ylabel('Magnitude')
%
omega = logspace(-4,2,200);
Wp_g = frsp(Wp,omega);
Wpi_g = minv(Wp_g);
figure(8)
vplot('liv,lm',Wpi_g,'r-'), grid
title('Inverse of Performance Weighting Function')
xlabel('Frequency (rad/sec)')
ylabel('Magnitude')
and sys_rock
% Generates the open-loop connection for the
% rocket stabilization system
%
% rocket model
mod_rock
% sensor models
wsa_rock
% weighting functions
wts_rock
%
systemnames = ' G_rock Wa Wan Wg Wgn Wm Wp Wu ';
inputvar = '[ pert{7}; ref; noise{2}; control ]';
outputvar = '[ G_rock(1:7); Wp; Wu; 0.4*ref - Wa - Wan; -Wg - Wgn ]';
input_to_G_rock = '[ pert; control ]';
input_to_Wa = '[ G_rock(10) ]';
input_to_Wan = '[ noise(1) ]';
input_to_Wg = '[ G_rock(9) ]';
input_to_Wgn = '[ noise(2) ]';
input_to_Wm = '[ ref ]';
input_to_Wp = '[ G_rock(10) - Wm ]';
input_to_Wu = '[ control ]';
sysoutname = 'sys_ic';
cleanupsysic = 'yes';
sysic
The error when I try to run Olp_rock occurs at Line 31
Error in ==> vplot at 262
[nt,nr,nc,npts] = minfo(a);
Error in ==> olp_rock at 31
vplot('liv,lm',Wa_g,'m-'), grid
Attempt to execute SCRIPT a as a function:
C:\Users\Paule\Documents\MATLAB\a.m
I dont know how to correct that. And up until then the programm is fine, it gives me two diagramms.
Thanks for the help Jub
댓글 수: 0
답변 (1개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!