李雅普诺夫稳定性

原文:https://zhuanlan.zhihu.com/p/58738073

  其实在控制系统中,稳定性往往是首要解决的问题。作为控制的核心,就是在系统收到干扰后,可以继续回到平衡状态工作。

画图代码:

 1 figure('color','w');                                                                                                
 2 hold on
 3 for theta=[0:20]*pi/10
 4     x0=3*[cos(theta); sin(theta)];
 5     %[t,x]=ode45(@dxdt0,[0:0.1:8],x0);
 6     %[t,x]=ode45(@dxdt1,[0:0.1:8],x0);
 7     %[t,x]=ode45(@dxdt2,[0:0.1:8],x0);
 8     %[t,x]=ode45(@dxdt3,[0:0.1:8],x0);
 9     %[t,x]=ode45(@dxdt4,[0:0.1:8],x0);
10     [t,x]=ode45(@dxdt5,[0:0.1:8],x0);
11     plot(x(:,1),x(:,2),'linewidth',0.5);
12     quiver(x(:,1),x(:,2), gradient(x(:,1)),gradient(x(:,2)),'linewidth',3.0);
13 end
14 for theta=[0:2:20]*pi/10
15     x0=1e-5*[cos(theta); sin(theta)];
16     %[t,x]=ode45(@dxdt0,[0:0.2:20],x0);
17     %[t,x]=ode45(@dxdt1,[0:0.2:20],x0);
18     %[t,x]=ode45(@dxdt2,[0:0.2:20],x0);
19     %[t,x]=ode45(@dxdt3,[0:0.2:20],x0);
20     %[t,x]=ode45(@dxdt4,[0:0.2:20],x0);
21     [t,x]=ode45(@dxdt5,[0:0.2:20],x0);
22     plot(x(:,1),x(:,2),'linewidth',0.5);
23     quiver(x(:,1),x(:,2), gradient(x(:,1)),gradient(x(:,2)),'linewidth',1.5);
24     xlabel('x1', 'FontSize',18,'FontWeight','bold','Color','r')
25     ylabel('y1', 'FontSize',18,'FontWeight','bold','Color','g')
26     title('Made by Sc Guo')
27 end

状态方程函数:

 1 function d=dxdt0(t,x)
 2     d=[x(2);
 3         sin(x(1))-x(2)];   
 1 function d=dxdt1(t,x)                                                                                               
 2     d=[-x(1);
 3         x(1)+x(2)-x(2)^3];
 1 function d=dxdt2(t,x)
 2     d=[x(2);
 3         -x(1)];   
 1 function d=dxdt3(t,x)
 2     d=[x(1)-3*x(2);
 3         5*x(1)-2*x(2)]; 
 1 function d=dxdt4(t,x)
 2     d=[x(1)+3*x(2);
 3         -5*x(1)+2*x(2)];  
 function d=dxdt5(t,x)
 2     d=[4*x(1)-2*x(2);
 3         x(1)-3*x(2)];   
1 function d=dxdt6(t,x)
 2     d=[x(2)+x(1)*(2-x(1)^2-x(2)^2);                                                                                 
 3         -x(1)+x(2)*(2-x(1)^2-x(2)^2)];

 

posted @ 2023-07-08 21:17  叕叒双又  阅读(40)  评论(0编辑  收藏  举报