Ensemble average

Signal acquisition, processing and output
pescecannuccia
beginner
beginner
Сообщения: 24
Зарегистрирован: 28 янв 2013, 14:47
Версия LabVIEW: 2012
Контактная информация:

Ensemble average

Сообщение pescecannuccia »

Good afternoon,
is there anyone that cant explain me what is the ensemble average of n signals?
Последний раз редактировалось pescecannuccia 09 фев 2013, 13:47, всего редактировалось 1 раз.
Аватара пользователя
mzu2006

Professionalism Tutorials Black
doctor
doctor
Сообщения: 2456
Зарегистрирован: 16 авг 2008, 02:12
Награды: 3
Версия LabVIEW: 7.1 10 11 12
Откуда: St-Petersburg (RU), Phila, Boston, Washington DC
Контактная информация:

Re: Ensamble average

Сообщение mzu2006 »

You should give us some context. Usually, by "ensemble average" of some physical value is average over all microstates according to that microstate distribution.
pescecannuccia
beginner
beginner
Сообщения: 24
Зарегистрирован: 28 янв 2013, 14:47
Версия LabVIEW: 2012
Контактная информация:

Re: Ensamble average

Сообщение pescecannuccia »

Well, excuse me if I haven't been precise. I've many impulse response functions calculated on many running condition of a system (about 30), and I must do the ensemble average of all the IRFs. Unfortunately I don't know what is the ensemble average, mathematically speaking...
Can you drive me on the right way?
Аватара пользователя
mzu2006

Professionalism Tutorials Black
doctor
doctor
Сообщения: 2456
Зарегистрирован: 16 авг 2008, 02:12
Награды: 3
Версия LabVIEW: 7.1 10 11 12
Откуда: St-Petersburg (RU), Phila, Boston, Washington DC
Контактная информация:

Re: Ensemble average

Сообщение mzu2006 »

Once again, we need more information about your system. Thus far, it looks to me that your system can be in 30 mutually exclusive states. Then you need to know how is you system distributes amongst those states, and then use distribution probabilities as weights doing your average.
pescecannuccia
beginner
beginner
Сообщения: 24
Зарегистрирован: 28 янв 2013, 14:47
Версия LabVIEW: 2012
Контактная информация:

Re: Ensemble average

Сообщение pescecannuccia »

The system I'm working on is an internal combustion engine. In the laboratory tests I changed many parameters such as the engine speed, the pressure boost etc. (one at a time). So I identified 32 running conditions.
I read that the ensemble average is a weighted average where the weights are the distribution probabilities of finding the system in the i-esima running condition, like you wrote. So correct me if I'm wrong: in order to do the ensemble average of the impulse response functions, calculated on all the running conditions, I must calculate the sum:
h_i * p_i
where h_i is the impulse response function of the i-esima running condition and p_i is the likely of finding the system in the same running condition.
Is the reasoning correct?
Moreover, what do you mean when you write that I need to know how my system is distribuited amongst the running conditions? Probably I understand what you mean but I don't know how to do it..
Thank you for your help.
Аватара пользователя
mzu2006

Professionalism Tutorials Black
doctor
doctor
Сообщения: 2456
Зарегистрирован: 16 авг 2008, 02:12
Награды: 3
Версия LabVIEW: 7.1 10 11 12
Откуда: St-Petersburg (RU), Phila, Boston, Washington DC
Контактная информация:

Re: Ensemble average

Сообщение mzu2006 »

pescecannuccia писал(а): where h_i is the impulse response function of the i-esima running condition and p_i is the likely of finding the system in the same running condition.
Is the reasoning correct?
Looks correct to me. The only thing I do not understand whether your resultant ensemble average will have any physical meaning or not. What are you trying to calculate eventually?
pescecannuccia писал(а):Moreover, what do you mean when you write that I need to know how my system is distribuited amongst the running conditions? Probably I understand what you mean but I don't know how to do it..
Thank you for your help.
It was used in QM sense. Since your system is not quantum, you can talk about probability of being in a condition.
pescecannuccia
beginner
beginner
Сообщения: 24
Зарегистрирован: 28 янв 2013, 14:47
Версия LabVIEW: 2012
Контактная информация:

Re: Ensemble average

Сообщение pescecannuccia »

I don't know if you know what is the complex cepstrum analysis. Anyway, I'm trying to estimate the response of the system to a known input, by using this last and the impulse response function. Pratically my problem is that, in order to do this well enough to vary of the running conditions, I must find an average impulse response function (of my system), because the IRF changes with the running condition.

Do you know how can I estimate the probability of finding my system in a particular running condition?
Аватара пользователя
mzu2006

Professionalism Tutorials Black
doctor
doctor
Сообщения: 2456
Зарегистрирован: 16 авг 2008, 02:12
Награды: 3
Версия LabVIEW: 7.1 10 11 12
Откуда: St-Petersburg (RU), Phila, Boston, Washington DC
Контактная информация:

Re: Ensemble average

Сообщение mzu2006 »

I do not know what cepstrum analysis has to do with your problem until you tell me :wink:
The probability will depend on your system condition. Once again, until you tell us more about your system, it is impossible to say.
I also do not understand why are you averaging the IRFs? Does it make physical sense?
pescecannuccia
beginner
beginner
Сообщения: 24
Зарегистрирован: 28 янв 2013, 14:47
Версия LabVIEW: 2012
Контактная информация:

Re: Ensemble average

Сообщение pescecannuccia »

I'm using the complex cepstrum analysis in order to reconstruct the input of my engine, knowing the output and the impulse response function. In order to do this for all the running condition I must find a IRF good for each case. I solved the problem of understanding what is the ensemble average in my case; pratically it's an arithmetic average among each points of the signal, evaluated at the same instant of time.

Now if i've an 1D array of k elements(about 2200000) and i want to get from this n arrays with m elemets each (m<k), in order to do an arithmetic average among the elements of these arrays, can i use a for loop? How should i use it?
That is:
[1/n *summation(X_i)], where i is the position index in the n arrays.
Аватара пользователя
mzu2006

Professionalism Tutorials Black
doctor
doctor
Сообщения: 2456
Зарегистрирован: 16 авг 2008, 02:12
Награды: 3
Версия LabVIEW: 7.1 10 11 12
Откуда: St-Petersburg (RU), Phila, Boston, Washington DC
Контактная информация:

Re: Ensemble average

Сообщение mzu2006 »

I am not getting it. n arrays with m elements each. right? and you need to average them? What is k in this case?
pescecannuccia
beginner
beginner
Сообщения: 24
Зарегистрирован: 28 янв 2013, 14:47
Версия LabVIEW: 2012
Контактная информация:

Re: Ensemble average

Сообщение pescecannuccia »

I have an array of 2200000 elements; each element is a pressure value, in the combustion chamber, at an istant of time. Among these 2200000 elements, every 7800 there is a thermodynamic cycle of the engine. So i want to calculate a average cycle among the 2200000/7800 cycles got during the tests in the laboratory. In order to do this I have to use a VI that take my array of 2200000, extracts 7800 elements at time and it must do the summation of all these n7800 elements, that rapresent the cycles of the engine ( n=1 => first acquired cycle; n=2=> second acquired cycle etc.). At the end of this process the VI have to divide the obtained array for the number of the cycles n.

I attach my VI, but i don't know what is wrong with it....
Do you understand what i mean?
Вложения
While loop.png
While loop.png (23.84 КБ) 13132 просмотра
1.png
Аватара пользователя
mzu2006

Professionalism Tutorials Black
doctor
doctor
Сообщения: 2456
Зарегистрирован: 16 авг 2008, 02:12
Награды: 3
Версия LabVIEW: 7.1 10 11 12
Откуда: St-Petersburg (RU), Phila, Boston, Washington DC
Контактная информация:

Re: Ensemble average

Сообщение mzu2006 »

Try like that:
Average.png
Not the most optimal, probably, but it works
pescecannuccia
beginner
beginner
Сообщения: 24
Зарегистрирован: 28 янв 2013, 14:47
Версия LabVIEW: 2012
Контактная информация:

Re: Ensemble average

Сообщение pescecannuccia »

Well, I'm trying to understand what you did. Correct me if I'm wrong..

With the " reshape array" you created an array in which each row is one thermodynamic cycle, while with the "initialize array" you created the first addend for the summation in the for loop (i=0). So during the for loop, your VI takes one row for time of the "reshaped array" and sum them by one by one, thank's to the shift register. But why the for loop takes, from the reshaped array, a row for time and not a column? Because I tryed to modify the reshaped array by setting the first "dimension size" as 7800 and the second one as 2200000/7800 but it doesn't run, that is, by adding a waweform graph into the for loop, it doesn't show things like a in-cylinder pressure.
Аватара пользователя
mzu2006

Professionalism Tutorials Black
doctor
doctor
Сообщения: 2456
Зарегистрирован: 16 авг 2008, 02:12
Награды: 3
Версия LabVIEW: 7.1 10 11 12
Откуда: St-Petersburg (RU), Phila, Boston, Washington DC
Контактная информация:

Re: Ensemble average

Сообщение mzu2006 »

pescecannuccia писал(а): But why the for loop takes, from the reshaped array, a row for time and not a column?
There is no time variable. What do you mean?
pescecannuccia
beginner
beginner
Сообщения: 24
Зарегистрирован: 28 янв 2013, 14:47
Версия LabVIEW: 2012
Контактная информация:

Re: Ensemble average

Сообщение pescecannuccia »

I mean, e.g. for i=0 the for loop takes the first row of the "reshaped array" to do the summation, for i=1 it takes tha second row etc.
Why does it do so? Why doesn't it take the columns?
Ответить

Вернуться в «Signal processing»