Public Member Functions | Protected Member Functions

Allows to simulate the behaviour of sensors within the Process. More...

#include <sensor.hpp>

Inheritance diagram for Sensor:
Inheritance graph
[legend]

List of all members.

Public Member Functions

uint getNY () const
double getOutputDeadTime (uint idx) const
DVector getOutputDeadTimes () const
NoisegetOutputNoise (uint idx) const
virtual returnValue init (double _startTime=0.0, const DVector &_startValue=emptyConstVector)
Sensoroperator= (const Sensor &rhs)
 Sensor ()
 Sensor (uint _nY, double _samplingTime=DEFAULT_SAMPLING_TIME)
 Sensor (const Sensor &rhs)
returnValue setOutputDeadTime (uint idx, double _deadTime)
returnValue setOutputDeadTimes (const DVector &_deadTimes)
returnValue setOutputDeadTimes (double _deadTime)
returnValue setOutputNoise (const Noise &_noise, double _noiseSamplingTime)
returnValue setOutputNoise (uint idx, const Noise &_noise, double _noiseSamplingTime)
virtual returnValue step (VariablesGrid &_y)
virtual ~Sensor ()

Protected Member Functions

returnValue addSensorNoise (VariablesGrid &_y) const
returnValue delaySensorOutput (VariablesGrid &_y)
returnValue getDelayedOutputGrid (const VariablesGrid &_y, VariablesGrid &_yDelayed) const

Detailed Description

Allows to simulate the behaviour of sensors within the Process.

The class Sensor allows to simulate the behaviour of sensors within the Process.

Author:
Hans Joachim Ferreau, Boris Houska

Definition at line 54 of file sensor.hpp.


Constructor & Destructor Documentation

Default constructor.

Definition at line 46 of file sensor.cpp.

Sensor::Sensor ( uint  _nY,
double  _samplingTime = DEFAULT_SAMPLING_TIME 
)

Constructor which takes the number of process outputs and the sampling time.

Parameters:
[in]_nYNumber of proces outputs.
[in]_samplingTimeSampling time.

Definition at line 51 of file sensor.cpp.

Sensor::Sensor ( const Sensor rhs)

Copy constructor (deep copy).

Parameters:
[in]rhsRight-hand side object.

Definition at line 58 of file sensor.cpp.

Sensor::~Sensor ( ) [virtual]

Destructor.

Definition at line 63 of file sensor.cpp.


Member Function Documentation

returnValue Sensor::addSensorNoise ( VariablesGrid _y) const [protected]

Adds noise to given signal.

Parameters:
[in,out]_ySensor signal to be noised.
Returns:
SUCCESSFUL_RETURN,
RET_GENERATING_NOISE_FAILED

Definition at line 292 of file sensor.cpp.

Delays given signal according to the internal dead times.

Parameters:
[in,out]_ySensor signal to be delayed.
Returns:
SUCCESSFUL_RETURN,
RET_DELAYING_INPUTS_FAILED

Definition at line 224 of file sensor.cpp.

returnValue Sensor::getDelayedOutputGrid ( const VariablesGrid _y,
VariablesGrid _yDelayed 
) const [protected]

Returns time grid for representing the given sensor signal in delayed form.

Parameters:
[in]_ySensor signal to be delayed.
[out]_yDelayedTime grid for representing delayed sensor signal.
Returns:
SUCCESSFUL_RETURN

Definition at line 258 of file sensor.cpp.

uint Sensor::getNY ( ) const [inline]

Returns number of sensor signal components.

Returns:
Number of sensor signal components.
double Sensor::getOutputDeadTime ( uint  idx) const [inline]

Returns dead time of given component of the sensor signal.

Parameters:
[in]idxIndex of component.
Returns:
Dead time of given component
DVector Sensor::getOutputDeadTimes ( ) const [inline]

Returns dead times of the sensor signal.

Returns:
Dead times of sensor signal
Noise* Sensor::getOutputNoise ( uint  idx) const [inline]

Returns pointer to additive noise of given component of the sensor signal.

Parameters:
[in]idxIndex of component.
Returns:
Pointer to additive noise of given component
returnValue Sensor::init ( double  _startTime = 0.0,
const DVector _startValue = emptyConstVector 
) [virtual]

Initializes all components of the sensor and the lastSignal member based on the given start information.

Parameters:
[in]_startTimeStart time.
[in]_startValueInitial value of the sensor signal.
Returns:
SUCCESSFUL_RETURN

Reimplemented from TransferDevice.

Definition at line 180 of file sensor.cpp.

Sensor & Sensor::operator= ( const Sensor rhs)

Assignment operator (deep copy).

Parameters:
[in]rhsRight-hand side object.

Definition at line 68 of file sensor.cpp.

returnValue Sensor::setOutputDeadTime ( uint  idx,
double  _deadTime 
)

Assigns new dead time to given component of the sensor signal.

Parameters:
[in]idxIndex of component.
[in]_deadTimesNew dead time.
Returns:
SUCCESSFUL_RETURN,
RET_INVALID_ARGUMENTS,
RET_MEMBER_NOT_INITIALISED

Definition at line 160 of file sensor.cpp.

Assigns new dead times to each component of the sensor signal.

Parameters:
[in]_deadTimesNew dead times.
Returns:
SUCCESSFUL_RETURN,
RET_INVALID_ARGUMENTS,
RET_MEMBER_NOT_INITIALISED

Definition at line 125 of file sensor.cpp.

returnValue Sensor::setOutputDeadTimes ( double  _deadTime)

Assigns new dead time to all components of the sensor signal.

Parameters:
[in]_deadTimeNew dead time.
Returns:
SUCCESSFUL_RETURN,
RET_INVALID_ARGUMENTS,
RET_MEMBER_NOT_INITIALISED

Definition at line 144 of file sensor.cpp.

returnValue Sensor::setOutputNoise ( const Noise _noise,
double  _noiseSamplingTime 
)

Assigns new additive noise with given sampling time to all components of the sensor signal.

Parameters:
[in]_noiseNew additive noise.
[in]_noiseSamplingTimeNew noise sampling time.
Returns:
SUCCESSFUL_RETURN,
RET_INVALID_ARGUMENTS

Definition at line 81 of file sensor.cpp.

returnValue Sensor::setOutputNoise ( uint  idx,
const Noise _noise,
double  _noiseSamplingTime 
)

Assigns new additive noise with given sampling time to given component of the sensor signal.

Parameters:
[in]idxIndex of component.
[in]_noiseNew additive noise.
[in]_noiseSamplingTimeNew noise sampling time.
Returns:
SUCCESSFUL_RETURN,
RET_INVALID_ARGUMENTS

Definition at line 102 of file sensor.cpp.

returnValue Sensor::step ( VariablesGrid _y) [virtual]

Performs one step of the sensor transforming the given signal according to the internal sensor settings.

Parameters:
[in,out]_ySensor signal to be transformed.
Returns:
SUCCESSFUL_RETURN,
RET_BLOCK_NOT_READY,
RET_INVALID_ARGUMENTS,
RET_SENSOR_STEP_FAILED

Definition at line 192 of file sensor.cpp.


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


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Sat Jun 8 2019 19:40:25