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.

Regarding IQ using in PI loops

In a PI control loop using IQ math the inputs are like some "Ref value" and some limiting values Max +ve and Min -ve.

Ref is suppose some DC voltage like 50VDC --> _IQ22(50) 

Some time the output of PI will becomes a ref value of other PI loop. In this case we need a vary small Ref value of the second PI loop. 

So how could I manage the scale if I need a very smaller Min Max Value of Firest PI loop output Using IQ ?????? Because that value become a Ref value of next PI loop.

First loop values like : Ref 50VDC and Min Max out put to be +/- 5VDC and now this 5 will become a Ref of next PI loop...

Please help 

Ashutosh

  • If you want to increase the range for the second PI loop i suppose you can left shift the output of the first PI loop. So in the example you gave you expect +-5VDC at the output of the first PI, therefore you only need about 4 integer bits to represent values in the range from -8.0 to 7.9999... . so you can left shift the output of the first PI 6 bits to go from IQ22 to IQ28 to get maximum fractional resolution for the second PI loop.

  • ok I got the point....

    So for my ADC value should also be in _IQ28 format for correct..

    MAx value of ADC is 2048 so I i have to shift by 17bit for equal scaling.

    Error = Ref_Value (_Q28 from first loop ) - Measure_Value(ADC<<17) ;

    for best resolution ... ????


    Thank You
    Ashutosh