Algorithm
To encode a signal $x_m$ in a carrier with frequency $f_c$, we proceed as:
$$ y(t) = \cos(\phi(t)), \\ \phi(t) = 2\pi \cdot \left(f_c t + f_\Delta \int_0^t x_m(\tau)d\tau \right) $$
where $f_\Delta$ controls the maximum deviation of $y$'s instantaneous frequency from $f_c$ (effectively its bandwidth, but not in strict Fourier sense).
Discrete-time implementation is as follows:
- Integrate via cumulative sum
- Ensure $t$ is sampled properly per sampling frequency, i.e. $f_s = 1 / (t[1] - t[0])$. In Python this means
linspace(t_min, t_max, N / (t_max - t_min), endpoint=False)
- Ensure $\phi(t)$ does not exceed $\pi$, adjusting $f_\Delta$ as necessary
- Ensure $f_c \leq f_s/2 - f_\Delta$, where $f_s$ is sampling frequency.
Applied example
Doing all of the above for the first 1 second of OP's attached data yields below, which is validated with direct inspection, and using synchrosqueezed CWT with an extremely time-localized wavelet:
Zooming (note, CWT is logscale, so lower partit appears "stretched"):
Zooming even more, and showing the result:
Code
Available at Github.