How do I obtain the transfer function of this model? Simulink Linearization
10 views (last 30 days)
Show older comments
I'm trying to obtain the transfer function of this model using the linear analysis program. I've placed an input at voltage input and an output at the velocity output and I obtain a transfer function of the form (1830)/(s^2+216.2s+6972) . However when I plot the transfer function it appears to be greater than the values of the model below. I don't think linearization is taking into account the electromotive force that is being subtracted on the bottom of the model. I think the path the linearization is taking is from voltage input to velocity output and is not linearizing the bottom of the model where it's supposed to be (velocity output * (r2/(r1*r3)) * kb)- voltage input and also not taking into account the sum block between the gain and transfer function, W*sind(alpha) since the value is greater than my models.
Here is the comparison of the 2 plots.
Here is the parameters code I'm using and I have attached a file for the simulink model that shows comparison.
clear all
clc
r3=0.0254; %R3 (meters)
r2=0.03; %R2 (meters)
r1=0.05; %R1 (meters)
N=r2/(r1*r3) % from rad/s to m/s
alpha=20; % inclination in degrees
theta1=alpha/180*pi; % inclination in radians
kb=0.15; %back-emf constant V/(rad/s)
ka=kb; %torque constant Nm/A
Jm=1.6e-3; %MOMENT OF INERTIA OF THE ROTOR kg m^2
JL=100*Jm; %moment of inertia of the load kg m^2
bm=.02; % viscous friction of motor Nm/(rad/s)
bL=2*bm;
m=4; % mass of box (kg)
W=m*9.81; %newtons
La=9.35e-3; %inductance of motor in H
Ra=2; %resistance of motor ohms
Va=24; %Maximum input voltage in V
mequivalent=(((Jm*r2)/(r1*r3))+((m*r1*r3)/r2))
bequivalent=(((bm*r2)/(r1*r3))+((bL*r1*r3)/r2))
0 Comments
Accepted Answer
Paul
on 15 Aug 2022
Edited: Paul
on 15 Aug 2022
Hi Jacob,
The Simulink linearization is coming up with the correct answer as far as I can tell:
r3=0.0254; %R3 (meters)
r2=0.03; %R2 (meters)
r1=0.05; %R1 (meters)
N=r2/(r1*r3); % from rad/s to m/s
alpha=20; % inclination in degrees
theta1=alpha/180*pi; % inclination in radians
kb=0.15; %back-emf constant V/(rad/s)
ka=kb; %torque constant Nm/A
Jm=1.6e-3; %MOMENT OF INERTIA OF THE ROTOR kg m^2
JL=100*Jm; %moment of inertia of the load kg m^2
bm=.02; % viscous friction of motor Nm/(rad/s)
bL=2*bm;
m=4; % mass of box (kg)
W=m*9.81; %newtons
La=9.35e-3; %inductance of motor in H
Ra=2; %resistance of motor ohms
Va=24; %Maximum input voltage in V
mequivalent=(((Jm*r2)/(r1*r3))+((m*r1*r3)/r2));
bequivalent=(((bm*r2)/(r1*r3))+((bL*r1*r3)/r2));
s = tf('s');
G = series(ka*r2/(r1*r3)/(La*s + Ra),1/(mequivalent*s + bequivalent));
H1 = feedback(G,kb*r2/(r1*r3));
Use minreal to normalize the leading coefficient of the denominator.
H1 = minreal(H1)
The step response:
step(H1,1)
The unit step response doesn't match either plot in the scope (I'm not not sure how the scope has two plots). However, H1 is is the TF from volatage-input to velocity output. If we need to take into account the effect of the other input, then we need to compute its TF separately
G = 1/(mequivalent*s + bequivalent);
H2 = -feedback(G,series(ka*r2/(r1*r3)/(La*s + Ra),kb*r2/(r1*r3)));
H2
H2 = minreal(H2)
Now H1 is the TF from the voltage input to the velocity and H2 is the TF from the W*sind(alpha) input to the velocity. The velocity in reponse to steps at each input is the sum of the H1 and H2 after scaling each by the amplitudes of the respective steps.
step(Va*H1,W*sind(alpha)*H2,Va*H1+W*sind(alpha)*H2,1)
legend('Va*H1','W*sind(alpha)*H2','blue + red')
The blue curve here seems to match the blue curve in the scope. What's the yellow curve in the scope (it seems to match the yellow curve in the plot above)? How does the scope have two traces? It looks like there is only a single input.
2 Comments
Paul
on 15 Aug 2022
If I understand correctly, the yellow line in my plot should match the output when running the Simulink model, which I guess is the yellow trace in the scope. The blue curve in my plot and in the scope should match, IF in the linearizer app the step response was somehow scaled by Va. The yellow curve in my plot is the sum of the blue and the red (or orange, I suppose), which is the output of the system in reponse to Va step at the voltage input and the W*sind(alpha) step input.
More Answers (0)
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!