LCR Impedance Viewer for Picoscope+Keysight+R&S Bode Plot Data (open source) - Page 1
Forum section: electronics / testgear

author: _Wim_
author_rank: Super Contributor
timestamp: February 10, 2019, 12:04:15 pm
content: I have been a big fan of using the app FRA4Picoscope to generate bode plots. This for me makes the Pico products much more useful.By using a reference resistor in series with a DUT, it is possible to calculate the impedance from the DUT. For this a made a small tool to do the calculation automatically, and also to allow the user to more easy compare different bode plots in once view. Currently, you can open the CSV-files generated by FRA4Picoscope, Keysight & R&S (more to come in the future), and view and compare them easily in the different impedance views.I programmed automatic cursors, a zoom function for each individual axis, and both logarithmic and linear frequency axis. When a CSV file is opened, the used reference resistor is requested. This can be different for each file (to allow the user to choose the optimal value for the DUT) in the same plot view. You can also copy pictures/data to the clipboard (data can be pasted in excel directly), or save them to a file.Attached is the program, including some test data to allow non-Pico/Keysight/R&S users to have a go also. If some other scopes can generate bode plot data (frequency, gain and phase), it should be no problem to make an import functionality for these also. I am still cleaning up a bit of my code, once finished the code will be available as open source also.Enjoy! Feedback is off course much appreciated.Installation is not required, just unzip the package and run the exe. It does need dotNet 4.6.1 or higher. The software was written in Visual Studio20172019 community edition, using the standard chart component of dotNet (no external libraries used for charting).Edit: changed to VS2019 for the latest small updateFull source code is available at:https://github.com/WimHuyghe/FRA-Impedance-Viewer

author: threephase
author_rank: Regular Contributor
timestamp: February 10, 2019, 02:31:56 pm
content: Interesting project, I'll download it and transfer over to a Windows PC to have a play with.Thanks for posting,Kind regards.

author: _Wim_
author_rank: Super Contributor
timestamp: February 10, 2019, 03:52:54 pm
content: Thanks! If somebody could post a bode plot export (CSV preffered if possible) from a Keysight of Siglent scope, I can have a look to make an import function for these also.

author: 2N3055
author_rank: Super Contributor
timestamp: February 10, 2019, 04:26:43 pm
content: Quote from: _Wim_ on February 10, 2019, 03:52:54 pmNice work!Thanks for the offer, in attachment FRA CSV form Keysight MSOX3000T.If you need more let me know.Thanks and best regards.Sinisa

author: _Wim_
author_rank: Super Contributor
timestamp: February 10, 2019, 07:22:21 pm
content: Keysight import works also! I do not know what your file was, but I can import it and display it.Now still a Siglent file, R&S and...EDIT: last version added in first post

author: 2N3055
author_rank: Super Contributor
timestamp: February 10, 2019, 08:31:09 pm
content: Wow it works really well!Great work, really!The file is standard FRA.csv from scope. I had to rename it to .txt to upload it to EEVBLOG (it doesn't let you upload .csv).A suggestion: it would be nice to show what R was used for calculation. Maybe a chance to change it later + recalc ?Thanks again.Regards,Sinisa.

author: _Wim_
author_rank: Super Contributor
timestamp: February 10, 2019, 08:57:33 pm
content: Thanks for the feedback.I will make a property windows were all file info can be seen (ref resistor, path, file name, number of datapoints, max freq, min freq...).Changing the ref resistor value once displayed is not very easy (I would have to delete the series and add them again) and normally also not necesarry I think (if the wrong value was entered, the user can remove the file by right clicking on the legend and add it again using the correct value.I have already added the following options:- allow for printing a chart- allow the user to choose to display the legend inside or outside the chart (both have benefits)Currently working on the property window...

author: Hydron
author_rank: Super Contributor
timestamp: February 10, 2019, 09:27:32 pm
content: Looks like a useful bit of software, thanks for writing and sharing it!If nobody else supplies a R&S file then I can oblige, but I'll wait a bit first (scope is setup for some other measurements right now and prefer to leave it be).

author: _Wim_
author_rank: Super Contributor
timestamp: February 10, 2019, 09:33:24 pm
content: Quote from: Hydron on February 10, 2019, 09:27:32 pmThanks! Updated version added to first post. Now with print support and file properties window.

author: _Wim_
author_rank: Super Contributor
timestamp: February 10, 2019, 09:47:31 pm
content: If anybody has some good info how a calibration can be calculated (like performing an "open" and "short" bode measurement first with the testjig alone). This could be a usefull feature to include to increase accuracy.Will not be for today however...

author: _Wim_
author_rank: Super Contributor
timestamp: February 11, 2019, 02:05:11 pm
content: New version in first post: some small bugfixes and cosmetic changes. Source code file is to big to attach here (4MB). @Moderator, is it possible to attach bigger files somehow in first post?

author: Hydron
author_rank: Super Contributor
timestamp: February 11, 2019, 02:23:41 pm
content: Maybe put it on something like github/lab etc? Would also allow people to see changes in the code over time.

author: _Wim_
author_rank: Super Contributor
timestamp: February 11, 2019, 05:33:44 pm
content: Quote from: Hydron on February 11, 2019, 02:23:41 pmThat crossed my mind also, but I first have to read a bit to see how exactly that works with integration in VS2017.

author: _Wim_
author_rank: Super Contributor
timestamp: February 11, 2019, 07:43:58 pm
content: Ok, finally success I think. Apparently there is an issue with VS2017 on Win7 with github (error "user cancelled certificate check"). This links "easy fix" was indeed the solution for my problem:https://github.com/github/VisualStudio/issues/1532So normally the full source code should be available here:https://github.com/WimHuyghe/FRA-Impedance-ViewerPlease report back if you were able to compile it using this source code, and off course also if you would like to contribute to the code.

author: Hydron
author_rank: Super Contributor
timestamp: February 11, 2019, 10:22:42 pm
content: So I did a quick bode plot on the RTB2k, both channels (3 and 4) connected directly to the sig gen so results are a bit boring (other than a bit of phase/amplitude shift from the cables/reflections up towards 25MHz) but should give an idea of file format (which is nice and simple). Note that this is 100points/decade but it can go up to 500, so potentially quite a few points for a wide sweep at 500/dec.The standard output seems to be a CSV (attached with filetype changed to txt); there is also a "live data" directory with a bunch of other formats that can be accessed when the unit is plugged into the PC as a USB device - this is in the zip file (also attached) but probably not important to support that as it's far more complicated than the standard output - it's probably more for when the unit is used in an automated rather than interactive fashion.

author: _Wim_
author_rank: Super Contributor
timestamp: February 12, 2019, 09:56:27 pm
content: Quote from: Hydron on February 11, 2019, 10:22:42 pmR&S now also supported. Update attached to first post. Any other tools that generate bode plots? :-)

author: 2N3055
author_rank: Super Contributor
timestamp: February 12, 2019, 10:03:53 pm
content: SC from Github compiled on first try on VS2017..

author: _Wim_
author_rank: Super Contributor
timestamp: February 12, 2019, 10:17:53 pm
content: Quote from: 2N3055 on February 12, 2019, 10:03:53 pmThanks for the feedback, good to know.

author: _Wim_
author_rank: Super Contributor
timestamp: February 26, 2019, 09:46:51 am
content: Added direct measurement of a plot using a picoscope (no more need to save to CSV first). This uses the API DLL from the FRA4Picoscope app.Updated version attached to first post, source code on Github.Known bugs: status log picoscope does not work yet.

author: HalFET
author_rank: Frequent Contributor
timestamp: February 26, 2019, 01:00:09 pm
content: What did you have in mind as calibration? Do you actually want to calculate the error throughout the curve?

author: _Wim_
author_rank: Super Contributor
timestamp: February 26, 2019, 01:35:03 pm
content: I was thinking of something is the line of measuring a "known" resistor with using the known reference resistor. This way both gain and phase can be predicted, and actual measured gain and phase can be used somehow as a correction. Similarly, I could measure with an open jig and a shorted jig like is typically done with an LCR meter.But I am not sure this will be very useful, as the inaccuracy of using a scope in the first place or probably much worse that not performing a calibration on the test jig/cables.

author: _Wim_
author_rank: Super Contributor
timestamp: February 26, 2019, 01:37:43 pm
content: Updated version again in first post, now you can define the reference resistor when taking a measurement with the picoscope directly (forgot to remove the test code were is was default at 1K)

author: HalFET
author_rank: Frequent Contributor
timestamp: February 26, 2019, 04:03:46 pm
content: That should be doable if you measure it in a range where the phase difference is high enough. You could probably also go for a Q-meter approach, though that would require additional components which might not be very attractive.

author: _Wim_
author_rank: Super Contributor
timestamp: February 26, 2019, 09:17:00 pm
content: Finally fixed the problem with the message log. Updated version in first post. Also added some more options and small functionality.

author: HalFET
author_rank: Frequent Contributor
timestamp: February 27, 2019, 10:36:50 pm
content: Quick try at the error calculation, haven't yet investigated your code so not sure how applicable this is.So operating on the assumption that we can see the circuit as follows:V2 o------+|| || | Z_REF| ||V1 o------+|| || | Z_DUT| ||___GND -Then we can assume:Z_DUT = Z_REF * V1 / (V2 - V1)If we split each bit up as imaginary number:Z_DUT = R_DUT + j * X_DUT,Z_REF = R_REF + 1i * X_REF,V1 = V1_Re + 1i * V1_ImandV2 = V2_Re + 1i * V2_ImAt that point:Code:R_DUT = - ((V1_Im - V2_Im)*(R_REF*V1_Im + V1_Re*X_REF))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2) - ((V1_Re - V2_Re)*(R_REF*V1_Re - V1_Im*X_REF))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2)Code:X_DUT = ((V1_Im - V2_Im)*(R_REF*V1_Re - V1_Im*X_REF))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2) - ((V1_Re - V2_Re)*(R_REF*V1_Im + V1_Re*X_REF))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2)If we then set the error of each input variable:R_REF_Error X_REF_Error V1_Re_Error V1_Im_Error V2_Re_Error V2_Im_ErrorThen the errors become:Code:R_DUT_Error = (V1_Im_Error^2*((X_REF*(V1_Re - V2_Re))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2) - (R_REF*(V1_Im - V2_Im))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2) - (R_REF*V1_Im + V1_Re*X_REF)/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2) + ((V1_Im - V2_Im)*(R_REF*V1_Im + V1_Re*X_REF)*(2*V1_Im - 2*V2_Im))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2)^2 + ((V1_Re - V2_Re)*(R_REF*V1_Re - V1_Im*X_REF)*(2*V1_Im - 2*V2_Im))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2)^2)^2 + V1_Re_Error^2*((R_REF*V1_Re - V1_Im*X_REF)/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2) + (R_REF*(V1_Re - V2_Re))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2) + (X_REF*(V1_Im - V2_Im))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2) - ((V1_Im - V2_Im)*(R_REF*V1_Im + V1_Re*X_REF)*(2*V1_Re - 2*V2_Re))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2)^2 - ((V1_Re - V2_Re)*(R_REF*V1_Re - V1_Im*X_REF)*(2*V1_Re - 2*V2_Re))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2)^2)^2 + V2_Im_Error^2*(((V1_Im - V2_Im)*(R_REF*V1_Im + V1_Re*X_REF)*(2*V1_Im - 2*V2_Im))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2)^2 - (R_REF*V1_Im + V1_Re*X_REF)/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2) + ((V1_Re - V2_Re)*(R_REF*V1_Re - V1_Im*X_REF)*(2*V1_Im - 2*V2_Im))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2)^2)^2 + V2_Re_Error^2*(((V1_Im - V2_Im)*(R_REF*V1_Im + V1_Re*X_REF)*(2*V1_Re - 2*V2_Re))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2)^2 - (R_REF*V1_Re - V1_Im*X_REF)/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2) + ((V1_Re - V2_Re)*(R_REF*V1_Re - V1_Im*X_REF)*(2*V1_Re - 2*V2_Re))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2)^2)^2 + R_REF_Error^2*((V1_Im*(V1_Im - V2_Im))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2) + (V1_Re*(V1_Re - V2_Re))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2))^2 + X_REF_Error^2*((V1_Re*(V1_Im - V2_Im))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2) - (V1_Im*(V1_Re - V2_Re))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2))^2)^(1/2)Code:X_DUT_Error = (V1_Im_Error^2*((R_REF*(V1_Re - V2_Re))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2) - (R_REF*V1_Re - V1_Im*X_REF)/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2) + (X_REF*(V1_Im - V2_Im))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2) + ((V1_Im - V2_Im)*(R_REF*V1_Re - V1_Im*X_REF)*(2*V1_Im - 2*V2_Im))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2)^2 - ((V1_Re - V2_Re)*(R_REF*V1_Im + V1_Re*X_REF)*(2*V1_Im - 2*V2_Im))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2)^2)^2 + V1_Re_Error^2*((R_REF*V1_Im + V1_Re*X_REF)/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2) - (R_REF*(V1_Im - V2_Im))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2) + (X_REF*(V1_Re - V2_Re))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2) + ((V1_Im - V2_Im)*(R_REF*V1_Re - V1_Im*X_REF)*(2*V1_Re - 2*V2_Re))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2)^2 - ((V1_Re - V2_Re)*(R_REF*V1_Im + V1_Re*X_REF)*(2*V1_Re - 2*V2_Re))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2)^2)^2 + V2_Im_Error^2*((R_REF*V1_Re - V1_Im*X_REF)/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2) - ((V1_Im - V2_Im)*(R_REF*V1_Re - V1_Im*X_REF)*(2*V1_Im - 2*V2_Im))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2)^2 + ((V1_Re - V2_Re)*(R_REF*V1_Im + V1_Re*X_REF)*(2*V1_Im - 2*V2_Im))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2)^2)^2 + V2_Re_Error^2*((R_REF*V1_Im + V1_Re*X_REF)/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2) + ((V1_Im - V2_Im)*(R_REF*V1_Re - V1_Im*X_REF)*(2*V1_Re - 2*V2_Re))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2)^2 - ((V1_Re - V2_Re)*(R_REF*V1_Im + V1_Re*X_REF)*(2*V1_Re - 2*V2_Re))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2)^2)^2 + R_REF_Error^2*((V1_Re*(V1_Im - V2_Im))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2) - (V1_Im*(V1_Re - V2_Re))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2))^2 + X_REF_Error^2*((V1_Im*(V1_Im - V2_Im))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2) + (V1_Re*(V1_Re - V2_Re))/((V1_Im - V2_Im)^2 + (V1_Re - V2_Re)^2))^2)^(1/2)It ain't pretty, but doable I would say.

author: HalFET
author_rank: Frequent Contributor
timestamp: February 28, 2019, 01:14:20 pm
content: To further elaborate on it, since you're using gain apparently (assuming I read your code correctly) we'll have to convert the scope's measurement error to gain error:Gain = 20 log(V1/V2)dGain/dV1 = - 20 / V1dGain/dV2 = 20 / V2So then:Gain Error = sqrt( (dGain/dV1 * V1_Error)^2 + (dGain/dV2 * V2_Error)^2 )Gain Error = sqrt( (20 / V1 * V1_Error)^2 + (20 / V2 * V2_Error)^2 )Gain Error = 20 * sqrt( (V1_Error / V1)^2 + (V2_Error / V2)^2 )Next we need to put this intoZ_DUT = Z_REF * V1 / (V2 - V1)If we rework it a bit it should becomeZ_DUT = Z_REF / (V2 / V1 - 1) = Z_REF / (1 / (V1/V2) - 1)ThenV1/V2 = (|V1| < Phi)/(V2 < 0°) = (|V1| * cos(phi) + j * |V1| * sin(phi)) / |V2|so we need to know the error on|V1|/|V2|.Since|V1|/|V2| = 10^(Gain/20)the error becomessqrt((Gain Error * 2^((x-40)/20) * 5^((x-20)/20) * ln(10))^2)I'll do the rest later.

author: _Wim_
author_rank: Super Contributor
timestamp: February 28, 2019, 08:23:22 pm
content: Quote from: HalFET on February 28, 2019, 01:14:20 pmWow, thanks for this. I will have a detailed look at it this weekend, to late for math now...

author: _Wim_
author_rank: Super Contributor
timestamp: February 28, 2019, 09:03:20 pm
content: New version in first post:Bugfix:- was not possible any longer to open multiple FRA4Pico plots (was always opening new plot).Other changes:- cursor info always same nr of lines (so chart does not move when right mouse button is used)- pompt on exit when unsaved files are present

author: HalFET
author_rank: Frequent Contributor
timestamp: March 01, 2019, 12:03:06 pm
content: Quote from: HalFET on February 28, 2019, 01:14:20 pmFixed a little error, forgot the ^2 on the ratio of |V1|/|V2| error, but I'd just replace it with abs() in software. Also didn't remember thatcos(x) + j*sin(x) = e^(j*x).The error on V1/V2 then becomes:d(V1/V2)/d(|V1|/|V2|) = exp(j*phi)d(V1/V2)/d(phi) = (|V1|/|V2|)*exp(j*(phi+0.5*pi))Error V1/V2 = sqrt((d(V1/V2)/d(|V1|/|V2|) * Error(|V1|/|V2|))^2 + (d(V1/V2)/d(phi) * Error(Phi))

author: HalFET
author_rank: Frequent Contributor
timestamp: March 01, 2019, 06:31:14 pm
content: Redid it entirely in Matlab to avoid errors (think a few might have sneaked in already, like I forgot a ln(10) in the gain error probably):Code:syms REF_Magnitude positive; syms Error_REF_Magnitude positive;syms REF_Phi real; syms Error_REF_Phi positive;syms V1_Magnitude positive; syms Error_V1_Magnitude positive;syms V1_Phi real; syms Error_V1_Phi positive;syms V2_Magnitude positive; syms Error_V2_Magnitude positive;%Calculate Gain error based on scope measurements%This should be a function of the scope which is calculated once.TrueGain = 20 * log10(V1_Magnitude / V2_Magnitude);dGain_dV1 = diff(TrueGain, V1_Magnitude);dGain_dV2 = diff(TrueGain, V2_Magnitude);TrueGain_Error = sqrt( (dGain_dV1 * Error_V1_Magnitude)^2 + (dGain_dV2 * Error_V2_Magnitude)^2 );%Lets assume the Gain and Gain_Error are input variablessyms Gain Gain_Error real;%Calculate V1/V2 error based on Gain errorV1_V2_Magn_ratio = 10 ^ (Gain / 20);Error_V1_V2_Magn_ratio = abs(diff(V1_V2_Magn_ratio, Gain) * Gain_Error);V1_V2 = V1_V2_Magn_ratio * exp(1i * V1_Phi);dV1_V2_dGain = diff(V1_V2, Gain);dV1_V2_dV1_Phi = diff(V1_V2, V1_Phi);V1_V2_Error = sqrt(( dV1_V2_dGain * Gain_Error)^2 + (dV1_V2_dV1_Phi * Error_V1_Phi)^2);%Device Under TestZ_REF = REF_Magnitude * exp(1i * REF_Phi);Z_DUT = Z_REF * 1 / (1 / V1_V2 - 1);Z_DUT_Magnitude = abs(Z_DUT);Z_DUT_Phase = angle(Z_DUT);Z_DUT_Magnitude_deltas = [diff(Z_DUT_Magnitude, REF_Magnitude) diff(Z_DUT_Magnitude, REF_Phi) diff(Z_DUT_Magnitude, Gain) diff(Z_DUT_Magnitude, V1_Phi)];Z_DUT_Magnitude_errors = [Error_REF_Magnitude Error_REF_Phi Gain_Error Error_V1_Phi];Z_DUT_Phase_deltas = [diff(Z_DUT_Phase, REF_Magnitude) diff(Z_DUT_Phase, REF_Phi) diff(Z_DUT_Phase, Gain) diff(Z_DUT_Phase, V1_Phi)];Z_DUT_Phase_errors = [Error_REF_Magnitude Error_REF_Phi Gain_Error Error_V1_Phi];Z_DUT_Magnitude_Error = sqrt(sum((Z_DUT_Magnitude_deltas .* Z_DUT_Magnitude_errors).^2));Z_DUT_Phase_Error = sqrt(sum((Z_DUT_Phase_deltas .* Z_DUT_Phase_errors).^2));Code:Z_DUT_Magnitude = REF_Magnitude/abs(1/10^(Gain/20)*exp(-V1_Phi*1i) - 1)Z_DUT_Phase = angle(exp(REF_Phi*1i)/(1/10^(Gain/20)*exp(-V1_Phi*1i) - 1))Z_DUT_Magnitude_Error = (Error_REF_Magnitude^2/abs(exp(-V1_Phi*1i)/10^(Gain/20) - 1)^2 - (1/10^(Gain/10)*Error_V1_Phi^2*REF_Magnitude^2*sign(1/10^(Gain/20)*exp(-V1_Phi*1i) - 1)^2*exp(-V1_Phi*2i))/abs(exp(-V1_Phi*1i)/10^(Gain/20) - 1)^4 + (1/10^(Gain/10)*Gain_Error^2*REF_Magnitude^2*sign(1/10^(Gain/20)*exp(-V1_Phi*1i) - 1)^2*exp(-V1_Phi*2i)*log(10)^2)/(400*abs(exp(-V1_Phi*1i)/10^(Gain/20) - 1)^4))^(1/2)Z_DUT_Phase_Error = ((Gain_Error^2*real(exp(REF_Phi*1i)/(1/10^(Gain/20)*exp(-V1_Phi*1i) - 1))^4*(imag((1/10^(Gain/20)*exp(REF_Phi*1i)*exp(-V1_Phi*1i)*log(10))/(exp(-V1_Phi*1i)/10^(Gain/20) - 1)^2)/(20*real(exp(REF_Phi*1i)/(1/10^(Gain/20)*exp(-V1_Phi*1i) - 1))) - (real((1/10^(Gain/20)*exp(REF_Phi*1i)*exp(-V1_Phi*1i)*log(10))/(exp(-V1_Phi*1i)/10^(Gain/20) - 1)^2)*imag(exp(REF_Phi*1i)/(1/10^(Gain/20)*exp(-V1_Phi*1i) - 1)))/(20*real(exp(REF_Phi*1i)/(exp(-V1_Phi*1i)/10^(Gain/20) - 1))^2))^2)/(imag(exp(REF_Phi*1i)/(exp(-V1_Phi*1i)/10^(Gain/20) - 1))^2 + real(exp(REF_Phi*1i)/(exp(-V1_Phi*1i)/10^(Gain/20) - 1))^2)^2 + (Error_V1_Phi^2*real(exp(REF_Phi*1i)/(1/10^(Gain/20)*exp(-V1_Phi*1i) - 1))^4*(real((1/10^(Gain/20)*exp(REF_Phi*1i)*exp(-V1_Phi*1i))/(exp(-V1_Phi*1i)/10^(Gain/20) - 1)^2)/real(exp(REF_Phi*1i)/(1/10^(Gain/20)*exp(-V1_Phi*1i) - 1)) + (imag((1/10^(Gain/20)*exp(REF_Phi*1i)*exp(-V1_Phi*1i))/(exp(-V1_Phi*1i)/10^(Gain/20) - 1)^2)*imag(exp(REF_Phi*1i)/(1/10^(Gain/20)*exp(-V1_Phi*1i) - 1)))/real(exp(REF_Phi*1i)/(exp(-V1_Phi*1i)/10^(Gain/20) - 1))^2)^2)/(imag(exp(REF_Phi*1i)/(exp(-V1_Phi*1i)/10^(Gain/20) - 1))^2 + real(exp(REF_Phi*1i)/(exp(-V1_Phi*1i)/10^(Gain/20) - 1))^2)^2 + (Error_REF_Phi^2*real(exp(REF_Phi*1i)/(1/10^(Gain/20)*exp(-V1_Phi*1i) - 1))^4*(imag(exp(REF_Phi*1i)/(1/10^(Gain/20)*exp(-V1_Phi*1i) - 1))^2/real(exp(REF_Phi*1i)/(exp(-V1_Phi*1i)/10^(Gain/20) - 1))^2 + 1)^2)/(imag(exp(REF_Phi*1i)/(exp(-V1_Phi*1i)/10^(Gain/20) - 1))^2 + real(exp(REF_Phi*1i)/(exp(-V1_Phi*1i)/10^(Gain/20) - 1))^2)^2)^(1/2)This isn't very practical though, the question is where to start simplifying. Or better yet, what's an acceptable error estimate. The flu hit me a bit too hard for me to think straight about this one for now, heheh.

author: _Wim_
author_rank: Super Contributor
timestamp: March 01, 2019, 07:03:38 pm
content: Yikes. That's alot of math to check this weekend. Maybe I will need a couple more...

author: HalFET
author_rank: Frequent Contributor
timestamp: March 01, 2019, 08:26:24 pm
content: Quote from: _Wim_ on March 01, 2019, 07:03:38 pmIt just over-inflates very quickly if you don't use in-between answers and simplify some terms, it ain't as bad as it looks. The principle behind error/uncertainty calculations is really simple though:Error of Value = sqrt( sum of (dValue/dx1 * Error of x_i)^2 for all variables x_i)So it'd be a lot more practical to calculate dValue/dx_i for each variable, and then just add it all up together like that like I did in the Matlab code. Just a bit too hazy to cut it up into pieces at the moment, should be easy enough to do if you fire that code up in Matlab or Octave though.But the main interesting bit is that the gain error in practice stays quite flat until you go into the lower ranges, there the potential offset error of the scope can kill it for you.Code:Series = 0.001:0.005:10;[X, Y] = meshgrid(Series, Series);Z = 20 .* log10(X./Y);figure(1);surf(X, Y, Z, 'edgecolor', 'none');xlabel('V2 ');ylabel('V1 ');zlabel('Gain ');title('Voltage Gain - Decibel');%Scope error = Gain error + Offset error + ADC error% = +/- 5% value +/- 5 mV +/- 0.25% rangeRange1X = X <= 0.1; Range1Y = Y <= 0.1;Range2X = xor(X <= 1, Range1X); Range2Y = xor(Y <= 1, Range1Y);Range3X = xor(X <= 10, Range1X | Range2X); Range3Y = xor(Y <= 10, Range1Y | Range2Y);XError = 0.05 .* X + 0.005 + 0.0025 .* (Range1X .* 0.1 + Range2X .* 1 + Range3X .* 10);YError = 0.05 .* Y + 0.005 + 0.0025 .* (Range1Y .* 0.1 + Range2Y .* 1 + Range3Y .* 10);ZError = (20 ./ log(10)) .* sqrt((YError./Y).^2 + (XError./X).^2 );figure(2);surf(X, Y, ZError, 'edgecolor','none');xlabel('V2 ');ylabel('V1 ');zlabel('Gain Error ');title('Voltage Gain Error - Decibel Error');Operating on the assumption that the 39°C fever hasn't completely fried my brain, you're looking at something along the lines of <0.75 dB as of uncertainty throughout the practical range. Practical offset errors will probably be less than 2 mV, and the gain error on any modern scope frontend ought to be less than 5% really. See attached plots for 0 through 10V with the values of the code above.

author: _Wim_
author_rank: Super Contributor
timestamp: March 03, 2019, 08:13:53 pm
content: First let me explain the current calculation that is in the software:V1 o------+|| || | Z_REF| ||V2 o------+|| || | Z_DUT| ||___GND -Z_DUT = V2 / II = Rref / (V2 - V1)=> Z_DUT = Rref* V2 / (V1-V2)Angle between V1 and V2 = θ, V1 at 0°equal to siggen.Current in polar coordinates: [r=sqrt(X²+Y²) // α= tan-1 (y/x) ]<=> I = Rref / sqrt((V1 - V2 * cosθ)² +(V2 * sinθ)²)<=> I = Ref / sqrt(V1²-2 * V1 * V2 * cosθ + V2²)Magnitude & angle of Z_DUT: [dividing vectors in polar coordinates = divide magnitudes and substract phases]Z_DUT = Rref* V2 / sqrt(V1²-2*V1* V2*cosθ + V2²)α = θ – tan-1 ((-V2* sinθ)/(V1-V2* cosθ))To translate the above to “gain”, we know <=> gain = V2/V1-----------------------------------------------------------| Zmag = Rref* gain / sqrt(1-2*gain* cosθ + gain²) |----------------------------------------------------------- (equation 1)-----------------------------------------------------| α = θ – tan-1 ((-gain* sinθ)/(1-gain* cosθ)) |------------------------------------------------- ---(equation 2)Capacitance:-------------Z_DUT expressed in rectangular format has only a real part equal to Resr and a negative imaginary part equal to 1/(2*π* f*C)Z_DUT = Resr – j / (2*π* f*C)Z_DUT = Zmag* cosα + j* Zmag*sinα=>--------------------------| Resr = Zmag* cosα |-------------------------- (equation 3)Zmag* sinα = -1 / (2 * π * f * C) <=>----------------------------------------| C = -1 / (2 * π * f * Zmag * sinα |----------------------------------------(equation 4)Inductance:------------Z_DUT expressed in rectangular format has only a real part equal to Resr and a positive imaginary part equal to 2*π* f*LZ_DUT = Resr + j * 2 * π * f * LZ_DUT = Zmag* cosα + j* Zmag*sinα=>--------------------------| Resr = Zmag* cosα |-------------------------- (equal to equation 3)--------------------------------| L = Zmag* sinα / (2*π* f) |--------------------------------- (equation 5)

author: _Wim_
author_rank: Super Contributor
timestamp: March 03, 2019, 08:16:13 pm
content: Calibration:If we perform the calibration with a purely resistive calibration resistor Rcal, we know Z_TOT will consist of Rcal + Z_ERRIn rectangular coordinates we can express this asZ_TOT = Zmag_err*cosα_err + Rcal + j* Zmag_err*sinα_errZ_TOT = Zmag*cosα + j*Zmag*sinα=>Zmag*cosα = Zmag_err*cosα_err + Rcal (1)Zmag*sinα = Zmag_err*sinα_err (2)(2) Can be changed to:-----------------------------------------| Zmag_err = Zmag*sinα / sinα_err |----------------------------------------- (equation 6)Substituting equation 6 into (1)Zmag*cosα = = Zmag*sinα *cosα_err/sinα_err + Rcal <=>------------------------------------------------------------| α_err = tan-1 (Zmag* sinα / (Zmag*cosα – Rcal)) |------------------------------------------------------------ (equation 7)This way we know the error vector that can be used to adjust the measurement in the future.

author: _Wim_
author_rank: Super Contributor
timestamp: March 03, 2019, 08:24:59 pm
content: Calculation of DUT with correction:We know Z_TOT will consist of Z_DUT + Z_ERRIn rectangular coordinates we can express this asZ_TOT = Zmag_err*cosα_err + Zmag_DUT*cosα_DUT + j* (Zmag_err*sinα_err + Zmag_DUT *sinα_DUT)Z_TOT = Zmag*cosα + j*Zmag*sinα=>Zmag*cosα = Zmag_err*cosα_err + Zmag_DUT*cosα_DUTZmag*sinα = Zmag_err*sinα_err + Zmag_DUT *sinα_DUT=>------------------------------------------------------------------------| Zmag_DUT = (Zmag*sinα - Zmag_err*sinα_err) / sinα_DUT |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| α_DUT = tan-1 ((Zmag*sinα - Zmag_err*sinα_err)/ (Zmag*cosα - Zmag_err*cosα_err)) |------------------------------------------------------------------------------------------------------The capacitance and inductance formulae above can now be changed with Zmag_DUT and α_DUT.I am not a Matlab guy, so did not check this, just tried to make my written calculations in digital format.Basic principle would be as follows:- run a calibration with an Rcal reference resistor once. This file will be saved with values for Zmag_err and α_err for each frequency (interpollation will be used for in between frequencies)- measure a DUT.* first calucalate Zmag + α* lookup Zmag_err + α_err from the calibration file for each frequency* based on the above, calculate Zmag_dut and α_DUT* caculate capacitance and inductance using these last 2Am I missing something? Although I am currently not sick, my head also goes to 39°C when doing this stuff, so could be full with mistakes. So to all the math guru's, please checkAll of this is off course only true if Z_ERR can be thought of as an impedance in series with Z_DUT...edit: some spelling mistakes, copy paste error and clarifications

author: Hans Polak
author_rank: Contributor
timestamp: April 19, 2019, 04:51:18 pm
content: Wim,I downloaded your nice calculation tool and it seems to work fine on the .csv file produced by FRA4Picoscope.Problem however is that although FRA4Picoscope produces nice Bode plots, they show 1/A instead of input A, no idea why. Your tool obviously assumes an A and not an 1/A.That's why I tried "Measure" in your program.A nice screen appears with all relevant parameters to be entered, but when I press "start Measurement", I get a message "Unhandled Exception" and when clicking continue nothing further happens.I have installed SDK from Picoscope, but that makes no difference.Do I still need some additional software on my machine ?I have a 5243B PicoScope and my computer has Windows 10.I enclosed as a .txt file the .CSV file for a bode plot of a 2200 Ohm Rsense between B and A and a 1mH +56 Ohm coil between A and Gnd plus what FRA4Picoscope made of it.Hans

author: _Wim_
author_rank: Super Contributor
timestamp: April 19, 2019, 06:39:55 pm
content: Hi Hans,If I see the plot from FRA4Picoscope, I think you got input and output channel mixed up , because your gain can never be bigger than 0db with a passive device and a series resistance (input channel = input to DUT; output= output from DUT, it gets me confused also quite regularly). My app does not case which channels were used, I only look at gain and phase in the CSV file.As for my app crashing, normally there should be a log file in the execution directory. Can you post that one here? Did you close FRA4Picoscope while testing with my app (both cannot be run at the same time because both want access to the scope)?If FRA4Picoscope runs fine, you normally do not need to install anything else.

author: Hans Polak
author_rank: Contributor
timestamp: April 19, 2019, 07:42:16 pm
content: Hi Wim,Thanks for your rapid reply.You are right, changing the A and the B inputs returns the correct information.I have now the DUT from input B to gnd and not from input A as in your instruction.Thanks again,Hans

author: Evodad
author_rank: Contributor
timestamp: April 20, 2019, 06:03:11 pm
content: Hi Wim,I have used FRA4 quite a lot on and of since it was released. So yours is a really nice contribution to the tools for Picoscope,expanding on the usability !As for Hans in the Previous post I can't get the included measurement application to work. See attached file.With FRA4 everything works just fine.As for calibration and improvements. May I suggest to add checkboxes with a number for each loaded file.(Or some other good way to do it)Unchecking will remove them from displaySimple functions could take Trace 1 and subract from Trace 2 (where Trace 1 could be e.g a zero ohm refererence)You could save a combination of data as new dataYou could delete Trace X of not needed anymore etcKeep up the good work !)) Kind regards, Per

author: _Wim_
author_rank: Super Contributor
timestamp: April 21, 2019, 05:59:59 am
content: Quote from: Evodad on April 20, 2019, 06:03:11 pmHi,Could you post the "log4net.log" file from the execution directory. I hope this will give me some additional info.Deleting a trace is possible already, just left click on legend item you want to remove.As to the other improvements, some things were already planned, but I have been quite occupied with actual work lately, and lost a bit of momentum on this. This started out as a "quick and dirty" personal tool, and I should make some quite big structure changes to add things like you requested more easily.

author: Evodad
author_rank: Contributor
timestamp: April 21, 2019, 10:56:20 am
content: Just answered but that reply does seem to have gone into Cyberspace....

author: _Wim_
author_rank: Super Contributor
timestamp: April 21, 2019, 10:57:57 am
content: Quote from: Evodad on April 21, 2019, 10:56:20 amMy debugger does not run wel there...

author: Evodad
author_rank: Contributor
timestamp: April 21, 2019, 11:02:09 am
content: Added Log first changed to .txt then zipped and changed to .txt, will it postYES, this worked better !!!

author: _Wim_
author_rank: Super Contributor
timestamp: April 21, 2019, 11:21:25 am
content: Quote from: Evodad on April 21, 2019, 11:02:09 amSomething is not correct, because the file does not contain any readable text. Normally you should be able to open this file in notepad and see something like this:Code:2019-03-07 22:02:35,865  DEBUG WHConsult.Utils.Settings.IniFiles.IniSettingsManager - GetDoubleValue: SettingName:StartFrequencyHz DefaultValue:1002019-03-07 22:02:35,904  DEBUG WHConsult.Utils.Settings.IniFiles.IniSettingsController - GetValue fileType:Settings section:Picoscope settingName:StartFrequencyHz2019-03-07 22:02:35,908  DEBUG WHConsult.Utils.Settings.IniFiles.IniSettingsController - GetInifile fileType:Settings2019-03-07 22:02:35,913  DEBUG WHConsult.Utils.Settings.IniFiles.IniSettingsManager - GetIntValue: SettingName:ExtraSettlingTimeMs DefaultValue:302019-03-07 22:02:35,919  DEBUG WHConsult.Utils.Settings.IniFiles.IniSettingsController - GetValue fileType:Settings section:Picoscope settingName:ExtraSettlingTimeMs2019-03-07 22:02:35,926  DEBUG WHConsult.Utils.Settings.IniFiles.IniSettingsController - GetInifile fileType:Settings2019-03-07 22:02:35,934  DEBUG WHConsult.Utils.Settings.IniFiles.IniSettingsManager - GetDoubleValue: SettingName:StimulusOffset DefaultValue:02019-03-07 22:02:35,941  DEBUG WHConsult.Utils.Settings.IniFiles.IniSettingsController - GetValue fileType:Settings section:Picoscope settingName:StimulusOffset2019-03-07 22:02:35,950  DEBUG WHConsult.Utils.Settings.IniFiles.IniSettingsController - GetInifile fileType:Settings2019-03-07 22:02:35,956  DEBUG WHConsult.Utils.Settings.IniFiles.IniSettingsManager - GetDoubleValue: SettingName:InitialStimulus DefaultValue:0,12019-03-07 22:02:35,963  DEBUG WHConsult.Utils.Settings.IniFiles.IniSettingsController - GetValue fileType:Settings section:Picoscope settingName:InitialStimulus2019-03-07 22:02:35,966  DEBUG WHConsult.Utils.Settings.IniFiles.IniSettingsController - GetInifile fileType:Settings2019-03-07 22:02:35,973  DEBUG WHConsult.Utils.Settings.IniFiles.IniSettingsManager - GetDoubleValue: SettingName:OutputDCOffset DefaultValue:02019-03-07 22:02:35,978  DEBUG WHConsult.Utils.Settings.IniFiles.IniSettingsController - GetValue fileType:Settings section:Picoscope settingName:OutputDCOffset2019-03-07 22:02:35,986  DEBUG WHConsult.Utils.Settings.IniFiles.IniSettingsController - GetInifile fileType:Settings2019-03-07 22:02:35,995  DEBUG WHConsult.Utils.Settings.IniFiles.IniSettingsManager - GetStringValue: SettingName:OutputChannel DefaultValue:B2019-03-07 22:02:36,001  DEBUG WHConsult.Utils.Settings.IniFiles.IniSettingsController - GetValue fileType:Settings section:Picoscope settingName:OutputChannel2019-03-07 22:02:36,006  DEBUG WHConsult.Utils.Settings.IniFiles.IniSettingsController - GetInifile fileType:Settings2019-03-07 22:02:36,010  DEBUG WHConsult.Utils.Settings.IniFiles.IniSettingsManager - GetStringValue: SettingName:OutputAttenuation DefaultValue:X12019-03-07 22:02:36,016  DEBUG WHConsult.Utils.Settings.IniFiles.IniSettingsController - GetValue fileType:Settings section:Picoscope settingName:OutputAttenuation2019-03-07 22:02:36,023  DEBUG WHConsult.Utils.Settings.IniFiles.IniSettingsController - GetInifile fileType:Settings2019-03-07 22:02:36,030  DEBUG WHConsult.Utils.Settings.IniFiles.IniSettingsManager - GetStringValue: SettingName:OutputCoupling DefaultValue:DC2019-03-07 22:02:36,039  DEBUG WHConsult.Utils.Settings.IniFiles.IniSettingsController - GetValue fileType:Settings section:Picoscope settingName:OutputCoupling2019-03-07 22:02:36,046  DEBUG WHConsult.Utils.Settings.IniFiles.IniSettingsController - GetInifile fileType:Settings

author: _Wim_
author_rank: Super Contributor
timestamp: April 21, 2019, 11:48:37 am
content: Can you try to copy the app to your local C-drive with a short pathname and execute it from there?

author: Evodad
author_rank: Contributor
timestamp: April 21, 2019, 12:07:03 pm
content: Sorry if a confused you.The file was orginaly: log4net.log, this did not work to post so I changed it to log4net.log.txtThis did not work either so I took log4net.log.txt and Zipped the file to log4net.log.txt.ZIPand changed the .ZIP with .txt to log4net.log.txt.txt.So to go back, change from .txt to .ZIP and then you should have your file after Unzipping.)) Kind regards, Per

author: _Wim_
author_rank: Super Contributor
timestamp: April 21, 2019, 08:03:47 pm
content: Ok, now I could open the log, but it seems like the log is not from the time the app crashed (the app was opened again afterwards, so more info was added to the log).I have added some more code to log better were I think the crash occurs. Can you please run the attached version, and copy the log to here directly after the app crash occurred?Did you try to run the app from the C-drive directly?

author: Evodad
author_rank: Contributor
timestamp: April 22, 2019, 07:31:53 am
content: This should do it I hope, booth from 1008 and 1009. Just Zipped this timeRunning it from the C-drive didn't make a difference.)) Per

author: Hans Polak
author_rank: Contributor
timestamp: April 22, 2019, 08:17:15 am
content: Wim,Thanks for the wonderful job you did, especially with the cursor and using FRA4PS as input works fine for me.I have a point to mention.In the image showing the impedance, the program also shows a phase. However this is the phase that belongs to the Gain.In the Image below I show the difference phase that belongs to the impedance.Hans

author: _Wim_
author_rank: Super Contributor
timestamp: April 22, 2019, 08:26:48 am
content: Quote from: Evodad on April 22, 2019, 07:31:53 amSeems to be related to a 32-bit vs 64-bit conflict when calling the DLL from FRA4Picoscope. I suspect your running on x64, can you try if you can run the attached version, or experiment with running the exe in compatability mode.According to this (https://bitbucket.org/hexamer/fra4picoscope/wiki/Home), currently only 32-bit is supported (I am running still 32-bit, so this could be the reason).

author: _Wim_
author_rank: Super Contributor
timestamp: April 22, 2019, 08:32:59 am
content: Quote from: Hans Polak on April 22, 2019, 08:17:15 amThanks for spotting this. Corrected version is attached to first post. In the calculations I always used the phase in radians (which was correct), but converted to degrees from the measured phase instead of the phase from the DUT, exactly like you said.

author: Hans Polak
author_rank: Contributor
timestamp: April 22, 2019, 10:32:03 am
content: Yep, it's working all right.Hans

author: _Wim_
author_rank: Super Contributor
timestamp: April 22, 2019, 06:29:24 pm
content: Quote from: Hans Polak on April 22, 2019, 10:32:03 amGreat! Hopefully in the next couple of months I will have some more time to add features like calibration and calculation...

author: _Wim_
author_rank: Super Contributor
timestamp: April 25, 2019, 02:35:58 pm
content: Quote from: Evodad on April 20, 2019, 06:03:11 pmI think I found a solution for the X64 problem. Updated version in first post.

author: Hans Polak
author_rank: Contributor
timestamp: April 25, 2019, 02:53:16 pm
content: It works like a charm, nice with this extra settling time and overlaying measurements on top of each other, great job.The only very very small thing is that you have to start measuring twice.The first time it contacts the Picoscope and after that you have to press measure again, not very important.Hans

author: _Wim_
author_rank: Super Contributor
timestamp: April 25, 2019, 03:18:23 pm
content: Quote from: Hans Polak on April 25, 2019, 02:53:16 pmNext to the button "abort measurement" you have the option to leave the picocontrol screen open. This way you only need a single mouseclick for each measurement (I guess this is what you want).

author: Hans Polak
author_rank: Contributor
timestamp: April 26, 2019, 09:00:12 am
content: Wim,I still noticed a small anomaly. In the Modulus diagram, now having the correct phase, the cursor below the image still gives the phase of the bode diagram.Then I have a few suggestions concerning noise fighting in noisy pictures, although I have no idea whether or in what way noise fighting is already part of your software Tool.1) the most simple step would be when testing up to a frequency A, to limit BW of both channels to a BW of 5A or something like that.The scope's BW in my case of 100mHz, has a noise of 100uV.When measuring up to 100kHz, BW could be limited to 500kHz, already giving a possible noise reduction of 23dB.2) Since it is possible to "overlay" several measurements in your program, it would help to reduce noise when they could be averaged.Kindest regards,Hans

author: _Wim_
author_rank: Super Contributor
timestamp: April 26, 2019, 06:04:06 pm
content: Quote from: Hans Polak on April 26, 2019, 09:00:12 amThanks for spotting this (again). Updated version in first post.Quote from: Hans Polak on April 26, 2019, 09:00:12 amI directly use the DLL from FRA4Picoscope, and get gain and phase results directly. A good discussion on the noise improvement for FRA4Picoscope can be found here:https://www.picotech.com/support/topic14311.html?&start=390Quote from: Hans Polak on April 26, 2019, 09:00:12 amYes, this is on my todo list, but a little more work than simple bug fixes, and currently not so much spare time and too many other projects.

author: Hans Polak
author_rank: Contributor
timestamp: April 28, 2019, 03:09:16 pm
content: Wim,Thank you for the link. As I found out, there are several paramaters that can be used to reduce noise, that was very helpful.If have another suggestion. In your Reactance plots, you are using positive and negative values, just as they are calculated.In all Network Vector analyzers and in Spice, the absolute value of these imaginary numbers are displayed, giving the image almost twice the resolution and a sharp transition at the point of Fres, also quite useful.See attachment as an example.Hans

author: _Wim_
author_rank: Super Contributor
timestamp: April 28, 2019, 03:17:42 pm
content: Quote from: Hans Polak on April 28, 2019, 03:09:16 pmThanks for this suggestion, I was not aware it is commonly done different (have yet to find an affordable VNA). I will implement this in the next version.

author: 2N3055
author_rank: Super Contributor
timestamp: April 28, 2019, 05:21:14 pm
content: I think reactance sign is also very useful.

author: _Wim_
author_rank: Super Contributor
timestamp: April 28, 2019, 06:03:02 pm
content: Quote from: Hans Polak on April 28, 2019, 03:09:16 pmQuote from: 2N3055 on April 28, 2019, 05:21:14 pmI have added a “preferences” window under the edit menu, this way the user can choose the plot options (I expect some more options will come in the future). So both can have it your wayAs always, updated version in first post.

author: 2N3055
author_rank: Super Contributor
timestamp: April 28, 2019, 06:23:06 pm
content: Quote from: _Wim_ on April 28, 2019, 06:03:02 pmYou're just awesome!!All the best,Sinisa

author: Hans Polak
author_rank: Contributor
timestamp: May 12, 2019, 01:05:03 pm
content: Absolutely perfect addition with the positive reactance.Thank you.Hans

author: apate26
author_rank: Newbie
timestamp: November 02, 2020, 08:20:23 pm
content: Hello WimThanks for the help but I don't see any installation or upload option, How can I use this? Where should I upload the excel files to see the graphs as you showed?ThanksAvi

author: _Wim_
author_rank: Super Contributor
timestamp: November 03, 2020, 08:01:42 pm
content: Quote from: apate26 on November 02, 2020, 08:20:23 pmFirst post of this thread contains the files for download. Program does not need installation, running the executable is all that is required.

author: KlausKragelund
author_rank: Regular Contributor
timestamp: March 13, 2021, 01:45:12 am
content: HiGreat tool. Been trying a couple of components out, works fine. But it has problems with range due to the fixed reference resistorHave you considered if one added a USB controlled relay board to switch in different reference resistors over the range?RegardsKlaus

author: _Wim_
author_rank: Super Contributor
timestamp: March 13, 2021, 06:47:15 am
content: Considered, yes. But because I did not need this often, never implemented that. Also, it would then require others users to make the same hardware, which I consider a disadvantage also.It has been a long time since I even looked at this. As with many of my projects, at some point other interesting subject takes over before a project is really finished (I intended to allow for some calibration routines also, but never got around doing that).Currently no further development is planned, but maybe someday. All source code is available however, so feel free to add or modify as much as you want.

author: Hans Polak
author_rank: Contributor
timestamp: May 06, 2021, 11:13:38 am
content: Hi Wim,I'm using your excellent FRA Imp Viewer quite a bit.I still have a wish high on my list.When starting the program, the value of the series resistor has to be specified.However there are also probe tips attached to both sided of this resistor.The A channel side plays no role, but the probe's capacity on the B channel becomes part of the network and interferes with the measurement.That's why I always have to go to LTSpice trying to simulate a circuit giving the same characteristics including the capacity of the probe tip, to finally remove this capacity and get the real data for the DUT.You can imagine that that's quite a job.So it would be great if your program not only asked for the series resistor, but also for the capacity of the Channel B probe.Kindest regards,Hans

author: _Wim_
author_rank: Super Contributor
timestamp: May 06, 2021, 06:00:57 pm
content: Quote from: Hans Polak on May 06, 2021, 11:13:38 amHi Hans,To do something useful with the input capacitance, I would also need the calibration calculations (which are currently not included in the current version of the software, I never got around doing that). This would require a major update, which is currently not planned.Source code is however available, and visual studio can be downloaded for free. So it should be feasible to implement this change yourselves. If you have questions about parts of the source code, you can post them here, I will try to help you further, but for the moment, I will not be making any big changes myself.Best Regards,Wim

author: Hans Polak
author_rank: Contributor
timestamp: May 10, 2021, 01:32:14 pm
content: Hi Wim,Thanks for replying so rapidly.Two questions:1) What do you mean with calibrations calculations. Would this be to assess the load of the probe and to verify the value of the used measuring resistor ?I won't need all this.2) Since I'm not a programmer would it help when I provide you with the math, where the probe's capacity is now also part of the equation, to calculate the DUT's exact impedance, inductance and capacitance ?Kindest Regards,Hans

author: _Wim_
author_rank: Super Contributor
timestamp: May 10, 2021, 06:40:23 pm
content: Quote from: Hans Polak on May 10, 2021, 01:32:14 pmYes, this is what I meantQuote from: Hans Polak on May 10, 2021, 01:32:14 pmThat might be an option, but no promises. This thread describes what is currently in the code:https://www.eevblog.com/forum/testgear/rlc-impedance-viewer-for-picoscope-bode-plot-data/msg2238570/#msg2238570The actual part of the code that does the calculations is here:https://github.com/WimHuyghe/FRA-Impedance-Viewer/blob/master/FRA_IMP/FRAResult.csIt should be fairly readable even for a non programmer. Please that this into account when describing the update in the math. Adding an additional input parameter to the GUI is no issue for me, so that can be done easily.

author: Hans Polak
author_rank: Contributor
timestamp: May 10, 2021, 07:10:53 pm
content: O.K. I'll provide the math, then we see what can be done.Regards,Hans

author: Hans Polak
author_rank: Contributor
timestamp: May 12, 2021, 02:13:52 pm
content: Wim,Before going into mathematical detail, may I ask you how many bits are used from Picoscope's options.My Picoscope 5243B has various bit depth settings from 8 bits to 16 bits.I don't know whether this is an option that your software can influence, bit more bits will of course result in more accurate results, especially when calculating a capacity.Hans

author: _Wim_
author_rank: Super Contributor
timestamp: May 12, 2021, 02:26:00 pm
content: Quote from: Hans Polak on May 12, 2021, 02:13:52 pmMy software uses the data obtained from FRA, I would need to check his source code. But I would guess max resolution is used, but I am not sure.

author: _Wim_
author_rank: Super Contributor
timestamp: May 12, 2021, 02:28:03 pm
content: I will have a closer look at this this weekend

author: _Wim_
author_rank: Super Contributor
timestamp: May 12, 2021, 04:25:34 pm
content: Quote from: Hans Polak on May 12, 2021, 02:13:52 pmYes, maximum resolution is used => 15 bit for a 5000 series scope (seehttps://www.picotech.com/support/topic14311-180.htmlnear the bottom). In the newest version of FRA4Picoscope a new API is implemented where this can be changed.The API I am using always uses the highest resolution possible (which for this use case is ok I think)

author: Hans Polak
author_rank: Contributor
timestamp: May 12, 2021, 05:39:47 pm
content: Wim,Working on the math, I ran into something strange.Using the same .csv file for FRA Imp Viewer and Excel, where I had the math worked out, I gotexactlythe same shape for the inductance including all jaggies, but the values in my graph are roughly 1.5 times larger ?The capacitance on the other hand is completely different, where FRA Imp Viewer seems to be wrong.What I used was a 100R series resistor and for the DUT another 100R resistor parallel to 10nF.In the Excel version the 10nF is visible from 10kHz to 1MhzHans

author: Hans Polak
author_rank: Contributor
timestamp: May 12, 2021, 06:43:54 pm
content: Wim,Forget the inductance issue, error from my side.Capacity is still wrong.Hans

author: _Wim_
author_rank: Super Contributor
timestamp: May 12, 2021, 06:59:53 pm
content: Do you see the same effect when you measure an actual capacitor?

author: Hans Polak
author_rank: Contributor
timestamp: May 12, 2021, 07:57:22 pm
content: I did measure an actual capacitor.As mentioned, Serie resistor R=100R, and Dut composed of 100R//10nF.The .csv file generated with these 3 components was processed by FRA Imp Viewer and separately calculated by Excel as : C=[Im[(1-V)/V)]/(W*R), were V is the complex voltage derived from the .CSV file and W=2*Pi*Freq.When V=A+jB, where A=Gain*Cos(phase) and B=Gain*Sin(phase), then C=[B/(A^2+B^2)]/(W*R)Hans

author: _Wim_
author_rank: Super Contributor
timestamp: May 13, 2021, 05:41:47 am
content: Hmmm, that does seem indeed strange in that case. I will run a few tests comparing the result of FRA Imp with the analog discovery I have been using instead since I bought one.

author: _Wim_
author_rank: Super Contributor
timestamp: May 13, 2021, 06:14:10 am
content: it seems to be a conflict between x64 and x86 build. When I run from visual studio in x86 build mode I do not get this issue.Attached is an x86 build (which also runs fine on my x64 machine) that does not seem to have the issue (same source code!)=> that does not solve it completely, but when measuring a capacitor only (without parallel resistor) the x64 version was not ok also. But with the parallel resistor results still seem off.

author: _Wim_
author_rank: Super Contributor
timestamp: May 13, 2021, 07:42:50 am
content: Found it. The issue is that my calculations are forseriescapacitance and resistance, and your calculations are forparallelcapacitance and resistance.Ideally, both modes should be supported (this is typically done on LCR meters)

author: _Wim_
author_rank: Super Contributor
timestamp: May 13, 2021, 07:49:06 am
content: I have done now a run with the 100 ohm and 22nf (did not have a 10nF) is series, and the FRA IMP gives the correct results.

author: Hans Polak
author_rank: Contributor
timestamp: May 13, 2021, 11:20:09 am
content: Wim,I don't know how you calculate the capacitance, but for a DUT it is unknown whether a capacitance is in series or in parallel.But indeed, when using a 10nF+100R in series, FRA Imp Viewer is doing a proper job ?The algorithm that I use calculates the capacitance of the DUT no matter where this cap is located and gives the right answer for a certain freq band.See images below for 100R+10nF in parallel and 100R+10nF in series.Hans

author: _Wim_
author_rank: Super Contributor
timestamp: May 13, 2021, 12:07:32 pm
content: Quote from: Hans Polak on May 13, 2021, 11:20:09 amI use what I think is called the I-V method (see here:https://www.eevblog.com/forum/testgear/rlc-impedance-viewer-for-picoscope-bode-plot-data/msg2238570/#msg2238570)If I compare the 100 ohm || 22 nF measurement with the result I get using the analog discovery in "series" capacitance mode (Cs), the results my app get are very similar. The analog discovery also has parallel capacitance mode, which gives your result. So I do think the way it is currently implemented is also a correct way, although there are probably several ways to do it.My older HP LCR meter cannot test the 100 ohm + 22nF is series (gives no reading, I get only a result in parallel mode), so I cannot compare with that one.

author: _Wim_
author_rank: Super Contributor
timestamp: May 13, 2021, 12:16:50 pm
content: Result using my app (only series mode available)

author: Hans Polak
author_rank: Contributor
timestamp: May 13, 2021, 01:45:14 pm
content: Wim,Thanks for explaining.My point is that you never know whether a DUT has a serial or a parallel cap.So making a choice between series or parallel can both be wrong when several caps at different places are part of the DUT.Nevertheless I will have a look at your math, that seems a bit complicated.After all, with channel A as reference and Channel B after series resistor R as the point to measure gain and phase, B=A*Z/(Z+R)Assuming both channels are normalised to A=1, you get B=Z/(Z+R) or Z=R*B/(1-B)B being a complex signal, whose Re and Im parts can be calculated with the measured phase, you get all the data you want.So because we used different ways for calculation, I will try to find out at what point they differ, that will make the discussion easier.Hans

author: Hans Polak
author_rank: Contributor
timestamp: May 13, 2021, 04:31:02 pm
content: I know what's wrong, and this has nothing to do with serial or parallel caps.Let's assume Z = A+jB (so this already includes the serial resistor R)Resr = Re(Z) = AJwL= im(Z) = jB , so L=B/wImpedance = sqrt(A^2+B^2)So far that's what you did and that's all O.KBut now for the cap, where you used:1/jwC = Im(Z) = jB, so wC=1/B and C=1/BwAnd that's wrong, let me explainif 1/jwC=A+jB, then jwC = Im(1/(A+jB)) = Im (A-jB)/[(A+jB)*(A-jB)] = Im(A-jB)/(A^2+B^2) = jB/(A^2+B^2)C = [B/(A^2+B^2)]/wQuite a difference from the 1/B*w that you are using.This the correct way to calculate C.Hans

author: _Wim_
author_rank: Super Contributor
timestamp: May 13, 2021, 06:09:11 pm
content: Hi Hans,I am not following your explanation why the result is wrong, could you elaborate a bit more?To be honest, I do not think the result is wrong, I think the difference is in the end goal we want to achieve. The calculation I have implemented is to find the equivalent series capacitance and equivalent series resistance for the DUT. The second calculation (that I have not implemented), would calculate the equivalent parallel capacitance and equivalent parallel resistance for the DUT. These should be 2 different results, and I think this is how it is commonly done for an LCR/impedance meter. This is also confirmed by the fact the analog discovery had a very similar result. Your suggestion that series/parallel can be calculated with the same equations does not seem logical to me (why else would almost every LCR meter have a separate mode for this)I think your goal is to calculate the capacitor independent of the series / parallel resistor. But this does not characterize the DUT as a whole. With an extreme example of a capacitor with a 100 ohm resistor in parallel, the series mode is indeed useless but still correct (this did confuse me also however, I would have expected a more reasonable result). I should have implemented both modes when I was writing the app, but as my main goal for the app was to check capacitor quality at frequencies high than my HP could handle (tops out at 20kHz), series mode (aka ESR) was all I needed.There are for sure many different ways to do all of this. Keysight has and impedance measurement handbook (https://www.keysight.com/be/en/assets/7018-06840/application-notes/5950-3000.pdf) that has probably sufficient info to build a really high end system, but I only stuck to the very basics.Wim

author: Hans Polak
author_rank: Contributor
timestamp: May 13, 2021, 07:36:00 pm
content: Hi Wim,What I tried to explain is that you cannot simply invert a complex number and still keep using the original imaginary part.As I have shown, you have to rearrange the formula and split it again in real and imaginary.You didn't do that, which is mathematically wrong.The result B/(A^2+B^2) instead of 1/B that you are using happens to be true for very small values of A, thus very small values of Resr, which is the case with a serial connection.The formula that could fit parallel connections would then be for very small values of B, because in that case you will get B/A^2.But in the images below you can see that in this B/A^2 only fits at very low frequencies, far below the 100Hz where the graph starts, whereas B/(A^2+B^2) does the job as expected.So with the series connection 1/B happens to go well, but with the parallel connection 1/B fits very bad, in this very case there is only some overlapping above 1Mhz.So this is just to say that there is no separate formula for parallel connections.When you disagree, I would welcome that formula.Maybe someone reading this correspondence who is fit in complex calculation can confirm my calculation.My goal is to find the capacitance for an unknown circuitry and not for a single series cap. For that I can use my cap meter.Hans

author: _Wim_
author_rank: Super Contributor
timestamp: May 14, 2021, 07:05:16 am
content: Quote from: Hans Polak on May 13, 2021, 07:36:00 pmSee page 6 for conversion between series and parallel capacitance.http://www.componentsengineering.com/wp-content/uploads/pdfs/LCR-Measurement-Primer.pdfQuote from: Hans Polak on May 13, 2021, 07:36:00 pmThe attached figure shows I think best why this is done. When we express Z_DUT in 2 ways:Z_DUT =Resr– j/ (2*π* f*C)Z_DUT =Zmag* cosα+ j*Zmag*sinαFrom this we see thatResr = Zmag * cosa-1 / (2*π* f*C) = Zmag * sina=> both are not complex numbers any longer, and all calculations are done in an algebraic way.Edit: forgot to add the minus sign

author: _Wim_
author_rank: Super Contributor
timestamp: May 14, 2021, 07:17:38 am
content: An important paragraph why we should not expect the values to be the same

author: Hans Polak
author_rank: Contributor
timestamp: May 14, 2021, 10:47:33 am
content: Wim,I think we should leave the subject, because we are not coming together as it seems.When 1/jwC=A+JB, it is mathematically wrong to conclude that jwC=1/jB, because one j is in the numerator and the other j is in the denominator.Correct is: jwC= IM(1/(A+JB). Solving this leads to wC=B/(A^2+B^2).And as mentioned, for very small values of A as in serial connections, this becomes the 1/B that FRA Imp Viewer uses.But after this all, here's a really positive thing that I would like to mention, which is the calibration.I asked you a few days ago to possibly include the probe's capacity in the calculation, but I found a much better way, making this question completely obsolete.With FRA4PS I record the chain without a DUT, but of course with the necessary measuring probes in place. Ideally this should give a flat Bode diagram with phase permanently at zero degrees.Look at the first image below how the Bode diagram looks in my case.And altough this doesn't look to bad, only 0.06dB and 6 degrees removed from the ideal, the effect of this can be quite massive as we will see.Now store this Bode diagram as a .csv file, open it in Excel and make a second set with Log Freq, -1*Gain in dB and -1*Phase.This second set will be your future correction set.To show the effect, I took a 1x probe as a DUT.Without any correction, results are shown in the second image.But when correcting this recording in Excel by adding the gain in dB and phase of the correction set, the now corrected data produces quite a different plot, see the the third image.So this is way more accurate than just specifying the capacity of the measuring probe.What you see are resp. Impedance, Resr and two plots for the Capacity, one is using 1/B as in FRA and the second using B/(A^2+B^2), [with A and B being resp. the RE and IM part of Z].Result is very good after correctio, isn't it.Hans

author: Hans Polak
author_rank: Contributor
timestamp: May 14, 2021, 10:57:44 am
content: P.S. I forgot to mention that this correction was with the 100R series resistor that I used.For other resistors, a new correction file should be made.Hans

author: _Wim_
author_rank: Super Contributor
timestamp: May 14, 2021, 01:25:27 pm
content: Quote from: Hans Polak on May 14, 2021, 10:47:33 amHi Hans, I would rather come to a conclusion, as now we have created doubt whether the results are correct or not. If incorrect, I will make the modification, but until now I am not convinced it is the case. Hopefully some other members here can share their opinion also.Quote from: Hans Polak on May 14, 2021, 10:47:33 amI you read the beginning of this thread, this is how I initially saw the calibration also. But after reading a bit more on the subject, I somehow convinced myself this was not fully correct, however I am not sure of this. Did you check if this also works ok with a complex DUT? Typically LCR meters do both an open and a short calibration to correct for errors.

author: Hans Polak
author_rank: Contributor
timestamp: May 14, 2021, 05:07:08 pm
content: Wim,When you propose a complex DUT, composed out of various components, I can solder this together and show the results without and with correction.I'm looking forward to do this test.Hans

author: _Wim_
author_rank: Super Contributor
timestamp: May 15, 2021, 06:55:37 am
content: Quote from: Hans Polak on May 14, 2021, 05:07:08 pmHi Hans,To test the calibration routine, I would do the following:1) run the calibration routine, and measure a complex load => this give you the reference waveform of the complex load2) "modify" your scope input channel by adding a parallel capacitor [and series capacitor bypassed by a resistor] [=optional]3) run the calibration routine again with the "modified" scope input, and remeasure the same complex load4) ideally the measurement result should be equal to your reference waveform.

author: Hans Polak
author_rank: Contributor
timestamp: May 15, 2021, 08:49:39 am
content: Hi Wim,As I understand your proposal,Make cal. file 1 with only the scope probe attached.Measure a complex load and correct it with cal. file 1.Make a new cal. file 2, now with an added cap over the probe.Measure the same complex load again but now with the added cap and correct the result with cal. file 2.Corrected result for the complex load should be the same in both cases.That's easy to perform, and I will certainly do, but before doing that two questions:1) Is there a reason why you attached an image of a probe, or do you suggest this to be used as a complex load2) what capacity do you suggest to place in par. to the probe for cal. file 2 ?Hans

author: _Wim_
author_rank: Super Contributor
timestamp: May 15, 2021, 09:50:24 am
content: Quote from: Hans Polak on May 15, 2021, 08:49:39 amYes, indeed.Quote from: Hans Polak on May 15, 2021, 08:49:39 am=> was just to give an idea on how an probe and input looks to give an idea about the values to make a modified "bad" inputQuote from: Hans Polak on May 15, 2021, 08:49:39 am=> I would take something like 47pf or maybe up to a 100pf. This will already limit HF response quite severely. For the optional series resistance I would think something like 100k and and 100pf.

author: Hans Polak
author_rank: Contributor
timestamp: May 15, 2021, 12:47:18 pm
content: Hi WimO.k. I'll place a 75pF cap par to the probe to produce cal. file 2.The optional 100K + 100pF that you mention, is that meant to be placed par. to the probe (instead of the above mentioned 75pF ?) to generate a cal. file 3 and if so, the two in series or in parallel.And still open is the question: how should the DUT look like, or is that the 100K + 100pF ?Hans

author: _Wim_
author_rank: Super Contributor
timestamp: May 15, 2021, 03:18:09 pm
content: Quote from: Hans Polak on May 15, 2021, 12:47:18 pmThe optional 100K + 100pf is to create a high pass characteristic. Together with the parallel cap, this should create a response with:- some loss of gain due to the 100K series resistor (acts as a voltage divider with the 1M input impedance to the scope)- for higher frequencies, the 100K is bypassed by the parallel cap, increasing the gain again- for very high frequencies, we have again a loss in gain due to the parallel input cap.This should create a non flat response to challenge the calibration logic. I would start however with only the parallel input cap.For a load I would just a parallel LC network with a series resistor, just to have both some inductive & capacitive behavior. Values are not very critical, I would just ensure that you have some non-flat parts in the zone where the calibration correction is the largest (to challenge the correction).

author: Hans Polak
author_rank: Contributor
timestamp: May 15, 2021, 05:43:12 pm
content: Hi Wim,I'm extremely sorry, but I have some other bad news.So far I only concentrated on the capacitance calculations of FRA Imp Viewer.But now being busy with calibration and so on, I found more that's not O.K.Still with a 100R reference resistor, and as load 100R+10nF in series, I took FRA's inductance image, having on the right side the ESR.At 100Hz, the 10nF still has a large impedance, so most of Resr comes from the probe, but the FRA image shows -50R at 100Hz.To my opinion, Resr can never become negative and a value of 50R seems impossible altogether.In the Excel Image below, Re is as expected, positive and 45K at 100Hz.Then the Inductance shows 250H in FRA at 100Hz, where Excel using the same .csv file shows 22H at 100Hz.As from 1kHz and upwards, FRA and Excel are the same within 10%.At least ESR has some miscalculation, which could be the cause of the wrong inductance value, but maybe there's more.Hans

author: _Wim_
author_rank: Super Contributor
timestamp: May 15, 2021, 07:14:22 pm
content: Quote from: Hans Polak on May 15, 2021, 05:43:12 pmIf you put a 10nF capacitor in series with 100 ohm, you create a high pass filter with a 159kHz -3db point. Each octave lower will be another -6db. You loose another 7-8 db by the voltage divider created by the two 100 ohm resistors and the 50 ohm resistor in the signal generator. Counting all of these losses up you end up in the noise floor of your scope (in other words, for the scope your DUT is an open circuit at these low frequencies).As your scope channels are not perfectly identical and have some bias offset, the current "measured" through the reference resistor can be negative (as this current is measured by the difference between channel 1 and channel 2), and all sort of strange things can also happen in the noise. Your csv file show a positive gain at lower frequencies (+0.018 db, which means the signal measured on the DUT is LARGER then the signal put into the reference resistor => this can only be via bias offset differences in an open circuit situation, as this is impossible for a passive device)You will probably see a similar result by measuring an open circuit.I have no idea what you have done in your excel to handle negative currents (positive gains), in the case of my app I limited the gain to zero (see "GainCorrectedDB" function). A more clear solution would be to plot no data at all when the gain is positive, but having a smooth continuous curve like in your excel is even more confusing (I presume you somewhere use an "absolute value" function to circumvent this issue).

author: _Wim_
author_rank: Super Contributor
timestamp: May 15, 2021, 08:22:06 pm
content: If you look at the gain of the CSV you posted, you can see that somewhere just before 10-15kHz the scope runs out of resolution. To measure your DUT in these lower frequencies, the reference resistor should be much larger to give the system again the change to see variations in gain.

author: Hans Polak
author_rank: Contributor
timestamp: May 15, 2021, 09:40:43 pm
content: Wim,I appreciate very much that you are still communicating after so many points I brought forward with results that deviate from what was to be expected.Your program has a wonderful graphical interface, that's the reason I like to use it.In Excel I have all the formulas to calculate the same, but with very simple graphical options.But at the end no matter where the calculations are taking place, results should be 100% identical, which they are not.When leaving the capacity calculation as a separate issue, I would have expected no difference in Resr, Inductance and impedance.No offense, but if I may say so, the used way of calculating is rather complicated with additional current and a second phase that I haven't checked because calculation can be done much simpler with less chance of making mistakes, see calculation below.The fact that my Excel shows different graphs based on one and the same .CSV file says that one of both must be wrong.So here is the Math that I have checked over and over.

author: _Wim_
author_rank: Super Contributor
timestamp: May 16, 2021, 06:13:26 am
content: Hi Hans,No offence taken. For me your calculation looks more complex, but that is probably because we both spent more time on our own method or due to different backgrounds.I found this webpage from Tektronix which also uses the I-V method and matches very closely with what I have done:https://uk.tek.com/document/application-note/capacitance-and-inductance-measurements-using-oscilloscope-and-function-geI especially like the piece posted belowAs to the difference in results, in your last measurement the DUT acts as an amplifier (positive gain). It is no surprise for me that in that case different calculation strategies lead to different results, as there exist is no passive device combination that can work as an amplifier (when talking about RLC-components). So whatever formula's used to calculate the equivalent set of RLC-components, the only correct result should be "not possible", and any numbers that are spit out should be ignored. Compared these numbers for "correctness" does not make sense.One interesting point of the Tektronix article, if you look at equation 1, this would place the maximum achievable accuracy at 0.5% for a Picoscope 5000 series. Not bad. A top of the line Keysight impedance analyzer (https://www.keysight.com/be/en/product/E4990A/impedance-analyzer-20-hz-10-20-30-50-120-mhz.html) does "only" 10-times better.

author: _Wim_
author_rank: Super Contributor
timestamp: May 16, 2021, 08:08:04 am
content: Quote from: Hans Polak on May 15, 2021, 09:40:43 pmLooking at your calculation, I think you did oversimply a bit. You consider the measured phase as the phase of the capacitor/inductor, but the measured phase is the phase of the current through the reference resistor only. For purely capacitive or inductive loads the phase of the current will be identical, but the difference gets larger for combined loads.

author: Hans Polak
author_rank: Contributor
timestamp: May 16, 2021, 08:48:15 am
content: Hi Wim,I don't get what you mean with the phase.The only reason there is a phase shift in the first place is because the DUT (and the probe) are causing this.But I will dive into the Tektronix calculation and see what it brings.No matter what roads are taken to calculate the characteristics of a DUT, the outcome should be 100% the same.It's not the calculation that determines the properties, but the only DUT.When trying to achieve the same result, one of both must be wrong, but I'm sure we will find out.As a control system in the background, we can also use LTSpice, because with 3 simple commands it calculates:L = IM(Rref*(V2/(V1-V2))/w)Resr=Re(Rref*(V2/(V1-V2)))Imp=Mag(Rref*(V2/(V1-V2)))HansP.S. I saw in the above shown calculation that I forgot to include R* in the imaginary part E. But in my Excel this is correct.

author: _Wim_
author_rank: Super Contributor
timestamp: May 16, 2021, 09:50:57 am
content: Hi Hans,This is the general principle I followed (and also in the Tektronix article)The only info we have is the voltage & phase at point A1 and A2 in the Tektronix figure. For A1 we set the phase to 0°, for A2 we use the phase FRA reports. From these 2 voltage vectors, the current vector can be calculated because Rref in known. We also know this current has to go through the DUT.By using ohms law and knowing both the current vector and voltage vector in A2, we can calculate the impedance of the DUT. From there I think our calculation methods agree to extract ESR, Capacitance and inductance from the impedance.Hope this clarification helps.

author: Hans Polak
author_rank: Contributor
timestamp: May 16, 2021, 10:21:43 am
content: Hi Wim,Step one.I did the math my way with all the figures from the Tektronix article, and got the exact same figures as they did.Hans

author: Hans Polak
author_rank: Contributor
timestamp: May 16, 2021, 10:35:26 am
content: Second test now with 10mH.Again, exactly the same figures as Tektronix.Hans

author: Hans Polak
author_rank: Contributor
timestamp: May 16, 2021, 10:49:04 am
content: Wim,For completeness, here's the Excel file that I used for the above calculations.Hans

author: Hans Polak
author_rank: Contributor
timestamp: May 16, 2021, 11:22:44 am
content: Wim,This is the test circuit I propose for testing the calibration with 1)probe alone and 2) probe +75pfCan you agree with this ?Hans

author: Hans Polak
author_rank: Contributor
timestamp: May 16, 2021, 11:27:58 am
content: In the image at the left Rref is a symbolic 2200, but in the simulation plot at the right I used the correct value of 100R as can be seen in the topline above the plot.

author: Hans Polak
author_rank: Contributor
timestamp: May 16, 2021, 12:41:56 pm
content: Hi Wim,Here are the first results, resp the LTSpice plot, the Excel plot uncalibrated and the third one calibrated for the used probe,and finally the recorded .CSV File disguised as txt file.Hans

author: _Wim_
author_rank: Super Contributor
timestamp: May 16, 2021, 04:21:36 pm
content: Quote from: Hans Polak on May 16, 2021, 10:21:43 amThat is no surprise as the load is almost purely capacitive or inductive. What do you get when running the same CSV data with from above (with the positive gain) using the Tektronix formula's? I would guess you also get a negative ESR like I did and not the plot you posted.You will not get my complete plot as I limit the gain to max zero dB, but at least you should verify if your claim from above is correct that there is a fault in my ESR calculation.

author: _Wim_
author_rank: Super Contributor
timestamp: May 16, 2021, 04:31:30 pm
content: Quote from: Hans Polak on May 16, 2021, 11:22:44 amThat looks ok to me

author: _Wim_
author_rank: Super Contributor
timestamp: May 16, 2021, 04:40:12 pm
content: Quote from: Hans Polak on May 16, 2021, 12:41:56 pmI am not sure how I need to interpret these result. Is the just probe the result without the 75pF, the the calibrated the result with the 75pF cap & then calibrated? Can you post a plot where you see in one graph:- DUT measured with no 75pf cap at scope input- DUT measured with 75pf cap at scope input- DUT measured with 75pf cap at scope input & with calibration correction implemented1 & 3 should be identical in an ideal calibration situation, 2 should be different enough to see the calibration "working"

author: Hans Polak
author_rank: Contributor
timestamp: May 16, 2021, 09:04:20 pm
content: Wim,1) You already have the results for measuring the DUT with probe, uncompensated and compensated,Here are the results when adding a 68pF cap over the probe, first image uncompensated, second image compensated and third image both compensated versions on top of each other in the same image.I suppose the two dips at 5Mhz in the compensated version are because of the inductance in the wires connecting the 68pF, but below 3Mhz, both compensated versions are exactly equal so I did not try to correct this.2) I didn't understand your comment that you were not surprised,I did both Tektronix tests for resp. 10uF and 1mF and got exactly the same results with my formulas.You even got the Excel file that calculated these results.The simulation with LTSpice also gave the exact same plot as my real life DUT measurement.What else do you need as a prove that my formulas are correct ?Hans

author: Hans Polak
author_rank: Contributor
timestamp: May 17, 2021, 12:10:16 pm
content: Hi Wim,I have the impression that you still find it hard to believe that there's something wrong with your calculations.That's why I have implemented the full Tektronix formulas from the link that you gave.I ran two sessions, one with the DUT with 100R/1mH+38R/1nF, first image below.The other one was with the 100R+10nF in series, where we had the discussion whether Resr could be -50R, see second image below,I gave both models these two files: model1 with my math , the other model2 with the Tektronix math.I overlaid the outcome of both ways of calculation to clearly see the differences between the two.Conclusion: For Imp, Resr and Induction, result is exactly the same as was to be expected.Only the Capacity differs because of the reason I mentioned before, that when having j in the numerator and in the denominator, you can not simply put an equation upside down, as was also 100% confirmed in the LTSpice simulation.But nevertheless, the plot produced using this simplification, seems quite useable so I can live with it.Where Tektronix differs from my math, I have put a T in red on the plotted line.One example of what is still not O.K. in your Imp Viewer is visible for the 100+10nF series giving Resr=-50R and the L=250H both at 100Hz, because as you see they have to be resp 43K an 22H, So it's not the math that is wrong, but something in your calculation goes aside.Hope you can find it.Hans

author: _Wim_
author_rank: Super Contributor
timestamp: May 17, 2021, 06:09:32 pm
content: Quote from: Hans Polak on May 17, 2021, 12:10:16 pmYour impression is indeed correct. Below the Tektronix math vs mine (screenshots from post 32) To express the Tektronix formula’s in "gain", you only have to divide by Va1. When you do that you get EXACTLY the same formula. No mathematicalsimplification, the same. If you see it otherwise, please point me to the difference.The reason for the difference between your graph and the Tektronix one, is by not calculating for current first, as explained above. See the second term in equation 3 of Tektronix, this is the reason for your difference. If the measured phase goes to 90° (pure inductive or capacitive loads), the second term disappears and the data is the same. Also as explained above.Quote from: Hans Polak on May 17, 2021, 12:10:16 pmAs also explained above, I limit the gain to zero (so positive gains are removed), but you seem to insist to pick a part of the plot were the DUT was acting as an active device. This was a deliberate choice or mine, because otherwise plots can have a very large difference between min and max, causing the user to have to zoom in every time he wants to see the "interesting part" (because the part were the DUT acts an amplifier does not mean anything).Quote from: Hans Polak on May 17, 2021, 12:10:16 pmCan you post your excel file? I would expect that ESR becomes negative where the DUT becomes an amplifier. The direction inversion in your plot seems strange to me as the measure profile is both smooth for phase and gain.

author: Hans Polak
author_rank: Contributor
timestamp: May 17, 2021, 08:40:51 pm
content: Hi Wim,I must say, you are rather hard to convince, but anyhow, here is the Excel file. That should finally convince you as it follows exactly each step accordingly.Used file is the 100R+10nF in series that you already have with Rref=100RAnd as said, it's obviously not the math that is wrong, but there must be something going wrong in your calculation giving L=246H and Resr=50R at 100Hz instead of 21.6H and 43.8K, and there is more.Hans

author: Hans Polak
author_rank: Contributor
timestamp: May 17, 2021, 09:09:58 pm
content: You mentioned to limit the gain to one.That will indeed increase the value of L considerably (and influence the capacity) , but also the value of Resr will increase to ca 47K at 100Hz and higher.So after all the things I have done so far, it seems fair to say that now it's your turn to tell what exactly it is that you do on top of calculating the formulas , that may help to explain part of the differences.Hans

author: Hans Polak
author_rank: Contributor
timestamp: May 17, 2021, 09:33:38 pm
content: One last thing, here is the same file 100R+10nF but now compensated for the measuring probe with a calibration file.That makes a visible difference, but although Resr is now a bit noisy at LF, it is still considerably above 10Khz.I have attached both the image and the Excel file.Hans

author: _Wim_
author_rank: Super Contributor
timestamp: May 18, 2021, 05:28:10 pm
content: Quote from: Hans Polak on May 17, 2021, 08:40:51 pmAnd as said, it's obviously not the math that is wrongQuote from: Hans Polak on May 17, 2021, 08:40:51 pmI wonder if it has some has something to do with the gain limit I already told you in post 104?

author: _Wim_
author_rank: Super Contributor
timestamp: May 18, 2021, 06:09:06 pm
content: Quote from: Hans Polak on May 17, 2021, 09:09:58 pmI just checked your excel file and did two things:- copied all the formula's from the first row down until the end (formula's in the first row where correct but they did not go all the way down)- set all of the positive gains to zero=> Resr goes to -50 ohms and stays there.But, you are using a logarithmic axis in Excel, and that does not plot negative numbersQuote from: Hans Polak on May 17, 2021, 09:09:58 pmI only limited the gain to negative numbers as explained immediatly when you reported the problem. With the changes above in Excel you get the same results

author: _Wim_
author_rank: Super Contributor
timestamp: May 18, 2021, 06:16:38 pm
content: Quote from: Hans Polak on May 17, 2021, 09:33:38 pmTo prevent repeating myself:Quote from: _Wim_ on May 16, 2021, 04:40:12 pm

author: Hans Polak
author_rank: Contributor
timestamp: May 19, 2021, 04:52:29 pm
content: Wim,1) What an incriminating suggestion that the formulas in my Excel file were not pulled down and that only the first row was correct.2) What a totally wrong decision to make all gain figures above 0dB zero, but leave the rest for what it is.This results is a totally crippled plot giving that silly 50R for Resr in case of the file we were discussing.There is nothing wrong with values above 0dB, it can be because of an LC resonance or a channel gain issue, but FRA Imp Viewer can never know what the reason is.In case of a channel gain difference, one thing theusercould do if it bothers is to subtract the same dB value from all samples, but a much better thing to do is to correct the file with the probe's calibration file.Conclusion: FRA Imp Viewer is indeed willingly and totally superfluous corrupting files.3) Keep repeating yourself when it's not obvious what I mean with file compensation with the Probe's calibration file. Everybody else will perfectly understand what this means.It's obvious from the above that I'm done with you, the way you react is like stung by a bee and turning every discussion into an ordinary fight.Hans

author: _Wim_
author_rank: Super Contributor
timestamp: May 19, 2021, 06:50:49 pm
content: Quote from: Hans Polak on May 19, 2021, 04:52:29 pmHow do you explain than that I take your excel, add the CSV data with only negative gains, pull the formula’s down and get instantly the same numbers we have been arguing about for pages?Quote from: Hans Polak on May 19, 2021, 04:52:29 pmAs explained this decision was made because it makes measuring single components like capacitors and inductors easier due to the gain approaching 1. I can agree that this way maybe not the best decision, but I told you immediately that this was done (and kept repeating it that this was the reason for the difference), yet you keep ignoring this and claiming my calculation was wrong.Quote from: Hans Polak on May 19, 2021, 04:52:29 pmI somehow doubt that, but as explained for “me” to understand and know what I should add in my code and how it works, I needed the data in a certain way. For “me” it was not clear, and if you expect me to add your wishes to me application, I do feel I am entitles to ask for the data in a certain way…Quote from: Hans Polak on May 19, 2021, 04:52:29 pmHans, for several pages long you are claiming all sort of stuff is wrong with my app, and ignore my pointers completely to check your calculation. You make bold claims on how I do the mathematics wrong (which made me actually doubt what I have done and made spent quite a bit of time digging everything back up again, mathematics requires time & effort for me and is certainly not my preferred topic to spent my sparse free time on). When I can disprove one of your claims, you only keep finding new claims that “something” is wrong. (which would be still ok if you state that you see a difference, and are not sure who is correct, but you always state it as you are 100% sure it is me, and I have to find the proof it is not)When I finally receive your Excel on which those claims are based, I only need to copy in the CVS data with gain set to zero, drag the formula’s down, and get exactlyallthe results I have with my app, while just before you claim to have done the same this with setting gain to zero, but still see differences:Quote from: Hans Polak on May 17, 2021, 09:09:58 pmFor me this looked like you have all the data at your fingertips, yet it was up to me again to find proof. This was indeed very frustrating to me, hence me reaction.

author: _Wim_
author_rank: Super Contributor
timestamp: May 19, 2021, 06:58:22 pm
content: Forgot to mentions one more thing, when I was checking your formula's you had an absolute value for both capacitance and inductance, which for me looked like you were fully aware a log plot in excel does not like negative numbers, yet made me look why ESR did not go negative in your plot...

author: _Wim_
author_rank: Super Contributor
timestamp: May 19, 2021, 07:08:26 pm
content: Quote from: Hans Polak on May 19, 2021, 04:52:29 pmSomehow you made me doubt again that this was what actually happened, so I figured to redo what I have done before...See formula bar to row1 and row2 or Resr. And this after we have been discussing about ESR negative or not

author: _Wim_
author_rank: Super Contributor
timestamp: September 12, 2021, 02:12:16 pm
content: Due to a question in another thread (https://www.eevblog.com/forum/testgear/device-impedance-using-dso/) I wanted to run my app again, but it did not run any longer. I had updated recently to the latest version of "FRA for Picoscope", and it appears the FRA's API has changed, so a small update to my app was also required.While I had the app open, I made 2 other small changes related to the discussion above:- renamed the tabs to clearly indicateseriescapacitance & inductance are measured- added the option to disable the positive gain limitingAs always, updated version added in the first post (version 1.014) To run this version, the latest version of "FRA for Picoscope" must be installed, which can be found here:https://bitbucket.org/hexamer/fra4picoscope/downloads/For users that prefer to run with an older version of "FRA for Picoscope", version 1.013 can still be used (also attached in first post)

author: Cykeltur
author_rank: Newbie
timestamp: April 22, 2024, 09:29:04 am
content: Hi this was interestingi hava a old RCL circuit that i like to see the impedance sweep for, but if i do some simulation on the RCL circuit the resonance is about 20kHz, but the result if i use 119Ohm resistor as a refference the plot is not showing the 20kHz responande :-/ any ideasthe values are just all over the place :-/

author: _Wim_
author_rank: Super Contributor
timestamp: April 22, 2024, 08:45:23 pm
content: Can you post some screenshots of the result you get and the setup you are using while measuring?

author: Cykeltur
author_rank: Newbie
timestamp: April 23, 2024, 06:16:04 am
content: sure! :-)The ReferenceResistor: 121The RCL is the following components in series:R: 1.2k(1190)C: 183 K (so probably 18000 pF ± 10%L: 3300uH (3,3mH) (3300uH±10%)should result in :Resonance at 20650Hz (Qfactor : 0,36)Using a simple RCL calc, like this one:https://www.omnicalculator.com/physics/rlc-circuit

author: egonotto
author_rank: Super Contributor
timestamp: April 23, 2024, 01:55:43 pm
content: Hello,I think you have connected the oscilloscope incorrectly (wrong.png). Connect the oscilloscope to your circuit according to the green text in better.png.Best regardsegonotto

author: Cykeltur
author_rank: Newbie
timestamp: April 23, 2024, 03:18:40 pm
content: hi thanks!, i get the exact same result (the second plot is overlaying the old one)(the photo is the same board so that is not included in the photo..)

author: _Wim_
author_rank: Super Contributor
timestamp: April 23, 2024, 06:17:13 pm
content: Quote from: Cykeltur on April 23, 2024, 03:18:40 pmThe DUT is the RCL, not only the R. So your red probe must be between the ref-resistor and the L.

author: _Wim_
author_rank: Super Contributor
timestamp: April 23, 2024, 06:31:00 pm
content: Looking at your pictures, I see that is was just your drawing stating the incorrect connection. But I also see in your picture you are using a scope probe to connect the signal generator to the reference resistor. This is not ok, as scope probes use resistive coax which can have quite a bit of resistance. Use a BNC cable with crocodile clips or something similar instead.

author: _Wim_
author_rank: Super Contributor
timestamp: April 23, 2024, 07:01:12 pm
content: Quote from: _Wim_ on April 23, 2024, 06:31:00 pmI would even recommend not to use scope probes for channel A & B also, but this should have less negative impact and the connection with the signal generator. However, I never used scope probes myself, I just used short BNC cables or a test jig...

author: mawyatt
author_rank: Super Contributor
timestamp: April 23, 2024, 07:16:54 pm
content: Here's something that one might find useful using a SDS2000X DSO for Impedance Measurements.https://www.eevblog.com/forum/testgear/capacitive-impedance-plots-with-sds2104x-plus-bode-function/msg4335745/#msg4335745https://www.eevblog.com/forum/testgear/admittance-measurements-with-dso-awg-with-bode-function/msg4491952/#msg4491952Best,

author: Cykeltur
author_rank: Newbie
timestamp: April 24, 2024, 09:52:23 am
content: ok so i have skipped the probe för the generator side, THANKS, then from the generator, I have tryed 2 options (like in the manual and in your revommendation):option 1:Gennerator to B probe "red" and then also from Gennerator thru the ref resistor (120 ohm).on the other side of the Rref I have the A probe"blue" and also from the other side of the Rref i have connected the DUKin.then thru the DUK to DUKout, to GND clip on proBe A and B.same result :-/then i have altso tryed the ;option 2:Gennerator to A probe "blue" and then also from Gennerator thru the ref resistor (120 ohm).on the other side of the Rref I have the B probe"red" and also from the other side of the Rref i have connected the DUTin.then thru the DUT to DUTout, to GND clip on probe A and B.odd result :-/the DUT has red and black cables in the picture, same as before,

author: _Wim_
author_rank: Super Contributor
timestamp: April 24, 2024, 05:22:02 pm
content: Quote from: Cykeltur on April 24, 2024, 09:52:23 amIf the software is still configured as in the attached screenshot, then you should use option 2. I am however not sure what is exactly wrong, but a few suggestions to figure is out:- 1) while everything is connected like in option 2, just use your picoscope software and generate a 1kHz sine signal of 1V. Take a screenshot of the signals you see on channel A and channel B. Repeat while generating a 20kHz sine signal. This should give us an idea what the scope actually sees and hopefully make the issue more clear.- 2) instead of connecting an RLC as the DUT, please only use a known resistor or known capacitor and measure the impedance. This will also make it easier to understand the results.

author: _Wim_
author_rank: Super Contributor
timestamp: April 24, 2024, 05:23:20 pm
content: can you also state which picoscope model you are using?

author: Cykeltur
author_rank: Newbie
timestamp: April 24, 2024, 05:43:35 pm
content: Quote from: _Wim_ on April 24, 2024, 05:23:20 pmSure thing, ths a PICOSCOPE 3205A

author: RPuccio
author_rank: Contributor
timestamp: May 08, 2024, 03:15:45 pm
content: Hi everyone !Thank you so much for this incredible tool, it's really a breeze to useTried my first measurement today and it went quite well, but I was surprised to see that the reference resistor cannot use decimals (ex : my 100 ohm resistor measured 99.32 ohm).I'm pretty much sure that nobody really cares about such a small difference though, we're talking about an open-source yet powerful tool that is not really meant to match super high-end Keysight analyzers lol.Not sure if that could easily be improved too, but I can't seem to make a 5Hz - 20kHz measurement while the FRA4PS software easily supports it (even if it is slow) : here, the buffer of my small 2000 series scope gets full. Maybe there is some trick to automatically send data when the scope buffer is full so that it can continue doing the rest of the measurements ?If I see anything else that could be improved with some use, I'll let you know !Cheers,Rodolphe

author: _Wim_
author_rank: Super Contributor
timestamp: May 08, 2024, 04:58:08 pm
content: Quote from: RPuccio on May 08, 2024, 03:15:45 pmI would be surprised that is the case (can't remember and can't test right now), but could it be a conflict with the use of comma and point for the decimal separator?Quote from: RPuccio on May 08, 2024, 03:15:45 pmNot sure what is happening exactly. I would have expected whatever you can run with FRA4PS, also would work with this app. Can you post a screenshot to show of your settings and what is happening exactly?

author: _Wim_
author_rank: Super Contributor
timestamp: May 10, 2024, 03:57:16 pm
content: Quote from: _Wim_ on May 08, 2024, 04:58:08 pmJust had a check, I can give in decimals without any issue.

author: RPuccio
author_rank: Contributor
timestamp: June 05, 2025, 03:17:39 pm
content: Hi _Wim_,Sorry for bothering you again, but it seems like I now have a weird issue with the software (haven't used it for a while). I now run Windows 11 and recently reinstalled FRA4PS v0.9.0, PicoSDK x64 v11.1.0.418 and ImpedanceViewer1014. Unfortunately, I now encounter an error while running the software when I click on the Measure > Picoscope button, which reads the following :"An attempt was made to load a program with an incorrect formatHRESULT Exception : 0x8007000B"If I click "ok", the setup window opens and I get a crash when starting measurement with the same erreor code and the following exception text. Any idea what I am doing wrong here, by any chance ? Should I raise an issue on Github instead ?Thank you very much,Best regards,Rodolphe************** Texte de l'exception **************System.BadImageFormatException: Tentative de chargement d’un programme de format incorrect. (Exception de HRESULT : 0x8007000B)à FRA_IMP.FRA4PicoscopeAPI.Initialize()à FRA_IMP.FRA4Picoscope.ConnectPicoscope()à FRA_IMP.FRA4Picoscope.CheckSettings()à FRA_IMP.MeasurePicoscope.StartMeasurement()à FRA_IMP.MeasurePicoscope.buttonStartMeasurement_Click(Object sender, EventArgs e)à System.Windows.Forms.Control.OnClick(EventArgs e)à System.Windows.Forms.Button.OnClick(EventArgs e)à System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)à System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)à System.Windows.Forms.Control.WndProc(Message& m)à System.Windows.Forms.ButtonBase.WndProc(Message& m)à System.Windows.Forms.Button.WndProc(Message& m)à System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)à System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)à System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)************** Assemblys chargés **************mscorlibVersion de l'assembly : 4.0.0.0Version Win32 : 4.8.9300.0 built by: NET481REL1LAST_CCodeBase : file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll----------------------------------------FRA_IMPVersion de l'assembly : 1.0.0.14Version Win32 : 1.0.0.14CodeBase : file:///C:/Program%20Files/ImpedanceViewer1014/FRA_IMP.exe----------------------------------------WHConsult.UtilsVersion de l'assembly : 1.0.0.0Version Win32 : 1.0.0.0CodeBase : file:///C:/Program%20Files/ImpedanceViewer1014/WHConsult.Utils.DLL----------------------------------------SystemVersion de l'assembly : 4.0.0.0Version Win32 : 4.8.9282.0 built by: NET481REL1LAST_CCodeBase : file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll----------------------------------------System.Windows.FormsVersion de l'assembly : 4.0.0.0Version Win32 : 4.8.9256.0 built by: NET481REL1LAST_BCodeBase : file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll----------------------------------------System.DrawingVersion de l'assembly : 4.0.0.0Version Win32 : 4.8.9032.0 built by: NET481REL1CodeBase : file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll----------------------------------------log4netVersion de l'assembly : 1.2.11.0Version Win32 : 1.2.11.0CodeBase : file:///C:/Program%20Files/ImpedanceViewer1014/log4net.DLL----------------------------------------System.ConfigurationVersion de l'assembly : 4.0.0.0Version Win32 : 4.8.9032.0 built by: NET481REL1CodeBase : file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll----------------------------------------System.CoreVersion de l'assembly : 4.0.0.0Version Win32 : 4.8.9297.0 built by: NET481REL1LAST_CCodeBase : file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll----------------------------------------System.XmlVersion de l'assembly : 4.0.0.0Version Win32 : 4.8.9032.0 built by: NET481REL1CodeBase : file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll----------------------------------------AccessibilityVersion de l'assembly : 4.0.0.0Version Win32 : 4.8.9032.0 built by: NET481REL1CodeBase : file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll----------------------------------------System.Windows.Forms.DataVisualizationVersion de l'assembly : 4.0.0.0Version Win32 : 4.8.9032.0CodeBase : file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.DataVisualization/v4.0_4.0.0.0__31bf3856ad364e35/System.Windows.Forms.DataVisualization.dll----------------------------------------System.Windows.Forms.DataVisualization.resourcesVersion de l'assembly : 4.0.0.0Version Win32 : 4.8.9032.0CodeBase : file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.DataVisualization.resources/v4.0_4.0.0.0_fr_31bf3856ad364e35/System.Windows.Forms.DataVisualization.resources.dll----------------------------------------System.Windows.Forms.resourcesVersion de l'assembly : 4.0.0.0Version Win32 : 4.8.9032.0 built by: NET481REL1CodeBase : file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_fr_b77a5c561934e089/System.Windows.Forms.resources.dll----------------------------------------System.DataVersion de l'assembly : 4.0.0.0Version Win32 : 4.8.9214.0 built by: NET481REL1LAST_BCodeBase : file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll----------------------------------------mscorlib.resourcesVersion de l'assembly : 4.0.0.0Version Win32 : 4.8.9032.0 built by: NET481REL1CodeBase : file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_fr_b77a5c561934e089/mscorlib.resources.dll----------------------------------------************** Débogage JIT **************Pour activer le débogage juste-à-temps (JIT), le fichier de configuration pour cetteapplication ou cet ordinateur (machine.config) doit avoir la valeurjitDebugging définie dans la section system.windows.forms.L'application doit également être compilée avec le débogageactivé.Par exemple :<configuration><system.windows.forms jitDebugging="true" /></configuration>Lorsque le débogage juste-à-temps est activé, les exceptions non géréesseront envoyées au débogueur JIT inscrit sur l'ordinateurplutôt que d'être gérées par cette boîte de dialogue.

author: coromonadalix
author_rank: Super Contributor
timestamp: June 05, 2025, 04:03:30 pm
content: do you have dot Net v 4.8 installed, seems some of them are .net related ??HRESULT Exception : 0x8007000B" is dot net related ?search all dll file names, it may point you to say some packages needed to be installed ? like C++ runtimes, VB runtimes or else ... or even some could be not registered ?

author: _Wim_
author_rank: Super Contributor
timestamp: June 05, 2025, 06:49:53 pm
content: Will have a look at this in the weekend. One question, does FRA4PS run fine on that machine directly using the FRA4PS GUI? (it seems like it is triggered directly from FRA4PS)

author: RPuccio
author_rank: Contributor
timestamp: June 05, 2025, 08:51:02 pm
content: @Coromonadalix : I ithought I installed the latest version, but now I'm starting to doubt it was the correct file at all. I run Windows 11 24H2 and i can't install .NET4.8 as it detects a newer version is already installed on my machine. I'm running a Windows update on my machine just to see if it helps._Wim_ : yes, FRA4PS is working like a charm !Thank you both for such a fast reply by the way !

author: _Wim_
author_rank: Super Contributor
timestamp: June 07, 2025, 07:19:48 am
content: Hi RPuccio, just had a check, the impedance viewer app was not made for X64. So you will have to install "FRA4PicoScope_0.8.0_beta.msi" (last X86 version) and also the X86 SDK from picoscope. This should normally fix the issue.

author: RPuccio
author_rank: Contributor
timestamp: June 08, 2025, 01:35:08 pm
content: Alright, I didn't think at all that would be that simple ! I've installed everything but don't have yet my Picoscope on hand, I'll report when I get it back next Tuesday.Thank you so much !Rodolphe

author: _Wim_
author_rank: Super Contributor
timestamp: June 08, 2025, 04:48:48 pm
content: Quote from: RPuccio on June 08, 2025, 01:35:08 pmI checked on my pc, and this should do the trick. When I made the app, an X64 version FRA4PS did not exist. X86 uses "Stdcall" as the calling convention for non managed code, while X64 typically uses "Cdecl". I am also not sure if some of the dll API changed with the new version, so for now it is best to use "FRA4PicoScope_0.8.0_beta.msi"...

author: coromonadalix
author_rank: Super Contributor
timestamp: June 08, 2025, 05:01:58 pm
content: you have this : FRA4PicoScope_64-bit_0.9.0b.msifrom :https://bitbucket.org/hexamer/fra4picoscope/downloads/?tab=downloads&iframe=true&spa=0does it work ?EDIT : see next post

author: _Wim_
author_rank: Super Contributor
timestamp: June 08, 2025, 05:22:51 pm
content: No, this is causing issues. This dll is a 64-bit dll, and needs to be called differently from my app (at least using a different calling convention for Pinvoke, could be some other API differences also, have not checked). So for now I propose to only use the 32-bit version, I might make a dedicated X64 version in the future, but I do not think there is much benefit...

author: RPuccio
author_rank: Contributor
timestamp: June 10, 2025, 04:32:25 pm
content: Confirmed, everything works fine and both FRA4PS and the ImpedanceViewer can coexist without issues. Thank you so much for such a fast reply, you're the best !