필터 지우기
필터 지우기

Using ode45 on conditioned equations

조회 수: 2 (최근 30일)
Alex B
Alex B 2023년 4월 12일
댓글: Torsten 2023년 4월 13일
I'm designing a control law that works off a modified version of Newton Method, so:
(the actual equations for f and g are long and don't really matter here)
where P is a conditioner matrix that needs to update as the algorithm runs. The problem is that, if we let x have n members, P has entries. In the past I was numerically integrating with a script I wrote, which meant I could guaruntee the matrix would update how I wanted.
However, now that I've started using ode45 for this I have a problem; because ode45 will adpatively vary the timestep and step backwards in time to recalculate if the error gets too high, updating P becomes hard (as in I can't do the quick and easy thing of evalin/assignout). Right now I'm getting around this by making every entry of P a part of my state space (meaning my state space went from n elements to 4n^2 + n), but this slows my algorithm down by a lot.
I know there's no real way to get around the speed loss from having that large of a matrix, does anyone know of a better way to do this? I feel like there has to be a smarter way to update this matrix than making my state space absolutely gigantic.
  댓글 수: 1
Torsten
Torsten 2023년 4월 13일
If the elements of P are given by Pdot = g(x,f(x)), you need to solve 4*n^2 differential equations for them. There is no easier way here.
What do you mean by "In the past I was numerically integrating with a script I wrote, which meant I could guaruntee the matrix would update how I wanted." ? Are there algebraic relations for the elements of P besides the differential formulation ?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by