0% found this document useful (0 votes)
2 views

Math Review Handout

The Math Review Handout provides essential mathematical relationships, identities, and useful commands for Python and MATLAB/Octave related to control systems and signal processing. Key topics include logarithmic relationships, Fourier transforms, integration, differentiation, and polynomial manipulation. It also outlines methods for converting between time and sample domains and includes practical coding commands for implementation in both programming environments.

Uploaded by

boschen
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Math Review Handout

The Math Review Handout provides essential mathematical relationships, identities, and useful commands for Python and MATLAB/Octave related to control systems and signal processing. Key topics include logarithmic relationships, Fourier transforms, integration, differentiation, and polynomial manipulation. It also outlines methods for converting between time and sample domains and includes practical coding commands for implementation in both programming environments.

Uploaded by

boschen
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Math Review Handout

Dan Boschen Last Updated: Sept 14, 2024

Basics
Know and understand the following relationships: Never Forget:
dB of a magnitude is 20log10(magnitude ratio)

e j  cos(  )  j sin(  ) dB of a power is 10log10(power ratio)

e j is the same as 1


360   2 radians
Visualize a vector on a complex plane (phasor):
y  log(x) → 10 y  x
V  Ke j , where K,  are constants:
y  ln(x) → e  x y

log( xy )  log( x )  log( y ) Q (j, imag)


log( x y )  y log( x )
log 10 ( N )
log m ( N )  K
log 10 ( m ) 

Be able to visualize how integration and summation I (real)


are related:
Both are “area under the curve”

 x(t ) dt   x(nT ) T
When you multiply vectors- add the phase.
V1  K 1  1 , V 2  K 2  2
V1V 2  K 1 K 2 ( 1   2 )
Memorize the Fourier Transform for a pulse and
impulse function
Math Review Handout
Dan Boschen Last Updated: Sept 14, 2024

Useful Relationships
Series: Identities:
Geometric (general): cos(   )  cos(   )
cos( ) cos( ) 
N 1
a a
m N

a n

1 a
2
nm cos(   )  cos(   )
sin(  ) sin(  ) 
Geometric (finite): 2
N 1
1 aN sin(    )  sin(    )

n0
a n

1 a sin(  ) cos( ) 
2
Geometric (infinite): Converting s to z

1
a
n0
n

1 a
, a 1 Method of Impulse Invariance (if all poles)

a
a
n 0
n

a 1
, a 1

Ramp:

a
 na
n0
n

(1  a ) 2
, a 1


xn
Taylor: ex  
n 0 n!
Approximations

From Taylor Series:


Method of Bilinear Transform
ex  1 x for x  1

From Taylor Series:


ex 2 1 x 2
ex   for x  1
e x 2 1  x 2

Binomial:
(1  x) n  1  nx for x  1

1
Binomial:  1  x for x  1
1 x

Small Angle:
sin( x)  x for x  1 (rad)
Math Review Handout
Dan Boschen Last Updated: Sept 14, 2024

Transforms (All time and sample domain functions causal and stable)
Time Domain Laplace Sample Domain Z
 
f (t ) F ( s)   f (t )e  st dt f [nT ] F ( z )   f [nT ]z  n
0 n 0

Differentiation
Difference z 1
df sF ( s )  f (0) F ( z)
f [ n]  f [ n  1] z
dt
Integration Accumulation
t 1 n z
 f ( )d s
F (s )
 f [n]
n 0
z 1
F ( z)
0

Exponential Decay Geometric Decay


 at F (s  a) F za 
e f (t ) a  n f [n]
Time Delay Sample Delay
f (t  a ) e  sa F (s ) f [n  m] z  m F (z )
Impulse Unit Sample
1 1
 (t )  [n ]
1 z
1 1
s z 1
1 Tz
t
s2
nT
z  12
1 z
e at e anT
sa z  eaT
z
a nT
z a
Initial Value Theorem lim  lim sF ( s) Initial Value Theorem f [0]  lim F ( z)
t 0  s  z 

lim  lim sF ( s) f [n ]  lim ( z  1) F ( z )


Final Value Theorem t  s 0 Final Value Theorem n  z 1
(all poles in LHP, (all poles in unit circle,
no more than one pole at the origin) no more than one pole at z=1)
f (t ) * g (t ) F ( s )G ( s ) f [n] * g[n] F ( z )G ( z )

"All assumed causal and stable":


Time Domain
f(t)=0 for t<0, all poles in LHP, ROC contains jw axis and positive infinity
Sample Domain
f(n)=0 for n<0, all poles inside unit circle, ROC contains unit circle and infinity
Math Review Handout
Dan Boschen Last Updated: Sept 14, 2024

PYTHON USEFUL COMMANDS


np: import numpy as np
sig: import scipy.signal as sig
con: import control as con

Polynomial factoring and manipulation


np.roots() Polynomial roots, ex: np.roots([1, 6, 10]) to solve for roots of x^2+6x+100 (-3 ± j )
np.poly() Polynomial from roots, ex: np.poly([-3+1j, -3-1j]) = [1., 6., 10.]
np.convolve() Convolve (multiply) two polynomials, ex np.convolve([1, 5],[1, 2, 4]) for (x+5)(x^2+2x+4)
np.polydiv() Deconvolve (divide) two polynomials
sig.residue() Partial-fraction expansion

Converting between s and z


sig.bilinear() Bilinear transform from s to z, in either zero-pole-gain or transfer function (TF) form
con.c2d() Continuous to discrete mapping s to z.
methods = ‘zoh’ (zero order hold), ‘foh’ (first order hold), ‘impulse’ (impulse invariance),
‘tustin’ (Bilinear transform)

Control systems (see https://python-control.readthedocs.io/en/0.9.1/)

[num,den]= con.zpk2tf(z,p,k) zero-pole to transfer function conversion


[z,p,k]= con.tf2zpk([num],[den]) Transfer function to zero-pole conversion

con.sys=tf([num],[den],TS) Transfer function system data structure, TS = sampling interval (omitted


for a continuous system.)

Example: sys=tf(3,[1 2]) for system 3/(s+2)


Example: sys=tf(3,[1 2],1) for system 3/(z+2), sampling time
normalized or 1 second
All of the following commands operate on sys entered as above.

con.nyquist(sys) Nyquist Plot


con.rlocus(sys) Root Locus Plot
con.pzmap(sys) Map of poles and zeros
con.bode(sys) Bode Plot
con.step_response(sys) Step Response
con.impulse_response(sys) Impulse Response
con.feedback(sys1,sys2) Closed loop response from open loop response
con.minreal(sys) Reduce transfer function (good practice to always use this!)
Math Review Handout
Dan Boschen Last Updated: Sept 14, 2024

MATLAB/OCTAVE USEFUL COMMANDS

Polynomial factoring and manipulation


roots() Polynomial roots, ex: roots([1 6 10]) to solve for roots of x^2+6x+100 (-3 ± j )
poly() Polynomial from roots, ex: poly([-3+j -3-j]) = [1 6 10]
conv() Convolve (multiply) two polynomials, ex conv([1 5],[1 2 4]) for (x+5)(x^2+2x+4)
deconv() Deconvolve (divide) two polynomials
residue() Partial-fraction expansion

Converting between s and z


bilinear() Bilinear transform from s to z, in either zero-pole-gain or transfer function (TF) form
impinvar() (MATLAB ONLY) Impulse invariance from s to z, in either zero-pole-gain or TF form
c2d() Continuous to discrete, supports Bilinear and Matched-Z transform (Matlab also
supports impulse invariance within the c2d command)

Control systems

[num,den]= zp2tf(z,p,k) zero-pole to transfer function conversion


[z,p,k]= tf2zp([num],[den]) Transfer function to zero-pole conversion

sys=tf([num],[den],TS) Transfer function system data structure, TS = sampling interval (omitted


for a continuous system.)

Example: sys=tf(3,[1 2]) for system 3/(s+2)


Example: sys=tf(3,[1 2],1) for system 3/(z+2), sampling time
normalized or 1 second

All of the following commands operate on sys entered as above.

nyquist(sys) Nyquist Plot


rlocus(sys) Root Locus Plot
pzmap(sys) Map of poles and zeros
bode(sys) Bode Plot
step(sys) Step Response
impulse(sys) Impulse Response
feedback(sys1,sys2) Closed loop response from open loop response
minreal(sys) Reduce transfer function (good practice to always use this!)

You might also like