You are on page 1of 11

SAKHAMUZI NDLOVU

SI:4446819
101MS: RNGINEERING MATHEMATICS

1a) Find the value of K

z=0 ;

G ( z )=1 ;

K ( z3 +2)
G(z)=
5 z 4 2 z 38 z 22 z + K +2

K ((0)3+ 2)
1=
5 (0)42(0)38(0)2 2(0)+ K +2

2K
(K+2) 1= multiply both sides by (K+2)
K +2
K+2=2K

2=2K-K

2=K(2-1)

K=2

First I did substitute (0) into (z) it did cancel all the multiples of (0) then I was left
with 2K/K+2. I did multiply both sides by (K+2) and did subtract right hand side
with - K because K is equivalent to 1 so i did subtract (2-!) and it gave me 1 then I
was left with K=2 for my answer.

1bi) to determine poles of the system, we must equate the denominator of the
system to zero. Thus, this is what we get:
5 z 42 z 3+ 8 z 22 z + K +2=0
z1=roots([5 -2 8 -2 4])

z1 = -0.1403 + 0.9588i

-0.1403 - 0.9588i

0.3403 + 0.8580i

0.3403 - 0.8580i

These are complex numbers which represent the poles of the given system, which
are: -0.1403 + 0.9588i; -0.1403 - 0.9588i; 0.3403 + 0.8580i; 0.3403 -
0.8580i.

>> z2=roots([1 0 0 2])

z2 = -1.2599 + 0.0000i

0.6300 + 1.0911i

0.6300 - 1.0911i
The zeros of the system are: -1.2599 + 0.0000i; 0.6300 + 1.0911i; 0.6300 -
1.0911i.

SAKHAMUZI NDLOVU
SI:4446819
101MS: RNGINEERING MATHEMATICS

Bii) Plot the poles (marked with x) and zeros (marked with 0) on the Argand
diagram

>> x=real(z1);y= imag(z1);

>>plot(x,y,'*');grid on;title('argand diagram')

>> hold Current plot held

>> x=real(z2);y= imag(z2);

>>plot(x,y,'o');grid on;title('argand diagram')

Biii) All the poles marked with x must be inside the disk
The system is stable because all the pole values are located within the unit disc.

SAKHAMUZI NDLOVU
SI:4446819
101MS: RNGINEERING MATHEMATICS

1c) Find the amplitude and the phase response when = 1

K ( z3 +2)
G(z)=
5 z 4 2 z 38 z 22 z + K +2

2( j+2)
=
5 j 2 j 8 j 22 j+2+2
4 3

2( j+ 2)
=
5 (1)2( j)8(1)2(1)+2+2

42 j
=
5+ 2 j8 j 22 (1 ) +4

42 j
=
1
= 4-2j

Amplitude

G(j)= x2 + y 2
= 4 2+(2)2
=4.47

y
G(j)= )
tan 1 x
2
= )
tan 1 4
= 0.46 radians

2-0.46= 5.81 radians phase response

1d) Utilising MATLAB , plot the graph of 5 z 42 z 3+ 8 z2 2 z + 4 for the range -2


z 2

>> s=[-2:0.001:2];

>> G=5*s.^4-2*s.^3+8*s.^2-2*s+4;

>> plot(s,G)

>>grid on

>>title('G=5*s.^4-2*s.^3+8*s.^2-2*s+k2')

>>xlabel('z')

SAKHAMUZI NDLOVU
SI:4446819
101MS: RNGINEERING MATHEMATICS

1d) Utilising MATLAB , plot the graph of 5 z 42 z 3+ 8 z2 2 z + 4 for the range -2


z 2

2a) 2a) Express and in the terms of r and , where r = lzl and = arg (z)
De Moivres theorem state that:

cos ( n ) + jsin (n )
n n
z =r

3
cos ( 3 ) + jsin
z3 =r 3

z 3 = r 3 cos(3)+j r 3 sin(3)
Using De Moivres theorem

n n
z = r [cos(n)-jsin(n)

3 3 3
z = r [cosn)-j r sin(n)

3 3 3 3
By substituting the values of z and z into equation N = z +z

W= ( r 3 cos 3 + j r 3 sin 3 +( r3 cos 3 j r3 sin 3 )


3 3 3 3 3
+j = r cos 3 + j r 3 +r cos 3 jr cos 3 jr sin 3
By collecting the like terms of real and imaginary

W= r 3 cos 3 + r3 cos 3+ jr 3 sin 3 jr 3 sin 3

W=( r 3 +r 3 cos 3 + j[ ( r 3r 3 ) sin 3 ]

In comparison of the above equation with w = + j

3 3
=( r +r cos 3
3
=( rr sin 3
SAKHAMUZI NDLOVU
SI:4446819
101MS: RNGINEERING MATHEMATICS

2b) Using MATLAB find the ll, arg() and (in the form a +b), given by z =1 +
j4

>>w=1+4i

>>w(z^3)+1/(z^3)

>>abs(w)

ans = 70.0914

>> angle(w)

ans = -2.3059

>> conj(w)
ans = -47.0096 + 51.9894i

3a) >> A = [0.3 -0.2 -0.1 -0.7; -0.2 0.1 -0.2 0.1; 0.1 0.1 0.2 0.5; 0.2 -.1 0.4 0.1]

A = 0.3000 -0.2000 -0.1000 -0.7000

-0.2000 0.1000 -0.2000 0.1000

0.1000 0.1000 0.2000 0.5000

0.2000 -0.1000 0.4000 0.1000

>> B = [0.3 0.4 -0.1 0.2; 0.1 0.1 -0.1 0; 0.2 0.3 0.2 0.2; -0.2 0 0.5 0.1];

B = 0.3000 0.4000 -0.1000 0.2000

0.1000 0.1000 -0.1000 0

0.2000 0.3000 0.2000 0.2000

-0.2000 0 0.5000 0.1000

3a) >> ABT = a*transpose(b)

ans =-0.1200 0.0200 -0.1600 -0.1800

0.0200 0.0100 -0.0300 -0.0500

0.1500 0.0000 0.1900 0.1300

-0.0000 -0.0300 0.1100 0.1700

>> BTA = transpose(b)*a


ans = 0.0500 -0.0100 -0.0900 -0.1200

0.1300 -0.0400 -0.0000 -0.1200

0.1100 -0.0200 0.2700 0.2100


0.1000 -0.0300 0.0600 -0.0300
SAKHAMUZI NDLOVU
SI:4446819
101MS: RNGINEERING MATHEMATICS

b) To determine the solution to the problem, rref command is used to find


Reduced Row-Echelon Form of the matrix.
rref(a)
ans = 1 0 0 0
0 1 0 3
0 0 1 1
0 0 0 0
Reduced Row-Echelon Form of the matrix A. From this we can see, that matrix will
have either infinite number of solutions or no solutions when c is stated.
>> rref(b)
ans = 1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
Reduced Row-Echelon Form of the matrix B. It shows, matrix has a distinct
solution when c is stated.
Bi) Ax=c
>> c = [0 0 0 0]'
c=00 0 0

Since it is possible that there is no or infinite number of solutions, (rref) command


is used to determine that.

>>rref([A c])

ans = 1 0 0 0 0

0 1 0 3 0

0 0 1 1 0

0 0 0 0 0

It shows that last row of Reduced Row-Echelon Form of the matrix A with c=[0 0 0
0]T gives 0x1 + 0x2 + 0x3 + 0x4 = 0; therefore there are no restrictions on the
solutions, so this means there is an infinite number of solutions.

>> c = [1 4 -2 1]'

c= 1 4 -2 1

>> c = [1 4 -2 1]'

c= 1 4 -2 1

SAKHAMUZI NDLOVU
SI:4446819
101MS: RNGINEERING MATHEMATICS

>> c=transpose([1 4 -2 1]);


>> rref([a c])
ans = 1 0 0 0 0

0 1 0 3 0

0 0 1 1 0

0 0 0 0 1

This shows that last row of Reduced Row-Echelon Form of the matrix A with c=[1 4
-2 1]T gives 0x1 + 0x2 + 0x3 + 0x4 = 1 which is impossible. This means there is
no solutions to the system

3bii) ) Bx=c
>> c=transpose([0 0 0 0]);

>> inv(b)*c

ans = 0 0 0 0

This shows that , x1 = x2 = x3 = x4 = 0

>> c = [1 4 -2 1]'

c= 1 4 -2 1

>>rref([B c])

ans = 1 0 0 0 -45

0 1 0 0 90

0 0 1 0 5

0 0 0 1 -105

x1 = -45

x2 = 90

x3 = 5

x4 = -105

This matrix shows that there is a solution

SAKHAMUZI NDLOVU
SI:4446819
101MS: RNGINEERING MATHEMATICS

4a) >>randn('state',sum(100*clock));

>> m = 4 + abs(randn(1,1))

m = 4.942>>syms x;
>> f=10*x^2/((m*x^2+9)^2);

>> f=simplify(diff(f));

>> w=solve(f);

>> x=double(w)'

x=0 1.3495 -1.3495

>> y=double(subs(f,w))

y=00 0
This gives solutions of f(x)=0 in floating point form
Substitute X- axis values into function to find corresponding Y- axis values for the
stationary point

>> ys = double(subs(f1,w))

ys = 0 0 0

Stationary points are: (0; 0) (1.3495; 0) (-1.3495; 0)


To classify the stationary points, first step is to differentiate f(x) twice, and then
evaluate (f ) at the values of x that satisfy f (x) = 0

>> f2=simplify(diff(f,2));

>>double(subs(f2,w))'

ans = 0 0.1372 -0.1372

Therefore :

f (0) = 0 = 0

f (1.3495) = 0.1372 > 0

f (-1.3495) = -0.1372 < 0

This means, (0; 0) is local minimum, (1.4283; 0) is local maximum and (-1.4283;
0) is local maximum.

SAKHAMUZI NDLOVU
SI:4446819
101MS: RNGINEERING MATHEMATICS

4b ) >> syms x
>> x is symbolic symbol
>> f=(10*x.^2)/((m*x.^2+9).^2);
>> define f(x)
>> ezplot(f,[-10,10])
>>plots f(x) in the range [-10, 10]
This means, (0; 0) is local minimum, (1.3495; 0) is local maximum and (-1.3495;
0) is local maximum.
4ci) A method based on Simpsons rule
>> x=0:0.005:1;

>> F=@(x)x.*(12.*x.^2+m).^(3/2);

>> I=quad(F,0,1)

I = 18.7857

SAKHAMUZI NDLOVU
SI:4446819
101MS: RNGINEERING MATHEMATICS

cii) The trapezium method with interval of length 0,005

>> G=x.*(12.*x.^2+m).^(3/2);

>> V=0.005*trapz(G)

V = 18.7862

Symbolic Math toolbox

>> syms x
>> g=x.*(12*x.^2+m).^(3/2);,0,1))

The command double can be used to find the floating point value of the definite
integral.

>> y=double(int(g,0,1))

I = 18.7857

You might also like