We have analysed the influence of the microstructural features, such as intergranular grain boundary (GB) phases and misalignment of the hard magnetic grains, on the optimization of magnetization reversal processes in order to improve the coercive field of Nd-Fe-B magnets.The microstructural model of the grains and intergranular phases, which is used for theoretical simulations, has been derived from a detailed nanoanalytical TEM/STEM study of a Dy/Tb free magnet and a high coercive (Nd,Tb)-Fe-B magnet. Special attention is laid on the EELS analysis of GB with a thickness ranging from 2 - 30nm. This analysis identified the majority of the GB phases to have about 50 -70 at.% of iron and only a few GBs, which are connecting two nearby grain boundary junctions (GBj), possess a similar chemical composition as the adjacent GBj with a low iron content (< 10 at. %) and a high rare earth and oxygen content.Finite element micromagnetic simulations have been carried out in order to study the influence of internal demagnetizing fields determined by the microstructure on the magnetization switching behaviour. Special emphasis was put on the influence of the GB and their magnetic properties, due to their substantial influence on the nucleation of reverse magnetic domains and the pinning of domain walls. The strongest reduction of the coercive field is caused by GB with soft ferromagnetic properties. Shielding the Nd-Fe-B grains from the nucleation sites at the GBj with Dy or Tb shells, leads to an increase of the coercivity from 2.5 to 3.6 T and 2.5 to 4.3 T, respectively.