Expand description
A frequency mixer is used to frequency shift a signal by multiplying it with a complex exponential.
This operation is commonly used in applications such as modulation, demodulation, and frequency translation in communication systems.
The FrequencyMixer struct maintains the current phase of the complex exponential and the normalized frequency increment, which determines how much the phase is advanced for each sample processed.
The process method takes an input signal (either real or complex) and multiplies each sample by the corresponding value of the complex exponential based on the current phase.
The phase is then incremented for the next sample, ensuring that the frequency shift is applied consistently across the entire signal.
See the book entry Signal sources: oscillators, CORDIC and waveforms.