How can implement a low pass filter with this PWM signal? (Deadstop Fan won't start error)
Question: How can implement a low pass filter with this PWM signal?
Reason THe fan won't start and with PWM the Fan makes a high pitch whine so an LPF was designed to reduce the voltage ripple and noise on the fan.

Actual problem: The fan has a quality defect in the resting magnetic pole positions (4) and one or all of these resting positions has a Hall sensor located inside the fan to tell the internal drivers which winding to apply positive rotation voltage, current, torque and thus spinup. If the Hall Sensor detects it should be the negative phase  magnetically and the motor applies a negative differential winding current (full bridge) it tries to go backwards and immediately the Hall sensor switches saying the wrong polarity and the driver reverses and tries to go forward, then Hall sensor flips thus the fan either dithers back and forth around the resting position or makes little or no motion while oscillating internally with hysteresis. 

Proof of concept

The sanity test is if you use your finger to start the fan and it works it proves that it is the Fan Hall-commutation at fault.

THIS a common fault to ALL BLDC Hall sensor fans that is avoided by careful design, QA Process control and Life Tests. Heat and PM magnetic ageing effects can shift this commutation margin which is normally &lt;&lt; 1 degree of rotation. 

Even the best of them Nidec et al, have failed at least once in my career with 1% yield loss. It can be fixed by the OEM but not the user. As a Test and Design Engineer for 30yrs, I knew exactly how to design a go/nogo start-stop test in 60 seconds so that our Incoming Inspect could screen fans and sent the same logic timer FET circuit to OEM fan supplier (Nidec) and another in Korea to correct their QA issues with Hall position error. The error is less than 1 deg in locating the ideal Hall position just after the magnetic top dead center (TDC) of the magnetic resting position. My test was Pulse just long enough to spin then power off long enough to stop. Optimize timer for 20 start-stops in 60 seconds and gang test 20 fans at a time for a 60 test. Repeat for 100 fans minimum as these issues can escape final test if 1% failure rate means only 1 of 100 start stops fails in 1 of 4 Hall sense positions.

My experience was 10 fan fails reported in Production for a 1k system rate. (99% yield)  After Fan fail analyzed and start-stop test implemented yeild 100%
If 1 fan failed my 180W power supply could have overheated and shutdown in the field . This was avoided by proactive Test Engineering.

This is analogous to an internal combustion engine that sparks too early and backfires.

 Electrical Analysis.

Assumption:  PC style 12V fan 1.2 to 3W but applies to all DC fans using Hall sensors.

Solution: Change fans to one that works.

For those reading this that design for high volume or want to understand from an EE perspective.

Disqualify the supplier with the above explanation and get them to perform Deadspin start/stops with a test jig as I have done in my career. simple counter pulses start the motor for &lt;1/10th second every 3 seconds to allow short ramp-up in speed then spindown and perform 20 start-stops in 1 minute to check all 4 random stop positions of the magnetic poles.

Fan Model:  e.g. 12V 1.5A = . Current rises linearly up to 4V or so then fan starts spinning and then current rises linearly when slowly rising to 12V thus the fan behaves like a linear load resistor above stall speed. However the internal commutation mixed with any PWM causes Intermodulation CUrrents that causes high surge currents in the internal fan Cap and high winding currents create a high whining audio noise due to the IM frequency of Fan speed and PWM speed square wave harmonics  xF2-yF1= for harmonics x,y = Δf in the audio range as a high pitch whine from a tweeter.

Fan equivalent load  12V/1.5A = 8 Ohms

LPF should be lossless using LC LPF.  not an RC with 10 Ohms in series with 8 Ohm load unless half RPM speed is OK. 

PWM at 50% causes 10R series to become 20R since infinite R when Open and 10R when closed ( using low RdsON MOSFET) 

Analyze present design:

PWM assuming from 50% to 100% = 4V(stall speed voltage)  to 12V avg.
Series R switched Requiv= R/PWM duty% = 20 Ω to 10 Ω   

LPF filter attenuation = load /(load + Rs) for Rs from 20 to 10 Ω
  using KVL, Vout = 8Ω/28Ω *12V = 2.5V @ 50% PWM  and 8/18 * 12V = 6.4V

This yields a variable speed form 0 to 50% approx full speed.

THe breakpoint for the LPF is around 3.7kHz with 20 dB ripple attention ( 1/10th) at 35kHz.

A better LPF can be made if desired that has less loss and more RPM.