fides

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: MIT Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

FIDES reliability library for Go

This library is based on FIDES edition 2022. It is not a comprehensive implementation (see the notes below).

Although FIDES and all reliability methods derived from or similar to MIL-HDBK-217 are currently not accurate according to reports from different sources, NASA included (see the references), some kind of failure estimation for electronic devices is necessary. FIDES is considered here as a starting point, and as models evolve, eventually also this library will do.

FIDES adopts a constant failure rate for components but not for subassemblies, which is a contradiction. In future releases, it is to be expected that more failure models will adopt a Weibull or some other distribution that more accurately reflects the life expectancy under the given mission profiles.

The library is MIT-licensed (versions before v0.1.0 were BSD-2-Clause) and implements FIDES 2022 only. Since v0.1.0 it includes the FIDES 2022 fixes and the validation made for fitcalc (github.com/rveen/fitcalc), which uses it as its reliability engine.

Install

# go install github.com/rveen/fides/cmd/fides@latest
# git clone https://github.com/rveen/fides
# cd fides
# fides testdata/bom.csv testdata/db.csv testdata/mission.csv

This will do a FIT calculation on the sample BOM provided and print it on screen.

Input file formats

The fides command (cmd/fides) reads several CSV files, from which the first one is the BOM and the last one is the mission profile. Any other files augment the data in the BOM, as defined by 'type' relations (see https://github.com/rveen/golib/csv). The 'name' attribute in BOM files is the component reference (R1, C4, etc) and should be unique.

BOM items have the following fields:

  • 'type': optional, useful to inherit data from other files
  • 'class': see next section.
  • 'tags': see next section.
  • 'value'
  • 'package': see "Packages" below.
  • 'ndevices': for components that have more than one device per package.
  • 'npins': for ICs, optocouplers and connectors (number of contacts).
  • 'layers', 'mounts', 'piclass', 'pitechno': for PCBs, the number of layers, the number of mounted component terminations, and ΠClass and ΠTechnology (FIDES 2022, pp. 174-176).
  • 'tmax': maximum working temperature
  • 'vmax': maximum permanent voltage
  • 'vpmax': maximum transient voltage (not used at the moment)
  • 'pmax': power rating
  • 'description': optional field
  • 'v': working voltage
  • 'i': working current (optional)
  • 'p': working power (optional)

The last file to be specified on the command line is the mission profile.

See testdata for some CSV examples.

Class and tags

Components are identified by the fields 'class' and 'tags'. Class takes the values L, C, R, D, Q, U, X or PCB. Tags identify types within a class:

  • All: smd (default), tht (for through hole), analog, interface, power (placement factor)
  • C / Aluminium electrolytic capacitors: alu, elco; solid (also dry, polymer) for solid electrolyte
  • C / Tantalum capacitors: tant, tantalum, tantalium; solid (default: SMD, or axial, bead), wet (default: silver case and glass seal; elastomer, glass_sealed, silver_case, tantalum_case)
  • C / Ceramic capacitors: cer, x5r, x5s, x6r, x6s, x7r, x7s, x8r, x8s, np0, c0g, y5v (or type1, type2); flex for flexible (polymer) terminations; topend for top-end technology (category 3 above the category 2 C·V limit)
  • L / Inductors, transformers: trafo, power, multilayer/ferrite_bead (default: low-current wirewound)
  • R / Resistors: thin film (default, by value), thick, melf, network (with ndevices), ww (for wirewound; power rating ≥ 1 W selects the power rows), pot/potmeter/potentiometer/variable
  • D / Diodes: zener, tvs, rectifier, led (with white, ceramic)
  • Q / Transistors: mos/mosfet, jfet, igbt, triac, thyristor (bipolar by default). MOS over 5 W and IGBTs use the power transistor model.
  • U / ICs: digital, analog, mixed, microprocessor/microcontroller/dsp, dram, sram, fpga/cpld/pal, flash/eprom/eeprom
  • U / Optocouplers: opto, optocoupler; photodiode (default: phototransistor)
  • X / Crystals, resonators; osc/oscillator for oscillators
  • J / Connectors for printed circuits: pressfit, tht (default: smd)
  • PCB / see the PCB fields above

If the assembly style is not defined (smd or tht), then smd is assumed.

Packages

IC packages are written as the package family followed by the number of pins (LQFP64, PBGA256), or the family alone with 'npins'. Families (FIDES 2022, pp. 125-127): PDIP, CERDIP/CDIP, PQFP, LQFP/TQFP, HQFP/RQFP/POWERQFP, CERPACK, CQFP, PLCC, JLCC/JCLCC, CLCC, SOJ, SO/SOIC, TSOP, SSOP/QSOP, TSSOP/MSOP/VSSOP/HTSSOP, QFN/DFN/VQFN, QFNFP (QFN with 0.4 mm pitch), LGA, PBGA (1.27 mm pitch), PBGABT (1.00 mm pitch), POWERBGA/TBGA/SBGA, FCBGA, CBGA, DBGA, CCGA/CICGA and CPGA.

Discrete semiconductor packages use their usual names (SOT23, SOD123, SMB, DPAK, TO220, …) and are grouped as in the guide (pp. 135-136). QFN has no default thermal resistance (the guide's formula needs the package area), so give 'rtha' for QFN parts.

Package.Rtha gives the default junction-to-ambient thermal resistance: Ctype·Np^-0.58·K for IC packages written with their pin count (p. 119), the table value for discrete packages and their equivalents (p. 120), and -1 where there is none: QFN, an IC family without its pin count, or a discrete package without a table value (SO8P).

Notes on this implementation

  • Values and formulas follow the FIDES Guide 2022 Edition A (July 2023). Every model and table row implemented here is checked against an independent calculation from the guide (testdata/validation and guide_cases_test.go).

  • Unsupported components:

    • ASICs (the 'complex' tag uses the microprocessor row instead)
    • Film capacitors
    • Fuses
    • Relays
    • Switches
    • GaN and GaAs (RF and microwave) components, and other microwave components
    • Fine-pitch BGA and wafer-level packages
    • COTS
    • Hybrids
    • Subassemblies
    • Batteries
    • Fans
    • Deep sub-micron components
  • Process factors are set to default values:

    • 𝚷Ruggedized = 1.7
    • 𝚷PM = 1.7 for active components (ICs, discrete semiconductors, LEDs, optocouplers), 1.6 for the others
    • 𝚷Process = 4
    • 𝚷LF = 1
  • The parts count method is not implemented

References

Documentation

Index

Constants

View Source
const InvBoltzman float64 = 11604

InvBoltzman is 1/k_B in K/eV, rounded as in the formulas of the FIDES 2022 guide (p. 41).

Variables

This section is empty.

Functions

func Arrhenius

func Arrhenius(ea, t1, t0 float64) float64

Arrhenius law

func Arrhenius25

func Arrhenius25(ea, temp float64) float64

Arrhenius25 returns the Arrhenius factor at temp [°C] relative to 293 K (20 °C). FIDES 2022 uses 293 K as the reference (Kelvin offset: 273, not 273.15). This differs intentionally from model.Arrhenius25 (298.15 K / 25 °C).

func ArrheniusK

func ArrheniusK(ea, t0, t1 float64) float64

Arrhenius (in K)

func CapacitorFIT

func CapacitorFIT(comp *Component, mission *Mission) (float64, error)

CapacitorFIT returns the FIDES 2022 FIT of a ceramic, aluminium or tantalum capacitor.

func CapacitorType

func CapacitorType(c *Component) (capacitorType, error)

CapacitorType returns the FIDES 2022 capacitor type of a component, from its tags, value and rated voltage.

func ConnectorFIT

func ConnectorFIT(comp *Component, mission *Mission) (float64, error)

PCB connectors, less that one insertion/year

func Cs

func Cs(class string, tags []string) float64

Cs returns Csensitivity of a class and tags, from the first row of css whose tags the component has all of.

func FIT

func FIT(comp *Component, mission *Mission) (float64, error)

FIT returns the FIDES 2022 failure rate of a component for a mission, in failures in 10⁹ hours.

func InductorFIT

func InductorFIT(comp *Component, mission *Mission) (float64, error)

InductorFIT

func IsPowerTransistor

func IsPowerTransistor(c *Component) bool

IsPowerTransistor reports whether a component falls under the FIDES 2022 model for discrete power semiconductors (pp. 138-140): silicon MOS rated 5 W or more, and IGBTs.

func IsSmd

func IsSmd(c *Component) bool

func LEDFIT

func LEDFIT(comp *Component, mission *Mission) (float64, error)

LEDFIT returns the FIDES 2022 FIT of a light-emitting diode (class D, tag led; pp. 141-143).

The chip is a colour LED unless tagged white. The package basic failure rates depend on the maximum direct current Imax and the package (see ledPackage). comp.T is the junction temperature rise over ambient, P·Rth.

func Lbase_Pcb

func Lbase_Pcb(nLayers, nMounts int, class, techno float64) float64

Lbase_Pcb is λ0 of a PCB (p. 175).

func Lchip_th

func Lchip_th(c *Component) float64

func NorrisLandzberg

func NorrisLandzberg(tdeltaRef, tdeltaUse, tmaxRef, tmaxUse, fRef, fUse float64, a, b, c float64) float64

Norris-Landberg, general form

For SAC305 lead-free solder: a=2.3, b=0.3, c=4562 See "Norris–Landzberg Acceleration Factors and Goldmann Constants for SAC305 Lead-Free Electronics" (Journal of Electronic Packaging · September 2012) See also: https://www.lamar.edu/engineering/_files/documents/mechanical/dr.-fan-publications/2008/Fan%202008_13%20ECTC_3.pdf

func OptoFIT

func OptoFIT(comp *Component, mission *Mission) (float64, error)

OptoFIT returns the FIDES 2022 FIT of an optocoupler (class U, tag opto or optocoupler; pp. 144-145): a phototransistor optocoupler unless tagged photodiode. The package basic failure rates are those of the integrated circuit or discrete semiconductor package; comp.T is the junction temperature rise over ambient, P·Rth.

func PcbFIT

func PcbFIT(comp *Component, mission *Mission) (float64, error)

PcbFIT returns the FIDES 2022 FIT of a printed circuit board (class PCB; pp. 174-176), from comp.Layers, comp.Mounts (mounting points: SMD pads and through-holes), comp.PiClass (1 to 6, from the minimum conductor width and spacing) and comp.PiTechno (0.25 through-holes, 0.5 blind holes, 1 micro-vias, 2.5 pad on via).

func PiChemical

func PiChemical(ea, sal, env, zone float64, sealed bool) float64

func PiInduced

func PiInduced(comp *Component, phase *Phase) (float64, error)

Contribution of induced factors (overstresses): Electrical overstress, mechanical overstress, thermal overstress

func PiInducedPcb

func PiInducedPcb(phase *Phase) float64

func PiMech

func PiMech(grms float64) float64

Basquin's law

func PiPM

func PiPM() float64

PiPM is the quality and technical control over manufacturing of a passive item (default value, FIDES 2022, p. 36).

func PiPMActive

func PiPMActive() float64

PiPMActive is PiPM for active components: integrated circuits, discrete semiconductors, LEDs and optocouplers (default value, FIDES 2022, p. 36).

func PiPW

func PiPW() float64

PiPW is the design factor of discrete power semiconductors, silicon MOS over 5 W and IGBTs (default value, FIDES 2022, p. 138).

func PiProcess

func PiProcess() float64

quality and technical control over the development, manufacturing and usage process for the product containing the item (Use default value)

func PiRH

func PiRH(ea, rh, temp float64) float64

Peck’s model

func PiRH2

func PiRH2(ea, rh, temp float64, on bool) float64

Same as PiRH, but return 0 in on mode

func PiRuggedising

func PiRuggedising() float64

PiRuggedising represents the influence of the policy for taking account of overstresses in the product development. (Use default value)

func PiTCCase

func PiTCCase(nc int, time, tdelta, tmax float64) float64

Temperature cycling, case, Norris-Landzberg model (semiconductor cases)

func PiTCSolder

func PiTCSolder(nc int, time, duration, tdelta, tmax float64) float64

Temperature cycling, solder joints, Norris-Landzberg model (FIDES 2022, pp. 43-44): the cycle duration factor is (min(θcy, 2)/2)^(1/3). See https://www.lamar.edu/engineering/_files/documents/mechanical/dr.-fan-publications/2008/Fan%202008_13%20ECTC_3.pdf (The 1.9 factor is OK for lead-free also, according to this paper)

func PiTV

func PiTV(tamb float64) float64

PiTV is the high temperature factor of a PCB (p. 176).

func PiThermal

func PiThermal(ea, temp float64, on bool) float64

PiThermal for ICs is 0 in non-operating mode

func PiThermal_cap

func PiThermal_cap(ea, tamb, sref, ratio float64, on bool) float64

func PiThermal_voltageFactor

func PiThermal_voltageFactor(v, vmax float64) float64

PiThermal_voltageFactor is ΠEl of a signal diode up to 1 A (not zener or tvs): (V/Vrated)^2.4 above a ratio of 0.3, and 0.056 up to it (FIDES 2022, p. 137).

func PiezoFIT

func PiezoFIT(comp *Component, mission *Mission) (float64, error)

PiezoFIT returns the FIDES 2022 FIT of a quartz crystal resonator or oscillator (pp. 163-164). The output current I of an oscillator counts when it is 80 % of Imax or more.

func PiezoType

func PiezoType(c *Component) piezoType

PiezoType returns the quartz crystal type of a component: an oscillator if tagged osc or oscillator, else a resonator; through-hole if tagged tht or its package is through-hole, else surface-mounted.

func ResistorFIT

func ResistorFIT(comp *Component, mission *Mission) (float64, error)

ResistorFIT returns the FIDES 2022 FIT of a resistor (pp. 146-148).

func ResistorType

func ResistorType(c *Component) resistorType

ResistorType returns the FIDES 2022 resistor type of a component, from its tags, rated power and value (pp. 146-147):

  • melf: "MiniMELF" fixed resistor
  • network: SMD resistor network (λ0 × √N, N resistors)
  • thick: SMD thick film, or high-power thick film if rated 1 W or more
  • ww: wirewound precision, or high-power wirewound if rated 1 W or more
  • pot, potmeter, potentiometer, variable: non-wirewound potentiometer
  • otherwise: thin film, precision, high-stability, by value; SMD unless tagged tht

func Rthja_semi

func Rthja_semi(pkg string, k bool) (int, float64, float64)

Rthja_semi returns the number of pins, the junction-to-ambient thermal resistance (on a substrate of high thermal conductivity if k is true) and the junction-to-case thermal resistance of a discrete package or one of its equivalents, from the package table; -1, -1, -1 if it is not there.

func SemiconductorFIT

func SemiconductorFIT(comp *Component, mission *Mission) (float64, error)

SemiconductorFIT returns the FIDES 2022 FIT of a diode, transistor or integrated circuit (pp. 123-129, 133-140).

Types

type Bom

type Bom struct {
	Components []*Component
}

func (*Bom) FITAll

func (b *Bom) FITAll(m *Mission) ([]float64, []error)

FITAll computes FIT for every component. A nil error entry means success; NaN in the corresponding fits entry means that component failed to compute.

func (*Bom) FITByBlock

func (b *Bom) FITByBlock(m *Mission) (map[string]float64, []error)

FITByBlock groups computed FIT values by the Block field on each Component. Components with NaN FIT or an empty Block are skipped.

func (*Bom) FromCsvs

func (bom *Bom) FromCsvs(files []string) error

func (*Bom) Len

func (bom *Bom) Len() int

func (*Bom) Less

func (bom *Bom) Less(i, j int) bool

func (*Bom) Report

func (b *Bom) Report(m *Mission, w io.Writer) error

Report writes a tabular FIT summary to w sorted by descending FIT. Columns: reference, class, FIT, % of total, cumulative %. Components that returned an error are listed at the end with their error.

func (*Bom) Sort

func (bom *Bom) Sort(field string)

func (*Bom) Swap

func (bom *Bom) Swap(i, j int)

func (*Bom) TotalFIT

func (b *Bom) TotalFIT(m *Mission) (float64, []error)

TotalFIT returns the sum of all computable FIT values and the per-component errors for any components that failed. Components with NaN FIT are skipped.

type Component

type Component struct {
	Name        string  // Denominator or reference
	Value       float64 // Value in SI unit
	Tolerance   float64
	Type        string // Part number
	Description string // Free description

	Class string
	Tags  []string
	Block string // For classifying per block or function

	Package string
	N       int // Number of devices
	Np      int // TODO Number of pins
	Rtha    float64

	Vp, V, P, I, T                float64 // Working conditions (T is the delta over ambient)
	Vpmax, Vmax, Pmax, Imax, Tmax float64 // Device limits

	// Temperature coefficient. Set to NaN for undefined
	TC float64

	// Printed circuit boards (FIDES 2022, p. 175)
	Layers   int     // number of layers
	Mounts   int     // number of mounting points: SMD pads and through-holes
	PiClass  float64 // ΠClass, 1 to 6, from the minimum conductor width and spacing
	PiTechno float64 // ΠTechno: 0.25 through-holes, 0.5 blind holes, 1 micro-vias, 2.5 pad on via

	FIT float64
}

func NewComponent

func NewComponent(name string) *Component

NewComponent returns a component whose working conditions V, I and P are not set (NaN). A zero V, I or P is a valid working condition (a capacitor or diode at 0 V, an unloaded resistor), so NaN, not 0, marks a value as missing.

func (*Component) ToCsv

func (c *Component) ToCsv() string

type Design

type Design struct {
	Components []*Component
	Mission    *Mission
}

func NewDesign

func NewDesign() *Design

type Mission

type Mission struct {
	Ttotal float64 // Total mission duration
	Phases []*Phase
}

func NewMission

func NewMission() *Mission

func (*Mission) FromCsv

func (mission *Mission) FromCsv(file string) error

func (*Mission) ToCsv

func (m *Mission) ToCsv() string

func (*Mission) ToMD

func (m *Mission) ToMD() string

type Package

type Package struct {
	Name  string
	Npins int
	Tags  []string
	// contains filtered or unexported fields
}

func NewPackage

func NewPackage(name string) *Package

func (*Package) FitBase

func (p *Package) FitBase() (float64, float64, float64, float64)

func (*Package) Rtha

func (p *Package) Rtha(tcSubstrate float64) float64

Rtha returns the default junction-to-ambient thermal resistance of the package in K/W, on a substrate with the given thermal conductivity in W/(m·K): Ctype·Np^-0.58·K for integrated circuit packages (FIDES 2022, p. 119), else the value of the package table (p. 120). It returns -1 if there is none: an IC package without a pin count, QFN (whose formula needs the package area), or a discrete package without a table value.

It takes the name and pin count that NewPackage keeps apart for IC packages (SOIC8: SOIC, 8), and the table row of discrete packages and their equivalents.

type Phase

type Phase struct {
	Name          string
	Duration      float64
	NCycles       int
	CycleDuration float64
	On            bool
	Tamb          float64
	Tdelta        float64
	Tmax          float64
	RH            float64
	Grms          float64

	// 1 = weak,low; 2 = high,strong
	SalinePollution float64

	// 1 = weak,low; 1.5 = moderate; 2 = strong,high
	AmbientPollution float64

	// 1 = weak,low; 2 = moderate, 4 = strong,high
	ZonePollution float64

	// Ingress protection (true = hermetic, sealed)
	IP   bool
	Tags string

	// Application factor
	AppFactor float64
}

Directories

Path Synopsis
cmd
fides command

Jump to

Keyboard shortcuts

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