2025-01-12 11:05 PM
Hi :
[VERSION]: MCSDK 6.3.1
I have some questions regarding the HSO ADC sampling configuration. I am currently using a custom PCB to validate the HSO algorithm with the STM32G431 chip. ADC1 and ADC2 are used to sample voltage and current separately. The sampling configuration is as follows: ADC1 performs four samples for current U, current W, voltage U, and temperature. ADC2 performs four samples for current V, voltage V, voltage W, and bus voltage. After reading the HSO Start-up document, I noticed that the Ksample delay parameter is affected by the sampling order. I am unsure whether my ADC configuration is correct. If it is correct, my switching frequency is currently 16k. What should the Ksample delay be? Should I modify the ADC1 sampling to current U/V/W/temperature and the ADC2 sampling to voltage U/V/W/bus voltage?
2025-01-13 02:29 AM
Hello propu,
While using HSO, you want all 3 of your current samplings to be done as close to each other as possible, and same thing for voltages. This means your first guess is correct, with two ADCs, sampling should be done the following way :
ADC1 ADC2
Curr 1 Curr 2
Curr 3 Volt 1
Volt 2 Volt 3
VBUS / Temp
Concerning the Ksampledelay, the method is the same for 3-ADC and 2-ADC sampling. Your Ksampledelay is the time between your current and voltage sensing, scaled to duty cycle. Looking at the sampling order, there is roughly 1.32 * ADC sampling time between your currents sampling and your voltages sampling (that value is 1 if you use 3-ADC sampling, 1.32 comes from the mean of the 3 samplings that are not done exactly at the same time). Your Ksampledelay is thus 1.32 * ADC_Sampling_Time * PWM_Frequency.