How to work with transfer functions that are challenging to reduce to standard form?
12 次查看(过去 30 天)
显示 更早的评论
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
.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/244608/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/244609/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/244610/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/244611/image.png)
Applying KVL around this loop, I obtain the equation
.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/244612/image.png)
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
.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/244613/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/244614/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/244615/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/244616/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/244617/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/244618/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/244619/image.png)
Applying Newton's second law to
, I obtain the equation ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/244621/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/244617/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/244621/image.png)
Applying Newton's second law to
, I obtain the equation ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/244623/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/244614/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/244623/image.png)
To couple the electrical and mechanical elements, I use 2 relations:
1.
for some back-emf constant ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/244625/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/244624/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/244625/image.png)
2.
for some motor torque constant ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/244627/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/244626/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/244627/image.png)
Eliminating
and
and solving for the transfer function
, I obtain ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/244631/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/244613/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/244616/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/244630/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/244631/image.png)
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)
0 个评论
回答(1 个)
Sabin
2023-1-9
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Classical Control Design 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!