How can I extract the coeffs. of a first order TF model?
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello everyone,
I have a very simple system (b/(z+a)) implemented in SIMULINK.

In the DAQ (data aqc.) phase I have 2 arrays 1000x1 (u, y) for which I want to calculate using OE, ARX and ARMAX functions the coefficents of the system. The idea is that I already know the coeffs (a, b) and I will compare the results or the estimated errors.
What I am strugling to do is to extract the coeffs of the functions.
So for example when I run: oe(Date_pt_estimare, [nb nf nk]); -> I get:
est_oe =
Discrete-time OE model: y(t) = [B(z)/F(z)]u(t) + e(t)
B(z) = 4.9 z^-1
F(z) = 1 + 0.69 z^-1
Sample time: 0.001 seconds
Parameterization:
Polynomial orders: nb=1 nf=1 nk=1
Number of free coefficients: 2
Use "polydata", "getpvec", "getcov" for parameters and their uncertainties.
Status:
Estimated using OE on time domain data "Date_pt_estimare".
Fit to estimation data: 100%
FPE: 1.917e-31, MSE: 1.904e-31
So what I want to do is to extract the coeff. of B(z) and F(z). Something like:
Extracted_param1 = function(oe(Date_pt_estimare, [nb nf nk], 1); 0< Extracted_param = 4.9
Extracted_param2 = function(oe(Date_pt_estimare, [nb nf nk], 1); 0< Extracted_param = 0.69
I hope I made me clear!
Below you can find my code.
%% Date initiale
h = 1e-3; % [ms] > pasul de esantionare
K = 29; % [-] > nr. catalog
N = 1000; % [-] > nr. esantioane
a = (0.4+0.01*K);
b = (2+0.1*K);
fprintf('Valoarea parametrilor este: a = %.2f si b = %.2f, pentru numarul de la catalog K = %d\n', a, b, K);
%% 2.Determinarea oridnelor caracteristice sistemului
na = 1;
nb = 1;
nc = 1;
nf = 1;
nk = 1;
%% 3.Prelucrarea datelor achizitionate
Date_pt_estimare = iddata(y, u, h);
%% 4.Estimarea parametrilor sistemului discret
est_oe = oe(Date_pt_estimare, [nb nf nk]);
est_arx = arx(Date_pt_estimare, [na nb nk]);
est_armax = armax(Date_pt_estimare, [na nb nc nk]);
0 commentaires
Réponses (1)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!