Timeline for Problems with PSS phase offset calculation algorithm
Current License: CC BY-SA 4.0
20 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 27, 2022 at 20:16 | comment | added | Dan Boschen | But I think we’re beyond what I would be able to debug here - sorry I don’t have an obvious answer for you | |
Apr 27, 2022 at 20:15 | comment | added | Dan Boschen | I don’t understand the splitting the correlated result at all since it is only these samples near the peak that are usable - are you sure it isn’t decimating the signal prior to correlation? Can you test with a larger frequency offset as your phase result to see right now is very small. | |
Apr 27, 2022 at 19:30 | comment | added | Tania Guillot | Hi Dan, i zoomed in and there arent many samples (only 7 between the zeros) as you can see in the image i posted. So i calculated the yprop of samples 1-3 and 5-7 skipping the actual peak, and the angle between these two vectors is 1.0607º. Does this mean i can't do the 4 part splitting because there aren't enough samples? Do you think this answer is correct by splitting just into two parts? | |
Apr 27, 2022 at 17:11 | comment | added | Dan Boschen | You should have several samples that are all within the peak assuming your waveform is oversampled (as it would need to be to detect a frequency error). Make the complex plot of the whole thing and see if it looks like my plots - then you can zoom in and make sense of the relationship of phase in the result with frequency offset (and how the adjacent samples are the correlation with a small delay offset) | |
Apr 27, 2022 at 17:04 | comment | added | Tania Guillot | Ah!!! Okay, so i should get a window of samples that include the first two zeros next to the peak? | |
Apr 27, 2022 at 15:30 | comment | added | Dan Boschen | @TaniaGuillot I think there is an interpretation error for the formula used - don't understand splitting the correlation result $y[n]$ into 4 parts; the only samples that give information about the angle will be in the peak of the correlation, if you split it into 4 parts, only one of those parts has the peak. Plot $y[n]$ on a complex plane as I have and you will see how the angle, and the quadrature result of the samples within close vicinity to the correlation peak specifically, contain the information about the frequency offset. Your result should look like my plot. | |
Apr 27, 2022 at 14:02 | comment | added | Tania Guillot | Hello! I updated the question with the results, there is an issue with the e factor not working to estimate the angle. Splitting y(n) into 4 parts, the vectors doesn't seem to give information about the angle... | |
Apr 21, 2022 at 15:24 | history | edited | Dan Boschen | CC BY-SA 4.0 |
added 620 characters in body
|
Apr 21, 2022 at 15:12 | history | edited | Dan Boschen | CC BY-SA 4.0 |
added 620 characters in body
|
Apr 21, 2022 at 15:03 | history | edited | Dan Boschen | CC BY-SA 4.0 |
added 415 characters in body
|
Apr 21, 2022 at 14:38 | history | edited | Dan Boschen | CC BY-SA 4.0 |
added 587 characters in body
|
Apr 21, 2022 at 10:39 | comment | added | Tania Guillot | Let us continue this discussion in chat. | |
Apr 21, 2022 at 10:16 | history | edited | Dan Boschen | CC BY-SA 4.0 |
added 290 characters in body
|
Apr 21, 2022 at 9:55 | comment | added | Tania Guillot | Hi Dan, i tried implementing what you suggested and updated the question with the results. Seems like I have a conceptual misunderstanding though. | |
Apr 20, 2022 at 22:52 | comment | added | Dan Boschen | Great! Glad it helped. Also I ultimately find it a lot easier to not think of frequency tones as sinusoids but instead as complex phasors given by $e^{j\omega t}$. Certainly the idea of a complex conjugate product to determine phase will not work directly with a sinusoid but works with a complex phasor (and note from Euler's formula how a sinusoid is composed of two such phasors: $(e^{j\omega t} + e^{-j\omega t})/2$. Note that the form $e^{j \theta}$ is simply a complex phasor with magnitude 1 and angle $\theta$. Frequency is then like a bicycle wheel spinning and can be positive or neg. | |
Apr 20, 2022 at 22:51 | comment | added | Tania Guillot | Awesome thank you so much! I'm going to try it out and update as soon as I can | |
Apr 20, 2022 at 22:43 | comment | added | Dan Boschen | The denominator then is just dividing by time while converting the phase/time from the phase in radians that you measure (and confirmed matches your expectation) into frequency using the units you prefer (radians/sec, cycles/sec, or normalized frequency as cycles/sample etc). You can use whatever scaling is convenient to you. | |
Apr 20, 2022 at 22:41 | comment | added | Dan Boschen | Determine the time difference between your averaging intervals, and then for your given frequency offset, how much the phase would be expected to rotate over that time interval (using radian frequency in radians/sec so $2\pi f$.) Make sure this is resolvable (less than $\pi$ radians) otherwise the frequency offset is too large for the acquisition range and you need to then reduce the time span, meaning number of samples in the average). Once you do that confirm you are getting the angle as expected with the numerator processing alone. | |
Apr 20, 2022 at 22:23 | comment | added | Tania Guillot | Thank you! This makes sense. Considering the offest frequency fo, for example sin(2pi(f+fo)t)=sin(2·pi·f·t +2·pi·fo·t) so the phase shift is equivalent to 2·pi·t·fo. Since its in digital domain 2·pi·fo·Nsamples·Ts. I am struggling to see how to convert this e factor to the fo (they don't seem do be the same value in test I've run). | |
Apr 20, 2022 at 20:00 | history | answered | Dan Boschen | CC BY-SA 4.0 |