1、a.Model of the angle process with respect to the motor voltage H (s)b.Model of the ball position with respect to the beam angle Hx(s)The total transfer function from the input voltage to the voltage that indicates the ball position is then3.Mathematical Model Derivationa.Model of beam angle vs. inpu
2、t voltageThe relationship between the input voltage and the angle of the beam is defined by the DC motor transfer function. The DC motor, used for angle control application may be thought of as the dirty integrator or the integrator with a filter action as shown in figure 1 on the next page.Figure 1
3、: General DC motor block diagram for angle control applicationThe K is the motor constant and the tau is the motor time constant. The actual model of the motor used for the project is shown in figure 2.Figure 2: Actual block diagram of the DC motor usedThe measured constants are summarized below:The
4、refore the DC motor transfer function becomesModel of ball position vs. beam angleConsider the following sketchFigure 3: Rolling ball free-body diagramThe inclination is considered the x-coordinate. Let acceleration of the ball be denoted as The force due to translational motion is thenThe torque de
5、veloped through ball rotation is determined by the force at the edge of the ball multiplied by the radius which can be further expressed as:whereJ = moment of inertia (for solid ball defined by J=2/5*mR2)Wb=angular velocity of the ballVb= speed of the ball along x axisThe equation is arranged such t
6、hat the final result is expressed solely in terms of position or its derivatives as well as variables associated with the ball.We now obtain the rotational force by dividing torque of the ball by its radiussubstituting the moment of inertia into the equation we getIn order to make the system indepen
7、dent of the mass of the ball we further express the above equations asrearranging for x giveswe utilize approximation , since the angle of the beam will not exceed 20-30 degree inclination. This means that in radians, sine of the angle is approximately the angle itself, so the equation is further ap
8、proximated astaking Laplace transform of position with respect to angle (details omitted) givesThe constant in the numerator is a theoretical constant that neglects surface imperfections and friction. The measured constant is approximately 0.91 thereforeNow the overall transfer function of the syste
9、m becomeswhere, 10.5 is an approximated constant.The block diagram of the overall system isFigure 4: Entire system block diagramThe MATLAB provides easy conversion of the system into state space. num=0 0 0 0 10.5; den=0.4 1 0 0 0; A, B, C, D=tf2ss(num, den)The LQR control can be implemented by choos
10、ing Q and R values. The controllability is verified first as follows: rank(ctrb(A, B)ans = 4This indicates that the ball and beam system is completely state controllable. Next we select Q and R and calculate for controller gains in MATLAB. We get Q=10 0 0 0; 0 10 0 0; 0 0 10 0; 0 0 0 10; R=1; K,S,E=
11、lqr(A,B,Q,R)K = 3.6048 10.5091 8.7444 3.1623S = 10.5091 55.4111 50.2205 19.3050 8.7444 50.2205 72.5913 33.2327 3.1623 19.3050 33.2327 27.6524E = -3.9559 -0.9059 -0.6215 + 0.7044i -0.6215 - 0.7044iWe can see that the gain values are reasonable and therefore the actual system may perform well. The sim
12、ulation in simulink is done using the following block diagram:Figure 5: Simulink state space modelThe Scope measures the output while the Scope1 monitors the control effort. The snapshots are as shown in figures 6 and 7.Figure 6: Output converging from ICFigure 7: Control effortThe initial condition
13、 was set to 10cm from the centre at an angle of 5.7 degrees. It is can be seen that the system converges very slowly. The state variables are: - angular acceleration - angle of the beam - ball acceleration - position of the ballThe position and the angle can be measured directly with sensors while the angular acceleration and the ball acceleration will have to be mathematically estimated. The control voltage V is then (注:可编辑下载,若有不当之处,请指正,谢谢!)
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1