## odba

Compute the 'Overall Dynamic Body Acceleration' sensu Wilson et al. 2006.

## Syntax

#### Matlab & Octave

e = odba(A,fs,fh) p and A are vectors/matrices or e = odba(A,n,method) p and A are vectors/matrices

#### R

e <- odba(A,fs,fh) p and A are vectors/matrices or e <- odba(A, method = "method", n = n) p and A are vectors/matrices

## Description

ODBA is the norm of the high-pass-filtered acceleration. Several methods for computing ODBA are in use which differ by which norm and which filter are used. In the Wilson paper, the 1-norm and a rectangular window (moving average) filter are used. The moving average is subtracted from the input accelerations to implement a high-pass filter. The 2-norm may be preferable if the tag orientation is unknown or may change and this is termed VeDBA. A tapered symmetric FIR filter gives more efficient high-pass filtering compared to the rectangular window method and avoids lobes in the response.

## Inputs

Input var | Description | Units | Default value |
---|---|---|---|

A | is a nx3 acceleration matrix with columns [ax ay az]. Acceleration can be in any consistent unit, e.g., g or m/s<sup<2</sup>. A can be in any frame but the result depends on the method used to compute ODBA. The default method and VeDBA method are rotation independent and so give the same result irrespective of the frame of A. The 1-norm method has a more complex dependency on frame. | g or m/s^{2} | N/A |

fs | is the sampling rate in Hz of the acceleration signals. | Hz | N/A |

fh | is the high-pass filter cut-off frequency in Hz. This should be chosen to be about half of the stroking rate for the animal (e.g., using dsf.m).fs and fh are only needed if using the default (FIR filtering) method. | Hz | N/A |

n | is the rectangular window (moving average) length in samples. This is only needed if using the classic ODBA and VeDBA forms. | N/A | N/A |

method | is a string containing either 'wilson' or 'vedba'. If the third argument to odba.m is a string, either the classic 1-norm ODBA ('wilson') or the 2-norm VeDBA ('vedba') is computed, in either case with an n-length rectangular window. | N/A | N/A |

## Outputs

Output var | Description | Units |
---|---|---|

e | is a column vector of ODBA with the same number of rows as A. e has the same units as A. | g or m/s^{2} |

## Notes & assumptions

- Delay-free filtering is used for all filter types.
- Wilson et al. (2006)

## Example

### Matlab & Octave

odba([1,-0.5,0.1;0.8,-0.2,0.6;0.5,-0.9,-0.7],5,'vedba') returns: [0.68475;0.93393;0.83600;0.65744]

### R

The example below uses data from the file testset3.nc. You can download it from the animaltags website's example data sets. If the file is saved in your current working directory, load it via:

testset3 <- load_nc(‘testset3.nc’)

e <- odba(A = testset3$A$data, fs = testset3$A$sampling_rate, fh = 4) ba <- list(e = e) plott(ba, testset3$A$sampling_rate)

## About

bugs@animaltags.org Last modified: 24 July 2017