A systematic study on the cosmic ray antiproton flux