Slides - MECHATRONIC TEAM

Document Sample
Slides - MECHATRONIC TEAM Powered By Docstoc
					ABSTRACT

  The Mechatronic Team has the main objective for the development project to
  make the electromechanical integration of the acquisition, actuators and
  power systems of an Unmanned Aerial Vehicle UAV, and also do the
  respective flight test. Therefore, it is required to make a careful selection by
  engineering criteria of both the vehicle and the electronic components on
  board that will allow us to achieve the established objective of obtain an
  autonomous vehicle useful for multiple applications.
MECHATRONIC TEAM
   Tasks


 Selection of components: vehicle, sensors and actuators
 Design of electronic board: Control Power Servo Drives,
  Acquisition of PWM signals and micro controller QE128.
 Freescale QE 128 Programming. (microcontroller).
 Flight test: Data Capture of sensors and actuators.
 Neuronal control and system identification.
General Mechatronic Diagram
Diagram of the Electronic board: “Neurocopter 1.0”
                                                                       PWM CAPTURE
                                                                        FROM RADIO
                                                                        CONTROLER                     SWITCH CONTROL BIT                                           PWM To Thrust
                                                                                                                                                                      Driver
                                                                                                                           RADIO CONTROLER CH1

                                                                                                                           RADIO CONTROLER CH2

                                                                                                                           RADIO CONTROLER CH3
                                                                                                                                                                   PWM To Roll
                                                                                                                                                                     Servo 1
                                   +3V SOURCE                                                                              RADIO CONTROLER CH4
                                                                                                                                                 MULTIPLEXOR
                                                                                                                                                   74157            PWM To Roll
                                                                                                                                                                      Servo 2

                                                                                                                                                                  PWM To Pitch
                                                                                                                                                                    Servo



                                                                                                                              4N33                                PWM To Yaw
                                           SPI                                                                                                                      Servo
                                                                                                                           OPTOCOUPLER
          SD MEMORY
                                         Acceleration X ADC                                  PWM CH1

                                         Acceleration Y ADC
                                                                                             PWM CH2
                                         Acceleration Z ADC                  uControler
                                          Angular Rate X ADC
                                          Angular Rate X ADC

                                                 Angular Rate YYADC
                                                                               QE128          PWM CH3
                                                 Angular Rate ADC
               IMU                               Angular Rate ZZADC                                                          TLP521-4
                                                 Angular Rate ADC
                                                                                              PWM CH4                      OPTOCOUPLER


                                       HIGH ADC

      ULTRSONIC SENSOR
                                                                                                                                                           PWM TO DATA-
                                                                                                                                                            LINK MODEM




                                                                                                                                                    DBD9
                                                                                                 TR/RX 1




                                                                                            TR/RX 2                         MAX232
 +12V SOURCE                  7809                                                 7805
                           REGULATOR                                            REGULATOR
                                                                                                                                                           TO GPS DEVICE




                                                                                                                                                    DBD9
                 DATA-LINK MODEM                      CAMERA VOLTAGE
                  VOLTAGE SOURCE                         SOURCE
Freescale µController QE128 Programming




 ADC interfaces.
 Serial Communication interface. (Tx & Rx)
 PWM modules: PWM signal generation, and capture of
  PWM signals.
 SPI protocol (Master – Slave): SD memory in SPI mode.
 Flight algorithms.
Flight Test Diagram
Flight test: Real Time Data Capture of sensors and
actuators.
  PWM and       Conversion of
   sensors     digitized data to                   System ID
                    units of
                                   Kalman Filter
   Capture
              measurement data
Neuro controller for a MIMO system ID




                                           Inputs:
                                           accelX: Linear Acceleration axis X ( m/s2).
                                           accelY: Linear Acceleration axis Y ( m/s2).
                                           accelZ: Linear Acceleration axis Z ( m/s2).
Neuro controller:                          GyroX: Angular velocity axis X (°/sec).
MLP network model is used. The             GyroY: Angular velocity axis Y (°/sec) .
                                           GyroZ: Angular velocity axis Z (°/sec) .
design of the NN is composed by 9          AngX: Angle X in degrees °.
values at the input layer, 10 activation   AngY: Angle Y in degrees °.
sigmoid neurons at the hidden layer,       Height:Height of the helicopter from the land in
                                           centimeters.
and 5 linear neurons at the output
layer. The training is done by the         Outputs:
backpropagation algorithm of the NN        u1: % PWM Duty Cycle Main Rotor.
                                           u2: % PWM Duty Cycle Pitch Servo.
Matlab toolbox.                            u3: % PWM Duty Cycle Roll Servo (Right side).
                                           u4: % PWM Duty Cycle Roll Servo (Left side).
                                           u5: % PWM Duty Cycle Yaw Servo.
Training Results: Real PWM VS Neuronal PWM
                      Main rotor velocity:                                                                   Pitch servo:
         13                                                                                    11.4
                                                             PWM Main Neuronal                                                                      PWM Pitch Neuronal
        12.5                                                 PWM Main Real                     11.2                                                 PWM Pitch Real

                                                                                                11
         12
                                                                                               10.8
        11.5
                                                                                               10.6
% PWM




                                                                                       % PWM
         11                                                                                    10.4

        10.5                                                                                   10.2

                                                                                                10
         10
                                                                                                9.8
         9.5
                                                                                                9.6
          9
               0   1000   2000   3000   4000    5000 6000   7000   8000   9000 10000            9.4
                                               muestra                                                0   1000   2000   3000   4000    5000 6000   7000   8000   9000 10000
                                                                                                                                      muestra
               Roll servo (Right side):                                                                                            Yaw servo:
        12.6                                                                                                            11.5
                                                      PWM Roll Derecha Neuronal                                                                                                                     PWM Yaw Neuronal
                                                      PWM Roll Derecha Real                                             11.4                                                                        PWM Yaw Real
        12.4

                                                                                                                        11.3
        12.2
                                                                                                                        11.2
         12
                                                                                                                        11.1
% PWM




                                                                                                                % PWM
        11.8                                                                                                              11


        11.6                                                                                                            10.9

                                                                                                                        10.8
        11.4
                                                                                                                        10.7
        11.2
                                                                                                                        10.6

         11                                                                                                             10.5
               0   1000   2000   3000   4000    5000 6000             7000   8000    9000 10000                                0   1000   2000      3000    4000        5000 6000               7000   8000   9000 10000
                                               muestra                                                                                                                 muestra

                                                               12.2
                                                                                                                                                                  PWM Roll Izquierda Neuronal
                                                                                                                                                                  PWM Roll Izquierda Real

                                                                12




                                                               11.8




                                                               11.6



         Roll servo (Left
                                                       % PWM




                                                               11.4




         side):                                                11.2




                                                                11




                                                               10.8




                                                                      0       1000      2000      3000   4000            5000      6000      7000          8000             9000            10000
                                                                                                                        muestra
CONTROL
The development of autonomous scale helicopters responds
to the need for greater flexibility, agility and simplicity of
operation.
However, they present highly nonlinear flight dynamics and
also they have high sensitivity to control inputs and
disturbances. If we add the fact that helicopters present
different characteristics for each flight mode, the
development and implementation of an intelligent control
system becomes a critical factor for the deployment of this
kind of air vehicles.
CONTROL STAGES

 System Identification
 LQG controller design
 Neural Network design
DIAGRAM
                       System Identification
                                                                               ax

         Input Data




                                                                                    Output
                                                                               ay
                                           HELICOPTER                          az




                                                                                       Data
                                                                               p
                                            Black Box                          q
                                                                               r
                                                                               h


We used the method of Linear Regression with Least Squares using QR
decomposition to approximate the real system to a transfer function.

Transfer function of order “m”:
                                        Y(z) bm z -m +...+b2 z -2 +b1z -1+b0
                                  H(z)=      
                                        X(z)   amz -m +...+a2 z -2 +a1z -1+1
Rewriting the equation above and adding an error term representing the
difference between the real system and approximate system, the linear
regression model is obtained:
                                          y(n) = (n) + e(n)
                      Output                                             Error Term
                      Data
                      Available            Regression     Unknown
                                           Vector         Parameter
                                                              s
                     System Identification
According to the least squares sense, it is necessary to minimize:

                                e2 = y(n)- (n)
                                                   2



A method of estimating the unknown parameters in a way to reduce the square
error is through Linear Regression with Least Mean Square Estimation using QR
decomposition
                                  R0 z1
                                    1


Knowing that:




Where ‘p’ is the number of unknown parameters

The matrix  can be separated in an orthogonal Q matrix and in an upper triangular R
matrix using the command (QR).
Linear Quadratic Gaussian
Controller (LQG)
                                   LQG

              LQE                                LQR
   LQE (Kalman Filter): An             LQR: An optimal regulator
   optimal      estimator    for       supplied by estimated states
   estimating the states in the        (LQE) which are taken to zero.
   presence of AWGN noise.



                   Noise measured by
                   sensors
                   Exogenous disturbance
                   Component degradation
    Linear Quadratic Gaussian
    Controller (LQG)
•   Diagram of LQG
                                                    Exogenous disturbance
    controller:
                                                        Noise measured by sensors
                 U        x=Ax+Bu+Πw                     Y
                          y=Cx+Du+Ψv




         Optimal                       Optimal
                                          Estimator(LQE)
            Controller(LQR)        ˆ
                                   X
                 ˆ
             u=-Kx            +        ˆ ˆ          ˆ
                                       x=Ax+Bu+L(y-Cx)

                                            Kalman
                              Nx               Filter               LQG
                              r
     Neural Network Controller
     W1               W2                The neural network controller
                                        tries to identify the controller K
                                        obtained      by    the    Linear
                                        Quadratic      Regulator     LQR
                                    u
                                        method. It is important to
XO                                      notice that the inputs to the
                                        neural network are the outputs
                                        of the Kalman filter.
                                           Configuration:
                           y-   y           h   (W1  Xo)  b1
          h-     h+         Linear          h  (h  )
                           Neurons
          Nonlinear                         y   (W2  h  )  b2
          Neurons
                                            y  ( y  )
      Neural Network Controller
                         The algorithms for updating the weights is
 Learning                the Backpropagation which involves the
 Algorithm:              development of partial derivatives.
 J e 2
                                                          J
                                     W1  W1   
e  yd  y                                               W1
            J              J   J e2 e y y  h  h 
 p  p                                        
                           W1 e2 e y y  h  h  W1
            p              J
                                (2  e)  W2   h  1  h     Xo
                                                                 
                           W1
It is necessary to                                      J
establish a Quadratic               W2  W2   
                                                       W2
Cost Function in order
to penalize the error         J   J e 2 e y y 
and reduce the energy                       
                             W2 e 2 e y y  W2
that is coupled to the
system                        J
                                  (2  e)  h 
                             W2
     Neural Network Controller
•   Final                                       Exogenous disturbance
    Diagram:                                        Noise measured by sensors
                   U    x=Ax+Bu+Πw                   Y
                        y=Cx+Du+Ψv




         Neural
         W2 Network 1
                  W
                                   Optimal
                                      Estimator(LQE)
                               ˆ
                               X
                          +        ˆ ˆ          ˆ
                                   x=Ax+Bu+L(y-Cx)

                                        Kalman
                          Nx               Filter               LQG
                          r
ABSTRACT

         Computer vision is a field of artificial intelligence, which objective is to
     program a computer in order to “understand” a scene or characteristics of a
                                                                     certain image.
  A common problem in airports is the presence of birds that blocks the aircraft
            takeoff. Another common situation is the lack of a fast and movable
 surveillance system. That’s why we propose an affordable, easy to use, modular
                                              system with three operation modes.
General Diagram
Abstract
 Tracking mode. The Neurocopter is able to follow a
  certain object within its vision range
 All weather vision. In addition for the Tracking Mode
  this Mode allows enhance the image for poor or
  excessive light situations
 Bird Detection. It allows us to identify bird in the
  scene.
Tracking Mode
        Acquisition           Video enhancement
                                                    Color Selection
    (Wireless camera)           (space filters)




     Representation and
        Description            Segmented Image
                                 enhancement      Color segmentation
   (Centroid and Trajectory                       (Euclidean distance)
         Calculation)           (Morphological
                                 Operations )
        Visualization




   Reference signals for
      Control Team
Tracking Mode
 We explore the following pre-processing algorithms:
   Mean filter
   Median filter
   Morphological filters (Opening, Closing, Filling Holes
    and Clear Border)
Tracking Mode
 The segmentation algorithm was implemented in a
  Nvidia GTX 465 video card exploding its parallel
  processing technology. It gave us a reduction of 55.7%
  in time of execution.
 Euclidean distance




              
       E  x  s    y  t 
                        2             2
                                          
                                          1
                                              2
All Weather Vision
 This mode was achieved using the Gamma Correction which consists
  in a non-linear adjust of the brightness or luminance on an image. For
  the darkest pixels the brightness is highly increased while the
  brightness for the clearest pixels is increased in an minor amount. As a
  result more details are visible on the image.




                                                                    
                                                 S  c.r
All Weather Vision
 The gamma correction was implemented on the GPU
  because most of the operations include matrices, this
  allows us to take advantage of the parallel processing.
                Gamma Night Vision = 0.9
                 Gamma Sun Block = 1.03
 Time CPU
   0.0159
 Time GPU
    0.0028
 Reduction of 82.4%
Bird Detecction
     Image
   Acquisition    Pre-processing    Segmentation     Representation
                                                                      Description
                                                     (Morphological
   (Gray scale    (Median Filter)   (Thresholding)                    (Centroid)
                                                      Operations)
   conversion)




Thresholding: It’s about defining a threshold which separates the objects
from the background. It is useful only if there is a clear difference between
the objects and the background of the scene.
Bird Detection




 Threshold = 0.3
 There is no need to use elaborated algoritms like the Otsu algoritm
ABSTRACT

          The purpose of these project is to solve the communication
 problems and to ensure the control of the helicopter and its
 monitoring.
          Some problems may happen in the communication system due
 to limitations like electromagnetic interference, loss of communication
 link, errors in transmission or capture of wrong information.
DATALINK-ABSTRACT
  The principal objectives are:
 To select the technology for the communications
  system which satisfied to the required specifications.
 To design a software when can monitoring the data
  transmitted ( altitude, orientation and speed)
 To display the absolute position of the vehicle through
  the GPS scale
  Datalink Diagram

                   1. Datalink Up




2. Datalink Down

                                    3. TCP Protocold

                        Control                          GCS
                        (Client)                       (Server)
ACTIVITIES
 Choose a communication device and configure and
  test it.
 Simulate data acquisition of the sensors and GPS in
  order to evaluate the software developed.
 Display information received from the helicopter to
  the base station.
MONITORING BY GOOGLE EARTH
                  Start of
                Google Earth



                  Receive      No
                   GPS
                   data?
                       Yes
                   Extract
                  latitude,
                 longitude


                KML record


                Show flight
                 and UAV
                 position



                  Finish?
           No

                       Yes

                    End
SERIAL PORT COMMUNICATION               1
           Start


     Configuration of          State: Data received
      the serial port
       parameters
                                     Finish
                                                      No
                                      data
                                    sending
     Open serial port
                                       ?
                                          Yes

          Receive         No      State: Finish
            VC
          frame?
               Yes              Close serial port

     Send ACK frame

                                      End
     Prepare to receive


                          No
           Data?

                 Yes
             1
SERIAL PORT COMMUNICATION
           Start                       1


     Configuration of          State: Send Data
      the serial port
       parameters
                                    Finish
                                                   No
                                     data
     Open serial port              sending
                                      ?
                                         Yes
      Send VC frame              State: Finish

          Receive         No
            VC                 Close serial port
          frame?
               Yes
     Prepare to receive              End


             1
XML AND KML
 XML, acronym for Extensible Markup Language . It’s
  an extensible meta tags developed by the World Wide
  Web Consortium (W3C)
 XML is not born only for use internet, it is proposed as
  a standard for exchanging structured information
  between different platforms. It can be used in
  databases, text editors, spreadsheets and almost
  anything imaginable.
 KML is a markup language and its used to represent
  data in three dimensions.
KML PROGRAMMATION
 KML Programmation
           <xml version
           <kml xmlns=“…”
             <Placemarks>
                 <name>
                 …
                 </name>
             <description>….. </description>
                 <point>
                          <coordinates>
                          Latitud,longitud,altura
                          </coordinates>
                 </point>
             </Placemarks>
           </kml>
DESIGN OF THE GCS

              Conclusions.
    The mathematical analysis allows a comprehensive understanding of the system to be developed: Place a scale
    helicopter called “Neuro Copter” prototype in a state of "Hover."
   Given the cost numbers and physical dimensions of the prototype to implement, was determined to take safety
    measures for the first flight test, using a security system comprised of harness, and a safe landing. In addition,
    convenient saw the acquisition of a prototype low-cost training in comparison to the final model for the respective flight
    test and flight training.
   As a way of alleviating the computational burden of the Control Team and the Vision Team was chosen to perform each
    of the two processes on different computers. We created a client-server application TCP / IP to communicate between
    computers.
   The GCS is an important tool that will serve as interface man - machine for controlling the UAV. This software will
    change in real time between each of the navigation modes are available: Collision Avoidance, Navigation and Waypoint
    Day / Night Vision.
   The GCS will allow real time viewing of both the position of the UAV and its speed, angular acceleration, height and
    other states. In addition, you can display the battery status is making contingency alert to be issued.
   The image processing is strongly improved by the use of parallel processing tecnology provided by the graffic card.
   The Linear Regression with Least Squares using QR decomposition is more efficient that using pseudo-inverse and, also,
    this last method does not always provides a consistent solution for estimating the unknown parameters.
   The Linear Quadratic Gaussian Controller allows the track of all the states even if they are contaminated by AWGN
    noise.
   The estimated level of system identification using neural networks using the MLP model is vastly superior to the
    estimation using the autoregressive model ARX.
   Neural networks are highly recommended for system identification and development of controllers for nonlinear
    systems.
   For the training is recommended to leave 20% of the information to make the neural network able to generalize.
   Once, the neuro controller is trained, it is necessary to validate the neural network. For example, feed to the system with
    different values to the training patterns and verify that the output is consistent.
   Leave a small margin of error on the training goal (non-zero error) in order to allow the network to generalize.
   For the modeling of the system take advantage of neural networks, and decompose the system into simple elements.
   The torque of the helicopter is 1, 0115 Kg.m.

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:8
posted:3/3/2011
language:English
pages:42