📄 tank.m
字号:
% Simple Tank Model%% This is a model of the LabView control system that Lina set up
% in the CPE Unit Ops Lab at UT Austin
function xdot = tank(t,x)global u
% Input (1):
% Inlet Valve State (% Open)
percent_open = u;
% State (1):
% Volume in the Tank (mL)
volume = x;
% Parameters
% Experimentally Determined Outflow Constant (mL^0.5/sec)c_outflow = 0.14;
% Experimentally Determined Inflow Constant (mL/sec)c_inflow = 0.25;
% Compute xdot
xdot(1,1) = (c_inflow * percent_open) - (c_outflow * volume^0.5);
% Low Volume Constraint
low_volume = 265;
if (volume < low_volume) & (percent_open < (c_outflow * low_volume^0.5)/c_inflow),
xdot(1,1) = 0;
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -