Control Theory: Example 3 – P-only control and offset

introduction

I want to see exactly how we get offset under P-only control, and how PI control eliminates the offset. I’m going to use Example 3 again… I’m going to look at P and PI control… and I’m going to use the Tyreus-Luyben (“T-L”) tuning rules, which we’ve seen before.

When I started this, I was wondering about two things:

  • Is the control effort nonzero when we have offset?
  • We don’t always have offset under P-only control, do we?

I can’t say I’ve become an expert in offset, but I’m a little more comfortable with it. Now what I’d like to know is why the control effort goes to zero when we do not have offset – but that’s a question still looking for an answer.

Let me tell you up front what we will find:

  • With P-only control, we may have offset: the output will not tend to the set point.
  • In that case, the use of PI-control will eliminate offset.
  • But if our plant (G) has a pole of any order at the origin, then P-only control does not lead to offset.
  • In that case, you could imagine that the plant itself includes integral control.

Read the rest of this entry »

Control Theory – Example 3: PI, PD, and PID

There’s something I forgot to do when I looked at PID tuning: I meant to look at the Bode plots for the controllers, literally to see what they do individually. In addition, I’m going to mention real derivative control; I’ve long known that the simple PID includes “ideal” derivative control, but I only just realized just how unrealistic it is.

It’s probably just as well that this end up in a separate post.

Let’s just dive in to Bode plots.

PID with Ziegler-Nichols rules

Recall our plant… first the definition, then the resulting transfer function.

con 1 21 1

We found, by looking at the gain margin for the open loop Bode plot of the plant that the ultimate gain and ultimate period were 10 and 2 \pi\ :

con 1 21 2
Read the rest of this entry »

Control Theory: Example 3 – Ziegler-Nichols and Tyreus-Luyben Tuning Rules

Edit 21 Jan 2013: added “Example 3” to the title.

Introduction

I’m going to jump right in and imagine that we have a known plant which we wish to control using P, PI, or PID. I’m going to assume that you have some idea what those are. We’ve seen proportional (P) control, where the control signal is proportional to the error. Integral control has a signal which is proportional to the integral of the error, and derivative control a signal which is proportional to the rate of change (the derivative) of the error. Proportional control is always used in conjunction with integral, hence PI. Although derivative control can be used with only proportional, in process control we generally use both integral and proportional with it, hence PID. We’ll talk more about them in subsequent posts, but for now I want to show you two ways to get the required parameters. They may not always be very good values, but they’ll be better than in the ballpark. At the very least, they are good starting values for further investigation.

Oh, I am aware that Mathematica® version 9 has new capabilities for tuning controllers – but let me write about what I know, using version 8.

My plant is a 3rd-order transfer function… as usual, rules are a convenient way to specify things:

con 1 14 1
Read the rest of this entry »

Control Theory – Example 2

Review

Let us recall Example 1. Carstens’ final solution was to take K =.032, so that the plant and the parameters were… and the open loop transfer function was:

con 12 17 1

The corner frequency (the breakpont) is still 4 rad/sec. Here’s the open-loop Bode plot.
Read the rest of this entry »

Control Theory: Example 1 part 2

review: K = 1

Let us resume Example 1. We started with the following transfer function, for which I arbitrarily assumed K = 1 and that the given factor of 100 was part of the plant G. There are two poles at -4, and 0.

… which had the following open loop Bode plot
Read the rest of this entry »

Control Theory – Example 1 P-only control

Introduction

Everyone under the sun seems to have their own way of organizing control theory. I may very well end up – I hope I end up – with a few different conceptual approaches for myself. But to begin with, I’m going to just start with examples, so that I’ve got a lot of material to try organizing. If you’re new to control theory, my beginning may seem rather chaotic. Sorry.

It is also my intention to stay with classical control theory for quite a while… I’ll move to state space after I’m comfortable with SISO – single input, single output – and the pre-state-space methodologies.

This first example does one positive thing: it illustrates the effect of proportional control.

It also does a few things that are not quite positive: that is, it raises a few questions. I’m more than a little glad it’s not perfectly straight-forward. Let me not keep secrets:

  • Carstens’ first real design problem, later in the book, suggests that this solution is not an acceptable real-world design.
  • Tuning rules such as Ziegler-Nichols, which require that the system be brought to the edge of instability, cannot be applied.
  • Minimizing the obvious measures of error do not agree with his solution – although his looks pretty standard to me.

My point is not that his solution is incorrect, but that it’s sort of incomplete. It’s a student exercise. Let me rephrase that: I’m delighted to know if the solution to an exercise really is a real-world solution, regardless of whether it is or is not… just so I know which.

Let me start by grabbing a drawing from an earlier post.
Read the rest of this entry »

Control Theory – Simple Bode Plots

Minor edits 10/28/12: replaced “poles -1/tau” by “poles s = -1/tau” and at least one -1/tau by the absolute value of -1/tau.

We’re going to be looking at multiple Bode plots in one image. Despite everything I’ve shown you, it seems impossible to set both the color and the thickness. I believe this is a bug.

Here’s what happens if I try. (This happens to be a second-order system.)

So, we lost the color spec in the phase plots. I’ve tried a few other possibilities, but they don’t work either.
Read the rest of this entry »

Control Theory – Closing the feedback loop

open loop

This example comes from Carstens, pp. 177 and 182. He did not, however, ask us to close the loop – and that’s where it gets extremely interesting. That’s why I’m posting this. And yes, this is the example described in this diary post.

I am, as usual for control theory, using Mathematica version 8… instead of version 7 with the Control System Professional add-on.

We have a transfer function with a linear term (in the denominator) and a double pole at 0. As usual, I write the bare transfer function (called “GK”), because sometimes I need it bare… and then I wrap it into a TransferFunctionModel “tf”, because sometimes I need the Model structure… and, finally, I ask for the poles. The third pole is at -5.

(Why “GK”? In principle GK is the product of a controller K and a system G.)

OK, get the Bode Plot… and extract gain margin and phase margin… and convert phase margin to degrees:
Read the rest of this entry »

Control Theory: Transfer Functions and Output Response

edited: 11/14/2012 to replace “sum” with “product”; search on (edit)
edited: 1/12/2013 to replace “gain margin” with “phase margin”; search on (edit)

Introduction

Let emphasize that we require Mathematica® version 8 for the following. Prior versions required an add-on, Control System Professional. The commands are a little different now.

We’ve seen one example of using Laplace transforms to solve an ordinary differential equation. Frankly, that’s not enough, so if they’re new to you, you’ll need to study up on them.

Now I want to move on and introduce transfer functions. I hope you recall – or that it at least sounds familiar – when I say that Laplace transforms incorporated the initial conditions into the solution. Instead of getting a general solution with unknown constants, we get a specific solution that incorporates all the initial conditions.

Transfer functions are a special case of Laplace transforms – where we set all of the initial conditions to zero. On the other hand, transfer functions are a little more general than Laplace transforms: we use an arbitrary forcing function and arbitrary coefficients in the equation.

What?

Let me show you.
Read the rest of this entry »

Happenings – 24 March (2) Control Theory

My general question in control theory was: should I work thru some ancient classical design problems, as they do, with root-locus, nyquist, Nichols, and bode plots? As a minor issue, I would need to select examples from among a few books. But the design methodology appeared to be: use frequency domain analysis to estimate control system parameter values which would lead to a desirable time-domain response of the system.
It occurred to me that my computer and Mathematica® are powerful enough to show the time-domain response in real time.