Park变换

Park变换的目的是将Clark变换后的αβ坐标系转换成d,q旋转坐标系。d轴方向与转子磁链方向重合,所以d轴也叫直轴。q轴方向与转子磁链方向垂直,所以q轴又叫交轴。

旋转矩阵是什么?

⊿abo:

$ob = oa\times \cos(\theta)$

已知:bc = ad

$$ \because \angle pad + \angle pab = 90°\\ \angle oab + \angle pab = 90°\\ \therefore \angle oab = \angle pad\\ \angle aob = \angle apd = \angle \theta $$

⊿adp:

$ad = ap \times \sin(\theta)$

$$ \because oc = ob + bc \\ \therefore oc = oa \times \cos(\theta) + ap \times \sin(\theta) $$

所以向量p到d轴的投影为:$oa \times \cos(\theta) + ap \times \sin(\theta)$

⊿efo:

$of =oe \times cos(\theta)$

$$ \because \angle peh + \angle oeh = 90°\\ \angle oef + \angle oeh = 90°\\ \therefore \angle peh = \angle oef $$

已知:fg = eh

⊿eph:

$eh = ep \times sin(\theta)$

所以:$fg = ep \times sin(\theta)$

$$ \because og = of - fg \\ \therefore og = oe \times cos(\theta) - ep \times \sin(\theta) $$

所以向量p到q轴的投影为:$oe \times cos(\theta) - ep \times \sin(\theta)$

设向量p在αβ坐标系的坐标:$oa = ep = i\alpha,oe = ap = i\beta$

可以得到旋转矩阵:

$$ \left[ \begin{matrix} id \\ iq \end{matrix} \right] \left[ \begin{matrix} \cos(\theta) & \sin(\theta) \\ -\sin(\theta) & \cos(\theta) \end{matrix} \right] \left[ \begin{matrix} i\alpha \\ i\beta \end{matrix} \right] $$

测试

plt.figure(figsize=(10, 3))

def U(m, e):
    return (m * np.cos(e), m * np.cos(e + 2 * np.pi / 3), m * np.cos(e - 2 * np.pi / 3))

def Clark(a, b, c):
    return (2/3)*(np.mat([[1, -1/2, -1/2], [0, np.sqrt(3)/2, -np.sqrt(3)/2]]) * np.mat([a, b, c]))

def Park(ia, ib, theta):
    return np.mat([[np.cos(theta), np.sin(theta)], [-np.sin(theta), np.cos(theta)]]) * np.array([ia, ib])

theta = np.arange(0, 6 * np.pi, 0.1)

m = 1

(a, b, c) = U(m, np.pi / 4.0)

td = Clark(np.array([a]),np.array([b]),np.array([c]))
td = Park(td[0].tolist()[0],td[1].tolist()[0], np.pi)

d = []
q = []

for t in theta:
    pd = Park(td[0].tolist()[0],td[1].tolist()[0], t).tolist()
    d.append(pd[0][0])
    q.append(pd[1][0])

plt.plot(theta, d, label="d")
plt.plot(theta, q, label="q")

plt.xlabel="x"
plt.ylabel="y"
plt.title('Park')
plt.legend()
plt.show()