The article presents a mathematical model of a permanent magnet motor, powered by a three-phase source of sinusoidal voltage, and a control method. Cooperation between numerical integration algorithms in the differential equation system of the motor and an inverter has been verified. The results of numerical simulations are presented in a graphic form. This article is an extension of the publication , in which a model of a drive system was proposed, consisting of: a battery, a supercapacitor and a method of controlling these energy sources during a driving cycle of a vehicle. For vector control, the mathematical model of a synchronous machine in the dq coordinate system is the most common one. The most important feature of this control method is the fact that the iq component of the rotor current vector determines the value of motor torque, and the component id – the value of magnetic flux. In the article, the emphasis is put on how inverters work. Their basic task is to generate such currents iabc or voltages uabc to obtain torque without ripples. It leads to development of different control concepts for achieving this goal, which are related to the modelling of magnetic fluxes in a stator and in an inverter.