openbmc / phosphor-pid-control

OpenBMC PID-based Thermal Control Daemon
Apache License 2.0
16 stars 21 forks source link

Cannot set dual-rotor with one PWM #18

Closed alice-jabil closed 2 years ago

alice-jabil commented 2 years ago

I tried to config PID parameters with entity-manager config. I would like to define two rotor in input settings, as below ,But it will go fail. Why PID only support 1 pwm to one tach in a fan zone? How to support dual rotor to 1 pwm?

https://github.com/openbmc/phosphor-pid-control/blob/0001ee0224eea058e8bf0a71bd019e74f8b1738d/dbus/dbusconfiguration.cpp#L663


{
            "Class": "fan",
            "FFGainCoefficient": 5.0,
            "FFOffCoefficient": 0.0,
            "ICoefficient": 0.0,
            "ILimitMax": 0.0,
            "ILimitMin": 0.0,
            "Inputs": [
                "Fan_1_a",
                "Fan_1_b",
                "Fan_2_a",
                "Fan_2_b"
            ],
            "Name": "System_Fan",
            "NegativeHysteresis": 0.0,
            "OutLimitMax": 60.0,
            "OutLimitMin": 30.0,
            "Outputs": [
                "Pwm1",
                "Pwm2"
            ],
            "PCoefficient": 0.0,
            "PositiveHysteresis": 0.0,
            "SlewNeg": 0.0,
            "SlewPos": 0.0,
            "Type": "Pid",
            "Zones": [
                "Zone1"
            ]
        },
Krellan commented 2 years ago

I suggest making two separate fan PID loops. This would let you have one PID loop per rotor. Each PID loop would manage the tach and PWM of a single rotor. I think this would give you the solution you are looking for.

alice-jabil commented 2 years ago

Yes. Finally , I refer to R1000.json, it helps me a lot . Thanks for your help, Krellan!