Tank Level Control with PID regulator

Hello! 
I found a lot of examples regarding the simulation of a tank - level control with PID regulator. but I still have a dilemma.
I can't find the transfer function for the process, if you can help me it would be great because I'm stuck here...

Maybe you could ask some of you classmates?
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • Level Control with PID Control & Pulse-Width Modulation

    Hi all,
          I have attached my program which I'm having trouble wiring up in the block diagram.... I'm fairly new to labview, but basically I have a level control project with an analog input cistern arm turning a pot for my test tank (configured as DAQ assistant voltage analog i/p) and a pump working off a reservoir (configured as DAQ assistant voltage digital o/p). My electrical side of things is working correctly and I have tested both DAQ assistants I/O's successfully off a basic program, minus the PID & PWM... I found a simple PID control subvi which I think I have wired up correctly, apart from the output variable... I also found a bit of code for PWM using the square waveform vi (far right side of the program) which I have tried to include in the program, but I've been unsuccessful with that. The ideal operation i'm looking for with this project is to be able to enter different values for the setpoint, for the PID to kick in to find that setpoint each time using the PWM to drive the pump, which has a flow rate of 13L/min. I have a manual valve to release water from my test tank which I can set accordingly.
    My questions are;
    - How do I connect the 'output variable' of the PID subvi to my DAQ assistant digital output(both DAQ assistants are set at 1 sample on demand)?
    I have a 'number to boolean array' function, but this gives an error saying that the number of tasks generated are not the same...
    - How do I wire up the PWM bit of code? Do I need to include the 'error in & out' tabs?
    -Am I on the right track with this program or am I way off the mark?!
    Any feedback on this would be greatly appreciated. Thanks for your time,
    Richie
    Attachments:
    PID-RichLevelControl.vi ‏91 KB

    Rich-MechatronicsStudent wrote:My questions are;
    - How do I connect the 'output variable' of the PID subvi to my DAQ assistant digital output(both DAQ assistants are set at 1 sample on demand)?
    I have a 'number to boolean array' function, but this gives an error saying that the number of tasks generated are not the same...
    - How do I wire up the PWM bit of code? Do I need to include the 'error in & out' tabs?
    -Am I on the right track with this program or am I way off the mark?!
    You're a bit off track.  You need the output of the PID to go into the PWM generator, and the output of the PWM to be written to the digital output.  Right now you have the output of the PID connected directly to the Digital Output in a way that won't work, and the PWM generator hanging off the side not really connected to anything.  Also, the PWM generator isn't really going to work since you're generating it at the same frequency as your PID loop runs.  Try a simpler algorithm such as on/off control first and see if that works for your system.

  • Peltier control with PID

    Hello,
    I have a Keithley 2400 source-meter, and a Keithley 2010 multimeter. I measure temperature of a water loop with a RTD, and I measure its 4W resisitivity with the K2010.
    I can cool and also heat this water loop via a Peltier heat-pump. The applicable range is -1Amp < current < +1 Amp. So I use the Keithley source-meter to drive the Peltier in this range. Negative current cools the water, positive current heats.
    I have the PID tool-kit with LabView 2011.
    My only question is that, if I give  +-1 as range input to the PID.vi, is it a proper way to implement this task?
    Thanks!
    Solved!
    Go to Solution.

    Hi blokk,
    "ok. so this is not implemented in the Pid toolkit. So when the PID vi using negative output, I have to set the Kc to negative. ... Because it should change the sign of Kc as early as it switches range polarity continuously."
    You don't need to change anything, when the PID control is running. You have to set the Kc once to the correct value, that's it! Kc is describing the PID behaviour in terms of "higher output results in heating up and lower output means cooling mode"...
    "Should I alter the pid.vi inside?"
    Never ever change vi.lib VIs! If you really want to change them (that isn't needed here!), make a copy of the VI and change the copy!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • PID-Control (Tank Level)

    Hi!
    I want to realize a PID-control for a tank level. I've already looked at all related examples in LabVIEW, but I have a general question:
    Where is the measured value brought into the process (where would I connect the DAQ to the control-loop)?? I can't figure out how it's done in the examples (there is always an "initial value" outside the while-loop)....
    Would be great to get some answers!

    Generally you take the DAQ value and feed it into the PID as the process variable.  The examples store the process variable in a shift register in order to simulate a system in which the current value depends on the previous value, but in a real system the physics of the system handle that for you.  For example in a tank control system, the tank itself holds some amount of liquid, which doesn't change by a large amount within one sample period.  To simulate that properly you need to store a value equivalent to the liquid volume in a shift register.

  • Monitoring unknown tank level and control

    Hello
    I want monitor unknown numbers of water tank level. but I dont know is it possible to design a wizard that get me numbers of tank and then design them or not? can u help me?
    actually, these are process:
    1) get number of tank and their properties that are difference between all tanks.
    2) show tanks and their levels
    3) control input/output valves with a Matlab program
    tnx
    BR

    Hi behzad,
    how such a programming must be prepared?
    As any other programming project too: you need to collect specs, draw a flow chart (on paper!), create the program to follow your flow chart…
    Please ask specific questions to get specific answers. As long as you only ask for very general topics all you get are very general answers!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Controlling solenoid with PID output

    I’m reviewing the possibility of using a PID in conjunction with our cooling setup where a solenoid valve is turned on and off.  I found a VI with a PID that was used with variable pump speeds to regulate pressure and I’m trying to make it easy on by plucking out that portion of the program which is attached here.  Unless I’m completely on the wrong track what I would like to know is how I can use the output or “result” to regulate the valve.
    Attachments:
    PID1.vi ‏48 KB

    Former employee created the PID to vary pump speed based on a pressure set point, so I’m not sure how applicable it is with simply turning a valve on and off.  If the valve were proportional it might be easier to adapt.  I am interested in a length of time function that can be controlled with the PID so the temperature can be adjusted to the set point more and or less aggressively.  I do have a program that allows me to vary the cycling of the valve, but if it included a PID it would be more of a hands-free operation.  As it stands now, I have to make changes to the cycle rate every couple minutes while the temperature transitions into the set point.  As the temperatures moves into equilibrium, the valve is open for a shorter duration of time and or closed for a longer period of time.

  • I need to design fuzzy controller with pid control .

    hi ,
    I need to design fuzzy controller with pid control . to control   Dc servo motor i have NI DAQ PCI 6251 anyone help me??

    ssaara,
    Along with the shipping examples, here is a link to the PID Control Toolkit User Manual. Fuzzy Logic control is discussed in Part II of the manual, Chapters 5 and 8 are good starting points.
    --Michelle
    Instrument Control R&D
    National Instruments
    Instrument Control
    Machine Vision

  • Level control

    Hi Everybody,
    I am new to Labview so I am looking for your help. I am looking for the most basic control diagram for a PID level control circuit.Thanks.

    Moonlight, at it's simplest, PID control works by operating on an error signal,or the difference between the desired output and the current output.
    So, in order to implement PID control, the first step is to calculate that process error.
    Second, you now need to multiply that process error by a proportional (P) constant, an integration term (I), and a differential term (D). Then add up those products.
    There are MANY ways to do the integral and derivative terms, so I will leave that to you. Search for PID on the NI website, and you will find at least one example of how to do it.
    Good luck,a nd I will repost later with some examples.
    Wes
    Wes Ramm, Cyth UK
    CLD, CPLI

  • Automatic Level Control.

    I am transferring stereo audio cassettes into GB. I noticed that when I check Automatic Level Control, it always goes to 75%. Does this just start there and manually ride the audio or is it "smarter" in a digital way. I think the results with the auto level "on" sound good so far but I noticed a few sudden volume drops here and there. I am not sure if they came from the Auto Level. It's hard to find the exact spots on tape to compare since I've transferred a few hours worth already. Do I need to go back and just set my own levels? I do want to best possible copy. If so, can let it hit red on the peaks? (I don't hear it distort on the short peaks but I'm monitoring with crummy speakers now) Thanks!

    In case anyone is curious, the Auto Level is not for quality recording. It was jumping the volume around after all. Be careful of this. That's how you learn a new program I guess I wanted to redo some other stuff anyway so no big loss.

  • Overriding Processor audio level controls

    Hello,
    I'm developing an application to capture a live audio stream (by definition a PushDataSource). I want to provide my own controls for monitoring the audio (e.g. mute button, volume level control). What methods set the volume level? I didn't see any of this in the documentation.
    I saw getGainControl, but I want to provide my own ... just setting the gain.
    Is there an example of this?
    Thanks,
    Ben

    brcain wrote:
    Do I have to implement a GainEffect plug-in ... just to change the monitored audio level?No. You can actually implement the controls on the PushDataSource itself.
    For instance, I have the following code available on the forum:
    [http://forums.sun.com/thread.jspa?forumID=28&threadID=5342704]
    That code will capture audio using JavaSound, and deliver it to JMF via a PushBufferStream. Because the capturing is done with JavaSound directly, I can run any kind of JavaSound processing I want on the audio before I hand it to JMF.
    I could, for instance, convert it to ULAW before I give it to JMF...
    [http://www.jsresources.org/examples/UlawEncoder.html]
    I could, for instance, change the sample rate before I give it to JMF...
    [http://www.jsresources.org/examples/SampleRateConverter.html]
    I could, in particular, change the volume before I give it to JMF...
    [http://www.jsresources.org/examples/AmplitudeConverter.html]
    All you're handing to JMF is a set of audio samples. You can adjust them or monitor them however you want before you give them to JMF...

  • Need a multi-level control break report displaying a cross-tab for each ...

    I need a multi-level control break report that displays a cross-tab report for each
    detail and subtotal. The individual cross-tabs are no problem. There are two issues:
    1) How to get many cross-tabs (thousands) to appear in one report.
    2) How to provide cross-tabs in-line on the multi-level subtotal lines.
    Here is a concrete example.
    Suppose the data base contains this table:
    road (
    id_number number, -- this is an artificial PK
    city varchar2,
    county varchar2,
    state varchar2,
    length number,
    owner varchar2, -- roads may be owned by cities, counties, states, and others
    surface_type varchar2 -- the surface type may be gravel, asphalt, concrete, and others
    The table is populated with several million records that include every
    length of road in a US city.
    It is OK to suppose that all the attributes in all the records are not null.
    Without the PK, there would be millions of duplicates,
    which should all contribute to the summed lengths.
    The report I need is like a control break report with a detail line for each
    city together with subtotals for each county and state and
    a grand total for the US at the end.
    However, each detail and total line needs to be a cross-tab report
    summing the length over the city, county, state or US
    (whichever is called for at that location)
    for each combination of owner and surface_type.
    so the report would have the following structure:
    a city cross-tab for the first city in county 1/state 1
    a city cross tab for the last city in county 1/state 1
    a cross-tab for count 1
    a city cross tab for the first city in county 2/state 1
    a city cross tab for the last city in county 2/state 1
    a cross tab for state 1
    a cross-tab for the US
    Any suggestions will be appreciated.
    This problem comes up because my client's legacy system,
    which is being replaced,
    already has such a report (in COBOL).
    Thanks!!!
    Steve
    PS, I know one ugly way to do it. Namely, make a variable for each
    possible combination of owner and surface. Then code an ordinary control
    break report. However, I am looking for something better.

    Hi Jenna_Fire,
    According to your description, you have a matrix contains total for each group on each level. Now your requirement is, when you click on any number (data field or total), it will go to the detail report which returns all the detail information of the people
    within the group scope. For example, if you click on the total of Active users in United States, it will return the detail information of Active users in New York and Texas. Right?
    In this scenario, we should set the parameter (@Country, @State, @City) allow multiple values in both main and detail report. And in Default Value (@Country, @State, @City), query out all distinct values. In the textbox which contains
    those total values, when set use these parameters to run the report, we only need to pass the parameters of parent groups. For example, if we click on the total of Active users in New York, we only need to pass Country, State, Status to detail report, and
    in the detail report, the City parameter will use all distinct values (Default Values) because we don't pass the City parameter. We have tested this case with sample data in our local environment. Here are steps and screenshots for your reference:
    1. Create parameter Country, State, City and Status in both main report and detail report. Set both Available Value and Default Value get values from query (Create a dataset for each parameter, use "select distinct [column] from [table]" as query). Set allow
    multiple values for parameter Country, State and City in both reports.
    2. In corresponding textbox, pass appropriate parameters in go to report Action.
    4. Filter data in detail report (in where clause or using filters).
    5. Save and preview. It looks like below:
    Reference:
    Using Parameters to Connect to Other Reports
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Manual Audio Level Controls! - Sony Alpha DSLRS (A65)

    Dear Sony -I absolutely love your DSLRs. However, to use the camera as an acceptable tool for amateur/indie/professional film, manual audio level controls in video mode are a must-have. Equal Canon competitors all feature this simple leveling option for managing audio.Currently, the automatic gain control is the only option for audio recording capabilities on Sony Alpha DSLRS in video recording. While in theory OK, AGC leads to terrible problems such as unnecessarily high and distracting background noise/hiss. Filmmakers desire crisp, clear audio!For quality results using an external microhpone, manual audio levels are the only way for filmmakers to achieve decent in-camera audio to compete with Canon users. Many amateur and professional videographers are in desperate need of this function! Audio is often MORE important than the image quality of your film, although Sony seems to increasingly neglect its video DSLR users by not implementing this ability and falling short on video options (Auto-focus in Manual Mode, audio levels on HUD etc.).To keep my Sony A65 a viable option for video work - please see if anything can be done!  (Should be able to be added with a firmware update to all current and existing Alpha DSLRS) Thanks!!! - Love, a filmmaker who would desperately like to keep their A65 for professional video work! (Also from "Join The Inspiration")

    Though a great idea, you also have to understand that the a65 isn't as film oriented camera like other cameras.
    DSLR cameras with the audio controls are designed with film making in mind, thus they have that option.
    Most DSLRs (at least, back in the days) was simply a camera to take photos. If you wanted to do film, you'd buy a dedicated film recorder for that. Having video capabilities in a DSLR was a bonus.
    Nowadays, it's merging, bang for buck, reaching to a boarder audience, one size fits all, etc, and unfortunately, the a65 wasn't part of that 'nowadays' era.
    The a99 and a77ii, if I remember correctly, has audio controls.
    A lot of the newer Sony models (mirrorless) also have audio controls, that is, the ones that a targeted towards film making and not just great photos with the bonus of great video.
    Also, I would presume that a lot of 'professional' videographers will either use external mics such as on a pole, a lapel mic, etc, to capture perfect audio, or if not, at least a shotgun/boom mic attached to the camera.
    When doing such, there technically shouldn't be a lot of problems with the audio quality. Of course, if those external mics are still recorded into the camera, then yeah... but if they're recorded separately and slapped on during post processing... shouldn't be any problems...
    If you're relying purely on the a65 and it's AGC, then there definitely will be shortcomings here and there unfortunately.
    I recently filmed my niece-in-law's wedding. I didn't have any fancy mic setups (can't afford it at this stage), and this wasn't any sort of 'professional' work, more of just something for the family (free), but the audio came out excellent. Yes, it caught ambient noise (obviously), but I don't hear any cutoffs or badly pitched noises, or anything. The loud music and people cheering on and such all came through very clearly. Sure, it's no 'professional' bitrate or anything, but at 192kbps, it did the job.
    Anyways, that was off topic, but all I'm saying is, you can't expect much from a photo taking centred camera which has been slapped on with nice video capabilities unfortunately. Also, due to the a65's age, I don't think Sony's bringing out anymore updates. My advice is either get an a77ii for it's awesome AF, or if full frame is a desire, then the a99 or a mirrorless (up to you).The a99 has a controllable focus range which is something I like, that way, if you're using autofocus (yeah... what 'professional' videographer would use autofocus aye?), you won't lose focus on subjects if something goes in front/behind it.Also, the little wheel at the front really helps in allowing you to make adjustments without disrupting video or causing too much movement in the camera. Right now, I am planning on getting a RX10ii. Though I'd love to get something from the mirrorless range, it's just way out of my budget (even the RX10ii is, so there's a lot of saving to do right now also...). Anyways, good luck with your videos.

  • Auto level control working even though unchecked?

    Greetings,
    One of my singers is cutting tracks for me using GB 6.0.5. He has the Automatic Level Control checkbox unchecked, but says that the volume slider is still moving all over the place as he sings.  Any idea what could be causing this?
    Thanks,
    DM

    That slider should indeed only move with " Automatic Level Control" enabled; perhaps the preferences file is corrupted. Try HangTime's cure for "Oddball" problems and remove the GarageBand preferences and repair permissions:
    http://www.bulletsandbones.com/GB/FAQPages/OddBallProbs.html
    Regards
    Léonie
    P.S.
    Are you using Mac OS X Lion  or later? Then your user library is hidden. You open it best from the Finder's "Go" menu, from the main menu bar:
         Go  > Go to folder           then hold down the alt/option key until the library appears in the drop down menu. Select it to open.

  • Integrator control with timed loop

    Hi all, when dealing with discrete time control like the poleplacement method, the sampletime shouldn't necessarily be
    as short as possible like in "analog" PID-control.
    I want to be able to set the time of how often I am sensing the input and therefore I am using a timed loop.
    Something is missing in my file because it won't work.
    The propertynode DigNum is not inserted by me, but by the png-software. I have a local variable there refering to the period dt.
    Kindest regards,
    Lasse
    Attachments:
    Integrator control with Timed Loop.vi ‏118 KB

    Hi Lasse,
    "Something is missing in my file because it won't work."
    Yes, the error description is missing. What is wrong? What exactly doesn't work?
    - Instead of using locals you could use a wire or the block in the upper left of the TimedWhileLoop to get dt from it...
    - Does the loop spin as fast as you want it to spin or do the ExpressVIs slow down the execution?
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Authorization manager (azman) for hyper-v control with replication

    I am using a pair of server 2012 machines for hyper-v hosts with replication enabled and I need to use azman to set up users who are authorized to manage (start/stop/restart) selected VMs only.  The instructions I have seen use the hyper-v XML data
    store.  I have not seen a way to replicate the data store between the 2 hyper-v hosts.  Assuming that I set up duplicate authorizations on the 2 machines, do I need to set the VM scope on both servers or just the primary server of the replication
    pair.  I do not have a pair of servers to test with so I will be using test VMs on the production hosts.
    The process seems straightforward until replication is added.

    1) Azman is supposed to work in Server 2012.  I have not seen any other way to implement the user-level control of selected VMs using the Server 2012 OS.  I am trying to avoid the additional cost of SCVMM to accomplish what is supported by the
    OS in server 2008 and 2012.
    2) I don't understand the intersection between VM replication and user control on the hosts, hence the question.  If replication, once set up, only replicates changes on the VHD then I probably need to set up duplicate scopes and authorities on the
    two replication partner hosts.  If replication is smart enough to replication the scope information then the scopes need to be defined only on the primary server.  This part of the question seems to have been answered in an earlier response - the
    scopes (and I assume the Azman authorizations) need to be set up on both servers.  If this is the case then my only problem is accomplishing what can be done in server 2008 and 2012 un server 2012R2 without using azman or SCVMM.

Maybe you are looking for

  • How to make screenshot/jpg/pdf of ENTIRE long Safari window (not just visible part)?

    I want to get a "screenshot" (i.e. an image in any format -- PNG, JPG, PDF, whatever) of a looooooooong Safari window diplaying a Web page that entends far below the bottom of the visible screen area and has to be scrolled down to see all of it. I kn

  • Syntax coloring of 'other'..

    Hi there, currently I am on my trial for the new Flash Builder 4.5. What I really dislike is the absence of coloring 'other' things in Actionscript files. In the Java section it's called 'other' and things like classes, datatypes etc. are affected. T

  • Mac-specific drivers and other software for Windows

    Mac-specific drivers and other software for Windows how can I download them with out the install cd?

  • Deducting leave quota for multiple lates in a month

    Hi Experts, I am working on a Positive Time implementation and I am facing problem with one of the clientu2019s requirement. If an employee is late for more than 3 times in a single month (not necessarily consecutive) then his leave quota should be d

  • Well  Iam not cheap, but...

    My son has a BW 20GB ipod that is about 20 months old (we've had about 4 so far) and we've always had great luck with them. Now this one froze and none of the restarts, reboots in any matter worked. FINALLY we got it to reboot via a restore but after