Stormworks: Build and Rescue

Stormworks: Build and Rescue

评价数不足
Better PID for jets
   
奖励
收藏
已收藏
取消收藏
Vehicles: Air, Mechanical
Microcontrollers: Calculation, Microcontroller
标签: v1.13.3
文件大小
发表于
更新日期
32.632 KB
1 月 5 日 下午 12:37
1 月 7 日 上午 8:30
7 项改动说明 ( 查看 )

订阅以下载
Better PID for jets

描述
Custom PID controller suited for jet engine use. MP-friendly (no lua, no random desyncs). Not insanely complex for it's purpose (KISS). Can handle RPS from very low (0.515) to very high (199.997). It either achieves perfect match or fluctuates between 2 closest values (most likely due to the lack of precision of 32-bit floats used in Stormworks, not really fixable).

Usage:
1. Working jet engine is required.
2. Connect controls to setpoint (that's engine target RPS)
3. Connect combustion chamber RPS to process variable (!Important! Use RPS from combustion chamber, because it differs between components. For example, compressor has lower RPS, but engine explosion is determined by combustion chamber, so it might became possible for you to ununtentionally blow up your engine by setting target RPS to only 199...)
4. Connect "enable compressor" to your jet engine compressor
5. Connect "control output" of this controller to combustion chamber "Throttle"
6. Enjoy!

This controller can be used for other purposes of course, though it will require manual tuning. Engine state indication is out of scope for this controller.
Also note that this controller doesn't protect you from yourself - you can set the setpoint to 200+, forcing controller to break your engine, you can discharge your battery by constantly trying to start the jet with setpoint too low for it, etc.

Controller is tuned for use with simple jet engine with small generator and large jet intake as it's only energy consumers at worst. It is not intended to be used as is for jet engine based generators, though it might be adapted for such use manually.

Also you might be interested in more general-purpose PID this controller is based on.

You are allowed to use this controller in your own creations, disassemble, study, reverse-engineer and modify it freely. Attribution is welcome (but not required).
1 条留言
жидкий гонзалес 11 月 9 日 下午 1:48 
спасибо, теперь мой истребитель не взрывается)