LTspice 有电位器型号吗?

电器工程 电位器 香料 象征 子电路
2022-01-28 23:09:22

我开始在 LTspice 中为三端电位器设计一个模型,因为没有包括在内,而且它是如此常见的组件。绘制 .asy 符号和雨刷端子,我突然意识到这将比看起来更复杂。各种锥度如何建模?在模拟过程中如何“控制”这种锥度?它至少看起来像一个子电路和库,是有序的。

在我重新发明轮子之前,有人已经这样做了吗?谢谢你。 三端电阻模型,正在建设中

4个回答

......有人已经这样做了吗?

是的,已经有人这样做了。(我相信他的名字是 Helmut Sennewald)。

雅虎 LTSpice 小组有一组工作得很好的电位器。您必须注册一个 Yahoo 帐户并加入该组才能下载它们(顺便说一下,如果您想追求 LTSpice,我强烈建议您这样做,Yahoo 组拥有更大的第三方 LTSpice 模型集合之一)。

相关文件是potentiometer_standard.libpotentiometer_standard.asy,以及其他一些支持文件。

这些模型提供线性、对数和其他模型,以及电位器符号。以下是自述文件的摘录。

pot_lin : ideal linear resistance dependency
pot_pow : ideal power function resistance dependency
pot_plog : ideal positive logarithm function resistance dependency
pot_nlog : ideal negative logarithm function resistance dependency
potr_tab: arbitrary(table) based resistance dependency
pot_piher_plog : pseudo logarithm function resistance dependency, Piher
pot_radiohm_plog : measured pseudo logarithm fucntion resistance dependency, Radiohm

在模拟过程中如何“控制”这个锥度?

这些罐子有一个wiper属性,可以很容易地参数化为常规的 LTSpice 参数。例如,您可能会说wiper={GAIN},然后添加一个指令,例如.step param GAIN 0 1.0 0.25.

试图遵循上面的建议,但我花了很长时间来创建一个看起来像电位器并且可以从主原理图中实例化的电位器。所以,为了任何像我一样愚蠢的人的利益......

只需将这 3 个文件复制到 LTspice 搜索路径中的目录(删除每一行中的任何初始空格)。希望这些名称是不言自明的。

potentiometer_test.asc

    Version 4
    SHEET 1 880 680
    WIRE 272 48 0 48
    WIRE 528 48 272 48
    WIRE 272 80 272 48
    WIRE 528 80 528 48
    WIRE 0 96 0 48
    WIRE 0 192 0 176
    WIRE 272 208 272 176
    WIRE 528 208 528 176
    FLAG 272 208 0
    FLAG 0 192 0
    FLAG 320 128 out1
    FLAG 528 208 0
    FLAG 576 128 out2
    SYMBOL voltage 0 80 R0
    SYMATTR InstName V1
    SYMATTR Value 10
    SYMBOL potentiometer 272 176 M0
    SYMATTR InstName U1
    SYMATTR SpiceLine2 wiper=0.2
    SYMBOL potentiometer 528 176 M0
    SYMATTR InstName U2
    SYMATTR SpiceLine R=1
    SYMATTR SpiceLine2 wiper=0.8
    TEXT 140 228 Left 2 !.op

电位器.asy

    Version 4
    SymbolType BLOCK
    LINE Normal 16 -31 -15 -16
    LINE Normal -16 -48 16 -31
    LINE Normal 16 -64 -16 -48
    LINE Normal 1 -9 -15 -16
    LINE Normal 1 0 1 -9
    LINE Normal 1 -94 1 -87
    LINE Normal -24 -56 -16 -48
    LINE Normal -24 -40 -15 -48
    LINE Normal -47 -48 -15 -48
    LINE Normal -16 -80 16 -64
    LINE Normal 1 -87 -16 -80
    WINDOW 0 30 -90 Left 2
    WINDOW 39 30 -50 Left 2
    WINDOW 40 31 -23 Left 2
    SYMATTR Prefix X
    SYMATTR ModelFile potentiometer.lib
    SYMATTR SpiceLine R=1k
    SYMATTR SpiceLine2 wiper=0.5
    SYMATTR Value2 potentiometer
    PIN 0 -96 NONE 8
    PINATTR PinName 1
    PINATTR SpiceOrder 1
    PIN 0 0 NONE 8
    PINATTR PinName 2
    PINATTR SpiceOrder 2
    PIN -48 -48 NONE 8
    PINATTR PinName 3
    PINATTR SpiceOrder 3

电位器.lib

    * This is the potentiometer
    *      _____
    *  1--|_____|--2
    *        |
    *        3
    *
    .SUBCKT potentiometer 1 2 3
    .param w=limit(wiper,1m,.999)
    R0 1 3 {R*(1-w)}
    R1 3 2 {R*(w)}
    .ENDS

谷歌LTSpice电位器,有很多复杂程度不同的例子。大多数使用沿着这些线路的子电路:

* This is the potentiometer
*      _____
*  1--|_____|--2
*        |
*        3
*
.SUBCKT potentiometer 1 2 3
.param w=limit(wiper,1m,.999)
R0 1 3 {Rtot*(1-w)}
R1 3 2 {Rtot*(w)}
.ENDS

要改变参数(例如组件值),可以使用 .step 命令进行参数扫描。如果您只需要一个两端可变电阻,则可以为此使用普通电阻。如果您需要三个终端,史蒂夫的回答似乎是一个不错的选择。