No, batteries are optional with on-grid systems. They are used for energy storage and backup power. Grid-tied systems can function without batteries, relying on the grid as a power source when needed