Pid feedback voltage

Hi
I'm using ohm's law to control a system. I have the resistor (100ohm) and i need to choose the current ( for example : 100mA or 50mA, the user will select the value of current ). LabView would recognize the voltage to feedback the system...
I don't know how to put this control, i'm using pid control but the set point is manual, i'm putting the value of set point.
How can i leave the automatic feedback  ?
Sorry for my bad english.
Attachments:
Silicon.JPG ‏109 KB

Set Point: Current = 50 mA
Process Variable = Current
Manipulated Variable = Voltage
Resistor Shunt = 100 ohm
I need 50 mA in my circuit....the resistance of potentiometer varies alone....
 Voltage Input = PID DAC                        Current = Set Point                   Resistence Shunt = 100Ω             and                     a potentiometer ..
when I change the resistance of the potentiometer, the current change too....  Ohm's Law ...  U= Rshunt .I       U/R= i     If i need 50 mA    so,      U/100Ω= 50 mA    
Labview will try to put a voltage to get the current from set point....for example:   I want 30 mA .... labview will send 3V to output ...  3V/100Ω = 30mA .... but the resistence of potenciomenter changed and the voltage droped....
So the labview will send more voltage to the input to supply the circuit and get the 30mA again.
I tried 1million times, but failed.
PID will control the input voltage to get the set point current.
Attachments:
Circuit.jpg ‏149 KB

Similar Messages

  • PID PWM MYDAQ PROJECT

    HI All
    I am fairly new to Labview. I am trying to control the speed and position of a 12V motor which draws 4 amps. I want PID to control a PWM signal which will drive the motor. Thus far, I have PID directly controlling the motor through a transistor. The PID signal voltage goes to the base of the transistor,  allowing a large or small voltage to travel from the battery to the motor (using transistor as an amplifier). I am receiving feedback from a hall sensor which indicates motor position. The MYDAQ only has one counter function, but both counting the hall sensor cycles and outputting a PWM signal require counters (I think). To resolve this, I am using using software to count the hall cycles, so I have a counter free for the PWM signal.
    I was hoping to simply wire my PID output to a DAQ assistant and configure the DAQ assistant for a Pulse Output
    It doesn't seem to be as simple as this
    Can anyone help me out as to the simplest way to get the PID output to control a PWM signal???
    I have attached a document with images of the front panel and block diagram. I have also attached the vi.....as it stands at the minute
    All help greatly appreciated
    Regards
    G
    Attachments:
    Motor Control.docx ‏151 KB
    PID PWM Motor Control.vi ‏360 KB

    Hi Benjamin
    I have written a  PWM VI. I have the VI attached, and the updated PID PWM Vi. It is not working for me do. I set my PID gains between 0 and 5 (I assume the counter function outputs 0 or 5). I multiplied the PID output by 2 to give a maximum of 10 ( I read somewhere that the Daq MX reads duty cycle between 0 and 10 and not 0 and 100??) I have a waveform chart connected to the PID output and when I run the program, it reads 10, so I believe the problem is with the PWM code. I selected myDAQ/ctr0 on the counter dropdown box on the front panel and wired accordingly. I used my multimeter to read the output from ctr 0 when running the program but I read nothing (I can read a voltage when using PID to directly control the motor)
    Any help greatly appreciated?
    Regards
    G
    Attachments:
    PWM VI.vi ‏24 KB
    PID PWM Motor Control (January).vi ‏299 KB

  • 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.

  • Who can help me with a PID VI?

    I need a PID control routine in labview, does anyone have one that works?
    I have the PID toolkit, and have tried implementing there sub VI's but they just flat out don't work. Mostly because they are SLOW AS MOLASSES.
    Here is what i want to do. I have a shaker, and an LVDT on the shaker.
    The shakers input is power, not displacement. So i need to control the displacement of the shaker by using feedback from the lvdt as the error signal. I will be using a complex displacement waveform which i have represented as a displacement table in excel.
    So in essence, i prescribe the displacement, the pid controller outpus some "power" out and adjusts that power signal to closely follow the displacement table?
    How would i go about doing this? Im using MX.

    Here is the Vi i am currently working with. It has no problems and no PID.  (The PL V4 Mean.vi)
    Here is my attempt at implementing PID feedback: (The PL V5 PID.vi)
    Drive signal is the output, LVDT is the feedback control signal.
    Attachments:
    The PL V4 mean.vi ‏475 KB
    The PL V5 PID.vi ‏628 KB

  • Pid control motor

    I am trying to build a PID control that will be controlling two motors for a small balancing robot.  I am using an accelerometer and am unsure how to build a vi that will be used with a the arduino mega.

    What did you make your servomotors do? (I suspect it would have at least involved Proportional control, which is the first part of PID control).
    I recommend you start by learning basic PID theory (http://www.ni.com/white-paper/3782/en , or Google some lecture notes). Apply that knowledge on a single motor, to control its position via PID. I assume you're using a servomotor, so use the Encoder signal as your PID feedback.
    Then, learn how to interpret your accelerometers (Google it).
    Then, combine those to use both your accelerometer and encoder as PID feedback, to control one motor's position.
    Then, combine two motors to build your balancing robot.
    These will probably take you a few weeks. Good luck!

  • PID position control : guide me

    Dear member
    I want to built a PID position control 
    i read the DC position through potentiometer with -128 to 127 [full 360 degree]
    so the input to the pid is voltage range between -128 to 127
    the input of dc motor is PWM and the motor rotate direction
    so the PID output will be PWM 
    what about direction bit ??? What will be it circuit
    also how to control the speed in same system ?? is thire another PID?? 
    best regards
    hi ?Q>
    Solved!
    Go to Solution.

    nathand wrote:
    mangood wrote:
    what about control the position and the speed at same time ???
    That's a complicated problem. A quick internet search turned up this paper which describes some possible approaches:
    http://www.idt.mdh.se/kurser/ct3340/ht09/ADMINISTRATION/IRCSE09-submissions/ircse09_submission_22.pd...
    okkkkkk
    terrific paper
    hi ?Q>

  • Measuring back emf in a 3-phase BLDC motor

    I am currently trying to determine the back emf generated in the floating coil of a 3 phase BLDC motor (simple RC car motor).  I can currently monitor the current and the voltages supplied to each of the motor phases from the controller but I would like to eliminate the use of Hall sensors from my setup and monitor the back emf instead of the Hall outputs (to use as feedback instead).  I am using a CB-68LP terminal block and the NI 6024E PCI card.  To run the motor at full throttle requiers a 5 volt PWM at 60Hz and 12% duty cycle.  I am no EE, just a lowly ME, so bear with my ignorance and give a girl a hand.   Any suggestions?  Thanks!

    Hi pyrochk247,
    Out of curiosity, are you using a motion controller to control the motor, or are you using the 6024E's counters to do the PWM?  We don't deal with Back-EMF as a method of feedback so you'll have to forgive me if I trip up my understanding of the topic:
    In the way of reading the motor windings for a simple voltage and feedback voltage, that is highly possible.  Using a 6024E card you would be able to read in the analog signals and use the counters as outputs at the same time.  What would be difficult about this is pulling out the Back-EMF signals from the standard motor winding voltage.  I found this article:
    http://www.acroname.com/robotics/info/articles/back-emf/back-emf.html
    So the trick would be developing a method good enough to read the signals we desire well and rejecting the rest.  If you are using PWM from the 6024E then you could do decent feedback to the motor through a PID loop.
    Currently, I'm not trying to suggest anything.  Rather, I'm asking to see if this idea makes sense to you.
    Let me know what you think.
    Justin Louie

  • System Identification and Transfer Function of the LEGO MINDSTORM NXT Robot

    Can anybody please help with the below question.
    Using your LabView interface, input different values of power and record the output value of the number of wheel rotations. You can convert the latter into speed by measuring the diameter of the wheel. Then, type ‘ident’ in the command line of Matlab to launch a graphical user interface for system identification. Using the data collected for input power and recorded speed, you can derive the transfer function for your robot in the Laplace domain.
    You will notice that it is possible to approximate the transfer function to a first order system.
    Add disturbance to your system such as wind drag, road profile or friction. You might want to model the disturbance as a sinusoidal waveform.
    Analyse the system response in LabView in order to tune the response.
    Finally, write a LabView program to test your controller.
    Set both Integral and Derivative to 0
    Increase the value for Proportional controller to 0.5, 0.8, 1, 1.1, 1.3, and 1.5
    Select a suitable simulation stop time.
    Compare each simulation results and draw some conclusions.
    Record the steady-state error. Has it dropped to near zero?
    Record the rise time. Has it decreased to less than 0.5 second? And for what values of Kp?
    Check whether this response is realistic i.e. a real cruise control system generally cannot change the speed of the vehicle from 0 to 10m/s in less than 0.5 second.
    Adjust the gain (Kp) to give a reasonable rise time and add an integral controller to eliminate the steady-state error.
    Change both Kp and Ki and see what happens to the response. When you adjust the integral gain Ki, start with a small value since a large Ki can destabilise the response. (Ki =0.001, 0.002, 0.003, 0.004).
    Then you need to adjust both the proportional gain Kp and the integral gain Ki to obtain the desired response. Record the values of Kp and Ki that can meet all the design criteria.
    Write the PID-feedback control LabVIEW program as described above.
    Does it work? Quantify! Show us it is working
    Hand in a short report on the PID project on the cruise control of the LEGO MINDSTORM NXT Robot. Your report should contain an introduction to cruise control and uses of PID controllers, a brief explanation of how PID feedback control works. The printout of the Block Diagram and Front Panel of your LabVIEW program should be attached at the end of your report.
    Put it all together. There are many questions that can be explored and written up in the result section. Be creative.
    Here are some things that may be addressed: Check whether your system can stabilise speed to within 1%. What are the optimal PID parameters that you have found? Can you choose PID parameters to both reach the set speed quickly and also maintain the speed within good accuracy once the system has reached the set speed? Can you control the speed of small steps? Explain your results?

    Thanks for that.
    DanHarryman wrote:
    HI ToolMonkey
    You should be able to build control system to do this using PID control VIs. The following paper is a good place to start when working with PID systems. 
    http://www.ni.com/white-paper/6440/en
    Let me know how you get on using some of the functions in this. 
    Thanks 
    Dan.H
    UKAE

  • Difference in analog input and analog output values

    i am using 6014 DAQ card for providing motor speed reference voltage to Driver and reading back speed
    feedback voltage using LabVIEW 6.0. For this i have used AO Single Update and AI Single scan. Both are in the same while
    loop.The loop has a Wait timer of 50ms. When i take a plot of Analog o/p and input, i get a shift
    between input and output. Why is the shift or the time not synchrnised..please help..When the while loop wait timer is 200ms instead of 50ms, the shift is not there.

    I believe the problem is 2 fold. First if you are using traditional DAQ, or DAQ 6.9.3 or before, the driver is single threaded. Therefore the 2 VIs will not run simultaneous. Try DAQmx and you may be more successful.
    The other is that you are using higher level 1 point VIs. In general they are not the best to use in a time sensitive loop. You are better off using hardware timing, rather than software timing. With hardware timing you have more control over the synchronization of the 2.

  • NXT ROBOT Question

    Can anybody help with the question below please
    Using your LabView interface, input different values of power and record the output value of the number of wheel rotations. You can convert the latter into speed by measuring the diameter of the wheel. Then, type ‘ident’ in the command line of Matlab to launch a graphical user interface for system identification. Using the data collected for input power and recorded speed, you can derive the transfer function for your robot in the Laplace domain.
    You will notice that it is possible to approximate the transfer function to a first order system.
    Add disturbance to your system such as wind drag, road profile or friction. You might want to model the disturbance as a sinusoidal waveform.
    Analyse the system response in LabView in order to tune the response.
    Finally, write a LabView program to test your controller.
    Set both Integral and Derivative to 0
    Increase the value for Proportional controller to 0.5, 0.8, 1, 1.1, 1.3, and 1.5
    Select a suitable simulation stop time.
    Compare each simulation results and draw some conclusions.
    Record the steady-state error. Has it dropped to near zero?
    Record the rise time. Has it decreased to less than 0.5 second? And for what values of Kp?
    Check whether this response is realistic i.e. a real cruise control system generally cannot change the speed of the vehicle from 0 to 10m/s in less than 0.5 second.
    Adjust the gain (Kp) to give a reasonable rise time and add an integral controller to eliminate the steady-state error.
    Change both Kp and Ki and see what happens to the response. When you adjust the integral gain Ki, start with a small value since a large Ki can destabilise the response. (Ki =0.001, 0.002, 0.003, 0.004).
    Then you need to adjust both the proportional gain Kp and the integral gain Ki to obtain the desired response. Record the values of Kp and Ki that can meet all the design criteria.
    Write the PID-feedback control LabVIEW program as described above.
    Check whether your system can stabilise speed to within 1%. What are the optimal PID parameters that you have found? Can you choose PID parameters to both reach the set speed quickly and also maintain the speed within good accuracy once the system has reached the set speed? Can you control the speed of small steps?

    Duplicate Post.

  • Dynamically launch selected VI on cFP target

    I am running LabVIEW 2011SP1 on a Win7 machine. My applicatoin uses cFP to monitor temperatures, and control 6 heaters (PID feedback) during heating and soak segments of a profile. Cooling segments are passive, no control aspects, I need only monitor temperatures until some setpoint is reached, then another segment of heating and soaking. I have the heating segment coded, passing setpoints via networked shared variables to the cFP controller (cFP2200). My thinking is to write a second VI to monitor thte passive cooling phases, but then I need to be able to toggle back and forth between two VIs on the target. Is this the correct approach (and if so how do I do it)? Or would it be better to make one huge VI to handle both scenarios?
    TIA
    lmd2
    Lawrence M. David Jr.
    Certified LabVIEW Architect
    cell: 516.819.9711
    http://www.aleconsultants.com
    [email protected]
    Solved!
    Go to Solution.

    Do you have to toggle between them or would you be able to run them in parallel with each other? 
    Based on what you described, I would suggest writing a main VI to control the VI you've already written along with the new passive monitoring VI as subVI's. 
    Applications Engineer
    National Instruments
    CLD Certified

  • Control and Simulation toolkit

    Hi everyone,
    I added a few screenshots of a simple PID feedback system. I programmed it twice with different blocks but I am not getting the same results. Can anyone spot the cause?
    Thanks in advance
    Attachments:
    labview1.JPG ‏66 KB
    labview2.JPG ‏174 KB

    Hello KF2,
    First:
    I had indeed overlooked the link between front panel and block diagram.
    I was a bit too fast and that's my fault..
    I always find it difficult to troubleshoot code without the code.
    For completeness:
    I did see the "teller" and the "noemer" you specified (I'm Dutch speaking so that part seems "normal" to me).
    But what still stumbles me is that all the PID parameters seem to be 1.
    I don't directly see any practical case where this would be like that.
    How did you define/calculate Ti,Td,Kd,Ki,Kp ?
    If you can share the VI, then I'll do some tests at my side.
    It's always easier to test code when you have it available
    Also, the utmost right part seems to be missing in the screenshot of the BD.
    I'm especially curious to see which discrete TF you have at the output of the Academic PID VI  and .
    I thought (at first glance) that you had shown that comparison in the block diagram/FP.
    My first guess would be that something has gone wrong in the crossing between different "domains" (eg. Laplace TF vs discrete TF),
    but I would need to test the code to be sure about this.
    Kind Regards,
    Thierry C - Applications Engineering Specialist Northern European Region - National Instruments
    CLD, CTA
    If someone helped you, let them know. Mark as solved and/or give a kudo.

  • How to obtain zero-mean,​uncorrelat​ed Gaussian sequence of unity variance in labview

    i want to implement equation x(n) = 0.7x(n-1) + v(n) using first order autoregressive model AR(1)
    where v(n) is zero-mean,uncorrelated Gaussian sequence of unity variance.

    Baho,
    The PCI-7332 is a stepper motor only controller.  Stepper motors do not have any sort of PID
    feedback loop.  Instead, stepper motors
    use something known as “pull in moves.” 
    Essentially what happens is the controller gets a command for a
    position.  It then sends the appropriate
    number of pulses to the drive for it to move that distance.  After the move is complete, the motion
    controller will use the position feedback to determine whether or not is has
    successfully moved to the appropriate position. 
    If not, it will try several times to “pull in” to the appropriate
    position.  The number of pull-in moves is
    settable in Measurement and Automation Explorer (MAX), as shown in this
    screenshot:
    When you speak of feedback loop settings, I am assuming that
    you are interested in controlling acceleration and deceleration parameters as
    your controller attempts to reach a setpoint. 
    These settings can be adjusted in the Trajectory Settings as shown in the screenshot below:
    After you change any settings in MAX, you will need to click
    Save and Initialize to see the effects.  
    Regards,
    Luke H
    Message Edited by Luke H on 04-02-2007 05:05 PM
    Attachments:
    Trajectory-Settings.JPG ‏70 KB
    Pull-In-Settings.JPG ‏78 KB

  • Accessing hardware board with two VIs simultaneously

    Hello,
    I have a NI BNC-2090 board that I use to interface with a multimeter (which I get my data from) and an ion gauge (which needs to have its filament current regulated and held constant). I have a VI which I've written that performs both the data acquisition and current regulation, but it can only do one of these tasks at a time, which is undesirable because the filament current drifts when the data is being gathered.
    In order to prevent the filament current from drifting, I want to create two standalone programs that I can run in parallel, so that the filament current can be regulated continuously and so that data can be acquired on demand. I've attached two programs which I've made to do this.
    Each of the attached programs does its job very well. The problem I have arises when I try to run them both simultaneously. The error I get is Error -50103, which tells me the specified resource (my board, if I understand this correctly) is reserved.
    I tried to be a little more explicit in my task creation and I also tried defining global virtual channels in MAX to no avail.
    Any help would be greatly appreciated.
    Regards,
    Ali
    Solved!
    Go to Solution.
    Attachments:
    Standalone DAQ.vi ‏40 KB
    Standalone PID Feedback.vi ‏51 KB

    Ali H. wrote:
    Brian,
    Having all my reads in one task and all my writes in another makes sense, especially after I learned that the board has only one A/D converter.
    What I'm struggling with now is how to restructure my set up. Is there a way to share tasks between VIs and keep the VIs distinct like I want so that I can run them individually or together as I need? Or will that requirement force me to incorporate the VIs I posted as subVIs of another VI which passes the same read and write tasks to both subVIs? (If this is unclear, see attached png; the case structures are so I can choose which subVIs run and the while loop is there so I can turn them on and off).
    Thanks.
    Yes,  By adding in a Special type of Action Engine I've dubbed a "Resource Module" as a hardware access layer for yor task.  Since the Module is not re-enterant any vi can call the Resource Module without fear of causing DAQmx errors but, the second caller will wait for the first call to finish.   Here is an example notice that it keeps the resorurce discriptor (in this case a DAQmx Digital Out Task) on a Shift register to avoid the need for the caller to know what is going on with the resource (saves wires too).
    Jeff
    Attachments:
    Attenuator.vi ‏30 KB

  • Toolkit for feedback system? Motion; PID; Control/Simulation???

    Hi, I have to develop/program an organ bath system - a feedback system mimicking real sinusoidal breathing oscillations (shown in attached images). I have NI Labview 8.5, NI-Motion 7.6, a linear motor (M-235 DC-Mike actuator), an MID-7654 Servo Power Motor Drive and a pressure transducer. I believe I will need to control the PID controller and am aware of the PID Control Toolkit as well as the Control Design and Simulation Toolkit for NI Labview. However, is it possible to control the system using the NI-Motion software I have at the moment? If not, do I have to purchase both the PID and Control/Simulation Toolkit or just one? Thanks in advance...
    Attachments:
    feedback design1.JPG ‏25 KB
    feedback system1.JPG ‏42 KB

    Dear Garry,
    Do you have a motion controller to interface the MID-7654 to your
    computer and LabVIEW? This would be the PCI-734x or PCI-735x. If you
    do, I believe that you could implement your application with LabVIEW
    and NI-Motion. You could do so by using the analog feedback feature for
    the control loops for each axis. Then, you could specify the optimal
    sinusoidal moves/pressure patterns that mimic real breathing patterns.
    The analog feedback from your pressure transducer will be used during
    the move(s) to maintain the pressure that you want.
    Please see Chapter 13 here for more details:
    NI-Motion User Manual
    http://www.ni.com/pdf/manuals/371242c.pdf
    Here is also a good discussion forum post on Analog feedback:
    Can i use NI-7358 to implement a hybrid position force/torque control system?
    http://forums.ni.com/ni/board/message?board.id=240&thread.id=2976&view=by_date_ascending&page=1
    I believe that the above option would work for you, and you would not
    have to use the Control Design and Simulation Module or the PID
    Toolkit. Please let me know if you have any additional questions. I
    haven't actually set up a system with analog feedback from a pressure
    transducer before, but I believe that the above would be a very viable
    option.
    Best Regards,
    ~Nate

Maybe you are looking for

  • Windows Vista 64 bit Hot Sync w/Zire 71

    The Zire 71 is not a wireless unit so I can not sync via Bluetooth.  I tried infra red, and although the PC and the Zire can connect, they can not communicate.  It seems before we can use an infrared sync, we must sync via cable.  But Vista doesn't r

  • ITunes Icon Missing this morning!??!???!

    Last night I spent hours copying/importing some cds to my Itunes. I also tried to install Quicktime, but I don't think it worked. This morning the ITUNES icon is missing from my Desktop and I cannot find it in the recycle bin.???? If I go to Start /

  • Missing Defines Error in Simple Java Stored Procedure

    Anyone have any suggestions on what might be causing the unusual behavior described below? Could it be a 10g java configuration issue? I am really stuck so I'm open to just about anything. Thanks in advance. I am writing a java stored procedure and a

  • Unable to compile JSP in Java Server

    Hi: I have installed Java Application Server Platform Edition 8 locally and attempting to run an application with a JSP. However, when it attempts to compile the JSP, I get the following message: org.apache.jasper.JasperException: Unable to compile c

  • Change Book's title in runtime ???

    Hello, Is it possible to dynamic change the Book's title(TAB title) in runtime ? And how can I change the portlet's title in runtime ?? Best regards, Eric