主要内容

Spice Netlist的模型线性电路响应

TheLinear Circuit Wizardblock parses a SPICE netlist to model the response of a desired linear circuit such as a custom filter design or a circuit with parasitics. The block supports a limited number of SPICE netlist constructs, specifically conforming to the Berkeley SPICE syntax[1]or the HSPICE syntax[2]. Edit your SPICE netlist so that the desired circuit is described at the top level of the netlist by supported netlist constructs. The block ignores any statements that use unsupported netlist syntaxes.

香料网表可以包含被动元器件,印第安纳州ependent sources, controlled sources, and subcircuits.

如果存在,则独立的来源被解释为输入端口Linear Circuit Wizard堵塞。输入端口的名称是电路元素的指示器,端口类型匹配源类型,节点是源连接的节点。对于每个这样的输入端口,刺激是Simulink金宝app®signal connected to the port, not the description provided by the SPICE netlist.

The output ports are defined by .PRINT or .PLOT statements conforming to the HSPICE syntax. Because the SPICE statements do not supply port names for probed voltages, theLinear Circuit Wizard块为电压输出端口提供默认名称。在用于感测电流的独立电压源之后,当前输出端口命名。网表必须包含支持输出端口所需的所有电路节点和电路元件。金宝app

TheLinear Circuit Wizard块不支持数学函数。金宝app

金宝app支持的Spice语法

通过使用加号(“+”)开始每个延续线可以继续对多行进行陈述。例如,这两个语句是等效的。

E1 2 0 LAPLACE 3 4 6.3E7 / 6.3E4 1
E1 2 0 LAPLACE 3 4 + 6.3E7 / 6.3E4 1

Three forms of comment are supported.

  • 阻止评论。评论块从该行开始#comand ends with the line#endcom. For example:

    #com When you’re lying awake with a dismal headache and repose is taboo’d by anxiety, I conceive you may use any language you choose to indulge in without impropriety. #endcom

  • 线条评论。评论是一个以星号(“*”)开头的行。例如:

    * Gilbert,Iolanthe,Act 2,“爱,单值,抢劫我的休息”,第5行
  • End of line comment. The comment follows a pipe symbol ("|") and is ignored. For example:

    。结尾| That’s all, folks.

标记为“0” is defined as the common return node for the circuit.

Component Syntax 评论
Passive Devices
Resistor

R <+ node> < - node>

Create a resistor with a specific value.
电容器

C <+ node> <- node>

Create a capacitor of a specific value.
Inductor

L <+ node> <- node>

创建特定值的电感。

相互电感

K

在两个电感器之间创建相互电感耦合。

对于每个电感器,正方向上的电流流是从第一节点到创建电感的语句中的第二节点。

电路元件值是互感因子k, where 0 <k< 1.

独立来源
独立电压源 v <+ node> < - node> 在Simulink块中创建输入电压端口。金宝app
Independent current source I <+ node> <- node> 在Simulink块中创建输入当前端口。金宝app
Controlled sources
电压控制电压源

e <+节点> < - node> <+控制节点> < - 控制节点> <增益>

E <+ node> <- node> LAPLACE <+ control node> <- control node> /

创建电压控制电压源。

The gain can be a constant value or a rational transfer function.

SeeLAPLACE Keyword对于传递函数定义。

Current controlled current source

f <+节点> < - node> <电压源名称> <增益>

f <+ node> < - node> laplace <电压源名称> /

创建电流控制的电流源。

The gain can be a constant value or a rational transfer function.

The current through the controlling voltage source determines the output current. The controlling source must be an independent voltage source, although it does not need to have a zero DC value.

SeeLAPLACE Keyword对于传递函数定义。

Voltage controlled current source

g <+节点> < - node> <+控制节点> < - 控制节点> <增益>

G <+ node> <- node> LAPLACE <+ control node> <- control node> /

创建电压控制电流源。

The gain can be a constant value or a rational transfer function.

The current through the controlling voltage source determines the output current. The controlling source must be an independent voltage source, although it does not need to have a zero DC value.

SeeLAPLACE Keyword对于传递函数定义。

Current controlled voltage source
  • H <+ node> <- node>

  • H <+ node> <- node> LAPLACE + /

创建电流控制的电压源。

The gain can be a constant value or a rational transfer function.

SeeLAPLACE Keyword对于传递函数定义。

Subcircuit
Subcircuit x <外部节点名称> <参数列表> Create an instance of a subcircuit. The number of external nodes must equal the number of nodes in the subcircuit definition. Entries in the parameter list take the form = .
命令
.Param. .param = <表达式> Definable parameter
.subckt. .subckt <外部节点名称> <参数列表> Begin the definition of a subcircuit. The number of external nodes is arbitrary. Entries in the parameter list take the form = . Subcircuit definitions can be nested.
。结尾S

。结尾s

.ends

Directive to end a subcircuit definition.
。结尾 。结尾 Directive to end the netlist. Optional command.
.INC .inc[lude] Directive to include contents of an external netlist
.PRINT .print V() | I() 指令定义输出端口。可以在单个语句中定义多个电压和电流输出。端口名称是可选的,但建议使用。
.PLOT .plot V() | I() 指令定义输出端口。可以在单个语句中定义多个电压和电流输出。

LAPLACE Keyword

LAPLACE关键字定义了用于受控电压或电流源的拉普拉斯域传送功能。传递函数由一系列传输功能分子系数定义,从恒定术语到最高功率s,后跟前斜杠('/'),然后是一系列分母系数从恒定术语到最高功率s.

参考

[1]"SPICE Circuit Components." http://bwrcs.eecs.berkeley.edu/Classes/IcBook/SPICE/UserGuide/elements_fr.html.

[2] "HSPICE® User Guide: Simulation and Analysis." https://cseweb.ucsd.edu/classes/wi10/cse241a/assign/hspice_sa.pdf.

See Also

Related Examples

More About