With the following state space system and setting for the Linear Quadratic Integrator (LQI) Q = diag([1,1,1]) and r = 1; for optimal gains computation, the system is not reaching the desired output by an unit step input (reaching 0.5 as shown in image below), strangely when I set the C matrix to measure position C = [1 0], the output does track the reference input.
Jm = 0.008; % Rotor inertia
dm = 0.015; % Damping
A = [0 1;0 -dm/Jm];
B = [0;1/Jm];
C = [0 1];
D =0;
sys = ss(A,B,C,D);
Q = diag([1,1,1]);
r = 1;
[K,S,e] = lqi(sys,Q,r,0);
Aa = [A [0;0];-C 0];
Ba = [B;0];
Ca = [C 0];
Bi = [0;0;1];
sys_cl = ss(Aa-Ba*K,Bi,Ca,D);
step(sys_cl);


Is it ppossible that the corresponding Q and r values to be off causing this?
If you are only interested in controlling angular speed (not the angle itself) your model is first order. You don't need the integrator (and in fact you are not measuring it anyway when $C = [0 ~~ 1]$ and it is not observable).
When you set $C = [1 ~~ 0]$ you are basically controlling the angle, not angular speed.