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.

PI CONTROLLER IN 28335 DSP PROCESSOR C CODING

Other Parts Discussed in Thread: TMS320F28335

Hi sir

                how can we proceed with pi controller coding in 28335 dsp for a vector control of induction motor drive..i am giving a sample code what i have wriiten and already reffered...is it right?

void pispd(void)
{
    errn=spdRef-spdFbk;
    upn=kpn*errn;
    uin=uin+kin*upn+(kcn*saterrn) ;
    outpresatn=upn+uin;
    //if (outpresat > 1){angle=qoutmax ;}
       // else if( outpresat <-1){ angle=qoutmin;}
       // else outpresat=angle;
     if (outpresatn > outnmax){outn=outnmax ;}
                else if( outpresatn <outnmin){ outn=outnmin;}
                else outpresatn=outn;
           saterrn=outn-outpresatn ;
           //up1=upn;update previous proportional output
}

**Attention** This is a public forum