Just Another Bode Plots Thread  - Page 1
Forum section: electronics / beginners

author: balnazzar
author_rank: Frequent Contributor
timestamp: October 13, 2022, 12:20:18 pm
content: 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 KHz3. 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.

author: mag_therm
author_rank: Frequent Contributor
timestamp: October 13, 2022, 01:40:27 pm
content: 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.

author: mawyatt
author_rank: Super Contributor
timestamp: October 13, 2022, 01:48:26 pm
content: 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,

author: rstofer
author_rank: Super Contributor
timestamp: October 13, 2022, 06:22:30 pm
content: As to the AD2 graph, how about increasing the Steps from 101 to 1001?

author: balnazzar
author_rank: Frequent Contributor
timestamp: October 13, 2022, 08:28:42 pm
content: Quote from: mag_therm on October 13, 2022, 01:40:27 pmOk, 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.

author: balnazzar
author_rank: Frequent Contributor
timestamp: October 13, 2022, 08:31:17 pm
content: Quote from: mawyatt on October 13, 2022, 01:48:26 pmI'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??

author: balnazzar
author_rank: Frequent Contributor
timestamp: October 13, 2022, 08:32:11 pm
content: Quote from: rstofer on October 13, 2022, 06:22:30 pmGood suggestion. I didn't think of that. Nonetheless, it shows the same ditch, just with smoother borders...

author: rstofer
author_rank: Super Contributor
timestamp: October 13, 2022, 11:58:19 pm
content: 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-manualI'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.

author: balnazzar
author_rank: Frequent Contributor
timestamp: October 14, 2022, 09:17:05 am
content: Quote from: rstofer on October 13, 2022, 11:58:19 pmThanks, 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)...

author: mag_therm
author_rank: Frequent Contributor
timestamp: October 14, 2022, 03:19:22 pm
content: The Bode plot in my day was a hand method of drawing the approximations as a simplified companion setto 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 nowalso, 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

author: rstofer
author_rank: Super Contributor
timestamp: October 14, 2022, 03:35:55 pm
content: Quote from: mag_therm on October 14, 2022, 03:19:22 pmBut 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.

author: balnazzar
author_rank: Frequent Contributor
timestamp: October 14, 2022, 06:14:03 pm
content: Quote from: rstofer on October 14, 2022, 03:35:55 pmMh.. On my device, these settings appear to be locked in Waveforms, along with input impedance and bandwidth limitation. Look:

author: mawyatt
author_rank: Super Contributor
timestamp: October 14, 2022, 10:23:44 pm
content: Quote from: rstofer on October 14, 2022, 03:35:55 pmHaven'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,

author: rstofer
author_rank: Super Contributor
timestamp: October 15, 2022, 06:21:55 pm
content: Quote from: balnazzar on October 14, 2022, 06:14:03 pmSame 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.

author: rstofer
author_rank: Super Contributor
timestamp: October 15, 2022, 06:29:08 pm
content: Quote from: mawyatt on October 14, 2022, 10:23:44 pmI 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...