1 | /* Class DelayLine
|
---|
2 | *
|
---|
3 | * This class contains the constructor to create an instance of
|
---|
4 | * a dead time delay, independently of any of the existing BlackBox
|
---|
5 | * subclasses or of the BlackBox superclass in which a dead time
|
---|
6 | * may be set, and the methods needed to use this delay in
|
---|
7 | * control loops in the time domain, Laplace transform s domain
|
---|
8 | * or the z-transform z domain.
|
---|
9 | *
|
---|
10 | * s-domain transfer function = exp(-Td.s)
|
---|
11 | * Td is the delay time.
|
---|
12 | * 1 to 4 order Pade approximations available
|
---|
13 | *
|
---|
14 | * This class is a subclass of the superclass BlackBox.
|
---|
15 | *
|
---|
16 | * Author: Michael Thomas Flanagan.
|
---|
17 | *
|
---|
18 | * Created: August 2002.
|
---|
19 | * Revised: 21 April 2003, 3 May 2005, 2 July 2006, 6 April 2008, 7 November 2009
|
---|
20 | *
|
---|
21 | *
|
---|
22 | * DOCUMENTATION:
|
---|
23 | * See Michael T Flanagan's JAVA library on-line web page:
|
---|
24 | * http://www.ee.ucl.ac.uk/~mflanaga/java/DelayLine.html
|
---|
25 | * http://www.ee.ucl.ac.uk/~mflanaga/java/
|
---|
26 | *
|
---|
27 | * Copyright (c) 2002 - 2009 Michael Thomas Flanagan
|
---|
28 | *
|
---|
29 | * PERMISSION TO COPY:
|
---|
30 | * Permission to use, copy and modify this software and its documentation for
|
---|
31 | * NON-COMMERCIAL purposes is granted, without fee, provided that an acknowledgement
|
---|
32 | * to the author, Michael Thomas Flanagan at www.ee.ac.uk/~mflanaga, appears in all copies.
|
---|
33 | *
|
---|
34 | * Dr Michael Thomas Flanagan makes no representations about the suitability
|
---|
35 | * or fitness of the software for any or for a particular purpose.
|
---|
36 | * Michael Thomas Flanagan shall not be liable for any damages suffered
|
---|
37 | * as a result of using, modifying or distributing this software or its derivatives.
|
---|
38 | *
|
---|
39 | ***************************************************************************************/
|
---|
40 |
|
---|
41 |
|
---|
42 |
|
---|
43 | package agents.anac.y2015.agentBuyogV2.flanagan.control;
|
---|
44 |
|
---|
45 | import agents.anac.y2015.agentBuyogV2.flanagan.complex.Complex;
|
---|
46 |
|
---|
47 | public class DelayLine extends BlackBox{
|
---|
48 |
|
---|
49 | // Constructor
|
---|
50 | public DelayLine(double delayTime, int orderPade){
|
---|
51 | super("DelayLine");
|
---|
52 | super.setDeadTime(delayTime, orderPade);
|
---|
53 | }
|
---|
54 |
|
---|
55 | // Constructor
|
---|
56 | // Default Pade approximation order = 2
|
---|
57 | public DelayLine(double delayTime){
|
---|
58 | super("DelayLine");
|
---|
59 | super.fixedName="DelayLine";
|
---|
60 | super.setDeadTime(delayTime);
|
---|
61 | }
|
---|
62 |
|
---|
63 | // Constructor
|
---|
64 | // for deep copy purposes
|
---|
65 | private DelayLine(){
|
---|
66 | super("DelayLine");
|
---|
67 | }
|
---|
68 |
|
---|
69 | // Set the delay time
|
---|
70 | public void setDelayTime(double delayTime){
|
---|
71 | super.setDeadTime(delayTime);
|
---|
72 | }
|
---|
73 |
|
---|
74 | // Set the delay time and the Pade approximation order
|
---|
75 | public void setDelayTime(double delayTime, int orderPade){
|
---|
76 | super.setDeadTime(delayTime, orderPade);
|
---|
77 | }
|
---|
78 |
|
---|
79 | // Get the delay time
|
---|
80 | public double getDelayTime(){
|
---|
81 | return super.deadTime;
|
---|
82 | }
|
---|
83 |
|
---|
84 | // Deep copy
|
---|
85 | public DelayLine copy(){
|
---|
86 | if(this==null){
|
---|
87 | return null;
|
---|
88 | }
|
---|
89 | else{
|
---|
90 | DelayLine bb = new DelayLine();
|
---|
91 | this.copyBBvariables(bb);
|
---|
92 |
|
---|
93 | return bb;
|
---|
94 | }
|
---|
95 | }
|
---|
96 |
|
---|
97 | // Clone - overrides Java.Object method clone
|
---|
98 | public Object clone(){
|
---|
99 | return (Object)this.copy();
|
---|
100 | }
|
---|
101 | } |
---|