This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

PWM tips.

Assume a constant frequency PWM.
Assume that a period begins on the low to high transition. Suppose an application needs to change the duty cycle.
Question 1. Should (must) changes to the duty cycle be done on the same edge (i.e. low to high)? Can the change be done on _any_ part of the cycle?

Question 2. Are there scenarios where the duty cycle should be changed gradually? For example, consecutive cycles could see only one bit change until the new duty cycle is reached.

Parents
  • In our PWM applications we usually change the duty cycle gradually to prevent jerky movement but it is usually done at a higher level.

    For example, we might use a voltage controlled electrical proportional hydaulic valve where flow is controled by varying the duty cycle of the applied voltage. Here we would implement a slew rate limit on flow demand. Since duty cycle would be a function the flow demand, this results in a slew rate limit on the duty cycle. (We usually allow a means for the customer to vary the slope of the limit).

    We output the new duty cycle command at the periodic rate of software task performing this function and don't worry about waiting for the start of the PWM period.

    This degree of control has always been adequate for our applications but perhaps yours requires a finer level of control.

    -Walt

Reply
  • In our PWM applications we usually change the duty cycle gradually to prevent jerky movement but it is usually done at a higher level.

    For example, we might use a voltage controlled electrical proportional hydaulic valve where flow is controled by varying the duty cycle of the applied voltage. Here we would implement a slew rate limit on flow demand. Since duty cycle would be a function the flow demand, this results in a slew rate limit on the duty cycle. (We usually allow a means for the customer to vary the slope of the limit).

    We output the new duty cycle command at the periodic rate of software task performing this function and don't worry about waiting for the start of the PWM period.

    This degree of control has always been adequate for our applications but perhaps yours requires a finer level of control.

    -Walt

Children
No data