add pid struct & pid function
PID test code