How can I use Gilbert's method to obtain a minimal realization of a transfer function matrix

14 次查看(过去 30 天)
I have a 6x3 transfer function matrix with 9th order transfer function entries. I want to obtain a minimal realization of this transfer function matrix directly using Gilbert's method instead of using the pole-zero cancellation method that is used in MATLAB's minreal() function.
I want to know if this is possible to implement in MATLAB and if so what functions would be used to find polynomial d(z) that is the least common denominator of all the entries of the transfer function matrix H(z).

回答(1 个)

Nipun
Nipun 2024-5-23
Hi Kenneth,
I understand that you are looking for a way to implement Gilbert's method in MATLAB to obtain a minimal realization of a transfer function matrix, specifically focusing on finding the least common denominator (LCD) of all the entries of the transfer function matrix (H(z)) without relying on MATLAB's minreal() function.
To achieve this, you can use MATLAB functions for polynomial manipulation, such as conv for polynomial multiplication and a custom implementation to find the greatest common divisor (GCD) and least common multiple (LCM) for polynomials, since MATLAB does not directly provide a function for the LCM of polynomials.
Here is a MATLAB code snippet that demonstrates how you might find the least common denominator (d(z)) for all entries in a transfer function matrix (H(z)):
function d = findLCD(H)
% Extract denominators from all transfer functions in H and find their LCD
[rows, cols] = size(H); % Size of the transfer function matrix
allDenominators = {}; % Cell array to hold denominators
% Loop through each transfer function in the matrix
for i = 1:rows
for j = 1:cols
[~, den] = tfdata(H(i,j), 'v'); % Extract denominator
allDenominators{end+1} = den; % Store denominator
end
end
% Initialize LCD to the first denominator
d = allDenominators{1};
% Find LCD by computing LCM with each denominator
for k = 2:length(allDenominators)
d = lcmPoly(d, allDenominators{k}); % Update LCD
end
end
function lcm = lcmPoly(a, b)
% Compute LCM of two polynomials a and b
gcdVal = polygcd(a, b); % Find GCD of a and b
lcm = conv(a, b) ./ gcdVal; % LCM = (a*b)/GCD(a,b), adjust for polynomial division
end
function gcd = polygcd(a, b)
% Compute GCD of two polynomials a and b (placeholder function)
% Implement or use an existing algorithm for finding polynomial GCD
% This is a conceptual placeholder; actual implementation may vary
gcd = 1; % Placeholder for demonstration purposes
end
This code provides a basic structure for finding the least common denominator across all entries in a transfer function matrix.
Refer to the following MathWorks documentation for more information on "conv" MATLAB function: https://in.mathworks.com/help/matlab/ref/conv.html
Hope this helps.
Regards,
Nipun

类别

Help CenterFile Exchange 中查找有关 Pole and Zero Locations 的更多信息

产品


版本

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by