From linear to exponential PWM output

Suggestion - Put some numbers in a spreadsheet. Make an input columm and an output column. Your ADC input values go from 0-1023, and your PWM output values go from 0-255. At this point we don't know the formula or exponent, so just put-in the approximate "answer" you want. And, don't start-out with all 256 output values... 20 or 25 should be enough. If it makes it easier, put-in values from 0-100 for both the input and output. You can scale/tweak for the real values later.

Now, make a 3rd column an stick a formula in it. Just experiment with the exponential formula 'till you get numbers close to the answers you want. Excel can make a graph too, if that helps you to compare the calculated values with what you ideally want.

There are a couple of ways to handle negative values. If we are talking about negative voltages, that has to be done in hardware. To get a negative value (in software) from the ADC, you can simply subtract 512 (or 511) from the reading (then "half-way" will read zero). Same thing on the output-side. half-way is 128 (or 127). I'm not sure if this will be necessary, but you can use different formulas for the "positive" and "negative" values, if it makes things easier.

For exponents, Excel uses POWER(), and the Arduino uses pow(), and they are used slightly-differently. So, check the Excel help file & Arduino language reference.