tempusSystem Class TimeHistoryRVF2
TimeHistoryRVF2 is part of the WaveTrain system class library

TimeHistoryRVF2 outputs a time-dependent, recallable 2x1 Vector< float > value given two input signal vector vx and vy having lengths nt and corresponding time vector tv with length nt. The output value is chosen based on the current time; if the current time falls between two times in the time vector, the output value is chosen by interpolating the input signal vectors (if sampleFlag = 0), or by sample-and-hold (if sampleFlag != 0). The parameter t0 defines the start time in the time vector, so that at simulation time t = 0.0 s, the output grid will be that for tv = t0. Also, the input time vector may be defined such that the time history does not begin until t > 0.0 s, and in prior times the initial values vx0 and vy0 are used. If the time vector ends before the end of the simulation, the last value is held throughout the remainder of the simulation.

Note about this block: The DVtoRV block is respondToChangedInputs only, so it will only be called at the rate specified in the time history vector(s), even if the block that DVtoRV is feeding is being called more frequently. Bottom line, the DVtoRV effectively eliminates any interpolation/upsampling of the TimeHistoryF blocks, so make sure your time history and signal vectors are properly interpolated in pre-processing.

Tempus Block Diagram Editor Snapshot
Parameters
tv  Vector<double>   Time vector, length nt (s)   Vector()
vx  Vector<float>   X signal vector, length nt   Vector()
vy  Vector<float>   Y signal vector, length nt   Vector()
t0  double   The time within the tv vector that is to correspond to simulation time t=0.0 (s)   0.0
vx0  float   Initial x signal value   0.0
vy0  float   Initial y signal value   0.0
sampleFlag  int   Sample flag (0 = interpolate; 1 = sample and hold)   0
timeLimit  double   Maximum amount of time for which output vector will be stored (if zero, then all input vectors are stored)   0.0
Inputs
None
Outputs
rv  Recallable<Vector<float>>   Output recallable 2x1 vector   
Subsystems

Subsystem icon
  TimeHistoryF    thx
tv  Vector<double>   tv
sv  Vector<float>   vx
t0  double   t0
s0  float   vx0
sampleFlag  int   sampleFlag

Subsystem icon
  TimeHistoryF    thy
tv  Vector<double>   tv
sv  Vector<float>   vy
t0  double   t0
s0  float   vy0
sampleFlag  int   sampleFlag

Subsystem icon
  FtoVF    ftovf

Subsystem icon
  DVtoRV    dvtorv
timeLimit  double   timeLimit


Connections
rv  <<=  dvtorv.rv
ftovf.f0  <<=  thx.s
ftovf.f1  <<=  thy.s
dvtorv.dv  <<=  ftovf.vout
Last Saved: Wed Feb 13 12:29:08 MST 2008 by TVE version 2007B