LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

control signal

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!

0 Kudos
Message 1 of 7
(3,695 Views)

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 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 7
(3,652 Views)

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).   Picture 5.png 

0 Kudos
Message 3 of 7
(3,640 Views)

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. 

0 Kudos
Message 4 of 7
(3,626 Views)

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 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 5 of 7
(3,620 Views)

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

0 Kudos
Message 6 of 7
(3,610 Views)
Ok, I now realize the Temp signal probably won't be as smooth as I'd thought (at least on the millisecond scale in which LV operates).  I was envisioning a slow fluctuation (a few degrees over hours) in ambient temp, but even with the heat sink of a water bath, it's not likely to be very smooth, unless I delay data acquisition to the per second range.  Then to avoid the risk of of too long a time delay in response, I wanted some control like "start turning it off halfway between target and max."  Is there such a (nearly) continuous mechanism/control in LV?  (I know I've been rambling, and likely not seeing the obvious, but I've been home, sick, for the last few days, and cold remedies only lift the fog to some degree.  I apologize for my synaptic sloth.)
0 Kudos
Message 7 of 7
(3,580 Views)