0% found this document useful (0 votes)
5 views19 pages

Lec 27

The lecture discusses the design and components of a PID (Proportional Integral Derivative) controller, focusing on gain shaping components such as the integrator, proportional gain, and derivative component. It explains how these components interact with frequency and their impact on system performance, including the importance of managing noise and dynamic gain limitations. The session also includes practical simulations using MATLAB to visualize the frequency response of these components.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views19 pages

Lec 27

The lecture discusses the design and components of a PID (Proportional Integral Derivative) controller, focusing on gain shaping components such as the integrator, proportional gain, and derivative component. It explains how these components interact with frequency and their impact on system performance, including the importance of managing noise and dynamic gain limitations. The session also includes practical simulations using MATLAB to visualize the frequency response of these components.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Switched Mode Power Conversion

Prof. L. Umanand
Department of Electronics System Engineering
Indian Institute of Science, Bangalore

Lecture - 27
PID Controller - I

Today, we continue from where we left off. In the last class, if you recall. We had been
discussing, studying about the different gain shaping components. Recall that the plant is
sensitive to noise. And we saw that the gain, the controller gain that is interposed in
between the error and the plant input needs to be shaped with respect to frequency. And
we saw three major, three important gain shaping components, one was the integrator. The
integrator which falls at the rate of 20 dB per decade, meaning the gain decreases a 20 dB
for every decade change in ω, frequency. And we saw just the plane gain, the plane gain
does not change with frequency.

And the third component was the derivative component, as that pure derivative does not
exist. You need to have a derivative in combination with a, a lag or a pole. And we saw
that the gain increases, at the rate of 20 dB per decade, plus 20 dB per decade. And after
the pole, the poles - 20 dB per decade and the derivative plus 20 dB per decade cancel and
it flattens out. So, essentially we had these 3 gain shaping components. And that is what
we will be integrating and using to form, what is called as the PID controller or the
Proportional Integral Derivative controller. So that is the essentially, what we will be
discussing in this class, the PID controller.
(Refer Slide Time: 00:48)

Or, how we go about trying to design this controller, which is consisting of one
proportional component, it is a co-proportional gain component, normally called Kp, this
gain is called Kp. There is another component i or the integrator component. And this has
a gain Ki / s. And here S 1, S suggest the Laplace pole at S is equal to 0 in the S plane.
And then we have the derivative component. We cannot make a pure derivative. So, you
𝐾 𝑠
𝑑 𝐾 𝑠𝑑
have a gain, which is of this form. We will call 𝑠+𝑎 . Or you can also write it as 𝜏𝑠+𝑎 taking

out a common. So, you could express it in this fashion, or this fashion. In both the cases,
you have a 0 at S equal to 0. And a pole at S equal to - a or pole at S equal to - 1/𝜏,
depending upon which form you are going to use. Now, these are the 3 component that we
studied and these 3 component.
(Refer Slide Time: 05:10)

The proportional, proportional or the Kp gain, the integrator Ki / s and the derivative,
𝐾 𝑠
𝑑
which is 𝑠+𝑎 . Now, these are the 3 components and, we saw that with respect to ω, these 3

vary in a certain manner. The y axis, the x axis is ω frequency in radians per second or
Hertz and the y axis is the gain in dB. And we saw in the last class. In the last, the dB gain
𝑜𝑢𝑡𝑝𝑢𝑡
is given as 20 log10 . Or log10 of the transfer function or the gain. So, in, in the case
𝑖𝑛𝑝𝑢𝑡
𝐾
of; in the case of the proportional, this will be 20 log10 Kp this will be 20log10 𝜔𝑖 .. And
𝑑 𝐾 𝜔
this would be 20log10 𝜔+𝑎 ..

So, it will be of this form we take the absolute values and plot the gain. There is also
another factor here that will vary with the frequency, which is the phase relationship
between the input and output. And that is called the phase plot which is also normally
plotted with respect to frequency ω. However for the moment, let us not take too many
things, confuse ourselves with too many things. We will just look at the gain, gain plot in
dB. And we saw that in the case of proportional, it is a constant with respect to frequency.
And in the case of the integrator its start fall; its start falling at the rate of 20 dB per decade.

So, it has a negative slope 20 dB per decade for every 10 times change in ω that is the
slope. And in the case of the derivative there is the rise at 20 dB per decade, up to the point,
where you have ω equal to a, then its flattens out. So, this is plus 20 dB per decade. So,
this are somethings that you need to have in your mind, while you are designing the
controller. And we will use all three of this to manage the overall shape of the gain. Not
that, if one is talking of the x axis of the 0 in dB. If this is 0 dB then at this point, when the
integrator gain crosses this 0 line, 0 dB line. We can say that the integrator gain is unity,
because when will this be 0, this will be the 0 when this portion is 1 unity log10 1 will be
0. And that is why this point is called the unity gain point. Now, these 3 will be combined
to form the controller.

(Refer Slide Time: 11:13)

So, we have here the plant. Now, the plant could be anything, it could be DC-DC converter,
it could be the buck converter, it could be the boost converter, could be an isolated
converter, or it could be the any other physical plant, where in there is a power input and
a power output and is the power flow is to be controlled. It has the control input u and an
output to be controlled y, which is actually linked as a sensed; as a sensed parameter of the
actual power variable. So, in our case, in the DC-DC converter case, the u is nothing but
duty cycle, duty ratio d output many cases is v0. And this is what we want to a control and
this is passed the reference and the feedback are compared.

Reference and the feedback are compared to obtain the error e. And this is passed through
the controller to get a control voltage vc. And this control voltage vc will appropriately get
transform as a compatible input signal u, according to the type of the plant. Now, this
controller we saw has a gain dynamic gain, which is vc / e. Now, this dynamic gain, we
saw, cannot be infinite, though we desire that it should be infinite, because we want to
have error equal to 0. But if we have an infinite gain, we saw in the last class as we
discussed.

There are 2 issues; one is the issue of noise, noise which is present in all electronic circuits,
which will also get amplify, amplified and it will swamp the plant input. And the second
issue is that of limited supply voltage at u. So, the there are limits on u, if it is a duty cycle
the limits are between 0 and 1 or 0 and 0.5, depending on the nature of the converter. There
could be a limits on vc itself, the supply voltage, whatever is powering up the controller
circuits, it could be 0 to 5 volts, 0 to 3.3 volts, it could be - 15 to plus 15 volts or - 12 to
plus 12 volts, depending upon the nature of the circuits and the power supply is being
generated. Now, because of this 2 limitations, we saw that dynamic gain, this dynamic
gain should, it is not a constant it should vary with frequency and that is the reason.

(Refer Slide Time: 15:43)

We have been trying to use the various components to get a variable gain K as a variable
gain controller. Now, the gain has to vary with respect to frequency, the gain in dB 20 log
the actual gain. Now, in most, most physical systems they have a natural gain versus
frequency, which is like a low pass filter. The gains automatically start reducing and
becoming, attenuating after particular frequency.

So, this is something like a low pass character, where the lower frequency gains, lower
frequency have a higher gains pass through the plants. And the higher frequency
components get attenuated. So, most physical system will have a character like this, what
will differ is the slopes. So, if it is third order system, you will have a - 60 dB per decade
slope. If it is first order system as we saw in integrator. It is the - 20 dB per decade slope,
as a second order system - 40 dB per decade slope so on. So, these slopes indicate the rate
at which the attenuation is going to occur at higher frequencies. Now, this plant frequency;
this plant frequency response, we would like to modify by introducing the P and I and the
D.

(Refer Slide Time: 18:27)

Just to make things clearer. It is good for you to simulate and get a feel for the ω versus
dB curve. We saw here that it is 20 log10 , whatever the gain k. The x axis which is ω
frequency, the x axis is not linearly distributed or linearly spaced. The ticks, the tick mark
are logarithmically distributed. So, this is the, the points are distributed in a log scale. So,
that it compresses the x axis. And you will see, you will; you will see the linear curves as
would you normally see in bode plots and such other frequency plots in the literature. Let
us switch over to the simulation tool. And get a feel for the various frequency plots.
(Refer Slide Time: 20:00)

Now here, I have on the computer MATLAB. You could also use octave, the open source
clone of the commercial MATLAB. Now, open MATLAB you will get a command
window like this. Now, let us say we first make an integrator. Now, the integrator has an
numerator polynomial, and a denominator polynomial. Now, how does that come about?
So, if you look here.

(Refer Slide Time: 21:10)

An integrator is written in the Laplace domain as 1 /S. Now, this 1 / S has this numerator
polynomial and the denominator polynomial, which is actually can also be written as
1𝑠0
0. So, this can be return as in the matrix form. Let us say only the coefficients of
1𝑠1 +0𝑠0

the powers of S would be 1 and here the coefficients of the power of S, 0 and 1. So, if you
write in MATLAB vector like this 1, 0. It implies that this is the 0th power of S, the first
power 𝑠1 and so on.

This is 𝑠 0 . So, 1 / S in MATLAB is written as 1 by this 1, 0 vector. This is basically,


implies it is a integrator. So, let us say you have this integrator. Let us; let us; let us now
define ω. Now, ω =𝑙𝑜𝑔𝑠𝑝𝑎𝑐𝑒(−3,3). Now, this is; this is actually ω given as 10 - 3 to the
10 3. So, if, if you define ω is equal to 𝑙𝑜𝑔𝑠𝑝𝑎𝑐𝑒(−3,3) in MATLAB, it means that 10 - 3
to the 10 3. The x axis is distributed from this starting value to this ending value.

Now, let us obtain the frequency response, g equals frequency response of the numerator
polynomial that we have defined denominator polynomial, and the ω that we have defined.
Now that would now be calculated input into the variable g. And you can plot using
semilog x, the x axis can be logarithmically distributed use semilog instead of plot w, then
20 log10 , absolute value of the calculated g. You can give a grid, you can give x label as
ω. You can give y label as dB gain.

(Refer Slide Time: 26:02)

So, you see here, the plotted value. Note that, we have plotted only starting from 10 - 3. We
cannot go down to ω is equal to 0, because that would be 10 to the power of - infinite
value. And at that value, the value of the integrator as a gain would be infinite. So, we have
taken some small value 1000 frequency. And from there on you see there dB is going down
at 20 dB per decade. Not this value let us say, you have, let us say we mark this point. This
is at 40 and this is at the 10 - 2, 1 decade mode 10 - 1. If you mark, you will see that it would
have traverse 20 dB down in the vertical scale. So, that is what we mean by saying - 20 dB
per decade.

So, this is the frequency plot of the frequency response plot of the integrator which keeps
on going on down at - 20 dB per decade. Let us now see, how derivative would look like.
The proportional part is always a constant. And if you want to do a proportional, it is the
numerator polynomial would be 1 or just Kp, and define Kp. Kp is equal to 1, numerator
polynomial is Kp, denominator polynomial would be 1, let us say. So, this would be this
numerator and denominator would form your proportional, transfer function of the
proportional system. Now, let us look at the derivative, maybe we could go through with
this. Get the g for this proportional system and plot.

(Refer Slide Time: 29:21)

The response, you see this is gain of 1, numerator is 1, denominator is 1, gain is log(gain)
dB gain would be 0. This is the proportional system, if you keep changing the value of k.
(Refer Slide Time: 29:41)

Let say Kp is equal to 100. Numerator is set to that value, recalculate the frequency
response. And re-plot the response 100, 20 log 100, log 100 is 2, 20 * 2= 40 dB is the, and
it is constant, does not vary with frequency. So, that is the proportional part for you
component. Now, coming to the derivative component.

(Refer Slide Time: 30:39)

Now, the derivative component has a numerator polynomial. And the numerator
polynomial is S. So therefore, you have the 𝑠1 , coefficient is 1, 𝑠 0 coefficient is 0. So, this
would be the numerator polynomial. The denominator polynomial is s + a. So, let us say
do you have 1 and 10, a is 10. So, this is the numerator and denominator polynomial; ω
again log space. Let us plot for the same range and get the frequency response of the
derivative system. And plot semilog x 20 log10 absolute value of the calculated gain. And
your grid x label is ω, y label is dB gain.

(Refer Slide Time: 32:11)

So, you see, it is having a positive gain 20 dB per decade. You can always measure, take
any dB point. Let say this is 1 point here, where the curser is pointing at 10 - 2. This is

10 - 2, then corresponding next decade 10 - 1. If you see there is a vertical translation of 20


dB - 60 to 40. So, you have a plus 20 dB per decade at 10, at ω is equal to 10, you see the
flattening out. It becomes flat. So, this is actually, the derivative portion S. So, the
derivative portion in a pure in derivative, derivative a pure differentiator would keep on
continuing at plus 20 dB per decade and so on. But you cannot have a practical or physical
system. Therefore, there will be a pole which will occur sometime later, which will flatten
it out. You cannot have a ever increasing gain. So, this is the derivative part. So, let us use
these 3 components in some fashion.
(Refer Slide Time: 33:59)

Consider, let us draw 2 graphs here. This is 1 graph, which is with respect to ω and this is
the dB gain. Now, another graph I am going to draw. I will just put amplitude as the y axis
and the x axis is progressing from right to left. So, imagine that we have x axis progressing
right to left. And it is not ω, it is time. So, assume that the time is progressing. You are
going to write that time scale progressing from right to left, starting from 0. Now, to the
system that we had been discussing; to this system that we have been discussing. Let us
give a reference, now this can be a step input. So, we give a step input to the reference
here. And observe the output, the measured output fb here. So, this is given as input. And
this is observed. And we keeping modification to controller. Let us see what happens.
Now, you look at this, this is the reason why we have put the axis in this fashion.

Consider the frequency plot. In this zone, we are saying ω is close to 0, means DC means
steady state. And as you progress in this ω axis, it is higher and higher frequency. And
these are higher frequency zones, or the transient states. You could have a kind of a
understanding of the dynamics. If you put the time scale going from a right to left. So, if
you have an input. Let me draw, that if you have an input, which changes dynamically at
this point. And then on steady state, becomes this is unit step.

So, take for example, this case from 0, at this point there is the disturbance, there is a step
change. So, this contains lot of high frequency component. This map directly here to the
high frequency component. And gradually there is a transition to more stable DC. This is
where you have the DC. So, you could get kind of an inside into the system on the
transition, and the behaviour of how the gain also changes dynamically. So, let us visualize
it like this, this is just a visualization process.

Now, now let us say what is it that we want, we want error e equal to 0. Now, if we want
error e equal to 0, the controller gain, controller gain K, which is dynamically varying
should tend to very high value, would towards infinity. Only then we will have error is
equal to 0. Because you, you saw that error is equal to vc / K, the control voltage by K. So
quite evidently in the steady state and we saw that if the, we discussed that if K gain K is
infinite in all frequency bands even the noise get amplified. So, we do not want the gain K
to be infinite in the noise predominant zones.

So, if you look at is, let us make as split like that. This is low frequency or the LF zone.
This is the high frequency or the HF zone. And noise is per dominant in the HF zone. So,
in all equipment you will see the noise more predominant in HF zone. So, actually one
does not mind having a very high controller gain in the LF zone or more towards DC,
towards DC or steady state. So, you see here also, you have the DC or the steady state.
And this is where the high frequency happens. So, there is a kind of 1 to 1 mapping and
get better insight.

So, let us have high gain at DC or steady state. So, if we have high gain at DC, then at least
we are ensured that at steady state error is 0. At steady state the gain infinite and therefore,
the error is 0. So, let us make use of an integrator, the character of the integrator is you
saw. It has a very high DC gain, infinite DC gain. And then keeps falling keeps on falling
at - 20 dB per decade, at - 20 dB per decade. So, that is the character of the integrator.
Now, here so, let us say, that this particular integrator that has been chosen has Ki value
of 1. This is 1 / s. Now for this, let us say for example, you have a time curve which goes
like that Ki is equal to 1. Now, let me just go to the next page.
(Refer Slide Time: 43:33)

Let us say we have the integrator is something like this. It is in block, we have Ki followed
by an integrator, this is 1 / S this is vc, and this is e. So, dB gain wise what does it mean
20 log10 (Ki / S) is nothing but ω, because the real part is 0. So, you have 20 log10 Ki - 20
log10 ω. Now, if Ki were a 1. For Ki is equal to 1, this would be 0 and you are just left with
20 log base 10 ω. This is our - 20 dB per every 10 time change in ω. But for any general
Ki, you have this component 20 log Ki which is constant change with frequency. How
does it reflect? Here you have different parallels all coming of family of infinity. I do not
have place here, but just remember that all these are coming from a family of infinite.
There all parallels and the distance between them is 20 log Ki, the difference on the gain
between the 2. If for example, this is the normal the Ki is equal to 1.

And this is has some value of, then you have 20 log Ki is the difference in height and it is
parallel. What is the effect that we achieve by this? Look at the bandwidth, where its cuts
the ω axis. You see a higher value of K cuts much further in the ω axis. It has the higher
bandwidth. This, this one has lower bandwidth, still further lower bandwidth, which
basically means as starts going down Ki is reducing. And what is the effect here. You will
see that, you will have curves going like that. Or curve going like that. So, here you will
see the Ki here is less than 1. Less than 1 means a slower bandwidth. So, lower bandwidth
and therefore, it is slower. And if you take this here Ki is greater than 1, which would mean
much beyond removed here, if this is 1. So, you will have a much greater bandwidth and
therefore, you will see it rise faster. So, this effect is basically, what we want when we
designed this scale factor Ki. So, this effect, in fact you can also see, in this simulation.
Let us take up for example.

(Refer Slide Time: 48:53)

Some systems let me demonstrate to you with a plant. Let us say following plant, which is
0.1 s + 1, 0.4 s + 1. This is the third order system 1.2 s +1. This is the plant, this is some
arbitrary third order system, it is not a converter just. So, that we get our concepts right Ki
/ s. And reference feedback. So, let us say, we have a system like this. Now, we can call
this is as the controller which it is let us nc numerator polynomial by dc denominator
polynomial. And we will call the plant as np numerator polynomial of the plant
denominator polynomial of the plant, like this.

How do we write this in MATLAB? It will be Ki like that and it will be 1 0. How do we
write this, np will be 2.2, dp will be written as. You can multiply then and put it together.
But there is another easier method. You need not multiply, you can multiply polynomials,
by convolve. Let me convolve, 0.1 and 1. This is one polynomial, convolved with 0.4 with
this. So, these 2 are multiplied to gather by this convolution. Now, the result of this, you
can convolve with the other polynomial by using another convolve. So, this would give
the denominator polynomial. So, you could do it with any order of polynomial. So, let us
try to put this thing together.
(Refer Slide Time: 52:20)

So, let us say numerator polynomial. The numerator polynomial is. Let us define, Ki is
equal to 1. Numerator polynomial is Ki, denominator polynomial is 1, 0. And let us have
ω log space. Now, let us see the plot, subplot on the same graph window, semi log x ω
20log10 , absolute value. We shall first obtain the frequency response of the numerator
polynomial, denominator polynomial and ω as defined above. Then plot semi log x ω 20
log10 , absolute value of the calculated gc. And let us hold the graph, give grid and x label
as ω and hold the graph.
(Refer Slide Time: 54:28)

So, this is the integrator with Ki is equal to 1. Now, if you want to see the time response.
Let us say the feedback system. The numerator polynomial of the closed loop systems ns,
ds you make. If you to a closed loop feedback of the, you multiply both the controller and
the plant numerator polynomials, convolve the denominator polynomials. There is no other
component in the feedback path, just make it unity. And that would give you the, sorry,
we have to define the plant np and denominator polynomial of the plant. As I just
discussed, double convolve 0.1, 0.4, 1.2. And now close the loop, you have the closed
loop. Now, plot that in the other subplot in the space bellow in the graph with the step
response.
(Refer Slide Time: 57:26)

So, this step response will come along with this plot. So, you have, I have plotted here
only up to point of 10. You could do that; you could allow it to take its own step.

(Refer Slide Time: 57:46)

And you will see that the step response would be like this. So, these are the high frequency
transients and then ultimately its settles down at 1. There is steady state, there is no error
it is exactly 1. That is basically, because steady state here maps to the very high DC gain,
which will be there at this region. That is why during explanation, I had inverted the time
axis, such that there is one is to one map in between the frequency and the transients.
So, we of course, will continue from here on and improve the response. You see that the
response is not truly satisfactory. It is under damped, oscillatory at the beginning during
the transient this is when the unit step is given. And then you have 1, the reference. This
is the one, which is measured at the feedback point. We have to improve this. So, to
improve this how do we shape or modify this gain. So that precisely is what will be doing
in the forth coming classes.

Thank you for now.

You might also like