Opened 8 years ago

Closed 7 years ago

#3703 closed defect (fixed)

Linearization of CombiTable2D fails

Reported by: hans.hell@… Owned by: wbraun
Priority: high Milestone: 1.12.0
Component: Backend Version: v1.9.4-dev-nightly
Keywords: Cc:

Description

in version v1.9.4-dev.beta1.116+gdd6bae1

obviously CombiTable2D is not considered in Linearization.
therefore result in matrix B is not correct
see attached example.

Attachments (5)

LinTab.mo (1.7 KB) - added by hans.hell@… 8 years ago.
LinTab.png (10.7 KB) - added by hans.hell@… 8 years ago.
linear_LinTab.mo (563 bytes) - added by hans.hell@… 8 years ago.
LinTabNEW.mo (1.7 KB) - added by hans.hell@… 8 years ago.
linear_LinTabNEW.mo (589 bytes) - added by hans.hell@… 8 years ago.

Download all attachments as: .zip

Change History (15)

Changed 8 years ago by hans.hell@…

Changed 8 years ago by hans.hell@…

Changed 8 years ago by hans.hell@…

comment:1 Changed 8 years ago by wbraun

  • Component changed from Code Generation to Backend
  • Owner changed from lochel to wbraun
  • Status changed from new to assigned

comment:2 Changed 8 years ago by hans.hell@…

Correction: I attached wrong *.mo (table.y == 3.0) --> this cannot work.

In the NEW LinTabNEW.mo with a table ( y =u1+u2 ) should give a linearized system with B !=0.0
sorry for the inconvenience.

Changed 8 years ago by hans.hell@…

Changed 8 years ago by hans.hell@…

comment:3 Changed 8 years ago by sjoelund.se

  • Milestone changed from 1.9.4 to 1.9.5

Milestone pushed to 1.9.5

comment:4 Changed 8 years ago by sjoelund.se

  • Milestone changed from 1.9.5 to 1.10.0

Milestone renamed

comment:5 Changed 8 years ago by hans.hell@…

in the current version the C-source for derivative calculation is missing! See example below.

modelica_real omc_$DER$$PModelica$PBlocks$PTables$PCombiTable2D$TAB$PgetTableValue(...)
{
  modelica_real _$$PModelica$PBlocks$PTables$PCombiTable2D$TAB$PgetTableValue$funDERy;
  modelica_real _y;
  _tailrecursive: OMC_LABEL_UNUSED
  _return: OMC_LABEL_UNUSED
//
// RETURN never defined
//
  return _$$PModelica$PBlocks$PTables$PCombiTable2D$TAB$PgetTableValue$funDERy;
}



Problem can be solved by manual C-coding of the derivative function (similar to the getTableValue-function). Then the derived A,B matrices are correct.

comment:6 Changed 8 years ago by sjoelund.se

If you think getTableValue should have a derivative function, you should open a bug report on modelica.org

comment:7 Changed 8 years ago by sjoelund.se

  • Milestone changed from 1.10.0 to 1.11.0

Ticket retargeted after milestone closed

comment:8 Changed 7 years ago by sjoelund.se

  • Milestone changed from 1.11.0 to 1.12.0

Milestone moved to 1.12.0 due to 1.11.0 already being released.

comment:9 Changed 7 years ago by wbraun

  • Status changed from assigned to accepted

The derivative functions is missing due to the fact that functions were removed with the module removedUnusedFunction, which is applied to early.
This should be fixed with OMCompiler#1665.

comment:10 Changed 7 years ago by wbraun

  • Resolution set to fixed
  • Status changed from accepted to closed
Note: See TracTickets for help on using tickets.