Setting a Specific Formula for PID Controller in Simulink (Matlab)
6 次查看(过去 30 天)
显示 更早的评论
I need to add a PID Controller to a Simulink Project with formula 1/(s+4.54) but I couldn't find the proper constants for the formula.
I tried looking at the different types of PID crack Controller libraries. I also tried finding the constants by solving the equation but couldn't.
0 个评论
回答(2 个)
Sam Chak
2023-11-9
Hi @nora
Use the Transfer Funtion block instead.
4 个评论
dorrin
2023-11-9
I posted the question on Stackoverflow and saw it here today (Maybe it's automatically reposted?).
Is it possible to use the PID Tuning feature to get the function
? This is the project I have to build:

Sam Chak
2023-11-15
The step response looks okay, no overshoot and settles within 6 seconds. Are the performance requirements satisfied?
% Plant
Gp = tf(30, [1 30 0])
% Compensator
Gc = tf(4, [1 4.54])
% Pre-filter
Gf = tf(1, [1 1])
% Closed-loop system
Gcl = feedback(Gc*Gp, 1)
% Closed-loop system with Prefilter
Gclf = Gf*Gcl
% Plot Step response
step(Gclf, 10), grid on
stepinfo(Gclf)
Sam Chak
2023-11-15
If you intend to use a PID controller to make the system behave similarly to the designed compensator, you'll need to make some slight modifications to the control loop configuration. The system under the PID controller should have the same settling time.
% Plant
Gp = tf(30, [1 30 0])
Gpp = feedback(Gp, 1);
% PID Controller
kp = 0.266920333340203;
ki = 0.516920333340203;
kd = -0.111860942402338;
Tf = 0.483633519278621;
Gc = pid(kp, ki, kd, Tf)
% Closed-loop system
Gcl = feedback(Gc*Gpp, 1)
% Plot Step response
step(Gcl, 10), grid on
stepinfo(Gcl)
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 PID Controller Tuning 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


