Remarks: what fan to choose?
During testing I used an ordinary 12V fan (which I had on spare). The PWN control worked very well. BUT when I used the Noiseblocker BlackSilentFan XM1, the fan emmit annoying 'piep' noise. I think this is related to the XM1's internal electronic, which somehow affects the PWM signal. My bottom line: For the XM1 speed controll, I just use on/off semantics and no intermediate speed.
For more details, see GitHub page.