Skip to content

spectrum: More flexible waveform generator

Defines a new class, ComplexWaveformGenerator, which is capable of generating complex waveforms.

Whereas the existing WaveformGenerator is capable of producing a periodic waveform with a fixed power spectral density, the ComplexWaveformGenerator is capable of generating a periodic waveform with multiple power spectral densities.

The ComplexWaveformGenerator is useful when one needs to model a waveform that varies in frequency or power. Modeling the same behavior using the WaveformGenerator would require creating multiple instances of the generator and coordinating them so that they all start/stop at the appropriate times. One example of this is modeling a microwave oven. The waveform of a microwave oven is composed of two transient signals on the ends and a frequency sweep in the middle. The transient signals can be modeled by a single WaveformGenerator but the frequency sweep requires multiple WaveformGenerator since the frequency changes over time and the WaveformGenerator only supports a single power spectral density. The ComplexWaveformGenerator is capable of modeling the entire microwave oven waveform using a single instance.

A loader class is provided which is capable of creating one or more ComplexWaveformGenerator instances from a configuration file.

Edited by Tom Henderson

Merge request reports