声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 3105|回复: 11

[稳定性与分岔] 胞映射周期确定问题求助

[复制链接]
发表于 2012-3-2 15:31 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
各位前辈,我想问下,在简单胞映射中,如果映射后发现了周期运动,怎么确定前面出现过的这个胞的位置?
回复
分享到:

使用道具 举报

发表于 2014-3-2 21:23 | 显示全部楼层
你好  你也在做包映射么??
发表于 2014-3-5 08:40 | 显示全部楼层
可以参考下面这篇文章的程序实现思路

胞映射基本理论与算法实现.pdf

1.01 MB, 下载次数: 16

发表于 2014-3-23 10:00 | 显示全部楼层
gghhjj 发表于 2014-3-5 08:40
可以参考下面这篇文章的程序实现思路

能提供个代码 参考下吗??
发表于 2014-3-25 08:39 | 显示全部楼层
本程序为matlab程序,是通过网络收集的,并未经过验证,需要的请自己验证

  1. % 本程序为用胞化积分轨迹法进行全局性态分析

  2. % 初始化,划分胞化空间

  3. clear
  4. xcellnumber=10;
  5. ycellnumber=10;
  6. xleft=-5;
  7. xright=5;
  8. ytop=10;
  9. ybottom=-10;
  10. di=1;
  11. width=(xright-xleft)/xcellnumber;
  12. height=(ytop-ybottom)/ycellnumber;
  13. center(1:xcellnumber/di,1)=[(xleft+width/2):di*width:(xright-width/2)]';
  14. center(1:ycellnumber/di,2)=[(ybottom+height/2):di*height:(ytop-height/2)]';
  15. Id=zeros(xcellnumber*ycellnumber,1);
  16. Ib=zeros(xcellnumber*ycellnumber,1);
  17. Y=zeros(xcellnumber*ycellnumber,2);
  18. dpx=0.001;
  19. dpy=0.001;
  20. nm=10001;
  21. ipsilong=0.0001;
  22. row=0;
  23. periodcells=0;
  24. for i=1:10
  25.     for k=1:10
  26.         initvalue((i-1)*10+k,1)=center(i,1);
  27.         initvalue((i-1)*10+k,2)=center(k,2);
  28.     end
  29. end
  30. plot(initvalue(:,1),initvalue(:,2),'.');
  31. % omiga=4.7547;
  32. % B=58.4;
  33. % G=311.5;
  34. % eita=0.1;
  35. % K=1;
  36. % U=1e-6;
  37. G=2;
  38. omiga=3.9311;
  39. B=2;
  40. K=1;
  41. U=1;
  42. eita=0.1;

  43. % 从每个胞的中心点开始进行映射。

  44. for i=1:ycellnumber/di
  45.    i;
  46.    cput=cputime;
  47.     for j=1:xcellnumber/di
  48.          j;
  49.         trajectory=zeros(1,2);            
  50.         sequence=zeros;
  51.         initial(1,1)=center(j,1);
  52.         initial(1,2)=center(i,2);
  53.         ci=(i-1)*di*xcellnumber+(j-1)*di+1;
  54.         Ib(ci)=Ib(ci)+1;

  55.       
  56.         if Id(ci)>0
  57.             if abs(Y(ci,1)-initial(1,1))<=dpx&abs(Y(ci,2)-initial(1,2))<=dpy
  58.                 continue;
  59.             else
  60.                 Id(ci)=-Id(ci);
  61.             end
  62.         else               
  63.             Id(ci)=-nm;
  64.             Y(ci,:)=[initial(1,1),initial(1,2)];
  65.         end
  66.         trajectory(1,:)=initial(1,:);
  67.         sequence(1)=ci;
  68.         count1=0;
  69.         count2=1;
  70.         for count=2:2000
  71.             if count==2000
  72.                 Id(sequence)=-Id(sequence);
  73.                 break
  74.             end
  75.                
  76. %             [t,x]=ode45('duffing',[0 2*pi/omiga],[initial(1,1),initial(1,2)]);
  77. %            
  78.             opts=simset('Initialstate',[initial(1,1),initial(1,2)]);
  79. %             [t,x,y]=sim('vanderpol',[2],opts);
  80.             [t,x,y]=sim('duffingscm',[2*pi/omiga],opts);
  81.             [m,e]=size(t);
  82.             
  83.                % 当映射的像点不在选定区域

  84.             if x(m,1)>=xright|x(m,1)<xleft|x(m,2)<ybottom|x(m,2)>=ytop      
  85.                 if count1~=count-1
  86.                     k=1;
  87.                     count1=0;
  88.                 else
  89.                     k=k+1;
  90.                 end                              
  91.                 if k>12
  92.                     for index=1:count2
  93.                         cj=sequence(index);
  94.                         if Id(cj)==-nm
  95.                             Id(cj)=nm+1;
  96.                         else if Id(cj)<0
  97.                                 Id(cj)=-Id(cj);
  98.                             end
  99.                         end
  100.                     end
  101.                    break
  102.                 end
  103.                 initial=x(m,:);
  104.                 count1=count;
  105.                 continue;
  106.             end
  107.             
  108.             count2=count2+1;
  109.             indexx=fix(abs(x(m,1)-xleft)/width)+1;
  110.             indexy=fix(abs(x(m,2)-ybottom)/height)+1;
  111.             
  112.             ci=(indexy-1)*ycellnumber+indexx;
  113.             sequence(count2)=ci;
  114.             trajectory(count2,:)=[x(m,1),x(m,2)];
  115.             Ib(ci)=Ib(ci)+1;
  116.             
  117.             
  118.          % 定义四种状态
  119.          
  120.             if Id(ci)==0
  121.                 state=1;
  122.             else
  123.                 if Id(ci)==-nm
  124.                     state=2;
  125.                 else
  126.                     if Id(ci)>0
  127.                         state=3;
  128.                     else
  129.                         state=4;
  130.                     end
  131.                 end
  132.             end
  133.                     
  134.          % 对四个状态分别进行处理
  135.             
  136.             switch state
  137.             case 1
  138.                 Id(ci)=-nm;
  139.                 Y(ci,:)=[x(m,1),x(m,2)];
  140.                 initial=x(m,:);
  141.             case 2
  142.                 if sqrt(((Y(ci,1)-x(m,1))^2+(Y(ci,2)-x(m,2))^2))<=ipsilong
  143.                     period=0;                 
  144.                    for index=count2-1:-1:1
  145.                         if sequence(index)==ci
  146.                             period(1,1:(count2-index))=sequence(index+1:count2);
  147.                             break
  148.                         end
  149.                     end
  150.                     [r2,c2]=size(period);
  151.                     isold=0;
  152.                     C=find(Id<xcellnumber*ycellnumber);
  153.                     Idd=Id(C);
  154.                     for index=max(Idd(1,:)):-1:1
  155.                         oldperiod=isoldperiod(period,periodcells);
  156.                         if oldperiod
  157.                             Id(sequence)=index;  
  158.                             isold=1;
  159.                             break
  160.                         end
  161.                     end
  162.                     if isold~=1
  163.                         periodcells(max(Idd)+1,1:c2)=period;
  164.                         Id(sequence)=max(Idd)+1;
  165.                         
  166.                         break
  167.                     end
  168.                 else
  169.                     Y(ci,:)=[x(m,1),x(m,2)];
  170.                     initial=x(m,:);
  171.                 end
  172.             case 3
  173.                 if abs(Y(ci,1)-x(m,1))<=dpx&abs(Y(ci,2)-x(m,2))<=dpy
  174.                     for index=1:count2
  175.                         cj=sequence(index);
  176.                         if Id(cj)==-nm|Id(cj)==-Id(ci)
  177.                             Id(cj)=Id(ci);
  178.                         else
  179.                             if Id(cj)<0&Id(cj)~=-nm&Id(cj)~=-Id(ci)
  180.                                 Id(cj)=-Id(cj);
  181.                             end
  182.                         end
  183.                     end
  184.                     break
  185.                 else
  186.                     Id(ci)=-Id(ci);
  187.                     initial=x(m,:);
  188.                 end
  189.             otherwise
  190.                 if abs(Y(ci,1)-x(m,1))<=dpx&abs(Y(ci,2)-x(m,2))<=dpy
  191.                     Id(ci)=-Id(ci);
  192.                     for index=1:count2
  193.                         cj=sequence(index);
  194.                         if Id(cj)==-nm|Id(cj)==-Id(ci)
  195.                             Id(cj)=Id(ci);
  196.                         else
  197.                             if Id(cj)<0&Id(cj)>-nm&Id(cj)~=-Id(ci)
  198.                                 Id(cj)=-Id(cj);
  199.                             end
  200.                         end
  201.                     end
  202.                     break
  203.                 else
  204.                     period=0;
  205.                     for index=count2-1:-1:1
  206.                         if sequence(index)==ci
  207.                             period(1,1:(count2-index))=sequence(index+1:count2);
  208.                             Y1=trajectory(index,:);
  209.                             break
  210.                         end
  211.                     end
  212.                     if sqrt(((Y1(1,1)-x(m,1))^2+(Y1(1,2)-x(m,2))^2))<=ipsilong
  213.                         [r2,c2]=size(period);                  
  214.                         isold=0;
  215.                         C=find(Id<xcellnumber*ycellnumber);
  216.                         Idd=Id(C);
  217.                         for index=max(Idd):-1:1
  218.                             oldperiod=isoldperiod(period,periodcells(index,:));
  219.                             if oldperiod
  220.                                 Id(sequence)=index;  
  221.                                 isold=1;
  222.                                 break
  223.                             end
  224.                         end
  225.                         if isold~=1
  226.                             periodcells(max(Idd)+1,1:c2)=period;
  227.                             Id(sequence)=max(Idd)+1;                                                   
  228.                         end
  229.                         break
  230.                     end
  231.                 end
  232.                 initial=x(m,:);
  233.             end
  234.         end
  235.     end
  236.     et=(cputime-cput)/60;
  237. end
复制代码

发表于 2014-3-25 08:41 | 显示全部楼层
水风而动 发表于 2014-3-23 10:00
能提供个代码 参考下吗??

上面发的是matlab代码,另外论坛还有一个C语言的代码,见帖子
http://forum.vibunion.com/thread-60347-1-1.html
发表于 2014-3-25 08:43 | 显示全部楼层
再发一篇胞映射的参考资料

continous cell-to-cell mapping.PDF

514.71 KB, 下载次数: 27

发表于 2014-3-26 17:19 | 显示全部楼层
每个胞都有自己的群号,周期,及距离吸引子的步数。
发表于 2014-3-26 17:28 | 显示全部楼层
gghhjj 发表于 2014-3-25 08:41
上面发的是matlab代码,另外论坛还有一个C语言的代码,见帖子
http://forum.vibunion.com/thread-60347-1- ...

这个程序缺头文件,要是有就好了。
发表于 2014-3-26 17:30 | 显示全部楼层
每个胞的群数 周期数 距离吸引子的步数都是计算好了的。
发表于 2014-4-27 11:43 | 显示全部楼层
gghhjj 发表于 2014-3-25 08:39
本程序为matlab程序,是通过网络收集的,并未经过验证,需要的请自己验证

161                       oldperiod=isoldperiod(period,periodcells);

162.                        if oldperiod

224.                            oldperiod=isoldperiod(period,periodcells(index,:));
不知道哪位能给解释一下.isoldperiod之前没有出现过. 还有if oldperiod
是不是不完整呢?
发表于 2014-5-16 17:15 | 显示全部楼层
lihaitao123 发表于 2014-4-27 11:43
161                       oldperiod=isoldperiod(period,periodcells);

162.                       ...

这个应该是周期胞组检测的子程序,个人收集的程序中没有该函数
如果可能的话,只能你自己根据相关的原理补充了
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-4-28 21:43 , Processed in 0.109666 second(s), 21 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表