Why does linearizing a model in different simulink versions give a different result?

6 views (last 30 days)
I linearize a model in order to get the Bode plot and Step response, nevertheless I get totally different results when I change of Matlab version.
The model was originaly created in Matlab R2013b, and I run it now wih Matlab R2015b.
I have made the linearization, both with commands an also using the Linear Analysis Tool, with this tool I can notice that for the linearization of the model I get also different number of space states as result.
The solvers have the same parameters in both versions.
I attach an image with the plots which I get (left-2013b, rigth-2015b)
Thanks for your time.

Answers (1)

Sebastian Castro
Sebastian Castro on 20 Feb 2016
Edited: Sebastian Castro on 20 Feb 2016
Does the model, by any chance, use Simscape blocks (or any of its add-on products)?
In R2014a, the Simscape blocks' initial conditions specifications got a pretty big change, and there might be some incompatibilities across versions for that reason.
Regardless of whether or not you have Simscape in the mix, I'd open the Linear Analysis tool and view the operating point/initial condition that is being used in each case. If the initial conditions are different, this would make sense. If the initial conditions are the same but the results are different, that would be weird.
- Sebastian
  2 Comments
Ivan Melendez Vazquez
Ivan Melendez Vazquez on 22 Feb 2016
Hello Sebastian,
thank you for your answer. Indeed I have a block with Simscape elements, and even if I run it with the "use local solver" configuration clear, I recive this message:
Warning: Linearization is not supported in local solver mode. Use results with caution.
I have already used the Liner Analysis Tool to check the results under different initial conditions (always selecting the same in both versions), but I keep having the variance between the results.
Sebastian Castro
Sebastian Castro on 22 Feb 2016
That's interesting... Check if maybe you have multiple Solver Configuration blocks, and one of them still has the local solver enabled?
Beyond that, I'm not sure. I could try look at the model if you're able/willing to attach it.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!