Complex sentence: However, in many cases, the patterns of generation and consumption do not coincide, and some or all of the energy is fed back into the grid; the electricity is sold, and at other times energy is taken from the grid, electricity is bought.
Split into simpler sentences: However, in many cases, the patterns of generation and consumption do not coincide, and some or all of the energy is fed back into the grid. The electricity is sold, and at other times when energy is taken from the grid, electricity is bought.