I am trying to PLL my line voltage using STM32G4 in Embed using the build in Sogi-PLL block. I am using ZMPT101 voltage sensor, this is the sense signal going to the ADC
My ADC is running at 10khz to read this 50hz signal.
The orange plot is the ADC output of the sense 50hz signal, I plotted it against a 50hz sine wave. There is a huge mismatch. The output of the ADC is not 50hz. These are the settings that produced this weird result
I have noticed that if i reduce the simulation frequency to 0.5khz then the ADC produces a 50hz signal like it should but it messed up my PLL theta output. I didnt find any answers online so here I am. Please help team