why my “pid” parameters(Kp,Ki and Kd) values are not showing up in pidtuner tool?
12 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am trying to implement PID controller in matlab,but pid parameters(Kp=350,Ki=300 and Kd=50) values are not showing up in my pidtuner app for base line response as shown highlighted in attached photo
My code is below
clc
clear all
close all
kp=350
ki=300
kd=50
m=1
b=10
k=20
num=[kd kp ki]
den=[1 0]
num1=[1]
den1=[m b k]
sys1=tf(num,den)
sys2=tf(num1,den1)
A=series(sys1,sys2)
sys3=1
B=feedback(A,sys3)
step(B)
xlabel('time')
ylabel('amplitude')
pidtool(B,pid)
0 comentarios
Respuestas (1)
Sam Chak
el 14 de Sept. de 2023
The command pidtool(B, 'pid') launches the PID Tuner app and designs a PID controller for plant B. However, plant B is actually the closed-loop feedback system with your improperly configured PID controller embedded. The configuration of your PID controller is improper because the degree of the numerator exceeds the degree of the denominator.
By the way, please note that pidtool has been removed. Instead, use pidTuner with this syntax: pidTuner(Plant, Cbase) to launch the app and compare the performance of the auto-tuned PID controller to that of the baseline controller (Cbase).
% parameters
kp = 350;
ki = 300;
kd = 50;
m = 1;
b = 10;
k = 20;
% baseline controller
numC = [kd kp ki];
denC = [1 0];
Cbase = tf(numC, denC)
% plant tranfer function
numP = 1;
denP = [m b k];
Plant = tf(numP, denP)
% launch the app and make comparison to Cbase
pidtool(Plant, Cbase)
0 comentarios
Ver también
Categorías
Más información sobre PID Controller Tuning en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!