I am wondering if anyone found a way of extracting the standard deviation of a plot within LTSpice i.e. not having to resort to Excel or Minitab for the effect?
I've kludged a method whereby...
.MEAS MyMean AVG MyPlotVar
.MEAS Sigma RMS (MyPlotVar - MyMean)
unfortunately the resulting sigmas are a bit off by about 10% to 15%... no idea where the error comes from as I don't have visibility of how LTSpice handles data which is a bit frustrating...
Thanks for your comments
We had sometimes ago a discussion about RMS calculation of LTspice in the LTspice-Yahoo group (message 115650, RMS Measurement Error)
The result of this discussion: LTspice calculates the RMS of a PWL waveform through the data points, not an RMS of just the data points alone.
Please write a message to the address email@example.com and ask for a "special/correct" calculation of the standard deviation. Maybe this new function should be named STD.
Hi Helmut, thanks for your reply.
I emailed these findings to Mr. Gabino Alonso about a week ago but I am yet to receive a reply. I will now forward that email to the address you have kindly provided in view of a follow-up.
Re data points, that seems to be the case and it is easy to demonstrate by having a waveform exported to an excel spreadsheet, e.g. 10 sawtooth cycles, to realize there are only 4 points per period, which almost defeats the usefulness of exporting data in the first place. So if LTSpice gets an accurate RMS value of just a handful of points, then yes I am convinced it is the linear interpolation that does the trick. This however does not explain the error in the sigma results when the RMS-based calculation for standard deviation (mathematically correct and again, very easy to demo in excel) is entirely done in LTSpice.
Agreed. There already is a gauss function, doesn't make any sense not to have a sigma.
It turns out I met Mr. Engelhardt yesterday at an LTSpice seminar where I had the opportunity to ask him about the possibility of adding a std dev function to LTSpice in order to calculate some Cp and Cpks as early as within the design stage of a wider six sigma manufacturing environment. Unfortunately, I didn't find him particularly engaged in the conversation, to say the least.
I am now looking at Simetrix. I heard their customer support is quite good.
I had asked Mike too about a function like STD which only uses the calculated datapoints for the RMS especially for .OP and .DC simulation, but without sucess. I checked with two other SPICE simulators - one has been Simetrix. Both have calculated the RMS in a .DC Monte Carlo sweep as expected from theory whereas LTspiceXVII is "wrong". Sorry, I have to say this. I hope some LTspice users from ADI will read this message and discuss this topic with Mike.
Not a problem, Helmut. You've been great!
PS: Simetrix replied in less that 24 hours with a solution! Paid software has its advantages!