Page 1 of 1

PID controller implementation with IIR_Radix function issue

Posted: 30 Jul 2010 22:55
by bhs
Hello all,

I am currently working on a project with the dsPIC30F4013 in which I want to implement a PID controller. My application requires the response time to be quite short, so I´m trying to use the DSP engine to implement the controller as an IIR filter using the IIR_Radix function to make the calculations faster.

I´m getting the reference signal from one ADC input and the measured output from another ADC input and I want to subtract these quantities to get an error signal which would be the input to the filter (controller). However from the help and examples of mikroC for dsPIC I see that the function only takes unsigned values for the inputs and the error signal can be negative, so I wanted to know if the function can also take signed int values or if there is another way to do this.

Thanks in advance