02-16-2014 06:15 AM
when i run this code my pid is giving the very high output values from the controller....
i am trying to give disturbance manually and expecting controller output
here is the attachment...
acquring the speed of the fan in FPGA mode and calling the FPGA vi in RT of the target
and over RT i have made a PID control
and manual diturbance is given through FPGA
02-16-2014 12:48 PM
Hi irfan,
you should learn to give more descriptive thread titles…
- I don't think you need a TWL in the RT part when it comes to have a loop running once per second…
- I don't know from the picture if the FPGA counter loop will ever stop as that depends on a comparison of loop iterator with some "y" input…
- Why don't you put the AO output node in it's own parallel loop? Why have counter and AO in one loop?
- We don't know anything about your PID parameters/settings nor do we know anything about the behaviour of your "fan". So how should we judge on the implementation of your PID algorithm?
02-16-2014 01:43 PM
I really hate ignoring students....Gerd has given you some pointers. i'll give you another....... post your vi (not a picture) and save some values as default.
02-17-2014 01:58 AM
fortunately my code is working
but i made few corrections
i am gonna post them now
and i just need clarification where to keep my PID loop in RT or FPGA
need bit info how to tune my pid knowing that there are method to tune pid like cohen coon and ziegler nichols....
by the way those were not just pictures sir..
those are snippets which can be dragged to block diagram and used as a code...
02-18-2014 09:56 PM
Hello Mr Gerd
here's few explanation to the following
--------------------------------------------------------------------------------------------------------------------------------------------------
I don't think you need a TWL in the RT part when it comes to have a loop running once per second…
-----------------------------------------------------------------------------------------------------------------------------------------------------
answer :yes of course i can replace a TWL with normal while loop and keep some delay but i used TWL in order to maintain the same rate of execution as RT gets INPUTs from FPGA which updates my speed for every one sec
-----------------------------------------------------------------------------------------------------------------------------------------------------
I don't know from the picture if the FPGA counter loop will ever stop as that depends on a comparison of loop iterator with some "y" input…
-----------------------------------------------------------------------------------------------------------------------------------------------------
answer: yes it does stop for the value y=40000000(40*10^6)
for every one sec fpga performs "y" number of iterations and counts number of pulses(digital) per second with that i get my speed
-----------------------------------------------------------------------------------------------------------------------------------------------------
parameters are avalabcle here.
http://forums.ni.com/t5/LabVIEW/PID-is-not-returning-any-output/m-p/2744950#M810826
-----------------------------------------------------------------------------------------------------------------------------------------------------