News for hackers. Stuff that matters.
Re:Clock Made Power Grids Possible by kragen on Saturday March 02, 2024 @03:35PM (#39575523)
i appreciate your comment!

it's true, you can drive an h-bridge with a pre-canned pwm waveform whose phase you adjust with a latency measured not just in milliseconds but in seconds, though you'd better have safety mechanisms that respond to a fault on the line faster than that. you don't have to use feedback to generate the control signal! but at least in garden-variety class-d amplifiers reproducing arbitrary waveforms (rather than necessarily a fixed-frequency sine wave), you get better performance if you do use feedback, so it's common practice

(disclaimer, i've never built power electronics, so i could totally be misunderstanding something)

i think you're saying that any kind of a pid loop will alternate between being pinned at maximum or minimum when the plant isn't responding to the control output, unless p = i = 0. i don't think that's correct; i think it's sufficient to not make your p coefficient overwhelmingly large. a sufficiently large i coefficient will also make your control loop tend toward extremes in this situation, but not instantly, and a nonzero i will probably always win in the end when the plant is completely unresponsive. but a moderate p won't have that effect, and d can attenuate it.

also, you can totally use current feedback from the output of your smps to drive the pwm, and that seems to me like it would be a very good idea

Re:Clock Made Power Grids Possible by burnerthrow008 on Sunday March 03, 2024 @02:28AM (#39579171)
> true, you can drive an h-bridge with a pre-canned pwm waveform whose phase you adjust with a latency measured not just in milliseconds but in seconds

I’m not sure what you’re trying to say with this paragraph so I’m not going to respond to it.

> think it's sufficient to not make your p coefficient overwhelmingly large. a sufficiently large i coefficient will also make

What I’m saying is that making the P term small enough not to pin the PWM means that it won’t do anything useful, though I do see I wasn’t originally as clear as I could have been on that point. Either there won’t be enough gain or you will pin the output. There is no meaningful range of values in the middle, especially when the system needs to work outside the laboratory and you can’t tweak the parameters every other day.

If you rely completely on the I term, you’ll have stability problems. So now it requires a lot of D term… and now you’ve gone full circle and we’re back to “the whole thing won’t work without a time constant which makes it totally useless to run a PWM and barely useful for the outer loop.”

> you can totally use current feedback from the output of your smps to drive the pwm, and that seems to me like it would be a very good idea

I did mention that already… along with the fact that you need to set some target for your current feedback using an outer control loop. You can set the target by measuring frequency error averaged across several cycles. Again, you need on the order of 100 ms to make that work.

Whatever way you slice it, the grid backup battery is not going to start exporting power to the grid in less than a cycle, and certainly not in less than a millisecond.

Re:Clock Made Power Grids Possible by kragen on Sunday March 03, 2024 @10:44AM (#39581549)
thank you!