7.4.speed.em.code: Speed Emissions related code

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

Description

Functions associated with Speed/Emissions terms.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#calculations

fitSpeedEm(em, time, speed, engine.on = NULL,
           data = NULL, method = 1, min.speed = 5,
           bin.size = NULL, ..., 
           fun.name="fitEmSpeed")
                       
#speed/emissions Plots

speedEmPlot(speed, em = NULL, time = NULL, 
         ..., data = NULL, engine.on = NULL,
         min.speed = 5, bin.size = NULL,  
         plot.type = 1, method = 1,
         fun.name="speedEmPlot",
         scheme = pems.scheme)

Arguments

em, time, speed

(Typically pems.element vectors) em is the (g/s) emissions data-series; speed and time are the associated speed profile and time-series.

engine.on

(Optimal, single Numeric) The time the emission source, e.g. monitored vehicle engine, was started. If not supplied, this is assumed to be start of the supplied em and time data-series. See also Notes.

data

(Optional, typically pems) The data source for em, speed and time.

method

(Optinal, Numeric) The method to use when calculating and binning data: method 1 calculate g/km emissions and bin by row. See also bin.size, Notes and References.

min.speed

(Optinal, Numeric) measurements when speeds were less than this value are exluded, default value 5. See also Notes.

bin.size

(Optinal, Numeric) The data binning scale to use. For method 1, this is the number of rows of measurements to merge.

...

(Optional) Other arguments, currently passed on as supplied to assoicated calculation or plotting function.

fun.name

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

plot.type

(Optional numeric) For speedEmPlot, the type of speed/emission plot to generate: 1 a conventional scatter plot; or 2 a box-and-whisker plot. If not supplied, plot type 1 is selected by default.

scheme

(Various) For speedEmPlot, the scheme to apply to the plot, loa argument.

Details

fitSpeedEm builds a speed and g/km emissions data sets for the supplied emissions, speed and time-series data.

speedEmPlot generates a plot of one or more data set generated by fitSpeedEm.

Value

fitSpeedEm generates a speed/emissions contribution report as a pems dataset.

speedEmPlot generates a speed/emissions contribution report as a lattice plot.

Note

Regarding engine.on: This is specifically the time the engine is turned on rather than the row of data set where this happens. In some cases, they are same, e.g. when the data is logged at a regular 1-Hz and data capture is complete.

Regarding method: Method 1 [Doc further].

[Doc further]

(See References.)

Author(s)

Karl Ropkins

References

fitColdStart uses methods described in:

[COPERT on speed/emission terms]

[Ropkins speed/emissions]

See Also

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

Examples

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

#basic usage

#to do/maybe not run... time to compile...

pems.utils documentation built on April 25, 2021, 9:07 a.m.