PID Temperatur​e Autotuning

Hi,
Has anyone had much success with the 'Temperature' method of PID control and the autontuning of its parameters?  I have several temperature (and other slow-responding) systems that I'm trying to control.  But I'm not having much success getting adequate gains.  Is there a good guide to implementing this technique?
Also, does the 'Tuning Complete' boolean even work?  It appears that the boolean only becomes true when the user stops autotuning manually?  Thanks.
-Joe

Joe,
The "PID Temperature Autotuning" is used in system that have large time-delays. By large, the delay should be equal or bigger than the time constant. If that is not the case where the delay is just a fraction of the time constant, than the "PID Advanced Autotuning" probably would have a better response for you.
The  "PID Temperature Autotuning" has a 'smith predictor' inside the algorithm that try to avoid the effects of the delay, but, if your system can't be model or differ too much from a first order model with large delay, then it is possible it can not work for you.
The "Tuning Complete" problem was already reported and fixed in later versions. If you want to fix on your version, here is the code to patch your version and in attachment is the VI save in LabVIEW 2013:
Barp - Control and Simulation Group - LabVIEW R&D - National Instruments
Attachments:
PID Autotuning (Temperature).vi ‏42 KB

Similar Messages

  • Autotuning PID temperature not working

    I'm trying to use the Autotuing PID for a temperature system and for some reason it's not working properly. I've attached my vi. Thanks!

    I had a look on the VI which you attached. Your process variable (PV) is a constant in this VI. Autotune is set to False. This does not make any sense to me. Where do you measure the real temperature? So this input should be either a simulated or a real measured variable.
    Actually in the past I had several problems with the PID toolkit's autotuning features. However usually I got nice results using the standard manual Ziegler-Nichols closed loop tuning method: you set your I and D terms zero, and you play first only with a pure P-control. Gradually increasing it, bring the system into a stable oscillation. Plot this stable oscillation in time, and measure the period time or ultimate time parameter T_u (time in minutes between two points are in the same phase in the osciallation curve). The ultimate gain P_u is the actual P value.
    From T_u and P_u calculate the PID parameters:
    P = P_u / 1.7
    I = T_u / 2
    D = T_u / 8
    I hope it helps...
    edit: actually do you understand the basics of PID control? Do you understand the concept, and the terms: Process Variable, Setpoint, Output? The process variable in this case a measured temperature. The output of the PID VI is a value which you should send to a thermostat for example. It can be a current which drives a heater, or a Peltier-module, etc...
    edit2: so please describe your hardware configuration, otherwise it is pretty difficult to help...
     

  • Autotuing PID temperature not working

    I'm trying to use the Autotuing PID for a temperature system and for some reason it's not working properly. I've attached my vi. Thanks!

    I had a look on the VI which you attached. Your process variable (PV) is a constant in this VI. Autotune is set to False. This does not make any sense to me. Where do you measure the real temperature? So this input should be either a simulated or a real measured variable.
    Actually in the past I had several problems with the PID toolkit's autotuning features. However usually I got nice results using the standard manual Ziegler-Nichols closed loop tuning method: you set your I and D terms zero, and you play first only with a pure P-control. Gradually increasing it, bring the system into a stable oscillation. Plot this stable oscillation in time, and measure the period time or ultimate time parameter T_u (time in minutes between two points are in the same phase in the osciallation curve). The ultimate gain P_u is the actual P value.
    From T_u and P_u calculate the PID parameters:
    P = P_u / 1.7
    I = T_u / 2
    D = T_u / 8
    I hope it helps...
    edit: actually do you understand the basics of PID control? Do you understand the concept, and the terms: Process Variable, Setpoint, Output? The process variable in this case a measured temperature. The output of the PID VI is a value which you should send to a thermostat for example. It can be a current which drives a heater, or a Peltier-module, etc...
    edit2: so please describe your hardware configuration, otherwise it is pretty difficult to help...
     

  • Program Structure for PID temperature Controller

    Hi everybody,
    I built a PID temperature controller VI for a third party DAQ board, based on a very basic knowledge in programming.
    Now the VI works fine in both ends "i/ps & o/ps", the problem is that i cant get the response that I'm looking for from the PID controller. Since the system is time critical, I wounder if the structure of the VI is cosing this problem. please if you have any idea, hint or suggestion.
    Marwan
    http://www.geocities.com/marwan_m13/weemee8080.jpg
    Attachments:
    PIC Temperature Control(PID).vi ‏364 KB

    Marwan,
    You say that time is critical. The timeout is set to 1 second in the main loop. You will only get one update per second with this setting.
    Several comments:
    1. I have never seen the event structure used soley to control loop timing like this. No reason it should not work, but that is not its primary purpose. If you were to use the event structure to also handle user events (as it is designed to do), then things could get complicated. The Wait (ms) functions and Elapsed Time Express VIs can perform the timing for you without the risk of unintended consequences.
    2. Generally it is recommended to use only one event structure in a program, unless you have very specific reasons for using more than one. Since you are using them only as timers, the interaction potential is minimal.
    3. Right to left wiring and avoidance of wires hidden behind other objects make code much easier to read and to debug.
    4. Putting the user controls and displays and the write to file functions in independent loops allows the PID function to run at different rates from the user interface and file save functions. Look at examples of Producer/consumer architecture.
    5. Precalculating things which do not change from iteration to iteration can save time. For example multiply by 2.55 rather than multiply by 255 and divide by 100. Also make the datatypes consistent to avoid type coercion (indicated by little dots at the input connections such as the 255 input to the mutliply. Changing the datatype of the 255 constant to Double eliminates the coercion.
    Lynn

  • PID Temperature Controller with myRIO

    I am interested in implementing the LabVIEW PID VI to create a temperature controller using the myRIO for a sous vide cooking apparatus similiar to this: https://learn.adafruit.com/sous-vide-powered-by-arduino-the-sous-viduino/sous-vide. I will be using a slow-cooker as the heating element; for the temperature measurements, I am using the DS18B20 one-wire temperature sensor; and to alter the temperature I am using a relay connected to the slow cooker.
    I have had success getting temperature measurements from the DS18B20 with the myRIO following the guidance of this thread: https://decibel.ni.com/content/docs/DOC-41626#comment-44403, however, I am having difficulty finding a starting place to learn how to use the PID VIs for the rest of the project. In a new VI file, I used the program I had used for the temperature readings as a subVI, and tried to connect its output containing the live numerical temperature measurements into the PID VI, but the live temperature measurements as well as the PID VI output are not being transmitted after running the program.
    Here are a few more specific questions:
    Are there any preliminary steps for creating a PID program to accept live measurements from a myRIO target (should the program be enclosed in a loop for continuous updating of myRIO measurements)?
    What information is transmitted at the "output" terminal of the PID VI?
    Is autotuning recommended for this type of application?
    How does the "PID Autotuning" VI differ from the "PID Autotuning (Temperature)" VI?
    I have attached the files I am currently working with: ("1-wire interface.lvproj" is the project file, "RT Main.vi" is the temperature reading program, "PID_Test" is the new PID VI file I am experimenting with).
    If the content in this post is not appropriate to what is expected to be asked in the forums (not specific enough, etc.), please let me know and I apologize in advance. Thank you for your time and assistance!

    Hello dpull,
    There shouldn’t be any particular configuration that needs to be done, for the PID vi to start using the PID VIs, and if you desire to continously acquire the data from the myRIO, then this within a loop might be appropriate.
    The output terminal transmits the control signal of the PID controller, so basically the action that would have to take place to take the desired value to the setpoint.
    As far as recommending autotuning, it mostly  depends on your application and the precision you need, it would always be better to determine the parameters yourself, but if you don’t require super high accuracy, then autotunning should be sufficient.
    The PID autotunning (Temperature) VI is used for processes that include a dead time, since it’s incorporated into that model, the other one is better suited for processes that don’t have dead time.
    As far as resources go for learning to use this toolkit, I’d recommend sticking to the examples you can find in LabVIEW and maybe the following manual.
    http://www.ni.com/pdf/manuals/372192d.pdf

  • PID temperature control through voltage, Amperes and thermocouple as sensor

    here is the Hardware setup of mine.
     [IMG]http://i34.tinypic.com/daa8.jpg[/IMG]
    Now, I already have such a VI which gives me the temperature of heater. But i want to control the temperature of the Heater from VI, in which when i give certian temperature, then power supply provide the current in such amount that the required temperature is gained and  stops when the temperature crosses the limit.
    Message Edited by akhpal on 09-28-2009 10:06 AM

    The problem is that you have basically created two completely different VI's and slapped them together.  One is your real world analog input and analog output.  The Inputs and Outputs are not connected to each other in any way.   The second VI is the PID simulation example.  It is an example to show you how a PID control algorithm is used.  As an example, they created the "Plant" simulator there.  That is simulating the real world for the purpose of the example and has nothing to do with your real world inputs and outputs.  And why do you have the Proportional Gain VI in the upper loop and its output goes to the while loop tunnel and is never used again?
    What you need to do is only use the actual PID portion of the example and have it placed in your upper loop.  You have your DAQmx read.  The analog input from that is fed to the PID subVI.  The output of the subVI is fed to the Analog output DAQmx Write VI.
    One thing you will have to do is modify the DAQmx Read.  You are reading an N channel N sample and getting a waveform.  Why the N channel version when you are actually only using 1 channel?  Also, youi need to get it to a single sample.  You can use multiple samples, but it should only be for the sake of averaging the data together into a single value to feed to the PV of the PID subVI.  As such, you should use either 1 channel 1 sample, or 1 channel N samples Array where the array is averaged to a single value.  The Waveform type doesn't do you any good because you can't do anything with its timing information.
    Attachments:
    TempControlMOD.vi ‏174 KB

  • How should I set the parameters of PID Autotuning such as relay amplitude and PV noise level?

    I want to control the temperature of a room by changing the hot water flow of a radiator with a control valve. The desirable control accuracy is +/- 0.5 degree of centigrade.
    What number should I set for relay amplitude? And what number should I set for PV noise level?

    Hello loghmani,
    If your output is saturating try to reduce your relay amplitude and/or reduce the gain Kc of the PID controller before starting the autotuning procedure.  You can find more information about each of the parameters that you've inquired about at this KnowledgeBase article.
    I would recommend taking a look at the General Auto PID Simulator.vi example.  You can find this example by doing a search in the example finder or by clicking linked example at the bottom of the detailed help page of the Autotuning PID.vi.
    If you haven't looked at the PID user manual that also contains useful information on setting up PID algorithims and Autotuning.
    David A
    National Instruments
    FlexRIO Product Support Engineer

  • How to use the pid vis with a two-state output

    Hello
    Could someone tell me how to regulate the temperature of a room with
    a two-state heater (on/off), using the pid vi's.
    Thanks,

    >> Could someone tell me how to regulate the temperature of a room
    >> with a two-state heater (on/off), using the pid vi's.
    In <[email protected]> [email protected] (Helmut Hullen) writes:
    >You don't need the PID. A simple 2-state control does the work.
    ^^^^^^ ^^^^^^^ ^^^^^^^
    Frankly, I tend to agree. However, if you _need_ PID control and _if_
    your two-state heater is solid-state switched, there are other
    options. For example, commerical PID temperature controllers with
    zero-voltage switching (ZVS) operate by generating a slow enabling
    pulse, then achieving proportional control by varying the duty cycle of
    this enabling pulse. For instanance, if your enabling pulse is running
    at 10-Hz, with 50% duty cycle,
    then your heating element will be on for
    50% of the time every 0.1 second.
    You can use a programmable timer (National includes two on their MIO
    cards) to program the 5 or 10 Hz output and its duty cycle. You might
    have LabView execute the PID subVI once every two or three seconds to
    adjust the duty cycle on the programmable timer so as to minimize the
    feedback error=(tempSetPoint-currentTemp).
    Why are you wanting to use LabView for PID temperature control in the
    first place? There are some very good PID temperature controllers
    (programmable through a serial port) with built-in solid-state ZVSs
    and readouts for $900 that you can buy. They'll fit right into
    a control panel, display and all. Sure beats messing with a
    programmable timer card and its outputs, plus you get a digital panel
    readout to boot.
    /\ Mark M Mehl, alias Superticker (Supertickler to some)
    <><> Internet: [email protected]
    \/ Preferred UUCP: uunet!iastate.edu!mehl
    Disclaimer: You got to be kidding; who would w
    ant to claim anything I said?

  • Quiero saber sobre Control de tranferencia de calor con PID

    Hola Amigos quisiera saber si uno de ustedes tiene algun programa en Labviw 8.2 donde pueda controlar la temperatura con PID usando la DAQ 6008, si me puediesen ayudar le estaria muy agradecido y si no de alguna manera, gracias por su tiempo, nos vemos

    Hola Antonio el control PID, es lo mismo si es para control de calor o nivel de un tanque o cualquier cosa, la diferencia radica en que la planta que controlas es diferente y por lo tanto los paramentaros cambian pero el principio es el mismo, por lo que puedes utilizar los ejemplos de PID en Help>>Find Examples para ver cómo puedes utilizar. La forma más fácil de realizarlo es si tienes el toolkit de control PID
    Este foro te podría ser de interés:
    http://forums.ni.com/ni/board/message?board.id=6170&message.id=1932
    En esta liga puedes encontrar en español un poco de información sobre lo que es PID.
    http://es.wikipedia.org/wiki/Proporcional_integral_derivativo.
    También estos links te pueden ser de gran utilidad:
    Ready-to-Run PID Temperature Controller
    PID Theory Explained
    Using the LabVIEW PID Control Toolkit with the LabVIEW Control Design and Simulation Module
    PID Control
    Complete resources for a PID control system with NI M Series devices
    PID control
    Configuring a Non-Linear Process Control System using National Instruments Products
    Con respecto a los parámetros específicos que debes de usar dependen completamente de tu planta (sistema térmico a controlar)
    Saludos
    Benjamin C
    Senior Systems Engineer // CLA // CLED // CTD

  • Temperature controller

    I am new to labview and I am trying to create a temperature controller. I looked over the PID temperature controller example and have most of my VI working. What I would like to do ideally is have a user input a set of arbitrary times and temperatures via a two column table. This set of data would them be interpolated and a graph created just like the simulate arbitrary signal VI does. After this data is loaded by a push button on my VI by some push button on my VI, the VI would compare the measured signal to the desired signal input by the user. If the measured temperature was less than the desired signal a boolean 1 would be output, which would turn on a heater. My two main problems are setting up a table on the front panel of my VI to accept and create the desired "temperature curve", and graphing the actual temperature on the same graph as the desired temperature(s). Currently I have the desired temperature being input in the Simulate Arbitrary Signal VI's properties, and it compares and outputs properly to the heaters. Everything works fine, but I would like to graph both data sets on the same graph. My actual measurements are single 32-bits, while my desired signal is a dynamic data set. Any help would be appreciated
    Thanks-
    Bill

    JRA i am posting my VI as you suggested me on 4/7/2003
    Attachments:
    HITACHI_F-2000_TEMPERATURE_CONTROLLER.vi ‏110 KB

  • Multiple Input Multiple Output Fuzzy Logic Controller

    I am designing an autotuning PID temperature control system whose PID gains are adjusted using a Multiple Input Multiple Output (MIMO) Fuzzy Controller. I am unsure how to set up specific inputs and how to use specific outputs when there are multiple inputs and outputs. Specifically, my Fuzzy system has two inputs and three outputs.
    For the input, I have two 1D arrays of scalars (doubles) which I have used to build an array and concatanated the inputs to the array. How do I configure which values of this array are used as each specific input value to the fuzzy system?
    Similarly, for the output, the fuzzy system gives three output values which are used as the PID gains. How do I configure these such that they are in the right order to be used as the PID Gains of the PID VI?

    Hi natsmi,
    You can find some examples by navigating to:
    C:\Program Files (x86)\National Instruments\LabVIEW XXXX\examples\control\fuzzy
    Some of them are at least MISO systems and might be helpful to clarify some ideas. You can also find them using the Example Finder from LabVIEW (By going to help on the top menu, and then Find Examples). There you can go to the search tab on the left and type in fuzzy.
    Hope this helps.
    Regards,
    AGJ

  • Scripting an interactive labview VI

    I have a large top-level VI that controls and performs data collection for many different devices and over different interfaces. I currently do all of the control interactively through the front panel UI. I would like to have my VI be able to run off a script... not an external scripting language, but something like the Setpoint Profile VI's that come with the PID control toolset.
    So obviously, implementing the Setpoint Profile VI's for my temperature controllers is pretty trivial. My problem is that I have many other devices which aren't necessarily controlled the same way. For example, for PID temperature control, you would just continually set the setpoint at a given interval, but for RS232-controlled pump, you would onl
    y want to send a signal to stop or start it. I would like to have the scripting be a feature of the existing interactive VI (so I can toggle between automated and manual modes with a switch), and hopefully not have to have completely separate code.
    So bascially I am wondering if anyone has a good strategies or examples for doing such a thing. Here are some issues I can think of:
    - is it better to have one huge script that has the settings for all devices, or should I have separate scripts and synchronize them?
    - I was considering scripting the UI itself, kind of like a "ghost user" using property nodes, but recent discussions on this board tell me this is not very efficient.
    - are my expectations realistic?
    thanks in advance for any advice.

    Hi,
    I think that you should implement a similar idea to the SetPoint Profile VI. One of the inputs to this VI is an array of clusters where each cluster has the time-value pair (setpoint). One approach would be to change the cluster to contain time and values for each device you are trying to automate. For example, you would have time, value for the temperature control, value for the pump and so on. Since the value for the pump would be on and off, you would want to have three values: ON, OFF and IGNORE(do nothing to pump at this time). Having an array of cluster with each cluster containing time and values for all your devices will allow you to synchronize the flow of your application since the time value will be common for all the devices.
    Good luck
    with the application. I hope this helps.
    Sincerely,
    Feroz
    National Instruments

  • Thermocouple output fed into two devices

    I'll research on my own, but thought I'd post here in case anyone has had similar needs/solutions.
    We have an extruder that we'd like to monitor and log data on. The majority of the signals are J and K type thermocouples that are fed into PID temperature controls. Unfortunately the PID controllers do not have retransmitter analog ouputs to scale the readings into V or mA. That would have been very convenient to interface to the appropriate DAQ hardware.
    Thus, is it possible to connect a thermocouple input based DAQ to the same thermocouple inputs to on the PID controllers without affecting the signal? One thermocuple feeding two inputs- one to the PID, the other to the DAQ. I do not have the input specs yet for the PID controllers, presume the are >1Mohm. I would be using the appropriate thermocuple wire type as needed.
    Thanks
    -AK2DM
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    "It’s the questions that drive us.”
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

    Once I saw a box to do it. It was custom made (with some nice OPs and lots of thoughts on how to avoid parasitic thermo emf)  to deal with µ-Volts provided by the TCs (and adds only about 2K additional error...)
    However the only correct way I can think of, is to use a TC conditioner with CJ and an 'regular' output (20mA/X-Volt) that is capable to feed two inputs. Most controls can be configured to read theses standard outputs instead of a TC.
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

  • Which vi is best to use from pid toolkit to control 8 temperature zones?

    Hi:
    I recently bought LabVIEW 8.5 w/ PID toolkit but I can't find the "pid.vi" in its examples. Although I have never used this pid.vi, I heard  that this one is a good vi to control multiple  temperature zones. Help me if I am not searching this vi in a right way or place.  I am using NI 9264 module kit for the output power. My input is two NI 9211 thermocouple temperature module.
    However my question is the same as of subject: Which vi is best to use from pid toolkit to control 8 temperature zones?
    I also see in the readme file of NI 9264 that it can give a current drive of +/- 16mA for all channels. What does that mean? Since I'll be using a solid state relay which drives on 30mA/per channel.
    Thanks for any help in advance.

    Hi HopeS,
    Unfortunately, PID control theory is not a simple subject, and there is no single answer on parameters, because every system differs in their response to inputs. That's why the P, I, and D parameters are adjustable. We do have a PID autotuning VI found in the same palette which will launch the AutoTuning wizard to help you get mor precise parameters once you have reasonable values to work with already. But again, you need to know a reasonable set of values to operate with for P, I, and D. Once you use the Autotuning Wizard to get new PID values, I would recommend replacing the VI with the normal PID VI and manually entering in the values you found through autotuning. Then you can use an array of all your temperatures (process variables) as the input to the VI. The "simulated" case of the Ready-to-Run Temperature Controller example you found is about as simple as it can get.
    And the output of the VI is just going to be based on the mathematical transformations going on within the VI. Since you want a analog output current, you'd rescale that output if necessary and wire it into a DAQ Assistant VI (or DAQmx Write). I'm not sure I understand what you mean with not having to "play with the VIs" - this application will require some small amount of modification to fit your hardware.
    Regards,
    Vijay S.
    National Instruments

  • Error 53 PID Autotune with Real-time fieldpoint control

    Hi!
    I cannot perform the autotuning PID parameters in fieldpoint cFP-2000 (Real-time control).
    It gives me the error 53 as you see in the attachment file. It seems to be because of the autotune wizard vi...???
    How can i solve this problem?
    Thanks for your help!
    Nunix
    Portugal
    Attachments:
    error 53.bmp ‏166 KB

    Hello,
    LabVIEW RT does not currently support the autotuning feature, because the procedure invokes a wizard that requires user interaction. LabVIEW RT does not support this type of user interface. This wizard is tightly integrated with the PID function itself and would require significant redesign to work in LabVIEW RT.
    It is the autotuning VI itself that is not compatible with LabVIEW RT. You can use the "PID Autotuning.vi" as long as you are not targeted to your RT engine. Run your VI in development mode with the "PID Autotuning.vi" in your code. After you receive your tuned gain settings, replace the autotuning vi with the normal "PID.vi" and use your tuned gains for the inputs. You can now target to your RT engine with tuned gains.
    Hope it s help.
    Isabelle
    Ingénieur d'applications
    National Instruments France

Maybe you are looking for

  • Use Plan data if actual data is not available(By month)

    Hello All, We have a cube which stores the actual and plan data by month. There will be plan data for all the months of the year in the cube whereas the actual data is only populated for that month at the end of the month. So, there will not be any d

  • Thermotron TCP/IP interface

    Has anyone converted the Thermotron drivers for Chamber control to VI's that will run in LabView ver 9 or 10? Specificaly I an attempting to interface with a Thermotron 3800 controller via TCP/IP. Solved! Go to Solution.

  • RH9: Can't create a new RoboHelp Style for tables

    I'm using TCS3 (FM 10, RH9) in a Windows XP environment. I have some tables in FM10 that I want to map to a RH style.  I'm on the Conversion Settings dialog box, and don't have a RH style to map to.  In RH7 I was able to create a new RH style and the

  • IPod Touch location service doesnt work at all.

    Hi guys, just having this issue, I have my iPod touch since 8 months ago, It worked fine, perfect. I upgrade it to iOS 5 and it worked fine, it was perfect. But today the location service doesnt work, I triend with the google maps app, the Facebook a

  • China Nokia N8

    I received a gift of a Nokia N8 from a friend. This was after I had bought a Nokia E7. I wanted to protect my new N8 so I put in a  power-on password. When I switched off the the phone and switched it back on, it asked for the password. I keyed in wh