Open huangalang opened 1 year ago
This seems reasonable. I personally do not use the "stepwise" PID type, so don't have a lot of experience evaluating it.
I agree that stepwise controller should support more type of input: power, margin, temp... If we support margin as input in future, we have to add min() for it.
But I would like to say that the average should not be implemented in phosphod-pid-control, all controllers need is given inputs only. The average can be done by virtual sensor which had existed in OpenBMC.
I believe people use stepwise controller because they don't need to take the sensor history into calculation.
we found that stepwise only supports one computation type: max() =>Get max value of _thermal_input
But for some cases we need more computation type, EX: average and sum up the inputs for something like power readings)
So we’re proposing to add more computation type , something like bellow
In addition, for power readings, we’d also like to introduce moving average process on each _thermal_input before they are computed (max/sum/average) to reduce the fluctuation in power readings as bellow
All the processes put together will go like bellow