fitting curve for Simulink

조회 수: 7 (최근 30일)
Daniel Klasmeier
Daniel Klasmeier 2023년 6월 15일
답변: Pramil 2023년 6월 16일
Hi,
i'm looking for a specific block in Simulink.
I want to process the output of a PID with a fitting curve.
eg:
0,00 - 0,25
constant x-10
0,25 - 0,75
linear x-10 to x+10
0,75 - 1,00
constant x+10
Is there a premade block for this or do I have to write it myself?
best regards
  댓글 수: 1
Kautuk Raj
Kautuk Raj 2023년 6월 16일
I don't think there is any pre-made block in Simulink that directly implements the fitting curve logic you described. However, you can implement this logic using a combination of built-in blocks and custom MATLAB code.

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

답변 (1개)

Pramil
Pramil 2023년 6월 16일
You can use the Matlab Function block and define the function as per your need :
function y = process_pid_output(u)
if u < 0.25
y = u - 10;
elseif u < 0.75
y = ((u - 0.25) * 20) - 10;
else
y = u + 10;
end
end

카테고리

Help CenterFile Exchange에서 Schedule Model Components에 대해 자세히 알아보기

태그

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by