# How can I define a block ( Transfer Fcn) in simulink?

10 ビュー (過去 30 日間)
Mur@t 2024 年 4 月 6 日
コメント済み: Sam Chak 2024 年 4 月 13 日
hi ,
M=kg and , A=Area , Both are constant numbers ,
How can I define a block ( Transfer Fcn) in simulink?
Numerator [ ] ?
Denominator [ ] ?
Error :
• The given transfer function is an improper transfer function. The order of the transfer function numerator must be less than or equal to the order of the denominator.
thank you for your support

サインインしてコメントする。

### 採用された回答

Sam Chak 2024 年 4 月 6 日

Hi @M1A
Linear time-invariant models with more zeros than poles are not supported in Simulink. However, you can create such a model in MATLAB using the code provided below.
Solution in MATLAB:
% parameters
M = 1;
A = 1;
% method 1
Gzp = tf([M/A 0 0], 1)
Gzp = s^2 Continuous-time transfer function.
% method 2
s = tf('s');
Gzp = (M/A)*s^2
Gzp = s^2 Continuous-time transfer function.
If you still wish to model it in Simulink, you can approximate it by cascading it with a 2nd-order lowpass filter.
N = 10^2; % desired Bandwitdh
Gf = (1/((1/N)*s + 1))^2 % 2nd-order lowpass filter
Gf = 1 ----------------------- 0.0001 s^2 + 0.02 s + 1 Continuous-time transfer function.
Gzp = (s^2)*Gf
Gzp = s^2 ----------------------- 0.0001 s^2 + 0.02 s + 1 Continuous-time transfer function.
margin(Gf), grid on
Since is a static gain, it is easy to connect a Gain block to the Transfer Fcn block.
##### 3 件のコメント1 件の古いコメントを表示1 件の古いコメントを非表示
Paul 2024 年 4 月 7 日

Another option may be avaiable.
IF the structure of the block diagram has other transfer functions (or any LTI system, really) directly in series with M*s^2/A, and the product of those transfer functions have a relative order of at least 2, then you can distribute the s^2 into those other transfer functions and retain the same overall input/output relatiionship, which avoids the need for high frequency poles, which can affect step size.
Fore example, suppose the block diagram has a first order transfer function on either side of M*s^2/A
(1/(a*s + 1)) * (M*s^2/A) * (1/(b*s + 1))
The I/O equivalent is
(s/(a*s + 1)) * (M/A) * (s/(b*s + 1))
The downside of this approach is that we lose the physical meaning of the internal signals.
Sam Chak 2024 年 4 月 7 日
Hi @M1A
While it is technically feasible to include M/A in the coefficients of the transfer function, connecting the Gain block, as demonstrated in my revised answer above, might be a more straightforward approach.
Are you attempting to estimate the acceleration of the physical state? Perhaps you could consider experimenting with @Paul's suggestion. Please let me know if the workaround is suitable for your application.

サインインしてコメントする。

### その他の回答 (2 件)

Mur@t 2024 年 4 月 7 日

No acc, its electrohydrolic system , It is a disruptive input (disturbance input) to a control system.
I used gain block as you showed. Also I will research 2nd low pass filter for Simulink.
Thank you for your share and information. The image is a partial region.
thank you @Sam Chak , thank you @Paul
##### 0 件のコメント-2 件の古いコメントを表示-2 件の古いコメントを非表示

サインインしてコメントする。

Mur@t 2024 年 4 月 13 日
@Sam Chak Can you check the answer again, just for filtering? I see that second-Order Filter block implements the following transfer functions , could it have been written low instead of high? Is there a different situation? I interpreted it differently? thanks
In the simscape library it looks like this.
Simscape / Electrical / Specialized Power Systems / Control / Filters
##### 1 件のコメント-1 件の古いコメントを表示-1 件の古いコメントを非表示
Sam Chak 2024 年 4 月 13 日
The documentation is accurate. The concept of filters is discussed in the context of signal processing and linear circuit systems, which are typically essential topics in Electrical & Electronics Engineering. If you search for information, you will discover that time derivative operators can be considered high-pass filters. Mathematically, this involves arranging the ideal form and the second-order lowpass filter in a cascading configuration.
s = tf('s');
wn = 10^2; % desired Bandwitdh
Gf = (1/((1/wn)*s + 1))^2 % 2nd-order lowpass filter
Gf = 1 ----------------------- 0.0001 s^2 + 0.02 s + 1 Continuous-time transfer function.
Gf = minreal(Gf) % lowpass filter in standard form
Gf = 10000 ------------------ s^2 + 200 s + 1e04 Continuous-time transfer function.
M = 5;
A = 0.00015;
Gzp = (M/A*s^2)*Gf
Gzp = 3.333e08 s^2 ------------------ s^2 + 200 s + 1e04 Continuous-time transfer function.
Gzp = minreal(Gzp) % This is a highpass filter with K = M/A*wn^2
Gzp = 3.333e08 s^2 ------------------ s^2 + 200 s + 1e04 Continuous-time transfer function.
K = M/A*wn^2
K = 3.3333e+08

サインインしてコメントする。

### カテゴリ

Help Center および File ExchangeGain Scheduling についてさらに検索

R2023b

### Community Treasure Hunt

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

Start Hunting!

Translated by