2.3.1.vsp.calculations: Vehicle Specific Power (VSP) calculations

Description Usage Arguments Details Value Warning Note Author(s) References See Also Examples

Description

Functions associated with VSP calculations.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
calcVSP(speed = NULL, accel = NULL, slope = NULL, 
          time = NULL, distance = NULL, data = NULL,
          calc.method = calcVSPJimenezPalaciosCMEM,
          ..., fun.name = "calcVSP", hijack= FALSE)

calcVSPJimenezPalaciosCMEM(speed = NULL, accel = NULL, 
          slope = NULL, m = NULL, a = NULL, b = NULL, 
          c = NULL, g = NULL, ..., data = NULL,  
          fun.name = "calcVSPJimenezPalaciosCMEM", 
          hijack= FALSE)

Arguments

speed, accel, slope, time, distance

(Data series, typically vectors) The inputs to use when doing a calculation. See Note about calcVSP usage and calc.method.

data

(Optional data.frame or pems object) The data source if either a data.frame or pems object is being used.

calc.method

(Required function) The function to use to calculate VSP. (default calcVSPJimenezPalaciosCMEM). See Note about calcVSP usage and calc.method.

...

(Optional) Other arguments, currently passed on to function provided as calc.method (default calcVSPJimenezPalaciosCMEM) and appropriate check... functions.

fun.name

(Optional character) The name of the parent function, to be used in error messaging.

hijack

(Logical) Is this function being locally 'hijacked' by a user/function developer? See Note on hijack below.

m, a, b, c, g

(Numerics) VSP constants. If not supplied or preset in the associated pems object, defaults are applied. See Below.

Details

calcVSP... functions calculate VSP using.

calcVSP is a wrapper function which allows users to supply different combinations of inputs. VSP calculations typically require speed, acceleration and slope inputs. This wrapper allows different input combinations, e.g.:

time and distance (time and distance -> speed, time and speed -> accel)

time and speed (time and speed -> accel)

speed and accel

... and passes on speed and accel to the method defined by calc.method. (This means all VSP functions run via calcVSP(..., calc.method = function) share this option without needed dedicated code and only required speed and accel as inputs.)

calcVSPJimenezPalaciosCMEM calculates VSP according to Jimenez Palacios and CMEM methods. See References and Note below.

Value

calcVSPJimenezPalaciosCMEM and calcVSP by default use Jimenez Palacios and CMEM methods to calculate VSP (in kW/metric ton).

Warning

calcVSPJimenezPalaciosCMEM does not currently have special case for buses as of Giannelli et al (2005) encoded. (Please let me know if you need to use them.)

Note

calcVSP... constants can be set/modified in the calculation call, e.g. calcVSP(..., a = [new.value]). If not supplied these are first checked for in the associated pems object (if supplied), or set to default values. See References. If VSP constants are to be added to a pems object, these should have the prefix 'vsp.', so for, e.g., a is stored in pems constants are vsp.a. This is because the common VSP designations (a, b, c, etc.) can be very easily wrongly assigned.

Unit handling in pems.utils is via checkUnits, getUnits, setUnits and convertUnits. See common.calculations for details.

hijack is an in-development argument, supplied to allow code developers to run multiple functions in different function environments. When developers 'mix and match' code from several sources it can become unstable, especially if functions are run within functions within functions, etc. hijack = TRUE and associated code makes a function local to 'side-step' this issue. This work by assuming/expecting all inputs to be local, i.e. supplied directly by the code user.

Author(s)

Karl Ropkins

References

calcVSPJimenezPalaciosCMEM uses methods described in:

Jimenez-Palacios, J.L. (1999) Understanding and Quantifying Motor Vehicle Emissions with Vehicle Specific Power and TILDAS Remote Sensing. PhD Thesis, Massachusetts Institute of Technology, Cambridge, MA.

Giannelli, R.A., Nam, E.K., Helmer, K., Younglove, T., Scora, G., and Barth, M. (2005) Heavy-Duty Diesel Vehicle Fuel Consumption Modelling Based on Road Load and Power Train Parameters. SAE Technical Papers, No, 05CV-3.

m is the vehicle mass (in metric tons), and a, b, c and g are the calculations constants for:

vsp = speed * (a * accel + (g * slope) + b) + (c * speed^3)

For vehicles < 3.855 metric tons; a = 1.1, and c = 0.000302 (as of Jimenez-Palacios, 1999).

For vehicles 3.855 to 6.350 metric tone; a = 0.0996m/2204.6, c = 1.47 + 5.22e-5m/2205 (as of Giannelli et al, 2005).

For vehicles 6.350 to 14.968 metric tone; a = 0.0875m/2204.6, c = 1.93 + 5.90e-5m/2205 (as of Giannelli et al, 2005).

For vehicles > 14.968 metric tone; a = 0.0661m/2204.6, c = 2.89 + 4.21e-5m/2205 (as of Giannelli et al, 2005).

In all cases, by default b = 0.132, g = 9.81, and if not supplied slope is assumed to be zero and m is assumed to 1.5 metric tons.

See Also

See common.calculations (and checkInput, checkUnits and convertUnits) for details of data management.

Examples

1
2
3
4
5
6
7
8
9
###########
##example 1 
###########

#basic usage

ans <- calcVSP(velocity, time = local.time, data = pems.1)

#ans <- pems.1 + calculated vsp

pems documentation built on May 2, 2019, 5:20 p.m.