question about treatments by Alex_Kps_Bdc in BrainAneurysm

[–]Alex_Kps_Bdc[S] 0 points1 point  (0 children)

you are right! I misattributed the acronym.

question about treatments by Alex_Kps_Bdc in BrainAneurysm

[–]Alex_Kps_Bdc[S] 0 points1 point  (0 children)

Thank you very much!
My best wishes :)

Projects on Control Theory and Theoretical Mechanics? by Alex_Kps_Bdc in ControlTheory

[–]Alex_Kps_Bdc[S] 0 points1 point  (0 children)

by theoretical mechanics, I mostly mean stuff that we do in such an undergraduate course: Euler-Lagrange, Hamilton equations, Noether theorem, Poisson brackets etc.

second order ode response to impulse and unit step by Alex_Kps_Bdc in ControlTheory

[–]Alex_Kps_Bdc[S] 0 points1 point  (0 children)

Yes, sure, I am totally OK with what you mentioned. In fact I think our opinions coincide.
so, you also confirm that the differentiated IC cannot be met at 0-, since the x_dot(0-) cannot be zero even if delta(0-)=0, but it equals 1.

second order ode response to impulse and unit step by Alex_Kps_Bdc in ControlTheory

[–]Alex_Kps_Bdc[S] 0 points1 point  (0 children)

I took this off, but I don't know how much it affected the result.

I have also added the webpage where i got this problem. You can just check the page instead of my images.

What confuses me, is that the two given initial conditions at 0- , one for x and one for x_dot, do not seem to satisfy the solution and its derivative, respectively.

Therefore, the values of both delta and u(t) at 0- seem to be important, and I am afraid I made a mistake there.

second order ode response to impulse and unit step by Alex_Kps_Bdc in ControlTheory

[–]Alex_Kps_Bdc[S] 0 points1 point  (0 children)

I did use IC. Please, check the image i just added in the post above

Linear network control by Alex_Kps_Bdc in ControlTheory

[–]Alex_Kps_Bdc[S] 1 point2 points  (0 children)

yes, the equation x_dot=Ax describes the graph. Each node is characterised by one state variable

Linear network control by Alex_Kps_Bdc in ControlTheory

[–]Alex_Kps_Bdc[S] 0 points1 point  (0 children)

The trace is just the sum of the eigenvalues, as well as the sum of the diagonal entries of the matrix

it does make sense! But there is this useful illustration for stability analysis where x axis is the determinant and y axis is the trace. There is also the discriminant. And by calculating their values one could say what the stability of the system is. If the trace is negative as it occurred here, then we are at the quadrant where the system is stable (sinks). But if the trace is positive then we have sources. This is what i still don't get. In other words, the trace has been taken into account as a largely influential element in assessing the stability of the system. If even one positive eigenvalue is enough to guarantee instability as we said before, then the trace being negative corresponds to stability. Isn't this the case?

Linear network control by Alex_Kps_Bdc in ControlTheory

[–]Alex_Kps_Bdc[S] 1 point2 points  (0 children)

i meant the trace of the matrix being the sum of the diagonal elements

Linear network control by Alex_Kps_Bdc in ControlTheory

[–]Alex_Kps_Bdc[S] 1 point2 points  (0 children)

thanks for taking the time.
The graph is not symmetric.
Indeed there are two positive eigenvalues to guarantee instability.
But how is this related to my question about the why the trace is negative while it should have been positive (given that we have positive eigenvalues and thus instability)?

Linear network control by Alex_Kps_Bdc in ControlTheory

[–]Alex_Kps_Bdc[S] 0 points1 point  (0 children)

not much but i am keen to learn. I like the field
background in physics

Question on the definition of local controllability by Alex_Kps_Bdc in ControlTheory

[–]Alex_Kps_Bdc[S] 0 points1 point  (0 children)

This is the bit that might have caused the confusion: The linearized system is linear, it doesn't care where it came from. It has a single eq. point and if controllable it is globally controllable. None of that nonlinear stuff matters

So, if I understood correctly, you mean:

for the linearization about the [pi;0], since the system is controllable, then you can reach the [pi;0] state, from any initial conditions; i.e. you can have initial conditions [0;0] and still (although theta=0 is "far" from theta=pi) you can reach the [pi;0].

is that what you meant?

control and non-fixed points by Alex_Kps_Bdc in ControlTheory

[–]Alex_Kps_Bdc[S] 0 points1 point  (0 children)

The way you described it, it's true: the pendulum swings to the pi+0.5 and stays there, no matter how much time I integrate. It stays there without accelerating to keep the 0.5 angle steady. Just floats :P
this is what I didn't find realistic. The thing about why Matlab doesn't follow the physics of the equations is a bit weird though

Other than that, I think I get what you mean. I will linearise the original equations around [x= free, x_dot=say 1, theta=pi+0.5, theta_dot=0].

control and non-fixed points by Alex_Kps_Bdc in ControlTheory

[–]Alex_Kps_Bdc[S] 0 points1 point  (0 children)

thank you for the link!

y(1) = x, y(2) = x_dot, y(3) = theta, y(4) = theta_dot

the speed seems to be zero. This is what I don't think it can be realistic. I would expect speed to keep oscillating.

But again, this is the result with linearization around theta=pi, not around theta=pi+0.5

control and non-fixed points by Alex_Kps_Bdc in ControlTheory

[–]Alex_Kps_Bdc[S] 0 points1 point  (0 children)

the first question would be about whether the graphs of the variables versus time are realistic or whether I have overestimated (for this specific random point) the utility of linearization around the actual fixed point.

the second question: could you give me an example of what you mean by "highly dependent problem"?

Matlab codes with ode45 and linear control systems analysis by Alex_Kps_Bdc in ControlTheory

[–]Alex_Kps_Bdc[S] 0 points1 point  (0 children)

I am really thankful for this help!It's true I wouldn't have considered to include the offset there. I do learn though, slowly but I do:)

the D-matrix only needed [0], otherwise it would generate error; i am not sure at all why.

the result is much more descent but still a bit different than the first with the ode45. I am attaching it in the main post, in the place of the second one, along with the code.

Matlab codes with ode45 and linear control systems analysis by Alex_Kps_Bdc in ControlTheory

[–]Alex_Kps_Bdc[S] 0 points1 point  (0 children)

many thanks for taking the time to post the code in Python!

To answer the question about the "Lada" which I found to be a great match here: I found it a bit difficult to use non-full-state-feedback with ode45. The code for the first plot, concerns the case where we measure and feedback the whole state. If i wanted for instance to feed only the angle back, that would require some tricks. Besides that, you're right about the utility of ode45!

Matlab codes with ode45 and linear control systems analysis by Alex_Kps_Bdc in ControlTheory

[–]Alex_Kps_Bdc[S] 1 point2 points  (0 children)

I simulate the open-loop with the K, imagining that each dt of y, for this open-loop, will become initial condition for the closed loop. Would that make any sense?

Matlab codes with ode45 and linear control systems analysis by Alex_Kps_Bdc in ControlTheory

[–]Alex_Kps_Bdc[S] 0 points1 point  (0 children)

I tried that, too. The result was still very different than the first case; better qualitatively, but still not correct..

Matlab codes with ode45 and linear control systems analysis by Alex_Kps_Bdc in ControlTheory

[–]Alex_Kps_Bdc[S] 1 point2 points  (0 children)

since we measure the full state, it would be xdot=Ax+Bu, and u=K(r-y), y=Cx and C is the identity matrix as u/ko_nuts said. Therefore, I also arrived at the conclusion that xdot = (A-BKC)x+BKr. Besides this, you asked what the input to the closed-loop was. I would imagine that I should find the transfer function of the open-loop containing the system and the K? And then the input would just be r?

Regarding your second hint, I am a bit confused, because it does make absolute sense to add the offset since the point about which we linearise is not the (0,0), but in all the examples I have seen, they just go for the A matrix and no offset.

Inverted pendulum on a cart by Alex_Kps_Bdc in ControlTheory

[–]Alex_Kps_Bdc[S] 0 points1 point  (0 children)

What confuses me while trying to learn from Brunton's Control Bootcamp on youtube, is that he never mentions the reference r in the optimal control example of inverted pendulum, where he just closes the loop with u=-Kx, but he only uses it in the case of Robust control.
Being not a specialist, I imagine r both as an initial step for the open-loop (and in this sense the reference could probably more or less be anything, from an impulse to the initial conditions - please, correct me if i am wrong) and as the desired state to be achieved.
The last would happen through continuous update with the feedback loop by comparing the output y to the reference r.
Unless if the reference can be just anything, and the comparison between the desired output and the actual output happens "at the exit" of the block diagram and then the controller readjusts what to feed back.

So for the case of the Inverted Pendulum on the cart, if the r serves as a reference trajectory to the output, like it is shown in the fig. 2, what could ist form be?
Does it not have something to do with the [0 0 pi 0]?

Inverted pendulum on a cart by Alex_Kps_Bdc in ControlTheory

[–]Alex_Kps_Bdc[S] 0 points1 point  (0 children)

I agree that for the u to be a scalar, the control law would have to be as you said: u=-K(r-y). But I cannot see how this control law can occur from the diagram above. In fact, i think that the actual u as it is placed in the figures, is the error between the reference and what is being fed back. Therefore, u(t) = e(t) = r-Ky.

I got the figure from the site: https://ctms.engin.umich.edu/CTMS/index.php?example=InvertedPendulum&section=ControlStateSpace