Learn R Programming

mistat (version 2.0.4)

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)

Value

A data frame, a matrix-like structure, with each * n rows and with columns:

rsAnumericvalue of rsA
rsBnumericvalue of rsB
rsCnumericvalue of rsC
rsDnumericvalue of rsD
rsEnumericvalue of rsE
rsFnumericvalue of rsF
rsGnumericvalue of rsG
rsHnumericvalue of rsH
rsInumericvalue of rsI
rsJnumericvalue of rsJ
trKnumericvalue of trK
trLnumericvalue of trL
trMnumericvalue of trM
tlAnumericvalue of tlA
tlBnumericvalue of tlB
tlCnumericvalue of tlC
tlDnumericvalue of tlD
tlEnumericvalue of tlE
tlFnumericvalue of tlF
tlGnumericvalue of tlG
tlHnumericvalue of tlH
tlInumericvalue of tlI
tlJnumericvalue of tlJ
tlKnumericvalue of tlK
tlLnumericvalue of tlL
tlMnumericvalue of tlM
voltsnumericoutput in volts (\(V\))

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.

Author

Daniele Amberti

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