Syntax
[bi,cbi]=MGTcoefficientsai2bi([ai,thr])
Input Parameter
ai : | | ai coefficients of a strucuture of type 1/ai polynomial |
thr : | | default is 1e-3 |
Output Parameter
bi : | | ai coefficients of an equivalent strucuture of type bi polynomial |
cbi : | | |
Examples
ai=[1.2 -0.3 0.1]
[bi,cbi]=MGTcoefficientsai2bi(ai)
Copyright 2021-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Algorithm (Workflow)
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.
Input Parameters
- ai: Coefficients of a structure of type 1/ai polynomial.
- thr: Threshold value, default is 1e-3.
Output Results
- bi: Coefficients of an equivalent structure of type bi polynomial.
- cbi: Difference between the bi polynomial and its shifted version.
Algorithm Steps
- Retrieve the
ai
coefficients and thr
threshold from the input parameters using getfuncparams
.
- Set
nmax
to 32, which is the maximum number of coefficients.
- Initialize an impulse response array,
Impulse
, with zeros and set the first element to 1.
- Calculate the
bi
coefficients using the MGTsystemIIR
function with the impulse response and ai
coefficients.
- Find the indices of
bi
where the absolute value is greater than thr
and store the last index in l
.
- If
l
equals nmax
, issue a warning that the number of coefficients may be too small.
- Trim the
bi
array to the first l
elements.
- Calculate the damping factor,
damp
, as the sum of the bi
coefficients.
- Compute
cbi
as the difference between bi
and its shifted version.
- If no output is requested, print the
ai
and bi
coefficients, the damping factor, and plot the bi
coefficients using PLplotdiscretetime
.
Algorithm explaination created using ChatGPT on 2025-08-19 08:02. (Please note: No guarantee for the correctness of this explanation)
Last html export of this page out of FM database by TL: 2025-09-21