# PWM to Analog Signal

#### bouncetherabbit

Joined Oct 25, 2009
10
Hi All,

I need to convert a PMW signal to an analog signal. To do this, i'll prob need an LC filter. My load resistance is 4ohms and cut off frequency is 20kHz. (1) Is there anyway to find the value of L and C?

(2) Is the value of L and C dependent on the input signal?

Because when i did simulation, they would always ask for the "AC amplitude" for doing small signal analysis. (3) What is this AC amplitude for a PWM signal?

Thanks!

#### SgtWookie

Joined Jul 17, 2007
22,201
Have you tried using Elsie?
http://www.tonnesoftware.com/elsie.html
It's for LC filter design.

Try a capacitor-input low-pass Chebychev 5th order with a cutoff around 18kHz and a bandpass ripple of around .8 or so.

#### russ_hensel

Joined Jan 11, 2009
825
4 ohms is low, thus high current. Is you pwm output capable of the required current. What are you driving and is the load inductive by its self ( a motor for example )? This seems to be more than a signal processing aplication.

#### SgtWookie

Joined Jul 17, 2007
22,201
With a load of 4 Ohms and a cutoff of 20kHz, I'd bet money that our OP is working on a class D audio amplifier.

If that's the case, they won't really want to use a Chebyshev filter. It has a nice brick-wall-like response cutoff, but lots of ripple in the passband.

Last edited:

#### bouncetherabbit

Joined Oct 25, 2009
10
Yup! It's a class D audio amplifier So i should use butterworth right? Using Elsie program it has a resistor at the input. Does it matter what this value of the resistor is? Because i don't think my data sheet actually writes out the value.

#### SgtWookie

Joined Jul 17, 2007
22,201
Use 4 Ohms, as that's what your output is. The filter will not perform impedance matching. If your amp's output impedance doesn't match your speaker's input impedance, that's not the filter's problem

#### SgtWookie

Joined Jul 17, 2007
22,201
Go ahead and try a Butterworth, just to see what it looks like. 5th order.

Then try a Constant K, bandwith 24k, 5th order, still 4 Ohms.

Then try an M-derived, BW 21k.

Analysis settings:
Start freq: 1Hz
Stop: 30k
Analysis steps: 401
Sweep: linear
X intervals: 10
Transmission bottom:-21
Delay top (secs): 3m
VSWR top: 2.2
Impedance top: 1.2k
Nr of y intervals: 7
Q of inductors: 150 (your mileage will vary here)
Q of capacitors: 3k
Transmission: absolute