{"id":643,"date":"2015-10-02T23:30:03","date_gmt":"2015-10-03T03:30:03","guid":{"rendered":"http:\/\/underthehood.blogwyrm.com\/?p=643"},"modified":"2022-07-28T06:26:01","modified_gmt":"2022-07-28T10:26:01","slug":"laplace-transforms-part-5-the-simple-harmonic-oscillator","status":"publish","type":"post","link":"https:\/\/underthehood.blogwyrm.com\/?p=643","title":{"rendered":"Laplace Transforms &#8211; Part 5: The Simple Harmonic Oscillator"},"content":{"rendered":"<p>In this post, the focus shifts from looking at the basic properties of the Laplace Transform to the application of it to dynamical systems of the form<\/p>\n<p>\\[ \\frac{d}{dt} \\bar S = A \\bar S \\; ,\\]<\/p>\n<p>where the matrix $$A$$ can be time-varying but does not depend on the state $$\\bar S$$.<\/p>\n<p>To be sure, some differential equations were already touched upon in passing in earlier posts, but this was done more as a way to motivate the possible transforms that would result and which would require a subsequent inverse rather than being examined in their own right.  <\/p>\n<p>As a prototype for multi-variable dynamical systems and a prelude to the general theory, this column will look at the application of the Laplace Transform in the simplest multi-variable structure &#8211; the simple harmonic oscillator (SHO).  This tried and true system should always be the first one explored based on one simple fact &#8211; if the theory is not understandable or workable for this fundamental system then it won&#8217;t be understandable or workable for any other application.<\/p>\n<p>The familiar state for the SHO is given by:<\/p>\n<p>\\[ \\bar S = \\left[ \\begin{array}{c} x(t) \\\\ v(t) \\end{array} \\right] \\; \\] <\/p>\n<p>and its corresponding equation of motion <\/p>\n<p>\\[ \\frac{d}{dt} \\left[ \\begin{array}{c} x \\\\ v \\end{array} \\right] = \\left[ \\begin{array}{cc} 0 &#038; 1 \\\\ -\\omega_0^2 &#038; 0 \\end{array} \\right] \\left[ \\begin{array}{c} x \\\\ v \\end{array} \\right] \\; ,\\]<\/p>\n<p>where the matrix $$A$$ is given by<\/p>\n<p>\\[ A = \\left[ \\begin{array}{cc} 0 &#038; 1 \\\\ -\\omega_0^2 &#038; 0 \\end{array} \\right] \\; .\\]<\/p>\n<p>Taking the Laplace Transform of the oscillator&#8217;s equation of motion (using the properties established in earlier posts) yields<\/p>\n<p>\\[ \\left[ \\begin{array}{c} s X(s) &#8211; x_0 \\\\ s V(s) &#8211; v_0 \\end{array} \\right] = \\left[ \\begin{array}{cc} 0 &#038; 1 \\\\ -\\omega_0^2 &#038; 0 \\end{array} \\right] \\left[ \\begin{array}{c} X(s) \\\\ V(s) \\end{array} \\right] \\; .\\]<\/p>\n<p>Note that, as expected, the differential equation now becomes a (linear) algebraic equation.  <\/p>\n<p>Some basic re-arrangement leads to the following matrix equation <\/p>\n<p>\\[ (s Id &#8211; A) \\left[ \\begin{array}{c} X(s) \\\\ V(s) \\end{array} \\right] = \\left[ \\begin{array}{c} x_0 \\\\ v_0 \\end{array} \\right] \\; ,\\]<\/p>\n<p>where $$Id$$ is the $$2&#215;2$$ identity matrix.  <\/p>\n<p>The solution to this equation is obtained by finding the inverse of the matrix $$s Id &#8211; A$$.<\/p>\n<p>\\[ \\left[ \\begin{array}{c} X(s) \\\\ V(s) \\end{array} \\right] = (s Id &#8211; A)^{-1} \\left[ \\begin{array}{c} x_0 \\\\ v_0 \\end{array} \\right] \\; .\\]<\/p>\n<p>It is convenient to define<\/p>\n<p>\\[ M = s Id &#8211; A = \\left[ \\begin{array}{cc} s &#038; -1 \\\\ \\omega_0^2 &#038; s \\end{array} \\right] \\; .\\]<\/p>\n<p>The inverse then follows from the usual formula for a $$2&#215;2$$ matrix<\/p>\n<p>\\[ M^{-1} = \\frac{1}{s^2 + \\omega_0^2} \\left[ \\begin{array}{cc} s &#038; 1 \\\\ -\\omega_0^2 &#038; s \\end{array} \\right] \\; ,\\]<\/p>\n<p>where the pre-factor is $$1\/det(M)$$.<\/p>\n<p>Multiply the right-hand side out leads to the following expressions for $$X(s)$$<\/p>\n<p>\\[ X(s) = \\frac{s x_0}{s^2 + \\omega_0^2} + \\frac{v_0}{s^2 + \\omega_0^2} \\; \\]<\/p>\n<p>and $$V(s)$$<\/p>\n<p>\\[ V(s) = -\\frac{x_0 \\omega_0^2 }{s^2 + \\omega_0^2} + \\frac{s v_0}{s^2 + \\omega_0^2} \\; .\\]<\/p>\n<p>The last piece is to take the inverse Laplace Transform of the individual components to get <\/p>\n<p>\\[ x(t) = x_0 \\cos(\\omega_0 t) + \\frac{v_0}{\\omega_0} \\sin(\\omega t) \\; \\]<\/p>\n<p>and<\/p>\n<p>\\[ v(t) = -x_0 \\omega_0 \\sin(\\omega_0 t) + v_0 \\cos(\\omega t) \\; ,\\]<\/p>\n<p>which, happily, are the expected results.<\/p>\n<p>Next week, I&#8217;ll begin my examination of the general theory use in controls engineering.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this post, the focus shifts from looking at the basic properties of the Laplace Transform to the application of it to dynamical systems of the form \\[ \\frac{d}{dt} \\bar&#8230; <a class=\"read-more-button\" href=\"https:\/\/underthehood.blogwyrm.com\/?p=643\">Read more &gt;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-643","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/underthehood.blogwyrm.com\/index.php?rest_route=\/wp\/v2\/posts\/643","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/underthehood.blogwyrm.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/underthehood.blogwyrm.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/underthehood.blogwyrm.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/underthehood.blogwyrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=643"}],"version-history":[{"count":4,"href":"https:\/\/underthehood.blogwyrm.com\/index.php?rest_route=\/wp\/v2\/posts\/643\/revisions"}],"predecessor-version":[{"id":648,"href":"https:\/\/underthehood.blogwyrm.com\/index.php?rest_route=\/wp\/v2\/posts\/643\/revisions\/648"}],"wp:attachment":[{"href":"https:\/\/underthehood.blogwyrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=643"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/underthehood.blogwyrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=643"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/underthehood.blogwyrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=643"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}