Giving acceleration and deceleration to motors using PS3 controller

I'm using PS3 controller to give speed and direction to servo motor of my base (4WD) , I wanna know how can a vary PWM of my motor such that on giving a slight push to left analog stick ,it gives less PWM while on pushing left analog stick to its maximum potential it gives full PWM. Basically how can I vary PWM of my motor based on the senstivity of joystick

Installation & Troubleshooting
For problems with Arduino itself, NOT your project

Thread moved as requested.

@Srijan_21, do not cross-post. Other thread removed.