寻找帐篷地图的固定点/吸引子/排斥子
我需要找到由以下定义给出的帐篷地图函数的固定点和吸引子:
xt = (3/2) * xt-1 when 0 <= x <= (2/3) and xt = 3* (1-xt-1) when (2/3) <= x <= 1
我正在使用下面的 MATLAB 代码生成蜘蛛网图(如代码下方所示),看看我是否可以深入了解这个特定的帐篷地图功能。正如您所看到的,我首先设置 t=1(且 x(1) = 0.2001),但是有无限多个可能的起点。如果不测试每个起点,如何确定固定点/吸引子?
clear
close all
% Initial condition 0.2001, must be symbolic.
nmax=200;
t=sym(zeros(1,nmax));t1=sym(zeros(1,nmax));t2=sym(zeros(1,nmax));
t(1)=sym(2001/10000);
mu=2;
halfm=(2/3) *nmax;
axis([0 1 0 1]);
for n=2:nmax
if (double(t(n-1)))>0 && (double(t(n-1)))<=2/3 % 0 <= x <= (2/3)
t(n)=sym((3/2)*t(n-1)); % x(t) = (3/2) * x(t-1)
else
if (double(t(n-1)))<1 % else (2/3) <= x <= 1
t(n)=sym(3*(1-t(n-1))); % x(t) = 3* (1-x(t-1))
end
end
end
for n=1:halfm
t1(2*n-1)=t(n);
t1(2*n)=t(n);
end
t2(1)=0;t2(2)=double(t(2));
for n=2:halfm
t2(2*n-1)=double(t(n));
t2(2*n)=double(t(n+1));
end
hold on
fsize=20;
plot(double(t1),double(t2),'r');
x=[0 (2/3) 1];y=[0 mu/2 0];
plot(x,y,'b');
以下蛛网图适用于 t(1) = 0.2001
I need to find fixed points and attractors of a Tent map function given by the definition below:
xt = (3/2) * xt-1 when 0 <= x <= (2/3) and xt = 3* (1-xt-1) when (2/3) <= x <= 1
I am using the MATLAB code below to generate a cobweb diagram (shown below the code) to see if I can get some insight in to this particular tent map function. As you can see I am starting out by setting t=1 (and x(1) = 0.2001), but there are infinitely many possible places to start at. How can you determine fixed points/attractors if you don't test each and every starting point?
clear
close all
% Initial condition 0.2001, must be symbolic.
nmax=200;
t=sym(zeros(1,nmax));t1=sym(zeros(1,nmax));t2=sym(zeros(1,nmax));
t(1)=sym(2001/10000);
mu=2;
halfm=(2/3) *nmax;
axis([0 1 0 1]);
for n=2:nmax
if (double(t(n-1)))>0 && (double(t(n-1)))<=2/3 % 0 <= x <= (2/3)
t(n)=sym((3/2)*t(n-1)); % x(t) = (3/2) * x(t-1)
else
if (double(t(n-1)))<1 % else (2/3) <= x <= 1
t(n)=sym(3*(1-t(n-1))); % x(t) = 3* (1-x(t-1))
end
end
end
for n=1:halfm
t1(2*n-1)=t(n);
t1(2*n)=t(n);
end
t2(1)=0;t2(2)=double(t(2));
for n=2:halfm
t2(2*n-1)=double(t(n));
t2(2*n)=double(t(n+1));
end
hold on
fsize=20;
plot(double(t1),double(t2),'r');
x=[0 (2/3) 1];y=[0 mu/2 0];
plot(x,y,'b');
The following cobweb diagram is for t(1) = 0.2001
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
这些只是围绕问题的一些见解。我现在将继续使用 Mathematica,因为它更方便(根据上面的代码判断,您应该能够在 MATLAB 中管理它,如果不能,我会尝试将其转换)。然而,如果您有 Mathematica,并且可以测试这些,那就太好了。
不动点:函数
f(x)
的不动点是f(x)=x
的解的点;换句话说,函数将其映射到自身的点。求解您的函数,您将得到
x=0
和x=3/4
作为固定点。事实上,从这些点开始的轨迹将永远停留在这些点。 以交互方式观察更改起点和迭代次数时的效果
您还可以使用固定点的性质
。让我们看看固定点的性质。如果它是吸引子,则固定点的任意小 epsilon 大小的邻域中的点将保持在相似大小的邻域中(不一定大小完全相同),如果它是排斥器,则它会被排斥并偏离到邻域之外的一个完全任意的点(我的定义在这里非常宽松,但猜测就可以了)。
因此,尝试以下操作,
我们得到了
图 1。 (1)
这看起来肯定没有收敛到固定点。事实上,如果您观察
x[t]
的演变,您会发现它与图 1 不同。 (2)
如果从另一个方向扰动它,结果是类似的,即,
f[1]=0.75-eps
。对于另一个固定点(这次,它只能在一个方向上受到扰动,因为该函数是为
x>=0
定义的),您将看到行为是相同的,因此两个不动点看起来是发散的。图。 (3)
图 1 (4)
现在考虑起点
x[1]=18/ 25
。图。 (5)
哇!!这看起来像一个极限环!
极限环:极限环是系统的闭合轨迹,从该轨迹不可能到达轨迹上的点,即使是
t->无穷大
。因此,当您查看x[t]
时,您会看到类似图 1 的内容。 (6)
仅重复 3 个点(图像压缩会创建一个 莫尔图案,但实际上,如果您将其绘制为一小步,那么您'会看到3我只是太困了,无法回去重新绘制)。这三个点是
12/25
、18/25
和21/25
。从这三点中的任何一点开始都会带您到达相同的极限环。现在,如果足够接近极限环的轨迹收敛到它,则它是吸引/稳定极限环,否则它是排斥/不稳定极限环。因此,像以前一样在任一方向上扰动 eps,我们会看到轨迹发散(我仅在下面显示 +ve 方向)。
图。 (7)
图 1 (8)
有趣的是,从
x[1]=19/25 开始
在下一步中将其映射到18/25
,然后在极限循环轨迹中无限期地继续下去。很容易理解为什么会发生这种情况,因为从19/25
到y=x
的行只是12/25< 行的延续/code> 到
y=x
(即,从函数的第一部分开始)。按照同样的逻辑,应该有18/25
和21/25
对应的点,但我现在不打算找到它们。有鉴于此,我在这里不太确定这里的极限环是否真正是吸引还是排斥(根据极限环的严格定义,只需要有一条其他轨迹螺旋进入它,我们'已经找到了三个!也许对此有更多了解的人可以对此进行权衡)。更多想法
起点
1/2
也很有趣,因为它会将您带到下一步的3/4
,这是一个固定点,因此永远停留在那里。同样,点2/3
将带您到达位于0
的另一个固定点。图。 (9)
图 1 (10)
振荡行为还可以告诉您有关系统的一些信息。如果你看一下图中的轨迹。 (2,4),对于定点
0
情况,系统比其他情况需要更长的时间陷入混乱。此外,在这两个图中,当轨迹接近0
时,它需要比在3/4
时恢复更长的时间,在3/4
时它只是快速摆动。这些看起来类似于松弛振荡(想象一下电容器缓慢充电并通过短路瞬间放电)。目前我能想到的就这些了。最后,我认为必须在 Lyapunov 稳定性,但我不打算开始这样做。我希望这个答案能为您提供一些可供研究的选择。
These are just some insights from poking around the problem. I'll continue with using Mathematica for now as it is more convenient (and judging by your code above, you should be able to manage this in MATLAB, if not, I'll try and convert it). However, if you do have Mathematica, and can test these out that would be great.
Fixed point: A fixed point of a function
f(x)
is a point that's the solution off(x)=x
; in other words, the point where the function maps it to itself.Solving for your function, you get
x=0
andx=3/4
as fixed points.Indeed, a trajectory that starts at these points will stay at these points forever. You can also interactively observe the effects as you change the starting point and the number of iterations using
Nature of the fixed points
Let's look at the nature of the fixed points. If it's an attractor, points in an arbitrarily small epsilon sized neighborhood of the fixed point stay in a similar sized neighborhood (need not necessarily be the exact same size), and if it's a repellor, it gets repelled and diverges to a completely arbitrary point outside the neighborhood (my definitions are pretty loose here, but guess will do).
So trying the following
we get
Fig. (1)
which certainly doesn't look like it is converging to the fixed point. Indeed, if you look at the evolution of
x[t]
, you'll see that it divergesFig. (2)
The result is similar if you perturb it in the other direction, i.e.,
f[1]=0.75-eps
.For the other fixed point (this time, it can be perturbed only in one direction as the function is defined for
x>=0
), you'll see that the behaviour is the same, and hence the two fixed points appear to be divergent.Fig. (3)
Fig. (4)
Now consider the starting point
x[1]=18/25
.Fig. (5)
Whoa!! That looks like a limit cycle!
Limit cycle: A limit cycle is a closed trajectory of the system from which there is no possibility of reaching a point not on the trajectory, even as
t->Infinity
. So, when you look at thex[t]
, you see something likeFig. (6)
which is just 3 points repeated (the image compression creates a Moiré pattern, but really, if you plot it for a small # of steps, you'll see 3 points. I'm just too sleepy to go back and replot it). The three points are
12/25
,18/25
and21/25
. Starting with any of these three points will take you to the same limit cycle.Now if trajectories sufficiently close to the limit cycle converge to it, it is an attracting/stable limit cycle, else it's a repelling/unstable limit cycle. So perturbing by
eps
in either direction as before, we see that the trajectory diverges (I'm only showing +ve direction below).Fig. (7)
Fig. (8)
Interestingly, starting with
x[1]=19/25
maps it to18/25
in the next step, which then continues on indefinitely in the limit cycle trajectory. It is easy to see why this happens, as the line from19/25
on toy=x
is just the continuation of the line from12/25
toy=x
(i.e., from the first piece of the function). By the same logic, there should be points corresponding to18/25
and21/25
, but I'm not going to find them now. In light of this, I'm not exactly sure here as to whether the limit cycle here is truly attracting or repelling (as per the strict definition of limit cycle, there needs to be only one other trajectory that spirals into it, and we've found three! Perhaps someone who knows more on this can weigh in on this).Some more thoughts
The starting point
1/2
is also interesting, because it takes you to3/4
in the next step, which is a fixed point and hence stays there forever. Similarly, the point2/3
takes you to the other fixed point at0
.Fig. (9)
Fig. (10)
The behaviour of the oscillations also tell you something about the system. If you look at the trajectory in Figs. (2,4), the system takes longer to spiral into chaos for the fixed point
0
case, than the other. Also, in both the plots, when the trajectories get close to0
, it takes longer for it to recover than at3/4
, where it just flutters around rapidly. These look similar to relaxation oscillations (think of a capacitor charging slowly and being discharged instantaneously by shorting).That's all I can think of for now. Lastly, I believe the exact nature of the fixed points must be analyzed in the general setting of Lyapunov stability, but I'm not going to embark upon this. I hope this answer has given you a few options to look into.
为了让精通 Mathematica 的人更容易回答问题,下面是上面代码的 Mathematica 版本:
To make questions easier to be answered for Mathematica versed folks, here is the Mathematica rendition on the code above:
不知何故,当我第一次看到它时,我认为这是一个家庭作业问题,OP对尤达答案的回应证实了这一点。问作业问题不一定是错误的,但肯定应该明确标记为错误。元上的这个链接有一些合理的家庭作业政策:
https://meta.stackexchange.com/questions/18242/what- is-the-policy-here-on-homework
考虑到“没有家庭作业解决方案;欢迎推动”这一政策,我将在迄今为止提供的解决方案讨论中添加一条评论。检查 f 的迭代图。我的意思是 f(f(x))、f(f(f(x))) 等的图。例如,f(x)=x^2 的第三次迭代是 f(f(f( x)))=x^8。 f 的第 n 次迭代的图形与直线 y=x 之间的交点包括 n 阶(以及更多阶)的周期轨道。检查这些图片,应该可以清楚地看到有很多排斥轨道。
对动力学进行完全分类的正确方法是使用符号动力学,您的课程可能涵盖也可能没有涵盖。
Somehow, I thought this to be a homework question when I first saw it and the OP's response to Yoda's answer verifies this. It's not necessarily wrong to ask homework questions but it should certainly be clearly marked as such. There are some reasonable homework policies at this link on meta:
https://meta.stackexchange.com/questions/18242/what-is-the-policy-here-on-homework
Taking into account the policy "no homework solutions; nudges welcome", there is one comment I'd add to the solutions discussion I've provided so far. Examine the graphs of the iterates of f. By this I mean the graphs of f(f(x)), f(f(f(x))), etc. For example, the third iterate of f(x)=x^2 is f(f(f(x)))=x^8. The points of intersection between the graph of the nth iterate of f and the line y=x include the periodic orbits of order n (and a bit more). Examining these pictures, it should become clear that there are lots of repulsive orbits.
The correct way to fully classify the dynamics is to use symbolic dynamics, which your class might or might not have covered.
我无法分辨 CobwebDiagram 的哪一部分先出现,哪一部分出现较晚。我还没有找到真正有效的颜色函数,但是沿着这些方向可能存在改进:
您可以使用上面的 RandomChoice 尝试颜色,或者一个不错的选择可能是
I can't tell what part of the CobwebDiagram comes early, and which comes later. I haven't found a color function that really works, but an improvement may exist along these lines:
You can experiment with colors using RandomChoice, above, or a decent choice might be