lab0 - ECE4305 Software-Defined Radio Systems and Analysis...

Info icon This preview shows pages 1–3. Sign up to view the full content.

ECE4305: Software-Defined Radio Systems and Analysis Getting Started with MATLAB, Simulink, USRP2 Hardware, and USRP2 Blocks Contents 1 MATLAB Refresher and Simulink Introduction 2 1.1 What is MATLAB? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2 How to Edit and Run a Program in MATLAB . . . . . . . . . . . . . . . . . . . . . . 2 1.3 Useful Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3.1 Code Analysis and M-Lint Messages . . . . . . . . . . . . . . . . . . . . . . . 3 1.3.2 Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.3.3 Profiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.4 Simulink Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.5 Getting Started in Simulink . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.5.1 Start a Simulink Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.5.2 Start a Simulink Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.5.3 Simulink Model Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.6 Building a System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.6.1 Gathering Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.6.2 Modifying the Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.6.3 Connecting the Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.7 Running Simulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2 USRP2 Hardware 15 3 Experimental Preparations 16 3.1 Setting Up Your Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3.2 Burning the Firmware to an SD Card . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.3 Configure the Ethernet Card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.4 Modify the Iptables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 4 Interaction between Simulink and USRP2 Hardware 18 4.1 USRP2 Transmitter Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 4.2 USRP2 Receiver Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 4.3 Frame Size and Dropped Packets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 5 Conclusion 21 1
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

1 MATLAB Refresher and Simulink Introduction You will be using MATLAB and Simulink for the ECE 4305 laboratory experiments, as well as for the course design project. This section serves as a brief refresher of MATLAB, since you have undoubtedly used it in previous courses. However, you probably have very little experience (if any) with Simulink, so this section also provides a crash course in Simulink. 1.1 What is MATLAB? MATLAB is widely used in all areas of applied mathematics, in education and research at universities, and in industry. MATLAB stands for MATrix LABoratory and the software is built up around vectors and matrices. Consequently, this makes the software particularly useful for solving problems in linear algebra, but also for solving algebraic and differential equations as well as numerical integration. MATLAB possesses a collection of graphic tools capable of producing advanced GUI and data plots in both 2D and 3D. MATLAB also has several toolboxes useful for performing signal processing, image processing, optimization, and other specialized operations. 1.2 How to Edit and Run a Program in MATLAB When writing programs, you will need to do this in a separate window, called the editor . To open the editor, go to the “File” menu and choose either the “New...M-file” (if you want to create a new program) or “Open” (to open an old document) option. In the editor, you can now type in your code in much the same way that you would use a text editor or a word processor. There are menus for editing the text that are also similar to any word processor. While typing your code in the editor, no commands will be performed. Consequently, in order to run a program, you will need to do the following: 1. Save your code as < filename > .m , where < filename > is anything you wish to name the file. It is important to add “.m” at the end of your filename. Otherwise MATLAB may not understand your program.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern