ECE5655 FM4 Lab 2. March 8, Problem 1 5. Problem 2 5. Problem 3 7 Part a... 8 Part b... 8 Part c... 8
|
|
- Lynette Hubbard
- 5 years ago
- Views:
Transcription
1 ECE5655 FM4 Lab 2 March 8, 2016 Contents Linear Algebra with Python 2 A Quick Look at Sympy for Linear Algebra Problem 1 5 Problem 2 5 Problem 3 7 Part a Part b Part c Problem 4: Real-Time Gold Code with LUT and Pulse Shaping 8 PN Code Generation Pulse Shaping and Upsampling by Four Import the Full CA Gold Code Matrix Python Model of the Required C Code Used for Pulse Shaping Support Code and Examples Function that Writes Gold Code Headers Write FIR Header Files Write Raised Cosine and Root Raised Cosine Headers for 4 Samples/Bit Process Data In a CSV File Exported from Analog Discovery 14 Get on with the Problem 4 Lab Write Up In [1]: %pylab inline #%matplotlib qt # for popout plots from future import division # use so 1/2 = 0.5, etc. import ssd import scipy.signal as signal from IPython.display import Image, SVG Populating the interactive namespace from numpy and matplotlib In [103]: pylab.rcparams[ savefig.dpi ] = 100 # default 72 #pylab.rcparams[ figure.figsize ] = (6.0, 4.0) # default (6,4) #%config InlineBackend.figure_formats=[ png ] # default for inline viewing #%config InlineBackend.figure_formats=[ svg ] # SVG inline viewing %config InlineBackend.figure_formats=[ pdf ] # render pdf figs for LaTeX 1
2 Linear Algebra with Python To get started with numerical linear algebra calculations in Python we need to import the linear algebra module from, scipy.linalg. In [9]: import scipy.linalg as linalg We can now create matrices as 2D numpy ndarrays: In [12]: A = array([[1,2,3,4],[5,6,7,8]]) A Out[12]: array([2, 3]) In [13]: AT = A.T AT Out[13]: array([[1, 5], [2, 6], [3, 7], [4, 8]]) In [15]: B = array([[1,2],[4,9]]) BI = linalg.inv(b) In [16]: B Out[16]: array([[1, 2], [4, 9]]) In [17]: BI Out[17]: array([[ 9., -2.], [-4., 1.]]) In [18]: dot(b,bi) Out[18]: array([[ 1., 0.], [ 0., 1.]]) I can now write LaTeX math in a markdown cell to mimic the above numerical calculations: [ ] A = (1) A t = (2) 4 8 With Python sympy, the computer algebra system (CAS) that is part of the Python eco-system, a fully symbolic matrix that is already displayed in LaTeX can be created. 2
3 A Quick Look at Sympy for Linear Algebra In [5]: from IPython.display import display from sympy.interactive import printing printing.init_printing(use_latex= mathjax ) import sympy as sym A, B, C = sym.symbols("a B C") In [8]: A = sym.matrix([[1,2,3,4],[5,6,7,8]]) A Out[8]: [ ] In [9]: A.T Out[9]: In [11]: a,b,c,d = sym.symbols("a b c d") In [13]: # All symbolic matrix B = sym.matrix([[a,b],[c,d]]) B Out[13]: [ ] a b c d In [17]: B.det() Out[17]: A sample plot: ad bc In [44]: n = arange(0,500) x = cos(2*pi*n/500*2.5) plot(n,x) xlabel(r Time Index $n$ ) ylabel(r Amplitude ) title(r Plot of $\cos(2\pi n/500 \times 2.5)$ ) grid(); 3
4 1.0 Plot of cos(2πn/ ) 0.5 Amplitude Time Index n Importing graphics created outside the IPython Notebook: In [46]: Image( coolterm.png,width= 60% ) # Note the image scaling handle to the lower right of the image. Out[46]: 4
5 Problem 1 Develop a C calling C function that implements the numerical calculation using the data type int16 t, where C = A B A = [ a 2 + (a + 1) 2 + (a + 2) (2a 1) 2] B = [ b 2 + (b + 1) 2 + (b + 2) (2b 1) 2] You can perform calculations right in the notebook using Python with the magic %pylab filling the workspace with numpy for array-based mathematics and matplotlib for 2D and 3D interactive graphics. Problem 2 Wolfram Mathematica or WolframAlpha on the Web can be useful too. The images imported in the notebook were captured on my ipad using the WolframAlpha for ipad app: 5
6 In [49]: Image( inv3by3.png,width= 40% ) Out[49]: In [48]: Image( det3by3.png,width= 40% ) Out[48]: 6
7 Some C Code int main(void){ int16_t x = 0; char my_debug[80]; float32_t buffer[4] = {1.0,2.3,3.5,-6.7}; static float32_t AData[2*4] = {1.0f,2.0f,3.0f,4.0f,5.0f,6.0f,7.0f,8.0f}; static float32_t ATData[4*2] = {0.0f,0.0f,0.0f,0.0f,0.0f,0.0f,0.0f,0.0f}; arm_matrix_instance_f32 A = {2,4,AData}; arm_matrix_instance_f32 AT = {4,2,ATData}; Problem 3 In this program you will convert the pseudo-code for a square-root algorithm shown below into C code for float32 t input/output variables. Approximate square root with bisection method INPUT: Argument x, endpoint values a, b, such that a < b OUTPUT: value which differs from sqrt(x) by less than 1 done = 0 a = 0 b = square root of largest possible argument (e.g. ~216). 7
8 c = -1 do { c_old = c c = (a+b)/2 if (c*c == x) { done = 1 } else if (c*c < x) { a = c } else { b = c } } while (!done) && (c!= c_old) return c Part a Code the above square root algorithm in C. Profile you code using the test values 23, 56.5, and Run tests at compiler optimization Level 0 and Level 3. Note: You will need to establish a stopping condition, as the present form is designed for integer math. I suggest modifying the line: if (c*c == x) { to something like if (fabs(c*c - x) <= max_error) } where max-error is intially set to. Realize that this value directly impacts the execution speed, as a smaller error requirement means more iterations are required. See if you can find the accuracy of the standard library square root. Part b Compare the performance of your square root function at O3 with the standard math library function for float (float32 t), using float sqrtf(float x). Tests were run using... Part c Compare the performance of your square root function at O3 to the M4 FPU intrinsic function float32 t sqrtf(float x). Tests were run using... Problem 4: Real-Time Gold Code with LUT and Pulse Shaping Pseudo-random sequences find application in digital communications system. The most common sequences are known as M-sequences, where M stands for maximal length. A Gold Code formed by exclusive ORing two M sequences of the same length but of different phases. For example Gold codes of length 1023 are uniquely assigned to the GPS satellites so that the transmissions from the satellites may share the same frequency spectrum, but be separated by the properties of the Gold codes which make nearly mutually orthogonal. In this problem you start by building an M-sequence generator in C. PN Code Generation Implement as described and test via GPIO pins. You may also want to send output to the terminal and import into Python to plot and verify properties. I will want to see waveforms on the scope and/or logic analyzer. Use the synch pulse output a synch signal for the scope 8
9 Pulse Shaping and Upsampling by Four A prototype of the upsampling can be implemented using Python, right here in the notebook. We will use the actual CA code sequence. This requires importing the entire matrix then just using one row as the bit stream. In [16]: import digitalcom as dc In [35]: len(filt_states) Out[35]: 48 Import the Full CA Gold Code Matrix In [4]: camat = loadtxt( ca1thru37.txt,dtype=int16,unpack=true) In [4]: # Check the size of the matrix camat.shape Out[4]: (37L, 1023L) In [5]: # Check the data type camat.dtype Out[5]: dtype( int16 ) Python Model of the Required C Code Used for Pulse Shaping This code resides in the codec ISR. In [61]: # Pulse shaping filter at 4x oversampling b_src = dc.sqrt_rc_imp(4,0.35) # 0.35 <==> excess bandwidth factor # Use a gold code, say CA 4 d = 10000*(2*camat[4-1,:]- 1) # level shift to create 1000 * a +/-1 sequence # Create array to hold filtered output signal values x = zeros(4*len(d)) # Create array to hold FIR filter states, one less than the number of taps # CMSIS-DSP manages this for you filt_states = zeros(len(b_src)-1) CA_idx = 0 CA_code_period = 1023 for k in range(4*len(d)): if mod(k,4) == 0: # Filter one signal sample x_filt, filt_states = signal.lfilter(b_src,1,[d[ca_idx]],zi=filt_states) x[k] = x_filt else: x_filt, filt_states = signal.lfilter(b_src,1,[0],zi=filt_states) x[k] = x_filt # Increment index on CA code modulo 1023 CA_idx = mod(ca_idx+1,ca_code_period) In [72]: figure(figsize=(6,5)) subplot(211) plot(x[1000:1500]) xlabel(r Samples ) ylabel(r Amplitude Values ) 9
10 Amplitude Values title(r Filter Output Samples Upsampled and Scaled for D/A ) grid(); subplot(212) psd(x,2**10,48) # Actual fs = 48 khz ylabel(r PSD (db/hz) ) xlabel(r Frequency (khz) ) tight_layout() Filter Output Samples Upsampled and Scaled for D/A Samples Frequency (khz) PSD (db/hz) Support Code and Examples Function that Writes Gold Code Headers In [6]: def CA_code_header(fname_out,Nca): """ Write 1023 bit CA (Gold) Code Header Files Mark Wickert February 2015 """ ca = loadtxt( ca1thru37.txt,dtype=int16,usecols=(nca-1,),unpack=true) M = 1023 # code period N = 23 # code bits per line 10
11 Sca = ca + str(nca) f = open(fname_out, wt ) f.write( //define a CA code\n\n ) f.write( #include <stdint.h>\n\n ) f.write( #ifndef N_CA\n ) f.write( #define N_CA %d\n % M) f.write( #endif\n ) f.write( /*******************************************************************/\n ); f.write( /* 1023 Bit CA Gold Code %2d */\n \ % Nca); f.write( int8_t ca%d[n_ca] = { % Nca) kk = 0; for k in range(m): #k_mod = k % M if (kk < N-1) and (k < M-1): f.write( %d, % ca[k]) kk += 1 elif (kk == N-1) & (k < M-1): f.write( %d,\n % ca[k]) if k < M: if Nca < 10: f.write( ) else: f.write( ) kk = 0 else: f.write( %d % ca[k]) f.write( };\n ) f.write( /*******************************************************************/\n ) f.close() In [ ]: CA_code_header( CA_1.h,1) #write a header for CA code 1 CA_code_header( CA_12.h,12) #write a header for CA code 12 In [6]: import digitalcom as dc A fundamental property of both M-sequences and Gold codes is that they exhibit a strong correlation peak once per code period. For discrete-time signals the cross-correlation takes the form R ij [k] = 1 N N x i [n]x j [n + k] (3) n=0 where N is the data record length used in the calculation (actually estimation). Since the Gold codes form a family of codes, taking any pair codes i j with result in only a small cross-correlation value. This means that i j codes are nearly orthogonal and as signals can lie on top of each other cause minimal interference when a receiver uses the code of interest to recover via crosscorrelation the information riding the transmitted signal. Here we use the function Rij, lags axis = dc.xcorr(xi,xj,lag value range) to calculate the auto and cross-correlation between CA codes 1 and 2. The code module digitalcom.py contains the needed function. In [7]: R11,lags = dc.xcorr(2*camat[0,:]-1,2*camat[0,:]-1,100) R12,lags = dc.xcorr(2*camat[0,:]-1,2*camat[1,:]-1,100) In [73]: plot(lags,r11.real) plot(lags,r12.real) 11
12 xlabel(r Lag $k$ in auto/coss-correlation ) ylabel(r Normalized Correlation Amplitude ) title(r CA Code Correlation Properties Over One Period ) legend((r Autocorr of CA1,r Crosscorr of CA1/2 ),loc= best,) grid(); Normalized Correlation Amplitude CA Code Correlation Properties Over One Period Autocorr of CA1 Crosscorr of CA1/ Lag k in auto/coss-correlation Write FIR Header Files In [11]: def FIR_header(fname_out,h): """ Write FIR Filter Header Files Mark Wickert February 2015 """ M = len(h) N = 3 # Coefficients per line f = open(fname_out, wt ) f.write( //define a FIR coeffient Array\n\n ) f.write( #include <stdint.h>\n\n ) f.write( #ifndef M_FIR\n ) f.write( #define M_FIR %d\n % M) f.write( #endif\n ) f.write( /************************************************************************/\n ); f.write( /* FIR Filter Coefficients */\n ); f.write( float32_t h_fir[m_fir] = { ) kk = 0; for k in range(m): 12
13 #k_mod = k % M if (kk < N-1) and (k < M-1): f.write( %15.12f, % h[k]) kk += 1 elif (kk == N-1) & (k < M-1): f.write( %15.12f,\n % h[k]) if k < M: f.write( ) kk = 0 else: f.write( %15.12f % h[k]) f.write( };\n ) f.write( /************************************************************************/\n ) f.close() Write Raised Cosine and Root Raised Cosine Headers for 4 Samples/Bit In [10]: b_src = dc.sqrt_rc_imp(4,0.35) # 0.35 <==> excess bandwidth factor b_rc = dc.rc_imp(4,0.35) # 0.35 <==> excess bandwidth factor In [74]: stem(b_rc) title(r Raised Cosine Pulse Shape (Impulse Response) ) ylabel(r Amplitude ) xlabel(r Samples ) grid(); 1.0 Raised Cosine Pulse Shape (Impulse Response) Amplitude Samples 13
14 Process Data In a CSV File Exported from Analog Discovery In [94]: t_rc,xl_rc,xr_rc = loadtxt( AD_test.csv,delimiter=,,unpack=True,skiprows=6) The first 6 rows contain file data, i.e., #Digilent WaveForms Oscilloscope Acquisition #Device Name: Discovery2 #Serial Number: SN:210321A1882E #Date Time: :16:: Time (s),channel 1 (V),Channel 2 (V) , , , , , , In this case 8000 samples were captured at a sampling rate of 80 khz. Time Domain In [104]: plot(t_rc[3200:4800]*1000,xl_rc[3200:4800]) title(r Waveform Captured From Codec Output ) ylabel(r Amplitude ) xlabel(r Time (ms) ) grid(); 0.3 Waveform Captured From Codec Output Amplitude Time (ms) 14
15 Eye Plot In [105]: # Eyeplot obtain by resampling capture at 80 khz back to 48 khz # which results in 4 samples per bit (clock errors involved here) dc.eye_plot(dc.farrow_resample(xl_rc[1000:2000],80,48),2*4) Out[105]: Eye Plot Amplitude Time Index - n Power Spectral Density Estimate Using Short 8192 Data Record In [106]: psd(xl_rc,2**10,80); xlabel(r Frequency (khz) ) Out[106]: <matplotlib.text.text at 0xbe68b38> 15
16 20 Power Spectral Density (db/hz) Frequency (khz) Get on with the Problem 4 Lab Write Up In [ ]: 16
5655 Chapter 6. April 18, 2016
5655 Chapter 6 April 18, 2016 Contents FIR Filter Design 1 Exporting Coefficients to Header Files............................... 2 Float Header Export..................................... 2 Signed 16-Bit
More informationECE 5655/4655 Laboratory Problems
Assignment #2 ECE 5655/4655 Laboratory Problems Make note of the following: Due ~Friday March 1, 2019 Each team of two will turn in documentation for the assigned problem(s), that is C or assembly source
More informationECE5655 Midterm-sp2018
ECE5655 Midterm-sp2018 March 19, 2018 Contents ECE 4655/5655 Midterm Exam Spring 2018 2 Problem 1: Automatic Gain Control............................ 2 Theory of Operation.................................
More informationUsing SymPy for Root Finding
Using SymPy for Root Finding %pylab inline #%matplotlib qt import sk_dsp_comm.sigsys as ss import scipy.signal as signal import sk_dsp_comm.digitalcom as dc import scipy.special as special import scipy.stats
More informationProb_and_RV_Demo. August 21, 2018
Prob_and_RV_Demo August 21, 2018 Contents Probability and Random Variables 1 Bernoulli Trials........................................ 2 Histogram of the Random Variates......................... 3 Normal
More informationECE 5655/4655 Laboratory Problems
Assignment #1 ECE 5655/4655 Laboratory Problems Due Monday February 11, 2019 In this lab you will get introduced to the hardware and software tools that you will be using throughout the rest of the semester.
More informationARTIFICIAL INTELLIGENCE AND PYTHON
ARTIFICIAL INTELLIGENCE AND PYTHON DAY 1 STANLEY LIANG, LASSONDE SCHOOL OF ENGINEERING, YORK UNIVERSITY WHAT IS PYTHON An interpreted high-level programming language for general-purpose programming. Python
More informationECE4703 B Term Laboratory Assignment 2 Floating Point Filters Using the TMS320C6713 DSK Project Code and Report Due at 3 pm 9-Nov-2017
ECE4703 B Term 2017 -- Laboratory Assignment 2 Floating Point Filters Using the TMS320C6713 DSK Project Code and Report Due at 3 pm 9-Nov-2017 The goals of this laboratory assignment are: to familiarize
More information19. FIR filtering The theory of FIR filtering. X buffer. Y buffer
1 19. FIR filtering Digital filtering of analog signals in real time is easy to implement when one has an ADC, a processor, and a DAC, Fig. 19.1. An example of FIR (Finite impulse Response) filtering will
More informationExercise 1 In this exercise you will review the DSSS modem design using the Quartus II software.
White Paper DSSS Modem Lab Background The direct sequence spread spectrum (DSSS) digital modem reference design is a hardware design that has been optimized for the Altera APEX DSP development board (starter
More informationExperiment 3. Getting Start with Simulink
Experiment 3 Getting Start with Simulink Objectives : By the end of this experiment, the student should be able to: 1. Build and simulate simple system model using Simulink 2. Use Simulink test and measurement
More informationLECTURE 19. Numerical and Scientific Packages
LECTURE 19 Numerical and Scientific Packages NUMERICAL AND SCIENTIFIC APPLICATIONS As you might expect, there are a number of third-party packages available for numerical and scientific computing that
More informationA/D Converter. Sampling. Figure 1.1: Block Diagram of a DSP System
CHAPTER 1 INTRODUCTION Digital signal processing (DSP) technology has expanded at a rapid rate to include such diverse applications as CDs, DVDs, MP3 players, ipods, digital cameras, digital light processing
More informationLABORATORIO DI ARCHITETTURE E PROGRAMMAZIONE DEI SISTEMI ELETTRONICI INDUSTRIALI
LABORATORIO DI ARCHITETTURE E PROGRAMMAZIONE DEI SISTEMI ELETTRONICI INDUSTRIALI Laboratory Lesson 10: CMSIS DSP Library and Functions Final Assignment Prof. Luca Benini Prof Davide
More informationLECTURE 22. Numerical and Scientific Packages
LECTURE 22 Numerical and Scientific Packages NUMERIC AND SCIENTIFIC APPLICATIONS As you might expect, there are a number of third-party packages available for numerical and scientific computing that extend
More informationPart VI. Scientific Computing in Python. Tobias Neckel: Scripting with Bash and Python Compact Max-Planck, February 16-26,
Part VI Scientific Computing in Python Compact Course @ Max-Planck, February 16-26, 2015 81 More on Maths Module math Constants pi and e Functions that operate on int and float All return values float
More informationPart VI. Scientific Computing in Python. Alfredo Parra : Scripting with Python Compact Max-PlanckMarch 6-10,
Part VI Scientific Computing in Python Compact Course @ Max-PlanckMarch 6-10, 2017 63 Doing maths in Python Standard sequence types (list, tuple,... ) Can be used as arrays Can contain different types
More information2015 The MathWorks, Inc. 1
2015 The MathWorks, Inc. 1 C/C++ 사용자를위한 MATLAB 활용 : 알고리즘개발및검증 이웅재부장 2015 The MathWorks, Inc. 2 Signal Processing Algorithm Design with C/C++ Specification Algorithm Development C/C++ Testing & Debugging
More informationThis Worksheet shows you several ways to start using Enthought s distribution of Python!
This Worksheet shows you several ways to start using Enthought s distribution of Python! Start the Terminal application by Selecting the Utilities item from the Go menu located at the top of the screen
More informationIntroductory Scientific Computing with Python
Introductory Scientific Computing with Python More plotting, lists and FOSSEE Department of Aerospace Engineering IIT Bombay SciPy India, 2015 December, 2015 FOSSEE (FOSSEE IITB) Interactive Plotting 1
More informationD. Richard Brown III Associate Professor Worcester Polytechnic Institute Electrical and Computer Engineering Department
D. Richard Brown III Associate Professor Worcester Polytechnic Institute Electrical and Computer Engineering Department drb@ece.wpi.edu 3-November-2008 Analog To Digital Conversion analog signal ADC digital
More informationFunctions. Systems Programming Concepts
Functions Systems Programming Concepts Functions Simple Function Example Function Prototype and Declaration Math Library Functions Function Definition Header Files Random Number Generator Call by Value
More informationGet the Second-Order Section Coefficients
MATLAB Design Functions Three sections will be required, with one section really only being first-order The MATLAB function we need to use is either zp2sos or ss2sos zp2sos converts a zero-pole form (zp)
More informationHW0 v3. October 2, CSE 252A Computer Vision I Fall Assignment 0
HW0 v3 October 2, 2018 1 CSE 252A Computer Vision I Fall 2018 - Assignment 0 1.0.1 Instructor: David Kriegman 1.0.2 Assignment Published On: Tuesday, October 2, 2018 1.0.3 Due On: Tuesday, October 9, 2018
More informationD. Richard Brown III Professor Worcester Polytechnic Institute Electrical and Computer Engineering Department
D. Richard Brown III Professor Worcester Polytechnic Institute Electrical and Computer Engineering Department drb@ece.wpi.edu Lecture 2 Some Challenges of Real-Time DSP Analog to digital conversion Are
More informationIntroduction to Scientific Computing with Python, part two.
Introduction to Scientific Computing with Python, part two. M. Emmett Department of Mathematics University of North Carolina at Chapel Hill June 20 2012 The Zen of Python zen of python... fire up python
More informationINTRODUCTION TO MATLAB, SIMULINK, AND THE COMMUNICATION TOOLBOX
INTRODUCTION TO MATLAB, SIMULINK, AND THE COMMUNICATION TOOLBOX 1) Objective The objective of this lab is to review how to access Matlab, Simulink, and the Communications Toolbox, and to become familiar
More informationCourse May 18, Advanced Computational Physics. Course Hartmut Ruhl, LMU, Munich. People involved. SP in Python: 3 basic points
May 18, 2017 3 I/O 3 I/O 3 I/O 3 ASC, room A 238, phone 089-21804210, email hartmut.ruhl@lmu.de Patrick Böhl, ASC, room A205, phone 089-21804640, email patrick.boehl@physik.uni-muenchen.de. I/O Scientific
More informationPython for Data Analysis
Python for Data Analysis Wes McKinney O'REILLY 8 Beijing Cambridge Farnham Kb'ln Sebastopol Tokyo Table of Contents Preface xi 1. Preliminaries " 1 What Is This Book About? 1 Why Python for Data Analysis?
More informationFile Input/Output in Python. October 9, 2017
File Input/Output in Python October 9, 2017 Moving beyond simple analysis Use real data Most of you will have datasets that you want to do some analysis with (from simple statistics on few hundred sample
More informationPHY224 Practical Physics I. Lecture 2
PHY224 Practical Physics I Python Review Lecture 2 Sept. 19 20 20, 2013 Summary Functions and Modules Graphs (plotting with Pylab) Scipy packages References M H. Goldwasser, D. Letscher: Object oriented
More informationPHY224 Practical Physics I. Lecture 2
PHY224 Practical Physics I Python Review Lecture 2 Sept. 15 16 16, 2014 Summary Functions and Modules Graphs (plotting with Pylab) Scipy packages References M H. Goldwasser, D. Letscher: Object oriented
More information(Ca...
1 of 8 9/7/18, 1:59 PM Getting started with 228 computational exercises Many physics problems lend themselves to solution methods that are best implemented (or essentially can only be implemented) with
More informationData Science with Python Course Catalog
Enhance Your Contribution to the Business, Earn Industry-recognized Accreditations, and Develop Skills that Help You Advance in Your Career March 2018 www.iotintercon.com Table of Contents Syllabus Overview
More informationJitKit. Operator's Manual
JitKit Operator's Manual March, 2011 LeCroy Corporation 700 Chestnut Ridge Road Chestnut Ridge, NY, 10977-6499 Tel: (845) 578-6020, Fax: (845) 578 5985 Internet: www.lecroy.com 2011 by LeCroy Corporation.
More informationWhy NumPy / SciPy? NumPy / SciPy / Matplotlib. A Tour of NumPy. Initializing a NumPy array
NumPy / SciPy / Matplotlib NumPy is an extension to Python adding support for arrays and matrices, along with a large library of high-level mathematical functions to operate on them. SciPy is a library
More informationLECTURE 22. Numerical and Scientific Computing Part 2
LECTURE 22 Numerical and Scientific Computing Part 2 MATPLOTLIB We re going to continue our discussion of scientific computing with matplotlib. Matplotlib is an incredibly powerful (and beautiful!) 2-D
More informationPreview from Notesale.co.uk Page 2 of 79
COMPUTER PROGRAMMING TUTORIAL by tutorialspoint.com Page 2 of 79 tutorialspoint.com i CHAPTER 3 Programming - Environment Though Environment Setup is not an element of any Programming Language, it is the
More informationNumPy quick reference
John W. Shipman 2016-05-30 12:28 Abstract A guide to the more common functions of NumPy, a numerical computation module for the Python programming language. This publication is available in Web form1 and
More informationECE 5655/4655 Laboratory Problems
Assignment #1 ECE 5655/4655 Laboratory Problems Make note of the following: Due Monday February 10, 2014 Each team of two will turn in documentation for the assigned problem(s), that is, assembly or C
More informationFinding, Starting and Using Matlab
Variables and Arrays Finding, Starting and Using Matlab CSC March 6 &, 9 Array: A collection of data values organized into rows and columns, and known by a single name. arr(,) Row Row Row Row 4 Col Col
More informationDatenanalyse (PHY231) Herbstsemester 2017
Datenanalyse (PHY231) Herbstsemester 2017 A short pylab repetition 22/09/2017 An important part of the exercises for this course involves programming in python / pylab. We assume that you have completed
More informationELEC4042 Signal Processing 2 MATLAB Review (prepared by A/Prof Ambikairajah)
Introduction ELEC4042 Signal Processing 2 MATLAB Review (prepared by A/Prof Ambikairajah) MATLAB is a powerful mathematical language that is used in most engineering companies today. Its strength lies
More informationIntroduction to Python Practical 1
Introduction to Python Practical 1 Daniel Carrera & Brian Thorsbro October 2017 1 Introduction I believe that the best way to learn programming is hands on, and I tried to design this practical that way.
More informationPhys Techniques of Radio Astronomy Part 1: Python Programming LECTURE 3
Phys 60441 Techniques of Radio Astronomy Part 1: Python Programming LECTURE 3 Tim O Brien Room 3.214 Alan Turing Building tim.obrien@manchester.ac.uk Tuples Lists and strings are examples of sequences.
More informationLab 1 - Basic ipython Tutorial (EE 126 Fall 2014)
Lab 1 - Basic ipython Tutorial (EE 126 Fall 2014) modified from Berkeley Python Bootcamp 2013 https://github.com/profjsb/python-bootcamp and Python for Signal Processing http://link.springer.com/book/10.1007%2f978-3-319-01342-8
More informationCypress FM4 Tools Set-up with Keil 5.x
Introduction Mark Wickert, 9/4/16, Revised 1/28/19 This document will describe the details of setting up your own system with the ARM IDE Keil, and software drivers that support the Cypress FM4 board.
More informationSTEPHEN WOLFRAM MATHEMATICADO. Fourth Edition WOLFRAM MEDIA CAMBRIDGE UNIVERSITY PRESS
STEPHEN WOLFRAM MATHEMATICADO OO Fourth Edition WOLFRAM MEDIA CAMBRIDGE UNIVERSITY PRESS Table of Contents XXI a section new for Version 3 a section new for Version 4 a section substantially modified for
More informationIntroduction to MATLAB. Computational Probability and Statistics CIS 2033 Section 003
Introduction to MATLAB Computational Probability and Statistics CIS 2033 Section 003 About MATLAB MATLAB (MATrix LABoratory) is a high level language made for: Numerical Computation (Technical computing)
More informationPython Compact. 1 Python Compact. 2 What do we cover in this introduction lecture? February 7, What is also interesting to know?
Python Compact February 7, 2018 1 Python Compact 1.0.1 Claus Führer, Lund University Short introduction to Python for participants of the course ** Numerical Methods - Review and Training ** Volvo Cars,
More informationII. LAB. * Open the LabVIEW program (Start > All Programs > National Instruments > LabVIEW 2012 > LabVIEW 2012).
II. LAB Software Required: NI LabVIEW 2012, NI LabVIEW 4.3 Modulation Toolkit. Functions and VI (Virtual Instrument) from the LabVIEW software to be used in this lab: For Loop (Function), Unbundle By Name
More informationIntroduction to MATLAB
ELG 3125 - Lab 1 Introduction to MATLAB TA: Chao Wang (cwang103@site.uottawa.ca) 2008 Fall ELG 3125 Signal and System Analysis P. 1 Do You Speak MATLAB? MATLAB - The Language of Technical Computing ELG
More informationLab 4: Structured Programming I
4.1 Introduction Lab 4: Structured Programming I Lab this week is going to focus on selective structures and functions. 4.2 Resources The additional resources required for this assignment include: 0 Books:
More informationRoot Finding Methods. sympy and Sage. MCS 507 Lecture 13 Mathematical, Statistical and Scientific Software Jan Verschelde, 21 September 2011
wrap Root Finding Methods 1 2 wrap MCS 507 Lecture 13 Mathematical, Statistical and Scientific Software Jan Verschelde, 21 September 2011 Root Finding Methods 1 wrap 2 wrap wrap octave-3.4.0:1> p = [1,0,2,-1]
More informationScientific Computing with Python and CUDA
Scientific Computing with Python and CUDA Stefan Reiterer High Performance Computing Seminar, January 17 2011 Stefan Reiterer () Scientific Computing with Python and CUDA HPC Seminar 1 / 55 Inhalt 1 A
More informationAccelerated Life Testing Module Accelerated Life Testing - Overview
Accelerated Life Testing Module Accelerated Life Testing - Overview The Accelerated Life Testing (ALT) module of AWB provides the functionality to analyze accelerated failure data and predict reliability
More informationAbout the Tutorial. Audience. Prerequisites. Copyright & Disclaimer
i About the Tutorial Project is a comprehensive software suite for interactive computing, that includes various packages such as Notebook, QtConsole, nbviewer, Lab. This tutorial gives you an exhaustive
More informationUniversity of Saskatchewan 5-1 EE 392 Electrical Engineering Laboratory III
University of Saskatchewan 5-1 DSP Safety The voltages used in this experiment are less than 15 V and normally do not present a risk of shock. However, you should always follow safe procedures when working
More informationUNIVERSITI TEKNIKAL MALAYSIA MELAKA FAKULTI KEJURUTERAAN ELEKTRONIK DAN KEJURUTERAAN KOMPUTER
UNIVERSITI TEKNIKAL MALAYSIA MELAKA FAKULTI KEJURUTERAAN ELEKTRONIK DAN KEJURUTERAAN KOMPUTER FAKULTI KEJURUTERAAN ELEKTRONIK DAN KEJURUTERAAN KOMPUTER BENC 2113 DENC ECADD 2532 ECADD LAB SESSION 6/7 LAB
More informationEC 413 Computer Organization
EC 413 Computer Organization C/C++ Language Review Prof. Michel A. Kinsy Programming Languages There are many programming languages available: Pascal, C, C++, Java, Ada, Perl and Python All of these languages
More informationComputational Programming with Python
Numerical Analysis, Lund University, 2017 1 Computational Programming with Python Lecture 1: First steps - A bit of everything. Numerical Analysis, Lund University Lecturer: Claus Führer, Alexandros Sopasakis
More informationIntroduction to. The Help System. Variable and Memory Management. Matrices Generation. Interactive Calculations. Vectors and Matrices
Introduction to Interactive Calculations Matlab is interactive, no need to declare variables >> 2+3*4/2 >> V = 50 >> V + 2 >> V Ans = 52 >> a=5e-3; b=1; a+b Most elementary functions and constants are
More informationRapid Prototyping System for Teaching Real-Time Digital Signal Processing
IEEE TRANSACTIONS ON EDUCATION, VOL. 43, NO. 1, FEBRUARY 2000 19 Rapid Prototyping System for Teaching Real-Time Digital Signal Processing Woon-Seng Gan, Member, IEEE, Yong-Kim Chong, Wilson Gong, and
More informationA Guide. DSP Library
DSP A Guide To The DSP Library SystemView by ELANIX Copyright 1994-2005, Eagleware Corporation All rights reserved. Eagleware-Elanix Corporation 3585 Engineering Drive, Suite 150 Norcross, GA 30092 USA
More informationProblem Based Learning 2018
Problem Based Learning 2018 Introduction to Machine Learning with Python L. Richter Department of Computer Science Technische Universität München Monday, Jun 25th L. Richter PBL 18 1 / 21 Overview 1 2
More informationPython Crash Course Numpy, Scipy, Matplotlib
Python Crash Course Numpy, Scipy, Matplotlib That is what learning is. You suddenly understand something you ve understood all your life, but in a new way. Doris Lessing Steffen Brinkmann Max-Planck-Institut
More informationScientific Computing: Lecture 1
Scientific Computing: Lecture 1 Introduction to course, syllabus, software Getting started Enthought Canopy, TextWrangler editor, python environment, ipython, unix shell Data structures in Python Integers,
More informationC Functions. 5.2 Program Modules in C
1 5 C Functions 5.2 Program Modules in C 2 Functions Modules in C Programs combine user-defined functions with library functions - C standard library has a wide variety of functions Function calls Invoking
More informationECE4703 Laboratory Assignment 5
ECE4703 Laboratory Assignment 5 The goals of this laboratory assignment are: to develop an understanding of frame-based digital signal processing, to familiarize you with computationally efficient techniques
More informationAVR32765: AVR32 DSPLib Reference Manual. 32-bit Microcontrollers. Application Note. 1 Introduction. 2 Reference
AVR32765: AVR32 DSPLib Reference Manual 1 Introduction The AVR 32 DSP Library is a compilation of digital signal processing functions. All function availables in the DSP Library, from the AVR32 Software
More informationCSCI 171 Chapter Outlines
Contents CSCI 171 Chapter 1 Overview... 2 CSCI 171 Chapter 2 Programming Components... 3 CSCI 171 Chapter 3 (Sections 1 4) Selection Structures... 5 CSCI 171 Chapter 3 (Sections 5 & 6) Iteration Structures
More information\n is used in a string to indicate the newline character. An expression produces data. The simplest expression
Chapter 1 Summary Comments are indicated by a hash sign # (also known as the pound or number sign). Text to the right of the hash sign is ignored. (But, hash loses its special meaning if it is part of
More informationAgilent Technologies EZJIT and EZJIT Plus Jitter Analysis Software for Infiniium Series Oscilloscopes
Agilent Technologies EZJIT and EZJIT Plus Jitter Analysis Software for Infiniium Series Oscilloscopes Data Sheet Features of the EZJIT Plus software that optimize jitter analysis include: Easy-to-use jitter
More informationPYTHON NUMPY TUTORIAL CIS 581
PYTHON NUMPY TUTORIAL CIS 581 VARIABLES AND SPYDER WORKSPACE Spyder is a Python IDE that s a part of the Anaconda distribution. Spyder has a Python console useful to run commands quickly and variables
More information1. Variables 2. Arithmetic 3. Input and output 4. Problem solving: first do it by hand 5. Strings 6. Chapter summary
Topic 2 1. Variables 2. Arithmetic 3. Input and output 4. Problem solving: first do it by hand 5. Strings 6. Chapter summary Arithmetic Operators C++ has the same arithmetic operators as a calculator:
More informationName: INSERT YOUR NAME HERE UWNetID: INSERT YOUR NETID
AMath 584 Homework 3 Due to dropbox by 6pm PDT, November 4, 2011 Name: INSERT YOUR NAME HERE UWNetID: INSERT YOUR NETID Use latex for this assignment! Submit a pdf file to the dropbox. You do not need
More informationObject Oriented Programming Using C++ Mathematics & Computing IET, Katunayake
Assigning Values // Example 2.3(Mathematical operations in C++) float a; cout > a; cout
More informationAll MSEE students are required to take the following two core courses: Linear systems Probability and Random Processes
MSEE Curriculum All MSEE students are required to take the following two core courses: 3531-571 Linear systems 3531-507 Probability and Random Processes The course requirements for students majoring in
More informationVertical and Horizontal Translations
SECTION 4.3 Vertical and Horizontal Translations Copyright Cengage Learning. All rights reserved. Learning Objectives 1 2 3 4 Find the vertical translation of a sine or cosine function. Find the horizontal
More informationDSP Development Environment: Introductory Exercise for TI TMS320C55x
Connexions module: m13811 1 DSP Development Environment: Introductory Exercise for TI TMS320C55x Thomas Shen David Jun Based on DSP Development Environment: Introductory Exercise for TI TMS320C54x (ECE
More informationLaboratory 1 Introduction to MATLAB for Signals and Systems
Laboratory 1 Introduction to MATLAB for Signals and Systems INTRODUCTION to MATLAB MATLAB is a powerful computing environment for numeric computation and visualization. MATLAB is designed for ease of use
More informationBasic MATLAB Tutorial
Basic MATLAB Tutorial http://www1gantepedutr/~bingul/ep375 http://wwwmathworkscom/products/matlab This is a basic tutorial for the Matlab program which is a high-performance language for technical computing
More informationIntroduction to Programming II W4260. Lecture 2
Introduction to Programming II W4260 Lecture 2 Overview Storing Data Basic types Arrays Controlling the flow of execution Loops (for, while) Ifthenelse Operators Arithmetic, relational, logical Functions
More informationThe MatriCs. Reloaded. A linear algebra-specific language for the budding C enthusiast. Short name: MaC Extension:.neo
The MatriCs Reloaded A linear algebra-specific language for the budding C enthusiast Short name: MaC Extension:.neo Talal Asem Toukan [tat2132] - Manager Emmanuel Koumandakis [ek2808] - System Architect
More informationHERIOT-WATT UNIVERSITY DEPARTMENT OF COMPUTING AND ELECTRICAL ENGINEERING. B35SD2 Matlab tutorial 1 MATLAB BASICS
HERIOT-WATT UNIVERSITY DEPARTMENT OF COMPUTING AND ELECTRICAL ENGINEERING Objectives: B35SD2 Matlab tutorial 1 MATLAB BASICS Matlab is a very powerful, high level language, It is also very easy to use.
More informationComputer Lab 1: Introduction to Python
Computer Lab 1: Introduction to Python 1 I. Introduction Python is a programming language that is fairly easy to use. We will use Python for a few computer labs, beginning with this 9irst introduction.
More information2 Getting Started with Numerical Computations in Python
1 Documentation and Resources * Download: o Requirements: Python, IPython, Numpy, Scipy, Matplotlib o Windows: google "windows download (Python,IPython,Numpy,Scipy,Matplotlib" o Debian based: sudo apt-get
More informationMath 3316, Fall 2016 Due Nov. 3, 2016
Math 3316, Fall 2016 Due Nov. 3, 2016 Project 3 Polynomial Interpolation The first two sections of this project will be checked in lab the week of Oct. 24-26 this completion grade will count for 10% of
More information2IN35 VLSI Programming Lab Work Assignment 1: Hardware design using Verilog
2IN35 VLSI Programming Lab Work Assignment 1: Hardware design using Verilog Hrishikesh Salunkhe, h.l.salunkhe@tue.nl, Alok Lele, a.lele@tue.nl April 28, 2015 1 Contents 1 Introduction 3 2 Hardware design
More informationProgramming Fundamentals. With C++ Variable Declaration, Evaluation and Assignment 1
300580 Programming Fundamentals 3 With C++ Variable Declaration, Evaluation and Assignment 1 Today s Topics Variable declaration Assignment to variables Typecasting Counting Mathematical functions Keyboard
More informationChapter 2. Python Programming for Physicists. Soon-Hyung Yook. March 31, Soon-Hyung Yook Chapter 2 March 31, / 52
Chapter 2 Python Programming for Physicists Soon-Hyung Yook March 31, 2017 Soon-Hyung Yook Chapter 2 March 31, 2017 1 / 52 Table of Contents I 1 Getting Started 2 Basic Programming Variables and Assignments
More informationDr M Kasim A Jalil. Faculty of Mechanical Engineering UTM (source: Deitel Associates & Pearson)
Lecture 9 Functions Dr M Kasim A Jalil Faculty of Mechanical Engineering UTM (source: Deitel Associates & Pearson) Objectives In this chapter, you will learn: To understand how to construct programs modularly
More informationParallelizing The Matrix Multiplication. 6/10/2013 LONI Parallel Programming Workshop
Parallelizing The Matrix Multiplication 6/10/2013 LONI Parallel Programming Workshop 2013 1 Serial version 6/10/2013 LONI Parallel Programming Workshop 2013 2 X = A md x B dn = C mn d c i,j = a i,k b k,j
More informationIAP Python - Lecture 4
IAP Python - Lecture 4 Andrew Farrell MIT SIPB January 13, 2011 NumPy, SciPy, and matplotlib are a collection of modules that together are trying to create the functionality of MATLAB in Python. Andrew
More informationConvolution Product. Change of wave shape as a result of passing through a linear filter
Convolution Product Change of wave shape as a result of passing through a linear filter e(t): entry signal (source signal) r(t): impulse response (reflectivity of medium) (a) The spikes are sufficiently
More informationCHAPTER TWO LITERATURE REVIEW
CHAPTER TWO LITERATURE REVIEW 2.1 Introduction. This chapter provides in detail about the multiple access technologies and the OCDMA system. It starts with a discussion on various existing multiple-access
More informationA Guide to Using Some Basic MATLAB Functions
A Guide to Using Some Basic MATLAB Functions UNC Charlotte Robert W. Cox This document provides a brief overview of some of the essential MATLAB functionality. More thorough descriptions are available
More informationDigital Signal Processor 2010/1/4
Digital Signal Processor 1 Analog to Digital Shift 2 Digital Signal Processing Applications FAX Phone Personal Computer Medical Instruments DVD player Air conditioner (controller) Digital Camera MP3 audio
More informationHD Radio Air Interface Design Description Layer 2 Channel Multiplex Rev. I August 23, 2011
HD Radio Air Interface Design Description Layer 2 Multiplex Rev. I August 23, 2011 SY_IDD_1014s TRADEMARKS HD Radio and the HD, HD Radio, and Arc logos are proprietary trademarks of ibiquity Digital Corporation.
More informationC++ Programming Lecture 11 Functions Part I
C++ Programming Lecture 11 Functions Part I By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department Introduction Till now we have learned the basic concepts of C++. All the programs
More information