Is it possible to create a transfer function in Matlab with unknown constants

조회 수: 17 (최근 30일)
Dario
Dario 2023년 4월 4일
답변: Sam Chak 2023년 4월 4일
Is it possible to create a transfer function in Matlab with unknown constants for example:
G = tf([1 2],[4 K 2 T]);
  댓글 수: 2
Dyuman Joshi
Dyuman Joshi 2023년 4월 4일
Do you wish to substitute (scalar) values for K and T?
Askic V
Askic V 2023년 4월 4일
In general, control system toolbox and tf function doesn't support symbolic variables.

댓글을 달려면 로그인하십시오.

답변 (2개)

Walter Roberson
Walter Roberson 2023년 4월 4일
No.
What is possible is to create control systems with tunable parameters. A tunable parameter always has a specific value at any given time, but the set up allows the parameter to be changed easily and supports automatic tuning procedures.
In order to process with a variable that does not have a specific value then you need to use the symbolic toolbox and laplace transforms.

Sam Chak
Sam Chak 2023년 4월 4일
Not exactly sure what you meant by the unknown constants of K and T.
Equivalent state-space model
If they are tunable parameters, then you can create an equivalent state-space model:
K = 3; % parameter 1
T = 1; % parameter 2
A = [0 1 0;
0 0 1;
-T/4 -2/4 -K/4]; % state matrix
B = [0; 0; 1]; % input matrix
C = [2/4 1/4 0]; % output matrix
D = 0; % direct matrix
sys = ss(A, B, C, D); % state-space model
G1 = tf(sys) % convert to transfer function
G1 = 0.25 s + 0.5 ----------------------------- s^3 + 0.75 s^2 + 0.5 s + 0.25 Continuous-time transfer function.
G = tf([1 2],[4 K 2 T]) % original transfer function
G = s + 2 ----------------------- 4 s^3 + 3 s^2 + 2 s + 1 Continuous-time transfer function.
G2 = minreal(G) % minimal realization of G
G2 = 0.25 s + 0.5 ----------------------------- s^3 + 0.75 s^2 + 0.5 s + 0.25 Continuous-time transfer function.
It is clear that the state-space that produces has the same transfer function as .
Uncertain systems
If K and T are uncertain parameters with known nominal values, then you can consider this approach:
T = ureal('T', 1, 'PlusMinus', 0.5);
K = ureal('K', 3, 'Range', [2, 4]);
usys = tf([1 2], [4 K 2 T])
Uncertain continuous-time state-space model with 1 outputs, 1 inputs, 3 states. The model uncertainty consists of the following blocks: K: Uncertain real, nominal = 3, range = [2,4], 1 occurrences T: Uncertain real, nominal = 1, variability = [-0.5,0.5], 1 occurrences Type "usys.NominalValue" to see the nominal value and "usys.Uncertainty" to interact with the uncertain elements.
bodemag(usys)

카테고리

Help CenterFile Exchange에서 Uncertain Models에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by