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

Solution IC

Uploaded by

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

Solution IC

Uploaded by

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

Q1.

Perceptron Decision Boundary and Its


Limitation
A Perceptron is the simplest type of Artificial Neural Network (ANN)
used for binary classification, meaning it classifies data into two classes
(e.g., Yes/No, Spam/Not Spam).

The output of a perceptron is calculated using:

a=hardlim(℘+ b)

Where:

 a = Output (0 or 1)

 W = Weight vector

 p = Input vector

 b = Bias

 hardlim = Activation function

The decision boundary is represented by:


℘+b=0

1. How the Weight Vector Determines the Orientation of the


Decision Boundary

The weight vector (W) determines the orientation (angle) of the decision
boundary.

 Each input has a weight that shows its importance.

 Changing the weights rotates or changes the angle of the boundary.

 Higher weights have a greater influence on the classification.

Simple Example:
Imagine a ruler placed on a table. Rotating the ruler changes its direction.
Similarly, changing the weights rotates the decision boundary.

2. How Bias Shifts the Position of the Decision Boundary

The bias (b) shifts the decision boundary without changing its angle.
 Increasing or decreasing the bias moves the boundary left, right, up, or
down.

 The orientation remains the same because the weights do not change.

Simple Example:
Sliding the ruler across the table without rotating it is like changing the bias.

3. Linear Separability

A dataset is linearly separable if a single straight line (or plane) can


separate the two classes.

A single-layer perceptron works well only for linearly separable data.

4. Why a Single-Layer Perceptron Fails

A single-layer perceptron can create only one linear (straight-line)


decision boundary.

If the data cannot be separated by one straight line (such as the XOR
problem), it cannot classify the data correctly. This is called nonlinearly
separable data.

5. How a Multilayer Perceptron (MLP) Solves This Problem

A Multilayer Perceptron (MLP) has one or more hidden layers.

 Hidden layers learn complex patterns in the data.

 They create nonlinear decision boundaries instead of just one


straight line.

 Therefore, an MLP can correctly classify both linearly and nonlinearly


separable data.

Q2. MLP for Nonlinear Function Approximation


A Multilayer Perceptron (MLP) is a neural network with one or more
hidden layers. It is suitable for modeling nonlinear engineering systems
because it can learn complex relationships between inputs and outputs.
A linear model is often insufficient because it can only represent straight-
line relationships. However, many real-world engineering systems (such as
robots, vehicles, power systems, and industrial processes) have nonlinear
behavior, which cannot be accurately modeled using a simple linear
equation.

1. Why is an MLP Suitable for Nonlinear Engineering Systems?

An MLP can model nonlinear systems because:

 It has hidden neurons that learn complex patterns.

 It uses nonlinear activation functions (such as ReLU, Sigmoid, or


Tanh).

 It can approximate almost any nonlinear function when trained with


enough data.

The MLP model is represented as:


^y =F (x ; θ)

Where:

 ^y = Predicted output

 x = Input features

 F = MLP model

 θ= Network parameters (weights and biases)

2. Why is a Linear Model Insufficient?

A linear model assumes a straight-line relationship between input and


output.

It cannot accurately model systems where:

 The relationship changes with time.

 Inputs interact in a complex way.

 The output does not follow a straight-line pattern.


Therefore, a linear model often produces large prediction errors for nonlinear
systems.

3. General MLP-Based Model Estimator/Controller

An MLP can be used as a model estimator or controller for any nonlinear


system.

Inputs (x)

The inputs depend on the system, for example:

 Sensor readings

 Previous outputs

 Control inputs

Output ( ^y )

The network predicts:

 System output, or

 Control signal

Network Architecture

A simple MLP consists of:

 Input layer

 One or two hidden layers

 Output layer

Example:

 Input Layer → Hidden Layer (ReLU) → Hidden Layer (ReLU) → Output


Layer (Linear)

4. Activation Functions

An activation function is a mathematical function used in a neural network to


decide whether a neuron should produce an output or not. It introduces
nonlinearity, allowing the neural network to learn complex patterns.
Hidden layers use nonlinear activation functions such as:

 ReLU

 Sigmoid

 Tanh

The output layer usually uses:

 Linear activation (for prediction problems)

5. Training Data

The MLP is trained using:

 Input data ( x )

 Actual output ( y )

The network learns by comparing the predicted output with the actual
output.

6. Loss Function

The prediction error is measured using Mean Squared Error (MSE):


N
1
E= ∑ ¿¿
N i=1

Where:

 N = Number of training samples

 y i= Actual output

 ^y i= Predicted output

A smaller value of E means better prediction accuracy.

7. Control Error

For a controller, the error is:

e (t)= y des (t)− y (t)


Where:

 y des (t )= Desired output

 y (t )= Actual output

The controller adjusts its output to reduce this error.

8. Performance Metrics

The performance of the MLP can be evaluated using:

 Mean Squared Error (MSE) – Measures prediction error.

 Root Mean Squared Error (RMSE) – Measures average prediction


error.

 Accuracy (for classification tasks).

Lower error values indicate better performance.

9. Limitation of Using Only a Neural Network

One limitation is that an MLP requires a large amount of training data to


achieve good performance.

If the training data is limited or poor in quality, the network may produce
inaccurate predictions or fail to generalize to new data.

Q3. Backpropagation Derivation for Hidden-Layer


Weights
Introduction

Backpropagation is the learning algorithm used in a Multilayer


Perceptron (MLP). It updates the network weights by sending the output
error backward from the output layer to the hidden layer. This process
reduces the error and improves the network's predictions.

Given Equations

Hidden Layer
h j=f (ne t j ), ne t j=∑ w ji xi + b j
i

Output Layer

^y =g (ne t o ), ne t o=∑ v j h j +b o
j

Error Function
1
E= ¿
2
Weight Update Rule
∂E
Δ w ji=−α
∂ w ji

where:

 w ji = Hidden-layer weight

 v j= Output-layer weight

 α = Learning rate

Step 1: Calculate the Hidden Layer Output

Each hidden neuron first calculates its input:

ne t j=∑ w ji x i +b j
i

Then it applies the activation function:

h j=f (ne t j )

Explanation:
The hidden neuron receives inputs, multiplies them by weights, adds the
bias, and produces the hidden output.

Step 2: Calculate the Output

The output neuron calculates:

ne t o =∑ v j h j +b o
j
Then,
^y =g (ne t o )

Explanation:
The hidden layer sends its outputs to the output neuron to produce the
predicted output ^y .

Step 3: Calculate the Error

The prediction error is:


1
E= ¿
2

where:

 y = Actual output

 ^y = Predicted output

Explanation:
If the prediction is wrong, the error will be large. Our goal is to make this
error as small as possible.

Step 4: Propagate the Error Backward (Chain Rule)

To update the hidden-layer weight w ji , we calculate:

∂E ∂ E ∂ ^y ∂ ne t o ∂hj ∂ne t j
= × × × ×
∂ w ji ∂ ^y ∂ ne t o ∂hj ∂ ne t j ∂ w ji

Simple Explanation:

The error cannot directly reach the hidden weight, so it passes through five
steps:

1. Error → Output

2. Output → Output neuron

3. Output neuron → Hidden neuron

4. Hidden neuron → Hidden input

5. Hidden input → Hidden weight


This is called the Chain Rule.

Step 5: Update the Hidden-Layer Weight

Now update the weight using Gradient Descent:


∂E
Δ w ji=−α
∂ w ji

Finally,
new old
w ji =w ji + Δ w ji

Explanation:

 If the error is large, the weight changes more.

 If the error is small, the weight changes less.

 Repeating this process reduces the overall error.

Backpropagation Flow

Input Layer


Hidden Layer


Output Layer

Calculate Error


Backpropagate Error
(Output → Hidden)


Update Hidden Weights

Q4. Neuro-Fuzzy Hybrid Intelligence


Introduction

A Neuro-Fuzzy System is a combination of:

 Neural Networks (NN) – which can learn from data, and

 Fuzzy Logic (FL) – which makes decisions using simple IF–THEN


rules.

It combines the learning ability of neural networks with the easy-to-


understand reasoning of fuzzy logic.

Step 1: Learning Ability of Neural Networks

A neural network:

 Learns from training data.

 Automatically adjusts its weights.

 Improves its prediction over time.

Example:
A neural network learns how to control the speed of a fan by observing
temperature data.

Advantage:
✔ Learns complex and nonlinear patterns automatically.

Step 2: Interpretability of Fuzzy Logic

Fuzzy logic makes decisions using IF–THEN rules.

Example:

 IF Temperature is High, THEN Fan Speed is Fast.

 IF Temperature is Low, THEN Fan Speed is Slow.

These rules are easy for humans to understand.

Advantage:
✔ Easy to explain and interpret.

Step 3: How a Neuro-Fuzzy System Works


A Neuro-Fuzzy system combines both techniques.

Working Steps

Input Data


Fuzzy Rules (IF–THEN)


Neural Network Learns
and Adjusts the Rules


Improved Output/Decision

Explanation

1. The system receives input data.

2. Fuzzy logic applies IF–THEN rules.

3. The neural network learns from data and adjusts the fuzzy rules
automatically.

4. The system produces a more accurate output.

Step 4: Why is this Hybrid Approach Useful?

Many engineering systems are:

 Nonlinear (their behavior is not a straight-line relationship).

 Uncertain (inputs may be noisy or incomplete).

A Neuro-Fuzzy system handles these problems because:

 Neural networks learn complex patterns.

 Fuzzy logic handles uncertainty using human-like reasoning.

 Together, they provide accurate and understandable decisions.

Example
Consider an air conditioner.

Input:

 Temperature

 Humidity

Fuzzy Rule:

 IF Temperature is High AND Humidity is High,


THEN Cooling should be High.

The neural network learns from past data and adjusts the rule if needed,
making the system smarter over time.

Advantages of Neuro-Fuzzy Systems

 Learns automatically from data.

 Uses simple and understandable IF–THEN rules.

 Handles nonlinear systems effectively.

 Works well even with uncertain or noisy data.

 Provides accurate and intelligent control.

Conclusion

A Neuro-Fuzzy System combines the learning ability of Neural


Networks with the interpretability of Fuzzy Logic. Neural networks learn
from data and improve the system automatically, while fuzzy logic makes
decisions using easy-to-understand IF–THEN rules. This hybrid approach is
useful for intelligent control systems because it can accurately control
nonlinear and uncertain systems while keeping the decision-making
process simple and understandable.

Q5. Takagi-Sugeno (TSK) Rule Interpretation


Introduction

A Takagi-Sugeno (TSK) rule is a type of fuzzy rule used in neuro-fuzzy


systems. It combines fuzzy logic with a mathematical equation to model
and control nonlinear systems.
A TSK rule is written as:
If x 1 is High and x2 is Low, then y=c 0 +c 1 x1 +c 2 x 2

The rule has two parts:

1. Antecedent (IF part)

2. Consequent (THEN part)

Step 1: Antecedent Part (IF Part)

The antecedent checks the input conditions using fuzzy words such as
High, Low, Medium, etc.

Example:

IF x 1is High and x 2is Low

Here:

 x 1and x 2are the inputs.

 High and Low are fuzzy sets.

 This part decides when the rule should be applied.

Simple Example

Suppose:

 x 1= Temperature

 x 2= Humidity

Rule:

IF Temperature is High and Humidity is Low

Then this rule becomes active.

Role of Antecedent:

 Checks the input conditions.

 Determines whether the rule is activated.

Step 2: Consequent Part (THEN Part)


The consequent calculates the output using a linear equation.
y=c 0+ c 1 x 1+ c 2 x 2

Where:

 c 0= Constant (bias)

 c 1 , c2 = Coefficients

 x 1 , x 2= Input values

 y = Output

Simple Example

If:

 c 0=2

 c 1=3

 c 2=1

and

 x 1=4

 x 2=2

Then,

y=2+ 3(4 )+1 (2) y=2+12+ 2y=16

Role of Consequent:

 Computes the final output using a mathematical equation.

Step 3: Why is a TSK Rule Suitable for Nonlinear Approximation and


Control?

A TSK rule is suitable because:

 The IF part uses fuzzy logic to handle uncertainty.

 The THEN part uses a linear equation to calculate the output.

 Many local linear rules together can model a complex nonlinear


system.
This means:

 Each rule models one small part of the system.

 Combining all the rules gives an accurate model of the whole nonlinear
system.

This is called a local linear model.

Simple Example

Think of driving a car.

 On a straight road, one simple rule controls the speed.

 On a curved road, another rule controls the speed.

 On a steep hill, a different rule is used.

Each rule works well in its own situation (local model). Together, they
control the car smoothly in all situations (nonlinear system).

Advantages of TSK Rules

 Easy to understand using IF–THEN rules.

 Uses simple linear equations for output.

 Models complex nonlinear systems accurately.

 Learns from data in neuro-fuzzy systems.

 Useful for intelligent control applications.

Conclusion

A Takagi-Sugeno (TSK) rule has two parts: the antecedent (IF part) and
the consequent (THEN part). The antecedent checks whether the input
conditions (such as High or Low) are satisfied, while the consequent
calculates the output using the linear equation
y=c 0+ c 1 x 1+ c 2 x 2 .

A TSK rule is suitable for data-driven nonlinear approximation and


control because each rule represents a local linear model, and combining
many such rules allows the system to accurately model and control complex
nonlinear systems while still being easy to interpret.

Q6. Chain Rule for Neuro-Fuzzy Parameter


Adaptation
Introduction

In a Neuro-Fuzzy System (NFS), the membership-function parameters


(θ) determine the shape of the fuzzy membership functions (such as Low,
Medium, and High).

During training, these parameters are updated so that the controller


produces more accurate outputs. This is done using Backpropagation and
the Chain Rule.

The objective is to minimize the error by updating the parameter θ .

Given Equations

Chain Rule

( ) ( ∂∂uω )( ∂ μ )( ∂ θ )
∂E ∂E ∂ ωi ∂ μi
=
∂θ ∂u i i

Parameter Update Rule


∂E
θ k+1=θ k −α
∂θ
Where:

 E = Total error

 u= Controller output

 ω i= Rule firing strength

 μi= Membership grade

 θ= Membership-function parameter

 α = Learning rate

Given Equations

The chain rule is:


( ) ( )( )( )
∂E ∂E ∂u ∂ ωi ∂ μi
=
∂θ ∂u ∂ ωi ∂ μi ∂θ

The parameter update rule is


∂E
θ k+1=θ k −α
∂θ
where

 E = Total error

 u= Controller output

 ω i= Rule firing strength

 μi= Membership grade

 θ= Membership-function parameter

 α = Learning rate

Step 1: Error Depends on Controller Output

The total error depends on the controller output.

E=f (u)

Differentiate with respect to u


∂E
∂u
Meaning:
This tells us how much the error changes when the controller
output changes.

Step 2: Controller Output Depends on Rule Firing Strength

The controller output depends on the firing strength of each fuzzy rule.

u=f (ωi )

Differentiate with respect to ω


∂u
∂ ωi

Meaning:
This shows how much the controller output changes when the rule
firing strength changes.

Step 3: Rule Firing Strength Depends on Membership Grade

The firing strength depends on the membership value.

ω i=f (μi)

Differentiate with respect to μ


∂ ωi
∂ μi

Meaning:
This tells us how much the firing strength changes when the
membership grade changes.

Step 4: Membership Grade Depends on Membership Parameter

The membership grade depends on the parameter θ.

μi=f (θ)

Differentiate with respect to θ


∂ μi
∂θ
Meaning:
This tells us how much the membership grade changes when the
parameter θ changes.

Step 5: Apply the Chain Rule (Derivation)

Since

 Error depends on u

 u depends on ω
 ω depends on μ

 μ depends on θ

Using the Chain Rule,

∂ E ∂ E ∂ u ∂ ωi ∂ μi
= × × ×
∂ θ ∂ u ∂ ωi ∂ μ i ∂ θ

This is the required derivation.

Step 6: Update the Membership Parameter

Once the gradient is calculated, update the parameter using Gradient


Descent.
∂E
θ k+1=θ k −α
∂θ
where

 θ k= Current parameter

 θ k+1= New parameter

 α = Learning rate

Backpropagation Flow

Membership Parameter (θ)




Membership Grade (μ)


Rule Firing Strength (ω)


Controller Output (u)


Total Error (E)
Backward Pass (Chain Rule)

E→u→ω→μ→θ

Conclusion

The Chain Rule updates the antecedent membership-function parameter


by propagating the error backward through each layer of the Neuro-Fuzzy
System:

1. Error depends on Controller Output

2. Controller Output depends on Rule Firing Strength

3. Rule Firing Strength depends on Membership Grade

4. Membership Grade depends on Membership Parameter

Therefore,

∂ E ∂ E ∂ u ∂ ωi ∂ μi
= ⋅ ⋅ ⋅
∂ θ ∂ u ∂ ωi ∂ μi ∂ θ

Finally, the parameter is updated using


∂E
θ k+1=θ k −α
∂θ

This step-by-step derivation is the standard answer expected in exams


because it clearly shows how the total error is propagated backward
through the NFS layers to update the antecedent membership
parameter.

Q7. ANFIS Training-Data Design (Adaptive Cruise


Control)
Introduction

ANFIS (Adaptive Neuro-Fuzzy Inference System) combines the


learning ability of Neural Networks with the decision-making ability
of Fuzzy Logic. It learns from data and automatically adjusts the fuzzy rules
to control the vehicle smoothly.
In this project, ANFIS is used for Adaptive Cruise Control (ACC). The
goal is to maintain a safe distance from the vehicle ahead while keeping
the desired speed.

Step 1: Define the Input Variables

The inputs used by the ANFIS model are:

 Vehicle Speed (km/h)

 Distance to the Front Vehicle (m)

 Relative Speed (Difference between front vehicle speed and


own vehicle speed)

These inputs help the controller decide whether to accelerate or brake.

Step 2: Define the Output Variable

The output of the ANFIS model is:

 Acceleration/Braking Command

The controller uses this output to adjust the vehicle speed and maintain a
safe distance.

Step 3: Data Source

The model needs data for training.

The dataset is represented as:


N
D={(x i , y i)}i=1

Where:

 x i= Input variables (speed, distance, relative speed)

 y i= Desired acceleration or braking command

 N = Total number of data samples

Data Source:

 Vehicle sensors (Radar, LiDAR, Speed Sensor)


 Driving simulation data

 Historical driving data

Step 4: Data Preprocessing

Before training, the data is prepared by:

 Removing missing or incorrect values.

 Normalizing the data so all inputs are on a similar scale.

 Removing duplicate data if present.

This improves the accuracy of the ANFIS model.

Step 5: Training and Testing Split

The dataset is divided into:

 80% → Training Data

 20% → Testing Data

 Training data is used to teach the ANFIS model.

 Testing data is used to evaluate how well the model performs on new
data.

Step 6: Train the ANFIS Model

During training:

 The neural network adjusts the membership functions.

 The fuzzy IF–THEN rules are tuned automatically.

 The controller learns the best acceleration and braking commands.

Example Rule

Before Training:

IF Distance is Near → Brake Medium

After Training:
IF Distance is Near AND Relative Speed is High → Brake Strong

The rules become more accurate after learning from the training data.

Step 7: Performance Evaluation

The performance is measured using Root Mean Square Error (RMSE).


N
1
RMSE= ∑ ¿¿ ¿
N i=1

Where:

 N = Number of samples

 y i= Actual acceleration/braking command

 ^y i= Predicted acceleration/braking command

Explanation:

 A lower RMSE means the controller predicts more accurately.

 A higher RMSE means the model needs improvement.

Step 8: How Training Modifies Rules and Output

During training:

 Membership-function parameters are adjusted.

 Fuzzy IF–THEN rules are updated automatically.

 The predicted acceleration or braking becomes closer to the actual


value.

 The prediction error decreases, resulting in smoother and safer vehicle


control.

Step-by-Step Flow

Collect Driving Data


(Speed, Distance, Relative Speed)


Preprocess Data
(Remove errors & Normalize)


Split Data
(80% Training, 20% Testing)


Train ANFIS Model
(Update Membership Functions & Fuzzy Rules)


Test the Model


Evaluate Performance using RMSE

Conclusion

In an Adaptive Cruise Control (ACC) system, the ANFIS model uses


vehicle speed, distance to the front vehicle, and relative speed as
inputs, and produces the acceleration/braking command as the output.
The training dataset is represented as:
N
D={(x i , y i)}i=1

The data is preprocessed and divided into 80% training and 20% testing.
During training, ANFIS automatically updates the membership functions
and fuzzy IF–THEN rules, making the controller more accurate. The
model's performance is evaluated using:


N
1
RMSE= ∑ ¿¿ ¿
N i=1

A lower RMSE indicates better prediction accuracy, resulting in smoother


speed control and maintaining a safe distance from the vehicle ahead.

Q8. Conjugate Gradient vs. Steepest Descent


Introduction
Both Steepest Descent (SD) and Conjugate Gradient (CG) are
optimization methods used to train a Neural Network or Neuro-Fuzzy
Controller. Their goal is to minimize the error by updating the network
parameters (weights).

The gradient is:

gk =∇ E(θk )

Where:

 gk = Gradient (direction of maximum increase in error)

 E = Error function

 θ k= Current weights/parameters

The algorithms move in the opposite direction of the gradient to reduce


the error.

Step 1: Steepest Descent (SD)

Steepest Descent always moves in the negative gradient direction.

Working:

1. Calculate the gradient.

2. Move in the opposite direction of the gradient.

3. Repeat until the error is minimized.

Advantages

 Simple to understand.

 Easy to implement.

Disadvantages

 May converge slowly.

 Can move in a zigzag path instead of directly toward the minimum.

 Performance depends on the learning rate.

 On an ill-conditioned error surface (long, narrow valley), it takes


many iterations to reach the minimum.
Simple Example

Imagine walking down a mountain while always taking the steepest downhill
step. You may keep moving left and right (zigzag) before reaching the
bottom, making the journey slow.

Step 2: Conjugate Gradient (CG)

Conjugate Gradient improves training by using the current gradient and


the previous search direction.

The search direction is:


d k =−g k + β k d k−1

Where:

 d k = New search direction

 gk = Current gradient

 d k−1= Previous search direction

 β k = Constant that combines the previous direction with the current


gradient

Working

1. Calculate the current gradient.

2. Combine it with the previous search direction.

3. Move in the new conjugate direction.

4. Repeat until the error is minimized.

Step 3: Why is Steepest Descent Slow?

1. Zigzagging

The algorithm always follows the steepest downhill direction, which may
change at every step. As a result, it keeps changing direction and follows a
zigzag path.

2. Learning-Rate Sensitivity
 If the learning rate is too small, learning is very slow.

 If the learning rate is too large, the algorithm may overshoot the
minimum and become unstable.

3. Ill-Conditioned Error Surface

If the error surface is long and narrow, Steepest Descent keeps moving from
one side to the other instead of moving directly to the minimum.

Step 4: How Conjugate Gradient Improves Convergence

Conjugate Gradient avoids unnecessary zigzagging by using conjugate


search directions.

Instead of using only the negative gradient, it also considers the previous
search direction.

This helps to:

 Reach the minimum in fewer iterations.

 Reduce zigzag movement.

 Converge faster than Steepest Descent.

 Work better on ill-conditioned error surfaces.

Comparison

Steepest Descent Conjugate Gradient

Uses only the negative Uses the gradient and previous search
gradient. direction.

May move in a zigzag path. Reduces zigzagging.

Converges slowly. Converges faster.

Sensitive to the learning


Less sensitive and more efficient.
rate.

Needs more iterations. Needs fewer iterations.


Conclusion

Steepest Descent updates the network parameters by moving only in the


negative gradient direction. Although it is simple, it may converge slowly
because of zigzagging, learning-rate sensitivity, and ill-conditioned
error surfaces.

Conjugate Gradient improves convergence by using the search direction


d k =−g k + β k d k−1

instead of only the negative gradient. By combining the current gradient


with the previous search direction, it reaches the minimum faster,
reduces zigzagging, and requires fewer iterations. Therefore, Conjugate
Gradient is generally more efficient than Steepest Descent for
training neural networks and neuro-fuzzy controllers.

Q9. Objective Function for Intelligent Control


Introduction

An objective function is a mathematical function used to measure how well


an intelligent control system performs. The goal is to minimize the
objective function, which means:

 Reduce the tracking error.

 Use less control effort (energy or input).

Example: Robotic Arm Control

The objective of the robotic arm is to move its end-effector to the desired
position accurately while using minimum motor effort.

Step 1: Define the Tracking Error

The tracking error is the difference between the desired output and the
actual output.

e (t)= y des (t)− y (t)

Where:

 y des (t )= Desired position

 y (t )= Actual position
 e (t)= Tracking error

Explanation:
If the robotic arm reaches the correct position, the error becomes zero.

Step 2: Define the Objective Function

A common objective function is:


J=∑ e ¿

Where:

 J = Objective function

 e ¿= Tracking error

 u ¿= Control effort (motor force or energy)

 λ = Weighting parameter

Explanation:

 The first term reduces the tracking error.

 The second term reduces the control effort.

The aim is to make J as small as possible.

Step 3: How is the Objective Function Minimized?

The controller adjusts its parameters to reduce the value of J .

1. Genetic Algorithm (GA)

 Starts with many possible solutions.

 Evaluates each solution using the objective function.

 Selects the best solutions.

 Uses selection, crossover, and mutation to generate better


solutions.

 Repeats until the objective function is minimized.


2. Particle Swarm Optimization (PSO)

 Each particle represents a possible solution.

 Particles move toward the best solution found so far.

 They update their positions repeatedly.

 The best particle gives the minimum objective function.

3. Gradient-Based Optimization

 Calculates the gradient (slope) of the objective function.

 Updates the parameters in the direction that decreases the error.

 Repeats until the minimum value is reached.

Step 4: Role of the Weighting Parameter ( λ )

The weighting parameter λ controls the balance (trade-off) between tracking


accuracy and control effort.

 Small λ :

o Focuses more on reducing tracking error.

o Faster and more accurate response.

o Uses more control effort (more energy).

 Large λ :

o Focuses more on reducing control effort.

o Saves energy.

o Response may become slower or less accurate.

Simple Example

Imagine driving a car.

 Small λ : You press the accelerator hard to reach the desired speed
quickly (more fuel is used).
 Large λ : You accelerate gently to save fuel, but it takes longer to reach
the desired speed.

This is the trade-off controlled by the weighting parameter.

You might also like