public class TelescopeError extends Object implements Multidimensional
Multidimensional interface that returns a
measure of the goodness-of-leveling of the PID.| Modifier and Type | Class and Description |
|---|---|
static class |
TelescopeError.Parse
A command-line frontend to the sine-error class.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
ABSOLUTESUM
The indicator for absoulte error-sum quality measure.
|
private double[] |
amplitude
The coefficients of the input function, amplitude.
|
private double |
deadtime
The deadtime until the system starts reacting, in seconds.
|
private double |
diameter
The diameter of the guiding telescope in meters.
|
private double |
expose
The exposure time on the guiding unit in sec.
|
private static double |
IMPOSSIBLE
If the PID returns a correction higher then this, we cannot follow.
|
private double |
jerk
The jerk of the axis, in deg/s^3
|
private static double[] |
motion
For optimizing runs, we use the same random image motion.
|
private double |
noise
The coefficient for thw gaussian noise.
|
private static double |
OVERREACT
If the PID starts to oscilate, the correction will be higher as.
|
private double[] |
period
The coefficients of the input function, period.
|
private double[] |
phase
The coefficients of the input function, phase.
|
private PIDControl |
pid
The PIDController handling the error function.
|
private double |
pidfreq
The frequency at which the PID is queried.
|
private boolean |
pionly
If true, only optimize PI parameters, keep D fixed.
|
private int |
qualitymeasure
The quality measure, 0-3.
|
private static int |
RESOLUTION
The number of steps skipped for error determination.
|
private double |
seeing
The seeing in arc-sec, if seeing should be included.
|
static int |
SQUARESUM
The indicator for error square-sum quality measure.
|
static int |
TABSOLUTESUM
The indicator for absolute error times t sum quality measure.
|
private static double |
TINY
A small number to prevent division-by-zero in oscillating test.
|
static int |
TSQUARESUM
The indicator for error squared times t sum quality measure.
|
private Random |
white
The random number generator.
|
private double |
wind
The wind speed, only if seeing > 0.
|
| Constructor and Description |
|---|
TelescopeError(double[] a,
double[] p,
double[] phi)
Constructs a new sine error function specifiying the coefficients
of the error function.
|
TelescopeError(double[] a,
double[] p,
double[] phi,
double random)
Constructs a new sine error function specifiying the coefficients
of the error function.
|
| Modifier and Type | Method and Description |
|---|---|
int |
dimension()
Return three for the three PID parameters.
|
double |
evaluateWithNan(VectorG pidvals)
Evaluate the PID.
|
double |
getErrorFunction(double t)
Calculates the error function at the given time.
|
double |
getMaximumPeriod()
Returns the period of the error function after which it repeats itself.
|
double |
runPID(PrintWriter out)
Runs an entire loop using the specified PID and the underlying
error function.
|
void |
setAxisJerk(double newjerk)
Sets the jerk of the motor axis in degs/s^3.
|
void |
setDelay(double newdeadtime)
Sets the deadtime time.
|
void |
setGuiderExpose(double newexpose)
Sets the guider exposure time.
|
void |
setPID(PIDControl handle)
Sets the PIDControler that should level the error function.
|
void |
setPIDFrequency(double f)
Sets the PID frequency.
|
void |
setPIOnly(boolean onlypi)
Sets the desired optimization strategy.
|
void |
setQualityMeasure(int newqual)
Sets the quality measurement.
|
void |
setSeeing(double newseeing)
Sets the seeing level.
|
void |
setTelescopeSize(double newsize)
Sets the size of the guider telescope.
|
void |
setWindSpeed(double newwind)
Sets the wind speed.
|
public static final int SQUARESUM
public static final int ABSOLUTESUM
public static final int TSQUARESUM
public static final int TABSOLUTESUM
private double[] amplitude
private double[] period
private double[] phase
private double noise
private Random white
private PIDControl pid
private double pidfreq
private double deadtime
private double jerk
private double seeing
private double wind
private double diameter
private double expose
private static double[] motion
private int qualitymeasure
private boolean pionly
private static final int RESOLUTION
private static final double OVERREACT
private static final double IMPOSSIBLE
private static final double TINY
public TelescopeError(double[] a,
double[] p,
double[] phi)
public TelescopeError(double[] a,
double[] p,
double[] phi,
double random)
public void setPID(PIDControl handle)
public void setPIDFrequency(double f)
public void setQualityMeasure(int newqual)
#RESPONSE.public void setDelay(double newdeadtime)
public void setAxisJerk(double newjerk)
public void setPIOnly(boolean onlypi)
public void setSeeing(double newseeing)
public void setWindSpeed(double newwind)
public void setGuiderExpose(double newexpose)
public void setTelescopeSize(double newsize)
public double getErrorFunction(double t)
f = Σiaiċsin(2πfi*t+φi
If additional white-nois of the error-function (not seeing!) is
requested, it is added to the error function right here.public double getMaximumPeriod()
public double runPID(PrintWriter out)
#getTimeStep until we reach t >= 1.#addError.#getCorrection and feed the difference of the error function
and the correction into the PID as the new error.public int dimension()
dimension in interface Multidimensionalpublic double evaluateWithNan(VectorG pidvals)
evaluateWithNan in interface Multidimensional