## Finding a differentially flat output with the method of characteristics

I’m currently having some problems with a system which does not have a well-defined relative degree. Well, I should say: The *outputs* which I’d like to use don’t have a well-defined relative degree. To get some practice with these ugly systems, I made up this one today:

The state x_{1} does not have real dynamics, so it seems more appropriate to investigate the state x_{2}. If I define an output y=x_{2}, it will have a relative degree r=1 unless I’m in the origin, x_{2}=0, where the relative degree of y is suddenly r=2. Anyway, outside of the origin we can easily set up an I/O-linearizing controller with the control law

which will exponentially stabilize an arbitrary set point x_{2s} if we choose v as

with a positive constant k. The zero dynamics will also be exponentially stable.

Now, what to do near the origin x_{2}=0? If we are sufficiently close, then we can neglect the nonlinearity x_{2}·u and use a PD-controller to stabilize x_{2}:

I did a numerical simulation, it works. Now we have an globally asymptotically stable control law which we can use for every set point as long as x_{2}≠0, and we have a simple linear controller that will stabilize x_{2}=0. Ok, job done. But wait, having two control laws and switching back and forth is ugly. Therefore I tried to find the masterpiece: an output which will have a constant relative degree of r=2 for all states.

So here we go. The system is input affine and can therefore be states as

with the vector fields

The Lie bracket ad_{f}g can easily be calculated as:

Now we can write down the PDEs which a differentially flat output λ(x_{1},x_{2}) has to fulfill:

In a different nomenclature the first PDE can be written as x·u_{x} + u_{t} = 0. This is a nonlinear first-order PDE. A few memories from the “Systeme mit verteilten Parametern” lecture came up. Maybe Flocke’s lecture was more useful than we thought? (My “bro” Tommy was the only one who liked this, I think.)

Anyway, when I solved this PDE, I looked here. That was really a nice introduction. So, the PDE is

with the coefficient functions

Now I define a new time variable s and calculate how a variable u will change with s:

Nothing special so far, right? Let’s suppose I can fulfill three ODEs:

I these three ODEs are fulfilled, then the expression du/ds will not just describe how any function u changes with respect to my new time s, but how the solution u of my PDE changes along s. Great! Here are the solutions for the three ODEs above:

If I (more or less arbitrarily) choose t_{0}=0 and u(0,x_{0})=x_{0} and eliminate x_{0} and s, then I finally have my flat output (in fact, I chose those initial conditions such that the second PDE is fulfilled, but this will be obvious to you if you do the calculations yourself):

Yipee!!! :-) :-) :-)

Unfortunately though, I cannot give an explicit expression for x_{1}. And the parametrization of the system input u once again has a singularity. This time however, the singularity is at x_{1}=1 and not x_{2}=0, but still it is a bit disappointing. Anyway, here is the parametrization:

Thank you for reading! I hope you liked it and I hope I did not do too many mistakes (I haven’t checked anything of this and I’m completely tired).

Tommysaid, on March 8, 2009 at 7:58 am“in fact, I chose those initial conditions such that the second PDE is fulfilled”

… did you?

Tommysaid, on March 8, 2009 at 8:31 amI knew it would be useful some day! :D

[… although in this case of not having any boundary/initial conditions you could as well “guess” v=u/x^n with dv/dx=0 and n being almost any number, yielding dv/dt+nv=0 and thus u=x^n e^(-nt), however i’m afraid no finite n will help to fulfill the second PDE :( …]

all the best!

the bro

Ulfsaid, on March 8, 2009 at 5:01 pmTommy, are you worried about not fulfilling the second PDE at x1=1?

Well, I ended up not really caring about that singularity ;-)

In some books they do in fact call the second PDE a “non-triviality condition”. And my solution is non-trivial. I hope :-).

Tommysaid, on March 11, 2009 at 5:36 pmyeah, right! that’s actually what i was wondering about. … but since i don’t really know where those conditions come from (in fact, i don’t really know a lot about finding differentially flat outputs at all – hope you’ll explain it to me some day :) …), i would not give a penny for the usefulness of my own comments! :D … anyway, just want to say that i read it and i even made up my mind about it and i really like your educational* blogs!

*things we once learned and should have kept in mind

things a cybernetics guy/girl might find useful some day

things that yield a tiny glimpse on ulf’s academic work

Ulfsaid, on March 11, 2009 at 5:43 pmCooooooool!!!!

I only have to write a few words about PDEs and Tommy calls my diploma thesis an “academic work” :-D :-) :-]

Sure, I can tell you about differential flatness one day.

Basically it’s some theory around “exact linearization”. I’m sure you’ve had something like that in your control classes.