Public Member Functions | Private Attributes
labust::control::Relay Class Reference

#include <Relay.hpp>

List of all members.

Public Member Functions

double getAmplitude ()
int hasSwitched ()
 Relay ()
 Relay (double C, double X)
 Relay (double Cp, double Cm, double Xp, double Xm)
void setAmplitude (double C)
void setAmplitude (double Cp, double Cm)
void setHysteresis (double X)
void setHysteresis (double Xp, double Xm)
double step (double input)
 ~Relay ()

Private Attributes

double Cm
double Cp
double out
bool switched
double Xam
double Xap

Detailed Description

The class implements a simple relay switch. This can be used for bang-bang control.

Todo:
Check documentation.

Definition at line 46 of file Relay.hpp.


Constructor & Destructor Documentation

Generic constructor.

Definition at line 52 of file Relay.hpp.

labust::control::Relay::Relay ( double  C,
double  X 
) [inline]

Main constructor. Specifies the relay parameters.

Parameters:
COutput amplitude -C, C.
XInput hysteresis -Xa, Xa.

Definition at line 60 of file Relay.hpp.

labust::control::Relay::Relay ( double  Cp,
double  Cm,
double  Xp,
double  Xm 
) [inline]

Expanded constructor that allows for non-symmetrical relay specification.

Parameters:
CpPositive output amplitude.
CmNegative output amplitude.
XpPositive input hysteresis.
XmNegative input hysteresis.

Definition at line 70 of file Relay.hpp.

Generic destructor.

Definition at line 75 of file Relay.hpp.


Member Function Documentation

The method returns the absolute value of the amplitude.

Returns:
The amplitude of the relay.

Definition at line 110 of file Relay.hpp.

The method returns if the relay has switched since the last step call.

Returns:
1 if the switch to high happened and -1 if the switch to low happened. Zero otherwise.

Definition at line 117 of file Relay.hpp.

void labust::control::Relay::setAmplitude ( double  C) [inline]

The method sets the relay output amplitude.

Parameters:
COutput amplitude -C, C.

Definition at line 82 of file Relay.hpp.

void labust::control::Relay::setAmplitude ( double  Cp,
double  Cm 
) [inline]

setAmplutde Convenience override for the non-symmetrical case.

Parameters:
CpPositive output amplitude.
CmNegative output amplitude.

Definition at line 90 of file Relay.hpp.

void labust::control::Relay::setHysteresis ( double  X) [inline]

The method sets the relay input hysteresis.

Parameters:
XInput hysteresis value.

Definition at line 96 of file Relay.hpp.

void labust::control::Relay::setHysteresis ( double  Xp,
double  Xm 
) [inline]

setHysteresis Conveniece override for the non-symmetrical case.

Parameters:
XapInput hysteresis positive value.
XamInput hysteresis negative value.

Definition at line 104 of file Relay.hpp.

double labust::control::Relay::step ( double  input) [inline]

The method performs one step. It compares the input value to the hysteresis values and determines weather to switch.

Parameters:
inputInput to the relay.
Returns:
The relay output.

Definition at line 133 of file Relay.hpp.


Member Data Documentation

double labust::control::Relay::Cm [private]

Definition at line 145 of file Relay.hpp.

double labust::control::Relay::Cp [private]

Relay amplitudes.

Definition at line 145 of file Relay.hpp.

double labust::control::Relay::out [private]

Relay output for switch detection.

Definition at line 157 of file Relay.hpp.

Switch indicator.

Definition at line 153 of file Relay.hpp.

double labust::control::Relay::Xam [private]

Definition at line 149 of file Relay.hpp.

double labust::control::Relay::Xap [private]

Relay hysteresis.

Definition at line 149 of file Relay.hpp.


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


ident_so
Author(s): Gyula Nagy
autogenerated on Mon Oct 6 2014 01:39:47