<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Swati</title>
    <description></description>
    <link>https://swatidantu.github.io/</link>
    <atom:link href="https://swatidantu.github.io/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Sun, 07 Dec 2025 18:05:38 +0000</pubDate>
    <lastBuildDate>Sun, 07 Dec 2025 18:05:38 +0000</lastBuildDate>
    <generator>Jekyll v3.10.0</generator>
    
      <item>
        <title>Lyapunov Stability</title>
        <description>&lt;h1 id=&quot;implementation&quot;&gt;Implementation&lt;/h1&gt;

&lt;h1 id=&quot;gsoc22-robocomp-project-self-adaptive-controller-for-path-following&quot;&gt;GSoC’22 RoboComp project: Self-Adaptive controller for path following&lt;/h1&gt;

&lt;h2 id=&quot;existing-controller&quot;&gt;Existing Controller&lt;/h2&gt;

&lt;p&gt;The current path_follower DSR Component in the Robocomp framework is a Stanley Controller.&lt;/p&gt;

&lt;p&gt;Stanley Controller Law is given by&lt;/p&gt;

\[\phi(t) = \theta_p(t) +  tan^{-1}\left(\frac{k_v d_f(t)}{v}\right)\]

&lt;p&gt;This controller works to  :&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Compensate Angular Error $\theta_p$ : Steer to align heading with desired heading&lt;/li&gt;
  &lt;li&gt;Compensate Front Lateral Distance Error $d_f$ measured from the centre of the front axle to the nearest point on the path.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;sliding-mode-control&quot;&gt;Sliding Mode Control&lt;/h2&gt;

&lt;p&gt;This is a simple and robust control law that has the following advantages :&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;It does not need the precise model of the system.&lt;/li&gt;
  &lt;li&gt;Ensures Stability even when the system parameters change overtime.&lt;/li&gt;
  &lt;li&gt;It reduces the order of the system for control.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This kind of control is designed to drive the system on to sliding surface after which the control law is designed. The sliding surface is designed such that the system in sliding mode evolves in the desired way. The control law is chosen to enforce the selected sliding surface.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;./Media/Steering_img.png&quot; alt=&quot;Reference Image for Controller Design&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;selection-of-sliding-surface&quot;&gt;Selection of Sliding Surface:&lt;/h3&gt;

&lt;p&gt;The sliding surface for this system is chosen to be&lt;/p&gt;

\[\psi = k_{\theta p}\theta_p + k_dd_r \tag{1}\]

&lt;p&gt;where $k_{\theta p},k_d$ are weighting coefficients.&lt;/p&gt;

&lt;p&gt;The controller without chattering is given as&lt;/p&gt;

\[\dot{\psi} = - k_{\psi}\psi \tag{2}\]

&lt;p&gt;where $k_{\psi}&amp;gt;0$ is a constant.&lt;/p&gt;

&lt;p&gt;With respect to the popular Ackerman kinematic model, the steering angle $\phi$  can be computed by&lt;/p&gt;

\[\phi = atan \left(L \left(\frac{W_1}{v_u} + c(s) \frac{cos(\theta_p)}{1 - c(s)d_r}\right)\right) , v_u \neq 0 \tag{3}\]

&lt;p&gt;with&lt;/p&gt;

\[\dot{\theta_p} = W_1 = -\frac{k_{\psi}k_{\theta p}\theta_{p} + k_{\psi}k_d d_r + k_d \dot{d}_r}{k_{\theta_p}} \tag{4}\]

&lt;p&gt;where $\dot{d}_r = sin(\theta_p)v_u$
The terms are defined as follows :&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;$d_r$ : Rear lateral deviation of vehicle wrt C&lt;/li&gt;
  &lt;li&gt;$\phi$ : Steering Angle&lt;/li&gt;
  &lt;li&gt;$c(s)$ : Curvature of path C at M&lt;/li&gt;
  &lt;li&gt;$v_u$ : Speed of car&lt;/li&gt;
  &lt;li&gt;$L$ : Vehicle Wheel Base&lt;/li&gt;
  &lt;li&gt;$R$ : Radius of Curvature&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I have implemented this control design in Robocomp framework with Coppellia Sim simulatior. I follows a trajectory generated by A-star algorithm. Visually it performs better than the existing Stanley Controller.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;./Media/existing.mp4&quot; alt=&quot;Performance with existing Stanley Controller&quot; /&gt;
&lt;img src=&quot;./Media/ASMC.mp4&quot; alt=&quot;Performance with Sliding Mode Controller&quot; /&gt;&lt;/p&gt;
</description>
        <pubDate>Tue, 24 May 2022 00:00:00 +0000</pubDate>
        <link>https://swatidantu.github.io/2022/lyapunov-stability/</link>
        <guid isPermaLink="true">https://swatidantu.github.io/2022/lyapunov-stability/</guid>
        
        
      </item>
    
  </channel>
</rss>
