- Community Home
- :
- Discussion Forums
- :
- Additional NI Product Boards
- :
- MATRIXx
- :
- Solving Riccati equation

turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Highlighted
##
##### Solving Riccati equation

10-17-2009 10:53 AM

Options

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report to a Moderator

I have experience with Systembuild only.

I saw that Xmath has a module with a function to solve the Riccati equation. How can I use this function in Systembuild?

02-09-2010 02:16 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report to a Moderator

The Riccati equation can be solved in SystemBuild using a UserCodeBlock where internally the function XmathExecute is called to solve the Riccatti equation using Xmath.

This Riccati equation solver could be placed in a slower periodic SuperBlock so that it is not recalculated every time step.

Another UserCodeBlock (file scoped with the Ricatti solver UserCodeBlock) could return the new A and B matricies.

But, the real problem is how to inject the new A and B matrix into your model.

The SystemBuild StateSpace block A,B,C and D matricies can be only changed during simulation initialization.

You would have to create your own StateSpace SuperBlock using the matrix multiple blocks, UserCodeBlock(returns new A,B), intergator block and summer blocks to calculate.

Xdot = Ax + Bu;

Y = Cx + Du;

It would be much easier if there were a StateSpace block that had the A and B matricies as inputs.

Note: using SystemBuild the UserCodeBlocks and StateSpace SuperBlock dimensions are fixed and would have to be determined before hand.