Author Topic: Most accurate signal generator  (Read 12105 times)

0 Members and 2 Guests are viewing this topic.

Offline loop123Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 297
  • Country: ca
Re: Most accurate signal generator
« Reply #75 on: March 31, 2024, 10:53:58 pm »
Aha, just do as I wrote before: get an RF step attenuator (like this one from Aliexpress: https://nl.aliexpress.com/item/32905603744.html ) and connect it between the generator output and the ADC. You'll need to terminate the step attenuator with 50 Ohm so you'll need a 50 Ohm feedthrough terminator.

I figured out the sine waves noises don't merge into one another because they don't affect the past. And at 1kHz amplifier setting. The noises of 50Hz vs 900Hz is identical because making it pulse faster (higher frequency below 1kHz) doesn't produce more noise. And I want to test this.

I'm in the process of buying a RF attenuator. Which one should I choose in the following? Supposed my signal is 1V and I want to convert it to 10uV. What would happen if I choose the 30dB model vs 90dB model? Please show what would happen to the 1V original amplitude. And in the picture of the unit at left of screenshot. What button or number should I press? What does SMA vs N mean?  And the frequency is so high at 3Ghz. My frequency only audio range at most. And lastly. Is the 50 Ohm feedthrough terminator you mentioned above just an originary 50 Ohm resistor? Thanks!

2091320-0
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26918
  • Country: nl
    • NCT Developments
Re: Most accurate signal generator
« Reply #76 on: April 01, 2024, 10:59:10 am »
I'd go for the 90dB model. You can fine adjust the level on the function generator.

For a feedthrough terminator you can use something like this:
https://nl.aliexpress.com/item/32661228102.html

There are some threads on this forum where you might find better (all metal enclosure) 50 Ohm BNC feedthroughs (or SMA version). Another option is to use an SMA T-piece and SMA 50 Ohm terminator. At 1kHz it doesn't matter, good shielding is what you need.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline Aldo22

  • Frequent Contributor
  • **
  • Posts: 697
  • Country: ch
Re: Most accurate signal generator
« Reply #77 on: April 01, 2024, 11:12:57 am »
Why does he need such an expensive attenuator?
Wouldn't one of these be enough (e.g. 40dB)?

https://www.aliexpress.com/item/1005006197857889.html
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26918
  • Country: nl
    • NCT Developments
Re: Most accurate signal generator
« Reply #78 on: April 01, 2024, 11:33:24 am »
That is an option but the step attenuator allows to make many different levels quickly which is handy while experimenting.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 
The following users thanked this post: Aldo22

Online gf

  • Super Contributor
  • ***
  • Posts: 1189
  • Country: de
Re: Most accurate signal generator
« Reply #79 on: April 01, 2024, 12:16:58 pm »
I figured out the sine waves noises don't merge into one another because they don't affect the past. And at 1kHz amplifier setting. The noises of 50Hz vs 900Hz is identical because making it pulse faster (higher frequency below 1kHz) doesn't produce more noise. And I want to test this.

Sorry, I can't follow your thoughts. What do you mean with "noises of 50HZ vs. 900Hz"? You have noise, and you have your wanted signal. Just consider them as two independent signals. At the end, noise and wanted signal simply add up. The noise does not change if your wanted signal changes. You don't get a "different noise" if your wanted signal is 50Hz or 900Hz.

Nevertheless keep in mind that your noise is not white, but your amplifier also suffers from 1/f noise at low frequencies, and that you deal with bandwidth-limited noise (~1kHz). Both imply that your noise is not independent and identically distributed, but it is autocorrelated. So the deformation of the waveform due to noise (if you zoom-in) will definitively look different for a 50Hz sine wave signal and for a 900Hz sine wave signal. I have attached example plots for 1kHz-bandlimited (2nd order Butterworth) white noise and 12dB SNR. Note that for the 900Hz signal, the noise mostly affects the envelope. Keep in mind that these plots are still not represenative for the noise of your amplifier.

To get a more representative picture, can't you record the noise floor of your USBamp (e.g. with Audacity, as you already did it with your other amplifier) and then use Audacity to add an artificial sine wave signal to the recorded noise in order to see what you would get?

Quote
Supposed my signal is 1V and I want to convert it to 10uV.

That's a factor of 100,000 or in other words 20*log10(100000) = 100dB.

Quote
What button or number should I press?

The enabled stages simply add up. Example: If you turn on 20+16+2, then you get 38 dB.

That is an option but the step attenuator allows to make many different levels quickly which is handy while experimenting.

The OP was very much focused on accuracy. The chosen step attenuator is likely not a precision device. I wonder what total accumulated uncertainty can be achieved for the involved components (generator's no-load voltage, generator's output impedance, 8 attenuator stages, and the terminator impedance).  I have doubts that we are still within 1% at the end.
 
The following users thanked this post: Performa01, egonotto, loop123

Offline Protegimus

  • Contributor
  • Posts: 27
  • Country: gb
Re: Most accurate signal generator
« Reply #80 on: April 01, 2024, 02:45:50 pm »
I know it blows your budget in this instance, but longer term you could look to something like the QuantAsylum QA403
https://quantasylum.com/collections/frontpage/products/qa403-audio-analyzer
Very high specification for very reasonable money.
 

Offline loop123Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 297
  • Country: ca
Re: Most accurate signal generator
« Reply #81 on: April 01, 2024, 10:03:22 pm »
I figured out the sine waves noises don't merge into one another because they don't affect the past. And at 1kHz amplifier setting. The noises of 50Hz vs 900Hz is identical because making it pulse faster (higher frequency below 1kHz) doesn't produce more noise. And I want to test this.

Sorry, I can't follow your thoughts. What do you mean with "noises of 50HZ vs. 900Hz"? You have noise, and you have your wanted signal. Just consider them as two independent signals. At the end, noise and wanted signal simply add up. The noise does not change if your wanted signal changes. You don't get a "different noise" if your wanted signal is 50Hz or 900Hz.

Nevertheless keep in mind that your noise is not white, but your amplifier also suffers from 1/f noise at low frequencies, and that you deal with bandwidth-limited noise (~1kHz). Both imply that your noise is not independent and identically distributed, but it is autocorrelated. So the deformation of the waveform due to noise (if you zoom-in) will definitively look different for a 50Hz sine wave signal and for a 900Hz sine wave signal. I have attached example plots for 1kHz-bandlimited (2nd order Butterworth) white noise and 12dB SNR. Note that for the 900Hz signal, the noise mostly affects the envelope. Keep in mind that these plots are still not represenative for the noise of your amplifier.

What is meant by bandwidth-limited noise at ~1kHz. I googled it but the articles not even clear. At what frequencies do the bandwidth-limited noise does not dictate anymore? meaning when noises would be white and would appear identical at that  frequency vs 900Hz?  Also you mean 50Hz fall under the 1/f pink noise? At what frequencies would it no longer ruled by 1/f noise?

I still don't own the $3000 software of the USBamp so can't test it with input shorted. Also it's completely software based with usb output and not like the analog output of the other one (BMA). How can you test Referred to Input noise with something like in the following software??

2092544-0

The above uses sine wave generator of 10uV, 50Hz. My Netech generator only has up to 0.1Hz, 2Hz, 5Hz, 50Hz, 60Hz output, none above. This is reason I was asking what noise would look like at 900Hz because I'd like to know how resolvable the peaks are and whether worth it spend $3000 on their software. In your waveforms, why does your 900Hz no longer have the same noise as  your 50Hz? Because 900Hz are no longer have bandwidth limited noise and no longer dominated by 1/f?  You mean if the my simulator can produce 900Hz, 10uV. The noises would be like your 900Hz?


Quote
To get a more representative picture, can't you record the noise floor of your USBamp (e.g. with Audacity, as you already did it with your other amplifier) and then use Audacity to add an artificial sine wave signal to the recorded noise in order to see what you would get?

Quote
Supposed my signal is 1V and I want to convert it to 10uV.

That's a factor of 100,000 or in other words 20*log10(100000) = 100dB.

Quote
What button or number should I press?

The enabled stages simply add up. Example: If you turn on 20+16+2, then you get 38 dB.

That is an option but the step attenuator allows to make many different levels quickly which is handy while experimenting.

The OP was very much focused on accuracy. The chosen step attenuator is likely not a precision device. I wonder what total accumulated uncertainty can be achieved for the involved components (generator's no-load voltage, generator's output impedance, 8 attenuator stages, and the terminator impedance).  I have doubts that we are still within 1% at the end.
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26918
  • Country: nl
    • NCT Developments
Re: Most accurate signal generator
« Reply #82 on: April 01, 2024, 10:41:19 pm »
That is an option but the step attenuator allows to make many different levels quickly which is handy while experimenting.

The OP was very much focused on accuracy. The chosen step attenuator is likely not a precision device. I wonder what total accumulated uncertainty can be achieved for the involved components (generator's no-load voltage, generator's output impedance, 8 attenuator stages, and the terminator impedance).  I have doubts that we are still within 1% at the end.
Realistically: with the OP's limited budget reasonable accuracy (say 0.1%) is going to be impossible to achieve. And from OP's recent posts it becomes clear that the question is not about accuracy at all but signal to noise ratio. But even then, with some effort and an sensitive AC voltmeter, you can measure the input & output voltage of the attenuator and adjust the generator's level to compensate for the actual attenuation. All in all it should be possible to get 1% or better accuracy using this setup. It just takes calibration. Only real problem is temperature drift. Keep in mind that fixed RF attenuators may have an accuracy +/-0.5 dB (or even worse if I take a quick look at Mini Circuits' products). +/- 0.5dB is over +/- 5% in amplitude error.
« Last Edit: April 01, 2024, 10:43:42 pm by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline JeremyC

  • Regular Contributor
  • *
  • Posts: 143
  • Country: us
Re: Most accurate signal generator
« Reply #83 on: April 02, 2024, 12:21:52 am »
I think SDG6022X signal accuracy should be good enough for amateur needs.
https://siglentna.com/product/sdg6022x/

But its performance is not the best. So, if you want better performance, there is may be a sense to look for some specialized signal generator for your needs?

What do you mean when talking "most accurate"? Less noise / less spurs / high dynamic range? 

If you're interested in precise amplitude, then there is a sense to look for RF generator. They have pretty clean sine output and allows to setup calibrated amplitude. But note, all signal generators have fixed output impedance, usually 50 Ω (sometimes there is a switch between 50 Ω and 600 Ω). And if your load is not 50 Ω, then you're needs to recalculate amplitude, that is normal and expected behavior.

The use is specifically to test the E1DC Cosmos ADC to see if for example it's 0dB corresponds to 1.7V or 1.8V in its lowest setting (with best dynamic range). Just to test its overall accuracy. My present 2 signal generators don't even produce output where I can be certain it's 1V or 1.5V for example. So I need one where I can produce accurate 1.7V or 1.8V to see which voltage would clip it and establish the baseline because different units vary according to the manufacturer. I didn't know choosing signal generator is that complicated that is why didn't post the entire picture below in the original message. In the following is the -128dB noise floor of my E1DA I tested using REW RTA. My budget for the stand alone signal generator is less than $200. Please recommend which one specifically I should get knowing my requirements. Thanks.

Why you are not using the signal generator from the REW suite? I'm guessing DAC in your computer is 24bit and in theory you have 144dB dynamic range.

Link to documentation: https://www.roomeqwizard.com/help/help_en-GB/html/siggen.html#top
« Last Edit: April 02, 2024, 12:59:13 am by JeremyC »
 

Offline loop123Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 297
  • Country: ca
Re: Most accurate signal generator
« Reply #84 on: April 02, 2024, 02:34:52 am »
I think SDG6022X signal accuracy should be good enough for amateur needs.
https://siglentna.com/product/sdg6022x/

But its performance is not the best. So, if you want better performance, there is may be a sense to look for some specialized signal generator for your needs?

What do you mean when talking "most accurate"? Less noise / less spurs / high dynamic range? 

If you're interested in precise amplitude, then there is a sense to look for RF generator. They have pretty clean sine output and allows to setup calibrated amplitude. But note, all signal generators have fixed output impedance, usually 50 Ω (sometimes there is a switch between 50 Ω and 600 Ω). And if your load is not 50 Ω, then you're needs to recalculate amplitude, that is normal and expected behavior.

The use is specifically to test the E1DC Cosmos ADC to see if for example it's 0dB corresponds to 1.7V or 1.8V in its lowest setting (with best dynamic range). Just to test its overall accuracy. My present 2 signal generators don't even produce output where I can be certain it's 1V or 1.5V for example. So I need one where I can produce accurate 1.7V or 1.8V to see which voltage would clip it and establish the baseline because different units vary according to the manufacturer. I didn't know choosing signal generator is that complicated that is why didn't post the entire picture below in the original message. In the following is the -128dB noise floor of my E1DA I tested using REW RTA. My budget for the stand alone signal generator is less than $200. Please recommend which one specifically I should get knowing my requirements. Thanks.

Why you are not using the signal generator from the REW suite? I'm guessing DAC in your computer is 24bit and in theory you have 144dB dynamic range.

Link to documentation: https://www.roomeqwizard.com/help/help_en-GB/html/siggen.html#top

I used Microsoft Surface Pro 2017. How is its DAC? if bad. What external usb DAC can I get?
 

Offline radiolistener

  • Super Contributor
  • ***
  • Posts: 3392
  • Country: ua
Re: Most accurate signal generator
« Reply #85 on: April 02, 2024, 02:49:24 am »
You mean its difficult even to produce accurate 1.8V sine wave?  Is the voltage or sine wave more difficult to make or which one is more affected by a crystal/clock? usually what are the errors in crystal just to have an idea? but then if crystals vary how do wifi or cell phone even connect?

yes, it is difficult, especially if you're doing it with digital circuit. With analog circuit it is more easy, but still hard if you want to get very clean sine with low enough harmonics and distortion levels.

Precise voltage is not an issue for audio ADC. The issue is a level of distortions, noise and spurs.

In order to test your ADC, you can use two tone generator 700 Hz + 1900 Hz and see on FFT result.
You can easily see and measure distortion artifacts due to non linearity of ADC when using such two tone signal test.
And there is no needs to have precise voltage for such test.
For example, see pictures in this article: https://www.nxp.com.cn/docs/en/engineering-bulletin/EB38.pdf

But the issue here is to make clean enough signal generator which don't have distortions on the output within 170 dB for your tests... Such dynamic range is not trivial, so don't expect it from universal lab signal generators.

« Last Edit: April 02, 2024, 03:07:23 am by radiolistener »
 

Offline radiolistener

  • Super Contributor
  • ***
  • Posts: 3392
  • Country: ua
Re: Most accurate signal generator
« Reply #86 on: April 02, 2024, 03:11:25 am »
I'm guessing DAC in your computer is 24bit and in theory you have 144dB dynamic range.

I'm afraid there is no 24-bit DAC in the world which has 144 dB dynamic range  :-//
 
The following users thanked this post: egonotto

Offline JeremyC

  • Regular Contributor
  • *
  • Posts: 143
  • Country: us
Re: Most accurate signal generator
« Reply #87 on: April 02, 2024, 03:23:40 am »
I think SDG6022X signal accuracy should be good enough for amateur needs.
https://siglentna.com/product/sdg6022x/

But its performance is not the best. So, if you want better performance, there is may be a sense to look for some specialized signal generator for your needs?

What do you mean when talking "most accurate"? Less noise / less spurs / high dynamic range? 

If you're interested in precise amplitude, then there is a sense to look for RF generator. They have pretty clean sine output and allows to setup calibrated amplitude. But note, all signal generators have fixed output impedance, usually 50 Ω (sometimes there is a switch between 50 Ω and 600 Ω). And if your load is not 50 Ω, then you're needs to recalculate amplitude, that is normal and expected behavior.

The use is specifically to test the E1DC Cosmos ADC to see if for example it's 0dB corresponds to 1.7V or 1.8V in its lowest setting (with best dynamic range). Just to test its overall accuracy. My present 2 signal generators don't even produce output where I can be certain it's 1V or 1.5V for example. So I need one where I can produce accurate 1.7V or 1.8V to see which voltage would clip it and establish the baseline because different units vary according to the manufacturer. I didn't know choosing signal generator is that complicated that is why didn't post the entire picture below in the original message. In the following is the -128dB noise floor of my E1DA I tested using REW RTA. My budget for the stand alone signal generator is less than $200. Please recommend which one specifically I should get knowing my requirements. Thanks.

Why you are not using the signal generator from the REW suite? I'm guessing DAC in your computer is 24bit and in theory you have 144dB dynamic range.

Link to documentation: https://www.roomeqwizard.com/help/help_en-GB/html/siggen.html#top

I used Microsoft Surface Pro 2017. How is its DAC? if bad. What external usb DAC can I get?

You Surface Pro has USB 3 port and you can connect external DAC/ADC.
If high quality is required I would recommend the MOTU M2, or the Focusrite Scarlett 2i2 3rd or 4th gen. They are in $170 - $200 price range.
You may get from ebay inexpensive 16bit (96dB) for $12 - $20. If you decide for the inexpensive option then don’t install the software but use generic Windows driver.
Example link to e-bay: https://www.ebay.com/itm/401755911322?itmmeta=01HTED6688A2FY27CRRW68F852&hash=item5d8a84b49a:g:Kk0AAOSwAUlc63WW&itmprp=enc%3AAQAJAAABIC0MCrhyW6Eac1oLB8M%2BzA3WXXHO7mUdAbGQOUArG8kGJufeddaLXqm%2BQQ686ENb1DaWBuvAgAQZW72V87C7gVzOJndb0l3vNtnllshfIkth3e1uBbF2X9nO3z49pbST%2Bm1Nv5KQURU7J9mnuNZ0qpRNQbKB906LOvGbQ3pHFyBRtaaPDHivWKCc%2BBBvCh5ER8FcVQ19EfgD1KN9AWFj2WK8SfNbGm5f7q8qVEY0H0MpmxrJ65i5wYDTSdAvVxGqNjETazvRgumcTtTb%2BCMAoIIT64NKPdXI903%2B%2FEjuuN8%2F2fOFibsGLXp%2FuTCiFNJMquiqowzNfnDqwwImxJ0MTUaJxJsKiezCi43xf93H5jr4Q60Av09vE5K0FSSh%2BcQY%2Bg%3D%3D%7Ctkp%3ABFBMpuSYzdNj
 

Offline JeremyC

  • Regular Contributor
  • *
  • Posts: 143
  • Country: us
Re: Most accurate signal generator
« Reply #88 on: April 02, 2024, 03:34:16 am »
I'm guessing DAC in your computer is 24bit and in theory you have 144dB dynamic range.

I'm afraid there is no 24-bit DAC in the world which has 144 dB dynamic range  :-//

I agree, and that's why I wrote "in theory",  20 * log(2^24)=144
In reality those DACs have 110 - 120 dB dynamic range. My MOTU M2 for instance has 120dB.

In my opinion for audio work even 16bit sound card is more adequate than $1000 AWG.
 
The following users thanked this post: egonotto

Offline loop123Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 297
  • Country: ca
Re: Most accurate signal generator
« Reply #89 on: April 02, 2024, 05:34:27 am »
I figured out the sine waves noises don't merge into one another because they don't affect the past. And at 1kHz amplifier setting. The noises of 50Hz vs 900Hz is identical because making it pulse faster (higher frequency below 1kHz) doesn't produce more noise. And I want to test this.

Sorry, I can't follow your thoughts. What do you mean with "noises of 50HZ vs. 900Hz"? You have noise, and you have your wanted signal. Just consider them as two independent signals. At the end, noise and wanted signal simply add up. The noise does not change if your wanted signal changes. You don't get a "different noise" if your wanted signal is 50Hz or 900Hz.

Nevertheless keep in mind that your noise is not white, but your amplifier also suffers from 1/f noise at low frequencies, and that you deal with bandwidth-limited noise (~1kHz). Both imply that your noise is not independent and identically distributed, but it is autocorrelated. So the deformation of the waveform due to noise (if you zoom-in) will definitively look different for a 50Hz sine wave signal and for a 900Hz sine wave signal. I have attached example plots for 1kHz-bandlimited (2nd order Butterworth) white noise and 12dB SNR. Note that for the 900Hz signal, the noise mostly affects the envelope. Keep in mind that these plots are still not represenative for the noise of your amplifier.

To get a more representative picture, can't you record the noise floor of your USBamp (e.g. with Audacity, as you already did it with your other amplifier) and then use Audacity to add an artificial sine wave signal to the recorded noise in order to see what you would get?

Quote
Supposed my signal is 1V and I want to convert it to 10uV.

That's a factor of 100,000 or in other words 20*log10(100000) = 100dB.

Quote
What button or number should I press?

The enabled stages simply add up. Example: If you turn on 20+16+2, then you get 38 dB.

That is an option but the step attenuator allows to make many different levels quickly which is handy while experimenting.

The OP was very much focused on accuracy. The chosen step attenuator is likely not a precision device. I wonder what total accumulated uncertainty can be achieved for the involved components (generator's no-load voltage, generator's output impedance, 8 attenuator stages, and the terminator impedance).  I have doubts that we are still within 1% at the end.

What software did you use on your attached waveforms? Id like to try it. I still dont know the context of bandwidth limited noise and still puzzled. See my last message for my questions. Tnx.
 

Offline loop123Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 297
  • Country: ca
Re: Most accurate signal generator
« Reply #90 on: April 02, 2024, 07:02:02 am »
I figured out the sine waves noises don't merge into one another because they don't affect the past. And at 1kHz amplifier setting. The noises of 50Hz vs 900Hz is identical because making it pulse faster (higher frequency below 1kHz) doesn't produce more noise. And I want to test this.

Sorry, I can't follow your thoughts. What do you mean with "noises of 50HZ vs. 900Hz"? You have noise, and you have your wanted signal. Just consider them as two independent signals. At the end, noise and wanted signal simply add up. The noise does not change if your wanted signal changes. You don't get a "different noise" if your wanted signal is 50Hz or 900Hz.

Nevertheless keep in mind that your noise is not white, but your amplifier also suffers from 1/f noise at low frequencies, and that you deal with bandwidth-limited noise (~1kHz). Both imply that your noise is not independent and identically distributed, but it is autocorrelated. So the deformation of the waveform due to noise (if you zoom-in) will definitively look different for a 50Hz sine wave signal and for a 900Hz sine wave signal. I have attached example plots for 1kHz-bandlimited (2nd order Butterworth) white noise and 12dB SNR. Note that for the 900Hz signal, the noise mostly affects the envelope. Keep in mind that these plots are still not represenative for the noise of your amplifier.

Unless what you mean by bandwidth-limited noise (~1kHz)  is simply noise at bandwidth of 1kHz?  If so, then why did the jag lines disappear at 9kHz when you zoom them the same size? Remember they are supposed to have similar noise. If you produce these solely by software generator and out. What software is that? I'd like to try them.

2093057-0

2093063-1
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26918
  • Country: nl
    • NCT Developments
Re: Most accurate signal generator
« Reply #91 on: April 02, 2024, 08:49:57 am »
Regarding the bottom picture: The noise is there but the sampling frequency and/or bandwidth is too low to make noise appear as jagged edges. Run an FFT on both signals (using equal record lengths and sampling frequencies).
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline loop123Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 297
  • Country: ca
Re: Most accurate signal generator
« Reply #92 on: April 02, 2024, 08:57:21 am »
Regarding the bottom picture: The noise is there but the sampling frequency and/or bandwidth is too low to make noise appear as jagged edges. Run an FFT on both signals (using equal record lengths and sampling frequencies).

Why did gf make the sampling frequency unequal causing confusion. Please make them equal gf so they can be compared equally.
 

Online ebastler

  • Super Contributor
  • ***
  • Posts: 6512
  • Country: de
Re: Most accurate signal generator
« Reply #93 on: April 02, 2024, 09:16:30 am »
Regarding the bottom picture: The noise is there but the sampling frequency and/or bandwidth is too low to make noise appear as jagged edges. Run an FFT on both signals (using equal record lengths and sampling frequencies).

Why did gf make the sampling frequency unequal causing confusion. Please make them equal gf so they can be compared equally.

Jeesh, mate. The sampling rate obviously is the same in both diagrams: For the 50 Hz signal, one period takes about 1000 sample points. For the 900 Hz signal, on period takes about 56 sample points. What else do you want?

The plot for the 900 Hz signal is zoomed in on the horizontal axis, to fully resolve the 900 Hz signal. You see some added low-frequency noise, which causes the signal to wobble up and down. The higher-frequency noise, in the same rough range as the 900 Hz, is not as visible, and appears more like a phase jitter. There is obviously no noise at much higher frequencies than the 900 Hz, since the noise is bandwidth-limited to 1 kHz.
 
The following users thanked this post: egonotto, gf

Online gf

  • Super Contributor
  • ***
  • Posts: 1189
  • Country: de
Re: Most accurate signal generator
« Reply #94 on: April 02, 2024, 09:43:04 am »
Regarding the bottom picture: The noise is there but the sampling frequency and/or bandwidth is too low to make noise appear as jagged edges. Run an FFT on both signals (using equal record lengths and sampling frequencies).

It is the same noise in both plots. Therefore the spectrum of the noise floor is the same as well. Flat up to ~1kHz, then rolling off with 12dB/octave. The first plots adds a 50Hz sine wave to the noise, and the 2nd plot adds a 900Hz sine wave to the noise. However, time/div is different in both plots in order to fit 10 signal periods of 50Hz or 900Hz into the screen width.

[ The units of the x-axis are samples, at a sample rate of 48kSa/s, in both plots. ]
« Last Edit: April 02, 2024, 09:50:11 am by gf »
 
The following users thanked this post: egonotto

Online gf

  • Super Contributor
  • ***
  • Posts: 1189
  • Country: de
Re: Most accurate signal generator
« Reply #95 on: April 02, 2024, 10:03:50 am »
There is obviously no noise at much higher frequencies than the 900 Hz, since the noise is bandwidth-limited to 1 kHz.

In fact, the roll off was only 12dB/octave (2nd order Butterworth) beyond 1kHz. Still the effect of the resulting autocorrelation becomes clearly evident upon horizontal zoom-in. That's what I wanted to demonstrate, and I think that's also what the OP wanted to see (even if it diverges from his intuitive expectations).
 
The following users thanked this post: egonotto

Offline loop123Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 297
  • Country: ca
Re: Most accurate signal generator
« Reply #96 on: April 02, 2024, 10:05:51 am »
Regarding the bottom picture: The noise is there but the sampling frequency and/or bandwidth is too low to make noise appear as jagged edges. Run an FFT on both signals (using equal record lengths and sampling frequencies).

It is the same noise in both plots. Therefore the spectrum of the noise floor is the same as well. Flat up to ~1kHz, then rolling off with 12dB/octave. The first plots adds a 50Hz sine wave to the noise, and the 2nd plot adds a 900Hz sine wave to the noise. However, time/div is different in both plots in order to fit 10 signal periods of 50Hz or 900Hz into the screen width.

[ The units of the x-axis are samples, at a sample rate of 48kSa/s, in both plots. ]

They have same noises but isnt it the 2nd plot has more clean and more easily resolvable sine waves? doesn this mean it is better to make higher frequency signal to create cleaner sine waves?

Please tell me the software you used so I can play with it. 
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26918
  • Country: nl
    • NCT Developments
Re: Most accurate signal generator
« Reply #97 on: April 02, 2024, 10:19:09 am »
Regarding the bottom picture: The noise is there but the sampling frequency and/or bandwidth is too low to make noise appear as jagged edges. Run an FFT on both signals (using equal record lengths and sampling frequencies).

It is the same noise in both plots. Therefore the spectrum of the noise floor is the same as well. Flat up to ~1kHz, then rolling off with 12dB/octave. The first plots adds a 50Hz sine wave to the noise, and the 2nd plot adds a 900Hz sine wave to the noise. However, time/div is different in both plots in order to fit 10 signal periods of 50Hz or 900Hz into the screen width.

[ The units of the x-axis are samples, at a sample rate of 48kSa/s, in both plots. ]

They have same noises but isnt it the 2nd plot has more clean and more easily resolvable sine waves? doesn this mean it is better to make higher frequency signal to create cleaner sine waves?

Please tell me the software you used so I can play with it.
The 2nd plot isn't more clean! It has less samples. If you can dump the samples into a file and read it into an audio processing program (like Audacity which is free), you can do an FFT analysis. But make sure record an equal number of samples for each recording if you want to compare.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Online ebastler

  • Super Contributor
  • ***
  • Posts: 6512
  • Country: de
Re: Most accurate signal generator
« Reply #98 on: April 02, 2024, 10:23:52 am »
They have same noises but isnt it the 2nd plot has more clean and more easily resolvable sine waves? doesn this mean it is better to make higher frequency signal to create cleaner sine waves?

If you know that your signal has 50 Hz frequency (or if you are only interested in the 50 Hz component), you should send the signal through a narrow bandpass filter before detecting or analyzing it. This will get rid of most of the noise at lower and higher frequencies.

50 Hz specifically is not a great choice in this part of the world, however, because it is the mains frequency -- so background hum with that frequency is very easily picked up. Even if your mains is at 60 Hz, I would suggest to stay further away from that frequency, since very narrow (and steep) bandpass filters are difficult beasts.
 

Online gf

  • Super Contributor
  • ***
  • Posts: 1189
  • Country: de
Re: Most accurate signal generator
« Reply #99 on: April 02, 2024, 10:25:34 am »
Please tell me the software you used so I can play with it.

I prefer to use GNU Octave for mathematical calculations. But it is a programming language, i.e. you need to program the underlying calculations. You don't get these plots out of the box with a few clicks. I'm not sure if it is the right tool for you.

You already used Audacity. AFAIK, it contains all building blocks to do it (signal generator, noise generator, filters).
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf