Difference between revisions of "LoadControl Custom Task"

From OSUPDOCS
Jump to navigation Jump to search
Line 63: Line 63:
=== Choosing Start Up Conditions ===
=== Choosing Start Up Conditions ===


To get started, a load control task needs an initial velocity and an initial stiffness <math>A_t</math> (which is required to calculate control error). Furthermore, reaction and contact forces in dynamic calculations take a while to settle into reasonable values (such as when loading at constant velocity). A load control task thus normally needs a <tt>startupTime</tt>, which is a time over which the rigid particles move at constant <tt>(initvelocity)</tt> without imposing any control. Once the start up time has passed, the load control begins using an initial <math>A_t</math> that can be determined one of two methods:
To get started, a load control task needs an initial velocity and an initial stiffness <math>A_t</math> (which is required to calculate control error). Furthermore, reaction and contact forces in dynamic calculations take a while to settle into reasonable values (such as when loading at constant velocity). A load control task thus normally needs a <tt>(inittime)</tt>, which is a time over which the rigid particles move at constant <tt>(initvelocity)</tt> without imposing any control. Once the start up time has passed, the load control begins using an initial <math>A_t</math> that can be determined one of two methods:


# If you do not want to (are not able to) calculate an initial <math>A_t</math>, specify a positive <tt>(inittime)</tt>. The initial <math>A_t</math> will be found by least squares slope for force <i>vs.</i> displacement up to <tt>(inittime)</tt>. Any provided <tt>(initAt)</tt> will be ignored. Note that this methgod cannot be used if <tt>(initvelocity)</tt> is zero.
# If you do not want to (are not able to) calculate an initial <math>A_t</math>, specify a positive <tt>(inittime)</tt>. The initial <math>A_t</math> will be found by least squares slope for force <i>vs.</i> displacement up to <tt>(inittime)</tt>. Any provided <tt>(initAt)</tt> will be ignored. Note that this methgod cannot be used if <tt>(initvelocity)</tt> is zero.
# Specified <math>A_t</math>: If you can calculate initial stiffness for the simulation, you can enter it in <tt>(initAt)</tt> parameter and then set <tt>(inittime)</tt> to minus the desired start up time. Once the time is passed, control will start with the provided <math>A_t</math>.
# Specified <math>A_t</math>: If you can calculate initial stiffness for the simulation, you can enter it in <tt>(initAt)</tt> parameter and then set <tt>(inittime)</tt> to minus the desired start up time. Once the time is passed, control will start with the provided <math>A_t</math>.


Finding <math>A_t</math> from slope of force vs. displacement requires that <tt>(inittime)</tt> be 10-20 multiples of <math>t_g</math> to have enough points to fit a line. The start up time must also be long enough that the calculation is not adversely affected by dynamic start-up artifacts. Even when specifying <math>A_t</math> with negative start up time, the time should be long enough to bypass dynamic start-up artifacts. If control is started too soon, those artifacts may lead to unstable results.
Finding <math>A_t</math> from slope of force <t>vs.</t> displacement requires that <tt>(inittime)</tt> be 10-20 multiples of <math>t_g</math> to have enough points to fit a line. The start up time must also be long enough that the calculation is not adversely affected by dynamic start-up artifacts. Even when specifying <math>A_t</math> with negative start up time, the time should be long enough to bypass dynamic start-up artifacts. If control is started too soon, those artifacts may lead to unstable results.


During control steps, the value of <math>A_t</math> is continually adjust to the current tangent modulus that is given by
During control steps, the value of <math>A_t</math> is continually adjusted to the current tangent modulus that is given by


&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<math>A_t = \frac{F_t - F_{t-1}}{v t_g}</math>
<math>A_t = \frac{F_t - F_{t-1}}{v t_g}</math>


If the velocity gets low (which is expect if control is seeking constant force), this calculation will become unreliable (the denominator will be too small). To avoid unreliable updates to <math>A_t</math>, this calculation can be limited to control steps for which velocity magnitude is greater than absolute value of input <tt>(minVelocity)</tt> (if no minimum input is provided, the default is to use 5% of <tt>(initVelocity)</tt>).
If the velocity gets too low (which is expect if control is seeking constant force), this calculation will become unreliable (the denominator will be too small). To avoid unreliable updates to <math>A_t</math>, this calculation can be limited to control steps for which velocity magnitude is greater than absolute value of input <tt>(minVelocity)</tt> (if no minimum input is provided, the default is to use 5% of <tt>(initVelocity)</tt>).


=== Choosing Smoothing Parameters ===
=== Choosing Smoothing Parameters ===


=== Choosing PID Gain Parameters ===
=== Choosing PID Gain Parameters ===

Revision as of 11:29, 24 January 2023

A custom task run a load control simulation based on calculations of contact or reaction forces.

Introduction

This CustomTask tries to achieve the load requested from a provided user defined function by adjusting the velocity of a block of rigid material points. The control is done using a non-linear PID control algorithm.[1]

Specifying the Force

A LoadControl custom task is based on a block of RigidBC or RigidContact particles. These particles are typically placed on the edge of the specimen. The following steps are used to setup all simulations with load control. First pick a direction as 1, 2, or 3 for x, y, or z direction. Load control is limited to be along grid axes. Next create rigid particles to apply the load:

  1. Define a RigidBC material to control velocity is the specified direction or define a RigidContact material. Do not use any setting functions in the rigid material definition.
  2. Place a block of those material points using that defined rigid material on the edge to be loaded.
  3. Include displacement of the defined rigid material in the global archive using dispx, dispy, or dispz for the chosen direction.
  4. When using RigidBC particles, include reaction force for the defined rigid material in the global archive using reactionx, reactiony, or reactionz for the chosen direction.
  5. When using RigidContact particles, include contact force for the defined rigid material in the global archive using contactx, contacty, or contactz for the chosen direction.
  6. Choose global archiving time to provide stable load control

Start the custom task and define the following force defining parameters

CustomTask LoadControl
Parameter direction,(loaddir)
Parameter material,(matID)
Parameter matname,(matname)
Parameter load,(loadfunction)

where

Non-Linear PID Control

The control loop starts by estimating the error in current displacement using

      [math]\displaystyle{ e = \frac{F - L(t)}{A_t} }[/math]

where [math]\displaystyle{ F }[/math] is the rigid material reaction or contact force in the global archive, [math]\displaystyle{ L(t) }[/math] is the desired load from the Load parameter function, and [math]\displaystyle{ A_t }[/math] is the tangent stiffness for rigid material force (in force units) per unit displacement (in displacement units). If [math]\displaystyle{ A_t }[/math] is constant, the control is a linear PID. But for many simulations, such as those with plasticity, damage, or non-linear elasticity, [math]\displaystyle{ A_t }[/math] will evolve during the simulation leading to non-linear PID. The PID algorithim changes the rigid material points velocity in the control direction to

      [math]\displaystyle{ v = \frac{1}{t_g}\left(K_pe + \frac{K_i}{t_g}\int_0^t e\thinspace d\tau + K_dt_g\frac{de}{dt}\right) }[/math]

where [math]\displaystyle{ K_p }[/math], [math]\displaystyle{ K_i }[/math], and [math]\displaystyle{ K_d }[/math] are dimensionless gain factors for proportional (P), integral (I), and derivative (D) errors and [math]\displaystyle{ t_g }[/math] is the simulation's global archiving time.

Selecting PID Control Parameters

Load control depends on global archiving time [math]\displaystyle{ t_g }[/math], [math]\displaystyle{ A_t }[/math] (and how it evolves), [math]\displaystyle{ K_p }[/math], [math]\displaystyle{ K_i }[/math], and [math]\displaystyle{ K_d }[/math]. In addition, reaction and contact forces on rigid materials are typically noisy meaning that some of the control variables will require smoothing for stable control. All relevant parameters are set with the following commands:

Parameter velocity,(initvelocity)
Parameter minVelocity,(minvelocity)
Parameter startupTime,(inittime)
Parameter At,(initAt)
Parameter smoothF,(smoothF)
Parameter smoothA,(smoothA)
Parameter smoothErr,(smoothErr)
Parameter Kp,(Kp)
Parameter Ki,(Ki)
Parameter Kd,(Kd)

Methods to choose these parameters are in the following sections.

Choosing Start Up Conditions

To get started, a load control task needs an initial velocity and an initial stiffness [math]\displaystyle{ A_t }[/math] (which is required to calculate control error). Furthermore, reaction and contact forces in dynamic calculations take a while to settle into reasonable values (such as when loading at constant velocity). A load control task thus normally needs a (inittime), which is a time over which the rigid particles move at constant (initvelocity) without imposing any control. Once the start up time has passed, the load control begins using an initial [math]\displaystyle{ A_t }[/math] that can be determined one of two methods:

  1. If you do not want to (are not able to) calculate an initial [math]\displaystyle{ A_t }[/math], specify a positive (inittime). The initial [math]\displaystyle{ A_t }[/math] will be found by least squares slope for force vs. displacement up to (inittime). Any provided (initAt) will be ignored. Note that this methgod cannot be used if (initvelocity) is zero.
  2. Specified [math]\displaystyle{ A_t }[/math]: If you can calculate initial stiffness for the simulation, you can enter it in (initAt) parameter and then set (inittime) to minus the desired start up time. Once the time is passed, control will start with the provided [math]\displaystyle{ A_t }[/math].

Finding [math]\displaystyle{ A_t }[/math] from slope of force <t>vs.</t> displacement requires that (inittime) be 10-20 multiples of [math]\displaystyle{ t_g }[/math] to have enough points to fit a line. The start up time must also be long enough that the calculation is not adversely affected by dynamic start-up artifacts. Even when specifying [math]\displaystyle{ A_t }[/math] with negative start up time, the time should be long enough to bypass dynamic start-up artifacts. If control is started too soon, those artifacts may lead to unstable results.

During control steps, the value of [math]\displaystyle{ A_t }[/math] is continually adjusted to the current tangent modulus that is given by

      [math]\displaystyle{ A_t = \frac{F_t - F_{t-1}}{v t_g} }[/math]

If the velocity gets too low (which is expect if control is seeking constant force), this calculation will become unreliable (the denominator will be too small). To avoid unreliable updates to [math]\displaystyle{ A_t }[/math], this calculation can be limited to control steps for which velocity magnitude is greater than absolute value of input (minVelocity) (if no minimum input is provided, the default is to use 5% of (initVelocity)).

Choosing Smoothing Parameters

Choosing PID Gain Parameters

Task Scheduling

In scripted files, a LoadControl custom task is scheduled with the following block:

CustomTask LoadControl
Parameter Load,(function)
... all remaining parameters with similar command

In XML files, these task options are scheduled using a <Schedule> element, which must be within the single <CustomTasks> block:

<Schedule name='LoadControl'>
   <Parameter name='Load'>(function)</Parameter>
   ... all remaining parameters with similar elements
</Schedule>


References