LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Matlab Integration

Hi,
I am trying to write a VI that is able to imitate a simple model I have
built in Simulink (Matlab). The model basically continuously takes in the
left and right tacho speeds of a robot and converts them into X-Y position
to plot on a graph. I have managed to re-create the model in labview, it
runs in a while loop and stores the X-Y position history in two arrays which
are dumped to an X-Y graph when the loop finishes. I am having great
difficulties however in replicating the 1/S integrator function that
Simulink uses. Does anyone know how Matlab integrates using this function -
what method it uses and over what range etc. Has anyone tried to replicate
the 1/S function in labview before - is it possible. I have tried using
the
Numerical Integration VI and find that it integrates correctly for the first
few iterations of the while loop but after a while the outputs drift from
what they should be - as indicated by the results obtained in the Simulink
simulation. I would be grateful if anyone could shed any light on this
problem.

Regards,
Martin.
0 Kudos
Message 1 of 3
(4,567 Views)
In creating an Integrator function you may wish to consider looking into the function of a 'Backward Integrator'.

I assume that you wish to continously integrate information to move from say Acceleration to Velocity. In which case a backward integrator would I think suffice.

I believe that a 1/s function can be transformed via a laplace transform of the function i.e z-1 which is a delay of one sample in the time domain. (You will find some interesting effects if you implement this function as a pure entity).

I encourage you to research the topic area. I provide a sample which I think will give you the desired functionality if you are not interested in understanding of the subject. Although I suspect you will discover that more than just an integrator is required.

Y
our control problem may of course lay elsewhere. i.e you don't mention sample rates / techniques resolutions or iteration rates etc. Nor do you mention if you are going for double integration.

Steve
0 Kudos
Message 2 of 3
(4,567 Views)
Hi Martin,
I'm having the same problem about models built in Simulink. But about your problem I've two solutions.
1)There a toolkit called BridgeVIEW (Control and Simulation Software for G). There you can find the GSim Integrator. I've made a subVI which works like 1/S integrator function that Simulink uses.
2) you can use a CIN....I mean you have to write a C file so that you can have the integrator choosing the numeric method,i.e Runge-Kutta, Euler etc..

Regards,
Stefano


P.s:if you want to contact me, my email is iacos@worldonline.it
0 Kudos
Message 3 of 3
(4,567 Views)