why my “pid” parameters(Kp,Ki and Kd) values are not showing up in pidtuner tool?

조회 수: 11 (최근 30일)
ABTJ
ABTJ 2020년 10월 5일
답변: Sam Chak 2023년 9월 14일
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)

답변 (1개)

Sam Chak
Sam Chak 2023년 9월 14일
Hi @ABTJ,
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)

카테고리

Help CenterFile Exchange에서 PID Controller Tuning에 대해 자세히 알아보기

태그

제품


릴리스

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by