public void Run()
        {
            OpenLoop loop = new OpenLoop(system, controller);

            Simulate.Step(loop, 10d, 0.1d);
            data = loop.Data;
        }
        public void Run()
        {
            CloseLoop loop = new CloseLoop(system, controller);

            Simulate.Step(loop, 1d, 0.01d);
            data = loop.Data;
        }
        public void Run()
        {
            BareSystem loop = new BareSystem(system);

            Simulate.Step(loop, 16d, 0.1d);
            data = loop.Data;
        }
        public void Run()
        {
            BareSystem loop = new BareSystem(GetSystem());

            Simulate.Step(loop, 15d, 0.01d);
            data = loop.Data;
        }
Example #5
0
        public void CloseLoopTest()
        {
            var reference = ReferenceDataLoader.Load(projectPath + @"/LoopReferenceData/Close/reference_data.txt");

            CloseLoop loop = new CloseLoop(system, controller);

            Simulate.Step(loop, 2d, 0.1d);

            Assert.True(OutputSamplesComparator.Compare(reference, loop.Data));
        }
Example #6
0
        public void BareSystemTest()
        {
            var reference = ReferenceDataLoader.Load(projectPath + @"\LoopReferenceData\Bare\reference_data.txt");

            BareSystem loop = new BareSystem(system);

            Simulate.Step(loop, 10d, 0.1d);

            Assert.True(OutputSamplesComparator.Compare(reference, loop.Data));
        }
        public void Run()
        {
            ContinousSecondOrder model = new ContinousSecondOrder(2d, 1d, 1d);
            var system = new ContinousSystem(model, GetSolver(), new Vector(new double[] { -1d, -4d }));

            BareSystem loop = new BareSystem(system);

            Simulate.Step(loop, 20d, 0.1d);
            data = loop.Data;
        }
Example #8
0
        public void Run()
        {
            ContinousSecondOrder model  = new ContinousSecondOrder(2d, 1d, 3d);
            ContinousSystem      system = new ContinousSystem(model, new SolverRK4(), Vector.Zeros(2));

            CloseLoop loop = new CloseLoop(system, GetController());

            Simulate.Step(loop, 20d, 0.01d);
            data = loop.Data;
        }
Example #9
0
        public void Run()
        {
            ControlSystem loop = new ControlSystem(system, controller);

            loop.mode = ControlSystemMode.OpenLoop;

            var toggler = new ControlSystemModeToggler(loop.mode, 3d, 6d);

            Simulate.Step(loop, 10d, 0.01d, (iteration, time) =>
            {
                loop.mode = toggler.GetMode(time);
            });
            data = loop.Data;
        }
Example #10
0
        public void ControlSystemTest()
        {
            var reference = ReferenceDataLoader.Load(projectPath + @"/LoopReferenceData/Control/reference_data.txt");

            ControlSystem loop = new ControlSystem(system, controller);

            Simulate.Step(loop, 4d, 0.1d, (iteration, time) => {
                if (iteration == 20)
                {
                    loop.mode = ControlSystemMode.OpenLoop;
                }
            });

            Assert.True(OutputSamplesComparator.Compare(reference, loop.Data));
        }