Help with denoising signal and periodogram analysis resources This is a cross posting from the crossvalidated stack exchange as I thought this may be a better forum to ask.
I have a dataset consisting of respiratory time series signals of different lengths obtained from different groups of patients. I want to either classify or cluster the patients using these timeseries by using the commonalities of the time series of each group. However, I have no experience in dsp.

Firstly, I am confused if I am supposed to filter my signals to get rid of any frequencies above the Nyquist frequency. My sampling frequency is 32Hz and my time series is somewhat noisy and has some artifacts. I am also unsure of which filter to select for this.

Secondly, I wanted to look at the periodogram and the average power spectral density at each frequency within a group - but I am not sure if I understand the periodogram very well - if I have different time series lengths then my periodogram length will vary too, so I am not sure how this comparison can be made.


Being from Pure Math, I know Fourier analysis purely from the perspective of functions and using Fourier transforms to obtain the coefficients that describe the projection of these functions onto an orthonormal system. With periodograms however, I noticed that the x-axis represents sample frequencies. I am confused with the distinction between sampling frequencies vs. underlying frequencies of the generating function (say I have $\sin(2\pi x)$ sampled at 10Hz, does the periodogram characterize the 1Hz underlying frequency of the function?)
Any resources on understanding how to analyze and remove noisy components of time signals from a machine learning perspective would be much appreciated! Due to time constraints, I have shied away from long textbooks on digital signal processing. Thanks a lot.
Firstly, I am confused if I am supposed to filter my signals to get rid of any frequencies above the Nyquist frequency. My sampling frequency is 32Hz and my time series is somewhat noisy and has some artifacts. I am also unsure of which filter to select for this.

That ship has sailed.
Let $S=\left\{\left.\alpha e ^{i(\omega t+\varphi)}\right|\alpha &gt; 0, 0\le \varphi &lt;2\pi, \omega \in \mathbb R\right\}$, i.e. the set of all distinct complex sinusoid with an amplitude, frequency and phase.
Then $(S,\cdot)$ is a commutative semigroup (proof trivial).
Introducing the equivalence relation $\sim: a\sim b \iff a\left(\frac{n}{r}\right)= b\left(\frac{n}{r}\right) \forall n\in\mathbb Z$ (&quot;two signals are identical after sampling with rate $r$&quot;), we see that signals $s_l=\alpha e^{i(\omega_l t + \varphi)}, l=1,2,\ldots$ are $s_1\sim s_2$ if $\frac{\omega_1-\omega_2}{2\pi}=nr, n\in\mathbb Z$, i.e. we can't tell signals apart after sampling if their frequency differed by a multiple of the sampling rate.
Let's formalize this: $T=\left\{\alpha e^{i([ft+\phi]\mod 2\pi)}\right\}$ is a quotient semigroup of $S$, i.e. $T\preceq S$, and each of the elements is a leader of a $\sim$-equivalence class – and this homomorpism $S\mapsto T$ is in fact sampling, which, as we can see above, is not bijective.
Hence, all the original frequency components from $S$ got mapped to some component from $T$ with frequency normalized to the sampling frequency. That mapping is called aliasing.
What an anti-alias filter $h$ does is
$$h(s): S\mapsto S, h=\begin{cases}
s, &amp; f&lt; f_\text{nyquist}\\
0 &amp; \text{else,}
\end{cases}
$$
and as you'll figure out when inserting $h(s)$ above is that this yields only the elements that are not aliased to a different frequency.
Thus, everything that &quot;survives&quot; $h$ will also &quot;survive&quot; aliasing without undergoing a change in frequency.
So, if you needed an anti-aliasing filter, it's now too late. Go and do your recording again.

Secondly, I wanted to look at the periodogram and the average power spectral density at each frequency within a group - but I am not sure if I understand the periodogram very well - if I have different time series lengths then my periodogram length will vary too, so I am not sure how this comparison can be made.

In that case, the periodogramm is not a useful mapping on its own – you'll need to add something like a truncation / padding operation to bring all signals to the same duration, for example. At which point the periodogram doesn't seem to be a sensible approach anymore.