| Robust Control Toolbox™ | |
| Provide feedback about this page |
Fit frequency response magnitude data with stable, minimum-phase state-space model
Syntax
Description
B = fitmagfrd(A,N)
is a stable, minimum-phase ss object, with state-dimension N, whose frequency response magnitude closely matches the magnitude data in A. A is a 1-by-1 frd object, and N is a nonnegative integer.
B = fitmagfrd(A,N,RD)
forces the relative degree of B to be RD. RD must be a nonnegative integer whose default value is 0. You can specify the default value for RD by setting RD to an empty matrix.
B = fitmagfrd(A,N,RD,WT)
uses the magnitude of WT to weight the optimization fit criteria. WT can be a double, ss or frd. If WT is a scalar, then it is used to weight all entries of the error criteria (A-B). If WT is a vector, it must be the same size as A, and each individual entry of WT acts as a weighting function on the corresponding entry of (A-B). The default value for WT is 1, and you can specify it by setting WT to an empty matrix.
B = fitmagfrd(A,N,RD,WT,C)
enforces additional magnitude constraints on B, relative to A as:
where w denotes the frequency. C should be a scalar, double, or frd, with C.Frequency equal to A.Frequency.
Examples
You can use the fitmagfrd command to fit frequency response magnitude data. Create frequency response data from a fifth-order system.
sys = tf([1 2 2],[1 2.5 1.5])*tf(1,[1 0.1]); sys = sys*tf([1 3.75 3.5],[1 2.5 13]); omeg = logspace(-1,1); sysg = abs(frd(sys,omeg)); bodemag(sysg,'r');
![]()
Fit the magnitude data with a minimum-phase, stable third-order system:
Fit the magnitude data with a third order system constrained to lie below and above the given data.
b2 = fitmagfrd(sysg,ord,[],[],-1); b2g = frd(b2,omeg); b3 = fitmagfrd(sysg,ord,[],[],1); b3g = frd(b3,omeg); bodemag(sysg,'r',b1g,'k:',b2g,'b-.',b3g,'m--')
![]()
Algorithm
fitmagfrd uses a version of log-Chebychev magnitude design, solving
plus additional constraints imposed with C. n, d denote the numerator and denominator, respectively, and B = n/d. n and d have orders (N-RD) and N, respectively. The problem is solved using bisection on f and linear programming for fixed f. An alternate approximate method, which cannot enforce the constraints defined by C, is B = fitfrd(genphase(A),N,RD,WT).
Limitations
This input frd object must be either a scalar 1-by-1 object or, a row, or column vector.
References
Oppenheim, A.V., and R.W. Schaffer, Digital Signal Processing, Prentice Hall, New Jersey, 1975, p. 513.
See Also
fitfrd Fits frequency response data with state-space model
| Provide feedback about this page |
![]() | fitfrd | gapmetric | ![]() |
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |