


Sets a disturbance to a process, read from a matrix
Usage:
>> ocp.setProcessDisturbance(d)
Parameters:
d disturbance matrix (n x m MATRIX)
where n = number of time steps
m = (number of disturbances) - 1
the first column represents the time points
the second column represents the first disturbance
[the thirth column represents the second disturbance]
Example:
>> Disturbance R;
>> Disturbance W;
>> disturbance = [
0.0 0.00 0.00
0.5 0.00 1.00
1.0 0.00 1.50
1.5 1.00 0.00
];
% TIME R W
>>
>> process = acado.Process();
>> process.setProcessDisturbance(disturbance);
Licence:
This file is part of ACADO Toolkit - (http://www.acadotoolkit.org/)
ACADO Toolkit -- A Toolkit for Automatic Control and Dynamic Optimization.
Copyright (C) 2008-2009 by Boris Houska and Hans Joachim Ferreau, K.U.Leuven.
Developed within the Optimization in Engineering Center (OPTEC) under
supervision of Moritz Diehl. All rights reserved.
ACADO Toolkit is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
ACADO Toolkit is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with ACADO Toolkit; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Author: David Ariens
Date: 2010

0001 function setProcessDisturbance(obj, varargin) 0002 %Sets a disturbance to a process, read from a matrix 0003 % 0004 % Usage: 0005 % >> ocp.setProcessDisturbance(d) 0006 % 0007 % Parameters: 0008 % d disturbance matrix (n x m MATRIX) 0009 % where n = number of time steps 0010 % m = (number of disturbances) - 1 0011 % the first column represents the time points 0012 % the second column represents the first disturbance 0013 % [the thirth column represents the second disturbance] 0014 % 0015 % Example: 0016 % >> Disturbance R; 0017 % >> Disturbance W; 0018 % >> disturbance = [ 0019 % 0.0 0.00 0.00 0020 % 0.5 0.00 1.00 0021 % 1.0 0.00 1.50 0022 % 1.5 1.00 0.00 0023 % ]; 0024 % % TIME R W 0025 % >> 0026 % >> process = acado.Process(); 0027 % >> process.setProcessDisturbance(disturbance); 0028 % 0029 % Licence: 0030 % This file is part of ACADO Toolkit - (http://www.acadotoolkit.org/) 0031 % 0032 % ACADO Toolkit -- A Toolkit for Automatic Control and Dynamic Optimization. 0033 % Copyright (C) 2008-2009 by Boris Houska and Hans Joachim Ferreau, K.U.Leuven. 0034 % Developed within the Optimization in Engineering Center (OPTEC) under 0035 % supervision of Moritz Diehl. All rights reserved. 0036 % 0037 % ACADO Toolkit is free software; you can redistribute it and/or 0038 % modify it under the terms of the GNU Lesser General Public 0039 % License as published by the Free Software Foundation; either 0040 % version 3 of the License, or (at your option) any later version. 0041 % 0042 % ACADO Toolkit is distributed in the hope that it will be useful, 0043 % but WITHOUT ANY WARRANTY; without even the implied warranty of 0044 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0045 % Lesser General Public License for more details. 0046 % 0047 % You should have received a copy of the GNU Lesser General Public 0048 % License along with ACADO Toolkit; if not, write to the Free Software 0049 % Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 0050 % 0051 % Author: David Ariens 0052 % Date: 2010 0053 % 0054 0055 0056 %http://www.mathworks.com/access/helpdesk/help/techdoc/ref/dlmwrite.html 0057 0058 if (length(varargin) == 1) 0059 0060 obj.disturbance = acado.Matrix(varargin{1}); 0061 0062 else %error 0063 error('ERROR: Invalid setProcessDisturbance call. <a href="matlab: help acado.Process.setProcessDisturbance">help acado.Process.setProcessDisturbance</a>'); 0064 end 0065 0066 0067 end