Z3Py online是一款非常强大的工具,用于确定给定MOSFET放大器的直流工作点。旨在说明我们将考虑以下电路
MOSFET放大器的参数为:
k = 1.25 * 10 ^( - 4),V_T = 1.5,R_D = 10 ^ 4,V = 15
要确定DC工作点,我们使用以下Z3Py代码:
I_D, k, V_GS, V_T, V_DS, V, R_D = Reals('I_D k V_GS V_T V_DS V R_D')
equations = [
I_D == k * (V_GS - V_T)**2, V_GS == V_DS,
V_DS == V - R_D * I_D,
]
print "MOSFET equations:"
print equations
problem = [
k == 1.25*10**(-4),
V_T == 1.5,
R_D == 10**4,
V == 15, V_GS > V_T
]
print "Problem:"
print problem
print "Solution:"
solve(equations + problem)
在线使用此代码,我们获得以下输出
MOSFET equations:
[I_D = k·(V_GS - V_T)2, V_GS = V_DS, V_DS = V - R_D·I_D]
Problem:
[k = 1/8000, V_T = 3/2, R_D = 10000, V = 15, V_GS > V_T]
Solution:
[I_D = 0.0010589410?,
V = 15,
R_D = 10000,
V_T = 3/2,
k = 1/8000,
V_GS = 4.4105890714?,
V_DS = 4.4105890714?]
它也可以在线试用here。
正如我们所看到的,Z3PY能够以非常紧凑和高效的形式计算出正确的解决方案I_D,V_GS和V_DS。
其他例子
使用以下代码解决此问题
I_D, k, V_GS = Reals('I_D k V_GS')
V_T, V_I, R_S = Reals('V_T V_I R_S')
V_O, V_DD, R_L = Reals('V_O V_DD R_L')
equations = [
I_D == (k/2) * (V_GS - V_T)**2, V_I == V_GS + R_S * I_D,
V_O == V_DD - R_L * I_D,
]
print "MOSFET equations:"
print equations
problem = [
k == 2,
V_T == 2,
V_DD == 145,
V_I == 6.5, R_S == 22, R_L ==82, V_GS > V_T
]
print "Problem:"
print problem
print "Solution:"
solve(equations + problem)
problem1 = [
k == 2,
V_T == 2,
V_DD == 145,
V_I == 6.5 + 1, R_S == 22, R_L ==82, V_GS > V_T
]
print "Problem 1"
print problem1
print "Solution 1:"
solve(equations + problem1)
problem2 = [
k == 2,
V_T == 2,
V_DD == 145,
V_I == 6.5 + 10**(-3), R_S == 22, R_L ==82, V_GS > V_T
]
print "Problem 2"
print problem2
print "Solution 2:"
solve(equations + problem2)
在线使用此代码,我们获得以下输出
MOSFET equations:
[I_D = (k/2)·(V_GS - V_T)2, V_I = V_GS + R_S·I_D, V_O = V_DD - R_L·I_D]
Problem:
[k = 2, V_T = 2, V_DD = 145, V_I = 13/2, R_S = 22, R_L = 82, V_GS > V_T]
Solution:
[I_D = 0.1849949805?,
R_L = 82,
R_S = 22,
V_I = 13/2,
V_DD = 145,
V_T = 2,
k = 2,
V_O = 129.8304115963?,
V_GS = 2.4301104282?]
Problem 1
[k = 2, V_T = 2, V_DD = 145, V_I = 15/2, R_S = 22, R_L = 82, V_GS > V_T]
Solution 1:
[I_D = 0.2282823186?,
R_L = 82,
R_S = 22,
V_I = 15/2,
V_DD = 145,
V_T = 2,
k = 2,
V_O = 126.2808498705?,
V_GS = 2.4777889896?]
Problem 2
[k = 2, V_T = 2, V_DD = 145, V_I = 6501/1000, R_S = 22, R_L = 82, V_GS > V_T]
Solution 2:
[I_D = 0.1850381539?,
R_L = 82,
R_S = 22,
V_I = 6501/1000,
V_DD = 145,
V_T = 2,
k = 2,
V_O = 129.8268713797?,
V_GS = 2.4301606140?]
它也可以在线试用here。
其他例子
使用以下代码解决此问题
I_D, k, V_GS = Reals('I_D k V_GS')
V_T, V_EQ, R_S = Reals('V_T V_EQ R_S')
V_DS, V_DD, R_D = Reals('V_DS V_DD R_D')
equations = [
I_D == (k/2) * (V_GS - V_T)**2, V_EQ == V_GS + R_S * I_D,
V_DS == V_DD - (R_D + R_S )* I_D,
]
print "MOSFET equations:"
print equations
problem = [
k == 25*10**(-6),
V_T == 1,
V_DD == 10,
V_EQ == 4, R_S == 39*10**3, R_D == 75*10**3, V_GS > V_T
]
print "Problem:"
print problem
print "Solution:"
solve(equations + problem)
在线使用此代码,我们获得以下输出
MOSFET equations:
[I_D = (k/2)·(V_GS - V_T)2, V_EQ = V_GS + R_S·I_D, V_DS = V_DD - (R_D + R_S)·I_D]
Problem:
[k = 1/40000, V_T = 1, V_DD = 10, V_EQ = 4, R_S = 39000, R_D = 75000, V_GS > V_T]
Solution:
[I_D = 0.0000343918?,
R_D = 75000,
R_S = 39000,
V_EQ = 4,
V_DD = 10,
V_T = 1,
k = 1/40000,
V_DS = 6.0793307846?,
V_GS = 2.6587184263?]
它也可以在线试用here。
其他例子:
使用以下代码解决此问题
I_D, k, V_GS = Reals('I_D k V_GS')
V_T = Real('V_T')
R_D = Real('R_D')
V_DS, V_DD = Reals('V_DS V_DD')
equations = [
I_D == (k) * (V_GS - V_T - (V_DS) /2)*V_DS, V_DD == V_GS,
V_DS == V_DD - (R_D)* I_D,
]
print "MOSFET equations:"
print equations
problem = [
k == 250*10**(-6),
V_T == 1,
V_DD == 4,
R_D == 1600, V_DS < V_GS - V_T
]
print "Problem:"
print problem
print "Solution:"
solve(equations + problem)
在线使用此代码,我们获得以下输出
MOSFET equations:
[I_D = k·(V_GS - V_T - V_DS/2)·V_DS, V_DD = V_GS, V_DS = V_DD - R_D·I_D]
Problem:
[k = 1/4000, V_T = 1, V_DD = 4, R_D = 1600, V_DS < V_GS - V_T]
Solution:
[I_D = 0.0010634763?,
R_D = 1600,
V_DD = 4,
V_T = 1,
k = 1/4000,
V_GS = 4,
V_DS = 2.2984378812?]
它也可以在线试用here。
请告诉我您对此有何看法,以及您是否知道这类问题的更有效代码。很多thnaks。