How do I obtain the transfer function of this model? Simulink Linearization

15 Ansichten (letzte 30 Tage)
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))

Akzeptierte Antwort

Paul
Paul am 15 Aug. 2022
Bearbeitet: Paul am 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)
H1 = 1830 -------------------- s^2 + 216.2 s + 6972 Continuous-time transfer function.
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 = -0.00935 s - 2 ------------------------------ 0.001937 s^2 + 0.4187 s + 13.5 Continuous-time transfer function.
H2 = minreal(H2)
H2 = -4.828 s - 1033 -------------------- s^2 + 216.2 s + 6972 Continuous-time transfer function.
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 Kommentare
Jacob Villarreal
Jacob Villarreal am 15 Aug. 2022
The blue curve in my plot is the transfer function I obtained from doing linearization with the simulink app. The yellow curve is the output of my simulink model that I'm supposed to obtain. So I need to combine the blue line and the orange line in your plot to obtain the yellow line? The transfer function of the yellow line in your plot is then equal to Va*H1+W*sind(alpha)*H2? The sum of H1 and H2?
Paul
Paul am 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.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu General Applications finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by