How to work with transfer functions that are challenging to reduce to standard form?

21 views (last 30 days)
I am trying to model a DC motor driving a load in Simulink by implementing a transfer function block.
I model the system as follows:
From the electrical perspective, I consider a simple equivalent series circuit consisting of input voltage , resistance , inductance , and motor back-emf .
Applying KVL around this loop, I obtain the equation .
From the mechanical perspective, I consider a motor torque , motor moment of inertia , damping term (due to bearings), and angular displacement . The motor is connected to a load with moment of inertia by a shaft of stiffness , resulting in displacement of the load by .
Applying Newton's second law to , I obtain the equation
Applying Newton's second law to , I obtain the equation
To couple the electrical and mechanical elements, I use 2 relations:
1. for some back-emf constant
2. for some motor torque constant
Eliminating and and solving for the transfer function , I obtain
To manipulate this transfer function into a form usable in Simulink (i.e., with unity leading coefficient) will be analytically tedious. Is there an easy workaround for cases like this that I am unaware of?
I know that I can create a state-space model by substituting the coupling relations directly into the differential equations. This is usally my preferred method, but I am hoping to expand my skillset by solving the problem a different way.
Thanks!
Edit: Figured it out! I'll leave the (really obvious) answer here in case someone searches for a similar issue.
s = tf('s')
can be used to define a transfer function as a rational expression.
Ex:
Jm = 3E-6; %% kg.m^2
Bm = 3.5E-6; %% N.m.s
J1 = 5; %% kg.m^2
R = 4; %% ohms
L = 2.75E-6; %% Henries
K1 = 1; %% N.m/rad
K = 0.0275; %% V/rad/sec OR N.m/A
s = tf('s');
sys = K/((J1*s^2+K1)/K1*(Jm*s^2 + Bm*s + K1 + (K^2/(s*L+R)))-K1)

Answers (1)

Sabin
Sabin on 9 Jan 2023
As already pointed out s = tf('s') creates special variable s that you can use in a rational expression to create a continuous-time transfer function model. Using a rational expression can sometimes be easier and more intuitive than specifying polynomial coefficients.
Similar we can do it for discrete systems: z = tf('z',ts) creates special variable z that you can use in a rational expression to create a discrete-time transfer function model. To leave the sample time unspecified, set ts input argument to -1.

Products


Release

R2019a

Community Treasure Hunt

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

Start Hunting!