PWM generator
[sim, pwm] = ld_pwm(sim, ev, plen, u)
plen - period length
u * - modulation signal; Values are between 0 and 1.
pwm * - pwm output