Learn R Programming

mistat (version 0.999)

powerCircuitSimulation: The Power Circuit Simulator

Description

A simulator of a voltage conversion power circuit. The target output voltage of the power circuit is 220 volts DC. The circuit consists of 10 resistances labeled A to J, and 3 transistors, labeled K to M. These components can be purchased with different tolerance grades.

Usage

powerCircuitSimulation(rsA = 8200, rsB = 220000, rsC = 1000, 
                       rsD = 33000, rsE = 56000, rsF = 5600, 
                       rsG = 3300, rsH = 58.5, rsI = 1000, 
                       rsJ = 120, trK = 130, trL = 100, 
                       trM = 130, 
                       tlA = 5, tlB = 10, tlC = 10, 
                       tlD = 5, tlE = 5, tlF = 5, 
                       tlG = 10, tlH = 5, tlI = 5, 
                       tlJ = 5, tlK = 5, tlL = 10, 
                       tlM = 5, 
                       each = 50, seed = NA)

Arguments

rsA
the resistance ($\Omega$) of A. A single value or a vector of length n.
rsB
the resistance ($\Omega$) of B. A single value or a vector of length n.
rsC
the resistance ($\Omega$) of C. A single value or a vector of length n.
rsD
the resistance ($\Omega$) of D. A single value or a vector of length n.
rsE
the resistance ($\Omega$) of E. A single value or a vector of length n.
rsF
the resistance ($\Omega$) of F. A single value or a vector of length n.
rsG
the resistance ($\Omega$) of G. A single value or a vector of length n.
rsH
the resistance ($\Omega$) of H. A single value or a vector of length n.
rsI
the resistance ($\Omega$) of I. A single value or a vector of length n.
rsJ
the resistance ($\Omega$) of J. A single value or a vector of length n.
trK
the resistance ($\Omega$) of K. A single value or a vector of length n.
trL
the resistance ($\Omega$) of L. A single value or a vector of length n.
trM
the resistance ($\Omega$) of M. A single value or a vector of length n.
tlA
the tolerance of A. It is a number > 0 (e.g. 5% is 5.0)
tlB
the tolerance of B. It is a number > 0 (e.g. 5% is 5.0)
tlC
the tolerance of C. It is a number > 0 (e.g. 5% is 5.0)
tlD
the tolerance of D. It is a number > 0 (e.g. 5% is 5.0)
tlE
the tolerance of E. It is a number > 0 (e.g. 5% is 5.0)
tlF
the tolerance of F. It is a number > 0 (e.g. 5% is 5.0)
tlG
the tolerance of G. It is a number > 0 (e.g. 5% is 5.0)
tlH
the tolerance of H. It is a number > 0 (e.g. 5% is 5.0)
tlI
the tolerance of I. It is a number > 0 (e.g. 5% is 5.0)
tlJ
the tolerance of J. It is a number > 0 (e.g. 5% is 5.0)
tlK
the tolerance of K. It is a number > 0 (e.g. 5% is 5.0)
tlL
the tolerance of L. It is a number > 0 (e.g. 5% is 5.0)
tlM
the tolerance of M. It is a number > 0 (e.g. 5% is 5.0)
each
non-negative integer. Each element of previous parameters is repeated each times.
seed
a single value, interpreted as an integer. If specified make the simulation replicable.

Value

  • A data frame, a matrix-like structure, with each * n rows and with columns: lll{ rsA numeric value of rsA rsB numeric value of rsB rsC numeric value of rsC rsD numeric value of rsD rsE numeric value of rsE rsF numeric value of rsF rsG numeric value of rsG rsH numeric value of rsH rsI numeric value of rsI rsJ numeric value of rsJ trK numeric value of trK trL numeric value of trL trM numeric value of trM tlA numeric value of tlA tlB numeric value of tlB tlC numeric value of tlC tlD numeric value of tlD tlE numeric value of tlE tlF numeric value of tlF tlG numeric value of tlG tlH numeric value of tlH tlI numeric value of tlI tlJ numeric value of tlJ tlK numeric value of tlK tlL numeric value of tlL tlM numeric value of tlM volts numeric output in volts ($V$) }

Details

Factors affect the voltage output $V$ via a chain of nonlinear equations: $$V = \frac{136.67(a+\frac{b}{Z(10)})+d(c+e)\frac{g}{f}-h}{1+d\frac{e}{f}+b[frac{1}{Z(10)+0.006(1+\frac{13.67}{Z(10)})]+0.08202a}}$$ where $$a = \frac{Z(2)}{Z(1)+Z(2)}$$ $$b=\frac{1}{Z(12)+Z(13)}(Z(3)+\frac{Z(1)Z(2)}{Z(1)+Z(2)})+Z(9)$$ $$c=Z(5)+Z(7)/2$$ $$d=Z(11)\frac{Z(1)Z(2)}{Z(1)+Z(2)}$$ $$e=Z(6)+Z(7)/2$$ $$f=(c+e)(1+Z(11))Z(8)+ce$$ $$g=0.6+Z(8)$$ $$h=1.2$$ with $Z(1),\ldots,Z(10)$ resistances in $\Omega$ of the 10 resistances and $Z(11),Z(12),Z(13)$ are the $h_{FE}$ values of three transistors.

References

Kenett, R., Zacks, S. with contributions by Amberti, D. Modern Industrial Statistics: with applications in R, MINITAB and JMP. Wiley.

See Also

pistonSimulation, simulationGroup

Examples

Run this code
powerCircuitSimulation(seed=123, each=3)

Run the code above in your browser using DataLab