MATRIXx

cancel
Showing results for 
Search instead for 
Did you mean: 

MatrixX: How do I specify initial states when running a pt to pt freq response?

I'm trying to run a point to point frequency response using the pull down tools in MatrixX build 61mx1411.
How do I specify initial states? an x0 vector is needed to run the sim using the "sim" command.

Thanks.
0 Kudos
Message 1 of 7
(8,609 Views)
The frequency response is calculated around an operating point. The operating point is based on the input values. You specify the input values by selecting the input channel in the Input Values for Operating Point Computation. The default is 0. Once you have selected the channel you specify the input by clicking on the empty box to the right labeled Input #x. After entering the value, press enter. The input value will be updated in the listbox on the left.

Carl Ljungholm
National Instruments
0 Kudos
Message 2 of 7
(8,609 Views)
Carl,

There are 6 inputs to the block I am attempting to calculate a freq. response of. There are 25 states that must be given an initial value. The states do not have anything to do with the inputs. How is the x0 vector specified for the frequency response tool?


Joe
0 Kudos
Message 3 of 7
(8,609 Views)
Joe,
Can you be more specific? Where do the states come from? Are they from a state transition diagram or something else? Maybe a small model would help illustrate what you are trying to do.

Carl L
National Instruments
0 Kudos
Message 4 of 7
(8,609 Views)
Joe,
Are you using a StateSpace block in your model? If it is the states of the StateSpace model that you are looking to initialize, then you have two options.
1. Assign a % variable in the block properties for the Initial State of the StateSpace block. Then define the variable/vector in Xmath.
2. If you do not assign a % variable in the block properties or the % variable is not define in Xmath then the block defaults are used.

You can tell which one is being used by looking at the message area of Xmath. Here is a sample where the percentvar is used:

Parameters used in SuperBlock statespace:
- Variable X0 found in partition main
main.X0 for in ' '.2

Carl L
National Instruments
0 Kudos
Message 5 of 7
(8,609 Views)
Carl,

Thanks for the help.

A couple of things though ...

It does not have to include a state space block.
Any dynamic system would require initial states.

Also, we require many initial states to be defined.
It appears that you are attempting a "lin" command as part of the freq. response calculation. If NI can add the x0 specification to the lin command line called from the freq. response tool, that should do it.

Joe
0 Kudos
Message 6 of 7
(8,609 Views)
I talked to Carl and he suggested that I post an answer to your question. First I will attempt to answer your question, and second I will make a suggestion.

In essance the Frequency Analysis to which you are referring is a quick way to do a Bode of a block diagram. In the old days of MATRIXx say before Version 4 you were required to work at either the command prompt or in the SystemBuild editor therefore such a convenience was important. Since the advent of Xmath however you can execute commands at the Xmath interpreter a the same time that the SystemBuild window is open. The menu item is significantly more restrictive than the command line.

As Carl had pointed out you are really only allowed to change the u0 in the GUI kicked off from the menu item and what you
are asking is to change the x0.

You could actually make this occur from the menu item with a fairly detailed understanding of GUI programming and the underlying file structure of the menu items however it would not be worth your time since you could achieve the same end by simply performing a lin on the superblock of interest at the Xmath prompt like:

sys=lin(mysuperblock, {x0=myx0});

Where myx0 is defined in Xmath.

Now you only need perform the Bode since "sys" is now a linear system which is a pertibation state-space model and therefore will have all states around zero.
The simplest way to do this is again at the command line.

Bode(sys);

If you find this helpful please let us know. If not I am certain that we can assist further.

Now for the recommendation. I think that it would be most prudent to upgrade your 6.1 version to 6.2.2 because of the high robustness of this later version.

Regards,

Garrett
Garrett Thurston
gthurston@foliage.com
Phone: 781.993.5540
0 Kudos
Message 7 of 7
(8,609 Views)