最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to plot multiple transfer functions in Lcapy bode plot? - Stack Overflow

programmeradmin3浏览0评论

I would like to compare the Bode plots of two different implementations of a transfer function. This code works basically:

from lcapy import *

a = Circuit("""
P1 1 0; down=1.5
R1 1 2; right
C1 2 3; right
W 0 5; right
C2 3 5; down
W 3 3a; right=0.75
W 5 5a; right=0.75
R2 3a 5a; down
W 3a 3b; right=0.75
W 5a 5b; right=0.75
P2 3b 5b; down
; draw_nodes=connections, label_nodes=none
""")
H = a.transfer('P1', 'P2')
Hv = H.subs({'R1':22, 'C1':100e-9, 'R2':1e6, 'C2':1e-9})
Hv2 = H.subs({'R1':12, 'C1':100e-9, 'R2':1e6, 'C2':1e-9})
Hv(f).bode_plot((0, 1e3))
Hv2(f).bode_plot((0, 1e3))

But I would like to see the magnitude curves of both transfer functions in the same plot in order to compare them easily. How can this be done?

KR, Ch.

发布评论

评论列表(0)

  1. 暂无评论