Mult-channel PID control using PID Toolkit

I am controlling the light level in six locations (zones) using light sensors, dimmable ballasts (which respond to a 2 to 10 VDC signal) and the PID toolkit.  In my VI, I loop through 6 times (once for each zone) to control the light levels.  I use the simple PID.vi to determine the next setpoint for the dimmable ballast on the lights.  My problem is as follows, I think:
The PID algorithm uses past response and the current difference between the measured variable and the setpoint to calculate the next setpoint.  If my understanding is correct, then I am confusing the PID algorithm by calling it with 6 different data sets.  It is almost as if I need 6 separate PID functions, one for each zone. 
Perhaps I am wrong about the operation of the PID algorithm.  Can someone straighten me out?
Attached is a snapshot of the VI.  The FOR loop goes from 1 to 6, that is, once for each sensor zone.
Message Edited by rgentry on 04-29-2007 09:11 PM
Attachments:
temp.jpg ‏92 KB

rgentry,
The PID has two modes of operation: Single Channel and Muti-channel. The way you developed your algorithm, you are using single channel algorithm with multiple setpoint and variables. This will not work properly since LV will not keep the internal states correct for each channel.
To fix this, it is pretty simple. Remove the For Loop and provide the whole 1D array to the PID.vi. This will enable the "multi-channel" mode and every time you call your VI, it will keep the internal states for each channel, as if you had 6 different PIDs in parallel. Notice that the interpolation also will work the same way, you just need to remove the build array primitive.
Hope this helps!
Barp - Control and Simulation Group - LabVIEW R&D - National Instruments

Similar Messages

  • Multi-channel Sequential Controlling Pulse Generator Design

    Hello, all,
    I need to design a Labview problem as a Multi-channel Sequential Controlling Pulse Generator and output through DAQ card. The required digital pulses are showns in the attachment.  Time scale values are shown on the top as an example. CLK's duty cycle is 0.5. x1 and x2's value need to be programable. 
    Could anyone give example codes? Or, give me any idea to program these pulses?
    Attachments:
    clock.png ‏22 KB

    Duplicate
    http://forums.ni.com/t5/Multifunction-DAQ/Multi-channel-Sequential-Controlling-Pulse-Generator-Desig...

  • Configure Live Migration Multi-channel with SW QoS

    I'm a bit confused about what is needed to properly configure Live Migration using SMB multi-channel with QoS, using a SCVMM logical switch. Where I'm confused, coming from a VMware background, is how many and what type of vNICs that I need. I'm thinking
    I need two of some virtual NIC type, each with a unique IP address, which SMB multi-channel for LM would use. I would then somehow tie a SW QoS policy to the vNICs to ensure LM traffic doesn't stomp all over other network traffic types.
    Any explanations would be most welcomed.
    Blog: www.derekseaman.com, VMware vExpert 2012/2013

    Hi there.
    Hopefully this guide should give you a detailed explanation of the configuration of this setup, explaining logical switches, port profiles (virtual and uplink) and QoS:
    http://gallery.technet.microsoft.com/Hybrid-Cloud-with-NVGRE-aa6e1e9a
    -kn
    Kristian (Virtualization and some coffee: http://kristiannese.blogspot.com )

  • K2 multi-channel w/ Logic effects: What am I doing wrong?

    Hello everyone,
    I'm having a hard time wrapping my head around using K2 as a multi-channel instrument in Logic 7.1.1. The problem is not with setup, as I believe I have everything setup correctly (I've duplicated "Inst 1" 16 times, assigned a multi-channel K2 to the instrument I/O, and K2's outputs 3-16 assigned to stereo Aux tracks).
    When doing this, my first discovery was that Kontakt only offers 16 outputs, thus meaning I can only use 8 stereo instruments per instance, not 16. Is this correct? Also, I noticed that I cannot assign an Aux to output 1-2. I assumed this was because output 1-2 runs though Logics "inst 1" channel independently, however because I'm using Logic instrument 1 for all "16" K2 midi channels, any effects or sends I use on midi channel 1 effect all K2 instruments! Is this correct? If so, this leaves me with only 7 instruments per multi that I can route through auxes, which makes me wonder if I'm really saving that much CPU using multi instruments over individual instances, which are by far easier to use. By the way, do multi-channel K2 instances use more memory than stereo instances?
    Here is what I'm trying to do. To save on CPU resources, I'm trying to load all my K2 instruments for my song into one multi, such as a clean E-guitar on channel 1, Bass on channel 2 (out 3-4), drum kit on channel 3 (out 5-4) and be able to send the Clean E-guitar to a guitar amp plugin on a bus, the Bass to a bass amp plugin on different bus, and the drumset to a different effects bus, etc.
    What is the best way to do this? The only way I've found is to send midi channel 1's output to 3-4, channel 2 to 5-6, channel 3 to 7-8, etc, and not use any instrument for output 1-2. Is anyone using multi-channel K2 instances successfully? Is the only way to do it? Can I only load/use 7 stereo instruments in one multi-channel K2?
    Thanks in advance for your reply.

    Hello everyone,
    I'm having a hard time wrapping my head around using K2 as a multi-channel instrument in Logic 7.1.1. The problem is not with setup, as I believe I have everything setup correctly (I've duplicated "Inst 1" 16 times, assigned a multi-channel K2 to the instrument I/O, and K2's outputs 3-16 assigned to stereo Aux tracks).
    When doing this, my first discovery was that Kontakt only offers 16 outputs, thus meaning I can only use 8 stereo instruments per instance, not 16. Is this correct? Also, I noticed that I cannot assign an Aux to output 1-2. I assumed this was because output 1-2 runs though Logics "inst 1" channel independently, however because I'm using Logic instrument 1 for all "16" K2 midi channels, any effects or sends I use on midi channel 1 effect all K2 instruments! Is this correct? If so, this leaves me with only 7 instruments per multi that I can route through auxes, which makes me wonder if I'm really saving that much CPU using multi instruments over individual instances, which are by far easier to use. By the way, do multi-channel K2 instances use more memory than stereo instances?
    Here is what I'm trying to do. To save on CPU resources, I'm trying to load all my K2 instruments for my song into one multi, such as a clean E-guitar on channel 1, Bass on channel 2 (out 3-4), drum kit on channel 3 (out 5-4) and be able to send the Clean E-guitar to a guitar amp plugin on a bus, the Bass to a bass amp plugin on different bus, and the drumset to a different effects bus, etc.
    What is the best way to do this? The only way I've found is to send midi channel 1's output to 3-4, channel 2 to 5-6, channel 3 to 7-8, etc, and not use any instrument for output 1-2. Is anyone using multi-channel K2 instances successfully? Is the only way to do it? Can I only load/use 7 stereo instruments in one multi-channel K2?
    Thanks in advance for your reply.

  • 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

  • Problem using PID toolkit and control design toolkit to design the closed loop system. (for DC motor closed loop)

    Hi, i have facing some problem during i upgrade a project. This project is an opened loop system, it only achieved up to controlling the speed of motor, detecting the speed of motor, and switching the direction of motor while controlling the motor (This motor is a 12 VDC motor).
    In order to improve the project, closed-loop dc motor control system will be implemented to correct the error of the motor's speed and maintaining the speed for the initial setting. I would like to use PID control method to do the closed loop system.
    I already installed the PID toolkit V8.2 and control design toolkit V2.1.2, and i'm using DAQ usb 6221, LabVIEW 8.5
    Below is my problem.
    http://img177.imageshack.us/my.php?image=howtocreatethesetpointnx2.jpg
    question: 1. How to generate a icon for set point? my setpoint is duty cycle...
                    2. How to feedback the output duty cycle to summing junction?
    below this is my basic concept
    http://img237.imageshack.us/my.php?image=closedloopbz5.jpg
    Problem 2:
    http://img357.imageshack.us/my.php?image=problem1yk2.jpg
    question: Why PID toolkit icon cannot wire to cd series.vi?
    Below is my original program...
    http://rapidshare.com/files/140538836/pwm_generate-final_PSMII.vi.html

    Hi Cyrus
    Have you had the opportunity to see our
    developer zone site on the PID toolkit? This article also has sample
    code at the bottom that may help you in developing your application. I
    have also linked below knowledge bases regarding setting a point
    profile and generating a PWM from a digital output line. 
    PID toolkit
    http://zone.ni.com/devzone/cda/tut/p/id/6440 
    How to generate a set point profile:
    http://digital.ni.com/public.nsf/allkb/125F27AC143B6AFD86256C2B0004A4DC?OpenDocument
     How to generate a PWM on a digital output line:
    http://digital.ni.com/public.nsf/allkb/1561D31534F07D608625727900391114?OpenDocument 
    Thank You
    Eric Reid
    Thank You
    Eric Reid
    National Instruments
    Motion R&D

  • Throttle body PID control using pulse width modulation

    Hello all,
    I am trying to do a PID control for a throttle body (using pulse width modulation) for a set value of feedback voltage. The process variable is the pulse width duty cycle. The throttle body is expected to be fully open at a feedback voltage of 5V and pulse width duty cycle of 42.5%.  When I use the highlight execution using the attached file, I can see the throttle body fully open (the values observed are: PID output 42.5 %, feedback voltage approximately 4.7V). However, when the highlight execution is unclicked, the throttle body flutters in the closed condition (still PID output 42.5%, feedback voltage approximately 0.9 V). Can any one please help by suggesting any modification to this attached file to make this throttle body respond to the set value of feedback voltage.
    Many thanks 
    Ajith
    Attachments:
    Throttle body control using PWM technique - PID.vi ‏525 KB

    How did you determine your P, I, and D gains? If you have not tuned your controller, you'll get poor performance. Running with execution highlighting will slow down the execution, which will change the effect of the gains. I would start with pure proportional control (I and D = 0) with a small proportional gain, and see if it responds in approximately the way you want. If so, then your code is probably correct, and you just need to do a full tuning to get good performance. There are many resources available on the web, on this forum and elsewhere, for PID tuning. Note that since your code uses a simple PID example, and not the one from the PID toolkit, the gains do not have the units that are used in many tutorials so you'll have to correct the calculations to compensate.

  • Can you control servo valves without the PID toolkit?

    I need to be able to control servo valves using labview, but I don't have the PID toolkit. Is there an alternate way to control servo valves without the toolkit? Any help would be greatly appreciated.
    Thanks

    Well first thing is to get a basic understanding of what a PID controller is doing. There is some discussion about PID on the NI web site, and a search of the net will also provide much information. What you are controlling with your valves will determine the complexity of your control solution and whether learning just the basics of control theory and PID in particular or whether you need to know more. It really isn't wasted effort, any success in implementing a PID control system, regardless of purchased toolkit or "roll it yourself" will need you to understand that basics. Even if you had picked up someone elses project that was complete except for "tuning" the system you would find that getting the system to run the way you need it to requires some knowledge and frequently a lot of patience. Good luck and keep asking questions.
    P.m.
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

  • How can I use all tracks from multi-channel source audio with Multicam clips?

    I cannot figure this out. Working in Premiere I'm prepping for a 2 camera show, with typically 4 to 6 track dual-system audio recorded by the sound guy. I can sync, and make multicam clips any number of ways–whether sync by timecode, sync by audio, or eyeballing–but whenever I edit using the MC clip, Premiere mixes down all the audio channels into a stereo single track, and I cannot pick and choose which audio track from the original to use. With 2-5 people mic'd on lavs, I need to be able to choose which audio is either cut in or heard at any given shot.
    Is there any way to have control in multicam clips over which track of audio gets edited into the timeline, or even: that all tracks of audio get cut in? It's very important for the editors to be able to see waveform (which also disappears for some reason in the mixdown) and pick and choose which audio is heard?
    I'm sure this might be a simple fix, but I cannot get my head around it for workflow purposes for my assistant editors. We need to use multicam, but this audio thing is driving all of us crazy. None of us can figure out how to have a multicam clip and use it with control over what audio is cut in.

    True, but what I need to be able to do is have my multicam sequence in the source monitor, and cut into my working sequence with either just the audio I need from the sound guy's multi-channel WAV, OR cut in all the sound and from then I can just enable or disable what I need or don't need. But also be able to match back to the Multicam source from my working sequence.
    I don't want to have to open the synced sequence, and razor blade the things I need and have to copy and paste into my working sequence in order to have the full spectrum of my multi-channel mono lav WAV files...with their waveforms visible.
    Essentially, I want my Multicam clips to load in the source monitor, and the ability to cut them into the working sequence without it mixing down the audio into a single track with no visible waveform–which is what it is doing currently. Can I choose to edit in either ALL of the tracks of the WAV file along with the camera shot I want, or control which audio gets cut in?

  • Getting the labview 8.6 pid toolkit to work with labview 8.5 student edition

    Hi I am working on a project for college,I just bought the labview pid toolkit 8.6 but it wont load as i use labview 8.5 student edition,am i stuffed or can i get a version to work with my edition and send this one back??hat is the best thing to do?
    I am badly stuck please help.I cant afford to pay for an upgrade to 8.6?
    Thanks

    You could try to do a File->Save for Previous Version on the PID VIs that you want to use.  However,
    if one of the PID subVIs was saved without a block diagram then this
    won't work. Also, I'm not sure if the toolkit is backwards compatible
    in this way. Also, when you do this you will effectively be saving the
    VI hierarchy into a new location.
    However, your best bet (and my recommendation) is to contact your local NI sales rep to see if they can get you a CD with the 8.5 version. Since you have a license for the toolkit it's probably not going to be an issue.

  • RT PID toolkit does not match standard PID toolkit for arrays

    Why is the PID toolkit from the RT installer different than the standard PID toolkit?  Attached is a VI that demonstrates that the RT PID toolkit acts differently for array inputs than scalar inputs.  You must have the RT PID toolkit installed; the PID toolkit from the "Toolkit Software" disk doesn't have this issue.  Run this VI, then click the "Auto" button.  Note that the single output response is correct, but the array output response gets "stuck" on the lower bound of the output.  Try multiplying the P tuning parameter by 10 (change it to -0.04) and note that now both PID loops respond - but they start at different initial values!  Now, add an element to the boolean shift register, and wire the "Auto" input of the PID VIs to the new second element - both PID loops now respond identically.  Install the PID toolkit from the "Toolkit Software" CD and these issues vanish.  What's going on here?  Which version of the PID toolkit should I use in my RT applications?  This is all LV 8.2 from the November 2006 Developer Suite CDs.
    Attachments:
    PID test.vi ‏23 KB

    Hi Luke, and thanks for your help.  I'm doubtful that the two versions are identical, even without the aid of "Compare VIs" - I've attached screenshots of the upper left corners of the two versions.  However I might be missing something buried in the deeper levels.
    This affects my application in that I have a system that can run in several modes; in some of them the controller is turned on, in others it is turned off.  When I switch to a mode in which the controller is turned on, I want to initialize the output to a specific value that corresponds to that mode, and let the controller adjust from there.  This is why I'm using the shift register: to turn on the controller one loop cycle after setting the manual output value.  I'm open to other suggestions but this has worked fine for me for years with previous PID toolkit versions.  Similarly I've never had problems before with clipping at one end of the range, and I don't think it's caused by the difference in value between the setpoint and process variable, since it's affected by the lower bound of the output.
    The Readme for the LabVIEW PID Toolkit 8.2 suggests that many changes were made in the 8.2 PID toolkit, including calling a compiled C library for the array version, although I haven't seen anything that suggests this is the case in either version of the PID toolkit from the 8.2 CDs.
    Message Edited by nathand on 04-05-2007 08:43 AM
    Attachments:
    PID toolkit.GIF ‏16 KB
    PID RT.GIF ‏18 KB

  • Reg:Whether to use BPM or not when the channels are controlled externally

    Dear All,
    My scenario is File to File and for this the channels are controlled  externally.
    This is achieved through the  Abap proxies to Http receiver scenario, where udf is being implemented for this.
    UDF:
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey trig = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/HTTP", "UrlParamOne");
    DynamicConfigurationKey trig1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/HTTP", "UrlParamTwo");
    DynamicConfigurationKey trig2 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/HTTP", "UrlParamThree");
    DynamicConfigurationKey trig3 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/HTTP", "UrlParamFour");
    conf.put(trig,action);
    conf.put(trig1,party);
    conf.put(trig2,service);
    conf.put(trig3,channel);
    return "";
    If the value of the Action is START then the existing communication channel should be stopped and restarted  again .
    If the value of the Action is STOP then the stop action should be performed.
    For this I have implemented two mappings  and condition is being given in Interface determination
    so as to have the splitting of messages when the start action is performed.
    Can anyone suggest me how to implement this by using a single mapping or this could be achieved only through BPM?
    Thanks in Advance,
    Lavanya .B
    Edited by: Lavanya Balanandham on Aug 4, 2010 2:24 PM

    Hi ,
       My requirement is ,I need to merge two mappings into one mapping without using BPM.
    My File to File scenario communication channel is controlled externally by using Proxy-to-Http scenario.
    For this I have used two mappings say when the value for the action is START then the File receiver communication channel should be stopped(which is already polling) and again the Action START should passed to the Receiver File Channel to start again using the proxy-http scenario.
    Now I need to merge the two mappings into a single mapping so as to perform the above stated flow without using BPM.
    lavanya

  • Multi-channel imaging using NI frame grabber

    We have a IMAQ 1408 being controlled by LabVIEW 8.0.
    We wanna setup multi-channel imaging. All the channels work individually. However, when I was trying to show two channels simultaneously, only one channel works, and I got the following error message:
    Error -1074397150 occurred at IMAQ Grab Setup.vi
    Possible reason(s):
    NI-IMAQ: A timeout error occurred while waiting for the specified event. If waiting for an image, verify that all video data is acquired within the timeout period. If waiting for a signal, verify that the signal assertion occurs within the timeout period.
    I sometimes also get another error message asking me to assign different buffer to both channels. I understand that IMAQ 1408 has only one analog to digital converter (ADC) to digitize the incoming video. It can acquire from up to four different cameras, but only from one camera at a time. 
    I don't mind making the frame rate half. So I'm thinking of showing one channel at a time and make the two channels work alternantly. But I need to know how to confige the channels to make this happen.
    Solved!
    Go to Solution.

    Hi Andrew,
    Thanks for the reply! I've read the page. But it doesn't tell me how to assign the buffer.
    Please see attached for my code.
    Here is another error I got from channel 2:
    Error -1074397158 occurred at IMAQ Grab Acquire.vi:10
    Possible reason(s):
    NI-IMAQ: No buffers configured for session.
    Thanks!
    Attachments:
    grab_dual channel 2.vi ‏63 KB
    grab_dual channel 2.jpg ‏41 KB

  • How to best use Multi-Channel Plug-in: Miroslav Philharmonik

    Hello everyone,
    I recently purchased the Miroslav Philharmonik sound library and am learning to use it. You can assign different instruments and sounds in up to 16 different channels within the plug-in. I've quickly learned that this is a very important feature to use in order to have, for example, all the different violin articulations (e.g. legato, staccato, pizzicato, detache, etc.) at your disposal at once and within one instance of the plug-in. The only problem is, I'm not really sure how to manage changing MIDI channels within the arrange window.
    Let's say I have the 4 previously mentioned violin sounds loaded into Channels 1-4 in the Miroslav plug-in, which I have inserted into the Channel Strip for Inst 1. Let's say I play four bars of legato, then want to switch to staccato for four bars. How do I do this? I know I can switch the MIDI Channel from 1 to 2 in the channel strip info window, but is this automatable for play-back? I have just a basic M-Audio MIDI keyboard with pitch bend, mod wheel, octave +/-, advanced functions button, and volume. I've never worked with a multi-channel plugin before and would love any and all suggestions on how best to use this feature! Thanks!
    David

    Doesn't the Miroslav Plug In support keyswitches? Using these there would be no need to setup a Midi channel for each articulation as all articulations would reside in the same patch on the same Midi channel and you would just toggle between them by using pitcches which are not within the range of the corresponding Instrument.

  • CVI 2013 SP2 and PID toolkit

    Just a question on NI's Web site documentation:
    The announcement of CVI 2013 SP2 mentions that the PID toolkit is now included...
    Searching for CVI toolkit, the NI download page mentions a PID toolset 2.1, which, however, is said to work with Windows Vista/XP 32-bit/2000 only.
    So before downloading and installing I'd like to know if it will work with Windows 7 and / or 64 bit?
    Thanks!
    Solved!
    Go to Solution.

    Hi Wolfgang,
    I updated the web download page to reflect the OSs on which the PID toolkit has been tested. PID Toolkit 2.1 (32-bit) is supported on both Windows 7 32- and 64-bit OSs.
    Thanks for bringing this to our attention!
    Daniel D.
    National Instruments
    Automated Test Software R&D

Maybe you are looking for

  • Java Card File System ...Please reply

    Hi all , I am working on Java Card technology for last one year . Presently I am facing some problem regarding some file concept of java card . I know that Java Card 2.1 does not support file system . But I want to simulate the file system in java ca

  • Change filename prompted when submit form by email

    My form has a submit by email button for users to submit the filled form through email(attached as pdf). Upon clicking the submit button, I want the pdf attachment to be in a customized filename (eg:YYYYMMDD_form1_txtfield1.pdf), or the least if user

  • External Table - Record delimiter

    Hi, Is it possible to have combination of character and NEWLINE as a record delimiter in external table. i.e something like RECORDS DELIMITED BY '#^'||chr(10) Thanks S. Sathish Kumar

  • Emoticons appearing in my iphoto

    Hi All We have been having an issue with hundreds of emoticons appearing in our iphoto. They have been appearing for years and we usually delete them. Recently we have downloaded a roll from a Sony camera and the whole role has come out as different

  • Photoshop Elements 9 Editor

    I recently downloaded Photoshop Elements 9 Editor from the App Store to my iMac.  I would like to install some Elements actions I have downloaded from the web and the instructions on Adobe and other sites say to find the following folder: System libr