The concept of simultaneous generation of electricity and thermal energy is called cogeneration. It produces two forms of energy from…