user1477107
user1477107

Reputation: 47

Why can't I implement a PID controller in it's transfer function form in simulink?

I'm trying to better understand PID controllers so I wanted to see if I can implement it in the form of a transfer function, like this:

enter image description here

However, when I enter these numbers into the transfer function properties window I get the following error:

enter image description here

I tried to google this and apparently having such transfer function where the order of the numerator is higher than the order of the denominator means the system is non-casual. But does this mean you cannot write the PID controller in the form of a transfer function, or is it just that simulink doesn't accept it in that way? Because mathematically I believe this should be a correct representation of a PID controller. So maybe someone can clear this up for me.

Upvotes: 0

Views: 1798

Answers (3)

MSZ
MSZ

Reputation: 69

Please, refer to THIS discussion in mathworks forum. As Vaibhav Awale said in there:

The filter coefficient is used to implement derivative action. Since implementing something like "Kds" is not possible since implementing improper transfer function is not possible. Hence instead of "Kds", we do something like: Kd*(Ns/(s+N)). So if N is sufficiently large, it tends to "Kds"

Your error is something like "Caused by: The given tf is improper transfer function", so it's probably the reason.

If I understand this problem correctly, derivative action in the real world (i mean not simulation) is implemented by differentiation between actual value of some variable and the previous value of the same variable in equal time intervals. To make derivative action in your simulation more adequate to real world action you are using in process, you have to find the best value of the "filter coefficient".

Upvotes: 1

Derek
Derek

Reputation: 1

While your equation for a PID controller is traditionally used, implemented PID typically includes a pole for the derivative component. This helps suppress the D gain at higher frequencies for stability of the system (and the non-causality issue) among other benefits that I'm not well-versed in.

The PID transfer function with an added pole looks like: PID(s) = k_p + k_i/s + k_d/(1 + s/k_f)

Upvotes: 0

Robert_G
Robert_G

Reputation: 19

as you have already described in your question a transfer function where the numerator is of higher order than the denominator is a non-causal system. Therefore it can not be simulated correctly in a transfer function. You could use the Simulink block PID-Controller.

Upvotes: 2

Related Questions