Stormworks: Build and Rescue

Stormworks: Build and Rescue

Barbyslayer Dec 30, 2020 @ 4:35pm
Broken Pid
I put a PID on a workshop jet but every time i turn it on it goes up forever. I have watched several tutorials but none of them show the 4th variable max value. everything is wired correctly, I've triple checked.
< >
Showing 1-13 of 13 comments
Ra-Ra-Rasputin Dec 30, 2020 @ 4:45pm 
There's no 4th variable in a PID, but it sounds like you've not put your PID in correctly, as the integral is clearly too high and spooling out of control. Set Integral to 0 or to very low decimals (1:10000 or so)
Barbyslayer Dec 30, 2020 @ 4:58pm 
1: the is a forth variable and 2: no matter what I do to the variables it just shoots up
Ra-Ra-Rasputin Dec 30, 2020 @ 5:06pm 
PIDs have 3 variables:
Proportional
Integral
Derivative

That's also where the name comes from.
Zero out your Integral, then ensure that the data it receives is actually correct. You don't want to look at your speed readout when trying to make an altitude hold. It's an easy mistake to make.
Barbyslayer Dec 30, 2020 @ 9:03pm 
I know that’s what everyone one is telling me is my game possessed or something?
Alistair Dec 30, 2020 @ 10:31pm 
Are you sure you’re using a PID? What is the fourth values name?
Barbyslayer Dec 31, 2020 @ 12:08am 
The forth value is called Max Value. I have deleted and regrabed it from the inventory several times
Alistair Dec 31, 2020 @ 12:14am 
Is it definitely, definitely not an up/down counter? Please post a screenshot of all the values
PenguinO Dec 31, 2020 @ 12:58am 
The recently added option to PID brick not micro PID I think
Ra-Ra-Rasputin Dec 31, 2020 @ 7:25am 
Originally posted by PenguinO:
The recently added option to PID brick not micro PID I think

People use that thing? But it takes such gigantic space :lunar2019deadpanpig:
PenguinO Jan 1, 2021 @ 3:35am 
Originally posted by Ra-Ra-Rasputin:
People use that thing? But it takes such gigantic space :lunar2019deadpanpig:
From what I heard, people were suffering integral limitless windup due to processing clock being as low as 60Hz.
And I believe the added limiter won't help much.
Ra-Ra-Rasputin Jan 1, 2021 @ 6:09am 
But the microprocessor logic works exactly as fast as the placeable chips do, they're tied to 62hz update rate too.
Why 62hz? Who knows.
PenguinO Jan 1, 2021 @ 6:34pm 
Originally posted by Ra-Ra-Rasputin:
But the microprocessor logic works exactly as fast as the placeable chips do, they're tied to 62hz update rate too.
Why 62hz? Who knows.
Probably speed bonus when main process is with light load.
Logic clock rate is same as main fps (or very close).
Next moment, a new vehicle spawn, 62Hz may become 58Hz or less. :D

Instead of decreasing I value (which may be already as low as 0.00001), multiplying the process variable and setpoint up may help in certain cases.
This trades at least 1 tick lag for increased processing resolution.
Ra-Ra-Rasputin Jan 1, 2021 @ 6:40pm 
A possibly major issue i've seen in a lot of cases is when people have functions inside the microcontroller for their pid. Since they cost ticks it'll nudge down the responsiveness of the PID significantly, which actually appears to be separate from how they act outside the microcontrollers. A string of 20 functions (just doing +1, then -1, repeat 5 times) seems to be as responsive as just 2 doing +1, then -1. But they're absolutely not if you have one microcontroller with 20 f(x) and one with 2 f(x).

I do wonder why there is a tick delay on operations, given that possibly massively complex LUA is ran every tick.

What i mean about the 62 hz thing is that it seems to be the cap... which makes little sense. It makes things like timers and such annoying to count for, when you have to specifically remember it's 62, not something sensible like 50 or even 60.
Last edited by Ra-Ra-Rasputin; Jan 1, 2021 @ 6:42pm
< >
Showing 1-13 of 13 comments
Per page: 1530 50

Date Posted: Dec 30, 2020 @ 4:35pm
Posts: 13