How to use a matrix as input for NLARX
古いコメントを表示
Based on the text (see below in italic) for NLARX I would like to use a matrix to provide the u en y (input/output).
Comma-Separated Matrix Pair
Specify data as a comma-separated pair of real-valued matrices that contain input and output time-domain signal values. When you specify matrix-based data, the software assumes a sample time of 1 second. You can change the sample time after estimation by setting the property sys.Ts.
- For SISO systems, specify data as a pair of Ns-element numeric column vectors that contain uniformly sampled input and output time-domain signal values. Here, Ns is the number of samples.
- For MIMO systems, specify u,y as an input/output matrix pair with the following dimensions:
- u — Ns-by-Nu, where Nu is the number of inputs.
- y — Ns-by-Ny, where Ny is the number of outputs.
For multiexperiment data, specify data as a pair of Ne-by-1 cell arrays of matrices, where Ne is the number of experiments. The sample times of all the experiments must match.Single Matrix
Specify data as a single real-valued matrix with Ny+Nu columns that contain the output signal values followed by the input signal values. Note that this order is the opposite of the order used for the comma-separated matrix pair form of data. When you specify matrix-based data, the software assumes a sample time of 1 second. You can change the sample time after estimation by setting the property sys.Ts.
Also I want the matrix built up such that each line has a many inputs/outputs as the orders given in teh NLARX.
So in principal I have a x amount of meausurements (number of lines in the matrix) and the number input and output(columns) is equal to the orders
I have written a small code to test this but I get an error message.
Code:
Input_A = (1:5); Output_B = (5:-1:1);
Data = [Output_B Input_A];
Total_Data = [Data; Data];
for counter = 1:50
Total_Data = [Total_Data; Data];
end
sys_1 = nlarx(Total_Data,[5 5 1]);
Error:
>> sys_1 = nlarx(Total_Data,[5 5 0]);
Error using nlarx (line 409)
The number of inputs and outputs of the model must match that of the data.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Nonlinear ARX Models についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
