Engine Dynamometer Brake Control, DAQ & LabVIEW PID

Hi all, I am in the middle of a project to design, build and test a controller for an eddy current engine dynamometer.  I have an idea of how the inputs, outputs and overall process go, but am not sure how to best implement the necessary features in LabVIEW.  I have access to a NI USB-6211 DAQ, and a PC with LabVIEW 8.6, DAQmx drivers and the PID toolkit installed.
On the electrical and mechanical side, an SCR firing board takes a 0-5VDC analog control signal to vary the amount of current passed through 380V three-phase electrical lines hooked into a large field coil.  Varying the input 0-5VDC signal results in a directly related variation of input current into the field coil, which in turn affects the strength of the magnetic field generated by the coil.  A large ferromagnetic rotor spins concentrically within the coil.  If the magnetic field increases, eddy currents are induced in the rotor causing it to slow down and heat up, and vice versa.  The engine-under-test is bolted to the large rotor and is put under load by the effects of the induced magnetic field and eddy currents.
The plan is to have LabVIEW manage the 0-5VDC SCR firing board control signal.  The dynamometer currently has manual rotary knob controls, but the types of tests that are currently possible are limited.  The goal of the overall project is to produce "dyno sheets," plots of engine torque and horsepower over the motor's usable RPM range.  The problem, and motivation for this project, is that the manual controls cannot provide repeatable, precise measurements necessary for "power sweep" tests used to produce dyno sheets.
Power sweep tests are used by all engine and chassis dynamometers to gather an evenly distributed collection of data across the engine's usable RPM range.  The idea is that the engine should be forced to accelerate its RPM at the same rate from just off-idle to rev limit.  Bolted to a dyno and given its druthers, most engines will accelerate more slowly off-idle and more quickly in their upper RPM power bands.  Load must be controlled so that the engine can spin as freely as possible down low in the RPM range, and be forced to maintain constant acceleration as it tries to pull away in the upper RPM range.  Human, manual control of rotary knobs can provide a respectable effort in this situation, but the problem becomes very apparent when comparing back-to-back, "identical" tests on the same engine, with the same operator.  Repeatability of torque and power measurement tests is very important to understanding how distinct changes to the engines mechanical and fluid systems affect its torque output, along with other symptoms.
I hope the background is helpful.
There are RPM and Torque inputs into LabVIEW for the engine under test.  In the design stage, I figured I would be able to implement a PID controller in LabVIEW to vary the SCR firing board's 0-5VDC control signal.  The PID loop would control the 0-5VDC signal so as to allow the RPM of the engine-under-test to accelerate as closely as possible to an operator-chosen rate.  The USB-6211 DAQ has two analog outputs, one of which can be used for the 0-5VDC control signal.  The DAQ also has two digital counter circuits.  One of them is used for counting and determining the continually changing frequency of a TTL pulse train driven by engine-under-test RPM.  Lastly, one of eight analog inputs is used to measure a 0-5VDC analog input signal from a strain gage signal conditioner indirectly measuring engine-under-test torque output.
I worked with LabVIEW as a student in school, but never attempted to design VI's from scratch until now.  I spent the last week or so practicing with the DAQmx Assistant and later the broken-out DAQmx LabVIEW code for bench-testing the counter and analog inputs for RPM and Torque.  I plan to begin experimenting with PID controls this week, but I have stumbled into a few trouble spots with the DAQ input code already.
As of right now, it seems that the PID control loop will only use RPM data, not engine torque data.  I would like to make sure that the sampling settings being used provide just the right amount of coverage, not using more DAQ or PC resources than necessary.  I figure this will assure the sampling process and controller will run as close to real-time as possible without relatively large-scale changes to the system.  Due to mechanical limitations of the dynamometer, the engines under test will never exceed 3600 RPM.  A variable reluctance sensor is positioned closely to a 60-toothed trigger wheel bolted to the dyno's rotating assembly.  The VR waveform is passed through a LM1815 based VR signal conditioning circuit to produce a TTL pulse train.  This digital signal is then piped into of the counter inputs on the USB-6211 DAQ.
(3600 Revolutions per Minute * 60 Teeth per Revolution) / 60 Seconds per Minute = 3600 Teeth per Second (Hz)
The maximum frequency of the RPM signal will be 3600Hz.  I started to try different DAQmx Timing settings. It seems the three main options are Timing Source, Timing Rate and Number of Samples.  I have the book "LabVIEW for Everyone," and read Chapter 11 on LabVIEW with DAQmx, but I had trouble figuring out exactly how these three fields affect a Counter input, as compared to the examples in the book covering analog inputs.  If it's not too much trouble, could anyone shed any light on this?
In case it's interesting, here are some pictures of the engine dynamometer and some of the older data equipment that is being replaced.
Engine Dyno Pictures
Thank you for any help!
Rob

CoastalMaineBird wrote:
As it happens, I am involved with a large project that controls engines, as well.  I have two control loops, one controls dyno drive based on speed, and the other controls throttle based on torque.  Usually only one is in PID mode at a time, the other is open loop.  I have to run the engine thru a prescribed speed-torque cycle and measure how much exhaust pollution occurs.
We do "Torque Maps" which are sweeps similar to what you describe. You put the throttle 100% ON, and ramp up the dyno speed, all the while capturing data.  You get a map of how much torque you can obtain at any given speed. 
I do it on a PXI box to avoid timing issues.  When I last tried to use the host computer to do this, Windows was just not able to devote the time to getting the data right.  The PXI box guarantees that I can control the loop at 100 Hz (I have tested it up to 1000 Hz).
Anyway, to your specific question: 
I started to try different DAQmx Timing settings. It seems the three main options are Timing Source, Timing Rate and Number of Samples. 
The counters are general-purpose, so they can be configured in many different ways.
The TIMING SOURCE is where the basic timebase comes from.  If you're measuring a high-frequency signal, you want a higher-frequency timing source (so you have resolution to spare).  If you're measuring a low-frequency signal, you want a low-freq timebase (so you don't run out of counter bits).  If your max input is 3600 Hz (277 uSec), then a 1 MHz timebase (1 uSec) will give you  one part in 277 resolution WORST CASE.  A 10-MHz timebase will be 10 times as good.
I don't know where you are getting the TIMING RATE and # SAMPLES inputs, can you explain? 
That's a very interesting project you are working on, certainly a lot more involved and impressive.  I think I saw a few screenshots of the LabVIEW interface on your website and wow!...that is really nice.  The emissions analysis equipment can get very pricey, but I can't think of a more timely test to be directly involved in at this point in time.
I briefly researched standalone LabVIEW system options and real-time capabilities.  I am hoping that the barebones nature and low operation count of the VI will allow a Windows host PC to be sufficient for controlling the process.  This is largely an economic motivation to keep the overall project cost down.  If it turns out that PXI hardware is necessary, it will also be possible to look down that path at that point in time.
When I first looked at LabVIEW DAQmx reference materials, I suspectec I would need to go beyond the DAQ Assistant and break down DAQmx tasks into their lower level start, read, write, stop and clear components.  After reading more and working with additional LabVIEW PID examples, it looks like I may be able to stick with DAQ Assistant sub-VI's.  I was confused at the time by the different DAQmx timing components and chose to begin with a question on the counter input.  Today, a DAQ Assistant sub-VI seems to be handling the counter input well enough.
I most likely need to focus on PID parameter tuning at this time.  If it turns out that the timing configuration of the counter RPM input is preventing the system from working as required to perform a power sweep, or follow a Torque Map like you mentioned, then I will need to revisit it.  For now I'm just going to be happy that its portion of the system seems to be working.  
Message Edited by el bob on 03-24-2009 01:45 PM

Similar Messages

  • Can LabVIEW Run-Time Engine 7.0 control LabVIEW 6.1 VIs?

    I'm attempting to remotely control a LabVIEW 6.1 example VI through the browser plugin on another system. On that other system, can I use LabVIEW Run-Time Engine 7.0? Or do I need 6.1?

    Never mind, I should have read the RTE 7.0 information first. I need LabVIEW Run-Time Engine 6.1 to run LabVIEW 6.1 VIs.

  • Auto Tune prior to running motion control program (LabVIEW)

    Hi,
    I am controlling Parker Compumotor (404-LXR) linear servo table via GV6 drive and PCI-7344 motion controller.
    The problem is that I always have to run automatic tuning in MAX when I turn off all the system and restart it.
    Before I use the automatic servo tuning in MAX, the servo table buzzes and oscillates wildly. Cabling seems to be successful as linear servo motor is completely controlled by LabVIEW after auto tuning in MAX.
    I wonder how I can just run my LabVIEW program without running Auto Tune step.

    Hello Gino,
    Thank you for using our discussion forums. Yes, you can programmatic load the PID parameters from LabVIEW. Tune your servo using auto tune, once you are satisfied with the response look under the Control Loop tab for the PID parameters. In LabVIEW use the Load All PID Parameters.flx and use the tuned parameters from Measurement and Automation Explorer as the PID Parameters input for this VI. Place the VI before the multistart.vi. This will make sure the correct PID settings are used. I hope this helps you out. Have a nice day!
    Regards,
    Nipun M
    Applications Engineer
    National Instruments

  • Brake control heavy trucks through OBD-II

    Does anyone know if it's possible to control the brakes of heavy trucks like Volvo or Scania through the OBD-II connector using LabVIEW? I know that the brake pedal of these trucks contain a potmeter. How can this be solved? I would probably use a USB or Bluetooth OBD-II adapter like ELM327 to communicate with computer and labVIEW.

    I would really hope we don't have a brake by wire system in big trucks.  I've seen far too many wires in a car chewed by mice and other animals to want to rely on them to stop a massive truck.  I guess there is always some kind of point of failure but still.
    I'm also not sure how big a heavy truck is, or what model that might be.  I do not know of any consumer vehicle made by any OEM that has the brake controled through a in vehicle message.  And even if it was, I would suspect lots of security through seed and key to prevent someone like you from activating the brake through the ODB-II port.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • LabVIEW PID Code explained?

    Hi NI Community,
    I'm working on understanding the code behind the LabVIEW PID. First, let me say that YES I understand the theory of a classical PID control and understand how Kp, Ki, and Kd should affect my system. I'm interested in some of the underlying code behind the PID (DBL).vi in LabVIEW.
    Specifically, integrator error in this VI is defined as
    IntError = Error + LastError *(Kp/Ki)*0.5*(1/60)*dt + LastIntError
    I'm simpliflying some of the logic but that's the meat of it. What are the 0.5 and 1/60 attempting to do in this equation? The dt is in units of seconds. Also, shouldn't this IntError be multiplied by Ki (e.g. Igain) at somepoint as well to follow the model of a Classical PID control?
    These links were a great starting point but I'm trying to connect the dots between this theory and the actual code running in LabVIEW:
    http://zone.ni.com/devzone/cda/tut/p/id/6440
    http://zone.ni.com/devzone/cda/tut/p/id/3782#toc1
    Thanks,
    Craig

    Hello Craig,
    The PID toolkit is based on the "academic" version of PID where it uses proportional gain affecting integral time and derivative time. Those time are in minutes instead of seconds, that is the reason you have 1/60 on the equation.
    Also, during the process of discretization of the integrator (making the continuous integrator discrete), you have basically 3 ways to discretize it: forward, backward and trapezoidal (also known as bilinear or tustin). The best method is the trapezoidal, which is based on getting the following formula: (see page 2-2 on the PID manual - http://www.ni.com/pdf/manuals/372192d.pdf)
    IntegralError (i) ={0.5* [error (i) - error (i-1)]} + IntegralError (i-1)
    Then, by changing the time to minutes and making the integral gain = proportinal gain / integral time, then you would get to our current implementation.
    Also, notice that there are in general 3 methods of representing PID algorithms, which we call: academic, parallel and series. See http://digital.ni.com/public.nsf/allkb/6E76EC47B83​1FAED86256E4E007347DC
    http://zone.ni.com/reference/en-XX/help/371894D-01​/lvctrldsgn/cd_pid_mdl_vi/
    Please let me know if you have any more questions.
    Barp - Control and Simulation Group - LabVIEW R&D - National Instruments

  • Fuzzy control using Labview and arduino

    Dear all,
    I have been trying to control the output of an LED using a fuzzy logic controller, based on temperature and humidity values that I receive from the DHT22 sensor via arduino in the LABVIEW setup, but the problem is, I am not sure how to set up the PWM pin of arduino for that purpose. I have used an arrangement for the setup but it has not given any LED signal so far. The VI is attached herewith.  PS- I have connected the LED to pin 6 (PWM pin) of the arduino UNO board.
    As far as the data acquisition part is concerned, the setup is working fine and I am being able to get the values of temp, humidity and light intensity.
    Any help in this regard would be highly appreciated.
    Attachments:
    temhumlightctrl1.vi ‏48 KB

    Just start with a simple VI commanding a PWM, and put a meter or a scope to see if the output changes.  If you can't get any output there is likley a problem with your setup.  If you are driving more than an LED you'll need some kind of buffer circuit or opamp to increase the current capabilities.  These micros can't drive much power so if you intend on using this PWM for controlling temperature and humidity you won't be able to drive it directly.
    Also be aware that your loop time is going to be relativly slow, and not deterministic.  Most control systems like PIDs need to have tight timing to ensure that the system stays stable while having a decent response time.  Since temperature and humidity change pretty slowly this will likely work just fine.  But know that the time it takes to send a command to the Arduino, have it go out, take a sample and then send it back over serial won't be consistent.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • DC motor closed loop control through labview using usb 6008

    Hello
    i am doing a project in which i want to control the speed of a DC motor (PID control) through labVIEW 2010. I am having a DC motor, a drive unit that regulates the voltage to the motor by getting analog voltage from 0 to 3.3V ( it can be used for both directions) and i also have a NI usb 6008 board. The problem is that i can't feed the usb 6008 with the digital signal from my hall effect speed sensor. Is it posible with this setup to control the motor?? I can also try to use the pulse as analog input and trasform the frequency into rpm's. Then i am thinking of generating an analog signal to feed the motor drive. If you have any further suggestion of a probably better hardware setup would be more than helpfull to me.
    Sincerely
    Jason Chaloulos

    Hello Michael
    Thanks for the reply. I came across those topics before and all of them are trying to generate a PWM signal as output i want to use just an analog signal output so timing on the output is not that important i guess. i am struggling on getting the frequency from the digital input signal that my hall effect sensor generates. Since the maximum speed of the motor is 3000 rpm and with my tooth wheel the maximum  output frequency of the sensor will be 300Hz which i see its way less than the limitation of my ni board. Is there any tutorial documentation that might help me with this one ? Thank you in advance.
    Kind regards
    Jason

  • Is it possible to create user defined control in labview

    in .net we can create user defined contol in which i can put more then one control and,, can use it as single control when needed,, but,, how this possible in labview,,
    actually in my program i have a tab control and,, in that tab control there are 8 pages,, now there are 5 different kind option selection for each page lets say "a" "b" "c" "d" "e",,,,,.,. so,, when i select "a" configuration for tabpage 1 should show.. "a"(control collection)  on tabpage1....and,, same should b possible for all 8 pages............................. this can possible if its possible to create user defined contorl in labview
    while in .net its very easy task i m confused here,..,.
    i put these controls in another 5 different  VI,,,, and tried to call in subpanel but,, i dont find the solution,,,
    Attachments:
    tabcontrol.vi ‏1 KB

    Hi,
    I've tried to open you attachment but LabVIEW tells me it's not a vi... could you check it and repost please ?
    I'm not really sure of what you need but you CAN customize you control in LabVIEW, it is not hard, you just have to know how it works
    Sometimes being good at another programation language confuse you more than it helps because you try to do as you are used to... the difficulty it to "translate" functions from a language to another.
    I do know how frustrating it can be when you think "Damned, it would take me only 5 minutes to do that with language a and after 10 hours with language b it is still not working "
    You have to get in LabVIEW way of thinking, I wish you good luck !
    A quick exemple... this might not do exactly what you need but it may help you anyway.
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"
    Attachments:
    exemple.vi ‏55 KB

  • How can i use activeX Control in labview?

    how can i use activeX Control in labview?
    please describe me step by step.
    thanks.

    Well..that was quite helpful..but now I'm encountering certain problems. I've attached the VI I've made.
    I don't need sound at the moment so I dropped it. (Although I tried to play it..but all I could hear was a very annoying sound.) Secondly I don't want to display any date or time..so i dropped that property too.
    Now when I run this Vi...the webcam turns on, the screen of videocapx pops up..then the webcam light goes off..and another pop up appears saying..labview is not responding..and i have to close it reluctantly.
    I haven't placed the stop capture property in this vi. i checked it by placing it too..but that doesn't work.
    I would like to notify that my actual task is to acquire image and then compare it with another one already present on my pc. I want you to please help me out..solve my first query then I'll proceed with the latter part.
    Attachments:
    activexvideocaps.vi ‏20 KB

  • Would like to monitor and control a labview application with a hand held device.

    Would like to monitor and control a labview application with a hand held device.
    Would like to use a palm or ipac on a local area network or communicate directly with the PC running windows.

    LabVIEW doesn't run on a hand held device. But, check out these documents:
    Is it Possible to Use Remote Front Panels to Control a LabVIEW VI Remotely Using my PDA?
    "What OS is recommended for LabVIEW to run on a PDA?"

  • Bing does not appear in add ons or in the search engine list or control panel, in fact there is no reference to it on my computer, yet still, it has hijacked my search and the normally very useful 'highlight, right click, open search in a new tab'

    Bing does not appear in add ons or in the search engine list or control panel, in fact there is no reference to it on my computer, yet still, it has hijacked my search and the normally very useful 'highlight, right click, open search in a new tab'

    Install, update, and run these programs in this order. They are all free for personal use, but some have limited functionality in the "free mode" - but those are features you really don't need to find and remove the problem that you have. '''(Not all programs detect the same Malware.)'''
    Malwarebytes' Anti-Malware - [http://www.malwarebytes.org/mbam.php]
    SuperAntispyware - [http://www.superantispyware.com/]
    AdAware - [http://www.lavasoftusa.com/software/adaware/]
    Spybot Search & Destroy - [http://www.safer-networking.org/en/index.html]
    If these don't find it or can't clear it, post in one of these forums for specialized malware removal help:
    [http://www.spywarewarrior.com/index.php]
    [http://forum.aumha.org/]
    [http://www.spywareinfoforum.com/]
    [http://bleepingcomputer.com]

  • Off the shelf XY gantry system controlled with LabView

    I am looking for an XY gantry system that I can easily control from labview.  I need a workspace of 11 by 16 inches with minimum clearance of 6 inches.  I was wondering if anyone has used a commercially available XY gantry or has any experience with an XY gantry.
    I have found these two tables/brands that already have LabView drivers
    http://www.zaber.com/products/product_detail.php?detail=G-LSQ450D450D&tab=Series%20Features#tabs
    http://www.techno-isel.com/tic/Catdas/Gantry3.htm
    And this one that looks promising too
    http://www.animatics.com/en/products/table-top-robot/animatics/table-top-robot/2-axis-ttr-xy-configu...
    Both Zaber and Techno Linear do not know of anyone in my area (Loveland, Colorado or Denver area) that I could go visit to see a table and I would like to see a working system before making a decision to buy a new system. I have not been able to talk to an engineer/technical sale representative at Animatics yet. 
    I am looking at using the XY gantry to position a sensor over a tray of parts to measure some properties of the parts.  The system I am designing does not need an high accuracy table (+- 0.005" is fine).  I would prefer to spend about $10K for a XY gantry table including any required controllers and hardware. 
    Thanks,
    Brian

    You have a good start, but 2 other things that you need to consider are your load and speeds required.  This will determine the mechanics of the gantry(ball screw, acme screw, belt, bearing type, etc.).  It will also determine if you need servos or you can get away with steppers.  You then need to figure what kind of motion you need.  Point to point moves can be accomplished with non-interpolated controllers, but any kind of coordinated motion will need a motion controller that can do true interpolated motion.

  • Automation unit control with LabVIEW

    I use LabVIEW 7.1 and NI FieldPoint devices (FP-1000) for educational
    purposes. I want to control a automation unit which has got 6 digital
    input and 6 digital output. Before I used the sequence structure, but
    actually I am not sure the solution whether true or not. How can I do
    like this control with LabVIEW?

    Duplicate.
    Try to take over the world!

  • Engine test cell automation using labview

    I want to know the hardware details of my application(engine test cell automation using labview).
    Amit Amrutkar

    >> I want to know the hardware details of my application(engine test cell automation using labview).
    I have a feeling that that one of the following happened  :
    A. The "Post" button was clicked by mistake before the compilation was over.
    B. The OP wants to know the hardware details for  his application which looks like an engine test cell automation. ( It thus must have been in a hardware forum I guess )
    Post more details on the number of analog channels , required resolution, sampling time etc and number of digital channels and there is a possiblity that we can start helping..
    Raghunathan
    LV2012 to Automate Hydraulic Test rigs.

  • Simple motor control with Labview

    Can anyone suggest a simple motor to be controlled by labview. I am interested in making a small scale elevator that is controlled with a labview interface. If anyone could point me in the right direction it would be greatly appreciated. - Bryan

    Attached is the vi for the program.  I will also try and attach the C code for the project.  It took a lot of failed attempts to get it working so I hope this works for you.  I don't have a schematic for you, but if you look over the C code it should let you know.  Also I used the CCS development kit 16F877A.  I'm not great at programming in C so there is a good chance you can clean it up a bit.
    I'll keep an eye on this post if you have any questions, when winter comes I'll probably work on this some more.
    Message Edited by nutmegzzzz on 09-19-2005 01:56 PM
    Attachments:
    Serial Read with Timeout version 1b.vi ‏169 KB
    LED and Motor Control from LabView - Complete.c ‏3 KB

Maybe you are looking for

  • Is CAL required for SharePoint Foundation 2010?

    Is extra CAL required for uploading/downloading docs using SharePoint Foundation 2010? We already have Licensed Windows Server 2008 R2. Ours is an intranet application which will be accessed by 400 intranet users. If CAL is required then can i use on

  • Web.xml file

    Hi I have a servlet that is working perfectly through JBuilder. When I try and run it through Tomcat I get an error saying it cannot find the file. In JBuilder I have a html form. The value entered in the form is passed to the servlet. The servlet ca

  • FTP processing files mutliple times

    Hello, I have an issue, regarding the ftp scenario. I have configured the Quality of Service to "Exactly Once", Poll interval 120 seconds. I doubt that its performing as desired, because I see many files were processed many times. My question is what

  • Decimals in data value in SQL

    Hi, I have data column defined as Balance NUMBER(20,6) in my table. The data that I'm loading is 2500.44634. But, when I see in table, I see data coming as 2500.4. No matter how many decimals I give in datatype, table is displaying only one deimal va

  • Help in jsp:forward

    Hi I am forwarding a request from my Servlet to a Jsp using Requestdispatcher class.From that Jsp i want to forward the request to some other servlet on Clicking a Button. I dont want to put it in form action.I want to again forward the request to so