AFM provides way too many options, so you have to ask yourself what you wanted to learn about your material with the measurements, properties like roughness, grain sizes, step edge heights, inclination angles, object densities, skew, effective surface areas...
I used it and I am wondering why changes in proportional gain and integral change the projected area and density of the same sample. why will number of grains differ for the same sample
Changes in gain may change the accuracy of the measurement of steep lopes, e.g. when you have pits. For larger depths, AFM has the tendency to smooth out steep edges and this smoothing effect may reduce the effective area.
You can check that by extracting a profile at the edge and you will probably find that the slopes will differ.
Md Samim Reza my question is why do the change in proportional gain and integral gain at constant scan rate affect the projected area and grain of the same sample.
i thought if the scan rate is the same, the same area will be covered, and the gain only affect the maintenance of the cantilever tip on sample.
The PID values, scan rate, and bias voltage are AFM tool parameters, not the sample's properties. You change it to get "better/cleaner" scan results. These are not fixed values.
For example, the same tip type from different manufacturers would have different values. New and used ones will have different PID values even for the same tip, and you have to tune it for the desired scan output.