Active Power Factor Correction

Thread Starter


Joined Nov 23, 2021
Hello one and all!

I have been tasked to design and implement a APFC system using a boost converter. The circuit design is as follows:
Open Loop Boost Converter.png

I have decided to implement the system using a STM32-nucleo-f303re. Now for APFC algorithm itself I have decided to go with an Average Current Mode implementation to control the inductor current. Therefore, I have decided to implement 2 voltage sensors (one on the input and another on the output) and a current sensor before the inductor. Initially I had large problems when it came to the physical tuning of the system in code, due to the fact that I had a very messy and noisy signal to track. As can be seen in the following pictures.
The following picture is the Inductor current (blue) w.r.t current sensor (yellow)Inductor current wrt current sensor.png

The following picture is the full wave rectified signal (blue) w.r.t input voltage sensor (yellow)
Full-wave rectified w.r.t input voltage sensor.png

As i tried to read these noisy signals in the ADC of my micro-controller, I could not get a stable enough reading to tune the sensors w.r.t to the mean voltage and current. I then decided to apply digital filter technique that made use of a weighted average filter (that averaged out 200 samples) and a low-pass filter (cut-off frequency of 150Hz). This was able to get my ADC values stable enough for tuning with only about a 1V difference from the actual measured signal. Now that I have successfully tuned my sensors to be able to sense the actual mean voltage and current signal, I seem to have a slight confusion. Now for an APFC system to work the inductor current would be required to emulate a scaled down version of the input rectified signal, in other words the inductor current would need to copy the shape of a scaled down full-wave rectified signal. So my question to my fellow competent engineers is, is there a way to digitally verify if the shape of the input voltage sensor matches that of the full-wave rectified signal and if the input current sensor matches that of the waveform as shown above? Your help in this matter will be highly appreciated.


Joined May 16, 2022
Hello, you do not state what your sensors are ?
It seems strange to me that the proportion of noise on the sensor output massively exceeds that on it's input!
Also the noise appears to be impulse in nature so you would be better to use an impulse noise type filter rather than an average filter that may introduce excessive delays.
Something I have also found useful is to use a DAC to reproduce what the micro is actually seeing as sometimes the results can be quite surprising :)