from PID and State Feedback Control of DC Motors by Roger Aarenstrup
A number of example models about how to control a DC Motor (Speed and Position)

controller_params.m
%%
Ts_controller = 0.0001;

%%
L3 = [0.0587 -3926.2 0.0470 4002.1 -2.0799];
Kinv = 0.00047404;

%% Observer
Aobs = [0.5652 -9507.5 0.4347 7775.9;
        0.000084815 -0.8892 0.000015179 0.4269;
        0.0462 -547.9145 0.9537 -826.23;
        0.0000016129 -0.6746 0.000098381 0.9546];
Bobs = [1.8628 1731.6;
        0.00010124 1.4623;
        0.0354 1374.2;
        0.0000009106 0.720];
Cobs = [1 0 0 0;
        0 1 0 0;
        0 0 1 0;
        0 0 0 1];
Dobs = [0 0;
        0 0;
        0 0;
        0 0];
    

Contact us at files@mathworks.com