1

I have multiple power mosfet pwm controlled and connected to a single main power supply. Thee pwm signals operate all at the same frequency and their duty factor is determined otherwise and can change frequently. It can can vary between 0 and 100%. My PWM controller allows me to choose On time and off time independently for each signal.

I am looking for an efficient algorithm to determine the on time of each channel in order to minimize the peak power drawn from the power supply.

A trivial example: With 10 mosfet each one with a 10% duty factor the optimal solution will be to turn on each mosfet one at a time in sequence.

Any ideas out there on how to address this problem? Thanks

8
  • 1
    Please add an non trivial example and what you expect as output. Commented Jun 7, 2021 at 15:24
  • The trivial example seems to assume On-state power output to be equal among outputs (as well as power balance in Off-state). I like such to be explicit. (Unrelated: Elaborate forms of this go noise shaping.) Commented Jun 7, 2021 at 15:40
  • reading the comments above I realize my question was poorly written and I apologize for that, So yes all mosfet draw the same power when Open. and my question is really, given the duty factor of all the mosfet ( so we know how much energy has to be delivered by the PS during one period) how to optimize the sequencing of the opening of the mosfet to minimize fluctuation of the instant total power drawn from the power supply during this one period. Commented Jun 7, 2021 at 20:15
  • (all [MOSFETs] draw the same power when Open I think I see why you didn't post to Electrical engineering@SE. It doesn't hurt to mention your background or use the help](stackoverflow.com/help/how-to-ask). No need to apologise where you invested the effort you found justified.) Commented Jun 8, 2021 at 6:44
  • 1
    @Spektre 21 Thanks for the comment but this is not an issue: all mosftet are high side and drive electrically independent loads. Commented Jun 9, 2021 at 5:35

1 Answer 1

1

Let the pulse width fractions (between 0 and 1) be p1, ..., pn. Let s0 = 0 and sn = sn−1 + pn be the prefix sums. Signal i should turn on at times si−1 mod 1 and end at times si mod 1.

This algorithm does what you want on the trivial example, since s0, s1, ..., sn−1, sn = 0, 1/10, ..., 9/10, 0.

For a less trivial example, suppose that we have signals at 10%, 20%, 30%, 40%, 50%, 60%, 70%, 80%, 90%. Then the pulses look like

1---------1---------
-22--------22-------
---333-------333----
------4444------4444
55555-----55555-----
6----666666----66666
-7777777---7777777--
888888--88888888--88
99999-999999999-9999
Sign up to request clarification or add additional context in comments.

2 Comments

+1 nice and simple solution however I would probably improve it a bit by first computing the GCD of all possible/used ratios and then generate the pattern for GCD PWM periods to avoid more glitches ... maybe even use symmetrical phase PWM for next GCD PWM periods
Thanks its simple, fast and elegant

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.