ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

pid with transfer function

hi i have a simple program that deals with pids and a transfer function.
basically i want to control a transfer function with a pid and try and
tune
the response. i am having difficulty closing the loop. when i connect
the
output of the transfer function to to process variable it brakes the
wire.
is it hard to close the loop?? i hope the file will open for you. if it
does vcould you send back an ammended version. this would be great
help.
0 Kudos
Message 1 of 3
(3,139 Views)
When you simply close a loop in your diagram your wire becomes member of a cycle. The LabVIEW error you get if you try to run the VI says:
"These wires form a cycle, making two parts of the diagram interdependent, so each must wait for an input from the other and neither can execute."

You are dealing with a sample system and not (like an analog system) with a continuous system. So an output value fed back to the input can only be used in the following iteration.

The solution: Your system need to be included in either a While or a For loop (if it is not already the case) and then you need to create a shift register SR (right click on the edge of your structure and add shift register). Connect the output of your system to the right terminal of the SR and the f
eedback input to the left terminal of the SR.

Note again that you are then dealing with a sampled system (more like a z-domain model) so if you are trying to simulate an analog loop (s-domain) you'll see some variations from what you may expect the higher the system bandwidth is. Make sure to sample with s sufficient "time" resolution.
0 Kudos
Message 2 of 3
(3,139 Views)
Hi Comerford1,

Here is a link to an example PID Controller program that may help.

Jeremy L.
National Instruments
Jeremy L.
National Instruments
0 Kudos
Message 3 of 3
(3,139 Views)