Monday, August 23, 2010

Routh array, Routh Criterion and how to calculate the Routh Hurwitz array

The post is available also in PDF format here[mirror].

Trying to find a reasonable explanation of how to calculate Routh array, I found one here (while in book are usually given cryptic and tricky ways, even in Goodwin-Graebe).

Routh criterion

The Routh-Hurwitz stability criterion is a necessary (and frequently sufficient) method to establish the stability of a single-input, single-output (SISO), linear time invariant (LTI) control system.

One of the most popular algorithms to determine whether or not a polynomial is strictly Hurwitz, is Routh's algorithm. Consider a polynomial and its associated Routh array (see below). Then the number of roots with real part greater than zero is equal to the number of sign changes in the first column of the array.



Routh array

A tabular method of Routh criterion can be used to determine the stability when the roots of a higher order characteristic polynomial are difficult to obtain. Consider the polynomial . The first two rows (two highest ones) of the Routh's array are formed using coefficients in the increasing order:

Row Power First column Second column Third column
n $ s^n$ $ a_0$ $ a_2$ $ a_4$ ...
n-1 $ s^{n-1}$ $ a_1$ $ a_3$ $ a_5$ ...




If there are no more coefficients then just add zeros in the table.



Then for each row after third row we need to calculate , , and so on. Now starting from row 3, each row contains the b's, c's, d's and so on as follows:

Row Power First column Second column Third column
n $ s^n$ $ a_0$ $ a_2$ $ a_4$ ...
n-1 $ s^{n-1}$ $ a_1$ $ a_3$ $ a_5$ ...
n-2 $ s^{n-2}$ $ b_1$ $ b_2$ $ b_3$ ...
n-3 $ s^{n-3}$ $ c_1$ $ c_2$ $ c_3$ ...
n-4 $ s^{n-4}$ $ d_1$ $ d_2$ $ d_3$ ...
&vellip#vdots;




0 $ s^{0}$ $ z_1$ 0 0





Now we need to calculate the coefficients and so on. That can be done using the following determinants formulas:


















and so on until . Remember to add zeros in the table when no more coefficients left - it will alleviate the calculations and make them more straightforward. The principle is the following: when one calculates , the first column in the determinant is always [column_1; row_1, row_2]"/> of the Routh table, e.g. .

Second column in the determinant contains , e.g. for calculations of .

The following illustration shows the principle:



Here dark-green rectangle depicts the first column of the determinant in the calculations of , dark-green circle - denominator in the equation for . Bright-green rectangle depicts the second column in the determinant for calculations of . In the same fashion, dark-blue rectangle depicts the first column of the determinant in the calculations of , dark-blue circle - denominator in the equation for . Bright-blue rectangle depicts the second column in the determinant for calculations of , and so on.





Example of calculation of Routh array

Consider the polynomial . As above, the first two rows of the Routh's array are formed using coefficients in the increasing order:

Row Power First column Second column Third column
n $ s^4$ 1 3 1
n-1 $ s^{3}$ 1 2 0 ...




Now we need to calculate using mentioned above equations.











Thus our table will look like:

Row Power First column Second column Third column
n $ s^4$ 1 3 1
n-1 $ s^{3}$ 1 2 0 ...
n-2 $ s^{2}$ 1 1 0 ...
n-3 $ s^{1}$ 1 0 0 ...
n-4 $ s^{0}$ 1 0 0 ...



From the array we note that there are no sign changes in the first column. According to Routh's criterion, this means that is a strictly Hurwitz polynomial.

Tuesday, April 20, 2010

Linear Algebra: small survey of books

It is sometimes useful to repeat some fundamentals of mathematics, especially when it has not been used for a long time. For the study of coherence estimation in complex-valued data I had to review and refresh my Linear Algebra skills. For that I needed to study several topics and the result of it will be this small survey of books, handbooks and articles that helped me in such challenging study.

General-purpose books

First of all, one need a good general-purpose books for initial refresh of Linear Algebra. I think that Gilbert Strang's book [1] is among the best for systematic study. Although sometimes (especially in the appendices) book became too verbose (lots of exotic examples) or too brief (the reader must guess of how to actually calculated many types of decompositions), Strang's book is a good starting point anyway. It covers all basic topics except quadratic forms; very short introduction to SVD and Pseudo-Inverse. It is noticeable that Strang's video lectures are sometimes way better than his own book.

The book ``Linear Algebra'' written by J. Hefferon [2] is great for start and initial understanding of Linear Algebra. Clearly written and with lost of examples, it is a must-read book to quickly remember some base material of Linear Algebra. Moreover, there are some applications after each chapter. The textbook [2] is useful as a teaching material because a lot of examples and deductive approach of material's explaining. Examples in this book are very insightful (least-squares, crystals, economic examples and so on). Coverage stretches from basic to eigenvalue decomposition that is not enough (no SVD, Pseudo-Inverse and Quadratic forms at all).

Specialised books

One of the most necessary books for me is Matrix Algebra from a statistical perspective [3] written by D. Harville. The book contains most of necessary topics for Linear Algebra applications from the statistical and engineering point of view. For instance, the book contains insightful chapters about matrix differentiating (Chapter 14) that is very helpful.

The book written by Hoffman and Kunze [4] is a good starting point of studying bilinear and quadratic forms. The book of Marcus and Ming [5] is a good reference for matrix inequalities and other special topics of algebra. A very good book [6] written by Gene H. Golub contains interesting topics and discussion of Schur decomposition and Pseudoinverse.

For several advanced topics and pure mathematical proofs, I want to mention Radjendra Bhatia's Matrix Analysis [7] book. The questions such as Spectral variations of Normal matrices and Majorization were helpful for me.

Articles and notes

Many properties of product and sum of pseudoinverse matrix are described in articles. One particular article that discuss the properties of product of pseudoinverse that is (AB)^+ =A^+B^+ is Taussky's article [8].

A very good introduction to differentiating of matrices is written in small ``Notes on Matrix Calculus'' [9] by Paul L. Fackler from North Carolina State University. That is one os the most easy, clear and bright introduction to matrix differentiating that I could found.

The small book about Toeplitz and Circulant matrices with very good introduction is written by [10] (can be download from the Internet). This book allows to use the necessary properties of Toeplitz matrices in applied science without digging in pure mathematical folios. Writing style is clear and shiny with reasonable amount of examples in statistics and signal processing.

And of course, one should definitely read Schur's original paper (available in digital form) about Schur decomposition [11].

Reference books and Handbooks

A truly great reference is Leslie Hogben's handbook [12] that contains the most of material of Linear Algebra. Very concentrated material, with numerous links to other books and articles, ``Handbook of Linear Algebra'' is indispensable on reference and quick recalling some additional properties and relations of Algebra's objects.

Although the book by Horn& Johnson [13] ``Matrix Analysis'' appears in practically any reference sources, it is not an easy reading material. One should not read it from front to back, but rather selected topics. The material is well organised but is very dense: Horn&Johnson book is rather handbook than a textbook.

Useful and helpful handbook that contains many inequalities and interesting properties of Linear Algebra's objects is The Matrix Cookbook [14] written by K. B. Petersen and M. S. Pedersen. Although there are mentions the the Cookbook contains many mistakes and inaccuracies, it is useful and may be utilised as quick reference. For instance, it contains short but bright description of the matrix differentiating.

Bibliography


1
Gilber Strang.
Linear Algebra and its Applications.
Thomson Learning, 1988, 3d Edition.
2
Jim Hefferon.
Linear Algebra.
2000.
3
D.A. Harville.
Matrix algebra from a statistician's perspective.
Springer Verlag, 2008.
4
K. Hoffman and R. Kunze.
Linear Algebra.
Prentice-Hall, Englewood Cliffs, NJ, 1971.
5
M. Marcus and H. Minc.
A survey of matrix theory and matrix inequalities.
Allyn and Bacon, Boston, 1964.
6
G.H. Golub and C.F. Van Loan.
Matrix computations, 1996.
7
R. Bhatia.
Matrix analysis.
Springer Verlag, 1997.
8
O. Taussky.
Commutativity in finite matrices.
American Mathematical Monthly, 64(4):229-235, 1957.
9
Paul L. Fackler.
Notes on matrix calculus.
North Carolina State University, 2005.
10
R.M. Gray.
Toeplitz and circulant matrices: A review.
2006.
11
I. Schur.
On the characteristic roots of a linear substitution with an application to the theory of integral equations.
Math. Ann, 66:488-510, 1909.
12
L. Hogben.
Handbook of linear algebra.
CRC Press, 2007.
13
Roger A. Horn and Charles R. Johnson.
Matrix Analysis.
Cambridge University Press, 1985.
14
K.B. Petersen and M.S. Pedersen.
The Matrix Cookbook.
Technical University of Denmark, 2008.
20081110.

Thursday, March 18, 2010

Newcastle University network: using under Linux

After another update my WinXP on the Dell notebook started to load so ridiculously slow (~45 minutes) that I cannot sustain it any more. All of that bells and whistles, such as anti-virus, anti-spyware and so on do whatever they want and do not allow me to work.



It is funny but IT service seems to close all holes so you are unable to install Linux or FreeBSD on Dell's laptop that goes from the University. But we can use our own laptop - we only need to know Dell's MAC address.

Changing MAC address in Debian
That's pretty easy: just type as root
# ifconfig eth0 hw ether xx:xx:xx:xx:xx
or correct the /etc/network/interfaces file like:
auto eth1
iface eth1 inet dhcp
hwaddress ether 00:00:00:00:00:00
And now make /etc/init.d/networking restart
That's it!

Using your Browser to surf web
For that we should tell Firefox (or other browser that you prefer) to use University's proxy server that is proxy.newcastle.edu.au:8080

For that use in Firefox: menu Edit -> Preferences -> Advanced -> Automatic proxy configuration and then type there:
http://proxy.newcastle.edu.au/proxy.pac
For now on you can use your browser to surf web from Linux.

Printing from Linux to UNI's printers [TBD]

Tuesday, March 9, 2010

How to use NUmail via email client

Yesterday's technologies - tomorrow!

Re-inventing the wheels since 1982!

// the slogan of Microsoft (c) Corporation (TM)





Abstract
A new email system of the University of Newcastle (NUmail) is proven to suffer from that-is-to-say web-interface from Microsoft (c) Corporation (TM). As an alternative way of working with email without dealing with web-interface, email clients such as Microsoft Outlook or Mozilla Thunderbird may be considered. It will be shown in this paper that using IMAP protocol it is possible to synchronize the content of the mailbox with server mailbox. Thus one can use benefits from email client (normal human interface) and from web-interface (being away from workplace).



In this paper, a way of send/receive email from NUmail account without web-interface is proposed. Configuration options for IMAP/POP3 (incoming mail) and SMTP (outgoing mail) for NUmail are provided. Experimental results on successful configuration OpenSource email client Mozilla Thunderbird are presented.





Introduction:

How to configure mail-client for sending and receiving NUmail?

First of all, this note is concerned on Mozilla Thunderbird v3 (main window is shown in Fig.1), but with little imagination one can easily configure any other mail client. Be sure that your mail client is able to change connection's security method - otherwise you can't send or receive messages. Thunderbird can do it; besides it is OpenSource, License-clean, free and cross-platform (Mac and Linux users are welcome) - why no to try it?



Figure 1. Main window of Mozilla Thunderbird email client -

here our mail will be mirrored.











Experimental results

Yes, it took several hours from Rodrigo and me to make it works. I'll try to describe the process as simple as possible - actually, it requires only a few pushed buttons and mouse clicks.



No matter of which mail client do you use, first of all let's log in MSLive mail under your account (we need it to obtain correct mail server's parameters). In the top-right side of the screen you can see round blue HELP button like that: (?) <-- near this button there is a small down-arrow (See Fig. 2).

Figure 2. Actual parameters of email server's options are here.



Push that small down-arrow, and that in the opened menu - About. That will open a window with supplementary information about current letter like that:



Authentication type associated with this Outlook web application session:

Public login: No External



POP setting:

Server name: pod51004.outlook.com

Port: 995

Encryption method: SSL



External IMAP setting:

Server name: pod51004.outlook.com

Port: 993

Encryption method: SSL



External SMTP setting:

Server name: pod51004.outlook.com

Port: 587

Encryption method: TLS



That's what we need! Now we should use those parameters (especially selected with bold font) for our email client.





Experimental results: Receiving mail from UON via mail client

The parameters for incoming mail are as follows (from the window as described above):

Mail protocol: IMAP

Incoming mail server (IMAP-Server): pod51004.outlook.com

Port: 993

Connection Security (for Thunderbird): SSL/TLS

Secure authentification: NO

login: c1111111@uon.edu.au <--- replace 111111 with your StudentID number

password: accesskey+birthdate <------ your usual password for access to UNI webservices

Note: you can use POP protocol as well, but IMAP has very nice features like synchronizing folder's content. This means that in your mail client you will have a duplicate of server's mailbox content (e.g., you delete all messages in trash bin and same occurs on the server).



The actual configuration for my Thunderbird mail client looks like that:

Figure 3. Thunderbird's configuration for incoming mail (in order to receive mail without web-service).



If all steps and parameters performed correctly, you can receive all of your mail from the NUmail account. But we want to send our mail either, so we need to configure outgoing mail settings, too. That's not difficult and actually is almost similar to the configuration if incoming mail. Steps for configurations are provided below.





Experimental results: Sending mail from NUmail account

Now we have to configure the parameters for outgoing mail. The parameters for sending mail are the following:

Mail protocol: SMTP

Incoming mail server (IMAP-Server): pod51004.outlook.com

Port: 587

Connection Security (for Thunderbird): STARTTLS

Secure authentification: NO

login: c1111111@uon.edu.au <-- replace 111111 with your StudentID number

password: accesskey+birthdate <----- your usual password for access to UNI webservices

Yes, the connection security method for sending mail is different: in Thunderbird, it is STARTTLS. After that you can send our mail.



Figure 4. Thunderbird's configuration for outgoing mail (in order to send mail without web-interface).





As you see, if all configurations are correct, we can send and receive email from the account by email client and avoid to log in to that web interface.





Conclusions and Discussion

That's not a rocket science, right? But wait a minute - there is one more feature! Do you remember that stupid restriction of sending UON mail only as C1111111@uon.edu.au address?



With email clients you can override it: just write down in your mail client's account settings normal addresses like ali.baba@uon.edu.au - and for now on you can send your mail with your normal address.



Anyway, your address like name.surname@uon.edu.au is only an alias to c1111111@uon.edu.au so you can receive email on both addresses - and there is no excuse of stupid limitation of sending only from c111111@uon.edu.au mailboxes.







Acknowledgments



I would like to thank my colleague Rodrigo for his heroic efforts, titanic fortitude and detailed investigations of mail server's parameters (Rodrigo, ask me for a beer at any time). Without his precious information we all (including the author of this text) would still wasting our time fighting with that web-interface.



This work was performed under financial support of THE UNIVERSITY OF NEWCASTLE INTERNATIONAL POSTGRADUATE RESEARCH SCHOLARSHIP (UNIPRS) that is infinitely and truly appreciated by the author.



Any suggestions and corrections are welcomed in comments below (no registration needed).

Related Posts Plugin for WordPress, Blogger...