Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Or in Version 13 or higher you can open the project directly from this page using this button. Make sure to select the Enable Guided Help before clicking this button.

HTML
<script src="https://s3.amazonaws.com/downloads.awrcorp.com/gh/ghcommon.bas"
	type="text/awrscript">
</script>
<button class="gh-button gh-projectopen" onclick="runAwrScript('awrGhOpenProject','MTD_LabVIEW_Matlab.emp')">Open Install Example</button>

Design Notes

VSS/LabVIEW Integration Example

This example illustrates the use of a co-simulation with LabVIEW and MATLAB® in VSS. Co-simulation with LabVIEW is achieved by implementing the required functionality into a  LabVIEW Virtual Instrument (VI); the Matlab implementation is done through a .m file.

In this example, a Moving Target Detector (MTD), used in Radar systems, is implemented as described below and the results are compared:

- The VSS . It requires the LabVIEW 2013 implementation: uses the VSS native block MTD. This block is part of the VSS Radar Library.

- LabVIEW implementation: uses MTD.vi. This VI is implemented by using basic LabVIEW functionality. Requires an installation of LabVIEW Development Environment (32- or 64-bit).

- LabVIEW Mathscript implementation: uses MTD_MathScript.vi. Requires an installation of LabVIEW 32-bit Development Environment with the LabVIEW MathScript RT add-on module , as well as Matlab. Co-simulation with LabVIEW 2013 32-bit requires AWRDE 32-bit.The VSS MTD block implements a Moving Target Detector (MTD) in a radar system. Its functionality is replicated using Matlab code in the function MTD.m. The LabVIEW VI MTD_MathScript.vi uses a MathScript node and the code in MTD.m to implement the same MTD module. Finally, the LabVIEW VI MTD.vi implements the MTD functionality using LabVIEW basic blocks(the latter is available only for 32-bit installations of LabVIEW). Mathscript is a native compiler for .m files developed in MATLAB® or GNU Octave software.

- MATLAB implementation: uses MTD.m. This implementation requires an installation of MATLAB® software.

In this project, the same input signal is passed through the VSS MTD block,  the LABVIEW block running the MTD_MathScript.vi, the MATLAB LABVIEW block running the MTD_MathScript.m function, vi and the LABVIEW MATLAB block running calling the MTD.vim function. The outputs are passed through comparison modules plotted and compared to verify they are all identical.

Note 1: This example will not run using the LabVIEW Run-Time Environment since the LabVIEW MathScript RT add-on module is not compatible with it.

Note 2: To link to the appropriate LabVIEW version, the variable TCPPORT in the LABVIEW blocks should match the setting of TCP/IP Port in LabVIEW Tools/Options.../VI Server.

System Diagram - System Diagram 1

...

Graph - MTD Output

Re(WVFM(TP.VSS1,128,0,1,0,5,0,0,0)) (ns) System Diagram 1 TimeRe(WVFM(TP.VSS1,128,0,1,0,5,0,0,0)) System Diagram 1 y Values (No Data)Re(WVFM(TP.MathScript1,128,0,1,0,0,0,0,0)) (ns) System Diagram 1 TimeRe(WVFM(TP.MathScript1,128,0,1,0,0,0,0,0)) System Diagram 1 y Values (No Data)Re(WVFM(TP.Matlab1,128,0,1,0,0,0,0,0)) (ns) System Diagram 1 TimeRe(WVFM(TP.Matlab1,128,0,1,0,0,0,0,0)) System Diagram 1 y Values (No Data)Re(WVFM(TP.LabVIEW1,128,0,1,0,5,0,0,0)) (ns) System Diagram 1 TimeRe(WVFM(TP.LabVIEW1,128,0,1,0,5,0,0,0)) System Diagram 1 y Values (No Data)

Graph - MTD Max

Re(WVFM(TP.VSS2,4,0,1,0,5,0,0,0)) (ns) System Diagram 1 TimeRe(WVFM(TP.VSS2,4,0,1,0,5,0,0,0)) System Diagram 1 y Values (No Data)Re(WVFM(TP.MathScript2,4,0,1,0,0,0,0,0)) (ns) System Diagram 1 TimeRe(WVFM(TP.MathScript2,4,0,1,0,0,0,0,0)) System Diagram 1 y Values (No Data)Re(WVFM(TP.Matlab2,4,0,1,0,0,0,0,0)) (ns) System Diagram 1 TimeRe(WVFM(TP.Matlab2,4,0,1,0,0,0,0,0)) System Diagram 1 y Values (No Data)Re(WVFM(TP.LabVIEW2,4,0,1,0,5,0,0,0)) (ns) System Diagram 1 TimeRe(WVFM(TP.LabVIEW2,4,0,1,0,5,0,0,0)) System Diagram 1 y Values (No Data)

Graph - Doppler Offset

Re(WVFM(TP.VSS3,4,0,1,0,5,0,0,0)) (ns) System Diagram 1 TimeRe(WVFM(TP.VSS3,4,0,1,0,5,0,0,0)) System Diagram 1 y Values (No Data)Re(WVFM(TP.MathScript3,4,0,1,0,0,0,0,0)) (ns) System Diagram 1 TimeRe(WVFM(TP.MathScript3,4,0,1,0,0,0,0,0)) System Diagram 1 y Values (No Data)Re(WVFM(TP.Matlab3,4,0,1,0,0,0,0,0)) (ns) System Diagram 1 TimeRe(WVFM(TP.Matlab3,4,0,1,0,0,0,0,0)) System Diagram 1 y Values (No Data)Re(WVFM(TP.LabVIEW3,4,0,1,0,5,0,0,0)) (ns) System Diagram 1 TimeRe(WVFM(TP.LabVIEW3,4,0,1,0,5,0,0,0)) System Diagram 1 y Values (No Data)

Graph - MTD Output Comparison

...