LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID is not returning any output...

Solved!
Go to solution

hello everybody...

 

 

process carried on sbRIO and using sound and vibration signal simulator

 

 

below i have attached my RT+FPGA... code for controlling the speed of the fan..using PID..

 

RT.. front panel 

 

out put range

1000,-1000

 setpoint... 5000RPM(speed is the paramter)

 

PID GAINS..

arbitraty values taken at the time of executin....Kc=1,integral gain (Kc*Ts/Ti)=0.011718,

 

derivative gain (Kc*Td/Ts)=0

 

other considerations

 

max speed of the fan is 6000rpm

 tach out from the vibration signal simulator is 2 pulses/revolutions

 

speed is accurately measured

 

manual distrubance can be given by varying the analog output voltage

if the pid is introduced in RT then it working fine....

but, when the pid(in fpga) is introduced unable to  disturb and also no output from

 

every other parameter returns  to zero (final rpm,outputanalog out)

 all equal to zero

 

Download All
0 Kudos
Message 1 of 12
(4,946 Views)

Hi irfan,

 

you still put all FPGA code into one loop despite other suggestions you got in older threads

 

- Your inner WHILE loop in the FPGA part is intended to run for a whole second. This will block any other things the FPGA is supposed to do.

- Why do you route the FPGA-PID "output" to the RT part just to put it back to the FPGA as value for AO0? Why not use a wire in the FPGA VI?

- In your RT VI the output range is set to [0, 0]. So what other PID output do you expect?

 

Why do you create a new thread for the same old topic? Did something essentially change compared to that thread?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 12
(4,897 Views)

hello Gerd

 

i figured out wy it wasnt returning output 

fpga has a data type as FXP and PID deals with dbl/integer

 

so i converted each and very data to integer and fed to pid and later i converted back to FXP and it doesnt show much difference if we place counter and analog out in different loops but i feel 

keeing in parallel may avoid some jitter

 

but the main problem is with tuning i applied ziegler nichols algorithm and couldnt acheive the exact setpoint

0 Kudos
Message 3 of 12
(4,860 Views)

Hello gerd

 

in your RT VI the output range is set to [0, 0]. So what other PID output do you expect?

 

Why do you create a new thread for the same old topic? Did something essentially change compared to that thread?

 

 

this particular thread has all the possible parameters like output range and pid gains I mentioned them firstly 

0 Kudos
Message 4 of 12
(4,855 Views)

Hello everybody

 

output range:[-32767,32767]

 

setpoint... 4500rpm

 

I have attached the PROJECT I  this post and the problem is 

 

unable to reach the setpoint it and  unable to tune it ...

Need suggestions

 

I have attached a run time parameters except the tuning values for which I am struggling

 output from PID is available but it keeps on increasing in one direction 

 

please help me out with your suggestions

Download All
0 Kudos
Message 5 of 12
(4,819 Views)

If you have a problem with closed loop control, first of all verify that it is working open loop!!

- apply a fixed voltage (same wire as used for controller output) and observe the speed (observing exactly same variable as used in controller)

- find what voltage roughly gives you the 4500rpm

- increase the control voltage, does the speed go up ? and vice versa ?

 

Once you have that close the loop and start with proportional only (small gains), remember to bias your controller output voltage to match that gave you 4500rpm in open loop, and run without changing setpoint. Does the controlled speed stay same, move a little bit more towards setpoint, or diverge away.

 

If it diverges away - find out why.

If the other two try to refine your tuning tuning.

 

 

Consultant Control Engineer
www-isc-ltd.com
0 Kudos
Message 6 of 12
(4,788 Views)

Hello Mr.Andy

 

thanks for your suggestion i could figure out how to solve my problem

 

 

can you please elaborate the phrases ..... given in the previous post

 

1.(same wire as used for controller output)

2.(observing exactly same variable as used in controller)

3.remember to bias your controller output voltage

 

syed irfan

 

0 Kudos
Message 7 of 12
(4,771 Views)

1. and 2. are just to make sure you use the same signals (wire / variable) in the open loop case as when you close the loop.

 

3. by setting bias I just meant set the controller output is (approximately) in equilibrium with setpoint and measurement. This can be done by either setting initial output of PID, or by adding the value on to output of the PID.

 

Consultant Control Engineer
www-isc-ltd.com
0 Kudos
Message 8 of 12
(4,761 Views)

Hello Mr. Andy

 

I have done the open loop control(manual control) results were fine showing  input-output relation increasing the voltage increases speed and vice versa

 

when it comes to closed loop my results are like this 

 

process variables reaches set point and suddenly drops to zero

 

pid OUTPUT RANGE IS [0,5]

set point 4000rpm

 

 below are the file attached for output values from pid controller to fan

2.set point vs process variable variation

3.set point vs process variable variation on graph

0 Kudos
Message 9 of 12
(4,723 Views)
Solution
Accepted by topic author irfan789

That set of data makes no sense ... I suggest you check that you are actually recording the correct values, and that you have the PID controller wired up correctly.

 

There are periods when the voltage (?) is ramping up but the speed is not changing. Equally there are periods where the speed (?) has a step increase but there is no change in voltage. Also, you can see places where 5V is applied but different speeds are generated. Of course it would be a lot clearer if you labelled your data, including units.

 

In open loop could the system actually achieve 4000rpm with the 5volts applied ? Try starting with a setpoint that is in the middle of its working range.

Are the ramps coming from integral only action ? What gains have you used here. You should try proportional only first, and make sure everything is working properly, and only then start looking at integral action.

 

Consultant Control Engineer
www-isc-ltd.com
0 Kudos
Message 10 of 12
(4,713 Views)