Skip to content

Question regarding injection type D #73

@sorincezar

Description

@sorincezar

Hi,

I was looking at the project to try and learn more about high frequency injection methods.

With HFI type D you have this code (from MESChfi_Run)

		case HFI_TYPE_D:
			if(_motor->HFI.inject_high_low_now ==1){
			  _motor->HFI.Vd_injectionV = +_motor->meas.hfi_voltage;
			}else{
			  _motor->HFI.Vd_injectionV = -_motor->meas.hfi_voltage;
			}
			if(_motor->FOC.didq.q>1.0f){
				_motor->FOC.didq.q = 1.0f;
			}
			if(_motor->FOC.didq.q<-1.0f){
				_motor->FOC.didq.q = -1.0f;
			}
			intdidq.q = (intdidq.q + 0.1f*_motor->FOC.didq.q);

			if(intdidq.q>10){intdidq.q=10;}
			if(intdidq.q<-10){intdidq.q=-10;}
			_motor->FOC.FOCAngle += (int)(250.0f*_motor->FOC.IIR[1] + 10.50f*intdidq.q)*_motor->FOC.d_polarity;


I don't see anywhere in the code where FOC.IIR[1] is updated. What signal is it meant to filter ?

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions