Real Time Motion Assessment for Positioning In Time and Space Critical Systems

download Real Time Motion Assessment for Positioning In Time and Space Critical Systems

of 11

Transcript of Real Time Motion Assessment for Positioning In Time and Space Critical Systems

  • 8/11/2019 Real Time Motion Assessment for Positioning In Time and Space Critical Systems

    1/11

  • 8/11/2019 Real Time Motion Assessment for Positioning In Time and Space Critical Systems

    2/11

  • 8/11/2019 Real Time Motion Assessment for Positioning In Time and Space Critical Systems

    3/11

    International Journal of Applied Research and Studies (iJARS)ISSN: 2278-9480 Volume 3, Issue 7 (July - 2014)www.ijars.in

    Manuscript Id: iJARS/894 3

    (2)Where, v is the translational velocity of the ball, is the angular velocity of the ball, I a is the beam inertia,and I b is the ball inertia.

    Figure 2: Schematics of the ball on beam balancer system (courtesy of [7])

    Since the sensors in this system measure ball translational position, x, and shaft angular position, , werewrite the kinetic-energy equation in terms of these two variables by finding the relationship

    between r and , and x. Note that the distance traveled by the ball is given by

    (3)Where, is the rotational angle of the ball with respect to the shaft with respect to the shaft and r is therolling, or effective, radius of the ball. The total angle of the ball is the sum of the angle of the ball withrespect to the shaft, , and the angle of the shaft, . The rotational velocity of the ball, therefore, is given by

    (4)The translational velocity of the ball, v, is given by (see Fig. 1B)

  • 8/11/2019 Real Time Motion Assessment for Positioning In Time and Space Critical Systems

    4/11

    International Journal of Applied Research and Studies (iJARS)ISSN: 2278-9480 Volume 3, Issue 7 (July - 2014)www.ijars.in

    Manuscript Id: iJARS/894 4

    (5)Replacing the rotational and translational velocities in the kinetic-energy equation yields,

    . (6)The equations of motion can now be obtained using the Euler-Lagrange equation:

    (7)

    Where L is the Lagrangian given by

    L= T - U (8)

    Replacing L in the Euler-Lagrange equation, we get

    (9)We ignore the derivatives of the shaft angle assuming the shaft movements remain relatively small. The

    simplified equation of motion is then given by

    (10)Applying the Laplace transform to the above equation yields the following transfer function

    (11)

    In the above equation, the inertia of the ball is given by

    (12)

    Plugging in I b in the transfer function G(s), we get

    = (13)

  • 8/11/2019 Real Time Motion Assessment for Positioning In Time and Space Critical Systems

    5/11

    International Journal of Applied Research and Studies (iJARS)ISSN: 2278-9480 Volume 3, Issue 7 (July - 2014)www.ijars.in

    Manuscript Id: iJARS/894 5

    III. PRACTICAL IMPLEMENTATION AND RESULTS

    Our system first captures the real time image of the operating system and then following operations aredone in subsequence:

    1. Gaussian Filtering

    A 5*5 Gaussian filtering has been implemented for removing any noises present in the image. To perform asmoothing operation we apply a filter to our image. The most common type of filters are linear, in whichan output pixels value (i.e. g(i,j) ) is determined as a weighted sum of input pixel values(i.e. ) :

    (14)

    h(k,l) is called the kernel , which is nothing more than the coefficients of the filter. An example of aGaussian kernel K of size=5 that might be used is shown below:

    (15)

    Figure 3: Original image Figure 4: Image after Gaussian smoothing

    2. Canny edge detection

    The Canny edge detector is an edge detection operator that uses a multi-stage algorithm to detect a widerange of edges in images. Its parameters allow it to be tailored to recognition of edges of differingcharacteristics depending on the particular requirements of a given implementation, thus this algorithm has

    been used for finding all the edges in the image.

    http://en.wikipedia.org/wiki/Edge_detectionhttp://en.wikipedia.org/wiki/Algorithmhttp://en.wikipedia.org/wiki/Algorithmhttp://en.wikipedia.org/wiki/Edge_detection
  • 8/11/2019 Real Time Motion Assessment for Positioning In Time and Space Critical Systems

    6/11

    International Journal of Applied Research and Studies (iJARS)ISSN: 2278-9480 Volume 3, Issue 7 (July - 2014)www.ijars.in

    Manuscript Id: iJARS/894 6

    Figure 5: Image after Gaussian smoothing

    3. Hough Line Transform

    After finding the edges the image containing edges is passed through Hough line finding algorithm, whichaccurately finds the location of the lines in the images, but using this operation we obtain numerous

    spurious lines in the images that could be representing any object. Since the set point of the ball is givenusing hand so obviously there is a line representing hand too. Of all these lines we take into account thelongest line which has slope between 85 and 90 degree, here we assume the hand is perpendicular thehorizontal plane while giving any gesture, and also the gesture is above the ball that is obviously above the

    beam. Although we have obtained the set point for PID system we need to tract the ball at every instanceand that is actually the key to the success to this kind of applications be it ball and beam or inverted

    pendulum or any other system, the more frequently and accurate is the tracking, more stable is the system.

    Figure 6 : Hough Transform of image with edges

  • 8/11/2019 Real Time Motion Assessment for Positioning In Time and Space Critical Systems

    7/11

    International Journal of Applied Research and Studies (iJARS)ISSN: 2278-9480 Volume 3, Issue 7 (July - 2014)www.ijars.in

    Manuscript Id: iJARS/894 7

    Figure 7: Final Set point indicated by hand gesture

    4. Moments and locating ball

    Now, how do we detect ball in the image. Since, in this project we are using colored ball and a smooth(single colored) background so HSV filtering was enough to find the region corresponding to ball. We findthe HSV range of the ball before hand and direct specifically to threshold HSV color image in that range.

    Since we have a threshold region we can obtain the centroid of that region after performing morphologicaloperation like dilation and erosion, we obtain the center of the circular region after using moments of animage. Thus the current point and the set point for the system are found and that information are send to asystem processor which converts this information into corresponding feedback to control the servo motorcoupled with the beam.

    In image processing, computer vision and related fields, an image moment is a certain particularweighted average (moment) of the image pixels' intensities, or a function of such moments, usually chosento have some attractive property or interpretation. Image moments are useful to describe objects aftersegmentation. Simple properties of the image which are found via image moments include area total

    intensity, its centroid, and orientation. For a 2D scalar (grayscale) image with pixel intensities I(x,y), rawimage moments M ij are calculated by (16)

    Simple image properties derived via raw moments include:1. Area (for binary images) or sum of grey level (for grey-tone images): M002. Centroid: (x, y) = (M 10 / M 00, M 01 / M 00)

    http://en.wikipedia.org/wiki/Image_processinghttp://en.wikipedia.org/wiki/Computer_visionhttp://en.wikipedia.org/wiki/Moment_(mathematics)http://en.wikipedia.org/wiki/Image_moment#Exampleshttp://en.wikipedia.org/wiki/Centroidhttp://en.wikipedia.org/wiki/Centroidhttp://en.wikipedia.org/wiki/Image_moment#Exampleshttp://en.wikipedia.org/wiki/Moment_(mathematics)http://en.wikipedia.org/wiki/Computer_visionhttp://en.wikipedia.org/wiki/Image_processing
  • 8/11/2019 Real Time Motion Assessment for Positioning In Time and Space Critical Systems

    8/11

    International Journal of Applied Research and Studies (iJARS)ISSN: 2278-9480 Volume 3, Issue 7 (July - 2014)www.ijars.in

    Manuscript Id: iJARS/894 8

    Figure 8: HSV tuning for the ball segmentation Figure 9: HSV image

    Figure 10: Segmented ball with its centroid marked

    5. PIDOne of the simplest types of non-linear controllers used in our system is the PID, which stands for

    proportional integral derivative. Each of the three elements is multiplied by its own constant, and then thesum is used to determine the new inputs for the actuator. The mathematical formula for the PID controlalgorithm:

    ) (17)Where, e(t) = error = current value previous value

    u(t) = overall error of the system

  • 8/11/2019 Real Time Motion Assessment for Positioning In Time and Space Critical Systems

    9/11

    International Journal of Applied Research and Studies (iJARS)ISSN: 2278-9480 Volume 3, Issue 7 (July - 2014)www.ijars.in

    Manuscript Id: iJARS/894 9

    With the correct choice of signs for K p, K i and K d, a PID controller as shown in below will generate anactuator command that attempts to drive the error to zero with the proportional gain, remove the steady-

    state error with the integral gain, anddampen the response with the derivative gain.Implementing PID controller to unstableBall &Beam will make the closed loopsystem stable.

    Figure 11: Block diagram of PID system

    In order to assess the system's response , the system error was calculated as per equation 17 continuallyand plotted as a function of time. The graph in figure 12 depicts that with the incorporation of only the K p

    parameter , the system isn't rendered stable , rather it continues in a prolonged oscillation about the set point. The zero crossings indicate the passage of the ball through set point.

    Figure 12: System error only considering proportional coefficient (k p)

  • 8/11/2019 Real Time Motion Assessment for Positioning In Time and Space Critical Systems

    10/11

  • 8/11/2019 Real Time Motion Assessment for Positioning In Time and Space Critical Systems

    11/11

    International Journal of Applied Research and Studies (iJARS)ISSN: 2278-9480 Volume 3, Issue 7 (July - 2014)www.ijars.in

    Manuscript Id: iJARS/894 11

    REFERENCES:

    [1] W. Yu, Nonlinear PD Regulation for Ball and Beam System , International Journal of ElectricalEngineering Education, Vol. 46, pp. 37 59, 2009.

    [2] Li X. and Yu W., Synchronization of Ball and Beam Systems with Neural Compensation,International Journal of Control, Automation and Systems, Vol. 8, No. 3, pp.491-496, 201

    [3] S.K Oh, H.J. Jang and W. Pedrycz, The Design of a Fuzzy Cascade Controller for Ball and BeamSystem: A Study in Optimization with the Use of Parallel Genetic Algorithms, EngineeringApplications of Artificial Intelligence, Vol. 22, pp. 261 271, 2009.

    [4] M.F. Rahmat, H. Wahid and N.A. Wahab, Application of Intelligent Control ler in a Ball and BeamControl System, International Journal on Smart Sensing and Intelligent Systems, Vol. 3, pp. 45 60,2000.

    [5] H. Verrelst, K. Van Acker, J. Suykens, B. Motmans, B. De Moor and J. Vandewalle, NLq NeuralControl Theory: Case Study for a Ball and Beam System,Proc. of the European Control Conference(ECC'97), Brussels, Belgium, July1 4, 1997.

    [6] M. Busl, Modeling and simulation of a general ball and beam process with interaction, Projects inAutomatic control FRT090, Department of Automatic Control, Lund University, Lund 2010.

    [7] Robert Hirsch, Ball on Beam System, 1999

    http://www.ro.feri.uni-mb.si/predmeti/skup_sem/projekt1/shandor.pdfhttp://www.ro.feri.uni-mb.si/predmeti/skup_sem/projekt1/shandor.pdf