资源简介

在MATLAB上实现复洛伦兹系统的反同步控制,希望能有所帮助

资源截图

代码片段和文件信息

clc;
clear all;
close all;


m=200000;   

th1=10;th2=28;th3=8/3;

e=zeros(m5);

x=zeros(m5); x(1:)=[-1-2-3-4-5];
y=zeros(m5); y(1:)=[12345]; 
                                         
dT=0.0002;

for k=1:m-1

    
%驱动系统
k1=th1*(-y(k1)+y(k3)); 
k2=th1*(-y(k1)-k1*dT/2+y(k3)+dT/2); 
k3=th1*(-y(k1)-k2*dT/2+y(k3)+dT/2);
k4=th1*(-y(k1)-k3*dT+y(k3)+dT);
y(k+11)=y(k1)+dT*(k1+2*k2+2*k3+k4)/6;   

k1=th1*(-y(k2)+y(k4)); 
k2=th1*(-y(k2)-k1*dT/2+y(k4)+dT/2); 
k3=th1*(-y(k2)-k2*dT/2+y(k4)+dT/2);
k4=th1*(-y(k2)-k3*dT+y(k4)+dT);
y(k+12)=y(k2)+dT*(k1+2*k2+2*k3+k4)/6;   
 
k1=th2*y(k1)-y(k1)*y(k5)-y(k3); 
k2=th2*(y(k1)+dT/2)-(y(k1)+dT/2)*(y(k5)+dT/2)-(y(k3)+k1*dT/2);
k3=th2*(y(k1)+dT/2)-(y(k1)+dT/2)*(y(k5)+dT/2)-(y(k3)+k2*dT/2);
k4=th2*(y(k1)+dT)-(y(k1)+dT)*(y(k5)+dT)-(y(k3)+k3*dT);
y(k+13)=y(k3)+dT*(k1+2*k2+2*k3+k4)/6;

k1=th2*y(k2)-y(k2)*y(k5)-y(k4); 
k2=th2*(y(k2)+dT/2)-(y(k2)+dT/2)*(y(k5)+dT/2)-(y(k4)+k1*dT/2);
k3=th2*(y(k2)+dT/2)-(y(k2)+dT/2)*(y(k5)+dT/2)-(y(k4)+k2*dT/2);
k4=th2*(y(k2)+dT)-(y(k2)+dT)*(y(k5)+dT)-(y(k4)+k3*dT);
y(k+14)=y(k4)+dT*(k1+2*k2+2*k3+k4)/6;  

k1=y(k1)*y(k3)+y(k2)*y(k4)-th3*y(k5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