Advertisement
Advanced Time: 5–7 weeks Electrical Engineering

Online UPS System Design

Design a 1kVA online double-conversion UPS with SPWM inverter, battery charger, and bypass relay.

UPSInverterBatteryRectifierSinusoidal PWMPower Electronics
DifficultyAdvanced
Duration5–7 weeks
Components10 items
Steps8 steps

Introduction

Design a 1kVA online double-conversion UPS with SPWM inverter, battery charger, and bypass relay. This comprehensive guide covers everything from design through implementation, testing, and deployment.

Theory & Background

An online double-conversion UPS converts AC to DC (rectifier stage) then DC back to AC (inverter stage). Mains power always flows through this conversion chain — the battery is always connected in parallel and charges when mains is present. On mains failure, the battery instantly supplies the inverter with no transfer time. The output is always clean, regulated sine wave regardless of input quality.

Advertisement

Components & Requirements

10 components required for this project.

#ComponentPurposeQty
1IGBT Module (600V/30A, H-Bridge)Full-bridge inverter switchingx1
2IR2110 Gate Driver ICsHigh-side and low-side IGBT drivingx4
3DSP Controller (TMS320F28027)SPWM generation and controlx1
412V 100Ah VRLA Battery48V battery bank (4S)x4
5PFC Rectifier Module (1kW)AC to DC conversion with power factor correctionx1
6LC Output Filter (1mH, 10µF)Filtering SPWM to clean sine wavex1
7Current/Voltage Sensors (LEM HAL)Closed-loop control feedbackx4
8Toroidal Transformer (48V:230V isolation)Output galvanic isolation (offline mode)x1
9Static Bypass Relay (40A SPST)Fast bypass on inverter faultx1
10Cooling System (240mm PWM Fan + Heatsink)IGBT thermal managementx1

Step-by-Step Implementation

Follow these 8 steps carefully.

1
Understanding Double-Conversion UPS Topology

An online double-conversion UPS converts AC to DC (rectifier stage) then DC back to AC (inverter stage). Mains power always flows through this conversion chain — the battery is always connected in parallel and charges when mains is present. On mains failure, the battery instantly supplies the inverter with no transfer time. The output is always clean, regulated sine wave regardless of input quality.

2
Sinusoidal PWM Generation

SPWM generates a pure sine wave by rapidly switching IGBTs at a carrier frequency (typically 20kHz) with a duty cycle modulated by a reference sine wave at 50Hz. The modulation index M = V_peak_reference / V_peak_carrier determines output voltage amplitude. The LC filter removes the high-frequency switching components, leaving a pure 50Hz sine wave. DSP-based SPWM achieves THD < 3% — suitable for sensitive electronics.

3
Battery Charger Design

Implement a 3-stage charger: Bulk (constant current at 0.1C rate, e.g., 10A for 100Ah battery until 56.8V for 48V LiFePO4 bank), Absorption (constant voltage at 54.4V until current drops below 0.05C), Float (53.6V constant voltage for maintenance). Monitor individual cell voltages using a BMS chip (BQ76940) for cell balancing and protection.

4
Closed-Loop Voltage Control

Implement a PI (Proportional-Integral) controller in the DSP for output voltage regulation. Sample output voltage at 40kHz. Error = V_reference - V_measured. Controller output modifies SPWM modulation index. Tune P and I gains using the Ziegler-Nichols method for step response. Target: output voltage regulation within ±1% for load changes from 0% to 100% rated load.

5
Bypass and Transfer Logic

On inverter fault (IGBT overcurrent, overtemperature, DSP watchdog), the static bypass relay switches the load directly to mains within 5ms. Synchronize the inverter output to mains before transferring to allow synchronized bypass switching, preventing voltage glitch. Monitor inverter output quality continuously — trip to bypass if output THD > 8% or voltage deviation > ±5% for more than 200ms.

6
Battery State Monitoring

Implement battery SOC estimation using voltage, current integration (Coulomb counting), and temperature correction. SOC = SOC_0 + integral(I × dt) / Capacity_Ah. Calibrate SOC to 100% when charger current drops below 0.5A (full charge). Calculate runtime estimate: Runtime_min = (SOC/100 × Capacity_Ah × 48V) / Load_Watts × 60. Display on front panel LCD.

7
Thermal Management

Mount IGBTs on a 0.5°C/W heatsink with thermal paste (Arctic Silver 5). IGBT junction temperature limit is typically 150°C. For 1kW output at 95% efficiency, losses = 50W — mostly in IGBTs. Control cooling fan via PWM based on IGBT case temperature (NTC thermistor). If temperature exceeds 80°C, trigger overtemperature alarm and reduce load capacity. If >90°C, trip to bypass and alert.

8
Testing and Commissioning

Test SPWM waveform with oscilloscope before connecting to load — verify 230V RMS, 50Hz ±0.5Hz, THD < 3%. Connect resistive load (1000W heater): measure regulation and efficiency. Test battery runtime with 500W load (should give >30 minutes on 48V/100Ah bank). Simulate mains failure: verify zero transfer time to battery, load is uninterrupted. Test bypass relay with forced inverter fault.

Code & Implementation

Core code for spwm_controller.cpp:

spwm_controller.cpp C/C++
// DSP SPWM Generation (TMS320F28027 style pseudocode)   #include <DueTimer.h>  #define CARRIER_FREQ 20000   #define SINE_STEPS   400       const uint8_t sineTable[SINE_STEPS] = {  };  volatile int sineIndex = 0; float modulationIndex = 0.9;  float targetVoltage = 230.0; float measuredVoltage = 0; float integralError = 0;   void ISR_20kHz() {      measuredVoltage = analogRead(A0) * (330.0 / 1023.0);    float error = targetVoltage - measuredVoltage;   integralError += error * 0.00005;    integralError = constrain(integralError, -0.3, 0.3);   modulationIndex = constrain(0.9 + (error * 0.002) + integralError, 0.0, 1.0);       uint8_t sineVal = sineTable[sineIndex];   uint8_t duty = (uint8_t)(sineVal * modulationIndex);       analogWrite(6, duty);            analogWrite(7, 255 - duty);      analogWrite(8, 255 - duty);      analogWrite(9, duty);             sineIndex = (sineIndex + 1) % SINE_STEPS; }  void setup() {   Timer1.attachInterrupt(ISR_20kHz).setFrequency(20000).start(); }  void loop() {      delay(1000); }

Testing & Troubleshooting

Test Online UPS System Design by verifying each subsystem individually before full integration.

!
Troubleshooting Tips

Verify power voltages, check ground connections, use serial monitor for debug.

Real-World Applications

*Server room and data center protection
*Medical ICU and surgery equipment
*Telecommunications equipment
*Industrial control system protection
*Broadcasting and studio equipment
*Financial trading terminal backup
*Laboratory precision instruments
*Home theater and audio equipment

Extensions & Next Steps

  • Add a lithium iron phosphate battery bank for higher energy density and longer cycle life
  • Implement parallel redundant UPS (N+1 configuration) for critical loads
  • Add network management card (SNMP) for remote monitoring via IT systems
  • Implement eco-mode for improved efficiency when grid quality is good
  • Add a static transfer switch for dual-input redundancy

Interactive Playground

Coming Soon

An interactive simulator will be available here — simulate circuits and run code in-browser without hardware.

Frequently Asked Questions

What is the difference between Online, Line-Interactive, and Offline UPS?
Offline (standby) UPS: loads run directly on mains, inverter only activates on mains failure — transfer time 5–25ms. Line-interactive UPS: adds voltage regulation via autotransformer tap switching, reducing battery use. Online (double-conversion) UPS: loads always run from inverter — zero transfer time, perfectly clean output, but slightly lower efficiency (92–96%). Online UPS is essential for servers, medical equipment, and precision instruments.
What is THD and why does it matter?
Total Harmonic Distortion (THD) measures how much a waveform deviates from a pure sine wave, expressed as a percentage. A pure sine is 0% THD. Cheap UPS inverters produce quasi-square or stepped waveforms with THD 20–40%. High THD causes: motor overheating, transformer hum, computer power supply inefficiency, and can cause equipment malfunction. Online UPS with SPWM achieves < 3% THD, suitable for all equipment types.
How do I calculate what size UPS I need?
Add up all connected load wattages. Multiply by 1.25 (25% safety margin). Convert to VA: VA = W / Power Factor (assume PF=0.8 for mixed loads). For example: 1 server (300W) + 2 monitors (50W each) + network switch (30W) = 430W. VA = 430/0.8 = 537VA. Choose next standard size: 650VA or 1000VA. For battery runtime, determine required minutes and calculate: Battery_Ah = (Load_W × Runtime_h) / (Battery_V × efficiency).
Why does the UPS make a humming sound?
Humming can come from: (1) Transformer magnetostriction — iron core vibrates at twice the frequency (100Hz) due to alternating magnetic flux. Use toroidal transformers which have 10× less hum than E-I types. (2) Fan bearing noise — replace fans every 3 years. (3) Battery off-gassing during charging — ensure ventilation. (4) IGBT switching noise coupling into chassis — improve PCB layout and add EMI filters.
How often should UPS batteries be replaced?
VRLA (sealed lead-acid) batteries in UPS systems typically last 3–5 years when operated at 20–25°C. High temperatures dramatically reduce life — each 10°C increase above 20°C halves battery life. Test battery capacity annually using a discharge test under controlled conditions. Replace when capacity falls below 80% of rated or when float charge current stays unexpectedly high. Always replace all batteries in a bank simultaneously.
Advertisement