53
Designing Classical Controllers

7- Designing Classical Controllers

Embed Size (px)

DESCRIPTION

labview

Citation preview

Page 1: 7- Designing Classical Controllers

Designing Classical Controllers

Page 2: 7- 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.

Page 3: 7- Designing Classical Controllers

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.

Page 4: 7- Designing Classical Controllers

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.

Page 5: 7- Designing Classical Controllers

Root Locus Design Technique

This graph shows the locations of the closed-loop poles. The pole locations are –1, –2, and –3.

Page 6: 7- Designing Classical Controllers

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.

Page 7: 7- Designing Classical Controllers

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.

Page 8: 7- Designing Classical Controllers

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:

Page 9: 7- Designing Classical Controllers

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.

• These plots show the specific locations and shape of key points.

• The number and nature of the controller parameters depends on the topology of the controller.

Page 10: 7- Designing Classical Controllers

Lead Compensator

Page 11: 7- Designing Classical Controllers

Lead Compensator

Page 12: 7- Designing Classical Controllers

Lag Compensator

Page 13: 7- Designing Classical Controllers

Lag Compensator

Page 14: 7- Designing Classical Controllers

Lead Lag Compensator

Page 15: 7- Designing Classical Controllers

Lead Lag Compensator

Page 16: 7- Designing Classical Controllers

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.

Page 17: 7- Designing Classical Controllers
Page 18: 7- Designing Classical Controllers
Page 19: 7- Designing Classical Controllers

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.

• PID controllers combine proportional P, integral I, and derivative Dcompensation.

• Use the CD Construct PID Model VI to construct a PID controller.

• The following equation defines control action for a general PID controller.

Page 20: 7- Designing Classical Controllers

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.

• In this equation, R(t) is the reference input and B(t) is the 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 tableshows the equations for each of these forms.

e(t) = R(t) – B(t)

Page 21: 7- Designing Classical Controllers

PID Controller Forms in the Control Design and Simulation Module

Page 22: 7- Designing Classical Controllers

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.

Page 23: 7- Designing Classical Controllers

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.

Page 24: 7- Designing Classical Controllers

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.

Page 25: 7- Designing Classical Controllers

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.)

Page 26: 7- Designing Classical Controllers
Page 27: 7- Designing Classical Controllers

Example 2

Managing The controller and look for response

Page 28: 7- Designing Classical Controllers

Plant G(s) Alone

Bad in ss value& Rise time

Download the VI

Page 29: 7- Designing Classical Controllers

Adding a Controller & Feebdack

Page 30: 7- Designing Classical Controllers

Example 3

• Suppose we have a simple mass, spring, and damper problem.

Page 31: 7- Designing Classical Controllers

Example 3• The modeling equation of this system is:

• Taking the Laplace transform of the modeling equation, we get:

• The transfer function between the displacement X(s) and the input F(s) then becomes:

Page 32: 7- Designing Classical Controllers

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 steady-state error.

Page 33: 7- Designing Classical Controllers

Open-Loop Step Response of Example 3

• Let's first view theopen-loop step response.

Page 34: 7- Designing Classical Controllers

Open-Loop Step Response of Example 3

Page 35: 7- Designing Classical Controllers

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.

Page 36: 7- Designing Classical Controllers

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:

Page 37: 7- Designing Classical Controllers

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.

Page 38: 7- Designing Classical Controllers

Applying Proportional Control

Page 39: 7- Designing Classical Controllers

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.

Page 40: 7- Designing Classical Controllers

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.

Page 41: 7- Designing Classical Controllers

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.

Page 42: 7- Designing Classical Controllers

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.

Page 43: 7- Designing Classical Controllers

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

Page 44: 7- Designing Classical Controllers

Result of Applying Proportional-Integral-Derivative Control

Now, we have obtained a closed-loop system with no overshoot, fast rise time, and no steady-stateerror.

Page 45: 7- Designing Classical Controllers

Example 4The 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):

Page 46: 7- Designing Classical Controllers
Page 47: 7- Designing Classical Controllers

1

2

3

4

5 67

8

Or use CD Initial Response

Page 48: 7- Designing Classical Controllers

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.

Page 49: 7- Designing Classical Controllers

– 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).

Page 50: 7- Designing Classical Controllers
Page 51: 7- Designing Classical Controllers
Page 52: 7- Designing Classical Controllers

Designing PID Controllers Analytically

• Finding the proper values for the PID gains is a process known as tuning the PID controller.

• PID tuning typically is an ad-hoc process that involves trial 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.

Page 53: 7- Designing Classical Controllers

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.

• These models must be single-input single-output (SISO) and 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.