LTspice(14)构建IND901模型(1)
本帖最后由 xutang 于 2023-4-17 23:01 编辑#申请原创# 首先我们要构建一个放大倍数等于1的东西,输入等于多少输出等于多少。在LTspice help 如图1所示。选择LTspice Simulator图1:LTspicehelp图2:LTspiceSimulator 在图2里面选择 Circuit Elements,他会给你展示一些基本的元件,这基本都是SPICE通用的,有些可能不是通用的,建议去看下标准的SPICE支持哪些开头的,在这里我们选择电压敏感电压源(voltage dependent voltage),他的描述如下所示。
E. VoltageDependent Voltage SourceSymbolNames: E, E2
There arethree types of voltage-dependent voltage-source circuit elements.
Syntax:Exxx n+ n- nc+ nc- <gain>
Thiscircuit element asserts an output voltage between the nodes n+ and n- thatdepends on the input voltage between nodes nc+ and nc-. This is a linearlydependent source specified solely by a constant gain.
Syntax:Exxx n+ n- nc+ nc- table=(<value pair>, <value pair>, ...)
A look-uptable is used to specify the transfer function. The table is a list of pairsof numbers. The second value of the pair is the output voltage when thecontrol voltage is equal to the first value of that pair. The output islinearly interpolated when the control voltage is between specified points.If the control voltage is beyond the range of the look-up table, the outputvoltage is extrapolated as a constant voltage of the last point of the look-uptable.
Syntax:Exxx n+ n- nc+ nc- Laplace=<func(s)>
+
Thetransfer function of this circuit element is specified by its Laplacetransform. The Laplace transform must be a function of s. The frequencyresponse at frequency f is found by substituting s with sqrt(-1)*2*pi*f. Thetime domain behavior is found from the impulse response found from theFourier transform of the frequency domain response. LTspice must guess anappropriate frequency range and resolution. The response must drop at highfrequencies or an error is reported. It is recommended that LTspice first beallowed to make a guess at this and then check the accuracy by reducingreltol or explicitly setting nfft and the window. The reciprocal of the valueof the window is the frequency resolution. The value of nfft times thisresolution is the highest frequency considered. The Boolean XOR operator,"^" is understood to mean exponentiation "**" when usedin a Laplace expression.
Syntax:Exxx n+ n- value={<expression>}
This is an alternative syntax of the behavioral source, arbitrary behavioralvoltage source, B.
Syntax:Exxx n+ n- POLY(<N>) <(node1+,node1-) (node2+,node2-)+ ...(nodeN+,nodeN-)> <c0 c1 c2 c3 c4 ...>
This is anarchaic means of arbitrary behavioral modeling with a polynomial. It isuseful for running legacy opamp models.
Note: It isbetter to use a G source shunted with a resistance to approximate an E sourcethan to use an E source. A voltage controlled current source shunted with aresistance will compute faster and cause fewer convergence problems than avoltage controlled voltage source. Also, the resultant nonzero outputimpedance is more representative of a practical circuit.
大概就是n+和n-的输出来自nc+和nc-的输入电压✖️上gain。大概选定元件以后可以使用subckt构建一个子电路模块,在LTspice中他给出了例子,如下所示
.SUBCKT --Define a SubcircuitAs an aidto defining a circuit, repetitive circuitry can be enclosed in a subcircuitdefinition and used as multiple instances in the same circuit. Before thesimulation runs, the circuit is expanded to a flat netlist by replacing eachinvocation of a subcircuit with the circuit elements in the subcircuitdefinition. There is no limit on the size or complexity of subcircuits.
The end ofa subcircuit definition must be a .ends directive.
Here is anexample using a subcircuit:
*
* This is the circuit definition
X1 a b 0 divider
V1 a 0 pulse(0 1 0 .5μ .5μ 0 1μ)
* this is the definition of the subcircuit
.subckt divider n1 n2 n3
r1 n1 n2 1k
r2 n2 n3 1k
.ends
.tran 3
.endWhich runsafter expanding to
* Expand X1 into two resistor network
r:1:1 a b 1k
r:1:2 b 0 1k
*
v1 a 0 pulse(0 1 0 .5μ .5μ 0 1μ)
.tran 3μ
.endNote thatunique names based on the subcircuit name and the subcircuit definitionelement names are made for the circuit elements inserted by subcircuitexpansion.
大概意思就是*是注释,在.subckt后面跟随的divider是模块的名称,n1 n2 n3是引出的网络节点名称。根据以上信息咱们就可以构建一个gain=1的子电路模块。 例1:放大倍数=1的subcircuit
*this isIND901 spice model* Device name* | OPA IN-* | |OPA IN+* | | | OPA OUT* | | | |.subckt IND901 IN- IN+OUT REF+ REF-E1 REF+ OUTIN+ IN- 1
.ends
图3:例1仿真结果 非常基本的功能
页:
[1]