0% found this document useful (0 votes)
3 views22 pages

Newton-Raphson Method for Optimization

Module 3 covers optimization techniques in computational engineering, focusing on the Newton-Raphson method for root-finding and determining optimum points for functions. It includes examples of manual calculations and Matlab coding for both root determination and optimization. Additionally, it introduces the Perturb-and-Observe algorithm for maximizing points and discusses its weaknesses and modifications for different applications.

Uploaded by

Stacey Leen
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views22 pages

Newton-Raphson Method for Optimization

Module 3 covers optimization techniques in computational engineering, focusing on the Newton-Raphson method for root-finding and determining optimum points for functions. It includes examples of manual calculations and Matlab coding for both root determination and optimization. Additionally, it introduces the Perturb-and-Observe algorithm for maximizing points and discusses its weaknesses and modifications for different applications.

Uploaded by

Stacey Leen
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Module 3

Optimisation
KE27003 Computational Engineering
Topic
Optimisation

1 2

Newton- Perturb-and-
Raphson Observe
Newton-Raphson (NR)
Is an iterative root-finding method, which is used to find the roots of
equations through a repetitive process.
It involves refining initial guesses to approximate the roots of functions, often
used in numerical analysis.
This iterative approach is crucial for solving complex equations where exact
solutions are difficult to obtain.
Concept
Derivation
Given: function

Methodology:
Determine the derivative of function , or called as
 gradient / slope of the curve at

Refer the graph,

re-arrange the equation:


{}

Re-arrange the equation:


Example: Roots Determination
(Manual)
Determine the roots for the function, .
Function f(x) = x 3 - 4x 2 + 5x - 2
4
Given:
3

2
(may use calculator)

f(x)
1

-1

-2
0 0.5 1 1.5 2 2.5 3
x
Example: Root Determination (NR)
Determine the roots for the function, using Newton-Raphson method.
Function f(x) = x 3 - 4x 2 + 5x - 2
4

3
First guess :
1st iteration : 2

2nd iteration :

f(x)
1
3rd iteration : 43
4th iteration : 00 0

-1
Root:
-2
0 0.5 1 1.5 2 2.5 3
x
What is the difference between manual calculation
and Newton-Raphson method?
Example: Matlab Coding (Root)
Determine the roots for the function, using Newton-Raphson method.
Function f(x) = x 3 - 4x 2 + 5x - 2
4

f(x)
1

-1

-2
0 0.5 1 1.5 2 2.5 3
x

Can modify Newton-Raphson to determine ?


Determine Optimum Point using NR
Determine the optimum points for the function, .
Function f(x) = x 3 - 4x 2 + 5x - 2
4
Given:
3

1st Derivation:
2
Optimum point occurred at , thus
or

f(x)
1

0
2nd
Derivation:
If , , : maximum point @ -1

If , , : minimum point @
-2
0 0.5 1 1.5 2 2.5 3
x
Example: Optimum Point (NR)
Determine the optimum points for the function, using Newton-Raphson method.
Function f(x) = x 3 - 4x 2 + 5x - 2
𝒇 ′ ( 𝒙 𝒏) 4
𝒙 𝒏+𝟏 = 𝒙 𝒏 − ′′
𝒇 ( 𝒙 𝒏)
3
First guess :
1st iteration : 2

2nd iteration :

f(x)
1
3rd iteration :
4th iteration : 0

-1
Optimum point:
-2
0 0.5 1 1.5 2 2.5 3
x
Example: Matlab Code (Optimum
Point)
Determine the optimum points for the function, using Newton-Raphson method.
Function f(x) = x 3 - 4x 2 + 5x - 2
4

f(x)
1

-1

-2
0 0.5 1 1.5 2 2.5 3
x
Example (Diode Current)
Determine the voltage across a diode at which the current flow through it is . Given that
, and

Current flow through diode


Reverse saturation current of a diode
Voltage across a diode
Ideality factor of a diode
Thermal voltage
Example (Diode Current)
Determine the voltage across a diode at which the current flow through it is . Given that
, and

Re-arrange the equation:


Summary (Newton-Raphson)

Pros Cons
• Efficient in finding the root of an • Sensitive to the choice of initial guess.
equation.
• May diverge if the derivative is close to
• Converges rapidly if the initial guess is zero.
close to the root.
• Not suitable for all types of functions.
• Requires less memory and
computational effort.
Exercise 1 (Nodal Analysis)
Determine the voltage, .
Steps to simulate the voltage, :
𝑉a
0 1. Derive the equation for based on Kirchhoff’s law.
+ 𝑅1 s
2. Rearrange the equation in the form as .
𝑅2 𝑅3
3. Determine the equation for .
a
0 4. Guess the initial value of .
s
5. Use Newton-Raphson method to determine the value
of .

6. Validate the answer in (5) using Matlab and Simulink.


Exercise 2 (Pendulum Motion)
Applied Mechanics:
Simulate a pendulum motion and determine Derive the motion using
the angle at which the pendulum will come to
rest. Motion:

1. Describe and justify your methodology.


2. Manually determine the angle.
3. Code in Matlab to validate the answer in Displacement:
(2).

Motion:

Source: Wikipedia
Perturb-and-Observe
Algorithm
Perturb and Observe (P&O)
Algorithm
An algorithm used to determine the maximum point.

90

Case 3:
80
If AND
70
Then
60
Case 1:
50
If AND
Output

40 −∆𝑥 Case 4:
Then
30 If AND
Case 2: 20
Then
If AND +∆ 𝑥
𝑥∆𝑥
10
− ∆+
Then 0
0 5 10 15 20 25
Current Input Current
Flowchart Start

Yes No
Is ?

Yes No Yes No
Is ? Is ?

Case 1 Case 3 Case 4 Case 2

End
Weakness of P&O Algorithm
Exercise
1. What are the impacts of high ?

2. What are the impacts of low ?

3. Can the P&O algorithm use to track global optimum point?

4. How to modify P&O algorithm so that it can be used to determine minimum point?
Exercise

12
where
10

0
-3 -2 -1 0 1 2 3

Common questions

Powered by AI

The Perturb-and-Observe (P&O) algorithm can be modified to determine the minimum point of a function by reversing the perturbation logic: instead of increasing the input when a decrease in function value is observed, it should instead increase when an increase is observed, and decrease when a decrease is observed, effectively making the algorithm track towards the minimum instead of the maximum . This adjustment ensures that the perturbations drive the input towards the lowest point on the curve.

The Newton-Raphson method exhibits high sensitivity to the initial guess due to its reliance on subsequently derived mathematical tangents to find equation roots. An initial guess that is close to the actual root leads to quicker convergence and fewer iterations . Conversely, an inappropriate initial guess can cause slow convergence, local minimum trapping, or complete divergence, complicating attempts to find the correct solution efficiently. This sensitivity is a critical consideration when employing Newton-Raphson in various applications.

Matlab can validate results from the Newton-Raphson method by allowing numerical simulations that compare the iterations and results of the method to expected behaviors. By coding the function and its derivatives in Matlab, iterations can be automated, plotted, and checked for convergence against analytical solutions or approximations . The visual tools in Matlab provide an additional layer of validation by enabling the observation of iteration paths and convergence patterns in graphical forms.

The Newton-Raphson method is an iterative technique specifically designed for root finding, which makes it more efficient than manual calculations. It achieves this efficiency by utilizing the derivative of the function to iteratively converge to a root. This method can deliver rapid convergence especially when the initial guess is close to the actual root, as the iterations follow the tangent of the curve towards the zero crossing . In contrast, manual techniques often require more computation and checking, especially for complex equations, which the Newton-Raphson method simplifies by systematically approximating the root through each iteration.

Both processes employ iteration using function derivatives, but for finding roots, the focus is on setting the function equal to zero and iteratively adjusting inputs to converge on this condition. For optimization, however, the Newton-Raphson method is adapted to utilize both the first and second derivatives to identify critical points (where the slope is zero) and classify them using the second derivative test for determining whether each point is a maximum, minimum, or saddle point . This difference highlights the need for additional derivative analysis when determining optimum points compared to root finding.

The Newton-Raphson method might diverge in scenarios where the initial guess is far from the actual root, especially if the function behaves irregularly or has inflection points close to the root . Divergence can also occur if the derivative of the function is zero or near zero at any point during the iteration, leading to division by zero or excessively large step sizes that drive the iteration away from potential roots instead of towards them . Function discontinuities can further exacerbate these issues, preventing convergence entirely.

The Newton-Raphson method is computationally efficient as it consumes relatively less memory and computational effort compared to other root-finding methods. This is primarily because it reduces the problem to calculating derivatives and applying a fixed iterative formula, which simplifies the process and limits additional variable storage to a few necessary matrices or vectors . This efficiency is particularly beneficial in solving complex equations where memory and computation resources might otherwise be strained.

The thermal voltage significantly impacts diode current flow modeling as it represents the thermal energy available to charge carriers, influencing the diode's I-V characteristics. When using the Newton-Raphson method, thermal voltage is a scaling factor in determining current response to voltage across the diode, affecting convergence and accuracy of the model . A precise thermal voltage value ensures more realistic iterations, important for simulations involving thermal-dependent behavior of semiconductor devices.

While the Newton-Raphson method is efficient, it does have some limitations. It is highly sensitive to the initial guess; a poor initial guess can lead to divergence rather than convergence to the correct root . The method also struggles when the derivative of the function is close to zero, as this can lead to large iterations and possibly cause the method to fail . Furthermore, it may not be suitable for functions that do not have well-behaved derivatives, such as those that are discontinuous or non-differentiable.

The ideality factor in a diode equation determines the degree to which the real diode behavior deviates from the ideal diode equation. When using the Newton-Raphson method to find the voltage across a diode at a given current, the ideality factor adjusts the calculated current in response to voltage changes, iteratively helping to refine the input voltage guess until convergence . The ideality factor effectively scales the thermal voltage impact, crucial for accurate iterations in realistic diode behavior modeling.

You might also like