Barotrauma 潜渊症

Barotrauma 潜渊症

评价数不足
PID-Regulator
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
43.136 KB
2021 年 2 月 14 日 上午 10:14
1 项改动说明 ( 查看 )

订阅以下载
PID-Regulator

描述
If you don't know what a PID-Regulator is, this mod is probably not for you. Put the Inputs in the upper left SUB, use the upper left MEM for a static input. Put the K values into the right MEMs, from top to bottom Kp Ki Kd. Output is on the bottom right ADD.

For tuning the regulator first set a small Kp and increase it until the regulated value oscyllates around the target. If the Kp already oscyllates around your target tune it down until it doesn't and then go one step back.
After that set a small value for Kd and increase it until the oscyllating stops. If it stops right away you also need to turn it down until the oscyllation starts again and then go a step back.
Now you will likely see your regulated value above or below your target by a fixed value. Set a very small Ki. Like at most a hundredth of the Kp or Kd. Then tune it up until your regulated value reaches your target sufficiently fast for your application. If your value starts oscyllating you need to increase the Kd until the oscyllation stops.

You can also play around with the frequency of the oscyllator a little bit. Higher frequencies result in more predictable and less buggy behaviour of your regulator, yet they are tougher on your computers ressources.

I use the regulator for the reactor to prevent overheats or long periods without power.
Since the load of the reactor includes the power drawn/provided by the batteries but the power drawn/provided by the batteries depends on the difference between powerproduction and demand large amounts of batteries cause buggy behaviour. I will try to fix this in the future but I am not sure if I it is possible.
5 条留言
Clavix 7 月 11 日 下午 12:36 
Thank you for your work, i used it in my Docking Autopilot! :) https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=3523013451
Roblue  [作者] 2021 年 11 月 11 日 上午 11:26 
Yes exactly
G3NTrovert 2021 年 11 月 9 日 下午 4:33 
so the oscyllator accesses the store data variable in the memory, so new data is only stored when once a cycle. correct? this stored data is than used for the next cycle in the integrator and derivative.
Roblue  [作者] 2021 年 11 月 9 日 下午 12:57 
@G3NTs the oscyllator and some of the memory components work as a delay of sorts. I tried a delay component but it was a pain to make it work and it introduced all kinds of weird behaviours, so I settled for the memory components instead.
G3NTrovert 2021 年 11 月 9 日 上午 7:36 
does your oscyllator work as a delay ?