I'm attempting to compensate a pole of the plant due to it's vicinity to my desired working point. Let's say that my ideal closed loop cutoff is f and my plant has nearly a 180 phase shift at around f.

The foreseen controller is a PI but I cannot reach the required cutoff due to the vicinity to the 180 phase shift (I suppose). The best I can get is 0.9*f, with a gain margin of 6 dB and a phase margin of 60 deg.

What would then be the best strategy to control the plant? Consider that the controller is a digital one and I can take on some processing if necessary.

Any suggestion/comment/pointer 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?

I have a similar issue. (resonance in plant limits BW) The suggestion from the group was that I make a plot of plant response vs freq. (I haven't done that yet.)

Yup. It's like frequency-compensating an op amp circuit or a PLL. Unlike some of Tim Wescott's stuff, nobody dies if my loop oscillates during tuning. :)

Real resonances are best handled with a notch filter. They have little phase shift at frequencies more than a couple of line widths away, and they knock down the big amplitude peak that leads to oscillation.

When I was a postdoc--nearly 30 years ago now--I designed and prototyped the world's first commercial atomic / magnetic force microscope (the IBM SXM, later manufactured by Veeco for many years). It used a piezo bimorph to move the cantilever tip up and down, and an interferometer for readout.

The bimorph's lowest bending resonance had a Q of about 30, which limited the control bandwidth to about 3% of that, slowing the system down very badly. I put in a 1-section LC notch filter that got me a bit more than a factor of 10 bandwidth increase with approximately critical damping.

Normally you deal with this by tossing in a lead-lag filter. You can then call your controller a PID, or you can call it "PI with lead-lag", or can loudly deny that it could possibly be a PID, your choice.

I assume that just a simple wideband derivative action is out of the question.

Doing a frequency sweep or other measurement that'll let you get an accurate plant model is a Good Idea.

--
Tim Wescott
Control systems, embedded software and circuit design

Well I did dig up my split photodiode and I should do the measurement (for fun and education), in practice I can do an "end run" around the problem and feedback to the laser current and not the piezo stack.

I did make a laser locking video, kinda boring... most of the time it's a 'scope and me turning knobs. (laser and stuff has been sent off to Cold Quanta to see if they can make a MOT with it.)

After watching one of Tim's video's I was thinking that a D (derivative) term might help. .. if there is a change then first thing is to push back against it.

I wish I'd had some sort of practical control theory class. I've got this "seat of my pants" understanding, but with lots of "fuzzy" area's. George H.

Introduce local feedback around the plant to reduce gain by 20dB and push the resulting pole out a decade higher in frequency. Correct for gain accuracy loss in the error processing pre-driver stage.

I just found that indeed I may want to use a lead compensator instead. Lead compensators tends to increase stability margins due to the positive phase shifts, plus the gain increases beyond cross-over frequency, therefore improving bandwidth.

But what is the catch? The higher frequencies will get an extra gain I may not want to have. Anything else?

I've tried the PID approach, I'll post some comments on it since I now completely forgot what was the result! :-/

For what concerns lead-lag compensators, why wouldn't it be sufficient to have a lead compensator? After all I'd like to simply increase the phase shift to improve stability margins and bandwidth, what would the lag compensator be good for?

When I talked about the 'plant' indeed there are two parts of it, one is a motor, with a low frequency pole, and in front of it there's a low pass filter (LC + snubber) to reduce the differential mode emission of my PWM H-Bridge driver (+/- 44V and 1A peak). I want to keep the

-40dB/dec of my LC filter to damp the PWM carrier and its harmonics, therefore I'm not willing to apply a wideband derivative. Unfortunately the LC is shifting and extra 90 deg my already 90 deg shifted phase from the motor (the regulation is done in current) and I hit nearly 180 deg.

I've recently played with it a bit. What I have for the time being is an LTSpice frequency response of my LC filter and some sort of state-space model for the motor. I'm able to combine the data in Matlab and estimate the state-space model of the entire plant. Ideally when we will have some measurements available I should be able to reevaluate the state-space model and be more accurate in the tuning.

By the way, I used the 'System Identification Toolbox' which is worth

1250$ (I'm currently using an eval license). Any idea how I could do state-space estimation *without* shelling out more than one grand?

OK aligning a diode laser today and I stuck the split photodiode on the output to look at frequency response. (I just did it "by hand" rather than with the big guns..)

formatting link

I'm not sure what this tells me... beside I have a big resonance at ~3 kHz. :^)

Well there is another smaller one at 6.7k and another growing at ~9k.

Dang I didn't check for the phase shift... So ~90 degree phase shift at the first resonance and ~180 degree for higher frequencies.. it probably flips around again at the 6.7 kHz resonance.

Dominant-pole compensation, as in a unity-gain-stable op amp, gives nice quick settling for a given bandwidth.

Local feedback (as FB suggested) is a good way to make the individual elements better behaved, and a simple loop wrapped round that will preserve the good settling behaviour.

The more tricks you put into the outer loop, however, the more settling artifacts you get. In particular, if you try cancelling a pole with a zero, as in lead-lag compensation, the two are never exactly matched. They're below the loop bandwidth, or you wouldn't be bothering, and so their mismatch contributes settling artifacts at late times in the step response. Try it out with SPICE and see.

What do you mean by 'a couple of line widths away'? are you talking about a laser beam?

My plant does not show much of a Q since it has been damped by a snubber (simple RC in parallel to C of LC). Therefore introducing the stop-band filter may reduce even further my bandwidth since the amplitude begins to attenuate before the cut-off. On top of that I suppose that a high order stop-band filter would require quite some taps in the digital domain, further increasing the overall delay in the system and potentially causing stability issues.

Maybe I completely misunderstood your suggestion. Please correct me if I'm wrong.

On 24.08.2016 18:33, snipped-for-privacy@gmail.com wrote: []

[]

If I understand correctly you are suggesting the following:

outer inner loop loop +---+ +---+

-->+--| C |-->+-->| P |---+--> -^ +---+ -^ +---+ | | | | +----------+-----------+

Where P is the plant and C is the controller. Why you mention gain accuracy loss? And what is the benefit from adding a local feedback around the plant?

In other words -- take a step back and look at what you're doing:

- The plant has some transfer function, which generally slopes downward, give or take humps and notches (and their corresponding phase shifts).

- If you apply lead-lag compensation, you're boosting the compensator gain at a modest frequency, then taking it back down again at high frequency.

- What's the product of these transfer functions? A flatter gain response.

- Note that the product response is an open loop figure, just the compensator gain (open loop) times the plant gain.

If you add more filter stages (LC notch and etc.), you can compensate for more of those squigglies in the plant's response (well, assuming they don't drift around and stuff).

The end result is a flat open-loop response.

So you don't even need to close the loop at all! Just leave it wide open!

If you have a linear system, and stable dynamics, this is a fine way to go. You don't need to worry about closing the loop, you just put an equalization network in front of the thing.

Telecoms have been doing this for centuries*!

(*Not actually centur/ies/... but it's close to one. Zobel's work started in the 1920s. Nowadays, compensation is applied digitally, and automatically. Or implicit in the modulation scheme, like how DSL breaks it into a zillion discrete bands, each one of which is (hopefully) narrow enough to not be skewered by an unfortunate peak or notch in the line response; and if it is, oh well, you still have N-1 good channels.)

If you do have a nonlinear and unstable plant, then you are kind of screwed at going beyond a lead-lag system.

If the dynamics are stable but the system is nonlinear, you can still do precompensation, but your whole network gets a lot more complicated -- you need to apply predistortion at the right points, so that, after being distorted again by the plant, all the harmonics end up in the right magnitudes and phases, and cancelling out. (Tweaking IMD must be a *bitch* for these sorts of things...) It's still not impossible -- digital radios have been doing this for some time, too.

Measure inductor current. Not because it's better for control, but because it's safer for everything. The inductor's current is the first state variable in the system, and the first thing that should be under control. What if there's a short to ground on either output terminal? Current rises forever...

Close the loop on inductor current. Now you can make it go, well, you still can't slew it any faster than the supply voltage and inductance allows (which is usually a modest fraction of the clock frequency: that fraction is the current ripple fraction!), or much more precisely than the clock frequency allows.

Since, if you tried to control it faster and more precisely, you'd be creating a hysteretic or sigma-delta modulator, with a higher average clock frequency anyway, thus burning out transistors with switching loss -- you're fundamentally constrained by inductive reactance and switching, of course!

Most importantly, with controlled inductor current, even if the modulator saturates, it simply saturates to whatever the design maximum output current is. It never goes open loop and drives unlimited current!

Close the loop on output voltage. Now you're controlling inductor current to set output voltage; it's a simple transconductance stage (with output current linearized by its inner control loop), so the voltage loop can run faster than a pure voltage-mode (two pole) loop is limited to.

Most importantly, you've decomposed the LC resonance, so it doesn't resonate anymore! Instead, you have two staggered first-order loops, which means you really don't need anything fancier than a pole-zero compensator for each. (You can't speed up the inner loop any more than the inductor allows, but the voltage loop might be lead-lag just to squeeze that last little bit out of the inner loop.)

In any linear feedback system the product of gain and bandwidth is conserve d so that by reducing the gain of your plant you increase its bandwidth at that gain by the same ratio, a 1/10 reduction in gain gets a x10 increase i n bandwidth. Since feedback systems are error driven, you increase the requ ired error input when you reduce the forward loop gain, so you need to comp ensate for the plant gain reduction by an increase in the error amplificati on driving the plant.

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.