Author Topic: Rigol DHO914S Bode plot  (Read 35953 times)

Grandchuck, asmi and 7 Guests are viewing this topic.

Online gf

  • Super Contributor
  • ***
  • Posts: 1401
  • Country: de
Re: Rigol DHO914S Bode plot
« Reply #250 on: December 13, 2024, 11:42:45 am »
Not so bad, right? :)
What frequency span did your RLC Bode cover?
Obviously you did sweep the frequency, but the actual frequency steps are not visible in the measured freq.
Your freq measurement obviously gives a quantized result with not very good resolution.
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5473
  • Country: va
Re: Rigol DHO914S Bode plot
« Reply #251 on: December 13, 2024, 11:59:46 am »
None freq span yet, all just at a "fixed generator" frequency (the x axis is the measurement number). The variable frequency is the next step..
Perhaps this weekend, waiting on the Sunday Afternoon..  :P

Below the 3.57MHz crystal, the HP generator set to resonance freq at the beginning, you may see how the generator slowly drifted off the resonance and the mag dropped suddenly. It is not visible on the freq as the xFREQ returned by the scope is coarse (that freq is derived from the waveforms measurement perhaps).
The scope's "counter" is much more precise, but not readable (it is a hw counter inside, it just shows a number on the display when enabled).

PS: as you may see the frequency measured by the scope jumps between two quantum levels, that is because a similar DS1062CA is running on the other side of the Universe and the two are quantum entanglemented.. This project is using AI and QC, btw..  ;D
« Last Edit: December 13, 2024, 12:10:01 pm by iMo »
Readers discretion is advised..
 

Online gf

  • Super Contributor
  • ***
  • Posts: 1401
  • Country: de
Re: Rigol DHO914S Bode plot
« Reply #252 on: December 13, 2024, 12:19:28 pm »
None freq span yet, all just at a "fixed generator" frequency

So the deviation in the 2nd plot from a horizontal noise band (like in the first plot) is drift, not a controlled sweep?
Do you get lower drift with the digital generator? Why do you use the analog one at all?
« Last Edit: December 13, 2024, 12:37:04 pm by gf »
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5473
  • Country: va
Re: Rigol DHO914S Bode plot
« Reply #253 on: December 13, 2024, 12:47:59 pm »
Yep, that is the small drift of the generator around the resonance peak.

I am not using my DDS generator (in the case above) because it starts at around 100kHz and that is too high frequency for elaborating the basics.

The first step is to understand how the math, the code and the scope work, the next step is to start to mess with variable generators on higher frequencies where there are X other parasitics which will mess up with results.
Therefore I wanted to finetune the math and the code at lowest possible frequency without too much care on coaxes, shielding, leakages, etc. Therefore the RLC at 4kHz and none DDS at this stage..

I have several other DDS boards (ie. one pcb still not populated with the ADI's 9912 - 0..500Mhz, 14bit DAC, 48bit tuning word, the chip is waiting for perhaps 15years in the box already) I may reuse, what it needs is a small mcu to pass the tuning word off the python via serial into the DDS. That will be the next step.
« Last Edit: December 13, 2024, 01:08:50 pm by iMo »
Readers discretion is advised..
 

Offline mrisco

  • Regular Contributor
  • *
  • Posts: 133
  • Country: pe
    • Github repo
Re: Rigol DHO914S Bode plot
« Reply #254 on: December 13, 2024, 01:24:26 pm »
The scope's "counter" is much more precise, but not readable (it is a hw counter inside, it just shows a number on the display when enabled).

Code: [Select]
:COUNter:SOURce CHAN1
:COUNter:NDIGits 6
:COUNter:ENABle 1
:COUNter:CURRent?
DHO800-900 Extended UI: https://youtu.be/mT4ivaMY7zg
 

Online Fungus

  • Super Contributor
  • ***
  • Posts: 17465
  • Country: 00
Re: Rigol DHO914S Bode plot
« Reply #255 on: December 13, 2024, 02:19:45 pm »
The scope's "counter" is much more precise, but not readable (it is a hw counter inside, it just shows a number on the display when enabled).

My copy of the manual says:
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5473
  • Country: va
Re: Rigol DHO914S Bode plot
« Reply #256 on: December 13, 2024, 04:23:47 pm »
Yep, the COUNTER in DHO804 which shall arrive till end of this year :)
But I've been using its older brother..

BTW., the owners of the DHO800/900 may start with experimenting - ie. writing android app or use pyton - it seems the math above works, just add the external or internal generator in it and that is it..
« Last Edit: December 13, 2024, 04:26:43 pm by iMo »
Readers discretion is advised..
 

Offline mrisco

  • Regular Contributor
  • *
  • Posts: 133
  • Country: pe
    • Github repo
Re: Rigol DHO914S Bode plot
« Reply #257 on: December 13, 2024, 04:48:20 pm »
...just add the external or internal generator in it and that is it..

I am missing a good generator, but maybe it can be done with a Fnirsi DSO-TC3?
DHO800-900 Extended UI: https://youtu.be/mT4ivaMY7zg
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5473
  • Country: va
Re: Rigol DHO914S Bode plot
« Reply #258 on: December 13, 2024, 04:52:29 pm »
Almost 20y back I got this kit -see attached manual - from our US ham OMs (I mentioned in one of my previous posts). There are tons of similar on ali/ebay to get.
Now thinking which MCU to use, I have got tons of them, it should be 5V so perhaps a pic12 or pic16..
It will receive serial, parse a couple of commands (actually a single one like "F 25123456" would be enough) and SPI the 9851..

...just add the external or internal generator in it and that is it..

I am missing a good generator, but maybe it can be done with a Fnirsi DSO-TC3?

For initial experiments you may use any generator which produces say 1Vpp into some load - for experiments like above with my RLC it is 33kohm load :).
You will set the generator's freq manually and the DHO804 will measure the freq with COUNTER and process a Bode point while measuring CH1 and CH2 (simplified).
I've done it here with an analog HP generator as well as myDDS manually and it is ok for creating the new Quality Bode APP..
The final step will be to call an internal or external generator.. But the first step is to master the 804..

« Last Edit: December 13, 2024, 05:13:29 pm by iMo »
Readers discretion is advised..
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5473
  • Country: va
Re: Rigol DHO914S Bode plot
« Reply #259 on: December 14, 2024, 07:42:20 am »
Here is a Bode of the 3.579MHz crystal (setup as in the above pictures).
DDS generator aprox 2Vpp output, 1Hz freq step, Bode span 100Hz, ch1/ch2 5000 samples per point, beta=8, none averaging. Scope DS1062CA.
At the maximum 3.579225 (DDS freq) the scope's counter shows 3.58032MHz.
The DDS freq used in the math and in the graph.
MAG_DB blue left scale
PHASE_DEG orange

There are small periodic wiggles on the MAG_DB visible, it may come from some effects caused by the differences in DDS generator's and scope's sampling frequencies. Also the phase differences in coaxes, delay/skew between the channels, impedance matching, etc. might be the cause.
Thus the Quality Bode shall provide calibration too..
« Last Edit: December 14, 2024, 09:52:15 am by iMo »
Readers discretion is advised..
 

Online gf

  • Super Contributor
  • ***
  • Posts: 1401
  • Country: de
Re: Rigol DHO914S Bode plot
« Reply #260 on: December 14, 2024, 12:52:10 pm »
At the maximum 3.579225 (DDS freq) the scope's counter shows 3.58032MHz.
The DDS freq used in the math and in the graph.

With 5000 point records, 300ppm deviation is OK for the detector if the sample rate is > 5.5MSa/s.
The vout/vin measurement mostly cancels out magnitude and phase errors due to a small frequency offset.
Only SNR suffers, when the filter is not centered at the frequency.
The plot still reflects the given frequency, of course.

Of course you could measure the ratio f_scope_counter/f_DDS once (at a high enough frequency) and use f_DDS*ratio for the detector calculation. Then the residual deviation is mostly a matter of the short term stability (during the sweep) of the DDS and scope oscillators.

Quote
There are small periodic wiggles on the MAG_DB visible, it may come from some effects caused by the differences in DDS generator's and scope's sampling frequencies.

Attenuator mismatch can also introduce "steps" where V/div changes (and I guess V/div was not the same for the whole sweep).

What is the frequency resolution of the used DDS (usually it is sample_rate/2^N, where N is an integer, so the resolution is usually not a decimal number). If you set a DDS to a certain frequency, it will round the given number to an integer multiple of the resolution, and the actual generated frequency will in most cases be different from the given number. Unless the resolution is significantly better than 1Hz, it is better to use the actually generated, rounded frequency for calculation and plotting.

For example: If the resolution is e.g. 0.9Hz, and you make 1Hz steps (nominal), then you actually get [0, 0.9, 1.8, 2.7, 3.6, 5.4, 6.3, 7.2,...]+f_start Hz, which is no longer evenly spaced, but every ~9th step has twice the size. Obviously, if you plot these points with even spacing at [0,1,2,3,4,5,6,7...]+f_start, you'll get a discontinuity at every ~9th frequency point.

Since your record length is limited, you can try to average the complex vout/vin quotient of N (say 10...100) measurements at the same frequency point before calculating magnitude and phase -- to reduce noise. Only the first measurement needs to do the setup, while the following N-1 measurements just capture a record and calculate the gain vout/vin. The complex sine wave exp(...) and window function do not need to be recalculated either.

Quote
Also the phase differences in coaxes, delay/skew between the channels, impedance matching, etc. might be the cause.
Thus the Quality Bode shall provide calibration too..

Of course, you can perform a response normalization by running a sweep with both probes connected to the reference signal (at the same point). This will cancel out the frequency and phase response differences between the two scope channels, including the probes. However, you are still only measuring the ratio between the voltages at the probe tips, not the full network parameters of the DUT. So the Bode plot cannot predict how the same DUT would behave in a different environment, with different source and load impedances. And it cannot take into account the loading effects of the probes. The Bode plot is not a network analyzer. The measurement setup is still potentially problematic at high frequencies.
« Last Edit: December 14, 2024, 01:39:54 pm by gf »
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5473
  • Country: va
Re: Rigol DHO914S Bode plot
« Reply #261 on: December 14, 2024, 04:11:49 pm »
The above sweep was done at constant V1/2 /div (the amplitude change across those 100Hz was only aprox 6 dB).

The AD9851 DDS I've been using today has 32MHz*6 =  192 MHz clock (a light overclock). It has got an on-chip multiplier (also potential source of errors). Stability of a standard crystal.
The 9851 resolution is 192MHz / (2^32) = 0.0447Hz.
There is uint64 math inside the mcu creating the 1Hz myDDS resolution.

« Last Edit: December 14, 2024, 04:35:35 pm by iMo »
Readers discretion is advised..
 

Online gf

  • Super Contributor
  • ***
  • Posts: 1401
  • Country: de
Re: Rigol DHO914S Bode plot
« Reply #262 on: December 14, 2024, 05:40:26 pm »
The above sweep was done at constant V1/2 /div (the amplitude change across those 100Hz was only aprox 6 dB).

Constant V/div, also for the 2nd channel (DUT output)? In BodeXtal1.jpg I see 80dB amplitude change. Did you really measure ~20µVpp at 1/2 V/div? Even with up to 30dB processing gain of the detector with 5000 samples, such a low voltage still drown in the noise floor.

Quote
The 9851 resolution is 192MHz / (2^32) = 0.0447Hz.

 :-+
« Last Edit: December 14, 2024, 10:20:57 pm by gf »
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5473
  • Country: va
Re: Rigol DHO914S Bode plot
« Reply #263 on: December 14, 2024, 09:07:07 pm »
The MAG_DB is blue and left hand side Y axis..

MAG_DB blue left scale
PHASE_DEG orange
« Last Edit: December 14, 2024, 09:21:30 pm by iMo »
Readers discretion is advised..
 

Online gf

  • Super Contributor
  • ***
  • Posts: 1401
  • Country: de
Re: Rigol DHO914S Bode plot
« Reply #264 on: December 14, 2024, 10:19:48 pm »
The MAG_DB is blue and left hand side Y axis..

Sorry, my fault. Then the standard error of the log magnitude is within the expected order of magnitude of about 0.1 dB anyway.
 
The following users thanked this post: iMo

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5473
  • Country: va
Re: Rigol DHO914S Bode plot
« Reply #265 on: December 14, 2024, 11:07:24 pm »
Tomorrow I will try to look at the ch1 and ch2 alignment at say 10MHz what could be perhaps the highest frequency people may use for Bode these days (assuming for RF work they use vna).
DDS generator set to 10MHz for example and from its T-bnc via two identical coaxes to ch1 and ch2.
Readers discretion is advised..
 

Offline mawyatt

  • Super Contributor
  • ***
  • Posts: 4058
  • Country: us
Re: Rigol DHO914S Bode plot
« Reply #266 on: December 15, 2024, 12:20:06 am »
@ IMo

Been following this on the sidelines, very interesting undertaking :-+

Question wrt to the DUT 3.57MHz crystal as shown in your fixture on post #259. The response shows an amplitude peaking which would indicate a series crystal resonance and would expect the phase to be near zero at resonance unless we missed something?

Best
« Last Edit: December 15, 2024, 12:28:33 am by mawyatt »
Curiosity killed the cat, also depleted my wallet!
~Wyatt Labs by Mike~
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5473
  • Country: va
Re: Rigol DHO914S Bode plot
« Reply #267 on: December 15, 2024, 09:40:55 am »
Question wrt to the DUT 3.57MHz crystal as shown in your fixture on post #259. The response shows an amplitude peaking which would indicate a series crystal resonance and would expect the phase to be near zero at resonance unless we missed something?

Yep, the phase shift is there, I have to investigate..

In the meantime I wired both channels into the DDS generator (aprox 1.5Vpp, fixed 10.000000MHz) via coaxes with the same length, not sure about their other params (both seem to be the RG58), DS1062CA scope's counter shows 10.0031MHz.
Below the MAG_DB and PHASE_DEG.
« Last Edit: December 15, 2024, 09:44:13 am by iMo »
Readers discretion is advised..
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5473
  • Country: va
Re: Rigol DHO914S Bode plot
« Reply #268 on: December 15, 2024, 10:16:36 am »
..Question wrt to the DUT 3.57MHz crystal as shown in your fixture on post #259. The response shows an amplitude peaking which would indicate a series crystal resonance and would expect the phase to be near zero at resonance unless we missed something?

Here is my attempt to simulate my above fixture and the Bode results..
It fits the PHASE pretty well..

PS: the Xtal params is a rough estimate only..
« Last Edit: December 15, 2024, 10:25:21 am by iMo »
Readers discretion is advised..
 

Offline mawyatt

  • Super Contributor
  • ***
  • Posts: 4058
  • Country: us
Re: Rigol DHO914S Bode plot
« Reply #269 on: December 15, 2024, 05:23:55 pm »
The amplitude should be peaking at series crystal resonance where the phase should be close to zero. With a crystal Rs of 750Ω maybe try and use 10X scope probes to reduce scope capacitive loading, also try and use 50Ω rather than 499Ω termination resistors. The cables capacitance can be significant unless terminated in their characteristic impedance and might be the reason for the phase being away from zero.

Best
« Last Edit: December 15, 2024, 05:30:15 pm by mawyatt »
Curiosity killed the cat, also depleted my wallet!
~Wyatt Labs by Mike~
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5473
  • Country: va
Re: Rigol DHO914S Bode plot
« Reply #270 on: December 15, 2024, 05:33:23 pm »
Those crystal measurements are usually done with matching transformers at both sides (at least I did it that way when building IF xtal filters for my radios)..
The actual crystal measurement exercise was not the goal here, it was just to see the scope data and the math somehow work.
Now waiting for the DHO804.. :)
Readers discretion is advised..
 

Offline mrisco

  • Regular Contributor
  • *
  • Posts: 133
  • Country: pe
    • Github repo
Re: Rigol DHO914S Bode plot
« Reply #271 on: December 16, 2024, 01:14:27 pm »
This is a short video which demonstrate that it is possible to run a Python script along with the waveform window and control a device using USB, that procedure could be used to create a Python Bode plot script.

DHO800-900 Extended UI: https://youtu.be/mT4ivaMY7zg
 
The following users thanked this post: Fungus, iMo

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5473
  • Country: va
Re: Rigol DHO914S Bode plot
« Reply #272 on: December 16, 2024, 06:56:04 pm »
Could you get the ch1/ch2 data into the python?
How fast it goes?
Readers discretion is advised..
 

Offline mrisco

  • Regular Contributor
  • *
  • Posts: 133
  • Country: pe
    • Github repo
Re: Rigol DHO914S Bode plot
« Reply #273 on: December 27, 2024, 04:05:39 am »
A bode plot Python project: https://github.com/ailr16/BodePlot-DS1054Z

« Last Edit: December 27, 2024, 04:10:41 am by mrisco »
DHO800-900 Extended UI: https://youtu.be/mT4ivaMY7zg
 

Offline mrisco

  • Regular Contributor
  • *
  • Posts: 133
  • Country: pe
    • Github repo
Re: Rigol DHO914S Bode plot
« Reply #274 on: December 27, 2024, 04:53:00 am »
Could you get the ch1/ch2 data into the python?
How fast it goes?

Yes, about of 5 fps from screen memory.
DHO800-900 Extended UI: https://youtu.be/mT4ivaMY7zg
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf