赞
踩
import numpy as np import scipy as sp import matplotlib.pyplot as plt import matplotlib.pylab as plb # # 三相对称电压公式: # Ua = Vm*cos(ωt) # Ub = Vm*cos(ωt - 2/3*π) # Uc = Vm*cos(ωt + 2/3*π) # Ua/Ub/Uc相位差120°, Vm幅度,ω角频率,t周期 # 频率f = 1 / T # 周期T = 1 / f # 角频率ω = 2π * f = 2π / T Vm = 220 fHz=50 T=1/fHz Tn = 5 #显示n个周期的波形 t = np.linspace(0, T*Tn, 360*Tn) Ua = Vm * np.cos((2*np.pi*fHz) * t) Ub = Vm * np.cos((2*np.pi*fHz) * t - (2/3)*np.pi) Uc = Vm * np.cos((2*np.pi*fHz) * t + (2/3)*np.pi) plt.plot(t, Ua, label='Ua') plt.plot(t, Ub, label='Ub') plt.plot(t, Uc, label='Uc') plt.xlabel('Period/S') plt.ylabel('Voltage/V') plt.legend() plt.grid() plt.show()
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。