KWH Motor Calculator | Electrical Engineering & Energy Analysis

The scripts for these exercises can be found in Book 9 - Cloud-Native Platform Engineering: Security, Observability, Scalability, and Microservices

Books 1, 2, 3, 4, 5, 6, 7, 8 and 9 of the "Programming Step by Step and More series" are available for sale on Amazon.

API - Form - Electric Consumption Calculator for Single-Phase and Three-Phase Electric Motors

The electrical work performed by an induction motor - Calculator. Processor Structure

Electric Induction Motors
Parameter/ units Value
Form with two options:
a) Calculator for hourly energy consumption
b) By entering the installed power
Calculate the hourly energy consumed (kWh)
Motor, single or three-phase
Electrical voltage ,volt
Intensity, amp
Power factor, cos f
Motor efficiency, (efm), both for one
Or enter the installed power
Nominal power, kWe_real
Motor efficiency, (efm), both for one
Rectify your data

Output Panel. Processor results: energy and CO2 per hour

The electrical work performed by an induction motor.

Electric Motor Performance
Energy at the terminals (kWe) 0.00 kWh
Energy at the motor shaft (Mechanical) 0.00 kWh
Internal Motor Losses (Heat) 0.00 kWh
Applied Efficiency (efm) 0.00 (0-1)
Primary Energy Chain (Fossil Equivalent)
Total Primary Energy Equivalent 0.00 kWh
System Transformation Losses 0.00 kWh
Transmission Efficiency 0.00 %
Environmental Impact (CO2)
Primary Source Emissions 0.00 kg/h
Emissions attributed to Shaft Power 0.00 kg/h

Technical Overview: KWH Motor API

The Energy-Consump API is a high-precision microservice designed to quantify the electrical performance and environmental footprint of induction motors. By analyzing fundamental electrical parameters—Voltage (V), Intensity (I), and the Power Factor (cos φ)—the API determines the active power developed by a motor.

Mathematical Scope

The system dynamically adapts its calculations based on the motor's phase configuration, employing the following physical principles:

  • Single-phase Systems: P = (V × I × cos φ) / 1000
  • Three-phase Systems: P = (√3 × V × I × cos φ) / 1000

Given equal voltage and current, a three-phase system delivers 73.2% more power (√3) than a single-phase system. Our API captures this physical reality with precision, reflecting not only the increase in work capacity (Shaft Power) but also the proportional impact on carbon footprint and primary energy consumption."

Beyond terminal power, the API evaluates the entire energy chain, from primary fossil fuel equivalence to mechanical work at the shaft, providing a comprehensive "well-to-wheel" energy audit.

Social Utility & Economic Empowerment

In an era of rising energy costs, this API serves as a vital tool for Self-Directed Learning and operational transparency. Its social utility lies in:

  • Cost Democratization: Allowing small-scale industries and individual users to perform energy audits previously reserved for expensive specialized consultancy.
  • Educational Impact: Serving as a bridge for technicians to understand the relationship between electrical consumption and mechanical efficiency.
  • Resource Management: Helping users optimize energy use, leading to direct savings in utility bills.

Environmental Impact & Global Sustainability

Built with a Sustainability-First philosophy, the tool provides:

  • Carbon Footprint Awareness: It converts abstract kilowatt-hours into tangible kg/h of CO2, making the environmental cost of inefficiency visible.
  • Mitigation through Efficiency: Encouraging the adoption of high-efficiency motors (IE3/IE4 standards) to reduce greenhouse gas emissions.
  • Support for Energy Transition: Identifying systems where fossil-fuel-based electricity can be replaced by cleaner alternatives.