Blame view
PM/PM.py
514 Bytes
e5671c297 add RAM sim |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
from sympy import * from sympy.simplify.fu import * init_printing() #constants E0, W, t, m, b= symbols('E0, Omega, t, m, beta', real=True, imaginary=False) #AM+PM E_ampm = E0*(1+m*cos(W*t))*exp(I*(W*t+b*sin(W*t))) I_ampm = abs(E_ampm)**2 I_ampm = expand(TR8(expand(expand_complex(I_ampm)))) #AM E_am = E0*(1+m*cos(W*t))*exp(I*(W*t)) I_am = abs(E_am)**2 I_am = expand(TR8(expand(expand_complex(I_am)))) #PM E_pm = E0*exp(I*(W*t+b*sin(W*t))) I_pm = abs(E_pm)**2 I_pm = expand(TR8(expand(expand_complex(I_pm)))) |