A mathematical model of a DC machine