1) Standard discrete cost function is J = Sum {x'Qx + u'Ru + 2*x'Nu}. In your case N=0.
2) "I suppose I have to use u =reference trajectory " - NO. u is the input to the system. If you are not giving any input and working on a pure tracking problem, you have to use u=0.
3) "x =the state vector of the difference between reference r minus output y (=error I want to minimize)" - This is right.
4) "I will need coefficient of matrices A and B of the system that describes my situation in order to use dlqr" - You can use this:
ts=-1 % Put your sample time here
z = tf('z',ts)
system=0.1/(z-0.9)
system_statespace=ss(system)
A = system_statespace.A
B = system_statespace.B
Select proper weight matrices for LQR (Q and R) and then design your controller.