For the best experience on desktop, install the Chrome extension to track your reading on news.ycombinator.com
Hacker Newsnew | past | comments | ask | show | jobs | submit | history | crispisulcans's commentsregister

Honestly, I wish folks would stop recommending PID as the go-to tool for control design. Like some others have said, it is never the right answer in any non-trivial system. The problem with newcomers blindly incorporating it into their design for quick satisfaction is that they have just done so at the expense of making someone else's job harder down the line. In a system where many things are interconnected or nested, introducing artificial dynamics via feedback in one part often leads to unpredictable and undesired behaviour in another. Then the next junior engineer comes along and thinks the weird behaviour can be solved with more PID loops, repeating the process until you end up with a un-tuneable mess with a precariously narrow operating region.

If you are working in this field, no you don't need a PhD, but for the love of god invest some time into learning more appropriate techniques for the work. Start with learning to work with MIMO systems in state-space, then learn to use LQR (literally a one-liner in MATLAB) and reduced-order observers, then some nonlinear techniques like Lyapunov functions and integrator backstepping for those tricky nested loops. I'm happy to suggest resources for anyone interested.


> no you don't need a PhD

> Start with learning to work with MIMO systems in state-space, then learn to use LQR (literally a one-liner in MATLAB) and reduced-order observers, then some nonlinear techniques like Lyapunov functions and integrator backstepping for those tricky nested loops

Ok mate.


In my experience, there are a lot of applications that are "trivial" enough that PID works fine. I'm reasonably comfortable with state space modeling for systems with more variables. But OK, I'll bite - always open to picking up something new. What resources would you suggest for someone who wants to learn more about nonlinear controls?


Without knowing any specifics I would say the most universally useful tool to have in your nonlinear controls belt is Lyapunov control design and its extensions (if you're familiar with Lyapunov equations in linear systems that's where the connection starts). It leads to useful methods that are applicable to many systems, and allows you to handle some particularly tricky situations. Wikipedia's articles on these topics are surprisingly decent: https://en.wikipedia.org/wiki/Control-Lyapunov_function https://en.wikipedia.org/wiki/Backstepping as well as Stanford's lecture notes: https://web.stanford.edu/class/ee363/lectures/lyap.pdf Check out Robust Nonlinear Control Design by Freeman and Kokotovic for more on this.

Compared to linear control theory, nonlinear controls is much more fractured and domain-specific. No concept is as widely applicable as ones from linear controls. Khalil's Nonlinear Systems book is generally considered a top reference, but it does start to get into the PhD-level stuff and I don't recommend it to a non-specialist unless you are really into this stuff. I can give more specific recommendations if you have a particular industry or application in mind.


Cool design! I would love for some folks who are into this stuff to try their hands at this missile defence programming game https://openprocessing.org/sketch/745415 (click the </> button at the top)


Thanks for the user test :) I updated the game loop to be separate from the rendering loop. Any chance you can tell me if it is still slow?


Sorry no change, but on smaller maps it has better speed. So obviously a CPU issue or something.


It seems like since I first tried the game, it's gotten really slow on my machine, which is very odd, considering that it's a desktop ryzen 9 with 16 cores and a beefy graphics card. Weirdly, it still runs fast (and is consequently much more difficult) on my laptop.

Just tried it on my son's machine, which is the same hardware as mine (but running Windows rather than Linux, both of us using Brave for browsing) and it's fast there too. On my machine, even the clock rendering is dramatically slower than real-time; I'm not sure what's going on.


Not a bad idea, though you would have to use bang-bang control since the thrusters are either full on or full off. I'm not sure if you can integrate anything as is, but when I release the source code you can try to build up from that.


Tapping the keys at a certain frequency is the same thing as PWM control, which gives you an duty-cycle-based analog-like control input. PWM is just on_time/(on_time + off_time), so there are a number of ways to do this even with the key input as you have it. Again, in summary: you can do PWM duty-cycle control or tap-frequency-control, which is really just the same thing.


Hmm I'm not able to reproduce that. Which phone and iOS if I may ask?


I tried it just now (took me a while to figure out how to run this). From what I'm seeing this game has what is equivalent to attitude control on autopilot, meaning you stop spinning right away when you release the input. It is definitely easier to control, but removes one of the main challenges of drone flight.


Ok, yes you are right... rotational inertia is the challenge in Rocket Drone for sure.


Hi all, thanks for all the great feedback so far! Here is a bit more context: I (also go by wavy) made this game while taking a break from my work project. It was inspired by the old-school lunar lander games as well as drone racing. I wanted to build something that illustrates the difficulty of drone flight. It was made in p5.js over the course of several weekends. I never really intended on publishing it until I showed it to a few friends who kept on encouraging me. I'm glad some of you are enjoying it!


>I wanted to build something that illustrates the difficulty of drone flight.

I think you nailed this part 100%. I suck in the very same way I did with my first - and only - real life drone I bought.


Many thanks for publishing it, think about releasing it as open source my daughter had a blast modifying the source code. Adding a little sister mode making it almost impossible to beat.


Hi again, for those interested the source code is now available at https://codeberg.org/wavy/rocket-drone


I avoided arrow keys partially because the drone will generally not move in the direction you press, but I'll consider adding alternate key mappings :)


Hmm I don't have an android phone to test. I hope it's an isolated case..


Found a way to reproduce, not sure if it is the source of the problem above or something else. When holding a pen while pushing the thrusters with the fingers, the thrusters get stuck in their current mode when the tip of the pen gets close to the screen (and the cursor appears).


Thanks! I didn't know about Landing Confirmed. It looks pretty cool too. The thrust is constant. With both sides firing it has a 2:1 thrust to weight ratio.


I see, great! I'm having a lot of fun still after many hours on Landing Confirmed. I think the auto generated levels are a great touch. I would add a threshold for collisions, so that under a certain low speed, collisions cost no health. Either that or add landing legs :) You could also easily have different types of vehicles by just varying the thrust and the distance between the two engines. Would make a easy variety being able to pick a spacecraft. Also you can easily make different "planets" by just changing the background color and the gravity value :) and on some planets add an atmosphere of various thickness which adds drag!


There is already a collision threshold, but very low. I might have to increase it to be noticeable. Otherwise great ideas all around :)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search:

HN For You