02-17-2009 12:09 PM
Hi
I work on data receive from many sensor during work internal combustion engine, I will try explain you everything, i thing it is the best way to help me. In attachments i have piece of my data where:
1)CYCLE CHANNEL
In 1 channel I have data from sensor which show one moment during rotate crankshaft when is beginning new cycle ( sensor are very quickly so in my data beginning of cycle isn’t one line of data but estimated 10 line, but I was change this channel to good-looking and I have in this channel many “0” and when is firs line which show beginning new cycle is “ 1” ( one cycle it is two revolution=720 degrees)
2)channel which data who will use to axle X on graph
This is my second channel, I have the data from sensor who measure change angle of revolution (rotate) crankshaft, sensor react to rotate every 0,5 degree and it change data for every next 0,5 degree. For every 0,5 degree I have few line of data (sometimes 3 sometimes even 6), I was try make this channel good loking and now in this chanell data are like this: 0 , 0, 0, 0, 0.5 , 0.5, 0.5, 0.5, 0 , 0…., every change in this data means next 0,5 degree. I want summation this data, but it is not finish.for expmple: Between 0,5 and 1 degree I have few line of data(data with pressure), I want calculate average for every range (bracket) and have average data for 0,75 degree, 2examploe for range 12-12,5 i want have average form data with pressure for value on axle X=12,25 degree
3)channel which data who will use to axle Y on graph
I have two channels(channel A and channel B) which I must take together and calculation real pressure in cylinder in internal combustion engine. I must calculated difference between channel A and B (channel A –channel B) in moment when is star new cycle (data in channel 1 =1) and this difference is important for all this cycle. For all this cycle I must calculate function= (channel B +difference value). In next cycle difference value is other. To make this thing I have idea: first i will want use function iff(chanel1=1, chennelA – channelB, 0) next I want make channel witch summation differences value for every cycle separated (i dont have idea how i can do it) and this way I will have in all chanell differences value who i need to calculate last function = (channel B +difference value). This way I will have real pressure but next I must calculate average for every 0,5 degree angle of revolution (rotate) crankshaft and it will be dato to axle Y on graph
All cycles I must have on one graph (many curve on one graph)
Axle X- angle of revolution (rotate) crankshaft
Axle Y- real pressure in cylinder
From this data I want calculate average pressure in cylinder ( one curve on graph) and calculate deviation ( in my language it is call standard deviation, I hope you will understand what I mean)
And this is estimate 30% of my work but if I will can do this, next things will be no hard for me
I give in attachment piece of my data . I don’t know how much you can help me, but for any help I will be grateful. if you will write to me what function shoul use and what this functions have parameters i will be grateful. the most helpful will be scripts, but I think this is too much work for you but please help me how you can. it is my first work in diadem and i think beginning is always hard but i hope that with your help it will be easier ( sorry for my English, I hope you understand everything)
02-18-2009 09:16 AM
Hi elwis,
What is your native language?
Brad
02-18-2009 09:54 AM
02-18-2009 10:31 AM
02-18-2009 12:41 PM
02-19-2009 12:14 PM
Hi elwis,
I think I have understood how you need to process your cycle data. I have attached below an example application that does the following:
1) Resolves the duplicate angle rows into one representative row for all the channels
2) Sums the Cycle and Angle channels to obtain the cumulative values (instead of differential values)
3) Calculates the (ChannelA - ChannelB) value at the exact start of each cycle
4) Adds the (ChannelA - ChannelB) value from each cycle start to the all ChannelB values from that cycle
5) Currently leaves all the resulting channels in 1 Group-- not broken out the cycles into separate Groups
Let me know what you think,
Brad Turpin
DIAdem Product Support Engineer
National Instruments
02-20-2009 03:17 AM
you are realy close to understand everything, you make some mistakes like:
- you can not sumation chanel "angel"in this way, you dont understand one thing, in this channel value is not important , importanty is only change of value, when value is changing from 0 to 0,5 it is mean that i have next 0,5 deegres, when in some cell i have 0,5 and in the next cell (next line) i have 0,5 is not change so i have still the same deegres(the same angle), and it was problem because i want calculate average of preasure (channelB) for the same value of deegree.
- sum in chanell angel cant be more than 720, one cycle is only 720 degres
-i make some change in calculation , now i dont care about channel A, i was thinking about this and i know one thing, in my result of preassure i cant have values less than 0 (<0) because next i will want calculate integral and derivative of this curve, so i add to all chanelB minimum of this channel
- in attachments i have my work, i didnt know how use fuction like "FOR i = 1 TO ChnLength(1),......."so i make this very slowly and i must created many new chanells. (now i understand a litlle bit this function, i was analyzed your script)
in my work i have still few problems:
1. on graph i dont have curve but only many points because in many line of data i have novalues
2. i dont know how i can from many cycle calculate on average cykle,
3. when i will have average curve i must calculate derivative of this function (f(x)-my average curve, f ' (x)- derivative), so i must calculated d(pressure)/d(angle)02-20-2009 04:16 AM
02-20-2009 04:22 AM
02-20-2009 10:13 AM