Using Computers in Teaching Physics Prof Dr Reimer

  • Slides: 45
Download presentation
Using Computers in Teaching Physics Prof. Dr. Reimer Lincke Institut für Experimentelle und Angewandte

Using Computers in Teaching Physics Prof. Dr. Reimer Lincke Institut für Experimentelle und Angewandte Physik der Universität Kiel lincke@physik. uni-kiel. de Invited Talk, Bucharest, October 2000 Collaborators: Christian Siemers, Tim Aschmoneit, Ingo Büll, Jens Liley, Lars Wolter et. al.

Multimedia ?

Multimedia ?

Multimedia ? Learning by Doing !

Multimedia ? Learning by Doing !

The Beginning: Commodore 64 and BASIC (6502 ASSEMBLER)

The Beginning: Commodore 64 and BASIC (6502 ASSEMBLER)

Experiments with the Commodore 64 Interfaces at the USERPORT The USERPORT of the C

Experiments with the Commodore 64 Interfaces at the USERPORT The USERPORT of the C 64 contained 1 byte bidirectional + 1 bit out. We used it with a) Userport-Display c) Steppermotor- and Relay-Interface b) AD-converter + 2 -channel preamp d) Digital- and Timer-Interface AD-sampling rates were as high as 60. 000 8 -bit values per second. The programs were written in Commodore-BASIC with SIMON´s BASIC for graphics: Ci= 56576; y = PEEK(Ci+1) {for reading ADC}; POKE Ci, 64 {for switching relay}.

Experiments with the Commodore 64 Programming a Running Light 128 64 32 16 8

Experiments with the Commodore 64 Programming a Running Light 128 64 32 16 8 4 USERPORT 2 1 C 64 BASIC: 10 Ci= 56576 {address of USERPORT} 20 POKE Ci+3, 255 {all bits output} 30 POKE Ci+1, 0 {all LED off} 40 FOR i = 0 to 7 50 DELAY [1000] {wait 1 second} 60 POKE Ci+1, 2^i {switch on next LED} 70 NEXT i 80 END 6502 ASSEMBLER: LDA #255 LDX #96 STA 56576 {all bits output} LDY #255 LDA #00 DEY STA 56577 {all LED off} BNE -3 SEC {set Carry Flag} DEX ROL 56577 {switch on one LED} BNE -8 BEQ -15 RTS {load X-Register} {load Y-Register} {decrement Y-Register} {until negative} {decrement X-Register} {until negative} {roll until >128} Wait: double loop

Experiments with the Commodore 64 Studying Induction with a Falling Magnet A bar magnet

Experiments with the Commodore 64 Studying Induction with a Falling Magnet A bar magnet falls through 6 induction coils connected in series. Since the induced voltage is proportional to the velocity, the peaks grow linearly with time. Evaluating the areas under the peaks reproduces the fact that for every passage. ADC input

PCs under DOS 8 -Bit-Card Minimal Interfaces at the Printer Port TURBO-Pascal (Microsoft Assembler)

PCs under DOS 8 -Bit-Card Minimal Interfaces at the Printer Port TURBO-Pascal (Microsoft Assembler)

Experiments with PCs 8 -Bit Card in a Slot This system was centered around

Experiments with PCs 8 -Bit Card in a Slot This system was centered around an 8 -bit card sitting in a standard slot. It contained all the logic including two ADCs and DACs, three 16 bit timers and an 8 -bit digital port. Preamplifiers, Schmitt-triggers, stepper-motor controls etc. were contained in three separate interface boxes. The programming was done in TURBO PASCAL : adc 1=$104; port. B=$101; y: =PORT[adc 1] {making one AD conversion}; PORT[port. B]: =1 {switching relay #1}; Up to 50. 000 8 -bit values could be converted and recorded per second. Two separate ADCs and preamplifiers provided genuine 2 -channel operation. Prohibiting all interrupts enabled perfect data recording.

Experiments with PCs Minimal Interfaces at the Printer Port Modern printer ports permit most

Experiments with PCs Minimal Interfaces at the Printer Port Modern printer ports permit most bits to be defined as input or output. This allows the construction of some extremely simple interfaces: ADTI: 2 -channel 12 -bit ADC (multiplexed) with preamplifier, 2 -channel digital in, 2 -channel digital out, 12 -bit DAC. RMI: 4 relays (max 3 A/50 V), 2 stepper-motor controls. Both interfaces can be operated simultaneously (LPT 2 and extra LPT 3) using Turbo Pascal.

Experiments with PCs Damped LC-Oscillations: Frequency and Decay Constant R L ADW C (RL)

Experiments with PCs Damped LC-Oscillations: Frequency and Decay Constant R L ADW C (RL) L = 7, 34 m. H C = 5, 57 µF RL = 4, 2 R = 1 M = 787, 1 Hz T = 1, 27 ms = RL/2 L = 286/s Contrary to the mechanical oscillations, here the agreement between experiment and theory is excellent.

Experiments with PCs Wackelschwinger as Nonlinear Oscillator Induction Coils Characteristics of a Nonlinear Oscillator:

Experiments with PCs Wackelschwinger as Nonlinear Oscillator Induction Coils Characteristics of a Nonlinear Oscillator: The time function is not harmonic. The period depends on the amplitude.

Problems with Using Modern Hard- and Software in the Teaching Lab • • •

Problems with Using Modern Hard- and Software in the Teaching Lab • • • Modern operating systems (e. g. WINDOWS) use multitasking. This prohibits time critical measurements. Ports cannot be addressed directly. Measurement of short times (<10 ms) is difficult. ISA-bus is too fast. There are too many diverging port- and bus standards. Programming languages (Delphi, Visual Basic, C++ etc) are very powerful and very complex. They take too much time from physics and should be left for professionals.

Experiments under WINDOWS UNIMESS and Lab. View Serial communication RS 232 An interface for

Experiments under WINDOWS UNIMESS and Lab. View Serial communication RS 232 An interface for a WINDOWS system needs intelligence: only with a microcontroller can one record a series of fast equidistant AD-values. The measuring routines must be programmed in the controller‘s assembly language. A programming language suitable for calling these routines, communicating with the PC and graphing and evaluating the data is the graphical language Lab. View.

UNIMESS and Lab. View A Pair for the Physics Laboratory • • Contents of

UNIMESS and Lab. View A Pair for the Physics Laboratory • • Contents of the Lab no program code, object oriented programming modern software, modern techniques of communication frontend and program structure are produced by the student a wide variety of physics problems can be solved parallel to learning Lab. View and interfacing Advantages even students without any previous knowledge of programming can master the subjects in a very short time (about 3 times faster than with TURBO Pascal) highly motivating by ‚instant results‘ and attractive graphics very low price: Lab. View Student Edition DM 99, -Material for Interface DM 400, --

Lab. View: A Graphical Programming Language Programming an RC-Control with UNIMESS A capacitor is

Lab. View: A Graphical Programming Language Programming an RC-Control with UNIMESS A capacitor is charged/discharged between given limits.

Experiments with UNIMESS Measuring L from the Decay Time Here we measure the inductance

Experiments with UNIMESS Measuring L from the Decay Time Here we measure the inductance from the decay time of the current through the coil: The time constant T = L/R corresponds to a factor e-1 = 0, 368, i. e. the voltage over the shunt must decay from 1900 to 699. We measure L/R = 2, 82 ms. With the ohmic resistance of the coil equal to 11, 26 and the shunt equal to 2, 74 , there results L = 39, 5 m. H. This is 5% larger than obtained from a precision measurement. 8, 2 2, 74

Experiments with UNIMESS and FD 4 E Driving an LC-Circuit with Rectangular Voltage The

Experiments with UNIMESS and FD 4 E Driving an LC-Circuit with Rectangular Voltage The program sweeps the frequency of the function generator FD 4 E and records the rectified signal across R. With the function generator set to rectangular output, each harmonic (Ak=1/k 2) produces its resonance at k times the frequency (see below). The partial waves thus are physically real, not just mathematical tricks!

Experiments with UNIMESS and FD 4 E Exciting Acoustic Pipes with a -Pulse Two

Experiments with UNIMESS and FD 4 E Exciting Acoustic Pipes with a -Pulse Two cylindrical pipes are excited by discharging a capacitor through a loudspeaker. f+ fs f- The time signal shows damped beats. If one measures the beat frequency fs one obtains the difference between the upper and the lower frequency f+ - f - in the resonance curve. A FOURIER analysis of the time function recovers the resonance curve.

Experiments with UNIMESS Measuring g with a Falling Ladder The program records 20 times

Experiments with UNIMESS Measuring g with a Falling Ladder The program records 20 times at which the light gate is opened/closed and calculates the speed and acceleration

Modelling BASIC TURBO-Pascal Math. Cad Lab. View Interactive Physics Spread Sheet Programs

Modelling BASIC TURBO-Pascal Math. Cad Lab. View Interactive Physics Spread Sheet Programs

Modelling with C-64 BASIC Damped Oscillations Using the EULER-Method 200 210 220 230 240

Modelling with C-64 BASIC Damped Oscillations Using the EULER-Method 200 210 220 230 240 250 260 270 280 290 300 HIRES 0, 1 DT = 1 : K=0. 03 Y=60 : V=0 : A=0 FOR T=0 TO 319 A=-K*Y REM A=A-0. 02*V REM A=A-0. 05*SGN(V) V=V+A*DT Y=Y+V*DT PLOT T, 100 -Y, 1 NEXT T A=-K*Y-0. 02*V A=-K*Y-0. 05*SGN(V) The simple EULER-Method is, of course, introduced with due comments.

Modelling with Math. Cad Damped Oscillations Using the EULER-Method A) Stokes‘ Friction B) Dry

Modelling with Math. Cad Damped Oscillations Using the EULER-Method A) Stokes‘ Friction B) Dry Friction In order to update vi and xi before going to i+1, the vector concept has to be used.

Modelling with Labview The Radial Schrödinger-Equation of the H-Atom n = 1 E =

Modelling with Labview The Radial Schrödinger-Equation of the H-Atom n = 1 E = -13, 607 e. V Step 10 -10 m Here the Schrödinger-equation is integrated by the Euler-method using shift registers and the formula node of Lab. View. When running the program, one has to adjust the energy until the wave function vanishes for r . This yields the energy eigenvalues. n = 2 E = -3, 467 e. V Step 2· 10 -10 m n = 3 E = -1, 511 e. V Step 2· 10 -10 m

Modelling with Interactive Physics Symbolic Programming of a Newtonian World In Interactive Physics, an

Modelling with Interactive Physics Symbolic Programming of a Newtonian World In Interactive Physics, an bject (ball, cube, spring etc. ) is placed on the screen and provided with physical properties (mass, eleaticity, charge etc. ) an initial conditions (position, velocity, angular rotation etc. ). The program then calculates future positions and plots various diagrams. In this application, 7 speres are provided with an analytically specified interactive force containing an attractive and a repulsive term. With some damping, this suffices to build a crystal. If the factor ´Temp´ in front of the random force is increased, the crystal will melt.

Evaluating Data with Spread Sheet Programs Measuring the Wavelength of a Laser Using a

Evaluating Data with Spread Sheet Programs Measuring the Wavelength of a Laser Using a Ruler The beam of a He. Ne-laser falls onto the scale of a ruler. The diffracted beam hits a perpendicular plane in the positions yn From this one calculates d/n*(cos( 0)-cos( n)) y 2 y 1 y 0 0 0 Grating Here d is the grating constant. This is a real experiment! Only the evaluation of the data is performed with the aid of a PC. The spread sheet program was done with Microsoft Excel.

Control-Experiments Some Examples

Control-Experiments Some Examples

Control Temperature Control With Peltier-Element An aluminum block is standing on a PELTIER element.

Control Temperature Control With Peltier-Element An aluminum block is standing on a PELTIER element. Its temperature t is to be stabilized to a fixed value t 0. Two control mechanisms are applied: 1. On/off heating: for t < t 0 full power heating, for t > t 0 full power cooling. 2. PI-control: the heating current is given by i = P ·(t-t 0) + I· (t-t 0)dt On/Off : 2 -Point PI : Proportional/Integral

Control Balancing an Inverted Pendulum A meter stick is mounted on a potentiometer carried

Control Balancing an Inverted Pendulum A meter stick is mounted on a potentiometer carried by a motor-driven cart. The program keeps the tumbling stick perpendicular and the cart‘s position in the center of the track.

Nonlinear Dynamics Modelling and Experiments

Nonlinear Dynamics Modelling and Experiments

Nonlinear Dynamics Modelling with Math. Cad If one adds a term in x 4

Nonlinear Dynamics Modelling with Math. Cad If one adds a term in x 4 to the parabolic potential of a harmonic oscillator (i. e. a cubic term to the linear force), one ends up with a DUFFING-Potential. The resulting oscillation shows the typical behaviour: For nonlinear oszillators the period depends on the amplitude!

Nonlinear Dynamics POHL-Pendulum Position Transducer BMW Unwucht PC-Interface Wirbelstrombremse The wellknown POHL Pendulum is

Nonlinear Dynamics POHL-Pendulum Position Transducer BMW Unwucht PC-Interface Wirbelstrombremse The wellknown POHL Pendulum is a typical harmonic Oscillator used for demonstration purposes. With added excentric mass and a stepper motor it became a paradigm for the nonlinear oscillator.

Nonlinear Dynamics POHL-Pendulum: Free and Driven Oscillations 0 1 Figures: The diagrams show the

Nonlinear Dynamics POHL-Pendulum: Free and Driven Oscillations 0 1 Figures: The diagrams show the angle as function of time, the velocity as function of time and the velocity as function of angle (phase space). Left: No eddy current brake, only mechanical damping, no motor excitation. The pendulum was started in the extreme right position; it ends in the right potential minimum. Right: Excitation by stepping motor excenter, strong eddy current damping. The oscillation is nearly harmonic, the phase diagram is similar to an ellipse.

Nonlinear Dynamics POHL-Pendulum: Period Doubling and Quadrupling 2 3 Figures: In the diagrams angle

Nonlinear Dynamics POHL-Pendulum: Period Doubling and Quadrupling 2 3 Figures: In the diagrams angle as function of time and velocity as function of time, the motor phase is shown in addition. Left: The amplitudes of the oscillation alternate. One complete period of oscillation corresponds to two periods of the motor; this is called Period Doubling. Right: Four motor periods correspond to one complete oscillatory period.

Nonlinear Dynamics POHL-Pendulum: Feigenbaum-Diagram A systematic variation of the damping yields the socalled Feigenbaum

Nonlinear Dynamics POHL-Pendulum: Feigenbaum-Diagram A systematic variation of the damping yields the socalled Feigenbaum Diagram. This plot here shows 100 extrema (max and min) after a transient period of 300 seconds. The marked positions correspond to the oscillatory modes shown before: 1. Simple oscillation. 2. Period doubling. 3. Period quadrupling. 4. Chaos. 5. Window in Chaos. 6. Free oscillation. 1 2 3 6 4 5

Nonlinear Dynamics POHL-Pendulum: Domains (left/right) Repeated ZOOM: Self Similarity

Nonlinear Dynamics POHL-Pendulum: Domains (left/right) Repeated ZOOM: Self Similarity

Nonlinear Dynamics Magnetic Pendulum A steel bob swings in the field of three permanent

Nonlinear Dynamics Magnetic Pendulum A steel bob swings in the field of three permanent magnets. The position of the bob is determined by ultrasound: the bob carries a transmitter and the base plate two receivers.

Nonlinear Dynamics Magnetic Pendulum: Different Orbits Chaotic Orbits Periodic Orbits Quasi Periodic Orbits

Nonlinear Dynamics Magnetic Pendulum: Different Orbits Chaotic Orbits Periodic Orbits Quasi Periodic Orbits

Nonlinear Dynamics Magnetic Pendulum: Domains for Six Magnets For this figure, six magnets are

Nonlinear Dynamics Magnetic Pendulum: Domains for Six Magnets For this figure, six magnets are used. Every starting point of an oscillation of the pendulum is marked with the colour of the magnet at which the pendulum will finally come to rest. Starting in the immerdiate neighbourhood of the red magnet, e. g. , will finally cause the pendulum to rest at the red magnet, but many other stating points, too. The structure of this map is fractal: mgnification reveals new details, and these details show self similarity.

Nonlinear Dynamics TODA-Oscillator: Circuit and Properties If one uses a capacitive diode (BY 249)

Nonlinear Dynamics TODA-Oscillator: Circuit and Properties If one uses a capacitive diode (BY 249) rather than a normal capacitor in an RCL-circuit, then the capacitance will depend on the voltage, and the circuit is nonlinear. The lower picture shows the energy in the capacitor as a function of charge. Diode fixed capacitor The advantage of using such a TODAOscillator for studying nonlinear phenomena rather than the POHLPendulum ist its high frequency. Thus even bifurcation-diagrams can be recorded in a short time.

Nonlinear Dynamics TODA-Oscillator: Time Function A) Udriver = 1, 38 V : Fundamental B)

Nonlinear Dynamics TODA-Oscillator: Time Function A) Udriver = 1, 38 V : Fundamental B) Udriver = 3, 88 V : Period Doubling The experiment is so fast that one can record many time functions for varying driving amplitudes: C) Sequence of Poincaré-Points as Function of Driver Voltage

Some Larger Projects Parts of Diploma or Doctoral Theses (Often Used Commercially)

Some Larger Projects Parts of Diploma or Doctoral Theses (Often Used Commercially)

Olympic Sailing Competitions in Savannah, Ga. Computing Optimal Tacking Courses

Olympic Sailing Competitions in Savannah, Ga. Computing Optimal Tacking Courses

Nuclear Physics in the Introductory Laboratory -Spectra of a Radium Source remove cover glass

Nuclear Physics in the Introductory Laboratory -Spectra of a Radium Source remove cover glass Standard -detector: DM 1800, -PIN-photodiode BPX 61 DM 8. 50 << ADC PC Main experiment: Energy spectra of the decay products of radium as a function of distance between source and detector: Bragg-ionization-curve of air.

Nuclear Physics in the Introductory Laboratory -Spectra of a Radium Source Left: Energy Spectra

Nuclear Physics in the Introductory Laboratory -Spectra of a Radium Source Left: Energy Spectra for different distances source-detector. Right: The position of the maxima is plotted as a function of distance.