Implementing Closed-Loop ControlA closed-loop control system is necessary to automate the monitoring and maintaining of a process variable. An example of a closed-loop control system is cruise control, a standard feature on most vehicles on the road. The driver provides the set point, or desired speed, and the control system monitors the actual speed and adjusts the engine throttle accordingly. For example, the logic of the control system dictates how quickly the car gets back up to speed after encountering a hill, and tuning this relationship optimizes engine performance and fuel efficiency. This module illustrates how to implement a PID control algorithm in NI LabVIEW software. Step-by-Step ProcedureDownload the Step-by-Step Procedure PDF This procedure requires a transducer/sensor to be connected to pins ai0+ and ai0- and an actuator/motor/fan connected to pins ao0+ and AGND. A simple example of this is shown in the video. Another option is a thermostat setup consisting of a thermometer, heating lamp, solid state relay, and fan to cool the system. The control system is used to hold the system at a near steady temperature. Below is a generic setup procedure that you can modify for your control system setup and parameters. Before starting this procedure, you need to complete the exercise and use the solution in the Taking a Measurement module. You can also create a numeric control to simulate the data acquisition input.
Note: These values vary from system to system and must be tuned accordingly. Use the PID Autotuning VI to have LabVIEW determine the gains for you.
LabVIEW Example Code Right-click on the above VI snippet and select Save Image As... Locate the file on your hard disk and click and drag the file icon onto your LabVIEW block diagram. LabVIEW automatically generates the code from the VI snippet. For more information, read VI Snippets. Don’t have NI-DAQmx installed on your PC? Related Links Cumulative Exam:
|

