• Status: Solved
• Priority: Medium
• Security: Public
• Views: 376

Excel Formula Needed

Greetings,

I a have a simple simulink model that

1. Reads the data 'u' from the workspace or file (an arbitrary waveform)
easy to do in vb.net or excel

2. The data is applied to a transport delay
Ignore for now this is easy to translate

3. The delayed data is applied to a transfer function
k/a*s+1 (ie. 4/40*s+1)

4. The desired waveform is produced 'y_p' and compared to the reference waveform 'y'

This should be a simple translation of the transfer function
(ie. k*(exp(-t/a)/a)
When I implement this in excel it does not come close.

What am I missing?

Thanks,
Ron
clid.zip
0
rwensley
• 3
• 2
1 Solution

Vice President - Business EvaluationCommented:
Ron,

EXP in Excel is the exponential applied to the natural base e
is this what you wanted?

Cheers
Dave

0

Author Commented:
Yes that is correct.  the LaPlace transform of k/a*s+1 is k* ((1/a)*(e^(-t/a)))
0

Commented:
Would you formulate what exactly is wrong? What are the curves on your Simulink figure?

If you use the same formula and values in Excel and Matlab (not Simulink), would the answer be the same? Try it, and we will understand is it the problem of Excel's calculations or your formula.
0

Author Commented:
Looking at the excel spread sheet I attached.  Column 'u' is the input to the transfer function in simulink.
Column 'y' is the output from the simulink transfer function.

Column 'y_p' is the time series calculation that should match column 'y'

Yes performing the same steps in matlab, usings column 'u' as the input, produces the same column 'y' on the output.

In excel, if I apply a step input to the transfer function k*(exp(-t/a)/a, I get the expected step response.  But if I use the arbitrary input from column 'u' I do not get the expected results.

Thanks,
Ron
0

Author Commented:
I got it.  I found a different first order formula, temp  =(C3-((1/\$G\$2)*F2))/(\$I\$2) and y_p =E3+F2, where
column 'C' = u, \$G\$2 = the gain, \$I\$2 = the time constant, F2 = y_p(t-1), and E3 = temp.

Not what I was expecting to find for a formula, but it does work reasonably well.

Thanks,
Ron
0

Vice President - Business EvaluationCommented:
No problem Ron, glad to see you got there

Dave
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Featured Post

• 3
• 2
Tackle projects and never again get stuck behind a technical roadblock.