A power supply device includes a power generator, a drive source, a plurality of power supply lines, a plurality of batteries, a
diode, a difference calculating unit 11, 12, 13, or 14, and a difference summing unit 16. The difference calculating unit 11, 12, 13, or 14 is configured to calculate a difference between demanded
electric power P1, P2, P3, or P4 in the corresponding power supply line and a charge state of the corresponding battery. The difference summing unit 16 is configured to sum the differences in
electric power in the power supply lines calculated by the difference calculating units 11, 12, 13, and 14. In the power supply device, the drive source is controlled such that
electric power equal to or higher than the electric power calculated by the difference summing unit 16 is generated by the power generator.