Stationeers PID Tutorial

  Рет қаралды 14,292

Elmotrix

Elmotrix

3 жыл бұрын

Tutorial video on how to set up a PID-controller in Stationeers.
Code: steamcommunity.com/sharedfile...
Example worlds:
Europa: steamcommunity.com/sharedfile...
Mars: steamcommunity.com/sharedfile...
Moon: steamcommunity.com/sharedfile...

Пікірлер: 42
@SatanaS-ed8qv
@SatanaS-ed8qv Ай бұрын
I never got passed building a simple airlock but here i am watching a PID tutorial!
@sheldonseabourne5274
@sheldonseabourne5274 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.
@TallinuTV
@TallinuTV 2 ай бұрын
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.
@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 11 ай бұрын
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.
@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
@IamGhede
@IamGhede 3 жыл бұрын
Thank you for the tutorial. My only wish is you went over the whole code top to bottom.
@erikeggenbakstad
@erikeggenbakstad 3 жыл бұрын
Takker! Thanks! I'm going to look into your PID controller, already subscribed on Steam Workshop :)
@RyanSchlesinger
@RyanSchlesinger 3 жыл бұрын
That was fantastic!
@serheiartuh8308
@serheiartuh8308 2 жыл бұрын
Nice tutorial. Thanks
@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).
@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 Ай бұрын
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 Ай бұрын
Looks like I had to start at 150,000
@boris3320
@boris3320 3 жыл бұрын
Wow, thanks !
@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.
@ethansmith3910
@ethansmith3910 3 жыл бұрын
Maybe you could reduce proportional gain to reduce overshoot/oscillations which may cause an overload?
@justlukas181
@justlukas181 3 жыл бұрын
wow - I have never seen this generator in operation.
@vermillion4971
@vermillion4971 Жыл бұрын
might be a dumb question but why you didn`t use simple pressure regulator instead of volume pump?
@Elmotrix
@Elmotrix Жыл бұрын
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 2 жыл бұрын
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 2 жыл бұрын
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.
@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. :)
@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 :)
@willson213
@willson213 2 жыл бұрын
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 2 жыл бұрын
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.
@pardewski6364
@pardewski6364 Жыл бұрын
You called the chart a shark :-)
Furnace Expo 2022
13:31
Elmotrix
Рет қаралды 9 М.
The unnecessarily complex Automated Furnace - Stationeers
13:10
WHO DO I LOVE MOST?
00:22
dednahype
Рет қаралды 77 МЛН
Homemade Professional Spy Trick To Unlock A Phone 🔍
00:55
Crafty Champions
Рет қаралды 60 МЛН
We Got Expelled From Scholl After This...
00:10
Jojo Sim
Рет қаралды 73 МЛН
ROCK PAPER SCISSOR! (55 MLN SUBS!) feat @PANDAGIRLOFFICIAL #shorts
00:31
Stationeers Temperature control for larger bases
14:43
Cows are evil
Рет қаралды 24 М.
Stationeers Tutorial: Runways and Atmospheric Traders
8:51
Grandpa Canuck
Рет қаралды 64
Stationeers Automated hydroponics
20:28
Cows are evil
Рет қаралды 17 М.
Lets talk about Cooling - Stationeers
41:45
Elmotrix
Рет қаралды 20 М.
The Inventory System Explained - Stationeers
57:29
Elmotrix
Рет қаралды 10 М.
Venus EP1 - Starting small
14:54
Elmotrix
Рет қаралды 5 М.
Stationeers Gas filtration systems
14:24
Cows are evil
Рет қаралды 21 М.
ЗРЯ Мы Отправились в ПЫЛЬНУЮ ПОЕЗДКУ в Роблокс! Roblox
10:33