Hi 주환 엄,
You can use MATLAB to compute the "LQR gain matrix" (K). The LQR controller minimizes a cost function of the form:
where "Q" and "R" are user-defined weight matrices that penalize the state and control input, respectively. This can be solved using MATLAB as follows:
This can then be implemented in Simulink with the help of various blocks. You will need the following:
- State-Space block: to represent the PMDC motor model (with Matrices A,B,C,D)
- Gain block: to represent the LQR gain (K) , this is computed previously
- Sum block: to compute the control input
- Scope block: to visualize the output
- Step block: for the input voltage
You can then set your required parameters and run the Simulation.
For more information you can refer to the following documentation:
Hope this helps!