I'm constructing a 2 wheels balancing robot which uses a PID controller. I've tuned my parameters on numerical simulations based on a continuous inverted pendulum system so that the simulated inverted pendulum balances by controlling the horizontal (linear) cart acceleration $\ddot{x}$.
Now that I've done this, I want to take the next step and turn my PID control commands into electrical commands onto a DC motor to give the desired linear acceleration $\ddot{x}$. However I'm not sure how exactly to do this for my specific robot's motors. Are there experimental tests should I run to determine how to convert PID commands into DC motor acceleration commands? Or is there a formula to do this based on the motor's specifications?
Update
The non-linear dynamic equation I'm using is
$$L\ddot{\theta}=gsin(\theta)+\ddot{x}(t)cos(\theta)+Ld(t)$$
where $\ddot{x}(t)$ is the linear acceleration, $g$ is the acceleration due to gravity, and $\ddot{\theta}$ is the angular acceleration, and $d(t)$ is an external disturbance to the system. To simplify things, I've linearized the equations around $\theta\approx0$, yielding
$$L\ddot{\theta}=g\theta+\ddot{x}(t)+Ld(t)$$
I've assumed that the only control input is the cart's linear acceleration $\ddot{x}(t)$, and chose this control command as $\ddot{x}(t)=K_1\theta(t) + K_2\int_0^t\theta(t) dt + K_3\dot{\theta}$, where $K_i$ are the PID gains.