You are on page 1of 55

Basic signals and signal decompositions

 Signal models: Step, sgn, rect, sinc, d, comb 2

 Phasor representation 22

 Inner product. Normalization. Signal comparison


Orthogonal basis 25

 Examples of signal decompositions 33

 Fourier series: different representations 45

Properties of Fourier series

Objetivo: poder operar con señales básicas y aprender los tipos de


1
descomposición de señales
Signals: simple operations
f(t) x (?)

f(t) x (?)

2
Model signals
 Step function ( Heavisde function )

 Sign function

 Rectangular function
1 | x / a |  1/ 2
rect  x / a    ,
0 | x / a |  1/ 2
3
Problem 1.1 1

 Express the sgn and rect functions


through Step function

-1
 Signum function
1
1
1

0.8
0.8

 Rectangular function 0.6


0.6

0.4
0.4

0.2
0.2

-1 -0.5 0.5 1
-1 -0.5 0.5 1

- a/2 a/2

4
Problem 1.1: solution 1

 Express the sgn and rect functions


through Step function

-1
 Signum function

sgn( x)  2 H ( x)  1 1
1
1

0.8
0.8

 Rectangular function 0.6


0.6

0.4
0.4

rect  x / a   H ( x  a / 2)  H ( x  a / 2) 0.2
0.2

-1 -0.5 0.5 1
-1 -0.5 0.5 1

- a/2 a/2

5
2D case

 sgn  x   sgn( y )

-1
 H  x  1( y ) 0
1

 H  x   H ( y)

6
Useful functions

 sinc function
sin  ax 
sinc  ax  
 ax

 triangle function

 x  1  x / a x / a 1
    ,
 a   0 x / a 1

7
Energy classification of signals
 A signal f(t) is

 f (t ) dt  
2
 Energy limited signal if


T
1
 f (t ) dt  
2
 Power limited signal if lim
T  2T
T

 Step function is energy and/or power limited?

8
Solution
 A signal f(t) is

 f (t ) dt  
2
 Energy limited signal if


T
1
 f (t ) dt  
2
 Power limited signal if lim
T  2T
T

 Step function is power limited:


 

 H (t ) dt   dt  
2

 0
T T
1 1 1
 H (t ) dt  lim  dt  
2
lim
T  2T T  2T 2
T 0

9
Generalized functions

 Dirac delta function d(x)

 Función Comb function (sampling function)


Important for continues signal
discretization

combT ( x)   d  x  nT 
n 

10
Definition of the Dirac delta function
 As a postulate
1 x0  D
d x  x0   0, x  x0  d x  x0 dx  0 x  D
D  0
 As a limit

d  x   lim N exp   N 2 x 2 
N 
k 

 As a distribution sin( kx)


k /2
d  x   lim  lim  exp  2 ivx  dv
k  x k 
k / 2


d  f  x    f  x  d  x  x dx  f  x 
0 0


11
Dirac delta function: integral form and dimension
 The most common integral form of Dirac delta
function


d  x  x0    exp  2 iv( x  x ) dv

0

 Dirac delta function has dimension wich is inverse to


the dimension of its argument.

 f  x  d  x  x dx  f  x 

0 0

   
J m 1 m J
12
Properties of d-function
 Even function d  x  d x
1
 Scale transformation d  ax  x0   d  x  x0 / a 
a
 Argument as a function
N d  x  xn 
d  g ( x)    , g ( xn )  0,
n 1 g ( xn )
 g ( x)
g ( xn ) 
x x  xn
N
 N-dimensional d-function d  r  r0    d  xk  xk 0 
k 1
2D  d  r  r0   d  x  x0  d  y  y0 
13
Sifting property
f  x  d  x  x0   f  x0  d  x  x0 
Value position
f(x0) f(x)

x0
f  x  d  x  x0   d  x  x1    f  x0  d  x  x0   f  x1  d  x  x1 

f(x0) f(x)

f(x1)

14
x0 x1
Problem 1.2 (a-d)

a)  sin( x)d ( x  1/ 2) dx


b)  sin( x)d (1/ 2  x) dx


c)  sin( x)d (2 x  1) dx

0
d)  sin( x)d ( x  1/ 2) dx


15
Problem 1.2 (a-d): solution

a)  sin( x)d ( x  1/ 2) dx  sin( / 2)  1



b)  sin( x)d (1/ 2  x) dx  [case a): d ( )=d (- )]  1



 1  1
c)  sin( x)d (2 x  1)dx  d (2 x  1)  d ( x  1/ 2)  
  2  2
0
1
d)  sin( x)d ( x  1/ 2) dx  0,  [ , 0]

2
16
Problem 1.5: solution

x  x/a  y
 f  x  d   x0 dx   
  a   dx  ady 

  f  ay  d  y  x0  ady , a  0 
 
    a  f  ay  d  y  x dy
0
 f ay d y  x ady , a  0
    0


 
a  f  ay  d  y  x dy  a f  ax   a  f  x  d  x  ax  dx

0 0

0

x 
d   x0   a d  x  ax0 
a  17
Problem
Simplify: d  sin( x) 

 The recipe:
N d  x  xn  g ( x)
d  g ( x)    , g ( xn )  0, 
g ( xn ) 
n 1 g ( xn ) x x  xn

18
Problem: solution
Simplify: d  sin( x) 
 The recipe:

N d  x  xn  g ( x)
d  g ( x)    , g ( xn )  0, 
g ( xn ) 
n 1 g ( xn ) x x  xn

sin x  0  xn   n

 sin x  sin x
 cos x   (1) n
x x n


d  sin( x)    d ( x  n )  comb ( x)
n 

19
Dirac delta function in polar coordinates
 Cartesian (x,y) to polar coordinates (r,q) d (r  r0 )

 Symmetry with respect to q:

20
* Dirac delta function in other coordinates

21
Phasor representation
 Electric and magnetic signals have often sinusoidal time
dependence.
E (t ) A cos( t ) Re[ E (t )]
E (t ) A exp i ( t )
 Sinusoidal oscillation with amplitude A and angular
frequency ω can be represented as projection on x or y axis
of a rotating vector (phasor) of magnitude (length) A
and initial phase (θ) rotating about origin.

22
Operation with phasors
 Phasor representation is used to add
signals with the same frequency, but
different phase constant θ by “freezing”
this rotation in time and treating the
oscillations as fixed vectors.

 Differentiation and intergation

d
A exp[i (t  q )]  i A exp[i (t  q )]
dt
1
 A exp[i(t  q )]dt  i A exp[i(t  q )]
en.wikipedia.org/wiki/Phasor
23
Phasor applications
 Circuit analysis

 Wave description: Phasor representation of field E(r,t)


allows separating time and spatial variables (complex
amplitud)
E (r, t ) a(r ) cos(kr (r ) t ) Re[ E (r, t )]
E (r, t ) a(r ) exp i(kr (r ) t) f (r ) exp(i t )
f (r )  a(r ) exp i(kr   (r))   a(r) exp(i (r))
amplitud phase
 Interference of 2 spherical waves
There are different fringe structures
depending on observation plane.

24
Normed space
 In normed signal spaces, signals are considered as vectors
that are elements of a linear vector space X. The norm of a
vector x, ‖𝐱‖ , can be understood as the length of x.
 Norms must satisfy the three axioms:
x  0, x  0, if and only if x0
xy  x  y
ax  a x
where a is an arbitrary real or complex-valued scalar, and 0 is the null vector.

 The most common norms are the Lp norms:


1/ p
 
1/ p
 p
b
   x(t ) dt     xn  1 p  
p
x x
 n 
Lp Lp
a 
25
Normed space and metrics
 For p = 2 we obtain the Euclidean norm L2
b n2
   
2 2
x L2
x(t ) dt x l2
xn
a n1

The signal energy can also be expressed as a norm E  x


2
 L2

 A function d(x,y) that assigns a real number to two elements x


and y of a non-empty set X is called a metric on X (“the
distance” between x and y) if:

 Norm is a metric d (x, y )  x  y

26
Signal comparison: MSE, MAE
 Mean square error (MSE)
b
1
xy   x(t )  y (t ) dt  MSE  MSE   n 
2 2 2
L2
x (t ) y (t n )
a
n n

 Root mean squared error (RMSE) RMSE  MSE


 MSE/RMSE gives a relatively high weight to large errors more
useful when large errors are undesirable.
 Sensitive to outliers
2
 Easy to differentiate X
X
 Mean absolute error (MAE)
 Treats larger and small errors equally.
 Not sensitive to outliers
 Is a non-differentiable function
b
1
xy L1
  x(t )  y (t ) dt  MAE  MAE  
n n
x(tn )  y (t27n )
a
MSE: Does it always work?

Z. Wang, et al., IEEE International Conference on Acoustics,Speech, & Signal Processing, May 2002

 The same MSE


 MSE is sensitive to small changes in scale and orientation28
Inner product
 The signal spaces most frequently considered are the
spaces L2(a, b) and l2(n1,n2)
 An inner product must satisfy the axioms:

3
2
1
0
 Inner product -1

< , >=8?

II II =71/2 ?

 More general form


where g(t) is a real nonegative weighting function. 29
Signal normalization

 Signal normalization

x(t )  x(t ) / x

where

 Cauchy-Schwarz inequality x  x, x

x, y  x  y

Equality is given only if x and y are linearly dependent


y=ax

30
Signal orthogonality
 Orthogonality: x(t) and y(t) are orthogonal if and
only if
b
x, y   g (t ) x(t ) y * (t )dt  0
a

 Discrete set of functions  n (t ) n  1, 2,3,... is


othonormal if and only if
0, m  n
 n , m  d nm 
1, n  m
Examples: Hermite, Laguerre polynomials (weighting function is
Gaussian), Legendre, Zernike polynomials.

 Continuous set of functions  p (t ), where p is


continuous variable, is othonormal if and only if
 p , q  d ( p  q)
31
* Complete orthogonal set of functions
 Set  n (t ) n  1, 2,3,... forms orthogonal basis if and only if
 Every quadratically integrable function x(t) can be expanded in
the form

x(t )   n 1 x, n  n

 Completeness relation
x, x   n 1 x, n
 2

 For any pair x and y in L the relation holds

x, y   n 1 x, n

y, n

 The orthonormal set is not contained in any other orthogonal


set in L

32
Signal decompositions
 There are different ways
to decompose a signal
using orthonormal sets
of polynomials, harmonic
functions, d-function, etc.

x(t )  

x( )d (t   )d

 Signal decomposition is
needed for
 Analysis
 Transformation (denoising, filtering)
 Study of its propagation
through systems
 … 33
* Hermite-Gaussian set
 Hermite-Gaussian (HG) functions
(separable in Cartezian coordinates)

HG m,n ( x, y )  H G m (x) H G n (y )
Amplitud Phase
2 1/4
 x  x 
2
HG has positive, negative values
H G n (x)= H n  2  exp     
n
w2 n !  w   w  
 Hn Hermite polynomials
H n (x ) ( 1)n exp(x 2 / 2)
dn
exp( x 2 / 2)
dx n

Hn 1 xH n nH n 1
Hn 1 xH n Hn '
34
* Laguerre-Gaussian set
 Laguerre-Gaussian (LG) functions
[separable in polar coordinates
(r,q )] Amplitud Phase l=2
l
p!  2 r   2 r 2
    
r
2

LG p l (r )  w1 exp(ilq )   Lp  2  exp     


l

( l  p)!  w   w    w  

 Generalized Laguerre polynomials


x a e x d n  x n a
n 
LG n a 
( x)  e x 
n ! dx
 LG p l (r ) has p+1 “rings” and l 2-jumps in the phase
 Applications of HG and LG sets: quantum physics,
particle trapping, spiral interferometry, lasers, optics
communication, optical metrology, etc. 35
HG set LG set

Amplitud
36
LG set: information encoding
Terabit free-space
data transmission
employing orbital
angular
momentum
multiplexing,
[Nature Photon. 6,
488 (2012)];

Is there an
optimal basis to
maximize optical
information
transfer? [Sci.
Rep. 6, 22821
(2016)]

37
Communication with vortex beams
Vídeo:
Communication with spatially modulated light through
turbulent air across Vienna

38
* Set of Zernike polynomials
 Orthogonal on the unit disk
Even Zernike polynomials: Zn (  ,  )  R n (  ) cos( m )
m m

 Odd Zernike polynomials: Zn m (  ,  )  R mn (  )sin(m )


where n ≥ m, φ is the azimuthal angle, and ρ is the
radial distance 0    1 .
 The radial polynomials R mn are defined as
( n  m )/2
(1) k (n  k )!
R mn (  )   k k ! (n  m) / 2  k ! (n  m) / 2  k !
 n2k

for n − m even, and are identically 0 for n − m odd.


Zernike polynomials are limited Zn (  ,  )  1
m

39
Set of Zernike polynomials
 Orthogonality
m 
 Z (  , )Z (  , )d r  2n  2 d m,m'd n,n '
m m' 2
n n'

where d r   d  d
2 Tilt

and the Neumann factor


2, m  0 Defocus
m   Astigmatism
1, m  0
Z 00  1 Coma
Trefoil
Z11  2  cos  , Z11  2  sin 
Z 20  3  2  2  1 ,
Z 22  6  2 cos 2 ,
Z 22  6  2 sin 2
40
* Zernike decomposition
 Any sufficiently smooth real-valued function over the
unit disk G(,) can be represented in terms of its
Zernike coefficients (odd and even)

G(  ,  )    am,n Zmn (  ,  )  bm,n Zn m (  ,  ) ,

where
2n  2
am,n  G (  ,  )Znm (  ,  )
m 
2n  2
bm,n  G (  ,  )Zn m (  ,  )
m 

41
Applications of Zernike polynomials

Shack-Hartmann
wavefront sensor

http://www.cvs.rochester.edu/yoonlab/research/ows.html
 Applications:
 Aberration description in optometry, ophthalmology, astronomy,
imaging systems, etc.
 Adaptive optics
 Zernike moments are used as shape descriptors to classify
benign and malignant tissues
42
Spherical Harmonics decomposition
l
0 Ylm (q ,  )
Videos 1
What do Spherical Harmonics look like?
2
Shape descriptor using Spherical Harmonics
3
m …2 1 0 -1 -2…
8 16 32

32 48 96

8 16 32

43
Decomposition of periodic signals
 How to describe the differences
between two signals with the same
period?
 Example: nota Do
(frequency aprox. v0=256 Hz)
played on a trumpet and on a violin.
 The signal is not exactly
sinusoidal: there are other
frequencies multiple to v0
(overtones) which
characterise the instrument.
T  1/ v0
44
Fourier series
 Signal with period T  1/ v0 can be represented as a
sum of harmonic functions.

rm

45
Fourier series: different presentations
 Both rm and fm are needed to describe a signal

rm
where , ,
 Basis function orthogonality

46
How to find an and bn?

General case f (t )   n 1 f , n  n

 Fourier series

rm

 The only non zero term

47
Expressions for an and bn

 Problem: Find Fourier series coefficients for Sawtooth


signal

48
Fourier series of sawtooth signal
x
s ( x)  , for   x   ,

T  2
1
a0 
  s( x)  0.


1
an 
  s( x)cos(nx)dx  0

 IbnI
1
bn 
  s( x)sin(nx)dx

2 2
 cos(n )  sin( n )
n  n 
2

n 1 0 T-1 2 T-1 3 T-1 4 T-1 5 T-1 6 T-1


2(1)
 , n  1.
n
49
Other form for Fourier series

 Demonstrar that Fourier series can be written as

where

T /2
1
cm  
T T /2
f (t ) exp(im2 tv0 )dt

50
* Fourier series: properties
 Riemann–Lebesgue lemma: If f is integrable, then
lim an  0, lim bn  0, lim cn  0
n  n  n 

 If f is periodic and odd then an=0 for all n.


 If f is periodic and even then then bn=0 for all n.

 Parseval theorem: If f and g are square integrable


periodic functions expressed in the Fourier series as
 
f (t )  
n 
f n exp(in 2 t / T ) g (t )  g
n 
n exp(in2 t / T )

then 1
T 

T 0
f (t ) g *
(t ) dt  
n 
f n g *
n

51
Fourier series in 2D
 Fourier series for 2D function f(x,y) which is periodic
respect to x and y variables with periods Tx and Ty

f ( x, y )   f n ,m exp i 2  nx / Tx  my / Ty  
n , m 
Tx Ty

  f ( x, y) exp i 2  nx / T  my / Ty  
1
f n,m  x
TxTy 0 0

f(x,y) Ifn,mI
52
Fourier series of
quasi- periodic signals

53
Harmonic analysis of non periodic signals
 Non periodic signal T 
 Fourier series  Fourier integral

f (t )  
n 
f n exp(in 2 tv)

T /2
1
fn  
T T /2
f (t ) exp(in 2 tv)dt

54
Conclusions

 Different signal decompositions are used depending on


the task.

 Fourier series are used for the analysis of periodic


signals, approximation of signals, equation solution
(examples: computer generated holograms, angle
dependent functions, discrete signals, …)

 Fourier series generalization: Fourier transform

55

You might also like