Hi!
As Malte said, it would be much easier to diagnose the problem if you are able to share the model.
I noticed one thing looking through your Mathematica code. You don't define EE as a function varying with respect to time (using EE rather than EE[t]). As a result, EE has the prefix parameter in your resulting Modelica code in that it is assumed to be constant during the simulation.
parameter Modelica.Blocks.Interfaces.RealInput EE;
This is fine until you try and connect something to the EE connector. Then two separate equations will define the value of a single variable, EE. The constant paramater setting (default equal to 0) and the signal source that EE is connected to.
If this is the problem you are facing, you could remedy it by replacing all instances of EE with EE[t] in your Mathematica code:
EqnRiccati = {Derivative[1][P11][t] == -2.5*10^6 EE[t]^2 P11[t]^2 +
100000. P13[t] + 100000. P31[t],
Derivative[1][P12][t] == -2.5*10^6 EE[t]^2 P11[t] P12[t] -
100000. P13[t] + 100000. P32[t],
Derivative[1][P13][t] == -500. P11[t] + 1200.48 P12[t] -
2.5*10^6 EE[t]^2 P11[t] P13[t] + 100000. P33[t],
Derivative[1][P14][t] == -1200.48 P12[t] -
2.5*10^6 EE[t]^2 P11[t] P14[t] - 314.159 P15[t] + 100000. P34[t],
Derivative[1][P15][t] ==
314.159 P14[t] - 2.5*10^6 EE[t] P11[t] P15[t] + 100000. P35[t],
Derivative[1][P21][t] == -2.5*10^6 EE[t]^2 P11[t] P12[t] +
100000. P23[t] - 100000. P31[t],
Derivative[1][P22][t] ==
1000. - 2.5*10^6 EE[t]^2 P12[t]^2 - 100000. P23[t] -
100000. P32[t],
Derivative[1][P23][t] == -2.5*10^6 EE[t]^2 P12[t] P13[t] -
500. P21[t] + 1200.48 P22[t] - 100000. P33[t],
Derivative[1][P24][t] == -2.5*10^6 EE[t]^2 P12[t] P14[t] -
1200.48 P22[t] - 314.159 P25[t] - 100000. P34[t],
Derivative[1][P25][t] == -2.5*10^6 EE[t]^2 P12[t] P15[t] +
314.159 P24[t] - 100000. P35[t],
Derivative[1][P31][t] == -500. P11[t] -
2.5*10^6 EE[t]^2 P11[t] P13[t] + 1200.48 P21[t] + 100000. P33[t],
Derivative[1][P32][t] == -500. P12[t] -
2.5*10^6 EE[t]^2 P12[t] P13[t] + 1200.48 P22[t] - 100000. P33[t],
Derivative[1][P33][t] == -500. P13[t] - 2.5*10^6 EE[t]^2 P13[t]^2 +
1200.48 P23[t] - 500. P31[t] + 1200.48 P32[t],
Derivative[1][P34][t] == -500. P14[t] -
2.5*10^6 EE[t]^2 P13[t] P14[t] + 1200.48 P24[t] -
1200.48 P32[t] - 314.159 P35[t],
Derivative[1][P35][t] == -500. P15[t] -
2.5*10^6 EE[t]^2 P13[t] P15[t] + 1200.48 P25[t] + 314.159 P34[t],
Derivative[1][P41][t] == -2.5*10^6 EE[t]^2 P11[t] P14[t] -
1200.48 P21[t] + 100000. P43[t] - 314.159 P51[t],
Derivative[1][P42][t] == -2.5*10^6 EE[t]^2 P12[t] P14[t] -
1200.48 P22[t] - 100000. P43[t] - 314.159 P52[t],
Derivative[1][P43][t] == -2.5*10^6 EE[t]^2 P13[t] P14[t] -
1200.48 P23[t] - 500. P41[t] + 1200.48 P42[t] - 314.159 P53[t],
Derivative[1][P44][t] == -2.5*10^6 EE[t]^2 P14[t]^2 -
1200.48 P24[t] - 1200.48 P42[t] - 314.159 P45[t] - 314.159 P54[t],
Derivative[1][P45][t] == -2.5*10^6 EE[t]^2 P14[t] P15[t] -
1200.48 P25[t] + 314.159 P44[t] - 314.159 P55[t],
Derivative[1][P51][t] == -2.5*10^6 EE[t]^2 P11[t] P15[t] +
314.159 P41[t] + 100000. P53[t],
Derivative[1][P52][t] == -2.5*10^6 EE[t]^2 P12[t] P15[t] +
314.159 P42[t] - 100000. P53[t],
Derivative[1][P53][t] == -2.5*10^6 EE[t]^2 P13[t] P15[t] +
314.159 P43[t] - 500. P51[t] + 1200.48 P52[t],
Derivative[1][P54][t] == -2.5*10^6 EE[t]^2 P14[t] P15[t] +
314.159 P44[t] - 1200.48 P52[t] - 314.159 P55[t],
Derivative[1][P55][t] == -2.5*10^6 EE[t]^2 P15[t]^2 +
314.159 P45[t] + 314.159 P54[t]}