Quantcast
Channel: TI E2E support forums
Viewing all articles
Browse latest Browse all 4543

Teaching Your PI Controller to Behave (Part IV)

$
0
0

Dave Wilson, Motion Products Evangelist, Texas Instruments

 

At the end of my last blog, we discussed the possibility of creating a single parameter that could automatically tune the PI coefficients for a velocity loop used in a motor speed control system.  To develop such a parameter, let’s review the open-loop transfer function for the entire velocity loop:

                                             Equ. 1

where      K is a coefficient that contains several terms related to the motor and load

                Kc and Kd are the PI coefficients for the velocity loop

                L is the motor inductance

                Ka is one of the PI coefficients for the current loop

                t is the time constant of the velocity feedback filter

                s is the Laplace frequency variable

Assuming that the zero dB frequency occurs somewhere between the zero at s = Kd and the two nonzero poles in the denominator of the expression, we should end up with a Bode plot that looks something like this:

The reason the shape of this curve is so important is because the phase shift at the 0 dB frequency determines the stability of the system.  In general, in order to get a phase shift at 0 dB that leads to good stability, the magnitude response should cross 0 dB at a rate no steeper than -20 dB per decade.

As you can see from equation 1, we must solve for three unknowns (Ka, Kc, and Kd) which are affected by multiple system parameters.  But instead of wading through pages and pages of esoteric equations, it’s time to make another simplification.  Let’s assume that there is only one pole higher than the zero-dB frequency instead of two.  This assumption could mean that you don’t have a velocity filter in your system, OR that the velocity filter’s pole is way higher than the current controller’s pole, OR that the current controller’s pole is way higher than the velocity filter’s pole.  For most systems, it is plausible to assume the latter scenario.  So if we eliminate the effect of the current controller pole, we can rewrite the velocity open-loop transfer function as shown below:

                                                  Equ. 2

For now, let’s assume that the delta in frequency between the pole 1/t and the zero Kd is fixed.  In order to achieve maximum phase margin (phase shift + 180o), the unity gain frequency should occur exactly half way in-between these two frequencies on a logarithmic scale.  Translating from dB to a normal gain scale, this means the following is true:

                                                              Equ. 3

and,

                                                                 Equ. 4

Combining Equ. 3 and Equ.4 we can establish that:

                                                                              Equ. 5

Solving for Kd,

                                                                                 Equ. 6

Where “d”we will define as the "damping factor."  If d is increased, it forces the zero corner frequency (Kd) and the velocity filter pole (1/t) to be further apart.  And the further apart they are, the phase margin is allowed to peak to a higher value in-between these frequencies.  This improves stability but unfortunately reduces system bandwidth.  If d = 1, then the zero corner frequency and the velocity filter pole are right on top of each other, resulting in pole/zero cancellation.  In this case the system will be unstable.  Theoretically, any value of d> 1 is stable since phase margin > 0.  However, values of dclose to 1 are usually not practical as they result in severely underdamped performance.

I will talk more about dlater.  But for now, let’s turn our attention towards finding Kc.  From Equ. 3 we see that the open-loop transfer function of the speed loop will be unity gain at a frequency equal to the zero frequency (Kd) multiplied by d.  In other words,

                                         Equ. 7

By performing the indicated substitution for “s” in Equ. 7, we obtain:

                                                         Equ. 8

We can see that the expression within the magnitude brackets is a scalar term multiplied by a vector term.  So we can pull the absolute value of the scalar term out of the brackets, resulting in the following expression: 

                                                          Equ. 9

It can be shown that the magnitude of the vector inside of the magnitude brackets is simply equal to d.  Performing this substitution and simplifying leads to the following equality:

                                                                                   Equ. 10

Finally, we can solve for Kc:

                                                             Equ. 11

 

 

 

At this point, let’s step back and try to see the forest for the trees.  We have just designed a cascaded velocity controller for a motor which contains two separate PI controllers: one for the inner current loop and one for the outer velocity loop.  In order to get pole/zero cancellation in the current loop, we chose Kb as follows:

                                                                                        Equ. 12

Next, we select a value for the damping factor (d) which allows us to precisely quantify the tradeoff between velocity loop stability and bandwidth.  Then it’s a simple matter to calculate Kd and Kc:

                                                                                Equ. 6

                                                                 Equ. 11

All that remains is the selection of Ka (the current controller bandwidth), which I will address in a later blog.  The benefit of this design approach is that instead of trying to empirically tune four PI coefficients which have seemingly little correlation to system performance, all you need to do is select what damping factor you want for the velocity loop.

In my next blog, let’s take a harder look at the damping factor and how it affects the performance of the velocity loop.  Until then…

 

Keep Those Motors Spinning,

  


Viewing all articles
Browse latest Browse all 4543

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>