Transfer function where some of the coefficients are dependent on the output Y(S)
조회 수: 4 (최근 30일)
이전 댓글 표시
I have a problem to solve where I have a transfer function where the coefficients are a function of the system's position. This causes algebraic loops that I can't seem to put differently.
The system is an elevator where the weight and cable stiffness changes as the lift moves upwards in the following ways:
function M = fcn(y)
M = 1010+y;
end
And the stiffness is as follows:
function K = fcn(Mass, y)
K = (0.2*Mass)/(y-(y/1.0016));
end
I can neglect the mass function but the stiffness is important.
Here is the transfer function:
Y(S) = (U(S)*(k))/(M(Y)*s^3+b*s^2+k(M,Y)*s)
I have tried to implement this with the following block diagram:
Which returns an algebraic loop error.
I have verified this block diagram with constant coefficients so the only problem is the varying coefficients.
Is there any way to prevent this error from occuring without first estimating the height as a function of time and chaging the functions to be functions of time instead of "y"?
채택된 답변
Kothuri
2024년 10월 12일
Hi Wynand,
I understand that you are trying to implement the elevator system where the weight and cable stiffness changes as the lift moves upwards, and the coefficients of the transfer function are a function of the system's position which is causing algebraic loops.
Here are some of the steps you can try to avoid algebraic loops:
- By introducing a “Unit Delay” block or a “Memory” block in the feedback loop for stiffness helps to break the algebraic loop by providing the previous value of the signal. This avoids the direct dependency on the current value of “y”.
You can refer the below links for more info on “Unit Delay” and “Memory” blocks
- Use an iterative solver that can handle algebraic loops. Some solvers in Simulink are better suited for systems with algebraic loops. You can find these settings under the Solver Configuration block.
- Use the delayed or stored position values in your transfer function calculations to avoid direct algebraic dependency. This approach uses a persistent variable to store the previous value of y, thus breaking the direct dependency.
% Example of introducing a delay in stiffness calculation
function K = fcn_delayed(Mass, y)
persistent previous_y;
if isempty(previous_y)
previous_y = y;
end
K = (0.2 * Mass) / (previous_y - (previous_y / 1.0016));
previous_y = y; % Update for next iteration
end
You can refer the below documentation on “Varying Transfer Function” for better understanding https://www.mathworks.com/help/control/ref/varyingtransferfunction.html
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Classical Control Design에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!