Not a member yet? Why not Sign up today
Create an account  

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Submarines and PIDs

First thread did not appear, so here I go again:

My friend and I built a big submarine and I am trying to get it to float/dive with the PID and airpumps.
The thing is, I don't know how to set this up, sometime I try something it sinks, then it does not, and I am very confused how this system actually works.
Yes, there are a lot of tutorials for submarines, but I only found some two year old tutorials, which show a very different PID UI than now, and I cant get behind the new system.

So is there a way to dive controlled in a submarine just using airpumps and PIDs without the use of hydrofoils?
And if yes, how is it set up?

What part of the UI are you struggling with?  the PID UI is relatively unchanged from what it was, but how it is accessed and how PID blocks are setuphas changed as it has been integrated into the new AI UI.
-Do not bring forth an argument as fact that can be disproven with a 10 minute Google search.

tl;dr set the input to "Altitude above mean sea level", click "Airpump fraction control" and change "set point" to whatever altitude you want.

The input and output are the most important options.
Input determines what variable is used to control the PID, and which variable the PID wants to indirectly control. (the current value of the input is the green line; the value that the PID wants to achieve is the red line.)

Output determines what components the PID directly controls, which will hopefully get the input variable to where you want it to be. (this determines what is affected by where the blue line is at)

Set Point Change determines what value you want the "input" variable to be at. (Red line)
Set Point Multiply multiplies the set point. (ie set point change at 50 and set point multiply at 10 means desired is at 500)

Gain basically multiplies the "drive"(blue line) variable. Put it higher if the drive doesn't stray far enough from 0, lower if drive constantly switches between 100% and -100% (ideally you want the drive to only touch 100 or -100 if green line is very far from red line.)

Attached is an example that I've made. you'll notice that the air pump will be at 0 until the craft reaches -50, and then keep being at 0 for a while after that. This is because the drive variable is still climbing back up from -100%. After the craft reaches 50, the pump will remain turned on, making the craft continue its ascent. Eventually, the craft will stabilize at -50 altitude, which is the important part. I assume it's possible to make the drive less sluggish if you tweak the variables long enough.
Also, there are some options that I haven't mentioned. That's because I don't understand them.

Attached Files
.blueprint   PID example.blueprint (Size: 55.22 KB / Downloads: 6)

Forum Jump:

Users browsing this thread:
1 Guest(s)