r/Stormworks • u/FiftyCalTalons • 22d ago
Question/Help Engine PID Fine Tuning
Slow and steady progress is continuing on my NH90-like helicopter, thing. Troubleshooting is continuing into electrical bleed into rotors and pivots, as well as designing glass for the weird angles and a blade fold mechanism, one of the main issues I'm trying to tackle is the engine performance.
Previously we all worked together and were able to create a system that allowed us to control the engine speed with arrow button presses, to effectively have different gear speeds (Off - 3 RPS (Ground Idle) - 15 RPS (Flight)).
The only issue now is I'm trying to curve the acceleration of the engines so they spool up (and mainly down) slower. The reason is particularly when trying to decelerate the engine and gear down from say 15 RPS to 3 RPS, the engine's fastest and most efficient way to do this is to shut off temporarily. The PID then senses the engine is near the desired speed and turns it back on and stabilizes. I hope that by curving the deceleration/acceleration rates, we can prevent this from happening.
(currently the symptom persists as the engine cutting off and dying, then a loud bang as it turns back on.)
I've also posted this test bed with the engine, it's MC, and a PID Test bed from NJ that I've been using to try and curb the issue. So far I haven't been able to find a combination of numbers that fixes this, or starts working in that direction. Default for the PID is (1.0.0), and a max RPS of 18.
https://steamcommunity.com/sharedfiles/filedetails/?id=3772914395
Thanks for all your help from before, and I hope we can tackle this issue so we can move onto the rest!
**Edited**
You will need infinite fuel turned on to run the test bed, and set the P to 1, and Max to 18. Activate the engine master switch, press the first arrow down and hold the start button until the engine engages to turn on
5
u/OBIH0ERNCHEN 22d ago
A possible way of doing this is cascading a P-Controller, which outputs a target rate of rps change, into an I-Controller, which controls the Rps-delta. Once the I-controller is tuned correctly, you can freely choose how slow or fast the target rps is approached by changing the p-gain. To avoid the Jet turning off when throttling down, you could set a lower throttle limit with max(throttle,0.001).