- 84 Views
- Uploaded on
- Presentation posted in: General

Background Review

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

- Elementary functions
- Complex numbers
- Common test input signals
- Differential equations
- Laplace transform
- Examples
- properties
- Inverse transform
- Partial fraction expantion

- Matlab

- It contains the 5 most important numbers: 0, 1, i, p, e.
- It contains the 3 most important operations: +, *, and exponential.
- It contains equal sign for equations

- F(t)=3sin 3t +4cos 3t
- F(t)=Asin(3t-d)=Acosd sin3t –Asin d cos3t
- Acos d =3
- Asin d =-4
- A2=25, A=5
- tan d =-4/3, d=-53.13o
- F(t)=5sin(3t+53.13o)

- X2+1=0 x=i where i2=-1
- X2+4=0, then x=2i, or 2j
- If z1=x1+iy1, z2=x2+iy2
- Then z1+ z2= (x1+ x2)+i(y1 +y2)
- z1 z2=(x1+iy1)(x2+iy2)=(x1x2 -y1y2) +i(x1y2 +x2y1)

- z=x+iy, let’s put x=rcosq, y= rsinq
- Then z = r(cosq+i sinq) = r cisq = rq
- Absolute value (modulus) r2=x2+y2
- Argument q= tan-1(y/x)
- Example z=1+i

- z=x+iy
- ez =ex+iy= ex eiy= ex (cos y+i sin y)
- eix =cos x+i sin x = cis x
- | eix | = sqrt(cos2 x+ sin2 x) = 1
- z=r(cosq+i sinq)=r eiq
- Find e1+i
- Find e-3i

>> z1=1+2*i

z1 = 1.0000 + 2.0000i

>> z2=3+i*5

z2 = 3.0000 + 5.0000i

>> z3=z1+z2

z3 = 4.0000 + 7.0000i

>> z4=z1*z2

z4 = -7.0000 +11.0000i

>> z5=z1/z2

z5 = 0.3824 + 0.0294i

>> r1=abs(z1)

r1 = 2.2361

>> theta1=angle(z1)

theta1 = 1.1071

>> theta1=angle(z1)*180/pi

theta1 = 63.4349

>> real(z1)

ans = 1

>> imag(z1)

ans = 2

- Pole of G(s) is a value of s near which the value of G goes to infinity
- Zero of G(s) is a value of s near which the value of G goes to zero.

>> s=tf(‘s’)

Transfer function: s

>> G=exp(-2*s)/s/(s+1)

Transfer function:

1

exp(-2*s) * -----------

s^2 + s

>> pole(G)

ans = 0, -1

>> zero(G)

ans = Empty matrix: 0-by-1

- y’ + a y = 0; y(0)=C, and zero input
- Solution: y(t) = Ce-at
- y’ + a y = d(t); y(0)=0, input = unit impulse
- Unit impulse response: h(t) = e-at
- y’ + a y = f(t); y(0)=C, non zeroinput
- Total response: y(t) = zero input response + zero state response = Ce-at + h(t) * f(t)
- Higher order LODE: use Laplace

- Definition and examples

Unit Step Function u(t)

Name:____________

The single most important thing to remember is that whenever there is feedback, one should worry about __________

- y”+9y=0, y(0)=0, y’(0)=2
- L(y”)=s2Y(s)-sy(0)-y’(0)= s2Y(s)-2
- L(y)=Y(s)
- (s2+9)Y(s)=2
- Y(s)=2/ (s2+9)
- y(t)=(2/3) sin 3t

F=2/(s^2+9)

F =

2/(s^2+9)

>> f=ilaplace(F)

f =

2/9*9^(1/2)*sin(9^(1/2)*t)

>> simplify(f)

ans =

2/3*sin(3*t)

- y”+2y’+5y=0, y(0)=2, y’(0)=-4
- L(y”)=s2Y(s)-sy(0)-y’(0)= s2Y(s)-2s+4
- L(y’)=sY(s)-y(0)=sY(s)-2
- L(y)=Y(s)
- (s2+2s+5)Y(s)=2s
- Y(s)=2s/ (s2+2s+5)=2(s+1)/[(s+1)2+22]-2/[(s+1)2+22]
- y(t)= e-t(2cos 2t –sin 2t)

>> F=2*s/(s^2+2*s+5)

F =

2*s/(s^2+2*s+5)

>> f=ilaplace(F)

f =

2*exp(-t)*cos(2*t)-exp(-t)*sin(2*t)

- Y”-2 y’-3 y=0, y(0)= 1, y’(0)= 7
- Y”+2 y’-8 y=0, y(0)= 1, y’(0)= 8
- Y”+2 y’-3 y=0, y(0)= 0, y’(0)= 4
- 4Y”+4 y’-3 y=0, y(0)= 8, y’(0)= 0
- Y”+2 y’+ y=0, y(0)= 1, y’(0)= -2
- Y”+4 y=0, y(0)= 1, y’(0)= 1

Y”+2 y’+ y=0, y(0)= 1, y’(0)= -2

>> A=[0 1;-1 -2]; B=[0;1]; C=[1 0]; D=0;

>> x0=[1;-2];

>> t=sym('t');

>> y=C*expm(A*t)*x0

y = exp(-t)-t*exp(-t)

Y”+2 y’+ y=f(t)=u(t), y(0)= 2, y’(0)= 3

But No FUN

Matlab

>> [r p k]=residue(n,d)

r =

1

2

p =

1

0

k =

[]

>> d=[1 -1 0]

d =

1 -1 0

>> n=[3 -2]

n =

3 -2

1/(s-1) + 2/s

Matlab

>> [r p k]=residue(n,d)

r =

1.5000

-1.5000

1.0000

p =

3

-3

0

k =

[]

>> n=[1 9 -9]

n =

1 9 -9

>> d=[1 0 -9 0]

d =

1 0 -9 0

1.5/(s-3)-1.5/(s+3)+1/s

Matlab

>> [r p k]=residue(n,d)

r =

2.0000

-3.0000

1.0000

p =

2.0000

-2.0000

1.0000

k =

[]

>> n=[11 -14]

n =

11 -14

>> d=[1 -1 -4 4]

d =

1 -1 -4 4

2/(s-2)-3/(s+2)+1/(s-1)

Matlab

>> [r p k]=residue(a,b)

r =

1

-1

p =

-1

-1

k =

[]

>> b=[1 2 1]

b =

1 2 1

>> a=[1 0]

a =

1 0

1/(s+1)-1/(s+1)2

>> Y=(s^4-7*s^3+13*s^2+4*s-12)/s^2/(s-3)/(s^2-3*s+2)

Transfer function:

s^4 - 7 s^3 + 13 s^2 + 4 s - 12

------------------------------------

s^5 - 6 s^4 + 11 s^3 - 6 s^2

>> [n,d]=tfdata(Y,'v')

n = 0 1 -7 13 4 -12

d = 1 -6 11 -6 0 0

>> [r,p,k]=residue(n,d)

r = 0.5000

-2.0000

-0.5000

3.0000

2.0000

p =3.0000

2.0000

1.0000

0

0

k = [ ]