nonlinear HBridge effects in BLDC control

Hi everyone,

I have a PI controller which drives a PWM unit switching an Half H-Brdige stage to control a phase of a three-phase BLDC motor. This loop regulates the current, while an outer loop control the speed to follow an external profile (through encoder readings).

I've tuned the controller in order to meet some requirements on the time response (risetime, steady-state error, overshoot, ...) but the whole tuning phase has not included the PWM stage because MATLAB cannot linearize a system with a nonlinear stage like the PWM and H-Bridge.

In order to take into account my PWM and H-Bridge, I simply modelled them as delay unit (essentially linked to the commutation time it takes for the H-Bridge stage to commute from ON to OFF). First question here: is this model oversimplified? I've learned about techniques with MATLAB to linearize a nonlinear stage, but is it really worth it? And how do I go about evaluating my phase and gain margin when I introduce the actuator stage?

Nonetheless there's an additional issue linked to another nonlinear behavior which is intrinsic to the H-Bridge stage. When I start to drive it with extreme values of duty cycle (either big or small), there'll be a kind of a threshold effect because of the time it takes to charge and discharge MOS gate capacitance.

Since the H-Bridge is driven in a complementary fashion with time delay insertion, the 50% duty cycle will correspond to my 0 mean current, while the threshold effect will be confined to the farest end of my dynamic range.

Assuming my value to be driven never gets into hitting the threshold effect I can safely ignore this phenomenon. But how can I be sure about it? What happens if a perturbation is injected in my system and suddenly it wants to compensate the error through values that drive the 'actuator' in a non linear state?

I'm not sure how my analysis should go about in these cases and how I can avoid having my controller going unstable.

While I can consider restricting the system state in order to prevent hitting the 'safe' range, what will be the effect on the outer loop then?

Any idea/pointer/suggestion is appreciated.

Al

--
A: Because it messes up the order in which people normally read text. 
Q: Why is top-posting such a bad thing? 
A: Top-posting. 
Q: What is the most annoying thing on usenet and in e-mail?
Reply to
alb
Loading thread data ...

This is a general problem in nonlinear control known as actuator saturation. Even if you prevent going outside of your "safe" range (I assume that's what you meant), you still can't avoid commands that might ask for more than 100% of what the PWM can deliver.

As you guess, these sorts of nonlinearities can lead to instability, or at least to sudden vast increases in settling time. I can't make you any guarantees, but in general the problem comes about because some integrator in the system "winds up" -- meaning that its value climbs to well beyond the maximum value needed to saturate the actuator. As a consequence, your plant overshoots the target (sometimes badly) while the integrator is unwinding. Often the process repeats in the other direction, sometimes forever.

The easy answer to this is that you need integrator anti-windup. At it's easiest, you just restrict the maximum and minimum values that each integator state can take -- when the integrator state tries to grow beyond the ceiling, you limit it.

I'm pretty sure that your system is basically force-actuated, which means that one of the "integrators" that you need to limit is the velocity of the plant. You do this by having an explicit velocity loop that's driven by a position loop, and you explicitly limit the velocity that you command.

Doing all of this will reduce performance with large movements somewhat (there's more intelligent ways to limit the velocity with respect to the position target and any mechanical stops), but it's what fits in a USENET posting.

--

Tim Wescott 
Wescott Design Services 
http://www.wescottdesign.com
Reply to
Tim Wescott

Hi Tim,

Tim Wescott wrote: []

[]

By this sentence alone you nailed my problem and gave me the possibility to search for a solution! Thanks loads!

But you agree that an integrator winds-up because of two reasons:

  1. faulty input
  2. perturbation

While 1. could be addressed easily, 2, is much more complex to handle since it all depends on the level and type of perturbation you have to handle.

If the perturbation is not characterized, how do you specify that your controller should not be sensitive to those perturbations? What if I'm not aware about the levels and types of perturbation?

I've started reading about anti-windup techniques, like clamping, back-calculation, tracking etc. They all seem to address the main problem, but the question still remains. How do I make sure my technique works? The simple answer is that I can test it, creating the perturbation whose effects I'm trying to mitigate and...wait a minute, I do not know what's the perturbation shape!

IMO it all boils down to a well written specification! How could I know what the customer has in mind? I should make sure (s)he's aware of the necessity to characterize the boundary conditions for my controller to work properly.

That's of correct. We have a position profile to follow, as well as encoders' reading as feedback. The controller is simply in the form:

X(n+1) = AX(n) + Bu(n) y(n) = CX(n) + Du(n)

where X is the transfer function, y is the resulting torque and u is the error vector, while A, B, C, D are the tunable parameters.

We then apply the torque, modulated with sin(theta + k*pi*2/3) for k=0,1,2 for the three phases' current and theta as the actual position.

At this point the inner loop takes care about maintaining the current at its set-point on each winding.

So bottom line is that I can easily clamp the value of the torque applied in order to avoid hitting the limits of the PWM, but this wouldn't be enough. I should limit the inner loop's integrator from going too far because of a sudden perturbation.

For others who might be interested in the subject I found these two references quite well written:

formatting link
formatting link

and no, I'm not affiliated with Tim, I simply happen to have his book at hand!

I've seen the objectives of your course with 'Besser Associates' and it looks like you are going to discuss about nonlinear techniques in one of the sessions. Is there a way to get remote access to the class? I can 'easily' afford the 2k$ for the course, but not a week in California :-(

Al

Reply to
alb

I spent a lot of time working on systems that needed to work with any arbitrary input, so tend to design my loops so that they won't seriously misbehave no matter what the input.

That still leaves you needing a definition for "misbehave" -- sometimes it's only necessary to make sure that nothing gets damaged, sometimes you need to make sure that the thing settles in some longish but acceptable time, and sometimes you need to make sure that the thing settles as quickly as is physically possible.

The way I have done this in the past is to either use Lyapunov's function, or simulate the hell out of the system and hope. Lyapunov's function is more mathematically correct, except by the time you simplify things so that the solution is tractable, you may not be looking at a realistic system model.

Here again, if you can show asymptotic stability then you can be pretty sure that you're OK.

Yes, you should. You'll probably be OK, except when you need torque in the direction of high motor speed, so the motor's back-EMF is working against you.

ch6.pdf

--

Tim Wescott 
Wescott Design Services 
http://www.wescottdesign.com
Reply to
Tim Wescott

I'm going to forward this to my contact at Besser. They present online courses, but I'm brand-new there (that course, in fact, will be my first time with them), and if they're smart they'll want to vet my performance before they invest in an on-line deal.

--

Tim Wescott 
Wescott Design Services 
http://www.wescottdesign.com
Reply to
Tim Wescott

Hi Tim,

Tim Wescott wrote: []

Without an analysis (and a tradeoff) that shows you what are the chances of your misbehavior, it is likely that a system like that is seriously overdesigned.

I understand that in some markets you need to be prepared to a wide range of uses of your product, some if which are way beyond you imagination, some of which may drive your product better than the designer, but there are other markets where you want to minimize the number of scenarios, in order to analyze and minimize the risk.

In my case I think I'd have even problems to justify to my employer that I'm trying to make the system more robust to 'misbehavior'. That's why I'd think that I need to drive the customer into writing a detailed specification about the potential perturbations I need to be tolerant to.

That is correct and that's why I want the customer to drive me through this choice. Without him onboard I may either underdesign or overdesign, not a good choice in any event.

Ok, I believe my background is not as apt to understand or undertake the consequences of using a Lyapunov's function, I'd first need to understand the basics, understand whether is really the best choice and then drive the implementation.

I seem to understand a little better the other techniques I've mentioned, but again, I'm not so sure how to be sure why is the right choice. Waiting to run for a test might be too late. Performing hell of simulation runs might be deceiving if the model is not considering all real life nuances.

Uhm, ok that means that I really need to get my head around this Lyapunov theory! But I'd guess is not a weekend activity :-D

[]

Why the back-EMF is working against me? I'm regulating current, therefore I don't care much about what the back-EMF is (unless I've miscalucalted my H-Bridge rail voltages and suddenly the coil cannot develop such a back-EMF because it reached the top of the rail). Am I missing something?

Al

Reply to
alb

Hi Tim,

Tim Wescott wrote: []

Being there for the course is not affordable, but an online deal would be great. If possible I suggest you post your contact answer here, it might be interesting for other people as well.

Al

Reply to
alb

Anybody, just correct me if I am wrong:

When the speed is high, the developed BEMF reduces the possible torque (since BEMF - applied voltage, is the torgue generating mechanism)

So a high speed motor is designed for lower BEMF, otherwise it cannot produce torque. That translates to lower inductance of the windings, which makes the ripple current larger than a drive designed for low speed

Cheers

Klaus

Reply to
Klaus Kragelund

yeh, if you take a regular dc motor the speed at a given voltage is basically where the input voltage - bemf produces a current i.e. torque that equals the load

The spec on you see on most brushless DC motors is rpm/volt

I guess it depends on what voltage you drive it with, and how you drive it

-Lasse

Reply to
Lasse Langwadt Christensen

Hi Klaus, apologies for the late reply.

Klaus Kragelund wrote: []

That is not correct to my understanding. The 'torque generating mechanism' is more of the following kind:

T = k * I

where k is the electric constant and I is the current. It is certainly correct to say that the current on a winding generates a certain voltage drop and hence you could calculate what is the maximum voltage you need to apply to sustain that current.

In a current controlled loop, IMO, I only need to make sure that my HBridge rails allow the maximum BEMF to develop, considering the max speed I'm designing for and the max torque I want to achieve.

I'm not quite sure I follow here, with a lower electrical constant (in order to have lower BEMF), you're limiting the max torque as well, since kt and ke are equal (at least in BLDC).

Am I missing something?

Al

Reply to
alb

At max speed, you have zero torque, (BEMF = Applied voltage)

So you need to stay well below this max speed point, to have any torque to deliver

Cheers

Klaus

Reply to
Klaus Kragelund

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.