Introduction: Root Locus Controller Design

In this tutorial, we will introduce the root locus, show how to create it using MATLAB, and demonstrate how to design feedback controllers that satisfy certain performance criteria through the use of the root locus.

Key MATLAB commands used in this tutorial are: feedback , rlocus , stepcontrolSystemDesigner

Contents

  • Closed-Loop Poles
  • Plotting the Root Locus of a Transfer Function
  • Choosing a Value of K from the Root Locus
  • Closed-Loop Response
  • Using Control System Designer for Root Locus Design

Closed-Loop Poles

The root locus of an (open-loop) transfer function $H(s)$ is a plot of the locations (locus) of all possible closed-loop poles with some parameter, often a proportional gain $K$, varied between 0 and $\infty$. The figure below shows a unity-feedback architecture, but the procedure is identical for any open-loop transfer function $H(s)$, even if some elements of the open-loop transfer function are in the feedback path.

The closed-loop transfer function in this case is:

(1)$$ \ frac {Y (s)} {R (s)} = \ frac {KH (s)} {1 + KH (s)} $$

and thus the poles of the closed-loop system are values of $s$ such that $ 1 + KH (s) = 0 $.

If we write $H(s) = b(s)/a(s)$, then this equation can be rewritten as:

(2)$$
\Rightarrow\ a(s) + Kb(s) = 0
$$

(3)$$
\Rightarrow\ \frac{a(s)}{K} + b(s) = 0
$$

Let $n$ be the order of $a(s)$ and $m$ be the order of $b(s)$ (the order of the polynomial corresponds to the highest power of $s$).

We will consider all positive values of $K$. In the limit as $K \rightarrow 0$, the poles of the closed-loop system are solutions of $a(s) = 0$ (poles of $H(s)$). In the limit as $K \rightarrow \infty$, the poles of the closed-loop system are solutions of $b(s) = 0$ (zeros of $H(s)$).

No matter our choice of $K$the closed-loop system has $n$ poles, where $n$ is the number of poles of the open-loop transfer function $H(s)$The root locus then has $n$ branches, each branch starts at a pole of $H(s)$ and approaches a zero of $H(s)$. If $H(s)$ has more poles than zeros (as is often the case), $m < n$ and we say that $H(s)$ has zeros at infinity. In this case, the limit of $H(s)$ as $s \rightarrow \infty$ is zero. The number of zeros at infinity is $n-m$, the number of open-loop poles minus the number of open-loop zeros, and is the number of branches of the root locus that go to "infinity" (asymptotes).

Since the root locus consists of the locations of all possible closed-loop poles, the root locus helps us choose the value of the gain $K$ to achieve the type of performance we desire. If any of the selected poles are on the right-half complex plane, the closed-loop system will be unstable. The poles that are closest to the imaginary axis have the greatest influence on the closed-loop response, so even if a system has three or four poles, it may still behave similar to a second- or a first-order system, depending on the location(s) of the dominant pole(s).

Plotting the Root Locus of a Transfer Function

Consider an open-loop system which has a transfer function of

(4)$$
H(s) = \frac{Y(s)}{U(s)} = \frac{s + 7}{s(s + 5)(s + 15)(s + 20)}
$$

How do we design a feedback controller for the system using the root-locus method? Let's assume our design criteria are 5% overshoot and 1 second rise time. Create an m-file titled rl.m. Within this file, create the transfer function model and employ the rlocus command as follows:

s = tf('s');
sys = (s + 7)/(s*(s + 5)*(s + 15)*(s + 20));
rlocus(sys)
axis([-22 3 -15 15])

Choosing a Value of K from the Root Locus

The plot above shows all possible closed-loop pole locations for a pure proportional controller. In this case, not all of these closed-loop pole locations indicate satisfaction of our design criteria. To determine what part of the locus is acceptable, we can use the command sgrid(zeta,wn) to plot lines of constant damping ratio and natural frequency. Its two arguments are the damping ratio ($\zeta$) and natural frequency ($ \ omega_n $) [these may be vectors if you want to look at a range of acceptable values]. In our problem, we need an overshoot less than 5% (which means a damping ratio $\zeta$ of greater than 0.7) and a rise time of 1 second (which means a natural frequency $ \ omega_n $ greater than 1.8). Enter the following in the MATLAB command window:

zeta = 0.7;
wn = 1.8;
sgrid (zeta, wn)

On the plot above, the two dotted lines at about a 45-degree angle indicate pole locations with $\zeta$ = 0.7; in between these lines, the poles will have $\zeta$ > 0.7 and outside of these lines $\zeta$ < 0.7. The semicircle indicates pole locations with a natural frequency $ \ omega_n $ = 1.8; inside of the circle, $ \ omega_n $ < 1.8 and outside of the circle $ \ omega_n $ > 1.8.

Going back to our problem, to make the overshoot less than 5%, the poles have to be in between the two angled dotted lines, and to make the rise time shorter than 1 second, the poles have to be outside of the dotted semicircle. So now we know what part of the root locus, which possible closed-loop pole locations, satify the given requirements. All the poles in this location are in the left-half plane, so the closed-loop system will be stable.

From the plot above we see that there is part of the root locus inside the desired region. Therefore, in this case, we need only a proportional controller to move the poles to the desired region. You can use the rlocfind command in MATLAB to choose the desired poles on the locus:

[k,poles] = rlocfind(sys)

Click on the plot the point where you want the closed-loop pole to be. You may want to select the points indicated in the plot below to satisfy the design criteria.

Note that since the root locus may have more than one branch, when you select a pole, you also identify where other closed-loop poles are too, all for the same corresponding value of $K$. Remember that these poles will affect the response too. From the plot above, we see that of the four poles selected (indicated by "+" signs), the two closest to the imaginary axis are in our desired region. Since these poles tend to dominate the response, we have some confidence that are desired requirements will be met for a proportional controller with this value of $K$.

Closed-Loop Response

In order to verify the step response, you need to know the closed-loop transfer function. You could compute this using the rules of block diagram reduction, or let MATLAB do it for you (there is no need to enter a value for K if the rlocfind command was used):

K = 350;
sys_cl = feedback(K*sys,1)
sys_cl =
 
               350 s + 2450
  --------------------------------------
  s^4 + 40 s^3 + 475 s^2 + 1850 s + 2450
 
Continuous-time transfer function.

The two arguments to the function feedback are the transfer function in the forward path and the transfer function in the feedback path of the open-loop system. In this case, our system is unity feedback.

If you have a non-unity feedback situation, look at the help file for the MATLAB function feedback, which demonstrates how to find the closed-loop transfer function with a gain in the feedback path.

Checking the step response of the closed-loop system with the chosen value of $K$:

step(sys_cl)

As we expected, this response has an overshoot less than 5% and a rise time less than 1 second.

Using Control System Designer for Root Locus Design

Another way to complete what was done above is to use the interactive Control System Designer tool within MATLAB. Using the same model as above, we first define the plant, $H(s)$.

s = tf('s');
plant = (s + 7)/(s*(s + 5)*(s + 15)*(s + 20));

The controlSystemDesigner function can be used for analysis and design. In this case, we will focus on using the root locus as the design method to improve the step response of the closed-loop system. To begin, type the following into the MATLAB command window:

controlSystemDesigner(plant)

The following window should appear. You can also launch the GUI by going to the APPS tab and clicking on the app icon under Control System Design and Analysis. Here you can see the root locus plot, along with open-loop Bode plot, and the closed-loop step response plot for the given plant in unity feedback with a default controller of $K = 1$.

The next step is to add the design requirements to the Root Locus plot. This is done directly on the plot by right-clicking and selecting Design RequirementsNew. Design requirements can be set for the Settling Time, the Percent Overshoot, the Damping Ratio, the Natural Frequency, or a Region Constraint.

Here, we will set the design requirements for the damping ratio and the natural frequency as was done previously with the sgrid command. Recall that the boundary of our requirements call for $\zeta$ = 0.7 and $ \ omega_n $ = 1.8. Set these within the design requirements. On the plot, any area which is still white is an acceptable region for the closed-loop poles.

Zoom into the Root Locus by right-clicking on an axis and selecting Properties followed by the label Limits. Change the real-axis limits to -25 to 5 and the imaginary axis limits to -2.5 to 2.5.

Also, we can see the current values of some key parameters in the response. On the Step response plot, right-click on the plot and go to Characteristics and select Peak Response. Repeat for the characteristic Rise Time. There should now be two large dots on the screen indicating the values of these parameters. Click each of these dots to bring up a box with information.

Both plots should appear as shown here, once the Bode plot is closed:

As the characteristics show on the Step response, the overshoot is acceptable, but the rise time is much too large. The pink boxes on the root locus show the corresponding closed-loop pole locations for the currently chosen control gain $K$.

To fix this, we need to choose a new value for the gain $K$. Similar to how we employed the rlocfind command, the gain of the controller can be changed directly on the root locus plot. Click and drag the pink box closest to the imaginary axis (at the origin) to the acceptable region of our root locus plot as shown below.

In the Preview box of the window, it can be seen that the loop gain has been changed to 360. Inspecting the closed-loop step response plot, both of our requirements are now met.

Matlabsolutions.com provides guaranteed satisfaction with a commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been empanelled after extensive research and quality check.

Matlabsolutions.com provides undivided attention to each Matlab assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work done at the best price in industry.

Machine Learning in MATLAB

Train Classification Models in Classification Learner App

Train Regression Models in Regression Learner App

Distribution Plots

Explore the Random Number Generation UI

Design of Experiments

Machine Learning Models

Logistic regression

Logistic regression create generalized linear regression model - MATLAB fitglm 2

Support Vector Machines for Binary Classification

Support Vector Machines for Binary Classification 2

Support Vector Machines for Binary Classification 3

Support Vector Machines for Binary Classification 4

Support Vector Machines for Binary Classification 5

Assess Neural Network Classifier Performance

Naive Bayes Classification

ClassificationTree class

Discriminant Analysis Classification

Ensemble classifier

ClassificationTree class 2

Train Generalized Additive Model for Binary Classification

Train Generalized Additive Model for Binary Classification 2

Classification Using Nearest Neighbors

Classification Using Nearest Neighbors 2

Classification Using Nearest Neighbors 3

Classification Using Nearest Neighbors 4

Classification Using Nearest Neighbors 5

Linear Regression

Linear Regression 2

Linear Regression 3

Linear Regression 4

Nonlinear Regression

Nonlinear Regression 2

Visualizing Multivariate Data

Generalized Linear Models

Generalized Linear Models 2

RegressionTree class

RegressionTree class 2

Neural networks

Gaussian Process Regression Models

Gaussian Process Regression Models 2

Understanding Support Vector Machine Regression

Understanding Support Vector Machine Regression 2

RegressionEnsemble