How are AC and DC generators similar?