Stationeers PID Tutorial

  Рет қаралды 15,185

Elmotrix

Elmotrix

Күн бұрын

Пікірлер: 45
@WernerGames
@WernerGames Ай бұрын
I've felt dumb many times in my life, but after watching this video, I realized I've reached a whole new level. HOLY CRAP, WHAT AN AWESOME ENERGY MANAGEMENT SYSTEM YOU BUILT!!!!
@sheldon2527
@sheldon2527 3 жыл бұрын
I must say, I work with plant/facility automation and this is probably the easiest to understand PID tuning tutorial I have ever seen. And just happens to be on a game I enjoy.
@SatanaS-ed8qv
@SatanaS-ed8qv 5 ай бұрын
I never got passed building a simple airlock but here i am watching a PID tutorial!
@RamHomier
@RamHomier 3 жыл бұрын
Very nice. A while ago I made a PID controller for a hovering vessel in Kerbal space program, but never thought of using one in stationeers.
@SickoFromHell
@SickoFromHell 2 жыл бұрын
its brings me back from my automation and regulation system classes... nostalgy !
@gloverelaxis
@gloverelaxis Жыл бұрын
Very helpful, thanks! I didn't know there were "recipes" for quickly tuning PIDs like that, and the concept of using one PID to control another PID's target is going to be very useful.
@Dreamshadow1977
@Dreamshadow1977 3 жыл бұрын
Thank you for this explanation. It says a lot about the Stationeers sim when you can apply real world techniques to in game processes. You made the PID concept easy to understand.
@TallinuTV
@TallinuTV 6 ай бұрын
This is great. I didn't know there WAS a method to _calculate_ tuning values! I'll have to have a look through your code and see if I can learn something else new. ;) If nothing else this is _definitely_ going in my base-building toolkit.
@TheBrookemarley
@TheBrookemarley 3 жыл бұрын
I cant even imagine how to setup a gfg room without getting overheated, and here you are making 2x1 gfg room effortlessly and no cooling devices setup has been seen everywhere
@Elmotrix
@Elmotrix 3 жыл бұрын
to be fair, this isn't my first attempt :) I have some sub zero gasses in the back and i use a volume pump (PID-controlled ofc) to simply pump it in on demand. A very stupid active vent makes sure it doesn't go over a pressure threshold. If you keep an eye on the temperature display you'll notice it keeps the room at around 20*C no matter how hard i run the generator.
@TheBrookemarley
@TheBrookemarley 3 жыл бұрын
@@Elmotrix i need to learn PID first, so i'll be able to understand most of the words here, lol
@TheBrookemarley
@TheBrookemarley 5 күн бұрын
Is your code still usable in latest game version?
@IamGhede
@IamGhede 3 жыл бұрын
Thank you for the tutorial. My only wish is you went over the whole code top to bottom.
@erumaaro6060
@erumaaro6060 2 жыл бұрын
I always imagine these feedback loops as a mass and a dampened spring. the proportional part would correspond to the stiffness of the spring, the derivative part to the dampening fluid/friction, and the integral part to the heat loss from the deforming spring, maybe? (~integral of the absolute value?) edit: nope, integral part would be the mass/inertia. I usually try to go for a critically dampened system (very little overshoot).
@SteffDev
@SteffDev 3 күн бұрын
Whole video I was wandering what could he be using as a load on the power network... Turns out it's rows and rows of computers 🤣
@serheiartuh8308
@serheiartuh8308 2 жыл бұрын
Nice tutorial. Thanks
@erikeggenbakstad
@erikeggenbakstad 3 жыл бұрын
Takker! Thanks! I'm going to look into your PID controller, already subscribed on Steam Workshop :)
@tinygriffy
@tinygriffy Жыл бұрын
Love it .. did you study this topic .. I mean is it you real life job to automate things or do you pull the calculus just for funsies ? :D Also It would be really cool if you could show how to hook up all the stuff... I mean the wiring.. could be a very basic setup just to get the data from the batteries and generators into one chip .. I fail to do so.. (right now) .. have to keep searching.
@Elmotrix
@Elmotrix Жыл бұрын
i'm an automation & control engineer ;) but the wiring on mostly everything i do is just a huge cable network that sticks into every available port :P
@tinygriffy
@tinygriffy Жыл бұрын
@@Elmotrix I had the problem that I could not get the data from the batteries and the generator into the same network, because .. I already solved that using a couple simple logics, 2 readers and a math... power and input at the battery cable, logic output to the generator cable, now I can see the battery charge "behind" (on the input side of the) the batteries .. thank you for the reply anyhow !!
@StarfishPrime-yt2iv
@StarfishPrime-yt2iv 6 ай бұрын
Just getting into this now. A lot has changed since the video was made. So now, the pressure regulator uses less power, it seems...and it provides some saftey over the volume pump. The issue seems to be fine changes in the regulator setting, making the response very slow. It still seems to work, but I don't get any oscillations.
@StarfishPrime-yt2iv
@StarfishPrime-yt2iv 6 ай бұрын
Looks like I had to start at 150,000
@YamatoPower9000
@YamatoPower9000 Жыл бұрын
If my programming teachers told me to code this stuff in the game I'd had fun doing it. Instead we had "Programm a snake game" or "I want you to make a tetris".
@YamatoPower9000
@YamatoPower9000 Жыл бұрын
Even more. I'd tell them don't tell me how to do it. I want to figure it out myself.
@RyanSchlesinger
@RyanSchlesinger 3 жыл бұрын
That was fantastic!
@ethansmith3910
@ethansmith3910 3 жыл бұрын
Maybe you could reduce proportional gain to reduce overshoot/oscillations which may cause an overload?
@vermillion4971
@vermillion4971 2 жыл бұрын
might be a dumb question but why you didn`t use simple pressure regulator instead of volume pump?
@Elmotrix
@Elmotrix 2 жыл бұрын
regulator doesn't (didn't?) move enough gas to keep up. and volume pump gives a much finer control for quite a bit less power. :)
@hratgard
@hratgard 3 жыл бұрын
Hmm, I am trying to build a copy of your mars version from the workshop. As far as I can tell I have everything setup correctly - copied from your setup.. but still the pressure just skyrockets and blows the windows and me have across Mars! :P
@Elmotrix
@Elmotrix 3 жыл бұрын
more active vents. make sure you only get the coldest nighttime air, that way it'll have to pump less air into the chamber to cool it. giving it a bigger room would also smooth things out. but just adding more active vents should work.
@justlukas181
@justlukas181 3 жыл бұрын
wow - I have never seen this generator in operation.
@gamerscircle
@gamerscircle 2 жыл бұрын
I am a little late to this video, do you know if this will still work based on the changes from the refactoring?
@Elmotrix
@Elmotrix 2 жыл бұрын
yup still works :)
@gamerscircle
@gamerscircle 2 жыл бұрын
@@Elmotrix Alright! Thank you very much, I am going to try this out, if you don't mind. On Mimas if I can make it all work out. :)
@boris3320
@boris3320 3 жыл бұрын
Wow, thanks !
@willson213
@willson213 3 жыл бұрын
Hi, how to edit the code on IC PID battery D0 and IC Displays D3 so I can use batch reader for more batteries ..
@Elmotrix
@Elmotrix 3 жыл бұрын
under Sensor variable (where it reads the battery) just change that to a lb and the battery hash. or if you're unsure just use a batch reader and read from that.
@carlosalarcon1741
@carlosalarcon1741 2 жыл бұрын
I have just now came back to one of my old saves on Stationeers to mess around with your generator a bit. I keep on running into a problem of not being able to control the battery with the SP Dial. It might be user error so do you have any input on what I should be looking out for to fix this?
@Elmotrix
@Elmotrix 2 жыл бұрын
sure, but i would have to know more details on what's happening. "not able to" is a bit vague. is it not regulating at all, or kinda? is it just changing set point that's the problem?
@carlosalarcon1741
@carlosalarcon1741 2 жыл бұрын
@@Elmotrix Yes, for some reason it is not regulating at all, ive looked over the wiring numerous times, checked the ic housings to see if they match up with yours on your test world and nothing seems to be popping up as and error. Even when the battery has hit 100% the generator doesn't seem to slow down any.
@Elmotrix
@Elmotrix 2 жыл бұрын
​@@carlosalarcon1741 ah ok so the generator is running at full capacity? what's the input pump doing? how is the pressure between the pump and the generator? have you changed the code to read the correct variable types? - if it's running 100%, pump is still on and pressure is still building it it's probably a variable/setpoint error. like if it's reading the ratio from the battery and setting from the SP dial, and for example you got the dial on 3, it will fight hard to try to get the battery to a 300% charge (to no avail). Have you set the correct regulator mode? - Wrong regulator mode is essentially inverting the output, and it'll go harder when it should cut back. if the pump is off or pressure dropping, it might just have grossly overshot and is working it's way back down (some tuning needed). if none of these fit, try to set it to a P controller: Kp = 1 (you can be a bit flexible with this) Ti = 0 Td = 0. this won't be a good controller, but it should at least find a steady state while eliminating some possible tuning errors. it will respond instantly to any changes you do and not "lag" making it easier to spot the error/fix. then take it from there. Edit: remember it's the pump you're controlling. the generator is just indirectly controlled by the pump. So you should look to what the pump is doing wrong to find your problem.
@carlosalarcon1741
@carlosalarcon1741 2 жыл бұрын
​@@Elmotrix Wow this seems to be a very odd and even maybe surprising fix? When I was checking out the input pump for the fuel I turned it off and on a few times then tried the dial again and it pretty much fixed itself?!? I mean I'm not complaining I just wish I knew what exactly happened lol. You are definitely one of the biggest and best helps to the Stationeers community. It is definitely a big motivator when someone that knows what they're talking about can help you troubleshoot in this game. Thank You!
@Elmotrix
@Elmotrix 2 жыл бұрын
@@carlosalarcon1741 PID controllers can be wierd. sometimes a good controller manages "small" changes fine but a cold start takes time to get going properly. but glad you got it running :)
@pardewski
@pardewski 2 жыл бұрын
You called the chart a shark :-)
Lets talk about Cooling - Stationeers
41:45
Elmotrix
Рет қаралды 24 М.
The unnecessarily complex Automated Furnace - Stationeers
13:10
How Strong is Tin Foil? 💪
00:25
Brianna
Рет қаралды 72 МЛН
Amazing remote control#devil  #lilith #funny #shorts
00:30
Devil Lilith
Рет қаралды 16 МЛН
Stationeers - Introduction to and understand IC10 - Tutorial
30:46
Stationeers ELECTRICAL ENGINEERING tutorial
57:13
God, creator of the universe
Рет қаралды 2,9 М.
Stationeers Basic AIMeE
14:40
Cows are evil
Рет қаралды 12 М.
This is Actually Evil
8:39
Daily Dose Of Internet
Рет қаралды 2,8 МЛН
Stationeers MIPS Channels, down and dirty.
4:38
Shinoshi Kumi
Рет қаралды 36
The player trigger nobody asked for - Stationeers
6:16
Elmotrix
Рет қаралды 6 М.
Furnace Expo 2022
13:31
Elmotrix
Рет қаралды 9 М.
PID demo
1:29
Horizon 4 electronics
Рет қаралды 4,3 МЛН
How Strong is Tin Foil? 💪
00:25
Brianna
Рет қаралды 72 МЛН