The Polynomial Toolbox For MATLAB
The Polynomial Toolbox For MATLAB
The Polynomial Toolbox For MATLAB
Index
Introduction The Polynomial Matrix Editor Polynomial matrix fractions Control system design Robust control with parametric uncertainties Numerical methods for polynomial matrices
Introduction
Index
Introduction The Polynomial Matrix Editor Polynomial matrix fractions Control system design Robust control with parametric uncertainties
Quick start Type pme to open the main window called Polynomial Matrix Editor. This window displays all polynomial matrices (POL objects) and all standard MATLAB matrices (2-dimensional DOUBLE arrays) that exist in the main MATLAB workspace. It also allows you to create a new polynomial or standard MATLAB matrix. In the Polynomial Matrix Editor window you can create a new polynomial matrix, by typing its name and size in the first (editable) line and then clicking the Open button modify an existing polynomial matrix while retaining its size and other properties: To do this just find the matrix name in the list and then double click the particular row.
modify an existing polynomial matrix to a large extent (for instance by changing also its name, size, variable symbol, etc.): To do this, first find the matrix name in the list and then click on the corresponding row to move it up to the editable row. Next type in the new required properties and finally click Open . Each of these actions opens another window called Matrix Pad that serves for editing the particular matrix.
Editable matrix
Index
Introduction The Polynomial Matrix Editor Polynomial matrix fractions Control system design Robust control with parametric uncertainties
For many applications the internal state or pseudo state x is not of interest, and only the external input and output variables u and y are relevant. It is not difficult to see that elimination of the internal variables by repeated differentiation and substitution in the continuous-time case leads to sets of differential equations in the output y and the input u that can be arranged in the form
[P,Q] = ss2lmf(A,B,C,D)
Q and P are left co prime and the transfer matrix Q-1 (s) P (s) equals the transfer matrix C( sI- A)-1 B+ D of the state space system. Q is row reduced and its row degrees are the observability indices of the state space system.
Question:Find a right coprime fraction of the transfer matrix G(s)= [ (4s-10)/(2s+1) 3/(s+2); 1/(2s+1)(s+2) (s+1)/(s+2)^2] Answer: num = [ 4*s-10 3; 1 s+1 ];
den = [ 2*s+1 s+2; (2*s+1)*(s+2) (s+2)^2 ];
[Nl,Dl] = rat2lmf(num,den) Nl = -0.9 - 0.09s + 0.18s^2 0.13 + 0.27s 0.4 - 0.13s 0.2
Dl = 0.09 + 0.22s + 0.09s^2 0 -0.066s 0.79 + 0.4s
Index
Introduction The Polynomial Matrix Editor Polynomial matrix fractions Control system design Robust control with parametric uncertainties
Stabilization:
A simple random stabilization can be achieved as follows. Given a linear time invariant plant with transfer matrix where v can be any of the variables s, p, z, q, z -1 or d , the command
[Nc,Dc] = stab(N,D)
computes a stabilizing controller with transfer matrix
The resulting closed-loop poles are randomly placed in the stability region, whose shape of course depends on the choice of the variable.
H-infinity
optimization
H-inf optimization is a powerful modern tool. It allows the design of high-performance and robust control systems. The Polynomial Toolbox offers two routines for H-inf design: Mixed sensitivity optimization of SISO systems relying on transfer function descriptions A routine dsshinf for finding all suboptimal solutions of the general standardH-inf optimization problem based on descriptor representations A very comprehensive routine dssrch for finding optimal solutions of the general standard H-inf optimization problem based on descriptor representations
Index
Introduction The Polynomial Matrix Editor Polynomial matrix fractions Control system design Robust control with parametric uncertainties
Introduction
Modern control theory addresses various problems involving uncertainty. A mathematical model of a system to be controlled typically includes uncertain quantities. In a large class of practical design problems the uncertainty may be attributed to certain coefficients of the plant transfer matrix. The uncertainty usually originates from physical parameters whose values are only specified within given bounds. An ideal solution to overcome the uncertainty is to find a robust controller a simple, fixed controller, designed off-line, which guarantees desired behavior and stability for all expected values of the uncertain parameters.
Example:1
Steps to analyze this problem are as follow: 1. 2. Check whether p(s,q) is stable for q=0 Find left sided and right sided stability margins
With the Polynomial Toolbox this is an easy task: First express the given polynomial as
ans =
rlocus(ss(p1,p0),qmin:.1:100)
Steps for problem are as follow: 1. Suppose that q may take any value in the interval [0, 1] and that its nominal value is q0=0 2. The plant is described by a left-sided fraction of polynomial matrices in two variables: D(s,q) and N(s,q) that may be written as
And
[Nc2,Dc2] = stab(N0,D0) P0 = D0*Dc2+N0*Nc2 P1 = D1*Dc2+N1*Nc2 P2 = D2*Dc2 roots(P0) [qmin,qmax] = stabint(P0,P1,P2) qmin = -0.9344 qmax = 1.1700 Because the second controller evidently guarantees stability on the whole required uncertainty-bounding interval. Hence, it is the desired robustly stabilizing controller.
Interval polynomials
Another important class of uncertain systems is described by interval polynomials with independent uncertainties in the coefficients. An interval polynomial looks like
In many applications interval polynomials arise when an original uncertainty structure is known but too complex (e.g., highly nonlinear) to be tractable but may be overbounded by a simple interval once an independent uncertainty structure is imposed.
Zero Exclusion Principle Ref: page 38 from Robust control (the parametric approach) by S.P.Bhattacharya,Chapellat and Keel
Theorem1.6 Assume the family of polynomials is of constant degree,contains at least one stable polynomial and omega is path wise connected.then the entire family is stable iff 0 ( the family of polynomials).
The first step in the graphical test for robust stability requires establishing that at least one polynomial in the family is stable. Using the midpoint of each of the intervals we obtain p_mid = pol([0.5 2 3 6 4 4 1],6) Matlab code: isstable(p_mid) ans=1 pminus = 0.45+1.95*s+2.95*s^2+5.95*s^3+3.95*s^4+3.95*s^5+s^6; pplus = 0.55+2.05*s+3.05*s^2+6.05*s^3+4.05*s^4+4.05*s^5+s^6; khplot(pminus,pplus,0:.001:1)
Since none of the rectangles touches the point z = 0 the Zero Exclusion Condition is satisfied. and we conclude that the interval polynomial is robustly stable.
are stable. For the interval polynomial of Example 3 the Kharitonov polynomials are computed by
[stability,K1,K2,K3,K4] = kharit(pminus,pplus)
Polytopes of polynomials
A more general class of systems is described by uncertain polynomials whose coefficients depend linearly on several parameters, but where each parameter may occur simultaneously in several coefficients. Such an uncertain polynomial may look like
Uncertain polynomials with the affine uncertainty structure form polytopes in the space of polynomials. Similarly to the single parameter case such polynomials may always be expressed as
This form is preferred in the Polynomial Toolbox. Thus, a polytope of polynomials with n parameters is always described by the n + 1 polynomials p0( s ) , p1(s),. pn(s) along with n parameter bounding intervals
If the plant has have an affine linear uncertainty structure then the closed-loop transfer function has an affine linear uncertainty structure as well.
we write
we carry out two robust stability analyses. Part 1: Conservatism of Overbounding. First replace p( s,q) by the overbounding
pminus = pol([0.9 0.7 2.7 0.4 1],4); pplus = pol([ 4.6 1.3 8.3 1.6 1],4); [stable,K1,K2,K3,K4] = kharit(pminus,pplus); stable = 0
It is easy to verify that the third Kharitonov polynomial is unstable: isstable(K3) ans=0
where
Matlab code :
p0 = pol([2 1 4 1 1],4);
p1 = pol([1 0 2],2); p2 = pol([-2 1 -1 2],3);
Summarizing, working with the overbounding interval polynomial is inconclusive while working with polygonal value sets leads us to the unequivocal conclusion that p (s, q) is robustly stable.
with two uncertain parameters q1 [ 0, 0.2] and q2 [0,0.2] Both the numerator and the denominator of the transfer function are uncertain polynomials with a polytopic (affine) uncertainty structure. Write And
D0 = 2+s+2*s^2-2*s^3;
D1 = 1+2*s^2; D2 = -3*s;
N0 = 1+s;
N1 = 1; N2 = s; Qbounds = [ 0 0.2; 0 0.2 ] As the nominal plant
is unstable. Isstable(D0)
The plot of Fig seems to indicate that zero is excluded. To be completely confident,we must zoom the picture to see the critical range 0<w<1. The closed-loop system is robustly stable.
Example 7.2 from book Robust control (the parametric approach) by S.P.Bhattacharya,Chapellat and Keel
G(s)=(s^3+ *s^2-2*s+ )/(s^4+2*s^3-s^2+*s+1) Matlab Code: D0 = [1-s^2+2*s^3+s^4]; D1 = [s]; N0 = [s^3-2*s]; N1 = [1] N2=[s^2] Qbounds = [ -1 -2;.5 1] [Nc,Dc] = pplace(N0,D0,[-2,-2+j,-2-j,-3,-4]) P0 = D0*Dc+N0*Nc P1 = D1*Dc+N1*Nc P2 =N2*Nc ptopplot(10*P0,10*P1,10*P2,Qbounds,-.9+j*(0:.01:4))
The plot of Fig seems to indicate that zero is excluded. To be completely confident,we must zoom the picture to see the critical range 0<w<1.The closed-loop system is robustly stable.
Questions ?