<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://sriram-2502.github.io//feed.xml" rel="self" type="application/atom+xml" /><link href="https://sriram-2502.github.io//" rel="alternate" type="text/html" /><updated>2025-09-10T15:06:50+00:00</updated><id>https://sriram-2502.github.io//feed.xml</id><title type="html">Sriram Krishnamoorthy</title><subtitle>personal description</subtitle><author><name>Sriram Krishnamoorthy</name><email>sriramk@clemson.edu</email></author><entry><title type="html">Koopman Basics</title><link href="https://sriram-2502.github.io//posts/2024/12/koopman-basics/" rel="alternate" type="text/html" title="Koopman Basics" /><published>2024-12-02T00:00:00+00:00</published><updated>2024-12-02T00:00:00+00:00</updated><id>https://sriram-2502.github.io//posts/2024/12/koopman-basics</id><content type="html" xml:base="https://sriram-2502.github.io//posts/2024/12/koopman-basics/"><![CDATA[<p>In this blog post, we introduce the Koopman operator, a powerful mathematical framework that transforms nonlinear systems into a linear perspective by focusing on observable functions rather than raw state variables.</p>

<h2 id="a-brief-theory-of-the-koopman-operator">A Brief Theory of the Koopman Operator</h2>

<p>To understand the Koopman operator, let’s start with the basics. Imagine we have a system of nonlinear differential equations:</p>

<p>\[
\dot{x} = f(x),
\]</p>

<p>where:</p>
<ul>
  <li>\( x \) represents the state of the system (e.g., positions, velocities, or other quantities),</li>
  <li>\( \dot{x} \) is the rate of change of \( x \),</li>
  <li>\( f(x) \) is a potentially nonlinear function that describes how the state evolves over time.</li>
</ul>

<p>This equation models many systems in nature and engineering, from planetary motion to controlling robots. However, nonlinear systems often exhibit complex, unpredictable behaviors, making them challenging to analyze.</p>

<hr />

<h3 id="the-koopman-operator-transforming-nonlinear-into-linear"><strong>The Koopman Operator: Transforming Nonlinear into Linear</strong></h3>

<p>The Koopman operator, denoted as \( \mathcal{K} \), provides a powerful way to study nonlinear systems by shifting our focus from the state \( x \) to <strong>observable functions</strong>. These observables, \( g(x) \), are functions that describe features of the system state \( x \)—for example:</p>
<ul>
  <li>The energy of a pendulum,</li>
  <li>The distance of a robot from an obstacle,</li>
  <li>Or other meaningful properties.</li>
</ul>

<p>The Koopman operator is defined as:</p>

<p>\[
\mathcal{K} g(x) = g(f(x)),
\]</p>

<p>where:</p>
<ul>
  <li>\( g(x) \) is an observable function,</li>
  <li>\( f(x) \) is the nonlinear evolution of the state, as given by \( \dot{x} = f(x) \).</li>
</ul>

<p><strong>In simple terms:</strong></p>
<ul>
  <li>Instead of analyzing how the state \( x \) evolves directly, the Koopman operator tracks how <strong>features of \( x \)</strong> (the observables \( g(x) \)) change over time.</li>
  <li>Remarkably, the Koopman operator is <strong>linear</strong> in the space of observables, even though the original system dynamics are nonlinear.</li>
</ul>

<p>This linearity allows us to apply the powerful tools of linear algebra to study complex, nonlinear systems.</p>

<hr />

<h3 id="eigenfunctions-of-the-koopman-operator"><strong>Eigenfunctions of the Koopman Operator</strong></h3>

<p>An important concept in Koopman theory is the <strong>eigenfunction</strong>. An eigenfunction \( \phi(x) \) satisfies the following relationship under the Koopman operator:</p>

<p>\[
\mathcal{K} \phi(x) = \lambda \phi(x),
\]</p>

<p>where:</p>
<ul>
  <li>\( \phi(x) \) is the eigenfunction, representing a special observable whose behavior under the Koopman operator is simple—it just scales by a factor \( \lambda \),</li>
  <li>\( \lambda \) is the eigenvalue, which describes how \( \phi(x) \) evolves over time.</li>
</ul>

<p><strong>In simpler terms:</strong>
Eigenfunctions are like “building blocks” of the system’s dynamics. They evolve predictably, making them incredibly useful for analyzing and understanding the system.</p>

<hr />

<h3 id="why-this-matters"><strong>Why This Matters</strong></h3>

<p>The Koopman operator transforms the complex, nonlinear dynamics of the system \( \dot{x} = f(x) \) into a simpler, linear framework by focusing on observables and their evolution. By identifying eigenfunctions and eigenvalues, we can:</p>
<ol>
  <li><strong>Decompose the dynamics</strong> into simpler, predictable components,</li>
  <li><strong>Simplify the analysis and prediction</strong> of the system’s long-term behavior,</li>
  <li><strong>Design better control strategies</strong> for engineering systems, like robots.</li>
</ol>

<hr />

<h3 id="whats-next"><strong>What’s Next?</strong></h3>
<p>Remember the duffing system from the previous blog post? 
<!-- markdownlint-disable --></p>
<iframe src="/files/phase_portrait_duffing.html" width="100%" height="700px" frameborder="0"></iframe>
<!-- markdownlint-enable -->

<p>Indeed we can characterize the differet regions of the duffing oscillator.</p>

<p><img src="/files/duffing_manifold.png" alt="Duffing system with Koopman" /></p>]]></content><author><name>Sriram Krishnamoorthy</name><email>sriramk@clemson.edu</email></author><category term="koopman" /><category term="dynamics" /><summary type="html"><![CDATA[In this blog post, we introduce the Koopman operator, a powerful mathematical framework that transforms nonlinear systems into a linear perspective by focusing on observable functions rather than raw state variables.]]></summary></entry><entry><title type="html">Navigating Safely: Following the Path of Density</title><link href="https://sriram-2502.github.io//posts/2024/12/density-functions-navigation/" rel="alternate" type="text/html" title="Navigating Safely: Following the Path of Density" /><published>2024-12-01T00:00:00+00:00</published><updated>2024-12-01T00:00:00+00:00</updated><id>https://sriram-2502.github.io//posts/2024/12/density-functions</id><content type="html" xml:base="https://sriram-2502.github.io//posts/2024/12/density-functions-navigation/"><![CDATA[<p>Robots today are more than machines; they’re companions, assistants, and explorers. For these robots to safely navigate dynamic and cluttered environments—like a robot vacuum avoiding toys or a delivery drone dodging pedestrians—they need a clear understanding of their surroundings. One powerful tool they use is <strong>density functions</strong>, a mathematical framework to represent safe and unsafe areas while guiding them safely toward their goals.</p>

<p>This post explores how density functions define safe navigation by associating high densities with the target and safe regions, low densities with obstacles, and using the <strong>positive gradient of the density</strong> as a safe path to the goal.</p>

<hr />

<p>Imagine you’re at a bustling train station during rush hour. People are moving in all directions, suitcases roll past, and announcements echo through the air. Navigating this chaos, you instinctively steer clear of crowded zones, avoiding the hurried travelers and luggage obstacles. Your focus sharpens as you spot a path that feels less congested—a safer route to your platform. Robots face similar challenges in their environments, from crowded warehouses to busy streets. Like us, they must discern safe paths, avoid obstacles, and move toward their goal. This is where density functions come in, giving robots a mathematical lens to identify safe regions and navigate using the positive gradient of density, much like we find our way through a crowd.</p>

<h2 id="what-are-density-functions-in-robotics"><strong>What Are Density Functions in Robotics?</strong></h2>

<p>Density functions in this context describe the distribution of system trajectories in the robot’s environment:</p>
<ul>
  <li><strong>High density</strong>: Found near the target and safe regions.</li>
  <li><strong>Low density</strong>: Found near obstacles and unsafe areas.</li>
</ul>

<p>Mathematically, the density function \( \rho(x) \) assigns a value to each position \( x \), representing the “attractiveness” of that location. The robot uses this information to navigate by following the <strong>positive gradient</strong> of the density:
\[
\mathbf{u}(x) = \nabla \rho(x),
\]
where \( \mathbf{u}(x) \) is the robot’s control input (direction of movement), and \( \nabla \rho(x) \) is the gradient of the density function.</p>

<hr />

<h2 id="how-density-functions-enable-safe-navigation"><strong>How Density Functions Enable Safe Navigation</strong></h2>

<h3 id="1-defining-safe-and-unsafe-regions"><strong>1. Defining Safe and Unsafe Regions</strong></h3>
<p>Density functions provide a spatial map of the environment:</p>
<ul>
  <li><strong>High-density regions</strong>: Indicate areas close to the target or clear of obstacles.</li>
  <li><strong>Low-density regions</strong>: Represent unsafe zones near obstacles or hazards.</li>
</ul>

<p>The robot can interpret this map to distinguish between safe paths and areas to avoid.</p>

<h3 id="2-following-the-gradient"><strong>2. Following the Gradient</strong></h3>
<p>The robot navigates its environment by moving in the direction of the <strong>positive gradient of the density function</strong> \( \rho(x) \). This means that at every step, the robot seeks to increase the value of \( \rho(x) \), which represents the “density” of safe or goal-oriented regions in the space.</p>

<p>Imagine the density function as a kind of <strong>topographic map</strong>, where higher values of \( \rho(x) \) correspond to peaks (safe or desirable areas, such as the target location), and lower values represent valleys (unsafe areas, such as obstacles). The robot’s objective is to climb this “density hill,” always heading toward areas with higher density values.</p>

<p>To achieve this, the robot uses the <strong>positive gradient of the density function</strong>:</p>
<ul>
  <li>The gradient \( \nabla \rho(x) \) points in the direction of the steepest increase in density at any given point \( x \).</li>
  <li>By following this gradient, the robot ensures it is moving toward regions of increasing density, ultimately reaching the <strong>maximum density</strong> (the target location).</li>
</ul>

<p>This strategy not only guides the robot safely toward the goal but also ensures it avoids low-density regions, which are associated with obstacles or unsafe areas. The dynamic nature of the density function allows the robot to adjust its trajectory in real time, ensuring it can adapt to changing environments or unexpected obstacles.</p>

<ul>
  <li>Naturally steer it toward the target,</li>
  <li>Avoid low-density unsafe regions, ensuring safety.</li>
</ul>

<p>This is akin to a ball rolling uphill on a potential field, always seeking higher values.</p>

<h3 id="3-dynamically-adjusting-trajectories"><strong>3. Dynamically Adjusting Trajectories</strong></h3>
<p>As the robot perceives its environment in real time, it updates \( \rho(x) \) to reflect changes (e.g., a new obstacle appearing). This ensures it always follows the safest, most efficient trajectory to its goal.</p>

<hr />

<h2 id="a-practical-example"><strong>A Practical Example</strong></h2>

<p>Imagine a robot navigating through a forest to deliver a package. Here’s how density functions help:</p>
<ol>
  <li><strong>High density</strong>: The area near the delivery point and clear flight paths.</li>
  <li><strong>Low density</strong>: Areas cluttered with trees or other obstacles.</li>
  <li><strong>Safe navigation</strong>: The robot follows the positive gradient of \( \rho(x) \), steering clear of obstacles while moving toward its target.</li>
</ol>

<!-- markdownlint-disable -->
<div style="display: flex; justify-content: center;">
    <img src="/files/density.png" alt="Safe navigation with Density functions" />
</div>
<!-- markdownlint-enable -->

<!-- markdownlint-disable -->
<iframe src="/files/density_plot_with_colors.html" width="100%" height="700px" frameborder="0"></iframe>
<!-- markdownlint-enable -->

<p>The high-density regions represent the target, and low-density regions are “no-go” areas where the robot should not go. The gradient of this density function points away from the low-density regions, enabling the robot to course-correct and avoid these regions while navigating toward the target. Next lets see how this can be used to navigate a robot safely through the woods!</p>

<!-- markdownlint-disable -->
<div style="display: flex; justify-content: center;">
    <img src="/files/quad_density.gif" alt="robot navigation with density functions" />
</div>
<!-- markdownlint-enable -->

<hr />

<h2 id="why-this-approach-matters"><strong>Why This Approach Matters</strong></h2>

<p>By defining safe and unsafe regions and guiding robots using the gradient of a density function, this approach ensures:</p>
<ul>
  <li><strong>Safety</strong>: Robots naturally avoid obstacles by moving toward higher-density (safe) regions.</li>
  <li><strong>Efficiency</strong>: Trajectories are optimized by leveraging a mathematically grounded framework.</li>
  <li><strong>Real-time adaptability</strong>: The density function can dynamically adjust based on environmental changes.</li>
</ul>

<p>This method bridges theoretical insights and practical applications, making it a cornerstone for modern robotic navigation systems.</p>

<hr />

<h2 id="whats-next"><strong>What’s Next?</strong></h2>

<p>In the next post, we’ll explore how to compute the density function in real time using sensor data and integrate it with advanced motion planning algorithms.</p>]]></content><author><name>Sriram Krishnamoorthy</name><email>sriramk@clemson.edu</email></author><category term="robotics" /><category term="safe navigation" /><category term="density functions" /><summary type="html"><![CDATA[Robots today are more than machines; they’re companions, assistants, and explorers. For these robots to safely navigate dynamic and cluttered environments—like a robot vacuum avoiding toys or a delivery drone dodging pedestrians—they need a clear understanding of their surroundings. One powerful tool they use is density functions, a mathematical framework to represent safe and unsafe areas while guiding them safely toward their goals.]]></summary></entry><entry><title type="html">Operator Magic: Transforming Robotics Through Operator Theory</title><link href="https://sriram-2502.github.io//posts/2024/12/blog-post-1/" rel="alternate" type="text/html" title="Operator Magic: Transforming Robotics Through Operator Theory" /><published>2024-11-30T00:00:00+00:00</published><updated>2024-11-30T00:00:00+00:00</updated><id>https://sriram-2502.github.io//posts/2024/12/operator-magic</id><content type="html" xml:base="https://sriram-2502.github.io//posts/2024/12/blog-post-1/"><![CDATA[<p>Science often gives us tools to make sense of the seemingly chaotic. Whether it’s predicting the weather, designing self-driving cars, or programming robots to navigate dynamic environments, these tools help us uncover the hidden order in complex systems. One such tool is the <strong>Koopman operator</strong>, a mathematical concept that transforms how we understand the evolution of dynamic systems.</p>

<p>But what is the Koopman operator, and why is it so powerful? Let’s explore this concept using a simple analogy—waves on the beach—before diving into how it helps robots navigate a crowded room.</p>

<hr />

<h2 id="making-sense-of-chaos-waves-at-the-beach"><strong>Making Sense of Chaos: Waves at the Beach</strong></h2>

<p>Imagine standing on the shore, watching waves crash onto the beach. The motion of the water appears chaotic—every droplet seems to move unpredictably, making it difficult to understand the larger pattern at play. But what if there was a way to shift your perspective, to see the waves not as random splashes but as part of a bigger picture?</p>

<p><img src="/files/sea-beach.gif" alt="sea waves" /></p>

<div style="color:blue; font-weight:bold;">
The Koopman operator provides that perspective.
</div>

<p>It focuses not on the individual droplets but on <em>observable features</em> of the system—like the height, speed, or direction of the waves. These features evolve in time in a way that reveals an underlying order. With this insight, you can predict how the waves will change, even if the motion of each droplet remains complex.</p>

<div style="color:green;">
This shift from focusing on raw data to observing meaningful patterns is the essence of the Koopman operator.
</div>

<p>It transforms the way we study dynamic systems, allowing us to understand and predict behaviors that once seemed impossible to decode.</p>

<hr />
<h2 id="play-with-the-waves-see-where-the-flow-takes-you"><strong>Play with the Waves: See Where the Flow Takes You</strong></h2>
<p>Below is a dynamic visualization of how a system (Duffing oscialltor) evolves over time. Imagine you’re watching a drop of water flowing through a twisting, turning river. Click anywhere on the visualization to drop your “water droplet” into the flow and see where it goes. The paths it takes represent how the system behaves from that starting point.</p>

<!-- markdownlint-disable -->
<iframe src="/files/phase_portrait_duffing.html" width="100%" height="700px" frameborder="0"></iframe>
<!-- markdownlint-enable -->

<p>The Duffing oscillator is a classic example of a nonlinear dynamical system that exhibits rich and complex behavior. At its core, the system’s dynamics are shaped by a double-well potential, meaning that there are two stable “wells” where the system can settle, separated by an unstable equilibrium point at the peak of a “hill” between them.</p>

<p>When you click on the visualization to drop your “water droplet,” you’re essentially setting an initial condition for the system. Depending on where you click, the system will flow toward one of the two stable wells or oscillate between them.</p>

<p>Can we use tools like the Koopman operator to understand the different regions of this flow? Check out the <a href="/posts/2024/12/koopman-basics/">next blog post</a> to learn more!</p>

<hr />

<h2 id="from-waves-to-robots-a-real-world-connection"><strong>From Waves to Robots: A Real-World Connection</strong></h2>

<p>Now, let’s step into a robotics lab. Imagine programming a robot to navigate through a crowded room. People are walking in unpredictable directions, chairs are scattered in different locations, and doors swing open and shut. To the robot, this environment looks as chaotic as the waves at the beach.</p>

<p><img src="https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExZjc3OTFtcXJ2NXllbXRxZnQ5dnl1d3VtdDZjMHM1d2Z2dnB3bm52ZCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/hZ44axwZV0HwoOWR3l/giphy.gif" alt="Crowded Room" width="200" height="150" /></p>

<div style="color:orange; font-style:italic;">
Traditionally, the robot might attempt to track every person and obstacle individually—a daunting and computationally expensive task.
</div>

<p>But what if the robot could shift its perspective, just like we did with the waves?</p>

<h3 id="how-the-koopman-operator-helps-robots"><strong>How the Koopman Operator Helps Robots</strong></h3>
<p>Instead of micromanaging every detail, the robot can focus on <em>observable functions</em>—like:</p>
<ul>
  <li>The density of obstacles in its path.</li>
  <li>The flow of people toward an exit.</li>
</ul>

<p>By lifting these features to a higher-dimensional space, the <strong>Koopman operator simplifies the robot’s view of the environment</strong>. In this lifted space, the dynamics of the room often become linear and easier to predict, enabling the robot to make smarter, faster decisions.</p>

<hr />

<h2 id="why-it-matters"><strong>Why It Matters</strong></h2>

<p>The <strong>Koopman operator bridges the gap between chaos and clarity</strong>. It allows us to move from the unpredictable motion of individual elements to the predictable evolution of patterns. Whether it’s understanding waves or programming robots, this mathematical tool reveals the hidden order in the systems around us.</p>

<h3 id="next-steps"><strong>Next Steps</strong></h3>
<p>In the next section of this blog, we’ll dive deeper into the mechanics of the <a href="/posts/2024/12/koopman-basics/">Koopman operator</a>, explore how it works in practice, and look at real-world applications that bring this concept to life. Also check out how we can use <a href="/posts/2024/12/density-functions-navigation/">density functions</a> to help robots navigate safely.</p>

<p><small>If you have any questions or would like to learn more, feel free to leave a comment below!</small></p>]]></content><author><name>Sriram Krishnamoorthy</name><email>sriramk@clemson.edu</email></author><summary type="html"><![CDATA[Science often gives us tools to make sense of the seemingly chaotic. Whether it’s predicting the weather, designing self-driving cars, or programming robots to navigate dynamic environments, these tools help us uncover the hidden order in complex systems. One such tool is the Koopman operator, a mathematical concept that transforms how we understand the evolution of dynamic systems.]]></summary></entry></feed>