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 个评论
Wynand
Wynand 2024-10-16
I am not sure why but I seem to be unable to type anything in the questions description when I try and post new questions

请先登录,再进行评论。

采纳的回答

Kothuri
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
  1 个评论
Wynand
Wynand 2024-10-12
HI, @Kothuri.
Thank you so much for your answer. This was what I was looking for. I ended up doing 'snapshots' of the system at different points and just extrapolating from there but this would have been a great implementation as well.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Classical Control Design 的更多信息

产品


版本

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by