Input Design and Model Validation

Input Design

Achieving a Desired u(t)u(t)

Several methods can be employed to shape the frequency content of a signal u(t)u(t).

1) Filtering
  • Types: Low-pass, high-pass, band-pass, band-stop filters.
  • Control: The steepness of the filter's cutoff can be controlled by the filter order (nn).
  • End-to-End Example:
    • A white signal passes through a filter.
    • The output is then processed, potentially involving rescaling.
    • Filter order nn affects the filter's characteristics (e.g., n=2n = 2).
    • ωcutoff\omega_{cutoff} represents the cutoff frequency.
2) Upsampling
  • Goal: Retain the low-frequency content.
  • Process:
    • Start with a white signal u(t)u(t).
    • Upsample the signal (e.g., by a factor of 4).
    • This process generates low-frequency components.
3) Sum of Sinusoids
  • Equation: u(t)=<em>k=1KA</em>kcos(ω<em>kt+ϕ</em>k)u(t) = \sum<em>{k=1}^{K} A</em>k \cos(\omega<em>k t + \phi</em>k)
    • AkA_k: Amplitude of the kthk^{th} sinusoid.
    • ωk\omega_k: Frequency of the kthk^{th} sinusoid.
    • ϕk\phi_k: Phase of the kthk^{th} sinusoid.
  • Frequency Domain Representation:
    • U(ω)<em>k=1KA</em>kejϕ<em>kδ(ωω</em>k)+A<em>kejϕ</em>kδ(ω+ωk)U(\omega) \propto \sum<em>{k=1}^{K} A</em>k e^{j\phi<em>k} \delta(\omega - \omega</em>k) + A<em>k e^{-j\phi</em>k} \delta(\omega + \omega_k)
    • This shows that the frequency spectrum U(ω)U(\omega) consists of impulses at the frequencies ωk\omega_k.
  • Power Spectrum: U(ω)2<em>k=1KA</em>k2[δ2(ωω<em>k)+δ2(ω+ω</em>k)]|U(\omega)|^2 \propto \sum<em>{k=1}^{K} A</em>k^2 [\delta^2(\omega - \omega<em>k) + \delta^2(\omega + \omega</em>k)]
4) Swept Sinusoid (Chirp)
  • Equation: u(t)=Acos(ω(t)t)u(t) = A \cos(\omega(t)t)
  • Instantaneous Frequency: ω(t)=ω<em>1+t(ω</em>2ω1)\omega(t) = \omega<em>1 + t(\omega</em>2 - \omega_1)
  • Chirp Signal: u(t)=Acos(ω<em>1t+t22T(ω</em>2ω1))u(t) = A \cos\left(\omega<em>1 t + \frac{t^2}{2T}(\omega</em>2 - \omega_1)\right)

Model Validation

Cross-Validation

  • Data Set: Split the data set u(t),y(t){u(t), y(t)} into training and testing sets.
  • Process:
    1. Train the model on the training data.
    2. Use the trained model to make predictions on the test data: y^test\hat{y}_{test}.
    3. Validate the model by comparing the predictions with the actual test data.

Overfitting

  • Example: Learning an Autoregressive (AR) model.
  • AR Model: y(t)=θ<em>0+θ</em>1y(t1)+θ<em>2y(t1)2++θ</em>p1y(t1)p1+e(t)y(t) = \theta<em>0 + \theta</em>1 y(t-1) + \theta<em>2 y(t-1)^2 + … + \theta</em>{p-1} y(t-1)^{p-1} + e(t)
  • NAR(p) Model: y(t)=f(y(t1))+e(t)y(t) = f(y(t-1)) + e(t)
    • p represents the order of the AR model.
  • Observations:
    • p=1: Medium training error, medium test error.
    • p=2: Very low training error, high test error (overfitting).
    • Overfitting occurs when the model learns the training data too well, including the noise, and performs poorly on unseen data.

Time-Series Data

  • Important: In time-series data, the train-test split must respect temporal continuity.
  • Order: Maintain the order of the learned model (number of lags).
  • Disjoint Segments: Do NOT attach originally disjoint segments until computing y^\hat{y} (or EE) on each segment.