DC 모터에서 전류 제어를 LQR 제어기로 하고싶은데 simulink를 어떻게 만들어야 하나요?
이전 댓글 표시
현재 PMDC까지는 구현을 했고 전류 컨트롤러에서 PID로 하는 방법은 알겠는데 LQR을 어떻게 하는 지 모르겠네요,,,
답변 (1개)
Amish
2024년 8월 6일
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:
% 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!
카테고리
도움말 센터 및 File Exchange에서 Motor Drives에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!