Obtaining DC motor parameters (inverted pendulum project)

Hello everyone.

In my previous thread I had a problem with interfacing Simulink to control Arduino. I listened to the advice and took classical approach (implementing control in arduino sketch).

Here is my next problem - in order to obtain good parameters for LQR/LQG control I need to model the system. The thing is, I don't know how to calculate relationship between PWM and force of a DC motor. I've found some formulas (for example, number (3) LQG Control Design for Balancing an Inverted Pendulum Mobile Robot ), but I only know voltage, current, power and rpm. Is there any way to measure/estimate these parameters?

With a DC motor its the current that is related to the torque, the voltage or drive level isn't
relevant.

If you can't model the load or measure the current you have no useful information about
torque.

Sounds like you need a motor controller which controls current, not effective voltage, then
you control the torque.

Alternatively you can try and figure out the torque from the basic PMDC motor equation and
knowledge of the motion of the load:

Fundamental permanent magnet DC motor equations:
T = kI
Vbackemf = kw k is the motor constant in Nm/A or Vs/rad, w = omega, angular velocity in rad/s

V = IR + Vbackemf (IR represents the winding resistance loss)

Thus I = (V - kw) / R,
thus T = (V - kw) / kR

Now V is the effective average voltage, which is linearly dependent on PWM duty cycle
only when using synchronous rectification, so

T = (p.Vs - kw) / kR where Vs = supply voltage, p = PWM duty cycle.