# how can i get the PID value from +ve zero value.... since Td and Ti must be a +ve value

2 views (last 30 days)
st on 20 Jul 2011
I have a discrete transfer function
Hd = (0.0087)/(z - 0.9892)
and after conversion to continuous form with d2c command i got
Hc = (-0.0042s + 8.54) / (s + 10.86)
.........................
the resulted output respond is a overdamped respond and have quite a long steady state time.
Hence i apply command pidstd(Hc) to obtain the Kp, Ki, and Kd value in order to make the output respond better.
But i got error stating Td and Ti must be a positive value. But the problem is my numerator of my transfer function is a +ve zero!
Can i ask for help how can i get the PID with such transfer function?
Many thanks!
st on 20 Jul 2011
ops.. may be i think
i can factorise the numerator part...
take out the -0.004273 and leave the transfer function remained
s-2000/s+10.86
please correct me if i m wrong.
many thanks!

Arkadiy Turevskiy on 21 Jul 2011
From your post it looks like Hd and Hc are plant models, and you are trying to design a PID controller that would provide stable and fast step response with zero steady-state error.
The first problem with your post is that you did not mention what sampling time you use for Hd.
The second, more serios problem, is that you are trying to use the function pidstd to do the wrong thing. This function does not design a PID controller, it simply takes a PID controller expressed as a transfer function or state-space, and converts it into a pid object. Please do
>>help pidstd
and read the documentation to better understand what this function does.
If you want to design a pid controller, you need to use the function pidtool if you want to do it interactively, or pidtune if you just want to get the pid coefficients without inetarctive tuning.
Here is the code that designs a pid controller:
>>s=tf('s'); % define Laplace transform variable
>> Hc = (-0.0042*s + 8.54) / (s + 10.86); %specify plant model
>> [controller info]=pidtune(Hc,'pid'); %design a pid controller
>>info % see crossover frequency and phase margin
>>step(feedback(controller*Hc,1)); %plot step response
Take a look at this video demo, it explains things in detail.
HTH.