F28069 Piccolo differentiator

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

Submitted by benl on Mon, 01/30/2012 - 19:39 

 

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

Tagged:

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited November 2020

    Submitted by Anders89 on Tue, 01/31/2012 - 03:16.

    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.

    Unable to find an attachment - read this blog