5.30.2020

Modal Control System

This system has only one feedback loop, but this loop doesn't have a regulator as such. Regulation occurs due to the input system coefficient and the state variable coefficients. Therefore, the calculation of these coefficients will give us the result for the system. 

The modal control system should provide a monotonic transient function without overshoot (which corresponds to a binomial pole distribution). 

The control object is covered by feedback on selected state variables with some transmission coefficients. The matrix of these coefficients is a modal regulator. The principal quantity z may be one of the state variables, but this is not necessary.

Using additional corrective devices, it is necessary to provide a single static transmission coefficient between the control action and the main value z.

The development of a modal control system begins with the transformation of the source data. We are given a system of equations:

x = 20v,
2y' + y = x - 2z,
z'' + z' + 3z = 15y

Value of the transition time tpp = 2,4 s.

Now we introduce the following notation:

x1 = y        x2 = z          r = 1         n = 3
y1 = z        x3 = z'         m = 1
u1 = u

We substitute the replaced variables in the system of equations, and also make the change: v = 47u. Now we write the obtained equations in the normal Cauchy form, expressing the variables x. We get:
From here we can write the following matrices:

Now let's look at the diagram shown on the demo sheet and, in accordance with it, we will write a system of two equations in matrix form:

We calculate the matrix A-BK. We call it the matrix E.

Subtract the diagonal matrix P from the resulting matrix, calculate the determinant of the resulting matrix and equate it to zero to obtain the characteristic equation of the system.

Since we use the binomial distribution of poles, the third-order characteristic equation should have the form:
Here A is the geometric mean pole equal to: A = τpp/tpp = 6,3/2,4 = 2.625 s
We equate the values of p of the same degree. From here we find all the coefficients.

The next and last point is to find the coefficient of the system km. To do this, recall the system of equations written according to the scheme.
Static Mode:

We describe these equations in more detail.

From the first equation we obtain the following three equalities:

We write what the coefficient of the system is equal to:
The resulting coefficient of the system will stand at the input of the system and change the input signal. The scheme will looks like this:


5.24.2020

Subordinate Regulation Control System

The system is a multi-circuit system of subordinate regulation, which consists of three circuits, each of which includes an input quantity, a regulator, and a controlled quantity. Each circuit has its own regulator. They depend on each other and they are all unknown, therefore, the main task of this system is the calculation of regulators.

x = 20v
2y' + y = x - 2z
z'' + z' + 3z = 15y

Value of the transition time tpp = 2,4

The system should consist of three control loops (values ​​x, y, z). If necessary, additional action can be introduced to compensate for the internal feedback of the control object. All regulators and additional corrective devices must be physically feasible.

The system should have the first order of astatism. The transition function of the system should have a weak oscillation and overshoot of 4-8% (which corresponds to the distribution of the poles across Butterworth).

From the first equation of the system we get the first-order link, the transfer function W01 (p), at the input of which is the variable v, and at the output is the variable x. The second equation gives us the transfer function W02 (p), the input of which is the error of the controller e5, and the output is the variable y. Also, we get negative feedback from the amplifying variable z 2 times. At the input of the adder, the variable x. From the third equation, a first-order link is obtained - W03 (p). The output of this function is z. We immediately include the variable u in the circuit in accordance with the condition v = 47u. The resulting circuit is shown in Figure 1.1.
Figure 1.1
The next step is the internal compensation feedback from the variable z. It is compensated by the introduction of positive feedback (Figure 1.2)
Figure 1.2
After the internal feedback is compensated, it is necessary to make compensation from the control object, since, by condition, we cannot change the control object itself. For transfer, standard rules for transferring a node through a link and an adder through a link are used. The resulting circuit is shown in Figure 1.3.
Figure 1.3
Now, when calculating, you can ignore feedback values, which greatly simplifies the task. The equivalent circuit is presented in Figure 1.4.
Figure 1.4
Take a section of the circuit from variable u to variable x and add to them the adder and controller R1 (p), as shown in Figure 1.5.
Figure 1.5
The entire plot obtained from x1 to x represents the Desired Function F1 (p). The current section is of second order, therefore, the desired transfer function will be of second order. We take it from the table of transfer functions for Butterworth distribution.
Now we write the formula for the first controller:
We proceed to the next circuit. Now the regulation section looks like in Figure 1.6
Figure 1.6
We follow the same algorithm as above, but the desired transfer function F2 (p):
And finally, repeat the procedure for the last contour, section x3 - z (Figure 1.7).
Figure 1.7




Now you need to calculate T3 using the formula T = tpp/τpp. 
Where tpp = 2,4 s and τpp = 6 (from the table of indicators of universal transition functions for a fourth-order system). Then:
Now we substitute this value in the formulas of all regulators and get their final expressions:



The finished scheme looks like this:


5.17.2020

Machine Learning with Octave or MATLAB

You will find some practical machine learning problems written in MATLAB and also with the possibility to open in Octave(open source software) with different topics: linear regression, logistic regression, PCA, data compression, analysis and so on.

Click the following link https://github.com/Daveric/machine-learning-ex

This examples correspond to the exercises from the Machine Learning course in Coursera platform, so be free to analyse my code, making tips or corrections are welcome, so I'm trying to use a vector implementation for each exercise.

As you know vector implementation for lot of Data could be less computational expensive than some other methods like loops, no matter which programming language you are using. So that's the target, using vectors your machine learning app will have a better performance.

NOTE:
If you want to use MATLAB software, there is a free subscription for testing the online MATLAB services(around 15 days), just through your favourite browser can open it and start to code there. It looks like this: