ShapeDesign Tutorial

Overview

ShapeDesign is a tool for the interactive design of of ASDEX Upgrade's plasma separatrix shape.
The main features are :


Getting Started

Preparations

To run ShapeDesign you must make sure that the program is found on your system's search path. Currently ShapeDesign is located in the directory

/afs/ipp/home/w/wot/matlab_exe/bin/ShapeDesign.

To start the program either

Note: in the future the program will be transferred to a more common location (e.g. /usr/ads/bin) which is already on the search path of most AUG users !


Starting ShapeDesign

On the command line type ShapeDesign.
This opens the ShapeDesign window where you can interactively enter your requirements and assess the predicted results.

After startup an initial operation point and the corresponding shape is displayed. The plasma current center coordinates Rsquad and Zsquad are chosen as a controlled equilibrium variables and coil currents IV2o and IV2u are adjusted accordingly.


Layout

Before proceeding to the design process you should first become familiar with the ShapeDesign operation controls and their use. The ShapeDesign operation controls consist of a display divided in three sections and a menu bar.

To edit a table value

For more details you should read the Operation controls chapter and you may also learn intuitively clicking on several items and watching what happens.


Quick design guide

Designing a shape is a procedure in a loop of steps. Just a quick overview is provided here. For a detailed description read chapter Shape design procedure.


Operation Controls

The ShapeDesign operation controls consist of a display divided in three sections and a menu bar.


Section equilibrium

The equilibrium section is the main input area of ShapeDesign and provides also textual output of results.

It is structured in two areas with two subsections each:

Input area state

The state area consists of one table. It shows plasma current Ipl and category FPKat.

You can scale the results to a different plasma current and select an alternate category for the prediction.

Input area target

The target area consists of tables fixed and controlled. Here all input parameters for the prediction are listed.

Table fixed

Table fixed comprises the PF coil currents and confinement parameters whose values are fixed by user's choice. "Fixed" input means fixed by user's choice are not used to adjust the controlled equilibrium variables.

Table controlled

Table controlled comprises the controlled equilibrium parameters. These are just parameters you want to freeze at fixed values during your design. They need not necessarily be identical with the feedback control parameters in the experiment.

You may change the selection of adjusted coil currents by left clicking on any entry in the first column of table controlled or table adjusted. Alternatively you can choose the select control variables item in the design tools menu.

Input area result

The result area consists of tables adjusted and floating. Predicted output values are listed here.

Table adjusted

Table adjusted comprises the predicted PF coil currents required to fix the controlled equilibrium parameters to the specified values. The number of adjusted coil currents is always equal to the number of controlled parameters.

You may change the selection of adjusted coil currents by left clicking on any entry in the first column of table adjusted or table controlled. Alternatively you can choose the select control variables item in the design tools menu.

Table floating

Table floating comprises a selection of predicted equilibrium parameters which vary as a result of the input specifications.

You may change the selection of displayed parameters by left clicking on the table head floating or by choosing the select result variables item in the design tools menu.

Input area info

The info area consists of one table. Helpful information about the prediction process is shown.


Section force limit

The force limit section consists of three graphs visualising the characteristic curves of the force limits of the OH and OH2 coils as well as the V1 and V2 coils. Input fields are provided to adjust safety margins from the force limits. In the graph you see the original limits as dotted lines. The actual limits including safety margins are drawn as solid lines.

Besides the characteristic curves of the limits two points are marked in the graphs:

If a boundary should be violated the corresponding graph is colored in red (upper limit) or blue (lower limit).

Note A: although the force limit for the OH2s coil has been eliminated still an net current limit exists which is shown in the middle graph. Yet, since this is not a force limit no safety margin can be specified.

Note B: force limits for the V1-V2 upper/lower balance in the bottom graph are valid only in a certain window of the OH current. If the current IOH is outside the window the characteristic force limit curves are drawn as dashed lines.


Section shape view

The shape view section visualises the separatrix shapes input to and predicted by ShapeDesign. In fact it is an embedded version of the ShapeView program. ShapeView is a powerful means to display and even animate plasma shape parameters which can also be run in standalone mode.

ShapeDesign uses layers to display the various shapes of the reference shot (ref), the operation point (op) and the current design (lin). Different colors are used to distiguish the layers and a legend at the bottom of the shape view area helps to identify them.

Control of the shape view display is normally automatically done by ShapeDesign. For advanced users, however, who want to use the powerful capabilities of ShapeView like zooming, layer coloring, comparison with other shots, viewing additional timetraces or profiles, etc. all ShapeView commands are available in the shape view menu. Refer to the ShapeView documentation for details.


Menu Bar

Via the menu bar you have access to various tools which assist the design process or customise the setup.

Menu reference shot

The reference shot menu helps you to select an appropriate operation point originating from measured data of a discharge. The menu comprises two items. With the

Item load reference shot

Selecting the load reference shot item will open an input dialog where you can enter shot number, diagnostics, experiment and a time window of the parameters to load.

After loading you can navigate through the reference shot to locate the equilibrium that shall define the operation point. In the shape view section the separatrix shape of the reference shot is shown in the ref layer and you can quickly scan the time history with the navigation tools. Concurrently for a better overview timetraces of a number of signals are displayed in a separate window. You can use also the timetrace marker for navigation.

Item select operation point

After you found the time point in the reference shot which shall be used as an operation point you must activate this point choosing the select operation point item.

The operation point in each section equilibrium force limit and shape view will be updated and the target deviations of the controlled variables are set to zero.

In the shape view section the reference shot layer ref separatrix is now hidden by the operation point layer op. To select another reference point from the same shot you may either


Menu design tools

The design tools menu offers a number of useful tools for the design process.

Item select control variables

Item select control variables opens a dialog where you can select the controlled variables and the actuating coils which are adjusted to meet the control goal.

Alternatively you may also left click on any entry in the first column of table controlled or table adjusted.

Item select result variables

Item select result variables opens a dialog where you can select the result variables which are to be displayed in table floating.

Alternatively you may also left click on any entry in the first column of table floating.

Item reset target

reset target sets the deviation of all target variables to zero. In other words you return to the operation point values.

Item IPSLx and ICoIx = 0

If you assume a stationary equilibrium all induced currents in passive loops and all control coil currents should fade to zero. The IPSLx and ICoIx = 0 item provides a shortcut to establish this condition.

Item show limits

Item show limits augments the tables in the target and result areas of the equilibrium section by two colums for upper and lower limits. Limits for PF coil currents and for some equilibrium parameters are predefined by default. Limits for other variables which you can recognize at the Inf values.

You can now edit these limits by entering new values in the respective fields.

In the linear prediction method these limits do not influence the result. You may also enter values of target variables exceeding the limits. However, if a limit is violated the corresponding variable and its value are highlighted and colored in red or blue as a warning indicator.

To hide the limits again simply uncheck the show limits item. The limits nevertheless remain active and any violation will still be signalled.

Item show gains

The show gains item serves to obtain a table of linearised gains around the operation point. These gains in combination with the target deviations from the operation point are used for prediction.

Item equil solver

With equil solver you can invoke the Garching Equilibrium Code equilibrium solver with the settings of ShapeDesign.

In the standalone version of ShapeDesign this feature is currently not available !


Menu setup

The default settings of ShapeDesign parameters such as PCC coefficients, power supply properties, etc. are derived from the most actual parameters available. In some cases you might want to use another than the default parameter set. This service is offered by the setup menu and its submenus.

In the setup menu you can also change the operation point source and the prediction method.

Submenu operation point

If you selected an operation point derived from a reference shot you the operation point values of the equilibrium variables are taken by default from the diagnostic you specified when loading the shot (in general FPG). You may then also decide to use the operation point calculated by the nonlinear quadratic PCC model which is also the basis for prediction.

To change the operation point select the desired operation point source in the operation point submenu. While the new operation point then replaces the old all actual target values are maintained and the respective deviations recalculated.

If your initial operation point was already deduced from PCC calculations you do not have the choice to select an alternative source.

Submenu prediction method

Submenu PCC-version

The PCC-version submenu shows the PCC versions available in the database and checkmarks the version in use. This is always the most current version.

Note: In the present version of ShapeDesign you can not change the PCC version !

Submenu PowerSupply

The PowerSupply setup defines the available active coils and the coil current limits. These limits are derived from the intrinsic coil limits and the convertor limits and also include coil polarity.

If the default selection does not fit your requirements you may select one of the other predefined settings in this menu. For exploratory purposes you can alternatively change the limits manually using the show limits item in the design tools menu.

Changing the settings will take immediate effect.

Submenu ForceLimit

The ForceLimit setup defines the parameters for the calculation of the suspension force limits of the OH2u, OH2o and V1 and V2 coils.

You should use always the latest parameter set which is the default. Earlier parameter sets are provided in the submenu for your convenience if you wish to cross-check with older designs.

Changing the settings will take immediate effect.


Menu shape view

The shape view menu contains all menus of the embedded ShapeView program as submenus. Please refer to the ShapeView documentation for details.


Menu print

The print menu offers a simple interface for color and black&white printing. Select the desired submenu and enter the appropriate printer name in the dialog which opens. This printer name will be remembered for the next printout. After you have confirmed the settings pressing the ok button the printout is started.

Note: In the File menu there is another Print item. In the standalone version (without running MATLAB) this starts a black&white printout on your standard printer lp.


Menu info

In the info menu you can lookup the current version information and find a link to the online documentation you are reading just now.


Input Dialogs

Select controlled equilibrium parameters

If you select item select control variables in the design tools menu or left click on any entry in the first column of table controlled or table adjusted a dialog is opened where you can select the controlled variables and the actuating coils which are adjusted to meet the control goal. This dialog has the title hierarchical selector and is made up of two times two columns.

Actuator selection

In the first two columns you select the actuators to control the equilibrium parameters. The left column contains all active coils from which you can choose. The display is folded, i.e. initially you see only the topics :

Clicking on a topic expands it and shows the related coil current names prepended with an ellipsis (...). To hide the coil currents click on the topic again.

In the left column you can now select a coil current for control by double-clicking on it. It will then appear in the right column. However, double-clicking on a coil current which is already present in the right column will remove it from the selection !

The right column holds the coil current names comprising the set of actuators selected for control. In addition to the above method you can also edit the contents of this column manually. Each actuator must appear in a new line. Empty lines do not matter.

Controlled equilibrium parameter (feedback) selection

The second pair of columns is dedicated to the selection of controlled equilibrium parameters, shortly called feedbacks. The selection method is the same as for the actuators.

Equilibrium parameters recommended for control are organised in a number of topics. However, not all available parameters have been included. If you need to control such an exotic parameter you can still insert it manually into the right column of selected feedbacks.

Activating the selection

Make sure that you have selected an equal number of actuators and feedbacks and then press the ok button to activate your selection. The dialog is closed and the ShapeDesign tables are reorganised while all target values are conserved. Before you proceed modifying the actual shape you should first check the condition number in table info and consider to revise your selection choice if this number is too high.

To leave the dialog without changing the current selection press the close button.


Select displayed floating equilibrium parameters

If you select item select result variables in the design tools menu or left click on any entry in the first column of table floating a dialog is opened where you can select the result variables which are to be displayed in table floating.

You see the list of all floating equilibrium parameters where the currently selected parameters are highlighted. control-click on a parameter name

To activate the new selection press the Ok button or press Cancel to leave the dialog without changing the current selection.


Shape Design Procedure

The shape design procedure is the result of several aspects like the definition of the shape model and physical/technical boundary conditions which should be obeyed. These aspects are listed in the following.

Shaping the plasma separatrix in general is not an end in itself but serves superordinate purposes such establishing generic separatrix configurations (limiter, single and double null), confinement optimisation or positioning relative to diagnostic facilities. For the design process you must formulate your goal in terms of equilibrium parameters describing plasma shape numerically.

While many equilibrium parameters related to plasma shape exist there are only few inputs through which this shape can be actively modified. These inputs are referred to as actuators.

You can use a number of actuators to fix an equal number of equilibrium parameters to definable values. ShapeDesign then estimates the required actuator values for you. In ShapeDesign terminology fixed equilibrium parameters are controlled whereas the corresponding actuators are adjusted. The remaining actuators are fixed, i.e. they are set to constant levels. The values of equilibrium parameters which are not fixed by user's choice are floating and depend on the settings made before.

It follows from the previous that your design goal or target is defined by the values of fixed actuators and controlled equilibrium parameters. Values of adjusted actuators and floating equilibrium parameters on the other hand are results of the prediction.

Unfortunately actuator values are bound to technical limits. For shape design these limits are mostly coil current limits of actuating coils emerging from thermal loads due to resistive power losses and from power supply limits. Solutions violating these limits are not realisable since the machine protection system will clip actuator values to their permitted ranges or even will initiate a discharge shutdown. Likewise there may also be limits in equilibrium parameters you would not like to exceed. A typical example is the magnetic stability factor IVSF: a value above one indicates intrinsic positional instability possibly ending in a disruption. For experienced users ShapeDesign allows to customise the limits.

To aid the design process ShapeDesign warns you upon violation of a limit. However, it does not prevent you to violate it. Also it is up to the user to decide the next step when a limit is violated.

Summarising all aspects the shape design procedure is an optimisation process with bounded inputs and bounded outputs. In the present state of ShapeDesign you have to perform the iterations of this process manually. An automated operation mode is under development.

It is always a good idea to start the optimisaton loop with an initially valid configuration. This initial configuration is referred to as the operation point. ShapeDesign uses the operation point also as a starting point for the default prediction method linear interpolation. In most cases this fast method is sufficiently accurate.

Keep in mind, however, that large deviations from the operation point may lead to invalid prediction results.

An initial configuration with minimum prediction error can be derived from a time slice of a reference shot. Therefore this should generally be the first design step.


Select an operation point from a reference shot

The operation point should naturally be as close as possible to the desired target specification to minimise prediction errors. This should also be the guideline for selecting an appropriate reference shot number and the time slice in it. In many cases you can rely on previously performed experiments with similar target or at least with similar configuration. This also applies to the plasma current used although ShapeDesign offers plasma current scaling!

After you decided for a reference shot you can load it into ShapeDesign and browse the time history for a suitable operation point with the load reference shot item in the reference shot menu and the controls in the shape view section. Especially as a junior designer you should restrict yourself to stationary phases when all transient currents in the PF coils and the confinement parameters have more or less settled. For this purpose you can use the shape view timetrace window which opens upon loading the reference shot.

Finally select a time slice defining your operation point with the select operation point item of the reference shot menu.

Occasionally you might encounter red or blue colored values in the fixed or adjusted tables when the new operation point is displayed although you have not yet entered any modifications. One simple reason might be that the power supply configuration used in the reference shot is not compatible with the one ShapeDesign currently is using. This applies especially for coil polarities. In this case you may try a more suitable power supply configuration using the setup submenu power supply.

You can now proceed with the specification of your design targets.


Set the design target configuration

The targets you are most familiar with might be the equilibrium parameters that define the desired shape. The available parameters correspond to the parameters of the FPG diagnostic. For the combination of equilibrium parameter you want to control, i.e. fix to a definable value, however you must select an equal number of actuators which are adjusted for the shaping.

Your design target may also claim that other equilibrium parameters stay within certain limits and that actuator limits should obey a safety margin from the provided ones.

Select controlled equilibrium parameters

Number and selection of controlled equilibrium parameters depends on the extent to which you want to prescribe the resulting shape. Along with the controlled parameters you have to specify the actuators which are adjusted to obtain the user-defined values of the controlled parameters.

You may change the current selection by left clicking on any entry in the first column of table adjusted or table controlled in the equilibrium area. Alternatively you can choose the select control variables item in the design tools menu.

As a default the plasma current center coordinates Rsquad and Zsquad are selected. This combination is most appropriate for you if you want to do the shaping "manually" by direct specification of the actuating PF-currents yourself. Just the very sensitive plasma center is fixed. The impact on other shape parameters is low. This setting is used also by many equilibrium solvers and it is frequently in operation in experiments during plasma current ramp-up and ramp-down phases.

In the big majority of applications, however, you will want ShapeDesign to compute actuator values for a set of given shape parameters. A very popular combination is Raus (outer plasma radius), Zsquad (vertical plasma current center) and the lower strike point coordinates Zgeri, Zgera. For your purposes you can augment this list with more parameters but note that the numerical condition for a solution deteriorates very quickly with the number of variables and that you should carefully select the appropriate adjusted actuators.

If you are not sure which parameters to take the ones used for online control in the reference shot. You obtain the parameter names from the AUG journal.

Note: The selection of control parameters and adjusted actuators you choose in the design process need not be identical to the selection in the online control. This has to be decided separately. Your selection of controlled parameters is purely virtual and only helps you to define your target requirements.

Hints for actuator selection

Prior to selecting the adjusted actuators for control you should also know about some pecularities of the actuators:

Hints for controlled equilibrium parameter selection

Of course you must also be careful in selecting appropriate equilibrium parameters for control. A general rule is to choose them as orthogonal to each other as your requirements allow. If you choose for parameters representing very similar properties, e.g. the plasma center radial position and the outer plasma radial position you will require very high actuator values to enforce conflictive target settings. Such high actuator values will not only hardly comply with the feasible limits they also tend to distort the overall shape and give rise to inaccurate prediction results.

A good indicator of orthogonality is the condition number which is displayed in table info. This number represents the numerical condition of the linearised controlled system and considers both, the set of actuators and the set of controlled variables. Every time you changed the active set of controlled equilibrium parameters and adjusted actuators you should check the condition number before you start to enter target modifications.

Pure orthogonality is represented by a value of one. Higher values indicating poorer numerical condition may result from actuators with similar effect, from coupled control variables or from poor dependency of controlled variables from an actuator.

If the condition number is much higher than - say - one hundred you should consider to revise the selection of adjusted actuators and controlled equilibrium parameters. In many cases it may help to abandon a controlled variable (and also an actuator). In the end of course its up to you to find a suitable tradeoff between good numerical condition and absolute target requirement compliance.


Set limits

Limits for actuators, especially PF coil currents and for some equilibrium parameters are supplied by default. You can inspect and change limits using the menu equilibrium, item show limits.

Force limits are displayed and edited separately in the force limit section.

In case of limit violation a red (upper limit violation) or blue (lower limit violation) color in the respective line give you a warning. The prediction, however, is not constrained by the limit. You should then adapt your targets until the violation disappears.

Using limits especially for equilibrium parameters helps you to ensure that also parameters which you do not want to control stay within predefined safe ranges.

Note: make all constrained parameters visible in table floating.

Another reason to change limits may be to introduce additional safety margins of the actuator values from the technical limits provided by the power supply setup.


Tune target values

Now as you have defined the target configuration you can start to modify the shape to migrate from the initial to the desired one. The technique to change a value is described in the layout chapter.

Every time you change a target value the predicted shape is computed and displayed Any limit violations are signalled as well. If you change a bundle of target values to define your design goal you may ignore the plasma shape and any violation indicators produced for the intermediate steps and assess only the result after the last adjustment.

Generally several iterations will be required where you revise your design targets until an optimal result matching your requirements and complying with the given limits is found. This optimisation loop may comprise one or more of the following actions for each iteration:


Finish

Congratulations !

You arrived at the goal and hopefully are content with the result and with the ShapeDesign tool. Before you finish you should printout the final state for documentation. To do this use the print menu.

For a refined printout you can first edit the text labels in the shape view display. Just right click on the text and choose the edit item of the appearing context menu to make it editable. Likewise you can change text fonts, line colors and line styles.

Note that there is another print entry in the File menu which is placed there by the software that compiled the program from the original MATLAB source. This print command is less powerful in that it does not offer the choice of the printer and the print mode.

At the end you have two choices:

Note that the author disclaims any liablity if you exceed your working hours and miss some important date or get trouble with your affiliates due to endless iterations in the ShapeDesign loop !

Bye, bye, see you again soon !


Last edited on January, 8th 2002, by Wolfgang Treutterer