Matlab error in simulink for numerator of transfer function 'Unable to use a value of type tf as an index'

46 vues (au cours des 30 derniers jours)
I have simulink model contains multiple subsystems and one of the subsystem contains transfer functions which is defined in Matlab script as:
Z_tot = (1/(s*C_MOSFET))*(R_MOSFET + Z_C_Cu_Rcu_Rdielec_Z_ans)/((R_MOSFET + Z_C_Cu_Rcu_Rdielec_Z_ans)+(1/(s*C_MOSFET)));
[num_th,den_th] = tfdata(Z_tot,'v');
And when i simulate my model i have one error related to transfer functions. The full error sstatement is shown as below.
Invalid setting in 'model_1/GoKart/Inverter/T_junction_MOSFET/Transfer Fcn Heat sink 1' for parameter 'Numerator'.
Caused by:
Error evaluating parameter 'Numerator' in 'model_1/GoKart/Inverter/T_junction_MOSFET/Transfer Fcn Heat sink 1'
Unable to use a value of type tf as an index.
Please give me some recomendations to solve the problem.
Thanks in advance!
  2 commentaires
Selam Dagne
Selam Dagne le 22 Avr 2020
Hi Jyotsna;
Thank you for your replay!
Here is my simulink model with m-files.
Thank you in advance!

Connectez-vous pour commenter.

Réponse acceptée

Jyotsna Talluri
Jyotsna Talluri le 25 Avr 2020
Modifié(e) : Jyotsna Talluri le 25 Avr 2020
Here variable s represents the transfer function and cannot be used as an index to access the elements of the arrays num_th_Case, den_th_Case.Instead you can specify the whole arrays num_th_Case and den_th_Case in the numerator and denominators of the transfer functions

Plus de réponses (1)

siti nurul ain zakaria
siti nurul ain zakaria le 16 Avr 2022
Modifié(e) : siti nurul ain zakaria le 16 Avr 2022
num=[1 23 4 17];
den=[21 5 6 7 3];
g1=tf(num,den);
g2=zpk(g1)
Unable to use a value of type tf as an index.
how i want to fix this for line 4

Catégories

En savoir plus sur Programmatic Model Editing 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!

Translated by