Copyright: Copyright 1995, All Rights Reserved
Citation: Christopher K. Allen


SPOT Help Contents
SPOT VERSION 1.3

HELP CONTENTS

General

Copyright

What's New in Version 1.3

Intentions

Disclaimer

Overview

Files

Units

Transport Channel Simulation

Overview

Starting a New Data Set

Opening an Existing Data Set

Saving and Closing Data Sets

Defining the Channel

Setting the Initial State

Setting the Element Amplitudes

Running the Simulation

Optimizing the Channel

Viewing the Results

Outputting the Results

Beamline Elements

General Parameters

Basic Parameters

Beam Parameters

Global Beam Parameter

Special Parameters

Charge Neutralization

Beam Elements

Drift Space

Thin Solenoid

Ideal Solenoid

Air Core Solenoid

IPR Solenoid

User Defined Solenoid

Ring Lens

Einzel Lens

Thin Quadrupole

Ideal Quadrupole

IPR Quadrupole

User Defined Quadrupole

Plots

Overview

Generating Plots

Solution Tracking

Limitations

Matched Beam Finder

Overview

Running the Matcher

Operational Parameters

Matching the Periodic Channel

Modifying Parameters

The Matched State

Optimizers

General Properties

Overview

Running an Optimizer

Optimizing a Beam Element

Modifying Parameters

The Reference Trajectory

The Terminal State (Matching)

The Terminal Weights (Matching)

Local Optimizer

Description

Optimizer State

Operational Parameters

Numerical Parameters

Constrained Optimization

Global Optimizer

Description

Optimizer State

Specifying a Search Region

Operational Parameters

Numerical Parameters


COPYRIGHT

Copyright 1995 by Christopher K. Allen

All Rights Reserved

This program may be distributed in any form provided that it is distributed in its entirety and all copyright notices are included.


What's New
WHAT'S NEW IN VERSION 1.3

As well as fixing some of the bugs in version 1.2 (as many as I am aware of) SPOT 1.3 offers some new features.  These features are listed below for quick reference.

Global Beam Parameters	This features allows the user to change the Beam Parameters for many Beamline Elements simultaneously.

IPR Quadrupole	This is a new beamline element available in the library.

Image Effects	The image effects of a cylindrical beam pipe may be included in the beam dynamics calculations.  This effect is included by entering a value for the Pipe Radius in the Beam Parameters.

Matched Beam Finder	SPOT is now capable of finding the matched beam solution for a periodic transport channel.  Once this matched solution is found, the optimizers may be used to design a matching section to guide the beam into such a channel.


INTENTIONS

Originally, I wrote this program for my own use.  It consistutes a substantial portion of my Ph.D. dissertation.  However, I realized with a little extra effort it could be put into a form suitable for public domain, which I have done.  However, since I am only one person, some compromises had to be made.  Most notably,

 There is very little error checking.

 There is no context-sensitive help.

 There are no printing features.

If at some point I have the time, I intend to remedy these shortcomings.  In the mean time SPOT will have to be used as is.  This help system contains causes and fixes for typical errors as well as information on general program operation.  Hopefully, this will minimize the affects of the above limitations.

If you have comments, suggestions or have found program bugs, please write to me at the following address:

Christopher K. Allen

Institute for Plasma Research

University of Maryland

College Park, MD 20742

email:	cka@glue.umd.edu

If necessary you may also reach me by telephone at (301)405-4967.


DISCLAIMER

This program is intended to be used as shareware as is.  Neither I nor the Institute for Plasma Research are in any way responsible for the use or misuse of this program and its results.  While I have performed a substantial amount of error testing and run many test cases, you use this software at your own risk.  To the best of my knowledge, the program does what it is supposed to do and has not exhibited any unusual behavior.  However, I am not liable for any damages you may incur as a consequence of using this software.

I have made an attempt to fix any bugs I have run into and I would appreciate the reporting of any bugs you may encounter.


OVERVIEW

Purpose

SPOT is intended as a Computer-Aided-Design (CAD) design tool for the design and analysis of particle beam transport systems.

Function

SPOT simulates the behavior of a continuous beam transport section composed of discrete elements.  These elements include drifts, solenoids, quadrupoles, and user-defined lenses.  The KV coupled envelope equations are used to model the transport system.

Operation

The tranport channel is constructed by selecting the appropriate beam-line elements from a library of elements.  The elements are cascaded to from the entire system.  Once the channel is defined the user may vary the amplitudes of each element in the channel.  The results of the simulation may be displayed graphically and textually.

Optimization

A major feature of SPOT are the optimizers it contains.  These optimizers may be run to find the optimal drives for each beam-line element.  It is possible to follow the progress of the optimizer graphically and help guide it to more desirable solutions.  Thus, the SPOT works interactively with the user in order to find the optimal design.

SPOT is named after Data's cat in Star Trek: The Next Generation.


FILES

SPOT uses a standard set of files for each data set.  The file name identifies the particular data set while the DOS extension indicates the format of the data.  These standard files may be recognized by their DOS extensions which are listed below.

Extension	Description

.SPI	SPOT input files-  The main data files for SPOT.  These files contain all the necessary information to define your transport channel.  This is the default extension when loading files.

.PRM	SPOT parameter files-  These files contain a ASCII text description of the transport channel being modified.  These may be generated by SPOT at any time and are useful tools for error checking your data.

.SLN	SPOT solution data files-  This is an ASCII listing of the beam envelope and slope along with any reference trajectory for specified points along the channel.  Also included are the values of the beamline controls at each point.  These files may be generated once the simulation is run.

.TXT	ASCII text files- SPOT has simple editor for ASCII text files.  This is convenient for creating comment files for the data or searching for particular parameters.


UNITS

No units are assumed in SPOT.  The user is free to choose whatever units are convenient.  Once chosen, however, all parameters must use these units consistently within a data set (SPOT input file).  If this convention is unnerving, use MKS units.


Ode to Spot

Felis catus is your taxonomic nomenclature,

An endothermic quadruped, carnivorous by nature;

Your visual, olfactory, and auditory senses

Contribute to your hunting skill and natural defenses.

I find myself intrigued by your subvocal oscillations,

A singular development of cat communication

That obviates your basic hedonistic predilections

For a rhythmic stroking of your fur to demonstrate affection.

A tail is quite essential for your acrobatic talents,

You would not be so agile if you lacked its counterbalance.

And when not being utilized to aid in locomotion

It often serves to illustrate the state of your emotions.

Oh Spot, the complex level of behavior you display

Connotes a fairly welldeveloped cognitive array;

And though you are not sentient, Spot, and do not comprehend,

I nonetheless consider you a true and valued friend.


BEAMLINE ELEMENTS

The transport channel is composed of a linear cascade of beamline elements.  Several different types of elements may be selected from when defining the transport channel.  All beamline elements, except the Thin Solenoid and the Thin Quadrupole, have a basic set of parameters.  Some elements also have a extended set of specialized parameters which apply specifically to that element type.

Contents

General Parameters

Basic Parameters

Beam Parameters

Global Beam Parameter

Special Parameters

Charge Neutralization

Beam Elements

Drift Space

Thin Solenoid

Ideal Solenoid

Air Core Solenoid

IPR Solenoid

User Defined Solenoid

Ring Lens

Einzel Lens

Thin Quadrupole

Ideal Quadrupole

IPR Quadrupole

User Defined Quadrupole


BEAMLINE ELEMENTS:

BASIC PARAMETERS

Each beamline element, except the Thin Solenoid and the Thin Quadrupole, require the definition of several basic parameters which determine the effect of the element on the beam (along with the particular element type).  The simulations will not run without these parameters!

These parameters are acessible through in the EDIT NETWORK dialog box (this dialog box may be brought up by pressing the NETWORK button in the SPOT main window or selecting the EDIT|NETWORK menu command).  The dialog box has a list box labelled CHANNEL ELEMENTS.  Either double click the desired Beam Element or select the element and press the EDIT button.  A dialog box containing the Beam Element's basic parameters along with the beam parameters will be displayed.

Length-	The length of the element.  This parameter and the Integration Steps parameter determine the numerical resolution of the element.

Amplitude-	The current element amplitude.  All beam elements use this parameter.  For interpretation of this value see the help topic on the particular lens.  You may also vary the Element Amplitude in the main window of SPOT (see Simulation: Specify the Element Amplitudes).  This is the parameter which the optimizers act on (see Optimizers).

Integration Steps-	The number of numerical integration steps taken through the element.  This parameter and the Length parameter determine the numerical resolution of the element.  The numerical step length is equal to the Length parameter divided by the Integration Steps parameter (less one).  This is an important parameter!!  The operator must “get a feel” for this parameter.  Too small a value results in inaccurate simulations.  Too large a value wastes CPU time.  You should increase this value until no effective is seen on the solutions.  Since a forth-order Runge-Kutta technique is employed, the numerical step length must be small enough so the solution does not move faster than a forth-order polynomial over the interval.


BEAMLINE ELEMENTS:

BEAM PARAMETERS

Each beamline element, except the Thin Solenoid and the Thin Quadrupole, require the definition of several beam parameters which determine the beam dynamics throughout the element.  Note that these parameters may also be deferred to the Global Beam Parameters.

These parameters are acessible through in the EDIT NETWORK dialog box (this dialog box may be brought up by pressing the NETWORK button in the SPOT main window or selecting the EDIT|NETWORK menu command).  The dialog box has a list box labelled CHANNEL ELEMENTS.  Either double click the desired Beam Element or select the element and press the EDIT button.  A dialog box containing the Beam Element's basic parameters along with the beam parameters will be displayed.

X Emittance-	This is the beam's x-plane effective emittance (4 times r.m.s. emittance).

Y Emittance-	This is the beam's y-plane effective emittance (4 times r.m.s. emittance).

Perveance-	The generalized perveance of the beam.

Pipe Radius-	The radius of the beam pipe.  The image effects of a cylindrical beam pipe may be included in the beam dynamics.  This is most useful for magnetic focusing systems since the electrodes in an electric focusing system will probably dominate the image effects.  Enter zero to ignore this effect (the free-space situation).

Use Global Parameters Checkbox

Check this box if you wish the element to use the Global Beam Parameters rather than the local beam parameters listed above.

For a technical description of these parameters see Martin Reiser's Theory and Design of Charged Particle Beams (Wiley, 1994).


BEAMLINE ELEMENTS:

GLOBAL BEAM PARAMETERS

Global Beam Parameters allow the user to modify the Beam Parameters of many  Beamline Elements simultaneously.  By checking the Use Global Parameters checkbox in the elements dialog box, the element will use the Global Beam Parameters in the dynamics computations rather than the local Beam Parameters assigned to the element.

A word of warning, use this feature with caution!  The term Global really means global and is all inclusive!  Any element in any data set (SPOT input file) you have open will use these same parameters.  Therefore, it is recommended that you work with only ONE input file at a time will using this feature.

These parameters are acessible through in the EDIT NETWORK dialog box (this dialog box may be brought up by pressing the NETWORK button in the SPOT main window or selecting the EDIT|NETWORK menu command).

X Emittance-	This is the beam's x-plane effective emittance (4 times r.m.s. emittance).

Y Emittance-	This is the beam's y-plane effective emittance (4 times r.m.s. emittance).

Perveance-	The generalized perveance of the beam.

Pipe Radius-	The radius of the beam pipe.  The image effects of a cylindrical beam pipe may be included in the beam dynamics.  This is most useful for magnetic focusing systems since the electrodes in an electric focusing system will probably dominate the image effects.  Enter zero to ignore this effect (the free-space situation).

For a technical description of these parameters see Martin Reiser's Theory and Design of Charged Particle Beams (Wiley, 1994).


BEAMLINE ELEMENTS:

SPECIAL PARAMETERS

Many of the Beam Elements have special parameters which apply only to that lens type.  The definitions of these parameters are listed in the help topic for the corresponding Beam Element.  The special parameters for a particular Beam Element are accessible by pressing the SPECIAL button in the ADDITION PARAMETERS section in the element's dialog box (see Beamline Elements: Basic Parameters on how to access this box).


BEAMLINE ELEMENTS:

CHARGE NEUTRALIZATION

The charge neutralization parameters are accessible by pressing the NEUTRALIZATION button in the BEAM PARAMETERS dialog box (see Beamline Elements: Basic Parameters on how to access this box).  These parameters define the effect of charge neutralization a background gas has on the beam.  Let fe(z) represent the charge neutralization factor as a function of axial distance through the lens.  To simulate this effect  we replace K by (1-fe(z))K in the KV envelope equations.

Length-	The distance in the element through which the charge neutralization occurs (charge neutralization does not  necessarily have to occur throughout the entire lens).

Initial-	The initial value for fe.

Final-	The final value for fe.

Profile-	The functional profile of the charge neutralization throughout the element.


DRIFT SPACE

A drift space is an element which provides no focusing or defocusing of the beam.  The beam simply coasts through the section for a length specified by Element Length in the basic parameters.

Special Parameters:

None


THIN SOLENOID

This lens axisymmetrically changes the slope of the beam envelope.  It uses no basic parameters.  Therefore the basic parameter section should be ignored.  Do not change any of the default values!  Denoting the Element Amplitude as u, the action of this lens may be described using the transfer matrix equation


IDEAL SOLENOID

This element simulates the action of a long solenoidal lens.  The focusing profile is "hard-edge", that is it remains constant throughout the lens.  The focusing strength of an ideal solenoid is given by the formula (qB0/2mcβγ)^2, where B0 represents the on-axis magnetic field, q is the beam particle charge, m is the beam particle mass, c is the speed of light, β is the ratio of the axial beam velocity to the speed of light, and γ is the relativistic factor.  The Element Amplitude is then given by the formula (qB0/2mcβγ)^2.

Special Parameters:

None


AIR CORE SOLENOID

This element simulates the action of an air core solenoidal lens.  The focusing strength of an air core solenoid is given by the formula (qB(z)/2mcβγ)^2, where B(z) represents the on-axis magnetic field, q is the beam particle charge, m is the beam particle mass, c is the speed of light, β is the ratio of the axial beam velocity to the speed of light, and γ is the relativistic factor.  For an air core solenoid this field is known analytically to be B(z)=B0/(1+(z-zc)2/a2)^3/2, where B0 is the maximum axial field.  The Element Amplitude is then given by the formula (qB0/2mcβγ)^2.

Special Parameters:

Maximum Field Position-	Axial location, with respect to the lens entrance, of the maximum field B0.  It is denoted zc in the above equation.

Aperature Radius-	The radius of the solenoid windings.  It is denoted a in the above equation.


IPR SOLENOID

This element simulates the action of the solenoidal lenses used in the Electron Beam Experiments at the Institute for Plasma Research.  There are approximate analytic expressions for the axial magnetic field profiles for these lenses.  The focusing strength of an IPR solenoid is given by the formula (qB(z)/2mcβγ)^2 where B(z) represents the on-axis magnetic field, q is the beam particle charge, m is the beam particle mass, c is the speed of light, β is the ratio of the axial beam velocity to the speed of light, and γ is the relativistic factor.  This field is approximated analytically as

B(z)=B0exp(-(z-zc))^2/d^2)/(1+(z-zc)^2/b^2)

where B0 is the maximum axial field.  The Element Amplitude is then given by the formula (qB0/2mcβγ)^2.

Special Parameters:

Maximum Field Position-	Axial location, with respect to the lens entrance, of the maximum field B0.  It is denoted zc in the above equation.

Decay Coefficient-	Decay interval.  It is denoted d in the above equation.

Base Coefficient-	It is denoted b in the above equation.


USER DEFINED SOLENOID

Thiselement simulates the action of a solenoid lens with abitrary axial profile.  The axial profile is supplied by the user through a file of data points.  The file should contain a sequence of data points separated by spaces or new lines (carriage returns) which are the normalized values of the focusing strengths along the lens.  These values are multiplied by the Element Amplitude parameter to yield the actual focusing strengths.  The distance between data points is taken to be the Element Length divided by the number of data points minus one.

Special Parameters:

File Name-	The path name of the file where the data points are located.

Number of Points-	The number of data points in the file.

IMPORTANT NOTE:

The data is loaded into SPOT once the LOAD DATA button in the SPECIAL PARAMETERS dialog box is pushed.  The data is never automatically reloaded, even when SPOT is restarted!  If you change this data, you must reload it.  Also, you must set the Element Length paramter before you load the data.


RING LENS

The ring lens is a unipotential lens modeled as three cylinders,  two of which are the beam pipe.  The center cylinder is the so called ring which is separated from the outer cylinders by gaps and driven to a separate potential.  The Element Amplitude parameter specifies the voltage of the center pipe.  The two outer cylinders are kept at the Beam Voltage.

The gap spacings on either side of the ring electrode are determined by the Element Length, Ring Electrode Length, and the Ring Electrode Center in the obvious manner.  For example, the initial gap length is given by Ring Electrode Center - Ring Electrode Length/2.

Special Parameters:

Beam Voltage-	The energy of the particle beam.  This parameter is necessary because the ring lens focusing depends on the difference between the electrode voltage and the beam voltage.

Ring Electrode Radius-	The aperature radius of the beam pipe and ring electrode.

Ring Electrode Length-	The length of the center electrode pipe.  This value must be less than the Element Length.

Ring Electrode Center-	The axial location of the ring electrode's center position with respect to the lens entrance.  For a meaningful model, this value must be chosen such that the ring electrode does not extend beyond the lens entrance or exit.

IMPORTANT NOTE:

The mathematical model for the Ring Lens is quite stable.  It is recommended that you use this model for a unipotential lens rather than that of the Einzel Lens whenever possible.


EINZEL LENS

This unipotential lens is modeled as a coaxial, cylindrical electrode sandwiched by two grounding plates which provide isolation.  The Element Amplitude parameter specifies the voltage of the center pipe.

The gap spacings on either side of the center electrode are determined by the Element Length, Electrode Length, and the Electrode Center in the obvious manner.  For example, the initial gap length is given by  Electrode Center - Electrode Length/2.

Special Parameters:

Beam Voltage-	The energy of the particle beam.  This parameter is necessary because the einzel lens focusing depends on the difference between the electrode voltage and the beam voltage.

Electrode Radius-	The aperature radius of the center electrode.

Electrode Length-	The length of the center electrode pipe.  This value must be less than the Element Length.

Electrode Center-	The axial location of the electrode's center position with respect to the lens entrance.  For a meaningful model, this value must be chosen such that the center electrode does not extend beyond the grounding plates.

Shunt Aperature-	The aperature radius of the grounding plates.

IMPORTANT NOTE:

The mathematical model for the Einzel Lens makes some limiting approximations.  The approximation requires that the ratio of Electrode Length to MAX{Shunt Aperature, Electrode Radius} be greater than 6 for best results.  Outside this regime the model may become unstable.  Therefore, it is recommended that you use the Ring Lens for a unipotential lens whenever possible.


THIN QUADRUPOLE

This lens changes the slope of the beam envelope in quadrupole fashion.  That is the beam experiences focusing in the x plane and equal defocusing in the y plane (to reorient this action specify a negative value for the Element Amplitude).  It uses no basic parameters.  Therefore the basic parameter section should be ignored.  Do not change any of the default values!  Denoting the Element Amplitude as u, the action of this lens may be described using the transfer matrix equation


IDEAL QUADRUPOLE

This element simulates the action of a long quadrupole lens.  The focusing profile is "hard-edge", that is it remains constant throughout the lens.  The Element Amplitude of an ideal magnetic quadrupole is given by the formula qB0/γmav, where B0 represents the on-axis magnetic field, γ is the relativistic factor, a is the aperature radius of the lens, m is the mass of the beam particles, and v is the axial velocity of the particle beam.  The Element Amplitude of an ideal electrostatic quadrupole is given by the formula qE0/γmav^2, where E0 is the on-axis transverse field strength and the other parameters are as before.

Special Parameters:

None


IPR QUADRUPOLE

This element simulates the action of a quadrupole lens used in the Electron Ring Experiment at the Institute for Plasma Research.  These are magnetic lenses which have focusing function profiles which may be fitted analytically.  The focusing function profile is given by the following:

κ(z) = u exp[(z-zc)^2/d^2] cos[2π(z-zc)/b]

where u represents maximum focusing strength of the quadrupole and is given by the Element Amplitude parameter.  The Element Amplitude of a magnetic quadrupole is given by the formula qB0/γmav, where B0 represents the maximum on-axis magnetic field, γ is the relativistic factor, a is the aperature radius of the lens, m is the mass of the beam particles, and v is the axial velocity of the particle beam.  The Element Amplitude of a electrostatic quadrupole is given by the formula qE0/γmav^2, where E0 is the maximum on-axis transverse field strength and the other parameters are as before.

Special Parameters:

Maximum Field Position-	Axial location, with respect to the lens entrance, of the maximum focusing strength.  It is denoted zc in the above equation.

Decay Coefficient-	Decay interval.  It is denoted d in the above equation.

Base Coefficient-	It is denoted b in the above equation.


USER DEFINED QUADRUPOLE

Thiselement simulates the action of a quadrupole lens with abitrary axial profile.  That is the beam experiences focusing in the x plane and defocusing in the y plane (to reorient this action specify a negative value for the Element Amplitude).  The axial profile is supplied by the user through a file of data points.  The file should contain a sequence of data points separated by spaces or new lines (carriage returns) which are the normalized values of the focusing strengths along the lens.  These values are multiplied by the Element Amplitude parameter to yield the actual focusing strengths.  The distance between data points is taken to be the Element Length divided by the number of data points minus one.

Special Parameters:

File Name-	The path name of the file where the data points are located.

Number of Points-	The number of data points in the file.

IMPORTANT NOTE:

The data is loaded into SPOT once the LOAD DATA button in the SPECIAL PARAMETERS dialog box is pushed.  The data is never automatically reloaded, even when SPOT is restarted!  If you change this data, you must reload it.  Also, you must set the Element Length paramter before you load the data.


Simulation
CHANNEL SIMULATION

This section describes the definition and simulation of a transport channel using SPOT.  This includes initializing a data set, running the simulation and outputting the results.

Overview

Starting a New Data Set

Opening an Existing Data Set

Saving and Closing Data Sets

Defining the Channel

Setting the Initial State

Setting the Element Amplitudes

Running the Simulation

Optimizing the Channel

Viewing the Results

Outputting the Results


Simulation: Overview
CHANNEL SIMULATION:

OVERVIEW

Defining the Channel

Defining a transport channel is relatively straightforward in SPOT.  Beam Elements are chosen from a library list.  They are cascaded to form the channel.  Once all the parameters for the individual Beam Elements are all specified, the simulation may be run.

Running the Simulation

The user should specify the Element Amplitudes for each Beam Element.  The simulation may then be run.  SPOT is organized so that the process of Element Amplitudes adjustment and rerunning o f the simulation is very convenient (see Setting the Element Amplitudes and Running the Simulation).  The user may also see immediate feedback by opening a Data Plot.

Outputting Solution Data

SPOT will also display the simulation solution data in text form as well as graphical form (see Viewing the Results).  This data may be saved to a file in text form for further external processing (see Outputting the Results).  A text listing of all the channel parameters may also be generated.

Multiple Data Sets

It is possible to process many channels concurrently, each with their own SPOT input file (*.SPI file).  A SPOT main window will be displayed for each input file you have open.  The menu targets wihichever main window has the focus.


Simulation: Starting New Data Sets
CHANNEL SIMULATION:

STARTING NEW DATA SETS

In the SPOT FILE menu, choose NEW.  A pop-up menu will display a list of SPOT file types.  Choose the SPOT DATA FILES (*.SPI) selection.  A new SPOT main window will be displayed.  The input file is named whenever the first save operation occurs (see Saving and Closing Data Sets).


Simulation: Opening Existing Data Sets
CHANNEL SIMULATION:

OPENING EXISTING DATA SETS

Open an existing data set which defines a transport channel by using the File|Open menu command (it is not necessary to close any currently opened files).  A SPOT main window will be displayed with the file name as the title.


Simulation: Saving and Closing Data Sets
CHANNEL SIMULATION:

SAVING AND CLOSING DATA SETS

Saving Data

It is recommended that you save your work often.  To do this select the FILE|SAVE Menu command.  Whichever SPOT main window is currently in focus will have its data saved to its SPI file.

Copying Data

It is possible to copy the data of a currently opened data set (SPI file) to another file using the FILE|SAVE AS menu command.  You will be prompted for the name of the new file.  All further data modifications will be in the new file.  That is, the SPOT main window will now refer to the new file.

Closing Data Sets

Close the data set currently in focus by selecting the FILE|CLOSE menu command.  If modifications have been made to the data you will be given a warning and a chance to abort.


Simulation: Defining the Channel
CHANNEL SIMULATION:

DEFINING THE CHANNEL

Bring up the EDIT NETWORK dialog box by pushing the NETWORK button in the SPOT main window or selecting the EDIT|NETWORK menu command.  There will be a list box titled CHANNEL ELEMENTS in this dialog box and a set of buttons to the left of it.  The list box lists, in order, the Beam Elements which comprise the channel.  Use the buttons to enter the corresponding elements.

EDIT NETWORK Buttons

EDIT STAGE-	Brings up the dialog box for the existing Beam Element currently selected in the CHANNEL ELEMENTS list box.

INSERT STAGE-	Inserts a Beam Element in front of the currently selected Beam Element in the CHANNEL ELEMENTS list box.

ADD STAGE-	Adds a Beam Element behind the currently selected Beam Element in the CHANNEL ELEMENTS list box.

DELETE STAGE-	Deletes the currently selected Beam Element in the CHANNEL ELEMENTS list box.

A Note on the Insert Stage and Add Stage Buttons:

After pressing these buttons a dialog box containing a list of available Beam Elements will appear.  Select the desired Beam Element then press OK to add the element to the channel.


Simulation: Setting the Initial State
CHANNEL SIMULATION:

SETTING THE INITIAL STATE

You must specify an initial state for the beam envelope trajectory in order to run the simulation.  Bring up the EDIT NETWORK dialog box by pushing the NETWORK button in the SPOT main window or selecting the EDIT|NETWORK menu command.  There will be a set of edit controls in this dialog box labelled INITIAL STATE.  Fill in the initial beam envelope state in the corresponding edit controls.


Simulation: Specifying the Element Amplitudes
CHANNEL SIMULATION:

SETTING THE ELEMENT AMPLITUDES

The easiest way to set the Element Amplitude parameter for each Beam Element is through the SPOT main window.  Under the list box labeled CONTROL VALUES, double click the desired stage.  A dialog box will appear prompting you for the Element Amplitude value.  Enter the value and press OK to specify this parameter.  You may also specify this value in the Beam Element's parameter dialog box (see Beamline Elements: Basic Parameters).


RUNNING THE SIMULATION

To run the transport channel simulation press the SOLUTION button in the SPOT main window or use the SOLVE|COMPUTE SOLUTION menu command.  To recompute the solution data for the same simulation press the SOLUTION DATA button in the SPOT main window or use the SOLVE|COMPUTE SOLUTION DATA menu command (this is only necessary if you change the number of solution points in the EDIT|SOLUTION POINTS menu).

NOTE:

Many of the features of SPOT will not work until the simulation is run.  This includes opening a data plot and running optimizers.


Simulation: Viewing the Results
CHANNEL SIMULATION:

VIEWING THE RESULTS

Once the simulation is run, the data may b e displayed in SPOT either textually or graphically.  To see a text listing of the solution data use the VIEW|SOLUTION DATA LISTING menu command.  An editor window with the output will then be displayed.  To view the data graphically use the VIEW|SOLUTION DATA PLOT menu command.  A plot of the data with the current PLOT CONFIGURATION parameters will be displayed (see Solution Data Plots for more information on plotting).

You may also view a text listing of all the channel parameters by using the VIEW|INPUT PARAMETERS menu command.  You may do this at any time.


Simulation: Outputting the Results
CHANNEL SIMULATION:

OUTPUTTING THE RESULTS

Once the simulation is run, you may save an ASCII text listing of the data using the Output|Solution Data menu command.  You will be prompted for a file name, the default extension is ".SLN".

You may also save an ASCII listing of the channel parameters at any time using the Output|Parameter Listing menu command.  You will be prompted for a file name, the default extension is ".PRM".


Matcher
PERIODIC MATCHED BEAM FINDER

SPOT now features a tool for finding the matched beam for a periodic transport channel.  This section describes in some detail the operation of this matcher.

Contents

Overview

Running the Matcher

Operational Parameters

Matching the Periodic Channel

Modifying Parameters

The Matched State


Matcher: Overview
MATCHED BEAM FINDER:

OVERVIEW

What It Does

The Matched Beam Finder computes the (ideal) matched beam which would propagate through a periodic focusing channel.  Specifically, it computes the solution over one period of the channel.  With this information the designer knows what the target state of the beam should be for proper injection into the periodic channel.

How It Works

The Matched Beam Finder iteratively averages the beam envelope states at the beginning and end of one channel period.  That is, starting from the current state it solves for the beam envelope through the channel then averages the initial and final states.  The average is used as the initial state for the next iteration.  Eventually the process converges to the matched beam state.

What It Needs

The Matched Beam Finder requires the user to define ONE period of the periodic channel.  In other words, the transport channel defined in the SPOT input file should represent one period of the periodic channel.  For example, if you were modeling a periodic solenoidal transport channel then the system might consist of a Drift Space and an Air Core Solenoid.  If you were model a FODO channel then the system might consist of a Drift Space, an Ideal Quadrupole, a Drift Space, and an Ideal Quadrupole.  It is up to the designer as to which part of the channel period is modeled.  That is, you may start anywhere so long as the system is only one period long.


Matcher: Running
RUNNING THE MATCHER

To launch the matcher choose the MATCHER... selection under the SOLVE menu of SPOT.  It is necessary to quite the matcher (by pressing the DONE button in the matcher dialog box) before closing the input file or exiting SPOT.

Before running the Matched Beam Finder the following conditions must hold:

i.	The transport channel must be defined as one period in the periodic channel.

ii.	The Amplitudes of the focusing elements must be set to their desired value.

iii.	You must supply the Initial State for the beam as a starting point for the matcher.

iv.	The envelope simulation must run.  That is the solution must be computed for the channel.


Matcher State
MATCHED BEAM FINDER STATE

These parameters indicate the current state of the Matched Beam Finder and are visible in its dialog box.  These parameters are not modifiable by the user.

Parameter

Iteration-	The current search iteration of the optimizer.

Residual Error-	This value is the norm of the difference of current matched beam state and the previous matched beam state.  It measures the convergence of the matcher; it should be as close to zero as possible.

Current X-	The matched beam's X component (the current iterate).

Current X'-	The matched beam's X' component (the current iterate).

Current Y-	The matched beam's Y component (the current iterate).

Current Y'-	The matched beam's Y' component (the current iterate).


Matcher: Operational Parameters
MATCHED BEAM FINDER:

OPERATIONAL PARAMETERS

These parameters are accessible on the Matched Beam Finder's dialog box itself.  They are necessary to control the operation of the Matched Beam Finder first hand.

Matcher Settings

Max Iterations-	Maximum number of iterations before the matcher stops.  Use this parameter to perform a set number of iterations.

Min Residual Error-	If the Residual Error drops below this value the matcher will stop.

Track Solution Every N Steps-	Check this box to activate Solution Tracking.  If any solution Data Plotsplots.contents are opened, they will be updated every N iterations.

Beep on Stop-	Check this box if you want the matcher to beep when it stops.

Matcher Buttons

Run-	Starts the matcher.

Stop-	Stops the matcher while it is running.  This feature will not work with Windows 3.1.  It should work with a pre-emptive multitasking operating system, such as OS/2, Windows NT, or Windows 95.

Reset-	Resets the iteration counter.  Does not change the current state of the system or matcher!

Re-Initialize-	Reinitializes the matcher.  This is necessary if you have made any changes to the channel parameters or Element Amplitudes (see Modifying Parameters).

Done-	Terminates the matcher.


Matching a Periodic Channel
MATCHED BEAM FINDER:

MATCHING THE PERIODIC CHANNEL

Initial Setup

In order to find the matched beam solution to a periodic channel it is necessary to defined ONE period of the channel in the SPOT input data set (see Starting a New Data Set).  Enter the appropriate Element Amplitude for each focusing element in the period section once it is defined.  You must then choose an Initial State for the matcher to start its iterations. The closer this choice is to the matched solution the better, but any choice should eventually converge.  The Envelope Simulation must be run before the Matched Beam Finder can be lauched!

Matching the Beam

Once the Envelope Simulation is run, lauch the Matched Beam Finder (see Running the Matcher).  Set the Track Solution and Beep on Stop check boxes if desired.  Pick a value for the Max Iterations (100 is the default value).  Press the Run button to start the matcher.  The optimizer will stop after the prescribed number of iterations.  If the Residual Error has not stopped decreasing Reset the matcher and run it again.  Continue running the matcher until the Residual Error no longer decreases (or decreases painfully slowly).

General Trends

While the matcher is running the Residual Error will probably oscillate.  These oscillations will eventually damp out as the matcher converges.

The matcher will converge faster to matched beam solutions whose amplitude oscillates are larger.  The “flatter” the envelope the slower the convergence.


Matcher: Modifying Parameters
MATCHED BEAM FINDER:

MODIFYING PARAMETERS

Sometimes you may wish to modify some channel parameters or some other parameters after the matcher has been launched.  In order to do so properly, you should reinitialize the matcher after the changes are made.

Reinitialization

After changing the parameters, you must reinitialize the matcher for it to recognize the changes.  Do so by pressing the RE-INITIALIZE button in the matcher's dialog box.


Matcher: Matched Beam State
MATCHED BEAM FINDER:

THE MATCHED STATE

After the Matched Beam Finder has converged, the envelope simulation solution will be the matched beam solution for the periodic channel.  In particular, the matched beam state at the begining (or end) of the period will be given in the Current X, X', Y, Y' boxes of the Matched Beam Finder.  Assuming that the periodic channel starts at this location, this is the beam state needed to properly launch the beam into the channel.  You may use SPOT's Optimizers to design a matching section to match the beam from its source into the periodic channel.


OPTIMIZERS

SPOT features two online optimizers, one a Local Optimizer which seeks out local optima, and one a Global Optimizer which seeks out global optima.  This section describes in some detail the operation of these optimizers.

Contents

General Properties

Overview

Running an Optimizer

Optimizing a Beam Element

Modifying Parameters

The Reference Trajectory

The Terminal State (Matching)

The Terminal Weights (Matching)

Local Optimizer

Description

Optimizer State

Operational Parameters

Numerical Parameters

Constrained Optimization

Global Optimizer

Description

Optimizer State

Specifying a Search Region

Operational Parameters

Numerical Parameters


OPTIMIZERS:

OVERVIEW

What They Are

SPOT features two online optimizers, one a Local Optimizer which seeks out local optima, and one a Global Optimizer which seeks out global optima.  They may be used to optimize transport channels which the user has defined in SPOT.  The channel must be fully defined, along with some additional parameters, and the simulation must run first.

What They Do

Both Optimizers attempt to find the "optimal" setting for the Element Amplitude parameter of each beamline element which composes the transport channel.  By "optimal" I mean the settings which minimizes the average distance between the actual beam envelope trajectory and the Reference Trajectory.  That is to say, the optimizers try to find the lens settings which cause the beam envelope trajectory to track the Reference Trajectory as closely as possible.  In mathematical terms, if we let X(z) denote the actual beam envelope ,  R(z) the reference trajectory, and ||·|| the L2 norm, then the optimizers try to minimize the functional ||X R||2.

How They Do It

The Local Optimizer searches by computing the gradient of the above functional with respect to the Element Amplitude's.  This gradient is used to determine search directions in parameter space.  A minimum value for the functional is found in this direction and the set of Element Amplitude's is updated accordingly.  The procedure repeats in this fashion until it converges.  This type of technique is refered to as nonlinear programming.

The Global Optimizer works on the principles of dynamic programming.  Loosely, this entails the comparison of all possible trajectories in a chosen region of parameter space.  As such, this technique is extremely CPU intensive.  Therefore, the global optimizer will only be of practical use for relatively small or axisymmetric systems.

What They Need

The user must define a Reference Trajectory throughout the system.  Also, if a particular Terminal State is required for the solution, then the user must supply a set of Terminal Weigths.  In order to used the constrained optimization feature of the Local Optimizer it is necessary to supply intervals to which the Element Amplitude's are constrained (see Constrained Optimization).  If one  wishes to use the Global Optimizer then a region of parameter space must also be specified (see Specifying a Search Region).


Optimizers: Running
RUNNING AN OPTIMIZER

To launch an optimizer choose the appropriate selection under the SOLVE menu of SPOT.  Due to the global memory requirements of the optimizers, they do not run concurrently!  Do not attempt to launch more than one optimizer at a time.  Also, it is necessary to quite the optimizer (by pressing the DONE button in the optimizer dialog box) before closing the input file or exiting SPOT.

Before launching an optimizer, refer to the following checklists:

Before running the Local Optimizer the following conditions must hold:

i.	The transport channel must be completely defined.  This means that the beam envelope simulation must run.

ii.	There must be at least one nonzero Element Amplitude parameter for the channel.  This is necessary to provide a valid starting point for the optimizer.

iii.	A valid Reference Trajectory must be defined throughout the channel.

iv.	To use constrained optimization, the CONTROL CONSTRAINT SPACE interval must be defined for each of the target elements (see Constrained Optimization).

Before running the Global Optimizer the following conditions must hold:

i.	The transport channel must be completely defined.  This means that the beam envelope simulation must run.

ii.	A valid Reference Trajectory must be defined throughout the channel.

iii.	The CONTROL CONSTRAINT SPACE interval and FEASIBLE STATE SPACE region must be defined for each element.  Also, the OPTIMIZE STAGE button should be turned on for each target element.


Optimizering a Beam Element
OPTIMIZERS:

OPTIMIZING A BEAM ELEMENT

In order for a particular Beam Element to have its Element Amplitude optimized, you must explicitly mark it for optimization.  This way the optimizers work only on the desired Beam Elements and do not waste time on the others.  Check the OPTIMIZE STAGE check box in the OPTIMIZATION CONFIGURATION dialog box for each Beam Element you wish to optimize.  This dialog box is accessible through the SPOT main window OPT CONFIG button or the EDIT|OPTIMIZATION CONFIGURATION menu command.


OPTIMIZERS:

MODIFYING PARAMETERS

Sometimes you may wish to modify some channel parameters or some optimization parameters after an optimizer has been launched.  For example, if the Local Optimizer is converging to a solution that is undesirable you may want to change some of the Element Amplitudes to force the optimizer to another solution.  Or you may wish to change some of the CONTROL CONSTRAINT SPACE intervals.  In order to do so properly, you should reinitialize the optimizer after the changes are made!

Reinitialization

After changing the parameters, you must reinitialize the optimizer for it to recognize the changes.  Do so by pressing the RE-INITIALIZE button in the optimizer's dialog box.


OPTIMIZERS:

REFERENCE TRAJECTORY

Description

The reference trajectory is composed of straight line segments, one through each Beam Element in the transport channel.  Therefore, to define a reference trajectory it is necessary to supply the point and slope for each line segment in the reference trajectory.  Both an x plane reference trajectory and a y plane reference trajectory must be defined.

Defining a Reference Trajectory

The reference trajectory is defined in the OPTIMIZATIONCONFIGURATION dialog box.  This dialog may be accessed by either the OPT CONFIG button in the SPOT main window, or the EDIT|OPTIMIZATION CONFIGURATION menu command.

In this dialog box there is a list box titled REFERENCES TRAJECTORIES.  There is an entry for each Beam Element in this list box.  Double click the entry or select the entry and press the above EDIT button to bring up the REFERENCE TRAJECTORY dialog box for that Beam Element.  Fill in the values for the parameters for both the x plane and the y plane.

The formula for the reference trajectory through the Beam Element will be given by mz+b where b is the Point, m is the Slope, and z is the axial position in the Beam Element with respect to the entrance.

Reference Trajectory Parameters

Point-	The point in the point-slope formula for a line.

Slope-	The slope in the point-slope formula for a line.


Optimizers: Terminal State
OPTIMIZERS:

TERMINAL STATE (MATCHING)

Description

It is possible to specify a desired Terminal State for the beam envelope trajectory.  This is usually referred to as "matching" (matching into the next section of an accelerator column).  The optimizers will try to target this state when they are searching for the optimal set of Element Amplitudes.  In order to use this feature it is also necessary to supply a set of Terminal Weights.  The performance the optimizers will depend on the choice of these weights.

Defining the Terminal State

The desired Terminal State is supplied in the OPTIMIZATION CONFIGURATION dialog box.  This dialog may be accessed by either the OPT CONFIG button in the SPOT main window, or the EDIT|OPTIMIZATION CONFIGURATION menu command.

Toggle the Terminal State

You may turn the Terminal State requirement on and off by checking or unchecking the TARGET STATE check box in the OPTIMIZATION CONFIGURATION dialog box.


Optimizers: Terminal Weights
OPTIMIZERS:

TERMINAL WEIGHTS (MATCHING)

Description

In order to use the matching feature of SPOT you must supply a set of Terminal Weights.  This is necessary to "tune" the optimizer when search for the target state.  These parameters provide the necessary weighting of the Terminal State.

Why

SPOT matches by adding boundary terms to the functional which it minimizes.  If (X,X',Y,Y') is the actual terminal state and (x,x',y,y') is the desired terminal state then these terms appear as follows:

w1(X-x)2 + w2(X'-x'')2 + w3(Y-y)2 + w3(Y-y')2

The tuple (w1,w2,w3,w4) constitutes the Terminal Weights.

Result

This implementation results in a contest between competing terms in the minimization.  The solution is found when both the boundary terms and the Reference Trajectory terms are minimized.  However, the path taken may vary greatly depending on the Terminal Weights.  This suggests an optimization scheme.  If the optimizer is not converging to the Terminal State, increase the values of the Terminal Weights.  Also, for the Local Optimizer it may be beneficial to turn off the Terminal States, converge to a solution, then turn on the Terminal States.

Defining the Terminal Weights

The Terminal Weights are supplied in the OPTIMIZATION CONFIGURATION dialog box.  This dialog may be accessed by either the OPT CONFIG button in the SPOT main window, or the EDIT|OPTIMIZATION CONFIGURATION menu command.  The weigthts are entered next to their corresponding Terminal State.


LOCAL OPTIMIZER

Description

The Local Optimizer seeks out the optimal setting for the Element Amplitude parameter of each beamline element in a local sense.  That is, starting from an initial set of Element Amplitudes the  Local Optimizer converges to a local extrema in the vicinity of this set.  Therefore, the solution you obtain using the Local Optimizer is highly dependent on the initial set of Element Amplitudes.

For more details on the Local Optimizer see Optimizers: Overview.  For general information on optimization see the Optimization section.

Constrained Optimization

It is possible to perform a constrained optimization where the Element Amplitudes are constrained to particular intervals.  For more details on this feature see Constrained Optimization.

Progress

The Local Optimizer steps through parameter space in a systematic fashion to minimize the target functional.  Its dialog box contains information on its progress, including the Current Iteration, Current Costs, and Descent Rate.  It is also possible to track the progress of the Local Optimizer graphically using SPOT's plotting features (see Solution Tracking).

Launching the Local Optimizer

Before running the Local Optimizer the following conditions must hold:

i.	The transport channel must be completely defined.  This means that the beam envelope simulation must run.

ii.	There must be at least one nonzero Element Amplitude parameter for the channel.  This is necessary to provide a valid starting point for the optimizer.

iii.	A valid Reference Trajectory must be defined throughout the channel.

iv.	To use constrained optimization, the CONTROL CONSTRAINT SPACE interval must be defined and OPTIMIZE STAGE button turned on for each of the target elements (see Constrained Optimization).


LOCAL OPTIMIZER STATE

These parameters indicate the current state of the Local Optimizer and are visible in its dialog box.  These parameters are not modifiable by the user.

Parameter

Iteration-	The current search iteration of the optimizer.

Trajectory Cost-	The cost due solely to the Reference Trajectory functional.

Terminal Cost-	The cost due solely to the Terminal State boundary term.

Total Cost-	The sum of the Trajectory Cost and the Terminal Cost.

Descent Rate-	The current descent rate of the Total Cost.  Its value is given by the difference of the Total Costs from the previous iteration and the current iteration, over the Total Cost of the current iteration.


LOCAL OPTIMIZER:

OPERATIONAL PARAMETERS

These parameters are accessible on the Local Optimizer's dialog box itself.  They are necessary to control the operation of the Local Optimizer first hand.

Local Optimizer Settings

Constrained Optimization-	You may toggle between a Constrained Optimization and an unconstrained optimization.

Max Iterations-	Maximum number of iterations before the optimizer stops.  Use this parameter to perform a set number of iterations.

Min Descent Rate-	If the Descent Rate drops below this value the optimizer will stop.  The Constrained Optimization feature also uses this parameter.

Track Solution Every N Steps-	Check this box to activate Solution Tracking.  If any solution Data Plotsplots.contents are opened, they will be updated every N iterations.

Beep on Stop-	Check this box if you want the optimizer to beep when it stops.

Optimize Buttons

Run-	Starts the optimizer.

Stop-	Stops the optimizer while it is running.  This feature will not work with Windows 3.1.  It should work with a pre-emptive multitasking operating system, such as OS/2, Windows NT, or Windows 95.

Reset-	Resets the iteration counter.  Does not change the current state of the system or optimizer!

Re-Initialize-	Reinitializes the optimizer.  This is necessary if you have made any changes to the channel parameters or Element Amplitudes (see Modifying Parameters).

Done-	Terminates the optimizer.


LOCAL OPTIMIZER:

NUMERICAL PARAMETERS

The numerical parameters fine tune the performance of the Local Optimizer.  They are accesible through the LOCAL OPT button in the SPOT main window or through the EDIT|LOCAL OPTIMIZER menu command.

Search Method-	This determines the method for computing the search directions.  You may select from five different search methods.  The Polak-Ribiere and Fletcher-Reeves methods are conjugate gradient algorithms and seem to be the best overall choices.  The Davidon-Fletcher-Powell and Broyden-Fletcher-Goldfarb-Shanno methods are quasi-Newton algorithms.

Constrained Optimization-	This is the same as in the Operational Parameters.

Minimum Descent Rate-	This is the same as in the Operational Parameters.

Maximum Iterations-	This is the same as in the Operational Parameters.

Search Interval Definition

These parameter determine how the search length is selected once the search direction is computed.  If we denote the current set of Element Amplitudes as x and the current search direction as d, then the next set of Element Amplitudes is given by x+αd where α is the desired search length.  If f denotes the cost functional, then f(x+αd) is the value of the cost functional at the new set of Element Amplitudes.  We also define the function φ according to φ(α)=f(x+αd).

Armijo Parameter-	This determines the maximum value that will be considered for α according to Armijo's Rule.  Denoting this parameter as σ, the Armijo test terminates when φ(α)<φ(0)+σφ'(0)α.  This value should be in the interval (0,0.5).

Length Reduction-	If α fails to meet the Armijo critereon, then it is reduced by this factor.  This value should be in the interval (0,1).

Reductions Until Doubled-	If the number of length reductions (the number of times Armijo's test fails) passes this value, then α is reduced by the Length Reduction parameter squared every time thereafter.

Number of Line Samples-	The number of times φ(α) is sampled once the maximum value of α is determined,  The minimizing value of α is selected according to a Fibonacci algorithm.  Increasing this value increases the accuracy of the minimizing value of α, however, it also increases the computation time.


Armijo's Rule
LOCAL OPTIMIZER:  ARMIJO'S RULE

Armiljo's Rule is a method for determining an interval for a line search.  The following is a graphic representation of the idea.


LOCAL OPTIMIZER:

CONSTRAINED OPTIMIZATION

It is possible to perform a constrained optimization where the Element Amplitudes are constrained to a particular interval.  The optimizer will then search out the best solution within the constrained parameter space.  To perform a Constrained Optimization check the CONSTRAINED OPTIMIZATION check box in the in the Local Optimizer's dialog box or in the LOCAL OPTIMIZER PARAMETERS dialog box (see Local Optimizer: Numerical Parameters).

NOTE:

If you check the CONSTRAINED OPTIMIZATION check box in the in the Local Optimizer's dialog box while it is running, you must Re-Initialize the optimizer.

Requirements for Constrained Optimization

The CONTROL CONSTRAINT SPACE interval must be set to the desired constraint interval in the Beam Element's OPTIMIZATION PROFILE dialog box.  These dialog boxes are accessible in the OPTIMIZATION CONFIGURATION dialog box. It contains a list box labeled OPTIMIZATION PROFILES.  Either double click the desired element or select it and press the EDIT button.  Then define the constrant interval for the Element Amplitude in the CONTROL CONSTRAINT SPACE edit controls.

The OPTIMIZATION CONFIGURATION dialog box is accessible throught the OPT CONFIG button in the SPOT main Window or through the EDIT|OPTIMIZATION CONFIGURATION menu command.

You must set this interval for every Beam Element you wish to optimize!  You must also check the CONSTRAIN STAGE check box in the OPTIMIZATION PROFILE dialog box for every Beam Element you wish to contrain.

Minimum Descent Rate

The Local Optimizer uses an active set method for constrained optimization.  Thus, it is necessary to query the active set after the optimizer converges to a local solution.  This is accomplished using the Min Descent Rate parameter.  Tthe active set is queried once the Descent Rate drops below Min Descent Rate.  If an active constraint is invalid the optimizer drops it from the active set and continues, otherwise the optimizer  stops.


GLOBAL OPTIMIZER

Description

The Gobal Optimizer seeks out the optimal setting for the Element Amplitude parameter of each beamline element in a global sense.  That is, the Gobal Optimizer searches a specified region of parameter space (see Specifying the Search Region) for the best solution.  Thus, it tries to compute the best solution in the region you specify.

For more details on the Gobal Optimizer see Optimizers: Overview.  For general information on optimization see the Optimization section.

Progress

The Gobal Optimizer scans each Beam Element in the channel backwards in a systematic fashion to minimize the target functional.  Its dialog box contains information on its progress, including the Number of Stages, Current Stage, Optimizing the Stage, and the Percent Complete.

Failure

It is possible that the Global Optimizer will fail to compute a solution.  This usually happens when the search region is not suitably specified for the particular problem.  The beam envelope trajectory wonders out of the specified state space.  When this happens the Global Optimizer will give a zero value for the Element Amplitude parameter where the trajectory was lost.

Launching the Local Optimizer

Before running the Global Optimizer the following conditions must hold:

v.	The transport channel must be completely defined.  This means that the beam envelope simulation must run.

vi.	A valid Reference Trajectory must be defined throughout the channel.

vii.	The CONTROL CONSTRAINT SPACE interval and FEASIBLE STATE SPACE region must be defined for each element.  Also, the OPTIMIZE STAGE button should be turned on for each target element.


GLOBAL OPTIMIZER STATE

These parameters indicate the current state of the Global Optimizer and are visible in its dialog box.  These parameters are not modifiable by the user.

Parameter

Number of Stages-	The total number of Beam Elements defined in the channel.

Scanning Stage-	The Beam Element currently being scanned by the optimizer.

Optimize Stage-	Whether or not the current Beam Element is being optimized (see Optimizing a Beam Element).

Percent Complete-	The percentage of computation completed for the current Beam Element.


Global Optimizer; Specifying a Search Region
GLOBAL OPTIMIZER:

SPECIFYING A SEARCH REGION

The Global Optimizer requires that a region of parameter space be specified as the search region.  Since the Global Optimizer compares cost functional value for many beam envelope trajectories, a region in state space must be specified as well as an interval for the Element Amplitudes.  The number of samples must be specified in each case as well.

Specifying the Region

All the regions are specified in the Beam Element's OPTIMIZATION PROFILE dialog box.  These dialog boxes are accessible in the OPTIMIZATION CONFIGURATION dialog box. It contains a list box labeled OPTIMIZATION PROFILES.  Either double click the desired element or select it and press the EDIT button.

(The OPTIMIZATION CONFIGURATION dialog box is accessible throught the OPT CONFIG button in the SPOT main Window or through the EDIT|OPTIMIZATION CONFIGURATION menu command.)

Element Amplitudes

The CONTROL CONSTRAINT SPACE interval must be set to the desired search interval in the Beam Element's OPTIMIZATION PROFILE dialog box.  You must also specify the number of samples to be taken during optimization.  A Fibonacci search is used to determine the minimumizing value.

State Space

You must specify a search interval for each dimension of state space (X,X',Y,Y') in the FEASIBLE STATE SPACE section of the OPTIMIZATION PROFILE dialog box.  Thus, a rectangular region is specified in four dimensional state space.  You must also specify the number of samples to be taken in each dimension.  The samples are distributed uniformly along the intervals.

(For an axisymetric system only the X and X' values are used.)

You must set these intervals for every Beam Element.!

A Note on the Number Of Samples

The Global Optimizer constructs functions on the specified state space.  These functions are obtained by interpolation between the sample points.  Therefore, if the number of samples is not  great enough to represent these functions accurately the optimization will fail (usually the beam envelope trajectory will wonder out of the specified state space).  On the other hand, the total number of sample (hence computations) is the product of the samples in each dimension.  Thus, the value increases rapidly.  This fact  is the usual cause for making dynamic programming impractical.

Also, these samples are store in memory.  Make sure your machine has enough core memory to support this optimization.


GLOBAL OPTIMIZER:

OPERATIONAL PARAMETERS

These parameters are accessible on the Global Optimizer's dialog box itself.  They are necessary to control the operation of the Global Optimizer first hand.

Local Optimizer Settings

Axisymmetric-	Push this radio button if you have an axisymmetric system.

Elliptic Symmetry-	Push this radio button if you have two planes of symmetry.

Beep on Stop-	Check this box if you want the optimizer to beep when it stops.

Optimize Buttons

Run-	Starts the optimizer.

Stop-	Stops the optimizer while it is running.  This feature will not work with Windows 3.1.  It should work with a pre-emptive multitasking operating system, such as OS/2, Windows NT, or Windows 95.

Reset-	Resets the stage counter.  Does not change the current state of the system or optimizer!

Re-Initialize-	Reinitializes the optimizer.  This is necessary if you have made any changes to the channel parameters or Element Amplitudes (see Modifying Parameters).

Done-	Terminates the optimizer.

Initial State Parameters

Once the optimizer is completed it is possible to change the beam envelope's initial state without re-optimizing the entire channel.  To do so enter the values of the initial state and press the RECOMPUTE button


GLOBAL OPTIMIZER:

NUMERICAL PARAMETERS

The Global optimizer contains no other parameters other than those in the Optimization Configuration dialog box (see Specifying the Search Region) and the Global Optimizer's dialog box itself (see Operational Parameters).


Plots
DATA PLOTS

Data plots are an important feature of SPOT.  They may be used to track the Local Optimizer's progress and guide it to desirable solutions.  It is also possible to view the progress of the Matched Beam Finder.  Therefore a section of the help system has been dedicated to describe in details the use of data plots.

Contents

Overview

Generating Plots

Solution Tracking

Limitations


Plots Overview
DATA PLOTS OVERVIEW

Data Sets

Plots may be made of the current solution data.  This includes the beam envelope trajectories, the reference trajectorys, and the control or element amplitude profiles.  Both the x and y plane data may be plotted together or separately.  You are allowed to open as many plots as you want as long as your system has the resources.  Since the beam envelope trajectories and the reference trajectories should be of the same magnitudes, you may plot the two sets on the same graph.

Plot Sizes

The plots are generated by VBX (Visual Basic Extension) controls on a dialog box.  Therefore it is not possible to change the size of the actual plots themselves, although it is possible to change the size of the window in which they are displayed.  Therefore I have offered three different sizes to choose from in the PLOT CONFIGURATION DIALOG BOX.  They are referred to as "Plot Style"s in this dialog box.

Plot Configuration

You may choose the data set and the plot size in the PLOT CONFIGURATION DIALOG BOX accessible through the EDIT menu or the PLOT CONFIG button in the main window.  Once the configuration is set, all plot opened thereafter will contain the specified data set and be of the specified size.


Generating Plots
GENERATING DATA PLOTS

Data Set and Plot Size Selection

Select a data set and plot size using the PLOT CONFIGURATION DIALOG BOX which is accesible through the PLOT CONFIG button on the main window or through the EDIT|PLOT CONFIGURATION menu command.  Once the configuration is set, all plots opened thereafter will contain the specified data set .  In order to plot a different data set you must change the plot configuration then open the new plot.

Number of Data Points

You may change the number of data points by selecting the DATA POINTS DIALOG BOX accessible through the EDIT|SOLUTION POINTS menu command (the default value is 100).  The data points are then distributed uniformly along the transport channel.  All currently opened plots should have the same number of data points!

IMPORTANT NOTE:

The VBX plots seem to have a maximum number of data points they are capable of displaying (it is not documented).  This value seems to be around 150.  If your plot displays but contains no data curves this is probably the cause.  Decrease the number of points until the plot functions normally.

Opening a Plot

Once the configuration and number of data points are determined, open the plot by selecting the SOLUTION DATA PLOT option in the VIEW |SOLUTION DATA PLOT menu command.  Note that a simulation must have been run before this selection is enabled.


Plots: Solution Tracking
SOLUTION TRACKING

It is possible to track the progress of the Local Optimizer or the Matched Beam Finder in a plot window.  This is an important feature for the Local Optimizeropt.contents since it allows the designer to actively participate in the optimization.  If the optimizer starts to move in an undesirable direction it may be stopped.  The Numerical Parameters or the Element Amplitudes may then be adjusted to push the optimizer in a more desirable direction.

Local Optimizer

In the LOCAL OPTIMIZER DIALOG BOX mark the check box TRACK SOLUTION EVERY N STEPS and fill in a value for N.  While the optimizer is running it will update the data in any opened plot window to show the solution at the Nth iteration.  This way the progress of the optimizer may be monitored.

Matched Beam Finder

In the MATCHED BEAM FINDER DIALOG BOX mark the check box TRACK SOLUTION EVERY N STEPS and fill in a value for N.  While the matcher is running it will update the data in any opened plot window to show the solution at the Nth iteration.


Plotting Limitations
DATA PLOT LIMITATIONS

Explanation

Originally I planned to use some graphics software that I had previously developed.  I used the ObjectWindows 1.0 library to develop them.  ObjectWindows 2.0 came out shortly thereafter and my code was no longer compatible.  Rather than convert my graphics code to run under the newer ObjectWindows 2.0, I figured I could save time using the VBX controls, which were already cooked.  However, they did not seem to be cooked enough and I spent a substantial amount of time incorporating them into SPOT. In a future of SPOT I plan to use a graphics systems more suitable to the needs of SPOT.

Printing the data in the VBX controls is not straight forward.  Otherwise print features would be easily implemented in SPOT.