05-02-2012 08:27 AM - edited 05-02-2012 08:27 AM
I ran your code and attempted concatenating all the data within a single array for each of the magnitude, phase and coherence.
The above graphs show the concatenated results, wheras the bottom shows your original results.
I know I'm rusty in this area, but neither look correct. What should be the correct output? What are you expecting?
05-02-2012 02:36 PM
Thanks Ray!
If I am thinking about this right, concatenation is where the array is added from one end to the other. So for concatenation the array AB(length 2)+CD(Length 2)=ABCD (Length 4)? Whereas I need an ensemble of the data, Array (AB+CD)/2=AD (Length 2) Where each point in AB and CD is added then divided by 2.
The magnitudes are the same, when scaled correctly. I am trying to get the same as the Bode plot for the SS Matrice in the first .vi or matalb. Coherence of the concatenation looks pretty good.
05-02-2012 06:56 PM
@northwood wrote:
Thanks Ray!
If I am thinking about this right, concatenation is where the array is added from one end to the other. So for concatenation the array AB(length 2)+CD(Length 2)=ABCD (Length 4)? .
Yes
@northwood wrote:Whereas I need an ensemble of the data, Array (AB+CD)/2=AD (Length 2) Where each point in AB and CD is added then divided by 2.
Well... there are 10 iterations.. So it would become ABCDEFGHIJKLMNOPQRST, so do you still divide by 2? 😉
Or do you mean: (AB+CD+EF+GH+IJ+KL+MN+OP+QR+ST)/10 ?
Are we looking at an average of each iteration? You lost me..
@northwood wrote:The magnitudes are the same, when scaled correctly. I am trying to get the same as the Bode plot for the SS Matrice in the first .vi or matalb. Coherence of the concatenation looks pretty good.
So you mean the plots I provided actually looked like what you were looking for? If so, I can post the code change for you.
05-03-2012 10:48 AM
@northwood wrote:Whereas I need an ensemble of the data, Array (AB+CD)/2=AD (Length 2) Where each point in AB and CD is added then divided by 2.Well... there are 10 iterations.. So it would become ABCDEFGHIJKLMNOPQRST, so do you still divide by 2? 😉
Or do you mean: (AB+CD+EF+GH+IJ+KL+MN+OP+QR+ST)/10 ?
Are we looking at an average of each iteration? You lost me..
Each array should be added to the next and divided by the total number of arrays. So like matlab code AB(1)+CD(1)+...../10 then AB(2)+CD(2)..../10 etc etc. Until you have an array the same size as the original AB but the average across all iterations. See ensemble average here: http://www.numberwatch.co.uk/averages.htm
The Bode Plots still aren't as clear as I would like. The upper (100rad/s+) frequencies just won't come out very clear, I think it has something to do with my Signal generator and step size. You guys have helped tons though I really appreciate it. How did you make the coherence and stuff so clear? I am not sure how you did it.
Thanks!
05-03-2012 02:30 PM
See the attached VI, which is your version with a slight modification.
I did not cleanup the code. It is in LV 2010.
05-07-2012 06:45 PM
Thank You!
05-08-2012 08:33 PM
Did that work for you?