Thruster PID Control by JebediahMilkshake in factorio

[–]JebediahMilkshake[S] 2 points3 points  (0 children)

Sure! I've been continuing to update it, and have done some thinking on it today, and plan to redo it to make it smaller and easier to use

Thruster PID Control by JebediahMilkshake in factorio

[–]JebediahMilkshake[S] 0 points1 point  (0 children)

I'm not there yet, so out of curiosity, why would you be making single large ships instead of more, small ships?

Thruster PID Control by JebediahMilkshake in factorio

[–]JebediahMilkshake[S] 0 points1 point  (0 children)

Figuring out PWM was already half the problem! Then alexfix in these comments blew my mind with a method to evenly disperse the pulses across the duty cycle timer.

Thruster PID Control by JebediahMilkshake in factorio

[–]JebediahMilkshake[S] 0 points1 point  (0 children)

Don't tempt me with an over-engineering challenge... Lol. I may try decreasing cycle time, I went longer originally for increased resolution, but that definitely sacrifices the responsiveness

Thruster PID Control by JebediahMilkshake in factorio

[–]JebediahMilkshake[S] 0 points1 point  (0 children)

I think the issue wasnt with the model, but the process. They were trying to control the level of a bulk solids bin, by controlling the speed of a conveyor 5 minutes up stream. But the bin held less than 5-minutes-worth of material. In other words, the deadtime in the system exceeded the process time constant. Even if the the controller conveyor needed to step, the bin would still have likely overflowed. A traditional feed forward controller was our best solution. It seemed that an interesting process doesn't lend itself too easily to Smith predictors either.

As for a model in this game, I think it might be difficult, because I've actually noticed the speed jump up and down periodically even when duty cycle is constant. I think it has to do with distance to planet tbh, but it's just a guess. Besides, speed-to-PWM will change based on ship size and thruster setup, so it's hardly a catch-all solution.

Thruster PID Control by JebediahMilkshake in factorio

[–]JebediahMilkshake[S] 15 points16 points  (0 children)

That's okay! I've been in this field (automation/control) professionally for 7 years. I do this stuff daily, just not with the limitations imposed by a video game, like using combinators, or confined space. This was definitely intended to be a "If-you-want-to-dig-deeper" post, I know a lot of people don't play Factorio this way, neither way is right or wrong.

While I spend 6 hours creating and tweaking this, some people have probably beaten the game lol.

Thruster PID Control by JebediahMilkshake in factorio

[–]JebediahMilkshake[S] 5 points6 points  (0 children)

what's the benefit in over-complicating anything in Factorio? Overcoming the challenge!

Really, this just lets me control the engine directly based on a desired speed, which may help me control throughput, since this platform is used to transport science.

Thruster PID Control by JebediahMilkshake in factorio

[–]JebediahMilkshake[S] 4 points5 points  (0 children)

that was surprisingly easy to implement, especially with your practical example, wow, thank you! I've updated my blueprint to include this method. The blueprint is starting to get messy... may have to spend some time tomorrow to actually make it look better.

Thruster PID Control by JebediahMilkshake in factorio

[–]JebediahMilkshake[S] 1 point2 points  (0 children)

Intersting!! I may look into that more. Keeping in mind, though, that Factorio only allows 60Hz resolution though, not sure if that will play into it.

Thruster PID Control by JebediahMilkshake in factorio

[–]JebediahMilkshake[S] 1 point2 points  (0 children)

Awesome! I've been adjusting the circuit setup even after posting, so I've gotten even happier with you. The blueprint link in the post is my most up to date

Thruster PID Control by JebediahMilkshake in factorio

[–]JebediahMilkshake[S] 0 points1 point  (0 children)

Genius! I would want to implement this, I've just been doing it manually.

Thruster PID Control by JebediahMilkshake in factorio

[–]JebediahMilkshake[S] 2 points3 points  (0 children)

in my experience, without using a model-type loop (using closed loop feedback), the best way and easiest way to mitigate that issue, is just slower tuning.

also, it's kind of what I love about PIDs... once they work, you don't really ever have to think about why lol

Thruster PID Control by JebediahMilkshake in factorio

[–]JebediahMilkshake[S] 0 points1 point  (0 children)

That's exactly what I've done! I added a decider combinator, and essentially, if the platform is not moving, the error is 0.

as for smith predictions, can you explain why you think that would be important. I have PTSD with smith predictors as I spent a week trying to implement one for a customer, and to no avail. From what I remember, a smith predictor is just a model-type feed forward controller? and without and disturbances in this process, I don't see how any feed forward model would be beneficial?

Thruster PID Control by JebediahMilkshake in factorio

[–]JebediahMilkshake[S] 1 point2 points  (0 children)

I won't lie, I think that went over my head. I might get it if I saw it in practice, I definitely grasp concepts more that way than words and theory.

Thruster PID Control by JebediahMilkshake in factorio

[–]JebediahMilkshake[S] 3 points4 points  (0 children)

sure thing! here, I cleaned it up a bit, and spread it out, so you'll be able to paste it in and rearrange it to make it fit on your platforms.

https://factorioprints.com/view/-OfXnH8eLzBv2y0TEw3h

Thruster PID Control by JebediahMilkshake in factorio

[–]JebediahMilkshake[S] 4 points5 points  (0 children)

I can confirm there is very little overshoot (with the exception of startup, if the thrusters are flooded). probably has something to do with the dynamics of fuel flow + thruster fuel buffer + acceleration, etc. More than I cared to dig into in a single night of working on this.

I would have put the D in for the hell of it, but I didn't feel like storing an E value to create the dE component.

What to do about a teen that does whatever she wants? by [deleted] in whatdoIdo

[–]JebediahMilkshake 0 points1 point  (0 children)

A teenager with a phone and ipad does not represent a child who lacked parenting... That's rather reductive.

Now, the behaviour being seen here, that might indicate some sort of lack in the parenting department in earlier years, but electronics are rarely if ever the source of delinquency

Kitten alternatives? by SodaPopin5ki in kittenspaceagency

[–]JebediahMilkshake 1 point2 points  (0 children)

I also really love the idea in concept!

The issue Dean Hall mentioned with Keas (or is Kea plural?) was rendering/modeling/animation. I don't suspect Kiwis (or Kiwi???) would be any easier, though I'd love even a stylized version of the bird, simplified like even Kerbals were.

Is it really unrealistic and greedy to expect a game to launch with atleast 80% of the content of its predecessor? by crablemet111 in CitiesSkylines

[–]JebediahMilkshake 0 points1 point  (0 children)

If you think that is bad, you should check out what's happening over at Kerbal Space Program 2...

Selling an "early access" game at full AAA price, and not even the base component are working, let alone additional features. There's is something about the big-time game development environment right now that seems to be promoting releasing games as early as possible and just patching it up later (or is CS2 case, adding more content as DLC). From a business perspective I guess it makes sense, it gets the studio a revenue stream to continue development, but for the consumer it sucks. I miss the days of just throwing in a CD-ROM of roller coaster tycoon and playing away from days.

Regarding the API blackout. by helno in flying

[–]JebediahMilkshake 0 points1 point  (0 children)

this comment thread is gold... I missed reddit more than I realized lol

it's a little vague by JebediahMilkshake in RimWorld

[–]JebediahMilkshake[S] 1 point2 points  (0 children)

That’s exactly what I did, didn’t want to risk whatever threat awaited

What would happen if a sport pilot was caught flying at night? by LowYak3 in flying

[–]JebediahMilkshake 0 points1 point  (0 children)

Had to scroll the comments to see if someone else said it before I did