Question

In: Electrical Engineering

Sample Code and Models Run each of the models below and explain the code function and...

Sample Code and Models

Run each of the models below and explain the code function and your findings for each system, do they agree/disagree with what you understand and why ??

Matlab Code

% Winter 2018 Control Engineering

% Lab No.3 - Root Locus problems

% Mark Clarke

clear

s = tf('s')

K = 1150; %Proportional Controller Gain, May need to be altered?

% Enter Model 1

% This is a model of a simple 2nd order with no zeros

g1 = 1/((s+2)*(s+4));

h1 = feedback(K*g1,1);

figure(1)

rlocus(g1) % Plot the root locus of system g1

figure(2)

step (h1,5)% plot the step response of system h1

% Enter Model 2

% This is a model of a simple 2nd order with one zeros

g2 = (s+3)/((s+2)*(s+4));

h2 = feedback(K*g2,1);

figure(1)

rlocus(g2) % Plot the root locus of system g2

figure(2)

step (h2,5)% plot the step response of system h2

% Enter Model 3

g3 = 1/((s*(s^2 + 15*s + 60)));

h3 = feedback(K*g3,1);

g4 = 1/((s+1)*(s^2 + 15*s + 60));

h4 = feedback(K*g4,1);

figure(1)

rlocus(g3)   % run the root locus on the g3 an g4 above

figure(2)

step(h3,10) % run the step response on the h3 an h4 above

PART 2 Findings and Conclusion

Solutions

Expert Solution

u can directly run the below code on matlab:

clc;

clear all;

close all;

s=tf('s');

k=1150; % gain

% model 1

g1=1/((s+2)*(s+4));

h1=feedback(k*g1,1);% closed loop transfer function

rlocus(g1);% root locus of g1 (open loop)

figure

step(h1,5);grid % step response

% model 2

g2=(s+3)/((s+2)*(s+4));

h2=feedback(k*g2,1);% closed loop transfer function

figure

rlocus(g2);% root locus of g2 (open loop)

figure

step(h2,5);grid % step response

% model 3

g3=1/(s*(s^2+15*s+60));

h3=feedback(k*g3,1);% closed loop transfer function

g4=1/((s+1)*(s^2+15*s+60));

h4=feedback(k*g4,1);% closed loop transfer function

figure

rlocus(g3,g4);% root locus of g3 and g4 (open loop)

figure

step(h3);grid % step response of h3

figure

step(h4);grid % step response of h4

from the responses;

h1,h2 are  stable systems and h3 and h4 are unstable systems


Related Solutions

Explain the long run economic profit earned by each of the four market models. Explain how...
Explain the long run economic profit earned by each of the four market models. Explain how the concept of economic profit might help explain the rationale for the government’s granting of monopolies to those firms that protect their product with a patent. Please use your own words do not copy and paste a texbook solution.
can anyone explain the code from R below? spam is a dataset sample <- sample( c(TRUE,...
can anyone explain the code from R below? spam is a dataset sample <- sample( c(TRUE, FALSE), nrow(spam), replace=TRUE) train <- spam[sample,] test <- spam[!sample,] when i run train and test, we got two different datasets that are split from the original spam dataset. But i don't understand the first line of code. not sure why this line of code can split data into two sets.
The following code will generate a Decision Tree. You need to run the code and explain...
The following code will generate a Decision Tree. You need to run the code and explain the tree. After you get the Tree. You need to explain how does it draw like that. install.packages("rpart.plot") # install package rpart.plot ########################################## # section 7.1.1 Overview of a Decision Tree ########################################## library("rpart") library("rpart.plot") # Read the data setwd("c:/data/") banktrain <- read.table("bank-sample-test.csv",header=TRUE,sep=",") ## drop a few columns to simplify the tree drops<-c("age", "balance", "day", "campaign", "pdays", "previous", "month") banktrain <- banktrain [,!(names(banktrain) %in% drops)]...
For each relation below, determine the following.(i) Is it a function? If not, explain why not...
For each relation below, determine the following.(i) Is it a function? If not, explain why not and stop. Otherwise, answer part (ii).(ii) What are its domain and image? (a){(x, y) :x, y∈Z, y- 2x}. (b){(x, y) :x, y∈Z, xy- 0}. (c){(x, y) :x, y∈Z, y-x2}. (d){(x, y) :x, y∈Z, x|y}. (e){(x, y) :x, y∈Z, x+y= 0}. (f){(x, y) :x, y∈R, x2+y2= 1}.
What is Production Function? Explain Factors of Production. Differentiate short run and long run production function.
What is Production Function? Explain Factors of Production. Differentiate short run and long run production function.
What is Production Function? Explain Factors of Production. Differentiate short run and long run production function.
What is Production Function? Explain Factors of Production. Differentiate short run and long run production function.
Below is my source code for file merging. when i run the code my merged file...
Below is my source code for file merging. when i run the code my merged file is blank and it never shows merging complete prompt. i dont see any errors or why my code would be causing this. i saved both files with male names and female names in the same location my source code is in as a rtf #include #include #include using namespace std; int main() { ifstream inFile1; ifstream inFile2; ofstream outFile1; int mClientNumber, fClientNumber; string mClientName;...
Run the following code and explain the results (expectation of the array). Test it on the...
Run the following code and explain the results (expectation of the array). Test it on the following arrays: [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] [1.0, 4.0, 6.0,2.0 , 3.0, 5.0] [5.0, 3.0, 2.0, 6.0, 4.0, 1.0] [6.0, 5.0, 4.0, 3.0, 2.0, 1.0] // Java code to calculate expected // value of an array import java.io.*; class GFG { // Function to calculate expectation static float calc_Expectation(float a[], float n) { // Variable prb is for probability of each // element...
Is there an R code that would allow me to run a random sample 10,000 times...
Is there an R code that would allow me to run a random sample 10,000 times without having to run the code created individually? I have completed the first two tasks, but I do not know if R has a repeat code that would speed things up. Now using the “Minutes” column generate a random sample size of 5. (THIS HAS ALREADY BEEN COMPLETED BY ME. JUST ANSWER THE QUESTION CONCERNING THE THIRD ONE AND THE R CODE). Calculate the...
Explain the relationship between a firm’s short-run production function and its short-run cost function. Focus on...
Explain the relationship between a firm’s short-run production function and its short-run cost function. Focus on the marginal product of an input and the marginal cost of production. (p. 283 #3
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT