LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

simulation two-mass system run on a fpga

Solved!
Go to solution

Hello,

 

I´m new to LabView and I need it for my bachelorthesis.

 

I have constructed a two-mass system of a machine tool with control design and simulation module to see the deformation in real time in result of the measured machining force.

Now I want to compile my system for the use on a fpga. The system must be discrete and with fxp-data type, but how can I convert the system and compile for my fpga cRio-9082?

 

Do any one know how to solve my problem?

 

Thanks

Yanik

0 Kudos
Message 1 of 4
(2,487 Views)
Solution
Accepted by topic author Yanik25

well, you CAN use single precision floating point on FPGA. The cRIO 9082 also has a big FPGA. So you might just try doing your FPGA code using single precision float and see how much resources it uses-- from the apparent size of your program I think you can do it. Try it. The only thing that gives me pause is those gains on the order of 10E^7 , I wonder if you start losing precision there multiplying small by big numbers. Maybe think about scaling things different if it's a problem.

 

So gain is just a multiplication, you have that in FPGA. For doing the integrals you may have to "roll your own" using the old feedback node accumulator technique. basically you store the running integral in a feedback node (or shift register), each iter add the current value scaled by timestep. You could also use the discrete normalized integrator in FPGA-- scaling the input appropriately to a -1 to 1 range.

0 Kudos
Message 2 of 4
(2,427 Views)

oh yeah and use the FPGA simulation mode if you don't know about that. You will have to create a new VI under an fpga target and basically re-write that simulation code

0 Kudos
Message 3 of 4
(2,423 Views)

thanks for your answer.

Now it runs on my fpga.

0 Kudos
Message 4 of 4
(2,410 Views)