A controller to control geothermal power generated by an organic Rankine cycle (ORC) process in the vicinity of a wellhead during hydrocarbon production to thereby supply electrical power to one or more of in-field operational equipment, a grid power structure, and energy storage device, the controller comprising:
- a first input in signal communication with a working fluid temperature sensor, the working fluid temperature sensor to provide a temperature measurement of an organic working fluid flow from one or more heat exchangers;
- a first input/output in signal communication with a wellhead fluid valve and a heat exchanger valve, the controller configured to:
- transmit a signal to the heat exchanger valve to cause the heat exchanger valve to open, to allow continuous diversion of the flow of the wellhead fluid to one or more heat exchangers to facilitate transfer of heat from the flow of the wellhead fluid to the organic working fluid through the one or more heat exchangers, thereby to, when the wellhead fluid temperature is greater than or equal to a phase change threshold, change phases of the organic working fluid from a liquid to a vapor within the one or more heat exchangers so as to cause a gas expander of an ORC unit, in fluid communication with the one or more heat exchangers, to rotate a generator to generate electrical power from the ORC operation,
- receive a plurality of intermittent temperature measurements from the first input, and
- in response to the plurality of intermittent temperature measurements of the organic working fluid being less than a phase change threshold for the organic working fluid:
- transmit a signal to the wellhead fluid valve to cause the wellhead fluid valve to open, and
- transmit a signal to the heat exchanger valve to cause the heat exchanger valve to close.