サイトマップ

回路の素101 011 エミッタ・フォロワ

回路の素101 011 エミッタ・フォロワ

オペアンプより高い周波数の出力が可能

回路図作成

  • 基本的な構成

入力のハイパスフィルタのカットオフ周波数は下記になる
 f_c = \frac{1}{2 \pi C_1 R},  R = \frac{R_1 R_2}{R_1 + R_2}
この回路の場合、120Hzほど

応答性確認

シミュレーションを tranモード(デフォルト) で実行し、応答を見る

import matplotlib.pyplot as plt
import numpy as np

from PyLTSpice import RawRead

fig = plt.figure(figsize=(6, 3))
ax1 = fig.add_subplot(1, 1, 1)

fname = 'PrimaryCircuit1-011.raw'
LTR = RawRead(fname)
x     = LTR.get_trace('time').get_time_axis(0)

tmp1  = LTR.get_trace('V(vin+)').get_wave(0)
ax1.plot(x * 1000, tmp1, label='Vin+')
tmp1  = LTR.get_trace('V(vout)').get_wave(0)
ax1.plot(x * 1000, tmp1, label='Vout')

ax1.legend(); ax1.grid()
ax1.set_xlabel('[ms]'); ax1.set_ylabel('[V]')

fig.tight_layout()

fig.savefig('PrimaryCircuit1-011_Graph1.png')

入力がそのまま出力されている

周波数特性

from PyLTSpice import SimCommander

fname = 'PrimaryCircuit1-011'
LTC = SimCommander(fname + '.asc')
!more +1 PrimaryCircuit1-011.net
Vp +Vcc 0 5
RLoad Vout 0 10k
V1 Vin+ 0 SINE(0 0.5 1k) AC 1
R1 N001 +Vcc 22k
R2 0 N001 33k
R3 0 N002 2.4k
XU1 +Vcc N001 N002 2SC2712
C1 N001 Vin+ 0.1u
C2 Vout N002 10u
.tran 0 5m 0 0.1u
;ac oct 40 100 100Meg
.lib 2SC2712.mod
.backanno
.end

Vin+(V1) に AC 1の設定がついているので、シミュレーションモードをacにすれば良い

from PyLTSpice import SimCommander

fname = 'PrimaryCircuit1-011'
fname_tmp = '_ac'
LTC = SimCommander(fname + '.asc')

line_no = LTC._get_line_starting_with('.tran')
sim_cmd = LTC.netlist[line_no]
LTC.netlist[line_no] = sim_cmd.replace('.tran', ';tran')
line_no = LTC._get_line_starting_with(';ac')
sim_cmd = LTC.netlist[line_no]
LTC.netlist[line_no] = sim_cmd.replace(';ac', '.ac')
print(LTC.netlist[line_no], end='')  # 確認

# 編集したnetlistの情報でバッチ処理を実行する
run_net_file = fname + fname_tmp + '.net'
LTC.run(run_filename=run_net_file)
LTC.wait_completion()
.ac oct 40 100 100Meg
True
from PyLTSpice import RawRead

fig = plt.figure(figsize=(6, 4))
ax1 = fig.add_subplot(2, 1, 1)
ax2 = fig.add_subplot(2, 1, 2, sharex=ax1)

fname = 'PrimaryCircuit1-011'
fname_tmp = '_ac'
LTR = RawRead(fname + fname_tmp + '.raw')

freq  = np.abs(LTR.get_trace('frequency').get_wave(0))
Vout  = LTR.get_trace("V(vout)").get_wave(0)
ax1.plot(freq, 20*np.log10(np.abs(Vout)))
ax2.plot(freq, np.angle(Vout) / np.pi * 180)

ax1.grid()
ax1.set_xlabel("[Hz]"); ax1.set_ylabel("Gain[dB]")
ax1.set_xscale('log')
ax1.set_ylim(-50, 5)

ax2.grid()
ax2.set_xlabel("[Hz]"); ax2.set_ylabel("Phase[deg]")
ax2.set_xscale('log')

fig.tight_layout()

fig.savefig('PrimaryCircuit1-011_Graph2.png')

120Hzでハイパスフィルタが設定されている
高域の性能はトランジスタで決まるが、今回の場合100MHzまでで影響は見えていない

吸い込み方向の制限

この回路では、吸い込み方向の電流に制限がかかる
負荷の抵抗値を300Ωに下げて、電流値を大きくして波形の変化をみる

from PyLTSpice import SimCommander

fname = 'PrimaryCircuit1-011'
fname_tmp = '_R300'
LTC = SimCommander(fname + '.asc')

line_no = LTC._get_line_starting_with('RLoad')
sim_cmd = LTC.netlist[line_no]
LTC.netlist[line_no] = sim_cmd.replace('10k', '300')
print(LTC.netlist[line_no], end='')  # 確認

# 編集したnetlistの情報でバッチ処理を実行する
run_net_file = fname + fname_tmp + '.net'
LTC.run(run_filename=run_net_file)
LTC.wait_completion()
RLoad Vout 0 300
True
from PyLTSpice import RawRead

fig = plt.figure(figsize=(6, 3))
ax1 = fig.add_subplot(1, 1, 1)

fname = 'PrimaryCircuit1-011'
fname_tmp = '_R300'
LTR = RawRead(fname + fname_tmp + '.raw')
x     = LTR.get_trace('time').get_time_axis(0)

tmp1  = LTR.get_trace('V(vin+)').get_wave(0)
ax1.plot(x * 1000, tmp1, label='Vin+')
tmp1  = LTR.get_trace('V(vout)').get_wave(0)
ax1.plot(x * 1000, tmp1, label='Vout')

ax1.legend(); ax1.grid()
ax1.set_xlabel('[ms]'); ax1.set_ylabel('[V]')

fig.tight_layout()

fig.savefig('PrimaryCircuit1-011_Graph3.png')

負側の出力が出せていない

改良された回路

NPNとPNPのトランジスタで、プッシュプル・エミッタ・フォロワを作成

動作確認

import matplotlib.pyplot as plt
import numpy as np

from PyLTSpice import RawRead

fig = plt.figure(figsize=(6, 3))
ax1 = fig.add_subplot(1, 1, 1)

fname = 'PrimaryCircuit1-011-2.raw'
LTR = RawRead(fname)
x     = LTR.get_trace('time').get_time_axis(0)

tmp1  = LTR.get_trace('V(vin+)').get_wave(0)
ax1.plot(x * 1000, tmp1, label='Vin+')
tmp1  = LTR.get_trace('V(vout)').get_wave(0)
ax1.plot(x * 1000, tmp1, label='Vout')

ax1.legend(); ax1.grid()
ax1.set_xlabel('[ms]'); ax1.set_ylabel('[V]')

fig.tight_layout()

fig.savefig('PrimaryCircuit1-011_Graph4.png')

300Ω負荷でも正常に動いている

周波数特性

from PyLTSpice import SimCommander

fname = 'PrimaryCircuit1-011-2'
fname_tmp = '_ac'
LTC = SimCommander(fname + '.asc')

line_no = LTC._get_line_starting_with('.tran')
sim_cmd = LTC.netlist[line_no]
LTC.netlist[line_no] = sim_cmd.replace('.tran', ';tran')
line_no = LTC._get_line_starting_with(';ac')
sim_cmd = LTC.netlist[line_no]
LTC.netlist[line_no] = sim_cmd.replace(';ac', '.ac')
print(LTC.netlist[line_no], end='')  # 確認

# 編集したnetlistの情報でバッチ処理を実行する
run_net_file = fname + fname_tmp + '.net'
LTC.run(run_filename=run_net_file)
LTC.wait_completion()
.ac oct 40 10 100Meg
True
from PyLTSpice import RawRead

fig = plt.figure(figsize=(6, 4))
ax1 = fig.add_subplot(2, 1, 1)
ax2 = fig.add_subplot(2, 1, 2, sharex=ax1)

fname = 'PrimaryCircuit1-011-2'
fname_tmp = '_ac'
LTR = RawRead(fname + fname_tmp + '.raw')

freq  = np.abs(LTR.get_trace('frequency').get_wave(0))
Vout  = LTR.get_trace("V(vout)").get_wave(0)
ax1.plot(freq, 20*np.log10(np.abs(Vout)))
ax2.plot(freq, np.angle(Vout) / np.pi * 180)

ax1.grid()
ax1.set_xlabel("[Hz]"); ax1.set_ylabel("Gain[dB]")
ax1.set_xscale('log')
ax1.set_ylim(-50, 5)

ax2.grid()
ax2.set_xlabel("[Hz]"); ax2.set_ylabel("Phase[deg]")
ax2.set_xscale('log')

fig.tight_layout()

fig.savefig('PrimaryCircuit1-011_Graph5.png')

入力のハイパスフィルタのカットオフ周波数はさきほどと同じで、
 f_c = \frac{1}{2 \pi C_1 R},  R = \frac{R_1 R_2}{R_1 + R_2}
この回路の場合、9.6Hzほど

参考文献

この記事は以下の書籍を参考にしましたが、
私の拙い知識で書いておりますので、誤り等ありましたらご指摘ください