cancel
Showing results for 
Search instead for 
Did you mean: 

About the feedforward control calculation problem in 5.2 (FF_VqdffComputation)

hchao
Associate

The feedforward control block diagram in the official data is as follows:

 0690X000006Deq7QAC.png

However, the calculation result in FF_VqdffComputation is different, taking ΔUq as an example.

ΔUq = (Ke + Ld*Id)*2*pi*p*fr + Uq

The code in FF_VqdffComputation is as follows:

/*q-axes ff voltage calculation */
  wtemp1 = ( ( ( int32_t )( hSpeed_dpp ) * Iqdref.qI_Component2 ) / ( int32_t )32768 );
  wtemp2 = ( wtemp1 * pHandle->wConstant_1D ) / ( int32_t )( hAvBusVoltage_d );
  wtemp2 *= ( int32_t )2;
 
  wtemp1 = ( ( pHandle->wConstant_2 * hSpeed_dpp ) / ( int32_t )hAvBusVoltage_d )
           * ( int32_t )16;
 
  wtemp2 = wtemp1 + wtemp2 + pHandle->VqdAvPIout.qV_Component1;
 
  SATURATION_TO_S16( wtemp2 )
 
  pHandle->Vqdff.qV_Component1 = ( int16_t )( wtemp2 );

Where pHandle->VqdAvPIout.qV_Component1 is the value of the Uq* filter in the block diagram.

When Uqd is corrected by feedforward control in the FF_VqdConditioning() function, Uq is added.

The code in FF_VqdConditioning is as follows

wtemp = ( int32_t )( Vqd.qV_Component1 ) + pHandle->Vqdff.qV_Component1;

Where Vqd is Uq*, Ud* in the block diagram

Please help me to confirm, is it my understanding of the error, or the code error?

1 REPLY 1
Claire O.
ST Employee

Dear customer,

Thanks for pointing this difference.

We will check your findings with our experts and modify or the code/ or the docs.

Thanks,

Claire