DC 모터에서 전류 제어를 LQR 제어기로 하고싶은데 simulink를 어떻게 만들어야 하나요?

2 views (last 30 days)
주환 엄
주환 엄 on 4 Jun 2024
Answered: Amish on 6 Aug 2024
현재 PMDC까지는 구현을 했고 전류 컨트롤러에서 PID로 하는 방법은 알겠는데 LQR을 어떻게 하는 지 모르겠네요,,,

Answers (1)

Amish
Amish on 6 Aug 2024
Hi 주환 엄,
You can use MATLAB to compute the "LQR gain matrix" (K). The LQR controller minimizes a cost function of the form:
LQR equation
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:
% Define the state-space matrices
% Your A,B,C,D matrices
A = [..];
B = [..];
C = [..];
D = [..];
% Define the weight matrices
Q = [..];
R = [..];
K = lqr(A, B, Q, R); % Compute the LQR gain
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!

Products


Release

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!