LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID\Smith predictor simulation problem

Hi KF_,

 

It sounds that parameters are not defined in same way in matlab and Labview. You can try to do "open loop"  step response test only to PID controllers.  Set parameters to same values in LabVIEW and Matlab and then do a step response. If you get equal responses you can be sure that controllers are okay.

 

BR, Jim 

0 Kudos
Message 11 of 13
(1,037 Views)

Hi snowforest,

 

Matlab is giving me some simulation trouble atm because the PID alone has more zeros than poles, but I am quite sure I didn't make errors on the parameter conversions, I checked it many times before I  posted. Also I simulated it in Matlab with the command 

 

s = tf('s');  H =(0.4413)/((55.56*s+1)*(21.74*s+1))*(20+20/77*1/s+20*15*s);
H=feedback(ss(H),1)
t=0:1:200
u=[1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1]
k=lsim(H,u,t)
plot(t,k)

 

The transfer function is in a different form now but the same one as I gave, So here I cant make any mistakes regarding PID form.

 

Regards

 

KF_
Message Edited by KF_ on 03-04-2010 10:31 AM
0 Kudos
Message 12 of 13
(1,017 Views)

The problem is solved! The D-action is the culprit. Because of the setpoint change with a step input, there is a discontinuity and the D-action doesn't respond well to this, giving a wrong input. With a PI-controller there is no problem.

 

Regards

 KF_

0 Kudos
Message 13 of 13
(998 Views)