Study of the Charge Density Control Method Including the Space Charge Effect in the Proton Synchrotron