Field fix / guideDesign DocumentVendor-agnostic (IEC 61131-3)BMSindustrial-automation

Energy Monitoring and Sub-Metering — Control Design

Shared by TSIMEREZIVO Team · 4 Oct 2026 · 33 views

# BMS Template: Energy Monitoring and Sub-Metering ## 1. Overview **Purpose:** BMS-integrated energy monitoring, sub-metering, and automated demand response for commercial and industrial facilities. Covers kWh/kVArh metering, power quality monitoring, tenant sub-metering, peak demand management, and ISO 50001 KPI dashboards. **Industry Standards:** - ISO 50001:2018 (Energy Management Systems) - IEC 61968-9 (Smart Metering Interface — Meter Reading and Control) - IEC 62053-11/21 (Electricity Metering — Accuracy Class 1 / 0.5S) - ASHRAE 90.1 (Building Energy Performance Baseline) - IEEE 519 (Harmonic Control in Electrical Power Systems) - M&V Protocol: IPMVP Option C (Whole Building Metering) **Critical Constraints:** - **Meter accuracy:** Revenue-grade meters minimum Class 1 (IEC 62053-11); sub-meters minimum Class 2 - **CT burden:** Current transformer burden must not exceed 5 VA at 5A secondary - **Anti-tamper:** Revenue meters must have sealed enclosures and audit logs - **Demand window:** Peak demand calculated over 15-minute sliding window (utility billing standard) - **Power factor penalty:** PF < 0.92 typically triggers utility penalty (verify tariff) - **Data retention:** Energy data logged at 15-minute intervals; retained 24 months minimum - **Harmonics:** THD_V ≤ 5% per IEEE 519 at point of common coupling - **Load shedding:** Maximum 15-minute load shedding response for demand response programs **Relevant Physics:** - Active power: **P = V × I × cos(φ)** [W] - Reactive power: **Q = V × I × sin(φ)** [VAr] - Apparent power: **S = V × I = √(P² + Q²)** [VA] - Power factor: **PF = P/S = cos(φ)** (0–1; lagging = inductive load) - Energy: **E = P × t** [Wh or kWh] - Specific energy intensity: **SEI = Total_kWh / Production_Units** [kWh/unit] - EUI (Energy Use Intensity): **EUI = Total_kBtu / Floor_Area_sqft** [kBtu/ft²/yr] --- ## 2. Monitoring Architecture ``` Utility Meter (Revenue Grade — IEC 62053-21 Class 0.5S) └─ Main Distribution Board (MDB) ├─ Sub-Meter 1: HVAC (AHU, Chillers, Cooling Towers) ├─ Sub-Meter 2: Lighting Circuits (tenant A) ├─ Sub-Meter 3: Office Power (tenant B) ├─ Sub-Meter 4: Process Equipment (manufacturing) ├─ Sub-Meter 5: IT/Data Centre UPS └─ Sub-Meter 6: EV Charging Infrastructure BMS Data Collection: - Modbus TCP/RTU polling at 5-minute intervals (meters support 15-s measurement) - BACnet MS/TP for building meters - DLMS/COSEM for utility-grade meters (IEC 62056) - Time-series data stored in PostgreSQL (TSIMEREZIVO database) KPI Dashboard (updated every 15 min): - Live kW by sub-meter - 15-min demand peak tracking - Daily / monthly kWh vs baseline - Power factor trend - Carbon intensity (kg CO₂/kWh × metered kWh) - Normalized EUI (weather-corrected) ``` --- ## 3. Control Logic ```pascal { === ENERGY MONITORING AND DEMAND MANAGEMENT === } { ISO 50001 compliant sub-metering with peak demand control } { Executes every 60 seconds for demand calculation; 5 min for KPIs } PROGRAM Energy_Monitor CONSTANTS DEMAND_WINDOW_MIN = 15 { min — utility billing demand window } DEMAND_TARGET_KW = 850.0 { kW — contracted demand limit } DEMAND_SHED_KW = 900.0 { kW — shed non-critical loads if exceeded } DEMAND_RESTORE_KW = 820.0 { kW — restore loads when below this } PF_PENALTY_LIMIT = 0.92 { — power factor alarm threshold } THD_VOLTAGE_MAX = 5.0 { % — IEEE 519 voltage THD limit } THD_CURRENT_MAX = 8.0 { % — IEEE 519 current THD limit } TARIFF_PEAK_HRS_ST = 8 { h — peak tariff start (08:00) } TARIFF_PEAK_HRS_END = 22 { h — peak tariff end (22:00) } CARBON_INTENSITY = 0.233 { kg CO₂/kWh — grid emission factor (location-specific) } VARIABLES { Inputs — from Modbus/BACnet meters } main_kw : REAL { kW — total facility active power } main_kvar : REAL { kVAr — reactive power } main_kva : REAL { kVA — apparent power } main_pf : REAL { — power factor } main_kwh_total : REAL { kWh — cumulative meter reading } main_thd_v : REAL { % — voltage total harmonic distortion } main_thd_i : REAL { % — current THD } sm1_hvac_kw : REAL { kW — HVAC sub-meter } sm2_lights_kw : REAL { kW — lighting sub-meter } sm3_office_kw : REAL { kW — office power sub-meter } sm4_process_kw : REAL { kW — process equipment sub-meter } sm5_it_kw : REAL { kW — IT/UPS sub-meter } sm6_ev_kw : REAL { kW — EV charging sub-meter } hour_of_day : INT { 0–23 — from RTC } production_units : REAL { count — production output for SEI calc } { Outputs — Demand Response Load Shedding } shed_non_crit_hvac : BOOL { Shed non-critical AHU zones } shed_ev_charging : BOOL { Defer EV charging } shed_lights_dimming : REAL { % — reduce lighting to this level } alarm_demand_high : BOOL alarm_pf_low : BOOL alarm_thd_v_high : BOOL alarm_thd_i_high : BOOL { Internals } demand_window_kwh : ARRAY[1..15] OF REAL { kWh per minute over 15 min } demand_idx : INT := 1 demand_15min_kw : REAL daily_kwh : REAL monthly_kwh : REAL kwh_at_day_start : REAL kwh_at_month_start : REAL carbon_kg : REAL { kg CO₂ today } sei_kwh_unit : REAL { kWh per production unit } is_peak_tariff : BOOL { TRUE during peak tariff hours } demand_shed_active : BOOL BEGIN { --- Tariff Period --- } is_peak_tariff := hour_of_day >= TARIFF_PEAK_HRS_ST AND hour_of_day < TARIFF_PEAK_HRS_END { --- 15-Minute Sliding Demand Window --- } { Log kW reading each minute; average last 15 samples } demand_window_kwh[demand_idx] := main_kw demand_idx := demand_idx MOD 15 + 1 demand_15min_kw := 0.0 FOR i := 1 TO 15 DO demand_15min_kw := demand_15min_kw + demand_window_kwh[i] END_FOR demand_15min_kw := demand_15min_kw / 15.0 { --- Energy Accumulation (delta from meter reading) --- } daily_kwh := main_kwh_total - kwh_at_day_start monthly_kwh := main_kwh_total - kwh_at_month_start { --- Carbon Footprint --- } carbon_kg := daily_kwh * CARBON_INTENSITY { --- Specific Energy Intensity --- } IF production_units > 0.0 THEN sei_kwh_unit := daily_kwh / production_units END_IF { --- Alarms --- } alarm_demand_high := demand_15min_kw > DEMAND_TARGET_KW alarm_pf_low := main_pf < PF_PENALTY_LIMIT AND main_kw > 50.0 alarm_thd_v_high := main_thd_v > THD_VOLTAGE_MAX alarm_thd_i_high := main_thd_i > THD_CURRENT_MAX { --- Demand Response (Automated Demand Shedding) --- } IF demand_15min_kw > DEMAND_SHED_KW AND NOT demand_shed_active THEN demand_shed_active := TRUE { Priority 1: Defer EV charging (no impact on comfort) } shed_ev_charging := TRUE { Priority 2: Reduce lighting to 80% in non-occupied zones } shed_lights_dimming := 80.0 { Priority 3: If still high, shed non-critical HVAC zones } IF demand_15min_kw > DEMAND_SHED_KW + 50.0 THEN shed_non_crit_hvac := TRUE END_IF ELSIF demand_15min_kw < DEMAND_RESTORE_KW AND demand_shed_active THEN { Restore loads — staggered to avoid demand spike } shed_non_crit_hvac := FALSE { Restore lights and EV after 5 min delay (handled by timers in real impl) } END_IF END_PROGRAM ``` --- ## 4. Tag List (ISA-5.1 Naming) | Tag Name | Description | Type | EGU | Lo | Hi | |---|---|---|---|---|---| | `EM_MAIN_KW_PV` | Total facility active power | REAL | kW | 0 | 1500 | | `EM_MAIN_KVAR_PV` | Total reactive power | REAL | kVAr | -500 | 500 | | `EM_MAIN_PF_PV` | Power factor | REAL | — | 0.5 | 1.0 | | `EM_MAIN_KWH_PV` | Cumulative energy (meter) | REAL | kWh | 0 | 9999999 | | `EM_MAIN_THD_V_PV` | Voltage THD | REAL | % | 0 | 20 | | `EM_MAIN_THD_I_PV` | Current THD | REAL | % | 0 | 50 | | `EM_DEMAND_15M_PV` | 15-min sliding demand | REAL | kW | 0 | 1500 | | `EM_HVAC_KW_PV` | HVAC sub-meter | REAL | kW | 0 | 600 | | `EM_LIGHTS_KW_PV` | Lighting sub-meter | REAL | kW | 0 | 200 | | `EM_PROCESS_KW_PV` | Process equipment sub-meter | REAL | kW | 0 | 800 | | `EM_IT_KW_PV` | IT/UPS sub-meter | REAL | kW | 0 | 150 | | `EM_EV_KW_PV` | EV charging sub-meter | REAL | kW | 0 | 200 | | `EM_DAILY_KWH` | Daily energy consumption | REAL | kWh | 0 | 20000 | | `EM_MONTHLY_KWH` | Monthly energy consumption | REAL | kWh | 0 | 500000 | | `EM_CARBON_KG` | Daily carbon footprint | REAL | kg CO₂ | 0 | 5000 | | `EM_SEI_KWH_UNIT` | Specific energy intensity | REAL | kWh/unit | 0 | 100 | | `EM_SHED_EV_CMD` | EV charging shed command | BOOL | — | — | — | | `EM_SHED_HVAC_CMD` | Non-critical HVAC shed | BOOL | — | — | — | | `EM_LIGHTS_DIM_CV` | Lighting dimming level | REAL | % | 0 | 100 | | `EM_TARIFF_PEAK` | Peak tariff period active | BOOL | — | — | — | --- ## 5. Alarm Configuration | Alarm | Priority | Setpoint | Action | |---|---|---|---| | `EM_DEMAND_HIGH_ALM` | High | >850 kW (15-min avg) | Activate demand response | | `EM_DEMAND_SHED_ALM` | High | >900 kW | Auto shed loads; notify facilities | | `EM_PF_LOW_ALM` | Medium | PF < 0.92 | Check capacitor banks; notify electrical | | `EM_THD_V_ALM` | High | THD_V > 5% | Investigate harmonic source; notify utility | | `EM_THD_I_ALM` | Medium | THD_I > 8% | VFD filter check; ballast audit | | `EM_METER_FAULT_ALM` | High | Communication fault | Manual reading; maintenance | | `EM_DAILY_BUDGET_ALM` | Low | Daily kWh > budget | Management notification | --- ## 6. ISO 50001 KPI Summary | KPI | Formula | Target | Review Frequency | |---|---|---|---| | Energy Use Intensity (EUI) | Total kWh / Floor area | <150 kWh/m²/yr | Monthly | | Peak Demand | 15-min max kW | <850 kW | Daily | | Power Factor | P/S | >0.95 | Weekly | | Specific Energy Intensity | kWh / Production unit | <2.5 kWh/unit | Weekly | | Carbon Intensity | kg CO₂ / m² | <35 kg/m²/yr | Monthly | | Baseline Variance | Current vs baseline | <±5% | Monthly |

More like this

Rate, comment, and get full access

Members can download files, rate contributions, and discuss fixes with the engineers who posted them — free.

Join the library