public void setGainsByPolePlacement(double w0, double zeta) { x.setGainsByPolePlacement(w0, zeta); y.setGainsByPolePlacement(w0, zeta); }
public void setGainsByPolePlacement(double w0, double zeta) { x.setGainsByPolePlacement(w0, zeta); y.setGainsByPolePlacement(w0, zeta); }
public AccelerationLimitedYoVariable(String name, YoVariableRegistry registry, DoubleYoVariable maxRate, DoubleYoVariable maxAcceleration, DoubleYoVariable inputVariable, double dt) { super(name, registry); if (maxRate != null && maxAcceleration != null) { this.maximumRate = maxRate; this.maximumAcceleration = maxAcceleration; } this.dt = dt; hasBeenInitialized = new BooleanYoVariable(name + "HasBeenInitialized", registry); smoothedRate = new DoubleYoVariable(name + "SmoothedRate", registry); smoothedAcceleration = new DoubleYoVariable(name + "SmoothedAcceleration", registry); positionGain = new DoubleYoVariable(name + "PositionGain", registry); velocityGain = new DoubleYoVariable(name + "VelocityGain", registry); double w0 = 2.0 * Math.PI * 16.0; double zeta = 1.0; setGainsByPolePlacement(w0, zeta); hasBeenInitialized.set(false); this.inputVariable = inputVariable; }
public AccelerationLimitedYoVariable(String name, YoVariableRegistry registry, YoDouble maxRate, YoDouble maxAcceleration, YoDouble inputVariable, double dt) { super(name, registry); if (maxRate != null && maxAcceleration != null) { this.maximumRate = maxRate; this.maximumAcceleration = maxAcceleration; } this.dt = dt; hasBeenInitialized = new YoBoolean(name + "HasBeenInitialized", registry); smoothedRate = new YoDouble(name + "SmoothedRate", registry); smoothedAcceleration = new YoDouble(name + "SmoothedAcceleration", registry); positionGain = new YoDouble(name + "PositionGain", registry); velocityGain = new YoDouble(name + "VelocityGain", registry); double w0 = 2.0 * Math.PI * 16.0; double zeta = 1.0; setGainsByPolePlacement(w0, zeta); hasBeenInitialized.set(false); this.inputVariable = inputVariable; }
@ContinuousIntegrationTest(estimatedDuration = 0.0) @Test(timeout=300000) public void testSetAndGetGainsByPolePlacement() { setupSCSStuff(); YoDouble maxRateYo = new YoDouble("max_Rate", registry); maxRateYo.set(maxRate, notifyListeners); YoDouble maxAccelerationYo = new YoDouble("max_Acceleration", registry); maxAccelerationYo.set(maxAcceleration, notifyListeners); AccelerationLimitedYoVariable processed = new AccelerationLimitedYoVariable(nameYo, registry, maxRateYo, maxAccelerationYo, dt); double positionGain = random.nextDouble(); double velocityGain = random.nextDouble(); processed.setGainsByPolePlacement(positionGain, velocityGain); double positionGainResult = positionGain * positionGain; double velocityGainResult = 2 * positionGain * velocityGain; assertEquals(positionGainResult, processed.getPositionGain().getDoubleValue(), EPSILON); assertEquals(velocityGainResult, processed.getVelocityGain().getDoubleValue(), EPSILON); }
smoothedYoVariable.setGainsByPolePlacement(2.0 * Math.PI * breakFrequencyHertz, 1.0); smoothedYoVariable.setMaximumAcceleration(400.0); smoothedYoVariable.setMaximumRate(12.0);