0% found this document useful (0 votes)
2 views8 pages

Cs Assignment 1.PDF

The document contains MATLAB code for generating root locus diagrams for various transfer functions. It includes multiple sections, each demonstrating the root locus for different system configurations by varying the gain K. The plots illustrate the relationship between the real and imaginary parts of the roots as K changes.
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)
2 views8 pages

Cs Assignment 1.PDF

The document contains MATLAB code for generating root locus diagrams for various transfer functions. It includes multiple sections, each demonstrating the root locus for different system configurations by varying the gain K. The plots illustrate the relationship between the real and imaginary parts of the roots as K changes.
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/ 8

CONTROL SYSTEM ASSIGNMENT -1

CH. KIRAN SAI


B220813EC
EC02

1) clc;
clear all;
close all;

base_den = conv([1, 0], [1, 2, 2]);


K_values = linspace(0, 50, 1000);

hold on;
for K = K_values
den = base_den;
den(end) = den(end) + K;
roots_K = roots(den);
plot(real(roots_K), imag(roots_K), 'b.');
end
xlabel('Real Axis'); ylabel('Imaginary Axis');
title('Root Locus of G(s)H(s) = K / (s(s^2 + 2s + 2))');
grid on;
hold off;
ROOT LOCUS DIAGRAM :
2)
clc;
clear all;
close all;
K = 0:0.01:20;
s_roots = zeros(length(K), 2);

for i = 1:length(K)
coeffs = [1, (2 + K(i)), (2 + 2*K(i))];
s_roots(i, :) = roots(coeffs);
end
figure;

plot(real(s_roots), imag(s_roots), 'b.', 'MarkerSize', 5);


hold on;

plot([0 0], ylim, 'k-');


plot(xlim, [0 0], 'k-');

title('Root Locus for G(s)H(s) = K(s + 2) / (s^2 + 2s + 2)');


xlabel('Real Axis');
ylabel('Imaginary Axis');
grid on;
ROOT LOCUS DIAGRAM :
3)

clc;
clear all;
close all;

base_den = conv([1, 0], conv([1, 6], [1, 4, 13]));

K_values = linspace(0, 100, 1000);

hold on;

for K = K_values
den = base_den;
den(end) = den(end) + K;
roots_K = roots(den);
plot(real(roots_K), imag(roots_K), 'b.');
end

xlabel('Real Axis'); ylabel('Imaginary Axis');


title('Root Locus of G(s)H(s) = K / (s(s+6)(s^2 + 4s + 13))');
grid on;
hold off;
ROOT LOCUS DIAGRAM :
4)
clc;
close all;
clear all;
K = 0:0.01:10;
s_roots = zeros(length(K), 2);

for i = 1:length(K)
coeffs = [1, (1 + K(i)), 2*K(i)];
s_roots(i, :) = roots(coeffs);
end

figure; plot(real(s_roots), imag(s_roots), 'b.',


'MarkerSize', 5); hold on; plot([0 0], ylim, 'k-');
plot(xlim, [0 0], 'k-'); title('Root Locus for G(s)H(s) =
K(s + 2) / s(s + 1)'); xlabel('Real Axis');
ylabel('Imaginary Axis'); grid on;
ROOT LOCUS DIAGRAM :

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy