Вы находитесь на странице: 1из 53

Designing Classical

Controllers
Designing Classical Controllers
• Classical control design involves creating controllers based on
the input-output behavior of a system.

• In classical control design, you select one or more specific

gain values to achieve one or more control objectives.

• The first step in designing a controller is identifying a control

objective. For example, you might focus on the rise time,
overshoot, and damping ratio of a controller model.

• Based on this objective, you specify the location of the poles

of the system. You then select an appropriate set of
parameters, such as the gain, to satisfy the stated objectives.
Root Locus Design Technique
• Root locus is a technique that shows how the roots of a system
vary with respect to the gain K.

• Taking into account a control objective, you decide on the

locations of the roots of the system.

• From the locations of these roots, you infer the optimal value
of K.

• You then can use the gain K to design a controller for a single-
input single-output (SISO) system.

• Use the CD Root Locus VI to apply the root locus technique

to a system.
Root Locus Design Technique
• You can use the root locus technique to design SISO systems
by analyzing the variation of closed-loop pole positions for all
possible changes in a controller variable.

• The closed-loop zeros of a system, between any two points in

the control system, are a subset of the open-loop zeros and
poles of the feedback element.

• The root locus plot depicts the path that the roots follow as you
vary the gain.

• You use this relationship to analyze the closed-loop behavior

in terms of the value of a variable in the feedback transfer
function.
Root Locus Design Technique

This graph shows the locations of the closed-loop poles. The pole locations
are –1, –2, and –3.
Root Locus Design Technique
• For example, consider a system with the
following open-loop transfer function:

• If a simple proportional feedback controller

controls this system, the following equation
describes the characteristic equation.
Root Locus Design Technique
• You can use root locus design to synthesize a variety
of different controller configurations, including the
following types:

• Lead compensator: Lowers the rise time and decreases the

transient overshoot.
• Lag compensator: Improves the steady-state accuracy of the
system.
• Notch compensator: Achieves stability in the system with
lightly damped flexible modes. This compensator adds a zero
near the resonance point of the flexible mode.
• proportional-integral-derivative (PID) controller: Forms a
controller using the most common architecture.
Root Locus Design Technique
• The difference in these controller configurations is
the form of the transfer function equations you use to
synthesize the controller.

• Different transfer function models result in different

dynamic characteristics of the controlled system.

• For example, consider a controller transfer function

model D(s) defined by the form of the following
equation:
Root Locus Design Technique
• If z < p, this transfer function results in a lead compensator.
You typically place this lead compensator in series with the
plant H(s) in the feed-forward path. If z > p, this transfer
function results in a lag compensator.

• You also can use other frequency domain tools, such as Bode,
Nyquist, and Nichols plots, to design a system.

points.

• The number and nature of the controller parameters depends

on the topology of the controller.
Lag Compensator
Lag Compensator
Create Controller Using the Pole
Placement Technique
• This example demonstrates how to create a
controller using the pole placement technique.
Because the model has two outputs, you
cannot use the Ackermann technique.
Proportional-Integral-Derivative
Controller Architecture
• The PID controller, also known as the three-term controller, is the most
widely-used controller architecture.

• PID controllers compare the output against the reference input and
initiate the appropriate corrective action.

compensation.

• The following equation defines control action for a general PID

controller.
Proportional-Integral-Derivative
Controller Architecture
• In this equation, Kp, is the gain, τd is the derivative time
constant, and τI is the integral time constant. The following
equation defines the error.
e(t) = R(t) – B(t)

output.

• The Control Design and Simulation Module supports the PID

controller in the following four forms: PID Academic, PID
Parallel, PID Parallel Discrete, and PID Serial. Following table
shows the equations for each of these forms.
PID Controller Forms in the Control
Design and Simulation Module
PID Controller Forms in the Control
Design and Simulation Module
• A proportional controller (Kp) will have the effect of reducing the
rise time and will reduce but never eliminate the steady-state error.

• An integral control (Ki) will have the effect of eliminating the

steady-state error, but it may make the transient response worse.

• A derivative control (Kd) will have the effect of increasing the

stability of the system, reducing the overshoot, and improving the
transient response.

• Effects of each of controllers Kp, Kd, and Ki on a closed-loop

system are summarized in the table shown below.
PID Controller Forms in the Control
Design and Simulation Module

Table: Effect of PID Controllers on Closed-Loop System

Note that these correlations may not be exactly accurate, because Kp, Ki, and Kd are
dependent on each other. In fact, changing one of these variables can change the effect of the
other two. For this reason, the table should only be used as a reference when you are
determining the values for Kp, Ki and Kc.
PID Controller Forms
• Each PID form produces the same result but incorporates
information in a different manner.

• For example, you can adjust each term independently using the
PID Parallel form.

• The PID form you use depends on the design decisions you
make, such as how you need to manipulate the output of the
controller.

• Use the polymorphic VI selector of the CD Construct PID

Model VI to implement a PID controller using one of these
four PID forms.
Example 1
• The VI shown below shows how to create and
display an PID Academic controller (which is
a standard parallel PID controller). (The
derivative time is set to zero, so the controller
is actually a PI controller.)
Example 2
Managing The controller and look for response
Plant G(s) Alone

Bad in ss value
& Rise time
Adding a Controller & Feebdack
Example 3
• Suppose we have a simple mass, spring, and
damper problem.
Example 3
• The modeling equation of this system is:

get:

• The transfer function between the displacement X(s) and the

input F(s) then becomes:
Example 3
• Let M = 1kg, b = 10 N.s/m, k = 20 N/m, and
F(s) = 1. If we use these values in the above
transfer function, the result is:

• The goal of this problem is to show you how

each of Kp, Ki and Kd contributes to obtain
fast rise time, minimum overshoot, and no
Open-Loop Step Response of
Example 3
• Let's first view the
open-loop step
response.
Open-Loop Step Response of
Example 3
Open-Loop Step Response of
Example 3
• The DC gain of the plant transfer function is 1/20, so
0.05 is the final value of the output to a unit step
input. This

• corresponds to the steady-state error of 0.95, quite

large indeed. Furthermore, the rise time is about one
second, and the settling time is about 1.5 seconds.
Let's design a controller that will reduce the rise time,
reduce the settling time, and eliminates the steady-
state error.
Applying Proportional Control
• From the table before, we see that the proportional
controller (Kp) reduces the rise time, increases the
overshoot, and reduces the steady-state error.

• The closed-loop transfer function of the above system

with a proportional controller is:
Applying Proportional Control

The graph shows that the proportional controller reduced both the rise time and the steady-state
error, increased the overshoot, and decreased the settling time by small amount.
Applying Proportional Control
Applying Proportional-Derivative
Control
• Now, let's take a look at a PD control. From the table
in Figure 3, we see that the derivative controller (Kd)
reduces both the overshoot and the settling time. The
closed-loop transfer function of the given system with
a PD controller is:

• Let Kp equal 300 as before and let Kd equal 10.

Result of Applying Proportional-Derivative
Control

Compare the graph in Figure 10 to the graph in Figure 9. The step response plot shows that the
derivative controller reduced both the overshoot and the settling time, and had a small effect on
the rise time and the steady-state error.
Applying Proportional-Integral
Control
• Before going into a PID control, let's take a look at a
PI control. From the table, we see that an integral
controller (Ki) decreases the rise time, increases both
the overshoot and the settling time, and eliminates the
steady-state error. For the given system, the closed-
loop transfer function with a PI control is:

• Let's reduce the Kp to 30, and let Ki equal 70.

Result of Applying Proportional-Integral
Control

We have reduced the proportional gain (Kp) because the integral controller also reduces the
rise time and increases the overshoot as the proportional controller does (double effect).
The above response shows that the integral controller eliminated the steady-state error.
Applying Proportional-Integral-
Derivative Control
• Now, let's take a look at a PID controller. The
closed-loop transfer function of the given
system with a PID controller is:

• After several trial and error runs, the gains

Kp=350, Ki=300, and Kd= 50 provided the
desired response
Result of Applying Proportional-Integral-Derivative
Control

Now, we have obtained a closed-loop system with no overshoot, fast rise time, and no steady-state
error.
Example 4
The VI shown below shows how to analyze and
simulate a feedback control system.

The block diagram code is put inside a while loop

with cycle time 100ms to make the program run
continuously.

The controller is a PID Academic controller (which

has parallel form) with the following transfer
function, Hc(s):
4

5 6
7

1
3

2 8

Example 5

A common control system consists of a controller model and a plant

model. The output of the controller is sent to the plant. In a closed loop
system, the output of the plant is subtracted from the input (set point) of
the system, producing an error value, which acts as the controller input.
This is known as feedback.
– Plant (Motor) Model
• The plant model is a mathematical representation of the system in
question. In this case, the plant is a motor.
• The input to the motor is voltage (Vm), and the output from the
motor is angular velocity in radians per second (ωm).
– Controller Model: PID
• The controller model contains a mathematical algorithm that
supplies an input to the plant model based on the error.
• PID (Proportional, Integral, Derivative) is a common algorithm
used in control systems.
• The input to the PID controller is error (setpoint – output) in
radians (θ). The output from the PID controller is voltage (Vm).
– Integrator: 1/s
• The integrator is used to convert the output from the motor plant
(angular velocity) to have units consistent with the setpoint of the
system (angular position).
Designing PID Controllers
Analytically
• Finding the proper values for the PID gains is a process known
as tuning the PID controller.

and error.

• However, the Control Design and Simulation Module provides

the CD Design PID for Discrete Systems VI.

• You can use this VI to find tuples of stable PID gain values
automatically for a given model or family of models.
Designing PID Controllers
Analytically
• The input to this VI is one or more discrete system models in
transfer function, zero-pole-gain, or state-space form.

discrete.

• This VI returns the following information:

– The boundary between the set of stable PID gain values and all
unstable gain values.
– Tuples of PID gain values within this boundary. Each tuple guarantees
closed-loop stability.
– The centroid, or average, of these tuples.