Prev: How to use the crtbp function in the GA toolbox ?
Next: Possible bug when generating vectors with a fixed step
From: Ronald Wensley on 10 Jan 2010 13:38 Greetings, I have an arbitrary wave form in an array 'u'. I apply the data to the input of a transfer function in simulink, 40/4*s+1 The transfer function produces an output array 'y' Using a 'mux' along with time, I create a matrix. Using a=xlswrite('test',test) I create an excel file. In excel I have columns t, u, y which, when ploted, look exactly like the simulink plot (no surprise there. I add column y_p to excel with the formula =B2*4*(exp(-A2/40))/40 which is the time domain equal to the simulink transfer function. (Note in the preceding formula the column B is 'u' and 'A' is t) The resulting waveform looks nothing like 'y'. If I change the input to a step response the calculation in excel is correct. What am I missing here, Thanks, Ron
From: Ronald Wensley on 10 Jan 2010 16:07
I found a better algorthym that provides a reasonable approximation of the tf. Thanks, Ron "Ronald Wensley" <rwensley(a)controllertuning.com> wrote in message <hid6qb$9fm$1(a)fred.mathworks.com>... > Greetings, > > I have an arbitrary wave form in an array 'u'. I apply the data to the input of a transfer function in simulink, 40/4*s+1 The transfer function produces an output array 'y' > > Using a 'mux' along with time, I create a matrix. > > Using a=xlswrite('test',test) I create an excel file. > > In excel I have columns t, u, y which, when ploted, look exactly like the simulink plot (no surprise there. > > I add column y_p to excel with the formula =B2*4*(exp(-A2/40))/40 which is the time domain equal to the simulink transfer function. (Note in the preceding formula the column B is 'u' and 'A' is t) > > The resulting waveform looks nothing like 'y'. > > If I change the input to a step response the calculation in excel is correct. > > What am I missing here, > > Thanks, > Ron |