{"id":2933,"date":"2010-10-09T17:53:20","date_gmt":"2010-10-09T16:53:20","guid":{"rendered":"http:\/\/www.walkingrandomly.com\/?p=2933"},"modified":"2011-03-10T15:07:10","modified_gmt":"2011-03-10T14:07:10","slug":"mathematica-8-control-theory-sneak-peek","status":"publish","type":"post","link":"https:\/\/walkingrandomly.com\/?p=2933","title":{"rendered":"Mathematica 8 &#8211; Control Theory Sneak Peek"},"content":{"rendered":"<p>\ufeff\ufeff\ufeffLots of people are hitting Walking Randomly looking for info about Mathematica 8 and have had to walk away disappointed&#8230;.until now!<\/p>\n<p>I&#8217;ve been part of the Mathematica 8 beta program for a while now and in order to access the goodies I had to sign an NDA which can be roughly summed up as &#8216;The first rule of Mathematica 8 beta is that you don&#8217;t talk about Mathematica 8 beta.&#8217;<\/p>\n<p>As of today, however, I am allowed to show you a tiny little bit of it in advance of it being released.  Mathematica 8 will include a massive amount of support for <a href=\"http:\/\/en.wikipedia.org\/wiki\/Control_theory\">control theory<\/a>.  Here&#8217;s a brief preview<\/p>\n<p>Let&#8217;s start by building a <a href=\"http:\/\/en.wikipedia.org\/wiki\/Transfer_function\">transfer function<\/a> model<\/p>\n<pre>myTF = TransferFunctionModel[1\/(1 + 2 s + 2 s^2 + s^3), s]<\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.walkingrandomly.com\/images\/mathematica8\/Transfer_function.png\" alt=\"Transfer Function\" \/><\/p>\n<p>I can find its poles exactly<\/p>\n<pre>TransferFunctionPoles[myTF]\r\n\r\n{{{-1, -(-1)^(1\/3), (-1)^(2\/3)}}}<\/pre>\n<p>and, of course, numerically<\/p>\n<pre>TransferFunctionPoles[myTF] \/\/N\r\n\r\n{{{-1., -0.5 - 0.866025 I, -0.5 + 0.866025 I}}}<\/pre>\n<p>Here&#8217;s its bode plot<\/p>\n<pre>BodePlot[myTF]<\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.walkingrandomly.com\/images\/mathematica8\/bode_plot.png\" alt=\"Bode Plot\" \/><br \/>\nHere&#8217;s its response to a unit step function<\/p>\n<pre>stepresponse = OutputResponse[myTF, UnitStep[t], t]<\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.walkingrandomly.com\/images\/mathematica8\/step_response.png\" alt=\"Step Response of 3rd order Butterworth Filter\" \/><br \/>\nLet&#8217;s plot that response<\/p>\n<pre>Plot[stepresponse, {t, 0, 10}]<\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.walkingrandomly.com\/images\/mathematica8\/step_response_plot.png\" alt=\"Step Response of 3rd order Butterworth Filter\" \/><br \/>\nFinally, I convert it to a state space model.<\/p>\n<pre>StateSpaceModel[myTF]<\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.walkingrandomly.com\/images\/mathematica8\/butterworth_statespace.png\" alt=\"State Space Representation\" \/><br \/>\nThat&#8217;s the tip of a very big iceberg ;)<\/p>\n<p><strong>Update:<\/strong> Mathematica 8 has now been released.\u00a0 See <a href=\"https:\/\/www.walkingrandomly.com\/?p=3018\">https:\/\/www.walkingrandomly.com\/?p=3018<\/a> for more details.<\/p>\n<h3>Other Mathematica 8 previews<\/h3>\n<ul>\n<li><a href=\"http:\/\/blog.wolfram.com\/2010\/10\/07\/why-you-should-care-about-the-obscure\/\">The Owen&#8217;s T function<\/a><\/li>\n<li><a href=\"http:\/\/blog.wolfram.com\/2010\/10\/01\/new-algorithm-to-make-short-work-of-challenging-problems\/\">Symbolics and Numerics combine to form new integration Algorithm<\/a><\/li>\n<li><a href=\"http:\/\/blog.wolfram.com\/2010\/09\/20\/tapping-into-the-power-of-gpu-in-mathematica\/\">Mathematica, CUDA and GPUs<\/a><\/li>\n<li><a href=\"http:\/\/blog.wolfram.com\/2010\/11\/10\/how-to-make-a-webcam-intruder-alarm-with-mathematica\/\">Real time image capturing<\/a><\/li>\n<li><a href=\"https:\/\/www.walkingrandomly.com\/?p=2985\">5 new plot commands in Mathematica 8<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\ufeff\ufeff\ufeffLots of people are hitting Walking Randomly looking for info about Mathematica 8 and have had to walk away disappointed&#8230;.until now! I&#8217;ve been part of the Mathematica 8 beta program for a while now and in order to access the goodies I had to sign an NDA which can be roughly summed up as &#8216;The [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[8],"tags":[],"class_list":["post-2933","post","type-post","status-publish","format-standard","hentry","category-mathematica"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3swhs-Lj","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/2933","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2933"}],"version-history":[{"count":11,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/2933\/revisions"}],"predecessor-version":[{"id":3336,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/2933\/revisions\/3336"}],"wp:attachment":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2933"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2933"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2933"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}