亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? seg_approx_vrclock.m

?? CheckMate is a MATLAB-based tool for modeling, simulating and investigating properties of hybrid dyn
?? M
字號:
function [SEG,SPf] = seg_approx_VRClock(sys_eq,ode_param,X0,SP0,Pcon)

% Approximate a single segment of a flow pipe for a `nonlinear` dynamics.  
% This particular segment approximation routine is for a variable clock, sampled
% data system.  In such systems, a there is a clock present whose sample period is
% a function of the continuous valued states of the system.
%
% Syntax:
%   "[SEG,SPf] = seg_approx_ode(sys_eq,ode_param,X0,SP0,t0,tf)"
%
% Description:
%   Compute a conservative approximation of a flow pipe segment in the time
%   interval "[t0,tf]" for the `nonlinear` dynamics "dx/dt = f(x)". The
%   inputs to this function are
%
%   * "sys_eq": string containing file name of the derivative function
%     for the ODE (i.e., overall_system_ode in the directory \util)
%
%   * "ode_param": optional parameters for the ODE file
%
%   * "X0": a "linearcon" object representing initial set
%
%   * "SP0": sample points that are simulated to construct the convex hull,
%     given at time t0
%
%   * Pcon : linearcon object representing the constraint on the parameters.
%
%   The outputs of this function are
%
%   * "SEG": a "linearcon" object (a polytope) representing the flow pipe
%     segment approximation.
%   
%   * "SFf":  sample points the are simulated from "SP0" to the time "tf".
%
% Implementation:
%   To approximate the flow pipe segment, we first simulate the sample
%   points from times "t = t0" to "t = tf" and compute the convex hull of
%   the sample points at time "t = t0" and "t = tf". After the convex hull
%   is obtained, we extract the matrix-vector pair "[CI,dI]" that represents
%   the linear inequality "CI*x <= dI" for the convex hull. The normal
%   vectors for the faces of the conex hull, which are the rows of the
%   matrix "CI", are used to solve the optimization problem.
%
%
%   
%   "max (x0 in X0, t in [0,T]) ci'*x(t,x0)"
%
%
%
%   where "ci" is the "i"-th normal vector and "x(t,x0)" denotes the
%   solution to the nonlinear differential equation. The above optimization
%   problem is solved by calling the MATLAB routine for solving constrained
%   nonlinear optimization problem "constr". The computation of the
%   objective function, which includes numerical intregration of the ODE to
%   find the solution "x(t,x0)" from "x0" at time "t" is done in the
%   function "stretch_func_ode()".
%
%
%
%   After solving the optimization problem, we adjust the inequality
%   constraints for the convex hull to be "CI*x <= dInew" where "dInew(i)"
%   is the solution obtained for the "i"-th optimization problem. This, in
%   effect, expands the convex hull to cover the flow pipe segment. Put the
%   new linear inequality constraints into a "linearcon" object, call the
%   function "clean_up()" to remove redundant constraints, and return the
%   result.
%   
%
% See Also:
%   stretch_func_lin,step_response,psim_lin,fs_lin_map,linearcon,transform,
%   clean_up

% [SEG,SPf] = seg_approx_ode(sys_eq,ode_param,X0,SP0,t0,tf)
% Compute the outer approximation of the flow pipe segment from t0 to tf

% Simulate the vertices.  The amount of time each vertex will be simulated depends on its 
% initial condition.  Thus the function used to determine this sample time must be called 
% for each vertex.  Also note that there is a distinction between the continuous portion of
% the system dynamics and the discrete-time portion.  The result of the evolution of the 
% continuous-time portion will, obviously, be affected by the sample-time, while the discrete-
% time portion will not.  Here, the first nx states are continuous-time and the first nz states
% are discretet-time.




% Simulate sample points from t0 to tf
if tf~=t0
   [SPi,Siminfi] = simulate_points(SP0,sys_eq,ode_param,t0,Pcon);
   [SPf,Siminff] = simulate_points(SP0,sys_eq,ode_param,tf,Pcon);
   SPi=vertices(polyhedron(SPi)); % Removes unnecessary vertices
   CH = polyhedron(SPi | SPf);
elseif t0==0
   SPf = SP0;
   SEG=linearcon(polyhedron(SP0));
   return
else
   [SPf,Siminff] = simulate_points(SP0,sys_eq,ode_param,t0,Pcon);
   CH = polyhedron(SPf);
end

SPf=vertices(polyhedron(SPf)); % Removes unnecessary vertices

% Compute convex hull from these extreme points
[CE,dE,CI,dI] = linearcon_data(linearcon(CH));
[CInew,dInew] = shwrap_ode(CI,sys_eq,ode_param,X0,t0,tf,Pcon,Siminff);
for k = 1:length(dI)
  if (dInew(k) > dI(k))
    dI(k) = dInew(k);
  else
    if (dInew(k) < dI(k) - poly_param('epsilon'))
      fprintf(1,['Warning: Optimization result is not reliable, falling' ...
	    ' back to the convex hull approximation\n']);
    end
  end
end
SEG = clean_up(linearcon([],[],CI,dI));
return

% -----------------------------------------------------------------------------

function [Pf, Siminf] = simulate_points(X0,sys_eq,ode_param,tf,Pcon);
X0=vertices(X0);
Siminf=[];
Param=vertices(Pcon);
Pf = vertices;
if isempty(Param) 
    for k = 1:length(X0)
        % syntax: ODE45('F',TSPAN,Y0,OPTIONS,P1,P2,...)
        [T,X] = ode45(sys_eq,[0 tf],X0(k),[],ode_param,[]);
        Pf = Pf | X(end,:)';
        Siminf=[Siminf; struct('X0',X0(k),'P0',[],'T',T,'X',X)];
    end;
else
    for i=1:length(Param)
        for k = 1:length(X0)
            % syntax: ODE45('F',TSPAN,Y0,OPTIONS,P1,P2,...)
            [T,X] = ode45(sys_eq,[0 tf],X0(k),[],ode_param,Param(i));
            Pf = Pf | X(end,:)';
            Siminf=[Siminf; struct('X0',X0(k),'P0',Param(i),'T',T,'X',X)];
        end;
    end;
end;
return

% -----------------------------------------------------------------------------

function [C,d] = shwrap_ode(C,sys_eq,ode_param,X0,t0,tf,Pcon,Siminf)

% Shrink wrap the flow pipe segment in a polytope using the normal vectors
% stored in the rows of the given matrix C, i.e. compute the smallest linear
% constraint set given the set of directions C that contains the flow pipe
% segment from t0 to tf.
% C             : a set of directions stacked together in a matrix
% sys_eq        : a string containing file name of the derivative
%                 function for the ODE
% ode_param     : optional parameters for the ODE file
% X0            : a constraint representing initial set X0
% t0/tf         : start/final time with respect to X0
% Pcon : A linearcon object representing the constraint on the parameters.
%   Siminf : A structure that records information about the trajectory
%       Siminf.X0 = initial point for the trajectory
%       Siminf. P0 = parameter used for computing the trajectory
%       Siminf.T = vector of simulation times for the trajectory
%       Siminf.X = vector of simulated points. 

% Siminfo contains information from the simulation in order to make a better 
% initial guess

% extract linear inequality constraints defining X0

[CE,dE,CI,dI] = linearcon_data(X0);
[CPE,dPE,CPI,dPI] = linearcon_data(Pcon);

% (1) inequality constraints

    [CIn,CIm]=size(CI);
    [CPIn,CPIm]=size(CPI);

    % Remember the dimensions of the state space.
    dimension=CIm;


    if tf~=t0
       fminCI=[CI,zeros(CIn,CPIm+1);zeros(1,CIm) 1 zeros(1,CPIm); zeros(1,CIm) -1 zeros(1,CPIm);zeros(CPIn,CIm+1), CPI];
       fmindI=[dI;tf;-t0;dPI];
    else
       fminCI=[CI,zeros(CIn,CPIm);zeros(CPIn,CIm), CPI];
       fmindI=[dI;dPI];
    end

    % (2) equality constraints (not dependent on t)
    [CEn,CEm]=size(CE);
    [CPEn,CPEm]=size(CPE);

    fminCE=[];
    fmindE=[];
    if ~isempty(CE)
        fminCE=[CE,zeros(CEn,CPIm+1)];%CPIm+1
        fmindE=dE;
    end;
    if ~isempty(CPE)
        fminCE=[fminCE;zeros(CPEn,CIm+1),CPE];%CIm+1
        fmindE=[fmindE;dPE];
    end;

% (3) Set the optimization parameters

V = vertices(X0);
P = vertices(Pcon);
options = optimset;
options.TolFun =0.2*1e-9;%f(3) of foptions
options.iter = 4e8*size(C,2);%f(14) of foptions
options.Display=['off'];
options.Diagnostics=['off'];
options.LargeScale=['off'];

% Stretch along each given direction to cover the flow pipe segment
d = zeros(size(C,1),1);        


% (4) Optimize for each direction

for l = 1:size(C,1)
  n_vector = C(l,:)';
  dlmax = Inf;
  
  if tf~=t0
      % compute the best initial state 
      % Store in " tindex"  the index of the time elements of  the vector Siminf(1).T that are greater than t0
      %
      [ts,tindex]=setdiff(Siminf(1).T.*(Siminf(1).T>=t0),0);
      % Computer the max arg i C'x(i)
      [minnx,nx_index]=min(-n_vector'*Siminf(1).X(tindex,:)');
      Pinit=Siminf(1).P0;
      Xinit=Siminf(1).X0;
      Tinit=Siminf(1).T(tindex(nx_index));
      for k0=2:length(Siminf)
          [ts,tindex]=setdiff(Siminf(k0).T.*(Siminf(k0).T>=t0),0);
          [nx,nx_index]=min(-n_vector'*Siminf(k0).X(tindex,:)');
          if nx<minnx
              minnx=nx;
              Pinit=Siminf(k0).P0;
              Xinit=Siminf(k0).X0;
              Tinit=Siminf(k0).T(tindex(nx_index));
          end;
      end;

    else % tf==t0
      Pinit=Siminf(1).P0;
      Xinit=Siminf(1).X0;
      Tinit=[];

    end;
        
    [Xopt,dl] = fmincon('stretch_func_ode',[Xinit;Tinit;Pinit], fminCI,fmindI, fminCE,fmindE,[],[],[],options,...
             sys_eq,ode_param,n_vector,t0,tf,dimension);
    
    % The end of my hack  <- Ansgar
    if (dl < dlmax)
        dlmax = dl;
    end
    d(l) = -dlmax;
end
return


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
69久久夜色精品国产69蝌蚪网| 久久国产精品区| 久久er99热精品一区二区| 日本一区二区免费在线 | 亚洲免费资源在线播放| 成人性视频免费网站| 久久综合999| 国产在线国偷精品产拍免费yy| 一区二区三区av电影| 不卡免费追剧大全电视剧网站| 日本一区二区三区在线观看| 欧美日韩国产欧美日美国产精品| 亚洲综合色视频| 色一情一乱一乱一91av| 亚洲激情网站免费观看| 欧美老女人第四色| 美女性感视频久久| 国产人成亚洲第一网站在线播放 | 91亚洲精华国产精华精华液| 中文字幕欧美日本乱码一线二线| 成人avav影音| 国产福利一区二区三区| 一区二区国产视频| 国产精品久久午夜| 一本色道a无线码一区v| 岛国av在线一区| 国产成a人亚洲精品| 亚洲乱码国产乱码精品精可以看| 国产午夜亚洲精品理论片色戒| 99精品国产99久久久久久白柏| 亚洲国产精品久久人人爱蜜臀| 欧美福利一区二区| 精品视频一区 二区 三区| 激情综合色丁香一区二区| 欧美一区二区啪啪| 国产成人午夜高潮毛片| 国产一区二区视频在线播放| 精品一区二区三区免费毛片爱| 日韩国产一区二| 久久久99精品久久| 久久久国产一区二区三区四区小说 | 国产喷白浆一区二区三区| 久久精品一区二区| 日本一区二区视频在线观看| 日本一区二区三区国色天香| 国产精品久久毛片av大全日韩| 亚洲欧美在线视频观看| 日韩女优毛片在线| 成人av免费在线观看| 99精品一区二区三区| 久久久99精品久久| 欧美激情综合五月色丁香| 国产精品热久久久久夜色精品三区| 色琪琪一区二区三区亚洲区| 日本高清不卡aⅴ免费网站| 国内精品国产三级国产a久久| 国模大尺度一区二区三区| 国产精品亚洲午夜一区二区三区 | 国产精品免费视频一区| 中文字幕日韩精品一区| 一区二区三区在线视频免费观看| 亚洲在线一区二区三区| 日韩影院精彩在线| 亚洲欧美日韩电影| 亚洲一区二区中文在线| 免费成人在线影院| 亚洲aaa精品| 一区二区三区在线视频免费观看| 午夜一区二区三区视频| 18涩涩午夜精品.www| 亚洲激情男女视频| 日韩在线播放一区二区| 国产一区二区在线电影| 91香蕉国产在线观看软件| 欧美日韩在线一区二区| 精品国产人成亚洲区| 欧美日本在线播放| 久久99国产精品久久99果冻传媒| 国产91精品免费| 欧美三级在线播放| 久久综合九色综合97婷婷女人 | 日本不卡高清视频| 不卡av免费在线观看| 欧美日韩综合不卡| 久久综合久久综合亚洲| 亚洲最大的成人av| 国产一区欧美一区| 色屁屁一区二区| 日本一区二区三区视频视频| 午夜欧美电影在线观看| 成人动漫在线一区| 日韩一级视频免费观看在线| 欧美乱妇一区二区三区不卡视频| 久久免费电影网| 亚洲一区免费观看| 波多野结衣在线aⅴ中文字幕不卡| 国产黑丝在线一区二区三区| 日本高清不卡视频| 中文字幕第一区第二区| 日韩精品电影一区亚洲| 成人动漫av在线| 亚洲精品在线一区二区| 亚洲电影激情视频网站| 暴力调教一区二区三区| 精品国产免费人成电影在线观看四季 | 99精品久久久久久| 欧美成人a∨高清免费观看| 国产日韩影视精品| 久久精品国产秦先生| 欧美性视频一区二区三区| 欧美片在线播放| 亚洲蜜臀av乱码久久精品| 岛国精品在线观看| 久久久不卡影院| 九九九久久久精品| 欧美一区二区成人| 亚洲国产综合人成综合网站| 成人av高清在线| 国产精品区一区二区三| 黑人精品欧美一区二区蜜桃| 日韩一区二区视频在线观看| 亚洲无线码一区二区三区| 91麻豆.com| |精品福利一区二区三区| 国产mv日韩mv欧美| 国产午夜久久久久| 黄色日韩三级电影| 精品福利在线导航| 麻豆精品在线观看| 日韩一区二区三区电影在线观看 | 亚洲狠狠爱一区二区三区| 91久久精品国产91性色tv| 亚洲人成网站在线| 91免费看片在线观看| 亚洲三级在线看| 精品亚洲porn| 久久综合色天天久久综合图片| 久久se精品一区精品二区| 日韩精品一区二区三区视频| 久久国产乱子精品免费女| 精品播放一区二区| 国产精品77777竹菊影视小说| 久久美女高清视频| 丰满放荡岳乱妇91ww| 中文字幕一区二区三区四区| 99久久精品国产观看| 亚洲人午夜精品天堂一二香蕉| 91日韩在线专区| 亚洲欧美激情插| 欧美日韩一区二区三区在线| 天天综合色天天综合| 日韩视频一区二区| 国产美女主播视频一区| 久久麻豆一区二区| 99国产精品国产精品久久| 亚洲主播在线观看| 91精品在线麻豆| 美女在线视频一区| 久久久久久毛片| 91免费国产在线观看| 亚洲成人黄色小说| 欧美成人伊人久久综合网| 成人综合在线观看| 亚洲一区二区三区在线看| 91精品国产综合久久久蜜臀粉嫩 | 日本欧美加勒比视频| 久久久久久久综合| 99久久99久久精品免费观看 | 亚洲欧美视频在线观看| 欧美日韩国产在线播放网站| 久久99久久99| 国产精品美日韩| 欧美丰满高潮xxxx喷水动漫| 国产精品小仙女| 亚洲国产日韩精品| 国产网红主播福利一区二区| 91网上在线视频| 六月婷婷色综合| 国产精品成人午夜| 欧美日韩另类一区| 国产原创一区二区三区| 亚洲午夜久久久久中文字幕久| 日韩欧美国产一二三区| thepron国产精品| 日韩激情av在线| 中文字幕亚洲一区二区va在线| 777午夜精品视频在线播放| 不卡av电影在线播放| 蜜桃视频一区二区| 亚洲三级理论片| 久久久亚洲午夜电影| 欧美日韩亚洲综合在线| 风间由美一区二区三区在线观看| 水蜜桃久久夜色精品一区的特点| 亚洲国产精品精华液ab| 日韩午夜中文字幕| 色欧美日韩亚洲| 成人avav在线| 国产麻豆精品久久一二三| 日本在线播放一区二区三区|