$\theta_d^f$ : $\theta$ requested in firmware units $\epsilon = \theta_d^f - \theta^f$ ### Error in firmware units > $\lambda$ is the duty cycle, aka the **PWM** $\epsilon^f = \epsilon \frac{4096}{2\pi}$ > 12 bits ### Firmware duty cycle $\lambda^f = K_p \epsilon^f$ $\lambda = K_p K_g\epsilon$ $R = 2.5\Omega$ ------ $\lambda = \epsilon K_p K_g$ $K_g = \frac{\lambda}{\epsilon K_p }$