Here is a state-space system corresponding to a DC motor model:
The numeric values of the model parameters are as follows:
Extract a subsystem with the desired input and output.
Compute the weighting Matrices Q and R for a desired time constant of 1 second:
Use the previous result to compute the state feedback gain:
Optionally, compute the weighting Matrix N:
Use matrices Q, R, and N to compute the state feedback gain. In this case, N is a zero Matrix, so the result is the same as before: