control_toolbox::SineSweep Class Reference

Generates a sine sweep for frequency analysis of a joint. More...

#include <sine_sweep.h>

List of all members.

Public Member Functions

bool init (double start_freq, double end_freq, double duration, double amplitude)
 Intializes everything and calculates the constants for the sweep.
 SineSweep ()
 Constructor.
double update (ros::Duration dt)
 Update the SineSweep loop with nonuniform time step size.
 ~SineSweep ()
 Destructor.

Private Attributes

double amplitude_
double cmd_
ros::Duration duration_
double end_angular_freq_
double K_
double L_
double start_angular_freq_

Detailed Description

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 $\omega_1$ to $\omega_2$ over $T$ seconds.

$s(n) = A \sin [ K(e^{\delta t/L} - 1) ]$

where:
$K = \frac{\omega_1T}{\ln \frac{\omega_2}{\omega_1} }$
$L = \frac{T}{\ln \frac{\omega_2}{\omega_1} }$.

Definition at line 60 of file sine_sweep.h.


Constructor & Destructor Documentation

control_toolbox::SineSweep::SineSweep (  ) 

Constructor.

Definition at line 41 of file sine_sweep.cpp.

control_toolbox::SineSweep::~SineSweep (  ) 

Destructor.

Definition at line 50 of file sine_sweep.cpp.


Member Function Documentation

bool control_toolbox::SineSweep::init ( double  start_freq,
double  end_freq,
double  duration,
double  amplitude 
)

Intializes everything and calculates the constants for the sweep.

Parameters:
start_freq Start frequency of the sweep, $\omega_1$ .
end_freq End frequency of the sweep, $\omega_2$.
duration The duration of the sweep, $T$.
amplitude The amplitude of the sweep, $A$.

Definition at line 54 of file sine_sweep.cpp.

double control_toolbox::SineSweep::update ( ros::Duration  dt  ) 

Update the SineSweep loop with nonuniform time step size.

Parameters:
dt Change in time since last call

Definition at line 77 of file sine_sweep.cpp.


Member Data Documentation

Amplitude of the sweep.

Definition at line 92 of file sine_sweep.h.

Command to send.

Definition at line 98 of file sine_sweep.h.

ros::Duration control_toolbox::SineSweep::duration_ [private]

Duration of the sweep.

Definition at line 93 of file sine_sweep.h.

End angular frequency of the sweep.

Definition at line 95 of file sine_sweep.h.

Constant $K$.

Definition at line 96 of file sine_sweep.h.

Constant $L$.

Definition at line 97 of file sine_sweep.h.

Start angular frequency of the sweep.

Definition at line 94 of file sine_sweep.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Defines


control_toolbox
Author(s): Melonee Wise, Sachin Chitta, John Hsu
autogenerated on Fri Jan 11 10:00:57 2013