Friday, December 17, 2010

Radar systems based on MATLAB simulation software design and implementation

0 introduction

In recent years the successive development internationally, some radar simulation system, and domestic phased array radar system and pulse compression radar system simulation software has become a hotspot.

For a sophisticated radar system, system modeling and simulation technologies is a radar system design and an important direction of research and development trends. These simulation software system primarily for engineering services, has a high utility value. This article is based on this, reference the above simulation of radar systems using Matlab, graphical user interface developed a student learning, teachers teaching radar system analysis aided teaching packages. This package is primarily based on the teaching and learning support software for efficient learners understand and grasp the radar system analysis of related knowledge.

In various teaching experiment software, often limited MATLAB programming, but in close to learner needs and multimedia learning have not gone far enough.

Matlab with very powerful numerical computing, data processing and other functions, however Matlab program is one explanation for the execution of the program, do not compile, pretreatment, causes the program to run slower. VC has a high coding efficiency, operating systems and applications, and hardware for direct manipulation. Therefore, the package using Matlab and VC hybrid programming, improved code efficiency, played two languages strengths. The results show that the package has a good human-computer interaction capabilities, higher software run rate and rich multimedia learning.

1 use of VC and Matlab MEX files mixed programming implementation

In Matlab and VC mixed programming, they can be called from within the Matlab VC program and call Matlab in VC.

The former is intended to cover the Matlab program cannot implement software features or fix Matlab running too slow for defects; the latter generally is to call in the VC environment, making full use of the Matlab program Matlab in matrix calculations and data analysis of powerful advantages.

In Matlab and VC hybrid programming before, first on MATLAB application is compiled for max and compiler mbuild correct settings.

Set the MEX compiler and generates a configuration file that is a suffix to bat batch file, which is passed in the Matlab command window enter the command: mex-setup, and then follow the prompts to select compiler output and path. Ma-tlab call VC there are two main ways: use MEX technology and VC dynamic link library. This article by calling VC dynamic link library to write mexrun file. In fact, in the Matlab environment can easily edit the MEX files, but for a large MEX program that can more complicated and prone to error, then you can use Visual C + + powerful debugging features. Figure 1 presents in the VC environment in the process of establishing the MEX files.

Matlab provides a dynamic link library DLL file interface, and its interface support files DLL written in VC, so on the m files compiled will produce one and the same name as the mexrun.cpp mexrun.dll dynamic link library file.

This Matlab m files can direct callback mexrun () function. Written by VC mexrun file because of the need to run directly from the Matlab, such as MP3, MP4, CHM and TXT and other file formats, and use Matlab itself to implement the process of implementation of efficiency is low, the code has repetitive, on each format also needs to be treated differently. Thus, taking into account the language and operating system VC and the direct link between the hardware, through VC to write procedures and make them available to the Matlab calls will undoubtedly improve operating efficiency.

In mexrun.cpp file needs to contain the following header files:

C language source of MEX files primarily consists of two parts: first part is the algorithm that is used to accomplish real work; another part is portals subroutines, it is the algorithm of the program and Matl-ab interface.

Entrance to the subroutine to implement an interface function is passed in the input pointer array access algorithm required data, but also to put the result back to the output pointer array. Here is the input/output mexFunction and variable conversion function. Reference this article written by mexrun.cpp file, note the following points:

(1)void mexFunction(int nlhs,mxArray*plhs[],int nrhs,const mxArray*prhs[])。

Function header nlhs is Matlab command line mode the number of output parameters; * plhs [] is a structure of type mxArray links to all output parameters of a pointer array; * prhs [] is a structure of type point to mxArray all input parameter pointer array; nrhs is the number of input parameters.

(2) also need to define the following variables: char * input_arg1, * input_arg2; int len1, len2, status1, status2.

Of which: * input_arg1, * input_arg2 is two characters pointer; len1, length of len2 representation allocated space; status1, status2 is two variable data space.

(3) input must be a single string, vector, as follows:

(4) copies of an input string into a C string inside

, As follows:

[next]

Follow the process set the compilation environment and the source program you can compile the project, compile successfully, in the debug folder generates mexrun.dll link library files.

Experimental results show that as long as the mexrun.dll link library file in Matlab's current workspace, you can in the GUI design m file called directly in writing.

2 system design and implementation of a module

Radar system package overall structure using separation type of module structure, i.e. the function modules are independent of each other, to complete certain functions respectively.

From the convenience of the user's perspective, the design of the radar system package with multi-level hierarchical menu-driven forms, first by the main menu select to enter the function module submenus, each functional module's menu, you can choose the parameter settings, the program is running, getting help and return to the parent menu, and so on.

2.1 system implementation methodology

GUI (graphical user interfaces, GUI) is a user and a computer for information exchange.

Computer screen display graphics and text, users input devices such as keyboard, mouse, and computer communications. GUI contains various controls, through the controls setting some incident response function, these functions can be created or deleted, and other events occur, thus achieving a specific event triggered by some of the features you need. These incident response function that is the handle to the graphics object to the callback function.

This article uses GUIDE interface to lay out the controls and use the property editor to make settings for each control.

Package: experimental interface main landing interface, the main interface and Parton interface. Below to login interface, for example, the description of the graphical user interface design process.

2.2 landing interface settings

Figure 2 represents GUIDE interface to set the login interface that contains a button, static text boxes, edit boxes, and axes.

In each of the controls property editor for editing, Matlab for each control is in its corresponding m file initializes a callback function.

First of all, you can call mixed programming of mexrun.dll library file open help documents, MP3 files and MP4 files.

To video button, for example, open its properties editor you can see its corresponding Tag attributes pushbuttonl, in its callback function to add the following code. Video button to open the package using the following is a brief description of the video.

Second, write axis control's properties and constructor, where the axis function is used to display a static picture in JPEG format.

Matlab provides imread () function and imshow () functions to read and store static pictures, function of X is a matrix.

Finally, on the landing interface password settings, you need to on () function Fcn pening initialization settings, that is, the package default user account number and password.

Here you need to use function set () to set the editing box, enter the string that the user account and password, and on the account and password initialization value.

3 simulation results

Radar systems analysis includes all parts of the simulation results analysis, here select radar antenna in typical linear antenna array conducting analysis of simulation results.

Simulation interface instance as shown in Figure 3, where the selected instance is linear antenna arrays gain directional map. Of these, the number of elements in the array is 19, you can see when a unit asked 1.5 wavelength, scan angle,-38 °, using amplitude weighted Ham-ming window, with 23 quantization level, corresponding in-38 ° at the main lobe, and first sidelobe level of about-13.4 dB. If in the Panel to select a different setting value, you can be in different arrays (that is, the number of elements in the array or cell spacing for differently), different scanning angle, different windowing function, different quantization level gain directional map.

Through the system for simulation and compare simulation results, you can clearly understand the antenna in the turning angle of the direction is how to gain with antenna array cell spacing, scan angle, Windowing function, quantify the level of those parameter changes, thus forming on linear array antenna gain directional map of intuitive feelings.

4 closing

Radar systems analysis course theory, abstract and difficult to understand, how to help learners understand the course of basic concepts, fundamental analysis methods, and so is the curriculum to address key issues.

Consider to Matlab's graphical user interface is very image, this article uses the VC and Matlab hybrid programming give full scope to the advantage of two languages, development and implementation of the course teaching experimental GUI package. Experiments show that the radar system simulation software user-friendly, flexible, and the parameter settings in the simulation process readily see radar signal transmitter, receiver and signal processing, and other aspects of the text or graphic description.

No comments:

Post a Comment