tank_init.m

来自「一些基于matlab/simulink的模型」· M 代码 · 共 32 行

M
32
字号
function tank_init%%% Initialize kernelttInitKernel(2, 1, 'prioFP'); % nbrOfInputs, nbrOfOutputs, FP%%% Initialize data structure for controller taskdata.u = 0;  % used to store the control signaldata.K = 3;  % the gain of the controller% These variables are used to implement integral action%data.e = 0; % error state%data.I = 0; % integral state%data.Ti = 0.3; % integral time%data.h = 0.05; % sampling interval%%% Create controller taskperiod = 0.05;prio = 8;ttCreatePeriodicTask('Regul', period, prio, 'regulcode', data);

⌨️ 快捷键说明

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