# How can I get the transfer function G(s) = (X2(s)-W(s))/W(s)

19 views (last 30 days)
Bob on 23 Apr 2016
Commented: Walter Roberson on 29 Nov 2020
According to the site below, how can I get the transfer function G(s) = (X2(s)-W(s))/W(s)
%%Parameters
m1 = 2500; % (kg)
m2 = 320; % (kg)
k1 = 80000; % (N/m)
k2 = 500000; % (N/m)
b1 = 350; % (N*s/m)
b2 = 15020; % (N*s/m)
%%Transfer Function (Open Loop)
% Displacement Of Sprung Mass G(s) = X1(s)/W(s)
num1 = [(0) (0) (b1*b2) (b1*k2+b2*k1) (k1*k2)];
den1 = [(m1*m2) (m1*b1+m1*b2+m2*b1) (m1*k1+m1*k2+m2*k1+b1*b2) (b1*k2+k1*b2) (k1*k2)];
G1 = tf(num1,den1);
% Suspension Deflection G(s) = (X1(s)-X2(s))/W(s)
num2 = [(0) (-m1*b2) (-m1*k2) (0) (0)];
den2 = [(m1*m2) (m1*b1+m1*b2+m2*b1) (m1*k1+m1*k2+m2*k1+b1*b2) (b1*k2+k1*b2) (k1*k2)];
G2 = tf(num2,den2);
% Tire Deflection G(s) = (X2(s)-W(s))/W(s)
% num3 = [];
% den3 = [];
% G3 = tf(num3,den3);
Azzi Abdelmalek on 23 Apr 2016

Star Strider on 23 Apr 2016
It seems to me that you just copy it from the website and paste it to a tab in your Editor, just like I copied it and pasted it here:
M1 = 2500;
M2 = 320;
K1 = 80000;
K2 = 500000;
b1 = 350;
b2 = 15020;
s = tf('s');
G1 = ((M1+M2)*s^2+b2*s+K2)/((M1*s^2+b1*s+K1)*(M2*s^2+(b1+b2)*s+(K1+K2))-(b1*s+K1)*(b1*s+K1));
G2 = (-M1*b2*s^3-M1*K2*s^2)/((M1*s^2+b1*s+K1)*(M2*s^2+(b1+b2)*s+(K1+K2))-(b1*s+K1)*(b1*s+K1));
If you want to know how it was derived, that is described in detail on the page.
Star Strider on 23 Apr 2016
My pleasure.
When I looked at it again, the wheel-tire system looks like a simple spring-mass-damper that could be modeled by a second-order linear ordinary differential equation. (You could solve that on paper easily with Laplace transforms, or with the Symbolic Math Toolbox, or code it as an anonymous function to use ode45.)
I’m not a mechanical engineer, but spring-mass-damper systems seem to be modeled by the same dynamics whether the spring is in series or in parallel with the dashpot. (In an electrical circuit, series systems would be modeled differently than parallel systems, because of Kirchoff’s laws.)

Thomas John on 29 Nov 2020
A=[(1100*s+2200) -(1100*s+2200) 0;
-(1100*s+2200) (1100*s^2+3300*s+4400) -(1100*s+2200);
0 -(1100*s+2200) (1100*s^2+3300*s+4400)];
A2=[(1100*s+2200) -(1100*s+2200) 0;
U 0 0;
0 -(1100*s+2200) (1100*s^2+3300*s+4400)];
i need to find det(A2)/det(A) but i end up with error
##### 2 CommentsShowHide 1 older comment
Walter Roberson on 29 Nov 2020
s = tf('s')
then you cannot proceed because tf does not permit unresolved variables such as U.
So use the symbolic toolbox
syms s U
and proceed. You will probably want to simplify()
The result will be a typical transfer function but one that has a gain of U/1100. You cannot bring that back as a tf for Control Systems purposes as the toolbox does not permit unresolved parameters.
The toolbox does permit tunable parameters, which always have a current value but the value is easily changed, including possibly automatically by tuning procedures.