|
random_signal_generator
A utility for generating random data signals
|
A class for generating random signals. More...
#include <random_signal_generator.h>
Classes | |
| class | impl |
| The private implementation class for the random_signal_generator. More... | |
Public Member Functions | |
| random_signal_generator (uint32_t n_points, double desired_mean, double desired_standard_deviation) | |
| Instantiates a new random_signal_generator. More... | |
| void | generate (std::vector< double > &signal) |
| Generates a new randomized signal with the currently set parameters. More... | |
Public Attributes | |
| uint32_t | n_points |
| The number of points to create for the signal. More... | |
| double | desired_mean |
| The desired mean of the signal. More... | |
| double | desired_standard_deviation |
| The desired standard deviation of the signal. More... | |
| uint8_t | n_bases |
| (OPTIONAL) The number of basis vectors used to create the signal. DEFAULT = 50 More... | |
| double | max_frequency |
| (OPTIONAL) The maximum frequency of the signal's content, in Hz. DEFAULT = 10.0 More... | |
| double | noise_percentage |
| (OPTIONAL) The amount of noise to superimpose on the signal, in percentage of the desired standard deviation. DEFAULT = 0.0 More... | |
A class for generating random signals.
| random_signal_generator::random_signal_generator | ( | uint32_t | n_points, |
| double | desired_mean, | ||
| double | desired_standard_deviation | ||
| ) |
Instantiates a new random_signal_generator.
| n_points | The number of points desired in the generated signal. |
| desired_mean | The desired mean value of the generated signal. |
| desired_standard_deviation | The desired standard deviation of the generated signal. |
| void random_signal_generator::generate | ( | std::vector< double > & | signal | ) |
Generates a new randomized signal with the currently set parameters.
| signal | A vector for storing the generated signal. |
| double pcd::random_signal_generator::desired_mean |
The desired mean of the signal.
This specifies the average amplitude of the generated signal.
| double pcd::random_signal_generator::desired_standard_deviation |
The desired standard deviation of the signal.
This specifies the standard deviation of the generated signal's amplitude from desired_mean.
| double pcd::random_signal_generator::max_frequency |
(OPTIONAL) The maximum frequency of the signal's content, in Hz. DEFAULT = 10.0
This controls the maximum number of peaks/valleys in the signal over the specified number of points.
| uint8_t pcd::random_signal_generator::n_bases |
(OPTIONAL) The number of basis vectors used to create the signal. DEFAULT = 50
This controls the number of random sine waves that are superimposed to create the random signal. More bases increase the complexity of the signal but takes longer to compute.
| uint32_t pcd::random_signal_generator::n_points |
The number of points to create for the signal.
This specifies the length of the generated signal as a number of points.
| double pcd::random_signal_generator::noise_percentage |
(OPTIONAL) The amount of noise to superimpose on the signal, in percentage of the desired standard deviation. DEFAULT = 0.0
This enables Gaussian (white) noise to be added to the random signal.
1.8.13