Simple Control System Design with XCOS - Scilab Tutorial
What Will I Learn ?
- You will learn how to simulate dynamic systems in Xcos
- You will learn how to design a simple feedback system with transfer function
- You will learn Proportional, Integral, Derivative Gains
Requirements
- Basic programming knowledge
- Basic control system design knowledge
- Scilab 6.0.1 or higher
Difficulty
- Basic
Tutorial Contents
Xcos is a very powerful tool which provides us building dynamic system with block diagram representation. Instead of just typing codes and check for spelling or other errors this tool uses blocks that are alreadly build and coded
Figure1: Block Representation in Xcos
By the help of Xcos what are we going to design is a feedback control system. Therefore, we should first know what is a feedback control system. It can be showed as in Figure [2];
Figure2: Feedback System
As can be seen from the Figure [2], a feedback system can be defined as; we have a dynamic system which responses to a given input and we are controlling it by the output. This kind of systems are called also Closed-Loop Systems. If we do not feed the output back into input these systems are called Open-Loop Systems. We are now feeding the output back and "Controlling" the system in a way but the important thing is that we need to control the system in a way that the system obeys certain requirements. These requirements can be achieved with different controlling techniques but in this tutorial i will talk about "Classical Control Techniques" Proportional, Derivative, Integral which is called PID controller. A PID controller is;
Figure3: PID Controller Scheme
Setting Up The System and Simulation
We will assume DC-Motor which is represented with a simple transfer function and its input is voltage and output is RPM and we will control the output with a PID controller. The transfer function is;
Figure4: DC-Motor Transfer Function Representation
From the Xcos Palette Browser the transfer function can be found from Continuous time systems/ CLR. Other blocks we need for simulation can be found from Palette Browser and typing search; STEPFUNCTION, SUMf, CMSCOPE, CLOCK_c, PID, GAIN, respectively. They are;
Open-Loop vs Closed-Loop
Now, check both systems;
Figure6: Open-Loop
Figure7: Closed-Loop
Figure8: PID Gains
Responses of both Closed and Open Loop systems to a given step input are;
Figure10: New PID Gains
With the PID gains given in Figure [10] our Closed Loop response changes as;
Proof of Work
- [Xcos File] (https://drive.google.com/open?id=1o4kTgG7dlMon_icaeK1Nv4d1DphYjuEM)
Leave Simple Control System Design with XCOS - Scilab Tutorial to:
Read more #utopian-io posts
Best Posts From svozkan
We have not curated any of svozkan's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.