Shop OBEX P1 Docs P2 Docs Learn Events
Is there a technique for generating 16bit ~20KHz PWM - Page 2 — Parallax Forums

Is there a technique for generating 16bit ~20KHz PWM

2»

Comments

  • evanhevanh Posts: 15,184
    Mickster wrote: »
    It's simply a method whereby position increments are added to the PID command in a time sliced (1KHz in my case) fashion (v=dp/dt).
    To achieve an axis velocity of 1m/s, the PID command is incremented by 1mm at 1ms intervals. From there the PID does it's thing which might involve wagging a bit (dithering) from one update to the next to maintain that velocity.

    If "v" isn't dithered then the servo loop won't add any of it's own. Mostly, you'll just get oscillations at a lower frequency. If you want a dithered DAC then it'll need to be applied directly to the final demand.

    Normally the PID function scales it's demand output to suit the DAC but there's no reason not to target a larger word size then dither that down to the DAC. I guess in that respect, this then becomes an added feature of the servo loop. :)
  • evanhevanh Posts: 15,184
    Hmm, maybe the Integral term produces a semi-effective dither. It's hardly an immediate responder though.
  • ErNaErNa Posts: 1,742
    I do not know if you ever scoped the switching behavior of a power fet. If not, do it and your focus will change. Otherwise: try to interpret the measurin g carefully ;-)
  • evanhevanh Posts: 15,184
    Fair enough, wasn't a needed discussion.

    The MOSFET gate voltage certainly looks amusing. It's a bit of a wow moment watching it the first time.
Sign In or Register to comment.