Author Topic: Just Another Bode Plots Thread  (Read 1234 times)

0 Members and 1 Guest are viewing this topic.

Offline balnazzarTopic starter

  • Frequent Contributor
  • **
  • Posts: 417
  • Country: it
Just Another Bode Plots Thread
« on: October 13, 2022, 12:20:18 pm »
RLC Bode Plots. From above:

1. LTSpice simulation (disregarding parasitic stuff), up to 700 KHz.
2. Proper Bode plot with an Analog Discovery 2 , also up to 700 KHz
3. Davelike magnitude plot on a bench scope (same probes and circuit as in 2, just moved the BNCs, up to 400 KHz due to the small screen).
4. Detail of (3.), up to just 20 KHz.

These are all linear plots (not log).

As you may see, the AD2 displays that around 300 KHz the gain crashes (and the phase shifts abruptly)

Why does this happen? Neither the simulation nor the Siglent scope show that.

« Last Edit: October 13, 2022, 12:23:54 pm by balnazzar »
 

Online mag_therm

  • Frequent Contributor
  • **
  • Posts: 691
  • Country: us
Re: Just Another Bode Plots Thread
« Reply #1 on: October 13, 2022, 01:40:27 pm »
Looks like a nice double zero in your DUT  at ~ 300 kHz.
Could be a shunt LC in there.
Looking at the inductor value of 10 milliHenry (?)  ,  it could have intra winding capacitance.
If I calculate correctly,  a 300 kHz zero would be winding capacitance of 28.1 pF, which sounds plausible.
 
The following users thanked this post: balnazzar

Online mawyatt

  • Super Contributor
  • ***
  • Posts: 3273
  • Country: us
Re: Just Another Bode Plots Thread
« Reply #2 on: October 13, 2022, 01:48:26 pm »
Agree, it's just parallel resonance of the inductor. To verify just place the inductor in series with ~50 resistor and drive this with AWG, then measure across the resistor with DSO. Should show a null at ~300KHz.

Best,
Curiosity killed the cat, also depleted my wallet!
~Wyatt Labs by Mike~
 
The following users thanked this post: balnazzar

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Just Another Bode Plots Thread
« Reply #3 on: October 13, 2022, 06:22:30 pm »
As to the AD2 graph, how about increasing the Steps from 101 to 1001?
 
The following users thanked this post: balnazzar

Offline balnazzarTopic starter

  • Frequent Contributor
  • **
  • Posts: 417
  • Country: it
Re: Just Another Bode Plots Thread
« Reply #4 on: October 13, 2022, 08:28:42 pm »
Looks like a nice double zero in your DUT  at ~ 300 kHz.
Could be a shunt LC in there.
Looking at the inductor value of 10 milliHenry (?)  ,  it could have intra winding capacitance.
If I calculate correctly,  a 300 kHz zero would be winding capacitance of 28.1 pF, which sounds plausible.

Ok, and that accounts for the difference between the simulation (ideal circuit), and the AD2 (real circuit).

But the Siglent scope catches the real circuit too, and yet it shows no trace of that phenomenon.
 

Offline balnazzarTopic starter

  • Frequent Contributor
  • **
  • Posts: 417
  • Country: it
Re: Just Another Bode Plots Thread
« Reply #5 on: October 13, 2022, 08:31:17 pm »
Agree, it's just parallel resonance of the inductor. To verify just place the inductor in series with ~50 resistor and drive this with AWG, then measure across the resistor with DSO. Should show a null at ~300KHz.

Best,

I'll do that. But let us take for granted that it's exactly how we are thinking. I thought about the little RLC inside the inductor too.

The main question is WHY the Siglent scope shows a perfectly smooth Bode plot??
 

Offline balnazzarTopic starter

  • Frequent Contributor
  • **
  • Posts: 417
  • Country: it
Re: Just Another Bode Plots Thread
« Reply #6 on: October 13, 2022, 08:32:11 pm »
As to the AD2 graph, how about increasing the Steps from 101 to 1001?

Good suggestion. I didn't think of that. Nonetheless, it shows the same ditch, just with smoother borders...
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Just Another Bode Plots Thread
« Reply #7 on: October 13, 2022, 11:58:19 pm »
In the bad old days, we created Bode' Plots by hand by injecting a frequency into the circuit and measuring the input and output voltage.  I would do this for both the scope and the AD2.

It's a given that I am an AD2 fanboy, I post about it at every opportunity.  Nevertheless, it would be interesting to see the results of such a test with each instrument individually and both instruments connected at the same time.  There's a 'zero' in the transfer function that is causing the upward deflection.  Is it in the scope leads?  How about 1X vs 10X? Are you using the AD2 BNC Adapter?

AC coupled (adds a series capacitor) or DC coupled?  There is mention of a high pass filter on the BNC Adapter when used with AC coupling.  The scope has the capacitor inside.

https://digilent.com/reference/test-and-measurement/bnc-adapter-board/reference-manual

I'm going to take a giant leap of faith and say that both instruments are correct but they aren't measuring the same thing by the time the signal gets to the screen.


« Last Edit: October 14, 2022, 12:23:13 am by rstofer »
 
The following users thanked this post: balnazzar

Offline balnazzarTopic starter

  • Frequent Contributor
  • **
  • Posts: 417
  • Country: it
Re: Just Another Bode Plots Thread
« Reply #8 on: October 14, 2022, 09:17:05 am »
In the bad old days, we created Bode' Plots by hand by injecting a frequency into the circuit and measuring the input and output voltage.  I would do this for both the scope and the AD2.

It's a given that I am an AD2 fanboy, I post about it at every opportunity.  Nevertheless, it would be interesting to see the results of such a test with each instrument individually and both instruments connected at the same time.  There's a 'zero' in the transfer function that is causing the upward deflection.  Is it in the scope leads?  How about 1X vs 10X? Are you using the AD2 BNC Adapter?

AC coupled (adds a series capacitor) or DC coupled?  There is mention of a high pass filter on the BNC Adapter when used with AC coupling.  The scope has the capacitor inside.

https://digilent.com/reference/test-and-measurement/bnc-adapter-board/reference-manual

I'm going to take a giant leap of faith and say that both instruments are correct but they aren't measuring the same thing by the time the signal gets to the screen.

Thanks, I think you may have nailed the point. I'll do the "manual" Bode (as I've been taught at the university quite recently), but that will necessarily produce a very coarse plot. I can however investigate better the behaviour of the circuit around 300 KHz.
I still have to study the theory about the zeroes and the poles of the TF properly. I have a degree in mathematics, but my complex analysis skills are a bit rusty.

Anyhow.. All the probes (and the scopes) were set to 1X, and AFAIK, you cannot set the AC coupling when using the AD2's Network Analyzer. Only when you use the scope proper (please check this, I'm in no way an expert about the AD2)...
 

Online mag_therm

  • Frequent Contributor
  • **
  • Posts: 691
  • Country: us
Re: Just Another Bode Plots Thread
« Reply #9 on: October 14, 2022, 03:19:22 pm »
The Bode plot in my day was a hand method of drawing the approximations as a simplified companion set
to the actual  magnitude and phase functions in time.
two graphs: 20 * log |G(jw)|  and angle (G(jw)

That hand method is not needed so much these days and the plots drawn by numerical circuit simulators  and the ATE instruments are now
also, appropriately named after Bode.

However, the smooth plots do not indicate the actual positions of the poles and zeros (PZ) which for me,  is an impediment to manually adjusting a controller.

So in Qucs I am adding a rough work-around using logic functions to enumerate at least the compensation PZ positions along the frequency axis:
-As shown in heavy black trace on the Magnitude (top-most) plot.
https://app.box.com/s/72727vztrelw6bnltz62fl7kibnr85b2
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Just Another Bode Plots Thread
« Reply #10 on: October 14, 2022, 03:35:55 pm »
That hand method is not needed so much these days and the plots drawn by numerical circuit simulators  and the ATE instruments are now
also, appropriately named after Bode.
But we have some pretty nice tools for converting arrays to plots.  MATLAB, Octave, Pyplot (matplotlib), Excel and so on.

When dinosaurs were still messing up the landscape (say 1970) I had unlimited access to a real computer (IBM 1130) and the IBM Electronic Circuit Analysis Program (ECAP).  I modified it to output the results of a frequency domain simulation to punched cards so that I could feed them into a plotting program that I wrote and we had log-log paper for the drum plotter.  It made the Circuits class a little more fun.  Not many students had such access in the dark old days.

BTW, MATLAB has a number of interpolation techniques to fill in the spaces between data points.

When using the AD2 BNC adapter,  AC vs DC coupling is a jumper position on the adapter but...  The Waveforms software has a setting for AC/DC in the scope app.  It's on the 'gear' menu in the upper right corner of each channel pane.  Since I usually work on things that are DC coupled, I have never tried the option.
« Last Edit: October 14, 2022, 04:31:23 pm by rstofer »
 

Offline balnazzarTopic starter

  • Frequent Contributor
  • **
  • Posts: 417
  • Country: it
Re: Just Another Bode Plots Thread
« Reply #11 on: October 14, 2022, 06:14:03 pm »

When using the AD2 BNC adapter,  AC vs DC coupling is a jumper position on the adapter but...  The Waveforms software has a setting for AC/DC in the scope app.  It's on the 'gear' menu in the upper right corner of each channel pane.  Since I usually work on things that are DC coupled, I have never tried the option.

Mh.. On my device, these settings appear to be locked in Waveforms, along with input impedance and bandwidth limitation. Look:

 

Online mawyatt

  • Super Contributor
  • ***
  • Posts: 3273
  • Country: us
Re: Just Another Bode Plots Thread
« Reply #12 on: October 14, 2022, 10:23:44 pm »
When dinosaurs were still messing up the landscape (say 1970) I had unlimited access to a real computer (IBM 1130) and the IBM Electronic Circuit Analysis Program (ECAP).  I modified it to output the results of a frequency domain simulation to punched cards so that I could feed them into a plotting program that I wrote and we had log-log paper for the drum plotter.  It made the Circuits class a little more fun.  Not many students had such access in the dark old days.


Haven't heard ECAP mentioned for decades, when Berkley SPICE appeared everyone forgot about ECAP and the other simulators. Fond memories of those days with the punch cards!!

Best,
Curiosity killed the cat, also depleted my wallet!
~Wyatt Labs by Mike~
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Just Another Bode Plots Thread
« Reply #13 on: October 15, 2022, 06:21:55 pm »
Mh.. On my device, these settings appear to be locked in Waveforms, along with input impedance and bandwidth limitation. Look:
Same on mine.  The settings can be changed but it doesn't seem to do anything.  I had originally thought that they were grayed because they didn't show up as settings in the panel itself.  I did use the Demo unit to insert an offset sine wave into the scope and, sure enough, AC Coupling didn't work.  I couldn't get rid of the DC offset.  It seems the only way to get AC coupling is with the BNC Adapter.  Lacking the adapter, just try using DC coupling on the scope and AD2.  Hopefully the Siglent will accept this.  Or put a capacitor in series with the AD2 input.  pick a -3dB point that is quite low.  You could actually put both devices in DC mode and just take the readings with the capacitor in series.  This adds a zero somewhere and forms some kind of high pass filter.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Just Another Bode Plots Thread
« Reply #14 on: October 15, 2022, 06:29:08 pm »
When dinosaurs were still messing up the landscape (say 1970) I had unlimited access to a real computer (IBM 1130) and the IBM Electronic Circuit Analysis Program (ECAP).  I modified it to output the results of a frequency domain simulation to punched cards so that I could feed them into a plotting program that I wrote and we had log-log paper for the drum plotter.  It made the Circuits class a little more fun.  Not many students had such access in the dark old days.


Haven't heard ECAP mentioned for decades, when Berkley SPICE appeared everyone forgot about ECAP and the other simulators. Fond memories of those days with the punch cards!!

Best,

I built an IBM1130 on an FPGA and can run all of the IBM software unchanged.  I don't recall if I have ECAP but I do have the Continuous System Modeling Program (CSMP).  It works well!  Of course the goal was to get Fortran running so I could emulate the IBM1627 plotter on a LaserJet.  See attached...


 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf