Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Plenty of (stormworks unrelated) youtube videos that explain how PIDs work and how to tweak them, so you can achieve your wanted results without anyone suggesting the typical 0.1, 0.000001, 0.01 nonsense values you see on every stormworks PID video.
PID settings also depend on the vessel, so there's no such thing as general values to use.
As for submarines you only need to achieve neutral buoyancy, then the sub will stay at its current depth.
Also, what do you mean by "props take a so long to spin up and slow back down again"? You shouldn't need to control the props, as long as the control surfaces are doing the right thing you will get to the right depth.
Note that you need to invert the PID output if you are also controlling the surfaces from the player input, since "S" = -1, but holding S will make you go up, rather than down (I hope that makes sense).
Assume your speed is zero and attempting to manage depth with a combination of vertical thrust and ballast tanks. In which case, control surfaces have no impact.
If control surfaces are perpendicular to the axis you're trying to move in, they'll apply huge amounts of drag (all control surfaces and wing sections to similar extends).
I can't speak for OP, but my sub has no control surfaces. Just fixed 6-DOF thrusters. I wasn't implying the shape of the sub has no impact on hydrodynamics. Rather, moving them around has no real corrective influence at zero speed in a depth leveling PID control logic sense.
XLjedi:
My sub also has no control surfaces. It has 2 azimuth thrusters for up/down, one for back/forward and a small prop on each side for turning. Every prop has a small motor. It runs all on power via winch from a mother ship.
I recently tested it out on some ocean landmarks and it's usuable but only just.
Turning has same issue PID does as there's a 5+ second delay because of prop spin-up that causes lots of oversteering.
I ended up turning the depth hold off because of my main issues with the PID, sub goes up and down 20+ meters past the depth you select for it.
Should also mention sub is basically neutrally buoyant as is and doesn't use ballast tank. I've used them on other subs but yeah.. buoyancy isn't really a factor right now as props are more than enough to compansate for any tiny difference.
Microcontrollers have a internal component called an "advanced PID". They can have variable P, I and D settings.
Try using two PIDs, one for calculating where the craft needs to go, and the other for bringing it to that depth. I think this is called Cascading and is useful for regulating the speed at which you want to descend at.
Thanks for the info I'll give this a try. I get that one PID is going to match target depth against current depth however could you elaborate on what the "where craft needs to go" part of the second PID?
I didn't quite follow that either... are we talkin' speed/power for how fast the craft gets to the depth?
I was contemplating having something to temper or regulate the control input the closer you get to your target depth. So the closer you get to your depth, the finer the control input. Which would hopefully resolve any potential overshooting. I was thinking more in terms of a linear or binomial equation for power output rather than secondary PID.
Sorry, I guess that wasn't very clear. I think, XLjedi, that you have the right idea by "having something to temper or regulate the control input", which is the secondary PID. All the secondary PID will do is fine-tune the first PID's output to make it more manageable. For example, if you are 100m from your target depth, the first PID will be controlling your props to get to your depth. However, over time you will start to speed up. The second PID looks at the speed and goes "Ok, we are descending quite quickly. Let's tone the input down a bit, and make our descent tiny a bit slower so that our descent is more consistent. This makes it less likely to overshoot our target".
Basically, the second PID takes into account the speed at which you descend at. If it thinks you are going to fast, it makes an adjustment, making it less likely to overshoot your target.
You can have a look at Example 1 for Cascading Regulation on Timothy's guide here
He explains it a lot better than I can.
I know it is for controlling fuel tanks, but the principle is the same.
I actually stumbled upon a very ghetto way to get the sub to sink and rise better in that at least the PID is holding the depth now to within +/1 one meter of the target depth. I just put on some fin rudders horizontally on each side. They have no power or control input, they don't even face forwards.
They just seem to disrupt the excessive acceleration. They act like brakes almost, always reducing speed in any direction they are perpendicular with making movement more responsive as a consequence.
It helps with my over steering problem the same way, creating a braking force against the propellers.
Downside of this design is I tow a very clunky boi behind me till I reach destination.
Totally out of the loop here, never even heard of of PIDs before Stormworks.
And I have a few years on my back already ... well you learn something new every day.
Blackmagic² ? I need a real idiot prooved tutorial on that one.
Well, that also made me wonder if he made a sub without balast tanks.
Thanks for pointing the link out, otherwise I would have missed it.
Thanks, for the link. Tho, the use of "here" as the text of a link is usually frowned upon, and now I know why.
Key Steps:
Set up the PID controller block:
Access the "Logic" tab in the building menu and find the "PID Controller" block.
Connect the input of the PID controller to the submarine's current depth sensor output (usually a "Depth" sensor).
Set the desired depth as the "Setpoint" value in the PID controller settings.
Connect the output to the vertical thrusters:
Connect the PID controller's output to the vertical thruster control input.
Adjust the "Gain" values (Proportional, Integral, Derivative) in the PID controller settings to fine-tune the response based on your submarine design and desired behavior.
Tuning the PID values:
Proportional (P): Controls the immediate response to the error. Higher P means faster reaction to depth changes, but can lead to overshooting.
Integral (I): Accumulates the error over time, helps eliminate steady-state errors but can cause overshoot if too high.
Derivative (D): Responds to the rate of change in error, helps dampen oscillations and improve stability.
Important Considerations:
Sensor accuracy:
Ensure your depth sensor is accurate and has a suitable update rate for smooth control.
Thruster response:
Consider the responsiveness of your vertical thrusters, as it can affect how quickly your submarine reacts to PID adjustments.
Environmental factors:
Adjust PID values depending on the water conditions (currents, waves) to maintain stable depth control.