I told Arduino to output 2.5V to pin D13( writePWMVoltage(a,'D13',2.5) )
The filter is off. Your cutoff is about 1.6 Hz. You need higher cutoff freq for PWM. Try again but set cutoff about 1 kHz.
This is totally incorrect. It is a low pass filter the break frequency only affects the speed that the voltage can be changed, not the DC value.