Author Topic: Bode plot for scope owners that don't have the option  (Read 6242 times)

0 Members and 1 Guest are viewing this topic.

Online iMo

  • Super Contributor
  • ***
  • Posts: 5640
  • Country: va
Re: Bode plot for scope owners that do not have that option
« Reply #50 on: January 15, 2025, 10:43:34 pm »
The 804 frequency counter shows +0.5Hz higher (93.7505kHz) than the DDS gen is set up (93.750kHz).
The counter can resolve the 1Hz step of the DDS nicely.
The issue is the FFT's peak search (31.25MSa/s, 1Mpts) does not place the peak exactly at 93.750kHz, but (from the peak search table):

Rect 93.7805kHz  241mVrms
Blck  93.7805      247
Han  93.7805      247
Ham 93.7805      247
Fltt   93.7499      257  (254 when I move DDS such it shows 93.7805)
Tria  93.7805      232



« Last Edit: January 15, 2025, 11:30:37 pm by iMo »
Readers discretion is advised..
 

Online gf

  • Super Contributor
  • ***
  • Posts: 1432
  • Country: de
Re: Bode plot for scope owners that do not have that option
« Reply #51 on: January 16, 2025, 08:23:10 am »
The 804 frequency counter shows +0.5Hz higher (93.7505kHz) than the DDS gen is set up (93.750kHz).
The counter can resolve the 1Hz step of the DDS nicely.
The issue is the FFT's peak search (31.25MSa/s, 1Mpts) does not place the peak exactly at 93.750kHz, but (from the peak search table):

Rect 93.7805kHz  241mVrms
Blck  93.7805      247
Han  93.7805      247
Ham 93.7805      247
Fltt   93.7499      257  (254 when I move DDS such it shows 93.7805)
Tria  93.7805      232

With a flat top, the horizontal peak location may be ambiguos. Where ist the peak of a flat top? [ Actually, the frequency response of a flattop window is not perfectly flat, but it has very small passband ripple with multiple maxima. There is also no single flattop window, but there exist several variants. I don't know which variant Rigol uses. ]

But the frequency responses of all other mentioned window functions do have a dedicated peak, and with a 93.7505kHz input signal, the 93.75kHz FFT bin should have the largest magnitude. The reported 93.7805kHz is approx one bin off (but again not exactly, since the next bin frequency is 93.78125kHz) :(
I'm not sure if the marker is trying to interpolate between bins. But even then it is still wrong.
« Last Edit: January 16, 2025, 08:41:55 am by gf »
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 5640
  • Country: va
Re: Bode plot for scope owners that do not have that option
« Reply #52 on: January 16, 2025, 08:46:12 am »
Flat top has none peak as the top of the spectral line is wider (as I indicated in #46) than the peaks for other windows. I will try to go with the DDS with 1Hz step around the Hanning peak for example, what it will show.

DDS            804 Counter    Peak_Search_Table_freq
93.742         93.7424         93.7499
93.743         93.7434         93.7805
..                                      93.7805
93.772         93.7724         93.7805
93.773         93.7734         93.8110

The peak is 2 values wide, 2kHz span, RBW 50.

 
« Last Edit: January 16, 2025, 09:15:21 am by iMo »
Readers discretion is advised..
 

Online gf

  • Super Contributor
  • ***
  • Posts: 1432
  • Country: de
Re: Bode plot for scope owners that do not have that option
« Reply #53 on: January 16, 2025, 09:14:39 am »
Something is strange. But it's getting off topic. Let's not pollute TheoB's Bode plot thread.
« Last Edit: January 16, 2025, 09:44:31 am by gf »
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 5640
  • Country: va
Re: Bode plot for scope owners that do not have that option
« Reply #54 on: January 16, 2025, 09:47:32 am »
A comparison (no precapture)..
 
« Last Edit: January 16, 2025, 10:03:54 am by iMo »
Readers discretion is advised..
 

Online gf

  • Super Contributor
  • ***
  • Posts: 1432
  • Country: de
Re: Bode plot for scope owners that do not have that option
« Reply #55 on: January 16, 2025, 10:41:22 am »
The attached images show what I would expect with a similar filter as yours, 200Hz sawtooth stimulus, 156.25MSa/s, 5Mpts, no averaging, blackman window, and selecting only those Bode points which correspond to fundamental or harmonics of the stimulus signal.

EDIT: It's about the expected "clarity" of the plotted curves, don't expect magnitude/phase to match yours.

Btw, can you make the rising edge of the sawtooth steeper (as steep as possible) in order to shift the (undesired) zeros in the spectrum to higher frequencies?
« Last Edit: January 16, 2025, 11:00:31 am by gf »
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 5640
  • Country: va
Re: Bode plot for scope owners that do not have that option
« Reply #56 on: January 16, 2025, 11:11:11 am »
Python's graphs interpolate between the Bode points. Therefore it looks like a continuum. But still there are the "stairs"..
Nope, I cannot make the sawtooth's rising edge steeper, unless I would start messing with my soldering iron inside my HP3310B (what I do not want as it is my gem of late sixties).. Hopefully I am not the only person who plays with this analyser and there are much better equipped members here..  :D
« Last Edit: January 16, 2025, 11:17:45 am by iMo »
Readers discretion is advised..
 

Online gf

  • Super Contributor
  • ***
  • Posts: 1432
  • Country: de
Re: Bode plot for scope owners that do not have that option
« Reply #57 on: January 16, 2025, 11:27:15 am »
Python's graphs interpolate between the Bode points. Therefore it looks like a continuum. But still there are the "stairs"..

I mean the coarse stairs in your image (see stairs.png). These are not 1 pixel stairs from line plotting. Many more points have been explicitly plotted here than 200, 400, 600, 800,... Hz (or the nearest frequency bins, which are 187.50, 406.25, 593.75, 812.50,... Hz).

EDIT: And of course the bin quantization (i.e. plotting the point for the 200Hz tone at 187.50 Hz) introduces an error in the plot as well. Ideally, the point for the 200 Hz tone should be ploted at 200 Hz and neither at 187.50 nor 218.75 Hz. This error is clearly visible in my plot in #55.

OTOH, the transfer function H(200Hz) = Vout(200Hz)/Vin(200Hz) can be taken from the nearest neighbor bin of 200 Hz. The error due the frequency deviation cancels almost out in the quotient. In fact, all nearby neighbor bins of 200Hz compute approximately H(200Hz), not H(bin_frequency). That's also the reason why we get the stair steps when we include multiple neighboring bins in the set of bode points.

Quote
Nope, I cannot make the sawtooth's rising edge steeper, unless I would start messing with my soldering iron inside my HP3310B

And your DDS generator cannot either?
« Last Edit: January 16, 2025, 03:22:44 pm by gf »
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 5640
  • Country: va
Re: Bode plot for scope owners that do not have that option
« Reply #58 on: January 16, 2025, 11:32:33 am »
DDS is sine only..
Readers discretion is advised..
 

Online gf

  • Super Contributor
  • ***
  • Posts: 1432
  • Country: de
Re: Bode plot for scope owners that do not have that option
« Reply #59 on: January 16, 2025, 04:01:56 pm »
Python's graphs interpolate between the Bode points. Therefore it looks like a continuum. But still there are the "stairs"..

I mean the coarse stairs in your image (see stairs.png). These are not 1 pixel stairs from line plotting. Many more points have been explicitly plotted here than 200, 400, 600, 800,... Hz (or the nearest frequency bins, which are 187.50, 406.25, 593.75, 812.50,... Hz).

EDIT: And of course the bin quantization (i.e. plotting the point for the 200Hz tone at 187.50 Hz) introduces an error in the plot as well. Ideally, the point for the 200 Hz tone should be ploted at 200 Hz and neither at 187.50 nor 218.75 Hz. This error is clearly visible in my plot in #55.

OTOH, the transfer function H(200Hz) = Vout(200Hz)/Vin(200Hz) can be taken from the nearest neighbor bin of 200 Hz. The error due the frequency deviation cancels almost out in the quotient. In fact, all nearby neighbor bins of 200Hz compute approximately H(200Hz), not H(bin_frequency). That's also the reason why we get the stair steps when we include multiple neighboring bins in the set of bode points.

For comparison, the attached plot shows

(1) the expected ground truth (blue line)

(2) Using all points > threshold as Bode points (orange dots) => staircase :(

(3) Using only the nearest frequency bins to 200, 400, 600, 800,... Hz as Bode points (purple dots) => better but still not accurate
« Last Edit: January 16, 2025, 07:33:29 pm by gf »
 

Online TheoBTopic starter

  • Regular Contributor
  • *
  • Posts: 156
  • Country: nl
Re: Bode plot for scope owners that do not have that option
« Reply #60 on: January 16, 2025, 07:41:20 pm »
Python's graphs interpolate between the Bode points. Therefore it looks like a continuum. But still there are the "stairs"..

I mean the coarse stairs in your image (see stairs.png). These are not 1 pixel stairs from line plotting. Many more points have been explicitly plotted here than 200, 400, 600, 800,... Hz (or the nearest frequency bins, which are 187.50, 406.25, 593.75, 812.50,... Hz).

EDIT: And of course the bin quantization (i.e. plotting the point for the 200Hz tone at 187.50 Hz) introduces an error in the plot as well. Ideally, the point for the 200 Hz tone should be ploted at 200 Hz and neither at 187.50 nor 218.75 Hz. This error is clearly visible in my plot in #55.

OTOH, the transfer function H(200Hz) = Vout(200Hz)/Vin(200Hz) can be taken from the nearest neighbor bin of 200 Hz. The error due the frequency deviation cancels almost out in the quotient. In fact, all nearby neighbor bins of 200Hz compute approximately H(200Hz), not H(bin_frequency). That's also the reason why we get the stair steps when we include multiple neighboring bins in the set of bode points.

For comparison, the attached plot shows

(1) the expected ground truth (blue line)

(2) Using all points > threshold as Bode points (orange points) => staircase :(

(3) Using only the nearest frequency bins to 200, 400, 600, 800,... Hz as Bode points (purple) => better but still not accurate

You are right.
Ideally the captured data should contain exactly N periods. N being an integer, not a fraction. In the examples shown, a non-integer amount of periods were captured. This is likely to happen and because of that a window function is applied (in the current code I choose kaiser with beta=14). Each harmonic spills over a bit to it's neighbors frequency bin. In the FFT plot you see lobes, instead of a single line (one bin contains power, the others none). When the neighbor bins still have enough power (less than 60 dB full scale), they are selected to be displayed. The amplitude might be a bit lower but the ratio is exactly the same. What happens is that the same information is plotted from multiple bins and that shows as a flat line. I added little crosses to the orange phase line to indicate what the used datapoints are specifically for this reason.
I have been thinking of an easy way to correct for this, but it's not trivial. You have to assume it's a repeating signal and not a chirp for instance. The reason I've not implemented anything is that the solution is rather simple. Make sure you capture only one edge
2483931-0
Capturing no more than one edge means the fundamental frequency is synchronized to the scope sample rate. The lowest bin is SR/Mdepth. In this example the left one is taken with Mdepth=10k and Sample rate=156.25MSa/s. That means the capture time is 10k/156.25M=64us. That's only a fraction from the 100us period. Now all bins are nicely aligned and no window is needed.

Ok, now with python 3.11.9 (pyvisa-py, numpy, matplotlib, scipy, tkinter, tkinter.ttk installed)

Code: [Select]
C:\Users\Smith\MyCode\Python\dho-remote-main>python dho-remote.py 192.168.0.66
  File "C:\Users\Smith\MyCode\Python\dho-remote-main\dho-remote.py", line 373
    print(f"Sample rate={data["sr"] / 1e6:g} Ms")
                               ^^
SyntaxError: f-string: unmatched '['

It seems it does not like " ", works with ' '
I see that the Windows version of Python looks a bit different to the code than the Linux version. But good that you mention, it's easy to fix.
With my 4kHz LC res circuit fed via 33k resistor (200Hz fundamental, sawtooth, HP3310B, 50ohm out, 500kSa/s, 10kpts, 10 precaptures)..
Nice!

PS: the channel colors in the graph do not match the scope channel's colors, it seems..

PPS: v2 With my 4kHz LC res circuit fed via 33k resistor (200Hz fundamental, sawtooth, HP3310B, 50ohm out, 31.25MSa/s, 1Mpts, 16 precaptures?)..
I just used the default color for the  two traces. You are right, they should match the scope  ^-^
Will update.
« Last Edit: January 16, 2025, 07:45:41 pm by TheoB »
 
The following users thanked this post: iMo

Online iMo

  • Super Contributor
  • ***
  • Posts: 5640
  • Country: va
Re: Bode plot for scope owners that do not have that option
« Reply #61 on: January 16, 2025, 08:27:28 pm »
.. so for the users like me there should be a "help" (or better a built in tool) how to set up everything such you get the single edge only..  :D
Readers discretion is advised..
 

Online TheoBTopic starter

  • Regular Contributor
  • *
  • Posts: 156
  • Country: nl
Re: Bode plot for scope owners that do not have that option
« Reply #62 on: January 16, 2025, 10:30:30 pm »
An auto setup button?
I can measure the frequency you apply and change the time base, the memory depth and vertical settings accordingly. Sounds like a nice addition. It means that the lowest frequency starts a fraction above the applied frequency.
What is shown on the screen is only a part of the total memory. The scope screen does not show the full memory.
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 5640
  • Country: va
Re: Bode plot for scope owners that do not have that option
« Reply #63 on: January 17, 2025, 09:25:49 am »

Readers discretion is advised..
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 5640
  • Country: va
Re: Bode plot for scope owners that do not have that option
« Reply #64 on: January 17, 2025, 09:45:18 am »
An auto setup button?
I can measure the frequency you apply and change the time base, the memory depth and vertical settings accordingly. Sounds like a nice addition. It means that the lowest frequency starts a fraction above the applied frequency.
What is shown on the screen is only a part of the total memory. The scope screen does not show the full memory.

Yup, that would be great and definitely helpful for most users. Otherwise they may get a messy results easily (this method is sensitive to proper settings, imho).
Readers discretion is advised..
 

Online TheoBTopic starter

  • Regular Contributor
  • *
  • Posts: 156
  • Country: nl
Re: Bode plot for scope owners that do not have that option
« Reply #65 on: January 18, 2025, 09:38:32 am »
I updated dho-remote to v1.2
  • Auto setup for Bode plot added
  • Trace colors match the scope
The auto setup feature configures the scope based on the frequency measured on CH1.
Trace colors are now the same as the scope. I kept the background white although the colors are meant for a black background.

I also had my first scope hang in which the rigol.scope app kept crashing. And it was persistent. It was known for an earlier firmware version if you switched off the scope in XY mode, but apparently it's still present. Workaround was to change the scope via de SCPI webinterface to not start from the last state.
« Last Edit: January 18, 2025, 09:42:55 am by TheoB »
 
The following users thanked this post: iMo

Online iMo

  • Super Contributor
  • ***
  • Posts: 5640
  • Country: va
Re: Bode plot for scope owners that do not have that option
« Reply #66 on: January 18, 2025, 10:28:15 am »
FYI - I spent a day playing with an LC resonant DUT coupled "inductively" to its input and output.

Like a 12mm ferrite (or powder) toroid with a parallel capacitor resonating at around 8MHz, coupled by 2 turns to generator and the another 2 turns to scope (none common gnd). I was not able to get a nice picture as I had not found the proper settings.

The issue here is the transient is just a rather narrow short burst (at the edges) around zero with almost the same amplitudes on both channels, also the counter shows nonsense as it catches several counts within the bursts.

This is a typical use case for a VNA, sure, on the other hand usage of a decoupling transformer for the measurements of Bode is recommended by Rigol/Siglent etc., afaik.

Has to be investigated, imho, but it seems to me the sine wave is the only option here..
« Last Edit: January 18, 2025, 01:02:35 pm by iMo »
Readers discretion is advised..
 

Online TheoBTopic starter

  • Regular Contributor
  • *
  • Posts: 156
  • Country: nl
Re: Bode plot for scope owners that do not have that option
« Reply #67 on: January 18, 2025, 04:57:16 pm »
A transformer is used to inject the stimulus signal into a control loop at another level than ground. I don't see what your closed loop is. You mention a LC tank which is fully passive. No need for a transformer. But if your transformer works, the generator signal is present at the secondary side and you connect one side to ground, the other to network input. There should not be any difference. CH1 should just see a square wave. Perhaps you can make a sketch of your setup?
An impulse/step response can be used to determine a control loop behavior. That's actually a common way to see if the small signal transfer is also valid for larger signals. A DCDC regulator control loop tends to have a loop response that depends on the amplitude of the signal. A step in the time domain applied on the reference should result in the same step response on the output (due to feedback). It will however resonate which is an indication that multiple poles exist.
I will see if I can find a transformer in my junk box and show an example with a feedback loop to prove my point.
 

Online mawyatt

  • Super Contributor
  • ***
  • Posts: 4176
  • Country: us
Re: Bode plot for scope owners that do not have that option
« Reply #68 on: January 18, 2025, 05:29:27 pm »
A transformer is used to inject the stimulus signal into a control loop at another level than ground. I don't see what your closed loop is. You mention a LC tank which is fully passive. No need for a transformer. But if your transformer works, the generator signal is present at the secondary side and you connect one side to ground, the other to network input. There should not be any difference. CH1 should just see a square wave. Perhaps you can make a sketch of your setup?
An impulse/step response can be used to determine a control loop behavior. That's actually a common way to see if the small signal transfer is also valid for larger signals. A DCDC regulator control loop tends to have a loop response that depends on the amplitude of the signal. A step in the time domain applied on the reference should result in the same step response on the output (due to feedback). It will however resonate which is an indication that multiple poles exist.
I will see if I can find a transformer in my junk box and show an example with a feedback loop to prove my point.

One possible issue with this is that the Impulse and Step have a "DC" value and thus can "upset" the loop under investigation. Back in 70s we developed a "Pinger" which approximated a Dirac Impulse Doublet, and has no DC value but excites the loop under test.

The Pinger was a handheld battery powered pulse doublet injection device that one could observe the System Under Test Time Domain response, and since almost all systems can be distilled into an approximate 2nd order function one could quickly deduce the system dynamics from the Time Domain response which we often captured with a Tek scope camera (way back before DSOs). The name "Pinger" came from the old technique of flicking a finger at an electromechanical servo system (for example a gyro), thus "Pinging it" and observing the system response.

BTW you folks are generating some very interesting results wrt these "Pulse Types" and Bode Plots, keep up the good work :clap:

Best
« Last Edit: January 18, 2025, 05:41:55 pm by mawyatt »
Curiosity killed the cat, also depleted my wallet!
~Wyatt Labs by Mike~
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 5640
  • Country: va
Re: Bode plot for scope owners that do not have that option
« Reply #69 on: January 18, 2025, 05:49:21 pm »
..Perhaps you can make a sketch of your setup?

This was an experiment trying the inductive coupling only. Not a guide how to do it..  :D

CH1 at "V1 generator", CH2 at "scope"
« Last Edit: January 18, 2025, 06:10:33 pm by iMo »
Readers discretion is advised..
 

Online TheoBTopic starter

  • Regular Contributor
  • *
  • Posts: 156
  • Country: nl
Re: Bode plot for scope owners that do not have that option
« Reply #70 on: January 18, 2025, 07:24:50 pm »
All coils have mutual coupling (you mention a rod). The generator output (V1.pos) should be connected to CH1 as this is your source. That should still be a square wave, unless the generator cannot drive the impedance formed by the two windings primary winding. With a high enough coupling factor (>0.9 which you most likely do not have) the generator sees the 50 Ohm scope load parallel with C1.
What kind of impedance you have between V1.pos and net scope should be easy to plot. You will be surprised to find out what the actual transfer is (I expect a peaking around some frequency). The square wave at V1.pos (the gen output) might be completely distorted and only show narrow needles, it does not matter for the transfer calculation.
The normal application is to measure open loop transfer by placing only L1 in series with the feedback path of the control loop. L1 generates some signal and you monitor L1.pos and L1.neg on CH1 and CH2 to plot the loop transfer. At very low frequencies all signal will be seen on CH1 (the low Ohmic output of the LDO/DCDC) while at very high frequency all signal will be seen on CH2 (connected to the feedback point error amplifier). At some frequency the two channels have the same amplitude. That's the 0dB point where you want to know the phase. That phase is your phase margin.

I found two small unknown transformers that I measured. I connected one winding to the generator and CH1, the secondary winding I connected to CH2. The transfer is as shown below:
Transformer 1
2485085-0
Transformer 2
2485089-1
This shows how easy it is to detect that the gain is 15dB (voltage out/in = 5x). It also shows that the transformer is usable up to 350kHz/100kHz. At these frequencies the transformer starts to self resonate. Above the self resonance frequency the output drops by about 40dB/decade as expected. The requirement for the transformer is very low. As long as it can generate a signal above the point you expect the loop gain to become zero.
A 5:1 transformer is fine as the generator can drive one winding with 0.5V to deliver 0.1V into the control loop. And 0.1V step is assumed to be within the LDO/DCDC output voltage control range (5.05V and 4.95V for instance). CH1 of the scope will start at low frequencies with 100mVpp which can easily be set to full vertical range. CH2 (the error amplifier input) will hardly see any signal as the feedback will remove most of the signal. CH2 vertical range will be set to perhaps 1mV/div. This assures that the dynamic range of this measurement will be 120dB (80dB scope and 40dB due to the change in vertical settings of the scope).
This is just the theory I have in mind. Still need to find a regulator to try it on  ^-^
« Last Edit: January 18, 2025, 08:05:55 pm by TheoB »
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 5640
  • Country: va
Re: Bode plot for scope owners that do not have that option
« Reply #71 on: January 19, 2025, 08:15:08 am »
As I wrote above I used a "toroid", coupling factor of at least 0.95 with that, at 8MHz resonance.
With small inductancies (like well below 500nH primary and say 10-100uH secondary, almost zero resistance) the signals at CH1 and CH2 are around zero (except the transients around the edges) with those "low repetition" pulses (the DC component is 0V).

Your setup is a bit different - you are using "600ohm" audio transformers (or similar) with a high internal inductance (like 10s to 100s of mH) and high winding resistance (my bet your winding resistance is close to 50ohms).

So usable with high inductance audio transformers, not much with the RF transformers (it is a VNA case)..

PS: for those switching PSUs (usually 50kHz - 500kHz, but today up to 2-3MHz operating PWM) Bode plots with decoupling transformers you would need a special transformer, no way to use the "mains transformers" as I've seen on some YT videos, even the audio ones are not suitable, imho..

..
Like a 12mm ferrite (or powder) toroid with a parallel capacitor resonating at around 8MHz, coupled by 2 turns to generator and the another 2 turns to scope (none common gnd). I was not able to get a nice picture as I had not found the proper settings..

This is a typical use case for a VNA, sure, ..
« Last Edit: January 19, 2025, 08:34:12 am by iMo »
Readers discretion is advised..
 

Online TheoBTopic starter

  • Regular Contributor
  • *
  • Posts: 156
  • Country: nl
Re: Bode plot for scope owners that do not have that option
« Reply #72 on: January 19, 2025, 11:25:06 am »
Ah, I did not read that good enough, toroid  ::)

If you drive with a square wave harmonics around 8MHz should be present (rise/fall times should be below 40ns). The auto setup might not work as the counter does not extract the repetition frequency. All you need to do is set the time base such to capture one ringing event. If you set the scope timebase to 1us or faster, the sample rate will be 625Ms/s. With a Memory depth set to 1M, the captured time is 1.6ms. Drive your toriod with a frequency below 625Hz.

I think the transformer is indeed used for audio. I've now driven it from the high impedance side and the bandwidth is over 7MHz at -15dB, so well suited for measuring the loop stability of an opamp (I'll start with that)
 

Online TheoBTopic starter

  • Regular Contributor
  • *
  • Posts: 156
  • Country: nl
Re: Bode plot for scope owners that do not have that option
« Reply #73 on: January 21, 2025, 07:16:34 pm »
I have the first early result of the loopgain analysis of an opamp. The opamp is connected unity gain with a injection transformer between the output and the negative input. Input signal is 100mV at 1.5kHz. Setup is automatically chosen.
2486835-0
The phase margin I show in the right lower corner as 73 degrees. That makes sense as a ua741 is of coarse very stable with internal compensation. The point is that you can measure loop gain up to very high frequencies, limited to the injection transformer.
The DC loop gain should go all the way to 105dB, but the best I could get on the lower end is 60dB around 1kHz. Anthing lower is distorted by the CH2 DFT of the first bins. The DC signal seems to spill over to the next bin of interest (the first non-zero bin I want to see).
This is a bread-bord with long wires. That affects the result past 1MHz, as I can assure you the opamp does not oscillate at 2MHz  ;). This is also the result of changing to 80 dB below full scale. Then you also might get noisy result. But at least I could see the behavor of interest around 1MHz. Injecting 2 decades below the 0dB closed loop gain point should give a good result for any control loop.

Will probably release an update this weekend.
« Last Edit: January 21, 2025, 07:55:13 pm by TheoB »
 
The following users thanked this post: skench, gf

Online gf

  • Super Contributor
  • ***
  • Posts: 1432
  • Country: de
Re: Bode plot for scope owners that do not have that option
« Reply #74 on: January 22, 2025, 10:32:20 am »
I have the first early result of the loopgain analysis of an opamp. The opamp is connected unity gain with a injection transformer between the output and the negative input. Input signal is 100mV at 1.5kHz. Setup is automatically chosen.

Where are CH1 and CH2 connected? CH1 to the inverting input and CH2 to the output of the opamp?

One thing puzzles me: if CH1 is the input and CH2 is the output of the DUT (as defined here), then - given the waveforms and spectra of CH1 and CH2 - I don't understand why the Vout(f)/Vin(f) or CH2(f)/CH1(f) bode plot shows a low pass response? What am I missing? It rather seems to plot CH1(f)/CH2(f) which is Vin(f)/Vout(f) or 1/gain?

Anthing lower is distorted by the CH2 DFT of the first bins. The DC signal seems to spill over to the next bin of interest (the first non-zero bin I want to see).

Sure, the main lobe width of the frequency response of a Kaiser(beta=14) window is about 9.2 bins, so only the bins from #5 onwards have the full stopband attenuation for DC and negative frequencies (which is >= 106dB for a Kaiser(14) window).
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf