designing LC filter for linearizing PWM output
For a H bridge I'd design the inductor and capacitor like this: -







simulate this circuit &ndash; Schematic created using CircuitLab

I've put approximate values in for L and C and these have a resonant frequency about 1591 Hz. Regards the resonant frequency, you need it to be significantly below 5kHz or you'll run into resonance issues and burn your circuit. They are low pass filters but, they are also series resonant and can act like a short at 1591 Hz hence, they are significantly lower than 5kHz. Lower still would be better and maybe you can go for two 1 millihenry inductors.

Your values of 560uH and 4.7uF are a little too close to the 5kHz limit and you would see a lot of PWM ripple on the load. Ideally, if this was a switch mode power supply I'd be looking for an LC resonant frequency of lower than 500 Hz i.e. ten times lower than your PWM frequency.

F\$_C = \dfrac{1}{2\pi\sqrt{LC}}\$