MATLAB code is given below in bold letters.

**clc;**

close all;

clear all;

**% define the Laplace variable s**

s = tf('s');

**% define the plant**

G = 1/(s*(s+2)*(s+10));

**% plot the rootlocus plot**

figure;

rlocus(G);

Question b

**% PD compensator design using SISOTOOL**

sisotool(G);

Now add the design requirements by right clocking on the rootlocus plot.

settling time = 4* time constant = 4 * 0.625 = 2.5

damping ratio = 0.25

Then the probable region of closed loop dominant poles is shown below.

Now add a zero at at s = -3.(this comes through trial and error).

from the above figure it is observed that the closed loop dominant poles travel through the desired region in s plane.

Therefore the PD controller gain is given by s = -3.

For a loop gain Kd > 46, the closed loop system meets the desired specifications.

Therefore Controller C(s) = 46(s+3)

design verification:

closed loop step response is plotted below to verify the validity of the design.

code:

**C = 46*(s+3);**

**% Plot the step response**

figure;

step(feedback(C*G,1));

from the above figure it is observed that the closed loop system meets the design requirements.

Root Locus Imaginary Axis (seconds) -30 -20 -10 Real Axis (seconds)

- 0 x Control and Estimation Tools Manager Edit Help File Architecture Compensator Editor Graphical Tuning Analysis Plots Automated Tuning Workspace SSO Design Task #L Design History Compensator Pole/Zero Parameter Edit Selected Dynamics Dynamics Type Location Damping Frequency Select a single row to edit values Right-click to add or delete poles/zeros Show Architecture Store Design Help

SISO Design for SISO Design Task File Edit View Designs Analysis Tools Window Help Root Locus Editor for Open Loop 1 (OL1) Open-Loop Bode Editor for Open Loop 1 (OL1) 30 - -50 -150 G.M.: 47.6 dB Freg: 4.47 rad/s Stable loop -2004 -90 F -135 -180 -I----- ------- -30 L1 . -30 -225 P.M.: 88.3 deg Freq: 0.05 rad/s 10² 102 Frequency (rad/s) -270 -20 -10 Real Axis 0 10 Deleted Poles/Zeros.

- O X SISO Design for SISO Design Task Edit View Designs Analysis File Tools Window Help Root Locus Editor for Open Loop 1 (OL1) Open-Loop Bode Editor for Open Loop 1 (OL1) 30 - 0 -50 O New Design... - X Design requirement type: Settling time Design requirement parameters Settling time (sec) < OK Cancel -200 2.5000 БdB 17 rad/s Help -90 -180 -1 .- -225 P.M.: 88.3 deg Freq: 0.05 rad/s J-270 L 102 Frequency (rad/s) -30 LU . -30 -20 o -10 Real Axis 10 Deleted Poles/Zeros.

SISO Design for SISO Design Task Edit View Designs Analysis File Tools Window Help Root Locus Editor for Open Loop 1 (OL1) Open-Loop Bode Editor for Open Loop 1 (OL1) New Design... - O X Design requirement type: Damping ratio Design requirement parameters Damping ratio > 0.2500 OK Cancel Help -180 .J.-.-.-. -.- -225 P.M.: 88.3 deg Freq: 0.05 radis 20 102 102 Frequency (radis) -270 -40 -30 -20 -10 Real Axis 0 10 Deleted Poles/Zeros.

- O X SISO Design for SISO Design Task File Edit View Designs Analysis Tools Window Help Root Locus Editor for Open Loop 1 (OL1) Open-Loop Bode Editor for Open Loop 1 (OL1) 30 . 107 G.M.: 47.6 dB Freq: 4.47 radis Stable loop -1801 .

- -30 LI -40 -30 P.M.: 88.3 deg Freq: 0.05 radis -270 20 102 Frequency (radis) -20 -10 Real Axis 0 10 104 Deleted Poles/Zeros.

X - 0 SISO Design for SISO Design Task File Edit View Designs Analysis Control and Estimation Tools Manager File Edit Help Tools Window Help Architecture Compensator Editor Graphical Tuning Analysis Plots Automated Tuning Root Locus Editor for Open Loop 1 (OL1) Open-Loop Bode Editor for Open Loop 1 (OL1) Workspace SISO Design Task ce Design History Compensator = 1 (1+ 0.335) Pole/Zero Parameter Edit Selected Dynamics Dynamics Type Real Zero Damping Frequency Location -3 100 G.M: Int -100 Freq. Inf Stable loop -120 Location - 3 -135 Right-click to add or delete poles/zeros P.M.: 89.2 deg Freq: 0.05 radis -15 L -10 -180 L Show Architecture Store Design Help -8 -6 -4 Real Axis - 2 0 102 100 102 Frequency (radis) Edited Zero.

Step Response System: untitled1 Peak amplitude: 1.14 Overshoot (%): 14.3 At time (seconds): 0.625 1.2 System: untitled1 Settling Time (seconds): 1.1 :=: 1 — - Amplitude — - — - — - — - - - - - 0 0.2 0.4 0.6 12 1.4 1.6 1.8 0.8 1 S Time (seconds)

.