Alejandro Garcés Ruiz - Mathematical Programming for Power Systems Operation

Здесь есть возможность читать онлайн «Alejandro Garcés Ruiz - Mathematical Programming for Power Systems Operation» — ознакомительный отрывок электронной книги совершенно бесплатно, а после прочтения отрывка купить полную версию. В некоторых случаях можно слушать аудио, скачать через торрент в формате fb2 и присутствует краткое содержание. Жанр: unrecognised, на английском языке. Описание произведения, (предисловие) а так же отзывы посетителей доступны на портале библиотеки ЛибКат.

Mathematical Programming for Power Systems Operation: краткое содержание, описание и аннотация

Предлагаем к чтению аннотацию, описание, краткое содержание или предисловие (зависит от того, что написал сам автор книги «Mathematical Programming for Power Systems Operation»). Если вы не нашли необходимую информацию о книге — напишите в комментариях, мы постараемся отыскать её.

Explore the theoretical foundations and real-world power system applications of convex programming In
, Professor Alejandro Garces delivers a comprehensive overview of power system operations models with a focus on convex optimization models and their implementation in Python. Divided into two parts, the book begins with a theoretical analysis of convex optimization models before moving on to related applications in power systems operations.
The author eschews concepts of topology and functional analysis found in more mathematically oriented books in favor of a more natural approach. Using this perspective, he presents recent applications of convex optimization in power system operations problems.
Mathematical Programming for Power System Operation with Applications in Python A thorough introduction to power system operation, including economic and environmental dispatch, optimal power flow, and hosting capacity Comprehensive explorations of the mathematical background of power system operation, including quadratic forms and norms and the basic theory of optimization Practical discussions of convex functions and convex sets, including affine and linear spaces, politopes, balls, and ellipsoids In-depth examinations of convex optimization, including global optimums, and first and second order conditions Perfect for undergraduate students with some knowledge in power systems analysis, generation, or distribution,
is also an ideal resource for graduate students and engineers practicing in the area of power system optimization.

Mathematical Programming for Power Systems Operation — читать онлайн ознакомительный отрывок

Ниже представлен текст книги, разбитый по страницам. Система сохранения места последней прочитанной страницы, позволяет с удобством читать онлайн бесплатно книгу «Mathematical Programming for Power Systems Operation», без необходимости каждый раз заново искать на чём Вы остановились. Поставьте закладку, и сможете в любой момент перейти на страницу, на которой закончили чтение.

Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать

Consider the following optimization problem:

231 The gradient of this function is presented below 232 We require to - фото 75(2.31)

The gradient of this function is presented below:

232 We require to find a value x y such that this gradient is zero - фото 76(2.32)

We require to find a value ( x , y ) such that this gradient is zero. Therefore, we use the gradient method. The algorithm starts from an initial point (for example x = 10, y = 10) and calculate new points as follows:

Mathematical Programming for Power Systems Operation - изображение 77(2.33)

Mathematical Programming for Power Systems Operation - изображение 78(2.34)

This step can be implemented in a script in Python, as presented below:

importnumpy asnp x = 10 y = 10 t = 0.03 fork in range(50): dx = 20*x + np.exp(x+y) dy = 30*y + np.exp(x+y) x += -t*dx y += -t*dy print('grad:',np. abs([dx,dy])) print('argmin:',x,y)

In the first line, we import the module NumPy with the alias np. This module contains mathematical functions such as sin, cos, exp, ln among others. The gradient introduces two components dx and dy, which are evaluated in each iteration and added to the previous point (x,y). We repeat the process 50 times and print the value of the gradient each iteration. Notice that all the indented statements belong to the for-statement, and hence the gradient is printed in each iteration. In contrast, the argmin is printed only at the end of the process.

Example 2.5

Python allows calculating the gradient automatically using the module AutoGrad. It is quite intuitive to use. Consider the following script, which solves the same problem presented in the previous example:

importautograd.numpy asnp fromautograd importgrad # gradient calculation deff(x): z = 10.0*x[0]**2 + 15*x[1]**2 + np.exp(x[0]+x[1]) returnz g = grad(f) # create a funtion g that returns the gradient x = np.array([10.0,10.0]) t = 0.03 fork in range(50): dx = g(x) x = x -t*dx print('argmin:',x)

In this case, we defined a function f and its gradient g where ( x , y ) was replaced by a vector ( x 0, x 1). The module NumPy was loaded using autograd.numpy to obtain a gradient function automatically. The code executes the same 50 iterations, obtaining the same result. The reader should execute and compare the two codes in terms of time calculation and results.

Example 2.6

Consider a small photovoltaic system formed by three solar panels A , B , and C , placed as depicted in Figure 2.6. Each solar system has a power electronic converter that requires to be connected to a common point E before transmitted to the final user in D . The converters and the user’s location are fixed, but the common point E can be moved at will. The coordinates of the solar panels and the final user are A = (0, 40), B = (20, 70), C = (30, 0), and D = (100, 50) respectively.

Figure 26 A small photovoltaic system with three solar panels The cost of the - фото 79

Figure 2.6 A small photovoltaic system with three solar panels.

The cost of the cables is different since each cable carries different current. Our objective is to find the best position of E in order to minimize the total cost of the cable. Therefore, the following unconstrained optimization problem is formulated:

235 where costij is the unitary cost of the cable that connects the point i - фото 80(2.35)

where costij¯ is the unitary cost of the cable that connects the point i and j , and ij¯ is the corresponding length.

The costs of the cables are costAE¯ = 12, costBE¯ = 13, costCE¯=11 and costDE¯=18 The distance between any two points U = ( u 0, u 1) and V = ( v 0, v 1) is given by the following expression:

236 This equation is required several times thus it is useful to define a - фото 81(2.36)

This equation is required several times; thus, it is useful to define a function, as presented below:

importnumpy asnp A = (0,40) B = (20,70) C = (30,0) D = (100,50) defdist(U,V): returnnp.sqrt((U[0]-V[0])**2 + (U[1]-V[1])**2) P = [31,45] f = 12*dist(P,A) + 13*dist(P,B) + 11*dist(P,C) + 18*dist(P,D) print(f)

The function is evaluated in a point P = (10, 10) to see its usage 2. The value of the objective function is easily calculated as function of dist( U , V ). Likewise, the gradient of f is defined as function of the gradient of dist( U , V ) with V fixed, as presented below:

237 then 238 These functions are easily defined in Python as follows - фото 82(2.37)

then,

238 These functions are easily defined in Python as follows defgdUV - фото 83(2.38)

These functions are easily defined in Python as follows:

defg_d(U,V): "gradient of the distance" return[U[0]-V[0],U[1]-V[1]]/dist(U,V) defgrad_f(E): "gradient of the objective function" return12*g_d(E,A)+13*g_d(E,B)+11*g_d(E,C)+18*g_d(E,D)

Now the gradient method consists in applying the iteration given by ( Equation 2.30), as presented below:

t = 0.5

E = np.array([10,10])

for iter in range(50): E = E -t*grad_f(E) f = 12*dist(E,A) + 13*dist(E,B) + 11*dist(E,C) + 18*dist(E,D) print("Position:",E) print("Gradient",grad_f(E)) print("Cost",f)

In this case, t = 0.5 and a initial point E = (10, 10) with 50 iterations were enough to find the solution. The reader is invited to try with other values and analyze the effect on the algorithm’s convergence.

картинка 84

The step t is very important for the convergence of the gradient method. It can be constant or variable, according to a well-defined update rule. There are many variants of this algorithm, most of them with sophisticated ways to calculate this step 3. A plot of ‖∇ f ‖ versus the number of iterations may be useful for determining the optimal value of t and showing the convergence rate of the algorithm, as presented in the next example. We expect a linear convergence for the gradient method, although the algorithm can lead to oscillations and even divergence if the parameter t is not selected carefully. Fortunately, there are modules in Python that make this work automatically.

Читать дальше
Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать

Похожие книги на «Mathematical Programming for Power Systems Operation»

Представляем Вашему вниманию похожие книги на «Mathematical Programming for Power Systems Operation» списком для выбора. Мы отобрали схожую по названию и смыслу литературу в надежде предоставить читателям больше вариантов отыскать новые, интересные, ещё непрочитанные произведения.


Отзывы о книге «Mathematical Programming for Power Systems Operation»

Обсуждение, отзывы о книге «Mathematical Programming for Power Systems Operation» и просто собственные мнения читателей. Оставьте ваши комментарии, напишите, что Вы думаете о произведении, его смысле или главных героях. Укажите что конкретно понравилось, а что нет, и почему Вы так считаете.

x