EEVblog Electronics Community Forum

Products => Test Equipment => Topic started by: Anthocyanina on April 19, 2021, 02:14:50 pm

Title: Low frequency ramps everywhere!
Post by: Anthocyanina on April 19, 2021, 02:14:50 pm
Hi! so, lately i've been looking at function generators specifications and I've noticed one thing that is pretty common: most of them specify ramps up to about 500 KHz, a few to a couple MHz at most, and I haven't found any that specifies a ramp beyond 5 MHz. I would like to understand why this is the case, is there something specially difficult about generating a ramp function? They all bundle ramps and triangles in their specifications, so i wonder if the specification is regarding the 0% and 100% ramps because of the abrupt rising or falling edges in those cases, so I wonder if the 50% ramps could go up to higher frequencies than specified? I still find it strange to see they all specify such low frequencies even compared to the square wave, and I would imagine if it is because of the rising and falling edge thing, square waves are still specified up to significantly much higher frequencies, and they also involve fast transitions, so that now makes me wonder if they just limit the frequencies at such low range because no one uses ramps beyoned a couple MHz?
I really would love to understand which is the case. I doubt the case is that it is hard to make fast ramps, i got a raspberry pi pico and a bunch of resistors and look at this triangle output! it's of course not perfect, but if for 8$ one can do something like this, how come function generators that sell for 3k USD specify rams at such low frequencies? I feel like I'm missing something big here because i really can't understand this  :o
Thank you!
Title: Re: Low frequency ramps everywhere!
Post by: jjoonathan on April 19, 2021, 03:51:46 pm
Sure, rising and falling edges are more demanding in terms of harmonics -- but most engineers understand that, because it is the example they were taught. Ramps live in the danger zone where they look sort of sinusoidal, "requiring few harmonics," while presenting a severe temptation to assume ideal linearity, which brings the requirement for those harmonics right back, especially at the sharp up/down transition points.

Ramps are the perfect trap for young players, in other words, and if instrument manufacturers aren't careful they will take the blame: some kid will claim their experiment was ruined because of the manufacturer's bad ramps when in reality the young player should have abandoned the concept of ideal ramp stimulus long ago, even if doing so required a bit of math for a different stimulus function or an extra reference measurement channel.
Title: Re: Low frequency ramps everywhere!
Post by: TimFox on April 19, 2021, 03:57:43 pm
The triangle wave is a special case of a ramp waveform with equal rise and fall times.  Usually, ramps have a much slower rise in one direction and a much quicker fall in the other direction, since they are typically used to sweep a variable through a range followed by a quick re-trace.  Do you have a use case for such a ramp waveform at frequencies above 1 MHz?  The quick fall time dominates the question of the required frequency bandwidth for an asymmetric ramp.
Title: Re: Low frequency ramps everywhere!
Post by: munkeyman1985 on April 19, 2021, 04:11:56 pm
In the same area as jjoonathan's post.  Faster ramps and the quick drop for the next ramp, requires a lot more power. The power requirements often increase with speed exponential. This means a little more speed is relatively expensive.
Title: Re: Low frequency ramps everywhere!
Post by: jjoonathan on April 19, 2021, 04:18:11 pm
@TimFox Right, that's why you might expect a ramp spec as conservative as a square wave spec, but the desire for linearity explains why the ramp spec might be even more conservative than that.
Title: Re: Low frequency ramps everywhere!
Post by: bdunham7 on April 19, 2021, 04:22:27 pm
There's triangle waves, non-adjustable up/down ramps and then there are fully configurable ramp functions.  The first two seem to be available at much higher frequencies than the last, at least among the few units I have laying around or have looked at recently.

Some signal generators use the triangle wave as the basis for the sine wave output, for example the old HP 8116A.  So they provide a 50MHz sine and triangle function, although at 50MHz the triangle is pretty rounded. 

My cheapie FeelTech units provide a triangle wave function up to the sine wave limit, 60MHz, but again it doesn't look good--at 10MHz it looks perfectly presentable, though.

Siglent SDG2042X-h AWG True-ARB/DDS has configurable ramps up to 1MHz and ARB-based up/down ramps up to 20MHz.  The up/down ramps don't look great above about 5 MHz, as you might expect.  No separate triangle wave function though.

I suspect the reason that higher frequency ramp functions aren't included is that they are difficult to generate cleanly at those high frequencies and there's not any actual use for them.  The ones that do include a higher frequency triangle wave seem to either have it as part of the internal system anyway or else they've just thrown it in there (FeelTech).  So the Siglent could not match your Pico triangle wave at 2.5MHz unless you loaded in an ARB file for it.  They could just load it in their standard ARB files, but the fact that they haven't seems to indicate nobody is asking for it.
Title: Re: Low frequency ramps everywhere!
Post by: Kleinstein on April 19, 2021, 04:26:59 pm
The digital created ramps are somewhat tricky at the tips. The usualy modern function generators use a DAC and filter to remove aliasing. The ramps inlcude some harmonics and for the combination also the phase is tricky. The usual fitlers used for a DDS is made for sine wave performance - the roll of in amplitude is relatively sharp, but the phase is allready effected quite a bit lower than the cross over for the amplitude.
Another problem is that with generating fine frequency steps DDS like with non integer phase steps will modulate the amplitude at the peaks. The maximum level reached can vary and thus give nasty looking amplitde modulation even if the harmonics would be all OK. So a good triangle needs a few 100 samples per period, while DDS sine works OK with some 4 points for a period.
So the ramps / trangle waveform will look rather uggly allready at relatively low frequency. Even though the harminc contence is not large it is enough to be noted.

Analog genration of a ramp is easy in comparison, but in the simple form the frequency is not very stable.
Title: Re: Low frequency ramps everywhere!
Post by: David Hess on April 19, 2021, 05:08:18 pm
Like square waves, triangle waves place considerable demands on the output amplifier above the fundamental frequency and wide output range wideband amplifiers are not trivial, which is why function generators are commonly limited to 2 MHz and lower.  20 to 40 MHz function generators are the exception and considerable can be learned by studying how there output amplifiers are designed and implemented.  I am not even sure how to implement their output amplifiers anymore due to lack of availability of PNP RF transistors.
Title: Re: Low frequency ramps everywhere!
Post by: radiolistener on April 19, 2021, 06:10:46 pm
There are a lot of serious limitations for ramp generation, for example:

1) it needs much higher sample rate for DAC at least 100-200 times faster than the ramp frequency. If you want to get 10 MHz ramp, then you needs to use about 10*100 = 1 GHz DAC and expensive FPGA which allows to drive it at GHz frequency.

2) the ramp waveform has a very wide bandwidth, so the generator output antialiasing filter cut-off should be very high, as result it also requires very high speed DAC to prevent aliasing.

3) output amplifier needs to be very wide range in order to avoid ramp distortion. This is also very complicated.

1-2 GHz DAC with good linearity and interpolation is very expensive and requires very expensive high speed FPGA to control it. A good power amplifier with a good linearity and low distortions for so wide bandwidth is also very expensive.
Title: Re: Low frequency ramps everywhere!
Post by: DL2XY on April 19, 2021, 07:13:23 pm
How about that?

50Mhz sawtooth from SDG6052 in ARB Mode.
The residual distortion is mostly from scope interpolation.

(https://www.eevblog.com/forum/testgear/low-frequency-ramps-everywhere!/?action=dlattach;attach=1212805)
Title: Re: Low frequency ramps everywhere!
Post by: jonpaul on April 19, 2021, 08:03:43 pm
Tektronix FG 504 plugin for TM500 series  goes to 40 MHz as a sine,  but is still triangle at 20 MHz.

Jon
Title: Re: Low frequency ramps everywhere!
Post by: Kleinstein on April 19, 2021, 08:44:13 pm
For old analog function generators it was common ta have the triangel wave also to relatively high frequencies. They often made a sine via triangel and nonlinear wave shaping. So they needed the good tringle anyway. In addition at the time many scope were less powerfull and thus less picky users.  :-DD

In the old days there where fast PNP ouput transistors, which are rare by now.
Many modern genrators just use fast amplifier chips and thus may compromise on the maximum amplitude. There are crazy fast OPs by now.
If really needed, one can build an amplifier also with only NPNs.
Title: Re: Low frequency ramps everywhere!
Post by: David Hess on April 19, 2021, 11:32:14 pm
How about that?

50Mhz sawtooth from SDG6052 in ARB Mode.
The residual distortion is mostly from scope interpolation.

But look at the pitifully small amplitude.

My FG502 generates a 10 MHz triangle wave with a 10 volts peak-to-peak amplitude, and that is before 5 volts of offset is applied making the output range is +/-10 volts.  So even with double termination, the entire range of 5 volt logic, or negative 5 volt logic if using ECL, is covered.

My 2 MHz function generators have the same output range.

That also means that my function generators can directly drive a power MOSFET through saturation and cutoff.
Title: Re: Low frequency ramps everywhere!
Post by: Anthocyanina on April 20, 2021, 12:14:05 am
Some signal generators use the triangle wave as the basis for the sine wave output, for example the old HP 8116A.  So they provide a 50MHz sine and triangle function, although at 50MHz the triangle is pretty rounded. 
Hi! this is one of the things that also made me wonder about that. when i built a generator using a 555 timer, i used integrators to get different waveforms at the output. integrating the square wave gives me the triangular wave and integrating that one gives me a parabola that looks pretty much like a sine wave, and of course, that generator is really low frequency, goes up to a few kilohertz, but the idea behind it i thought still made sense in real function generators, to get a ramp just generate a pwm square and integrate that to get whatever ramp you needed, I mean, now i know it's not like that that they generate ramps.

I suspect the reason that higher frequency ramp functions aren't included is that they are difficult to generate cleanly at those high frequencies and there's not any actual use for them.  The ones that do include a higher frequency triangle wave seem to either have it as part of the internal system anyway or else they've just thrown it in there (FeelTech).  So the Siglent could not match your Pico triangle wave at 2.5MHz unless you loaded in an ARB file for it.  They could just load it in their standard ARB files, but the fact that they haven't seems to indicate nobody is asking for it.

So it makes sense the reason we don't see that many generators with high frequency ramps is a combination of it being difficult to generate and also pretty much useless to do so at higher frequencies?

Thank you!
Title: Re: Low frequency ramps everywhere!
Post by: Anthocyanina on April 20, 2021, 12:17:57 am
Do you have a use case for such a ramp waveform at frequencies above 1 MHz? 

I don't really need ramps at all, haven't needed to use them outside a couple of classes really. I just found this so strange that ramps were so low frequency compared to any other function the function generators offer that I was wondering why that was the case. Thank you!
Title: Re: Low frequency ramps everywhere!
Post by: tautech on April 20, 2021, 02:44:24 am
How about that?

50Mhz sawtooth from SDG6052 in ARB Mode.
The residual distortion is mostly from scope interpolation.

But look at the pitifully small amplitude.
:-//
5 MHz 2mv to 20V p-p into HiZ in Ramp mode.
20 MHz 2mV to 20V p-p into HiZ in Arb mode.
20-50 MHz 2mV to 10V p-p into HiZ in Arb mode.
Max Offset +10V
https://siglentna.com/wp-content/uploads/dlm_uploads/2018/04/SDG6000X_DataSheet_DS0206X-E02B.pdf
Title: Re: Low frequency ramps everywhere!
Post by: DL2XY on April 20, 2021, 05:46:21 am
How about that?

50Mhz sawtooth from SDG6052 in ARB Mode.
The residual distortion is mostly from scope interpolation.

But look at the pitifully small amplitude.

My FG502 generates a 10 MHz triangle wave with a 10 volts peak-to-peak amplitude, and that is before 5 volts of offset is applied making the output range is +/-10 volts.  So even with double termination, the entire range of 5 volt logic, or negative 5 volt logic if using ECL, is covered.

My 2 MHz function generators have the same output range.

That also means that my function generators can directly drive a power MOSFET through saturation and cutoff.

It due to limitation of scope input. At this frequencies its a must to use 50 \$\Omega\$ terminated inputs but 20Vpp would overload the internal  termination resistor.
Of course the AWG can do this.
Title: Re: Low frequency ramps everywhere!
Post by: radiolistener on April 20, 2021, 07:56:55 am
How about that?

50Mhz sawtooth from SDG6052

SDG6052 uses DAC working at 2400 MHz
Title: Re: Low frequency ramps everywhere!
Post by: David Hess on April 20, 2021, 05:47:04 pm
It due to limitation of scope input. At this frequencies its a must to use 50 \$\Omega\$ terminated inputs but 20Vpp would overload the internal  termination resistor.
Of course the AWG can do this.

I wonder how they designed their output amplifier then.  Of course modern instruments lack those details.  I am used to seeing modern function generators that only have half of the output range of my old ones.

I have been thinking of doing one using lots of smaller high frequency transistors in parallel, and maybe series to get the needed voltage range.  It is difficult to believe that 1+ GHz 35 volt PNP transistors used to be a stocked item.
Title: Re: Low frequency ramps everywhere!
Post by: bdunham7 on April 20, 2021, 06:48:13 pm
I wonder how they designed their output amplifier then. 

Something like this?

https://www.ti.com/product/THS3491 (https://www.ti.com/product/THS3491)
Title: Re: Low frequency ramps everywhere!
Post by: David Hess on April 21, 2021, 12:37:12 am
I wonder how they designed their output amplifier then.

Something like this?

https://www.ti.com/product/THS3491 (https://www.ti.com/product/THS3491)

It cannot be with that maximum supply voltage limiting the output voltage range.

Title: Re: Low frequency ramps everywhere!
Post by: Kleinstein on April 22, 2021, 07:36:55 am
Because of the limited voltage of fast OPs many RF outputs are limited in voltage / power.  With a +-15 V supply one may get up to some 20 V_pp into high impedance and thus 10 V_pp into a terminated output. This may still be sufficient to damage a sensitive Rf input  :-DD.

One can build an RF output amplifier with NPN transistors only - there is no absolute need for a PNP.

If one does not need operation down to DC, there is the option to use output transformers and than even those slightly higher current RF OPs are an option.
Title: Re: Low frequency ramps everywhere!
Post by: bdunham7 on April 22, 2021, 02:29:01 pm
It cannot be with that maximum supply voltage limiting the output voltage range.

The op-amp I listed is actually used in function generators and can supply up to 28Vp-p with 32V total supply voltage.  This was used as an upgrade for the (in)famous FeelTech cheapo AWG.  TI actually has a reference design that parallels these for more power, I suppose they could be bridged as well.

The SDG6052 that was shown putting out nice 50MHz triangle waves probably uses something more expensive and exotic, but that is a $5000 unit with 500MHz bandwidth.  If I understand the spec correctly, it could put those 50MHz triangle waves out at 10Vp-p into a 50 ohm load.
Title: Re: Low frequency ramps everywhere!
Post by: David Hess on April 22, 2021, 07:36:12 pm
It cannot be with that maximum supply voltage limiting the output voltage range.

The op-amp I listed is actually used in function generators and can supply up to 28Vp-p with 32V total supply voltage.  This was used as an upgrade for the (in)famous FeelTech cheapo AWG.  TI actually has a reference design that parallels these for more power, I suppose they could be bridged as well.

The SDG6052 that was shown putting out nice 50MHz triangle waves probably uses something more expensive and exotic, but that is a $5000 unit with 500MHz bandwidth.  If I understand the spec correctly, it could put those 50MHz triangle waves out at 10Vp-p into a 50 ohm load.

So it can.  Somehow I downloaded and then read the datasheet wrong.  And they show an application with two in parallel to provide a 50 ohm output.
Title: Re: Low frequency ramps everywhere!
Post by: tautech on April 22, 2021, 07:48:58 pm
It cannot be with that maximum supply voltage limiting the output voltage range.

The SDG6052 that was shown putting out nice 50MHz triangle waves probably uses something more expensive and exotic, but that is a $5000 unit with 500MHz bandwidth.
Same HW as SDG6022X.  ;)

Quote
If I understand the spec correctly, it could put those 50MHz triangle waves out at 10Vp-p into a 50 ohm load.
No, 10V p-p to 20 MHz in Arb mode and 5V p-p from 20-50 MHz into 50 Ohm.
You need follow the subscript and check the condition where HiZ output is halved into 50 Ohm loads.

Using Wave Combine may provide for better output  drive but I haven't checked that.
Title: Re: Low frequency ramps everywhere!
Post by: DL2XY on April 22, 2021, 09:54:20 pm
Cheating the automatic level limitation by putting out a five period sawtooth with 10MHz shows that the output amplifier is quite able to reproduce 50MHz/10Vpp@50\$\Omega\$.
(https://www.eevblog.com/forum/testgear/low-frequency-ramps-everywhere!/?action=dlattach;attach=1213858)


Even 20Vpp (without external termination) looks reasonable but with slight distortion due to reflections.
(https://www.eevblog.com/forum/testgear/low-frequency-ramps-everywhere!/?action=dlattach;attach=1213860)
Title: Re: Low frequency ramps everywhere!
Post by: rf-loop on April 23, 2021, 05:59:46 am
Why function generators have so limited ramp frequency.

Over and over again years after years I meet peoples wondering why ramp functions freq are so limited. There is reasons. Also some times some may tell that why this and that have higher ramp max freq than this other. Specially if we do not care anything, we can set these limits as high as salespersons want, for ads and brochures. Specially some cheap toys have used this, including also some times square.

Now many have showed triangle how this and that can generate higher freq triangle than triangle function is limited, using example generator Arb wfm. Triangle is very easy. All can do fast triangle. But triangle is just special case in ramp waves, integral of square wave having only odd harmonics.

Generator ramp function also can generate this special case triangle. If ramp function is named as triangle and it can generate only triangle and we promise some quite easy linearity, then can set limit more high. Example in SDG6000X this "Ramp" limit is set for 5MHz. Of course it can set also higher.
I have made previously also with SDG1000X some experimental tests. It have factory limit 500kHz and I have rised it lot. It can do. Quite easy. But what happen when rise this limit. With higher frequency it can not anymore keep linearity. But much higher than 500kHz still this special case of ramp function, triangle, can do much higher than 500kHz without problems. And same is naturally with SDG6000X. Triangle is not problem.

As said, triangle is special case. Generator can produce all kind sawtooth ramp waves and this wave is much more difficult and this is main reason why this function max freq. is limited so low.   It depends lot of how good linearity we want. Many times these ramps are used for purposes where linearity need be good. Also afaik mostly  with these needs we do not need so high frequencies. For what you use ramp?  What is real need for its speed?  If not need good linearity, for what you need at all this function in practice. I mean serious needs and not playing.

If now test things using triangle, it is nearly like nonsense if we talk about function generator ramp fuunction what can produce all starting from most challenging fast edge sawtooth and up to most easy triangle.
Example if SDG6000X run with 5MHz ramp and set 0.5% symmetry it mean 1ns total time for rise from bottom to top and then start linear ramp down using 199ns. (no it can not do it clean, not even 1% symmetry)  many times we accept square wave bottom and top 10% is nearly what ever rounded, ringing etc. But when we look sawtooth... suddenly we do not accept and we want it is nice and clean like in student books.
With 50% symmetry it is triangle, integral of pure square including only odd harmonics. It have quite low level higher freq harmonics and only odd. 1% symmetry high amount of harmonics, and both, even and odd harmonics with SDG6000X over 500MHz. 100th harmonic and still it is far from perfect.

Long to short.
Generators Ramp function limit is mainly not based to just triangle. So if test and demonstrate something related to it, then need remember that triangle is easy and problems start with sawtooth signals and ramp function need cover these all.
If really need faster triangle, for this can use Arb, example in SDG6000X there is factory made triangle what can find in Windows functions and limit is 50MHz but linearity is "as is". Even this is not limit, you can do own faster, double triangle in one Arb wfm and you can get 100MHz "triangle" and so on.

Perhaps this also explain something. Image links to wiki.
https://en.wikipedia.org/wiki/Triangle_wave   
https://en.wikipedia.org/wiki/Sawtooth_wave

(https://upload.wikimedia.org/wikipedia/commons/d/d4/Synthesis_sawtooth.gif)
(https://upload.wikimedia.org/wikipedia/commons/b/bb/Synthesis_triangle.gif)

N=number of harmonics
note, triangle have only odd harmonics, saw tooth need even and odd harmonics. So number of harmonics is double (same freq band).
Title: Re: Low frequency ramps everywhere!
Post by: Anthocyanina on April 23, 2021, 08:54:30 am

As said, triangle is special case. Generator can produce all kind sawtooth ramp waves and this wave is much more difficult and this is main reason why this function max freq. is limited so low.   It depends lot of how good linearity we want. Many times these ramps are used for purposes where linearity need be good. Also afaik mostly  with these needs we do not need so high frequencies. For what you use ramp?  What is real need for its speed?  If not need good linearity, for what you need at all this function in practice. I mean serious needs and not playing.

Hi! I was asking just out of curiosity, i found it strange that it was the function specified at the lowest frequency in pretty much all function generators i saw, and I wanted to understand why, not asking because of a particular need or anything.

Long to short.
Generators Ramp function limit is mainly not based to just triangle. So if test and demonstrate something related to it, then need remember that triangle is easy and problems start with sawtooth signals and ramp function need cover these all.
If really need faster triangle, for this can use Arb, example in SDG6000X there is factory made triangle what can find in Windows functions and limit is 50MHz but linearity is "as is". Even this is not limit, you can do own faster, double triangle in one Arb wfm and you can get 100MHz "triangle" and so on.

Perhaps this also explain something. Image links to wiki.
https://en.wikipedia.org/wiki/Triangle_wave   
https://en.wikipedia.org/wiki/Sawtooth_wave

note, triangle have only odd harmonics, saw tooth need even and odd harmonics. So number of harmonics is double (same freq band).

Oooh, I totally forgot about the gibbs phenomenon! :palm: didn't see any of it with my pico and resistor DAC when i was looking at the 0 and 100% ramps! but i did notice the transitions were too smooth at the top. And then again, this is how the ramp looks like on an 8$ microcontroller+R2R DAC on a breadboard! but of course, if there is no practical use for higher frequency ramps, i understand manufacturers not going to the trouble of specifying them at higher frequencies.

Thank you!
Title: Re: Low frequency ramps everywhere!
Post by: David Hess on April 23, 2021, 11:19:00 am
Old analog function generators handled it in two different ways.  One was to generate ramps by using the triangle output with the symmetry control set to maximum, but other instruments had two additional waveforms for positive and negative ramps, and these typically also divided the output frequency by 10 which allows for a much greater asymmetry.