{"id":254,"date":"2025-09-08T01:41:52","date_gmt":"2025-09-08T05:41:52","guid":{"rendered":"https:\/\/sites.bu.edu\/tron\/?p=254"},"modified":"2025-12-24T11:28:45","modified_gmt":"2025-12-24T16:28:45","slug":"koopman-in-the-field","status":"publish","type":"post","link":"https:\/\/sites.bu.edu\/tron\/2025\/09\/08\/koopman-in-the-field\/","title":{"rendered":"Koopman in the Field"},"content":{"rendered":"<p><script src=\"https:\/\/polyfill.io\/v3\/polyfill.min.js?features=es6\"><\/script><script id=\"MathJax-script\" async src=\"https:\/\/cdn.jsdelivr.net\/npm\/mathjax@3\/es5\/tex-mml-chtml.js\"><\/script><\/p>\n<h2>Overview<\/h2>\n<p>We propose a novel data-driven framework for feedback control of hard-to-model, possibly time-varying, mechanical systems, such as soft robots, that operate in real-world environments and in close interaction with humans. The research in this project is guided by two major research questions:<\/p>\n<ol>\n<li><strong>Control design:<\/strong> Develop novel theoretical foundations in data-driven controller design for nonlinear, time-varying systems to imitate trajectories under input and output safety constrains.<\/li>\n<li><strong>Embodiment design:<\/strong> Develop methods to design the embodiment (hardware and sensors) of the robot to support control and long-term autonomy.<\/li>\n<\/ol>\n<figure id=\"attachment255\" aria-describedby=\"caption-attachment255\" style=\"width: 6802px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" src=\"\/tron\/files\/2025\/09\/koopman-overview.png\" alt=\"Overview illustration with an idealized soft robot of the three parts of our project: control synthesis, Learning from Demonstrations, Adaptation\" width=\"6792\" height=\"1768\" class=\"size-full wp-image-255\" srcset=\"https:\/\/sites.bu.edu\/tron\/files\/2025\/09\/koopman-overview.png 6792w, https:\/\/sites.bu.edu\/tron\/files\/2025\/09\/koopman-overview-636x166.png 636w, https:\/\/sites.bu.edu\/tron\/files\/2025\/09\/koopman-overview-1024x267.png 1024w, https:\/\/sites.bu.edu\/tron\/files\/2025\/09\/koopman-overview-768x200.png 768w, https:\/\/sites.bu.edu\/tron\/files\/2025\/09\/koopman-overview-1536x400.png 1536w, https:\/\/sites.bu.edu\/tron\/files\/2025\/09\/koopman-overview-2048x533.png 2048w\" sizes=\"(max-width: 6792px) 100vw, 6792px\" \/><figcaption id=\"caption-attachment255\" class=\"wp-caption-text\">Overview illustration with an idealized soft robot of the three parts of our project: control synthesis, Learning from Demonstrations, Adaptation<\/figcaption><\/figure>\n<h2>Motivation<\/h2>\n<p>Imagine a worker, in the field on a farm, tasked with deploying a soft robot for the first time. The operator needs an intuitive way to instruct the robot on a given task, without technical knowledge of the machine\u2019s capabilities or limitations. A possible approach is teaching from demonstrations. However, since these robots are flexible and compliant, the user\u2019s demonstrations may contain configurations that the robot cannot reach or maintain on its own; furthermore, real-world field settings can vary dramatically over time in task specifications (different physical characteristics), environmental conditions (temperature and humidity), and repeatability of the robot\u2019s motions (material fatigue).<br \/>\nOur project provides a novel data-driven approach for control and hardware design that models the system and feedback controller jointly to maintain stability, follow desired trajectories, avoid undesired robot configurations, and adapt to changing conditions.<\/p>\n<h2>Background on global linearization using the Koopman operator<\/h2>\n<p>Consider a general discrete-time autonomous dynamical system \\(x^+ = F(x)\\). Assume that an explicit model of the system is not available, but only pairs of data \\(\\{x_i^+,x_i\\}\\). If the function \\(F\\) is linear, there exist classical techniques (mostly based on solving linear squares problems) for modeling the behavior of the system. If the function is nonlinear, a possible approach is based on the <em><strong>Koopman operator<\/strong><\/em>: in this approach the state \\(x\\) is <em><strong>lifted<\/strong><\/em> to a space of<em><strong> nonlinear observables<\/strong><\/em> \\(\\psi_x(x)\\); it can be shown that if the lifted space is large enough (and possibly infinite), we obtain a <em><strong>lifted linear<\/strong><\/em>\u00a0model \\(\\psi_x^+=K\\psi_x\\), where \\(K\\) can be estimated from the data pairs \\(\\{\\psi_x(x_i^+),\\psi_x(x_i)\\}\\).<\/p>\n<p>If the original system is non-autonomous and is input-affine, i.e., \\(x^+ = F(x)+G(x)u\\), where \\(u\\) is an input, an application of the same theory leads to a <em><strong>bilinear<\/strong><\/em> model \\(\\psi_x^+=K_{xx}\\psi_x+K_{xu}(\\psi_x)u\\). If the input \\(u\\) is fixed and does not depend on the state, then we can identify \\(K_{xx},K_{xu}\\) as in the autonomous case; however, the lifted system does not change the approach for designing a controller where \\(u\\) is a function of the state \\(\\psi_x\\), since the system is not jointly linear in both.<\/p>\n<h2>The Koopman Control Factorization (KCF)<\/h2>\n<p>As discussed above, we cannot rely on a na\u00efve pipeline that first models the system, and then designs the controller. Instead, we propose to use a linear-in-the-parameters controller of the form \\(u=K_u\\psi_u(x)+k_{u}\\), where \\(\\psi_u\\) is a set of <strong><em>features<\/em><\/strong> extracted from the state \\(x\\) (or from an output of the system, for an output-feedback controller). We then posit that we should apply Koopman theory to the <strong><em>closed-loop system<\/em><\/strong> (which is autonomous). With some technical assumptions on the observables \\(\\psi_x\\) being &#8220;rich enough&#8221; to &#8220;encompass&#8221; \\(\\psi_u\\), we then obtain the Koopman Control Factorization (KCF) model \\(\\psi_x^+=\\tilde{K}\\psi_x\\), where \\(\\tilde{K}\\) depends bilinearly on the traditional model \\(K_{xx},K_{xu}\\), and the controller parameters \\(K_u,k_u\\).<br \/>\nThe traditional model \\(K_{xx},K_{xu}\\) can be identified by using random control inputs (a.k.a., <strong><em>motor babbling<\/em><\/strong>).<br \/>\nThe controller parameters \\(K_u,k_u\\), instead, depend on the control problem. For stabilizing the system to a desired equilibrium \\(\\psi_{\\textrm{eq}}\\), we can write a Lyapunov function \\(V(\\psi-\\psi_{\\textrm{eq}})\\), and the Lyapunov condition for convergence \\(V^+(\\psi-\\psi_{\\textrm{eq}})\\leq \\lambda V(\\psi-\\psi_{\\textrm{eq}})\\). With the KCF, these expressions are quadratic in the control parameters \\(K_u,k_u\\). We can then use convex optimization to find controller parameters that satisfy the convergence condition.<\/p>\n<figure id=\"attachment267\" aria-describedby=\"caption-attachment267\" style=\"width: 330px\" class=\"wp-caption alignright\"><img loading=\"lazy\" src=\"\/tron\/files\/2025\/09\/invertedDoublePendulum.gif\" alt=\"Animation showing the stabilization of a double inverted pendulum\" width=\"320\" height=\"240\" class=\"wp-image-267 size-full\" \/><figcaption id=\"caption-attachment267\" class=\"wp-caption-text\">Results of our KCF design on an inverted double pendulum<\/figcaption><\/figure>\n<h2>Testing on the single and double pendulum<\/h2>\n<p>We tested our approach on two simulated systems: a single inverted pendulum, and a double inverted pendulum. Using a fourth-order Runge\u2013Kutta (RK4) method, we simulated 400,000 and 900,000 data pairs for the two sytems respectively.<br \/>\nWe then used Semi-Definite Programming (SDP) to design the controllers for both the single and double pendulums. In both cases, our design technique was able to find a stabilizing controller, and we showed that the controller can even generalize to initial conditions not covered by the training set (such as higher initial speeds).<\/p>\n<h3><strong>Funding and support<\/strong><\/h3>\n<p><img loading=\"lazy\" src=\"\/tron\/files\/2025\/08\/nsf_logo-150x150.png\" alt=\"\" width=\"150\" height=\"150\" class=\"alignright size-thumbnail wp-image-251\" \/>This project is supported by the National Science Foundation grant <a href=\"https:\/\/www.nsf.gov\/awardsearch\/showAward?AWD_ID=2432394\">&#8220;Koopman in the Field: Feedback, Teaching, and Adaptation for Real World Mechanical Systems&#8221; (Award number 2432394)<\/a><\/p>\n<p>Start date: December 23, 2024<br \/>\nEnd date: January 1, 2025<\/p>\n<p><span><em>Disclaimer: Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.<\/em><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview We propose a novel data-driven framework for feedback control of hard-to-model, possibly time-varying, mechanical systems, such as soft robots, that operate in real-world environments and in close interaction with humans. The research in this project is guided by two major research questions: Control design: Develop novel theoretical foundations in data-driven controller design for nonlinear, [&hellip;]<\/p>\n","protected":false},"author":11510,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4],"tags":[],"_links":{"self":[{"href":"https:\/\/sites.bu.edu\/tron\/wp-json\/wp\/v2\/posts\/254"}],"collection":[{"href":"https:\/\/sites.bu.edu\/tron\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sites.bu.edu\/tron\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sites.bu.edu\/tron\/wp-json\/wp\/v2\/users\/11510"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.bu.edu\/tron\/wp-json\/wp\/v2\/comments?post=254"}],"version-history":[{"count":12,"href":"https:\/\/sites.bu.edu\/tron\/wp-json\/wp\/v2\/posts\/254\/revisions"}],"predecessor-version":[{"id":270,"href":"https:\/\/sites.bu.edu\/tron\/wp-json\/wp\/v2\/posts\/254\/revisions\/270"}],"wp:attachment":[{"href":"https:\/\/sites.bu.edu\/tron\/wp-json\/wp\/v2\/media?parent=254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sites.bu.edu\/tron\/wp-json\/wp\/v2\/categories?post=254"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sites.bu.edu\/tron\/wp-json\/wp\/v2\/tags?post=254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}