Transfer function where some of the coefficients are dependent on the output Y(S)

3 views (last 30 days)
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 Comments
Wynand
Wynand on 16 Oct 2024
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

Sign in to comment.

Accepted Answer

Kothuri
Kothuri on 12 Oct 2024
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 Comment
Wynand
Wynand on 12 Oct 2024
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.

Sign in to comment.

More Answers (0)

Products


Release

R2024a

Community Treasure Hunt

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

Start Hunting!