This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

implementing a transfer function on tms320f28335

Other Parts Discussed in Thread: TMS320F28335

Hi all!

I'm working on TMS320F28335 DSP kit. I want to implement a controller with transfer function, H(s)=s/(s^2+w^2), where w is a constant. How to implement this in DSP?

 Plz help me on this.

regards,

Mahesh

  • Mahesh,

    You are showing a continuous-time transfer function in the Laplace domain 's'.  You need to convert this to a discrete-time (approximation) transfer function in the delay operator 'z'.  One way to do this is using the Bilinear Transformation, also called Tustin's Method.  In this method, you replace 's' with:

    s = (2/T)*(z-1)/(z+1)

    where

         T is the discrete-time sampling period you choose to implement

         z^-1 is the one-step unit delay in the discrete-time domain.

    You really need to consult a control systems or signal processing textbook.  You can get a start using Wikipedia:

    http://en.wikipedia.org/wiki/Bilinear_transform

    Regards,

    David

  • Mahesh,

    PR controller can be implemented using the transformation described above, 

    also we have an app note on PLL design which covers this process for PI controller see section 2.1,

    http://www.ti.com/lit/an/sprabt3/sprabt3.pdf

    you can do the similar maths for PR controller..

    Additionally i assume you are working on renewable application so you may benefit from PLL discussion.

    Regards

    Manish Bhardwaj 

  • hi all..

    can you help me in making the T( discrete-time sampling period) constant. I read in the datasheet that 80ns is ADC conversion time. so i think i can take samples at 100ns rate. how to set these sampling time to be 100ns constant? Which register should be configured and how?

    regards

    Mahesh

  • Mahesh,

    In the typical usage, the ADC itself does not set the sample rate.  Rather, it is the triggering module that sets the sample rate.  What you want to do is run the ADCCLK at the maximum 12.5 MHz, but then setup a PWM timer (for example) to trigger the ADC at the desired sampling rate.

    I must comment that a 100 ns (10 MHz) sampling rate is very fast for common C2000 applications.  I don't know what your application is of course, but are you sure you need that fast of a sampling rate?  Motor control applications for example sample at about 20 to 50 kHz.  UPS applications sample at around 50 to 80 kHz.  Digital power supply control runs between 100 and 500 kHz.  Not much uses 10 MHz sampling.  Make sure you are not confusing the conversion time (e.g. 80 ns) with the sampling rate.  The conversion time of the ADC is independent of the sampling rate.

    Regards,

    David