0% found this document useful (0 votes)
5 views4 pages

Challenge HW

The document outlines a MATLAB script for analyzing a discrete-time transfer function using root locus techniques. It defines the transfer function coefficients and calculates the departure angles based on the RLP lecture equations. The script also computes the sum of departure angles and plots the root locus of the system.

Uploaded by

Kevin C
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views4 pages

Challenge HW

The document outlines a MATLAB script for analyzing a discrete-time transfer function using root locus techniques. It defines the transfer function coefficients and calculates the departure angles based on the RLP lecture equations. The script also computes the sum of departure angles and plots the root locus of the system.

Uploaded by

Kevin C
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Kevin Collins

%Challenge HW
clc; clear all; close all;
syms s K p k n i

%simply the sum of all the departure angles is the unit circle, offset by
%pi, 180%
%as n iterates higher
%use equation 4 and rule 7 from RLP lecture
% poles expressed as p*e^i*phi, and rlp equation is 1*e^(pi+2*pi*l)
% therefor sum of angles is SUM(phi_i)=pi+2*pi*(n-1)

%Given eqn
Cn=[1 0 0 ];
Cd= [1 10 56 170 272 160]
ExF=tf(Cn,Cd,10)

%find n-topple
n=length(Cd)-length(Cn)
%defined departure angles
p=phiF(n)
% sum of departure angles is pi+2*n*pi
sumP=sum(p)/pi

[r v]=rlocus(ExF)
rlocusplot(ExF)

n==sumP

%%

function phi=phiF(n)
k=n-1
i=[0:1:k]
phi=(2*i+1)*pi/n
end

Cd = 1×6
1 10 56 170 272 160
ExF =
Kevin Collins

z^2

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

z^5 + 10 z^4 + 56 z^3

+ 170 z^2 + 272 z + 160

Sample time: 10 seconds


Discrete-time transfer function.
n = 3
k = 2
i = 1×3
0 1 2
phi = 1×3
1.0472 3.1416 5.2360
p = 1×3
1.0472 3.1416 5.2360
sumP = 3
r = 5×63 complex
103 ×
-0.0022 + 0.0038i -0.0021 + 0.0039i -0.0021 + 0.0039i -0.0020 + 0.0039i
-0.0020 + 0.0040i -0.0020 + 0.0040i -0.0020 + 0.0040i -0.0020 + 0.0040i -
0.0020 + 0.0040i -0.0020 + 0.0040i -0.0020 + 0.0040i -0.0020 + 0.0040i -
0.0020 + 0.0040i -0.0020 + 0.0041i -0.0020 + 0.0041i -0.0019 + 0.0041i -
0.0019 + 0.0041i -0.0019 + 0.0042i -0.0018 + 0.0043i -0.0017 + 0.0044i -
0.0016 + 0.0046i -0.0015 + 0.0047i -0.0014 + 0.0049i -0.0013 + 0.0051i -
0.0011 + 0.0054i -0.0009 + 0.0056i -0.0007 + 0.0060i -0.0005 + 0.0063i -
0.0003 + 0.0067i 0.0000 + 0.0071i 0.0003 + 0.0076i 0.0007 + 0.0082i
0.0011 + 0.0088i 0.0015 + 0.0095i 0.0020 + 0.0103i 0.0025 + 0.0111i
0.0031 + 0.0121i 0.0037 + 0.0131i 0.0044 + 0.0142i 0.0052 + 0.0155i
0.0060 + 0.0169i 0.0070 + 0.0184i 0.0080 + 0.0201i 0.0091 + 0.0220i
0.0103 + 0.0240i 0.0116 + 0.0263i 0.0130 + 0.0287i 0.0146 + 0.0314i
0.0163 + 0.0344i 0.0182 + 0.0376i
-0.0022 - 0.0038i -0.0021 - 0.0039i -0.0021 - 0.0039i -0.0020 - 0.0039i
-0.0020 - 0.0040i -0.0020 - 0.0040i -0.0020 - 0.0040i -0.0020 - 0.0040i -
0.0020 - 0.0040i -0.0020 - 0.0040i -0.0020 - 0.0040i -0.0020 - 0.0040i -
0.0020 - 0.0040i -0.0020 - 0.0041i -0.0020 - 0.0041i -0.0019 - 0.0041i -
0.0019 - 0.0041i -0.0019 - 0.0042i -0.0018 - 0.0043i -0.0017 - 0.0044i -
0.0016 - 0.0046i -0.0015 - 0.0047i -0.0014 - 0.0049i -0.0013 - 0.0051i -
0.0011 - 0.0054i -0.0009 - 0.0056i -0.0007 - 0.0060i -0.0005 - 0.0063i -
0.0003 - 0.0067i 0.0000 - 0.0071i 0.0003 - 0.0076i 0.0007 - 0.0082i
0.0011 - 0.0088i 0.0015 - 0.0095i 0.0020 - 0.0103i 0.0025 - 0.0111i
0.0031 - 0.0121i 0.0037 - 0.0131i 0.0044 - 0.0142i 0.0052 - 0.0155i
0.0060 - 0.0169i 0.0070 - 0.0184i 0.0080 - 0.0201i 0.0091 - 0.0220i
0.0103 - 0.0240i 0.0116 - 0.0263i 0.0130 - 0.0287i 0.0146 - 0.0314i
0.0163 - 0.0344i 0.0182 - 0.0376i
-0.0022 + 0.0014i -0.0023 + 0.0011i -0.0023 + 0.0010i -0.0023 + 0.0008i
-0.0022 + 0.0004i -0.0021 + 0.0003i -0.0021 + 0.0001i -0.0021 + 0.0001i -
0.0020 + 0.0000i -0.0020 + 0.0000i -0.0021 + 0.0000i -0.0021 + 0.0000i -
0.0029 + 0.0000i -0.0030 + 0.0000i -0.0031 + 0.0000i -0.0032 + 0.0000i -
0.0034 + 0.0000i -0.0037 + 0.0000i -0.0041 + 0.0000i -0.0045 + 0.0000i -
0.0048 + 0.0000i -0.0052 + 0.0000i -0.0057 + 0.0000i -0.0061 + 0.0000i -
0.0066 + 0.0000i -0.0071 + 0.0000i -0.0076 + 0.0000i -0.0082 + 0.0000i -
0.0088 + 0.0000i -0.0095 + 0.0000i -0.0102 + 0.0000i -0.0110 + 0.0000i -
Kevin Collins

0.0119 + 0.0000i -0.0128 + 0.0000i -0.0138 + 0.0000i -0.0149 + 0.0000i -


0.0161 + 0.0000i -0.0174 + 0.0000i -0.0188 + 0.0000i -0.0204 + 0.0000i -
0.0221 + 0.0000i -0.0239 + 0.0000i -0.0259 + 0.0000i -0.0281 + 0.0000i -
0.0305 + 0.0000i -0.0332 + 0.0000i -0.0360 + 0.0000i -0.0392 + 0.0000i -
0.0426 + 0.0000i -0.0464 + 0.0000i
-0.0022 - 0.0014i -0.0023 - 0.0011i -0.0023 - 0.0010i -0.0023 - 0.0008i
-0.0022 - 0.0004i -0.0021 - 0.0003i -0.0021 - 0.0001i -0.0021 - 0.0001i -
0.0020 - 0.0000i -0.0020 - 0.0000i -0.0019 - 0.0001i -0.0019 - 0.0001i -
0.0016 - 0.0005i -0.0015 - 0.0005i -0.0015 - 0.0005i -0.0015 - 0.0005i -
0.0014 - 0.0006i -0.0013 - 0.0006i -0.0012 - 0.0007i -0.0011 - 0.0007i -
0.0010 - 0.0007i -0.0009 - 0.0007i -0.0008 - 0.0007i -0.0007 - 0.0007i -
0.0006 - 0.0007i -0.0005 - 0.0006i -0.0004 - 0.0006i -0.0004 - 0.0006i -
0.0003 - 0.0005i -0.0003 - 0.0005i -0.0002 - 0.0005i -0.0002 - 0.0004i -
0.0001 - 0.0004i -0.0001 - 0.0004i -0.0001 - 0.0003i -0.0001 - 0.0003i -
0.0001 - 0.0002i -0.0000 - 0.0002i -0.0000 - 0.0002i -0.0000 - 0.0002i -
0.0000 - 0.0001i -0.0000 - 0.0001i -0.0000 - 0.0001i -0.0000 - 0.0001i -
0.0000 - 0.0001i -0.0000 - 0.0001i -0.0000 - 0.0001i -0.0000 - 0.0001i -
0.0000 - 0.0001i -0.0000 - 0.0000i
-0.0012 + 0.0000i -0.0013 + 0.0000i -0.0013 + 0.0000i -0.0014 + 0.0000i
-0.0017 + 0.0000i -0.0017 + 0.0000i -0.0019 + 0.0000i -0.0019 + 0.0000i -
0.0020 + 0.0000i -0.0020 + 0.0000i -0.0019 + 0.0001i -0.0019 + 0.0001i -
0.0016 + 0.0005i -0.0015 + 0.0005i -0.0015 + 0.0005i -0.0015 + 0.0005i -
0.0014 + 0.0006i -0.0013 + 0.0006i -0.0012 + 0.0007i -0.0011 + 0.0007i -
0.0010 + 0.0007i -0.0009 + 0.0007i -0.0008 + 0.0007i -0.0007 + 0.0007i -
0.0006 + 0.0007i -0.0005 + 0.0006i -0.0004 + 0.0006i -0.0004 + 0.0006i -
0.0003 + 0.0005i -0.0003 + 0.0005i -0.0002 + 0.0005i -0.0002 + 0.0004i -
0.0001 + 0.0004i -0.0001 + 0.0004i -0.0001 + 0.0003i -0.0001 + 0.0003i -
0.0001 + 0.0002i -0.0000 + 0.0002i -0.0000 + 0.0002i -0.0000 + 0.0002i -
0.0000 + 0.0001i -0.0000 + 0.0001i -0.0000 + 0.0001i -0.0000 + 0.0001i -
0.0000 + 0.0001i -0.0000 + 0.0001i -0.0000 + 0.0001i -0.0000 + 0.0001i -
0.0000 + 0.0001i -0.0000 + 0.0000i
v = 1×63
1010 ×
0 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000
Kevin Collins

ans = logical
1

You might also like