PMSM dqz Voltage, Torque and Dynamic Motion

Control Pads
Horizontal: \(v_d\)    Vertical: \(v_q\)
Locked
\(v_d\)
0.000
\(v_q\)
0.000
Horizontal: \(\lambda_m\)    Vertical: \(L_q-L_d\)
Locked
\(\lambda_m\)
0.000
\(L_q-L_d\)
0.000
Horizontal: \(B\)    Vertical: \(T_c\)
Locked
\(B\)
0.000
\(T_c\)
0.000
Horizontal: \(T_L\)    Vertical: \(k\)
Locked
\(T_L\)
0.000
\(k\)
0.000
Description
The pad in the rotating reference frame changes \(v_d\) and \(v_q\). These voltages are integrated in the electrical model to obtain \(i_d\) and \(i_q\), then the electromagnetic torque is calculated and injected into the mechanical equation with viscous friction \(B\omega\) and Coulomb friction smoothed with \(T_c\tanh(k\omega)\). Finally, the electrical position is used to transform the voltages from \(dq\) to \(\alpha\beta\) and then to \(abc\), so the final three-phase voltages applied to the PMSM can be seen.
Model
\( \dfrac{di_d}{dt} = \dfrac{v_d - R i_d + \omega L_q i_q}{L_d} \)
\( \dfrac{di_q}{dt} = \dfrac{v_q - R i_q - \omega\left(L_d i_d + \lambda_m\right)}{L_q} \)
\( \tau = \dfrac{3}{2}p\left(\lambda_m i_q + (L_d - L_q)i_d i_q\right) \)
\( J\dfrac{d\omega}{dt} = \tau - T_L - B\omega - T_c\tanh(k\omega) \)
\( \theta = p\theta_r \)
\( dq \to \alpha\beta \to abc \)
\(v_d\) \(v_q\) \(i_d\) \(i_q\) \(\tau\) \(\omega\) \(v_a\) \(v_b\) \(v_c\)