LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LABVIEW-FPGA Creating Discrete Transfer Function

Hello everyone,

 

I would like to learn how to create a discrete transfer function using LabVIEW FPGA Module.Before I used niFpga Discrete Transfer Function Direct.vi but i am not sure that the function works correctly or not. In addition, i tried same transfer function on MATLAB-Simulink program. LabVIEW and MATLAB results are different from each other. Please if you have any idea about using niFpga Discrete Transfer Function Direct.vi, share with me. 

 

Screenshot (207).png

0 Kudos
Message 1 of 4
(1,145 Views)

Can you provide more details on what you have tried?  Maybe upload code examples?


Certified LabVIEW Architect, Certified Professional Instructor
ALE Consultants

Introduction to LabVIEW FPGA for RF, Radar, and Electronic Warfare Applications
0 Kudos
Message 2 of 4
(1,123 Views)

Hi Terry,

 

Thanks for your reply.  I couldn't run fpga codes since there is no hardware at the now. Because of this I will share the code. Actually, there is a discrete transfer function block in my code. While the LabVIEW code is running, the results differ from MATLAB Simulink model. The transfer function is same, but results are different from each other for each input. 

 

I tried same transfer function block at LabVIEW Real Time Module. MATLAB and Real time module transfer function results are same but not fpga module. I couldn't understand the reason of this. At real time module, I used Control and Simulation loop. 

 

I hope this info helps you.

 

MATLAB SIMULINK TRANSFER FUNCTION BLOCKS AND OUTPUT

MATLAB_TF_STEP.pngMATLAB_TF_OUTPUT.png

 

 LABVIEW FPGA CODE

LABVIEW_FPGA_TF.png

 

 

LABVIEW REAL TIME CODE

LABVIEW-Real Time.png

    

0 Kudos
Message 3 of 4
(1,081 Views)

What do the fixed point results look like?

 

I would expect a difference in the above code.

One is floating point and the other is fixed point.  You want to add fixed point to the floating point case as follows:

 

On https://www.ni.com/en-us/support/documentation/supplemental/11/an-introduction-to-high-throughput-ds... see the picture under the text "In order to coerce the floating point representation to a fixed-point resolution and dynamic range, simply convert to a specific fixed point representation (grey), then back to floating point (orange)."

 

This allows you to operate with floating point data but passing through the fixed point conversion should make it effectively fixed point.


Certified LabVIEW Architect, Certified Professional Instructor
ALE Consultants

Introduction to LabVIEW FPGA for RF, Radar, and Electronic Warfare Applications
0 Kudos
Message 4 of 4
(1,019 Views)