Live data from Hacker News

PID Control Challenges

janismac.github.io

91–100 of 123 posts

Re: PID Control Challenges

#91
post #27
post #7

Earlier quoted context omitted.

It's a nice theoretical implementation but few practical examples would be found using floating-point math, running as they are on systems that don't support it.

Even where the hardware is available, it can be harder to prove properties about the behavior of the floating point versions. It's no fun when everything turns to NaNs because of surprise cancellation in subtraction.

And isNan is a BAND and JNE effectively. It's cheap.

Re: PID Control Challenges

#92
post #91
post #27

Earlier quoted context omitted.

Even where the hardware is available, it can be harder to prove properties about the behavior of the floating point versions. It's no fun when everything turns to NaNs because of surprise cancellation in subtraction.

And isNan is a BAND and JNE effectively. It's cheap.

NaN is only one of the most obvious. Catastrophic precision loss from cancellation can leave you oscillating for no obvious reason.

Re: PID Control Challenges

#93
post #76

Earlier quoted context omitted.

Could you elaborate please.

Sure! So in many, if not most, contemporary Information Retrieval (IR) problems, there is a total document set larger than could be explored on an interactive basis and so the data structures get laid out in such a way that with some probability north of a coin, you’ll find “better” documents in the “front” half. This is hand-waving a lot of detail away, so if you’d like me to go into some detail about multi-stage ra…

Ah thanks, now I have the context.Thanks again for replying.

Re: PID Control Challenges

#94
post #90

Earlier quoted context omitted.

I'm not a gamedev myself but have played a few games (Stormworks, Garry's mod with Wiremod, From The Depths, at least one or two more which I can't think of the name right now) that allow PIDs to be used in player-designed contraptions. Quite useful for building stabilised gun platforms and things. I would be sure there's plenty of applications for PIDs in a game engine itself - a quick search turns up things like se…

GMod has built-in PIDs now??

The Wiremod add-in for Garry's Mod does, alongside with programmable chips and all sorts of neat stuff... although having a look (it has been a number of years...) the PID controller was in the "extras" extension to Wiremod.

Re: PID Control Challenges

#95
post #76

Earlier quoted context omitted.

Could you elaborate please.

Sure! So in many, if not most, contemporary Information Retrieval (IR) problems, there is a total document set larger than could be explored on an interactive basis and so the data structures get laid out in such a way that with some probability north of a coin, you’ll find “better” documents in the “front” half. This is hand-waving a lot of detail away, so if you’d like me to go into some detail about multi-stage ra…

So basically you're using PID as a metaheuristic to guide an optimization process? (like particle swarm, simulated annealing, genetic algorithms, etc)

Or it's more like, it's being used to fine tune the parameters of another search procedure? And in principle you could use a neural net rather than PID (that would encode a surface that matches the latency vs search depth profile that you want)

edit: just figured out those two are the same thing; the PID is optimizing the search depth for a given target latency

Re: PID Control Challenges

#96
I'm still on the first level playing with various 'P's and 'D's (no 'I's yet), but I think I have a novel scheme!

    function controlFunction(block)
    {
      let L = Math.floor;
      let x = block.x;

      // Use Collatz. L(x+½) is the closest integer. 
      return 
        -(L(x+0.5) % 2 === 0
                        ? x/2     // Even, we chop it
                        : 3*x + 1 // Odd, we triple-plus-one it. 
         );
    }
It's not very good, but it does beat or tie some of my earnest attempts to get below 8 seconds.

Re: PID Control Challenges

#97
post #85
post #83

Earlier quoted context omitted.

True. I'd still argue it's not realistic to use arbitrary code though, as most control problems need linear or at least invertible control laws, and the analysis techniques that provide you with control solutions usually assume so too.

I have no real clue about control theory, what is the advantage of linear or invertible laws? My idea was to equip the control program with the equations of the system and some unknown parameters for friction and so on. Then estimate the parameters from the response to control inputs and drive the system through state space as hard as possible to get the fastest time, taking into account deviations from the expected…

Stability: Adaptive control algorithms need to ensure stability while adapting to changing parameters. This can be a complex task, and stability guarantees are essential.

Re: PID Control Challenges

#98
post #87

Earlier quoted context omitted.

Liquid fuel rockets complicate matters: think "inverted pendulum with a couple of stacked, full wine glasses that you absolutely must not spill balanced on top. Oh, and there's a gremlin drinking from them so both CG and total mass are constantly moving."

In an inverted pendulum the support pushes up, in a rocket it pushes along the direction the rocket is pointed. You only need to steer the rocket, not balance it.

In a very real sense, you only need to "steer" the inverted pendulum, too.

Re: PID Control Challenges

#99

I'm still on the first level playing with various 'P's and 'D's (no 'I's yet), but I think I have a novel scheme! function controlFunction(block) { let L = Math.floor; let x = block.x; // Use Collatz. L(x+½) is the closest integer. return -(L(x+0.5) % 2 === 0 ? x/2 // Even, we chop it : 3*x + 1 // Odd, we triple-plus-one it. ); } It's not very good, but it does beat or tie some of my earnest attempts to get below 8 s…

[deleted]

Re: PID Control Challenges

#100

Earlier quoted context omitted.

My inner child of Doc Brown and Wernher von Kerman says, it's time to develop non-newtonian fuel sponges, which would release fuel if squeezed gently and steadily, but behave like solid if things start shaking too much, preventing sloshing.

Or maybe giant syringes? There can't be sloshing if there is no free space because top of cylinder just moves to adjust volume.

“Non-Newtonian fuel sponges” sounds way cooler though.
Post reply on HN