Linear parameter varying control (LPV control)

I am trying to implement an LPV controller based on GitHub - JuliaControl/DiscretePIDs.jl: Discrete-time PID controllers in Julia

The idea is easy: Use a controller for heading/ course with an inner and an outer loop. The inner loop controls the turn rate, the outer loop heading or course. The scheduling parameter is the apparent wind speed. Based on the scheduling parameter the gains of the inner and outer controller are varied accordingly.

Less obvious:

  • how to determine the lookup-table with the controller parameters?
  • how to determine if the system is stable, and what the stability margin is

Are there any other packages/ Julia resources regarding this topic?

Here are two suggestions of related (and potentially useful) packages

1 Like

Thanks a lot!

But I think there is a slight difference between LPV systems and LTV systems. The wind speed is a parameter that can be measured (or estimated), but the future wind speed is not known, and as far as I know LTV systems assume that the time dependency is known.

You’re welcome, LPV and LTV are different, but I assume (without certainty though) that @baggepinnen has built-in tools to handle LPV).
You should have a look at the gain scheduling and batch linearization terms that are LPV model building technique.
Maybe also have a look at Home · RobustAndOptimalControl Documentation if not already, since parameter variations can be also overcome (depdendy on how much the parameter changes) through robust control.

Not really. The force depends on the square of the wind speed, and if I want my controller to work in the range of 5 to 30 m/s wind, then the forces vary by a factor of 36, and the system gains are (in first approximation) proportional to the aerodynamic forces.

Gain scheduling I already did in my PhD thesis 10 years ago, but now I want to improve based on this foundation. Batch linearization looks very interesting. Unluckily I don’t have an MTK model yet that I could easily linearize.

Yes, for wind speed a robust controller won’t be enough, although gain scheduling works very well in such cases. Regarding your non-MTK model, you could modelintoolkitize it, couldn’t you ?

This will most likely not work, because my code is not compatible with auto-differentiation, it has many if statements and loops. I could re-write it myself, or find a student to do it.

  • how to determine if the system is stable, and what the stability margin is

There are some tools to compute the structured singular value for systems with uncertainty varying with time here. They tend to be very conservative in an LPV setting though. You can also compute a common Lyapunov function for all systems by solving an LMI, but this is also conservative.

If you can express your LVP model as a polynomial system, you may be able to use Sum-of-squares programming to find a Lyapunov function, here’s an example.

If the system is arbitrarily nonlinear, the only rigorous computational method I know of is ReachabilityAnalysis, which tends to be expensive as the dimension of the state space grows large. Large-scale Monte-Carlo simulation tends to be the standard method though.

how to determine the lookup-table with the controller parameters?

The simplest approach is to take the procedure you have for tuning a controller in one operating point and then replicating this for all operating points you want to include in you gain schedule. The gain-scheduling example linked above contains an example of this.

If you can express your LPV system as an LFT, you may be able to use methods from one of the references below by solving convex optimization problems

2 Likes

Thank you very much for the detailed response!