⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 one_step_of_controller.m

📁 CheckMate is a MATLAB-based tool for modeling, simulating and investigating properties of hybrid dyn
💻 M
字号:
function [x_contr,nx,nz] = one_step_of_controller(X,t0,ode_param)

%This function propagates the controller states forward one sample step.


global GLOBAL_PIHA

if length(GLOBAL_PIHA.SCSBlocks)>1|length(ode_param)>1
    error('Sampled data analysis currently only supports systems with one SCSB and one FSM.')
end
    
swfunc = GLOBAL_PIHA.SCSBlocks{1}.swfunc;
nx = GLOBAL_PIHA.SCSBlocks{1}.nx;
nz = GLOBAL_PIHA.SCSBlocks{1}.nz;
nup = GLOBAL_PIHA.SCSBlocks{1}.nup;

X(nx+nz+1:nx+nz+nup,1) = zeros(nup,1);

%Time varying case:
%[sys,type] = feval(swfunc,X,ode_param,t0);

[sys,type] = feval(swfunc,X,ode_param);

x_contr(1:nx) = zeros(nx,1);
x_contr(nx+1:nx+nz) = sys(nx+1:nx+nz);

return

⌨️ 快捷键说明

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