In [1]:
import numpy as np
import sympy as sy
from sympy import I, exp
In [2]:
z = sy.symbols("z", real=False)
a,h,r1,s0,s1 = sy.symbols("a,h,r1,s0,s1")
In [3]:
pd = 0.76*np.exp(1j*0.28)
print np.conjugate(pd)
A2ndorder = (z-pd)*(z-np.conjugate(pd))
print sy.collect(sy.simplify(sy.expand(A2ndorder)), z)
Acl = A2ndorder*(z-a)
print sy.collect(sy.simplify(sy.expand(Acl)), z)
In [4]:
Acp = sy.poly(Acl, z)
Ap = sy.poly((z-1)*(z-0.76), z)
Bp = sy.poly(-.10*z + 0.14, z)
Rp = sy.poly(z+r1, z)
Sp = sy.poly(s0*z + s1, z)
dioph=(Ap*Rp+Bp*Sp-Acp).all_coeffs()
In [8]:
sol=sy.solve(dioph, (r1,s0,s1))
print sol[r1]
sol[r1]-1.76-0.10*sol[s1]
Out[8]:
In [ ]:
In [5]:
np.exp(-0.15)
Out[5]:
In [7]:
argp=np.sqrt(3)*0.15
argp*180/np.pi
Out[7]:
In [8]:
0.4/(2*np.sqrt(2))
Out[8]:
In [9]:
np.exp(-0.28)
Out[9]:
In [10]:
0.28*180.0/np.pi
Out[10]:
In [14]:
hh=0.14
-1+hh+np.exp(-2*hh)
Out[14]:
In [15]:
1-(1+hh)*np.exp(-2*hh)
Out[15]:
In [16]:
np.exp(-2*hh)
Out[16]:
In [ ]:
sy.expand()