Is it possible to create a transfer function in Matlab with unknown constants
17 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Is it possible to create a transfer function in Matlab with unknown constants for example:
G = tf([1 2],[4 K 2 T]);
2 commentaires
Askic V
le 4 Avr 2023
In general, control system toolbox and tf function doesn't support symbolic variables.
Réponses (2)
Walter Roberson
le 4 Avr 2023
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.
0 commentaires
Sam Chak
le 4 Avr 2023
Hi @Dario
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
G = tf([1 2],[4 K 2 T]) % original transfer function
G2 = minreal(G) % minimal realization of G
It is clear that the state-space that produces
has the same transfer function as
.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1344794/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1344799/image.png)
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])
bodemag(usys)
0 commentaires
Voir également
Catégories
En savoir plus sur Uncertain Models dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!