Defining an improper function in Simulink
17 views (last 30 days)
Show older comments
I want to implement this transfer function model related to viscous friction in simulink : Ms^2 + ws which means it does not have a denominator thus cannot be defined in simulink since it has a greater value of numerator than the denominator meaning it is an improper function, are there any workarounds that i can implements so that i can define this transfer function? Thank you very much.
1 Comment
Sam Chak
on 18 Jan 2024
Edited: Sam Chak
on 18 Jan 2024
Before incorporating @Andy Bartlett's practical suggestion to approximate the improper transfer function, are you attempting to cancelling out one pole at the origin and another at ? Additionally, "Permodelan Penyesuaian" is loosely translated to mean Adaptive Modeling. Could this possibly refer to an Adaptive Control System?
Update: Check if this is want you want
If you're attempting to model the motion of a mass M on a horizontal surface with a viscous coefficient W and an applied force F, the governing equation is likely given by
.
Taking the Laplace transform, you obtain
.
Thus, rearranging the equation to get the transfer function
.
M = 2;
W = 3;
G = tf(1, [M W 0])
%% If X is measurable and is fed back to form a closed-loop, then
Gcl = feedback(G, 1)
%% Step response
step(Gcl), grid on
Answers (2)
Andy Bartlett
on 18 Jan 2024
The Laplace operator 1/s is an integrator and s is a derivative.
But modeling things with derivatives is generally not great, super sensitive to noise.
A better practice is to model things using integrators.
I suggest looking at what you are trying to model from a higher level perspecitve. For that higher level view, see if you can re-arrange the full set of equations to use integrators instead of derivatives.
2 Comments
Andy Bartlett
on 18 Jan 2024
>> Implement it?
You mean the equation M*s^2 + W*s ?
Put two derivative blocks in series.
In parallel feed the output of the first derivative to a Gain of W
feed the output of the second derivative to a Gain of M
Another practical hack is to add "fast poles" to the transfer function.
p = value just big enough, maybe 10 rad/s, 100 rad/s, ...
So transfer function becomes
(M*s^2 + W*s) / ( (1/p)*s + 1 )^2
p big enough to allow accurate modeling of the low frequency dynamics that matter
but not so big that too much high frequency noise is allowed into the model.
Aquatris
on 18 Jan 2024
Edited: Aquatris
on 18 Jan 2024
Firstly, I do not think you understand the viscous friction model. Ms2+Ws is probably not what you think it is.
To answer your question, one workaround is to put a low pass filter with a large enough bandwidth to have negligible effects. This would still give you same dynamics at 'low' frequency which is what ou are interested. This is also one of the reason why in most PID implementations, the derivative term is implemented with a filter. Example;
m = 10;w = 5;
s = tf('s');
x = m*s^2+w*s; % actual tf we are interested in
x2 = x/(s/1000+1)^2; % tf to be used in simulation that would give same dynamic response
% 1000 was chosen arbitrarily. ideally it should be infinity. Too large of
% a number would result slow simulation and too small would change the
% dynamics too much so you should choose it with care. generaly 10 times
% the interested bandwidth should work fine
bode(x,x2)
0 Comments
See Also
Categories
Find more on General Applications in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!