Extended Kalman Filter code generation error

조회 수: 2 (최근 30일)
Mikael_P
Mikael_P 2023년 6월 28일
댓글: Raghu Boggavarapu 2023년 7월 14일
Hi,
I am facing some challenges when trying to convert my EKF function to C code using the matlab Coder App. i have declared my own state transition funcion and measurement function and the code is running fine in Matlab. However, when I am truing to convert the EKF function to C code I receive the error:
"Failed to compute constant value for nontunable property 'pDataType'. In code generation, nontunable properties can only be assigned constant values."
I guess this is somehow related to the function handles when creating the extendedKalmanFilter object, but I haven't been able to solve the issue. Does someone have experience or knowledge on this and how should I proceed?
my EKF object is defined as:
persistent myFilter
if isempty(myFilter)
myFilter = extendedKalmanFilter(@aug_dynamic_model,@measurement_model,xkm1);
end
myFilter.StateCovariance = Pkm1;
myFilter.ProcessNoise = Q_t;
myFilter.MeasurementNoise = R_t;
  댓글 수: 1
Raghu Boggavarapu
Raghu Boggavarapu 2023년 7월 14일
Could you please post the code that assigns value to pDataType ?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Control System Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by