by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Auxiliary function
Introduced first in SolidGeometry 5.0, Creation date: 2021-02-11, Last change: 2025-09-15
See Also: MGTsystemFIR
, MGTsystemIIR
, MGTsysteminvFIR
, MGTcontrolIIRIIR
, MGTcoefficientsPID2bi
[bi,cbi]=MGTcoefficientsai2bi([ai,thr])
ai: | ai coefficients of a strucuture of type 1/ai polynomial | |
thr: | default is 1e-3 |
bi: | ai coefficients of an equivalent strucuture of type bi polynomial | |
cbi: |
ai=[1.2 -0.3 0.1]
[bi,cbi]=MGTcoefficientsai2bi(ai)
This function, MGTcoefficientsai2bi, converts a z-transform denominator polynomial into a numerator polynomial. It is part of the SG-Library and was introduced in SolidGeometry 5.0.
ai coefficients and thr threshold from the input parameters using getfuncparams.nmax to 32, which is the maximum number of coefficients.Impulse, with zeros and set the first element to 1.bi coefficients using the MGTsystemIIR function with the impulse response and ai coefficients.bi where the absolute value is greater than thr and store the last index in l.l equals nmax, issue a warning that the number of coefficients may be too small.bi array to the first l elements.damp, as the sum of the bi coefficients.cbi as the difference between bi and its shifted version.ai and bi coefficients, the damping factor, and plot the bi coefficients using PLplotdiscretetime.