Deviations in Result from 2 Matlab Versions

1 visualizzazione (ultimi 30 giorni)
Hello guys,
I have a complex model (let's name it model 'A') that run in Matlab/Simulink 2016b. When I migrate to 2018b and tried to run it, and error appeared due to SLPRJ folders from 2016b. From my understanding (after reading from other forums), SLPRJ folders are generated when model was run and it simply generated the C code for the calculations.
In my Matlab 2018b, an add ons MINGW.mlpkginstall was installed because it's needed to run another model (let's say model 'B'). Thus, in order to able to run that complex model ('A'), I simply deleted the SLPRJ folders(that was made in 2016b) and the results showed up and everything works without error.
When I tried to compare the results, somehow the deviations occured between 2016b and 2018b. I've tried to read release notes from 2017a to 2018b, but I couldn't find something that can be relevant as the cause for those deviations.
Has anybody any idea, what can be the root cause? I would say by deleting SLPRJ folders (2016b) and Mingw shouldn't be the main cause for those deviations. Am I right?
Thank you
Regards
Daniel
  2 Commenti
Sivani Pentapati
Sivani Pentapati il 2 Set 2021
Could you please provide a detailed explanation along with the code you have tried so that we can replicate the issue?
Daniel Sadono
Daniel Sadono il 3 Set 2021
@Sivani Pentapati the model is quite complex actually (Pict4), because it consists of many subsystems in Simulink and each subystem will be connected from the output of each other. However, on the attachment you can find one of the mini subsystem model, which basically only a normal mathematical model (pict3) and the results (pict2). If you see on pict3, the inputs came from another subsystem. The names are hidden due to confidential. Pict4 is the parent model of the system, and Pict3 is deep inside of the blue box from pict4.
I searched on similar topics in this community (Different svd results with R2015b and R2016a - MATLAB Answers - MATLAB Central (mathworks.com) ... and I'm wondering if the library called BLAS and LAPACK as answered in that link also has the similar affects to mine, although in my case, I didn't have to do with Svd.
Regards
Daniel

Accedi per commentare.

Risposta accettata

Walter Roberson
Walter Roberson il 3 Set 2021
We can see a transfer function step in Picture 3. No matter whether you use Continuous time or Discrete Time, if you have a transfer function, MATLAB is going to end up having to create differential equations and use a differential equation solver. That is going to involve the linear algebra functions, and will probably need BLAS or LAPACK .
If you are using continuous time, MATLAB always sets up differential equations and uses a differential equation solver.
If you are using discrete time, then you are operating closer to a state machine, and potentially MATLAB might not need to set up differential equations -- but transfer functions need derivatives and you need a differential equation solver in that case.
  5 Commenti
Walter Roberson
Walter Roberson il 3 Set 2021
No, using continuous time requires that differential equations are calculated, and the solvers for those use functions such as the \ operator that use BLAS or LAPACK.
Daniel Sadono
Daniel Sadono il 6 Set 2021
@Walter Roberson I saw the other subsystems, and I found there are 3 transfer functions blocks in total. I tried to scope the signal before and after the transfer function block on both 2016B and 2018B, to see how's the difference look like. I plotted the signals on matlab before the transfer function block 16b and 18b (1 subplot) and also the signal after the transfer function block 16b and 18b (1 subplot).
there's already a small difference on the signal before the transfer function block on between 16b and 18b, and so does the signal after the transfer function. I plotted the signals to testify the results, just double check that the transfer functions blocks are connected with the LAPACK or BLAS. However, the plotted results still couldn't be ensured, because as you see in figure 4, those blocks are interconnected with each other.
I'm still finding another idea to testify this block by providing results that can be plotted... or do you have any idea?
Thanks in advance

Accedi per commentare.

Più risposte (0)

Prodotti


Release

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by