LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

help needed, please: tracking, gain, step input, and arrays ... simple but complicated

I have the following problem that i can't sort out, any ideas? the main problem is multiplying a 1D vector of two elements by 1D vector of two elements but here are the details.

i'm designing a controller and i want to make the controller work with a simulation model and by a switch make it work with the physical system. I'll implement this later as it's not on the picture. so i decided i'll put the controller separetely in a while loop and the system model in a simulation loop and synch. the timing.

my controller should be able to track a reference input signal vector (two inputs)- the step in the first picture. using a tracking technique in Franklin and Powell, fifth edition p.380, i've the following equation to implement. u= -k*x+k*N_x*R+N_u*R

where u: is the manipulated input vector - input to the simulated/physical system
x: is the state vector
k: is the state space gain matrix
N_u, N_x are vectors used for tracking the reference input.
R: the step input signal (vector) see 3rd picture

now my simple problem is ... whenever i want to multiply N_u*R ... i get an error of trying to multiply something of dimension 2 by something of dimension 1.

the thing is Nu is a 1D vector of two elements, R: is also a 1D vector of two elements. i guess that the problem could be solved if there is something to rotate a 1D vector or is it really another problem??

also, you might ask, why didn't i use the gain element on the simulation toolkit... because that only fits in a simulation loop, not a while loop which will not not help me put the controller separetly in a while loop. so that's why i'm using AxB.VI and I also tried the dot product VI. the thing is ... it says that the dimension of the demand signal is 1 and the dimension of Nu is 2 as in picture2 but as i defined the demand - see picture 3, it's a vector of two elements and i've an indicator showing Nu and it's also a vector of two elements.

any idea's .... very confused... or probably another way of implementing this part???

Message Edited by Jzee on 04-03-2007 12:58 PM

Download All
0 Kudos
Message 1 of 2
(2,769 Views)


Hi Jzee

If possible, could you attach your code to a post here and I will look in to the issue. From what you are saying and the screenshots you attached, it seems strange that it is treating the vector as 2d when as you state, it is clearly 1d. If you would rather email it to me to keep the code private from the forums, let me know and i'll send you an email with which you can reply to.

Best wishes

Rob


Rob L

NI Applications Engineer

UK & Ireland


It only takes a click to rate this message 😉
0 Kudos
Message 2 of 2
(2,675 Views)