I'm trying to generate several waves using a Mojo-V3 board, that has a Spartan-6. I use DDS method to generate the waves. The description of the hardware is in VHDL. At the output of the FPGA there is R-2R DAC to convert the data to analog values. I have no problem with sine wave, but, when I generate Triangle wave, the osciloscope show me peaks when the wave reaches the highest and lowest values. I think the problems are the harmonics, can you confirm that?. At the output of the DAC there is no filter. I use the 20Mhz Bandwith filter and the peaks are lower, but it still appearing in the wave. How can I fix that?
Electronic – problem generating Triangle wave using DDS
ddsfpgavhdlwaveform
Related Solutions
Any waveform other than a sine at 12.5 MHz will be composed of the fundamental frequency 12.5 MHz, plus harmonics above that. For ideal waveforms with sharp edges, the harmonics extend to infinity.
It sounds like you have added a filter with a cutoff frequency around 12.5 MHz, so this is why your non-sinusoidal outputs don't look like they should -- your filter is stripping off the harmonics which give those waves their non-sinusoidal identity.
To illustrate, here are a few animations from Wikipedia which show various non-sinusoidal waveforms as harmonics are added/removed:
What your filter should be doing is stripping off the harmonics generated by the impulses at each sample output by your DAC. This is called an anti-aliasing filter, and ideally it's a brick-wall low-pass filter with a cutoff equal to half your sampling frequency. Given that true brick-wall filters aren't realizable, the cutoff is usually a bit below half the sampling frequency, and the roll-off is made as steep as feasible. If you can sample significantly more than twice the highest frequency of interest, then the filter design isn't as critical.
It also follows that if you want to synthesize a 12.5 MHz square (or triangle, or sawtooth...) wave, you need a DAC sampling fast enough to also synthesize the higher harmonics in that wave. How much higher depends on how closely you want to approach an ideal square/triangle/sawtooth wave.
- Your phantom signals are digital measurement errors from undersampling and a low alias frequency is the result.
Comments
Your analog scope shows significant DC , low frequency components, which you may want to reject with a HPF.
The filter design must be driven from a current source to work as designed with 6dB loss in the passband, since impedance ratio is 1/2. If this is my false assumption,then R1 should be in series with a voltage source.
The values shown are for 80MHz LPF may has 2dB ripple in response in pass band but stopband begins at 100MHz, @ -66 dB. If you don't want the ripple, use, Chebyshev Type 2. The steep skirt as a large ripple penalty in your Cauer design or change the ripple factor.
Suggestion. Learn how to match or isolate output and load impedance so that your test measurement impedance does not introduce a false circuit load. e.g. dont load filter with a 20pF probe. Use 150 + 50 Ohm scope or Spectrum Analyzer or use a 1pF FET probe.
Best Answer
if it is a bug ,you will probably see it when analysing the frames in Chipscope .