This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

UCD3138PFCEVM-026: UCD3138PFCEVM-026

Part Number: UCD3138PFCEVM-026

Hello expert What is the function of AC Drop Detection below? And when the input voltage is at the zero-crossing point, when the input current produces a large THD, how is the program solved in this project? Looking forward to your reply!

inline void check_ac_drop(void) 
{ 
 if(iv.vin_filtered > AC_DROP_V_RECT_THRESHOLD) 
{ 
  iv.ac_drop_count = 0; 
} 
else 
{ 
  iv.ac_drop_count++; 
  if(iv.ac_drop_count > AC_DROP_COUNT_MAX) 
  { 
 iv.ac_drop = 1; 
iv.ac_drop_recovery_not_complete = 1; 
iv.vin_squared_for_ac_drop = 0; //clear for ac recovery detection 
MiscAnalogRegs.GLBIOVAL.bit.DPWM3B_IO_VALUE = 0; 

  } 
} 
 
if(iv.vin_squared_for_ac_drop > AC_UNDROPPED_THRESHOLD)  

{  
  iv.ac_drop = 0; 
  MiscAnalogRegs.GLBIOVAL.bit.DPWM3B_IO_VALUE = 1; 
 
} 
} 

  • The AC drop detection is to detect AC drop.  This specific illustration is to describe how the threshold is calculated to still respond fast enough in the worst case situation.  

    The AC drop uses input voltage rather than current, so the THD doesn't have any effect on the measurement.  

  • Hello expert
    I still don’t know what is the use of this AC drop Detection ? Isn't there a time when the voltage is lower than 85V in every cycle? Test once every 100us, if more than 10 times, a voltage drop signal will be sent. After the voltage drop signal is sent, the program makes DPWM3B_IO_VALUE=0. What is the function and significance of this AC drop Detection?

  • in the example the voltage is dropping down to zero, and we set the threshold accordingly.  The threshold is set so that at an RMS voltage of 85 volts, the voltage will never stay below the threshold for 10 samples.  So we look at the worst case, where the zero crossing is in the middle of the sampling interval, and set the threshold that way.  That's what the illustration you show illustrates.