Magnetic and anisotropy studies of Nd-Fe-B based permanent magnets