Showing posts with label Learn Elektro. Show all posts
Showing posts with label Learn Elektro. Show all posts

Wednesday, November 10, 2010

Diffraction

In this lab the phenomenon of diffraction will be explored. Diffraction is interference of a wave
with itself. According to Huygen’s Principle waves propagate such that each point reached by a
wavefront acts as a new wave source. The sum of the secondary waves emitted from all points on
the wavefront propagate the wave forward. Interference between secondary waves emitted from
different parts of the wave front can cause waves to bend around corners and cause intensity
fluctuations much like interference patterns from separate sources. Some of these effects were
touched in the previous lab on interference.
In this lab the intensity patterns generated by monochromatic (laser) light passing through a single
thin slit, a circular aperture, and around a opaque circle will be calculated and experimentally
verified.

The intensity distributions of monochromatic light diffracted from the described objects are based
on:
a) the Superposition Principle
b) the wave nature of light
Disturbance: A = A0 sin (wt + €)     w for Omega, € for teta (angle on degrees)
Intensity: I = (EA)2    E for Sigma
c) Huygen’s Principle -- Light propagates in such a way that each point reached by
the wave acts as a point source of a new light wave. The superposition of all these
waves represents the propagation of the light wave.
All calculations are based on the assumption that the distance L between the slit and the viewing
screen is much larger than the slit width a:, i.e. L >> a. This particular case is called Fraunhofer
scattering. The calculations of this type of scattering are much simpler than the Fresnel scattering
in which case the L >> a constraint is removed.

Experiment 1 : Single Slit Diffraction
Theory
A narrow slit of infinite length and width a is illuminated by a plane wave (laser beam) as as shown in Figure 1. The intensity distribution observed (on a screen) at an angle q with respect to the incident direction is given by equation (1). This relation is derived in detail in the appendix and every student must make an effort to go through its derivation. The mathematics used to calculate this relation are very simple. The contributions from the field at each small area of the slit to the field at a point on the screen are added together by integration. Squaring this result and disregarding sinusoidal fluctuations in time gives the intensity. The main difficulty in the calculation is determining the relative phase of each small contribution. Figure 2 shows the expected shape of this distribution. 

Diffraction Single slit



yielding the following condition for observing a minimum light intensity from a single slit:


This relation is satisfied for integer values of m. Increasing values of m give minima at correspondingly larger angles. The first minimum will be found for m = 1, the second for m = 2 and so forth. If 
is less than one for all values of q, there will be no minima, i.e. when the size of the aperture is smaller than a wavelength (a < l). This indicates that diffraction is most strongly caused be perturbances with sizes that are about the same dimension of a wavelength.



Procedure
Two single slits (along with some double slits) are on a slide similar to the one diagrammed in Figure 3. To observe diffraction from a single slit, align the laser beam parallel to the table, at the height of the center of the long slide, as shown in Figure 4. The diffraction pattern you are expected to observe is shown in Figure 5.

1a) Observe on the screen the different patterns generated by both of the single slits of this slide.
1b) Calculate the width of each one of the two single slits. This quantity can be calculated fro

Equation (2) using measurements of the spacing of the intensity minima. The wavelength of the
HeNe laser is 6328Å, (1Å º 10-10 m). The quantity to be determined experimentally is sin q. This
can be done by trigonometry as shown below:

Measure the slit width using several intensity minima of the diffraction pattern.This measurement can be done using the screen covered with white paper. With a sharp pencil mark the position of the diffraction minima and then measure their relative distance with the ruler. To improve the accuracy of your measurements make the distance from slit to screen as large as possible. Compare your result with those given in Figure 1.
Enough for this time, next...Experiment 2 : Diffraction by circular aperture

Wednesday, November 3, 2010

How to Use Introduction GUI MATLAB ?

Introduction
  


  • Graphical User Interface (GUI)
  • MatLab provides Graphical User Interface Development Environment(GUIDE)
  • lA MatLab tool used to create GUI’s
  • lDecide between using GUIDE or writing the code from scratch
  • lGUI’s give the user a simplified experience running a program
  • lAssociates a “function(s)” with components of the GUI
Graphical User Interface
 
  • GUI should be consistent and easily understood.
  • lProvide the user with the ability to use a program without having to worry about commands to run the actual program
  • lPossible components of a GUI
–Pushbuttons
–Sliders
–List boxes
–Menus….etc

3 Essential Characteristics
  •    Components –
          - Graphical Components
- lpushbuttons, edit boxes, sliders, labels, menus, etc…
          - Static Components
- Frames, text strings,…
          - Both are created using the function uicontrol
  •          Figures – components are contained in figures
  •          Callbacks – The functions which perform the required action when a component is pushed 
GUIDE Properties
 
  •           Allows the user to drag and drop components that he/she wants in the “layout” area of the GUI
  •           All “guide” GUI’s start with an opening function
        - Callback is performed before user has access to GUI
  •           Saving automatically generates an .m file and .fig file
  •           .fig contains the binary GUI layout and .m contains the code that controls the GUI
 Assessing the Value of Your GUI
    
  •          Ask yourself two basic questions when designing your GUI
         - Do the users always know where they are? 
                  - Do they always know where to go next? 
Constantly answering these two questions will help you keep in perspective the goal of your GUI. 
Callback Editor  
The “meat” of the GUI process
lOpening function is first callback in every “guide” generated GUI
lUsually used to generate data used in GUI
lCallbacks define what will happen when a figure component is selected
lMust write CODE!!!!
GUI EXAMPLE
- Utilize Functions
    - Surf, Mesh, Contour
       > Types of plots performed on data in example
    - Peaks 
       > peaks is a function of two variables, obtained by translating and scaling Gaussian distributions 
    - Membrane
    - Sinc 
      > sinc computes the sinc function of an input vector or array, where the sinc function is 









Summary

> At command prompt type “guide”
> After laying out your GUI in the layour editor
> Define data in Opening Function
> Edit/Align your components using
    - Tools Menu
       - Align
    - View menu
       - Property Inspector
> Write the Callbacks
    - This is the most difficult aspect when creating GUI’s
 

Twitter Delicious Facebook Digg Stumbleupon Favorites More