05-01-2012 10:31 AM
@northwood wrote:
Honestly, I removed indexing because otherwise my input and output to the loop won't work.
Of course not.. For the reason I attempt to explain above.. You'll have an array of clusters, whereas you was to extract the magnitude and phase from the different clusters.
But you still have not explained what the ouput of the FOR loop should be... Should it be a large array of magnitude and phase based on each iteration of the loop? If so, then concatenating every iteration should do the trick, but I tried that and the Phase ? magnitude FRF waveforms look even more strange. And there are 449 elements in the concatenated array, roughly 1/2 the number of elements from the original signal.
05-01-2012 10:33 AM
@northwood wrote:
I find this rather odd, because when I use Matlab to make the Bode plot I can't really get them to match.
What do you mean?
Does yor Matlab code work? If so, can you post it so we can look at it to understand what you are trying to do with the FOR loop?
05-01-2012 10:35 AM
@Ray.R wrote:
Ah yes... thanks ALtenback... I remember..
The problem is thjat if you simply enable indexing, you get an array of clusters. You then need to figure out what to do with the array of clusters.
As Altenbach asked, what should be the output of the FOR Loop? What are you expecting?
So I have an array of clusters going into the loop and array of clusters coming out of the loop? I think FRF is just output one array? Pretty sure.
I am not exactly sure what Labview thinks a "cluster" is, that doesn't make a whole lot of sense to me yet.
I am on a crash course, aren't I? LOL, I appreciate all the help guys!
05-01-2012 10:42 AM
This is what the plots should look like, they have the same gains, but my resolution is so poor coming from the FRF that I can't get the pole in the middle.
m1=1;
m2=1;
k1=100;
k2=100;
c1=10;
c2=10;
A=[0 1 0 0;
...
(-k1-k2)/m1 (-c1-c2)/m1 k2/m1 c2/m1;
...
0 0 0 1;
...
k2/m2 c2/m2 -k2/m2 -c2/m2];
B=[0 0 0 1/m2]';
C=[1 0 0 0;0 0 1 0];
D=[0 0]';
sys=ss(A,B,C,D)
[num,den]=ss2tf(A,B,C,D)
sys1=tf(num(1,:),den)
%x1
sys2=tf(num(2,:),den) %x2
bode(sys2)
05-01-2012 10:43 AM
the smileys cracked me up.
should be
sys1=tf(num(1,: ),den)
%x1
sys2=tf(num(2,: ),den)
%x2
05-01-2012 10:46 AM - edited 05-01-2012 10:47 AM
OK, you are making this very hard for us, spoonfeeding us small bits of vague information with every post. This gets us nowhere!
Please do the following:
05-01-2012 11:04 AM
I apologize, I am not purposely spoon feeding information. I am learning as I go. The first time I made a for loop I think it took me 4 or 5 hours for a simple one. Here is the file as requested.
I am trying to get more resulotion out of the graphs to match my matlab code. This is going to be hard since I am using Pink Noise as an input. Looking at the Coherence Graph it can be seen that the input/output of the simulation loop are best coherence from 0-100rad/s or 0-~300Hz.
I don't think it was my for loop, I think it has something to do with my signal generator or sampling rate. Not really sure how I can get better resolution. This may be something beyond labview.
Troubleshooting ways I have learned today.
1. Probing
2. Create indicator and watch what happens at each point.
3. Isolate the problem (Thank You altenbach)
All things I should know from being a mechanic but didn't fully understand how to do in this program.
05-01-2012 11:07 AM
Can you give us a real numeric value for the step size? We are missing the custom control.
05-01-2012 11:14 AM
I am using a step size of 0.001
05-01-2012 11:41 AM