📜 ⬆️ ⬇️

Setting up a multi-loop control system of a fixed structure

I published this small educational program quite a long time ago in my LiveJournal, but I thought that here he would find more interested readers.

Decentralized and Fixed-Structure H-infinity Control in MATLAB - this is the title of an article by two authors (Pascal Gahinet and Pierre Apkarian), which I want to talk about here briefly.
Since I decided to write for a relatively wide audience, suppose that we do not know what a control system is. Those who are interested in the very topic of the post - please scroll through the text to the second picture.

From private to general first. Imagine that you need to fill the bath with water. But so that you do not have unbearably cold and scorching hot. Suppose that you have a ball mixer , and you simply lift the rocking chair up to the stop, including the maximum water pressure. With one hand, you begin to check the temperature of the water. And the other to move the rocking chair left and right, to ensure the desired temperature. This is all together - you, your tap and the temperature of the water - and there is a control system. You have an idea in your head about the temperature of water you need. You "measure" the hand that gives you a crane. And with the other hand you are trying to make the difference between the desired temperature and the temperature of the tap water was minimal. In the picture it can be represented as:
image
Fig. 1. Management system in general.

In fact, what we drew above is a fundamental representation of a feedback control system. And to the place of the control object (in our case, the mixer) there can be anything. And in the place of the regulator (in our case, a person) there can be anything.
')
In the picture, for simplicity, the sensor (in our case, the human hand) was not placed in a separate block, but included in the “Control Object” block. By itself, the object will not just say so, what is the current value of the parameter that we want to change. Also, for simplicity, we did not carry an actuator into a separate unit (something that helps us somehow influence the control object - in our case, the other hand). The object itself, too, will not change just like that: it needs to be influenced by something. We take the desired temperature from the head and call it “warm”, although we can clarify and say that it is, for example, 20 degrees Celsius. And subtract from 20 that temperature value that we get with the help of a sensor (our hand under the tap). So we get the value called “error”: how much the temperature of the tap water differs from the one we need. And, with the help of a regulator (our brain, where we understand, to make it warmer or colder), we will make it so that this difference does not exist.

Once people thought that standing by a tap with water (in fact, it was quite a long time, and the object was something else) was not a very interesting activity. And we decided to somehow automate the receipt of the desired value (in our case, the temperature, but we remember that it could be anything). Therefore, sensors began to appear (mechanical at the beginning - like, for example, a float in, excuse me, a toilet cistern that “knows” how much water is in the water tank), then electrical (for example, a temperature sensor that will convert the temperature value to voltage). And since we have some kind of electrical value, then why not transfer it to a computer that will think how to manage something. We just tell him what value we want, and the sensor will tell him what it really is.

So, a little bit rounded out with educational program, the task of the person who develops the control system is to come up with such rules for this computer so that the desired value comes to the desired value in a short time and without hesitation. Since sometimes it is necessary to control not only the temperature of the water in the faucet, but also cars and helicopters, this can be quite difficult to do, so it’s just the logic (turn there if) is not enough. And if you have to come up with complex equations for the regulator, then it would not be bad to have such equations for an object (a mathematical model of the object).
It can be quite difficult when there are many controllable quantities (many outputs) and many control possibilities (many inputs). Just as in our example.
image
Fig. 2. Multi-loop helicopter control system.

Here we turn to the article to which I gave a link at the beginning of the post. We have a control object - a helicopter (please see section 6 of the article, if you are interested in a detailed description). We have three input signals (in Fig. 2 they are shown with one line in front of the green State Space block with the name u. And five output signals (the line after the green block with the name y). We chose a control system structure such that we have three PI controller for controlling three external circuits (orange PI blocks with a numeral in the name). And an internal control loop - for decoupling channels - with a SOF matrix (orange triangle).

Now it's up to you to set the requirements for the control system and somehow find the 21 parameters of our control system. The authors of the article offer a technique based on H-infinity. But at the same time, an engineer does not need to know what a H-infinity is (if it is completely simplistic) for setting the problem. We set the requirements in the frequency domain, saying that we need to adjust such and such blocks in such and such a model that we have control signals and signals from the sensors. And run the algorithm, which is described in detail in the article.

In MATLAB 2012a (and 2011b, but not in 2012b) there is an example that vividly illustrates what is happening (in fact, we can repeat everything that happens in the article). To open the script, you can execute the edit helico_demo command. I allowed myself to record a video about how it works and what results we get (again, just by repeating what is stated in the article).

As a result, we set up 21 parameters and get a stable system that solves the problem (channel isolation and quality of transients). I will not insert graphics here - please see the article.

I would welcome comments.

Source: https://habr.com/ru/post/204144/


All Articles