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

📄 psim_lin.m

📁 CheckMate is a MATLAB-based tool for modeling, simulating and investigating properties of hybrid dyn
💻 M
字号:
function R = psim_lin(A,b,X0,T,N)

% Compute flow pipe approximations for the `linear` (affine) dynamics
% "dx/dt = A*x + b".
%
% Syntax:
%   "R = psim_lin(A,b,X0,T,N)"
%
% Description:
%   The inputs are
%
%   * "A": the system matrix
%
%   * "b": constant input vector for the affine dynamics
%
%   * "X0": a "linearcon" object represeting the initial set
%
%   * "T": time step for the flow pipe approximation
%
%   * "N": number of steps (flow pipe segments) to compute
%
%   The output "R" is a cell array of "linearcon" objects, each representing
%   an approximation to a flow pipe segments.
%
% See Also:
%   fs_lin_map,seg_approx_lin,step_response,stretch_func_lin,linearcon,
%   transform

% If a is invertible, precompute its inverse
if rank(A) == size(A,1)
  Ainv = inv(A);
else
  Ainv = [];
end

if N < 1
  return
end

R = {};
SP0 = vertices(X0);
% approximate the first segment from t = 0 to t = T
R{1} = seg_approx_lin(A,Ainv,b,X0,SP0,T);
eAT = expm(A*T);
displacement = step_response(A,Ainv,b,T);
% apply affine transformation to obtain the rest of the segments
for k = 2:N
  R{k} = transform(R{k-1},eAT,displacement);
end

⌨️ 快捷键说明

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