How can I compute the phase shift?

51 Views Asked by At

I have a periodic function $f(t)=f(t+T)$, its period is $T>0$.

$t$ and $f(t)$ are in $\mathbb{R}$.

$f$ is unknown apart from $N$ values of $f$, namely $f(t_1)$, $f(t_2)$, $\cdots$, $f(t_N)$ and $t_i=i\frac{T}{N}$.

Then I have $g(t)=f(t-\varphi)$ and $\varphi$ is in $\mathbb{R}$.

Giving the $N$ known values of $g$, namely $g(t_1)$, $g(t_2)$, $\cdots$, $g(t_N)$ and $t_i=i\frac{T}{N}$, is it possible to compute $\varphi$?

In the following figure $\varphi=\frac{\pi}{3}$.

enter image description here

1

There are 1 best solutions below

2
On

I randomly guessed this and confirmed on Desmos, but I don't completely understand the intuition behind it. Something to do with the idea with the functions matching up.

Either evaluate, or using a Riemann sum with your values, find the value of $a$ such that $\displaystyle \int_0^{T}f(t+a)g(t)\,dt$ is maximized. Then $a=\varphi$.