You mean Rietveld refinement, I think. You should simulate theoretical XRD pattern that must be so close to exp. one as possible. Some progam packages like Match can do this work automatically. Usually user should input hypothesis about phases that are possible in the powder and the next stages depend on info you need. The other packages are Powder Cell, GSAS, Fullprof etc.
If one choose to use FULLPROF or MAUD, normally, the parameters that effect XRD profile are displacement, profile parametes (peak shape and size), unit cell and atom position parameters etc, ( also Nature of powder sample such as orientations, anisotropy etc).
For sucessful Rietveld refinement, ir is crucial to prepare powder samples with randomly oriented particles and obtain a good profile by selecting the appropriate scan speed and wave-length of the x-rays.
Literature is available from many sources (open and full papers) in the internet.
However, with whatever parameter you want to start (there are different strategies), it is good to begin with one and then to give them free one by one and only if the refinement is stable.