Components

cancel
Showing results for 
Search instead for 
Did you mean: 

Automotive Engine Simulation Library for HIL

The version posted is for NI VeriStand 2009. Each version of NI VeriStand is bound to the corresponding version of LabVIEW. Therefore, if you'd like to upgrade it to VeriStand 2010, you can open the source code in LabVIEW 2010 and rebuild the source distributions. NI VeriStand 2010 will mutate the XML. When opening the source code, you will notice that the FPGA references that are bound to type defs use absolute paths so those will need to be updated.

 

You're in luck because the custom device was very recently upgraded to NI VeriStand 2010 and is currently available at ftp://ftp.ni.com/outgoing/Engine Simulation.zip. This file will only be available on the FTP for a very short time (few days). I will not be posting it online because I am currently working on a new paradigm for the Engine Simulation Custom Device for NI VeriStand 2010 and beyond. I am hoping to provide a beta version of the new custom device to interested customers within the next week or two. If you email me at mike.lyons@ni.com I can provide this to you when it's available.

 

Regads,

0 Kudos
Message 11 of 54
(7,913 Views)

Hi everybody, 

I'm working with Engine Simulation Cutom Device but I'm using 2010 version of Veristand so I've done the rebuild for source code. It seems to work but when I try deployng the project to my PXI System this error appears:

 

 

Error 1003 occurred at Project Window.lvlib:Project Window.vi >> NI_VS Workspace ExecutionAPI.lvlib:NI VeriStand - Connect to System.vi
Possible reason(s):
LabVIEW:  The VI is not executable. Most likely the VI is broken or one of its subVIs cannot be located. Select File>>Open to open the VI and then verify that you are able to run it.
=========================
NI VeriStand:  Open VI Reference in NI VeriStand Engine.lvlib:Open Custom Device Driver VI Reference.vi->NI VeriStand Engine.lvlib:Launch Asynchronous Custom Device.vi->NI VeriStand Engine.lvlib:VeriStand Engine State Machine.vi->NI VeriStand Engine.lvlib:VeriStand Engine.vi->NI VeriStand Engine.lvlib:VeriStand Engine Wrapper (RT).vi<APPEND>
VI Path: c:\ni-rt\VeriStand\Custom Devices\Engine Simulation\Engine Simulation Engine.llb\Engine Simulation RT Driver VI.vi

 

Error 1003 occurred at Project Window.lvlib:Project Window.vi >> NI_VS Workspace ExecutionAPI.lvlib:NI VeriStand - Connect to System.vi
Possible reason(s):
LabVIEW:  The VI is not executable. Most likely the VI is broken or one of its subVIs cannot be located. Select File>>Open to open the VI and then verify that you are able to run it.=========================NI VeriStand:  Open VI Reference in NI VeriStand Engine.lvlib:Open Custom Device Driver VI Reference.vi->NI VeriStand Engine.lvlib:Launch Asynchronous Custom Device.vi->NI VeriStand Engine.lvlib:VeriStand Engine State Machine.vi->NI VeriStand Engine.lvlib:VeriStand Engine.vi->NI VeriStand Engine.lvlib:VeriStand Engine Wrapper (RT).vi<APPEND>VI Path: c:\ni-rt\VeriStand\Custom Devices\Engine Simulation\Engine Simulation Engine.llb\Engine Simulation RT Driver VI.vi

 

So I opened the indicated library Engine Simulation Engine.llb  and I've found this error in the VI Set FPGA Config.vi which is inside the VI indicated as broken Engine Simulation RT Driver VI.vi.

Maybe the problem is about the VI refernce path but it seems to me it's correct.

Can anybody help me???

 

 

0 Kudos
Message 12 of 54
(7,824 Views)

I would expect the problem to be caused by the TypeDefs corresponding to the FPGA References. LabVIEW has some weird pathing problems with that, and I think they are saved as absolute paths. You can update it in the Open FPGA Reference.

 

I strongly recommend against using the old version of the Engine Simulation Custom Device with NI VeriStand 2010 or newer. You can find a completely revamped and new custom device for Engine Simulation at http://decibel.ni.com/content/groups/engine-simulation-2010-beta. You'll need to request to join the group before getting access to the new custom device.

 

Regards,

0 Kudos
Message 13 of 54
(7,818 Views)

Thank you.

Request done.

 

0 Kudos
Message 14 of 54
(7,813 Views)

Hi,

 

I am trying to use an engine model built in MATLAB along with the AES library for interfacing to build an EMS HIL system. I have tried to use simulink interface toolkit to establish the connection. However I am aiming at running the engine model on the RT controller of PXI.

 

I am unable to integrate the SIT generated code to my AES library in a way to run both on the same RT controller. Has any one tried this. Or any one knows how to connect the MATLAB model to the AES library in a better way.

0 Kudos
Message 15 of 54
(7,625 Views)

aksgoel

 

that is possible and one of the primary goals of this library. However it takes a lot of programming and experience to accomplish this.

 

instead, I recommend using NI VeriStand with the engine simulation custom device. https://decibel.ni.com/content/docs/DOC-19122

that will implement all the model running and fpga interfacing rt code for you. 

Stephen B
0 Kudos
Message 16 of 54
(7,538 Views)
Hi Stephen,
0 Kudos
Message 17 of 54
(7,532 Views)

Hi Stephen,

      I'm Gaurav.  I and Vijay have taken over the work started by Akshay Goel. We deployed the Custom Device of Engine Simulation library you had given us and we are able to view the Injecor and ignition start angles in veristand GUI, but we are  not able to understand

what is the reference for these angles – is it power TDC or exhaust TDC and whether it is before or after TDC and whether the rotation is clockwise or anticlockwise. For eg , we gave the following inputs-

We entered the injector start angle in our controller to be 378 deg before power TDC.So it generates the injector pulses accordingly, but the output which we are

getting in veristand is 500 deg and 140 deg( it keeps switching between

these values).

                        We would like to know what is the reference for these angles

                        1.Before or After Power TDC.

                        2.Before or After Exhaust TDC.

Does the Crank wheel rotate clockwise or Anti-clockwise?

Following are the inputs to Custom Device GUI

no of teeth :36

no of missing teeth: 2

Pos of missing teeth after TDC : 225( The crank sensor in our engine is situated in such a way that, it detects Power TDC of 1st cylinder 135 degrees after it detects the missing teeth when the crank is rotating in anticlockwise direction. Therefore the offset for the next Missing Pulse after TDC when it is rotating in the same direction is 225 degrees.).

 

Also in the labview model it expects 2 values

  a.Nteeth.crank.Missingteeth.Offset

  b.Nteeth.crank.TDC.Offset

but through veristand we are entering only the offset between missing teeth and

TDC. Will it calculate both these values with the one value we enter in the GUI.

 

Thanks and regards,

Gaurav

0 Kudos
Message 18 of 54
(7,527 Views)

Hi Gaurav,

 

Glad to hear you have been making progress and you can see data inside NI VeriStand. I'll try to answer you questions here, but if I don't answer them clearly... please let me know so we can be sure to resolve this as much as possible.

 

  1. Angle reference "is it power TDC or exhaust TDC"
    • The simulation doesn't make a distinction between "power" and "exhaust". It simply simulates the waveforms and captures event inputs... if the waveform is supposed to be "power" or "exhaust" in your application is up to you.
  2. Angle reference "whether it is before or after TDC"
    • The angles are in reference to angle 0 of the crank/cam... and this custom device considers angle 0 as TDC. So if the pulse is seen from angle 212 to angle 215 your start angle is 212, end angle is 215 and angle duration is 3.
  3. Angle reference "whether the rotation is clockwise or anticlockwise"
    • The angle simulation starts at 0 and increases to 720 or 360 before rolling over back to 0. The angle simulation is done by the Angle Processing Unit (APU) and the 0-360 degree value is output with the name "APU.Cycle Angle" and the 0-720 value is output with the name "APU.Crank Angle". Wether this is clockwise or anticlockwise is up to you in your application. Just define the teeth with whatever your perspective is. (General note, the 0-720 and 0-360 values are named crank and cam just because that is the general use case.... but you can use these values however you want)

 

My questions/comments to you:

  1. Check the waveforms with an oscilliscope and make sure they are OK. I've seen issues before where a pull up/down resistor was needed depending on the NI IO used and the ECU.
  2. Check the injector signals with an oscilliscope and make sure they aren't noisy. If they are noisy... use the "# of cycles to filter" input on the event subVI in your FPGA code. The units are "cycles" of the FPGA loop... which goes at 40 MHz so this will be a large value if you want to enable filtering.
  3. I assume you are using the Fully Custom Teeth with the 0-720 degree signal (Default name: Cam) as the reference for your ECUs injectors? I say this because you state your controller is setup to inject at 378 degrees before power TDC. Are you sure this is wired correctly?
Stephen B
Message 19 of 54
(7,513 Views)

Correction, I had my nouns backward:

  • "APU.Cycle Angle" is 0 - 720
  • "APU.Crank Angle" is 0 - 360
Stephen B
0 Kudos
Message 20 of 54
(7,510 Views)