how to use PID controller to control the PWM output in an Arduino?

i want to control the PWM output by using the PID controller. after searching from google, i still got no idea in how to do it. how can i link the PWM output data from arduino to the matlab?

Serial over USB?

yes, i am using arduino uno

No, serial over USB is how you're going to interface Matlab with your Arduino.

sorry for my misunderstanding, what i want to ask is how to get the three Tuning Parameters.

A sophisticated procedure called "trial and error".