LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Matlab 'place' command gives different result in Mathscript/Labview

Hello,

 

I am trying to implement a order reduced observer in Labview. First I used Labview blocks for programming but it happens that I get different results when I am using Matlab. For that reason I used Mathscript to make a simple 'place' command to check it. The result in Labview and Mathscript is the same, but not in Matlab...

 

This is the instruction in Matlab:

 

 

A22=[0.9024 0 0;0 0.8607 0; 0 0 0];
A12=[0 0 0 ;0 0 0.0548;0.0417 0 0;0 -0.0417 0];
K=place(A22',A12',[0.32 0.31 0.3]);
Ko=K'
Ko =
         0         0   13.9664         0
         0         0         0  -13.2062
         0   -5.4745         0         0
And I have attached the VI where I do the test with Labview blocks and Mathscript. As you can see the result is not even close to be similar. Why is this produced? How can I fix it?
Thank you a lot in advance!

 

0 Kudos
Message 1 of 6
(4,396 Views)

Actually the one I wanted to attach is this VI. Sorry for the inconvenience...

 

 

0 Kudos
Message 2 of 6
(4,385 Views)

Hi,

The difference is normal, since the place function in Matlab is using the algorithm 2/3 from "Kautsky, J. and N.K. Nichols, Robust Pole Assignment in Linear State Feedback" and CD pole placement from Control Design toolbox in Labview is using the algorithm SEAP (Standard eigenvalue assignment problem) from A.Varga.

 

cosmin

0 Kudos
Message 3 of 6
(4,363 Views)

Thanks a lot of the answer. I thought that being the same code the result should be the same at least for Mathscript/Matlab. Now everything is clear.

 

Thank you again!

 

Greetings!

0 Kudos
Message 4 of 6
(4,342 Views)

Hello:

 

You raised a good point. Please note that the 'place' command does not result in a unique gain matrix as the results are obtained from an optimization algorithm, which could yield several valid solutions. A good way to check the validity of the resulting gain matrix is to look at the closed-loop eigenvalues produced with such gain matrix. The ""Pole Placement" VI and the "place" command output these eigenvalues. For the VI you attached, I verified that the produced gain matrix did indeed place the poles where you requested them. If you have more questions, don't hesitate to ask.

 

 

 

0 Kudos
Message 5 of 6
(4,316 Views)

Hi,

Indeed there are a lot of gains that places the poles on the desired locations. BUT, seeing as the Varga's SEAP algorithm is implemented, the G matrix is selected through a uniform white noise generator and the desired characteristics are verified (controllability). This does not unsure optimization regarding stability margins or disturbance rejection (sensitivity minimization regarding perturbations an matrix A or B).

As an example, the system presented in this thread, the algorithm implemented in CD Pole Placement.vi computes an observer gain that determine a 7,4455 value for closed loop infinity norm. The place algorithm in Matlab computes an observer gain that determine a 2,8230 value for closed loop infinity norm, so better noise rejection or robustness.

 

cosmin

0 Kudos
Message 6 of 6
(4,280 Views)