Top Banner
Introduction to Matlab Functional Programming and Current Uses at ITTC Instructor Timothy Rink Introduction to Matlab
21

Introduction to Matlab Matlab Fundamentals

Feb 18, 2022

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Introduction to Matlab Matlab Fundamentals

Introduction to MatlabFunctional Programming

andCurrent Uses at ITTC

InstructorTimothy Rink

Introduction to Matlab

Page 2: Introduction to Matlab Matlab Fundamentals

Introduction to Matlab

M-Files

•M-files–M-files can be used to create functionalprograms

•Loops, switches, if…then statements•Functions

Page 3: Introduction to Matlab Matlab Fundamentals

Introduction to Matlab

Loops

•Loopsfor variable = expression

statement…end

while logical_expr

statement…end

Page 4: Introduction to Matlab Matlab Fundamentals

Introduction to Matlab

Switches

•Switchesswitch switch_expr

case case_exprstatement…

case case_expr

statement…otherwise

statement…

end

Page 5: Introduction to Matlab Matlab Fundamentals

Introduction to Matlab

if…then

•if…thenif logical_expr

statement…else

statement…

end

Page 6: Introduction to Matlab Matlab Fundamentals

Introduction to Matlab

Functions

•Functions are stored in m-files•M-file must begin with a declaration

function [out] = function_name(arg1,arg2,…,argN)

Page 7: Introduction to Matlab Matlab Fundamentals

Introduction to Matlab

Functions

•Example: Trapezoid Rule for Numerical Integration

∫ ⎟⎠⎞

⎜⎝⎛ ++++≈

b

anyyyyhdxxf

21...

21)( 210

Page 8: Introduction to Matlab Matlab Fundamentals

Introduction to Matlab

Functionsfunction [sum] = trpzdint(f,a1,b1,points)

x=linspace(a1,b1,points);h=x(2)-x(1);

f=eval(f);sum=0;

for n=1:pointsif((n==1)|(n==points))

sum=sum+(1/2)*f(n);else

sum=sum+f(n);end

end

sum=h*sum;

Page 9: Introduction to Matlab Matlab Fundamentals

Introduction to Matlab

Matlab Uses

•Common Engineering Uses–Mathematical Modeling–Interpretation / Presentation of Results–Filter Synthesis–System Stability Analysis–Statistics–Computer-controlled Experiments–Logging Experimental Data

Page 10: Introduction to Matlab Matlab Fundamentals

Model Based Signal Processing

Objective :

To characterize surface and sub – surface layers of Mars. Principles :

Every material on earth can be characterized by its Permittivity.

Permittivity contrast in layered media causes reflection of incident EM Wave.Challenges :

Radar return is corrupted by noise & scattering components.

This is a non – linear problem !

Solution :

Model Based Signal Processing !

Page 11: Introduction to Matlab Matlab Fundamentals

Model Based Signal Processing

Page 12: Introduction to Matlab Matlab Fundamentals

Model Based Signal Processing

Model the radar return using Propagation model, scattering model and noise model .

Permittivity profile can be obtained by minimizing the mean square error (MSE) between measured and modeled data.

Enhanced sub-surface

features

Propagation and scattering model

System Model

Modeled radar return

Actual radar return

Model-Based Algorithm

Permittivity Profile

Page 13: Introduction to Matlab Matlab Fundamentals

Model Based Signal Processing

How can MATLAB help?Modeling:

Simulation of physical phenomenon(e.g, propagation, scattering, noise).

Signal Processing:Filtering, System effect compensation, model parameter estimation.

Analysis:Spectral Analysis (using Fourier transforms, other spectral estimation techniques)

Page 14: Introduction to Matlab Matlab Fundamentals

Model Based Signal Processing

Page 15: Introduction to Matlab Matlab Fundamentals

Model Based Signal Processing

( ) [ ]( ){ } ntfTAtS kk

L

k

k

jjkkr +−+Γ= ∑ ∏

=

=

20

1

0

1

1

22cos ττατπ

Do they match?

Use Iterative Non-linear parameter Estimation techniques

Page 16: Introduction to Matlab Matlab Fundamentals

Model Based Signal Processing

. Type of radar: FMCW radar

. Freq range: 2-8 GHz

. Duration of chirp: 10 mS

. Free space Range resolution: 2.5cm

. SNR of simulated data: 10 dB

Simulation results

Page 17: Introduction to Matlab Matlab Fundamentals

Near-Surface Internal Layers in Polar Ice Sheets

Tree Cross Section

Annular InternalLayers

Collected by KU-RSLduring 2003 Season

Ice Sheet Surface

Bedrock

Annular Rings

Page 18: Introduction to Matlab Matlab Fundamentals

The Clutter Problem

z

y

x

Layer-1

Layer-2

Layer-3

Rough Surface

SidelobeClutter

ResponseDesired

Receive Antenna

Aircraft Signal (without Clutter)

Signal (with Surface Clutter)

Page 19: Introduction to Matlab Matlab Fundamentals

The Solution – Phased Array Processing

Antenna-1 Antenna-2+

λ=d60o

Waves from thisdirection

reinforce each otherat the output

Waves from thisdirection

cancel each other atthe output

x

x

x

+

w1

w2

wN

Weights

Incident Signals

DesiredSignal

Ante

nna

Arra

y

Basic Principle:Constructive & Destructive Interference

ActualImplementation

Page 20: Introduction to Matlab Matlab Fundamentals

Computer Simulation of Rough Surface Clutter using MATLAB

Page 21: Introduction to Matlab Matlab Fundamentals

Signal Processing Techniques Applied to Simulated Data