Mathematical Model of Two-Cart - flexible joint system

Discussion in 'Homework Help' started by blazedaces, Jan 28, 2009.

  1. blazedaces

    Thread Starter Active Member

    Jul 24, 2008
    130
    0
    Alright, so this is part of a lab for a computer controls class.

    I enjoy this class because we conduct actual experiments ... but in order to do so they're rushing us through some material that we shouldn't be learning for another few years...

    This shouldn't be too hard, but I'm having trouble. Anyway, let me start explaining the problem:

    So there are two carts attached together by a spring. Both carts are on a track of sorts. The back of the of the carts are attached via a straight rod that keeps them both in place on a straight line... and the one of the carts moves itself back and forth via a rotor turning a motored gear along this track. The other cart just has a "potentiometer gear" on it for measuring purposes, but it can't move itself.

    Quanser (I believe the company providing the equipment) did model the system, but approximated by ignoring certain values.

    This is an overview of how quanser obtains its state space matrix:

    F = input force to the cart (N)
    m_1 = mass of motor cart (kg)
    m_2 = mass of load cart (kg)
    K = spring stiffness (N/m)

    The states of the system are:

    x_1 = position of motor cart (m)
    \dot{x}_1 = velocity of motor cart (m/sec)
    x_2 = position of load cart (m)
    \dot{x}_2 = velocity of load cart (m/sec)

    (Note: the goal is to get x output for voltage input)

    The state description with force input is given as:
    \begin{bmatrix} \dot{x}_1\\ \ddot{x}_1 \\ \dot{x}_2 \\ \ddot{x}_2 \end{bmatrix} =
    \begin{bmatrix} 0 & 1 & 0 & 0 \\ -\frac{k}{m_1} & 0 & \frac{k}{m_1} & 0 \\ 0 & 0 & 0 & 1 \\ \frac{k}{m_1} & 0 & -\frac{k}{m_1} & 0 \end{bmatrix} =
    \begin{bmatrix} 0 & 1 & 0 & 0 \\ -\frac{k}{m_1} & 0 & \frac{k}{m_1} & 0 \\ 0 & 0 & 0 & 1 \\ \frac{k}{m_1} & 0 & -\frac{k}{m_1} & 0\end{bmatrix}
    \begin{bmatrix} x_1\\ \dot{x}_1 \\ x_2 \\ \dot{x}_2 \end{bmatrix} +
    \begin{bmatrix} 0\\ \frac{1}{m_1} \\ 0 \\ 0 \end{bmatrix} F

    Which with the given values (rounded) equates to:

    \left[ \begin{array}{c} \dot{x}_1\\ \ddot{x}_1 \\ \dot{x}_2 \\ \ddot{x}_2 \end{array} \right] = \left[ \begin{array}{cccc} 0 & 1 & 0 & 0 \\ -45 & 0 & 45 & 0 \\ 0 & 0 & 0 & 1 \\ 76 & 0 & -76 & 0\end{array} \right] \left[ \begin{array}{c} x_1\\ \dot{x}_1 \\ x_2 \\ \dot{x}_2 \end{array} \right] + \left[ \begin{array}{c} 0\\ 1.02 \\ 0 \\ 0 \end{array} \right] FTo convert to the desired voltage input we use the previously obtained force equation (this is from a previous lab)

    F = \frac{K_mK_g}{Rr}V - \frac{K_m^2K_g^2}{Rr^2}\dot{x}
    Substituting this into the matrix equation we have

    \left[ \begin{array}{c} \dot{x}_1\\ \ddot{x}_1 \\ \dot{x}_2 \\ \ddot{x}_2 \end{array} \right] = \left[ \begin{array}{cccc} 0 & 1 & 0 & 0 \\ -45 & -7.4 & 45 & 0 \\ 0 & 0 & 0 & 1 \\ 76 & 0 & -76 & 0\end{array} \right] \left[ \begin{array}{c} x_1\\ \dot{x}_1 \\ x_2 \\ \dot{x}_2 \end{array} \right] + \left[ \begin{array}{c} 0\\ 1.73 \\ 0 \\ 0 \end{array} \right] VWhich is the desired representation.

    Ok, so that was qaunser's solution (well the state space matrix anyway, there's a lot more, but most of is beyond me.

    The difference is that we're required to model the system ourselves using info from our previous lab where we modelled the cart alone, but we had to account for friction and induction in the rotor.

    This changes the force equation above to the following (I'm keeping it in the laplace domain because I know no other way):
    F(s) = \frac{K_mK_g}{r(R+sL)}V(s) - \frac{K_m^2K_g^2}{r^2(R+sL)}sX(s)

    So my question is how do I get rid of an R+sL in the denominator? The matrix needs only constant values in it, correct? And also, now that I'm thinking about it, how do I get friction in this equation too?

    Thanks for all of your help.

    -blazed

    Edit: I can't for the life of me figure out how to represent matrices correctly in latex. I apologize...
     
    Last edited: Jan 29, 2009
Loading...