Bode Phase measurements using oscilloscope - Page 1
Forum section: electronics / beginners

author: kerpal
author_rank: Contributor
timestamp: October 28, 2014, 06:39:45 am
content: In the last 2 minutes of this demo video, the presenter showed how the time-domain signal correlated with the Bode plot. I understand how the Gain plot is obtained, but I don't understand how the Phase plot is obtained when there are not clear edges for the oscilloscope software to measure Phase. I tried this on my oscilloscope and clearly I cannot measure phase between 2 two signals that are close to the noise floor.Can anyone help me understand how Phase Plot is actually constructed?Thanks.

author: Skimask
author_rank: Super Contributor
timestamp: October 28, 2014, 06:58:08 am
content: You can measure phase between 2 DC signals?

author: LvW
author_rank: Frequent Contributor
timestamp: October 28, 2014, 07:43:48 am
content: Quote from: Skimask on October 28, 2014, 06:58:08 amMore than that: You can define a phase for dc signals?

author: kerpal
author_rank: Contributor
timestamp: October 28, 2014, 07:55:30 am
content: I have rephrased my question above to make it clearer (or look at the video to know what I mean).In the example Frequency Response Analysis, there will be a frequency region where the signal will be attenuated close to the noise floor. How then can we characterize or measure the Phase using an oscilloscope when there are no edges in this case? The application in the video managed to do so.

author: IconicPCB
author_rank: Super Contributor
timestamp: October 28, 2014, 08:59:45 am
content: Ir uses some kind of phase measuring instrument.It could be a four quadrant analogue multiplier which produces a magnitude and phase component for display on CRT.It could be a double balanced diode mixer.. a Gilbert cell.. a sampling bridge as used in vector voltmeter or it could be a scope screen displaying Lissajous pattern from which phase information can be determined.It however does not rely on a clock like signal to excite the circuit and produce gain / phase info.

author: Kevin.D
author_rank: Frequent Contributor
timestamp: October 28, 2014, 12:01:52 pm
content: Quote from: kerpal on October 28, 2014, 07:55:30 amThe amplitude of the signal you inject vs loop gain is usually varied .When loop gain is large (like at low frequencys) the injected signal needs to be largerso we can detect it (at one side of the injection point( - input of the opamp) the signal you injected is attenuated by a factor of 'loop gain' and this amplitude is subtracted from the returning side so injected signal needs to be larger at low frequencies so we can resolve the large gains (small difference to be detected above noise floor). At higher frequencies (low loop gain so signal amplitude at the - input increase) then you actually reduce injection ampltiude so you don't overdrive loop.seems a bit counter intuitive I know but here's an excellent page on this atthis website.http://www.ridleyengineering.com/ap300-loop-injection.html?showall=&start=2Regards

author: kerpal
author_rank: Contributor
timestamp: October 28, 2014, 01:54:30 pm
content: Quote from: IconicPCB on October 28, 2014, 08:59:45 amCool. I didn't know about those methods (never learned in school). I'll look it up. Thanks!So, the edge-detection method should never be used in frequency response analysis at all, right? I can't remember how I did Phase Plot in the lab back in school, but I vaguely recall it was pretty simple. But then again, education != real life.Quote from: Kevin.D on October 28, 2014, 12:01:52 pmOkay, that kind of make sense. I always thought that the injected amplitude needs to be constant for the entire plot to be valid, and one would keep changing the injected amplitude via trial-and-error until the 0dB crossing point is pretty stable and doesn't deviate much when injection amplitude changes.And thanks for the awesome link. Wished I found it sooner.

author: TonyStewart
author_rank: Contributor
timestamp: October 28, 2014, 01:55:59 pm
content: I would think generator attenuation is controlled by decades intelligently by a detected loop response signal level to maintain adequate SNR to measure amplitude gain and phase in the presence of noise and resonant characteristics.Step level switching of signal attenuator or precision current-controlled gain multi-stage OTA's may be required internal to the instrument. Tracking filter is required to improve detected gain and phase quality which makes the difference in better quality units.Phase could be as simple as limiter signals compared in an XOR gate or a type II detector in CMOS 4046 PLL.

author: LvW
author_rank: Frequent Contributor
timestamp: October 28, 2014, 02:20:26 pm
content: Quote from: Kevin.D on October 28, 2014, 12:01:52 pmSorry - but this sounds a bit "weird" to me.1.) Usualy, the injected signal for measuring/simulating the loop gain is NOT varied.2.) Higher loop gains require a larger injected signal? I think, just the opposite is true. Large gains require a (small) signal which does NOT drive the amplifier into saturation.3.) ."..the signal you injected is attenuated by a factor of 'loop gain' ""Attenuated by the loop gain? The loop gain (GAIN !), of course, is larger than unity in the active working region and does not "attenuate" a signal but causes amplification._________Or did I misunderstand something?EDIT: Only now I have discovered that Kevin.D in his post#5 did reference a link with a special method for loop gain measurements (in a closed loop). That means: His comments do apply to this (uncommon) method only.

author: kerpal
author_rank: Contributor
timestamp: October 28, 2014, 02:29:08 pm
content: Quote from: LvW on October 28, 2014, 02:20:26 pmI thought it should be fixed too. But I looked around, and seems like this Omicron solution provides an option to vary the injected signal to smooth out the noise. In the video, he said "for example, when documenting". Feels like photoshoping, though.http://www.omicron-lab.com/bode-100/application-notes-know-how/application-notes/dcdc-converter-stability-measurement.html

author: David Hess
author_rank: Super Contributor
timestamp: October 28, 2014, 06:19:06 pm
content: Quote from: kerpal on October 28, 2014, 06:39:45 amThe vector network analyser function operates as a tuned synchronous receiver using DSP to do what IconicPCB suggests so it has an incredibly low noise floor compared to the time domain display which is wideband.The same gain and phase data could have been calculated from the impulse response. Some high end DSOs support this method.Syscomp Electronic Design makes some inexpensive USB oscilloscopes which can make these measurements.

author: Kevin.D
author_rank: Frequent Contributor
timestamp: October 28, 2014, 06:55:22 pm
content: Hi kerpal .I said it seemed counter intuitive , but that might just be my unclear language I used, when I use term attenuate (negative gain if you like) I was reffering to the signal appearing at the opamp inv input's, since thats the way I think about a neg feedback loops which 'attenuate' change at the node that inv input is tied to.but lets look generallyIn negative feeback The opamp counteracts whatever signal you inject into theloop in order to keep it's two inputs 'almost' the same. It's 'almost' because in order to produceany output at all other than 0 there MUST be a difference between the input's .The size of this difference will be whatever output is required divided by loopgain . (or put another way we can attenuate an error signal at the node of our inv term by 1/(gain+1) because that's the fraction of the error that is required to appear at the inv input.).Hows this relate to doing bode plots ?.So lets assume a high gain loop When we inject our signal the opamp output will have to oppose your injected signal.so we put a 1V source in series in the loop then the output would reduce by -1V to exactly cancel it in order to keep opamp inputs ~ equil.Now for finite gains we know some of our injected signal must appear beteween the opamp input's and the remainder on the output.This ratio of what appears on the out/input depends on the gain of the feeback loop, with a perfect negative feedback loop (infinite gain) none of the injected signal will appear at the opamp inv input and 100% appears at the output. With a loop gain of say 1 then +.5V must appear at the inv input and -.5V at the output .We are then essentially aquiring and calculating delta Vout/Vin to get the loop gain .(or since the sum of Vin+Vout must be Vsig I suppose we could also use Delta Vsig/Vsig-Vout ,and at high gain Vout is going to be very close to Vsig and in order to resolve from noise we may need larger input signal .In the nice noise free simulated circuit where we dont have noise floors and other such complications you can use a fixed amplitude.

author: TonyStewart
author_rank: Contributor
timestamp: October 29, 2014, 12:33:48 am
content: Quote from: kerpal on October 28, 2014, 06:39:45 amThe ADC has a much greater dynamic range than the scope trace showed in time domain. DSP tracking filters could have been applied to improve the SNR to determine the zero-crossing phase or a coherent method may have been used.Yer welcome.

author: macboy
author_rank: Super Contributor
timestamp: October 29, 2014, 12:13:30 pm
content: Quote from: kerpal on October 28, 2014, 07:55:30 amYou may be confused. Gain of 0 dB means no gain (and no attenuation either). The output is the same amplitude as the input. You can simultaneously view both, one on each channel, and can easily see and measure the phase difference between them.

author: kerpal
author_rank: Contributor
timestamp: October 29, 2014, 12:27:17 pm
content: Quote from: macboy on October 29, 2014, 12:13:30 pmYup, I've corrected it

author: TonyStewart
author_rank: Contributor
timestamp: October 29, 2014, 02:18:03 pm
content: Quote from: kerpal on October 29, 2014, 12:27:17 pmUsing a shunt resistor , if necessary, in the feedback loop you can inject an AC coupled sweep signal gen modulated by scope sweep ramp signal and view the Amplifier envelope in the freq. decade near unity gain with the X scale being linear frequency.To view phase use manual sweep or fixed at unity gain and view in XY mode for vector angle or Lissajous slope of phase for phase or gain margin measurements. Or simply measure time interval with a DSO and compute phase. 60 dg phase margin ideal for a 2nd or higher order system, 90 deg is ideal for a 1st order system.

author: rbola35618
author_rank: Frequent Contributor
timestamp: November 03, 2014, 10:31:43 pm
content: I posted this video on how to use the scope to measure the gain and phase about a year or so ago. I am reposting here again for your review.

author: kerpal
author_rank: Contributor
timestamp: November 16, 2014, 04:49:15 pm
content: Quote from: rbola35618 on November 03, 2014, 10:31:43 pmThanks! In 15:00, I noticed the same problem where the Phase measurement is erratic since the waveform is nearing the noise floor. In your case, it's still not that bad, so Statistics helped. In any case, it was a good video to get a feel for the overall process.

author: David Hess
author_rank: Super Contributor
timestamp: November 16, 2014, 05:55:53 pm
content: Quote from: kerpal on November 16, 2014, 04:49:15 pmHe shows earlier in the video that the signal generator is used to trigger the oscilloscope directly on a third channel or external trigger input and that allows averaging on the oscilloscope to be used to its best advantage. Signals below the noise floor may be observed this way.