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

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

?? rsm_pd_tanker.m

?? 一個用MATLAB編寫的優化控制工具箱
?? M
?? 第 1 頁 / 共 4 頁
字號:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Response Surface Methodology for Design of a% Proportional-Derivative Controller for % Tanker Ship Heading Regulation%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% By: Kevin Passino % Version: 3/20/01%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%clear		% Clear all variables in memory% Initialize ship parameters % (can test two conditions, "ballast" or "full"):ell=350;			% Length of the ship (in meters)u=5;				% Nominal speed (in meters/sec)abar=1;             % Parameters for nonlinearitybbar=1;% Define the reference model (we use a first order transfer function % k_r/(s+a_r)):a_r=1/150;k_r=1/150;% Proportional and derivative gains (the input space for the design)%Kp=-1.5; Some reasonable size gains - found manually%Kd=-250;Kpmin=-5;Kpmax=-0.5;  % Program below assumes thisKdmin=-500;Kdmax=-100; % Program below assumes this% Define grid of design points (over (Kp,Kd) space)nGKp=20;   % The number of partitions on Kp dimensionnGKd=20;   % The number of partitions on Kd dimensionNpoints=nGKp*nGKd % The total number of design pointsn=2; % The number of inputs Kp=Kpmin:(Kpmax-Kpmin)/(nGKp-1):Kpmax;  % Define a uniformly spaced vector roughly on the input domain			             				% that is used to form the grid on the (Kp,Kd) spaceKd=Kdmin:(Kdmax-Kdmin)/(nGKd-1):Kdmax;  k=0; % Counter initialization% Place the centers on a gridKpKd=0*ones(nGKp,nGKd); % Initializefor i=1:length(Kp)	for j=1:length(Kd)	  k=k+1;	  KpKd(1,k)=Kp(i);	  KpKd(2,k)=Kd(j);	endend% Plot the design points of the gridfigure(1)clfplot(KpKd(1,:),KpKd(2,:),'ko')grid onxlabel('K_p gain')ylabel('K_d gain')title('Grid of design points')axis([Kpmin Kpmax Kdmin Kdmax])% Store performance measure for evaluating closed-loop performance (this % will define the response surface)Jcl=0*ones(nGKd,nGKp); % Allocate memory% Define scale parameters for performance measurew1=1;w2=0.01;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Start loop for generating data for response surfacefor ii=1:length(Kp)	for jj=1:length(Kd)	  flag=1; % Indicates nominal conditions%	  flag=0; % Indicates off-nominal conditions	  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Simulate the controller regulating the ship heading 	% Next, we initialize the simulation:t=0; 		% Reset time to zeroindex=1;	% This is time's index (not time, its index).  tstop=1200;	% Stopping time for the simulation (in seconds) - normally 20000step=1;     % Integration step sizeT=10;		% The controller is implemented in discrete time and			% this is the sampling time for the controller.			% Note that the integration step size and the sampling			% time are not the same.  In this way we seek to simulate			% the continuous time system via the Runge-Kutta method and			% the discrete time controller as if it were			% implemented by a digital computer.  Hence, we sample			% the plant output every T seconds and at that time			% output a new value of the controller output.counter=10;	% This counter will be used to count the number of integration			% steps that have been taken in the current sampling interval.			% Set it to 10 to begin so that it will compute a controller			% output at the first step.			% For our example, when 10 integration steps have been			% taken we will then we will sample the ship heading			% and the reference heading and compute a new output			% for the controller.  eold=0;     % Initialize the past value of the error (for use            % in computing the change of the error, c).  Notice            % that this is somewhat of an arbitrary choice since             % there is no last time step.  The same problem is            % encountered in implementation.  cold=0;     % Need this to initialize phiold belowpsi_r_old=0; % Initialize the reference trajectoryymold=0; 	 % Initial condition for the first order reference modelx=[0;0;0];	% First, set the state to be a vector            x(1)=0;		% Set the initial heading to be zerox(2)=0;		% Set the initial heading rate to be zero.  			% We would also like to set x(3) initially but this			% must be done after we have computed the output			% of the controller.  In this case, by			% choosing the reference trajectory to be 			% zero at the beginning and the other initial conditions			% as they are, and the controller as designed,			% we will know that the output of the controller			% will start out at zero so we could have set 			% x(3)=0 here.  To keep things more general, however, 			% we set the intial condition immediately after 			% we compute the first controller output in the 			% loop below.% Next, we start the simulation of the system.  This is the main % loop for the simulation of the control system.psi_r=0*ones(1,tstop+1);psi=0*ones(1,tstop+1);e=0*ones(1,tstop+1);c=0*ones(1,tstop+1);s=0*ones(1,tstop+1);w=0*ones(1,tstop+1);delta=0*ones(1,tstop+1);ym=0*ones(1,tstop+1);while t <= tstop% First, we define the reference input psi_r  (desired heading).if t>=0, psi_r(index)=0; end			    % Request heading of 0 degif t>=100, psi_r(index)=45*(pi/180); end     % Request heading of 45 degif t>=1500, psi_r(index)=0; end    			% Request heading of 0 degif t>=3000, psi_r(index)=45*(pi/180); end    % Request heading of -45 degif t>=4500, psi_r(index)=0; end    			% Request heading of 0 degif t>=6000, psi_r(index)=45*(pi/180); end     % Request heading of 45 degif t>=7500, psi_r(index)=0; end    			% Request heading of 0 degif t>=9000, psi_r(index)=45*(pi/180); end     % Request heading of 45 degif t>=10500, psi_r(index)=0; end    			% Request heading of 0 degif t>=12000, psi_r(index)=45*(pi/180); end    % Request heading of -45 degif t>=13500, psi_r(index)=0; end    			% Request heading of 0 degif t>=15000, psi_r(index)=45*(pi/180); end     % Request heading of 45 degif t>=16500, psi_r(index)=0; end    			% Request heading of 0 degif t>=18000, psi_r(index)=45*(pi/180); end     % Request heading of 45 degif t>=19500, psi_r(index)=0; end    			% Request heading of 0 deg% Next, suppose that there is sensor noise for the heading sensor with that is% additive, with a uniform distribution on [- 0.01,+0.01] deg.%if flag==0, s(index)=0.01*(pi/180)*(2*rand-1); elses(index)=0;					  % This allows us to remove the noise.%endpsi(index)=x(1)+s(index);     % Heading of the ship (possibly with sensor noise).if counter == 10,  % When the counter reaches 10 then execute the 				   % controllercounter=0; 			% First, reset the counter% Reference model calculations:% The reference model is part of the controller and to simulate it% we take the discrete equivalent of the% reference model to compute psi_m from psi_r (if you use% a continuous-time reference model you will have to augment % the state of the closed-loop system with the state(s) of the % reference model and hence update the state in the Runge-Kutta % equations).%% For the reference model we use a first order transfer function % k_r/(s+a_r) but we use the bilinear transformation where we % replace s by (2/step)(z-1)/(z+1), then find the z-domain % representation of the reference model, then convert this % to a difference equation:ym(index)=(1/(2+a_r*T))*((2-a_r*T)*ymold+...                                    k_r*T*(psi_r(index)+psi_r_old));ymold=ym(index);  psi_r_old=psi_r(index);	% This saves the past value of the ym and psi_r so that we can use it	% the next time around the loop	% Controller calculations:e(index)=psi_r(index)-psi(index); % Computes error (first layer of perceptron)c(index)=(e(index)-eold)/T; % Sets the value of ceold=e(index);   % Save the past value of e for use in the above				 % computation the next time around the loop%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% A proportional-derivative controller:delta(index)=Kp(ii)*e(index)+Kd(jj)*c(index);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%else % This goes with the "if" statement to check if the counter=10     % so the next lines up to the next "end" statement are executed     % whenever counter is not equal to 10% Now, even though we do not compute the controller at each% time instant, we do want to save the data at its inputs and output at% each time instant for the sake of plotting it.  Hence, we need to % compute these here (note that we simply hold the values constant):e(index)=e(index-1);	c(index)=c(index-1); delta(index)=delta(index-1);ym(index)=ym(index-1);end % This is the end statement for the "if counter=10" statement% Next, the Runge-Kutta equations are used to find the next state. % Clearly, it would be better to use a Matlab "function" for% F (but here we do not, so we can have only one program).  	time(index)=t;% First, we define a wind disturbance against the body of the ship% that has the effect of pressing water against the rudder%if flag==0, w(index)=0.5*(pi/180)*sin(2*pi*0.001*t);  % This is an additive sine disturbance to 										% the rudder input.  It is of amplitude of										% 0.5 deg. and its period is 1000sec.%delta(index)=delta(index)+w(index);%end% Next, implement the nonlinearity where the rudder angle is saturated% at +-80 degreesif delta(index) >= 80*(pi/180), delta(index)=80*(pi/180); endif delta(index) <= -80*(pi/180), delta(index)=-80*(pi/180); end% The next line is used in place of the line following it to% change the speed of the ship%if flag==0,%%if t>=1000000,%%if t>=9000,      % This switches the ship speed (unrealistically fast)%u=3; % A lower speed%elseu=5;%end% Next, we change the parameters of the ship to tanker to reflect% changing loading conditions (note that we simulate as if% the ship is loaded while moving, but we only change the parameters% while the heading is zero so that it is then similar to re-running% the simulation, i.e., starting the tanker operation at different % times after loading/unloading has occurred).% The next line is used in place of the line following it to keep% "ballast" conditions throughout the simulationif flag==0, %t>=1000000,%if t>=0,      % This switches the parameters, possibly in the middle of the simulationK_0=0.83;  		% These are the parameters under "full" conditionstau_10=-2.88;tau_20=0.38;tau_30=1.07;elseK_0=5.88;		% These are the parameters under "ballast" conditionstau_10=-16.91;tau_20=0.45;tau_30=1.43;end% The following parameters are used in the definition of the tanker model:K=K_0*(u/ell);tau_1=tau_10*(ell/u);tau_2=tau_20*(ell/u);tau_3=tau_30*(ell/u);% Next, comes the plant:% Now, for the first step, we set the initial condition for the% third state x(3).if t==0, x(3)=-(K*tau_3/(tau_1*tau_2))*delta(index); end% Next, we use the formulas to implement the Runge-Kutta method% (note that here only an approximation to the method is implemented where% we do not compute the function at multiple points in the integration step size).F=[ x(2) ;    x(3)+ (K*tau_3/(tau_1*tau_2))*delta(index) ;    -((1/tau_1)+(1/tau_2))*(x(3)+ (K*tau_3/(tau_1*tau_2))*delta(index))-...        (1/(tau_1*tau_2))*(abar*x(2)^3 + bbar*x(2)) + (K/(tau_1*tau_2))*delta(index) ];        	k1=step*F;	xnew=x+k1/2;F=[ xnew(2) ;    xnew(3)+ (K*tau_3/(tau_1*tau_2))*delta(index) ;    -((1/tau_1)+(1/tau_2))*(xnew(3)+ (K*tau_3/(tau_1*tau_2))*delta(index))-...        (1/(tau_1*tau_2))*(abar*xnew(2)^3 + bbar*xnew(2)) + (K/(tau_1*tau_2))*delta(index) ];   	k2=step*F;	xnew=x+k2/2;F=[ xnew(2) ;    xnew(3)+ (K*tau_3/(tau_1*tau_2))*delta(index) ;    -((1/tau_1)+(1/tau_2))*(xnew(3)+ (K*tau_3/(tau_1*tau_2))*delta(index))-...        (1/(tau_1*tau_2))*(abar*xnew(2)^3 + bbar*xnew(2)) + (K/(tau_1*tau_2))*delta(index) ];   	k3=step*F;	xnew=x+k3;F=[ xnew(2) ;    xnew(3)+ (K*tau_3/(tau_1*tau_2))*delta(index) ;    -((1/tau_1)+(1/tau_2))*(xnew(3)+ (K*tau_3/(tau_1*tau_2))*delta(index))-...        (1/(tau_1*tau_2))*(abar*xnew(2)^3 + bbar*xnew(2)) + (K/(tau_1*tau_2))*delta(index) ];   	k4=step*F;	x=x+(1/6)*(k1+2*k2+2*k3+k4); % Calculated next statet=t+step;  			% Increments timeindex=index+1;	 	% Increments the indexing term so that 					% index=1 corresponds to time t=0.counter=counter+1;	% Indicates that we computed one more integration stepend % This end statement goes with the first "while" statement     % in the program so when this is complete the simulation is done.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久婷婷色综合| 午夜影院久久久| 一区二区三区波多野结衣在线观看 | 欧美极品美女视频| 日韩精品亚洲一区| 成人黄色在线视频| 亚洲精品一区二区三区精华液 | 国产午夜亚洲精品理论片色戒| 亚洲自拍偷拍欧美| av一区二区久久| 国产喂奶挤奶一区二区三区| 手机精品视频在线观看| 91蜜桃视频在线| 中文一区二区完整视频在线观看| 奇米精品一区二区三区在线观看| 欧美亚洲国产一卡| 亚洲精品高清在线| 成人高清免费观看| 久久久精品免费网站| 久久99精品国产91久久来源| 欧美一级高清片| 亚洲成人免费电影| 91福利在线免费观看| 亚洲精品乱码久久久久久| eeuss影院一区二区三区| 中文字幕成人网| 成人精品视频一区| 国产精品每日更新在线播放网址| 国产一区二区三区免费看| 日韩欧美精品在线视频| 老色鬼精品视频在线观看播放| 欧美一区二区三区爱爱| 美女网站一区二区| 精品奇米国产一区二区三区| 国内一区二区视频| 国产午夜三级一区二区三| 国产在线精品不卡| 国产日产欧美一区| 成人福利视频在线| 亚洲免费看黄网站| 欧美日韩综合色| 天堂久久一区二区三区| 欧美一区二区在线观看| 久久精品72免费观看| 久久久久久久久久久99999| 国产馆精品极品| 中文字幕一区二区在线播放| 91视频.com| 视频一区在线播放| 亚洲午夜久久久久久久久电影院| 在线观看亚洲专区| 日产国产欧美视频一区精品| 欧美成人国产一区二区| 国产精品99久久久久| 亚洲欧洲日韩在线| 欧美人与禽zozo性伦| 韩国av一区二区三区四区| 国产精品天美传媒| 欧美日韩综合不卡| 黄色小说综合网站| 亚洲欧美另类综合偷拍| 91精品国产综合久久久蜜臀粉嫩| 久久er99精品| 亚洲乱码日产精品bd| 欧美一区欧美二区| av激情亚洲男人天堂| 三级亚洲高清视频| 中文无字幕一区二区三区| 欧美三级视频在线播放| 国内精品伊人久久久久av一坑| 国产精品久久久久久久蜜臀| 69堂国产成人免费视频| 成人动漫一区二区三区| 奇米色一区二区三区四区| 国产精品美女久久久久久| 91精选在线观看| www.亚洲色图| 激情图区综合网| 国产成人自拍网| 婷婷开心久久网| 中文字幕一区av| 26uuu精品一区二区三区四区在线| 色域天天综合网| 韩国成人精品a∨在线观看| 亚洲一本大道在线| 中文字幕亚洲欧美在线不卡| 精品国产一区二区三区久久影院| 91黄视频在线观看| 成人av网站在线| 国产一区二区三区电影在线观看 | 国产精品热久久久久夜色精品三区| 欧美久久久久免费| 日本高清不卡在线观看| 国产91丝袜在线播放0| 人妖欧美一区二区| 亚洲一区二区三区四区五区中文| 中文字幕精品一区二区三区精品| 精品免费国产一区二区三区四区| 欧美日韩国产综合一区二区| 成人免费毛片aaaaa**| 狠狠色狠狠色综合| 日本亚洲电影天堂| 亚洲免费看黄网站| 最新久久zyz资源站| 亚洲国产精品精华液2区45| 日韩一区二区三区av| 9191成人精品久久| 在线综合亚洲欧美在线视频| 欧美专区日韩专区| 欧美色老头old∨ideo| 色一情一乱一乱一91av| 99精品1区2区| 色综合咪咪久久| 在线免费观看一区| 欧美色图天堂网| 欧美日韩视频在线一区二区| 欧美日韩美少妇| 欧美人体做爰大胆视频| 337p亚洲精品色噜噜狠狠| 亚洲久本草在线中文字幕| 亚洲日穴在线视频| 亚洲色欲色欲www在线观看| 亚洲欧美色一区| 亚洲一二三四久久| 亚欧色一区w666天堂| 日本免费在线视频不卡一不卡二| 肉肉av福利一精品导航| 免播放器亚洲一区| 国产成人h网站| 91日韩在线专区| 91.xcao| 久久久久久久综合色一本| 国产精品久久久久影视| 亚洲综合免费观看高清在线观看| 香蕉久久一区二区不卡无毒影院 | 欧美日韩精品一区二区三区蜜桃 | 91视频免费播放| 欧美精品一级二级三级| 91精品国产综合久久久久| 精品久久久三级丝袜| 国产日韩欧美综合一区| 亚洲伦理在线免费看| 美女在线视频一区| 成人网页在线观看| 欧美电影影音先锋| www欧美成人18+| 亚洲人精品一区| 麻豆一区二区三| 91在线视频免费观看| 欧美日韩大陆一区二区| 精品国产亚洲在线| 一区二区三区精品视频| 老司机一区二区| 91丝袜美女网| 日韩精品一区二区三区中文不卡| 中文幕一区二区三区久久蜜桃| 亚洲图片自拍偷拍| 成人av网站免费观看| 91麻豆精品91久久久久同性| 国产精品人人做人人爽人人添| 午夜精品久久久久久久| 国产成人精品免费在线| 欧美日韩免费电影| 欧美极品美女视频| 美女在线一区二区| 欧美亚洲一区二区三区四区| 国产拍欧美日韩视频二区| 天天色综合天天| www.在线成人| 久久久精品免费网站| 婷婷开心激情综合| 色综合久久66| 欧美激情综合五月色丁香 | 精品人伦一区二区色婷婷| 亚洲激情在线激情| 成人激情黄色小说| 亚洲精品一区二区三区四区高清| 亚洲成a人在线观看| 91在线观看高清| 国产色产综合产在线视频| 麻豆精品视频在线观看免费| 欧美另类videos死尸| 一区二区三区在线影院| 成人app软件下载大全免费| 久久影院视频免费| 激情偷乱视频一区二区三区| 91精品国产全国免费观看| 亚洲综合久久久久| 91在线云播放| 亚洲色图都市小说| 本田岬高潮一区二区三区| 欧美国产一区在线| 国产精品自拍av| 久久视频一区二区| 国产乱子轮精品视频| 亚洲精品在线观看网站| 国内成人精品2018免费看| 久久综合狠狠综合| 国产精品一区二区三区99| 国产亚洲精品7777|