ltspice

package module
v0.0.0-...-eb1d98b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2021 License: BSD-2-Clause Imports: 10 Imported by: 0

README

LTSpice utilities, in Go

lta

lta [-s] [-v] file.raw

Produces summary results, mainly for use in worst case analysis. For each variable written by LTSpice to the 'raw' file, the following values are calculated:

  • Mean
  • Standard deviation (unbiased), corrected for the number of runs by the c4(n) factor [1].
  • Min, Max: these values are derived from special variables of the form variable_max and variable_min, if present. If min and max are present, the Cpk, % good and ppm columns are calculated.
  • Cpk, the process capability: min of ( (Max - Mean) / 3σ, (Mean - Min) / 3σ )
  • % good: how many parts are expected to be within the specified tolerances.
  • ppm: how many parts in a million are expected to be out of the specified tolerances.

The last 3 columns are based on the assumption that the values of the variable follow a normal (Gaussian) distribution.

The RAW file can be in uncompressed LTSpice IV or XVII formats, with single or double precision data points (.numcfg higher than 6 produces double precision values).

[1] https://en.wikipedia.org/wiki/Unbiased_estimation_of_standard_deviation#Bias_correction

Possible improvements

The current implementation is useful only for DC signals. The analysis could be extended to AC signals (RMS, frequency, duty cycle).

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Raw

func Raw(file string) ([][]float64, []string, error)

Raw reads an LTSpice raw (binary) file and returns a square matrix with the time in the first column, and data points in the rest. It also returns an array of column names

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL