## Documentation Center |

On this page… |
---|

Root Locus Design for Electrohydraulic Servomechanism Adding Poles and Zeros to the Compensator |

A common technique for meeting design criteria is root locus design. This approach involves iterating on a design by manipulating the compensator gain, poles, and zeros in the root locus diagram.

As system parameter *k* varies over a continuous
range of values, the root locus diagram shows the trajectories of
the closed-loop poles of the feedback system. Typically, the root
locus method is used to tune the loop gain of a SISO control system
by specifying a designed set of closed-loop pole locations.

Consider, for example, the tracking loop

where *P*(*s*) is the plant, *H*(*s*)
is the sensor dynamics, and *k* is a scalar gain
to be adjusted. The closed-loop poles are the roots of

The root locus technique consists of plotting the closed-loop
pole trajectories in the complex plane as *k* varies.
You can use this plot to identify the gain value associated
with a desired set of closed-loop poles.

The DC motor design example focused on the Bode diagram feature of the SISO Design Tool. Each of the design options available on the Bode diagram side of the tool have a counterpart on the root locus side. To demonstrate these techniques, this example presents an electrohydraulic servomechanism.

The SISO Design Tool's root locus and Bode diagram design tools provide complementary perspectives on the same design issues; each perspective offers insight into the design process. Because the SISO Design Tool shows both root locus and Bode diagrams, you can also choose to combine elements of both perspectives in making your design decisions.

A simple version of an electrohydraulic servomechanism model consists of

A push-pull amplifier (a pair of electromagnets)

A sliding spool in a vessel of high-pressure hydraulic fluid

Valve openings in the vessel to allow for fluid to flow

A central chamber with a piston-driven ram to deliver force to a load

A symmetrical fluid return vessel

This figure shows a schematic of this servomechanism.

**Electrohydraulic Servomechanism**

The force on the spool is proportional to the current in the
electromagnet coil. As the spool moves, the valve opens, allowing
the high-pressure hydraulic fluid to flow through the chamber. The
moving fluid forces the piston to move in the opposite direction of
the spool. *Control System Dynamics,* by R. N.
Clark, (Cambridge University Press, 1996) derives linearized models
for the electromagnetic amplifier, the valve spool dynamics, and the
ram dynamics; it also provides a detailed description of this type
of servomechanism.

If you want to use this servomechanism for position control, you can use the input voltage to the electromagnet to control the ram position. When measurements of the ram position are available, you can use feedback for the ram position control, as shown in the following figure.

**Feedback Control Structure for an Electrohydraulic
Servomechanism**

Your task is to design the compensator, **C(s)**.

If you have not already done so, type

load ltiexamples

to load a collection of linear models that include `Gservo`,
which is a linearized plant transfer function for the electrohydraulic
position control mechanism. Typing `Gservo` at the MATLAB^{®} prompt
opens the servomechanism (plant) transfer function.

Gservo Zero/pole/gain from input "Voltage" to output "Ram position": 40000000 ----------------------------- s (s+250) (s^2 + 40s + 9e004)

For this example, you want to design a controller so that the step response of the closed-loop system meets the following specifications:

The 2% settling time is less than 0.05 second.

The maximum overshoot is less than 5%.

The remainder of this topic discusses how to use the SISO Design Tool to design a controller to meet these specifications.

Open the SISO Design Tool and import the model by typing

sisotool(Gservo)

at the MATLAB prompt. This opens the **SISO
Design Task** node in the Control and Estimation Tools Manager
and the Graphical Tuning window with the servomechanism plant imported.

**Graphical Tuning Window Showing the Root
Locus and Bode Plots for the Electrohydraulic Servomechanism Plant**

Click the Zoom In

icon in the
Graphical Tuning window. Press and hold the mouse's left button and
drag the mouse to select a region for zooming. For this example, reduce
the root locus region to about -500 to 500 in both the *x*-
and *y*-axes. This figure illustrates the zooming
in process.

**Zooming In on a Region in the Root Locus
Plot**

As in the DC motor example, click the **Analysis
Plots** tab to set up loop responses. Select Plot Type `Step` for
Plot 1, then select plot 1 for `Closed-Loop r to y`,
shown as follows.

**Analysis Plots Loop Response Selection**

For more information about the **Analysis
Plots** page, see Analysis Plots in
"Using the SISO Design Tool and LTI Viewer."

Selecting the plot for Closed-Loop r to y opens the associated LTI Viewer.

Your LTI Viewer should look like the following figure.

**LTI Viewer for the Electrohydraulic Servomechanism**

The step response plot shows that the rise time is on the order of 2 seconds, which is much too slow given the system requirements. The following topics describe how to use frequency design techniques in the SISO Design Tool to design a compensator that meets the requirements specified in Design Specifications.

The simplest thing to do is change the compensator gain,
which by default is unity. You can change the gain by entering the
value directly in the **Compensator Editor** page.

The following figure shows this procedure.

**Changing the Compensator Gain in the Root
Locus Plot with the Compensator Editor Page**

Enter the compensator gain in the text box to the right of the equal sign as shown in the previous figure. The Graphical Tuning window automatically replots the graphs with the new gain.

Experiment with different gains and view the closed-loop response in the associated LTI Viewer.

Alternatively, you can change the gain by grabbing the red squares on the root locus plot in the Graphical Tuning window and moving them along the curve.

Change the gain to 20 by editing the text box next to **the equal sign **on the **Compensator
Editor** page. Notice that the locations of the closed-loop
poles on the root locus are recalculated for the new gain.

This figure shows the associated closed-loop step response for the gain of 20.

**Step Response with the Settling Time for
C(s) = 20**

In the LTI Viewer's right-click menu, select **Characteristics** > **Settling Time** to show the settling for this response. This closed-loop
response does not meet the desired settling time requirement (0.05
seconds or less) and exhibits unwanted ringing. Adding Poles and Zeros to the Compensator shows how to design
a compensator so that you meet the required specifications.

You may have noticed that increasing the gain makes the system under-damped. Further increases force the system into instability, so meeting the design requirements with only a gain in the compensator is not possible.

There are three sets of parameters that specify the compensator: poles, zeros, and gain. After you have selected the gain, you can add poles or zeros to the compensator.

You can add complex poles on the **Compensator
Editor** page. Click the **Compensator
Editor** tab, make sure **C** is
selected, and then right click in the **Dynamics** table.
Select **Add Pole/Zero > Complex Pole**.
Use the **Edit Selected Dynamics** group
box to modify pole parameters, as shown in the following figure. For
more about entering pole parameters directly, see Editing Compensator Pole and Zero Locations.

**Adding a Complex Pair of Poles to the Compensator
on the Compensator Editor Page**

You can also add a complex pole pair directly on the root locus
plot using the Graphical Tuning window. Right-click in the root locus
plot and select **Add Pole/Zero > Complex Pole**.
Click in the root locus plot region where you want to add one of the
complex poles.

Complex poles added in this manner are automatically added to
the **Dynamics** table in the **Compensator Editor** page.

After you have added the complex pair of poles, the LTI Viewer response plots change and both the root locus and Bode plots show the new poles.

This figure shows the Graphical Tuning window with the new poles added. For clarity, you may want to zoom out further, as was done here.

**Result of Adding a Complex Pair of Poles
to the Compensator**

You can add zeros in the **Dynamics** table
on the **Compensator Editor** page or
directly on the Root Locus plot in the Graphical Tuning window.

To add the zeros using the **Compensator
Editor** page, click the **Compensator
Editor** tab, make sure **C** is
selected, and then right click in the **Dynamics** table.
Select **Add Pole/Zero > Complex Zero**.
Use the **Edit Selected Dynamics** group
box to modify zero parameters, as shown. For more about entering zero
parameters directly, see Editing Compensator Pole and Zero Locations.

**Adding Complex Zeros to the Compensator
on the Compensator Editor Page**

You can also add complex zeros directly on the root locus plot
using the Graphical Tuning window by right-clicking in the root locus
plot, selecting **Add Pole/Zero > Complex Zero**,
and then clicking in the root locus plot region where you want to
add one of the zeros.

Complex zeros added in this manner are automatically added to
the **Dynamics** table on the **Compensator Editor** page.

After you have added the complex zeros, the LTI Viewer response plots change and both the root locus and Bode plots show the new zeros.

**Electrohydraulic Servomechanism Example
with Complex Zeros Added**

If your step response is unstable, lower the gain by grabbing a red box in the right-side plane and moving it into the left-side plane. In this example, the resulting step response is stable, but it still doesn't meet the design criteria since the 2% settling time is greater than 0.05 second.

As you can see, the compensator design process can involve some trial and error. You can try dragging the compensator poles, compensator zeros, or the closed-loop poles around the root locus until you meet the design criteria.

Editing Compensator Pole and Zero Locations, shows you how
to modify the placement of poles and zeros by specifying their numerical
values on the **Compensator Editor** page.
It also presents a solution that meets the design specifications for
the servomechanism example.

A quick way to change poles and zeros is simply to grab them
with your mouse and move them around the root locus plot region. If
you want to specify precise numerical values, however, you should
use the **Compensator Editor** page in
the **SISO Design Task** node on the
Control and Estimation Tools Manager to change the gain value and
the pole and zero locations of your compensator, as shown.

**Using the Compensator Editor Page to Add,
Delete, and Move Compensator Poles and Zeros**

You can use the **Compensator Editor** page
to

Add compensator poles and zeros.

Delete compensator poles and zeros.

Edit the compensator gain.

Edit the locations of compensator poles and zeros.

To add compensator poles or zeros:

Select the compensator (in this example,

**C**)From the pop-up menu, select

**Add Pole/Zero > Complex Pole**or**Add Pole/Zero > Complex Zero**.Use the

**Edit Selected Dynamics**group box to modify pole or zero parameters.

To delete compensator poles or zeros:

Select the compensator (in this example,

**C**)Select the pole or zero in the

**Dynamics**table that you want to delete.Right-click and select

**Delete Pole/Zero**from the pop-up menu.

To edit compensator gain:

Select the compensator to edit in the list box to the left of the equal sign in the

**Compensator**area.Enter the gain value in the text box to the right of the equal sign in the

**Compensator**area.

To edit pole and zero locations:

Select the pole or zero you want to edit in the

**Dynamics**table.Change current values in the

**Edit Selected Dynamics**group box.

For this example, edit the poles to be at −110 ±
140*i* and the zeros at

−70
± 270*i*. Set the compensator gain to `23.3`.

Your Graphical Tuning window now looks like this.

**Graphical Tuning Window with the Final Values
for the Electrohydraulic Servomechanism Design Example**

To see that this design meets the design requirements, look at the step response of the closed-loop system.

**Closed-Loop Step Response for the Final
Design of the Electrohydraulic Servomechanism Example**

The step response looks good. The settling time is less than 0.05 second, and the overshoot is less than 5%. You have met the design specifications.

The Graphical Tuning window provides design requirements that
can make it easier to meet design specifications. If you want to place,
for example, a pair of complex poles on your diagram at a particular
damping ratio, select **Design Requirements** **>** **New** from
the right-click menu in the root locus graph.

This opens the **New Design Requirement **dialog
box.

Applying damping ratio requirements to the root locus plot results in a pair of shaded rays at the desired slope, as this figure shows.

**Root Locus with 0.707 Damping Ratio Lines**

Try moving the complex pair of poles you added to the design so that they are on the 0.707 damping ratio line. You can experiment with different damping ratios to see the effect on the design.

If you want to change the damping ratio, select **Design Requirements** **>** **Edit** from the right-click menu. This opens
the Edit Design Requirements dialog box.

Specify the new damping ratio requirement in this dialog box.

An alternate way to adjust a requirement is to left-click the requirement itself to select it. Two black squares appear on the requirement when it is selected. You can then drag it with your mouse anywhere in the plot region.

If you want to add a different set of requirements, for example,
a settling time requirement, again select **Design
Requirements** **>** **New** from the right-click menu to open the New
Requirements dialog box and choose **Settling
time** from the pull-down menu. You can have multiple types
of design requirements in one plot, or more than one instance of any
type.

The types of requirements available depend on which view you use for your design. See Design Requirements for a description of all the design requirement options available in the SISO Design Tool.

Was this topic helpful?