F28069 Piccolo differentiator

I'd like to find the time derivative of a measured input signal to a F28069 Piccolo. Is there a standard fixed-point solution for this?

Many thanks,

Ben

A couple points Ben:The

A couple points Ben:

  1. The 28069 is a floating point part, so you don't need to do fixed point.
  2. The transfer function block has an S->Z bilinear transform button so you can convert from S domain to Z domain easily.
  3. The transfer function block also has a use scaled fixed-point option so you can do fixed point sim and codegen if you want.
  4. The simplest derivative is simply (u(k) - u(k-1))/dT which you can do with our 1/Z blocks, but due to standard ADC sampling noise, this method would tend amplify the noise and obscure your derivative. You can filter this by inserting a low or high pass filter before the derivative stage, or you can use a single pole filter that will give derivatives of low frequency components: s / (Tc s + 1) where Tc is the time constant of the signal you want a derivative of.
    How you go depends a lot on the frequency and s/n ratio of your signal and what use you want to make of the derivative.