Root-Mean-Square Calculation
The rms hook calculates the RMS of signals on a given window.
Implementation
The source code of the hook is available here: https://github.com/VILLASframework/node/blob/master/lib/hooks/rms.cpp
Configuration
| window_size | integer >= 0 Default: 0 The size of the window (number of samples) which should be used for the moving average filter. |
| signals | Array of strings A list of signal names to which this hook should be applied |
| enabled | boolean Default: true An optional field which can be used to disable a hook. |
| priority | integer Default: 99 The priority of this hook which determines the order in which hooks are executed. Hooks with a lwoer priority are executed before ones with a higher priority. If no priority is configured, hooks are executed in the order they are configured in the configuration file. |
{- "window_size": 100,
- "signals": [
- "busA.V",
- "busB.V",
- "busC.V"
], - "enabled": true,
- "priority": 99
}Example
node/etc/examples/hooks/rms.conf
@include "hook-nodes.conf"
paths = (
{
in = "signal_node"
out = "file_node"
hooks = (
{
type = "rms"
window_size = 1000
signals = [
"sine"
]
}
)
}
)