pseudo analog voltage using PWM
If you know the PWM frequency you can start to set an upper bound for your filter.If you know the expected response time of your signal you can set a lower bound for your filter .99% of the time the PWM is high like 50KHz and the expected response time doesnt have to be fast .This means that your filter will be easy .This is why you often see a simple RC filter of 1 or 2 sections .For you to start why not do a 2 section LP RC filter using 10K ohm resisters and 1 microfarad  film      caps .Check this out on the scope or the simulater and you will see the pwm square wave turning into a low ripple DC wave on the first section and it will be almost clean after the second RC section. The cost effectiveness of SMD   resistor arrays containing 4 equal     resistors and SMD cap arrays with 4 equal caps improve ripple further   .   This concept means that you can get an analog output from a PWM output easily.