The value actually measured and obtained corresponds to Y. Therefore, if you get position and velocity values of the cart, these should be elements of Y.
On the other hand, when you implement this controller in PLC, you need to get all state value (x, x_dot, phi, phi_dot) to calcurate control input using LQR controller. If there is some lack of them, you need to estimate these value. If you know the position and angle and not the derivative value, you can find them by simply differentiating. As another method, it is common to use an observer for state feedback control as shown below.
Please note that the measurable value corresponds to Y.
I hope this will help.