In SI units (which we will use), Kt (armature constant) is equal to Ke (motor constant). From the figure above we can write the following equations based on Newton's law combined with Kirchhoff's law:
Transfer Function
Using Laplace Transforms, the above modeling equations can be expressed in terms of s. Js2+bs=ki(s)
By eliminating I(s) we can get the following open-loop transfer function, where the rotational speed is the output and the voltage is the input.
Matlab code
J=0.01; b=0.1; K=0.01; R=1; L=0.5; num=K; den=[(J*L) ((J*R)+(L*b)) ((b*R)+K^2)]; % for transfer function bode(num,den)
-45
-90
-135
-180 10
-1
10
10
10
10
Frequency (rad/sec)
Gxof=NnN Pxof=inf Gm=infinity Pm=infinity Step Response of uncompensated system.(0S-Ts-Tr-Steady state error)
With Compensator:Using lag compensator (s+2)/(s+0.01) %with compensator syms s g=(s+2)/(s+0.01)*(0.01)/(0.005*s^2 + 0.06*s + 0.1001) [n,d]=numden(g) num=sym2poly(n) den=sym2poly(d) bode(num,den) % % bode(sys) [Gm,PM,PXOF,GXOF]=margin(num,den) GM=20*log10(Gm) PM GXOF PXOF