필터 지우기
필터 지우기

Bouc wen model in simscape model

조회 수: 14 (최근 30일)
HUANG ZI YOU
HUANG ZI YOU 2022년 3월 10일
편집: Alexander S 2024년 2월 22일
I am trying to build the Bouc wen model in simscape.
But when I run the model in simulink, the error message shows up.
Found nonlinear expression involving time derivatives. |In bouc_wen_model (line 33)
component bouc_wen_model
nodes
r = foundation.mechanical.translational.translational;
c = foundation.mechanical.translational.translational;
end
parameters
fy = {1800000,'N'}; %yield force
uy = {0.01,'m'}; %yield displacement
a = 0.1; %post yield ratio
n = 2;
beta = 0.1;
gama = 0.9;
end
branches
f : r.f -> c.f;
end
variables
x = { value = { 0, 'm'}, priority = priority.high }; % Deformation
f = {0,'N'};
v = {0,'m/s'};
z = {value = { 0, '1'}, priority = priority.high};
end
equations
f == a*(fy/uy)*x+(1-a)*fy*z;
z.der == (1-((abs(z))^n)*(beta+sign(x.der*z)*gama))*x.der/uy;
v == r.v-c.v;
v == x.der;
end
end

답변 (1개)

Lokesh
Lokesh 2024년 1월 13일
Hi,
I see that you are encountering an issue with your Simscape model.The error message "Found nonlinear expression involving time derivatives" indicates that there is an issue with the way time derivatives are used in your Simscape equations.
In your case, the problematic line seems to be:
z.der == (1-((abs(z))^n)*(beta+sign(x.der*z)*gama))*x.der/uy;
It appears that you are trying to include a nonlinear function of the derivative "x.der" and the variable "z" in the expression for "z.der". Simscape requires that the derivatives be isolated and not involved in nonlinear expressions. To fix the issue, you can introduce an intermediate variable to represent the nonlinear term and then differentiate that variable.
Here's an example of how you might restructure your equations:
component bouc_wen_model
nodes
r = foundation.mechanical.translational.translational;
c = foundation.mechanical.translational.translational;
end
parameters
fy = {1800000,'N'}; %yield force
uy = {0.01,'m'}; %yield displacement
a = 0.1; %post yield ratio
n = 2;
beta = 0.1;
gama = 0.9;
end
branches
f : r.f -> c.f;
end
variables
x = { value = { 0, 'm'}, priority = priority.high }; % Deformation
f = {0,'N'};
v = {0,'m/s'};
z = {value = { 0, '1'}, priority = priority.high}; % Hysteresis variable
w = {0, '1'}; % Intermediate variable for nonlinear term
end
equations
f == a*(fy/uy)*x + (1-a)*fy*z;
% Define the nonlinear term using an intermediate variable 'w'
w == (1-((abs(z))^n)*(beta+gama*sign(x.der*z)));
% Now, differentiate 'w' to find 'z.der'
z.der == w*x.der/uy;
v == r.v - c.v;
v == x.der;
end
end
In this revised code,an intermediate variable w is used to capture the nonlinear term involving "z" and "x.der". The derivative "z.der" is then computed using "w" and "x.der/uy", which avoids nonlinear operations on the derivative itself.
Please refer to the following MathWorks documentation to know more about ‘der’ in simscape:
I hope this resolves your query.
Best Regards,
Lokesh
  댓글 수: 2
Alexander S
Alexander S 2024년 2월 22일
Thank you for this response, the code you posted still has the same error due to the nonlinear expression sign(x.der). This could be solved by replacing x.der with v.
component bouc_wen_hysteresis
nodes
r = foundation.mechanical.translational.translational; % r:left
c = foundation.mechanical.translational.translational; % c:right
end
parameters
fy = {1800000,'N'}; %yield force
uy = {0.01,'m'}; %yield displacement
a = 0.1; %post yield ratio
n = 2;
beta = 0.1;
gama = 0.9;
end
branches
f : r.f -> c.f;
end
variables
x = { value = { 0, 'm'}, priority = priority.high }; % Deformation
f = {0,'N'};
v = {0,'m/s'};
z = {value = { 0, '1'}, priority = priority.high}; % Hysteresis variable
w = {0, '1'}; % Intermediate variable for nonlinear term
end
equations
f == a*(fy/uy)*x + (1-a)*fy*z;
% Define the nonlinear term using an intermediate variable 'w'
w == (1-((abs(z))^n)*(beta+gama*sign(v*z)));
% Now, differentiate 'w' to find 'z.der'
z.der == w*x.der/uy;
v == r.v - c.v;
v == x.der;
end
end
Alexander S
Alexander S 2024년 2월 22일
편집: Alexander S 2024년 2월 22일
This works now.

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

카테고리

Help CenterFile Exchange에서 Foundation and Custom Domains에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by