'How to deal with derivatives of input variables in equations in OpenModelica when doing linearization?
I'm trying to linearize a very simple model using OpenModelica's linearize() function, however, a translation error is produced likely because the equation of motion includes derivatives of the input variable.
Currently, I really don't mind the value of the input variable as long as I can get the state space representation with the function linearize(), from which I can calculate the transfer function. Therefore, I explicitly wrote the value of the input variable to be zero, but it still produces the error.
The definition of the model and the output generated in OMShell are below.
Any help would be appreciated.
Regards,
Fabian
Model definition:
model IP_v0
// Input and output variables
output Real x_load (start = 100e-6) "Displacement of the load";
input Real x_ground = 0 " Displacement of the ground";
// Velocities
Real v_load (start = 0) "Velocity of the load";
Real v_ground (start = 0) "Velocity of the ground";
// Parameters of the equation of motion
parameter Real beta = -1e-4;
parameter Real omega = 2 * 3.141592653 * 0.100 "Frequency of 100 mHz" ;
equation
v_load = der(x_load);
v_ground = der(x_ground);
der(v_load) + beta * der(v_ground) = -omega ^ 2 * (x_load - x_ground);
end IP_v0;
OMShell session:
linearize(VIS.IP_v0)
record SimulationResult
resultFile = "",
simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'VIS.IP_v0', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
messages = "Failed to run the linearize command: VIS.IP_v0",
timeFrontend = 0.0041959,
timeBackend = 0.0,
timeSimCode = 0.0,
timeTemplates = 0.0,
timeCompile = 0.0,
timeSimulation = 0.0,
timeTotal = 0.0042162
end SimulationResult;
getErrorString()
"Error: Internal error - IndexReduction.pantelidesIndexReductionMSS failed! Use -d=bltdump to get more information.
Error: Internal error - IndexReduction.pantelidesIndexReduction1 failed! Use -d=bltdump to get more information.
Error: Internal error - IndexReduction.pantelidesIndexReduction failed!
Error: Internal error Transformation Module PFPlusExt index Reduction Method Pantelides failed!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
