HNHacker News
TopNewBestAskShowJobs

crispisulcans

70 karma · joined May 2, 2022

submissionscomments
crispisulcans··on PID Without a PhD (2016) [pdf]
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.

crispisulcans··on PID Without a PhD (2016) [pdf]
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.

crispisulcans··on Math breakdown: Anime homing missiles
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)
crispisulcans··on Show HN: Rocket Drone, a lunar lander type game for the web
Hi again, for those interested the source code is now available at https://codeberg.org/wavy/rocket-drone
crispisulcans··on Show HN: Rocket Drone, a lunar lander type game for the web
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?
crispisulcans··on Show HN: Rocket Drone, a lunar lander type game for the web
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.
crispisulcans··on Show HN: Rocket Drone, a lunar lander type game for the web
Hmm I'm not able to reproduce that. Which phone and iOS if I may ask?
crispisulcans··on Show HN: Rocket Drone, a lunar lander type game for the web
a little downward boost at the beginning, trading away some health for time, love it!
crispisulcans··on Show HN: Rocket Drone, a lunar lander type game for the web
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.
crispisulcans··on Show HN: Rocket Drone, a lunar lander type game for the web
There is already a collision threshold, but very low. I might have to increase it to be noticeable. Otherwise great ideas all around :)
crispisulcans··on Show HN: Rocket Drone, a lunar lander type game for the web
nice one!
crispisulcans··on Show HN: Rocket Drone, a lunar lander type game for the web
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!
crispisulcans··on Show HN: Rocket Drone, a lunar lander type game for the web
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 :)
crispisulcans··on Show HN: Rocket Drone, a lunar lander type game for the web
oh I see, yes it could be performance-related. I will need to decouple the game update loop from the rendering loop. Will do soon.
crispisulcans··on Show HN: Rocket Drone, a lunar lander type game for the web
Yes this is what I'm thinking. The replay links already include the full input. I would then just have to verify it and show the link for each entry. For example this is my flight just now for today's daily with a time of 12.97s: https://rocket-drone.lol/?level=5550594399&replay=IIgmIUWAJB...
crispisulcans··on Show HN: Rocket Drone, a lunar lander type game for the web
Hmm I don't have an android phone to test. I hope it's an isolated case..
crispisulcans··on Show HN: Rocket Drone, a lunar lander type game for the web
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.
crispisulcans··on Show HN: Rocket Drone, a lunar lander type game for the web
Inertia and gravity are the same on all the levels. I don't know why it would feel different... Yes, levels 8 and 9 are meant to be more challenging. you might encounter obstacles like that in the random levels. Each level of the tutorial is meant to give you practice tackling different kinds of obstacles. I would love to see what automatic inputs can do for some of these levels :)
crispisulcans··on Show HN: Rocket Drone, a lunar lander type game for the web
Thanks for the feedback! The level generation probably still needs tuning to avoid those kinds of levels. Daily leaderboard is a great idea!
crispisulcans··on Show HN: Rocket Drone, a lunar lander type game for the web
Thanks! I intended for folks to start with the tutorial. They are easier than any of the free play levels but still challenging until you get used to the dynamics.
crispisulcans··on Show HN: Rocket Drone, a lunar lander type game for the web
I hadn't planned on that use case, but check back in a few days where I might share the source code. Perhaps you or someone can build around it.
crispisulcans··on Show HN: Rocket Drone, a lunar lander type game for the web
which keys would feel more natural for you?
crispisulcans··on Show HN: Rocket Drone, a lunar lander type game for the web
Thanks! Yes I can consider sharing the source code. Check back in a few days :)
crispisulcans··on SolveSpace – Parametric 2D/3D CAD
Love this piece of software! I tried a few other free CAD programs before and this is one my favorite.
crispisulcans··on Ask HN: What are your favorite examples of elegant software?
A very short example: The PNPOLY algorithm https://wrf.ecse.rpi.edu/Research/Short_Notes/pnpoly.html