# WIL: Making Math Models

Learning 1:
A good general structure to present thought process of creating a math model of a system (especially physical) is:
1. Nomenclature
2. Diagram(s)
3. System equation(s)

# DC Motor Math Model

1 Nomenclature 2 Diagram 3 System equations

3.1 Electrical

Back emf is directly proportional to rotational speed of shaft: $e \propto \dot{\theta} \rightarrow e = K_{e} \dot{\theta}$

Where:

e = back emf $\dot{\theta}$ = rotational speed of stator $K_{e}$ = constant

From Kirchhoff’s voltage law:

The directed sum of the potential differences (voltages) around any closed loopis zero. $\sum_{k=1}^{n} V_{k} = 0$

Therefore: $L \frac{di}{dt} + Ri = V - K_{e} \dot{\theta}$

3.2 Mechanical

Torque is directly proportional to current and electric field strength:

Assuming armature controlled motor therefore electric field strength is constant $T \propto i \rightarrow T = K_{t}i$

Where:

T = torque

i = current $K_{t}$ = constant

From Newton’s Second Law for Rotation:

If more than one torque acts on a rigid body about a fixed axis, then the sum of the torques equals the moment of inertia times the angular acceleration $\sum_{k=1}^{n} T_{k} = I \Ddot{\theta}$

Therefore: $J \Ddot{\theta} + b\dot{\theta} = K_{t}i$

4 Transfer function

In SI units, the motor torque and back emf constants are equal

Laplace transform equation: $F(s) = \mathcal{L} \left[ f(t) \right] = \int_{0}^{\infty} f(t)e^{-st}dt$

General Laplace transforms: $\mathcal{L} [\dot y(t)] = sY(s) - y(0)$ $\mathcal{L} {\Ddot y(t)} = s^2Y(s) - sy(0) - y(0)$

4.1 Electrical $\mathcal{L} \left[L \frac{di}{dt} + Ri\right] = \mathcal{L} \left[V - K_{e}\right]$

Assuming i(0) = 0 $sI(s)L + RI(s) = V(s) - K_{e}s \theta(s)$ $I(s)(Ls + R) = V(s) - K_{e}s \theta(s)$

4.2 Mechanical $\mathcal{L} \left[J \Ddot{\theta} + b\dot{\theta}\right] = \mathcal{L} \left[K_{t}i\right]$

Assuming $\theta(0) = 0$ $s(Js+b) \ominus(s) = K_{t}I(s)$

Open loop transfer function given input is voltage and output is rotational speed: $G(s) = \frac{\dot\ominus(s)}{V(s)}$

Voltage

From Equation $I(s)(Ls + R) = V(s) - K_{e}s \theta(s)$ $V(s) = I(s)(Ls+R)+K_{e}s\ominus(s)$

Rotational speed: $\dot\ominus(s) = \ominus(s)s$

From Equation $s(Js+b) \ominus(s) = K_{t}I(s)$ & Equation $\dot\ominus(s)=\ominus(s)s$ $\dot\ominus(s) = \frac{K_{e}I(s)}{Js+b}$

Open loop transfer function for speed control:

From Equation $V(s)=I(s)(Ls+R)+K_{e}s\ominus(s)$ & Equation $\dot\ominus(s)=\frac{K_{e}I(s)}{Js+b}$: $G(s) = \frac {I(s)K_{e}} {I(s)((Js+b)[(Ls+R)+K_{t} \dot \ominus(s)])}$

From Equation $s(Js+b) \ominus(s) = K_{t}I(s)$ $K_{t} = \frac{\dot \ominus(s)(Js+b)} {I(s)}$

From Equation $K_{t} = \frac{\dot \ominus(s)(Js+b)} {I(s)}$  & Equation $\dot\ominus(s)=\ominus(s)s$ $G(s) = \frac {K_{e}} {(Js+b)(Ls+R)+K_{t}^2}$

Open loop transfer function for position control:

From Equation $\dot\ominus(s)=\ominus(s)s$  & Equation $G(s)=\frac{K_{e}}{(Js+b)(Ls+R)+K_{t}^2}$ $G(s) = \frac {sK_{e}} {(Js+b)(Ls+R)+K_{t}^2}$