A Contribution to Virtual Experimentation in Optics

Parallel to the development and popularization of Internet, the emergence of resources for on-line learning is becoming quite common in all scientific disciplines. Optics is a good example of this telelearning. Today there exist several utilities, which allow to perform virtual experiments in Optics, from a computer connected to the Internet. These web-based tools, usually developed in Java (Carnicer, 2010), are suitable to get a first introduction to the optical phenomenon, but do not allow interaction with real, on-going experimentation in the laboratory. On the other hand, websites with videos of real experiments in Optics are also common (Carreño, 2010), but usually they do not allow interaction of the user via simulation. To match both worlds, a set of software tools has been developed at the University of Alcalá, allowing virtual and physical laboratory testing of different optical phenomena through the same software platform. Developed in MATLAB (Matlab, 2010), these tools cover different topics in Optics. They are aimed to complement "classical" classroom teaching on engineering studies. Current developments include Diffraction, Radiometry and Photometry, Acousto-Optics interaction, Moiré phenomenon, and Computer-Generated Holograms (CGHs)1. In this chapter, only diffraction-related phenomena will be described.


Introduction
Parallel to the development and popularization of Internet, the emergence of resources for on-line learning is becoming quite common in all scientific disciplines.Optics is a good example of this telelearning.Today there exist several utilities, which allow to perform virtual experiments in Optics, from a computer connected to the Internet.These web-based tools, usually developed in Java (Carnicer, 2010), are suitable to get a first introduction to the optical phenomenon, but do not allow interaction with real, on-going experimentation in the laboratory.On the other hand, websites with videos of real experiments in Optics are also common (Carreño, 2010), but usually they do not allow interaction of the user via simulation.To match both worlds, a set of software tools has been developed at the University of Alcalá, allowing virtual and physical laboratory testing of different optical phenomena through the same software platform.Developed in MATLAB (Matlab, 2010), these tools cover different topics in Optics.They are aimed to complement "classical" classroom teaching on engineering studies.Current developments include Diffraction, Radiometry and Photometry, Acousto-Optics interaction, Moiré phenomenon, and Computer-Generated Holograms (CGHs) 1 .In this chapter, only diffraction-related phenomena will be described.

Module structure
Each software tool is developed under the following structure: • Theoretical module

• Simulation module • Laboratory experimentation module
The theoretical background module introduces the student to the optical phenomenon.Then, by using the simulation module, the user can make simulations of the phenomenon using the power and flexibility of MATLAB.Interaction and/or comparison with real, physical experiments can be achieved through the laboratory experimentation module.At any time, the user can get interactive help on each module.

Diffraction tool
The first tool developed explains the phenomenon of optical diffraction.Fig. 1 (a) shows the main window of this module.By clicking on the corresponding icon, the user can choose to study diffraction patterns produced by several classical apertures: square, circular, slit (single, or multiple).Pre-stored and/or user-defined images can be also used as diffractive objects.

Theoretical module
The basis of diffraction is explained.Fresnel and Fraunhofer diffraction is explained using some typical apertures.For instance, Fig. 1

✄ ✂ ✁
APPLICATION button brings the user to the Simulation module described in section 3.2.The

✄ ✂ ✁
MANUAL button launches the users's manual of the tool.

Simulation module
Once the user has selected the diffracting object, the corresponding computing window is displayed.For instance, Fig. 2 (a) shows the interface for calculating the diffraction pattern from vertical slits.As it can be seen, the main parameters are, in this case: number of slits, distance between slits, slit width, illumination wavelength, and observation distance for near-field (Fresnel) or far-field (Fraunhofer) diffraction computing.Similar parameters are shown for the rest of diffracting objects available.

A Contribution to Virtual Experimentation in Optics 3
The intensity of the computed diffraction pattern is shown on the right-side image frame in Fig. 2 (a).Such diffraction pattern can be sent to a printer, or stored as an image file on the PC for further processing.By clicking on Cross section, a profile of the intensity diffraction pattern can be plotted, as shown in Fig. 2 (b).

Laboratory experimentation module
One of the most interesting features of the tool is the possibility to compare simulations with real experiments.Fig. 3 shows the basic laboratory setup.A collimated He-Ne laser illuminates the object (aperture), and the corresponding diffraction pattern projected on the output screen is stored by a video camera.Images captured by the video camera can be stored and processed by the laboratory experiment module shown in Fig. 4.

Computer generated holograms tool
The idea of using computers to define and generate holograms was proposed by the middle of the 60's (Brown & Lohmann, 1966).Some essential aspects of CGHs are: • The object does not need to exist.
• The construction of the hologram is done away from the usual diffracting objects: the image is defined, and the diffracting object that produces such an image is then calculated.CGHs have long been used in optical processing information, optical interconnects, interferometry and health diagnosis, to name just a few relevant applications (Yaroslavsky & Astola, 2009).Advances in computer power, together with the development of sophisticated manufacturing methods, are causing CGHs to become increasingly efficient and complex.

Theoretical module
CGHs treated in this module are Fourier holograms, main application is optical interconnects (fan-out).The reproduction setup is shown in Fig. 5 (a).At its simplest, a CGH is basically a diffraction grating composed by a 2D unit cell, repeated along the hologram surface.Let's consider the diffraction grating shown in Fig. 5 (b).When this grating is illuminated by a collimated monochromatic beam, a Fraunhofer diffraction pattern is obtained in the focal plane of the lens L (i.e.Fourier transform of the complex amplitude transmittance of the diffraction grating).Spacing between diffraction peaks is given by (Hecht, 1988): measures such light maximization.To this end, when the basic CGH cell is calculated, such 2D cell is repeated to form the CGH structure; spatial invariance of the Fourier transform means that every single cell produces the same diffraction pattern at the output plane, contributing to increased DE.The type of optical material in which the CGH is implemented also contributes to have a good DE.CGHs calculated in section 4.2 are binary-only (i.e.pixels have only two possible values, black or white).Depending on the type of physical object where the CGH is implemented, it can be a Binary Amplitude Hologram (i.e.photographic film, where black pixels correspond to dark zones and white pixels are transparent zones in the film) or a Phase-only Hologram (for instance, using a Liquid Crystal Spatial Light Modulator, where the two possible orientation of the liquid crystal molecules correspond to phase states differing by π).

Simulation module
Fig. 7(a) shows the main window for CGH calculation.The left-side image frame displays the object image, while the right-side frame stores the calculated CGH.A blue background indicates which is the active frame, either CGH or object image.Holograms are calculated from pre-stored object images loaded on the left-side image frame on Fig. 7(a)).The following algorithms can be selected, with their corresponding parameters, as shown in Fig. 7(b): • Fourier transform (Wyrowsky & Bryngdahl, 1988) • Detour phase (Levy et al., 1998) • Simulated annealing (Kirkpatrick, 1983) The resolution of the image clearly influences the hologram computing time.The CGH calculated is represented on the right-side image frame on Fig. 7(a), and can be stored on the computer using different format files (e.g..BMP, .JPG, ...).Once the CGH has been calculated, the performance of such CGH can be also checked from this window.To this end, a valid CGH image (either freshly calculated or pre-loaded from the PC) must be displayed on the right-side image frame in Fig. 7(a).By pressing on "DEPECA" icon (or, alternatively, selecting Tools, Image calculation on the Menu, shortcut Ctrl + I), the inverse Fourier transform is performed, and the object image is then reconstructed.Fig. 8 shows two CGH masks built from the same unit cell, calculated using the simulated annealing algorithm in Fig. 7.Each mask has 2 × 2 and 4 × 4 times the unit cell, respectively.
Target output for such unit cell is a 4 × 4 fan-out array of light spots at the Fourier plane in Fig. 5.When the target output is symmetrical (as in Fig. 8), due to the symmetry properties of the Fourier Transform binary CGHs, only half of the output target is needed to be defined (specular image appears automatically at the output plane) (Morrison, 1992).This reduces significantly the computing time for the CGH (Samus, 1995).Fig. 8 (a.2) and (b.2) show simulations of the optical power spectrum detected by physical sensors.This power spectrum is proportional to the square of the 2-D complex Fourier transform amplitude of the CGH (Hecht, 1988).Low spatial frequencies are near the center of the spectrum (zero spatial frequency), and high frequencies are farther away from the centre, as usual in optical power spectrum representations (Poon & Banerjee, 2001).Simulations show that spot spacing is inversely proportional to the corresponding size cell, as shown in Equation 1, where d is the size of the unit cell.

Acousto-optical effect
Acousto-optics describes the interaction of sound with light (Saleh & Teich, 1991).A sound wave unleashed on an optical medium creates a disturbance in the refractive index of the medium.The sound can then control a light beam hitting the medium.This fact, known as acousto-optical (AO) effect is used in various devices, such as beam deflectors, optical modulators, filters, isolators and spectrum analyzers, among others.This module explains the basis of AO phenomena: Raman-Nath and Bragg configurations, AO materials, figures of merit, etc.The user can navigate interactively through different tutorials, as shown in Fig. 13.Documentation and a user's manual are also available, including datasheets of the components used in section 5.3.

Simulation module
Acousto-optical virtual experiments are performed within this module.Fig. 14 shows the main interface of the simulation module.The user can choose one of the two interaction regimes (Bragg or Raman-Nath), explained in the previous theoretical module.The application allows to select the light source wavelength (λ O ), the acousto-optical material (characterized by the refractive index, n, and the acoustic velocity in the material, V S ), and the RF waveform (characterized by its amplitude A and frequency f S ).By these conditions, the first-order deflection angle under the Bragg regime is given by: When pressing the

✄ ✂ ✁
CALCULATE DEVIATION button, the deflection angle as a function of input parameters is calculated.The simulation module can also create a video sequence, which shows graphically the phenomenon of acousto-optical interaction from a 2D or 3D perspective, as shown in Figure 14 (b).The video is also saved as AVI file for later viewing.

Laboratory experimentation module
Figure 15 shows the block diagram of the experimental setup.A radio frequency (RF) electronics module generates a 24 MHz wave which impinges the acousto-optical device (AOD), thus producing a diffraction grating along the material.The acousto-optical interaction is observed when a laser beam coming out of a laser pointer crosses the AOD  Table 1.Main specifications of the AOD employed while the RF wave is on; under such circumstances, the light beam is deviated, according to Equation 3. Laser ignition and RF waveform generation are controlled by the software module through the RS232 port.Finally, the diffracted beam is projected on a screen for direct viewing and/or detection by a suitable sensor (i.e.photodetector, optical power meter, etc.).The acousto-optical device (AOD) shown in Fig 16 has been employed.This AOD was acting as Q-switch on a dismantled Nd:YAG laser.Table 1 shows main parameters of this AOD.
For this application, a red laser pointer with wavelength λ = 670 nm has been used.According to Equation 3, the theoretical deflection angle for this red light source is:  The incoming light beam crossing the AOD is deviated as long as a proper RF signal is injected through the AOD transducer.To this end, a 24 MHz signal is generated using a IQXO-350-C, which gives an RF output power of:

Conclusions and further work
The work presented in this chapter aims to explain some optical phenomena from an educational perspective.The tools implemented combine virtual and real experimentation, and they can be used as laboratory material for technical studies in science and engineering.
All the modules described in this chapter share in common the diffracting behavior of light.Nevertheless, there are other modules available (i.e.Moiré effect, Radiometry and Photometry) or under development (i.e.Theory of color, Geometrical Optics).
To date, these software tools need to be installed on the PC.Nevertheless, there is an on-going project to run them directly from a web browser.Other further improvements include: Computer Generated Holograms tool: • Implementation of new computing algorithms.
• Interaction with a Spatial Light Modulator to dynamically display the calculated CGHs.

Acousto-optics tool:
• Integration of a photodetector within the Laboratory module for measuring and plotting the diffracted light beams.
• Optical design to reduce the total optical path and improve the detection at the output plane.
• Characterization of the AOD (bandwidth, rise-time, etc.) by modulating the 24MHz RF waveform.
(b)  shows diffraction patterns for a single slit, multiple slits, and circular aperture, which in turn produces the well-known Airy disc.The user can navigate back and forth through a multi-page environment using the Fig. 1.Diffraction tool: main screen and example of the theoretical module

Fig. 4 .
Fig. 4. Main interface for laboratory experiments where d is the grating spacing, f is the focal length of the Fourier lens, and λ is wavelength of the collimated light beam.Relative intensities of the diffraction orders are proportional to the grating structure a/d.In any CGH, it is important to maximize light on the desired diffraction order (usually +1).Diffraction efficiency DE, defined as: DE = Light in the desired diffracted order Total incident light (2) Fig. 5. (a) Reproduction setup of a Fourier CGH (b) Simple diffraction grating The software developed includes a theoretical module to explain the basis of the CGHs to the user.Fig 6 shows one of the multi-page theoretical screens.Applications, numerical computing algorithms, and setup schemes for physical reproduction of CGHs are fully explained in this module.

363AFig. 8 .
Fig. 7. CGH simulation module 4.3 Laboratory experimentation module Fig. 9 displays the actual implementation of the optical setup from Fig. 5.A webcam is placed at the output (Fourier) plane to collect the diffraction pattern produced by a CGH illuminated with a coherent, collimated optical beam from a He-Ne laser.To show the performance of the simulation module, some fan-out CGHs have been implemented on a photographic film, as shown in Fig.10.The presence of non-developed grains in the emulsion increases the undesired central DC spot in the diffraction pattern, as shown in Fig.11.Image acquisition and processing is managed from the interface shown in Fig.12.The user can also make a comparison between theoretical CGH output, simulated output using the computing tool in Section 4.2, and real CGH output captured by the webcam placed at the Fourier plane in Fig.9.Comparison is made in two ways: similarity (i.e.digital substraction of images), and correlation between images.

365A
Contribution to Virtual Experimentation in Optics www.intechopen.com

367A
Contribution to Virtual Experimentation in Optics www.intechopen.com

Fig
Fig. 12. CGH laboratory module: main window Parameter Value Interaction Material Fused Silica Wavelength 1047 Ű 1064nm RF Frequency 24 MHz Clear Aperture 8 × 10 mm Acoustic Mode Compressional or Shear Input impedance 5 Ω AO interaction under Bragg regime (b) Main window of the AO theory module

Fig. 16 .
Fig.16.AOD used for experimental verification (5V = logic 1) or disables (0V = logical 0) the generation of RF waveform and turning on / off the laser diode transmitter.Fig.17shows the output light beam after passing through the AOD when the RF signal is activated.As predicted by theory, the diffraction efficiency of the diffracted beam depends on the geometry of interaction between the beam and the AO material.In the case of normal incidence (Raman-Nath regime, Fig.17(a)), two diffraction orders occur, one on each side of the central DC spot corresponding to the non-diffracted light beam.Rotating the AOD to get Fig. 17.Output beam diffracted by the AOD under different interaction regimes Fig. 17.Output beam diffracted by the AOD under different interaction regimes

Table 2 .
DE measured on Fig.17experiments the Bragg angle, the Bragg regime shown in Fig.17 (b) is obtained, and the single diffracted beam reaches its greatest intensity, as shown in Table2.