0
$\begingroup$

I have a scenario where I have a bar of 0.1 m in length, 10N weight is applied in the center. Two forces are applied on the bar at both ends vertically, right one if 5.1 N and the left one is at changing magnitude, I denoted as F+5 N.

F is a value to be determined with the controller, initially 0. I want to be able to keep the bar facing upwards (upside down is prohibited), and not deviating from x = 0 much by controlling the changing force. F cannot be negative.

Initially system is at rest. After t = 0 system will rotate CCW as expected.

system sketch

I implemented a basic P controller in Simulink as shown below to get following. enter image description hereenter image description here

I have several questions related to this:

  1. With this system(one input), can I obtain a solution which will keep both horizontal error and orientation error within a certain limit? If so, what kind of controller should I implement?
  2. I wanted to add PID controller block of Simulink to tune the gains. However it raised error of 'the system cannot be linearized'. At first I thought this was related to underactuation (since I use only 1 input, but need 3 actually). But now I start to think that it is related to nonlinearity. What is the main reason that prevents non-linearization?
  3. If I add 2 more forces, can I use PID for my purpose? Or the system becomes MIMO and I cannot?

Thank you for your help.

$\endgroup$

1 Answer 1

0
$\begingroup$
  1. There is quite a trivial solution to this problem if you take a step-back and look at it from a simple mechanical point of view! There's an open-loop value of $F$ that will perfectly keep $x=0$ and $\theta=0$. Try sticking in $F=0.1N$

  2. You are right, the system is nonlinear, but you actually still should be able to keep $x$ marginally stable, even if not properly stable. The reason the bar is flying off to the left is because you have a steady-state error in $\theta$, which luckily you can fix by just adding an integral term. Now, because I don't have access to a MATLAB license I can't test this for you , but I would suggest adding one of these blocks here (+ a gain block) in parallel with you're proportional term. The key is that it should ONLY be feedback from $\theta$.

Integrator block

I am presuming here that you have tried to add feedback to $x$. If you write out the equations of motions you can see that the control input is multiplied by a function of $\theta$ which may be why MATLAB is having trouble linearising:

$$ m \ddot x = -5.1sin(\theta) - 5sin(\theta) - Fsin(\theta) $$ $$ m \ddot y = -10 + 5.1cos(\theta) + 5cos(\theta) + Fcos(\theta) $$ $$ I \ddot \theta = 0.005 - 0.05F $$

There's a discussion here about what you could do about it how to handle state space model where states are multiplied by inputs ?. But as I've said earlier, you'll be able to stop $x$ from being completely unstable without even bothering to try and control it.

  1. The number of forces isn't the issue here: PID control is a linear feedback law and you will still have to find a way to linearise. If for instance F always pointed vertically, you could eliminate the problem. Otherwise you might look towards numerical methods to sort out the nonlinearity. (see the link!)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.