This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Setting KA & Kb of BLDC



Hello TI team,

Setting KA & Kb of BLDC

https://www.youtube.com/watch?v=fpTvZlnrsP0 at 39.44 second video
Here in Video tutorial Dave Wilson suggest to set the KA = L*current bandwidth(radians/sec)

Dave is mentioning unit of current bandwidth as radians/sec. i.e unit of angular frequency
en.wikipedia.org/.../Radian_per_second

If current PI loop is running at rate of 100 usec or 10 KHZ.
1 hertz = 2π radians/second
10KHZ = 2π * 10000 radians/second
           = 2 * 3.14 * 10000
           = 62800 radians/second

so Ka = L*62800

Have i got it right ?

Or This current band width is related to rate at which current loop PI software is running or -3db cut of point ?

Regards,

Dinesh

  • Dinesh,

    In the video, Dave is referring to the selection of continuous time (analog) PI controller gains based on known L & R motor parameters.  The current loop bandwidth is something you decide.  It's not the sampling rate of the current control loop.  Since it's a sampled system your current loop bandwidth must be less than half the sample rate.

    Once you have calculated the analog PI gains you will need to find corresponding digital gains, and for that you must take into account the sampling rate.  There's a document (PI controller equations.pdf) explaining the relationship between analog and digital PI gains on this page:

    Regards,

    Richard

  • >>The current loop bandwidth is something you decide.  It's not the sampling rate of the current control loop.  Since it's a sampled system your current loop bandwidth must be less than half the sample rate.

    Thanks Richard for your reply I will go through the document.  so this current loop BW which I have to select is same 3db cut off point bandwidth of bode plot ?

    And why it should be half of sampling rate ? Because of Nyquist criteria fs> 2fm ?

    Please suggest.

    Regards,

    Dinesh

  • Dinesh,

    Yes, that's correct.  We cannot violate the Nyquist limit.

    Regards,

    Richard

  • Thanks for your reply. I went through the document and as per this "Equations (12) & (13), and (17) & (18) allow us to compute equivalent digital PI controller gains from an analogue prototype." It's clear to me.

    But still one question is as you told " Dave is referring to the selection of continuous time (analog) PI controller gains based on known L & R motor parameters. Where KA = L*current bandwidth(radians/sec)"

    Then you referred that current bandwidth is fm of Nyquist criteria fs> 2fm.

    Now my question is what exactly is modulating signal fm in this analog current loop case which is referred as current bandwidth and used to calculate analog KA = L*current bandwidth(radians/sec) ? How this formula come to existence & how current bandwidth is referred as fm signal of Nyquist criteria ?

    Please suggest.

    Regards,
    Dinesh
  • Dinesh,

    From Dave's formulas, the Ki gain is set to place the controller zero such that is cancels out the motor pole. The open loop response will look like an integrator. You use the Kp gain to move the open loop unity gain frequency (gain cross-over frequency) to get the performance you want. In principle you can select any frequency up to the Nyquist limit, but in practice most people aim for about 1/10 or 1/15 the sampling frequency because at higher frequencies the pole-zero cancellation becomes inexact because of time delay and other artifacts in the loop.

    So, you select Ki based on L & R, as Dave describes. Then choose Kp such that the gain cross-over is about 1/15th of the sample frequency; say about 650Hz in your case.

    Regards,

    Richard
  • Thanks for your reply Richard , combining concept of classical & modern control systems in SOFTWARE is bit challenging task when you are begginer , may be you have also faced this problem some point in your carrier. I am going through same.

    One thing i know is as per time shift property of Laplase transform, delay in software loop will cause pase lag.
    Time delay of T seconds generates a phase shift of -wT radians (w is frequency in rad/sec., T is in sec.).
    This link also explain best the math behind phase lag & time delay in LTI systems.

    lpsa.swarthmore.edu/.../TimeDelay.html

    >> You use the Kp gain to move the open loop unity gain frequency (gain cross-over frequency) to get the performance you want.
    What exactly you mean by performance in this case ? Ideally I have to set Id = 0 & Iq = commanded value. Now this requirement of Id & Iq will be satisfied at which gain crossover frequency what is math behind it ? Can you suggest what term to search on Google to know theory behind this statement.


    >> because at higher frequencies the pole-zero cancellation becomes inexact because of time delay and other artifacts in the loop.
    Can you suggest what term to search on Google to know theory behind this statement.

    Regards,
    Dinesh
  • Dinesh,

    No problem.  Keep in mind that there are other sources of phase shift besides computation time.  The A/D conversion delay, and the PWM reconstruction will both contribute phase lag.  

    What I mean is in general higher gain cross-over frequency (bandwidth) gives you better transient performance.  In FOC there are two PI controllers which you would typically set in the same way based on your motor parameters and desired bandwidth, as I have described.  That's how it's normally done in motor control.  

    Regret I don't know the Google terms to search against, however there are a lot of good books on motor control which should help you.  A solid book on fundamentals is: "Electrical Machines & Drives" by Ned Mohan. 

    Regards,

    Richard

  • Thanks Richard for your support.

    Regards,

    Dinesh

  • Hello Richard,

    Just one general question how the frequency/time domain stability analysis is done for hardware circuit like power supply, DC-DC converter, Buck Boost converter etc where discrete component like Resistor, capacitor or active component like op amp is used ?

    Ideally advance power supply like smps may also have MCU.

    We prefer classical s-domain analysis or modern Z-domain analysis ?

    Please suggest. Also do TI have some tutorial or application note to do stability analysis of these circuit I mentioned above ?

    Regards,
    Dinesh


    Regards,
    Dinesh
  • Hello Dinesh,

    You question is indeed a very general one about how to design digital power supplies.  It's not something I can address in a forum post. 

    There are many excellent resources out there.  Among those from TI, you can try the materials from the Power Supply Design seminars, some of which cover analysis of the basic topologies:

    http://www.ti.com/ww/en/power-training/login.shtml?keyMatch=power%20supply%20design%20seminar&tisearch=Search-EN-Everything&rec=true

    Among the books often consulted on power supply design are these two:

    A. Pressman, K. Billings & T. Morey, Switching Power Supply Design, McGraw-Hill, 2009

    R. Erickson & D. Maksimovic, Fundamentals of Power Electronics, Springer, 2001

    I hope this helps.

    Regards,

    Richard

  • Hello Richard,

    Thanks for your reply & refrence to some good books on power supply design.

    One more general question from my side on control system, hopefully will be last on this thread from my side.
    If we are not having data related to time & frequency domain parameters. Then ideally what values we will select for our controller. Please correct me for the values which i have mentioned below 7 some are question mark :--

    • Steady state error = 0
    • Maximum overshoot = 5% more than final value
    • Maximum Rise/Peak Time = ?
    • Maximum settling time = 2% or 5% of maximum value
    • damping ratio = 0.707
    • Gain Margin = ?
    • Phase Margin = ?
    • Maximum phase lag = ?
    • bandwidth = about 1/10 or 1/15 the sampling frequency (as told by you in previous post)


    You have been control engineer for a long time, so can you suggest what value's will be best for these parameters.
    Please suggest on this.

    Regards,
    Dinesh

  • Hello Dinesh,

    Is this related to your previous post about PI control, or a more general question?

    If the former, in principle you have set up the PI controller to make the open loop look like a pure integrator.  On that basis, your phase margin would be 90 degrees and gain margin would be infinite.  The closed loop would be first order, so you would not get any overshoot.  As I said in an earlier post though, these are idealisations.  The reality will be different and you'll have to measure it.

    In general, except in the simplest cases there is no correlation between transient response and frequency response.  What I recommend you do is concentrate on tuning one or the other. Keep in mind that everything is a compromise and there is no such thing as best values (if there were control, and life, would be a lot easier!). 

    Regards,

    Richard

  • Thanks Richard for your Reply it was more of a general question from my side. So your reply is same for general case ?

    In fact setting current loop Kp , Ki constant are clear to me. Last thing to understand how to set Kp & Ki of velocity loop I am referring following blog from Dave "Teaching Your PI Controller to Behave " will trouble you with few more questions in few days from now :-), so please don't mind.

    Regards,

    Dinesh

  • Hello Richard,

    Please can you suggest on the following point, i am stuck at part iv.
    e2e.ti.com/.../teaching-your-pi-controller-to-behave-part-iv

    1> In above link bode plot is created from the equation 1, that is very clear to me.
    2> Then Dave assumes that the current controller’s pole is way higher than the velocity filter’s pole.
    So if we eliminate the effect of the current controller pole, we can rewrite the velocity open-loop transfer function as Equation 2
    This clear to me
    3> In Equation-2 our system reduces to 3rd order system
    4> What is the math behind obtaining the equation 3 & 4 ?

    Is del & omega used in equation 3 & 4 is the damping ratio(which decides system is over or under or critically damped) & undamped natural frequency of the Second order system ?


    Is equation 3 & 4 are obtained by equating Equation-2 with the following second order representation (Tcl) in s domain, ece.gmu.edu/.../second_order_03_eq01.gif


    Please suggest on this.

    Regards,
    Dinesh

  • Dinesh,

    In what follows, take the unity gain cross-over frequency as wc, and the pole frequency as wp = 1/tau.  If you look at what Dave is claiming in eqn.(3): wc = d * Kd

    log(wc) = log(Kd) + log(d)

    log(d) = log(wc) - log(Kd)

    He probably should have made it clearer, but Dave is defining "d" as the distance on the linear frequency axis between the pole at 1/tau and the unity gain cross-over frequency (wc).  On this basis, the logarithmic pole frequency is:

    log(wp) = log(wc) + log(d)

    wp = wc * d

    Substituting for the pole frequency (1/tau) we get eqn.(4):

    1/tau = wc * d

    These are not the same terms used in the equations you attached.  If you calculate the closed loop transfer function using eqn.(2) it comes out to be third order, so there is not a straightforward correlation with damping ratio and natural frequency.

    Regards,

    Richard

  • Hello Richard,

    Thanks for clarifying my doubt.


    I have some doubt here in this link.
    e2e.ti.com/.../teaching-your-pi-controller-to-behave-part-vi

    >> Figure 3 shows a normalized frequency plot of the phase delay for a sample-and-hold function, where the sampling frequency is assumed to be 1.
    If current PI loop is running at rate of 100 usec or 10 KHZ then Why we are considering sampling frequency as 1 ?


    >> So using this assumption as well as the constraints from the velocity loop tuning procedure, we can now write a general “rule of thumb” expression for the range of Ka:
    Above statement is bit confusing. As in velocity loop tunning we have totally neglected KA, because we have used this statement while tunning velocity loop "that the current controller’s pole is way higher than the velocity filter’s pole"
    Now Dave is saying " So using this assumption as well as the constraints from the velocity loop tuning procedure, ". What constrain velocity loop put on KA ? Velocity loop only says current controller’s pole should be higher than velocity filter pole.
    How this Equation 4 come to existance, what is math behind this ?

    Please suggest.

    Regards,
    Dinesh
  • Dinesh,

    Regarding the first part of your post, the phase plot in figure 3 is against normalised frequency. It's just the usual -wT/2 frequency proportional shift of a ZOH. Dave reads off the ZOH phase lag at the gain cross-over frequency, subtracts 90 degrees (because of the integrator), and uses this to calculate the phase margin. This is justified because of the Ts term in the numerator of equation (3), which normalises to the sample frequency.

    On the second part of your post, I regret I cannot provide an answer. As you say, clearly some assumptions have been made. Possibly someone else on this forum will know the background, but Dave is no longer with TI so perhaps a detailed explanation may not be forthcoming. Sorry not to be able to take this further.

    Regards,

    Richard
  • Hello Richard,

    Thanks for your support blog from Dave is clear to me.

    I will say that our controller performance depends on how accurately we have measured the Motor parameters. What do you say ?
    But Load inertia & viscous damping are some factors which we cannot measure accurately & they varies from time to time & depending upon the operating condition.

    I read in blog that TI have Insta-spin algorithm & software part of which is FAST which can calculate motor parametrs.

    Please suggest on following points from my side.

    1. How much time FAST takes to compute these motor parameters ?
    2. Running FAST before the actual FOC software algorithim will it effect the performance to end consumer ? Or fast will run motor for very small amount of time which is not visible to end consumer ?
    3. Suppose i have a E-Rikshaw which is using BLDC motor to run the vehicle. Now in this vehicle there can be 2/3/4 person sitting at a time when it starts so Inertia is different for each case ? So how to handle this type of case ? Do you recommend using instaspin FAST algorithm to calculate Inertia & other motor parameter every time when vehicle starts from Zero speed ? shop.indiantradebird.org/.../0_ba6d9190.jpg
    4. TI processor C2000 uses IQ Math library to handle floating point numbers. Using Floating point library or hardware floating point . what exact advantage we have in terms of Control theory. One i know is using hardware floating point unit is faster & can effect time shift property of laplace transform which effects the phase shift. Apart from this ?
    5. TI is having Processors for motor control & well tested software SVM, PI , FAST etc. So being a product development company if some one want to make motor control drive then what exactly they do ? Means they only tune (motor parameters in header file) your already existing software to drive motor & concentrate on application development part ? So there control system skills are never tested ?
    6. Clients prefer to use your software to tune or they tune PI loops in tool like matlab ? But again matlab licence is having cost factor.What exactly is Industry trend ?
    7. You are having lot of experience in Control system industry. So as per your experience what do you find Industry have good number of control engineers? Because what i know it is very difficult subject to understand & most engineering graduate use to flunk this subject classes... :-)

    Please suggest.


    Regards,
    Dinesh

  • Hello Dinesh,

    Correct.  The FAST estimator is dependent on accurate knowledge of motor parameters.  My understanding is the estimator includes means to measure those parameters on start-up.

    Regarding question 4, there will be a small improvement in cycle count with a floating-point device, mainly because the need to manage overflow and scaling goes away. Depending on the application there are numerical quantization issues which may appear, but the picture is complex and very dependent on the application.  I should add that historically fixed-point devices have been much cheaper, which is the dominant concern in many cases. 

    Regarding 6, PI controller tuning varies from one industry to another and from one user to another.  I have outlined in this thread the method of motor current loop PI tuning by zero placement and scaling, and this is also widespread in power supply design.  In general it's a mix of simulation and practical testing: I do not think I can identify an industry trend.

    Unfortunately I do not think I can help much on the other questions.  These need someone more familiar with InstaSPIN than me.  Since these are differrence from the forum thread title it's possible those who can help are not reading it.  Can you please open a new thread with a different title and post the outstanding questions there?  That way, the moderator can track the thread through to a conclusion. 

    Many thanks.

    Regards,

    Richard