State Space Analysis
Python Code:-
import numpy as np
import scipy as sp
import math
import matplotlib.pyplot as plot
'''------------Pankaj Aswal-------------
Induction Motor
*---------*State space Anaysis*----------
---------------------------------------
'''
pi= math.pi
th = 0
n_1 = 2
n_2 = 3
K_0 = 0.5
K_t = (n_1)/(n_2)
a = (K_t) * np.array([[[math.cos(th), math.cos(th - (2*pi)/3), math.cos(th - (4*pi)/3)],[math.sin(-th), math.sin(-th + (2*pi)/3),math.sin(-th + (4*pi)/3)],[K_0, K_0 , K_0]]])
b = (K_t) * np.array([[[0,0,1],[0,1,0],[1,0,0]]])
x = np.rad2deg(a,b)
print(x)
i_r = (x[0])*2*pi
print("i_r: ", i_r)
i_b = (x[0])*2*pi*(1/3)
print("i_b: ", i_b)
i_y = (x[0])*2*pi*(2/3)
print("i_y: ", i_y)
origin = [0],[0]
plot.quiver(i_r[:,1],i_b[:,0],i_y[:,-1],color=['r','b','g'])
plot.show()
Output
1.>>>
============= RESTART: D:/Desktop/Python(TUT)/InductionMotor.py =============
[[[ 38.19718634 -19.09859317 -19.09859317]
[ 0. 33.07973373 -33.07973373]
[ 19.09859317 19.09859317 19.09859317]]]
i_r: [[ 240. -120. -120. ]
[ 0. 207.84609691 -207.84609691]
[ 120. 120. 120. ]]
i_b: [[ 80. -40. -40. ]
[ 0. 69.2820323 -69.2820323]
[ 40. 40. 40. ]]
i_y: [[ 160. -80. -80. ]
[ 0. 138.56406461 -138.56406461]
[ 80. 80. 80. ]]
2.Scope