LocalGuidance
A library that generates velocity references to follow a path.
robot_utils::FctLogChirp Class Reference

Log chirp function. More...

#include <FctLogChirp.hpp>

Inheritance diagram for robot_utils::FctLogChirp:
Inheritance graph

Public Member Functions

 FctLogChirp ()
 
virtual ~FctLogChirp ()
 
virtual double getUpSweepValue (double time)
 
double getUpSweepFirstDerivativeValue (double time)
 
virtual double getUpAndDownSweepValue (double time)
 
virtual double getParamOffset ()
 
void setParamOffset (double offset)
 
- Public Member Functions inherited from robot_utils::FunctionGeneratorBase
 FunctionGeneratorBase ()
 
virtual ~FunctionGeneratorBase ()
 
virtual void setParamAmplitude (double paramAmplitude)
 
virtual void setParamMinFrequencyHz (double minFreq)
 
virtual void setParamMaxFrequencyHz (double maxFreq)
 
virtual void setParamTimeInteval (double timeInterval)
 
virtual void setCurrentFrequencyHz (double currentFreq)
 
virtual void setComputedTimeInteval (double computedTimeInterval)
 
virtual const double getParamAmplitude () const
 
virtual const double getParamMinFrequencyHz () const
 
virtual const double getParamMaxFrequencyHz () const
 
virtual const double getParamTimeInteval () const
 
virtual const double getCurrentFrequencyHz () const
 
virtual const double getComputedTimeInteval () const
 
virtual double & getCurrentFrequencyHz ()
 

Protected Attributes

double paramOffset_
 
- Protected Attributes inherited from robot_utils::FunctionGeneratorBase
double paramAmplitude_
 amplitude of sine More...
 
double paramMinFrequencyHz_
 minimum frequency [Hz] More...
 
double paramMaxFrequencyHz_
 maximum frequency [Hz] More...
 
double paramTimeInteval_
 time interval of the sweep (estimated time interval for up and down sweep) More...
 
double currentFrequencyHz_
 current frequency for logging More...
 
double computedTimeInteval_
 exact time interval for up and down sweep More...
 

Detailed Description

Log chirp function.

Set all variables param*_ before using a function.

Reference of log chirp function: A. Farina, "Simultaneous Measurement of Impulse Response and Distortion with a Swept-Sine Technique", AES, Paris, 2000.

System Identification - rules

Reference: M. B. Tischler, R. K. Remple, "Aircraft and Rotorcraft System Identification - Engineering Methods with Flight Test Examples",2006.

Parameters of your system you need to know: bandwidthFrequencyHz_: the bandwidth of your system outOfPhaseFrequencyHz_: the frequency at which the phase of the response is exactly out of phase (-180°)

Calculation of the required frequencies and time interval: paramMinFrequencyHz_ = 0.5* bandwidthFrequencyHz_; paramMaxFrequencyHz_ = 2.5* outOfPhaseFrequencyHz_; maxTimeInteval_ = 1.0/paramMinFrequencyHz_; paramTimeInteval_ = 2*maxTimeInteval_;

The experiment should start with two complete long-period inputs at the beginning of the sweep corresponding to paramMinFrequencyHz_

The total sweep record length should be about recTimeInterval = (4 to 5)maxTimeInteval_

Constructor & Destructor Documentation

robot_utils::FctLogChirp::FctLogChirp ( )
virtual robot_utils::FctLogChirp::~FctLogChirp ( )
virtual

Member Function Documentation

virtual double robot_utils::FctLogChirp::getParamOffset ( )
virtual
virtual double robot_utils::FctLogChirp::getUpAndDownSweepValue ( double  time)
virtual

Up and Down Sweep Function

Parameters
timetime [s]
Returns
value

Implements robot_utils::FunctionGeneratorBase.

double robot_utils::FctLogChirp::getUpSweepFirstDerivativeValue ( double  time)
virtual double robot_utils::FctLogChirp::getUpSweepValue ( double  time)
virtual

Up Sweep Function

Parameters
timetime [s]
Returns
value

Implements robot_utils::FunctionGeneratorBase.

void robot_utils::FctLogChirp::setParamOffset ( double  offset)

Member Data Documentation

double robot_utils::FctLogChirp::paramOffset_
protected

The documentation for this class was generated from the following file: