11-21-2009 06:01 PM
I'm trying to control a heating element by the difference between the user-set target temperature and the (absolute) extreme (user-set) temperature. I've considered testing for cases using first and second derivatives. From some reading, I've come across the idea of PID, but I can't view any working, accurate samples to even see if this is where I want to go. I'm in the planning stage, so I've only minimal code. My first step is "Intake Temperature Signal" (currently simulated by a gentle sin wave, just for a sim). Second, "Analyze Temp Signal"; third, "Analyze Temp Derivative(s)"; fourth, "Combine Signals" (somehow); and last, "Re-Analyze (or confirm) Temp Signal".
Any directions to where I can see good examples of PIDs, or confirmations that this is the direction that will take me where I want to go?
Thanks!
11-23-2009 04:57 AM
Emm wrote:I'm trying to control a heating element by the difference between the user-set target temperature and the (absolute) extreme (user-set) temperature. [...]
I don't get this sentence. A control loop always checks the current value and compares it to a desired value and calculates a "set". This value is used to influence the next current value which is acquired in the next iteration of yor control loop.
Using a sine wave for simulation is not good for control loops since this is not really a "real signal" for your PID algorithm. I think you first read about some basics on control theory.
There are many examples installed with the PID toolkit. You can find them using the example finder (Help >> Find examples)
hope this helps,
Norbert
11-23-2009 09:03 PM
Thanks for your help.
I guess I should have said "trying to control correction rate" maybe. I don't need an exactly constant temp, but I do need it not to overshoot the max or undershoot the min of a 6˚C range.
I'm just using the sin wave to be able to set up the Block Diagram.
I looked for the PID toolkit, but the examples all say they need additional stuff I don't/can't have. Apparently, there is so much that really doesn't work on the Mac, despite the "Mac version".
I get general control theory, but I'm not sure how to implement it in LabView. Here's what I've tried for the PID part. I'm sure it's a hack. The input here is the waveform, and the outputs are subsequently added to the reformed waveform. I didn't want user-set PID constants, I wanted to use the derivative (heating/cooling rate) to control the correction rate. E.g., if T = Tmax and ∆T≠0, (correction rate).
11-24-2009 02:26 AM
My system is basically a "water bath on a hot plate". It's not an isolated system, so room temperature variations due to HVAC cycles, occupation and movement in the room, and outdoor temperature cycles are common. One lab I'm in changes ±3˚C, according to an alcohol thermometer in a thermal block recorded manually during lab hours over several months. My other lab probably changes as much or more, but is also known to be up to 5˚C cooler on a regular basis. (New building, same wing; idiosyncrasies!) The system needs to adapt to these effects, but not allowing cooling or heating to extend beyond the user-set range. I know exact constant temperature would be a ludicrous request, and it's not particularly necessary. I'd thought of pitting two VWR water baths against each other, but none have any computer-connect-ability; my only chance there would be in finding an external pump to attach to the circulating ports on one that had a serial link. Not likely. I had considered motor-control of a hot plate knob, but I don't know enough about such things to build one that's not permanently attached to the hot plate, and not too fragile to be stored and attached by novices. My simplest idea is to use a heating element for heating, and ambient temperature for cooling. (Still have to find such an element, though.)
Hence, my wish to use current temp as well as rate for a double trigger, but I often over think things, and my cases spiral uncontrollably. (I was up to 7 and counting when I posted this question originally.) I'd originally planned using a PID of some sort, but I don't want user input for the constants. That and all my PID examples are missing, is why I'm stuck.
11-24-2009 03:11 AM
I am not sure if i now understand your request better.
First of all, did you install the PID toolkit after LV? If not, please reinstall the toolkit. Otherwise, try a repairinstallation and check if you selected the LV examples.....
Next: Why i don't understand your request.
Room temperature does not matter. Your task is: You have a physical value you want to control (in your case: temperature). So you measure the current value, compare it with the desired one and then decide on how to react.
The problem you are facing is that your controlled system has different perturbations (e.g. different room temperature) and delays (how long does it take from the command "heat" until your system really increases temperature??). Those perturbations have to be taken into account in your control algorithm!
The PID control toolkit helps you in this task, but you have to develope/choose the correct algorithm and parameters nevertheless.
So your task is to find out about delays and other possible issues in your controlled system. This will help you in getting the correct algorithm. Having the algorithm, you still have to parametrize it correctly. You can find many white papers about things like this (example here). The work you have to do here is: make sure that the overshot of your controlled system does not exceed x% of your "value to set". Achieve the change within a certain amount of time......
So you see that things you currently thinking about are (at least in my opinion) too early in the step you are currently in.......
hope this helps,
Norbert
11-24-2009
09:57 AM
- last edited on
03-27-2025
08:54 AM
by
Content Cleaner
Hello,
The Mac PID toolkit is no longer available as a separate toolkit for Mac as indicated on our product page for that toolkit. We also have a page which lists operating system support for the various versions of LabVIEW and the associated toolkits. On that page, it lists the PID toolkit as only available for Mac and not Mac OS X. This is referring to the Classic OS (OS 9) and was based on the PowerPC architecture. In order to install that toolkit on a current Mac, it would need to use the Classic OS and would also require Rosetta since all new ones are Intel (x86) based. This has not been tested because the Classic OS is only available to the PowerPC computers with OS X 10.5 or earlier. Yes, it is possible to run the Classic OS in an emulation environment but that is not supported. Currently, the only way to get the most recent version of the PID toolkit for the Mac is to install the real-time module version 7.1. Unfortunately, this is no longer being developed for the Mac platform which means that any LabVIEW version later than LabVIEW 7.1 cannot access the toolkit. The examples in the Exampled Finder are normally the same between platforms which means that any example you cannot open is either because you are lacking a toolkit, or that toolkit is not available on the Mac platform.
-Zach
11-24-2009 08:06 PM