Abstract: Permanent magnets are today widely used in electrical machines of all sorts. With their increase in popularity, the amount of research has increased as well. In the wind power project at Uppsala University permanent magnet synchronous generators have been studied for over a decade. However, a tool for studying demagnetization has not been available. This Ph.D. thesis covers the development of a simulation model in a commercial finite element method software capable of studying demagnetization. Further, the model is also capable of simulating the connected electrical circuit of the generator. The simulation model has continuously been developed throughout the project. The simulation model showed good agreement compared to experiment, see paper IV, and has in paper III and V successfully been utilized in case studies. The main focus of these case studies has been different types of short-circuit faults in the electrical system of the generator, at normal or at an elevated temperature. Paper I includes a case study with the latest version of the model capable of handling multiple short-circuits events, which was not possible in earlier versions of the simulation model. The influence of the electrical system on the working point ripple of the permanent magnets was evaluated in paper II. In paper III and VI, an evaluation study of the possibility of creating a generator with an interchangeable rotor is presented. A Neodymium-Iron-Boron (Nd-Fe-B) rotor was exchanged for a ferrite rotor with the electrical properties almost maintained.