Skip to content

COP calculation with primary/secondary current #156

@dandjo

Description

@dandjo

Hi Altherma Fans.

So far I have calculated the power of the compressor and the COP using "INV Primary Current" and the voltage of my grid. However, this results in large fluctuations and apparently time-shifted data. If I divide the current of the pulsed 3-phase output signal "INV Secondary Current" by 3 and multiply it by the voltage "Voltage (N-phase)", I get much more plausible values for the power of the compressor and ultimately for the COP. Additionally I consider the power factor at lower currents. I packed this data into a function based on some measurement data from my smart meter. Here is the result of the compressor power calculation (openHAB ECMAScript).

var current = parseFloat(itemRegistry.getItem('espaltherma_compressor_secondary_current').state);
var voltage = parseFloat(itemRegistry.getItem('espaltherma_compressor_voltage_n_phase').state);
var emergency = itemRegistry.getItem('espaltherma_emergency_active').state;

current = current / 3;  // 3-phase sum

var power = 0;

if (current > 0 && voltage > 0 && emergency === OFF) {
  var power_factor = 0.752385 * Math.pow(current, 0.11962) - 0.00141164;
  power_factor = power_factor > 1 ? 1 : power_factor;
  
  power = current * voltage * power_factor;
  power = Math.round(power * 100) / 100;
}

events.sendCommand('espaltherma_compressor_secondary_power', power);

The heating power is calculated as follows (openHAB ECMAScript).

var power = 0;

var operation_mode = itemRegistry.getItem('espaltherma_operation_mode').state.toString();
var defrost_operation = itemRegistry.getItem('espaltherma_defrost_operaton').state;

if (operation_mode === 'Heating' && defrost_operation === OFF) {
  var flow = parseFloat(itemRegistry.getItem('espaltherma_flow_sensor').state);
  var lw_temp = parseFloat(itemRegistry.getItem('espaltherma_leaving_water_temp_before_buh').state);
  var iw_temp = parseFloat(itemRegistry.getItem('espaltherma_inlet_water_temp').state);

  var diff_temp = lw_temp - iw_temp;
  
  var water_density = 0.993;  // for approx 35°C

  var convert_flow = 60 * water_density; // converts l/min to kg/h for water
  var thermal_capacity = 1.1626; // of water in Wh/(kg•K)

  power = flow * convert_flow * thermal_capacity * diff_temp;
  power = Math.round(power * 100) / 100;
}

events.sendCommand('espaltherma_heating_power', power);

These are my graphs of the measured data (Grafana from InfluxDB).

image
image

What do you think? Would appreciate a discussion about it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions