Feedforward PID control problems

hoping for a little help with the feed forward vi.
I have two inputs to a PID function, the Process variable (PV) being slightly behind (phase lag) the set point (SP).
This little bit of phase lag causes some unnecessary error in the PID algorithm.
I believe that feedforward VI is used to correct this type of problem.
The PV is from a load cell if it matters, recording around 1Htz cyclic load. 
I can utilize the PID feedforward VI and plot its input vs output and see that it is indeed creating the necessary phase change (shown below in figure).
 However, when i put the phase changed signal into the main PID vi, it somehow dosent seem to ever change/correct the phase offset of the PV signal that is coming in, its like its really not being used except that at very large vales (ie 0.2min) it just becomes unstable..
I have tried both lead and lag for both the PV and SP for every conceivable values between 0.000001 and 10min..
 The feedforward VI does create amplitude changes between the inputs and outputs at small time levels (ie 0.001min) of which i am correcting for manually. Yet, The output signal without the feedforward vi seems to always better than with it.
Attachments:
v65PIDLL.vi ‏175 KB

hi george,
Thank you for checking in.
Im starting to get a handle on this after 3 or 4 days.
Basics are that the PID function is used for feedback.
It compares a setpoint (the desired state) to feedback state (process variable) in order to compute the error term which is then used for feedback.
Sometiems the set point feedback has a time delay in it and thus, creates a little extra error in the comparision and makes it hard to get the PID accuracy perfect.
So with a feedback load control system, there is a delay in the time the load cell is read to be compared to the desired state.
So what "lead lag vi" does iscreate a delay or lead in one of the signals so there can be a better computation of error.
Where it gets tricky is that lead lag vi also creates a offset and amplutide change in the set point on certain conditions such as larger phase shifts and smaller times delays,.
This in many cases makes a worse computation of error than the loss of phase shift by itself.
And in trying to correct for this offset and amplutide change, i was making mistakes which reduced the size of the error term.
But i did some things to try to keep this simple and the output is still not perfect, but better.
of course, i should add a discliamer, trying to help if anyone reads it, but im not a proffessional, i just play one on TV

Similar Messages

  • Feedforward PID control of actuator not responding

    Hello,
    We have a linear actuator operating under load control. This meaning that the force produced by the actuator is proportional to a reference voltage sent to the actuators control drive from our computer running labview.   The linear actuator has a very nonlinear response to the current sent from the motor drive, and to correct for this, we have had some luck with the PID controller.  But we have not got it perfect yet.
    So although we have scaled the inputs to the PID controller, a problem is that there is a phase delay. An image of this is attached.  Green is the PID output, red is the set point, and white the reading from the load cell.  The amplitudes and DC levels are not perfectly adjusted as it is as close as it can get, I think, until the phase is corrected.   So this particular phase delay seems to be because there is a time difference between the time the sinusoidal set point is created and the time the load cell (feedback PV) is sampled.
    So to correct for this, I thought a feed forward algorithm might work as I though this is what they are created for. But I haven't had any luck making the feedforward do anything. I have set the gain to 1 to 1.5, and lead and lag terms individually to many different values from 0.001 to 5. I have not seen the phase change yet. I would have expected some shift between the PV and SP.  Any ideas on what is going on?   Ill attach the labview program.   Im just be implementing it wrong.
    Ill attach the main program.
    Attachments:
    v65PID.vi ‏171 KB

    nevermind.. doing simple mistake.
    sorry..

  • PID control of Counters (PWM)

    Hello everybody!!
    I work on a closed loop PID controlled problem (Labview 8.5) and I have a couple of questions in order to make some progress!
    Firstly, I have to declare that my loop is composed of 2 AI channels (2 accelerometers), 1 AO channel (excitation channel-shaker), and 2 CO (for pulse creation PWM-controllers). The idea is very simple. When the AI (channel 1) value surpass or underpass a predetermined threshold value, then the appropriate CO should be activated in order to apply the necessary control forces and simultaneously to copy my data values of both AI channels in binary style for CPU velocity reasons! BUT, with the PID controller I want to optimize the Duty Cycle value of the pulses!
    My questions are :
    1) Why when I put Kp=Ti=Td=0 ( = run WITHOUT control) I can copy ALL the AI samples and when I start to activate the PID controller (let’s say for only Kp=0.5) I CAN’T copy ALL the AI samples? Where is my fault?
    2) About the PID vi which I use, is it correct or I should use the PID vi for ARRAYS?
    3) And finally, about the Boolean statement just before the Case Structures and the Shift Register, is it ok/necessary?
    I attach two vis, the ReadBinar .vi is used to read my binary files generated in the end of running of the Control.vi.
    Best regards
    Grigorio
    Attachments:
    Control.vi ‏277 KB
    ReadBinar.vi ‏162 KB

    Hello Zach!
    First of all, I want to thank you for your kind interest on my problem!!
    I must describe you the desired process with the Control.vi. There are two AI channels writing down the acceleration of a structure in two different points (for velocity reasons I use Binary Type storage for my data). One AO channel for structure sinusoid excitation (shaker) and two CO channels for controlling two solenoid valves with which I want to control my structure acceleration (minimize it as well and fast as possible)!!
    In order to help the description, let’s ‘cut’ the block diagram of Control.vi into three pieces (Before While Loop – Inside While Loop – After While Loop).
    In Before While Loop section, the main question is about simultaneousness. The DAQmx Start inside the Flat Sequence Structure, do you think that is necessary, ok? I want to run my experiment for 30s and to collect 6000 samples with 200 samples/s. In addition, in the CO DAQmx timing, I have set 200 samples/channel in order to be able to change the duty cycle value because of the conditions inside the While Loop. Do you think that everything in this section works well? 
    Inside the While Loop, firstly in the DAQmx Read, I have set 200 samples per Input Channel, which is also equal to the AI and AO Sampling rate! Before some days I have put there -1 and unfortunately the total written samples were less than 6000!! My main problem is how I can check all the read data without losing run velocity and simultaneous if one sample is >0 then it goes further to the first PID.vi (left solenoid valve) or if that sample is <0 then it goes further to the second PID.vi (right solenoid valve)!! When a sample has gone to a PID.vi, then I want to tune the duty cycle of the controller (PWM control) as well as possible in order to achieve the Setpoint value for the second AI channel. Are all these possible? If not, what do you suggest me?
    In addition I compare the present duty cycle value with the previous one in order to be inside a tolerance value (let’s say 0.1). Moreover, is it correct the Case Structures where I want to share the positive and negative AI samples before going to the respective PID ?
    Finally, After the While Loop, I believe that everything is OK. I just finish all the tasks.
    I have to mention that I work on a PCI-6289 and Labview 8.5.
    With best regards!
     Grigorio
    Attachments:
    Control.vi ‏288 KB
    equal within tolerance.vi ‏9 KB
    ReadBinar.vi ‏163 KB

  • Problem installing PID Control Toolset

    Hi,
    I installed the PID Control Toolset and received a message stating that:
    "Error 1401. Could not create key. S..............................\Software\Microsoft. Verify that you have sufficient access to that key, or contact your support personel."
    Do you know what I should do?
    Thank you
    Solved!
    Go to Solution.
    Attachments:
    PID Error.xls ‏144 KB

    Thanks for your reply, Ravens.
    Sorry about the excel file but I just can printscreen & paste.
    The PC is on a network and I believe the admin had already set my account as the administrative one. Normally, my account has no right to install or uninstall. (Is there more than one type of admin account, if it's the case?)
    I have been installing Labview 7, Daqmx, report generation toolkit without any problems.

  • PID control in a windows CE Labview application

    Hi there,
    I want to build an application that will control the temperature in some ovens, using PID control. The application will be running in a controller (or a touch panel computer) with windows CE OS. I have Labview 8.6, PID control toolkit 8.6 and Touch panel module 8.6. The problem is that the PID vi's don't seem to work in touch panel module. 
    Is there any way to implement PID control in a windows CE Labview application?  
    Thanks in advance.
    Solved!
    Go to Solution.

    I think with a timed loop you can run reasonable good timing down to 1 mSecond. I think 1 mSecond is the lower limit for non realtime systems like Windows/windows CE. And if you have the PID toolkit this will supply you with the functions you need. You do not need an extra CE PID toolkit. This because  the touch panel module run under your standard Labview environment. But I do not know if all the functions in the PID tool like fuzzy logic are compatible with CE. Have you also considered Windows Embedded as OS for your module. With windows Embedded you can run standard Labview built exe files
    Both Windows Embedded, and XP Embedded can be trailed
    http://www.microsoft.com/windowsembedded/en-us/products/westandard/default.mspx
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)

  • Steps to create vi file for PID control in 8.0 pro without specific PID addons.

    Per my other posts, I am testing a friend's software to see if this is what we would like to use.  I would prefer to use their software for our initial work to help offset the cost of the software.  Problem is their software is 8.0 pro without the extra PID stuff.  I am curious how one gets started creating a custom PID algorithm to be used in series between an input and an output.  I have viewed several tutorials but all seem to simply point at the PID toolkit that is not availalbe to me right now.  I realize it might be more work to create one but probably the only option at this point. 
    To simply the process, lets just compare a single input and output where the software will control the output to obtain to desired input.  in  tutorial, I was following right along until the PID loop was added and that seems to be just a drop and go type of deal in which would rarely apply to a real work application. I am simply trying to learn how PID systems are written into the block diagrams.  
    Hopefully my question makes sense.  

    asdfs wrote:
    Per my other posts, I am testing a friend's software to see if this is what we would like to use.  I would prefer to use their software for our initial work to help offset the cost of the software.  Problem is their software is 8.0 pro without the extra PID stuff.  I am curious how one gets started creating a custom PID algorithm to be used in series between an input and an output.  I have viewed several tutorials but all seem to simply point at the PID toolkit that is not availalbe to me right now.  I realize it might be more work to create one but probably the only option at this point. 
    To simply the process, lets just compare a single input and output where the software will control the output to obtain to desired input.  in  tutorial, I was following right along until the PID loop was added and that seems to be just a drop and go type of deal in which would rarely apply to a real work application. I am simply trying to learn how PID systems are written into the block diagrams.  
    Hopefully my question makes sense.  
    Take a look at the PID Control Toolkit User Manual . It clearly defines the math used and there is absolutely nothing stoping you from writing that code yourself.
    What you will not get by doing it yourself is the auto-tuning as well as all of the supporting and helper sub-VI along with the polymorphic versions that will support arrays of PIDs.
    If you write it yourself and it work good please post up your version for others to review or use.
    Have fun,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Looking for a reasonable looptime for my PID controler!!

    Good morning!
    I am trying to do a PID control of a combustionchamber.  The setpoint and process value are the output  temperature, the value to  operate  is  the massstream of  the fuel.  My  in- and output datas are refreshed every 50 ms.  My problem is...
    What is a reasonable looptime for my PID control? 
    Do you have any ideas???
    thanks RT

    My group has used the Sun Electronics PC-1000 Process Controller for some time, with good results. There are some instructions in the beginning of this Engineering Note (pdf link) that discribe how to iteratively determine the PID coefficients for a linear system. I'm not a mathematician, so I can't vouch for whole document, but their somewhat antiquated instruments DO work
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

  • How can I make and wire reffercence signals(ramp,sine,square) to excite and evaluate the behaviour of the system wih PID control?

    Dear all,
    I am Tri, I am a beginer with LV program. Actually I used LV for my reasearch, I had tried wiht very simple thing but the problem arise because I am not familiar with LA. Why I know that problem is simple because I compare with MatLab that I had somtime used before.
    I make a loop of PID control, It worked properly but I don't know how to make a refference signal to wire to the loop for excitating to evaluate the behaviour of the system. Please give me your help.
    Thanks

    Hi Tri,
          I've employed the "simple PID.vi" without a problem, but your example is more complex.  I think you use a Function generator to modulate DAQ inputs?
    Perhaps someone else will be able to infer your intention and identify a flaw in the logic.
    In case someone else wants to run your VI, it may help to build/attach an .llb (some sub-VIs are needed by the VI you atached.)
    To build the .llb, save your VI with Development Distribution options (Alt-F,Alt-W) and attach the .LLB
    1) \File\Save with Options
    2) select Development Distribution
    3) Save
    4) choose "New VI Library"
    But first, It would be helpful to us if you clean-up the code - straighten wire-paths, minimize bends in wires, and try to avoid "tall" diagrams.  Scrolling diagrams up and down is "bad form".  If scrolling is necessary, left&right is preferrable!
    Cheers.
    (and, for the record: in my previous post, Exitation would be wired to "Process Variable", Not "Set Point" (ouch!))
    When they give imbeciles handicap-parking, I won't have so far to walk!

  • PID control loop slows down during execution.

    Hi, I am a attaching a LV8.6 code that i am currently using to control my engine experiment. I use PID control where the input signal is an rpm value that i measure using a counter. The ttl signal from the sensor is not clean and so i use an analog trigger to generate pulses on the counter from where i measure the frequency and hence the rpm. The output is generated as an analog voltage on an output channel. The problem i am facing is that the loop runs really good when i start off but gradually the loop keeps slowing down and this greatly affects my ability to control engine speed. I am not sure why this is happening. I tried increasing the sample size and rate (so as to increase the buffer size) but this didnt have any effect on the speed. I am guessing its a problem with the way i have my loops setup.. any suggestions would be greatly appreciated.
    Thanks, Shyam.
    Attachments:
    PID control loop.vi ‏33 KB

    Hi all..I realised my mistake soon after posting as usually is the case..the create channel vi for doing the analog output to the output channel was within the loop and slowing things down..when i moved it out..it fixed the problem!!
    Shyam.

  • Labview PID control for virtual CNC lathe

    i am currently in my third year at UMIST, on the Mechanical Engineering (MEng) course. I am designing a control system for a miniaturised CNC lathe for my 3rd year project. For integration between the computer and actuators, i am planning on using Labview 7, but am currently having problems learning how to utilise the PID control toolset to create a virtual system response. I am planning on being able to input a specific transfer function for, say, a DC motor, and a ramp input, for example, and being able to view the output response as i vary the P, I and D gains. Some help with regards to the block diagram set-up for such a system would be greatly appreciated.

    The best place to look for this kind of information is the shipping examples of LabVIEW. Open LabVIEW >> help >> find examples. Another good place is online. Go to Advanced Search and look in the example programs.

  • PID Control motor DC 12v

    Hi everyone,
    I wanna control a 12v DC motor using PID control toolkit 8.2.
    - a close loop control system
    - using a DAQ model: NI USB-6008
    - how do make a DC motor speed control 12v with PID control
    Im stuck at getting pid.vi and i wanted to know what is the problem.
    pls help me on my problem, if can pls make an example VI for me
    Thanks !
    Solved!
    Go to Solution.

    Well there are a lot of things you need to do this, LabVIEW software being only a part. Firstly, most DAQ cards will not source sufficient current to actually power a motor, particularly a USB6008, so you will need some form of amplifier/power driver. For closed loop you will need some feedback to tell you what the motor rotation is, usually a slotted wheel with a LED and sensor (if this is a project for school or hobby one source you might look at is an old wheeled mouse). So with these two you have a way to drive the motor and then detect its motion. Then you can get to the idea of doing PID, which is taking the feedback (from whatever sensor you end up using) scaling it to match whatever you are using, and apply it to one of the PID equations to get it to match the target value.
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

  • I have a big delay in my real time pid control

    hi ,
    since i don't have a digital input module i tried to use the serial port RS232 on my Crio to read the data from an absolute encoder in order to perform PID control for  a dc motor, but the problem is that the data took too match time to be read; there is a big delay between the first read position and the next one,and when i change the slide controller the indicator took time to change, although it should be instantinouse, here is
    a snapshot of my vi. 
    please i need help.

    Hi Moho,
    Looking at your code I see a couple of things that might be causing the issue. How long is the delay that you are experiencing? You are trying to transfer 2000 bytes every loop which will cause some delay. You also have a lot of mathematical operations that can take time between loop iterations. Also what is the VI that you have manipulating your waveform? Have you looked into the PID VIs?
    Scott B.
    AE NI

  • Simple PID Control

    Hi there,
    I'm using an old version of LV, LV 6i to be exact. Now I am constructing a simple PID control to control temperature of a room. I am using NI PCI-6024E as my DAQ card. But, in the middle of trying to get the program right, I stuck at the PID control. I am using the "simplePID".vi, and connect everything that necessary, the high and low limits, the parameters (P, I, and D), setpoint, take subVI "Temp".vi and connect to process variable and the output of the "simplePID".vi to a chart.
    The problems occured when I am running the program, the temperature did give readings like normal, and i set the setpoint and limits, and also the parameters. But it seem like the "simplePID".vi did not responds to these values. As the program is running, i clicked on the "simplePID".vi and see that the value of the parameters inside it doesn't changed to the values that I set earlier. Why is this happening. Am I missing something important.
    I attached the pictures and my VI for your reference. Thanks in advance.
    Solved!
    Go to Solution.
    Attachments:
    29092012.vi ‏32 KB

    Apparently, in the Execution tab, the only option ticked is "Auto Handling of Menus at Launch", and i unticked it, try to run the program, and it worked.
    Thanks so much for helping me to figure this out
    I have another question, do my DAQ card (PCI-6024-E) can be used with any LV program, the latest or the old versions?
    and can it be used with trial version of new LV?
    Thanks!

  • Stacked PID control

    Hi,
    I have 12 axis most of are brushless servo stages. We decided to use a single NI-control board axis per axis and have the drive units provide the commutation signals. That's generally fine but now I discover that the drive units control loops can not be completely disabled. We have a control loop in the drive units that is addition to the control loop that is on the NI-controller. To reduce the effects of the drive control loop we have reduced the parameters as far as possible (proportional gain of 10% and velocity of 8% etc). But I'm concerned that this is going to give me problems later on (especially with the nano precision control stages).
    So an alternative (last resort) may be I could effectively turn off the NI-controllers PID control. Has anyone any ideas on what control parameters would be required for this?
    Also does anyone have experience of a good drive for this type of application for my future projects?
    Martin
    Certified LabVIEW Architect

    Martin,
    What is the make and model of the drive you are using? Can you set this drive into torque, speed, or position mode?
    If you can set the drive into torque or speed mode, you can control the drive using the analog command outputs of the NI motion control boards. Torque mode should disable the control loop on the drive. Speed mode will interpret our command signal as a velocity set point. (See the link posted by Jochen)
    If you can set the drive into position mode, you can use the P-Command mode offered by the NI-733x and NI-735x motion controllers. This special mode uses the step/direction lines to connect to the drive. The drive counts the steps to generate its set point for the control loop. The NI-Motion 6.1.5 update includes the P-Command mode for stepper output. See the ReadMe.txt file for more information.
    Rodger S.

  • User Account Control Problems with Premier Elements 7 32 bit in 64 Bit Windows 7

    I found User Account Control Problems in other forums but didn't see much in Premiere Elements, so I hope this helps others who may be having problems with 32 bit programs in a 64 bit computor. When I first got my 64 bit I didn't have problems.
    Back in February I bought a Quad Core Desktop with Windows 7 64 bit. Haven't been on the forum for 7 months since I wrote in regarding importing video with the Pyro AV Link (Premiere Elements Tips and Tricks). I was having problems importing video which started after March 28 sometime, as that was the last time I didn't have a problem importing VHS. Took me a few months off and on to find out what worked.
    I started uninstalling Windows updates and any programs I had installed back to that point in time. Checked after uninstalling each item. The capture screen would come up on a delayed basis but clicking on capture did nothing. Although no driver is required for IE1394 (so they say) I read where some people using the Legacy driver had fixed some problems, so I switched to the Legacy. Seemed to work great (for a few minutes).
    I had even uninstalled and reinstalled PE7 but no difference. Finally I noticed a shield in the PE7 Desktop icon. Thats weird. Never had that before. Just decided to show up after I had done all of the stuff I mentioned. Turns out at some point in time since I've had the computor Windows 7 decided to flag my 32 bit program as misusing the 64 bit system. User Account Control. I never bothered too much with UAC and just clicked on the yes box wen it popped up asking if I wanted this or that to take control of my computor. I tried using the minimum setting for safety reasons, and then finally turned User Account Control off. Bingo! PE7 capture works again and still working.
    While I am not recommending that people arbitrarily turn UAC off, this appeared to be my problem. I would recommed that they try turning it off before uninstallin a bunch of stuff. Having a restore point may or may not have been a fix for me. I think one of the Windows Updates caused the problem but I am not going to uninstall any more stuff at this point, I have not been back on the internet or installed any more updates in my desktop. I am going to use my laptop for internet and used the desktop for video.
    I am guessing this could be a problem for any 64 bit systems trying to use 32 bit programs. IE: XP,Vista,Windows 7 64 bit. In Vista there is also Data Execution Prevention (DEP) which you can turn on or off, supposedly to prevent misuse of memory (as I understand it), but Win7 either doesn't have it or I haven't found where it's located.
    Maybe this has been covered in the forum somewhere and I missed reading it. Hope I am not too confusing. Anyway, whatever feedback you guys have would be great.  

    John,
        Thanks for your answer, and I did check out the link you suggested. However, I have Windows 7 Home Premium as most people have I think, and the XP program was not available. I started with Vista and now have Win 7. I never could navigate around in XP anyway so am content to just leave User Account Control off.
        Interesting side note to turning UAC off is that my desktop seemed to be using more of the CPUs, where half of them were "Parked" as I wrote in also about 7 months ago when I 1st got my desktop. I am pleased to say that video processing seems to go quicker with UAC off. Have to observe things some more to confirm.
        I just thought if others were having problems after installing Windows Updates and leaving UAC off worked then they could possibly pinpoint a problem.

Maybe you are looking for

  • I have no video on my MacBook Pro, can someone help?

    Hello, whenever I go to a website and want to view a video there is nothing there, just an empty box. Can someone help me figure this out? I'm running Mac OS X version 10.6.8

  • Has your Up-to-Date pre-order shipped yet?

    It's now August 28th and my copy of Snow Leopard hasn't shipped yet. I ordered Snow Leopard via Apple's Snow Leopard Up-to-Date Program in July. From previous experience (OS X Leopard, iWork '09, iLife '09, etc.) most pre-orders arrive on the release

  • Using MS-Access database in JSP application

    Hi, all. I am new in JSP world. I have an Access database and I�d like to access it in my JSP Application. Does anybody know I could do this? TIA Fernando

  • BT line fault stopping me connecting to Orange Bb

    So been to a customers house today since Friday lunchtime orange router unable to get an external ip address on the router to any device. Phone like is fine and connected. No noises and crackling. All day been on the phone to orange support they keep

  • Templates Export

    Ok after my post and reading the threads I see iMovie Templates like "Baby Mobile" can not be used in SP. Here is a project for an expert. 1. If I build the Baby mobile in iDVD, 2. How to export to Quicktime or something 3. Pull template into SP, add