source: src/main/java/agents/anac/y2015/agentBuyogV2/flanagan/circuits/ParallelPlateLine.java

Last change on this file was 127, checked in by Wouter Pasman, 6 years ago

#41 ROLL BACK of rev.126 . So this version is equal to rev. 125

File size: 14.6 KB
Line 
1/* Class ParallelPlateLine
2*
3* Models a parallel plate transmision line
4* This is a subclass of the superclass TransmissionLine
5*
6* WRITTEN BY: Dr Michael Thomas Flanagan
7*
8* DATE: July 2007
9* UPDATE: 7 April 2008
10*
11* DOCUMENTATION:
12* See Michael T Flanagan's Java library on-line web pages:
13* http://www.ee.ucl.ac.uk/~mflanaga/java/ParallelPlateLine.html
14* http://www.ee.ucl.ac.uk/~mflanaga/java/TransmissionLine.html
15* http://www.ee.ucl.ac.uk/~mflanaga/java/
16*
17* Copyright (c) 2007 - 2008 Michael Thomas Flanagan
18*
19* PERMISSION TO COPY:
20* Permission to use, copy and modify this software and its documentation for
21* NON-COMMERCIAL purposes is granted, without fee, provided that an acknowledgement
22* to the author, Michael Thomas Flanagan at www.ee.ucl.ac.uk/~mflanaga, appears in all copies.
23*
24* Dr Michael Thomas Flanagan makes no representations about the suitability
25* or fitness of the software for any or for a particular purpose.
26* Michael Thomas Flanagan shall not be liable for any damages suffered
27* as a result of using, modifying or distributing this software or its derivatives.
28*
29***************************************************************************************/
30
31package agents.anac.y2015.agentBuyogV2.flanagan.circuits;
32
33import agents.anac.y2015.agentBuyogV2.flanagan.complex.Complex;
34
35public class ParallelPlateLine extends TransmissionLine{
36
37 private double plateWidth = -1.0D; // plate width
38 private double plateSeparation = -1.0D; // plate separation - inner surface to inner surface
39 private boolean distancesSet = false; // = true when both plate width and separation entered
40
41 private double relativePermittivity = 1.0D; // relative electrical permittivity of the material between the conductors
42 private double relativePermeability = 1.0D; // relative magnetic permeability of the material between the conductors
43
44
45 // CONSTRUCTOR
46 // Default constructor
47 public ParallelPlateLine(){
48 super.title = "Parallel Plate Line";
49 }
50
51 // Constructor with user suppled title
52 public ParallelPlateLine(String title){
53 super.title = title;
54 }
55
56 // PLATE WIDTH
57 // Set plate width
58 public void setPlateWidth(double width){
59 if(width<=0.0D)throw new IllegalArgumentException("The plate width, " + width + ", must be greater than zero");
60 this.plateWidth = width;
61 if(this.plateSeparation!=-1.0)this.distancesSet = true;
62 if(this.distancesSet)this.calculateDistributedCapacitanceAndInductance();
63 }
64
65 // PLATE SEPARATION
66 // Set plate separation - inner surface to inner surface
67 public void setPlateSeparation(double separation){
68 if(separation<=0.0D)throw new IllegalArgumentException("The plate separation, " + separation + ", must be greater than zero");
69 this.plateSeparation = separation;
70 if(this.plateWidth!=-1.0)this.distancesSet = true;
71 if(this.distancesSet)this.calculateDistributedCapacitanceAndInductance();
72 }
73
74 // PERMITTIVITY
75 // Set relative electrical permittivity of the material between the conductors
76 public void setRelativePermittivity(double epsilonR){
77 this.relativePermittivity = epsilonR;
78 if(this.distancesSet)this.calculateDistributedCapacitanceAndInductance();
79 }
80
81 // PERMEABILTY
82 // Set relative magnetic permeability of the material between the conductors
83 public void setRelativePermeability(double muR){
84 this.relativePermeability = muR;
85 if(this.distancesSet)this.calculateDistributedCapacitanceAndInductance();
86 }
87
88 // CALCULATE DISTRIBUTED PARAMETERS
89 private void calculateDistributedCapacitanceAndInductance(){
90 super.distributedCapacitance = Impedance.parallelPlateCapacitance(1.0D, this.plateWidth, this.plateSeparation, this.relativePermittivity);
91 super.distributedInductance = Impedance.parallelPlateInductance(1.0D, this.plateWidth, this.plateSeparation, this.relativePermeability);
92 }
93
94
95 // DEEP COPY
96 public ParallelPlateLine copy(){
97
98 if(this==null){
99 return null;
100 }
101 else{
102 ParallelPlateLine tl = new ParallelPlateLine();
103
104 tl.plateWidth = this.plateWidth;
105 tl.plateSeparation = this.plateSeparation;
106 tl.distancesSet = this.distancesSet;
107 tl.relativePermittivity = this.relativePermittivity;
108 tl.relativePermeability = this.relativePermeability;
109
110 tl.title = this.title;
111 tl.distributedResistance = this.distributedResistance;
112 tl.distributedConductance = this.distributedConductance;
113 tl.distributedCapacitance = this.distributedCapacitance;
114 tl.distributedInductance = this.distributedInductance;
115
116 tl.distributedImpedance = this.distributedImpedance.copy();
117 tl.distributedAdmittance = this.distributedAdmittance.copy();
118 tl.loadImpedance = this.loadImpedance.copy();
119
120 tl.lineLength = this.lineLength;
121 tl.segmentLength = this.segmentLength;
122 tl.frequency = this.frequency;
123 tl.segmentLength = this.segmentLength;
124 tl.omega = this.omega;
125
126 tl.inputVoltage = this.inputVoltage.copy();
127 tl.inputCurrent = this.inputCurrent.copy();
128 tl.outputVoltage = this.outputVoltage.copy();
129 tl.outputCurrent = this.outputCurrent.copy();
130
131 tl.idealWavelength = this.idealWavelength;
132 tl.generalWavelength = this.generalWavelength;
133 tl.lowLossWavelength = this.lowLossWavelength;
134
135 tl.idealPhaseVelocity = this.idealPhaseVelocity;
136 tl.generalPhaseVelocity = this.generalPhaseVelocity;
137 tl.lowLossPhaseVelocity = this.lowLossPhaseVelocity;
138
139 tl.idealGroupVelocity = this.idealGroupVelocity;
140 tl.generalGroupVelocity = this.generalGroupVelocity;
141 tl.lowLossGroupVelocity = this.lowLossGroupVelocity;
142 tl.delta = this.delta;
143
144 tl.idealAttenuationConstant = this.idealAttenuationConstant;
145 tl.generalAttenuationConstant = this.generalAttenuationConstant;
146 tl.lowLossAttenuationConstant = this.lowLossAttenuationConstant;
147
148 tl.idealPhaseConstant = this.idealPhaseConstant;
149 tl.generalPhaseConstant = this.generalPhaseConstant;
150 tl.lowLossPhaseConstant = this.lowLossPhaseConstant;
151
152 tl.idealPropagationConstant = this.idealPropagationConstant.copy();
153 tl.loadImpedance = this.loadImpedance.copy();
154 tl.loadImpedance = this.loadImpedance.copy();
155 tl.loadImpedance = this.loadImpedance.copy();
156
157 tl.generalPropagationConstant = this.generalPropagationConstant.copy();
158 tl.lowLossPropagationConstant = this.lowLossPropagationConstant.copy();
159 tl.idealCharacteristicImpedance = this.idealCharacteristicImpedance.copy();
160 tl.idealRealCharacteristicImpedance = this.idealRealCharacteristicImpedance;
161
162 tl.generalCharacteristicImpedance = this.generalCharacteristicImpedance.copy();
163 tl.lowLossCharacteristicImpedance = this.lowLossCharacteristicImpedance.copy();
164 tl.idealInputImpedance = this.idealInputImpedance.copy();
165 tl.generalInputImpedance = this.generalInputImpedance.copy();
166 tl.lowLossInputImpedance = this.lowLossInputImpedance.copy();
167
168 tl.idealShortedLineImpedance = this.idealShortedLineImpedance.copy();
169 tl.generalShortedLineImpedance = this.generalShortedLineImpedance.copy();
170 tl.lowLossShortedLineImpedance = this.lowLossShortedLineImpedance.copy();
171
172 tl.idealOpenLineImpedance = this.idealOpenLineImpedance.copy();
173 tl.generalOpenLineImpedance = this.generalOpenLineImpedance.copy();
174 tl.lowLossOpenLineImpedance = this.lowLossOpenLineImpedance.copy();
175
176 tl.idealQuarterWaveLineImpedance = this.idealQuarterWaveLineImpedance.copy();
177 tl.generalQuarterWaveLineImpedance = this.generalQuarterWaveLineImpedance.copy();
178 tl.lowLossQuarterWaveLineImpedance = this.lowLossQuarterWaveLineImpedance.copy();
179
180 tl.idealHalfWaveLineImpedance = this.idealHalfWaveLineImpedance.copy();
181 tl.generalHalfWaveLineImpedance = this.generalHalfWaveLineImpedance.copy();
182 tl.lowLossHalfWaveLineImpedance = this.lowLossHalfWaveLineImpedance.copy();
183
184 tl.idealRefectionCoefficient = this.idealRefectionCoefficient.copy();
185 tl.generalRefectionCoefficient = this.generalRefectionCoefficient.copy();
186 tl.lowLossRefectionCoefficient = this.lowLossRefectionCoefficient.copy();
187
188 tl.idealStandingWaveRatio = this.idealStandingWaveRatio;
189 tl.generalStandingWaveRatio = this.generalStandingWaveRatio;
190 tl.lowLossStandingWaveRatio = this.lowLossStandingWaveRatio;
191
192 tl.idealABCDmatrix = this.idealABCDmatrix.copy();
193 tl.generalABCDmatrix = this.generalABCDmatrix.copy();
194 tl.lowLossABCDmatrix = this.lowLossABCDmatrix.copy();
195
196 tl.numberOfPoints = this.numberOfPoints;
197
198 return tl;
199 }
200 }
201
202
203 // Clone - overrides Java.Object method clone
204 public Object clone(){
205
206 Object ret = null;
207
208 if(this!=null){
209
210 ParallelPlateLine tl = new ParallelPlateLine();
211
212 tl.plateWidth = this.plateWidth;
213 tl.plateSeparation = this.plateSeparation;
214 tl.distancesSet = this.distancesSet;
215 tl.relativePermittivity = this.relativePermittivity;
216 tl.relativePermeability = this.relativePermeability;
217
218 tl.title = this.title;
219 tl.distributedResistance = this.distributedResistance;
220 tl.distributedConductance = this.distributedConductance;
221 tl.distributedCapacitance = this.distributedCapacitance;
222 tl.distributedInductance = this.distributedInductance;
223
224 tl.distributedImpedance = this.distributedImpedance.copy();
225 tl.distributedAdmittance = this.distributedAdmittance.copy();
226 tl.loadImpedance = this.loadImpedance.copy();
227
228 tl.lineLength = this.lineLength;
229 tl.segmentLength = this.segmentLength;
230 tl.frequency = this.frequency;
231 tl.segmentLength = this.segmentLength;
232 tl.omega = this.omega;
233
234 tl.inputVoltage = this.inputVoltage.copy();
235 tl.inputCurrent = this.inputCurrent.copy();
236 tl.outputVoltage = this.outputVoltage.copy();
237 tl.outputCurrent = this.outputCurrent.copy();
238
239 tl.idealWavelength = this.idealWavelength;
240 tl.generalWavelength = this.generalWavelength;
241 tl.lowLossWavelength = this.lowLossWavelength;
242
243 tl.idealPhaseVelocity = this.idealPhaseVelocity;
244 tl.generalPhaseVelocity = this.generalPhaseVelocity;
245 tl.lowLossPhaseVelocity = this.lowLossPhaseVelocity;
246
247 tl.idealGroupVelocity = this.idealGroupVelocity;
248 tl.generalGroupVelocity = this.generalGroupVelocity;
249 tl.lowLossGroupVelocity = this.lowLossGroupVelocity;
250 tl.delta = this.delta;
251
252 tl.idealAttenuationConstant = this.idealAttenuationConstant;
253 tl.generalAttenuationConstant = this.generalAttenuationConstant;
254 tl.lowLossAttenuationConstant = this.lowLossAttenuationConstant;
255
256 tl.idealPhaseConstant = this.idealPhaseConstant;
257 tl.generalPhaseConstant = this.generalPhaseConstant;
258 tl.lowLossPhaseConstant = this.lowLossPhaseConstant;
259
260 tl.idealPropagationConstant = this.idealPropagationConstant.copy();
261 tl.loadImpedance = this.loadImpedance.copy();
262 tl.loadImpedance = this.loadImpedance.copy();
263 tl.loadImpedance = this.loadImpedance.copy();
264
265 tl.generalPropagationConstant = this.generalPropagationConstant.copy();
266 tl.lowLossPropagationConstant = this.lowLossPropagationConstant.copy();
267 tl.idealCharacteristicImpedance = this.idealCharacteristicImpedance.copy();
268 tl.idealRealCharacteristicImpedance = this.idealRealCharacteristicImpedance;
269
270 tl.generalCharacteristicImpedance = this.generalCharacteristicImpedance.copy();
271 tl.lowLossCharacteristicImpedance = this.lowLossCharacteristicImpedance.copy();
272 tl.idealInputImpedance = this.idealInputImpedance.copy();
273 tl.generalInputImpedance = this.generalInputImpedance.copy();
274 tl.lowLossInputImpedance = this.lowLossInputImpedance.copy();
275
276 tl.idealShortedLineImpedance = this.idealShortedLineImpedance.copy();
277 tl.generalShortedLineImpedance = this.generalShortedLineImpedance.copy();
278 tl.lowLossShortedLineImpedance = this.lowLossShortedLineImpedance.copy();
279
280 tl.idealOpenLineImpedance = this.idealOpenLineImpedance.copy();
281 tl.generalOpenLineImpedance = this.generalOpenLineImpedance.copy();
282 tl.lowLossOpenLineImpedance = this.lowLossOpenLineImpedance.copy();
283
284 tl.idealQuarterWaveLineImpedance = this.idealQuarterWaveLineImpedance.copy();
285 tl.generalQuarterWaveLineImpedance = this.generalQuarterWaveLineImpedance.copy();
286 tl.lowLossQuarterWaveLineImpedance = this.lowLossQuarterWaveLineImpedance.copy();
287
288 tl.idealHalfWaveLineImpedance = this.idealHalfWaveLineImpedance.copy();
289 tl.generalHalfWaveLineImpedance = this.generalHalfWaveLineImpedance.copy();
290 tl.lowLossHalfWaveLineImpedance = this.lowLossHalfWaveLineImpedance.copy();
291
292 tl.idealRefectionCoefficient = this.idealRefectionCoefficient.copy();
293 tl.generalRefectionCoefficient = this.generalRefectionCoefficient.copy();
294 tl.lowLossRefectionCoefficient = this.lowLossRefectionCoefficient.copy();
295
296 tl.idealStandingWaveRatio = this.idealStandingWaveRatio;
297 tl.generalStandingWaveRatio = this.generalStandingWaveRatio;
298 tl.lowLossStandingWaveRatio = this.lowLossStandingWaveRatio;
299
300 tl.idealABCDmatrix = this.idealABCDmatrix.copy();
301 tl.generalABCDmatrix = this.generalABCDmatrix.copy();
302 tl.lowLossABCDmatrix = this.lowLossABCDmatrix.copy();
303
304 tl.numberOfPoints = this.numberOfPoints;
305
306 ret = (Object)tl;
307 }
308 return ret;
309 }
310}
Note: See TracBrowser for help on using the repository browser.