Optimizing a Non-Linear Multi-Vector Signal

1 view (last 30 days)
Hi! I recently started a new engineering job that is programming-centered (I'm mechanically oriented) and I'm still learning quite a few MATLAB functions. The big problem that I'm having is that I have a large set of vectors (structure sets with time) that are multiplied by various gain coefficients and summed to create a model signal that I get from Simulink. I need to compare it to an actual system signal. The current coefficient values are fairly broad in range (-1<a<60, roughly), and the current method for determining them is somewhat trial-and-error. I'd like to write a program to optimize them, but I'm only familiar with systems of N-variables that have known coefficients, up to 3 variables.
The mathematical form of the Model signal is non-linear, such that:
Model = a1x1 + a2x2 + a3x3 +...+ a19x19^2 + a20x20y20 + a21x21^2.
The "..." is shorthand for more linear terms. Some of the vectors repeat, and they're all the same size. What I don't know are the coefficient values (the "a"-values). That's really what I'm interested in. The simulation time is 2408 seconds, time step = 1.

Accepted Answer

Star Strider
Star Strider on 22 Apr 2014
Your equation is actually considered to be ‘linear’ because it’s linear in the parameters (the partial derivatives of the function with respect to any of the parameters are not functions of the parameters themselves or of any other parameters). If you have the Statistics Toolbox, see the regress function. Otherwise, the next best option is the ldivide function. It does essentially the same thing, but doesn’t produce the statistics necessary to interpret the estimated parameters.
  2 Comments
Adam
Adam on 23 Apr 2014
I'll give that a go. Apologies for the misnomer. This problem tends to mess with me just because of the volume of inputs. Much appreciated!
Star Strider
Star Strider on 23 Apr 2014
Edited: Star Strider on 23 Apr 2014
My pleasure!
The concept of linearity is different in different contexts, and there are probably as many definitions as there are disciplines that use the term. I wanted to save you the complications associated with nonlinear solvers, since you don’t need them with this problem. If you have a good data set, this should be reasonably easy to program and solve. The MATLAB documentation is quite comprehensive. If you have any questions or problems, we’re here to help. You’re also encouraged to share your expertise here as well.

Sign in to comment.

More Answers (0)

Categories

Find more on Manual Performance Optimization in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!