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!!!!
@sheldon25273 жыл бұрын
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-ed8qv5 ай бұрын
I never got passed building a simple airlock but here i am watching a PID tutorial!
@RamHomier3 жыл бұрын
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.
@SickoFromHell2 жыл бұрын
its brings me back from my automation and regulation system classes... nostalgy !
@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.
@Dreamshadow19773 жыл бұрын
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.
@TallinuTV6 ай бұрын
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.
@TheBrookemarley3 жыл бұрын
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
@Elmotrix3 жыл бұрын
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.
@TheBrookemarley3 жыл бұрын
@@Elmotrix i need to learn PID first, so i'll be able to understand most of the words here, lol
@TheBrookemarley5 күн бұрын
Is your code still usable in latest game version?
@IamGhede3 жыл бұрын
Thank you for the tutorial. My only wish is you went over the whole code top to bottom.
@erumaaro60602 жыл бұрын
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).
@SteffDev3 күн бұрын
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 🤣
@serheiartuh83082 жыл бұрын
Nice tutorial. Thanks
@erikeggenbakstad3 жыл бұрын
Takker! Thanks! I'm going to look into your PID controller, already subscribed on Steam Workshop :)
@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 Жыл бұрын
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 Жыл бұрын
@@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-yt2iv6 ай бұрын
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-yt2iv6 ай бұрын
Looks like I had to start at 150,000
@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 Жыл бұрын
Even more. I'd tell them don't tell me how to do it. I want to figure it out myself.
@RyanSchlesinger3 жыл бұрын
That was fantastic!
@ethansmith39103 жыл бұрын
Maybe you could reduce proportional gain to reduce overshoot/oscillations which may cause an overload?
@vermillion49712 жыл бұрын
might be a dumb question but why you didn`t use simple pressure regulator instead of volume pump?
@Elmotrix2 жыл бұрын
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. :)
@hratgard3 жыл бұрын
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
@Elmotrix3 жыл бұрын
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.
@justlukas1813 жыл бұрын
wow - I have never seen this generator in operation.
@gamerscircle2 жыл бұрын
I am a little late to this video, do you know if this will still work based on the changes from the refactoring?
@Elmotrix2 жыл бұрын
yup still works :)
@gamerscircle2 жыл бұрын
@@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. :)
@boris33203 жыл бұрын
Wow, thanks !
@willson2133 жыл бұрын
Hi, how to edit the code on IC PID battery D0 and IC Displays D3 so I can use batch reader for more batteries ..
@Elmotrix3 жыл бұрын
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.
@carlosalarcon17412 жыл бұрын
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?
@Elmotrix2 жыл бұрын
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?
@carlosalarcon17412 жыл бұрын
@@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.
@Elmotrix2 жыл бұрын
@@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.
@carlosalarcon17412 жыл бұрын
@@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!
@Elmotrix2 жыл бұрын
@@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 :)