필터 지우기
필터 지우기

An error occurred while propagating data type 'double' through...

조회 수: 130 (최근 30일)
Joe Jones
Joe Jones 2022년 7월 16일
댓글: Joe Jones 2022년 7월 26일
Dear
I'm doing an iterative algorithm in MATLAB/Simulink/Matalb Function. However, when i run the simulation, the errors occurred.(please see the attached picture and code). If possible, please help me. Thank you very much for your help.
function gamma = cg(gamma0,voutx,tao,e1,e2,M)
beta1=gamma0(1);
beta2=gamma0(2);
beta3=gamma0(3);
beta4=gamma0(4);
beta5=gamma0(5);%gamma0 is a vector.
xd=20;%设定位置x
T=0.01;%积分步长
falf=fal(tao,0.5,0.1);
fal1=dfal(e1,0.7,0.1);
fal2=dfal(e2,0.95,0.1);
b0=1;
k=1;
N=100000;%times maximum
epsilon=1e-5;%parameter
gamma=gamma0;
while(k<N)
g=gradient(xd,voutx,fal1,fal2,falf,T,b0,M,gamma);%gradient
beta1=beta1-2*(xd-voutx)*M*(beta4*fal1*T*tao)/(1+(beta4*fal1*T+beta5*fal2)*T*b0);
beta2=beta2-2*(xd-voutx)*M*T*falf*(beta4*fal1*T+beta5*fal2)/(1+(beta4*fal1*T+beta5*fal2)*T*b0);
beta3=beta3-2*(xd-voutx)*M*((beta4*fal1*T+beta5*fal2)*T*T+T/b0)*falf/(1+(beta4*fal1*T+beta5*fal2)*T*b0);
beta4=beta4-2*(xd-voutx)*M*fal1/(1+(beta4*fal1*T+beta5*fal2)*T*b0);
beta5=beta5-2*(xd-voutx)*M*fal2/(1+(beta4*fal1*T+beta5*fal2)*T*b0);%the three parameters that need to be adjusted
gamma=[beta1;beta2;beta3;beta4;beta5];%vector
if(norm(g)<epsilon), break; end
end
  댓글 수: 19
Fangjun Jiang
Fangjun Jiang 2022년 7월 25일
This is probably where the help from this community ends. The simulation of the Simulink model runs but it is extremely slow and it stopped due to instability of the simulation. You need to consult the expert in your field to resolve the problem. Most likely the parameters of the ADRC is too aggressive. Avoid directly derivative.
Joe Jones
Joe Jones 2022년 7월 26일
Dear
Thank you for your time and effort you have put into my problems. Your help is of great significance for me to solve the problem. I will continue to do my best to resolve these errors. Thank you again!@Fangjun Jiang
Wish you every success!

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by