LTPDA Toolbox™ | contents | ![]() ![]() |
|
System identification in s-domain is performed with the function sDomainFit. It is based on a modeified version of the vector fitting algorithm. Details on the core agorithm can be found in [1 - 2].
The function performs a fitting loop to automatically identify model order and parameters in s-domain. Output is a s-domain model expanded in partial fractions:
r1 rN f(s) = ------- + ... + ------- + d s - p1 s - pN
Since the function can fit more than one input analysis object at a time with a common set of poles, output parfrac are embedded in a matrix (note that this characteristic will be probably changed becausse of the introduction of the collection class).
Identification loop stops when the stop condition is reached. Stop criterion is based on three different approachs:
The function can also perform a single loop without taking care of the stop conditions. This happens when 'AutoSearch' parameter is set to 'off'.
In this example we fit a given frequency response to get a partial fraction model. For the meaning of any parameter please refer to ao and sDomainFit documentation pages.
pl = plist(... 'fsfcn', '(1e-3./(f).^2 + 1e3./(0.001+f) + 1e5.*f.^2).*1e-10',... 'f1', 1e-6,... 'f2', 5,... 'nf', 100); a = ao(pl); a.setName; % Fit parameter list pl_fit = plist(... 'AutoSearch','on',... 'StartPolesOpt','clog',... 'maxiter',50,... 'minorder',7,... 'maxorder',15,... 'weightparam','abs',... 'CONDTYPE','MSE',... 'FITTOL',1e-3,... 'MSEVARTOL',1e-2,... 'Plot','on',... 'ForceStability','off'); % Do fit mod = sDomainFit(a, pl_fit);
mod is a matrix object containing a parfrac object.
>> mod ---- matrix 1 ---- name: fit(a) size: 1x1 01: parfrac | parfrac(fit(a)) description: UUID: 2dc1ac28-4199-42d2-9b1a-b420252b3f8c ------------------
>> mod.objs ---- parfrac 1 ---- model: fit(a) res: [1.69531090137847e-006;-1.69531095674486e-006;1.39082537801437e-007;-1.39094453401266e-007;3.9451875151135e-007;-3.94524993613367e-007;4.53671387948961e-007;-4.53664974359603e-007;1124.81020427899;0.000140057852149302-i*0.201412268649905;0.000140057852149302+i*0.201412268649905] poles: [-1.18514026248382e-006;1.18514354570495e-006;-0.00457311582050939;0.0045734088943545;-0.0316764149343339;0.0316791653277322;-0.276256442292693;0.27627799022013;330754.550617933;-0.0199840558095427+i*118.439896186467;-0.0199840558095427-i*118.439896186467] dir: 0 pmul: [1;1;1;1;1;1;1;1;1;1;1] iunits: [] ounits: [] description: UUID: 2afc4c82-7c2a-4fe3-8910-d8590884d58c -------------------
![]() |
Z-Domain Fit | Graphical User Interfaces in LTPDA | ![]() |
©LTP Team