working principle of dc generator pdf