I'm working on building an LQR for a system which consists of a ball in a vertical tube, a fan is situated at the bottom of the tube and a distance sensor is at the top, a raspberry Pi is used to send a PWM signal to the fan which can be supplied with 0-5 Volts. The idea is that the user can set the desired height of the ball and the fan will lift it up the the desired height. I have two equations which I combined to get the ball dynamics in terms of voltage supplied, my maths can be seen below:
I have the simulation working in MATLAB but I've gotten stuck in a rut with grasping what the "U" control signal actually refers to in the physical system, I want to believe that the "U" term in the state space model is the voltage supplied to the fan but I've received other opinions that this isn't the case and that the "U" signal being produced by the LQR calculations is somewhat arbitrary and is to be converted for interpretation by the Pi with a multiplier of "5/255" (which is referring to the resolution that the Pi can receive the signal in). The main reason for this question is I have to ensure that the 0-5 Volts saturation limit is adhered to by the LQR and am unsure as to how to achieve this. So in this case, is the "U" term in the state space model exactly equal to the required supply voltage, or is there something more to consider? Any thoughts are welcome.
Thanks in advance.