{"id":970,"date":"2014-04-28T12:00:51","date_gmt":"2014-04-28T17:00:51","guid":{"rendered":"https:\/\/blogs.mathworks.com\/cleve\/?p=970"},"modified":"2016-04-11T08:58:17","modified_gmt":"2016-04-11T13:58:17","slug":"periodic-solutions-to-the-lorenz-equations","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/cleve\/2014\/04\/28\/periodic-solutions-to-the-lorenz-equations\/","title":{"rendered":"Periodic Solutions to the Lorenz Equations"},"content":{"rendered":"<div class=\"content\"><!--introduction-->Changing the value of a parameter in the equations that produce the famous Lorenz chaotic attractor yields nonlinear ordinary differential equations that have periodic solutions.\r\n\r\n<!--\/introduction-->\r\n<h3>Contents<\/h3>\r\n<div>\r\n<ul>\r\n\t<li><a href=\"#419a8588-0f2e-47e4-96d8-8332d7026f6b\">The Lorenz equations<\/a><\/li>\r\n\t<li><a href=\"#ba3ae2e1-bb8a-452b-8ded-eddb769c8497\">Periodic solutions<\/a><\/li>\r\n\t<li><a href=\"#08e167a2-9755-413c-aa0a-a6abacfadf70\">Rho = 99.65<\/a><\/li>\r\n\t<li><a href=\"#e87240fa-738b-46c4-9149-fa064a3b1006\">Rho = 100.5<\/a><\/li>\r\n\t<li><a href=\"#8e853655-2aba-47a0-893f-2978f76fcc85\">Rho = 160<\/a><\/li>\r\n\t<li><a href=\"#5941f174-5606-4e95-adde-6c0ec04a38ed\">Rho = 350<\/a><\/li>\r\n\t<li><a href=\"#cb25b6b8-73cd-46e3-8b25-b5236af01a04\">Rho = 28<\/a><\/li>\r\n\t<li><a href=\"#27bd412e-a4d6-42aa-a407-9847b8731f86\">lorenzgui<\/a><\/li>\r\n\t<li><a href=\"#28523a15-ca72-437d-9166-5ec2e3af01ec\">References<\/a><\/li>\r\n<\/ul>\r\n<\/div>\r\n<h4>The Lorenz equations<a name=\"419a8588-0f2e-47e4-96d8-8332d7026f6b\"><\/a><\/h4>\r\n(This section is adapted from chapter 7 of my book <a href=\"https:\/\/www.mathworks.com\/moler\/chapters.html\">Numerical Computing with MATLAB<\/a>, published by MathWorks and SIAM.)\r\n\r\nThe Lorenz chaotic attractor was first described in 1963 by Edward Lorenz, an M.I.T. mathematician and meteorologist who was interested in fluid flow models of the earth's atmosphere. An excellent reference is the book by Colin Sparrow cited at the end of this blog.\r\n\r\nI have chosen to express the Lorenz equations in a somewhat unusual way involving a matrix-vector product:\r\n\r\n$$ \\dot{y} = A y $$\r\n\r\nHere $y$ is a vector-valued function of $t$ with three components and $A$ is a 3-by-3 matrix that depends on $y$. Seven of the nine elements in $A$ are constant, but the other two depend on $y_2(t)$:\r\n\r\n$$A = [\\ -\\beta \\ \\ 0 \\ \\ y_2 \\ ; \\ \\ 0 \\ \\ -\\sigma \\ \\ \\sigma \\ ; \\ \\ -y_2 \\ \\ \\rho \\ \\ -1 \\ ]$$\r\n\r\nThe first component of the solution, $y_1(t)$, is related to the convection in the atmospheric flow, while the other two components are related to horizontal and vertical temperature variation. The parameter $\\sigma$ is the Prandtl number, $\\rho$ is the normalized Rayleigh number, and $\\beta$ depends on the geometry of the domain. The most popular values of the parameters are $\\sigma = 10$, $\\beta = 8\/3$, and $\\rho = 28$. These are outside the ranges associated with the earth's atmosphere.\r\n\r\nThe deceptively simple nonlinearity introduced by the presence of $y_2$ in the system matrix $A$ changes everything. There are no random aspects to these equations, so the solutions $y(t)$ are completely determined by the parameters and the initial conditions, but their behavior is very difficult to predict. For some values of the parameters, the orbit of $y(t)$ in three-dimensional space is known as a <i>strange attractor<\/i>. It is bounded, but not periodic and not convergent. It never intersects itself. It ranges chaotically back and forth around two different points, or attractors. For other values of the parameters, the solution might converge to a fixed point, diverge to infinity, or oscillate periodically.\r\n\r\nThink of $\\eta = y_2$ as a free parameter, restrict $\\rho$ to be greater than one, and study the matrix\r\n\r\n$$A = [\\ -\\beta \\ \\ 0 \\ \\ \\eta \\ ; \\ \\ 0 \\ \\ -\\sigma \\ \\ \\sigma \\ ; \\ \\ \\eta \\ \\ \\rho \\ \\ -1 \\ ]$$\r\n\r\nIt turns out that $A$ is singular if and only if\r\n\r\n$$ \\eta = \\pm \\sqrt{\\beta (\\rho-1)} $$\r\n\r\nThe corresponding null vector, normalized so that its second component is equal to $\\eta$, is\r\n\r\n$$ [\\ \\rho-1 \\ \\ \\eta \\ \\ \\eta \\ ]^T $$\r\n\r\nWith the two different signs for $\\eta$, this defines two points in three-dimensional space. These points are fixed points for the differential equation. If either of these points is taken as the initial condition, then the initial derivative $\\dot{y}(0) = 0$ and so $y(t)$ never changes.\r\n\r\nFix $\\sigma = 10$, $\\beta = 8\/3$, and investigate the effect of the parameter $\\rho$. For $\\rho$ less than about 24.7, the fixed points are stable. If the initial value is close enough, the orbit will spiral in to the fixed point. However, for larger values of $\\rho$ these points are unstable. If $y(t)$ does not start at one of these points, it will never reach either of them. For most values of $\\rho$ greater than 24.7, including the popular $\\rho = 28$, the orbit is chaotic.\r\n<h4>Periodic solutions<a name=\"ba3ae2e1-bb8a-452b-8ded-eddb769c8497\"><\/a><\/h4>\r\nIn his comprehensive study of the Lorenz equations, Colin Sparrow found four exceptional values of $\\rho$ where a stable periodic orbit arises out of the chaos. If the initial point happens to be anywhere on the orbit, the solution will return to that point in finite time. If the initial point is not on the orbit, the trajectory will converge towards the periodic orbit. This behavior is unusual for nonlinear equations.\r\n\r\nEach orbit has what might be called a characteristic <i>signature<\/i>. Each of the four orbits has a different signature. Use \"+\" and \"-\" to denote the sign of $\\eta$ in the null vector. In the three-dimensional plots below, the red dots are these attractors. The point with the \"+\" is on the upper left, while the \"-\" is on the lower right.\r\n<h4>Rho = 99.65<a name=\"08e167a2-9755-413c-aa0a-a6abacfadf70\"><\/a><\/h4>\r\nThis is the most complex orbit. Its signature is +--+--. It circles the \"+\" fixed point once and then the \"-\" fixed point twice. Then it circles the \"+\" fixed point once again and the \"-\" point twice again on a slightly different trajectory before repeating the orbit.\r\n\r\n<img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/cleve\/lorenz1.gif\" alt=\"\" hspace=\"5\" vspace=\"5\" \/>\r\n<h4>Rho = 100.5<a name=\"e87240fa-738b-46c4-9149-fa064a3b1006\"><\/a><\/h4>\r\nThe signature is ++-. Circle \"+\" twice, then \"-\" once.\r\n\r\n<img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/cleve\/lorenz2.gif\" alt=\"\" hspace=\"5\" vspace=\"5\" \/>\r\n<h4>Rho = 160<a name=\"8e853655-2aba-47a0-893f-2978f76fcc85\"><\/a><\/h4>\r\nThe signature is ++--. Circle each fixed point twice before heading towards the other.\r\n\r\n<img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/cleve\/lorenz3.gif\" alt=\"\" hspace=\"5\" vspace=\"5\" \/>\r\n<h4>Rho = 350<a name=\"5941f174-5606-4e95-adde-6c0ec04a38ed\"><\/a><\/h4>\r\nThe simplest orbit. The signature is +-. No fuss, no bother.\r\n\r\n<img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/cleve\/lorenz4.gif\" alt=\"\" hspace=\"5\" vspace=\"5\" \/>\r\n<h4>Rho = 28<a name=\"cb25b6b8-73cd-46e3-8b25-b5236af01a04\"><\/a><\/h4>\r\nIn case you haven't seen it before, here is a plot for the value of $\\rho$ that is usually studied, $\\rho = 28$. This is the well known Lorenz butterfly. To really appreciate it, you should literally get hold of a three-dimensional plot and view it from different angles. This trajectory goes on forever, never intersecting itself, and never getting too close to, or too far away from, the two unstable fixed points. Most values of $\\rho$ near $\\rho = 28$ produce similar chaotic behavior.\r\n\r\n<img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/cleve\/lorenz0.gif\" alt=\"\" hspace=\"5\" vspace=\"5\" \/>\r\n<h4>lorenzgui<a name=\"27bd412e-a4d6-42aa-a407-9847b8731f86\"><\/a><\/h4>\r\nIf you want to see these orbits in action, in 3-D, download and run <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/37976-numerical-computing-with-matlab\">lorenzgui.m<\/a>.\r\n<h4>References<a name=\"28523a15-ca72-437d-9166-5ec2e3af01ec\"><\/a><\/h4>\r\nColin Sparrow, <i>The Lorenz Equations: Bifurcations, Chaos, and Strange Attractors<\/i>, Springer, 1982, <a href=\"http:\/\/link.springer.com\/book\/10.1007%2F978-1-4612-5767-7\">&lt;http:\/\/link.springer.com\/book\/10.1007%2F978-1-4612-5767-7<\/a>&gt;\r\n\r\nJames Gleick on Chaos: Making a New Science, YouTube interview, <a href=\"https:\/\/www.youtube.com\/watch?v=3orIIcKD8p4\">https:\/\/www.youtube.com\/watch?v=3orIIcKD8p4<\/a>\r\n\r\nJames Gleick, <i>Chaos: Making a New Scince<\/i>, Penguin Books, 1987, <a title=\"http:\/\/www.penguin.com\/book\/chaos-by-james-gleick\/9780143113454 (link no longer works)\">&lt;http:\/\/www.penguin.com\/book\/chaos-by-james-gleick\/9780143113454<\/a>&gt;,\r\n\r\n<script>\/\/ <![CDATA[\r\nfunction grabCode_81054cf2aec0486698f0f63c23d95773() {\r\n        \/\/ Remember the title so we can use it in the new page\r\n        title = document.title;\r\n\r\n        \/\/ Break up these strings so that their presence\r\n        \/\/ in the Javascript doesn't mess up the search for\r\n        \/\/ the MATLAB code.\r\n        t1='81054cf2aec0486698f0f63c23d95773 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 81054cf2aec0486698f0f63c23d95773';\r\n    \r\n        b=document.getElementsByTagName('body')[0];\r\n        i1=b.innerHTML.indexOf(t1)+t1.length;\r\n        i2=b.innerHTML.indexOf(t2);\r\n \r\n        code_string = b.innerHTML.substring(i1, i2);\r\n        code_string = code_string.replace(\/REPLACE_WITH_DASH_DASH\/g,'--');\r\n\r\n        \/\/ Use \/x3C\/g instead of the less-than character to avoid errors \r\n        \/\/ in the XML parser.\r\n        \/\/ Use '\\x26#60;' instead of '<' so that the XML parser\r\n        \/\/ doesn't go ahead and substitute the less-than character. \r\n        code_string = code_string.replace(\/\\x3C\/g, '\\x26#60;');\r\n\r\n        copyright = 'Copyright 2014 The MathWorks, Inc.';\r\n\r\n        w = window.open();\r\n        d = w.document;\r\n        d.write('\r\n\r\n<pre>\\n');\r\n        d.write(code_string);\r\n\r\n        \/\/ Add copyright line at the bottom if specified.\r\n        if (copyright.length > 0) {\r\n            d.writeln('');\r\n            d.writeln('%%');\r\n            if (copyright.length > 0) {\r\n                d.writeln('% _' + copyright + '_');\r\n            }\r\n        }\r\n\r\n        d.write('<\/pre>\r\n\r\n\r\n\\n');\r\n\r\n        d.title = title + ' (MATLAB code)';\r\n        d.close();\r\n    }\r\n\/\/ ]]><\/script>\r\n<p style=\"text-align: right; font-size: xx-small; font-weight: lighter; font-style: italic; color: gray;\">\r\n<a><span style=\"font-size: x-small; font-style: italic;\">Get\r\nthe MATLAB code<noscript>(requires JavaScript)<\/noscript><\/span><\/a>\r\n\r\nPublished with MATLAB\u00ae R2014a<\/p>\r\n\r\n<\/div>\r\n<!--\r\n81054cf2aec0486698f0f63c23d95773 ##### SOURCE BEGIN #####\r\n%% Periodic Solutions to the Lorenz Equations\r\n% Changing the value of a parameter in the equations that produce the\r\n% famous Lorenz chaotic attractor yields nonlinear ordinary differential\r\n% equations that have periodic solutions.\r\n\r\n%% The Lorenz equations\r\n% (This section is adapted from chapter 7 of my book\r\n% <https:\/\/www.mathworks.com\/moler\/chapters.html % Numerical Computing with MATLAB>, published by MathWorks and SIAM.)\r\n\r\n%%\r\n% The Lorenz chaotic attractor was first described in 1963 by Edward\r\n% Lorenz, an M.I.T. mathematician and meteorologist who was interested in\r\n% fluid flow models of the earth's atmosphere.  An excellent reference is\r\n% the book by Colin Sparrow cited at the end of this blog.\r\n\r\n%%\r\n% I have chosen to express the Lorenz equations in a somewhat unusual way\r\n% involving a matrix-vector product:\r\n%\r\n% $$ \\dot{y} = A y $$\r\n%\r\n% Here $y$ is a vector-valued function of $t$ with three components and $A$\r\n% is a 3-by-3 matrix that depends on $y$.  Seven of the nine elements in $A$\r\n% are constant, but the other two depend on $y_2(t)$:\r\n%\r\n% $$A =  [\\ -\\beta \\ \\  0 \\ \\ y_2 \\ ; \\ \\ 0 \\ \\ -\\sigma \\ \\ \\sigma \\ ; \\ \\  -y_2 \\ \\  \\rho \\ \\  -1 \\ ]$$\r\n%\r\n% The first component of the solution, $y_1(t)$, is related to the convection\r\n% in the atmospheric flow, while the other two components are related to\r\n% horizontal and vertical temperature variation.  The parameter $\\sigma$\r\n% is the Prandtl number, $\\rho$ is the normalized Rayleigh number,\r\n% and $\\beta$ depends on the geometry of the domain.\r\n% The most popular values of the parameters are $\\sigma = 10$, $\\beta = 8\/3$,\r\n% and $\\rho = 28$.  These are outside the ranges associated with the earth's\r\n% atmosphere.\r\n\r\n%%\r\n% The deceptively simple nonlinearity introduced by the presence of $y_2$ in\r\n% the system matrix $A$ changes everything.  There are no random aspects\r\n% to these equations, so the solutions $y(t)$ are completely determined\r\n% by the parameters and the initial conditions, but their behavior is\r\n% very difficult to predict.  For some values of the parameters,\r\n% the orbit of $y(t)$ in three-dimensional space is known as a\r\n% _strange attractor_.  It is bounded, but not periodic and not convergent.\r\n% It never intersects itself.  It ranges chaotically back and forth around\r\n% two different points, or attractors.  For other values of the parameters,\r\n% the solution might converge to a fixed point, diverge to infinity, or\r\n% oscillate periodically.\r\n\r\n%%\r\n% Think of $\\eta = y_2$ as a free parameter, restrict $\\rho$ to\r\n% be greater than one, and study the matrix\r\n%\r\n% $$A =  [\\ -\\beta \\ \\  0 \\ \\ \\eta \\ ; \\ \\ 0 \\ \\ -\\sigma \\ \\ \\sigma \\ ; \\ \\  \\eta \\ \\  \\rho \\ \\  -1 \\ ]$$\r\n%\r\n% It turns out that $A$ is singular if and only if\r\n%\r\n% $$ \\eta = \\pm \\sqrt{\\beta (\\rho-1)} $$\r\n\r\n%%\r\n% The corresponding null vector, normalized so that its second component\r\n% is equal to $\\eta$, is\r\n%\r\n% $$ [\\ \\rho-1 \\ \\ \\eta \\ \\ \\eta \\ ]^T $$\r\n%\r\n% With the two different signs for $\\eta$, this defines two points\r\n% in three-dimensional space.  These points are fixed points for the\r\n% differential equation.  If either of these points is taken as the\r\n% initial condition, then the initial derivative $\\dot{y}(0) = 0$\r\n% and so $y(t)$ never changes.\r\n\r\n%%\r\n% Fix $\\sigma = 10$, $\\beta = 8\/3$, and investigate the effect of the\r\n% parameter $\\rho$.  For $\\rho$ less than about 24.7, the fixed points\r\n% are stable.  If the inital value is close enough, the orbit will spiral\r\n% in to the fixed point.  However, for larger values of $\\rho$ these points\r\n% are unstable.  If $y(t)$ does not start at one of these points, it will\r\n% never reach either of them.  For most values of $\\rho$ greater than 24.7,\r\n% including the popular $\\rho = 28$, the orbit is chaotic.\r\n\r\n%% Periodic solutions\r\n% In his comprehensive study of the Lorenz equations, Colin Sparrow found\r\n% four exceptional values of $\\rho$ where a stable periodic orbit arises\r\n% out of the chaos.  If the initial point happens to be anywhere on the\r\n% orbit, the solution will return to that point in finite time.  If the\r\n% initial point is not on the orbit, the trajectory will converge towards\r\n% the periodic orbit.  This behavior is unusual for nonlinear equations.\r\n\r\n%%\r\n% Each orbit has what might be called a characteristic _signature_.\r\n% Each of the four orbits has a different signature.  Use \"+\" and \"-\"\r\n% to denote the sign of $\\eta$ in the null vector.  In the three-dimensional\r\n% plots below, the red dots are these attractors.  The point with the \"+\"\r\n% is on the upper left, while the \"-\" is on the lower right.\r\n\r\n%% Rho = 99.65\r\n% This is the most complex orbit.  Its signature is +REPLACE_WITH_DASH_DASH+REPLACE_WITH_DASH_DASH.  It circles the\r\n% \"+\" fixed point once and then the \"-\" fixed point twice.  Then it circles\r\n% the \"+\" fixed point once again and the \"-\" point twice again on a slightly\r\n% different trajectory before repeating the orbit.\r\n%\r\n% <<lorenz1.gif>>\r\n%\r\n\r\n%% Rho = 100.5\r\n% The signature is ++-.  Circle \"+\" twice, then \"-\" once.\r\n%\r\n% <<lorenz2.gif>>\r\n%\r\n\r\n%% Rho = 160\r\n% The signature is ++REPLACE_WITH_DASH_DASH.  Circle each fixed point twice before heading\r\n% towards the other.\r\n%\r\n% <<lorenz3.gif>>\r\n%\r\n\r\n%% Rho = 350\r\n% The simplest orbit.  The signature is +-.  No fuss, no bother.\r\n%\r\n% <<lorenz4.gif>>\r\n%\r\n\r\n%% Rho = 28\r\n% In case you haven't seen it before, here is a plot for the value of $\\rho$\r\n% that is usually studied, $\\rho = 28$.  This is the well known Lorenz\r\n% butterfly.  To really appreciate it, you should literally get hold of a\r\n% three-dimensional plot and view it from different angles.  This trajectory\r\n% goes on forever, never intersecting itself, and never getting too close to,\r\n% or too far away from, the two unstable fixed points.  Most values of\r\n% $\\rho$ near $\\rho = 28$ produce similar chaotic behavior.\r\n%\r\n% <<lorenz0.gif>>\r\n%\r\n\r\n%% lorenzgui\r\n% If you want to see these orbits in action, in 3-D, download and run\r\n% <https:\/\/www.mathworks.com\/moler.htmlncmfilelist.html lorenzgui.m>.\r\n\r\n%% References\r\n% Colin Sparrow,\r\n% _The Lorenz Equations: Bifurcations, Chaos, and Strange Attractors_,\r\n% Springer, 1982,\r\n% <http:\/\/link.springer.com\/book\/10.1007%2F978-1-4612-5767-7 % http:\/\/link.springer.com\/book\/10.1007%2F978-1-4612-5767-7>\r\n\r\n%%\r\n% James Gleick on Chaos: Making a New Science, YouTube interview,\r\n% <https:\/\/www.youtube.com\/watch?v=3orIIcKD8p4 % https:\/\/www.youtube.com\/watch?v=3orIIcKD8p4>\r\n\r\n%%\r\n% James Gleick, _Chaos: Making a New Scince_, Penguin Books, 1987,\r\n% <http:\/\/www.penguin.com\/book\/chaos-by-james-gleick\/9780143113454 % http:\/\/www.penguin.com\/book\/chaos-by-james-gleick\/9780143113454>,\r\n\r\n##### SOURCE END ##### 81054cf2aec0486698f0f63c23d95773\r\n-->","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img decoding=\"async\"  class=\"img-responsive\" src=\"https:\/\/blogs.mathworks.com\/images\/cleve\/lorenz1.gif\" onError=\"this.style.display ='none';\" \/><\/div><!--introduction-->Changing the value of a parameter in the equations that produce the famous Lorenz chaotic attractor yields nonlinear ordinary differential equations that have periodic solutions.\r\n\r\n<!--\/introduction-->... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/cleve\/2014\/04\/28\/periodic-solutions-to-the-lorenz-equations\/\">read more >><\/a><\/p>","protected":false},"author":78,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[12,24],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/970"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/users\/78"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/comments?post=970"}],"version-history":[{"count":10,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/970\/revisions"}],"predecessor-version":[{"id":1419,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/970\/revisions\/1419"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/media?parent=970"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/categories?post=970"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/tags?post=970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}