<?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://ami6643432.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://ami6643432.github.io/" rel="alternate" type="text/html" /><updated>2026-05-25T20:42:02+00:00</updated><id>https://ami6643432.github.io/feed.xml</id><title type="html">Amitabh Sharma</title><subtitle>MS by Research (Robotics) at IIIT Hyderabad. Researching aerial manipulation, non-linear control, and RL-based robotic control.</subtitle><author><name>Amitabh Sharma</name><email>amitabh.sharma@research.iiit.ac.in</email></author><entry><title type="html">Coming across Lean: when a proof assistant turned into a research tool</title><link href="https://ami6643432.github.io/posts/2026/04/coming-across-lean/" rel="alternate" type="text/html" title="Coming across Lean: when a proof assistant turned into a research tool" /><published>2026-04-18T00:00:00+00:00</published><updated>2026-04-18T00:00:00+00:00</updated><id>https://ami6643432.github.io/posts/2026/04/coming-across-lean</id><content type="html" xml:base="https://ami6643432.github.io/posts/2026/04/coming-across-lean/"><![CDATA[<p>I first heard about Lean the way most engineers do: as something mathematicians used to formalize the Liquid Tensor Experiment, or to mechanize a kilometre of group theory in <code class="language-plaintext highlighter-rouge">mathlib4</code>. It looked like a museum exhibit: beautiful, far away, and not for me.</p>

<p>What changed my mind was a Lyapunov derivative that I could not get past myself.</p>

<h2 id="the-setup">The setup</h2>

<p>I was reworking an adaptive control proof where a parameter update law had to cancel a cross-term in <code class="language-plaintext highlighter-rouge">V̇</code>. The algebra on paper looked clean. The simulation was unstable. I worked the chalkboard for two days. Then a friend, half joking, said: “If you do not trust the algebra, why don’t you let a machine check it?”</p>

<p>I did not want to do that. Mechanizing a proof felt like building a cathedral around a doorbell.</p>

<h2 id="what-happened-anyway">What happened anyway</h2>

<p>The first time I tried to write the controller’s Lyapunov function in Lean 4, I discovered that I had the sign of one term wrong. Not the proof. The <em>definition</em>. The proof I had been carrying in my head was correct for a Lyapunov function I had never actually written down. On paper, the sign was just a transcription typo that I had read past for two days. Lean could not read past it, because Lean has no eyes.</p>

<p>That single experience flipped my prior on formal verification. The interesting feature of a proof assistant, for someone like me, is not that it gives you a certificate at the end. It is that the work of <em>stating</em> the theorem in a language with no slack forces you to find out what you actually mean.</p>

<h2 id="what-it-is-good-at-what-it-is-not">What it is good at, what it is not</h2>

<p>After a few months of part-time work, my honest take:</p>

<ul>
  <li><strong>Where it earns its keep.</strong> Algebraic identities I keep mis-copying, sign conventions across coordinate frames, “obvious” inequalities that turn out to have a hidden assumption, and the bookkeeping at the boundary of a Lyapunov argument. The kind of mistakes that pass a chalkboard review and fail in a simulation.</li>
  <li><strong>Where it does not.</strong> It does not pick a Lyapunov candidate for you. It will not tell you that your controller is silly. It will not survey the literature. If your modelling assumption is wrong, the proof will be impeccably correct about the wrong system, and you will not learn anything until the hardware tells you.</li>
</ul>

<h2 id="the-mental-shift">The mental shift</h2>

<p>I used to think proofs and code were two different artefacts: one for the paper, one for the robot. Lean dissolved that distinction for me. The proof <em>is</em> a program; the program’s type signature <em>is</em> the theorem. When I now write a derivation on paper, I find myself trying to phrase each step so that I could, if I had to, type it into Lean tomorrow. That habit alone has improved the papers I am writing, whether or not the Lean file gets attached.</p>

<p>It is also a useful reminder of how much of “I understand this” was really “I have not yet been forced to be precise about this.”</p>

<h2 id="where-i-am-now">Where I am now</h2>

<p>I keep small Lean files alongside the simulation directories for the controllers I work on. Most of them are not finished proofs. They are scaffolds, with <code class="language-plaintext highlighter-rouge">sorry</code> placeholders that mark the spots where I still owe myself an argument. The placeholders are honest in a way that informal notes never quite are: I cannot pretend I have closed an argument when the file refuses to compile.</p>

<p>If you are an engineer who has avoided proof assistants because they look like a different career path, I would gently push back. You do not have to become a logician. You just have to be willing to type your assumptions, in order, in a language that will not nod along.</p>]]></content><author><name>Amitabh Sharma</name><email>amitabh.sharma@research.iiit.ac.in</email></author><category term="lean" /><category term="formal-verification" /><category term="control" /><category term="notes" /><summary type="html"><![CDATA[I first heard about Lean the way most engineers do: as something mathematicians used to formalize the Liquid Tensor Experiment, or to mechanize a kilometre of group theory in mathlib4. It looked like a museum exhibit: beautiful, far away, and not for me.]]></summary></entry><entry><title type="html">Optimization-plus-modelling is the universal solvent</title><link href="https://ami6643432.github.io/posts/2026/02/optimization-is-everywhere/" rel="alternate" type="text/html" title="Optimization-plus-modelling is the universal solvent" /><published>2026-02-09T00:00:00+00:00</published><updated>2026-02-09T00:00:00+00:00</updated><id>https://ami6643432.github.io/posts/2026/02/optimization-is-everywhere</id><content type="html" xml:base="https://ami6643432.github.io/posts/2026/02/optimization-is-everywhere/"><![CDATA[<p>I came into research wanting to build flying robots. The arc I did not expect is how much of the math turned out to be useful far away from anything that flies. The longer I stare at a control problem, the more it looks like the inside of a delivery routing problem, or a recommendation feed, or a traffic light at a busy intersection. The accident of which domain it came from feels less important than the shared structure.</p>

<p>The structure, when I try to write it out, is almost embarrassingly simple:</p>

<ol>
  <li>Pick state variables that describe what you care about.</li>
  <li>Write down how the state evolves, even with a rough model.</li>
  <li>Write down what “good” means as an objective, plus what “allowed” means as constraints.</li>
  <li>Solve, repeatedly, as the world supplies new information.</li>
</ol>

<p>That is it. Once you have those four boxes, you have a recipe that travels.</p>

<h2 id="where-i-have-noticed-it-lately">Where I have noticed it lately</h2>

<p><strong>Last-mile delivery.</strong> A fleet of vehicles, time windows on the customer side, a depot, fuel constraints, drivers who do not work past a certain hour. State: where each vehicle is, what packages remain. Dynamics: roughly known, partially uncertain. Cost: total distance, lateness penalty, driver overtime. Constraints: package fits in vehicle, time window, legal driving hours. The problem is intractable in the worst case, but the formulation is the same shape as a constrained predictive control problem.</p>

<p><strong>Traffic signal timing.</strong> State: queue length per approach, vehicle speeds. Dynamics: flow balance plus a saturation model at the stop bar. Cost: total waiting time, emissions, pedestrian delay. Constraints: minimum green, maximum red. People in the traffic community will describe their solver in a different vocabulary, but a controls reader recognizes a receding-horizon optimization on a network.</p>

<p><strong>Social-media feeds.</strong> This one is more uncomfortable. The state is “what the user has seen and reacted to,” the model is some learned predictor of engagement, the cost is a measure of platform value, and the constraints are content policy. The unease about modern feed design is, partly, an unease about <em>what objective is being optimized for</em>, but it is still, structurally, an optimization problem with feedback. Naming the feedback loop precisely is, I think, a precondition to disagreeing with it intelligently.</p>

<p><strong>Power grid balancing, vaccine rollout planning, water-reservoir management.</strong> Same recipe.</p>

<h2 id="what-modelling-means-in-this-picture">What “modelling” means in this picture</h2>

<p>The word “optimization” gets most of the credit, but the load-bearing word in the recipe is <em>model</em>. Optimization is a hammer that converges. The model is what decides whether the nail it drives is the right one. A wrong objective, optimized perfectly, gives you exactly the wrong thing, which is, in a sense, the story of every cautionary tale about misaligned incentives in any system.</p>

<p>Control theory’s hard-won habits, things like Lyapunov reasoning, robustness margins, observability tests, and “what do we do if the model is wrong,” feel like they have something to offer here. Not because they translate cleanly, but because the <em>posture</em> of asking those questions transfers. A controls engineer who is suddenly working on traffic timing will, by reflex, ask: what happens if the demand forecast is off by 20%? What is the safe fallback? Which constraints are hard and which are soft? Those are exactly the questions the optimization-only view forgets to ask.</p>

<h2 id="why-i-keep-coming-back-to-it">Why I keep coming back to it</h2>

<p>I am, day to day, designing controllers for quadrotors with arms. But the longer I do this, the more I see the same problem shape appearing in places I was not expecting. It is one of the reasons I am reluctant to call myself a “robotics person” too quickly. The math is more ubiquitous than the application domain. Once a year I read something (a paper on opinion dynamics, a course on operations research, a talk on epidemic control) and find that the moves I learned for adaptive control transferred, almost without modification.</p>

<p>This is not a claim to expertise in any of those other fields. It is closer to a thank-you note to whoever decided that constrained optimization with a feedback loop was worth teaching as a general subject. It travels.</p>]]></content><author><name>Amitabh Sharma</name><email>amitabh.sharma@research.iiit.ac.in</email></author><category term="optimization" /><category term="control" /><category term="cross-domain" /><category term="notes" /><summary type="html"><![CDATA[I came into research wanting to build flying robots. The arc I did not expect is how much of the math turned out to be useful far away from anything that flies. The longer I stare at a control problem, the more it looks like the inside of a delivery routing problem, or a recommendation feed, or a traffic light at a busy intersection. The accident of which domain it came from feels less important than the shared structure.]]></summary></entry><entry><title type="html">Two things aerial manipulation papers under-report: base forces and impedance error</title><link href="https://ami6643432.github.io/posts/2025/11/base-forces-impedance-error/" rel="alternate" type="text/html" title="Two things aerial manipulation papers under-report: base forces and impedance error" /><published>2025-11-22T00:00:00+00:00</published><updated>2025-11-22T00:00:00+00:00</updated><id>https://ami6643432.github.io/posts/2025/11/base-forces-and-impedance-error</id><content type="html" xml:base="https://ami6643432.github.io/posts/2025/11/base-forces-impedance-error/"><![CDATA[<p>If you read enough aerial manipulation papers, two omissions start to feel structural. The first is the wrench transmitted to the base of the quadrotor during contact. The second is the impedance-tracking error during the transient, not the steady-state error, but the few hundred milliseconds when the arm first touches the world. I want to argue, gently, that both of these deserve a row in every comparison table.</p>

<h2 id="why-the-base-wrench-matters">Why the base wrench matters</h2>

<p>A grounded manipulator absorbs reaction forces through its mount. A quadrotor mount is a hovering vehicle. Every newton-metre the arm transmits to its base is a newton-metre the attitude controller has to fight off, in a regime where authority is finite and the position controller is already busy.</p>

<p>When a paper reports only tip-tracking error, it is implicitly assuming the base controller will absorb whatever shows up. That is fine for desktop experiments and unfair to anyone who has tried to fly the controller. The cost of <em>not</em> reporting it is that two papers with identical tip-tracking curves can have wildly different real-world behaviour. The one with smaller base wrench will fly; the other will tumble.</p>

<p>I think of the base wrench norm the same way an automotive engineer thinks of unsprung mass: invisible in the brochure, dominant in the ride.</p>

<h2 id="why-the-impedance-error-in-the-transient-matters">Why the impedance error in the <em>transient</em> matters</h2>

<p>Steady-state impedance error is the wrong place to look. By the time the contact has settled, any reasonable controller will get the error small. The interesting moment is the impact: how much does the desired stiffness <code class="language-plaintext highlighter-rouge">K_d</code> get violated in the first few hundred milliseconds, and by how much?</p>

<p>Two controllers can both pass a steady-state check while behaving completely differently on impact. One is stiff during the transient and soft after; the other is soft during the transient and stiff after. The papers report the same number. The robots are doing different things.</p>

<p>Reporting the <em>transient</em> error, that is the peak deviation from the desired impedance during the first overshoot, is almost free, and it separates controllers that <em>behave</em> like impedance controllers from ones that <em>settle</em> like impedance controllers.</p>

<h2 id="what-i-have-been-doing-about-it">What I have been doing about it</h2>

<p>In the catching benchmark I am writing up, the table has columns for tip tracking, transient impedance error, and base wrench norm. The third column has been the most argued-over, internally, of any number in the paper. That is, I think, evidence it should have been there in the literature all along.</p>

<p>None of this is a deep theoretical observation. It is closer to a measurement hygiene complaint. But measurement hygiene complaints, in my limited experience, tend to be where the actual progress of a field lives.</p>

<h2 id="a-short-checklist-for-myself">A short checklist for myself</h2>

<p>When I review an aerial manipulation paper now, I look for:</p>

<ol>
  <li>Is the base wrench reported, or is the arm implicitly assumed to be grounded?</li>
  <li>Is the impedance error during the contact <em>transient</em> shown, not just the steady state?</li>
  <li>Is the reference trajectory feasible for the actuator limits, or is the actuator saturating in a way the figure does not show?</li>
</ol>

<p>If two of those three are missing, I am usually looking at a controller that works in the figure and surprises everyone in the lab.</p>]]></content><author><name>Amitabh Sharma</name><email>amitabh.sharma@research.iiit.ac.in</email></author><category term="aerial-manipulation" /><category term="impedance-control" /><category term="notes" /><summary type="html"><![CDATA[If you read enough aerial manipulation papers, two omissions start to feel structural. The first is the wrench transmitted to the base of the quadrotor during contact. The second is the impedance-tracking error during the transient, not the steady-state error, but the few hundred milliseconds when the arm first touches the world. I want to argue, gently, that both of these deserve a row in every comparison table.]]></summary></entry><entry><title type="html">A small note on Lyapunov functions, my favourite idea in engineering</title><link href="https://ami6643432.github.io/posts/2025/09/lyapunov-functions-favourite-idea/" rel="alternate" type="text/html" title="A small note on Lyapunov functions, my favourite idea in engineering" /><published>2025-09-15T00:00:00+00:00</published><updated>2025-09-15T00:00:00+00:00</updated><id>https://ami6643432.github.io/posts/2025/09/lyapunov-functions-favourite-idea</id><content type="html" xml:base="https://ami6643432.github.io/posts/2025/09/lyapunov-functions-favourite-idea/"><![CDATA[<p>Engineers carry a small bag of ideas around with them that they trust more than anything else they were taught. Different engineers carry different bags. For me, near the top, is the Lyapunov function.</p>

<p>What I love about it is the <em>posture</em>. A Lyapunov function does not promise you that the system will reach the goal in five seconds. It does not promise an optimal trajectory. It does not even promise that the path will be sensible. What it promises is something humbler and more honest: “I will name a scalar quantity that, on every trajectory of this system, only goes downhill.” Once you have that scalar, you can sleep at night, because you know the system cannot do anything truly unexpected. It might wander, but it will wander downhill.</p>

<p>That posture, finding a quantity that bounds your worst-case behaviour, rather than solving for an optimum you might not trust, feels generalizable in a way most control-theoretic moves are not. I see versions of it everywhere once I started looking:</p>

<ul>
  <li>Algorithm analysis uses <em>potential functions</em> the same way. Amortized cost arguments are Lyapunov arguments wearing a different hat.</li>
  <li>Game theory uses <em>potential games</em> the same way. Convergence to equilibrium without anyone solving for it.</li>
  <li>Distributed systems uses <em>monotonic counters</em> the same way. State only goes one direction; nobody can lie about the past.</li>
</ul>

<p>There is something profoundly comforting about the worldview: if you cannot promise optimality, promise monotonicity. If you cannot promise the destination, promise the direction.</p>

<p>I keep a small file of “things I would want a young engineer to actually know.” Lyapunov functions are at the top of the list, not because they are the most advanced idea, but because they capture an attitude about uncertainty that I find difficult to teach any other way.</p>]]></content><author><name>Amitabh Sharma</name><email>amitabh.sharma@research.iiit.ac.in</email></author><category term="lyapunov" /><category term="control" /><category term="notes" /><summary type="html"><![CDATA[Engineers carry a small bag of ideas around with them that they trust more than anything else they were taught. Different engineers carry different bags. For me, near the top, is the Lyapunov function.]]></summary></entry><entry><title type="html">The honest cost of “we tuned the gains by hand”</title><link href="https://ami6643432.github.io/posts/2025/07/honest-cost-hand-tuning/" rel="alternate" type="text/html" title="The honest cost of “we tuned the gains by hand”" /><published>2025-07-08T00:00:00+00:00</published><updated>2025-07-08T00:00:00+00:00</updated><id>https://ami6643432.github.io/posts/2025/07/honest-cost-hand-tuning</id><content type="html" xml:base="https://ami6643432.github.io/posts/2025/07/honest-cost-hand-tuning/"><![CDATA[<p>A confession I would like to see in more controls papers: the gains were tuned by hand, on the test cases shown in the figure, by a person who was rooting for the controller.</p>

<p>I am not anti-tuning. Every controller I have ever built has a small forest of gains, and most of them were picked with a mix of physical reasoning and “what looked nice on the plot.” The problem is not the tuning. The problem is when the tuning is invisible, and a reader is left to imagine that the gain values fell out of the theorem.</p>

<p>Once I started keeping notes on how much hand-tuning went into the controllers I was comparing against in benchmarks, two things became clear:</p>

<ol>
  <li>The “baseline” PID is almost always <em>somebody else’s hand-tuned PID</em>, on <em>somebody else’s test case</em>. Running it on a new test case without re-tuning is unfair to the baseline.</li>
  <li>Re-tuning every controller in a benchmark sounds principled but is itself an act of judgement. Whoever does the re-tuning is, in effect, deciding how much love each controller gets.</li>
</ol>

<p>The honest version of a comparison table has a column that nobody wants to write: how long, in person-hours, was spent tuning this controller. A method that takes thirty seconds to tune and a method that takes a graduate student a week of evenings are not comparable on the same row, no matter how similar the tracking error is.</p>

<p>In my own work I have started keeping a tuning log. It is embarrassing to write, and useful to read back later. It also turns into a section in the appendix of the paper that I would, in another life, have been too proud to include. I think the appendix is now my favourite part of the paper.</p>

<p>This is not a methodological breakthrough. It is closer to a politeness, naming the human cost of the result. But politeness in engineering tends to compound.</p>]]></content><author><name>Amitabh Sharma</name><email>amitabh.sharma@research.iiit.ac.in</email></author><category term="controls" /><category term="notes" /><category term="benchmarking" /><summary type="html"><![CDATA[A confession I would like to see in more controls papers: the gains were tuned by hand, on the test cases shown in the figure, by a person who was rooting for the controller.]]></summary></entry></feed>