0% found this document useful (0 votes)
45 views2 pages

PID Tuner

This document contains code that defines a transfer function model and calculates the parameters for a proportional-derivative (PD) controller for that model. It first defines the plant transfer function, then calculates convolution products to determine the PD controller parameters. It expresses the controller as a transfer function and validates it using a PID tuning tool.

Uploaded by

nikolay molano
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views2 pages

PID Tuner

This document contains code that defines a transfer function model and calculates the parameters for a proportional-derivative (PD) controller for that model. It first defines the plant transfer function, then calculates convolution products to determine the PD controller parameters. It expresses the controller as a transfer function and validates it using a PID tuning tool.

Uploaded by

nikolay molano
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

%Num=[37.58 0 1.

294e-13]
Num=-1.29*10e-13

Num = -1.2900e-13

Den=[1 0 26.74 0 9.2*10e-14];


sys=tf(Num,Den)

sys =

-1.29e-13
-------------------------
s^4 + 26.74 s^2 + 9.2e-14

Continuous-time transfer function.

z=0.7;
ts=4;
wn=4.6/(ts*z);
pd1=conv([1 2*z*wn wn^2],[1 2*z*wn wn^2]);
pd=conv(pd1,[1 5*wn*z])

pd = 1×6
1.0000 10.3500 37.1380 73.8711 78.6725 41.8858

pc=[Den 0]

pc = 1×6
1.0000 0 26.7400 0 0.0000 0

Kd3=(pd(2)-pc(2))/Num

Kd3 = -8.0233e+13

Kd2=(pd(3)-pc(3))/Num

Kd2 = -8.0604e+13

Kd1=(pd(4)-pc(4))/Num

Kd1 = -5.7264e+14

kp=(pd(5)-pc(5))/Num

kp = -6.0986e+14

ki=(pd(6)-pc(6))/Num

ki = -3.2470e+14

Gc=pidtune(sys,"PD")

Gc =

Kp + Kd * s

1
with Kp = -6.51e+14, Kd = -2.76e+14

Continuous-time PD controller in parallel form.

pidTuner(sys,Gc)

You might also like