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"?
10 件のコメント
採用された回答
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!