Class SineSweep

Class Documentation

class SineSweep

Generates a sine sweep for frequency analysis of a joint.

This class basically calculates the output for a sine sweep. Where the signal is a sine wave, whose frequency is exponentially increased from ω1 to ω2 over T seconds.

s(n)=Asin[K(eδt/L1)]

where:K=ω1Tlnω2ω1L=Tlnω2ω1.

Public Functions

SineSweep()

Constructor.

double update(rclcpp::Duration dt)

Update the SineSweep loop with nonuniform time step size.

Parameters:

dt – Change in time since last call

bool init(double start_freq, double end_freq, double duration, double amplitude)

Initializes everything and calculates the constants for the sweep.

Parameters:
  • start_freq – Start frequency of the sweep, ω1 .

  • end_freq – End frequency of the sweep, ω2.

  • duration – The duration of the sweep, T.

  • amplitude – The amplitude of the sweep, A.