POWER QUALITY IMPROVEMENT USING ACTIVE FILTERS

 

POWER QUALITY IMPROVEMENT USING ACTIVE FILTERS

 

 

ABSTRACT:

Poor quality of electric supply is normally caused by power line disturbances such as transients, notches, momentary interruptions, voltage sag and swell, over-voltage, under-voltages and harmonic distortions. Filters are used for improving the power quality. Active and Passive filters eliminate major fluctuating factors. Hybrid filters are the combination of active and passive filters. Conventional Active Filtering using PLL also reduces the harmonics. Total Harmonic Distortion (THD) can be reduced by implementing combination of active and passive filters. To design a hybrid power filter to reduce the harmonics for enhancing the quality of power.

OBJECTIVE:

The objective of Power Quality Improvement Using Active Filters is to design and develop an efficient and effective active filter system that can mitigate power quality issues such as harmonic distortion, voltage sag, and flicker, thereby improving the overall power quality and reliability of the electrical grid. This is achieved by using advanced control algorithms and power electronic devices to actively filter out distortions and compensate for voltage fluctuations, ensuring a stable and clean power supply to sensitive loads and equipment.

BLOCK DIAGRAM:

WORKING:

  • This paper proposes a single phase grid tied voltage sourced inverter (VSI) based load unbalance compensator (LUC) including its control algorithm, which is a component of a microgrid.
  • The purpose of proposed three-phase four-leg VSI based LUC is to improve power quality of the standalone microgrid. Power quality of the microgrid which was installed in Mara-island, Korea is analyzed using a real operational data.
  • In this work, the microgrid in Mara-island which includes a photovoltaic power generation system, a diesel generator, a battery energy storage system, and a power management system is modeled in PSCAD/EMTDC, and proposed three-phase four-leg VSI based LUC is also modeled and applies to the modeled micro grid. Power flow and stability of the modelled micro grid with the LUC is analyzed under variable irradiance and unbalance loads.
  • The proposed single-phase VSI based LUC and its control algorithm can be effectively utilized to the stand alone micro grid which has large unbalance loads.

 

COMPONENTS LIST:

  • DSPIC30F2010 MICROCONTROLLER.
  • TLP250 ISOLATOR AND DRIVER.
  • POWER SUPPLY.
  • STATCOM INVERTER.
  • MOSFET
  • INDUCTOR.
  • CAPACITOR.
  • DIODE – RECTIFIER.
  • RESISTIVE LOAD.
  • REGULATOR.

 

πŸ“ SAMPLE CODE:

#include <xc.h>

// CONFIGURATION BITS (set according to your hardware)
#pragma config FWDTEN = OFF, ICS = PGx1, GWRP = OFF, GCP = OFF

// Constants
#define PWM_PERIOD 1000 // Adjust for switching frequency
#define ADC_CHANNEL 0 // AN0 for current sensing

// Control parameters
volatile int16_t pwm_duty = 500; // Initial 50% duty
volatile int16_t setpoint_current = 200; // Desired current ref (example)
volatile int16_t measured_current = 0;

volatile int16_t error = 0;
volatile int16_t integral = 0;
#define KP 2
#define KI 1

// Function prototypes
void initPWM(void);
void initADC(void);
void initTimer(void);
void updateControl(void);

void __attribute__((interrupt, no_auto_psv)) _ADC1Interrupt(void)
{
// Read ADC result
measured_current = ADC1BUF0;

IFS0bits.AD1IF = 0; // Clear ADC interrupt flag
}

void __attribute__((interrupt, no_auto_psv)) _T2Interrupt(void)
{
updateControl();
IFS0bits.T2IF = 0; // Clear Timer2 interrupt flag
}

int main(void)
{
// System Initialization
initPWM();
initADC();
initTimer();

// Enable interrupts
IEC0bits.AD1IE = 1;
IEC0bits.T2IE = 1;
__builtin_enable_interrupts();

while (1)
{
// Main loop can handle communications or monitoring
}

return 0;
}

void initPWM(void)
{
// Configure PWM1 module
PTCONbits.PTEN = 0; // Disable PWM module

PWMCON1bits.PMOD1 = 1; // Independent PWM mode
PWMCON1bits.PEN1H = 1; // Enable PWM1H output
PWMCON1bits.PEN1L = 0;

PTPER = PWM_PERIOD; // PWM Period
SEVTCMP = PWM_PERIOD; // Special event trigger compare

// Initial duty cycle
PDC1 = pwm_duty;

// Timer base for PWM (Timer2)
T2CONbits.TON = 0; // Disable Timer2
T2CONbits.TCKPS = 0; // Prescaler 1:1
PR2 = PWM_PERIOD;

// Configure PWM time base
PTCONbits.PTSIDL = 0; // Continue in idle mode
PTCONbits.PTOPS = 0; // PWM time base postscale 1:1
PTCONbits.PTEN = 1; // Enable PWM module

// Start Timer2
T2CONbits.TON = 1;
}

void initADC(void)
{
ADPCFG = 0xFFFE; // AN0 analog, others digital
ADCON1 = 0x00E0; // Internal counter ends sampling and starts conversion
ADCON2 = 0; // Use manual trigger
ADCON3 = 0x1F02; // Sample time 31 Tad, conversion clock select

ADCHSbits.CH0SA = ADC_CHANNEL; // Select AN0

// Configure ADC interrupt
IPC3bits.AD1IP = 5; // Priority 5
IFS0bits.AD1IF = 0;
IEC0bits.AD1IE = 1;

ADCON1bits.ADON = 1; // Enable ADC
}

void initTimer(void)
{
T2CONbits.TON = 0; // Disable Timer2
T2CONbits.TCKPS = 0; // 1:1 prescaler
PR2 = PWM_PERIOD;

IPC1bits.T2IP = 4; // Interrupt priority
IFS0bits.T2IF = 0; // Clear interrupt flag
IEC0bits.T2IE = 1; // Enable interrupt

T2CONbits.TON = 1; // Start Timer2
}

// Control loop called at Timer2 interrupt (PWM frequency)
void updateControl(void)
{
// Read ADC result is updated in ADC ISR
error = setpoint_current – measured_current;

// Integral control with anti-windup
integral += error;
if (integral > 1000) integral = 1000;
if (integral < -1000) integral = -1000;

int16_t control = KP * error + KI * integral;

// Saturate duty cycle
if (control < 0) control = 0;
if (control > PWM_PERIOD) control = PWM_PERIOD;

pwm_duty = control;
PDC1 = pwm_duty;

// Trigger ADC sampling synchronized with PWM
ADCHSbits.CH0SA = ADC_CHANNEL;
ADCON1bits.SAMP = 1; // Start sampling
}

 

βœ… KEY FIXES

1. Accurate Current & Voltage Sensing

  • Use proper isolation and filtering on sensor inputs.

  • Ensure ADC sampling aligns with switching to minimize noise.

  • Implement calibration routines to correct offset and gain errors.

2. DSPIC30F2010 PWM & ADC Synchronization

  • Synchronize ADC sampling with PWM switching cycles to reduce noise and improve signal accuracy.

  • Use hardware triggers for ADC sampling (if available) to sample at precise instants.

3. Gate Driver Interface with TLP250

  • Ensure proper isolation between DSPIC and power stage using TLP250.

  • Use proper gate resistor values to control switching speed and avoid voltage spikes.

  • Verify TLP250 supply voltage and common grounds are correctly designed.

4. Switching Frequency & Dead Time

  • Choose PWM switching frequency balancing filter performance and switching losses.

  • Add appropriate dead-time between complementary PWM outputs to prevent shoot-through.

5. Control Algorithm Stability

  • Implement robust current control algorithms (e.g., PI controllers) with anti-windup.

  • Use filtering for measured signals to avoid controller oscillations.

  • Tune controller parameters carefully for stable operation.

6. Protection and Fault Handling

  • Monitor overcurrent, overvoltage, and overtemperature conditions.

  • Implement fast shutdown via TLP250 input disable or MCU PWM disable.

  • Include watchdog timer to reset MCU on software faults.

7. Power Supply & Decoupling

  • Provide stable, low-noise 5V supply for TLP250 and DSPIC.

  • Use decoupling capacitors close to MCU and gate driver pins.

8. PCB Layout

  • Separate analog and power grounds, connect at a single point.

  • Keep high-current loops as small as possible.

  • Route PWM and gate drive signals away from sensitive analog signals.

9. Software Fixes

  • Use fixed-point or DSP-optimized math libraries for efficient computation.

  • Minimize ISR latency for ADC and PWM interrupts.

  • Implement state machines for different operation modes (start-up, normal, fault).

MERITS:

  1. Reduces power fluctuation.
  2. Increase the Efficiency.
  3. Improves quality of the grid.
  4. Improve the system performance.

DEMERITS:

  1. High upfront costs.
  2. Complexity in design and implementation.
  3. Dependence on advanced control algorithms.
  4. Potential for resonance and instability.
  5. Limited compensation capacity.
  6. Maintenance and replacement requirements.
  7. Potential for electromagnetic interference (EMI).

 

βœ… APPLICATIONS:

  1. Industrial power systems.
  2. Renewable energy systems.
  3. Data centers and IT infrastructure.
  4. Medical facilities and healthcare systems.
  5. Telecommunication systems.
  6. Power grids and transmission systems.
  7. Electric vehicle charging stations.

 

πŸ“ž For More Details & Project Support:

 

Power Integrated Solutions
Networks | Electronics | Home Automation | Water Automation | IoT | PLC | Embedded | DBMS

πŸ“ Location:
10A/3, Radhakrishnan Colony,
Sasthri Road, Tennur,
Tiruchirappalli, Tamil Nadu – 620017


πŸ“ View on Google Maps

πŸ“§ Email:

πŸ“± Phone / WhatsApp:
+91 76393 85448
+91 82488 85959

🌐 Let’s Build the Future with Innovation in Education & Technology!

Skills

Posted on

03/06/2025